%% Constrain Weighted Gain of Closed-Loop System
% Create a tuning goal requirement that constrains the gain of a closed-loop SISO system from its input, r, to its output, y. Weight the gain at its input by a factor of 10 and at its output by the frequency-dependent weight 1/(s + 0.01).

WL = tf(1,[1 0.01]);
WR = 10;
Req = TuningGoal.WeightedGain('r','y',WL,WR);

% You can use the requirement Req with systune to tune the free parameters of any control system model that has an input signal named 'r' and an output signal named 'y'.
% You can then use viewGoal to validate the tuned control system against the requirement.
% Copyright 2012 The MathWorks, Inc.