Forums

Question about IIR-filters in MATLAB (initial/final conditions)

Started by James February 9, 2006
Hello,

When using the function [y,s]=filter(b,a,x,s) in MATLAB
and b=1 and a=[0.5 0.5] we have a filter with infinite impulse
response. Why does MATLAB operate with the convention
that the length of the transient s is max(length(b),length(a))-1 ?
Is there something magical about this ? In theory the
response is infinite, so the length of the transient could also
be 10, 20 or 100 or something else....

What's the explanation for this choice?

Thanks in advance...



James wrote:
> Hello, > > When using the function [y,s]=filter(b,a,x,s) in MATLAB > and b=1 and a=[0.5 0.5] we have a filter with infinite impulse > response. Why does MATLAB operate with the convention > that the length of the transient s is max(length(b),length(a))-1 ? > Is there something magical about this ? In theory the > response is infinite, so the length of the transient could also > be 10, 20 or 100 or something else.... > > What's the explanation for this choice? > > Thanks in advance...
Are you sure that number is for the transient? I believe that's the number of delay taps. It lets you pass the delays to filter so you can break filtering up into mupltiple frames. The number of delays is always one less than the max number of coefficients. -- -Todd http://www.signalsguru.net/
"James" <james@nadaspam.thanx> wrote in message 
news:43ebcc51$0$78282$157c6196@dreader1.cybercity.dk...
> Hello, > > When using the function [y,s]=filter(b,a,x,s) in MATLAB > and b=1 and a=[0.5 0.5] we have a filter with infinite impulse > response. Why does MATLAB operate with the convention > that the length of the transient s is max(length(b),length(a))-1 ? > Is there something magical about this ? In theory the > response is infinite, so the length of the transient could also > be 10, 20 or 100 or something else.... > > What's the explanation for this choice?
Sorry if I misled you as I was learning it myself.... The zf is the state/content/output of each of the delays and not the filter output. Fred