Professional Documents
Culture Documents
1
Previous lectures
2
LQR problem: Background
LQR problem: Find the control inputs π = {u0 , · · · , uN−1 } that makes
the following criterion as small as possible:
N−1
X
J(π) = xN| PxN + xk| Qxk + uk| Ruk (2)
k=0
where
are given state cost, terminal cost, and input cost matrices, respectively.
3
Multi-objective interpretation
Q = P = C |C R = ρI
where yk = Cxk .
√
ρ gives relative weighting of output and input norm.
4
Multi-objective interpretation
LQR quadratic cost can be written as: J = Jout + ρJin . The term
N
X
Jout = k yk k2
k=0
5
Trade-off between conflicting goals
Jout
Jout + ρJin = J (Constant)
Jin
When ρ is much larger than 1, the most effective way to decrease J
is to employ a small control input, at the expense of a large output.
When ρ is much smaller than 1, the most effective way to decrease
J is to obtain a very small output, even if this is achieved at the
expense of employing a large control input.
6
LQR via least-squares
7
LQR via least-squares
8
Finite-horizon LQR control
Theorem
Consider the finite horizon LQR problem. The optimal control
JN = x0| Qx0 .
Dynamic programming solution
10
Completing the squares
Consider the loss function of the form
|
x Qx Qxu x
J(x , u) = | , (3)
u Qxu Qu u
Since (4) is quadratic in u and both terms are greater or equal zero, (3)
is minimized for u = −Lx . The minimum is
11
Proof: Via dynamic programming
n N−1
X o
Vk = min xi| Qxi + ui| Rui + xN| PxN
uk ,··· ,uN−1
i=k
12
Proof: Via dynamic programming
VN = xN| SN xN
13
Proof: Via dynamic programming
Then, we get:
|
Q + A| SN A B | SN A
xN−1 xN−1
VN−1 = min
uN−1 uN−1 A| SN B R + B | SN B uN−1
This function is quadratic in uN−1 . Completing the squares, we can
write:
n
|
A| SN A + Q − L|N−1 (R + B | SN B)LN−1 xN−1
VN−1 = min xN−1
uN−1
o
+ (uN−1 + LN−1 xN−1 )| (R + B | SN B)(uN−1 + LN−1 xN−1 ) (5)
1. set SN := P
2. for k = N, · · · , 1, compute
3. for k = 0, · · · , N − 1, compute
4. for k = 0, · · · , N − 1, compute
uk := −Lk xk
15
LQ-control of the double integrator
Q = P = C |C , R=ρ
where ρ > 0.
16
LQ-control of the double integrator
2.5
Jout
1.5
1
0 0.2 0.4 0.6 0.8 1
Jin
17
LQ-control of the double integrator
1
0.8 ρ = 0.3
0.6 ρ = 10
0.4
yk
0.2
0
−0.2
0 2 4 6 8 10 12 14 16 18 20
0.4
0.0
uk
-0.4
-0.8
0 2 4 6 8 10 12 14 16 18 20
Number of samples [k]
18
Reference
19