Lyapunov Based Redesign • Motivation Consider x f (t , x) G (t , x)u, x R n , u R p f : R D R n G : R D R n p But the real system is x f (t , x) G (t , x)u G (t , x) (t , x, u ) f (t , x) G (t , x)(u (t , x, u )) : R D R p R p is unknown but not necessarily small. We assume it has a known bound. (t , x, u) (t , x, u) 11-1 Problem Find a state feedback controller so that the closed loop system is stable in a sufficiently strong sense. Approach : u (t , x) v(t , x) (i) (ii) (i) chosen so that nominal closed loop system is asymptotically stable. (ii) chosen so as to cancel the effect of uncertainty. 11-2 Solution Assume that u (t, x) results in the uniformly asymptotically stable nominal closed loop system, x f (t , x) G(t , x) (t , x) Suppose also that V (t , x) is a Lyapunov function that proves the following. 1 (|| x ||) V (t , x) 2 (|| x ||) : l.p.d. and dec. V V f (t , x) G(t , x) (t, x) 3 (|| x ||) : l.n.d. t x where i K , i.e. i : R R , i (0) 0, i () is strictly increasing. 11-3 Solution (Continued) Suppose finally that || (t , x, (t , x) v) || (t , x) k || v ||, where 0 k 1, : R D R The actual system with u (t , x) v becomes x f (t , x) G (t , x) (t , x) G (t , x)[v (t , x, (t , x ) v )] V V V ( f G ) G (v ) t x x V 3 (|| x ||) G (v ) x V Let wT G x Then V 3 (|| x ||) wT v wT Then V 11-4 Solution (Continued) Due to the matching condition, v can wipe out . There are two ways at least : when is bounded in || ||2 or in || || . i) || ||2 || (t , x, (t , x) v) ||2 (t , x) k || v ||2 , 0 k 1 T v T T v || ||2 || ||2 T v || ||2 (t , x) k || v ||2 Let (t , x) (t , x), (t , x) R D and choose v (t , x) 1 k || ||2 Then T v T T v T (t , x) (t , x) || ||2 1 k || ||2 1 k (t , x) || ||2 || ||2 || ||2 k 1 k 1 k ( ) || ||2 || ||2 1 k 1 k || ||2 || ||2 0 (t , x) 1 k 11-5 Solution (Continued) ii) || || || (t , x, (t , x) v) || (t , x) k || v || , 0 k 1 Now i i max | i | | i | || ||1|| || T i 1 i T v T T v || ||1|| || T v || ||1 (t , x) k || v || Let (t , x) (t , x), (t , x) R D (t , x) and choose v sgn( ) 1 k k (t , x) Then T v T T sgn( ) || ||1 (t , x) 1 k 1 k k || ||1 || ||1 || ||1 1 k 1 k k 1 || ||1 || ||1 1 k 1 k || ||1 || ||1 0 11-6 Smooth Control • Smooth Control ( 2 case) (t , x) 1 k || || , if (t , x) || ||2 2 v 2 (t , x) , if (t , x) || || 2 1 k where T V G(t , x) x Obviously when (t , x) || ||2 V 0 Analyze what happens when (t , x) || ||2 11-7 We have 2 V 3 (|| x ||2 ) 1 k T 3 (|| x ||2 ) 3 (|| x ||2 ) 2 (1 k ) 2 (1 k ) || ||22 || ||2 k || ||2 || v ||2 || ||22 k 2 || ||2 || ||22 (1 k ) 2 2 2 3 (|| x ||2 ) || ||2 || ||2 3 (|| x ||2 ) || ||22 || ||2 1 2 2z Here f ( z ) z z is maximized at 1 2 and max( z z ) 1 z 2 1 2 4 2 4 Thus V 3 (|| x ||2 ) , when (t , x) || ||2 4 On the other hand, when (t , x) || ||2 , V is V 3 (|| x ||2 ) 3 (|| x ||2 ) Thus V 3 (|| x ||2 ) 4 4 irrespective of the value of (t , x) || ||2 11-8 Smooth Control (Continued) Then take r large, so that 1 (r ) 3 2 4 i.e. r ( ) 31 ( ) 2 1 1 Then V ( x) 3 (|| x ||2 ) 3 (|| x ||2 ) 2 2 4 1 3 (|| x ||2 ), || x ||2 r ( ) 2 Q Q x : 3 (|| x ||) 2 r ( ) 0 as 0 11-9 - When is chosen small, we can arrive at a sharper result. n Assume that D R such that 3 (|| x ||2 ) 2 ( x) (t , x) 0 0, (t , x) 1 ( x) where : R n R . Then, when (t , x) || ||2 , 2 V 3 (|| x ||2 ) || ||22 || ||2 02 2 ( x) || ||22 1 ( x) || ||2 T 1 ( x) 1 2 1 ( x) 1 ( x) 2 2 || ||2 1 202 / || ||2 P where P is positive definite if 202 12 . 202 Thus choosing 12 we have V 1 2 ( x ). , 2 Also V 2 ( x) 1 2 ( x) when (t , x) || ||2 . 2 We conclude V 1 2 ( x) which shows that the origin is uniformly 2 asymptotically stable. 11-10 Example Ex: x1 x2 x2 a[sin( x1 1 ) sin 1 ] bx2 cu Let aˆ and cˆ denote the nominal values of a and c. u ˆ u Let u cu cˆ Choose u ( x) aˆ sin( x1 1 ) sin 1 ( k1x1 k2 x2 ) where k1 & k2 are chosen so that 1 0 k k b is Hurwitz. 1 2 Then x1 x2 x2 k1x1 (k2 b) x2 ( x, u ) ˆ acˆ ac c cˆ sin( x ) sin( ) k1x1 k2 x2 1 1 1 ˆ ˆ c c ( x, u ) 11-11 Example (Continued) Hence ( x, ( x) v) ˆ acˆ ac c cˆ c cˆ x1 k1x1 k2 x2 v cˆ cˆ cˆ 1 || x ||2 k || v ||2 ˆ acˆ c cˆ aac || k ||2 , cˆ cˆ c cˆ We need k 1 where 1 k c cˆ . cˆ cˆ Calculate the control v. Let V xT Px be the Liapunov function for the nominal closed loop system where P is defined by k1 1 0 0 P P 1 k b k k b I solve P 2 1 2 P11 P12 0 V T T Then w G 2 x PB 2 x1 x2 x P21 P22 1 2( P12 x1 P22 x2 ) 11-12 Example (Continued) Choose (t , x) 1 k || || , if || ||2 2 v 2 (t , x) , if || || 2 1 k where 202 12 Then the control u is u 1 ( ( x) v) cˆ cˆ stabilize the origin globally!! u 11-13 Backstepping Consider a system f ( ) g ( ) u 1 2 where R n , u R and f () with f (0) 0 and g () are smooth in D R n . Design a state feedback controller to stabilize the system at ( 0, 0) u g ( ) + f ( ) f () 11-14 Backstepping (Continued) Suppose (1) is stabilized by ( ) with (0) 0, i.e., the origin of f ( ) g ( ) ( ) is asymptotic ally stable. Furthermore, suppose that we knowa positive Lyapunov function V ( ) where V ( ) [ f ( ) g ( ) ( )] W ( ), D A where W ( ) is positive definite. T hen, from (1),(2) [ f ( ) g ( ) ( )] g ( )[ ( )] u u + ( ) g ( ) + f () g () () 11-15 Backstepping (Continued) Let denote z ( ), then [ f ( ) g ( ) ( )] g ( ) z z u u + z g ( ) + f () g () () backstepping ( ) through the integrator where [ f ( ) g ( ) ] 11-16 Backstepping (Continued) Let v u , then [ f ( ) g ( ) ( )] g ( ) z z v 3 4 which is similar to the original system but has an asymptotically stable origin when the input is 0. Let Va ( , ) V ( ) 12 z 2 , then Va V [ f ( ) g ( ) ( )] V g ( ) z zv W ( ) V g ( ) z zv T hus choosing v V g ( ) Kz , K 0, then Va W ( ) Kz 2 which shows that th e origin ( 0, z 0) is asymptotic ally stable. Since (0) 0, the origin ( 0, 0) is asymptotic ally stable ( z ( )). Then the state feedback control law u [ f ( ) g ( ) ] V g ( ) K [ ( )] ( u v) 11-17 Lemma & Example Lemma: Consider the system defined by (1), (2). Let ( ) be a stabilizing state feedback control for (1) with (0) 0 and V ( ) be a Lyapunov function satisfying A . T hen theabove state feedback control u stabilizes the origin of (1), (2) with V ( ) 12 [ ( )]2 as a Lyapunov function. Ex: x1 x12 x13 x2 x2 u x1 x12 x13 x2 x1 x1 x13 let x2 ( x1 ) x12 x1 Then V ( x1 ) 12 x12 V x12 x14 x12 , x1 R Thus 11-18 Example (Continued) u x1 ( x12 x13 x2 ) xV1 [ x2 ( x1 )] (2 x1 1)( x12 x13 x2 ) x1 ( x2 x12 x1 ) Va ( x) 12 x12 12 ( x2 ( x12 x1 )) 2 12 x12 12 ( x2 x12 x1 ) 2 Let’s consider f ( ) g ( ) f a ( , ) g a ( , )u If g a ( , ) 0 over the domain of interest, choose u 1 g a ( , ) [ua f a ( , )] T hen ua . T hus from the previous lemma u a (, ) 1 g a ( , ) [ f ( ) g ( ) ] V g ( ) K [ ( )] f a (, ) with Va (, ) V ( ) 12 [ ( )]2 as a stabilizing state feedback control and a Lyapunov function. 11-19 Recursive Backstepping Consider the following strict feedback system x f 0 ( x) g 0 ( x) z1 z1 f1 ( x, z1 ) g1 ( x, z1 ) z2 z2 f 2 ( x, z1 , z2 ) g 2 ( x, z1 , z2 ) z3 f i and gi depend only on x, z1 ,, zi zk 1 f k 1 ( x, z1 ,, zk 1 ) g k 1 ( x, z1 ,, zk 1 ) zk zk f k ( x, z1 ,, zk ) g k ( x, z1 ,, zk )u where x Rn , z1 to z k are scalars and f0 to f k vanish at the origin. We assume gi ( x, z1 ,, zi ) 0, for 1 i K over the domain of interest. 11-20 Recursive procedure Recursive procedure x f 0 ( x) g 0 ( x) z1 Consider a stabilizin g feedback control z1 0 ( x) with 0 (0) 0 and V0 ( x) such that V0 x [ f 0 ( x) g 0 ( x)0 ( x)] W ( x) p.d.f Consider x f 0 ( x) g0 ( x) z1 z1 f1 ( x, z1 ) g1 ( x, z1 ) z2 Then using the previous result, obtain 1 ( x, z1 ) g11 [ x0 ( f 0 g 0 z1 ) Vx0 g 0 K1 ( z1 0 ) f1 ] , K1 0 V1 ( x, z1 ) V0 ( x) 12 [ z1 0 ( x)]2 11-21 Recursive procedure (Continued) x f 0 ( x) g 0 ( x) z1 Next consider z1 f1 ( x, z1 ) g1 ( x, z1 ) z2 z2 f 2 ( x, z1 , z2 ) g 2 ( x, z1 , z2 ) z3 Then we recognize that x z2 , , z1 u z3 f g0 z1 0 fa f2 f 0 , g , f1 g1 g a g 2 Thus, similarly, obtain the state feedback control 2 ( x, z1 , z2 ) 1 1 g 2 x ( f 0 g 0 z1 ) 1 z1 ( f1 g1 z2 ) V1 z1 g1 K 2 ( z2 1 ) f 2 and V2 ( x, z1, z2 ) V1 ( x, z1 ) 12 [ z2 1 ( x, z1 )]2 11-22 Extended Linearization (Gain scheduling method) Motivation Plant – nonlinear Controller – linear Design method – classical linearization Assumption – no single linear controller satisfies the performance specification Idea – design a set of controllers, each good at a particular operating point, and switch (schedule) the gains of the controllers accordingly Problem – now we have a nonlinear (piecewise linear) system with time dependent jump Solution – no good tool but some theory is being developed mostly simulation in the past 11-23 Structure & Examples gains Structure Gain Scheduler Controller Plant -Examples y Linearized model at an operating point, Tank system qin qin0 , h h 0 qin h a qout A( x)dx qi a 2 gh d h dt 0 Operating point G p (s) s where 1 A(h 0 ) a 2 gh 0 qin0 2 A(h 0 )h 0 2 A(h 0 )h 0 where A(h) is the cross section of the tank at height h, a is the cross section of the outlet pipe. 11-24 Control Goal Control goal : h h0 h0 + Gc - Gp Use P I controller: Gc ( s ) K (1 1 ) Ti s Choose K and Ti so that th e closed loop system has the natural frequency and relative damping . T hen K and Ti should be chosen as qin0 K 2A(h ) 0 2h 0 K 2 2 qin0 2 Ti T i 2 A(h 0 )h 0 2 2 T hus for a desired h h 0 , we schedule the gain appropriately. P roblem: How will the system behave with swit ches? 11-25 Nonlinear Actuator A different angle – nonlinear actuator r Gc () actuator f () Plant G p y Assume 1 ( s 1)3 1 Gc ( s ) K (1 ) Ti s G p (s) f(u) u Large gain f (u ) u 4 (nonlinear value) so u 4 is good enough only open or close (operating point is not at 0) 11-26 Step Responses with K 0.15, Ti 1, step responses at different operating conditions are Introduce gain scheduling through the inverse f 1 (u ) : f ( f 1 (u )) u Since f () may be unknown or for simplicit y, we may not want f 1 (u ) but an estimate fˆ 1 (u ) so that f ( fˆ 1 (u )) u 11-27 Approximation Now we use this approximat e inverse for gain scheduling : r + u Gc (s ) fˆ 1 (u ) f ( fˆ 1 (u )) v G p (s ) yp - Now u v Approximat e fˆ by two linear function f(u) 16 fˆ f 3 Domain 0.433u 0u3 1 ˆ Then f (u ) 0.0538u 1.139 3 u 16 1.3 2 Domain 11-28 Results Resulting behavior for the same plant wit h controller No measuremen t of external conditions is required. 11-29 Classification ( ) Scheduling on the operating conditions gain + - scheduler Operating point plant Gc (s ) ( ) Scheduling on the reference signal gain scheduler r (t ) + - plant Gc (s ) ( ) Scheduling on the plant output gain scheduler r (t ) + - y Gc (s ) plant 11-30 Issues In all cases, nonlinear time varying systems, many become unstable even if at each frozen ti me all are fine. The system is time varying b with frozen ti me s( s a) Controller : Gc ( s ) K (u (t ))(1 Td (u (t )) s ) G p (s) Consider two systems x f (t , x), x R n (1) f : R R n R n and x f (r , x), x R n , r R (2) frozen ti me system It is easy to show that (1) can be unstable even if (2) is exponentia lly stable. 11-31 Example Ex: x A(t ) x 1 a cos 2 t 1 a sin t cos t A , a0 2 1 a sin t cos t 1 a sin t det A 2 (2 a ) (2 a ) 0 For a 2, Re 0. Thus the frozen system is exponentia lly stable. But e( a 1)t cos t e t sin t (t ,0) ( a 1)t sin t e t cos t e So for 1 a, the system is unstable. However if A (t ) is small the above problem doesn' t occur. Theorem: Consider x A(t ) x. Suppose A(t ) is differenti able and Re i ( A(t )) 0, t 0, i. Then 0 is uniformly asym. stable provided sup A (t ) is sufficient ly small. t Proof: See Ch 5 in Nonlinear System Analysis 11-32 Formalization A version of scheduling on the output y x f ( y, z ) Bu where y R m , z R n m , u R m z f (0,0) 0 twice conti. differenti able in all variable s. ueq ( y ) and zeq ( y ) such that f ( y, zeq ( y )) Bu eq ( y ) 0 Family of equilibriu m point parameteri zed by y A linearizat ion at y y0 is : y y0 d y y0 f ( y , z ( y )) B(u ueq ( y0 )) 0 eq 0 z z ( y ) dt x eq 0 z zeq ( y0 ) Design a controller Ac ( y0 ), Bc ( y0 ), Cc ( y0 ) 11-33 Block Diagram Block diagram gains r e Gc (s ) u gain scheduler u ueq plant y H In the scheduler xc Ac ( y (t )) xc Bc ( y (t ))e u Cc ( y (t )) x gain scheduling on the current output 11-34 Conditions The theory gives condition under whi ch y the system is stable. These conditions are that y and nonoutput nonlineari ty approaches zero scheduling variable should vary slowly. scheduling variable should capture the plant' s nonlineari ties. Ref : Analysis of Gain Scheduled Control for Nonlinear Plants by J.S. Shamma, M. Athans IEEE Tr. on Automatic Contol , vol.35, no.8, pp. 898 - 907, Aug. 1990 11-35