Salta al contenuto
Note per Studenti Lyapunov Equation for Continuous-Time Linear Systems Report

Lyapunov Equation for Continuous-Time Linear Systems

In questa pagina 8

Recap on stability

  • Equilibrium: f(xeq)=0f(x_{eq})=0 for x˙=f(x)\dot x=f(x); for an LTI system x˙=Fx\dot x=Fx it is Fxeq=0Fx_{eq}=0.
  • An equilibrium can be stable, asymptotically stable (a.s.) or unstable.
    • Nonlinear systems: each equilibrium xeqx_{eq} can be stable, a.s. or unstable on its own.
    • LTI systems: all equilibria have the same behaviour.

Why look for an alternative to eigenvalues: ill-conditioning

Eigenvalues are ill-conditioned: a tiny change in the matrix can change them a lot.

  • A=(0100)A=\begin{pmatrix}0&1\\0&0\end{pmatrix} has λ1,2=0\lambda_{1,2}=0.
  • A=(01ϵ0)A=\begin{pmatrix}0&1\\ \epsilon&0\end{pmatrix} has λ1,2=±ϵ\lambda_{1,2}=\pm\sqrt{\epsilon}.
  • The n×nn\times n matrix with ones on the superdiagonal and ϵ\epsilon in the bottom-left corner (zeros elsewhere) has ∣λi∣=ϵn|\lambda_i|=\sqrt[n]{\epsilon}.

So an eigenvalue test is sensitive to small errors, which motivates the Lyapunov approach.

Motivation: energy of the pendulum

Take a pendulum of mass mm, length ℓ\ell, angle θ\theta from the rest position. The mechanical energy is Em=Ek+EpE_m=E_k+E_p with

Ek=12 mℓ2 θ˙2(mℓ2 is the moment of inertia),Ep=mgh=mgℓ(1−cos⁡θ),E_k=\tfrac12\, m\ell^2\,\dot\theta^2\quad(m\ell^2\text{ is the moment of inertia}),\qquad E_p=mgh=mg\ell(1-\cos\theta),

so Ep=0E_p=0 at rest (θ=0\theta=0).

If the pendulum is isolated, its energy does not increase. Writing Em(t)=Em(θ(t),θ˙(t))E_m(t)=E_m(\theta(t),\dot\theta(t)), this gives E˙m(t)≤0\dot E_m(t)\le0, so θ(t),θ˙(t)\theta(t),\dot\theta(t) are "limited" by Em(0)E_m(0). Stability then corresponds to two facts: the initial energy level Em(0)E_m(0), and the energy is not increasing, E˙m(t)≤0\dot E_m(t)\le0.

An abstract energy for an LTI system

For any system define an "abstract" energy Em(x)E_m(x) with

  • Em(x)≥0E_m(x)\ge0, Em(0)=0E_m(0)=0 for x=0x=0 (pendulum: θ=θ˙=0\theta=\dot\theta=0), and Em(x)>0E_m(x)>0 for x≠0x\ne0;
  • E˙m(t)=E˙m(x(t))≤0\dot E_m(t)=\dot E_m(x(t))\le0 for all trajectories x(t)x(t).

For LTI systems we consider the class of quadratic functions

V(x)=xTPx,P=PT,V(x)=x^TPx,\qquad P=P^T,

which will turn out to be a Lyapunov function. The spectral bounds on xTPxx^TPx are in Positive Definite Matrices and the Sylvester CriterionA symmetric matrix is positive definite when its smallest eigenvalue is positive, and the Sylvester criterion tests this through the signs of the leading minors, which is how energy-like functions x^T P x are checked in Lyapunov arguments.Positive Definite Matrices and the Sylvester Criterion →: V(x)≥0V(x)\ge0 needs λmin⁡P≥0\lambda^P_{\min}\ge0, and ∥x(t)∥≤V(x(t))/λmin⁡P\|x(t)\|\le\sqrt{V(x(t))/\lambda^P_{\min}}, so a bounded V(x(t))V(x(t)) gives a bounded x(t)x(t).

