Grammians Matthew M. Peet Illinois Institute of Technology Lecture 2: Grammians
Lyapunov Equations Proposition 1. Suppose A is Hurwitz and Q is a square matrix. Then X = e AT s Qe As ds is the unique solution to the Lyapunov Equation A T X + XA + Q = Proposition 2. Suppose Q >. Then A is Hurwitz is and only if there exists a solution X > to the Lyapunov equation A T X + XA + Q = M. Peet Lecture 2: 2 / 24
Lyapunov Inequalities Proposition 3. Suppose A is Hurwitz and X 1 satisfies A T X 1 + X 1 A = Q Suppose X 2 satisfies Then X 2 > X 1. A T X 2 + X 2 A < Q. Proof. A T (X 2 X 1 ) + (X 2 X 1 )A = (A T X 2 + X 2 A) (A T X 1 + X 1 A) = A T X 2 + X 2 A + Q = Q < Since A is Hurwitz and Q >, by the previous Proposition X 2 X 1 > M. Peet Lecture 2: 3 / 24
Grammians Recall From State-Space Systems: Controllable means we can do eigenvalue assignment. Observable means we can design an observer. Controllable and Observable means we can design an observer-based controller. Questions: How difficult is the control problem? What is the effect of an input on an output? M. Peet Lecture 2: 4 / 24
Grammians To give quantitative answers to these questions, we use Grammians. Definition 1. For pair (C, A), the Observability Grammian is defined as Y = e AT s C T Ce As ds Definition 2. The finite-time Controllability Grammian of pair (A, B) is W := e As BB T e AT s ds M. Peet Lecture 2: 5 / 24
Grammians Grammians are linked to Observability and Controllability Theorem 3. For a given pair (C, A), the following are equivalent. ker Y = ker Ψ T = ker O(C, A) = Theorem 4. For any t, R t = C AB = Image (W t ) M. Peet Lecture 2: 6 / 24
Observability Grammian Recall the state-space system ẋ(t) = Ax(t) + Bu(t) y(t) = Cx(t) Assume that A is Hurwitz. Recall the Observability Operator Ψ o : R n L 2 [, ). { Ce At x t (Ψ o x )(t) = t Ψ o x L 2 because A is Hurwitz. When u =, this is also the solution. We would like to look at the size of the output produced by an initial condition. Now we know how to measure the size of the output signal. y 2 L 2 = Ψ ox, Ψ ox L2 = x, Ψ oψ ox R n How to calculate the adjoint Ψ o : L 2 R n? M. Peet Lecture 2: 7 / 24
Observability Grammian It can be easily confirmer that the adjoint of the observability operator is Then Ψ oz = [ Ψ oψ o x = Which is simply the observability grammian Y o = Ψ oψ o = e AT s C T z(s)ds ] e AT s C T Ce As ds x Recall from the HW: Y o is the solution to e AT s C T Ce As ds A Y o + Y o A + C T C = and Y o > if and only if (C, A) is observable. M. Peet Lecture 2: 8 / 24
Observability Grammian Proposition 4. Then (C, A) is observable if only if there exists a solution X > to the Lyapunov equation A T X + XA + C T C = M. Peet Lecture 2: 9 / 24
Observability Grammian Physical Interpretation The physical interpretation is clear: how much does an initial condition affect the output in the L 2 -norm y L2 = x T Y o x Since this is just a matrix, we can take this further by looking at which directions are most observable. Will correspond to σ(y o ). Definition 5. The Observability Ellipse is { } E o := x : x = Yo 1/2 x, x = 1 M. Peet Lecture 2: 1 / 24
Observability Grammian Physical Interpretation Definition 6. The Observability Ellipse is { } E o := x : x = Yo 1/2 x, x = 1 Notes: 1. E o is an ellipse. For a proof, E o = {x : x T Y 1 o x = 1} let x Eo. Then there exists some x = 1 such that x = Yo 1/2 x. Then x T Yo 1 x = x T Yo 1/2 Yo 1/2 x = x 2 = 1. Thus Eo {x : x T Yo 1 x = 1}. The other direction is similar 2. The Principal Axes of E are the eigenvectors of Yo 1/2, u i. 3. The lengths of the Principal Axes of E are σ i (Y o ). 4. If σ i (Y o ) =, the u i is in the unobservable subspace. M. Peet Lecture 2: 11 / 24
Controllability Operator Recall the Controllability Operator Ψ c : L 2 (, ] C n Ψ c u = e As Bu(s)ds Which maps an input to a final state x(). Adjoint Ψ c : R n L 2 (, ] (Ψ cx) (t) = B e A t x Recall: The system ẋ(t) = Ax(t) + Bu(t) is controllable if for any x() R n, there exists some u L 2 (, ] such that x() = Ψ c u M. Peet Lecture 2: 12 / 24
Controllability Grammian Definition Definition 7. The Controllability Grammian is X c := Ψ c Ψ c = = e As BB T e AT s ds e As BB T e AT s ds Recall X c is the solution to AX c + X c A T + BB T = X c > if and only if (A, B) is controllable. M. Peet Lecture 2: 13 / 24
Observability Grammian Proposition 5. Then (A, B) is controllable if only if there exists a solution X > to the Lyapunov equation AX + XA T + BB T = M. Peet Lecture 2: 14 / 24
Controllability Grammian Proposition 6. Suppose (A, B) is controllable. Then 1. X c is invertible 2. Given x, the solution to min u L 2 : u L 2(,] x = Ψ c u is given by u opt = Ψ cx 1 c x M. Peet Lecture 2: 15 / 24
Controllability Grammian Proof. The first is clear from X c >. For the second part, we first show that u opt is feasible. We then show that it is optimal. For feasibility, we note that which implies feasibility Ψ c u opt = Ψ c Ψ cx 1 c x = X c X 1 c x = x M. Peet Lecture 2: 16 / 24
Controllability Grammian Proof. Now that we know that u opt is feasible, we show that for any other ū, if ū is feasible, then ū L2 u opt L2. Define P := Ψ cx 1 c Ψ c. Furthermore P = P. P 2 = Ψ cxc 1 Ψ c Ψ c X }{{} X c 1 c Thus P is a projection operator, which means Thus for any ū P u, (I P )u = Ψ c = Ψ cx 1 Ψ c = P ū 2 = P ū + (I P )ū 2 = P ū 2 + (I P )ū 2. c M. Peet Lecture 2: 17 / 24
Controllability Grammian Proof. If ū is feasible, then We conclude that Thus u opt is optimal P ū 2 = Ψ cxc 1 Ψ c ū = Ψ cx c x since ū is feasible = u opt 2 ū 2 = u opt 2 + (I P )ū 2 u opt 2 This shows that u opt is the minimum-energy input to achieve the final-state x. Drawbacks: Don t have infinite time. Open-loop M. Peet Lecture 2: 18 / 24
Controllability Grammian Physical Interpretation The controllability Grammian tells us the minimum amount of energy required to reach a state. u opt 2 L 2 = x T Xc 1 x Definition 8. The Controllability Ellipse is the set of states which are reachable with 1 unit of energy. {Ψ c u : u L2 1} Proposition 7. The following are equivalent 1. {Ψ c u : u L2 1} { } 2. Xc 1/2 x : x 1 3. { x : x T Xc 1 x 1 } M. Peet Lecture 2: 19 / 24
Controllability Grammian Finite-Time Grammian Because we don t always have infinite time: What is the optimal way to get to x in time T Finite-Time Controllability Operator: Ψ T : L 2 [, T ] R n. Ψ T u := T Finite-Time Controllability Grammian X T := Ψ T Ψ T = Note: X T X s for t s. e A(T s) Bu(s)ds T e As BB T e AT s ds M. Peet Lecture 2: 2 / 24
Controllability Grammian Finite-Time Grammian Cannot be found by solving the Lyapunov equation. Must be found by numerical integration of the matrix-differential equation: from t = to t = T. X c is the steady-state solution. Ẋ T (t) = AX T (t) + X T (t)a T + BB T M. Peet Lecture 2: 21 / 24
Controllability Grammian Finite-Time Grammian Proposition 8. Suppose (A, B) is controllable. Then 1. X T is invertible 2. The solution to min u L 2 : u L 2[,T ] x f = Ψ T u is given by u opt = Ψ T X 1 T x f M. Peet Lecture 2: 22 / 24
Finite-Time Grammian Example k 1 k 2 k 3 m 1 m 2 m 3 b 1 b 2 b 3 Consider the Spring-mass system (k i = m i = 1, b i =.8) 1 1 ẋ(t) = 1 2 1 1.6.8 x(t) + 1 u(t) 1 2 1.8 1.6.8 1 1.9.8 with desired final state x f = [ 1 2 3 ] T M. Peet Lecture 2: 23 / 24
Finite-Time Grammian Example 8 4 6 3 4 2 2 input 2 state 1 4 6 1 8 2 1 2 4 6 8 time step 3 2 4 6 8 time step x f = [ 1 2 3 ] T M. Peet Lecture 2: 24 / 24