control.sample_system¶
- control.sample_system(sysc, Ts, method='zoh', alpha=None, prewarp_frequency=None)¶
Convert a continuous time system to discrete time by sampling
- Parameters
sysc (LTI (
StateSpace
orTransferFunction
)) – Continuous time system to be convertedTs (float > 0) – Sampling period
method (string) – Method to use for conversion, e.g. ‘bilinear’, ‘zoh’ (default)
alpha (float within [0, 1]) – The generalized bilinear transformation weighting parameter, which should only be specified with method=”gbt”, and is ignored otherwise. See
scipy.signal.cont2discrete()
.prewarp_frequency (float within [0, infinity)) – The frequency [rad/s] at which to match with the input continuous- time system’s magnitude and phase (only valid for method=’bilinear’)
- Returns
sysd – Discrete time system, with sampling rate Ts
- Return type
linsys
Notes
See
StateSpace.sample()
orTransferFunction.sample()
for further details.Examples
>>> sysc = TransferFunction([1], [1, 2, 1]) >>> sysd = sample_system(sysc, 1, method='bilinear')