Hi, I have a question regarding filter coefficients for a Parks-McClellan filter. I'm trying to write a simple software loop for the filter using its difference equation, but I've noticed a difference between the number of taps. For, say, a ten tap FIR filter designed using a Hamming window, there will be eleven filter coefficients C0, C1,...C10 which mulitply by the filter inputs x(n) to get an out y(n) like so:- y(n) = x(n)*C0 + x(n-1)*C1+.....x(n-10)*C10 For a tenth order filter designed using the Parks-McClellan method I get ten coefficients C0 - C9. So what I'm assuming is that the way to go is the following:- y(n) = x(n)*C0 + x(n-1)*C1+.....x(n-9)*C9 Is this correct?
Parks-McClellan FIR Filter
Started by ●March 23, 2009
Reply by ●March 23, 20092009-03-23
On Mon, 23 Mar 2009 12:17:50 -0500, "mike2108" <michealhoran@hotmail.com> wrote:>Hi, > >I have a question regarding filter coefficients for a Parks-McClellan >filter.Parks-McClellan is an algorithm for determining filter coefficients given some input constraints. I think you mean you have a FIR filter designed using Parks-McClellan. Just a nit.>I'm trying to write a simple software loop for the filter using its >difference equation, but I've noticed a difference between the number of >taps. > >For, say, a ten tap FIR filter designed using a Hamming window, there will >be eleven filter coefficients C0, C1,...C10 > >which mulitply by the filter inputs x(n) to get an out y(n) like so:- > >y(n) = x(n)*C0 + x(n-1)*C1+.....x(n-10)*C10 > >For a tenth order filter designed using the Parks-McClellan method I get >ten coefficients C0 - C9. So what I'm assuming is that the way to go is the >following:- > >y(n) = x(n)*C0 + x(n-1)*C1+.....x(n-9)*C9 > >Is this correct?Looks right to me. Eric Jacobsen Minister of Algorithms Abineau Communications http://www.ericjacobsen.org Blog: http://www.dsprelated.com/blogs-1/hf/Eric_Jacobsen.php
Reply by ●March 23, 20092009-03-23
>On Mon, 23 Mar 2009 12:17:50 -0500, "mike2108" ><michealhoran@hotmail.com> wrote: > >>Hi, >> >>I have a question regarding filter coefficients for a Parks-McClellan >>filter. > >Parks-McClellan is an algorithm for determining filter coefficients >given some input constraints. I think you mean you have a FIR filter >designed using Parks-McClellan. > >Just a nit. > >>I'm trying to write a simple software loop for the filter using its >>difference equation, but I've noticed a difference between the numberof>>taps. >> >>For, say, a ten tap FIR filter designed using a Hamming window, therewill>>be eleven filter coefficients C0, C1,...C10 >> >>which mulitply by the filter inputs x(n) to get an out y(n) like so:- >> >>y(n) = x(n)*C0 + x(n-1)*C1+.....x(n-10)*C10 >> >>For a tenth order filter designed using the Parks-McClellan method Iget>>ten coefficients C0 - C9. So what I'm assuming is that the way to go isthe>>following:- >> >>y(n) = x(n)*C0 + x(n-1)*C1+.....x(n-9)*C9 >> >>Is this correct? > >Looks right to me. > >Eric Jacobsen >Minister of Algorithms >Abineau Communications >http://www.ericjacobsen.org > >Blog: http://www.dsprelated.com/blogs-1/hf/Eric_Jacobsen.php >Thanks very much Eric. Mike
Reply by ●March 23, 20092009-03-23
On Mar 23, 1:17�pm, "mike2108" <michealho...@hotmail.com> wrote:> Hi, > > I have a question regarding filter coefficients for a Parks-McClellan > filter. > > I'm trying to write a simple software loop for the filter using its > difference equation, but I've noticed a difference between the number of > taps. > > For, say, a ten tap FIR filter designed using a Hamming window, there will > be eleven filter coefficients C0, C1,...C10You appear to be using an 11 point window (nonzero points).> > which mulitply by the filter inputs x(n) to get an out y(n) like so:- > > y(n) = x(n)*C0 + x(n-1)*C1+.....x(n-10)*C10 > > For a tenth order filter designed using the Parks-McClellan method I get > ten coefficients C0 - C9. So what I'm assuming is that the way to go is the > following:- > > y(n) = x(n)*C0 + x(n-1)*C1+.....x(n-9)*C9 > > Is this correct?
Reply by ●March 23, 20092009-03-23
mike2108 wrote:> Hi, > > I have a question regarding filter coefficients for a Parks-McClellan > filter.Note Eric's nit.> I'm trying to write a simple software loop for the filter using its > difference equation, but I've noticed a difference between the number of > taps. > > For, say, a ten tap FIR filter designed using a Hamming window, there will > be eleven filter coefficients C0, C1,...C10That's an eleven-tap filter, nor ten.> which mulitply by the filter inputs x(n) to get an out y(n) like so:- > > y(n) = x(n)*C0 + x(n-1)*C1+.....x(n-10)*C10 > > For a tenth order filter designed using the Parks-McClellan method I get > ten coefficients C0 - C9. So what I'm assuming is that the way to go is the > following:- > > y(n) = x(n)*C0 + x(n-1)*C1+.....x(n-9)*C9Because the software does it right.> Is this correct?Ten taps is correct. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●March 24, 20092009-03-24
Well, you have to be careful talking about the "number of taps" and the "order". A first order filter has two taps, etc. Fred
Reply by ●March 24, 20092009-03-24
>mike2108 wrote: >> Hi, >> >> I have a question regarding filter coefficients for a Parks-McClellan >> filter. > >Note Eric's nit. >Noted>> I'm trying to write a simple software loop for the filter using its >> difference equation, but I've noticed a difference between the numberof>> taps. >> >> For, say, a ten tap FIR filter designed using a Hamming window, therewill>> be eleven filter coefficients C0, C1,...C10 > >That's an eleven-tap filter, nor ten. > >> which mulitply by the filter inputs x(n) to get an out y(n) like so:- >> >> y(n) = x(n)*C0 + x(n-1)*C1+.....x(n-10)*C10 >> >> For a tenth order filter designed using the Parks-McClellan method Iget>> ten coefficients C0 - C9. So what I'm assuming is that the way to go isthe>> following:- >> >> y(n) = x(n)*C0 + x(n-1)*C1+.....x(n-9)*C9 > >Because the software does it right. > >> Is this correct? > >Ten taps is correct. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >����������������������������������������������������������������������� >>Well, you have to be careful talking about the "number of taps" and the >"order".>A first order filter has two taps, etc.>FredThanks very much for the replies, I'll be more careful in future.