Chapter 3 Building System Connections
© National Instruments Corporation 3-5 Xmath Control Design Module
By default, feedback is defined to be negative.
The number of outputs from the first system must equal the number of
inputs to the second system.
The number of outputs from the second system must equal the number
of inputs in the first.
Both systems must have the same sample rate.
Improper dynamic systems (systems with more zeros than poles) are
not allowed.
When only one system is specified, it must be square (it must have an
equal number of inputs and outputs).
Example 3-1 Using afeedback( ) to Connect Two Systems
Sys1 = system([.5,1;0,2],[1,0]',[0,1],0);
Sys2 = system([1,-.2;1,0],[1,0]',[1,1],0);
saf = afeedback(Sys1,Sys2);
Algorithm
If only one system input (Sys1) is provided to afeedback( ), the second
input (Sys2) defaults to a zero-state system with unity gain. This is
analogous to a state-space system with NULL values for the A, B, and C
matrices, and with an identity matrix for D. Notice that you use the Xmath
definition of a non-square identity matrix. In this case, the row dimension
of D equals the number of inputs to Sys1, and the column dimension equals
the number of outputs of Sys1. In the following discussion, you denote the
state-space matrices of Sys1 by A1, B1, C1, and D1, and you follow the same
convention for Sys2.
The two systems are first internally converted to a state-space form, if
necessary, and subdivided into the A, B, C, and D state-space matrices.
Scaling matrices S1 and S2 are computed for Sys1 and Sys2 as follows:
S1 = I + D1D2
S2 = I + D2D1
Additionally, you define:
B1s = B1/S2 and D1s = D1/S2
B2s = B2/S1 and D2s = D2/S1
Matrix right-division problems must be well-posed, with the scaling
matrices S1 and S2 nonsingular. afeedback( ) displays an error message