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

    %% Weighted Passivity and Input Passivity
% Create a tuning goal that enforces the passivity of the transfer
% function:
% 
% $$H\left( s \right) = \left[ {\begin{array}{*{20}{c}}
% 1&0\\
% 0&{10}
% \end{array}} \right]T\left( s \right)\left( {\frac{1}{s}} \right),$$
% 
% where $T\left( s \right)$ is the transfer function from an input |'d'| to
% outputs |['y';'z']| in a control system model.
%%
WL = tf(1,[1 0]);
WR = diag([1 10]);
TG = TuningGoal.WeightedPassivity('d',{'y','z'},WL,WR);
%%
% Use |TG| with |systune| to enforce that weighted passivity requirement.
%%
% Suppose that instead of enforcing overall passivity of the weighted
% transfer function _H_, you want to ensure that _H_ is input strictly
% passive with an input feedforward passivity index of at least 0.1.  To do
% so, set the |IPX| property of |TG|.
TG.IPX = 0.1;