DynamicSystems - Maple Programming Help

Home : Support : Online Help : Science and Engineering : Dynamic Systems : System Manipulation Tools : DynamicSystems/Subsystem

DynamicSystems

 Subsystem
 extract the subsystem from a system by specifying a set of inputs, outputs, and/or states

 Calling Sequence Subsystem(system, opts) Subsystem(system, inputs, opts) Subsystem(system, inputs, outputs, opts) Subsystem(system, inputs, outputs, states, opts)

Parameters

 system - System; system object inputs - set(posint), all, none; set of indexes of selected inputs to extract from system (the default is all) outputs - set(posint), all, none; set of indexes of selected outputs to extract from system (the default is all) states - set(posint), all, none; set of indexes of selected states to extract from system (the default is all) opts - (optional) equation(s) of the form option = value; specify options for the Subsystem 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.

Description

 • The Subsystem command extracts a subsystem from a system object given a set of selected inputs, outputs and/or states. The input, output, and state variables in the new subsystem are chosen based on the index of their corresponding sets as they appear in the original system object.
 • 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 Subsystem 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):$

Define a state-space system with n states, m inputs, and p outputs.

 > $n≔6:$$m≔4:$$p≔3:$
 > $\mathrm{A1}≔\mathrm{Matrix}\left(n,n,\mathrm{symbol}=a\right):$
 > $\mathrm{B1}≔\mathrm{Matrix}\left(n,m,\mathrm{symbol}=b\right):$
 > $\mathrm{C1}≔\mathrm{Matrix}\left(p,n,\mathrm{symbol}=c\right):$
 > $\mathrm{D1}≔\mathrm{Matrix}\left(p,m,\mathrm{symbol}=d\right):$
 > $\mathrm{sys}≔\mathrm{StateSpace}\left(\mathrm{A1},\mathrm{B1},\mathrm{C1},\mathrm{D1}\right):$$\mathrm{PrintSystem}\left(\mathrm{sys}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{3 output\left(s\right); 4 input\left(s\right); 6 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)\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)\right]\\ {\mathrm{a}}{=}\left[\begin{array}{cccccc}{{a}}_{{1}{,}{1}}& {{a}}_{{1}{,}{2}}& {{a}}_{{1}{,}{3}}& {{a}}_{{1}{,}{4}}& {{a}}_{{1}{,}{5}}& {{a}}_{{1}{,}{6}}\\ {{a}}_{{2}{,}{1}}& {{a}}_{{2}{,}{2}}& {{a}}_{{2}{,}{3}}& {{a}}_{{2}{,}{4}}& {{a}}_{{2}{,}{5}}& {{a}}_{{2}{,}{6}}\\ {{a}}_{{3}{,}{1}}& {{a}}_{{3}{,}{2}}& {{a}}_{{3}{,}{3}}& {{a}}_{{3}{,}{4}}& {{a}}_{{3}{,}{5}}& {{a}}_{{3}{,}{6}}\\ {{a}}_{{4}{,}{1}}& {{a}}_{{4}{,}{2}}& {{a}}_{{4}{,}{3}}& {{a}}_{{4}{,}{4}}& {{a}}_{{4}{,}{5}}& {{a}}_{{4}{,}{6}}\\ {{a}}_{{5}{,}{1}}& {{a}}_{{5}{,}{2}}& {{a}}_{{5}{,}{3}}& {{a}}_{{5}{,}{4}}& {{a}}_{{5}{,}{5}}& {{a}}_{{5}{,}{6}}\\ {{a}}_{{6}{,}{1}}& {{a}}_{{6}{,}{2}}& {{a}}_{{6}{,}{3}}& {{a}}_{{6}{,}{4}}& {{a}}_{{6}{,}{5}}& {{a}}_{{6}{,}{6}}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{cccc}{{b}}_{{1}{,}{1}}& {{b}}_{{1}{,}{2}}& {{b}}_{{1}{,}{3}}& {{b}}_{{1}{,}{4}}\\ {{b}}_{{2}{,}{1}}& {{b}}_{{2}{,}{2}}& {{b}}_{{2}{,}{3}}& {{b}}_{{2}{,}{4}}\\ {{b}}_{{3}{,}{1}}& {{b}}_{{3}{,}{2}}& {{b}}_{{3}{,}{3}}& {{b}}_{{3}{,}{4}}\\ {{b}}_{{4}{,}{1}}& {{b}}_{{4}{,}{2}}& {{b}}_{{4}{,}{3}}& {{b}}_{{4}{,}{4}}\\ {{b}}_{{5}{,}{1}}& {{b}}_{{5}{,}{2}}& {{b}}_{{5}{,}{3}}& {{b}}_{{5}{,}{4}}\\ {{b}}_{{6}{,}{1}}& {{b}}_{{6}{,}{2}}& {{b}}_{{6}{,}{3}}& {{b}}_{{6}{,}{4}}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{cccccc}{{c}}_{{1}{,}{1}}& {{c}}_{{1}{,}{2}}& {{c}}_{{1}{,}{3}}& {{c}}_{{1}{,}{4}}& {{c}}_{{1}{,}{5}}& {{c}}_{{1}{,}{6}}\\ {{c}}_{{2}{,}{1}}& {{c}}_{{2}{,}{2}}& {{c}}_{{2}{,}{3}}& {{c}}_{{2}{,}{4}}& {{c}}_{{2}{,}{5}}& {{c}}_{{2}{,}{6}}\\ {{c}}_{{3}{,}{1}}& {{c}}_{{3}{,}{2}}& {{c}}_{{3}{,}{3}}& {{c}}_{{3}{,}{4}}& {{c}}_{{3}{,}{5}}& {{c}}_{{3}{,}{6}}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{cccc}{{d}}_{{1}{,}{1}}& {{d}}_{{1}{,}{2}}& {{d}}_{{1}{,}{3}}& {{d}}_{{1}{,}{4}}\\ {{d}}_{{2}{,}{1}}& {{d}}_{{2}{,}{2}}& {{d}}_{{2}{,}{3}}& {{d}}_{{2}{,}{4}}\\ {{d}}_{{3}{,}{1}}& {{d}}_{{3}{,}{2}}& {{d}}_{{3}{,}{3}}& {{d}}_{{3}{,}{4}}\end{array}\right]\end{array}\right$ (1)

