www.gusucode.com > robust 案例源码程序 matlab代码 > robust/SystemWithUncertainParametersExample.m

    %% System with Uncertain Parameters
% 
%% Build Plant Model

% Copyright 2015 The MathWorks, Inc.

m1 = ureal('m1',1,'percent',20);
m2 = ureal('m2',1,'percent',20);
k  = ureal('k',1,'percent',20);

s = zpk('s');
G1 = ss(1/s^2)/m1;
G2 = ss(1/s^2)/m2;


F = [0;G1]*[1 -1]+[1;-1]*[0,G2];
P = lft(F,k);

%% Obtain Nominal Plant
zpk(P.nominal)

%% Plot Monte Carlo Samples
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);