DynamicSystems - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

DynamicSystems

  

SystemConnect

  

determine the equivalent system representation of two or more interconnected system objects

 

Calling Sequence

Parameters

Options

Description

Examples

Calling Sequence

SystemConnect(systems, opts)

SystemConnect(systems, ui, oi, uy, oy, opts)

Parameters

systems

-

System; list of System objects

ui

-

(optional) Matrix; maps the global inputs to the subsystem inputs

oi

-

(optional) Matrix; maps the subsystem outputs to the subsystem inputs

uy

-

(optional) Matrix; maps the global inputs to the global outputs

oy

-

(optional) Matrix; maps the subsystem outputs to the global outputs

opts

-

(optional) equation(s) of the form option = value; specify options for the SystemConnect 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.

• 

connection = serial, parallel, append, negativefeedback, positivefeedback, or feedforward

  

Automatically creates the required connection matrices for certain canonical system interconnections.  When this option is specified, the matrices ui, oi, uy, and oy are not required.

– 

serial : The subsystems are connected in order, matching the outputs of the previous subsystem to the inputs of the next subsystem.

– 

parallel : The subsystems are connected in parallel, each subsystem being fed the same input with their outputs summed to obtain the final output.

– 

append : The subsystems are combined such that each subsystem receives its own inputs from the outside world and its outputs are exposed directly to the outside world.

– 

negativefeedback, positivefeedback : One or two systems may be specified using the systems parameter. The first subsystem is in the forward path, and the second subsystem is placed in the feedback loop. The second system is assumed to be a unity gain if it is not specified. If negativefeedback is specified, the input to the first system is the subtraction of the external input from the output to the second system. If positivefeedback is specified, it is the addition.

– 

feedforward : The input is added to the output of the given system. Only defined for use with one system.

• 

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 P1.

• 

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 SystemConnect command allows you to create complex interconnections between multiple system objects representing a set of subsystems to produce the equivalent system object in a block diagram simplification type procedure.

• 

The inputs to the subsystems specified in the parameter systems are generated as a linear combination of the external inputs which feed into the equivalent system and the subsystem outputs which are fed back.  The mapping of the external inputs to the subsystem inputs is defined by the ui matrix and the mapping of the subsystem output to the subsystem inputs is defined by the oi matrix.  The number of rows in the ui matrix is determined by the number of subsystem inputs (the sum of the number of inputs for each system in the systems) and the number of columns by the number of external inputs to the equivalent system.  The number of rows in the oi matrix is likewise determined by the number of subsystem inputs and the number of columns is determined by the number of subsystem outputs.

• 

The outputs of the equivalent system are formed in a similar manner to the inputs. The external outputs are a linear combination of the external inputs which feed directly through the equivalent system and the subsystem outputs.  The mapping of the external inputs to the external outputs is defined by the uy matrix and the mapping of the subsystem outputs to the external outputs is defined by the oy matrix.  The number of rows in the oy matrix is determined by the number of external outputs of the equivalent system and the number of columns by the number of outputs of the subsystems (the sum of the number of outputs on each system in the systems).  The number of rows in the uy matrix is likewise determined by the number of external outputs of the equivalent system and the number of columns is determined by the number of external inputs in the equivalent system.

• 

An entry of 1 in the connection matrices represents a simple connection. Non-unity entries represent gains in the connection path. Negative feedback is achieved by setting the appropriate entry or entries to -1.

• 

The type of the system object output by SystemConnect is determined by the type of the system objects specified in the systems parameter.  If different types of system objects are passed, the output type is determined based on a precedence list defined as tf < coeff < zpk < ss < de.  For example, if a System(ss) and a de system are supplied, the output will be a de system.

Examples

Pre-defined Connections

withDynamicSystems&colon;

sys1TransferFunction1s2&plus;5s&plus;3&colon;

PrintSystemsys1

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable&equals;u1soutputvariable&equals;y1stf1,1&equals;1s2+5s+3

(1)

sys2TransferFunction1s3&plus;2s&plus;4&colon;

PrintSystemsys2

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable&equals;u1soutputvariable&equals;y1stf1,1&equals;1s3+2s+4

(2)

sys_parallelSystemConnectsys1&comma;sys2&comma;connection&equals;parallel&colon;

PrintSystemsys_parallel

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable&equals;u1soutputvariable&equals;y1stf1,1&equals;s3+s2+7s+7s5+5s4+5s3+14s2+26s+12

(3)

sys_serialSystemConnectsys1&comma;sys2&comma;connection&equals;serial&comma;outputtype&equals;ss&colon;

PrintSystemsys_serial

State Spacecontinuous1 output(s); 1 input(s); 5 state(s)inputvariable&equals;u1toutputvariable&equals;y1tstatevariable&equals;x1t&comma;x2t&comma;x3t&comma;x4t&comma;x5ta&equals;01000−3−5000000100000110−4−20b&equals;01000c&equals;00100d&equals;0

(4)

sys_feedbackSystemConnectsys1&comma;connection&equals;negativefeedback&colon;

PrintSystemsys_feedback

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable&equals;u1soutputvariable&equals;y1stf1,1&equals;1s2+5s+4

(5)

sys_appendSystemConnectsys1&comma;sys2&comma;connection&equals;append&colon;

PrintSystemsys_append

