Lecture 4 Lyapunov Stability Material Glad & Ljung Ch. 12.2 Khalil Ch. 4.1-4.3 Lecture notes
Today s Goal To be able to prove local and global stability of an equilibrium point using Lyapunov s method show stability of a set (e.g., an equilibrium, or a limit cycle) using La Salle s invariant set theorem.
Alexandr Mihailovich Lyapunov (1857 1918) Master thesis On the stability of ellipsoidal forms of equilibrium of rotating fluids, St. Petersburg University, 1884. Doctoral thesis The general problem of the stability of motion, 1892.
Main idea Lyapunov formalized the idea: If the total energy is dissipated, then the system must be stable. Main benefit: By looking at how an energy-like function V (a so called Lyapunov function) changes over time, we might conclude that a system is stable or asymptotically stable without solving the nonlinear differential equation. Main question: How to find a Lyapunov function?
Examples Start with a Lyapunov candidate V to measure e.g., "size" 1 of state and/or output error, "size" of deviation from true parameters, energy difference from desired equilibrium, weighted combination of above... Example of common choice in adaptive control V= 1 2 (e 2 + γ a ã 2 + γ b b2 ) (here weighted sum of output error and parameter errors) 1 Often a magnitude measure or (squared) norm like e 2 2,...
Analysis: Check if V is decreasing with time Continuous time: Discrete time: dv dt <0 V(k+1) V(k)<0 Synthesis: Choose, e.g., control law and/or parameter update law to satisfy V 0 dv dt =eė+γ aã ã+ γ b b b= = x( a x ã x+ bu)+ γ a ã ã+ γ b b b=... Ifais constant andã=a â then ã= â. Choose update law dâ in a "good way" to influencedv dt dt. (more on this later...)
A Motivating Example x m mẍ= bẋ ẋ k }{{} 0 x k 1 x }{{ 3 } damping spring b,k 0,k 1 >0 Total energy = kinetic + pot. energy:v= mv2 2 + x 0 F sprin ds V(x,ẋ)=mẋ 2 /2+k 0 x 2 /2+k 1 x 4 /4>0, V(0,0)=0 d dt V(x,ẋ)=mẍẋ+k 0xẋ+k 1 x 3 ẋ={pluginsystemdynamics 2 } = b ẋ 3 <0,forẋ =0 What does this mean? 2 Also referred to evaluate along system trajectories.
Stability Definitions An equilibrium pointx ofẋ=f(x) (i.e.,f(x )=0) is locally stable, if for everyr>0there existsr>0, such that x(0) x <r x(t) x <R, t 0 locally asymptotically stable, if locally stable and x(0) x <r lim t x(t)=x globally asymptotically stable, if asymptotically stable for allx(0) R n.
Lyapunov Theorem for Local Stability Theorem Letẋ=f(x),f(x )=0wherex is in the interior of Ω R n. Assume thatv: Ω Ris ac 1 function. If (1) V(x )=0 (2) V(x)>0, for allx Ω,x =x (3) V(x) 0along all trajectories of the system in Ω = x is locally stable. Furthermore, if also (4) V(x)<0for allx Ω,x =x = x is locally asymptotically stable.
Lyapunov Functions ( Energy Functions) A function V that fulfills (1) (3) is called a Lyapunov function. Condition (3) means that V is non-increasing along all trajectories in Ω: V(x)= V xẋ= i where V [ V x =, V,... V ] x 1 x 2 x n V x i f i (x) 0 V level sets wherev=const. x 1 x 2
Conservation and Dissipation V Conservation of energy: V(x)= xf(x)=0, i.e., the vector fieldf(x) is everywhere orthogonal to the normal V x to the level surfacev(x)=c. Example: Total energy of a lossless mechanical system or total fluid in a closed system. Dissipation of energy: V(x)= V xf(x) 0, i.e., the vector fieldf(x) and the normal V x to the level surface{z: V(z)=c} make an obtuse angle (Sw. trubbig vinkel ). Example: Total energy of a mechanical system with damping or total fluid in a system that leaks.
Geometric interpretation V(x)=constant f(x) gradient V x x(t) Vector field points into sublevel sets Trajectories can only go to lower values ofv(x)
Boundedness: For any trajectory x(t) t V(x(t))=V(x(0))+ 0 V(x(τ))dτ V(x(0)) which means that the whole trajectory lies in the set {z V(z) V(x(0))} For stability it is thus important that the sublevel sets {z V(z) c} bounded c 0 V(x) as x.
2 min exercise Pendulum Show that the origin is locally stable for a mathematical pendulum. ẋ 1 =x 2, ẋ 2 = l sinx 1 Use as a Lyapunov function candidate V(x)=(1 cosx 1 ) l+l 2 x 2 2 /2 4 3 2 1 10 0 0 0 x 1 10 2 x 2 2
Example Pendulum (1) V(0)=0 (2) V(x)>0for 2π<x 1 <2π and(x 1,x 2 ) =0 (3) V(x)=ẋ 1 sinx 1 l+l 2 x 2 ẋ 2 =0, for allx Hence,x=0is locally stable. Note that x = 0 is not asymptotically stable, because V(x) = 0 and not<0for allx =0.
Positive Definite Matrices Definition: Symmetric matrixm=m T is positive definite (M>0) if x T Mx>0, x =0 positive semidefinite (M 0) if x T Mx 0, x Lemma: M=M T >0 λ i (M)>0, i M=M T 0 λ i (M) 0, i M=M T >0 V(x):=x T Mx V(0)=0, V(x)>0, x =0 V(x) candidate Lyapunov function
More matrix results for symmetric matrixm=m T λ min (M) x 2 x T Mx λ max (M) x 2, x Proof idea: factorizem=u ΛU T, unitaryu (i.e., Ux = x x), Λ= diag(λ 1,...,λ n ) for any matrixm Mx λ max (M T M) x, x
Example- Lyapunov function for linear system ẋ=ax = [ 1 4 0 3 ][ x1 x 2 ] (1) Eigenvalues of A :{ 1, 3} (global) asymptotic stability. Find a quadratic Lyapunov function for the system (1): V(x)=x T Px= [ x 1 x 2 ] [ p 11 p 12 p 12 p 22 ][ x1 x 2 ], P=P T >0 Take anyq=q T >0,sayQ=I 2 2. SolveA T P+PA= Q.
Example cont d A T P+PA= I [ ][ ] [ ][ ] 1 0 p11 p 12 p11 p + 12 1 4 = 4 3 p 12 p 22 p 12 p 22 0 3 [ ] [ ] (2) 2p 11 4p 12 +4p 11 1 0 = 4p 12 +4p 11 8p 12 6p 22 0 1 Solving forp 11,p 12 andp 22 gives 2p 11 = 1 4p 12 +4p 11 =0 8p 12 6p 22 = 1 [ ] p11 p = 12 = p 12 p 22 [ ] 1/2 1/2 >0 1/2 5/6
x1 = x1 + 4 x2 x2 = 3 x2 x 1 2 +x2 2 8 = 0 4 3 2 1 x 2 0 1 2 3 4 4 3 2 1 0 1 2 3 4 x 1 Phase plot showing that V= 1 2 (x2 1 +x2 2 )=[ x 1 x 2 ] [ 0.5 0 0 0.5 ][ x1 x 2 ] does NOT work.
x1 = x1 + 4 x2 x2 = 3 x2 (1/2 x 1 +1/2 x 2 ) x 1 +(1/2 x 1 +5/6 x 2 ) x 2 7 = 0 4 3 2 1 x 2 0 1 2 3 4 4 3 2 1 0 1 2 3 4 x 1 Phase plot with level curvesx T Px=c forp found in example.
Lyapunov Stability for Linear Systems Linear system: ẋ = Ax Lyapunov equation: LetQ=Q T >0. Solve PA+A T P= Q with respect to the symmetric matrix P. Lyapunov function:v(x)=x T Px, V(x)=x T Pẋ+ẋ T Px=x T (PA+A T P)x= x T Qx<0 Asymptotic Stability: IfP=P T >0, then the Lyapunov Stability Theorem implies (local=global) asymptotic stability, hence the eigenvalues ofa must satisfyre λ k (A)<0, k
Converse Theorem for Linear Systems IfRe λ k (A)<0 k, then for everyq=q T >0there exists P=P T >0such thatpa+a T P= Q Proof: ChooseP= 0 e ATt Qe At dt. Then t ( A T P+PA = lim A T e ATτ Qe Aτ +e ATτ QAe Aτ) dτ t 0 [ = lim e ATτ Qe Aτ] t t 0 = Q
Interpretation Assumeẋ=Ax,x(0)=z. Then ( ) x T (t)qx(t)dt=z T e ATt Qe At dt z=z T Pz 0 ThusV(z)=z T Pz is the cost-to-go fromz (with no input) and integral quadratic cost function with weighting matrix Q. 0
Lyapunov s Linearization Method Recall from Lecture 2: Theorem Consider ẋ=f(x) Assume thatf(0)=0. Linearization ẋ=ax+ (x), (x) =o( x ) asx 0. (1) Re λ k (A)<0, k x=0 locally asympt. stable (2) k: Reλ k (A)>0 x=0 unstable
Proof of (1) in Lyapunov s Linearization Method PutV(x):=x T Px. Then,V(0)=0,V(x)>0 x =0, and V(x)=x T Pf(x)+f T (x)px =x T P[Ax+ (x)]+[x T A T + T (x)]px =x T (PA+A T P)x+2x T P (x)= x T Qx+2x T P (x) x T Qx λ min (Q) x 2 and for all γ >0there existsr>0such that (x) < γ x, x <r Thus, choosing γ sufficiently small gives V(x) ( λ min (Q) 2γ λ max (P) ) x 2 <0
Lyapunov Theorem for Global Asymptotic Stability Theorem Letẋ=f(x) andf(x )=0. If there exists ac 1 functionv:r n Rsuch that (1) V(x )=0 (2) V(x)>0, for allx =x (3) V(x)<0for allx =x (4) V(x) as x thenx is a globally asymptotically stable equilibrium.
Radial Unboundedness is Necessary If the conditionv(x) as x is not fulfilled, then global stability cannot be guaranteed. Example AssumeV(x)=x1 2/(1+x2 1 )+x2 2 is a Lyapunov function for a system. Can have x even if V(x)<0. 2 Contour plotv(x)=c: 1.5 Example [Khalil]: x2 1 0.5 0 0.5 1 ẋ 1 = 6x 1 (1+x 2 1 )2+2x 2 ẋ 2 = 2(x 1+x 2 ) (1+x 2 1 )2 1.5 x 1 2 10 8 6 4 2 0 2 4 6 8 10
Somewhat Stronger Assumptions Theorem: Letẋ=f(x) andf(x )=0. If there exists ac 1 functionv: R n R such that (1) V(x )=0 (2) V(x)>0for allx =x (3) V(x) αv(x) for allx (4) V(x) as x thenx is globally exponentially stable.
Proof Idea Assumex(t) =0(otherwise we havex(τ)=0for all τ>t). Then V(x) V(x) α Integrating from0totgives logv(x(t)) logv(x(0)) αt V(x(t)) e αt V(x(0)) Hence,V(x(t)) 0,t. Using the properties ofv it follows thatx(t) 0,t.
Invariant Sets Definition: A setm is called invariant if for the system ẋ=f(x), x(0) M implies thatx(t) M for allt 0. x(0) x(t) M
LaSalle s Invariant Set Theorem Theorem Let Ω R n compact invariant set forẋ=f(x). LetV: Ω Rbe ac 1 function such that V(x) 0, x Ω, E:={x Ω: V(x)=0},M:=largest invariant subset ofe = x(0) Ω,x(t) approachesm ast + V(x) E M x Ω E M Note thatv must not be a positive definite function in this case.
Special Case: Global Stability of Equilibrium Theorem: Letẋ=f(x) andf(0)=0. If there exists ac 1 functionv: R n R such that (1) V(0)=0,V(x)>0for allx =0 (2) V(x) 0for allx (3) V(x) as x (4) The only solution ofẋ=f(x), V(x)=0isx(t)=0 t = x=0is globally asymptotically stable.
A Motivating Example (cont d) mẍ= bẋ ẋ k 0 x k 1 x 3 V(x)=(2mẋ 2 +2k 0 x 2 +k 1 x 4 )/4>0, V(0,0)=0 V(x)= b ẋ 3 Assume that there is a trajectory withẋ(t)=0,x(t) =0. Then d dtẋ(t)= k 0 m x(t) k 1 m x3 (t) =0, which means that ẋ(t) can not stay constant. Hence, V(x)=0 x(t) 0, and LaSalle s theorem gives global asymptotic stability.
Example Stable Limit Cycle Show thatm={x: x =1} is a asymptotically stable limit cycle for (almost globally, except for starting at x=0): ẋ 1 =x 1 x 2 x 1 (x 2 1 +x2 2 ) ẋ 2 =x 1 +x 2 x 2 (x 2 1 +x2 2 ) LetV(x)=(x 2 1 +x2 2 1)2. dv dt =2(x2 1 +x2 2 1)d dt (x2 1 +x2 2 1) = 2(x1 2 +x2 2 1)2 (x1 2 +x2 2 ) 0 forx Ω Ω={0< x R} is invariant forr=1.
Example Stable Limit Cycle E={x Ω: V(x)=0}={x: x =1} M=E is an invariant set, because d dt V= 2(x2 1 +x2 2 1)(x2 1 +x2 2 )=0 forx M We have shown thatm is a asymtotically stable limit cycle (globally stable inr {0})
A Motivating Example (revisited) mẍ= bẋ ẋ k 0 x k 1 x 3 V(x,ẋ)=(2mẋ 2 +2k 0 x 2 +k 1 x 4 )/4>0, V(0,0)=0 V(x,ẋ)= b ẋ 3 givese={(x,ẋ): ẋ=0}. Assume there exists( x, x) M such that x(t 0 ) =0. Then m x(t 0 )= k 0 x(t 0 ) k 1 x 3 (t 0 ) =0 so x(t 0 +) =0so the trajectory will immediately leavem. A contradiction to that M is invariant. Hence,M={(0,0)} so the origin is asymptotically stable.
Adaptive Noise Cancellation by Lyapunov Design u b s+a x + x b s+â x ẋ+ax=bu x+â x= bu Introduce x=x x, ã=a â, b=b b. Want to design adaptation law so that x 0
Let us try the Lyapunov function V= 1 2 ( x2 + γ a ã 2 + γ b b2 ) V= x x+ γ a ã ã+ γ b b b= 2 = x( a x ã x+ bu)+ γ a ã ã+ γ b b b= a x where the last equality follows if we choose ã= â= 1 γ a x x b= b= 1 γ b xu Invariant set: x=0. This proves that x 0. (The parametersãand b do not necessarily converge:u 0.) Demonstration if time permits
Results 3000 2500 2000 1500 1000 500 â 0 0 10 20 30 40 50 60 time [s] 3000 2500 2000 1500 1000 500 ˆb 0 0 10 20 30 40 50 60 time [s] Estimation of parameters starts at t=10 s.
Results 1 0.8 0.6 0.4 0.2 x ˆx 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 time [s] Estimation of parameters starts at t=10 s.
Next Lecture Stability analysis using input-output (frequency) methods