李雅普诺夫函数设计


一、线性时不变系统


1.1 原理

对于线性时不变系统

x ˙ = A x (1.1) \dot x = Ax \tag{1.1} x˙=Ax(1.1)

采用二次型Lyapunov函数

V = x T P x (1.2) V = x^T P x \tag{1.2} V=xTPx(1.2)

其中 P P P 是对称正定矩阵,则:

V ˙ = x ˙ T P x + x T P x ˙ = x T A T P x + x T P A x = x T ( A T P + P A ) x \begin{aligned} \dot V &= \dot x^TPx + x^T P \dot x \\ &= x^TA^TPx + x^TPAx \\ &= x^T(A^TP+PA)x \end{aligned} V˙=x˙TPx+xTPx˙=xTATPx+xTPAx=xT(ATP+PA)x

由于 P P P 对称正定, V ( x ) V(x) V(x) 正定;若 V ˙ ( x ) \dot V(x) V˙(x) 负定,则系统全局渐进稳定。因此,不妨令:

A T P + P A = − Q (1.3) A^TP + PA = -Q \tag{1.3} ATP+PA=Q(1.3)

其中, Q Q Q为正定对称矩阵。

这样,使用逆向思维,首先选取一个正定对称的 Q Q Q(简单起见,往往选单位阵),再解出矩阵 P P P即可,即可保证 V ( x ) V(x) V(x) 正定, V ˙ ( x ) \dot V(x) V˙(x) 负定,系统全局渐进稳定。


1.2 例子

系统状态方程为:

x ˙ 1 = x 2 x ˙ 2 = − 2 x 1 − 3 x 2 \begin{aligned} & \dot x_1 = x_2 \\ & \dot x_2 = -2x_1 - 3x_2 \end{aligned} x˙1=x2x˙2=2x13x2

易知:

A = [ 0 1 − 2 − 3 ] A =\left[ \begin{array}{cc} 0 & 1 \\ -2 & -3 \end{array}\right ] A=[0213]

Q = [ 1 0 0 1 ] P = [ p 11 p 12 p 21 p 22 ] , p 12 = p 21 Q =\left[ \begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array}\right ] \quad P =\left[ \begin{array}{cc} p_{11} & p_{12} \\ p_{21} & p_{22} \end{array}\right ] ,p_{12} = p_{21} Q=[1001]P=[p11p21p12p22],p12=p21

A T P + P A = [ − 4 p 12 p 11 − 3 p 12 − 2 p 22 p 11 − 3 p 12 − 2 p 22 2 p 12 − 6 p 22 ] = let − [ 1 0 0 1 ] \begin{aligned} A^T P + PA &= \left [ \begin{array}{cc} -4p_{12} & p_{11}-3p_{12} - 2p_{22} \\ p_{11} - 3p_{12} - 2p_{22} & 2p_{12} - 6p_{22} \end{array}\right ] \\ & \overset{\text{let}}{=}-\left[ \begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array}\right ] \end{aligned} ATP+PA=[4p12p113p122p22p113p122p222p126p22]=let[1001]

解得:

p 12 = 1 4 p 22 = 1 4 p 11 = 5 4 p_{12} = \frac{1}{4} \quad p_{22} = \frac{1}{4} \quad p_{11} = \frac{5}{4} p12=41p22=41p11=45

因此,原系统的一个Lyapunov函数为:

V = x T P x = [ x 1 x 2 ] [ 5 4 1 4 1 4 1 4 ] [ x 1 x 2 ] = 5 4 x 1 2 + 1 2 x 1 x 2 + 1 4 x 2 2 \begin{aligned} V &= x^T P x \\ &= \left[\begin{array}{cc} x_1 & x_2\end{array}\right ] \left[\begin{array}{cc} \frac{5}{4} & \frac{1}{4} \\ \frac{1}{4} & \frac{1}{4} \end{array}\right ] \left[\begin{array}{cc} x_1 \\ x_2\end{array}\right ] \\ &= \frac{5}{4}x_1^2 + \frac{1}{2}x_1x_2 + \frac{1}{4}x_2^2 \end{aligned} V=xTPx=[x1x2][45414141][x1x2]=45x12+21x1x2+41x22

