Create a transfer function system. Can create MIMO systems.
The function accepts either 1, 2, or 3 parameters:
tf(sys)
Convert a linear system into transfer function form. Always creates a new system, even if
sys
is already aTransferFunction
object.
tf(num, den)
Create a transfer function system from its numerator and denominator polynomial coefficients.
If
num
andden
are 1D array_like objects, the function creates a SISO system.To create a MIMO system,
num
andden
need to be 2D arrays of of array_like objects (a 3 dimensional data structure in total; for details see note below). If the denominator for all transfer function is the same,den
can be specified as a 1D array.
tf(num, den, dt)
Create a discrete-time transfer function system; dt can either be a positive number indicating the sampling time or True if no specific timebase is given.
tf([[G11, ..., G1m], ..., [Gp1, ..., Gpm]][, dt])
Create a p x m MIMO system from SISO transfer functions Gij. See
combine_tf
for more details.
tf('s')
or tf('z')
Create a transfer function representing the differential operator (‘s’) or delay operator (‘z’).
LTI
(StateSpace
or TransferFunction
)
A linear system that will be converted to a transfer function.
TransferFunction
2D list of SISO transfer functions to create MIMO transfer function.
Polynomial coefficients of the numerator.
Polynomial coefficients of the denominator.
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).
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']
.
TransferFunction
The new linear system.
List of strings that name the individual signals of the transformed system. If not given, the inputs and outputs are the same as the original system.
Set the prefix for input and output signals. Defaults = ‘u’, ‘y’.
System name. If unspecified, a generic name ‘sys[id]’ is generated with a unique integer id.
If num
and den
have invalid or unequal dimensions.
If num
or den
are of incorrect type.
Notes
MIMO transfer functions are created by passing a 2D array of coefficients: num[i][j]
contains the polynomial coefficients of the numerator for the transfer function from the (j+1)st input to the (i+1)st output, and den[i][j]
works the same way.
The list [2, 3, 4]
denotes the polynomial .
The special forms tf('s')
and tf('z')
can be used to create transfer functions for differentiation and unit delays.
Examples
>>> # Create a MIMO transfer function object >>> # The transfer function from the 2nd input to the 1st output is >>> # (3s + 4) / (6s^2 + 5s + 4). >>> num = [[[1., 2.], [3., 4.]], [[5., 6.], [7., 8.]]] >>> den = [[[9., 8., 7.], [6., 5., 4.]], [[3., 2., 1.], [-1., -2., -3.]]] >>> sys1 = ct.tf(num, den)
>>> # Create a variable 's' to allow algebra operations for SISO systems >>> s = ct.tf('s') >>> G = (s + 1)/(s**2 + 2*s + 1)
>>> # Convert a state space system to a transfer function: >>> sys_ss = ct.ss([[1, -2], [3, -4]], [[5], [7]], [[6, 8]], 9) >>> sys_tf = ct.tf(sys_ss)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4