Extract a subsystem with three inputs (u1(t), u2(t), and u4(t)), one output (y2(t)), and three states (x1(t), x3(t), and x6(t)).

 > $\mathrm{ex_in}≔\left\{1,2,4\right\}:$
 > $\mathrm{ex_out}≔\left\{2\right\}:$
 > $\mathrm{ex_states}≔\left\{1,3,6\right\}:$
 > $\mathrm{subsys}≔\mathrm{Subsystem}\left(\mathrm{sys},\mathrm{ex_in},\mathrm{ex_out},\mathrm{ex_states}\right):$$\mathrm{PrintSystem}\left(\mathrm{subsys}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{1 output\left(s\right); 3 input\left(s\right); 3 state\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({t}\right){,}{\mathrm{u2}}{}\left({t}\right){,}{\mathrm{u4}}{}\left({t}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y2}}{}\left({t}\right)\right]\\ {\mathrm{statevariable}}{=}\left[{\mathrm{x1}}{}\left({t}\right){,}{\mathrm{x3}}{}\left({t}\right){,}{\mathrm{x6}}{}\left({t}\right)\right]\\ {\mathrm{a}}{=}\left[\begin{array}{ccc}{{a}}_{{1}{,}{1}}& {{a}}_{{1}{,}{3}}& {{a}}_{{1}{,}{6}}\\ {{a}}_{{3}{,}{1}}& {{a}}_{{3}{,}{3}}& {{a}}_{{3}{,}{6}}\\ {{a}}_{{6}{,}{1}}& {{a}}_{{6}{,}{3}}& {{a}}_{{6}{,}{6}}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{ccc}{{b}}_{{1}{,}{1}}& {{b}}_{{1}{,}{2}}& {{b}}_{{1}{,}{4}}\\ {{b}}_{{3}{,}{1}}& {{b}}_{{3}{,}{2}}& {{b}}_{{3}{,}{4}}\\ {{b}}_{{6}{,}{1}}& {{b}}_{{6}{,}{2}}& {{b}}_{{6}{,}{4}}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{ccc}{{c}}_{{2}{,}{1}}& {{c}}_{{2}{,}{3}}& {{c}}_{{2}{,}{6}}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{ccc}{{d}}_{{2}{,}{1}}& {{d}}_{{2}{,}{2}}& {{d}}_{{2}{,}{4}}\end{array}\right]\end{array}\right$ (2)

