DynamicSystems
Subsystem
extract the subsystem from a system by specifying a set of inputs, outputs, and/or states
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
Subsystem(system, opts)
Subsystem(system, inputs, opts)
Subsystem(system, inputs, outputs, opts)
Subsystem(system, inputs, outputs, states, opts)
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
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.
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].
with⁡DynamicSystems:
Define a state-space system with n states, m inputs, and p outputs.
n≔6:m≔4:p≔3:
A1≔Matrix⁡n,n,symbol=a:
B1≔Matrix⁡n,m,symbol=b:
C1≔Matrix⁡p,n,symbol=c:
D1≔Matrix⁡p,m,symbol=d:
sys≔StateSpace⁡A1,B1,C1,D1:PrintSystem⁡sys
State Spacecontinuous3 output(s); 4 input(s); 6 state(s)inputvariable=u1⁡t,u2⁡t,u3⁡t,u4⁡toutputvariable=y1⁡t,y2⁡t,y3⁡tstatevariable=x1⁡t,x2⁡t,x3⁡t,x4⁡t,x5⁡t,x6⁡ta=a1,1a1,2a1,3a1,4a1,5a1,6a2,1a2,2a2,3a2,4a2,5a2,6a3,1a3,2a3,3a3,4a3,5a3,6a4,1a4,2a4,3a4,4a4,5a4,6a5,1a5,2a5,3a5,4a5,5a5,6a6,1a6,2a6,3a6,4a6,5a6,6b=b1,1b1,2b1,3b1,4b2,1b2,2b2,3b2,4b3,1b3,2b3,3b3,4b4,1b4,2b4,3b4,4b5,1b5,2b5,3b5,4b6,1b6,2b6,3b6,4c=c1,1c1,2c1,3c1,4c1,5c1,6c2,1c2,2c2,3c2,4c2,5c2,6c3,1c3,2c3,3c3,4c3,5c3,6d=d1,1d1,2d1,3d1,4d2,1d2,2d2,3d2,4d3,1d3,2d3,3d3,4
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)).
ex_in≔1,2,4:
ex_out≔2:
ex_states≔1,3,6:
subsys≔Subsystem⁡sys,ex_in,ex_out,ex_states:PrintSystem⁡subsys
State Spacecontinuous1 output(s); 3 input(s); 3 state(s)inputvariable=u1⁡t,u2⁡t,u4⁡toutputvariable=y2⁡tstatevariable=x1⁡t,x3⁡t,x6⁡ta=a1,1a1,3a1,6a3,1a3,3a3,6a6,1a6,3a6,6b=b1,1b1,2b1,4b3,1b3,2b3,4b6,1b6,2b6,4c=c2,1c2,3c2,6d=d2,1d2,2d2,4
Extract a subsystem in differential equation form with all of the inputs, two outputs (y1(t) and y2(t)), and the first state.
allinputs≔Subsystem⁡sys,all,1,2,1,outputtype=de:PrintSystem⁡allinputs
Diff. Equationcontinuous2 output(s); 4 input(s)inputvariable=u1⁡t,u2⁡t,u3⁡t,u4⁡toutputvariable=y1⁡t,y2⁡tde={[ⅆⅆtx1⁡t=a1,1⁢x1⁡t+b1,1⁢u1⁡t+b1,2⁢u2⁡t+b1,3⁢u3⁡t+b1,4⁢u4⁡t, y1⁡t=c1,1⁢x1⁡t+d1,1⁢u1⁡t+d1,2⁢u2⁡t+d1,3⁢u3⁡t+d1,4⁢u4⁡t, y2⁡t=c2,1⁢x1⁡t+d2,1⁢u1⁡t+d2,2⁢u2⁡t+d2,3⁢u3⁡t+d2,4⁢u4⁡t]
Extract a subsystem with three inputs (u1(t), u2(t), and u4(t)), output y2(t), and no states.
nostates≔Subsystem⁡sys,ex_in,ex_out,none:PrintSystem⁡nostates
State Spacecontinuous1 output(s); 3 input(s); 0 state(s)inputvariable=u1⁡t,u2⁡t,u4⁡toutputvariable=y2⁡tstatevariable=a=b=c=d=d2,1d2,2d2,4
When the inputs, outputs, and states arguments are omitted, the Subsystem command returns the original system.
dsubsys1≔Subsystem⁡sys:PrintSystem⁡dsubsys1
Extract a subsystem with no inputs, no outputs, and no states.
nsubsys≔Subsystem⁡sys,none,none,none:PrintSystem⁡nsubsys
State Spacecontinuous0 output(s); 0 input(s); 0 state(s)inputvariable=outputvariable=statevariable=a=b=c=d=
Extract subsystem with inputs u1(t), u2(t) and u3(t). Observe that index repetition and sorting are not relevant in a set.
subsys1≔Subsystem⁡sys,1,2,3:PrintSystem⁡subsys1
State Spacecontinuous3 output(s); 3 input(s); 6 state(s)inputvariable=u1⁡t,u2⁡t,u3⁡toutputvariable=y1⁡t,y2⁡t,y3⁡tstatevariable=x1⁡t,x2⁡t,x3⁡t,x4⁡t,x5⁡t,x6⁡ta=a1,1a1,2a1,3a1,4a1,5a1,6a2,1a2,2a2,3a2,4a2,5a2,6a3,1a3,2a3,3a3,4a3,5a3,6a4,1a4,2a4,3a4,4a4,5a4,6a5,1a5,2a5,3a5,4a5,5a5,6a6,1a6,2a6,3a6,4a6,5a6,6b=b1,1b1,2b1,3b2,1b2,2b2,3b3,1b3,2b3,3b4,1b4,2b4,3b5,1b5,2b5,3b6,1b6,2b6,3c=c1,1c1,2c1,3c1,4c1,5c1,6c2,1c2,2c2,3c2,4c2,5c2,6c3,1c3,2c3,3c3,4c3,5c3,6d=d1,1d1,2d1,3d2,1d2,2d2,3d3,1d3,2d3,3
Extract subsystem with inputs u1(t) and u3(t) and outputs y1(t) and y2(t).
subsys2≔Subsystem⁡sys,1,3,1,2:PrintSystem⁡subsys2
State Spacecontinuous2 output(s); 2 input(s); 6 state(s)inputvariable=u1⁡t,u3⁡toutputvariable=y1⁡t,y2⁡tstatevariable=x1⁡t,x2⁡t,x3⁡t,x4⁡t,x5⁡t,x6⁡ta=a1,1a1,2a1,3a1,4a1,5a1,6a2,1a2,2a2,3a2,4a2,5a2,6a3,1a3,2a3,3a3,4a3,5a3,6a4,1a4,2a4,3a4,4a4,5a4,6a5,1a5,2a5,3a5,4a5,5a5,6a6,1a6,2a6,3a6,4a6,5a6,6b=b1,1b1,3b2,1b2,3b3,1b3,3b4,1b4,3b5,1b5,3b6,1b6,3c=c1,1c1,2c1,3c1,4c1,5c1,6c2,1c2,2c2,3c2,4c2,5c2,6d=d1,1d1,3d2,1d2,3
The DynamicSystems[Subsystem] command was introduced in Maple 17.
For more information on Maple 17 changes, see Updates in Maple 17.
See Also
Description of the Model of a Linear System Object
DynamicSystems[AlgEquation]
DynamicSystems[Coefficients]
DynamicSystems[DiffEquation]
DynamicSystems[PrintSystem]
DynamicSystems[StateSpace]
DynamicSystems[TransferFunction]
DynamicSystems[ZeroPoleGain]
Download Help Document