control.series¶
- control.series(sys1, sys2[, ..., sysn])[source]¶
Return the series connection (sysn * … *) sys2 * sys1.
- Parameters
sys1 (scalar, StateSpace, TransferFunction, or FRD) –
*sysn (other scalars, StateSpaces, TransferFunctions, or FRDs) –
- Returns
out
- Return type
scalar, StateSpace, or TransferFunction
- Raises
ValueError – if sys2.ninputs does not equal sys1.noutputs if sys1.dt is not compatible with sys2.dt
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.
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.series(G1, G2) # Same as sys3 = sys2 * sys1 >>> G.ninputs, G.noutputs, G.nstates (1, 1, 7)
>>> G1 = ct.rss(2, inputs=2, outputs=3) >>> G2 = ct.rss(3, inputs=3, outputs=1) >>> G = ct.series(G1, G2) # Same as sys3 = sys2 * sys1 >>> G.ninputs, G.noutputs, G.nstates (2, 1, 5)