Does the energy decrease?

Let x˙=Fx\dot x=Fx. Differentiating (the term with P˙\dot P vanishes because PP is constant):

V˙(x(t))=ddtxT(t)Px(t)=x˙TPx+xTPx˙=xTFTPx+xTPFx=xT(FTP+PF)x=−xTQx,\dot V(x(t))=\frac{d}{dt}x^T(t)Px(t)=\dot x^TPx+x^TP\dot x=x^TF^TPx+x^TPFx=x^T(F^TP+PF)x=-x^TQx,

where

−Q=FTP+PF(Lyapunov equation),Q=QT.-Q=F^TP+PF\qquad(\text{Lyapunov equation}),\quad Q=Q^T .

With λmin⁡Q,λmax⁡Q\lambda^Q_{\min},\lambda^Q_{\max} the extreme eigenvalues of QQ, xTQx∈[λmin⁡Q∥x∥2,λmax⁡Q∥x∥2]x^TQx\in[\lambda^Q_{\min}\|x\|^2,\lambda^Q_{\max}\|x\|^2]. Therefore

V˙(t)V(t)=−xTQxxTPx,−λmax⁡Qλmin⁡P≤V˙(t)V(t)≤−λmin⁡Qλmax⁡P,\frac{\dot V(t)}{V(t)}=\frac{-x^TQx}{x^TPx},\qquad -\frac{\lambda^Q_{\max}}{\lambda^P_{\min}}\le\frac{\dot V(t)}{V(t)}\le-\frac{\lambda^Q_{\min}}{\lambda^P_{\max}},

and integrating,

V(x(0)) e−λmax⁡Qλmin⁡Pt≤V(x(t))≤V(x(0)) e−λmin⁡Qλmax⁡Pt.V(x(0))\,e^{-\frac{\lambda^Q_{\max}}{\lambda^P_{\min}}t}\le V(x(t))\le V(x(0))\,e^{-\frac{\lambda^Q_{\min}}{\lambda^P_{\max}}t}.

If λmin⁡Q≥0\lambda^Q_{\min}\ge0, then V(x(t))V(x(t)) is bounded by V(x(0))V(x(0)) for all tt.

Requirements:

  • for PP: V(x)>0V(x)>0 for all x≠0x\ne0 means λmin⁡P>0\lambda^P_{\min}>0 (PP positive definite);
  • for V˙(x(t))≤0\dot V(x(t))\le0 with V˙=−xTQx\dot V=-x^TQx we need λmin⁡Q≥0\lambda^Q_{\min}\ge0 (QQ positive semidefinite); λmin⁡Q>0\lambda^Q_{\min}>0 makes QQ positive definite.

Examples of the choice of PP:

  • F=(−100−2)F=\begin{pmatrix}-1&0\\0&-2\end{pmatrix}, guess P=IP=I: V(x)≥0V(x)\ge0, V(0)=0V(0)=0, V(x)>0V(x)>0 for x≠0x\ne0, and Q=−(FTP+PF)=(2004)Q=-(F^TP+PF)=\begin{pmatrix}2&0\\0&4\end{pmatrix}, which is PD.
  • F=(−1−1100−1)F=\begin{pmatrix}-1&-1\\100&-1\end{pmatrix} has λ1,2=−1±10j\lambda_{1,2}=-1\pm10j (a.s.), but guessing P=IP=I gives Q=(2−99−992)Q=\begin{pmatrix}2&-99\\-99&2\end{pmatrix} with eigenvalues λ1=−97\lambda_1=-97, λ2=101\lambda_2=101: QQ is not PSD, so P=IP=I is a poor guess even though FF is a.s.

Theorem and practical use

Theorem. Given FF asymptotically stable, for every Q=QTQ=Q^T with QQ PD there exists a unique P=PTP=P^T such that −Q=FTP+PF-Q=F^TP+PF. Moreover (clarification given in the next lecture) this PP is positive definite.

