pyFDN.is_uniallpass#

pyFDN.is_uniallpass(A, B, C, D, tol=1e-09)[source]#

Test whether the FDN is uniallpass (lossless with a diagonal Lyapunov matrix).

See Michaletzky, G. Factorization of discrete-time all-pass functions; and “Allpass Feedback Delay Networks” by Sebastian J. Schlecht.

Parameters:
  • A (ArrayLike) – Delay state-space matrices (feedback, input gain, output gain, direct).

  • B (ArrayLike) – Delay state-space matrices (feedback, input gain, output gain, direct).

  • C (ArrayLike) – Delay state-space matrices (feedback, input gain, output gain, direct).

  • D (ArrayLike) – Delay state-space matrices (feedback, input gain, output gain, direct).

  • tol (float) – Tolerance for zero and diagonal checks.

Return type:

tuple[bool, ndarray]

Returns:

  • is_a (bool) – True if the system is uniallpass.

  • P (ndarray) – Solution of discrete Lyapunov A P A’ - P + B B’ = 0; diagonal if uniallpass. All-NaN when A is not strictly stable, see the note below.

Notes

The Lyapunov equation only has a (unique, finite) solution when A is strictly stable. If A itself is lossless – as in the allpass-in-FDN structure, where the feedback matrix has all its eigenvalues on the unit circle – no such P exists, and the linear system scipy solves is exactly singular. Rather than let that surface as an ill-conditioned solve (which raises or returns garbage depending on the LAPACK build), the spectral radius is checked up front and the system reported as not uniallpass.