User`s guide

Table Of Contents
connect
11-34
11connect
Purpose Derive state-space model from block diagram description
Syntax sysc = connect(sys,Q,inputs,outputs)
Description Complex dynamical systems are often given in block diagram form. For
systems of even moderate complexity, it can be quite difficult to find the
state-space model required in order to bring certain analysis and design tools
into use. Starting with a block diagram description, you can use
append and
connect to construct a state-space model of the system.
First, use
sys = append(sys1,sys2,...,sysN)
to specify each block sysj in the diagram and form a block-diagonal,
unconnected LTI model
sys of the diagram.
Next, use
sysc = connect(sys,Q,inputs,outputs)
to connect the blocks together and derive a state-space model sysc for the
overall interconnection. The arguments
Q, inputs,andoutputs have the
following purpose:
The matrix
Q indicates h ow the blocks on the diagram are connected. It has
a row for each input of
sys, where the first element of each row is the input
number. The subsequent elementsof each row specify where the block input
gets its s umming inputs; negative elements indicate minus inputs to the
summingjunction. For example, if input 7 gets its inputs from the outputs2,
15, and 6, where the input from output 15 is negative, the correspondingrow
of
Q is [7 2 –15 6]. Short rows can be padded with trailing zeros (see
example below).
Given
sys and Q, connect computes a s tate-space model of the
interconnection wit h the same inputs and outputs as
sys (that is, the
concatenation of all block inputs and outputs). The index vectors
inputs and
outputs then indicate which of t he inputs and outputs in the large
unconnected system are external inputs and outputs of the block diagram.
For e xample, if the external inputs are inputs 1, 2, and 1 5 of
sys,andthe