DynamicSystems
FeedbackConnect
create the equivalent system representation of one or two system objects with positive or negative feedback connection.
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
FeedbackConnect(systems, opts)
FeedbackConnect(systems, feedbacktype, opts)
FeedbackConnect(systems, loopconnections, opts)
systems
-
list(System); list of system objects
feedbacktype
(optional) negative or positive; type of feedback loops, negative by default
loopconnections
(optional) listlist; list of lists of indexes specifying loop connections [loop 1,...,loop k], where the indexes in loop k must be ordered as follows: [input sys1, output sys1] for one system, and [input sys1, output sys1, input sys2, output sys2] for two systems. The sign of the last index in the above lists determines the type of feedback (positive or negative).
opts
(optional) equation(s) of the form option = value; specify options for the FeedbackConnect 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.
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.
The FeedbackConnect command creates the equivalent system representation of the feedback connection of one or two system objects. When two system objects are given, the first system is placed in the forward path and the second system is placed in the reverse (or feedback path). When a single system is given, the system object is placed in the forward path and unity feedback is assumed.
Unless loop connection lists are specified, all inputs and outputs of the systems are used to form negative feedback loops by default. The number of forward path system's outputs must match the number of feedback path system's inputs. Likewise, the number of forward path system's inputs must match the number of feedback path system's outputs. The returned system has the same number of inputs/outputs as the forward path system.
If loop connection lists are provided, the number of loops connection lists must not exceed the minimum number of inputs or outputs of the individual systems. If a single system is specified, the loop connection lists must contain 2 indexes each, as in [input sys1, output sys1]. If two systems are specified, the loop connection lists must contain 4 indexes each, as in [input sys1, output sys1, input sys2, output sys2].
The system objects must be either both continuous or both 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 FeedbackConnect 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:
Example 1: Connect a SISO system with negative unity feedback
sys1a≔TransferFunction⁡Ks⁢s+1:
feedback1a≔FeedbackConnect⁡sys1a:PrintSystem⁡feedback1a
Transfer Functioncontinuous1 output(s); 1 input(s)inputvariable=u1⁡soutputvariable=y1⁡stf1,1=Ks2+s+K
feedback1a≔FeedbackConnect⁡sys1a,outputtype=zpk:
PrintSystem⁡feedback1a
Zero Pole Gaincontinuous1 output(s); 1 input(s)inputvariable=u1⁡soutputvariable=y1⁡sz1,1=p1,1=−12+1−4⁢K2,−12−1−4⁢K2k1,1=K
n≔2:m≔1:p≔1:
sys1b≔StateSpace⁡usesymbols,numinputs=m,numoutputs=p,numstates=n:sys1b:-d1,1≔0:
feedback1b≔FeedbackConnect⁡sys1b:
PrintSystem⁡feedback1b
State Spacecontinuous1 output(s); 1 input(s); 2 state(s)inputvariable=u1⁡toutputvariable=y1⁡tstatevariable=x1⁡t,x2⁡ta=−b1,1⁢c1,1+a1,1−b1,1⁢c1,2+a1,2−b2,1⁢c1,1+a2,1−b2,1⁢c1,2+a2,2b=b1,1b2,1c=c1,1c1,2d=0
Example 2: Connect two MIMO systems in positive feedback
sys1c≔StateSpace⁡usesymbols,numinputs=m,numoutputs=p+1,numstates=n:sys1c:-d≔Matrix⁡p+1,m:
sys2c≔StateSpace⁡symbols=e,f,g,h,usesymbols,numinputs=m+1,numoutputs=p,numstates=n:sys2c:-d≔Matrix⁡p,m+1:
feedback2≔FeedbackConnect⁡sys1c,sys2c,positive:
PrintSystem⁡feedback2
State Spacecontinuous2 output(s); 1 input(s); 4 state(s)inputvariable=u1⁡toutputvariable=y1⁡t,y2⁡tstatevariable=x1⁡t,x2⁡t,x3⁡t,x4⁡ta=a1,1a1,2b1,1⁢g1,1b1,1⁢g1,2a2,1a2,2b2,1⁢g1,1b2,1⁢g1,2f1,1⁢c1,1+f1,2⁢c2,1f1,1⁢c1,2+f1,2⁢c2,2e1,1e1,2f2,1⁢c1,1+f2,2⁢c2,1f2,1⁢c1,2+f2,2⁢c2,2e2,1e2,2b=b1,1b2,100c=c1,1c1,200c2,1c2,200d=00
Example 3: Connect a MIMO system with two negative unity feedback loops, connecting input u11 and output y14 and input u13 and output y12, respectively.
sys1d≔StateSpace⁡usesymbols,numinputs=m+2,numoutputs=p+3,numstates=n:sys1d:-d≔Matrix⁡p+3,m+2:
feedback3≔FeedbackConnect⁡sys1d,1,−4,3,−2:
PrintSystem⁡feedback3
State Spacecontinuous4 output(s); 3 input(s); 2 state(s)inputvariable=u1⁡t,u2⁡t,u3⁡toutputvariable=y1⁡t,y2⁡t,y3⁡t,y4⁡tstatevariable=x1⁡t,x2⁡ta=−b1,1⁢c4,1−b1,3⁢c2,1+a1,1−b1,1⁢c4,2−b1,3⁢c2,2+a1,2−b2,1⁢c4,1−b2,3⁢c2,1+a2,1−b2,1⁢c4,2−b2,3⁢c2,2+a2,2b=b1,1b1,2b1,3b2,1b2,2b2,3c=c1,1c1,2c2,1c2,2c3,1c3,2c4,1c4,2d=000000000000
Example 4: Connect two MIMO systems with two negative feedback loops, as shown in the figure.
sys1e≔StateSpace⁡usesymbols,numinputs=m+2,numoutputs=p+2,numstates=n:sys1e:-d≔Matrix⁡p+2,m+2:
sys2e≔StateSpace⁡symbols=e,f,g,h,usesymbols,numinputs=m+1,numoutputs=p+2,numstates=n:sys2e:-d≔Matrix⁡p+2,m+1:
feedback4≔FeedbackConnect⁡sys1e,sys2e,1,3,2,−2,2,2,1,−3:
PrintSystem⁡feedback4
State Spacecontinuous3 output(s); 3 input(s); 4 state(s)inputvariable=u1⁡t,u2⁡t,u3⁡toutputvariable=y1⁡t,y2⁡t,y3⁡tstatevariable=x1⁡t,x2⁡t,x3⁡t,x4⁡ta=a1,1a1,2−b1,1⁢g2,1−b1,2⁢g3,1−b1,1⁢g2,2−b1,2⁢g3,2a2,1a2,2−b2,1⁢g2,1−b2,2⁢g3,1−b2,1⁢g2,2−b2,2⁢g3,2f1,1⁢c2,1+f1,2⁢c3,1f1,1⁢c2,2+f1,2⁢c3,2e1,1e1,2f2,1⁢c2,1+f2,2⁢c3,1f2,1⁢c2,2+f2,2⁢c3,2e2,1e2,2b=b1,1b1,2b1,3b2,1b2,2b2,3000000c=c1,1c1,200c2,1c2,200c3,1c3,200d=000000000
The DynamicSystems[FeedbackConnect] command was introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
See Also
Description of the Model of a Linear System Object
DynamicSystems[AlgEquation]
DynamicSystems[AppendConnect]
DynamicSystems[ParallelConnect]
DynamicSystems[PrintSystem]
DynamicSystems[SeriesConnect]
DynamicSystems[StateSpace]
DynamicSystems[SystemConnect]
DynamicSystems[TransferFunction]
Download Help Document