Engee documentation

rc2poly

Conversion of reflection coefficients into a prediction filter polynomial.

Library

EngeeDSP

Syntax

Function call

  • a = rc2poly(k) — returns a vector a the coefficients of the prediction filter obtained from the vector k reflection coefficients of the lattice structure.

  • a,eFinal = rc2poly(k,r0) — also returns the final prediction error eFinal based on zero -delay autocorrelation r0.

Arguments

Input arguments

# k — reflection coefficients

+ vector

Details

A list of reflection coefficients specified as a vector.

Типы данных

Float32, Float64

Support for complex numbers

Yes

# r0 — zero-delay autocorrelation

+ scalar

Details

Zero-delay autocorrelation, given as a scalar.

Типы данных

Float32, Float64

Support for complex numbers

Yes

Output arguments

# a — coefficients of the prediction filter

+ vector

Details

Prediction filter coefficients returned as a string vector of length , where — the number of elements of the vector k. The function returns the first column of the vector a equal 1, thus, a[1] = 1.

# eFinal — the power of the finite prediction error

+ scalar

Details

The error power of the final prediction, returned as a scalar.

Examples

An equivalent representation in the form of a prediction filter

Details

Consider a lattice IIR filter given by a set of reflection coefficients. We find its equivalent representation in the form of a prediction filter.

import EngeeDSP.Functions: rc2poly

k = [0.3090 0.9800 0.0031 0.0082 -0.0082]

a = rc2poly(k)
1×6 Matrix{Float64}:
 1.0  0.614816  0.989881  2.42604e-5  0.00315796  -0.0082

Algorithms

Function rc2poly calculates the output vector a using Levinson recursion [1]. Function:

  1. Sets the output vector a equal to the first element k.

  2. It cycles through the remaining elements k.

    For each iteration i cycle a = [a + a[i−1:−1:1] * k[i]; k[i]].

  3. Implements a = [1 a].

Literature

  1. Kay, Steven M. Modern Spectral Estimation. Englewood Cliffs, NJ: Prentice-Hall, 1988.