Professional Documents
Culture Documents
Linear Control Systems Lecture # 14 Linear Quadratic Regulator (LQR)
Linear Control Systems Lecture # 14 Linear Quadratic Regulator (LQR)
Lecture # 14
Linear Quadratic Regulator (LQR)
p. 1/2
p. 2/2
p. 3/2
Write J as
J = lim J(tf )
tf
J(tf ) =
tf
p. 4/2
p. 5/2
Remarks:
1. The need for (A, B) to be stabilizable is clear, for
otherwise there would be no F such that
Re [(A + BF )] < 0
2. To see why detectability of (A, M ) is needed, consider
Z
x = x + u, J =
u2 (t) dt
0
A = 1, B = 1, M = 0, R = 1
(A, B) is controllable, but (A, M ) is not detectable
F = 0 u(t) = 0 J = 0
p. 6/2
p. 7/2
p. 8/2
Remarks:
1. Since the control is stabilizing,
Re [(A BR1 B T P )] < 0
p. 9/2
Example:
x 1 = x2 , x 2 = u
Z
[x21 + u2 ] dt, > 0
J =
0
"
"
"
0 1
0
1 0
A=
, B=
, Q=
, R=
0 0
1
0 0
" #
i
h
i
1 h
Q=
1 0 M = 1 0
0
"
#
0 1
rank[B, AB] = rank
= 2 (A, B) is controllable
1 0
p. 10/2
rank
"
M
MA
= rank
"
1 0
0 1
=2
(A, M ) is observable
0 = P A + AT P + Q P BR1 BP
P =
"
p11 p12
p12 p22
p12
p12
0 = 1 1 p212
0 = 2p12 1 p222
p
= , p22 = 2 p12
3/4
1/4
1
p. 11/2
P =
"
21/4
1/2
3/4
1/2
1
F = R1 B T P =
1/2
23/4
#
"
0
1
1/4
A + BF =
1/2
2
1,2 =
1/4
1
(1 j)
2
p. 12/2
F = 1/2
21/4
1,2 =
1/4
1
(1 j)
2
p. 13/2
Matlab Calculations:
X = lyap(A,N) solves the Lyapunov equation
AX + XAT + N = 0
p. 14/2
X = are(A,S,Q)
XA + AT X + Q XSX = 0
S = BR1 B
[K,P,E] = lqr(A,B,Q,R)
P A + AT P + Q P BR1 B T P = 0
K = R1 B T P and E is a vector whose elements are the
eigenvalues of (A BR1 B T P )
Notice that F = K
p. 15/2
LQR Design
Given the system
x = Ax + Bu
p. 16/2
Procedure:
1. Choose Q and R such that Q = M T M , with (A, M )
detectable, and R = RT > 0
2. Solve the Riccati equation
P A + AT P + Q P BR1 B T P = 0
and compute F = R1 B T P
3. Simulate the initial response of x = (A + BF )x for
different initial conditions
4. If the transient response specifications and/or the
magnitude constraints are not met, go back to step 1 and
re-choose Q and/or R
p. 17/2
Typical Choice:
q1
q2
Q=
...
qi =
tsi (ximax
)2
ri =
r1
r2
, R =
qn
rm
(uimax
...
)2
>0
p. 18/2
Example:
0
0
1
0
A= 0
0
1 , B = 0
1
0.4 4.2 2.1
p. 19/2
Q = diag(1,1,1)
1.5
R=0.01
R=0.1
R=1
1.5
0.5
0
0.5
0
0.5
0.5
0.5
10
0.2
0.4
0.6
0.8
15
1.5
20
25
2.5
30
p. 20/2
R=0.1
1.5
Q =1
11
Q = 10
0.5
x2
11
0.5
0.5
0
0.5
1
0
10
15
3
0
20
p. 21/2
Q =1;R=0.1
11
Q =10;R=0.1
11
Q =10;R=0.4
1.5
1
0.5
0.5
11
0.5
1
0.5
0.2
0.4
0.6
0.8
10
15
3
0
20
p. 22/2