V ˙ = 5 2 x 1 x ˙ 1 + 1 2 x 1 x ˙ 2 + 1 2 x 2 x ˙ 1 + 1 2 x 2 x ˙ 2 = 5 2 x 1 x 2 + 1 2 x 1 ( − 2 x 1 − 3 x 2 ) + 1 2 x 2 x 2 + 1 2 x 2 ( − 2 x 1 − 3 x 2 ) = − x 1 2 − x 2 2 \begin{aligned} \dot V &= \frac{5}{2}x_1\dot x_1+ \frac{1}{2}x_1 \dot x_2 + \frac{1}{2}x_2 \dot x_1 + \frac{1}{2}x_2 \dot x_2 \\ &= \frac{5}{2}x_1x_2 + \frac{1}{2}x_1(-2x_1 - 3x_2) + \frac{1}{2}x_2x_2 + \frac{1}{2}x_2 (-2x_1 - 3x_2) \\ &= -x_1^2 - x_2^2 \end{aligned} V˙=25x1x˙1+21x1x˙2+21x2x˙1+21x2x˙2=25x1x2+21x1(2x13x2)+21x2x2+21x2(2x13x2)=x12x22

验证了设计的正确性。


二、非线性系统


考虑非线性自治系统

x = f ˙ ( x ) (2.1) x = \dot f(x) \tag{2.1} x=f˙(x)(2.1)

自治系统是指不明确依赖于时间的系统,简单地,可以理解为时不变系统。自治系统可以使用微分方程组 x = f ˙ ( x ) x = \dot f(x) x=f˙(x) 表示,而非自治系统则表示为 x = f ˙ ( x , t ) x = \dot f(x,t) x=f˙(x,t)。例如 x = x ˙ x = \dot x x=x˙ 为自治系统,虽然解 x ( t ) = e t x(t) = e^{t} x(t)=et 以时间为自变量,而 x = x ˙ + t x = \dot x + t x=x˙+t则为非自治系统。

2.1 Krasovskii方法

2.1.1 原理

假设原点是系统的平衡点,设 A ( x ) A(x) A(x) 为系统的雅可比矩阵:

A ( x ) = ∂ f ∂ x (2.2) A(x) = \frac{\partial f}{\partial x} \tag{2.2} A(x)=xf(2.2)

F = A + A T F=A+A^T F=A+AT 在原点的领域 Ω \Omega Ω内是负定的,那么原点是一个渐进稳定的平衡点,且系统Lyapunov函数可设计为:

V ( x ) = f T ( x ) f ( x ) (2.3) V(x) = f^T(x)f(x) \tag{2.3} V(x)=fT(x)f(x)(2.3)

Ω \Omega Ω是整个状态空间,且 V ( x ) V(x) V(x) 径向无界,则平衡点全局渐进稳定。

径向无界指的是: ∣ ∣ x ∣ ∣ → ∞ ||x|| \to \infty x时, ∣ ∣ V ( x ) ∣ ∣ → ∞ ||V(x)|| \to \infty V(x)

2.1.2 例子

x ˙ 1 = − x 1 + x 2 x ˙ 2 = x 1 − x 2 − x 2 3 \begin{aligned} & \dot x_1 = -x_1 + x_2 \\ & \dot x_2 = x_1 - x_2 - x_2^3 \end{aligned} x˙1=x1+x2x˙2=x1x2x23

则原点是一个平衡点,且:
A ( x ) = ∂ f ∂ x = [ − 1 1 1 − 1 − 3 x 2 2 ] \begin{aligned} A(x) &= \frac{\partial f}{\partial x} &= \left [ \begin{array}{cc} -1 & 1 \\ 1 & -1-3x_2^2 \end{array} \right ] \end{aligned} A(x)=xf=[11113x22]

因为:

F ( x ) = A ( x ) + A T ( x ) = [ − 2 2 2 − 2 − 6 x 2 2 ] F(x) = A (x)+ A^T(x) = \left [ \begin{array} {cc} -2 & 2 \\ 2 & -2-6x_2^2 \end{array}\right ] F(x)=A(x)+AT(x)=[22226x22]

易得 F ( x ) F(x) F(x) 负定(注意:正定时各阶代数主子式都为正;负定时奇数阶代数主子式为负,偶数阶代数主子式为正)。

因此原点是渐进稳定的,一个Lyapunov 函数为

