論文模擬-不確定時變時滯自適應全域性魯棒滑模控制

2020-10-14 13:01:04

新增連結描述
Example1:求解時滯上界
LMI求解線性矩陣不等式
% Parameters of Robust Adaptive Control with Delays
clear
clc

% Plant
A = [0,1,0;0,0,1;-1,-1,1];
Ad = [0,0.5,0;0,0,0.5;0.5,0.5,0.5];
B = [1 1 2]’;
h1 = 0.3;

%% Find h2
% initials
Ac = A - B*K;
step = 1e-2;
tmin = -5;
h2 = h1;
% LMI solution
while (tmin < 0)
h2 = h2 + step;

setlmis([])
% lmi variables
P = lmivar(1,[3 1]);
Q1 = lmivar(1,[3 1]);
Q2 = lmivar(1,[3 1]);
R1 = lmivar(1,[3 1]);
R2 = lmivar(1,[3 1]);
M1 = lmivar(2,[3 3]);
M2 = lmivar(2,[3 3]);
N1 = lmivar(2,[3 3]);
N2 = lmivar(2,[3 3]);

% lmi #1 left
lmiterm([1 1 1 P],1,Ac,'s')
lmiterm([1 1 1 Q1],1,1)
lmiterm([1 1 1 Q2],1,1)
lmiterm([1 1 1 R1],-1,1)
lmiterm([1 1 1 R1],h1^2*Ac',Ac)

lmiterm([1 1 2 P],1,Ad)
lmiterm([1 1 2 M1],-1,1)
lmiterm([1 1 2 N1],1,1)
lmiterm([1 1 2 R1],h1^2*Ac',Ad)

lmiterm([1 1 3 M1],1,1)
lmiterm([1 1 3 R1],1,1)

lmiterm([1 1 4 N1],-1,1)

lmiterm([1 1 5 0],0)

lmiterm([1 2 2 M2],-1,1,'s')
lmiterm([1 2 2 N2],1,1,'s')
lmiterm([1 2 2 R1],h1^2*Ad',Ad)

lmiterm([1 2 3 M2],1,1)

lmiterm([1 2 4 N2],-1,1)

lmiterm([1 2 5 0],0)

lmiterm([1 3 3 Q1],-1,1)
lmiterm([1 3 3 R1],-1,1)

lmiterm([1 4 4 Q2],-1,1)

lmiterm([1 5 5 0],0)
% lmi #1 right
lmiterm([-1 1 1 R2],-(h2-h1)*Ac',Ac)

lmiterm([-1 1 2 R2],-(h2-h1)*Ac',Ad)

lmiterm([-1 1 5 M1],(h2-h1),1)

lmiterm([-1 2 2 R2],-(h2-h1)*Ad',Ad)

lmiterm([-1 2 5 M2],(h2-h1),1)

lmiterm([-1 5 5 R2],(h2-h1),1)

% lmi #2 left
lmiterm([2 1 1 P],1,Ac,'s')
lmiterm([2 1 1 Q1],1,1)
lmiterm([2 1 1 Q2],1,1)
lmiterm([2 1 1 R1],-1,1)
lmiterm([2 1 1 R1],h1^2*Ac',Ac)

lmiterm([2 1 2 P],1,Ad)
lmiterm([2 1 2 M1],-1,1)
lmiterm([2 1 2 N1],1,1)
lmiterm([2 1 2 R1],h1^2*Ac',Ad)

lmiterm([2 1 3 M1],1,1)
lmiterm([2 1 3 R1],1,1)

lmiterm([2 1 4 N1],-1,1)

lmiterm([2 1 5 0],0)

lmiterm([2 2 2 M2],-1,1,'s')
lmiterm([2 2 2 N2],1,1,'s')
lmiterm([2 2 2 R1],h1^2*Ad',Ad)

lmiterm([2 2 3 M2],1,1)

lmiterm([2 2 4 N2],-1,1)

lmiterm([2 2 5 0],0)

lmiterm([2 3 3 Q1],-1,1)
lmiterm([2 3 3 R1],-1,1)

lmiterm([2 4 4 Q2],-1,1)

lmiterm([2 5 5 0],0)
% lmi #2 right
lmiterm([-2 1 1 R2],-(h2-h1)*Ac',Ac)

lmiterm([-2 1 2 R2],-(h2-h1)*Ac',Ad)

lmiterm([-2 1 5 N1],(h2-h1),1)

lmiterm([-2 2 2 R2],-(h2-h1)*Ad',Ad)

lmiterm([-2 2 5 N2],(h2-h1),1)

lmiterm([-2 5 5 R2],(h2-h1),1)
% lmi end
lmisys = getlmis;

% Solve LMI
[tmin,~] = feasp(lmisys);

end
h2 = h2 - step;
disp([‘The largest h2 found is ‘,num2str(h2),’ based on the current step: ‘,num2str(step),’.’])
執行結果:
在這裡插入圖片描述