control.zpk
- control.zpk(zeros, poles, gain[, dt])[source]
Create a transfer function from zeros, poles, gain.
Given a list of zeros z_i, poles p_j, and gain k, return the transfer function:
- Parameters
- zerosarray_like
Array containing the location of zeros.
- polesarray_like
Array containing the location of poles.
- gainfloat
System gain.
- dtNone, True or float, optional
System timebase. 0 (default) indicates continuous time, True indicates discrete time with unspecified sampling time, positive number is discrete time with specified sampling time, None indicates unspecified timebase (either continuous or discrete time).
- inputs, outputs, statesstr, or list of str, optional
List of strings that name the individual signals. If this parameter is not given or given as None, the signal names will be of the form ‘s[i]’ (where ‘s’ is one of ‘u’, ‘y’, or ‘x’). 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.
- display_formatNone, ‘poly’ or ‘zpk’, optional
Set the display format used in printing the
TransferFunction
object. Default behavior is polynomial display and can be changed by changingconfig.defaults['xferfcn.display_format']
.
- Returns
- out
TransferFunction
Transfer function with given zeros, poles, and gain.
- out
Examples
>>> G = ct.zpk([1], [2, 3], gain=1, display_format='zpk') >>> print(G)