control.matlab.parallel
- control.matlab.parallel(sys1, sys2[, ..., sysn])[source]
Return the parallel connection sys1 + sys2 (+ … + sysn).
- Parameters
sys1 (scalar, array, or
InputOutputSystem
) – I/O systems to combine.sys2 (scalar, array, or
InputOutputSystem
) – I/O systems to combine.... (scalar, array, or
InputOutputSystem
) – I/O systems to combine.sysn (scalar, array, or
InputOutputSystem
) – I/O systems to combine.inputs (str, 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.outputs (str, 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.states (str, 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.
name (string, optional) – System name (used for specifying signals). If unspecified, a generic name <sys[id]> is generated with a unique integer id.
- Returns
out – Parallel interconnection of the systems.
- Return type
scalar, array, or
InputOutputSystem
- Raises
ValueError – if sys1 and sys2 do not have the same numbers of inputs and outputs
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.
If both systems have a defined timebase (dt = 0 for continuous time, dt > 0 for discrete time), then the timebase for both systems must match. If only one of the system has a timebase, the return timebase will be set to match it.
Examples
>>> G1 = ct.rss(3) >>> G2 = ct.rss(4) >>> G = ct.parallel(G1, G2) # Same as sys3 = sys1 + sys2 >>> G.ninputs, G.noutputs, G.nstates (1, 1, 7)
>>> G1 = ct.rss(3, inputs=3, outputs=4) >>> G2 = ct.rss(4, inputs=3, outputs=4) >>> G = ct.parallel(G1, G2) # Add another system >>> G.ninputs, G.noutputs, G.nstates (3, 4, 7)