%% 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.

viewGoal(Req)

% The plot displayed by viewGoal shows the step response of the specified transfer function. This response is the target time-domain response to disturbance.
% Copyright 2012 The MathWorks, Inc.