AppendConnect - Maple Help

DynamicSystems

 AppendConnect
 create the equivalent system representation of two or more system objects combined by appending their inputs and outputs

 Calling Sequence AppendConnect(systems, indexes, opts)

Parameters

 systems - list(System); list of system objects indexes - (optional) list(set(posint) or 'all' or 'none'); list of sets specifying the indexes of the inputs and outputs from each system object to be kept in the returned system. opts - (optional) equation(s) of the form option = value; specify options for the AppendConnect command

Options

 • outputtype = tf, coeff, zpk, ss, or de
 Specifies the subtype of the returned system object.  The default return type is based on the type of the system objects specified in the systems parameter. See the Description section for more details on the return type.
 • merge = keep, evaluate, or replace
 Specifies how parameters from different systems are merged. The default is keep.
 – keep: keep the original parameters. The value for a parameter is the value assigned by the first system that defines it.
 – evaluate: replace all parameters in the systems with their assigned values.
 – replace: replace each parameter in a system with a distinct parameter created by appending an index from the param_indices options. For example, the parameter $P$ of the first system becomes ${P}_{1}$.
 • indices = list
 Used when merge is replace. The k-th element of the list is appended, as an index, to each parameter name of the k-th system. The number of elements must match the number of systems. The default is the positive integers, with 1 corresponding to the first subsystem.

Description

 • The AppendConnect command creates the equivalent system representation of two or more system objects appended such that each system object's inputs and outputs are exposed directly to the outside world.
 • The systems are appended in the order specified. The returned system has a number of inputs equal to the sum of all system object inputs, and a number of outputs equal to the sum of all system object outputs, unless index sets are specified.
 • If index sets are provided, specific inputs and outputs of each system are selected for the returned system. For n system objects, 2n index sets can be provided. The first pair of sets in the specified list are the inputs and outputs of the first system, in that order. The same rule applies for subsequent set pairs, i.e. [{inputs sys 1}, {outputs sys 1}, {inputs sys 2}, {outputs sys 2}, ..., {inputs sys n}, {outputs sys n}].
 • The system objects must be either all continuous or all discrete with the same sampling times.
 • The returned system type is the same as the input system type, unless the outputtype option is used, or the input is an ae system type.
 • In the specific case when the system parameter is an algebraic equation (ae) and no option is specified, the AppendConnect command returns a system object in state space form by default. If the algebraic equation system does not have a state space representation, an error is returned. For details on algebraic equation object support by the DynamicSystems package, see DynamicSystems[AlgEquation].

Examples

 > $\mathrm{with}\left(\mathrm{DynamicSystems}\right):$

Example 1: Append 2 SISO systems

 > $n≔2:$$m≔1:$$p≔1:$
 > $\mathrm{sys1}≔\mathrm{StateSpace}\left('\mathrm{usesymbols}','\mathrm{numinputs}'=m,'\mathrm{numoutputs}'=p,'\mathrm{numstates}'=n\right):$
 > $\mathrm{sys2}≔\mathrm{StateSpace}\left('\mathrm{symbols}'=\left[e,f,g,h\right],'\mathrm{usesymbols}','\mathrm{numinputs}'=m,'\mathrm{numoutputs}'=p,'\mathrm{numstates}'=n\right):$
 > $\mathrm{append1}≔\mathrm{AppendConnect}\left(\left[\mathrm{sys1},\mathrm{sys2}\right]\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{append1}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{2 output\left(s\right); 2 input\left(s\right); 4 state\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({t}\right){,}{\mathrm{u2}}{}\left({t}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y1}}{}\left({t}\right){,}{\mathrm{y2}}{}\left({t}\right)\right]\\ {\mathrm{statevariable}}{=}\left[{\mathrm{x1}}{}\left({t}\right){,}{\mathrm{x2}}{}\left({t}\right){,}{\mathrm{x3}}{}\left({t}\right){,}{\mathrm{x4}}{}\left({t}\right)\right]\\ {\mathrm{a}}{=}\left[\begin{array}{cccc}{{a}}_{{1}{,}{1}}& {{a}}_{{1}{,}{2}}& {0}& {0}\\ {{a}}_{{2}{,}{1}}& {{a}}_{{2}{,}{2}}& {0}& {0}\\ {0}& {0}& {{e}}_{{1}{,}{1}}& {{e}}_{{1}{,}{2}}\\ {0}& {0}& {{e}}_{{2}{,}{1}}& {{e}}_{{2}{,}{2}}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{cc}{{b}}_{{1}{,}{1}}& {0}\\ {{b}}_{{2}{,}{1}}& {0}\\ {0}& {{f}}_{{1}{,}{1}}\\ {0}& {{f}}_{{2}{,}{1}}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{cccc}{{c}}_{{1}{,}{1}}& {{c}}_{{1}{,}{2}}& {0}& {0}\\ {0}& {0}& {{g}}_{{1}{,}{1}}& {{g}}_{{1}{,}{2}}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{cc}{{d}}_{{1}{,}{1}}& {0}\\ {0}& {{h}}_{{1}{,}{1}}\end{array}\right]\end{array}\right$ (1)

