LQR(linearquadraticregulator)即线性二次型调节器,其对象是现代控制理论中以状态空间形式给出的线性系统,而目标函数为对象状态和控制输入的二次型函数。LQR最优设计指设计是出的状态反馈控制器K要使二次型目标函数J取最小值,而K由权矩阵Q与R唯一决定,故此Q、R的选择尤为重要。LQR理论是现代控制理论中发展最早也最为成熟的一种状态空间设计法。特别可贵的是,LQR可得到状态线性反馈的最优控制规律,易于构成闭环最优控制。而且Matlab的应用为LQR理论仿真提供了条件,更为我们实现稳、准、快的控制目标提供了方便。
LQR Linear-quadratic regulator design for state space systems.
[K,S,E] = LQR(SYS,Q,R,N) calculates the optimal gain matrix K
such that:
* For a continuous-time state-space model SYS, the state-feedback
law u = -Kx minimizes the cost function
J = Integral {x'Qx + u'Ru + 2*x'Nu} dt
subject to the system dynamics dx/dt = Ax + Bu
* For a discrete-time state-space model SYS, u[n] = -Kx[n] minimizes
J = Sum {x'Qx + u'Ru + 2*x'Nu}
subject to x[n+1] = Ax[n] + Bu[n].
The matrix N is set to zero when omitted. Also returned are the
the solution S of the associated algebraic Riccati equation and
the closed-loop eigenvalues E = EIG(A-B*K).
[K,S,E] = LQR(A,B,Q,R,N) is an equivalent syntax for continuous-time
models with dynamics dx/dt = Ax + Bu,