 FeedbackConnect - Maple Help

# Online Help

###### All Products    Maple    MapleSim

DynamicSystems

 FeedbackConnect
 create the equivalent system representation of one or two system objects with positive or negative feedback connection. Calling Sequence FeedbackConnect(systems, opts) FeedbackConnect(systems, feedbacktype, opts) FeedbackConnect(systems, loopconnections, opts) Parameters

 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 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.
 • 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 ${P}_{1}$.
 • 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 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].  Examples

 > $\mathrm{with}\left(\mathrm{DynamicSystems}\right):$

Example 1: Connect a SISO system with negative unity feedback > $\mathrm{sys1a}≔\mathrm{TransferFunction}\left(\frac{K}{s\left(s+1\right)}\right):$
 > $\mathrm{feedback1a}≔\mathrm{FeedbackConnect}\left(\left[\mathrm{sys1a}\right]\right):$$\mathrm{PrintSystem}\left(\mathrm{feedback1a}\right)$
 $\left[\begin{array}{l}{\mathbf{Transfer Function}}\\ {\mathrm{continuous}}\\ {\mathrm{1 output\left(s\right); 1 input\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({s}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y1}}{}\left({s}\right)\right]\\ {{\mathrm{tf}}}_{{1}{,}{1}}{=}\frac{{K}}{{{s}}^{{2}}{+}{s}{+}{K}}\end{array}\right$ (1)
 > $\mathrm{feedback1a}≔\mathrm{FeedbackConnect}\left(\left[\mathrm{sys1a}\right],\mathrm{outputtype}=\mathrm{zpk}\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{feedback1a}\right)$
 $\left[\begin{array}{l}{\mathbf{Zero Pole Gain}}\\ {\mathrm{continuous}}\\ {\mathrm{1 output\left(s\right); 1 input\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({s}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y1}}{}\left({s}\right)\right]\\ {{\mathrm{z}}}_{{1}{,}{1}}{=}\left[\right]\\ {{\mathrm{p}}}_{{1}{,}{1}}{=}\left[{-}\frac{{1}}{{2}}{+}\frac{\sqrt{{1}{-}{4}{}{K}}}{{2}}{,}{-}\frac{{1}}{{2}}{-}\frac{\sqrt{{1}{-}{4}{}{K}}}{{2}}\right]\\ {{\mathrm{k}}}_{{1}{,}{1}}{=}{K}\end{array}\right$ (2)
 > $n≔2:$$m≔1:$$p≔1:$
 > $\mathrm{sys1b}≔\mathrm{StateSpace}\left('\mathrm{usesymbols}','\mathrm{numinputs}'=m,'\mathrm{numoutputs}'=p,'\mathrm{numstates}'=n\right):$$\mathrm{sys1b}:-d\left[1,1\right]≔0:$
 > $\mathrm{feedback1b}≔\mathrm{FeedbackConnect}\left(\left[\mathrm{sys1b}\right]\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{feedback1b}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{1 output\left(s\right); 1 input\left(s\right); 2 state\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\left({t}\right)\right]\\ {\mathrm{outputvariable}}{=}\left[{\mathrm{y1}}{}\left({t}\right)\right]\\ {\mathrm{statevariable}}{=}\left[{\mathrm{x1}}{}\left({t}\right){,}{\mathrm{x2}}{}\left({t}\right)\right]\\ {\mathrm{a}}{=}\left[\begin{array}{cc}{-}{{b}}_{{1}{,}{1}}{}{{c}}_{{1}{,}{1}}{+}{{a}}_{{1}{,}{1}}& {-}{{b}}_{{1}{,}{1}}{}{{c}}_{{1}{,}{2}}{+}{{a}}_{{1}{,}{2}}\\ {-}{{b}}_{{2}{,}{1}}{}{{c}}_{{1}{,}{1}}{+}{{a}}_{{2}{,}{1}}& {-}{{b}}_{{2}{,}{1}}{}{{c}}_{{1}{,}{2}}{+}{{a}}_{{2}{,}{2}}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{c}{{b}}_{{1}{,}{1}}\\ {{b}}_{{2}{,}{1}}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{cc}{{c}}_{{1}{,}{1}}& {{c}}_{{1}{,}{2}}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{c}{0}\end{array}\right]\end{array}\right$ (3)

Example 2: Connect two MIMO systems in positive feedback > $\mathrm{sys1c}≔\mathrm{StateSpace}\left('\mathrm{usesymbols}','\mathrm{numinputs}'=m,'\mathrm{numoutputs}'=p+1,'\mathrm{numstates}'=n\right):$$\mathrm{sys1c}:-d≔\mathrm{Matrix}\left(p+1,m\right):$
 > $\mathrm{sys2c}≔\mathrm{StateSpace}\left('\mathrm{symbols}'=\left[e,f,g,h\right],'\mathrm{usesymbols}','\mathrm{numinputs}'=m+1,'\mathrm{numoutputs}'=p,'\mathrm{numstates}'=n\right):$$\mathrm{sys2c}:-d≔\mathrm{Matrix}\left(p,m+1\right):$
 > $\mathrm{feedback2}≔\mathrm{FeedbackConnect}\left(\left[\mathrm{sys1c},\mathrm{sys2c}\right],\mathrm{positive}\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{feedback2}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{2 output\left(s\right); 1 input\left(s\right); 4 state\left(s\right)}}\\ {\mathrm{inputvariable}}{=}\left[{\mathrm{u1}}{}\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)\right]\\ {\mathrm{a}}{=}\left[\begin{array}{cccc}{{a}}_{{1}{,}{1}}& {{a}}_{{1}{,}{2}}& {{b}}_{{1}{,}{1}}{}{{g}}_{{1}{,}{1}}& {{b}}_{{1}{,}{1}}{}{{g}}_{{1}{,}{2}}\\ {{a}}_{{2}{,}{1}}& {{a}}_{{2}{,}{2}}& {{b}}_{{2}{,}{1}}{}{{g}}_{{1}{,}{1}}& {{b}}_{{2}{,}{1}}{}{{g}}_{{1}{,}{2}}\\ {{f}}_{{1}{,}{1}}{}{{c}}_{{1}{,}{1}}{+}{{f}}_{{1}{,}{2}}{}{{c}}_{{2}{,}{1}}& {{f}}_{{1}{,}{1}}{}{{c}}_{{1}{,}{2}}{+}{{f}}_{{1}{,}{2}}{}{{c}}_{{2}{,}{2}}& {{e}}_{{1}{,}{1}}& {{e}}_{{1}{,}{2}}\\ {{f}}_{{2}{,}{1}}{}{{c}}_{{1}{,}{1}}{+}{{f}}_{{2}{,}{2}}{}{{c}}_{{2}{,}{1}}& {{f}}_{{2}{,}{1}}{}{{c}}_{{1}{,}{2}}{+}{{f}}_{{2}{,}{2}}{}{{c}}_{{2}{,}{2}}& {{e}}_{{2}{,}{1}}& {{e}}_{{2}{,}{2}}\end{array}\right]\\ {\mathrm{b}}{=}\left[\begin{array}{c}{{b}}_{{1}{,}{1}}\\ {{b}}_{{2}{,}{1}}\\ {0}\\ {0}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{cccc}{{c}}_{{1}{,}{1}}& {{c}}_{{1}{,}{2}}& {0}& {0}\\ {{c}}_{{2}{,}{1}}& {{c}}_{{2}{,}{2}}& {0}& {0}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{c}{0}\\ {0}\end{array}\right]\end{array}\right$ (4)

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. > $\mathrm{sys1d}≔\mathrm{StateSpace}\left('\mathrm{usesymbols}','\mathrm{numinputs}'=m+2,'\mathrm{numoutputs}'=p+3,'\mathrm{numstates}'=n\right):$$\mathrm{sys1d}:-d≔\mathrm{Matrix}\left(p+3,m+2\right):$
 > $\mathrm{feedback3}≔\mathrm{FeedbackConnect}\left(\left[\mathrm{sys1d}\right],\left[\left[1,-4\right],\left[3,-2\right]\right]\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{feedback3}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{4 output\left(s\right); 3 input\left(s\right); 2 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){,}{\mathrm{y4}}{}\left({t}\right)\right]\\ {\mathrm{statevariable}}{=}\left[{\mathrm{x1}}{}\left({t}\right){,}{\mathrm{x2}}{}\left({t}\right)\right]\\ {\mathrm{a}}{=}\left[\begin{array}{cc}{-}{{b}}_{{1}{,}{1}}{}{{c}}_{{4}{,}{1}}{-}{{b}}_{{1}{,}{3}}{}{{c}}_{{2}{,}{1}}{+}{{a}}_{{1}{,}{1}}& {-}{{b}}_{{1}{,}{1}}{}{{c}}_{{4}{,}{2}}{-}{{b}}_{{1}{,}{3}}{}{{c}}_{{2}{,}{2}}{+}{{a}}_{{1}{,}{2}}\\ {-}{{b}}_{{2}{,}{1}}{}{{c}}_{{4}{,}{1}}{-}{{b}}_{{2}{,}{3}}{}{{c}}_{{2}{,}{1}}{+}{{a}}_{{2}{,}{1}}& {-}{{b}}_{{2}{,}{1}}{}{{c}}_{{4}{,}{2}}{-}{{b}}_{{2}{,}{3}}{}{{c}}_{{2}{,}{2}}{+}{{a}}_{{2}{,}{2}}\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}}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{cc}{{c}}_{{1}{,}{1}}& {{c}}_{{1}{,}{2}}\\ {{c}}_{{2}{,}{1}}& {{c}}_{{2}{,}{2}}\\ {{c}}_{{3}{,}{1}}& {{c}}_{{3}{,}{2}}\\ {{c}}_{{4}{,}{1}}& {{c}}_{{4}{,}{2}}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{ccc}{0}& {0}& {0}\\ {0}& {0}& {0}\\ {0}& {0}& {0}\\ {0}& {0}& {0}\end{array}\right]\end{array}\right$ (5)

