Mu Analysis and Synthesis Toolbox | ![]() ![]() |
Form linear interconnections of CONSTANT and SYSTEM matrices (or CONSTANT and VARYING matrices)
Syntax
Description
µ-Tools provides a simple linear system interconnection program called sysic
. It forms linear interconnections of CONSTANT and SYSTEM matrices (or CONSTANT and VARYING matrices, though this can require a lot of memory), by writing the loop equations of the interconnection.
Using sysic
involves setting up several variables in the MATLAB workspace, and then running the M-file sysic
. The variables that are defined delineate the details of the interconnection.
Variable Descriptions
A list and description of the variables required by sysic
follow:
systemnames.
This variable is a character string, which contains the names of the matrices used in the interconnection. The names must be separated by spaces and/or tabs, and there should be no additional punctuation. Each named system must exist in the MATLAB workspace at the time the program sysic
is run. The SYSTEM matrices names used within the sysic
program are limited to 10 characters. This limitation is due to the MATLAB 19 character limitation on the workspace variable names. That is, a SYSTEM matrix named andygaryjohnkeithroy
would be invalid.
inputvar.
This variable is a character string, with names of the various external inputs that are present in the final interconnection. The input names are separated by semicolons, and the entire list of input names is enclosed in square brackets [ ]. Inputs can be multivariable signals; for instance a windgust input, with three directions (x, y, and z) that can be specified by using windgust{3}
. This means that there is a three variable input to the interconnection called windgust
. Alternatively, this could be specified as three separate, scalar inputs, say wingustx
, windgusty
, and windgustz
. The order that the input names appear in the variable inputvar
is the order that the inputs will be placed in the interconnection.
outputvar.
This variable is a character string, describing the outputs of the interconnection, which must be linear combinations of the subsystem outputs and the external inputs. Semicolons are used to separate the channels of the output variables. Between semicolons, signals can be added and subtracted, and multiplied by scalars. For multivariable subsystems, arguments within parentheses specify which subsystem outputs are to be used and in what order. For instance plant (2:5,8,1,9:11)
specifies outputs 2,3,4,5,8,1,9,10,11
from the system plant. If no arguments are specified with a system, then it is assumed that all outputs are being used, and in the order they appear in that system.
input_to_sys.
Each subsystem named in the variable systemnames
must have a variable set to define the inputs to the subsystem. If the system name is controller
, then the variable that must be set should be called input_to_controller
. It is specified in the same manner that the variable outputvar
is set, with inputs consisting of linear combinations of subsystem outputs and external inputs. Separate channels are separated by semicolons, and the order of the inputs in the variable should match the order of the inputs in the system itself.
sysoutname.
This character string variable is optional. If it exists in the MATLAB workspace when sysic
is run, then the interconnection that is created by running sysic
is placed in a MATLAB variable whose name is given by the string in sysoutname. If this variable does not exist in the workspace, then the interconnection is automatically placed in the variable ic_ms
.
cleanupsysic.
After running sysic
, all of the above variables, which describe the interconnection, are left in the workspace. These will be automatically cleared if the optional variable cleanupsysic
is set to the character string yes. The default value of the variable is 'no'
which does not result in any of the sysic
descriptions you defined to be cleared. The MATLAB matrices listed in the variable systemnames
are never automatically cleared.
Running sysic
If the variables systemnames
, inputvar
, and outputvar
are set, and for each name name_i
appearing in systemnames, the variable input_to_name_i
is set, then the interconnection is created by running the M-file sysic
. Depending on the existence/nonexistence of the variable sysoutname
, the resulting interconnection is stored in your specified MATLAB variable, or the default MATLAB variable ic_ms
.
Within sysic
, a series of error-checking routines monitor the consistency and availability of system matrices and their inputs. These routines provide a basic level of error detection to aid you in debugging. The input/output dimensions of the final interconnection are defined by inputvar
and outputvar
variables.
The syntax of sysic
is limited, and for the most part is restricted to what is shown here. Some additional features are illustrated in the more complicated demonstration problems. Note that you must keep track of input/output variables defined for the final interconnection structure.
Examples
The HIMAT example provides another example of how to construct interconnection systems from block diagram descriptions. The interconnection diagram below corresponds to the HIMAT design example.
Given that there are four SYSTEM matrices, named himat
, wdel
, wp
, and k
, in the MATLAB workspace, each with two inputs, and two outputs. The following 10 lines form the sysic
commands to make the interconnection structure shown below, which is placed in the variable clp
. You can execute these at the command line (as shown) or type them into an M-file. (Note that to run this example you must create the variables himat
, wdel
, wp
and k
.)
systemnames = ' himat wdel wpk
'; inputvar = '[ pertin{2};dis{2}]'; outputvar = '[ wdel ;wp ]'; input_to_himat = '[k
+ pertin ]'; input_to_wp = '[ dist + himat ]'; input_to_wdel = '[k
]'; input_to_k = '[ -dist - himat ]'; sysoutname = 'clp'; cleanupsysic
= 'yes';sysic
;The final interconnection structure is located in clp with two sets of inputs,
pertin
anddist
, and two sets of outputs w and e, corresponding to the perturbation and error outputs.
See Also
abv
, madd
, daug
, mmult
, sbs
, sel
, starp
![]() | sysbal, hankmr | szeros | ![]() |