pid tunning of mimo system
Show older comments
hi guys!
I want to control my robot which has six actuators, but the outputs does not follow the consign.
here's my Shema bloc and the code

s = tf('s') ;p= 500*pi/1.5 ;
R=4 ;L=2.75E-6 ;K= 0.0274 ;J= 3.2284E-6 ;f= 3.5077E-6 ;
x=[1;1;1;1;1;1];
g=(p*K)/(2*pi*((R+L*s)*(f+J*s)+K^2));
H=double((jac_direct(x)))*g*1e-16; %this is my plant
H.InputName = {'u1','u2','u3','u4','u5','u6'};
H.OutputName = 'y';
D = tunableGain('Decoupler',eye(6));
D.u = 'e';D.y = {'p1','p2','p3','p4','p5','p6'};
C1 = tunablePID('C1','pid');
C1.u = 'p1'; C1.y = 'u1';
C2 = tunablePID('C2','pid');
C2.u = 'p2'; C2.y = 'u2';
C3 = tunablePID('C3','pid');
C3.u = 'p3'; C3.y = 'u3';
C4 = tunablePID('C4','pid');
C4.u = 'p4'; C4.y = 'u4';
C5 = tunablePID('C5','pid');
C5.u = 'p5'; C5.y = 'u5';
C6 = tunablePID('C6','pid');
C6.u = 'p6'; C6.y = 'u6';
Sum = sumblk('e = r - y',6);
C0 = connect(C1,C2,C3,C4,C5,C6,D,Sum,{'r','y'},{'u1','u2','u3','u4','u5','u6'});
wc = 0.1;
TK=TuningGoal.Tracking('r','y',0.05);
OS = TuningGoal.Overshoot({'r'},{'y'},5);
[H,C,gam,info] = looptune(H,C0,wc,OS,TK);
T = connect(H,C,'r','y');
t=0:1/100:100;
U1 = 1*(t>=0);
U=[U1' U1' U1' U1' U1' U1'];
Sys=lsim(T,U,t);
figure,plot(Sys)
Answers (1)
Arkadiy Turevskiy
on 7 Oct 2020
0 votes
Please contact tech support for help with troubleshooting. Your code does not run without jac_direct.
Categories
Find more on PID Controller Tuning 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!