Practical use:

  1. pick Q=QTQ=Q^T, QQ PD (for example Q=IQ=I);
  2. compute P=PTP=P^T from −Q=FTP+PF-Q=F^TP+PF;
  3. if PP is unique and PD, then FF is a.s. (and V(x)=xTPxV(x)=x^TPx satisfies V≥0V\ge0, V>0V>0 for x≠0x\ne0, V˙<0\dot V<0);
  4. if either PP is not unique or PP is not PD, then FF is not a.s., but we do not know whether it is stable.

If PP exists, is unique and PD, then

P=∫0∞eFTt Q eFt dt.P=\int_0^{\infty}e^{F^Tt}\,Q\,e^{Ft}\,dt .

Remarks on the theorem (first version, as on the board): if PP is not unique, nothing can be inferred about a.s.; if PP is unique and PD the system is a.s.; the case "PP unique but not PD" is left with an unfinished remark on the board (the clarified statement above says FF is then not a.s.).

What if PP is only PSD?

Example: F=(−1001)F=\begin{pmatrix}-1&0\\0&1\end{pmatrix}, P=(1000)P=\begin{pmatrix}1&0\\0&0\end{pmatrix} with eigenvalues {0,1}\{0,1\}. Then V(x)=xTPx=x12V(x)=x^TPx=x_1^2 and V(x(t))=x12(t)V(x(t))=x_1^2(t), with

V˙(x(t))=2x1(t)x˙1(t)=−2x12(t)≤0,V(x(0)), V(x(t))≥0.\dot V(x(t))=2x_1(t)\dot x_1(t)=-2x_1^2(t)\le0,\qquad V(x(0)),\,V(x(t))\ge0 .

However FF is unstable. Since Ker(P)=⟨(0,1)T⟩\mathrm{Ker}(P)=\langle(0,1)^T\rangle, V(x)=0V(x)=0 for every x=(0,∗)Tx=(0,*)^T, so VV does not see the unstable direction.

Bottom line: PP must be PD for V(x)=xTPxV(x)=x^TPx to be a good Lyapunov candidate (energy function).

Example: three ways to analyse F=(−11−3−1)F=\begin{pmatrix}-1&1\\-3&-1\end{pmatrix}

  1. Eigenvalues. det⁡(λI−F)=(λ+1)2+3=λ2+2λ+4\det(\lambda I-F)=(\lambda+1)^2+3=\lambda^2+2\lambda+4, so λ1,2=−1±j3\lambda_{1,2}=-1\pm j\sqrt3 and Re(λ)<0\mathrm{Re}(\lambda)<0: a.s.
  2. Lyapunov, choosing PP first. Take P=(1002)P=\begin{pmatrix}1&0\\0&2\end{pmatrix}; then Q=−(FTP+PF)=(2554)Q=-(F^TP+PF)=\begin{pmatrix}2&5\\5&4\end{pmatrix}. Sylvester: first minor 2>02>0, but the second minor gives det⁡=−17<0\det=-17<0, so QQ is not PD and this choice is useless.
  3. Lyapunov, following the recipe. Choose Q=IQ=I, parametrise P=(abbc)P=\begin{pmatrix}a&b\\b&c\end{pmatrix} and compute −Q=(−100−1)=FTP+PF=(−2(a+3b)a−2b−3ca−2b−3c2(b−c)).-Q=\begin{pmatrix}-1&0\\0&-1\end{pmatrix}=F^TP+PF=\begin{pmatrix}-2(a+3b)&a-2b-3c\\a-2b-3c&2(b-c)\end{pmatrix}. This gives the system −2(a+3b)=−1-2(a+3b)=-1, a−2b−3c=0a-2b-3c=0, 2(b−c)=−12(b-c)=-1, whose solution is P=18(7−1−13).P=\frac18\begin{pmatrix}7&-1\\-1&3\end{pmatrix}. Sylvester: the first minor is 7/8>07/8>0 and the determinant is 164(21−1)=20/64>0\tfrac1{64}(21-1)=20/64>0 (the board writes it as a positive number), so P≻0P\succ0 and FF is a.s.

