1. A controller for controlling an operation of a system, comprising: a processor for executing a learning module, wherein the learning module updates a model of the system using an extremum seeking, wherein the learning module determines a value Q[k] of a cost function at an iteration k, according to 
 Q[k]=C 1 ( {dot over (x)} ref [k]−{dot over (x)} est [k ]) 2 +C 2 ( x ref [k]−x est [k ]) 2 , wherein C 1 , and C 2 are positive constants, x ref is a reference state of the system and x est is an actual state of the system; and determines a coefficient β i of the model according to 
 y i [k+ 1]= y i [k]+a i ΔT sin(ω i kΔT +φ) Q[k] 
 β i [k]=y i [k]+a i sin(ω i kΔT +φ), for i= 1,. .. n, wherein y i [k] is the value of an intermediate integration variable at the iteration k, ΔT is a sampling time, i.e. t=kΔT, a i sin(ω i kΔT+φ) is a perturbation signal, wherein the perturbation signal is a sinusoid function with an amplitude a i , a frequency ω i , and a phase φ, i=1,. .. n, n is a number of perturbation signals and β i [k] is a value of the coefficient β i at the iteration k.