Nonlinear systems Lyapunov stability theory G. Ferrari Trecate Dipartimento di Ingegneria Industriale e dell Informazione Università degli Studi di Pavia Advanced automation and control Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control / 36
Aleksandr Mikhailovich Lyapunov (857-98) Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control / 36
Stability of differential equations Torricelli s principle (644). A mechanical system composed by two rigid bodies subject to the gravitational force is at a stable equilibrium if the total energy is (locally) minimal. Laplace (784), Lagrange (788). If the total energy of a system of masses is conserved, then a state corresponding to zero kinetic energy is stable. Lyapunov (89). Student of Chebyshev at the St. Petersburg university. 89 PhD The general problem of the stability of motion. In the 960 s. Kalman brings Lyapunov theory to the field of automatic control (Kalman and Bertram Control system analysis and design via the second method of Lyapunov ) Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 3 / 36
Stability of the origin System We consider the autonomous NL time-invariant system ẋ = f (x) () Let x be an equilibrium state. Hereafter we assume, f C and, without loss of generality, x = 0 If x 0 is an equilibrium state, set z = x x and, from (), obtain z = 0 is an equilibrium state for () ż = f (z + x ) () x(t) = φ(t, x 0 ) is a state trajectory for () z(t) = x(t) x is a state trajectory of () with z(0) = x 0 x Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 4 / 36
Review: stability of an equilibrium state Let x = 0 be an equilibrium state for the NL time-invariant system ẋ = f (x) Ball centered in z R n of radius δ > 0 B δ ( z) = {z R n : z z < δ} Definition (Lyapunov stability) The equilibrium state x = 0 is Stable if ɛ > 0 δ > 0, x(0) B δ (0) x(t) B ɛ (0), t 0 Asymptotically Stable (AS) if it is stable and γ > 0 such that x(0) B γ (0) Unstable if it is not stable lim φ(t, x(0)) = 0 t + Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 5 / 36
Review: stability of an equilibrium state x = 0 stable x = 0 AS x = 0 unstable x x x x(0) x(0) x(0) x x x If x = 0 is AS, B γ (0) is a region of attraction, i.e. a set X R n such that Remark x(0) X lim φ(t, x(0)) = 0 t + THE region of attraction of x = 0 is the maximal region of attraction Even if x = 0 is AS, φ(t, x(0)) might converge very slowly to x Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 6 / 36
Exponential stability Definition x = 0 is Exponentially Stable (ES) if there are δ, α, λ > 0 such that x(0) B δ (0) x(t) αe λt x(0) The quantity λ is an estimate of the exponential convergence rate. Remark ES AS stability. All the opposite implications are false. Example: ẋ = x x(t) = x(0) + tx(0) x = 0 is AS (check at home!) but not ES. Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 7 / 36
Global stability Remarks Stability, AS, ES: local concepts ( for x(0) sufficiently close to x ) Global asymptotic stability If x = 0 is stable and x(0) R n then x = 0 is Globally AS (GAS) Global exponential stability If there are α, λ > 0such that lim φ(t, x(0) = 0 t + x(0) R n x(t) αe λt x(0) then x = 0 is Globally ES (GES) Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 8 / 36
Remarks on stability Example: x = 0 is GAS (but not GES). ẋ = x x(t) = x(0) + tx(0) Problems How to check the stability properties of x = 0 WITHOUT computing state trajectories? If x = 0 is AS, how to compute a region of attraction? The analysis of the linearized system around x = 0 MIGHT allow one to check local stability. How to proceeed when no conclusion can be drawn using the linearized system? Need of a more complete approach: Lyapunov direct method Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 9 / 36
Remarks on stability Example x = 0 is an equilibrium state. Linearized system: δx = aδx a < 0 x = 0 is AS a > 0 x = 0 is unstable a = 0? ẋ = ax x 5 For a = 0 one has ẋ = x 5 and with the Lyapunov direct method one can show that x = 0 is AS. Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 0 / 36
Lyapunov direct method: a first example Model Mẍ = bẋ ẋ ( k }{{} 0 x + k x 3) }{{} NL damping NL elastic force b, k 0, k > 0 Defining x = x, x = ẋ ẋ = x ] [ [ x 0 ẋ = b M x x k 0 M x k x = = is stab./as/es? M x 3 x 0] 0 D x f = k 0 M 3k M x b M x D x f = 0 sgn (x ) x= x k 0 M 0 Eigenvalues: λ, = ±j k 0 /M No conclusion on x = 0 using the linearized system Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control / 36
Lyapunov direct method: a first example Consider the total energy of the system: V (x) = Mx + }{{} kinetic x 0 k 0 ξ + k ξ 3 dξ = Mx + k 0x + 4 k x 4 } {{ } potential Remark: zero energy x = x = 0 (equilibrium state) Instantaneous energy change: V (x(t)) = D x V dx [ V dt = x ] dx V dt x dx = ( k 0 x + k x 3 ) ẋ + Mx ẋ = dt ) = ( k 0 x + k x 3 ) x + Mx ( b M x x k 0 M x k M x 3 = bx x bx (t) x (t) 0 independently of x(0) the energy can only decrease with time independently of x(0) Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control / 36
Lyapunov direct method: a first example Energy V (x) Phase plane 8 7 6 5.5 3 3 3 3 0.5 3 3 V 4 3 0.5 0.5 0.5 3 x 0 0.5 3 3 0.5 3 0.5 3 0 x 0 x 3 3 3.5 0.5 0 0.5 3.5 x Energy is a measure of the distance of x from the origin if it can only decrease, then x = 0 should be stable Lyapunov direct method is based on energy-like functions V (x) and the analysis of the function t V (x(t)) Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 3 / 36
Positive definite functions In the previous example, V (x) has two key properties V (x) > 0, x 0 and V (0) = 0 t V (x(t)) decreases for x(t) = φ(t, x 0 ) Definition A scalar and continuous function V (x) is positive definite (pd) in B δ (0) if V (0) = 0 and x B δ (0)\ {0} V (x) > 0 positive semidefinite (psd) in B δ (0) if V (0) = 0 and V (x) 0, x B δ (0) negative definite (nd) [resp. negative semidefinite (nsd)] if V (x) is pd [resp. psd] Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 4 / 36
Globally positive definite functions Definition The scalar and continuous function V (x) is pd/psd/nd/nsd if it has the same property in some B δ (0) Definition If, in the previous definitions B δ (0) is replaced with R n, one defines functions globally positive definite (gpd) globally positive semidefinite (gpsd) globally negative definite (gnd) globally negative semidefinite (gnsd) Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 5 / 36
Examples of positive definite functions V (x)=sin( x ), pd V (x)= x, gpd V 3 (x)= x, gpsd V 0.5 V V 3 0.5 0 0 x 0 x 0 0 x 0 x 0 0 x 0 x V (x) pd V (x) gpd V 3 (x) gpsd 0.5 0.5 0.5 x 0 x 0 x 0 0.5 0.5 0.5 0.5 0 0.5 x 0.5 0 0.5 x 0.5 0 0.5 x Level surfaces: V α = {x R n : V (x) = α} they do not intersect Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 6 / 36
Computation of V Given ẋ = f (x) and a scalar function V (x) of class C dv (x(t)) V = = D x V ẋ = dt [ V x ] ẋ V. = x n ẋ n n i= V x i f i (x) (3) Remark (3) is called Lie derivative of V along f it measures how much V decreases along state trajectories Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 7 / 36
Lyapunov theory Lyapunov theorems The typical statement has the following skeleton: If there exists a function V : R n R such that V and V verify suitable conditions, then the equilibrium x = 0 has some key properties If such a function V exists, it is called the Lyapunov function that certifies the properties of x = 0 Remark As it will be clear in the sequel, Lyapunov can be viewed as generalized energy functions Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 8 / 36
Invariance Lyapunov Theorem Theorem Let V (x) C be pd in B δ (0). If V (x) is nsd in B δ (0), then the level sets V m = {x : V (x) < m}, m > 0 (4) included in B δ (0) are invariant. If, in addition V (x) is gpd and V (x) is gnsd then the sets (4) are invariant for all m > 0. Proof By contradiciton, assume x(0) V m and let t m > 0 be the first instant such that V (x(t m )) m a. One has V (x(t m )) m > V (x(0)) that is a contradition because V (x(t)) 0 for t [0, t m ). The proof of the second part of the theorem is identical. V m x x a Such an instant exists because x(t) is continuous in t. Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 9 / 36
Stability Lyapunov theorem Theorem If there is V (x) C such that it is pd in B δ (0) and V is nsd in B δ (0), then x = 0 is stable. If in addition V (x) is nd in B δ (0) then x = 0 is AS. Extremely useful! Not necessary to compute state trajectories: it is enough to check the sign of V and V in a neighborhood of the origin The theorem precises the properties that an energy function must have Several results in nonlinear control are based on this theorem There are several versions of the theorem, e.g. for discrete-time systems, when f is piecewise continuous, when is V continuous only in x = 0,... Key issue: Cheking if x = 0 is AS has been just recast into the problem of finding a suitable Lyapunov function. How to compute it? Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 0 / 36
Proof of the theorem Theorem If there is V (x) C such that it is pd in B δ (0) and V is nsd in B δ (0), then x = 0 is stable. If in addition V (x) is nd in B δ (0) then x = 0 is AS. Proof of stability ( ɛ > 0 γ > 0 : x(0) B γ (0) t 0 x(t) B ɛ (0)) Without loss of generality, assume ɛ < δ. Let m = min x =ɛ V (x)a Let V m = {x : V (x) < m} b. There is γ > 0 : B γ (0) V m c. V m x x a m exists since V is continuous and the boundary of B ɛ(0) is bounded and closed. b m > 0 because V is pd. In particular, V m is not empty. c Continuity of V (x) in x = 0: ɛ > 0, δ > 0 : x B δ (0) V (x) 0 < ɛ. Pick ɛ < m and set γ = δ. Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control / 36
Proof of the theorem From the Lyapunov invariance theorem, one has that V m is invariant. Since B γ (0) V m, one has that x(0) < γ implies x(t) < ɛ, t 0. V m x x Proof of AS Let ɛ and γ be chosen as in the proof of stability (in particular, ɛ < δ). One has x(0) B γ (0) φ(t, x(0)) B ɛ (0), t 0 We now show that B γ (0) is a region of attraction for x = 0. If x(0) B γ (0), since V is nd in B ɛ (0) one has that V (x(t)) is decreasing. V (x(t)) is also lower bounded by 0. Therefore V (x(t)) has a limit L 0 for t +. Since V (x) = 0 x = 0, in order to conclude we have only to show that L = 0. Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control / 36
Proof of the theorem By contradiction, assume that L > 0. V continuous d > 0 : B d (0) V L and since V (x(t)) L, t 0 one has that x(t) never enters in B d (0). Let η = max d x ɛ V (x) a. Since V is nd, it follows η < 0. One has b V (x(t)) = V (x(0))+ t 0 V (x(τ)) dτ V (x(0)) ηt Therefore, for a sufficiently large t one has V (x(t)) < L that is a contradiction. x V L d x a η exists because V is continuous and the constraints of the maximum problem define a bounded and closed set. b For the fundamental theorem of calculus and the fact that x(t) B ɛ(0), t 0. Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 3 / 36
Example System ẋ = x ( x + x ) 4x x ẋ = 4x x + x ( x + x ) Study the stability of the equilibrium state x = 0. Candidate Lyapunov function: V (x) = x + x (pd in R ) V = V x f (x) + V x f (x) = ( ( = x x x + x ) 4x x ) ( ( + x 4x x + x x + x )) = = ( x + x ) ( x + x ) In B (0) one has ( x + x ) < 0 and therefore V is nd in B (0) x = 0 is AS. Key remark The choice of the Lyapunov function is not unique! For instance V (x) = α ( x + x ), α > 0 are all Lyapunov functions for the example. Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 4 / 36
Example: damped pendolum System ẋ = x ẋ = x sin(x ) Study the stability of x = [ 0 0 ] T. Lyapunov candidate function: V (x) = ( cos(x )) + x }{{}}{{} potential en. kinetic en. V is pd? In which region? V (0) = 0 V (x) > 0 if x ( π, π), x 0 Then, V is pd in B π (0) Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 5 / 36
Example: damped pendolum System ẋ = x ẋ = x sin(x ) Study the stability of x = [ 0 0 ] T. Lyapunov candidate function: V (x) = ( cos(x )) + x }{{}}{{} potential en. kinetic en. V is nsd? In which region? V = V x f (x) + V x f (x) = sin(x )x + x ( x sin(x )) = x V is nsd in R (and then in B π (0)) x = 0 is stable. Physical intuition tells us the equilibrium is AS but the chosen Lyapunov function certifies only stability Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 6 / 36
Global asymptotic stability If V (x) is globally pd and V is globally nd, is it possible to deduce that x = 0 is GAS? NO! Example: V (x) = x + x + x is globally pd but the level surfaces V α are not bounded for α >. Then V (x(t)) can decrease but x(t) can diverge. Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 7 / 36
Lyapunov theorem for global asymptotic stability Definition A function V (x) pd is radially unbounded if V (x) + for x +. Remark The behavior in the previous example cannot happen if V is radially unbounded Theorem (GAS) If there is V (x) C gpd and radially unbounded such that V is gnd then x = 0 is GAS. Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 8 / 36
Example c(x) x First-order system ẋ = c(x) where c(x) C and x 0 xc(x) > 0 Study the stability of x = 0. Candidate Lyapunov function: V (x) = x (gpd and radially unbounded) V is gnd x = 0 is GAS V (x) = xẋ = xc(x) Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 9 / 36
Lyapunov theorem for exponential stability Theorem (ES/GES) If there exists a ball B δ (0) and a function V (x) C such that, for all x B δ (0) one has k x a V (x) k x a (5) V (x(t)) k 3 x a (6) where k, k, k 3, a > 0 are suitable constants, then x = 0 is ES. Moreover, if (5) and (6) hold for all x R n, then x = 0 is GES. Remarks (5) V (x) is pd. The opposite implication does not hold. (5) + (6) V is nd. The opposite implication does not hold. Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 30 / 36
Lyapunov theorem for exponential stability Proof of ES From the Lyapunov theorem, (5) and (6) imply that x = 0 is AS. Moreover V (x(t)) }{{} k 3 x a from (6) }{{} from (5) k 3 k V (x(t)) In particular, the last inequality follows from V (x) k x a. If equalities hold, one gets the LTI system V = k 3 k V and therefore V (x(t)) = V (x(0))e k 3 k t It is possible to show that if V k 3 V then V (x(t)) V (x(0))e k 3 k k t Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 3 / 36
Lyapunov theorem for exponential stability Therefore x(t) }{{} from (5) = ( ) a k k [ V (x(t)) k ] a x(0) e k 3 ak t V (x(0))e k k 3 k t a k x(0) a e }{{} k from (5) k 3 t k a = Remark λ = k 3 ak is an estimate of the exponential convergence rate Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 3 / 36
Example c(x) x System ẋ = c(x) where c(x) C and verifies xc(x) x Study the stability of x = 0. Candidate Lyapunov function: V (x) = x k x a V (x) k x a with k = k = and a =, x R V (x) = xẋ = xc(x) k 3 x a with k 3 = a = x R Then, x = 0 is GES. Estimate of the exponential convergence rate: λ = k 3 ak = Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 33 / 36
Lyapunov instability theorem Theorem (instability) If in a set B δ (0) there is a scalar function V (x) C such that V is pd in B δ (0) and V is pd in B δ (0), then x = 0 is unstable. Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 34 / 36
Lyapunov instability theorem Example Study the stability of x = 0. Linearized system around x = 0 { δx = δx Σ : δx = δx ( ẋ = x + x x + x 4 ) ( ẋ = x + x x + x 4 ) No conclusion on stability of x = 0 using Σ. eigenvalues: ± j Candidate Lyapunov function: V (x) = ( x + x ) (pd in R ) ( ( V = x x + x x + x 4 )) ( ( + x x + x x + x 4 )) = = ( x + x ) ( x + x 4 ) pd in R Then, x = 0 is unstable. Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 35 / 36
Conclusions Summary of Lyapunov theorems Conditions on V (x) C Conditions on V Stab. of x = 0 pd in B δ (0) nsd in B δ (0) stable pd in B δ (0) nd in B δ (0) AS pd in R n and rad. unbounded nd in R n GAS k x α V (x) k x α in B δ (0) V k3 x α in B δ (0) ES k x α V (x) k x α in R n V k 3 x α in R n GES pd in B δ (0) pd in B δ (0) unstable Remarks All Lyapunov theorems are only sufficient conditions. Moreover for a given system there can be multiple Lyapunov functions certifying different stability properties of x = 0 Ferrari Trecate (DIS) Nonlinear systems Advanced autom. and control 36 / 36