Extract a subsystem in differential equation form  with all of the inputs, two outputs (y1(t) and y2(t)), and the first state.

 > $\mathrm{allinputs}≔\mathrm{Subsystem}\left(\mathrm{sys},\mathrm{all},\left\{1,2\right\},\left\{1\right\},\mathrm{outputtype}=\mathrm{de}\right):$$\mathrm{PrintSystem}\left(\mathrm{allinputs}\right)$
 $\left[\begin{array}{l}{\mathbf{Diff. Equation}}\\ {\mathrm{continuous}}\\ {\mathrm{2 output\left(s\right); 4 input\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)\right]\\ {\mathrm{de}}{=}{{}\begin{array}{l}{[}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\mathrm{x1}}{}\left({t}\right){=}{{a}}_{{1}{,}{1}}{}{\mathrm{x1}}{}\left({t}\right){+}{{b}}_{{1}{,}{1}}{}{\mathrm{u1}}{}\left({t}\right){+}{{b}}_{{1}{,}{2}}{}{\mathrm{u2}}{}\left({t}\right){+}{{b}}_{{1}{,}{3}}{}{\mathrm{u3}}{}\left({t}\right){+}{{b}}_{{1}{,}{4}}{}{\mathrm{u4}}{}\left({t}\right){,}\\ {}{\mathrm{y1}}{}\left({t}\right){=}{{c}}_{{1}{,}{1}}{}{\mathrm{x1}}{}\left({t}\right){+}{{d}}_{{1}{,}{1}}{}{\mathrm{u1}}{}\left({t}\right){+}{{d}}_{{1}{,}{2}}{}{\mathrm{u2}}{}\left({t}\right){+}{{d}}_{{1}{,}{3}}{}{\mathrm{u3}}{}\left({t}\right){+}{{d}}_{{1}{,}{4}}{}{\mathrm{u4}}{}\left({t}\right){,}\\ {}{\mathrm{y2}}{}\left({t}\right){=}{{c}}_{{2}{,}{1}}{}{\mathrm{x1}}{}\left({t}\right){+}{{d}}_{{2}{,}{1}}{}{\mathrm{u1}}{}\left({t}\right){+}{{d}}_{{2}{,}{2}}{}{\mathrm{u2}}{}\left({t}\right){+}{{d}}_{{2}{,}{3}}{}{\mathrm{u3}}{}\left({t}\right){+}{{d}}_{{2}{,}{4}}{}{\mathrm{u4}}{}\left({t}\right){]}\end{array}\end{array}\right$ (3)

Extract a subsystem with  three inputs (u1(t), u2(t), and u4(t)), output y2(t), and no states.

 > $\mathrm{nostates}≔\mathrm{Subsystem}\left(\mathrm{sys},\mathrm{ex_in},\mathrm{ex_out},\mathrm{none}\right):$$\mathrm{PrintSystem}\left(\mathrm{nostates}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{1 output\left(s\right); 3 input\left(s\right); 0 state\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({t}\right){,}{\mathrm{u2}}{}\left({t}\right){,}{\mathrm{u4}}{}\left({t}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y2}}{}\left({t}\right)\right]\\ {\mathrm{statevariable}}{=}\left[\right]\\ {\mathrm{a}}{=}\left[\begin{array}{}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{ccc}{{d}}_{{2}{,}{1}}& {{d}}_{{2}{,}{2}}& {{d}}_{{2}{,}{4}}\end{array}\right]\end{array}\right$ (4)

When the inputs, outputs, and states arguments are omitted, the Subsystem command returns the original system.

 > $\mathrm{dsubsys1}≔\mathrm{Subsystem}\left(\mathrm{sys}\right):$$\mathrm{PrintSystem}\left(\mathrm{dsubsys1}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{3 output\left(s\right); 4 input\left(s\right); 6 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)\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)\right]\\ {\mathrm{a}}{=}\left[\begin{array}{cccccc}{{a}}_{{1}{,}{1}}& {{a}}_{{1}{,}{2}}& {{a}}_{{1}{,}{3}}& {{a}}_{{1}{,}{4}}& {{a}}_{{1}{,}{5}}& {{a}}_{{1}{,}{6}}\\ {{a}}_{{2}{,}{1}}& {{a}}_{{2}{,}{2}}& {{a}}_{{2}{,}{3}}& {{a}}_{{2}{,}{4}}& {{a}}_{{2}{,}{5}}& {{a}}_{{2}{,}{6}}\\ {{a}}_{{3}{,}{1}}& {{a}}_{{3}{,}{2}}& {{a}}_{{3}{,}{3}}& {{a}}_{{3}{,}{4}}& {{a}}_{{3}{,}{5}}& {{a}}_{{3}{,}{6}}\\ {{a}}_{{4}{,}{1}}& {{a}}_{{4}{,}{2}}& {{a}}_{{4}{,}{3}}& {{a}}_{{4}{,}{4}}& {{a}}_{{4}{,}{5}}& {{a}}_{{4}{,}{6}}\\ {{a}}_{{5}{,}{1}}& {{a}}_{{5}{,}{2}}& {{a}}_{{5}{,}{3}}& {{a}}_{{5}{,}{4}}& {{a}}_{{5}{,}{5}}& {{a}}_{{5}{,}{6}}\\ {{a}}_{{6}{,}{1}}& {{a}}_{{6}{,}{2}}& {{a}}_{{6}{,}{3}}& {{a}}_{{6}{,}{4}}& {{a}}_{{6}{,}{5}}& {{a}}_{{6}{,}{6}}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{cccc}{{b}}_{{1}{,}{1}}& {{b}}_{{1}{,}{2}}& {{b}}_{{1}{,}{3}}& {{b}}_{{1}{,}{4}}\\ {{b}}_{{2}{,}{1}}& {{b}}_{{2}{,}{2}}& {{b}}_{{2}{,}{3}}& {{b}}_{{2}{,}{4}}\\ {{b}}_{{3}{,}{1}}& {{b}}_{{3}{,}{2}}& {{b}}_{{3}{,}{3}}& {{b}}_{{3}{,}{4}}\\ {{b}}_{{4}{,}{1}}& {{b}}_{{4}{,}{2}}& {{b}}_{{4}{,}{3}}& {{b}}_{{4}{,}{4}}\\ {{b}}_{{5}{,}{1}}& {{b}}_{{5}{,}{2}}& {{b}}_{{5}{,}{3}}& {{b}}_{{5}{,}{4}}\\ {{b}}_{{6}{,}{1}}& {{b}}_{{6}{,}{2}}& {{b}}_{{6}{,}{3}}& {{b}}_{{6}{,}{4}}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{cccccc}{{c}}_{{1}{,}{1}}& {{c}}_{{1}{,}{2}}& {{c}}_{{1}{,}{3}}& {{c}}_{{1}{,}{4}}& {{c}}_{{1}{,}{5}}& {{c}}_{{1}{,}{6}}\\ {{c}}_{{2}{,}{1}}& {{c}}_{{2}{,}{2}}& {{c}}_{{2}{,}{3}}& {{c}}_{{2}{,}{4}}& {{c}}_{{2}{,}{5}}& {{c}}_{{2}{,}{6}}\\ {{c}}_{{3}{,}{1}}& {{c}}_{{3}{,}{2}}& {{c}}_{{3}{,}{3}}& {{c}}_{{3}{,}{4}}& {{c}}_{{3}{,}{5}}& {{c}}_{{3}{,}{6}}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{cccc}{{d}}_{{1}{,}{1}}& {{d}}_{{1}{,}{2}}& {{d}}_{{1}{,}{3}}& {{d}}_{{1}{,}{4}}\\ {{d}}_{{2}{,}{1}}& {{d}}_{{2}{,}{2}}& {{d}}_{{2}{,}{3}}& {{d}}_{{2}{,}{4}}\\ {{d}}_{{3}{,}{1}}& {{d}}_{{3}{,}{2}}& {{d}}_{{3}{,}{3}}& {{d}}_{{3}{,}{4}}\end{array}\right]\end{array}\right$ (5)

