资源简介
基于事件触发的多智能体系统的编队控制。事件触发可以解决芝诺效应
代码片段和文件信息
clc;clear;close;
%TN=30; N=30; step=TN/N; M = 5;
%----定义步长与迭代区间----连续系统step<<1越小越好----离散系统setp=1----M表示节点个数
TN=3; N=6000; step=TN/N; M = 5;
T=[step:step:TN];
%---控制增益--------------------------------
c=0.05;
%-----------------------------------
Xk=zeros(3MN);
e = zeros(M3);
Xleft=zeros(3M);
Coupling=zeros(3M);cd=zeros(3M);
x1=zeros(MN); x2=zeros(MN);x3=zeros(MN);
e1=zeros(MN); e2=zeros(MN);e3=zeros(MN);
up_instant = zeros(M1);
up_instant_logic = zeros(M1);
up_instants1 = [1];
up_instants2 = [1];
up_instants3 = [1];
up_instants4 = [1];
up_instants5 = [1];
Xleft(1:)=[0 1 1 0 0];
Xleft(2:)=[0 0 1 1 0];
Xleft(3:)=[0 0 0 0 1];
D= [0 1 1 0 1
1 0 0 1 1
1 0 0 1 1
0 1 1 0 1
1 1 1 1 0 ]
v=ones(1M);
L=diag(v0);
d= 0.5*[2 2 4 4 3 ;
2 4 2 4 3 ;
2 2 2 2 4 ];
%负的拉普拉斯矩阵
for i=1:M
L(ii)=-sum(D(i:));
end
DD=L+D
for j=1:N
for i=1:M
up_instant(i)=1;
Xk(:ij)=Xleft(:i);
for s=1:M
Coupling(:i)=Coupling(:i)+c*DD(is)*(Xleft(:s)-Xleft(:i));
cd(:i)= cd(:i)+c*DD(is)*d(:s);
end
e(i:) = Xleft(:i)-Xk(:iup_instant(i));
if (norm(e(i:)))^2<=100*norm(Coupling(:i)-cd(:i))^2;
up_instant_logic(i) = 1;
Xleft(:i)=Xleft(:i)+(Coupling(:i)-cd(:i))*step;
end
% if norm(e(i:))<=0.2*exp(Coupling(:i)-e(i:)*cd(:i))+0.65;
% up_instant_logic(i) = 1;
% Xleft(:i)=Xleft(:i)+(Coupling(:i)-cd(:i))*step;
% end
if up_instant_logic(1) == 1
up_instant(1) = j;
up_instants1 = [up_instants1;j];
end
if up_instant_logic(2) == 1
up_instant(2) = j;
up_instants2 = [up_instants2;j];
end
if up_instant_logic(3) == 1
up_instant(3) = j;
up_instants3 = [up_instants3;j];
end
if up_instant_logic(4) == 1
up_instant(4) = j;
up_instants4 = [up_instants4;j];
end
if up_instant_logic(5) == 1
up_instant(5) = j;
up_instants5 = [up_instants5;j];
end
up_instant_logic = zeros(M1);
x1(ij)=Xk(1ij);
x2(ij)=Xk(2ij);
x3(ij)=Xk(3ij);
Coupling(:i)=0;
cd(:i)= 0;
end
end
for i=1:1:M
figure(1)
subplot(311);
plot(Tx1(i:)‘.‘‘color‘[rand rand rand]‘markersize‘4);hold on;
xlabel(‘k‘);ylabel(‘x‘);
subplot(312)
plot(Tx2(i:)‘.‘‘color‘[rand rand rand]‘markersize‘4);hold on;
xlabel(‘K‘);ylabel(‘y‘);
subplot(313)
plot(Tx3(i:)‘.‘‘color‘[rand rand rand]‘markersize‘4);hold on;
xlabel(‘k‘);ylabel(‘z‘);
end
for i=1:1:M-1
- 上一篇:帧内预测matlab程序
- 下一篇:IEC 闪变检测法的simuli
nk实现
相关资源
- 编队控制仿真程序
- 多机器人系统的群集编队控制.rar
- 多智能体系统含time delay的仿真1
- 机器人编队控制和避障
- 多智能体系统一致性程序
- 多智能体一阶二阶一致性 matlab 仿真
- 多智能体系统仿真的代码。
- 多智能体一阶二阶一致性matlab仿真
- 多智能体的编队控制程序.rar
- 多智能体一致性 matlab 仿真.zip
- 多智能体最优一致性避障算法Matlab仿
- 多智能体的编队控制程序的补充(之
- 多智能体的编队控制matlab程序(自己
- matlab仿真的脉冲时滞分数阶多智能体
- 多智能体蜂拥控制
- 多智能体一致性实现算法
- multi-agent 多智能体算法带时延的一致
- agent-concensus 多智能体编队一致性研究
- mas-missle
- A-Multi-UAV-Simulation-for-Formation 对无人机
- Multi-Agent-Particle-Swarm-Algorithm 结合多智
- l_f 领航跟随法的实现
- Multi-agent-formation 可以实现多智能体编
- 2dflocking 在没有虚拟领导者的情况下能
- MATLAB 多智能体系统简单的一致性仿真
- multi-agent-system 使用MATLAB对多智能体实
- multiagent_formation_control 很好的多智能体
评论
共有 条评论