文章链接:Group-Bipartite Consensus in the Networks With Cooperative-Competitive Interactions
仿真图Fig3:
MATLAB代码
% Group-Bipartite Consensus in the Networks With Cooperative-Competitive Interactions
% Protocol Simulation Results
% author: JCGUY
% date: 2022-04-15
% 一阶 分组 二部 一致性
clear;
clc;
%%
%状态初始值如下,十个智能体
X(:,1)= [ 1 -2 3 1.5 4 6 -3.5 -4 5 -1 -3]';
U(:,1) = [0,0,0,0,0,0,0,0,0,0,0]';
%a图的度矩阵D、邻接矩阵H、拉普拉斯矩阵H
A = [ 0 -1 0 0 0 0 0 0 0 0 0;
0 0 -1 0 0 0 0 0 0 0 0;
1 0 0 0 0 0 0 0 0 0 0;
1 0 -1 0 0 -1 0 0 0 0 0;
0 1 1 1 0 0 0 0 0 0 0;
0 0 0 0 0 0 1 0 0 0 0;
0 0 0 0 -1 0 0 0 0 0