【一致性仿真】Consensus Control of Leader-Following Multi-Agent Systems in Directed Topology With ...

  1. 文章链接:Consensus Control of Leader-Following Multi-Agent Systems in Directed Topology With Heterogeneous Disturbances
  2. 仿真遇到的问题:论文里能用的公式数据等都用了,仿真结果差别还是很大,有仿真出来的大佬帮忙指点一下。
  3. 仿真代码
    Fig3&4
% Consensus Control of Leader-Following Multi-Agent Systems in Directed Topology With Heterogeneous Disturbances
% author:JCGUY
% date:2022-05-11
clear
clc

%% System Description
% System matrices

% A = [0  1  1
%      1  2  1
%     -2 -6 -3];
% B = [0  1
%     -1  0
%      0  0];

A = [ 0 -1 5;
      0  0 0;
      0 -1 0];
B = [ 3 0; 
      0 2;
      1 2];
L = [2 0 -2 0;
    -6 6  0 0;
     0 0 1.95 -1.95;
     0 -2.1 0 2.1];
D=[1 0 0 0;
   0 1 0 0;
   0 0 0 0;
   0 0 0 0];
P=[ 3.1790 1.2601 1.2263;
    1.2601 3.8669 -0.9512;
    1.2263 -0.9512 3.8621];
K=[ -10.7633 -2.8291 -7.5050;
    -4.9728 -5.8314 -5.7498];
F=[ 140.5774 59.4488 109.3712;
     59.4488 42.0090 54.7618;
    109.3712 54.7618 89.3852 ];

Abar = [0  0   2  0;
        6  0   0  0;
        0  0   0  1.95;
        0  2.1 0  0];

%% Initial States
% Real states
x0(:,1) = [0.5,1.0,1.5]';
x1(:,1) = [2.0,2.5,3.0]';
x2(:,1) = [3.5,2.5,1.0]';
x3(:,1) = [2.0,2.0,1.0]';
x4(:,1) = [1.2,2.0,1.5]';

%% Time Parameters
tBegin = 0;
tFinal = 20;
dT = 0.001;
times = (tFinal-tBegin)/dT;
t(:,1) = 0;
g=0.3;
%% Iteration
for ti = 1:times
    % Record time
    t(:,ti+1) = t(:,ti) + dT;
    % Leader states
    dx0 = A*x0(:,ti)+
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值