www.gusucode.com > control 案例程序 matlab源码代码 > control/RelativeInputAndOutputPassivityIndicesExample.m
%% Relative, Input, and Output Passivity Indices % Compute passivity indices for the following dynamic % system: % % $$ G(s) = \frac{s^2 + s + 5s + 0.1}{s^3 + 2s^2+ 3s + 4} $$ % %% G = tf([1,1,5,.1],[1,2,3,4]); %% % Compute the relative passivity index. R = getPassiveIndex(G) %% % The system is passive, but with a relatively small excess of passivity. %% % Compute the input and output passivity indices. nu = getPassiveIndex(G,'input') rho = getPassiveIndex(G,'output') %% % This system is both input strictly passive and output strictly passive. %% % Compute the combined I/O passivity index. tau = getPassiveIndex(G,'io') %% % The system is very strictly passive as well. A system that is very % strictly passive is also strictly positive real. Examining the Nyquist % plot confirms this, showing that the frequency response lies entirely % within the right half-plane. nyquistplot(G) %% % The relatively small |tau| value is reflected in how close the frequency % response comes to the imaginary axis.