Preventing State Duplication in System Interconnections
This example shows guidelines for building minimum-order models of LTI system interconnections.
You can connect LTI models using the operators
[;] and the commands
lft. To prevent duplication of some of the dynamics and ensure that the resulting model has minimal order, it is important that you follow some simple rules:
Convert all models to the state-space representation before connecting them
Respect the block diagram structure
Avoid closed-form expressions and transfer function algebra.
As an illustration, this example compares two ways to compute a state-space model for the following block diagram
G = [1 , tf(1,[1 0]) , 5]; Fa = tf([1 1] , [1 2 5]); Fb = tf([1 2] , [1 3 7]);
The best way to connect these three blocks is to convert them to state space and treat the block diagram as a series connection of
H1 = [ss(Fa) ; Fb] * G;
To find the order of
ans = 5
The order 5 is minimal. Note that because SS has higher precedence than TF, it is enough to convert one of the blocks to state-space (the remaining conversions take place automatically).
Observe that the overall transfer function is
Therefore, you can also connect the three blocks and compute
H by typing
H2 = ss([Fa * G ; Fb * G]);
Verify that the frequency responses of
H2 is a valid model, its order is 14, almost three times higher than that of
ans = 14
H2 has higher order because:
Gappears twice in this expression
The dynamics of
Fbget replicated three time when evaluating
The state-space conversion is performed on a 2x3 MIMO transfer matrix with four entries of order 2 and two entries of order 3, yielding a total order of 14.
Using a closed-form expression for the overall transfer function is a bad idea in general as it will typically inflate the order and introduce lots of cancelling pole/zero dynamics.
When connecting LTI models, avoid introducing duplicate dynamics by staying away from closed-form expressions, working with the state-space representation, and breaking block diagrams down to elementary series, parallel, and feedback connections. When in doubt, use the function
connect which automatically converts all models to state space and is guaranteed to produce minimal realizations of block diagrams.