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

    %% Normalized Coprime Stability Margin
% Consider an unstable first-order plant, |p|, stabilized
% by high-gain and low-gain controllers, |cL| and |cH|.
%%
p = tf(4,[1 -0.001]); 	
cL = 1;				
cH = 10;			
%%
% Compute the stability margin of the closed-loop system with the low-gain controller.
[margL,~] = ncfmargin(p,cL)
%%
% Similarly, compute the stability margin of the closed-loop system with
% the high-gain controller.
[margH,~] = ncfmargin(p,cH)
%%
% The closed-loop systems with low-gain and high-gain controllers have
% normalized coprime stability margins of about 0.71 and 0.1, respectively.
% This result indicates that the closed-loop system with low-gain
% controller is more robust to unstructured perturbations than the system
% with the high-gain controller.
%
% To observe this difference in robustness, construct an uncertain plant,
% |punc|, that has an additional 11% unmodeled dynamics
% compared to the nominal plant.
punc = p + ultidyn('uncstruc',[1 1],'Bound',0.11); 
%%
% Calculate the robust stability of the closed-loop systems formed by the
% uncertain plant and each controller.
[stabmargL,~] = robstab(feedback(punc,cL))
%%
[stabmargH,~] = robstab(feedback(punc,cH))
%%
% As expected, the robust stability analysis shows that the closed-loop
% system with low-gain controller is more robustly stable in the presence
% of the unmodeled LTI dynamics. In fact, this closed-loop system can
% tolerate 909% (or 9.09*11%) of the unmodeled dynamics. In contrast,
% closed-loop system with the high-gain controller is not robustly stable.
% That closed-loop system can only tolerate 90.9% (or 0.909*11%) of the
% unmodeled dynamics.