Transfer Functioncontinuous2 output(s); 2 input(s)inputvariable&equals;u1s&comma;u2soutputvariable&equals;y1s&comma;y2stf1,1&equals;1s2+5s+3tf2,1&equals;0tf1,2&equals;0tf2,2&equals;1s3+2s+4

(6)

General Connection

  

Consider the example system given below:

  

The connections depicted above can be represented as follows

RM&rarr;LinearAlgebra:-RandomMatrixargs&colon;

a1RM2&comma;2&colon;b1RM2&comma;2&colon;c1RM2&comma;2&colon;d1RM2&comma;2&colon;

sys1StateSpacea1&comma;b1&comma;c1&comma;d1&colon;

a2RM3&comma;3&colon;b2RM3&comma;2&colon;c2RM2&comma;3&colon;d2RM2&comma;2&colon;

sys2StateSpacea2&comma;b2&comma;c2&comma;d2&colon;

Mui1&verbar;0&verbar;0&comma;0&verbar;0&verbar;1&comma;0&verbar;0&verbar;0&comma;0&verbar;3&verbar;0

Mui:=100001000030

(7)

Moi0&verbar;0&verbar;0&verbar;0&comma;0&verbar;0&verbar;0&verbar;1&comma;0&verbar;1&verbar;0&verbar;0&comma;0&verbar;0&verbar;0&verbar;0

Moi:=0000000101000000

(8)

Muy0&verbar;0&verbar;0&comma;0&verbar;0&verbar;0&comma;0&verbar;0&verbar;1

Muy:=000000001

(9)

Moy0&verbar;0&verbar;1&verbar;0&comma;1&verbar;0&verbar;0&verbar;0&comma;0&verbar;0&verbar;0&verbar;1

Moy:=001010000001

(10)

sys_generalSystemConnectsys1&comma;sys2&comma;Mui&comma;Moi&comma;Muy&comma;Moy&colon;

PrintSystemsys_general

State Spacecontinuous3 output(s); 3 input(s); 5 state(s)inputvariable&equals;u1t&comma;u2t&comma;u3toutputvariable&equals;y1t&comma;y2t&comma;y3tstatevariable&equals;x1t&comma;x2t&comma;x3t&comma;x4t&comma;x5ta&equals;224422618097261247561118861495061609146128360617256134861145061740612706154416150676156976111846143261151861239761507761666612436164861576261254761b&equals;23275661237606199616411561696061296176061435061206112166111706613261684613915611861c&equals;66661243612173615518611022611632166160508611800618646136006122946183761256112615061d&equals;68461483061186116395961172806172612356612406112361

(11)

Merging Parameters

  

When systems with parameters are combined, the merge and indices options may be used to affect how parameters are handled.

• 

Create two systems with common parameters.

sys1TransferFunctionks&plus;w2&comma;parameters&equals;k&equals;1&comma;w&equals;1&colon;

sys2TransferFunctionks&plus;w&comma;parameters&equals;k&equals;2&comma;w&equals;3&colon;

• 

Use merge = keep (the default) to keep the original parameters, but replace the numeric values with those from the first system.

sys_parallelSystemConnectsys1&comma;sys2&comma;connection&equals;parallel&comma;merge&equals;keep&colon;

PrintSystemsys_parallel

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable&equals;u1soutputvariable&equals;y1stf1,1&equals;ks+w+1ks2+2ws+w2

(12)

sys_parallel:-parameters

k&equals;1&comma;w&equals;1

(13)
• 

Use merge = evaluate to evaluate all parameters before computing the transfer function.

sys_parallelSystemConnectsys1&comma;sys2&comma;connection&equals;parallel&comma;merge&equals;evaluate&colon;

PrintSystemsys_parallel

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable&equals;u1soutputvariable&equals;y1stf1,1&equals;2s2+5s+5s3+5s2+7s+3

(14)

sys_parallel:-parameters

(15)
• 

Use merge = replace to replace all parameters with distinct, indexed names.

sys_parallelSystemConnectsys1&comma;sys2&comma;connection&equals;parallel&comma;merge&equals;replace&colon;

PrintSystemsys_parallel

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable&equals;u1soutputvariable&equals;y1stf1,1&equals;k2s2+2k2w1+k1s+k2w12+k1w2s3+2w1+w2s2+w12+2w1w2s+w12w2

(16)

sys_parallel:-parameters

k1&equals;1&comma;w1&equals;1&comma;k2&equals;2&comma;w2&equals;3

(17)
• 

Use the indices option with merge = replace to specify the indices for the new parameter names.

sys_parallelSystemConnectsys1&comma;sys2&comma;connection&equals;parallel&comma;merge&equals;replace&comma;indices&equals;&apos;a&apos;&comma;&apos;b&apos;&colon;

PrintSystemsys_parallel

Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable&equals;u1soutputvariable&equals;y1stf1,1&equals;kbs2+2kbwa+kas+kbwa2+kawbs3+2wa+wbs2+wa2+2wawbs+wa2wb

(18)

sys_parallel:-parameters

ka&equals;1&comma;wa&equals;1&comma;kb&equals;2&comma;wb&equals;3

(19)

See Also

DynamicSystems

DynamicSystems[Coefficients]

DynamicSystems[DiffEquation]

DynamicSystems[StateSpace]

DynamicSystems[TransferFunction]

DynamicSystems[ZeroPoleGain]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam