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

    %% Improve Worst-Case Perturbation
% Specifying certain options for the structured-singular-value computation
% that underlies the worst-gain computation can yield better results in
% some cases. For example, consider a sample plant and controller.
%%
load(fullfile(matlabroot,'examples','robust','wcgExampleData.mat'))
%%
% This command loads |gPlant|, a MIMO plant with 10 outputs, 8 inputs, and
% 11 uncertain elements. It also loads |Kmu|, a state-space controller
% model. Form a closed-loop system with these models, and examine the
% worst-case gain.
CL = lft(gPlant,Kmu);
[wcg,wcu] = wcgain(CL);
wcg
%%
% There is a large difference between the lower and upper bounds on the
% worst-case gain.  To get a better estimate of the actual worst-case gain,
% increase the number of restarts that |wcgain| uses when the worst-case
% perturbation |wcu| and associated lower bound for the worst-case gain. 
% Doing so can result in a tighter lower bound. This option does not affect
% the upper-bound calculation.
opt = wcOptions('MussvOptions','m3');
[wcg,wcu] = wcgain(CL,opt);
wcg
%%
% The difference between the lower bound and upper bound on the worst-case
% gain is much smaller. The critical frequency is different as well.