Controller Coefficient Truncation Using Lyapunov Performance Certificate Joëlle Skaf Stephen Boyd Information Systems Laboratory Electrical Engineering Department Stanford University European Control Conference, Kos, Greece, July 2007
Control system description Consider a discrete-time linear time-invariant control system, with plant x p (t + 1) = A p x p (t) + B 1 w(t) + B 2 u(t) z(t) = C 1 x p (t) + D 11 w(t) + D 12 u(t) y(t) = C 2 x p (t) + D 21 w(t) and controller x c (t + 1) = A c x c (t) + B c y(t) u(t) = C c x c (t) + D c y(t) European Control Conference, Kos, Greece, July 2007 1
Nominal and acceptable controllers design parameters or coefficients in controller θ R N (typically entries of A c, B c, C c and D c ) given: set of acceptable controller designs C R N (controllers that achieve given performance specifications) nominal controller design θ nom C European Control Conference, Kos, Greece, July 2007 2
Controller (coefficient) complexity Φ(θ) is complexity of controller described by θ Φ(θ) = N φ i (θ i ), i=1 where φ i (θ i ) gives the complexity of the ith coefficient of θ φ(z) is number of bits needed to express the fractional part of the binary expansion of z European Control Conference, Kos, Greece, July 2007 3
The controller coefficient truncation problem controller coefficient truncation problem (CCTP): find lowest complexity controller among acceptable designs minimize Φ(θ) subject to θ C very difficult to solve can be cast as combinatiorial optimization problem global optimization techniques (e.g., branch-and-bound) can only solve small CCTP need an efficient method that can handle large problems European Control Conference, Kos, Greece, July 2007 4
The algorithm initialize algorihm with nominal design at each step, choose an index i randomly and fix all parameters except θ i use subroutine interv to find an interval [l, u] of acceptable values for θ i use subroutine trunc to find a value of θ i in [l, u] with lower complexity repeat until there is no change in θ run the algorithm several times, with the best controller coefficient vector found taken as the final choice European Control Conference, Kos, Greece, July 2007 5
interv(θ,i) takes as input coefficient vector θ C, and coefficient index i it returns an interval [l, u] with θ i [l, u] and (θ 1,...,θ i 1,z,θ i+1,...,θ N ) C for z [l, u]. simplest choice, always valid: return l = u = θ i other extreme: return largest valid interval that contains θ i typical implementation of interv: return reasonably large interval in C, using linear matrix inequalities (LMIs) European Control Conference, Kos, Greece, July 2007 6
Interval computation via Lyapunov performance certificate given θ C, find a convex set Ĉ such that θ Ĉ C θ Ĉ C European Control Conference, Kos, Greece, July 2007 7
take l = inf{z (θ 1,...,θ i+1, z,θ i+1,...,θ N ) Ĉ}, u = sup{z (θ 1,...,θ i+1,z,θ i+1,...,θ N ) Ĉ}. since Ĉ is convex, (θ 1,...,θ i+1,z,θ i+1,...,θ N ) Ĉ C for z [l, u]. use a Lyapunov performance certificate to find Ĉ θ Ĉ ν L(θ,ν) 0 L is a bi-affine function in ν and θ L(θ,ν) = L 0 + N θ i L i i=1 European Control Conference, Kos, Greece, July 2007 8
given θ C, compute ν such that L(θ, ν) 0 (typically by maximizing minimum eigenvalue of L(θ,ν) or maximizing detl(θ, ν)) fix ν and take Ĉ = {θ L(θ,ν) 0} (C is convex because described by an LMI in θ) need to minimize or maximize scalar variable over an LMI to find l and u can be reduced to an eigenvalue computation, carried out efficiently l = θ i min{1/λ i λ i > 0} u = θ i max{1/λ i λ i < 0} where λ i are the eigenvalues of L(θ, ν) 1/2 L i L(θ,ν) 1/2 European Control Conference, Kos, Greece, July 2007 9
State feedback controller with LQR cost specification plant is given by: x(t + 1) = Ax(t) + Bu(t), x(0) = x 0 controlled by a state feedback gain controller: u(t) = Kx(t) design variables are entries of the matrix K performance measure is LQR cost [ ] J(K) = E x(t) T Qx(t) + u(t) T Ru(t) t=0 = Tr(ΣP) where P is unique solution to (A + BK) T P(A + BK) P + Q + K T RK = 0 European Control Conference, Kos, Greece, July 2007 10
nominal design K nom is the optimal state feedback controller set of acceptable controller designs is set of ǫ-suboptimal designs C = {K J(K) (1 + ǫ)j nom } Lyapunov performance certificate: P (A + BK) T P(A + BK) Q + K T RK Tr(ΣP) (1 + ǫ)j nom P 0 European Control Conference, Kos, Greece, July 2007 11
given K C, take P to be the solution of maximize λ min (L(K, P)) subject to L(K, P) 0. for a particular choice P, Ĉ = {K (A + BK) T P(A + BK) P + Q + K T RK 0} easy to show that Ĉ C European Control Conference, Kos, Greece, July 2007 12
Numerical instance A R 10 10 and B R 10 5 randomly generated Σ = I, Q = I, R = I fractional part of each entry of K nom expressed with 40 bits; Φ(K) = 2000 bits. ǫ = 15% i.e., acceptable feedback controllers are up to 15%-suboptimal European Control Conference, Kos, Greece, July 2007 13
total number of bits required to express K versus iteration number in a sample run of the algorihm 2000 1800 1600 1400 Φ(θ) 1200 1000 800 600 400 200 0 0 10 20 30 40 50 60 70 80 90 100 iteration number algorithm converges to a complexity of 85 bits in 50 iterations European Control Conference, Kos, Greece, July 2007 14
best design afer 100 random runs of the algorithm achieves Φ(K) = 75 bits (1.5 bits per coefficient) 10 frequency frequency 8 6 4 2 0 1 0.75 0.5 0.25 0 0.25 0.5 0.75 1 25 20 15 10 5 θ nom i 0 1 0.75 0.5 0.25 0 0.25 0.5 0.75 1 very aggressive coefficient truncation! θ i European Control Conference, Kos, Greece, July 2007 15
Dynamic controller with decay rate specification plant is given by x p (t + 1) = A p x p (t) + B p u(t), y(t) = C p x p (t) controlled by a dynamic controller x c (t + 1) = A c x c (t) + B c y(t), u(t) = C c x c (t) closed-loop system given by x(t + 1) = Ax(t) where x(t) = [ xp (t) x c (t) ], A = [ ] Ap B p C c B c C p A c European Control Conference, Kos, Greece, July 2007 16
design variables are entries of the controller matrices A c, B c and C c performance measure is the decay rate of the closed-loop system: J(A c, B c, C c ) = ρ(a) given a nominal design (A nom c, B nom set of acceptable controller designs where α = (1 + ǫ)j(a nom c c,cc nom ) C = {(A c, B c,c c ) J(A c, B c, C c ) α},, B nom, C nom c c ) Lyapunov performance certificate [ α 2 P A T PA 0 0 P ] 0 European Control Conference, Kos, Greece, July 2007 17
for (A c, B c, C c ) C, take P to be the solution of maximize λ min (L(A c,b c,c c,p)) subject to L(A c, B c, C c, P) 0 Tr(P) = 1. for a fixed choice of P, Ĉ = {(A c, B c, C c ) A T PA α 2 P } easy to show that Ĉ C European Control Conference, Kos, Greece, July 2007 18
Numerical instance plant is given by x p (t + 1) = A p x p (t) + B p u(t) + w(t), y(t) = C p x p (t) + v(t), where w(t) N(0, I) is input noise and v(t) N(0, I) is measurement noise A pr 5 5, B p R 5 2, C p R 2 5 generated randomly plant controlled by an LQG controller with Q = I, R = I. fractional part of each entry of A nom c, Bc nom 40 bits; Φ(θ nom ) = 1800 bits ǫ = 5% and C nom c is expressed with European Control Conference, Kos, Greece, July 2007 19
progress of the complexity Φ(θ) and percentage deterioration in performance 100(J J nom )/J nom during 3 sample runs of the algorithm 2000 1500 Φ(θ) 1000 500 0 0 50 100 150 200 250 300 350 400 100(J J nom )/J nom 5 4 3 2 1 0 0 50 100 150 200 250 300 350 400 iteration number European Control Conference, Kos, Greece, July 2007 20
best design complexity versus number of sample runs of the algorithm 205 200 195 190 Φ(θ) 185 180 175 170 165 160 0 10 20 30 40 50 60 70 80 90 100 number of sample runs best design after 100 random runs of the algorithm achieves a complexity of Φ(θ) = 164 bits and J(θ) = 1.0362J(θ nom ) European Control Conference, Kos, Greece, July 2007 21