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

    %% Step Disturbance Rejection with Custom Reference Model
% Create a requirement that specifies the step disturbance response as a
% transfer function.
%%
% Suppose you want the response to a disturbance injected at an analysis
% point |d| in your control system and measured at a point |'y'| to be
% rejected at least as well as the transfer function
%%
% $$H\left( s \right) = \frac{s}{{{s^2} + 2s + 1}}.$$
% 
%%
% Create a |TuningGoal.StepRejection| requirement.
H = tf([1 0],[1 2 1]);
Req = TuningGoal.StepRejection('d','y',H);
%%
% Display the requirement.
viewSpec(Req)
%%
% The plot displayed by |viewSpec| shows the step response of the specified
% transfer function.  This response is the target time-domain response to
% disturbance.