⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch6_1a.m

📁 《MATLAB7.0控制系统应用实例》 作者:刘叔军
💻 M
字号:
% Create the uncertain reak parameters m1, m2 & k
m1 = ureal('m1',1,'percent',20); 
m2 = ureal('m2',1,'percent',20);
k  = ureal('k',1,'percent',20);

s = zpk('s'); % create the Laplace variable s
G1 = ss(1/s^2)/m1; % Cart 1
G2 = ss(1/s^2)/m2; % Cart 2

% Now build F and P
F = [0;G1]*[1 -1]+[1;-1]*[0,G2]; 
P = lft(F,k) % close the loop with the spring k


zpk(P.nominal)

figure,
C=100*ss((s+1)/(.001*s+1))^3; % LTI controller
T=feedback(P*C,1); % closed-loop uncertain system 
step(usample(T,5),.1);


T=feedback(P*C,1); % closed-loop uncertain system 
figure,

[StabilityMargin,Udestab,REPORT] = robuststab(T)



[PeakGain,Uwc] = wcgain(T);
Twc=usubs(T,Uwc);        % Worst case closed-loop system T
Trand=usample(T,4);      % 4 random samples of uncertain system T
bodemag(Twc,'r',Trand,'b-.',{.5,50}); % Do bode plot
legend('T_{wc}   - worst-case','T_{rand} - random samples',3);







⌨️ 快捷键说明

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