Signal Processing Toolbox Previous page   Next Page

Time-Domain Based Modeling

The lpc, prony, and stmcb functions find the coefficients of a digital rational transfer function that approximates a given time-domain impulse response. The algorithms differ in complexity and accuracy of the resulting model.

Linear Prediction

Linear prediction modeling assumes that each output sample of a signal, x(k), is a linear combination of the past n outputs (that is, it can be "linearly predicted" from these outputs), and that the coefficients are constant from sample to sample:

An nth-order all-pole model of a signal x is

To illustrate lpc, create a sample signal that is the impulse response of an all-pole filter with additive white noise:

The coefficients for a fourth-order all-pole filter that models the system are

lpc first calls xcorr to find a biased estimate of the correlation function of x, and then uses the Levinson-Durbin recursion, implemented in the levinson function, to find the model coefficients a. The Levinson-Durbin recursion is a fast algorithm for solving a system of symmetric Toeplitz linear equations. lpc's entire algorithm for n = 4 is

You could form the linear prediction coefficients with other assumptions by passing a different correlation estimate to levinson, such as the biased correlation estimate:

Prony's Method (ARMA Modeling)

The prony function models a signal using a specified number of poles and zeros. Given a sequence x and numerator and denominator orders n and m, respectively, the statement

finds the numerator and denominator coefficients of an IIR filter whose impulse response approximates the sequence x.

The prony function implements the method described in [4] Parks and Burrus (pgs. 226-228). This method uses a variation of the covariance method of AR modeling to find the denominator coefficients a, and then finds the numerator coefficients b for which the resulting filter's impulse response matches exactly the first n + 1 samples of x. The filter is not necessarily stable, but it can potentially recover the coefficients exactly if the data sequence is truly an autoregressive moving-average (ARMA) process of the correct order.

A model for the test sequence x (from the earlier lpc example) using a third-order IIR filter is

The impz command shows how well this filter's impulse response matches the original sequence:

Notice that the first four samples match exactly. For an example of exact recovery, recover the coefficients of a Butterworth filter from its impulse response:

Try this example; you'll see that bb and aa match the original filter coefficients to within a tolerance of 10-13.

Steiglitz-McBride Method (ARMA Modeling)

The stmcb function determines the coefficients for the system b(z)/a(z) given an approximate impulse response x, as well as the desired number of zeros and poles. This function identifies an unknown system based on both input and output sequences that describe the system's behavior, or just the impulse response of the system. In its default mode, stmcb works like prony.

stmcb also finds systems that match given input and output sequences:

In this example, stmcb correctly identifies the system used to create y from x.

The Steiglitz-McBride method is a fast iterative algorithm that solves for the numerator and denominator coefficients simultaneously in an attempt to minimize the signal error between the filter output and the given output signal. This algorithm usually converges rapidly, but might not converge if the model order is too large. As for prony, stmcb's resulting filter is not necessarily stable due to its exact modeling approach.

stmcb provides control over several important algorithmic parameters; modify these parameters if you are having trouble modeling the data. To change the number of iterations from the default of five and provide an initial estimate for the denominator coefficients:

The function uses an all-pole model created with prony as an initial estimate when you do not provide one of your own.

To compare the functions lpc, prony, and stmcb, compute the signal error in each case:

In comparing modeling capabilities for a given order IIR model, the last result shows that for this example, stmcb performs best, followed by prony, then lpc. This relative performance is typical of the modeling functions.


Previous page  Parametric Modeling Frequency-Domain Based Modeling Next page

© 1994-2005 The MathWorks, Inc.