# prony

Prony method for filter design

## Syntax

[Num,Den] = prony(impulse_resp,num_ord,denom_ord)

## Description

[Num,Den] = prony(impulse_resp,num_ord,denom_ord) returns the numerator Num and denominator Den coefficients for a causal rational system function with impulse response impulse_resp. The system function has numerator order num_ord and denominator order denom_ord. The lengths of Num and Den are num_ord+1 and denom_ord+1. If the length of impulse_resp is less than the largest order (num_ord or denom_ord), impulse_resp is padded with zeros. Enter 0 in num_ord for an all-pole system function. For an all-zero system function, enter a 0 for denom_ord.

## Definitions

The system function is the z-transform of the impulse response h[n]:

$H\left(z\right)=\sum _{n=-\infty }^{\infty }h\left[n\right]\text{ }\text{\hspace{0.17em}}{z}^{-n}$

A rational system function is a ratio of polynomials in z-1. By convention the numerator polynomial is B(z) and the denominator is A(z). The following equation describes a causal rational system function of numerator order num_ord q and denominator order denom_ord p :

$H\left(z\right)=\frac{\sum _{k=0}^{q}b\left[k\right]\text{ }\text{\hspace{0.17em}}{z}^{-k}}{1+\sum _{l=1}^{p}a\left[l\right]\text{ }\text{\hspace{0.17em}}{z}^{-l}}$

where a[0]=1.

## Examples

collapse all

### Filter Responses via Prony's Method

Fit a 4th-order IIR model to the impulse response of a lowpass filter. Plot the original and Prony-designed impulse responses.

d = designfilt('lowpassiir','NumeratorOrder',4,'DenominatorOrder',4, ...
'HalfPowerFrequency',0.2,'DesignMethod','butter');

impulse_resp = filter(d,[1 zeros(1,31)]);
denom_order = 4;
num_order = 4;
[Num,Den] = prony(impulse_resp,num_order,denom_order);

subplot(2,1,1)
stem(impz(Num,Den,length(impulse_resp)))
title 'Impulse Response with Prony Design'

subplot(2,1,2)
stem(impulse_resp)
title 'Input Impulse Response'

Fit a 10th-order FIR model to the impulse response of a highpass filter. Plot the original and Prony-designed frequency responses.

d = designfilt('highpassfir', 'FilterOrder', 10, 'CutoffFrequency', .8);

impulse_resp = filter(d,[1 zeros(1,31)]);
num_order = 10;
denom_order = 0;
[Num,Den] = prony(impulse_resp,num_order,denom_order);

fvt = fvtool(Num,Den,d);
legend(fvt,'Prony','Original')

## References

Parks, Thomas W., and C. Sidney Burrus. Digital Filter Design. New York: John Wiley & Sons, 1987, pp 226–228.