exploiting linear matrix inequalities in control...
TRANSCRIPT
Guest Lecture
Exploiting Linear Matrix Inequalities In
Control Systems Design
Ankush Chakrabarty
School of Electrical and Computer EngineeringPurdue University, West Lafayette, IN
Website: Link
October 28, 2015
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §1
Motivation
◮ Jan Willems (1971): “The basic importance of the LMI seems to
be largely unappreciated. It would be interesting to see whether or
not it can be exploited in computational algorithms...”
◮ We live in an era of high-performance computing...
◮ ... so why not use it?
◮ Exploiting excellent convex solvers◮ CVX — Link; Reference: [1]◮ YALMIP — Link; Reference: [2]◮ Open-source, efficient, robust, seamless MATLAB integration
Question
How do we use efficient, user-friendly solvers to design modern controlsystems?
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §2
Review: Linear/Bilinear Matrix Inequalities
Example 1
A⊤P + PA ≺ 0︸ ︷︷ ︸
linear in P
or A⊤PA− P ≺ 0︸ ︷︷ ︸
linear in P
Example 2[A⊤P + PA PB − C⊤
B⊤P − C D⊤D − I
]
≺ 0
}
linear in P
Example 3
A⊤P + PA︸ ︷︷ ︸
linear in P
+2αP︸︷︷︸
?
≺ 0
Scenario I: α > 0 fixed =⇒ LMI in P
Scenario II: α > 0 variable =⇒ BMI in P and α
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §3
Review: LMIs/BMIs
Example 4
A⊤P + PA+ 2αP − PBR−1B⊤P ≺ 0
Q: For fixed α > 0, is this an LMI in P?A: (Sadly) no, it is a Quadratic Matrix Inequality (QMI) in P
(look at: PBR−1B⊤P )
◮ Q: Why are we hung up on LMIs?
◮ A: LMIs are tractable! (c.f. [3])
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §4
Observer Design
CT-LTI System with measurements:
x = Ax+Bu
y = Cx
Linear observer:˙x = Ax+Bu+ L(y − Cx)
Goal: Design L to ensure global asymptotic stability of error dynamics
◮ Matrix inequality for observer design:
(A− LC)⊤P + P (A− LC) ≺ 0, P = P⊤ ≻ 0
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §5
Observer Design
A⊤P + PA− C⊤L⊤P − PLC ≺ 0, P ≻ 0
◮ To-do: Find L, P
◮ Problem: BMI in L and P
◮ Technique #1: Choose Y = PL
◮ LMIs:A⊤P + PA︸ ︷︷ ︸
linear in P
−C⊤Y ⊤ − Y C︸ ︷︷ ︸
linear in Y
≺ 0, P ≻ 0
◮ For robustness of solution, rewrite as
A⊤P + PA−C⊤Y ⊤ − Y C + 2αP � 0, P ≻ 0
with fixed α > 0
◮ Get back L = P−1Y (P ≻ 0, hence invertible)
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §6
General Structure of CVX Code in MATLAB
cvx_begin sdp quiet
% sdp: semi-definite programming mode
% quiet: no display during computing
% include CVX [variables]
% for example: variable P(3,3) symmetric
minimize([cost]) % convex function
subject to
[affine constraints] % preferably non-strict inequalities
cvx_end
disp(cvx_status) % solution status
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §7
Snippet in CVX
cvx_begin sdp
% Variable definition
variable P(n, n) symmetric
variable Y(n, p)
% LMIs
P*sys.A + sys.A’*P - Y*sys.C - sys.C’*Y’ + P <= 0
P >= eps*eye(n) % eps is a very small number in MATLAB
cvx_end
sys.L = P\Y; % compute L matrix
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §8
Simulation
t0 10 20
x 1
×108
-4
-2
0
2
ActualEstimated
t0 10 20
x 2
×108
-2
0
2
4ActualEstimated
t0 10 20
x 3
×108
-1
0
1
2
ActualEstimated
t0 10 20
|e|
0
100
200
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §9
State/Output Feedback Control
LTI System with output feedback control:
x = Ax+Bu
y = Cx
u = −Ky
Goal: Design K to ensure global asymptotic stability
◮ Matrix inequality for output-feedback controller design:
(A−BKC)⊤P + P (A−BKC) ≺ 0, P ≻ 0
◮ Simpler case: state-feedback (C = I)
(A−BK)⊤P + P (A−BK) ≺ 0, P ≻ 0
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §10
Simpler Case: State-Feedback Control
(A−BK)⊤P + P (A−BK) ≺ 0, P ≻ 0
◮ To-do: Find K, P
◮ Problem: BMI in K and P
◮ Technique #2: Congruence transformation with S , P−1 andZ , KS
◮ New inequalities
SA⊤ +AS − SK⊤B⊤ −BKS ≺ 0
◮ LMIs:SA⊤ +AS︸ ︷︷ ︸
linear in S
−Z⊤B⊤ −BZ︸ ︷︷ ︸
linear in Z
≺ 0, P ≻ 0
◮ Get back P = S−1, K = ZS−1
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §11
Snippet in CVX
cvx_begin sdp
% Variable definition
variable S(n, n) symmetric
variable Z(m, n)
% LMIs
sys.A*S + S*sys.A’ - sys.B*Z - Z’*sys.B’ <= -eps*eye(n)
S >= eps*eye(n)
cvx_end
sys.K = Z/S; % compute K matrix
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §12
Simulation
t0 1 2 3 4 5
x 1
-100
-50
0
t0 1 2 3 4 5
x 2
0
50
100
t0 1 2 3 4 5
x 3
-200
-100
0
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §13
Output-Feedback Control
A⊤P + PA− C⊤K⊤B⊤P − PBKC ≺ 0, P ≻ 0
◮ To-do: Find K, P
◮ Problem: BMI in K and P
◮ Technique #3: Choose M such that BM = PB and N , MK,c.f. [4]
◮ New inequalities: A⊤P + PA− C⊤K⊤MB⊤ −BMKC ≺ 0
◮ Linear matrix (in)equalities:
A⊤P + PA︸ ︷︷ ︸
linear in P
−C⊤N⊤B⊤ −BNC︸ ︷︷ ︸
linear in N
≺ 0, BM = PB, P ≻ 0
◮ Get back K = M−1N (M is invertible if B has full column rank)
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §14
Snippet in CVX
Cool fact: CVX/YALMIP can handle equality constraints!
cvx_begin sdp quiet
% Variable definition
variable P(n, n) symmetric
variable N(m, p)
variable M(m, m)
% LMIs
P*sys.A + sys.A’*P - sys.B*N*sys.C ...
- sys.C’*N’*sys.B’ <= -eps*eye(n)
sys.B*M == P*sys.B
P >= eps*eye(n);
cvx_end
sys.K = M\N % compute K matrix
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §15
Simulation
t0 50 100
x 1
-2
-1
0
1
t0 50 100
x 2
-2
-1
0
1
t0 50 100
x 3
-0.5
0
0.5
1
t0 50 100
x 4
-2
-1
0
1
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §16
Technique #4: The Schur Complement Lemma
◮ QMI:A⊤P + PA+Q− PBR−1B⊤P ≺ 0
◮ Very common trick used in control systems
◮ Block symmetric matrix[A BB⊤ C
]
Schur Complement[A BB⊤ C
]
≺ 0 ⇐⇒ A ≺ 0, C − B⊤A−1B ≺ 0
[A BB⊤ C
]
≺ 0 ⇐⇒ C ≺ 0, A− BC−1B⊤ ≺ 0
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §17
Application to Optimal Control/LQR
◮ CT-LTI system, quadratic infinite horizon cost:
J =
∫ ∞
0
(
x⊤Qx+ u⊤Ru)
dt
◮ Matrices Q = Q⊤ ≻ 0, R = R⊤ ≻ 0
◮ From Continuous Algebraic Riccati Equation (CARE) 1:
SA⊤ +AS + Z⊤B⊤ +BZ + SQS + Z⊤RZ � 0
◮ Taking Schur complements:
SA⊤ +AS + Z⊤B⊤ +BZ S Z⊤
S −Q−1 0Z 0 −R−1
� 0
◮ Voila! LMIs in S,Z =⇒ K = ZS−1
1Jing Li Hua O. Wang David Niemann. Relations Between LMI and ARE with their applications to
Absolute Stability Criteria, Robustness Analysis and Optimal Control.
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §18
Snippet in CVX
sys.Q = 0.5*eye(n);
sys.R = [0.05, 0; 0 0.1];
cvx_begin sdp quiet
variable S(n, n) symmetric
variable Z(m, n)
% LMIs
[S*sys.A’ + sys.A*S + sys.B*Z + Z’*sys.B’, S, Z’;...
S, -inv(sys.Q), zeros(n,m);...
Z, zeros(m,n), -inv(sys.R)] <= 0
S >= eps*eye(n)
cvx_end
sys.K = Z/S; % compute K matrix
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §19
Simulation
t0 5 10 15 20 25 30 35 40
x 1
-500
0
500
t0 5 10 15 20 25 30 35 40
x 2
-100
0
100
t0 5 10 15 20 25 30 35 40
x 3
-100
0
100
Figure: Q = 5I3, R = diag[2, 1]Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §20
Discrete-Time LMIs
DT-LTI System with measurements:
x[k + 1] = Ax[k] +Bu[k]
y[k] = Cx[k]
Linear observer:
x[k + 1] = Ax[k] +Bu[k] + L(y[k]− Cx[k])
◮ Discrete-Time Observer Lyapunov Equation:
(A− LC)⊤P (A− LC)− P ≺ 0, P ≻ 0
◮ This is a QMI in L
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §21
Synthesis of LMIs
◮ Directly taking Schur complements:
[−P (A− LC)⊤
A− LC −P−1
]
≺ 0 =⇒ still not an LMI in P
◮ Technique #5: P = PP−1P
(A− LC)⊤PP−1P (A− LC)− P ≺ 0 ⇒[
−P ⋆
PA− Y C −P
]
≺ 0
◮ Recommend: Derive for DT-LTI state-feedback controller (youmight need P = P−1PP−1)
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §22
Snippet in CVX
cvx_begin sdp quiet
% Variable definition
variable P(n, n) symmetric
variable Y(n, p)
% LMIs
[-P, sys.A’*P - sys.C’*Y’; P*sys.A - Y*sys.C, -P] <= 0
P >= eps*eye(n)
cvx_end
sys.L = P\Y; % compute L matrix
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §23
Simulation
k0 10 20
x 1
×109
-2
0
2
4ActualEstimated
k0 10 20
x 2
×109
-2
-1
0
1ActualEstimated
k0 10 20
x 3
×109
-5
0
5
10ActualEstimated
t0 10 20
|e|
0
50
100
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §24
Technique #6: The S-Procedure
◮ Question 2: When does:
z⊤F1z ≥ 0︸ ︷︷ ︸
z ∈ Rn\{0}
=⇒ z⊤F0z > 0 ?
◮ Answer: If there exists a κ ≥ 0 such that F0 − κF1 ≻ 0
◮ Intuition: If F0 − κF1 ≻ 0 for some κ ≥ 0, then F0 ≻ κF1, soF0 ≻ 0 when F1 � 0
2http://stanford.edu/class/ee363/lectures/lmi-s-proc.pdfAnkush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §25
Application to Globally Lipschitz Nonlinear Systems
Nonlinear system:
x = Ax+Bu+Bφφ(x),
y = Cx
Observer:˙x = Ax+Bu+Bφφ(x) + L(y − Cx)
◮ The nonlinearity φ satisfies ‖φ(x1)− φ(x2)‖ ≤ β‖x1 − x2‖ for allx1, x2 ∈ R
n, (here β > 0)
◮ Constraint can be written as:
(φ(x1)− φ(x2))⊤(φ(x1)− φ(x2)) ≤ β2(x1 − x2)
⊤(x1 − x2)
=⇒[
x1 − x2φ(x1)− φ(x2)
]⊤ [β2I 00 −I
] [x1 − x2
φ(x1)− φ(x2)
]
≥ 0
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §26
Restatement of Problem
◮ Ingredient #1: (from Lyapunov stability and Technique #2)
◮ We need P ≻ 0 and L such that
[x− x
φ(x)− φ(x)
]⊤ [∗+ PA− ∗ − Y C PBφ
B⊤φ P 0
] [x− x
φ(x) − φ(x)
]
< 0
◮ Ingredient #2: (from constraint on φ)
[x− x
φ(x)− φ(x)
]⊤ [β2I 00 −I
] [x− x
φ(x)− φ(x)
]
≥ 0
◮ Compare with S-procedure (choose z =[x− x φ(x)− φ(x)
]⊤)
z⊤F1z ≥ 0 =⇒ −z⊤F0z > 0 ? −→ ∃κ ≥ 0 : F0 + κF1 ≺ 0
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §27
Overall LMI
[A⊤P + PA− C⊤Y ⊤ − Y C + 2αP PBφ
B⊤φ P 0
]
+ κ
[β2I 00 −I
]
� 0
P ≻ 0
κ ≥ 0
◮ Scalars α > 0 and β > 0 are assumed to be known =⇒ LMIs inP, Y and κ, c.f.
◮ Referred to as ‘incremental quadratic stability’, c.f. [5]
◮ Bad estimate of β introduces conservatism
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §28
Snippet in CVX
cvx_begin sdp quiet
% Variable definition
variable P(n, n) symmetric
variable Y(n, p)
variable kap(1,1)
% LMIs
[P*sys.A + sys.A’*P - Y*sys.C - sys.C’*Y’...
+ 0.1*P + kap*beta^2*eye(n), P*sys.Bf;...
sys.Bf’*P, -kap*eye(1)] <= 0
P >= eps*eye(n)
kap >= 0
cvx_end
sys.L = P\Y; % compute L matrix
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §29
Simulation
t0 10 20
x 1
×108
-5
0
5
10ActualEstimated
t0 10 20
x 2
×108
-10
-5
0
5ActualEstimated
t0 10 20
x 3
×108
-4
-2
0
2ActualEstimated
t0 10 20
|e|
0
200
400
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §30
Technique #6: The Generalized Eigenvalue Problem
A(x), B(x), C(x) → symmetric matrices
GEVP
minimize λ
subject to: λB(x)−A(x) � 0,
B(x) ≻ 0,
C(x) ≻ 0
Bounding Eigenvalues
λ1I � P � λ2I
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §31
Application of GEVP in Robust Control
Disturbed LTI System
x = Ax+Bu+Gw
z = Cx+Dw
u = −Kx
Objective: Choose K to minimize ‘peak-gain’ effect of w on z, c.f. [6]
minimize γ
subject to:
[(A−BK)⊤P + P (A−BK) + 2αP PG
G⊤P −2αI
]
� 0
γ
[P 00 I
]
−[C⊤C C⊤D
D⊤C D⊤D
]
� 0
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §32
LMIs for L∞ Control
◮ Use congruence transformation with
[P−1 00 I
]
on first MI
◮ Define S = P−1, Z = KS
◮ Write P = SPS in second MI and take Schur complements
◮ LMIs:
minimize γ
subject to:
[SA⊤ +AS −BZ − Z⊤B⊤ + 2αS G
G⊤ −2αI
]
� 0
−S 0 SC⊤
0 −I D⊤
CS D −γI
� 0
S ≻ 0
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §33
Snippet in CVX
cvx_begin sdp quiet
variable S(n, n) symmetric
variables Z(m, n) gam(1,1)
minimize(gam)
subject to
[sys.A*S + S*sys.A’ - sys.B*Z - Z’*sys.B’...
+ 2*alph*S, sys.G; sys.G’, -2*alph*eye(q)] <= 0
[-S, zeros(n, q), S*sys.C’;...
zeros(q,n), -eye(q), sys.D’;...
sys.C*S, sys.D, -gam*eye(p)] <= 0
S >= eps*eye(n) % eps is a very small number in MATLAB
gam >= eps
cvx_end
sys.K = Z/S; % compute K matrix
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §34
Simulation
t0 10 20
x 1
-200
0
200
400
t0 10 20
x 2
-200
0
200
t0 10 20
x 3
-200
-100
0
100
t0 10 20
|z|
0
100
200
300
Figure:√γ = 0.781
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §35
Conclusions
◮ Quadratic stability notions can generally be presented as LMIs
◮ Key-point: Convex programming is efficient and solvers areeasily available (user-friendly too!)
◮ Convex relaxations =⇒ applications galore!◮ Networked/Decentralized/Distributed systems◮ Cybersecurity/Fault-tolerant control◮ Fuzzy control◮ Kalman filtering◮ Information theory◮ Optimal experiment design◮ Advanced control methods (sliding mode, model predictive control)
◮ Some methods are shown here to get LMIs for controller/observerdesign (many more available in, c.f. [7, 8])
◮ Caveat: Could be conservative!
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §36
References
M. Grant, S. Boyd, and Y. Ye, “CVX: Matlab software for disciplined convex programming,” 2008.
J. Lofberg, “YALMIP: A toolbox for modeling and optimization in MATLAB,” in Computer Aided
Control Systems Design, 2004 IEEE International Symposium on. IEEE, 2004, pp. 284–289.
M. V. Kothare, V. Balakrishnan, and M. Morari, “Robust constrained model predictive control
using linear matrix inequalities,” Automatica, vol. 32, no. 10, pp. 1361–1379, 1996.
C. A. Crusius and A. Trofino, “Sufficient LMI conditions for output feedback control problems,”
Automatic Control, IEEE Transactions on, vol. 44, no. 5, pp. 1053–1057, 1999.
B. Acıkmese and M. Corless, “Observers for systems with nonlinearities satisfying incremental
quadratic constraints,” Automatica, vol. 47, no. 7, pp. 1339–1348, 2011.
T. Pancake, M. Corless, and M. Brockman, “Analysis and control of polytopic uncertain/nonlinear
systems in the presence of bounded disturbance inputs,” in American Control Conference, 2000.
Proceedings of the 2000, vol. 1, no. 6. IEEE, 2000, pp. 159–163.
S. P. Boyd, L. El Ghaoui, E. Feron, and V. Balakrishnan, Linear matrix inequalities in system and
control theory. SIAM, 1994, vol. 15.
J. G. VanAntwerp and R. D. Braatz, “A tutorial on linear and bilinear matrix inequalities,” Journal
of Process Control, vol. 10, no. 4, pp. 363–385, 2000.
Ankush Chakrabarty ECE680 Fall 2015 — Purdue University October 28, 2015 §37