An extremum seeking control method optimizes a control process for a plant such as an air handling unit. The method compensates for abrupt changes in the operation of the plant by resetting the extremum seeking control strategy in response to a detection of the abrupt change.