Example 4: Connect two MIMO systems with two negative feedback loops, as shown in the figure. > $\mathrm{sys1e}≔\mathrm{StateSpace}\left('\mathrm{usesymbols}','\mathrm{numinputs}'=m+2,'\mathrm{numoutputs}'=p+2,'\mathrm{numstates}'=n\right):$$\mathrm{sys1e}:-d≔\mathrm{Matrix}\left(p+2,m+2\right):$
 > $\mathrm{sys2e}≔\mathrm{StateSpace}\left('\mathrm{symbols}'=\left[e,f,g,h\right],'\mathrm{usesymbols}','\mathrm{numinputs}'=m+1,'\mathrm{numoutputs}'=p+2,'\mathrm{numstates}'=n\right):$$\mathrm{sys2e}:-d≔\mathrm{Matrix}\left(p+2,m+1\right):$
 > $\mathrm{feedback4}≔\mathrm{FeedbackConnect}\left(\left[\mathrm{sys1e},\mathrm{sys2e}\right],\left[\left[1,3,2,-2\right],\left[2,2,1,-3\right]\right]\right):$
 > $\mathrm{PrintSystem}\left(\mathrm{feedback4}\right)$
 $\left[\begin{array}{l}{\mathbf{State Space}}\\ {\mathrm{continuous}}\\ {\mathrm{3 output\left(s\right); 3 input\left(s\right); 4 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}}{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& {0}& {0}\end{array}\right]\\ {\mathrm{c}}{=}\left[\begin{array}{cccc}{{c}}_{{1}{,}{1}}& {{c}}_{{1}{,}{2}}& {0}& {0}\\ {{c}}_{{2}{,}{1}}& {{c}}_{{2}{,}{2}}& {0}& {0}\\ {{c}}_{{3}{,}{1}}& {{c}}_{{3}{,}{2}}& {0}& {0}\end{array}\right]\\ {\mathrm{d}}{=}\left[\begin{array}{ccc}{0}& {0}& {0}\\ {0}& {0}& {0}\\ {0}& {0}& {0}\end{array}\right]\end{array}\right$ (6) Compatibility

 • The DynamicSystems[FeedbackConnect] command was introduced in Maple 18.
 • For more information on Maple 18 changes, see Updates in Maple 18.