control.matlab.feedback
- control.matlab.feedback(sys1, sys2=1, sign=-1, **kwargs)[source]
Feedback interconnection between two I/O systems.
- Parameters:
- sys1, sys2scalar, array, or
InputOutputSystem I/O systems to combine.
- signscalar, optional
The sign of feedback.
sign=-1indicates negative feedback (default), andsign=1indicates positive feedback.
- sys1, sys2scalar, array, or
- Returns:
- out
InputOutputSystem Feedback interconnection of the systems.
- out
- Other Parameters:
- inputs, outputsstr, or list of str, optional
List of strings that name the individual signals. If not given, signal names will be of the form ‘s[i]’ (where ‘s’ is one of ‘u’, or ‘y’). See
InputOutputSystemfor more information.- statesstr, or list of str, optional
List of names for system states. If not given, state names will be of of the form ‘x[i]’ for interconnections of linear systems or ‘<subsys_name>.<state_name>’ for interconnected nonlinear systems.
- namestring, optional
System name (used for specifying signals). If unspecified, a generic name ‘sys[id]’ is generated with a unique integer id.
- Raises:
- ValueError
If
sys1does not have as many inputs assys2has outputs, or ifsys2does not have as many inputs assys1has outputs.- NotImplementedError
If an attempt is made to perform a feedback on a MIMO
TransferFunctionobject.
Notes
This function is a wrapper for the
feedbackfunction in the I/O system classes. It calls sys1.feedback ifsys1is an I/O system object. Ifsys1is a scalar, then it is converted tosys2’s type, and the corresponding feedback function is used.Examples
>>> G = ct.rss(3, inputs=2, outputs=5) >>> C = ct.rss(4, inputs=5, outputs=2) >>> T = ct.feedback(G, C, sign=1) >>> T.ninputs, T.noutputs, T.nstates (2, 5, 7)