control.feedback

control.feedback(sys1, sys2=1, sign=-1)[source]

Feedback interconnection between two I/O systems.

Parameters
  • sys1 (scalar, array, or InputOutputSystem) – I/O systems to combine.

  • sys2 (scalar, array, or InputOutputSystem) – I/O systems to combine.

  • sign (scalar) – The sign of feedback. sign = -1 indicates negative feedback, and sign = 1 indicates positive feedback. sign is an optional argument; it assumes a value of -1 if not specified.

Returns

out – Feedback interconnection of the systems.

Return type

scalar, array, or InputOutputSystem

Raises
  • ValueError – if sys1 does not have as many inputs as sys2 has outputs, or if sys2 does not have as many inputs as sys1 has outputs

  • NotImplementedError – if an attempt is made to perform a feedback on a MIMO TransferFunction object

Notes

This function is a wrapper for the feedback function in the I/O system classes. It calls sys1.feedback if sys1 is an I/O system object. If sys1 is a scalar, then it is converted to sys2’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)