Example 2: Append 2 MIMO systems with select inputs and outputs

 > $\mathrm{sys1b}≔\mathrm{StateSpace}\left('\mathrm{symbols}'=\left[i,j,k,l\right],'\mathrm{usesymbols}','\mathrm{numinputs}'=m,'\mathrm{numoutputs}'=p+1,'\mathrm{numstates}'=n\right):$
 > $\mathrm{sys2b}≔\mathrm{StateSpace}\left('\mathrm{symbols}'=\left[q,r,s,t\right],'\mathrm{usesymbols}','\mathrm{numinputs}'=m+1,'\mathrm{numoutputs}'=p,'\mathrm{numstates}'=n\right):$
 > $\mathrm{append2}≔\mathrm{AppendConnect}\left(\left[\mathrm{sys1b},\mathrm{sys2b}\right],\left[\left\{1\right\},\left\{2\right\},\left\{2\right\},\left\{1\right\}\right]\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{append2}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{2 output\left(s\right); 2 input\left(s\right); 4 state\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({t}\right){,}{\mathrm{u2}}{}\left({t}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y1}}{}\left({t}\right){,}{\mathrm{y2}}{}\left({t}\right)\right]\\ {\mathrm{statevariable}}{=}\left[{\mathrm{x1}}{}\left({t}\right){,}{\mathrm{x2}}{}\left({t}\right){,}{\mathrm{x3}}{}\left({t}\right){,}{\mathrm{x4}}{}\left({t}\right)\right]\\ {\mathrm{a}}{=}\left[\begin{array}{cccc}{{i}}_{{1}{,}{1}}& {{i}}_{{1}{,}{2}}& {0}& {0}\\ {{i}}_{{2}{,}{1}}& {{i}}_{{2}{,}{2}}& {0}& {0}\\ {0}& {0}& {{q}}_{{1}{,}{1}}& {{q}}_{{1}{,}{2}}\\ {0}& {0}& {{q}}_{{2}{,}{1}}& {{q}}_{{2}{,}{2}}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{cc}{{j}}_{{1}{,}{1}}& {0}\\ {{j}}_{{2}{,}{1}}& {0}\\ {0}& {{r}}_{{1}{,}{2}}\\ {0}& {{r}}_{{2}{,}{2}}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{cccc}{{k}}_{{2}{,}{1}}& {{k}}_{{2}{,}{2}}& {0}& {0}\\ {0}& {0}& {{s}}_{{1}{,}{1}}& {{s}}_{{1}{,}{2}}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{cc}{{l}}_{{2}{,}{1}}& {0}\\ {0}& {{t}}_{{1}{,}{2}}\end{array}\right]\end{array}\right$ (2)

Example 3: Append 3 MIMO systems with select inputs and outputs and differential equation output

 > $\mathrm{append3}≔\mathrm{AppendConnect}\left(\left[\mathrm{sys1b},\mathrm{sys2b},\mathrm{sys1b}\right],\left[\mathrm{all},\left\{1\right\},\left\{2\right\},\mathrm{all},\left\{1\right\},\left\{1\right\}\right],\mathrm{outputtype}=\mathrm{de}\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{append3}\right)$
 $\left[\begin{array}{l}{\mathbf{Diff. Equation}}\\ {\mathrm{continuous}}\\ {\mathrm{3 output\left(s\right); 3 input\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({t}\right){,}{\mathrm{u2}}{}\left({t}\right){,}{\mathrm{u3}}{}\left({t}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y1}}{}\left({t}\right){,}{\mathrm{y2}}{}\left({t}\right){,}{\mathrm{y3}}{}\left({t}\right)\right]\\ {\mathrm{de}}{=}{{}\begin{array}{l}{[}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{x1}}{}\left({t}\right){=}{{i}}_{{1}{,}{1}}{}{\mathrm{x1}}{}\left({t}\right){+}{{i}}_{{1}{,}{2}}{}{\mathrm{x2}}{}\left({t}\right){+}{{j}}_{{1}{,}{1}}{}{\mathrm{u1}}{}\left({t}\right){,}\\ {}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{x2}}{}\left({t}\right){=}{{i}}_{{2}{,}{1}}{}{\mathrm{x1}}{}\left({t}\right){+}{{i}}_{{2}{,}{2}}{}{\mathrm{x2}}{}\left({t}\right){+}{{j}}_{{2}{,}{1}}{}{\mathrm{u1}}{}\left({t}\right){,}\\ {}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{x3}}{}\left({t}\right){=}{{q}}_{{1}{,}{1}}{}{\mathrm{x3}}{}\left({t}\right){+}{{q}}_{{1}{,}{2}}{}{\mathrm{x4}}{}\left({t}\right){+}{{r}}_{{1}{,}{2}}{}{\mathrm{u2}}{}\left({t}\right){,}\\ {}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{x4}}{}\left({t}\right){=}{{q}}_{{2}{,}{1}}{}{\mathrm{x3}}{}\left({t}\right){+}{{q}}_{{2}{,}{2}}{}{\mathrm{x4}}{}\left({t}\right){+}{{r}}_{{2}{,}{2}}{}{\mathrm{u2}}{}\left({t}\right){,}\\ {}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{x5}}{}\left({t}\right){=}{{i}}_{{1}{,}{1}}{}{\mathrm{x5}}{}\left({t}\right){+}{{i}}_{{1}{,}{2}}{}{\mathrm{x6}}{}\left({t}\right){+}{{j}}_{{1}{,}{1}}{}{\mathrm{u3}}{}\left({t}\right){,}\\ {}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{x6}}{}\left({t}\right){=}{{i}}_{{2}{,}{1}}{}{\mathrm{x5}}{}\left({t}\right){+}{{i}}_{{2}{,}{2}}{}{\mathrm{x6}}{}\left({t}\right){+}{{j}}_{{2}{,}{1}}{}{\mathrm{u3}}{}\left({t}\right){,}\\ {}{\mathrm{y1}}{}\left({t}\right){=}{{k}}_{{1}{,}{1}}{}{\mathrm{x1}}{}\left({t}\right){+}{{k}}_{{1}{,}{2}}{}{\mathrm{x2}}{}\left({t}\right){+}{{l}}_{{1}{,}{1}}{}{\mathrm{u1}}{}\left({t}\right){,}\\ {}{\mathrm{y2}}{}\left({t}\right){=}{{s}}_{{1}{,}{1}}{}{\mathrm{x3}}{}\left({t}\right){+}{{s}}_{{1}{,}{2}}{}{\mathrm{x4}}{}\left({t}\right){+}{{t}}_{{1}{,}{2}}{}{\mathrm{u2}}{}\left({t}\right){,}\\ {}{\mathrm{y3}}{}\left({t}\right){=}{{k}}_{{1}{,}{1}}{}{\mathrm{x5}}{}\left({t}\right){+}{{k}}_{{1}{,}{2}}{}{\mathrm{x6}}{}\left({t}\right){+}{{l}}_{{1}{,}{1}}{}{\mathrm{u3}}{}\left({t}\right){]}\end{array}\end{array}\right$ (3)

