scipy.signal.tf2sos#
- scipy.signal.tf2sos(b, a, pairing=None, *, analog=False)[source]#
Return second-order sections from transfer function representation
- Parameters
- barray_like
Numerator polynomial coefficients.
- aarray_like
Denominator polynomial coefficients.
- pairing{None, ‘nearest’, ‘keep_odd’, ‘minimal’}, optional
The method to use to combine pairs of poles and zeros into sections. See
zpk2sos
for information and restrictions on pairing and analog arguments.- analogbool, optional
If True, system is analog, otherwise discrete.
New in version 1.8.0.
- Returns
- sosndarray
Array of second-order filter coefficients, with shape
(n_sections, 6)
. Seesosfilt
for the SOS filter format specification.
Notes
It is generally discouraged to convert from TF to SOS format, since doing so usually will not improve numerical precision errors. Instead, consider designing filters in ZPK format and converting directly to SOS. TF is converted to SOS by first converting to ZPK format, then converting ZPK to SOS.
New in version 0.16.0.