V ( x ) = f T ( x ) f ( x ) = ( − x 1 + x 2 ) 2 + ( x 1 − x 2 − x 2 3 ) 2 V(x) = f^T(x) f(x) = (-x_1 + x_2)^2 + (x_1 - x_2 - x_2^3)^2 V(x)=fT(x)f(x)=(x1+x2)2+(x1x2x23)2

注意到 V ( x ) V(x) V(x) 径向无界,故原点是全局渐进稳定的。


2.2 推广的 Krasovskii 定理

2.2.1 原理

由于很多系统的雅可比矩阵并不满足正定条件,而且对于高阶系统,难以验证矩阵 F ( x ) F(x) F(x) 对一切 x x x 负定,因此推广的 Krasovskii 定理在很多时候很有用。

对于自治非线性系统(2.1),假设原点是一个平衡点。 A ( x ) A(x) A(x) 为系统雅克比矩阵,如果存在两个正定矩阵 P P P Q Q Q,使得

F ( x ) = A T P + P A + Q (2.4) F(x) = A^TP + PA + Q \tag{2.4} F(x)=ATP+PA+Q(2.4)

在原点某个领域 Ω \Omega Ω 内半负定,则系统原点是渐进稳定的。此时一个Lyapunov函数为:

V ( x ) = f T ( x ) P f ( x ) (2.5) V(x) = f^T(x) P f(x) \tag{2.5} V(x)=fT(x)Pf(x)(2.5)

Ω \Omega Ω 是整个状态空间,且 V ( x ) V(x) V(x)径向无界,则平衡点全局渐进稳定。

2.2.2 例子

x ˙ 1 = x 2 x ˙ 2 = − sin ⁡ x 1 − x 2 \begin{aligned} & \dot x_1 = x_2 \\ & \dot x_2 = -\sin x_1 - x_2 \end{aligned} x˙1=x2x˙2=sinx1x2

则:

A ( x ) = ∂ f ∂ x = [ 0 1 − cos ⁡ x 1 − 1 ] A(x) = \frac{\partial f}{\partial x} = \left [ \begin{array}{cc} 0 & 1 \\ -\cos x_1& -1\end{array}\right ] A(x)=xf=[0cosx111]

容易发现 A ( x ) A(x) A(x)并不是正定的,实际上很多时候有类似 x ˙ 1 = x 2 \dot x_1=x_2 x˙1=x2 情况,系统转移矩阵都不是正定的。


P = [ p 11 p 12 p 21 p 22 ] Q = [ q 11 q 12 q 21 q 22 ] P =\left[ \begin{array}{cc} p_{11} & p_{12} \\ p_{21} & p_{22} \end{array}\right ] \quad Q =\left[ \begin{array}{cc} q_{11} & q_{12} \\ q_{21} & q_{22} \end{array}\right ] \quad P=[p11p21p12p22]Q=[q11q21q12q22]

F ( x ) = A T P + P A + Q = [ 0 1 − cos ⁡ x 1 − 1 ] = [ − ( p 21 + p 12 ) cos ⁡ x 1 p 11 − p 12 − p 22 cos ⁡ x 1 p 11 − p 21 − p 22 cos ⁡ x 1 p 12 + p 21 − 2 p 22 ] + [ q 11 q 12 q 21 q 22 ] \begin{aligned} F(x) &= A^TP + PA + Q \\ &= \left [ \begin{array}{cc} 0 & 1 \\ -\cos x_1& -1\end{array}\right ] \\ &= \left [ \begin{array}{cc} -(p_{21}+p_{12})\cos x_1 & p_{11}- p_{12} - p_{22} \cos x_1 \\ p_{11}- p_{21} - p_{22} \cos x_1 & p_{12} + p_{21} - 2p_{22} \end{array} \right ] + \left [ \begin{array}{cc} q_{11} & q_{12} \\ q_{21} & q_{22} \end{array} \right ] \end{aligned} F(x)=ATP+PA+Q=[0cosx111]=[(p21+p12)cosx1p11p21p22cosx1p11p12p22cosx1p12+p212p22]+[q11q21q12q22]

为了简化运算且满足 P P P正定,不妨设 p 12 = p 21 = 1 , p 11 = p 22 = 2 p_{12}=p_{21}=1,p_{11}=p_{22}=2 p12=p21=1,p11=p22=2,则

