robot_robust.m

来自「其中提到遺傳學的程式碼與應用提供給次淚相向的研究者參考下載」· M 代码 · 共 34 行

M
34
字号
% robot_robust.m
% Check robustness of NC under parameter variations
%   of plant. robot2_arm.mdl is used for simulation.
% Chou, PenChen, 2004-1-12

% Normal case
MDL='robot2_arm';
figure(3); 
K=10; a=2;
[t,x,y]=sim(MDL,[0:0.05:FT]);
subplot(221);plot(t,[y(:,2) y(:,3)]);grid
title(['I/O with K=' num2str(K) ';a=' num2str(a)]);
axis([0 FT -2 2])
% Parameter variations
K=11; a=1;
[t,x,y]=sim(MDL,[0:0.05:FT]);
subplot(222);plot(t,[y(:,2) y(:,3)]);grid
title(['I/O with K=' num2str(K) ';a=' num2str(a)]);
axis([0 FT -2 2])

K=11; a=4;
[t,x,y]=sim(MDL,[0:0.05:FT]);
subplot(223);plot(t,[y(:,2) y(:,3)]);grid
title(['I/O with K=' num2str(K) ';a=' num2str(a)]);
axis([0 FT -2 2])

K=10; a=0.5;
[t,x,y]=sim(MDL,[0:0.05:FT]);
subplot(224);plot(t,[y(:,2) y(:,3)]);grid
title(['I/O with K=' num2str(K) ';a=' num2str(a)]);
xlabel('Time (sec.)');
axis([0 FT -2 2])

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?