%% Passivity Requirement
% Create a requirement that ensures passivity in the response from an input or analysis point 'u' to an output or analysis point 'y' in a control system.

TG = TuningGoal.Passivity('u','y');

%
% Use viewGoal to visualize the tuning goal.

viewGoal(TG)

% The requirement is satisfied when the relative passivity index R < 1 at all frequencies. The shaded area represents the region where the requirement is violated. When you use this requirement to tune a control system CL, viewGoal(TG,CL) shows R for the specified inputs and outputs on this plot, enabling you to identify frequency ranges in which the passivity requirement is violated.
%
% Copyright 2012 The MathWorks, Inc.