scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
residuez(b, a, tol=0.001, rtype='avg')

If :None:None:`M` is the degree of numerator b and :None:None:`N` the degree of denominator a:

        b(z)     b[0] + b[1] z**(-1) + ... + b[M] z**(-M)
H(z) = ------ = ------------------------------------------
        a(z)     a[0] + a[1] z**(-1) + ... + a[N] z**(-N)

then the partial-fraction expansion H(z) is defined as:

        r[0]                   r[-1]
= --------------- + ... + ---------------- + k[0] + k[1]z**(-1) ...
  (1-p[0]z**(-1))         (1-p[-1]z**(-1))

If there are any repeated roots (closer than :None:None:`tol`), then the partial fraction expansion has terms like:

     r[i]              r[i+1]                    r[i+n-1]
-------------- + ------------------ + ... + ------------------
(1-p[i]z**(-1))  (1-p[i]z**(-1))**2         (1-p[i]z**(-1))**n

This function is used for polynomials in negative powers of z, such as digital filters in DSP. For positive powers, use residue .

See Notes of residue for details about the algorithm.

Parameters

b : array_like

Numerator polynomial coefficients.

a : array_like

Denominator polynomial coefficients.

tol : float, optional

The tolerance for two roots to be considered equal in terms of the distance between them. Default is 1e-3. See unique_roots for further details.

rtype : {'avg', 'min', 'max'}, optional

Method for computing a root to represent a group of identical roots. Default is 'avg'. See unique_roots for further details.

Returns

r : ndarray

Residues corresponding to the poles. For repeated poles, the residues are ordered to correspond to ascending by power fractions.

p : ndarray

Poles ordered by magnitude in ascending order.

k : ndarray

Coefficients of the direct polynomial term.

Compute partial-fraction expansion of b(z) / a(z).

See Also

invresz
residue
unique_roots

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.signal._signaltools.invresz scipy.signal._signaltools.residue

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/signal/_signaltools.py#2723
type: <class 'function'>
Commit: