control.combine_tf
- control.combine_tf(tf_array, **kwargs)[source]
Combine array of transfer functions into MIMO transfer function.
- Parameters
- tf_arraylist of list of
TransferFunction
or array_like Transfer matrix represented as a two-dimensional array or list-of-lists containing
TransferFunction
objects. TheTransferFunction
objects can have multiple outputs and inputs, as long as the dimensions are compatible.
- tf_arraylist of list of
- Returns
TransferFunction
Transfer matrix represented as a single MIMO
TransferFunction
object.
- 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
InputOutputSystem
for more information.- 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 timebase of transfer functions do not match.
- ValueError
If
tf_array
has incorrect dimensions.- ValueError
If the transfer functions in a row have mismatched output or input dimensions.
Examples
Combine two transfer functions:
>>> s = ct.tf('s') >>> ct.combine_tf( ... [[1 / (s + 1)], ... [s / (s + 2)]], ... name='G' ... ) TransferFunction( [[array([1])], [array([1, 0])]], [[array([1, 1])], [array([1, 2])]], name='G', outputs=2, inputs=1)
Combine NumPy arrays with transfer functions:
>>> ct.combine_tf( ... [[np.eye(2), np.zeros((2, 1))], ... [np.zeros((1, 2)), ct.tf([1], [1, 0])]], ... name='G' ... ) TransferFunction( [[array([1.]), array([0.]), array([0.])], [array([0.]), array([1.]), array([0.])], [array([0.]), array([0.]), array([1])]], [[array([1.]), array([1.]), array([1.])], [array([1.]), array([1.]), array([1.])], [array([1.]), array([1.]), array([1, 0])]], name='G', outputs=3, inputs=3)