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

    %% Constrain Input and Output Trajectories to Conic Sector
% Consider the following control system. 
% 
% <<../tg_conicsector1.png>>
% 
%
% Suppose that the signal _u_ is marked as an analysis point in a Simulink
% model or |genss| model of the control system. Suppose also that _G_ is the
% closed-loop transfer function from _u_ to _y_. Create a tuning goal that
% constrains all I/O trajectories {u(t),y(t)} of _G_ to satisfy:
%  
% $$\int_0^T {{{\left( {\begin{array}{*{20}{c}}
% {y\left( t \right)}\\
% {u\left( t \right)}
% \end{array}} \right)}^T}Q\;\left( {\begin{array}{*{20}{c}}
% {y\left( t \right)}\\
% {u\left( t \right)}
% \end{array}} \right)dt}  < 0,$$
%
% for all $T \ge 0$. For this example, use sector matrix that imposes input
% passivity with index 0.5.
nu = 0.5;
Q = [0 -1;-1 2*nu];
%%
% Constraining the I/O trajectories of _G_ is equivalent to restricting the
% output trajectories $z \left( t \right)$ of $H = \left[ {G;I} \right]$
% to the sector defined by:
%
% $$\int_0^T {z{{\left( t \right)}^T}Q\;z\left( t \right)dt}  < 0.$$
%
% (See <docid:control_ug.bu85j5c> for more details about this equivalence.)
% To specify this constraint, create a tuning goal that constrains the
% transfer function $H = \left[ {G;I} \right]$, which the transfer function
% from input $u$ to outputs $\{ y;u\}$.
TG = TuningGoal.ConicSector('u',{'y';'u'},Q);
%%
% When you specify the same signal |'u'| as both input and output, the
% conic sector tuning goal sets the corresponding transfer function to the
% identity. Therefore, the transfer function constrained by |TG| is $H =
% \left[ {G;I} \right]$ as intended. This treatment is specific to the
% conic sector tuning goal. For other tuning goals, when the same signal
% appears in both inputs and outputs, the resulting transfer function is
% zero in the absence of feedback loops, or the complementary
% sensitivity at that location otherwise. This result occurs because when
% the software processes analysis points, it assumes the input is injected
% after the output.  See <docid:control_ug.bt_yuz4> for more information
% about how analysis points work.