%% Compute Equivalent Lower-Order Model
% Combining state-space models sometimes yields results that include more states than necessary. Use isproper to compute an equivalent lower-order model.

H1 = ss(tf([1 1],[1 2 5]));
H2 = ss(tf([1 7],[1]));
H = H1*H2;
size(H)

%
% H is proper and reducible.  isproper returns the reduced model.

[isprop,Hr] = isproper(H);
size(Hr)

%
% H and Hr are equivalent, as a Bode plot demonstrates.

bodeplot(H,Hr,'r--')
legend('original','reduced')

% Copyright 2015 The MathWorks, Inc.