Subsystem - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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

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

withDynamicSystems:

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

n6:m4:p3:

A1Matrixn,n,symbol=a:

B1Matrixn,m,symbol=b:

C1Matrixp,n,symbol=c:

D1Matrixp,m,symbol=d:

sysStateSpaceA1,B1,C1,D1:PrintSystemsys

State Spacecontinuous3 output(s); 4 input(s); 6 state(s)inputvariable=u1t,u2t,u3t,u4toutputvariable=y1t,y2t,y3tstatevariable=x1t,x2t,x3t,x4t,x5t,x6ta=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

(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)).

ex_in1,2,4:

ex_out2:

ex_states1,3,6:

subsysSubsystemsys,ex_in,ex_out,ex_states:PrintSystemsubsys

State Spacecontinuous1 output(s); 3 input(s); 3 state(s)inputvariable=u1t,u2t,u4toutputvariable=y2tstatevariable=x1t,x3t,x6ta=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

(2)

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

allinputsSubsystemsys,all,1,2,1,outputtype=de:PrintSystemallinputs

Diff. Equationcontinuous2 output(s); 4 input(s)inputvariable=u1t,u2t,u3t,u4toutputvariable=y1t,y2tde={[ⅆⅆtx1t=a1,1x1t+b1,1u1t+b1,2u2t+b1,3u3t+b1,4u4t, y1t=c1,1x1t+d1,1u1t+d1,2u2t+d1,3u3t+d1,4u4t, y2t=c2,1x1t+d2,1u1t+d2,2u2t+d2,3u3t+d2,4u4t]

(3)

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

nostatesSubsystemsys,ex_in,ex_out,none:PrintSystemnostates

State Spacecontinuous1 output(s); 3 input(s); 0 state(s)inputvariable=u1t,u2t,u4toutputvariable=y2tstatevariable=a=b=c=d=d2,1d2,2d2,4

(4)

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

dsubsys1Subsystemsys:PrintSystemdsubsys1

State Spacecontinuous3 output(s); 4 input(s); 6 state(s)inputvariable=u1t,u2t,u3t,u4toutputvariable=y1t,y2t,y3tstatevariable=x1t,x2t,x3t,x4t,x5t,x6ta=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

(5)

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

nsubsysSubsystemsys,none,none,none:PrintSystemnsubsys

State Spacecontinuous0 output(s); 0 input(s); 0 state(s)inputvariable=outputvariable=statevariable=a=b=c=d=

(6)

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

subsys1Subsystemsys,1,2,3:PrintSystemsubsys1

State Spacecontinuous3 output(s); 3 input(s); 6 state(s)inputvariable=u1t,u2t,u3toutputvariable=y1t,y2t,y3tstatevariable=x1t,x2t,x3t,x4t,x5t,x6ta=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

(7)

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

subsys2Subsystemsys,1,3,1,2:PrintSystemsubsys2

State Spacecontinuous2 output(s); 2 input(s); 6 state(s)inputvariable=u1t,u3toutputvariable=y1t,y2tstatevariable=x1t,x2t,x3t,x4t,x5t,x6ta=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

(8)

Compatibility

• 

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

DynamicSystems[AlgEquation]

DynamicSystems[Coefficients]

DynamicSystems[DiffEquation]

DynamicSystems[PrintSystem]

DynamicSystems[StateSpace]

DynamicSystems[TransferFunction]

DynamicSystems[ZeroPoleGain]