www.gusucode.com > control 案例程序 matlab源码代码 > control/CheckSectorBoundsExample.m
%% Check Sector Bounds % Test whether, on average, the I/O trajectories of $G\left( s \right) = % \left( {s + 2} \right)/\left( {s + 1} \right)$ belong within the % sector defined by: % % $$ S = \left\{ {\left( {y,u} \right):0.1{u^2} < uy < 10{u^2}} \right\}. $$ %% % In U/Y space, this sector is the shaded region of the following diagram. %% % % <<../sector_diagram1.png>> % %% % The |Q| matrix corresponding to this sector is given by: % % $$ Q = \left[ {\begin{array}{*{20}{c}} % 1&{ - {{\left( {a + b} \right)} \mathord{\left/ % {\vphantom {{\left( {a + b} \right)} 2}} \right. % \kern-\nulldelimiterspace} 2}}\\ % { - {{\left( {a + b} \right)} \mathord{\left/ % {\vphantom {{\left( {a + b} \right)} 2}} \right. % \kern-\nulldelimiterspace} 2}}&{ab} % \end{array}} \right];\quad a = 0.1,\;b = 10. $$ % %% % A trajectory $y\left( t \right) = G{\kern 1pt} u\left( t \right)$ lies % within the sector _S_ when for all _T_ > 0, % % $$0.1\int_0^T {u{{\left( t \right)}^2} < } \;\;\int_0^T {u\left( t % \right)y\left( t \right)dt < } \;\;10\int_0^T {u{{\left( t \right)}^2}dt} % .$$ %% % To check whether trajectories of |G| satisfy the sector bound, % represented by |Q|, compute the _R_-index for |H = [G;1]|. G = tf([1 2],[1 1]); a = 0.1; b = 10; Q = [1 -(a+b)/2 ; -(a+b)/2 a*b]; R = getSectorIndex([G;1],Q) %% % This resulting |R| is less than 1, indicating that the trajectories % fit within the sector. The value of |R| tells you how much % tightly the trajectories fit in the sector. This value, |R| = 0.41, means % that the trajectories would fit in a narrower sector with a base 1/0.41 = % 2.4 times smaller.