From: Tim Wescott on 23 Mar 2010 18:34 gretzteam wrote: >> The Goertzel filter is just a bandpass filter that you run for a finite >> amount of time. A notch filter is just your signal minus the output of >> a bandpass filter. So a scheme that uses a Goertzel filter to >> periodically measure amplitude and phase is _probably_ not going to work >> as well as a notch filter. >> >> Besides, there are better methods than Goertzel filters if you happen to >> be on a processor with oodles of resources compared to your problem, as >> is often the case these days. >> >> -- >> Tim Wescott >> Control system and signal processing consulting >> www.wescottdesign.com >> > > Hi, > Thanks for the comments on the Goertzel filter. I agree that even if I > could make that to work, I don't see how it could beat a simple notch > filter. > > I'm actually implementing this in straight hardware where power/area is a > concern. I would be interested in knowing if anything could better than the > Goertzel filter in this case (let's say I was trying to 'detect' this tone > instead of removing it). The complexity of a Goertzel is pretty much exactly the same as the complexity of a unity-gain bandpass or a notch. I'd use that. If you can stand detecting harmonics of the tone, demodulate it with a 2kHz square wave. That'll catch 2kHz, 6kHz, 10kHz, etc., but multiplying by 1 or -1 and accumulating sure doesn't use up much circuitry! If you've got multipliers to spare, then demodulate it with a 2kHz sine wave (and cosine wave). That'll catch _just_ 2kHz, and give you lots of control over what you do with the result. (In fact, you could do this instead of a PLL or a notch filter). -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
From: Dirk Bell on 23 Mar 2010 19:14 On Mar 23, 6:34 pm, Tim Wescott <t...(a)seemywebsite.now> wrote: > gretzteam wrote: > >> The Goertzel filter is just a bandpass filter that you run for a finite > >> amount of time. A notch filter is just your signal minus the output of > >> a bandpass filter. So a scheme that uses a Goertzel filter to > >> periodically measure amplitude and phase is _probably_ not going to work > >> as well as a notch filter. > > >> Besides, there are better methods than Goertzel filters if you happen to > >> be on a processor with oodles of resources compared to your problem, as > >> is often the case these days. > > >> -- > >> Tim Wescott > >> Control system and signal processing consulting > >>www.wescottdesign.com > > > Hi, > > Thanks for the comments on the Goertzel filter. I agree that even if I > > could make that to work, I don't see how it could beat a simple notch > > filter. > > > I'm actually implementing this in straight hardware where power/area is a > > concern. I would be interested in knowing if anything could better than the > > Goertzel filter in this case (let's say I was trying to 'detect' this tone > > instead of removing it). > > The complexity of a Goertzel is pretty much exactly the same as the > complexity of a unity-gain bandpass or a notch. I'd use that. > > If you can stand detecting harmonics of the tone, demodulate it with a > 2kHz square wave. That'll catch 2kHz, 6kHz, 10kHz, etc., but > multiplying by 1 or -1 and accumulating sure doesn't use up much circuitry! > > If you've got multipliers to spare, then demodulate it with a 2kHz sine > wave (and cosine wave). That'll catch _just_ 2kHz, and give you lots of > control over what you do with the result. (In fact, you could do this > instead of a PLL or a notch filter). > > -- > Tim Wescott > Control system and signal processing consultingwww.wescottdesign.com- Hide quoted text - > > - Show quoted text - Has the OP stated to what extent it is important to preserve the signal around 2 KHz or below it? Dirk
From: Tim Wescott on 23 Mar 2010 20:15 Dirk Bell wrote: > On Mar 23, 6:34 pm, Tim Wescott <t...(a)seemywebsite.now> wrote: >> gretzteam wrote: >>>> The Goertzel filter is just a bandpass filter that you run for a finite >>>> amount of time. A notch filter is just your signal minus the output of >>>> a bandpass filter. So a scheme that uses a Goertzel filter to >>>> periodically measure amplitude and phase is _probably_ not going to work >>>> as well as a notch filter. >>>> Besides, there are better methods than Goertzel filters if you happen to >>>> be on a processor with oodles of resources compared to your problem, as >>>> is often the case these days. >>>> -- >>>> Tim Wescott >>>> Control system and signal processing consulting >>>> www.wescottdesign.com >>> Hi, >>> Thanks for the comments on the Goertzel filter. I agree that even if I >>> could make that to work, I don't see how it could beat a simple notch >>> filter. >>> I'm actually implementing this in straight hardware where power/area is a >>> concern. I would be interested in knowing if anything could better than the >>> Goertzel filter in this case (let's say I was trying to 'detect' this tone >>> instead of removing it). >> The complexity of a Goertzel is pretty much exactly the same as the >> complexity of a unity-gain bandpass or a notch. I'd use that. >> >> If you can stand detecting harmonics of the tone, demodulate it with a >> 2kHz square wave. That'll catch 2kHz, 6kHz, 10kHz, etc., but >> multiplying by 1 or -1 and accumulating sure doesn't use up much circuitry! >> >> If you've got multipliers to spare, then demodulate it with a 2kHz sine >> wave (and cosine wave). That'll catch _just_ 2kHz, and give you lots of >> control over what you do with the result. (In fact, you could do this >> instead of a PLL or a notch filter). >> >> -- >> Tim Wescott >> Control system and signal processing consultingwww.wescottdesign.com- Hide quoted text - >> >> - Show quoted text - > > Has the OP stated to what extent it is important to preserve the > signal around 2 KHz or below it? Nope. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
From: glen herrmannsfeldt on 23 Mar 2010 20:43 gretzteam <gretzteam(a)n_o_s_p_a_m.yahoo.com> wrote: > I'm having problem getting rid of a 2kHz sine wave from a digitized signal > at 128kHz. I do know the exact frequency of the 2kHz (I generate it in the > first place with a DDS), but the phase/amplitude are unknown (it goes > through DAC->ADC. > Now, there seems to be two approach to do this, and I don't know > what would be best. The best way is to stop generating it in the first place. You don't mention that, so I am suggesting it here. Maybe there is a reason to generate it, or maybe not... -- glen
From: Vladimir Vassilevsky on 23 Mar 2010 20:54
glen herrmannsfeldt wrote: > gretzteam <gretzteam(a)n_o_s_p_a_m.yahoo.com> wrote: > > >>I'm having problem getting rid of a 2kHz sine wave from a digitized signal >>at 128kHz. I do know the exact frequency of the 2kHz (I generate it in the >>first place with a DDS), but the phase/amplitude are unknown (it goes >>through DAC->ADC. > > > >>Now, there seems to be two approach to do this, and I don't know >>what would be best. > > > The best way is to stop generating it in the first place. > You don't mention that, so I am suggesting it here. Maybe there > is a reason to generate it, or maybe not... The 2kHz is exact fraction of 128kHz by exact binary ratio of 64. So generating and using it is not a very good idea anyway. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com |