how to use h2syn or hinfsyn ?
7 views (last 30 days)
Show older comments
Hello i am new in controls and i want to use robust control command to evaluate uncertainties... i have added uncertainty in my internal model but i am not getting how to use h2syn or hinfsyn command to design control
my code ************************************
%*********** merging of actuating and plant model eq(8)and(9)************
A = [Ac Bc*Ctilta; zeros(14,6) Atilta];
B = [Bc*Dtilta;Btilta];
C = [Cc Dc*Ctilta];
D = 0 ;
%******internal model with uncertainty**********
w = [2*pi*100 2*pi*200];
m = length(w);
Aik = zeros(2,2,m);
Bik = zeros(2,1,m);
Cik = zeros(1,2,m);
for i = 1:m
Aik(:,:,i) = [0 1; -w(i)^2 0];
Bik(:,:,i) = [0 w(i)^2];
Cik(:,:,i) = [1 0];
end
j1 = 2 ;
j1 =ureal('j1',2,'Range',[1.2 2.8]); % uncertainty +- 0.8
elta = [0 j1;0 0];
Aip = zeros(2,2,m);
Aip = Aik + elta ; % adding unceratinty in internal model matrices
Ai = [];
X = [];
for ii = 1:m
if (ii+1 <= m)
if (ii-1)*2 <= 0
Ai = [Ai; X Aip(:,:,ii) Bik(:,:,ii)*Cik(:,:,ii+1) zeros(2,2*m-4-(ii-1)*2)];
elseif (2*m-4-(ii-1)*2) <=0
Ai = [Ai; zeros(2,(ii-1)*2) Aip(:,:,ii) Bik(:,:,ii)*Cik(:,:,ii+1) X];
else
Ai = [Ai; zeros(2,(ii-1)*2) Aip(:,:,ii) Bik(:,:,ii)*Cik(:,:,ii+1) zeros(2*m-4-(ii-1)*2)];
end
else
Ai = [Ai; zeros(2,(ii-1)*2) Aip(:,:,ii)];
end
end
Bi = [zeros(2*m-2,1); Bik(:,:,m)];
Ci = [Cik(:,:,1) zeros(1,2*m-2)];
%************ merging of actauating plant model***********%%%%
Aaug = [A B*Ci;zeros(4,20) Ai];
Baug = [B ; zeros(4,1)];
Caug = [C zeros(1,4)];
Gaug = [Gtilta;zeros(10,1)];
%********************************
i want to use h2syn cor hinfsyn command for this to design control and i have read the details but i am not getting how to use this ..
0 Comments
Answers (0)
See Also
Categories
Find more on Robust Control Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!