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
zeros (array_like) – Array containing the location of zeros.
poles (array_like) – Array containing the location of poles.
gain (float) – System gain
dt (None, 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 (str, 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.outputs (str, 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.states (str, 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.name (string, optional) – System name (used for specifying signals). If unspecified, a generic name <sys[id]> is generated with a unique integer id.
display_format (None, 'poly' or 'zpk', optional) – Set the display format used in printing the TransferFunction object. Default behavior is polynomial display and can be changed by changing config.defaults[‘xferfcn.display_format’].
- Returns
out – Transfer function with given zeros, poles, and gain.
- Return type
Examples
>>> G = ct.zpk([1], [2, 3], gain=1, display_format='zpk') >>> print(G)