F ( x ) = [ − 2 cos ⁡ x 1 1 − 2 cos ⁡ x 1 1 − 2 cos ⁡ x 1 − 2 ] + [ q 11 q 12 q 21 q 22 ] \begin{aligned} F(x) = \left [ \begin{array}{cc} -2\cos x_1 & 1-2\cos x_1 \\ 1-2 \cos x_1 & -2 \end{array} \right ] + \left [ \begin{array}{cc} q_{11} & q_{12} \\ q_{21} & q_{22} \end{array} \right ] \end{aligned} F(x)=[2cosx112cosx112cosx12]+[q11q21q12q22]

此时, F ( x ) F(x) F(x) 的一阶主子式为 F 1 = − 2 cos ⁡ x 1 F_1=-2\cos x_1 F1=2cosx1 x ∈ ( − π / 2 , π / 2 ) x \in(-\pi/2, \pi/2) x(π/2,π/2) 上小于零,二阶主子式 F 2 F_2 F2大于零则 F ( x ) F(x) F(x) 负定。

F 2 = 4 cos ⁡ x 1 − ( 1 − 2 cos ⁡ x 1 ) 2 = − 4 cos ⁡ x 1 2 + 8 cos ⁡ x 1 − 1 > 0 \begin{aligned} F_2 &= 4\cos x_1 - (1-2 \cos x_1)^2 \\ &= -4\cos x_1^2 + 8 \cos x_1 -1 \\ &>0 \end{aligned} F2=4cosx1(12cosx1)2=4cosx12+8cosx11>0

解得:

1 − 3 2 < cos ⁡ x 1 < 1 + 3 2 1- \frac{\sqrt{3}}{2} < \cos x_1 <1 + \frac{\sqrt{3}}{2} 123 <cosx1<1+23

x 1 x_1 x1 大约在-82.3°~82.3°之间,系统渐进稳定。对于矩阵 Q Q Q,我们可以选取一个无穷小的对角阵,这样几乎不影响 F ( x ) F(x) F(x)的负定。因此该系统是局部渐进稳定的。

容易得出,一个备选的Lyapunov函数为:

V ( x ) = f T ( x ) P f ( x ) = 2 x 2 2 + 2 ( sin ⁡ x 1 + x 2 ) 2 + 2 x 2 ( − sin ⁡ x 1 − x 2 ) = 2 ( x 2 2 + x 2 sin ⁡ x 1 + sin ⁡ 2 x 1 ) \begin{aligned} V(x) &= f^T(x) P f(x) \\ &= 2x_2^2 + 2(\sin x_1 + x_2)^2 + 2x_2(-\sin x_1 - x_2) \\ &= 2(x_2^2 + x_2 \sin x_1 + \sin^2x_1) \end{aligned} V(x)=fT(x)Pf(x)=2x22+2(sinx1+x2)2+2x2(sinx1x2)=2(x22+x2sinx1+sin2x1)

此例实际是有摩擦单摆的例子,理论上单摆在(-90°~90°) 之间都能稳定在平衡点,但是由于矩阵 P P P的选择并不唯一,因此得出的稳定区间也并不相同。顺变一说,此例为个人计算,不排除有错误的可能性,如有错误,欢迎指正。


2.3 待定梯度法

2.3.1 原理

待定梯度法通过以下步骤构造Lyapunov函数:

首先假设梯度是各个变量的线性组合,

∇ V i = ∑ j = 1 n a i j x j \nabla V_i = \sum_{j=1}^{n} a_{ij} x_j Vi=j=1naijxj

其次,保证梯度满足旋度条件,

∂ ∇ V i ∂ x j = ∂ ∇ V j ∂ x i \frac {\partial \nabla V_i}{\partial x_j} = \frac {\partial \nabla V_j}{\partial x_i} xjVi=xiVj

最后,根据梯度与原函数的关系,分步积分得到原函数,

V ( x ) = ∫ 0 x ∇ V d x = ∫ 0 x 1 ∇ V 1 ( x 1 , 0 , . . . , 0 ) d x 1 + ∫ 0 x 2 ∇ V 2 ( x 1 , x 2 , 0 , . . . , 0 ) d x 2 + . . . + ∫ 0 x n ∇ V 1 ( x 1 , x 2 , . . . , x n ) d x n \begin{aligned} V(x) &= \int_0^x \nabla V dx \\ &= \int_0^{x_1} \nabla V_1(x_1, 0,...,0) dx_1 + \int_0^{x_2} \nabla V_2(x_1, x_2,0,...,0) dx_2 + ... + \int_0^{x_n} \nabla V_1(x_1, x_2,...,x_n) dx_n \end{aligned} V(x)=0xVdx=0x1V1(x1,0,...,0)dx1+0x2V2(x1,x2,0,...,0)dx2+...+0xnV1(x1,x2,...,xn)dxn

