introduction to modern control...
TRANSCRIPT
Introduction to Modern Control SystemsConvex Optimization, Duality and Linear Matrix Inequalities
Kostas Margellos
University of Oxford
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 1 / 28
Agenda for today’s lectures1
1 09.30 - 10.30
Convex Optimization
2 10.30 - 10.45
Break
3 10.45 - 11.30
Duality Theory
4 11.30 - 12.15
Linear Matrix Inequalities (LMIs)
1Thanks to Prof. Paul Goulart and Dr. James Anderson for slides input!AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 2 / 28
So far we have discussed about ...
Standard form optimization problems:
Convexity
Convex optimization programs
Optimality conditions
Duality
What is left to study?
Linear Matrix Inequalities, LMIs for short
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 3 / 28
Linear Matrix Inequalities
What are LMIs ?
Non-obvious LMIs
LMIs in state feedback control
LMIs in optimization
Semidefinite programmingPrimal and dual formulation
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 4 / 28
What are LMIs?
A Linear Matrix Inequality (LMI) is a constraint of the form:
x1A1 + x2A2 + · · · xnAn � B
where the matrices (A1, . . . ,An,B) are all symmetric.
This is a constraint that imposes matrix
B −n∑i
xiAi
to be positive semidefinite.
It is equivalent to imposing n polynomial inequalities
Not element-wise constraints.
All leading principle minors of this matrix are positive.
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 5 / 28
What are LMIs?
A Linear Matrix Inequality (LMI) is a constraint of the form:
x1A1 + x2A2 + · · · xnAn � B
where the matrices (A1, . . . ,An,B) are all symmetric.
Consider the constraint
Q =
[Q11 Q12
Q21 Q22
]� 0
This is equivalent to 2 inequalities:
Q11 ≥ 0
det(Q) ≥ 0⇔ Q11Q22 − Q12Q21 ≥ 0
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 6 / 28
LMIs are convex constraints
Theorem
The following LMI constraint is convex.
F (x) = B −n∑i
xiAi � 0
Proof: Let x , y such that F (x),F (y) � 0, and λ ∈ (0, 1).
F (λx + (1− λ)y) = B −∑i
(λxi + (1− λ)yi
)Ai
= λB + (1− λ)B − λ∑i
xiAi − (1− λ)∑i
yiAi
= λF (x) + (1− λ)F (y)
� 0
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 7 / 28
LMIs are convex constraints
Theorem
The following LMI constraint is convex.
F (x) = B −n∑i
xiAi � 0
Alternative proof: We want to show that the set {x : F (x) � 0} isconvex. We have that ...
{x : F (x) � 0} = {x : z>F (x)z ≥ 0, for all z}
=⋂z
{x : z>F (x)z ≥ 0}
... but this is an infinite intersection of sets affine in x ... so it is convex!
LMI much harder than linear constraints – an infinite number of them!
Result can be piecewise affine – LMIs nonlinear!
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 8 / 28
Why are LMIs interesting?
Linear Matrix Inequalities:
Appear in many common control design problems (more later on)
Most of the problems presented so far can be written using LMIconstraints
Linear constraints
Ax ≤ b ⇔ diag(Ax) � diag(b)
Quadratic constraints (It will be clear in a couple of slides)
x>Qx + b>x + c ≥ 0, Q � 0 ⇔(c + b>x x>
x −Q−1)� 0
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 9 / 28
Non-obvious LMIs
Some cases (like the QP) are harder to write as LMIs.
There are two useful “tricks”:
Schur complement
The S-procedure
Schur complement: Turns a nonlinear constraint into an LMI
Assume that Q(x) = Q(x)>,R(x) = R(x)> : affine functions of x
We then have that
R(x) � 0 and Q(x)− S(x)R(x)−1S(x)> � 0
⇔[Q(x) S(x)S(x)> R(x)
]� 0
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 10 / 28
Schur complement
Schur complement: Turns a nonlinear constraint into an LMI
Assume that Q(x) = Q(x)>,Q(x) = Q(x)> : affine functions of x
We then have that
R(x) � 0 and Q(x)− S(x)R(x)−1S(x)> � 0
⇔[Q(x) S(x)S(x)> R(x)
]� 0
Example 1:
‖A‖2 ≤ t ⇔ A>A � t2I , t ≥ 0 ⇔(tI A>
A tI
)� 0
Example 2: The QP
x>Qx + b>x + c ≥ 0, Q � 0 ⇔(c + b>x x>
x −Q−1)� 0
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 11 / 28
S-procedure
S-procedure: Turns implications to LMIs
When is it true that one quadratic inequality implies another? In otherwords, when does
x>F x ≥ 0, x 6= 0⇒ x>Fx ≥ 0
It is not difficult to see that the condition is satisfied if there exists
τ ∈ R such that τ ≥ 0 and F � τ F
The only if part also holds, but less obvious and difficult to prove.
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 12 / 28
S-procedure: Example
Example: Use a quadratic Lyapunov function to show that
x = Ax + g(x)
is stable if ‖g(x)‖2 ≤ γ‖x‖2, γ > 0.
We want to show that there exists a Lyapunov functionV (x) = x>Px , P � 0 such that
V (x) ≤ −αV (x), for all x , [α > 0 given]
if ‖g(x)‖2 ≤ γ‖x‖2
Or, in other words, if ‖g(x)‖2 ≤ γ‖x‖2, we want
V (x) + αV (x) ≤ 0
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 13 / 28
S-procedure: Example (cont’d)
We want to show that there exists a Lyapunov functionV (x) = x>Px , P � 0 such that
V (x) ≤ −αV (x), for all x , [α > 0 given]
if ‖g(x)‖2 ≤ γ‖x‖2
Letting z = g(x), we have
V (x) + αV (x) = x>(A>P + PA + αP
)x + 2z>Pz
=
[xz
]> [A>P + PA + αP P
P 0
] [xz
]
Hence, if ‖g(x)‖2 ≤ γ‖x‖2, we want
−[A>P + PA + αP P
P 0
]� 0
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 14 / 28
S-procedure: Example (cont’d)
The condition
‖g(x)‖2 ≤ γ‖x‖2 ⇒ z>z ≤ γ2x>x
This can be written as [xz
]> [−γ2 00 I
] [xz
]≤ 0
We thus have
−[A>P + PA + αP P
P 0
]� 0 if
[γ2 00 −I
]� 0
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 15 / 28
S-procedure: Example (cont’d)
We thus have
−[A>P + PA + αP P
P 0
]� 0 if
[γ2 00 −I
]� 0
Applying S-procedure (finally!) we have
−[A>P + PA + αP P
P 0
]� τ
[γ2 00 −I
]� 0
Overall,
−[A>P + PA + αP + τγ2I P
P −τ I
]� 0, P � 0, τ > 0
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 16 / 28
LMIs in state feedback control - By means of example
Consider a system G : x = Ax + Bu
Convex optimization
5
State feedback
Control Theory Using LMIs
Gux
Assume we are given the system G : x = Ax + Bu
The state feedback problem is to find a gain matrix K such that the controlpolicy u = Kx renders the closed loop stable.
Gux
The closed loop dynamics are:
x = (A + BK)x.
Thus the goal is to find K such that A + BK is Hurwitz.
K
Determine a feedback gain matrix K such that u = Kx renders the closedloop system stable.
Convex optimization
5
State feedback
Control Theory Using LMIs
Gux
Assume we are given the system G : x = Ax + Bu
The state feedback problem is to find a gain matrix K such that the controlpolicy u = Kx renders the closed loop stable.
Gux
The closed loop dynamics are:
x = (A + BK)x.
Thus the goal is to find K such that A + BK is Hurwitz.
K
Closed loop system: x =(A + BK
)x .
Goal: Determine K such that A + BK is Hurwitz.
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 17 / 28
LMIs in state feedback control
Closed loop system: x =(A + BK
)x .
Goal: Determine K such that A + BK is Hurwitz.
Lyapunov stability: A matrix A is stable if and only if there existsP = P> � 0 such that
A>P + PA � 0
Equivalent representation: Multiply by P−1 from the left and right:
P−1A>PP−1 + P−1PAP−1 � 0
and set Q = P−1. We then have
QA> + AQ � 0
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 18 / 28
LMIs in state feedback control
Closed loop system: x =(A + BK
)x .
Goal: Determine K such that A + BK is Hurwitz.
Lyapunov stability: A matrix A is stable if and only if there existsQ = Q> � 0 such that
QA> + AQ � 0
Enforce this condition with A + BK in place of A and determine K and Q:
Q(A + BK
)>+(A + BK
)Q � 0
which leads to
QA> + (QK>)B> + AQ + B(QK ) � 0
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 19 / 28
LMIs in state feedback control
Closed loop system: x =(A + BK
)x .
Goal: Determine K such that A + BK is Hurwitz.
Lyapunov stability: A matrix A is stable if and only if there existsQ = Q> � 0 such that
QA> + AQ � 0
We are left with this condition which is not nice!
QA> + (QK>)B> + AQ + B(QK ) � 0
Setting Z = KQ we have
QA> + Z>B> + AQ + BZ � 0
Solve this LMI to determine Q and Z and then compute K = ZQ−1
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 20 / 28
LMIs in optimization
Consider the following optimization program
(SDP) :
min c>x
subject to: x1A1 + x2A2 + · · · xnAn � B
where the matrices (A1, . . . ,An,B) are all symmetric.
We could also have equality constraints
Optimization over LMI constraints
Why is this class of optimization programs interesting?
Semidefinite programming (SDP)
Many control analysis and synthesis problems can be written as SDPs
Most of the problems presented so far can be written as SDPs
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 21 / 28
Semidefinite programming
Primal SDP problem:
min c>x
subject to: x1A1 + x2A2 + · · · xnAn � B
where the matrices (A1, . . . ,An,B) are all symmetric.
Lagrangian:
L(x ,Λ) = c>x +∑i
〈Λ,Ai 〉xi − 〈Λ,B〉,
where 〈X ,Y 〉 = trace(X>Y ) =∑
i ,j XijYij .
This fact relies on the following property (dual cone for semidefinitematrices):{
x ∈ Sn∣∣∣ trace(X>Y ) ≥ 0, ∀Y � 0
}= {X ∈ Sn | X � 0}
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 22 / 28
Semidefinite programming
Primal SDP problem:
min c>x
subject to: x1A1 + x2A2 + · · · xnAn � B
where the matrices (A1, . . . ,An,B) are all symmetric.
Lagrangian:
L(x ,Λ) = c>x +∑i
〈Λ,Ai 〉xi − 〈Λ,B〉
=∑i
(ci + 〈Λ,Ai 〉
)xi − 〈Λ,B〉
Dual function:
g(λ) =
{−〈Λ,B〉 if ci + 〈Λ,Ai 〉 = 0 for i = 1 . . . n
−∞ otherwise
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 23 / 28
Semidefinite programming
Primal SDP problem:
min c>x
subject to: x1A1 + x2A2 + · · · xnAn � B
where the matrices (A1, . . . ,An,B) are all symmetric.
Dual function:
g(λ) =
{−〈Λ,B〉 if ci + 〈Λ,Ai 〉 = 0 for i = 1 . . . n
−∞ otherwise
The dual problem:max −〈B,Λ〉
subject to: 〈Ai ,Λ〉 = −ci , for all i
Λ � 0
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 24 / 28
Semidefinite programming
Primal SDP problem:
min c>x
subject to: x1A1 + x2A2 + · · · xnAn � B
The dual problem:max −〈B,Λ〉
subject to: 〈Ai ,Λ〉 = −ci , for all i
Λ � 0
Weak duality:p∗ − d∗ = c>x + 〈B,Λ〉 [primal feasibility]
≥ c>x +∑i
〈Ai ,Λ〉xi [dual feasibility]
=∑i
cixi −∑i
cixi = 0
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 25 / 28
Semidefinite programming
Primal SDP problem:
min c>x
subject to: x1A1 + x2A2 + · · · xnAn � B
The dual problem:max −〈B,Λ〉
subject to: 〈Ai ,Λ〉 = −ci , for all i
Λ � 0
Weak duality: p∗ − d∗ ≥ 0
Strong duality:Also true under Slater’s condition (constraint qualification). Constraints inthe primal need to be satisfied with ≺ instead of �.
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 26 / 28
What was this lecture about?
All about optimization ...
Convex optimization programs are “nice”Local solution = Global solution
Recognizing convex functions and setsIf you do this life is easier; you can recast seemingly difficult problemsto convex ones
Formulating dual optimization programsSometimes much easier than the primal ones (think of MILPs, SDPs)
Linear matrix inequalitiesMore difficult but appear in many stability and control design problems
Don’t forget the “big picture” ...
Determine controllers via optimization programs
Allows trading between different objectives
Allows enforcing constraints
Efficient alternative to PID and LQR - price to pay is computation!
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 27 / 28
Thank you! Questions?
Contact at:[email protected]
AIMS CDT 2016-17 Introduction to Modern Control Systems November 23, 2016 28 / 28