多智能体集群协同控制笔记(1):线性无领航多智能体系统的一致性

这篇具有很好参考价值的文章主要介绍了多智能体集群协同控制笔记(1):线性无领航多智能体系统的一致性。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

对于连续时间高阶线性多智能体系统的状态方程为:
x ˙ i ( t ) = A x i ( t ) + B u i ( t ) , i = 1 , 2.. N \dot {\mathbf{x}}_i(t)=A\mathbf{x}_i(t)+B\mathbf{u}_i(t),i=1,2..N x˙i(t)=Axi(t)+Bui(t),i=1,2..N
下标 i i i代表第 i i i个智能体, u i ( t ) ∈ R q × 1 \mathbf{u}_i(t)\in R^{q \times 1} ui(t)Rq×1表示第 i i i个智能体的控制输入变量, x i ( t ) ∈ R p × 1 \mathbf{x}_i(t)\in R^{p \times 1} xi(t)Rp×1表示第 i i i个智能体的状态变量。系统的一致性即设计控制器 u i ( t ) \mathbf{u}_i(t) ui(t)保证如下等式成立:
lim ⁡ t → ∞ x 1 ( t ) = lim ⁡ t → ∞ x 2 ( t ) = . . . = lim ⁡ t → ∞ x N ( t ) \lim_{t\rightarrow\infty}\mathbf{x}_1(t)=\lim_{t\rightarrow\infty}\mathbf{x}_2(t)=...=\lim_{t\rightarrow\infty}\mathbf{x}_N(t) tlimx1(t)=tlimx2(t)=...=tlimxN(t)

  • 定义Laplacian矩阵 L = { l i j } i , j = 1 , . . N L=\{l_{ij}\}_{i,j=1,..N} L={lij}i,j=1,..N,其中:
    l i j = { ∑ j = 1 , j ≠ i N a i j i = j − a i j i ≠ j l_{ij}=\begin{cases} \sum_{j=1,j\ne i}^Na_{ij} & i = j\\ -a_{ij}& i\ne j \end{cases} lij={j=1,j=iNaijaiji=ji=j

  • 定义变量: ξ i ( t ) = ∑ j = 1 N a i j ( x i ( t ) − x j ( t ) ) \mathbf{\xi}_i(t)=\sum_{j=1}^Na_{ij}(\mathbf{x}_i(t)-\mathbf{x}_j(t)) ξi(t)=j=1Naij(xi(t)xj(t)),定义:
    ξ ( t ) = ( L ⊗ I p ) X ( t ) \mathbf{\xi}(t)=(L\otimes I_p)X(t) ξ(t)=(LIp)X(t)
    其中: X ( t ) = [ x 1 T ( t ) , x 2 T ( t ) , . . x N T ( t ) ] T X(t)=[\mathbf{x}_1^T(t),\mathbf{x}_2^T(t),..\mathbf{x}_N^T(t)]^T X(t)=[x1T(t),x2T(t),..xNT(t)]T ξ ( t ) = [ ξ 1 ( t ) T , ξ 2 ( t ) T , . . ξ N ( t ) T ] T \mathbf{\xi}(t)=[\mathbf{\xi}_1(t)^T,\mathbf{\xi}_2(t)^T,..\mathbf{\xi}_N(t)^T]^T ξ(t)=[ξ1(t)T,ξ2(t)T,..ξN(t)T]T

  • 定义控制器: u i ( t ) = c K 1 ξ i ( t ) \mathbf{u}_i(t)=cK_1\mathbf{\xi}_i(t) ui(t)=cK1ξi(t),总的控制策略为:
    u ( t ) = ( I N ⊗ c K 1 ) ξ ( t ) = ( I N ⊗ c K 1 ) ( L ⊗ I p ) X ( t ) \mathbf{u}(t)=(I_N\otimes cK_1)\mathbf{\xi}(t) =(I_N\otimes cK_1)(L\otimes I_p)X(t) u(t)=(INcK1)ξ(t)=(INcK1)(LIp)X(t)
    其中 K 1 K_1 K1是待求的控制增益矩阵, c c c为加权参数;

  • 定义 L L L为该系统的Laplacian矩阵,存在一个酉矩阵 Y Y Y,使得:
    Y T L Y = d i a g ( λ 1 , λ 2 , . . . λ N ) Y^TLY=\mathbf{diag}(\lambda_1,\lambda_2,...\lambda_N) YTLY=diag(λ1,λ2,...λN)
    其中: λ 1 = 0 ; λ i > 0 , i ∈ { 2 , 3 , . . N } \lambda_1=0;\lambda_i >0,i \in \{ 2,3,..N\} λ1=0;λi>0,i{2,3,..N},由于 L L L有右特征向量 1 N \mathbf{1}_N 1N, Y Y Y可以写成:
    Y = [ 1 N N , M 1 ] Y=[\frac{\mathbf{1}_N}{\sqrt{N}}, M_1] Y=[N 1N,M1]

  • 定义: ε ( t ) = [ ε 1 ( t ) T , ε 2 ( t ) T , . . ε N ( t ) T ] T = ( Y T ⊗ I p ) ξ ( t ) \mathbf{\varepsilon}(t)=[\mathbf{\varepsilon}_1(t)^T,\mathbf{\varepsilon}_2(t)^T,..\mathbf{\varepsilon}_N(t)^T]^T=(Y^T\otimes I_p)\mathbf{\xi}(t) ε(t)=[ε1(t)T,ε2(t)T,..εN(t)T]T=(YTIp)ξ(t),其中 p p p x i ( t ) \mathbf{x}_i(t) xi(t)的维度。

    1.无向连通图定理

    引理1.1: 当多智能体系统网络为无向连通图时,系统实现状态一致的充要条件是:

ε ˉ ( t ) = [ ε 2 ( t ) T , ε 3 ( t ) T , . . ε N ( t ) T ] T = 0 \mathbf{\bar \varepsilon}(t)=[\mathbf{\varepsilon}_2(t)^T,\mathbf{\varepsilon}_3(t)^T,..\mathbf{\varepsilon}_N(t)^T]^T=\mathbf{0} εˉ(t)=[ε2(t)T,ε3(t)T,..εN(t)T]T=0

​ 且 ε ˉ ( t ) \bar{\varepsilon}(t) εˉ(t)同时也满足:
ε ˙ ( t ) = ( I N ⊗ A + c Λ N ⊗ B K 1 ) ε ( t ) ε ˉ ˙ ( t ) = ( I N − 1 ⊗ A + c Λ N − 1 ⊗ B K 1 ) ε ˉ ( t ) ( ∗ ) \dot \varepsilon(t) = (I_N\otimes A+c\Lambda_N \otimes BK_1)\varepsilon(t)\\ \dot{\bar{\varepsilon}}(t) = (I_{N-1}\otimes A+c\Lambda_{N-1} \otimes BK_1)\bar{\varepsilon}(t) \quad (*) ε˙(t)=(INA+cΛNBK1)ε(t)εˉ˙(t)=(IN1A+cΛN1BK1)εˉ(t)()
​ 其中: Λ N − 1 = d i a g ( λ 2 , . . . λ N ) \Lambda_{N-1}=diag(\lambda_2,...\lambda_N) ΛN1=diag(λ2,...λN) Λ N = d i a g ( λ 1 , λ 2 , . . . λ N ) \Lambda_{N}=diag(\lambda_1,\lambda_2,...\lambda_N) ΛN=diag(λ1,λ2,...λN)

定理1.1:给定矩阵 Q 1 = Q 1 T > 0 Q_1=Q_1^T>0 Q1=Q1T>0 R 1 = R 1 T > 0 R_1=R_1^T>0 R1=R1T>0,若如下Riccati方程有正定解 P 1 = P 1 T > 0 P_1=P_1^T>0 P1=P1T>0
P 1 A + A P 1 T + Q 1 − P 1 B R 1 − 1 B T P 1 = 0 P_1A+AP_1^T+Q_1-P_1BR_1^{-1}B^TP_1=\mathbf{0} P1A+AP1T+Q1P1BR11BTP1=0
​ 则系统 ( ∗ ) (*) ()渐进稳定,由引理1.1可知,原系统能达到一致性。

​ 其中系统的控制增益矩阵 K 1 = − R 1 − 1 B T P 1 K_1=-R_1^{-1}B^TP_1 K1=R11BTP1,且加权系数 c c c满足 c ≥ 1 2 min ⁡ i = 2 , . . . N λ i ( L ) c\geq\frac{1}{2\min_{i=2,...N}{\lambda_i(L)}} c2mini=2,...Nλi(L)1

​ 证明:构造Lyapunov函数 V 1 ( t ) = 0.5 ε ˉ T ( t ) ( I N − 1 ⊗ P 1 ) ε ˉ ( t ) V_1(t)=0.5\bar{\varepsilon}^T(t)(I_{N-1}\otimes P_1)\bar{\varepsilon}(t) V1(t)=0.5εˉT(t)(IN1P1)εˉ(t),其满足:
V 1 ˙ ( t ) = 0.5 ε ˉ ˙ T ( t ) ( I N − 1 ⊗ P 1 ) ε ˉ ( t ) + 0.5 ε ˉ T ( t ) ( I N − 1 ⊗ P 1 ) ε ˉ ˙ ( t ) = ε ˉ T ( t ) ( I N − 1 ⊗ P 1 ) ε ˉ ˙ ( t ) = ε ˉ ( t ) T ( I N − 1 ⊗ P 1 ) ( I N − 1 ⊗ A + c Λ N − 1 ⊗ B K 1 ) ε ˉ ( t ) = ε ˉ T ( t ) ( I N − 1 ⊗ P 1 A + c Λ N − 1 ⊗ P 1 B K 1 ) ε ˉ ( t ) = ε ˉ T ( t ) ( I N − 1 ⊗ P 1 A − c Λ N − 1 ⊗ P 1 B R 1 − 1 B T P 1 ) ε ˉ ( t ) \dot{V_1}(t)=0.5\dot{\bar{\varepsilon}}^T(t)(I_{N-1}\otimes P_1)\bar{\varepsilon}(t)+0.5\bar{\varepsilon}^T(t)(I_{N-1}\otimes P_1)\dot{\bar{\varepsilon}}(t)\\ =\bar{\varepsilon}^T(t)(I_{N-1}\otimes P_1)\dot{\bar{\varepsilon}}(t)\\=\bar{\varepsilon}(t)^T(I_{N-1}\otimes P_1)(I_{N-1}\otimes A+c\Lambda_{N-1} \otimes BK_1)\bar{\varepsilon}(t)\\=\bar{\varepsilon}^T(t)(I_{N-1}\otimes P_1A+c\Lambda_{N-1}\otimes P_1BK_1)\bar{\varepsilon}(t)\\=\bar{\varepsilon}^T(t)(I_{N-1}\otimes P_1A-c\Lambda_{N-1}\otimes P_1BR_1^{-1}B^TP_1)\bar{\varepsilon}(t) V1˙(t)=0.5εˉ˙T(t)(IN1P1)εˉ(t)+0.5εˉT(t)(IN1P1)εˉ˙(t)=εˉT(t)(IN1P1)εˉ˙(t)=εˉ(t)T(IN1P1)(IN1A+cΛN1BK1)εˉ(t)=εˉT(t)(IN1P1A+cΛN1P1BK1)εˉ(t)=εˉT(t)(IN1P1AcΛN1P1BR11BTP1)εˉ(t)
​ 由于 c ≥ 1 2 min ⁡ i = 2 , . . . N λ i ( L ) c\geq\frac{1}{2\min_{i=2,...N}{\lambda_i(L)}} c2mini=2,...Nλi(L)1,因此 c Λ N − 1 ≥ I N − 1 2 c\Lambda_{N-1}\geq\frac{I_{N-1}}{2} cΛN12IN1。带入上式有:
V 1 ˙ ( t ) = ε ˉ T ( t ) ( I N − 1 ⊗ P 1 A − c Λ N − 1 ⊗ P 1 B R 1 − 1 B T P 1 ) ε ˉ ( t ) ≤ ε ˉ T ( t ) ( I N − 1 ⊗ P 1 A − I N − 1 2 ⊗ P 1 B R 1 − 1 B T P 1 ) ε ˉ ( t ) = ε ˉ T ( t ) ( I N − 1 2 ⊗ ( P 1 A + A T P 1 ) − I N − 1 2 ⊗ P 1 B R 1 − 1 B T P 1 ) ε ˉ ( t ) = − 1 2 ε ˉ T ( t ) ( I N − 1 ⊗ Q 1 ) ε ˉ ( t ) \dot{V_1}(t)=\bar{\varepsilon}^T(t)(I_{N-1}\otimes P_1A-c\Lambda_{N-1}\otimes P_1BR_1^{-1}B^TP_1)\bar{\varepsilon}(t)\\ \leq \bar{\varepsilon}^T(t)(I_{N-1}\otimes P_1A-\frac{I_{N-1}}{2}\otimes P_1BR_1^{-1}B^TP_1)\bar{\varepsilon}(t)\\=\bar{\varepsilon}^T(t)( \frac{I_{N-1}}{2}\otimes (P_1A+A^TP_1) -\frac{I_{N-1}}{2}\otimes P_1BR_1^{-1}B^TP_1)\bar{\varepsilon}(t)\\=-\frac{1}{2}\bar{\varepsilon}^T(t)(I_{N-1}\otimes Q_1)\bar{\varepsilon}(t) V1˙(t)=εˉT(t)(IN1P1AcΛN1P1BR11BTP1)εˉ(t)εˉT(t)(IN1P1A2IN1P1BR11BTP1)εˉ(t)=εˉT(t)(2IN1(P1A+ATP1)2IN1P1BR11BTP1)εˉ(t)=21εˉT(t)(IN1Q1)εˉ(t)
​ 由直积的性质有:
λ min ⁡ ( I N − 1 ⊗ Q 1 ) = λ min ⁡ ( Q 1 ) λ max ⁡ ( I N − 1 ⊗ P 1 ) = λ max ⁡ ( P 1 ) \lambda_{\min}(I_{N-1}\otimes Q_1)=\lambda_{\min}(Q_1)\\ \lambda_{\max}(I_{N-1}\otimes P_1)=\lambda_{\max}(P_1) λmin(IN1Q1)=λmin(Q1)λmax(IN1P1)=λmax(P1)
​ 由矩阵的极大极小值原理:
V 1 ˙ ( t ) V 1 ( t ) = − 1 2 ε ˉ T ( t ) ( I N − 1 ⊗ Q 1 ) ε ˉ ( t ) 1 2 ε ˉ T ( t ) ( I N − 1 ⊗ P 1 ) ε ˉ ( t ) ≤ − λ min ⁡ ( Q 1 ) ε ˉ T ( t ) ε ˉ ( t ) λ max ⁡ ( P 1 ) ε ˉ T ( t ) ε ˉ ( t ) = − λ min ⁡ ( Q 1 ) λ max ⁡ ( P 1 ) = − δ \frac{\dot{V_1}(t)}{V_1(t)}=\frac{-\frac{1}{2}\bar{\varepsilon}^T(t)(I_{N-1}\otimes Q_1)\bar{\varepsilon}(t)}{\frac{1}{2}\bar{\varepsilon}^T(t)(I_{N-1}\otimes P_1)\bar{\varepsilon}(t)}\leq-\frac{\lambda_{\min}(Q_1)\bar{\varepsilon}^T(t)\bar{\varepsilon}(t)}{\lambda_{\max}(P_1)\bar{\varepsilon}^T(t)\bar{\varepsilon}(t) }=-\frac{\lambda_{\min}(Q_1)}{\lambda_{\max}(P_1)}=-\delta V1(t)V1˙(t)=21εˉT(t)(IN1P1)εˉ(t)21εˉT(t)(IN1Q1)εˉ(t)λmax(P1)εˉT(t)εˉ(t)λmin(Q1)εˉT(t)εˉ(t)=λmax(P1)λmin(Q1)=δ
​ 解上述不等式有:
V 1 ( t ) ≤ V 1 ( 0 ) e − δ t V_1(t)\leq V_1(0)e^{-\delta t} V1(t)V1(0)eδt
​ 带入 V 1 ( t ) ≥ 0.5 λ min ⁡ ( P 1 ) ∣ ∣ ε ˉ ( t ) ∣ ∣ 2 V_1(t)\geq 0.5\lambda_{\min}(P_1)||\bar{\varepsilon}(t)||^2 V1(t)0.5λmin(P1)∣∣εˉ(t)2 V 1 ( 0 ) ≤ 0.5 λ max ⁡ ( P 1 ) ∣ ∣ ε ˉ ( 0 ) ∣ ∣ 2 V_1(0)\leq 0.5\lambda_{\max}(P_1)||\bar{\varepsilon}(0)||^2 V1(0)0.5λmax(P1)∣∣εˉ(0)2有:
∣ ∣ ε ˉ ( t ) ∣ ∣ ≤ λ max ⁡ ( P 1 ) λ min ⁡ ( P 1 ) ∣ ∣ ε ˉ ( 0 ) ∣ ∣ e − δ t 2 ||\bar{\varepsilon}(t)||\leq \sqrt\frac{\lambda_{\max}(P_1)}{\lambda_{\min}(P_1)}||\bar{\varepsilon}(0)||e^{\frac{-\delta t}{2}} ∣∣εˉ(t)∣∣λmin(P1)λmax(P1) ∣∣εˉ(0)∣∣e2δt
​ 因此上述系统(*)是一致指数稳定的,其必然是渐进稳定的。

2.仿真

2.1 问题

​ 设固定翼无人机集群中每个无人机的俯仰方向运动模型的线性化系统方程为:
( α ˙ ( t ) q ˙ ( t ) ) = ( − 1.175 0.9871 − 8.458 − 0.8776 ) ( α ( t ) q ( t ) ) + ( − 0.194 − 0.03593 − 19.29 − 3.803 ) ( δ i a i l ( t ) δ i r u d ( t ) ) \begin{pmatrix} \dot{\alpha}(t) \\ \dot{q}(t) \end{pmatrix} = \begin{pmatrix} -1.175&0.9871\\-8.458&-0.8776 \end{pmatrix} \begin{pmatrix} {\alpha}(t) \\ {q}(t) \end{pmatrix}+ \begin{pmatrix} -0.194&-0.03593\\-19.29&-3.803 \end{pmatrix}\begin{pmatrix} {\delta}_i^{\mathbf{ail}}(t) \\ {\delta}_i^{\mathbf{rud}}(t) \end{pmatrix} (α˙(t)q˙(t))=(1.1758.4580.98710.8776)(α(t)q(t))+(0.19419.290.035933.803)(δiail(t)δirud(t))
​ 其中: α ( t ) \alpha(t) α(t):无人机俯仰角; q i ( t ) q_i(t) qi(t):无人机俯仰角速度;

δ a i l ( t ) \delta^{\mathbf{ail}}(t) δail(t):副翼操作指令; δ r u d ( t ) \delta^{\mathbf{rud}}(t) δrud(t):升降舵操作指令;

​ 先有3架无人机,其通信拓扑图如下:

多智能体系统协同控制,集群机器人,稳定性,矩阵

​ 3架无人机的初值为:
( α 1 ( 0 ) q 1 ( 0 ) ) = ( 10 − 3 ) ; ( α 2 ( 0 ) q 2 ( 0 ) ) = ( − 7 2 ) ; ( α 3 ( 0 ) q 3 ( 0 ) ) = ( 4 − 1 ) \begin{pmatrix} {\alpha}_1(0) \\ {q}_1(0) \end{pmatrix}=\begin{pmatrix} 10\\ -3\end{pmatrix}; \begin{pmatrix} {\alpha}_2(0) \\ {q}_2(0) \end{pmatrix}=\begin{pmatrix} -7\\ 2\end{pmatrix}; \begin{pmatrix} {\alpha}_3(0) \\ {q}_3(0) \end{pmatrix}=\begin{pmatrix} 4\\ -1\end{pmatrix} (α1(0)q1(0))=(103);(α2(0)q2(0))=(72);(α3(0)q3(0))=(41)
​ 设计控制策略使3架无人机能完成俯仰角与俯仰角速度上的一致性。

2.2 求解

A = ( − 1.175 0.9871 − 8.458 − 0.8776 ) A=\begin{pmatrix} -1.175&0.9871\\-8.458&-0.8776 \end{pmatrix} A=(1.1758.4580.98710.8776) B = ( − 0.194 − 0.03593 − 19.29 − 3.803 ) B=\begin{pmatrix} -0.194&-0.03593\\-19.29&-3.803 \end{pmatrix} B=(0.19419.290.035933.803),设 R 1 = 50 I 2 R_1=50I_2 R1=50I2 Q 1 = 10 I 2 Q_1=10I_2 Q1=10I2

利用Matlab中的 care求解Riccati方程 P 1 A + A P 1 T + Q 1 − P 1 B R 1 − 1 B T P 1 = 0 P_1A+AP_1^T+Q_1-P_1BR_1^{-1}B^TP_1=\mathbf{0} P1A+AP1T+Q1P1BR11BTP1=0得到:
P 1 = ( 6.1743 − 0.2904 − 0.2904 0.9991 ) = P 1 T > 0 P_1 = \begin{pmatrix} 6.1743&-0.2904\\-0.2904&0.9991 \end{pmatrix} =P_1^T>0 P1=(6.17430.29040.29040.9991)=P1T>0
代码如下:

>> A=[-1.175 0.9871;-8.458 -0.8776];
>> B = [-0.194 -0.03593;-19.29 -3.803];
>> R1 = 50*eye(2);
>> Q1 = 10*eye(2);
>> P1 = care(A,B,Q1,R1)

P1 =

    6.1743   -0.2904
   -0.2904    0.9991

故由定理1.1多智能体系统可以实现一致性。

可以知道在验证线性系统一致性的过程中并没有考虑个体间的通信Laplacian矩阵。这说明同构多智能体线性系统的一致性本质上与其Laplacian矩阵无关!!!

可以得到其Laplacian矩阵为:
L = ( 1 − 1 0 − 1 2 − 1 0 − 1 1 ) L=\begin{pmatrix} 1&-1&0\\-1&2&-1\\0&-1&1 \end{pmatrix} L= 110121011
其中矩阵 K 1 = − R 1 − 1 B T P 1 = ( − 0.0881 0.3843 − 0.0177 0.0758 ) K_1=-R_1^{-1}B^TP_1=\begin{pmatrix} -0.0881 &0.3843\\-0.0177&0.0758\end{pmatrix} K1=R11BTP1=(0.08810.01770.38430.0758) c c c要满足 c ≥ 1 2 min ⁡ i = 2 , . . . N λ i ( L ) = 0.5 c\geq\frac{1}{2\min_{i=2,...N}{\lambda_i(L)}}=0.5 c2mini=2,...Nλi(L)1=0.5,取 c = 0.6 c=0.6 c=0.6。得到控制策略:
u ( t ) = c K 1 ξ ( t ) = ( I 2 ⊗ ( − 0.0529 0.2306 − 0.0106 0.0455 ) ) ξ ( t ) \mathbf{u}(t)=cK_1\mathbf{\xi}(t)=(I_2\otimes\begin{pmatrix} -0.0529 & 0.2306\\-0.0106 &0.0455\end{pmatrix})\mathbf{\xi}(t) u(t)=cK1ξ(t)=(I2(0.05290.01060.23060.0455))ξ(t)
下面用代码验证其可行性:

这里需要将连续系统零阶离散化,因此需要的采样时间很重要,不同采样时间会导致最后结果不收敛:

Δ t = 0.04 s \Delta t=0.04s Δt=0.04s时:

多智能体系统协同控制,集群机器人,稳定性,矩阵

Δ t = 0.06 s \Delta t=0.06s Δt=0.06s时:

多智能体系统协同控制,集群机器人,稳定性,矩阵

可以看到差距甚大,几乎不能用,因此说明了采样时间的重要性。同时也说明了该一致性控制策略有效!文章来源地址https://www.toymoban.com/news/detail-688313.html

3.代码

clc,clear;
A=[-1.175 0.9871;-8.458 -0.8776];
B = [-0.194 -0.03593;-19.29 -3.803];
c = 0.6;
K1 = [-0.0881 0.3843;...
      -0.0177 0.0758]; 
L = [1 -1 0;
    -1 2 -1;
     0 -1 1];
x1 = [10,-3]';x1_array = x1;
x2 = [-7,2]'; x2_array = x2;
x3 = [4,-1]'; x3_array = x3;
x_0 = [x1,x2,x3];
% 设置采样时间
delta_t = 0.04;
% num个时间步长内仿真
num = 100;
x = [x1;x2;x3];
%x_array = zeros(3*2,num);
for k = 1:num
   % 设计总的控制策略
   U = kron(L,c*K1*eye(2))*x;
   u1 = U(1:2);
   u2 = U(3:4);
   u3 = U(5:6);
for i = 1:3 
   x1 = (eye(2) +delta_t*A)*x1 + delta_t*B*u1; 
   x2 = (eye(2) +delta_t*A)*x2 + delta_t*B*u2;
   x3 = (eye(2) +delta_t*A)*x3 + delta_t*B*u3;
end
x = [x1;x2;x3];
x1_array = [x1_array,x1];
x2_array = [x2_array,x2];
x3_array = [x3_array,x3];
end
% 下面开始画图
subplot(121)
hold on;grid on;box on;
plot(delta_t*(1:num),x1_array(1,1:num),'r.-');
plot(delta_t*(1:num),x2_array(1,1:num),'g.-');
plot(delta_t*(1:num),x3_array(1,1:num),'b.-');
xlabel('时间/s');ylabel('俯仰角');
legend('无人机1','无人机2','无人机3');
subplot(122)
hold on;grid on;box on;
plot(delta_t*(1:num),x1_array(2,1:num),'r.-');
plot(delta_t*(1:num),x2_array(2,1:num),'g.-');
plot(delta_t*(1:num),x3_array(2,1:num),'b.-');
xlabel('时间/s');ylabel('俯仰角速度');
legend('无人机1','无人机2','无人机3');

到了这里,关于多智能体集群协同控制笔记(1):线性无领航多智能体系统的一致性的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包