📄 simu.m
字号:
%仿真子程序
%仿真(Hoo控制器)
closedlp;
[pa,pb,pc,pd]=unpck(Psys);
[ka,kb,kc,kd]=unpck(K);
[da,db,dc,dd]=unpck(sel(Clsys,1,1));
[ua,ub,uc,ud]=unpck(sel(Clsys,2,1));
%干扰响应
t=[0:0.0001:0.1]; %X加分号
[y,x,t]=step(da,db,dc,dd,1,t);
[u,x,t]=step(ua,ub,uc,ud,1,t);
figure(3)
subplot(2,1,1)
plot(t,y)
axis([0 0.1 0 16])
xlabel('Time[s]')
ylabel('Amplitude')
title('Step disturbance response')
grid on;
%控制输入
subplot(2,1,2)
figure(4)
plot(t,u)
axis([0 0.01 -1.7 0]) %X此处有所改动,加方括号
xlabel('Time[s]')
ylabel('u[V]')
title('input')
grid on
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -