1. A method for controlling an operation of a system, comprising: operating the system by a controller, wherein the controller is model-based controller determined according to a model of the system; updating the model, during the operation, based on an extremum seeking; and updating the controller based on the updated model, wherein steps of the method are performed by a processor.