Optimization in Convex and Control Theory System Stephen Boyd Engineering Department Electrical University Stanford 3rd SIAM Conf. Control & Applications 1
Basic idea Many problems arising in system and control theory can be cast convex optimization problems as Hence, are fundamentally tractable Recent interior-point methods can exploit problem structure to such problems very eciently solve 2
Convex optimization Some examples Interior-point methods Outline 3
minimize f0(x) Convex optimization subject to f1(x) 0;:::;f L (x)0 f i :R n!r convex can have linear equality constraints dierentiability not needed other formulations possible, e.g.: multicriterion, monotone variational inequality feasibility, 4
speaking,) (Roughly optimization problems are fundamentally tractable convex in theory and practice Algorithms: Classical optimization algorithms do not work Ellipsoid algorithm (Shor, Nemirovsky, Yudin 1970s) very simple, universally applicable { ecient in terms of worst-case complexity theory { { slow but robust in practice (General) interior-point methods (Nesterov, Nemirovsky 1980s) { ecient in theory and practice 5
Convex optimization Some examples Interior-point methods Outline 6
h i z,i design variables: x =[h0h1 ::: h n ] T hi 1:1H(e j0 ) (max. 10% step response overshoot) example: lter Well-known FIR design n X = H(z) function: transfer sample convex constraints: i=0 H(e j0 ) = 1 (unity DC gain) H(e j! 0) = 0 (notch at!0) j! )j0:01 for! s! jh(e 40dB atten. in stop band) (min. j! )j1:12 for 0!! b jh(e 1dB upper ripple in pass band) (max. h = n,i (linear phase constraint) i h t X = s(t) i=0 7
4 3 sample rate 2=n sec,1 2-1 1 0-2 -3-1 -0.8-0.6-0.4-0.2 0 0.2 0.4 0.6 0.8 1 10 0 10-1 10-2 10-3 10 0 10 1 10 2 FIR lter design example (M. Grant) linear phase max 1dB ripple to 0:4Hz up min 40dB atten 0:8Hz above minimize max i jh i j some solution times: = 255: 5 sec n n = 2047: 4 min t f 8H(e2jf) h(t)
exp j(k() T p,!t); k() =,[cos sin ] T p1 w i y i Beamforming antenna elements at positions p1;:::;p n 2R 2 omnidirectional wave incident from angle : plane to y = exp(jk() T p i ) demodulate i get X n y() = sum weighted form i=1 k() variables: x =[Re w T Im w T ] T design array weights or shading coecients) (antenna G() = jy()j antenna gain pattern 9
Sample convex constraints: y( t ) = 1 (target direction normalization) G(0) = 0(null in direction 0) w is real (amplitude only shading) jw i j1 (attenuation only shading) Sample convex objectives: max fg() jj, t j5 g level with 10 beamwidth) (sidelobe 2 X i jw i j 2 (noise power in y) 10
Discrete-time linear system, input u(t) 2 R p, output y(t) 2 R q max t;i jy i (t), y des i (t)j (peak tracking error) Input design (trajectory planning) Sample convex constraints: ju i (t)ju(limit on input amplitude) ju i (t+1),u i (t)js(limit on input slew rate) l i (t) y i (t) u i (t) (envelope bounds for output) Sample convex objective: extends to multi-plant (robust) case, Immediately control, etc. predictive 11
2 1.5 1 0.5 0-0.5-1 1.2 1 0.8 0.6 0.4 0.2 0-0.2 0 1 2 3 4 5 6 7 8 9 10 Input design example (M. Grant) rapid thermal processor 3 inputs, 8 outputs, states 8 amplitude limits on inputs slew limits on 3 outputs minimize peak tracking on 5 outputs error 12 t y i (t) u i (t)
H = P zw + P zu K(I, P yu K),1 P yw (static case for simplicity) exogenous inputs Linear controller design w z u P actuator inputs sensed outputs K y critical outputs linear plant P given; design linear feedback controller K closed-loop I/O relation: z = Hw, most specications, objectives convex in H, not K 13
Q = K(I, PyuK),1 set K = Q(I + P yu Q),1 Transform to convex problem Linear-fractional transformation: H = P zw + P zu QP yw : constraints, objectives are convex in Q! design Q via convex programming Extends to dynamic case... time and frequency domain limits on actuator eort, regulation, error tracking some robustness specications 14
Quadratic Lyapunov function search there a quadratic Lyapunov function V (z) = z T Pz that proves Is of dierential inclusion stability _x(t) =A(t)x(t); A(t)2Co fa1;:::;a L g? Equivalent to: is there P s.t. P > 0; A T i P + PA i < 0; i =1;:::;L? convex feasibility problem in P ; no analytic solution but a solved readily looks simple, but more powerful than many well known (multivariable circle criteria,...) methods extends to a huge variety of other problems 15
Other examples synthesis of Lyapunov functions, state feedback lter/controller realization system identication problems truss design VLSI transistor sizing design centering computational geometry 16
Convex optimization Some examples Interior-point methods Outline 17
Interior-point convex programming methods History: Dikin; Fiacco & McCormick's SUMT (1960s) Karmarkar's LP algorithm (1984); many more since then Nesterov & Nemirovsky's general formulation (1989) General: # iterations small, grows slowly with problem size number: 5 { 50) (typical each iteration is basically least-squares problem 18
c x T m minimize X + F0 to subject i = F T i 2 R nn, c are given. F Semidenite programming (SDP) Semidenite program: i=1 x i F i 0 special but wide class of nonlinear convex problems can pose most system and control theory convex problems as SDPs powerful interior-point methods for SDPs recently developed & Nemirovsky, Alizadeh, others) (Nesterov 19
A(x) = A0 + x1a1 + +x k A k 3 75 0 linear program: SDP examples c T x minimize to Ax b subject as SDP: take F (x) =diag(b, Ax) matrix norm minimization: as SDP: minimize t subject to minimize ka(x)k ; 2 ti A(x) 64 T ti A(x) 20
primal SDP: dual SDP: Duality min T x p m = c X + F0 to subject i=1 x i F i 0 = max,trf0z d to TrF i Z = c i ; i =1;:::;m subject Z 0 Z dual feasible =) p,trf0z(easy) p = d (usually) duality gap = c T x + TrF0Z gap 0, gap = 0 at optimum 21
'(x; Z) = q log(gap) + log det F (x),1 + log det Z,1 third term keeps Z>0 hence, can solve SDP by minimizing smooth function ' for x, Z strictly feasible q>nis a parameter Primal-dual potential function rst term rewards decrease in gap second term keeps F (x) > 0 main properties: gap exp 1 q,n '(x; Z) ' unbounded below 22
theorem: '(x; Z), '(x + ;Z + ) >0 in practice, '(x; Z), '(x + ;Z + ) Primal-dual potential reduction algorithm x = x (0), Z = Z (0) strictly feasible initialization: repeat 1. nd search directions x, Z by solving least-squares problemy 2. plane search: minimize ' (x + x; Z + Z)over, 2 R 3. update: x := x + x;z:= Z + Z until duality gap. corollary: (polynomial) convergence yleast-squares problem, >0 depend on particular method 23
10 2 10 1 10 0 10,1 10,2 10,3 10,4 Typical example: matrix norm minimization minimize ka0 + x1a1 + +x k A k k two specic problems: 5 matrices, 55; 50 matrices, 5050 duality gap vs. iteration problem 1 problem 2 2 4 6 8 10 12 0 iteration 24
per iteration: Cost Newton direction, a least squares problem with same computing structure as original problem (Toeplitz, etc.) Hence: of solving convex problem cost 5{50 cost of solving similar least-squares problem Hence: solve least-squares problem eciently can =) can solve convex problem eciently 25
Exploiting problem structure via CG Gradients: solve min x kax, bk, x 2 R m via m Conjugate of x! Ax and y! A T y evaluations roughly: can evaluate response and adjoint fast can solve least-squares problem fast =) (=) can solve convex problem fast) don't need exact solution for interior-point methods early termination) (allows preconditioning (problem specic) Examples: FIR lter: fast (N log N) convolution Input design: system state, co-state simulation Lyapunov function search: matrix (Kronecker) structure 26
10 5 LSSOL INTPT 10 4 10 3 10 2 10 1 10 0 10-1 10 5 10 4 10 3 10 2 10 1 10 1 10 2 10 3 FIR lter design example (M. Grant) forward, adjoint operator: FFT #taps 2 #variables #constraints 10 #variables > 1000 variables, > 10000 solved in 4 constraints min, 4Mb 27 #variables Memory Time
10 5 LSSOL INTPT 10 4 10 3 10 2 10 1 10 0 10 5 10 4 10 3 10 2 10 2 10 3 Input design example (M. Grant) forward, adjoint operator: co-state simulation state, #vbles = 3 #time steps #constr 7 #vbles > 1500 variables, > 10000 solved in 12 constraints min, 5Mb 28 #variables Memory Time
feasibility problem in P = P T 2 R kk 10 4 k =10;:::;70 10 3 @ @R 2 10 # vbles 50;:::;2500 10 1 10 0 10,1 Lyapunov function search (Vandenberghe) P > 0; A T i P + PA i < 0; i =1;:::;L two matrices, size k k LS: O(k 5:7 ); CG: O(k 3:9 ) k = 30 (# vbles 450) 12 min; CG: 30 sec LS: 29 LS @ @I CG 100 k 10 cpu-time (sec)
can evaluate response, adjoint fast (exploiting structure) can solve least-squares problem fast (using conj grad) can solve convex problem fast (using int-pt methods) Exploiting structure in convex problems + + 30
Main point Many problems arising in engineering analysis and design can be as convex optimization problems cast Hence, can be eciently solved by interior-point methods exploit problem structure that 31
Nesterov and Nemirovsky, Interior-point polynomial algorithms convex programming, SIAM, 1994. in Boyd, El Ghaoui, Feron, Balakrishnan, Linear matrix in system and control theory, SIAM, 1994. inequalities (A few) references Vandenberghe and Boyd, Semidenite programming, isl.stanford.edu ftp 32
Software LMI-lab (Gahinet, Nemirovsky, Laub, Chilali) toolbox for control analysis/design Matlab LMI-tool (El Ghaoui, Delebecque, Nikoukhah) (ftp ftp.ensta.fr) Matlab SP (Vandenberghe, Boyd) with Matlab interface (ftp isl.stanford.edu) C SDPSOL (Boyd, Wu) for SDPs (ftp isl.stanford.edu) parser/solver 33
.. the great watershed in optimization isn't between. and nonlinearity, but convexity and linearity nonconvexity. R. Rockafellar, SIAM Review 1993 34