Extract a subsystem with no inputs, no outputs, and no states.

 > $\mathrm{nsubsys}≔\mathrm{Subsystem}\left(\mathrm{sys},\mathrm{none},\mathrm{none},\mathrm{none}\right):$$\mathrm{PrintSystem}\left(\mathrm{nsubsys}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{0 output\left(s\right); 0 input\left(s\right); 0 state\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[\right]\\ {\mathrm{outputvariable}}{=}\left[\right]\\ {\mathrm{statevariable}}{=}\left[\right]\\ {\mathrm{a}}{=}\left[\begin{array}{}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{}\end{array}\right]\end{array}\right$ (6)

Extract subsystem with inputs u1(t), u2(t) and u3(t). Observe that index repetition and sorting are not relevant in a set.

 > $\mathrm{subsys1}≔\mathrm{Subsystem}\left(\mathrm{sys},\left\{1,2,3,3,1\right\}\right):$$\mathrm{PrintSystem}\left(\mathrm{subsys1}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{3 output\left(s\right); 3 input\left(s\right); 6 state\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{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)\right]\\ {\mathrm{a}}{=}\left[\begin{array}{cccccc}{{a}}_{{1}{,}{1}}& {{a}}_{{1}{,}{2}}& {{a}}_{{1}{,}{3}}& {{a}}_{{1}{,}{4}}& {{a}}_{{1}{,}{5}}& {{a}}_{{1}{,}{6}}\\ {{a}}_{{2}{,}{1}}& {{a}}_{{2}{,}{2}}& {{a}}_{{2}{,}{3}}& {{a}}_{{2}{,}{4}}& {{a}}_{{2}{,}{5}}& {{a}}_{{2}{,}{6}}\\ {{a}}_{{3}{,}{1}}& {{a}}_{{3}{,}{2}}& {{a}}_{{3}{,}{3}}& {{a}}_{{3}{,}{4}}& {{a}}_{{3}{,}{5}}& {{a}}_{{3}{,}{6}}\\ {{a}}_{{4}{,}{1}}& {{a}}_{{4}{,}{2}}& {{a}}_{{4}{,}{3}}& {{a}}_{{4}{,}{4}}& {{a}}_{{4}{,}{5}}& {{a}}_{{4}{,}{6}}\\ {{a}}_{{5}{,}{1}}& {{a}}_{{5}{,}{2}}& {{a}}_{{5}{,}{3}}& {{a}}_{{5}{,}{4}}& {{a}}_{{5}{,}{5}}& {{a}}_{{5}{,}{6}}\\ {{a}}_{{6}{,}{1}}& {{a}}_{{6}{,}{2}}& {{a}}_{{6}{,}{3}}& {{a}}_{{6}{,}{4}}& {{a}}_{{6}{,}{5}}& {{a}}_{{6}{,}{6}}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{ccc}{{b}}_{{1}{,}{1}}& {{b}}_{{1}{,}{2}}& {{b}}_{{1}{,}{3}}\\ {{b}}_{{2}{,}{1}}& {{b}}_{{2}{,}{2}}& {{b}}_{{2}{,}{3}}\\ {{b}}_{{3}{,}{1}}& {{b}}_{{3}{,}{2}}& {{b}}_{{3}{,}{3}}\\ {{b}}_{{4}{,}{1}}& {{b}}_{{4}{,}{2}}& {{b}}_{{4}{,}{3}}\\ {{b}}_{{5}{,}{1}}& {{b}}_{{5}{,}{2}}& {{b}}_{{5}{,}{3}}\\ {{b}}_{{6}{,}{1}}& {{b}}_{{6}{,}{2}}& {{b}}_{{6}{,}{3}}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{cccccc}{{c}}_{{1}{,}{1}}& {{c}}_{{1}{,}{2}}& {{c}}_{{1}{,}{3}}& {{c}}_{{1}{,}{4}}& {{c}}_{{1}{,}{5}}& {{c}}_{{1}{,}{6}}\\ {{c}}_{{2}{,}{1}}& {{c}}_{{2}{,}{2}}& {{c}}_{{2}{,}{3}}& {{c}}_{{2}{,}{4}}& {{c}}_{{2}{,}{5}}& {{c}}_{{2}{,}{6}}\\ {{c}}_{{3}{,}{1}}& {{c}}_{{3}{,}{2}}& {{c}}_{{3}{,}{3}}& {{c}}_{{3}{,}{4}}& {{c}}_{{3}{,}{5}}& {{c}}_{{3}{,}{6}}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{ccc}{{d}}_{{1}{,}{1}}& {{d}}_{{1}{,}{2}}& {{d}}_{{1}{,}{3}}\\ {{d}}_{{2}{,}{1}}& {{d}}_{{2}{,}{2}}& {{d}}_{{2}{,}{3}}\\ {{d}}_{{3}{,}{1}}& {{d}}_{{3}{,}{2}}& {{d}}_{{3}{,}{3}}\end{array}\right]\end{array}\right$ (7)

Extract subsystem with inputs u1(t) and u3(t) and outputs y1(t) and y2(t).

 > $\mathrm{subsys2}≔\mathrm{Subsystem}\left(\mathrm{sys},\left\{3,1\right\},\left\{1,2\right\}\right):$$\mathrm{PrintSystem}\left(\mathrm{subsys2}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{2 output\left(s\right); 2 input\left(s\right); 6 state\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({t}\right){,}{\mathrm{u3}}{}\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){,}{\mathrm{x5}}{}\left({t}\right){,}{\mathrm{x6}}{}\left({t}\right)\right]\\ {\mathrm{a}}{=}\left[\begin{array}{cccccc}{{a}}_{{1}{,}{1}}& {{a}}_{{1}{,}{2}}& {{a}}_{{1}{,}{3}}& {{a}}_{{1}{,}{4}}& {{a}}_{{1}{,}{5}}& {{a}}_{{1}{,}{6}}\\ {{a}}_{{2}{,}{1}}& {{a}}_{{2}{,}{2}}& {{a}}_{{2}{,}{3}}& {{a}}_{{2}{,}{4}}& {{a}}_{{2}{,}{5}}& {{a}}_{{2}{,}{6}}\\ {{a}}_{{3}{,}{1}}& {{a}}_{{3}{,}{2}}& {{a}}_{{3}{,}{3}}& {{a}}_{{3}{,}{4}}& {{a}}_{{3}{,}{5}}& {{a}}_{{3}{,}{6}}\\ {{a}}_{{4}{,}{1}}& {{a}}_{{4}{,}{2}}& {{a}}_{{4}{,}{3}}& {{a}}_{{4}{,}{4}}& {{a}}_{{4}{,}{5}}& {{a}}_{{4}{,}{6}}\\ {{a}}_{{5}{,}{1}}& {{a}}_{{5}{,}{2}}& {{a}}_{{5}{,}{3}}& {{a}}_{{5}{,}{4}}& {{a}}_{{5}{,}{5}}& {{a}}_{{5}{,}{6}}\\ {{a}}_{{6}{,}{1}}& {{a}}_{{6}{,}{2}}& {{a}}_{{6}{,}{3}}& {{a}}_{{6}{,}{4}}& {{a}}_{{6}{,}{5}}& {{a}}_{{6}{,}{6}}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{cc}{{b}}_{{1}{,}{1}}& {{b}}_{{1}{,}{3}}\\ {{b}}_{{2}{,}{1}}& {{b}}_{{2}{,}{3}}\\ {{b}}_{{3}{,}{1}}& {{b}}_{{3}{,}{3}}\\ {{b}}_{{4}{,}{1}}& {{b}}_{{4}{,}{3}}\\ {{b}}_{{5}{,}{1}}& {{b}}_{{5}{,}{3}}\\ {{b}}_{{6}{,}{1}}& {{b}}_{{6}{,}{3}}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{cccccc}{{c}}_{{1}{,}{1}}& {{c}}_{{1}{,}{2}}& {{c}}_{{1}{,}{3}}& {{c}}_{{1}{,}{4}}& {{c}}_{{1}{,}{5}}& {{c}}_{{1}{,}{6}}\\ {{c}}_{{2}{,}{1}}& {{c}}_{{2}{,}{2}}& {{c}}_{{2}{,}{3}}& {{c}}_{{2}{,}{4}}& {{c}}_{{2}{,}{5}}& {{c}}_{{2}{,}{6}}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{cc}{{d}}_{{1}{,}{1}}& {{d}}_{{1}{,}{3}}\\ {{d}}_{{2}{,}{1}}& {{d}}_{{2}{,}{3}}\end{array}\right]\end{array}\right$ (8)

Compatibility

 • The DynamicSystems[Subsystem] command was introduced in Maple 17.