nengolib.signal.pole_zero_cancel¶
-
nengolib.signal.pole_zero_cancel(sys, tol=1e-08)[source]¶ Pole/zero cancellation within a given tolerance.
Sometimes referred to as the minimal realization in state-space. [1] This (greedily) finds pole-zero pairs within a given tolerance, and removes them from the transfer function representation.
Parameters: - sys :
linear_system_like Linear system representation.
- tol :
float, optional Absolute tolerance to identify pole-zero pairs. Defaults to
1e-8.
Returns: - reduced_sys :
LinearSystem Reduced linear system in zero-pole-gain form.
References
[1] http://www.mathworks.com/help/control/ref/minreal.html Examples
See Linear System Model Reduction for a notebook example.
>>> from nengolib.signal import pole_zero_cancel, s >>> sys = (s - 1) / ((s - 1) * (s + 1)) >>> assert pole_zero_cancel(sys) == 1 / (s + 1)
- sys :