www.gusucode.com > control 案例程序 matlab源码代码 > control/MIMOMarginRequirementInFrequencyBandExample.m

    %% MIMO Margin Requirement in Frequency Band  
% Create a requirement that sets minimum gain and phase margins for the
% loop defined by three loop-opening locations in a control system to tune.
% Because this loop is defined by three loop-opening locations, it is a
% MIMO loop. 
%
% The requirement sets a minimum gain margin of 10 dB and a minimum phase
% margin of 40 degrees, within the band between 0.1 and 10 rad/s.   

%%  
Req = TuningGoal.Margins({'r','theta','phi'},10,40); 

%%
% The names |'r'|, |'theta'|, and |'phi'| must specify valid loop-opening
% locations in the control system that you are tuning.  

%% 
% Limit the requirement to the frequency band between 0.1 and 10 rad/s. 
 Req.Focus = [0.1 10];