Recursive IIR filters are compact and useful, but direct-form denominator updates can be numerically awkward. A small update to denominator coefficients can move poles outside the unit circle and turn a stable filter into an unstable one.
Lattice parameterizations give a stability-aware coordinate system. In the scalar case, reflection or PARCOR coefficients with magnitude less than one correspond to stable recursive filters.
The package focuses on workflows where these coordinates are useful:
The goal is not to replace broad DSP libraries such as SciPy. The goal is to provide a focused toolkit for lattice-parameterized recursive signal processing.
What the package does
For scalar IIR filters, lattice-dsp provides conversions between reflection coefficients and denominator polynomials, plus lattice and lattice-ladder filtering APIs.
For example, bounded reflection coefficients
|k_i| < 1
define a stable recursive denominator. This makes them useful for adaptive filtering, where unconstrained denominator updates can otherwise leave the stable region.
The package includes finite-section model-reduction tools for scalar and MIMO systems.
For scalar filters, lattice-dsp can build finite Hankel matrices from impulse responses and compute lower-order state-space or IIR candidates. For MIMO systems, it works with Markov tensors of shape
(\text{samples}, \text{outputs}, \text{inputs}).
These tools are documented as finite-dimensional diagnostics and baselines, not as full infinite-dimensional optimal solvers.
A distinctive part of lattice-dsp is the matrix/MIMO lattice direction.
The package includes examples and utilities for:
causal online MIMO lattice prediction;
matrix-lattice all-pass responses;
streaming paraunitary-style analysis;
finite-record adjoint diagnostics;
MIMO block-Hankel reduction;
bridge diagnostics from MIMO Markov data to matrix-lattice scaffolds;
finite definite tangential Schur/Pick checks.
The documentation separates causal runtime APIs from offline estimation and finite-record diagnostics. This distinction matters: a fitted model may be used causally, while the fitting or diagnostic step may require a full finite record.
Algorithms
The package connects several related DSP and systems ideas:
Schur and Levinson-Durbin recursions;
reflection/PARCOR stability coordinates;
lattice and lattice-ladder IIR realizations;
Burg AR estimation;
block Levinson and multichannel AR modeling;
finite Hankel operators and Ho-Kalman-style reduction;
finite-section Nehari/AAK intuition;
matrix all-pass and J-inner diagnostics;
right tangential Schur/Pick interpolation data.
The implementation uses a Python API with C++/pybind11 kernels for core filtering, finite-Hankel, and MIMO state-space routines.
Benchmarks
The benchmarks are intended to measure practical trade-offs rather than produce universal performance claims.