Example 4: Append 4 systems. Extract 2nd input of 2nd system.

 > $\mathrm{append4}≔\mathrm{AppendConnect}\left(\left[\mathrm{sys1b},\mathrm{sys2b},\mathrm{sys1},\mathrm{sys2}\right],\left[\mathrm{all},\mathrm{all},\left\{2\right\}\right]\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{append4}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{5 output\left(s\right); 4 input\left(s\right); 8 state\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({t}\right){,}{\mathrm{u2}}{}\left({t}\right){,}{\mathrm{u3}}{}\left({t}\right){,}{\mathrm{u4}}{}\left({t}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y1}}{}\left({t}\right){,}{\mathrm{y2}}{}\left({t}\right){,}{\mathrm{y3}}{}\left({t}\right){,}{\mathrm{y4}}{}\left({t}\right){,}{\mathrm{y5}}{}\left({t}\right)\right]\\ {\mathrm{statevariable}}{=}\left[{\mathrm{x1}}{}\left({t}\right){,}{\mathrm{x2}}{}\left({t}\right){,}{\mathrm{x3}}{}\left({t}\right){,}{\mathrm{x4}}{}\left({t}\right){,}{\mathrm{x5}}{}\left({t}\right){,}{\mathrm{x6}}{}\left({t}\right){,}{\mathrm{x7}}{}\left({t}\right){,}{\mathrm{x8}}{}\left({t}\right)\right]\\ {\mathrm{a}}{=}\left[\begin{array}{cccccccc}{{i}}_{{1}{,}{1}}& {{i}}_{{1}{,}{2}}& {0}& {0}& {0}& {0}& {0}& {0}\\ {{i}}_{{2}{,}{1}}& {{i}}_{{2}{,}{2}}& {0}& {0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {{q}}_{{1}{,}{1}}& {{q}}_{{1}{,}{2}}& {0}& {0}& {0}& {0}\\ {0}& {0}& {{q}}_{{2}{,}{1}}& {{q}}_{{2}{,}{2}}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}& {{a}}_{{1}{,}{1}}& {{a}}_{{1}{,}{2}}& {0}& {0}\\ {0}& {0}& {0}& {0}& {{a}}_{{2}{,}{1}}& {{a}}_{{2}{,}{2}}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}& {0}& {{e}}_{{1}{,}{1}}& {{e}}_{{1}{,}{2}}\\ {0}& {0}& {0}& {0}& {0}& {0}& {{e}}_{{2}{,}{1}}& {{e}}_{{2}{,}{2}}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{cccc}{{j}}_{{1}{,}{1}}& {0}& {0}& {0}\\ {{j}}_{{2}{,}{1}}& {0}& {0}& {0}\\ {0}& {{r}}_{{1}{,}{2}}& {0}& {0}\\ {0}& {{r}}_{{2}{,}{2}}& {0}& {0}\\ {0}& {0}& {{b}}_{{1}{,}{1}}& {0}\\ {0}& {0}& {{b}}_{{2}{,}{1}}& {0}\\ {0}& {0}& {0}& {{f}}_{{1}{,}{1}}\\ {0}& {0}& {0}& {{f}}_{{2}{,}{1}}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{cccccccc}{{k}}_{{1}{,}{1}}& {{k}}_{{1}{,}{2}}& {0}& {0}& {0}& {0}& {0}& {0}\\ {{k}}_{{2}{,}{1}}& {{k}}_{{2}{,}{2}}& {0}& {0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {{s}}_{{1}{,}{1}}& {{s}}_{{1}{,}{2}}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}& {{c}}_{{1}{,}{1}}& {{c}}_{{1}{,}{2}}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}& {0}& {{g}}_{{1}{,}{1}}& {{g}}_{{1}{,}{2}}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{cccc}{{l}}_{{1}{,}{1}}& {0}& {0}& {0}\\ {{l}}_{{2}{,}{1}}& {0}& {0}& {0}\\ {0}& {{t}}_{{1}{,}{2}}& {0}& {0}\\ {0}& {0}& {{d}}_{{1}{,}{1}}& {0}\\ {0}& {0}& {0}& {{h}}_{{1}{,}{1}}\end{array}\right]\end{array}\right$ (4)

Compatibility

 • The DynamicSystems[AppendConnect] command was introduced in Maple 18.