Reflection coefficients and denominator coefficients

Tutorial goal

Convert between reflection/PARCOR coefficients and a conventional IIR denominator.

Note

New to the terminology? See the lattice DSP concept map and the causality/data-use guide for how online, offline, block, and MIMO examples should be read.

Context

This is the shortest path into the package. A stable all-pole IIR filter can be represented either by denominator coefficients or by reflection coefficients. The reflection form is more convenient for adaptive work because stability is controlled by simple per-stage bounds.

Key idea and equations

For an all-pole denominator

\[A(z)=1+a_1z^{-1}+\cdots+a_pz^{-p},\]

scalar lattice stability is guaranteed when every reflection coefficient satisfies

\[|k_i| < 1.\]

How to read the result

Check that converting reflection coefficients to a denominator and back returns the original values up to numerical precision.

Run command

python examples/reflection_conversion.py

Run status

Return code: 0

Captured stdout

reflection: [0.7, -0.4, 0.25]
denominator: [1.0, 0.32, -0.295, 0.25]
restored: [0.7, -0.4, 0.25]
max pole radius: 0.9280944783322326

Source code

 1"""Reflection/PARCOR <-> denominator conversion demo."""
 2
 3import numpy as np
 4
 5from lattice_dsp import denominator_to_reflection, reflection_to_denominator
 6
 7reflection = [0.7, -0.4, 0.25]
 8denominator = reflection_to_denominator(reflection)
 9restored = denominator_to_reflection(denominator)
10poles = np.roots(denominator)
11
12print("reflection:", reflection)
13print("denominator:", [round(v, 6) for v in denominator])
14print("restored:", [round(v, 6) for v in restored])
15print("max pole radius:", float(np.max(np.abs(poles))))