control.sample_system

control.sample_system(sysc, Ts, method='zoh', alpha=None)

Convert a continuous time system to discrete time

Creates a discrete time system from a continuous time system by sampling. Multiple methods of conversion are supported.

Parameters:
  • sysc (linsys) – Continuous time system to be converted
  • Ts (real) – Sampling period
  • method (string) – Method to use for conversion: ‘matched’, ‘tustin’, ‘zoh’ (default)
Returns:

sysd – Discrete time system, with sampling rate Ts

Return type:

linsys

Notes

See TransferFunction.sample and StateSpace.sample for further details.

Examples

>>> sysc = TransferFunction([1], [1, 2, 1])
>>> sysd = sample_system(sysc, 1, method='matched')