buildssic [control]
— Function File: buildssic (clst, ulst, olst, ilst, s1, s2, s3, s4, s5, s6, s7, s8)

Form an arbitrary complex (open or closed loop) system in state-space form from several systems. buildssic can easily (despite its cryptic syntax) integrate transfer functions from a complex block diagram into a single system with one call. This function is especially useful for building open loop interconnections for H-infinity and H-2 designs or for closing loops with these controllers.

Although this function is general purpose, the use of sysgroup sysmult, sysconnect and the like is recommended for standard operations since they can handle mixed discrete and continuous systems and also the names of inputs, outputs, and states.

The parameters consist of 4 lists that describe the connections outputs and inputs and up to 8 systems s1s8. Format of the lists:

clst
connection list, describes the input signal of each system. The maximum number of rows of Clst is equal to the sum of all inputs of s1-s8.

Example: [1 2 -1; 2 1 0] means that: new input 1 is old input 1 + output 2 - output 1, and new input 2 is old input 2 + output 1. The order of rows is arbitrary.

ulst
if not empty the old inputs in vector ulst will be appended to the outputs. You need this if you want to “pull out” the input of a system. Elements are input numbers of s1s8.
olst
output list, specifies the outputs of the resulting systems. Elements are output numbers of s1s8. The numbers are allowed to be negative and may appear in any order. An empty matrix means all outputs.
ilst
input list, specifies the inputs of the resulting systems. Elements are input numbers of s1s8. The numbers are allowed to be negative and may appear in any order. An empty matrix means all inputs.

Example: Very simple closed loop system.

          w        e  +-----+   u  +-----+
          --->o--*-->|  K  |--*-->|  G  |--*---> y
          ^  |   +-----+  |   +-----+  |
          - |  |            |            |
          |  |            +----------------> u
          |  |                         |
          |  +-------------------------|---> e
          |                            |
          +----------------------------+

The closed loop system GW can be obtained by

          GW = buildssic([1 2; 2 -1], 2, [1 2 3], 2, G, K);
clst
1st row: connect input 1 (G) with output 2 (K).

2nd row: connect input 2 (K) with negative output 1 (G).

ulst
Append input of 2 (K) to the number of outputs.
olst
Outputs are output of 1 (G), 2 (K) and appended output 3 (from ulst).
ilst
The only input is 2 (K).

Here is a real example:

          +----+
          -------------------->| W1 |---> v1
          z   |                    +----+
          ----|-------------+
          |             |
          |    +---+    v      +----+
          *--->| G |--->O--*-->| W2 |---> v2
          |    +---+       |   +----+
          |                |
          |                v
          u                  y
          min || GW   ||
          vz   infty

The closed loop system GW from [z, u]' to [v1, v2, y]' can be obtained by (all SISO systems):

          GW = buildssic([1, 4; 2, 4; 3, 1], 3, [2, 3, 5],
          [3, 4], G, W1, W2, One);

where “One” is a unity gain (auxiliary) function with order 0. (e.g. One = ugain(1);)