bdalg.py
This file contains some standard block diagram algebra.
Routines in this module:
series parallel negate feedback
Feedback interconnection between two I/O systems.
Parameters : | sys1: scalar, StateSpace, or TransferFunction : The primary plant. : sys2: scalar, StateSpace, or TransferFunction : The feedback plant (often a feedback controller). : 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: StateSpace or TransferFunction : |
Raises : | ValueError :
NotImplementedError :
|
Return the negative of a system.
Parameters : | sys: StateSpace or TransferFunction : |
---|---|
Returns : | out: StateSpace or TransferFunction : |
Notes
This function is a wrapper for the __neg__ function in the StateSpace and TransferFunction classes. The output type is the same as the input type.
Examples
>>> sys2 = negate(sys1) # Same as sys2 = -sys1.
Return the parallel connection sys1 + sys2.
sys1: scalar, StateSpace, or TransferFunction sys2: scalar, StateSpace, or TransferFunction
Returns : | out: scalar, StateSpace, or TransferFunction : |
---|---|
Raises : | ValueError :
|
Notes
This function is a wrapper for the __add__ function in the StateSpace and TransferFunction classes. The output type is usually the type of sys1. If sys1 is a scalar, then the output type is the type of sys2.
>>> sys3 = parallel(sys1, sys2) # Same as sys3 = sys1 + sys2.
Return the series connection sys2 * sys1 for –> sys1 –> sys2 –>.
sys1: scalar, StateSpace, or TransferFunction sys2: scalar, StateSpace, or TransferFunction
Returns : | out: scalar, StateSpace, or TransferFunction : |
---|---|
Raises : | ValueError :
|
Notes
This function is a wrapper for the __mul__ function in the StateSpace and TransferFunction classes. The output type is usually the type of sys2. If sys2 is a scalar, then the output type is the type of sys1.
Examples
>>> sys3 = series(sys1, sys2) # Same as sys3 = sys2 * sys1.