2.3.2 例子

x ˙ 1 = − x 1 x ˙ 2 = − x 2 + x 1 x 2 2 \begin{aligned} &\dot x_1 =-x_1 \\ &\dot x_2 = -x_2 + x_1x_2^2 \end{aligned} x˙1=x1x˙2=x2+x1x22

首先,假设待定Lypapunov函数的梯度为:

∇ V 1 = a 11 x 1 + a 12 x 2 ∇ V 2 = a 21 x 1 + a 22 x 2 \nabla V_1 = a_{11}x_1 + a_{12}x_2 \\ \nabla V_2 = a_{21}x_1 + a_{22}x_2 V1=a11x1+a12x2V2=a21x1+a22x2

旋度条件要求:

∂ ∇ V 1 ∂ x 2 = ∂ ∇ V 2 ∂ x 1 \frac {\partial \nabla V_1}{\partial x_2} = \frac {\partial \nabla V_2}{\partial x_1} x2V1=x1V2

a 12 = a 21 a_{12}=a_{21} a12=a21

V ˙ = ∇ V x ˙ = ( a 11 x 1 + a 12 x 2 ) ( − x 1 ) + ( a 21 x 1 + a 22 x 2 ) ( − x 2 + x 1 x 2 2 ) = − a 11 x 1 2 − ( a 12 + a 21 ) x 1 x 2 − a 22 x 2 2 + a 22 x 1 x 2 3 \begin{aligned} \dot V &= \nabla V \dot x \\ &= (a_{11}x_1 + a_{12}x_2)(-x_1) + (a_{21}x_1 + a_{22}x_2)(-x_2 + x_1x_2^2) \\ &= -a_{11} x_1^2 - (a_{12}+a_{21})x_1x_2 - a_{22}x_2^2 + a_{22}x_1 x_2^3 \\ \end{aligned} V˙=Vx˙=(a11x1+a12x2)(x1)+(a21x1+a22x2)(x2+x1x22)=a11x12(a12+a21)x1x2a22x22+a22x1x23

为了使得 V ˙ ( x ) \dot V(x) V˙(x)负定,取 a 12 = a 21 = 0 a_{12}=a_{21}=0 a12=a21=0 a 11 = a 22 = 1 a_{11}=a_{22}=1 a11=a22=1,则

V ˙ = − x 1 2 − x 2 2 ( 1 − x 1 x 2 ) \dot V = -x_1^2 -x_2^2(1-x_1x_2) V˙=x12x22(1x1x2)

x 1 x 2 < 1 x_1x_2<1 x1x2<1时,系统渐进稳定。相应地:

V = ∫ 0 x 1 ∇ V 1 ( x 1 , 0 ) d x 1 + ∫ 0 x 2 ∇ V 2 ( x 1 , x 2 ) d x 2 = ∫ 0 x 1 x 1 d x 1 + ∫ 0 x 2 x 2 d x 2 = 1 2 x 1 2 + 1 2 x 2 2 \begin{aligned} V &= \int_0^{x_1} \nabla V_1(x_1, 0) dx_1 + \int_0^{x_2} \nabla V_2(x_1, x_2) dx_2 \\ &= \int_0^{x_1} x_1 dx_1 + \int_0^{x_2} x_2 dx_2 \\ &= \frac{1}{2} x_1^2 + \frac{1}{2} x_2^2 \end{aligned} V=0x1V1(x1,0)dx1+0x2V2(x1,x2)dx2=0x1x1dx1+0x2x2dx2=21x12+21x22

函数正定,是一个可行的Lyapunov函数。

说实话,个人对待定梯度法并不是很看好,因为旋度条件只保证梯度积分结果的唯一性,而不能保证 V ˙ \dot V V˙ 负定且 V V V 正定,这两个核心条件依旧需要合理选择参数来实现。

— 完 —

你可能感兴趣的:(杂篇)