Versione ripasso

  • Why not eigenvalues: they are ill-conditioned. (01ϵ0)\begin{pmatrix}0&1\\ \epsilon&0\end{pmatrix} has λ=±ϵ\lambda=\pm\sqrt\epsilon, while ϵ=0\epsilon=0 gives λ=0\lambda=0.
  • Idea: an abstract energy V(x)=xTPxV(x)=x^TPx, P=PTP=P^T, with V>0V>0 for x≠0x\ne0 and V˙≤0\dot V\le0 along trajectories. Pendulum: Em=12mℓ2θ˙2+mgℓ(1−cos⁡θ)E_m=\tfrac12m\ell^2\dot\theta^2+mg\ell(1-\cos\theta) does not increase when isolated.
  • Derivative: with x˙=Fx\dot x=Fx, V˙=xT(FTP+PF)x=−xTQx\dot V=x^T(F^TP+PF)x=-x^TQx, where −Q=FTP+PF-Q=F^TP+PF is the Lyapunov equation, Q=QTQ=Q^T.
  • Bounds: V(x(0)) e−(λmax⁡Q/λmin⁡P)t≤V(x(t))≤V(x(0)) e−(λmin⁡Q/λmax⁡P)tV(x(0))\,e^{-(\lambda^Q_{\max}/\lambda^P_{\min})t}\le V(x(t))\le V(x(0))\,e^{-(\lambda^Q_{\min}/\lambda^P_{\max})t}. Requirements: P≻0P\succ0 (λmin⁡P>0\lambda^P_{\min}>0, see Positive Definite Matrices and the Sylvester CriterionA symmetric matrix is positive definite when its smallest eigenvalue is positive, and the Sylvester criterion tests this through the signs of the leading minors, which is how energy-like functions x^T P x are checked in Lyapunov arguments.Positive Definite Matrices and the Sylvester Criterion →) and Q⪰0Q\succeq0 for V˙≤0\dot V\le0.
  • Theorem: if FF is asymptotically stable, for every Q≻0Q\succ0 there is a unique P=PTP=P^T with −Q=FTP+PF-Q=F^TP+PF, and this PP is positive definite. Then P=∫0∞eFTt Q eFt dtP=\int_0^\infty e^{F^Tt}\,Q\,e^{Ft}\,dt.
  • Recipe: choose Q≻0Q\succ0 (for example Q=IQ=I) and solve for PP. If PP is unique and PD, FF is asymptotically stable; otherwise nothing follows about plain stability.
  • PP only PSD is not enough: F=diag(−1,1)F=\mathrm{diag}(-1,1) with P=diag(1,0)P=\mathrm{diag}(1,0) gives V˙=−2x12≤0\dot V=-2x_1^2\le0, but FF is unstable.
  • Bad guess: F=(−1−1100−1)F=\begin{pmatrix}-1&-1\\100&-1\end{pmatrix} is asymptotically stable, but P=IP=I gives QQ with eigenvalues −97-97 and 101101, which is not PSD.
  • Worked example: F=(−11−3−1)F=\begin{pmatrix}-1&1\\-3&-1\end{pmatrix}, eigenvalues −1±j3-1\pm j\sqrt3. With Q=IQ=I the equations for P=(abbc)P=\begin{pmatrix}a&b\\b&c\end{pmatrix} give P=18(7−1−13)≻0P=\tfrac18\begin{pmatrix}7&-1\\-1&3\end{pmatrix}\succ0, so FF is asymptotically stable.
  • Typical errors: guessing PP without checking that QQ is PD; concluding stability from a PSD PP; reading the Lyapunov equation as −Q=FTP+PF-Q=F^TP+PF with QQ on the wrong sign.

Teoria collegata