Vietnam National University Ho Chi Minh City
HCMC University of Technology
Faculty of Mechanics Engineering
Department of Mechatronics Engineering
Subject:
Linear System and Control
LQR Control
Linear Quadratic Regulator
Definition of LQR
The theory of optimal control is concerned with operating a dynamic
system at minimum cost. The case where the system dynamics are
described by a set of linear differential equations and the cost is
described by a quadratic function is called the LQ problem. One of the
main results in the theory is that the solution is provided by the linear–
quadratic regulator (LQR), a feedback controller whose equations are
given below:
Q, R is the positive (semi-) definite matrix
Design of LQR Controller
By choosing the state feedback control rule u = - Kx with K is a tuning
gain, then substituting into equation of J
1 T
J = x (Q + K T RK ) xdt
20
In order to compute K, it could be defined from Lyapunov function.
Lyapunov candidate function is
1 T 1
V ( x (t )) = x (Q + K T RK ) xdt = x T Px
2t 2
V(x(0)) = J = xT(0)Px(0)
Derivating the first order
1
V ( x ) = x T (Q + K T RK ) x |t
2
1
1
= x T ( ) Q + K T RK x ( ) − x T (t ) Q + K T RK x (t )
2 2
Design of LQR Controller
Assume that selecting K in order that x() →0
1
V ( x ) = − x T (t ) Q + K T RK x (t )
2
Furthermore,
2
T 1 T
2
V ( x) = (x Px + x Px ) = x ( A − BK )T P + P ( A − BK ) x
1 T
Then
1 T
2
1 T
x ( A − BK ) P + P ( A − BK ) x = − x (Q + K T RK ) x
T
2
Matrix P satisfy Lyapunov function
( A − BK )T P + P ( A − BK ) = −(Q + K T RK )
Design of LQR Controller
Step 1: Solving the Lyapunov candidate function to obtain matrix P in
according with matrix K
1
Step 2: Then compute J = V(x(0)) = xT (0) Px (0) is a function of matrix K
2
J P
Step 3: To get min of J, we solve = 0 or =0
kij kij
Step 4: Obtain matrix K, the control rule u = - Kx
Step 5: Consider the stability of (A –BK)
If the outputs are adjustable, then choose
1 T T
J = x (C QC + K T RK ) xdt
20
With R = T , is square matrix
Design of LQR Controller
Lyapunov function can be re-written
( AT − K T B T ) P + P ( A − BK ) + Q + K T T K = 0
AT P + PA + [K − (T ) −1 B T P ]T [K − (T ) −1 B T P ] − PBR −1 B T P + Q = 0
P
Derivating with kij and using =0
kij
We have
[(K − (T ) −1 BT P )T (K − (T ) −1 BT P )] = 0
kij
The optimization could be achieved if
K = (T ) −1 B T P
K = −1 (T ) −1 B T P = R −1 B T P
In this case, Lyapunov function becomes algebraic equation Riccati
AT P + PA − PBR −1 B T P + Q = 0
The End