📄 t21comp.m
字号:
%------------------------------------------------------------------
% This program is used to compare the step responses of Close Loop System
% by Zero-pole placement method, Inner-model method and Z-N method etc.
% NOTE: The 'iden_c21i.m' must be executed first to produce K,T,tao3.
%------------------------------------------------------------------
Ts=150;
figure(4);
clf;
xlabel('t'); ylabel('y'); Title('The Step Response of Close Loop System');
hold on
%(1)Zero-pole placement method with 't21b.mdl'
Kp=0.3776;
Ti=1.9833;
Td=0.4859;
[t,xx,yy]=sim('t21b',Ts);
plot(t,yy);
%(2)Inner-model method to solve the step response with 't21c.mdl'
lemda=8;
Kp=b1/(2*lemda*K);
Ti=b1/b0;
Td=b2/b1;
Lf=lemda/2;
[t,xx,yy]=sim('t21c',Ts);
plot(t,yy);
%(3)Z-N method with 't21d.mdl'
Ao=1.2; Bo=1; Co=2; Do=1; Eo=0.5; Fo=1;
Kp=(Ao*(T/tao3)^Bo)/K;
Ti=T*Co*(tao3/T)^Do;
Td=T*Eo*(tao3/T)^Fo;
[t,xx,yy]=sim('t21d',Ts);
plot(t,yy);
%(4)Cohen-Coon method with 't21d.mdl'
Kp=(1.35*T/tao3+0.27)/K;
Ti=(2.5*T*tao3+0.5*tao3^2)/(T+0.6*tao3);
Td=0.37*T*tao3/(T+0.2*tao3);
[t,xx,yy]=sim('t21d',Ts);
plot(t,yy);
%(5)IAE method with 't21d.mdl'
Ao=1.435; Bo=0.921; Co=1.139; Do=0.749; Eo=0.282; Fo=1.137;
Kp=(Ao*(T/tao3)^Bo)/K;
Ti=T*Co*(tao3/T)^Do;
Td=T*Eo*(tao3/T)^Fo;
[t,xx,yy]=sim('t21d',Ts);
plot(t,yy);
%(6)ISE method with 't21d.mdl'
Ao=1.495; Bo=0.945; Co=0.917; Do=0.771; Eo=0.360; Fo=1.006;
Kp=(Ao*(T/tao3)^Bo)/K;
Ti=T*Co*(tao3/T)^Do;
Td=T*Eo*(tao3/T)^Fo;
[t,xx,yy]=sim('t21d',Ts);
plot(t,yy);
%(7)ITAE method with 't21d.mdl'
Ao=1.557; Bo=0.947; Co=0.6; Do=0.738; Eo=0.21; Fo=0.995;
Kp=(Ao*(T/tao3)^Bo)/K;
Ti=T*Co*(tao3/T)^Do;
Td=T*Eo*(tao3/T)^Fo;
[t,xx,yy]=sim('t21d',Ts);
plot(t,yy);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -