6.1.1 Connecting in Series
SeriesConnect finds the description of an aggregate system composed of two subsystems connected in series, as shown in Figure 6.1. The aggregate has inputs of system , outputs of system , and states of both systems, Note that not all outputs of the first system should necessarily be connected to inputs of the second system.
Figure 6.1. Series interconnection.
Series connection of two systems.
Load the application.
Here are two systems in state-space form.
This connects the systems in series.
The result is, of course, the familiar StateSpace object.
Now the second output of the first system is connected to the first input of the second system. Another output and input remain loose.
Now all the outputs and inputs are connected again, but this time in the reverse order.
Here is an integrator given in transfer function form.
This attaches the integrator to the first output of system ss1. Notice that SeriesConnect returns the result in state-space form as soon as one of the input systems is given in that form.
Here both input systems are in transfer function form, and so is the result.
This is a slightly more complicated connection—the integrator is connected to the third output of the transfer function system tf.
SeriesConnect can cascade only two systems. However, the Mathematica language makes extensions to any number of systems fairly straightforward.
Here is a function that connects any number of matching subsystems in series.
Using the new function, this command cascades a set of four abstract systems. Notice that the aggregate remains partially unevaluated until the systems are specified.
This built-in function reveals the structure of the cascade.
We prepare a set of first-order systems with simple poles to be used instead of the abstract systems.
Now the cascade can be found in closed form. The cascade is shown in Figure 6.2.
Figure 6.2. Cascade of first-order systems.