%% Scalar Dynamic System Constraint
% Consider a standard single-loop feedback connection of controller C and an uncertain plant P, described by the equations e = r-y; u = Ce; f = d+u; y = Pf.
%

P = tf([1],[1 0]); 
C = tf([2*.707*1 1^2],[1 0]); 
A = [1 -1 0 0 0 -1;0 -C 1 0 0 0;0 0 -1 -1 1 0;0 0 0 0 -P 1]; 
OutputIndex = [6;3;2;5];  % [y;u;e;f] 
InputIndex = [1;4];       % [r;d] 
Sys = imp2exp(A,OutputIndex,InputIndex); 
Sys.InputName = {'r';'d'}; 
Sys.OutputName = {'y';'u';'e';'f'};

%

pole(Sys)

%

stepplot(Sys)

% Copyright 2015 The MathWorks, Inc.