Forums

Spurious Goertzel Response to Input Change

Started by superlou August 3, 2007
I have been using the Goertzel to pick out two different frequencies from a
fairly noisy signal (testing using sine tones for now).  The response time
is also very critical in my application and I have been working to
compromise between the computing power available (an embedded DSP), time
required to gather samples, and frequency accuracy.  I think I've reached
a sweet spot where Goertzel output reacts/stabalizes in about 1 second and
has a bandwidth of about 1Hz.
 
Unfortunately, I've noticed that when the input to the system is changed
suddenly, like shifting the input tone frequency or a quick change in dB
level of the input, the other of the two Goertzel algorithms always spikes
high.  This occurs whether or not the input signal is increasing or
decreasing in amplitude or shifting further or closer in frequency.  I
suspected it may have been an aliasing affect since my analysis buffer
compounds a few sets of data to create an _almost_ sliding goertzel, but I
have not had any success with windowing or lowpass filtering.  I have been
searching for a solution, but I'm not sure what the technical name of this
phenomenon is and haven't had much luck.
 
I wold appreciate any suggestions and will provide more information if
it's helpful.
 
Thank you,
Louis Simons



On Aug 3, 8:11 am, "superlou" <lsim...@safeflight.com> wrote:
> I have been using the Goertzel to pick out two different frequencies from a > fairly noisy signal (testing using sine tones for now). The response time > is also very critical in my application and I have been working to > compromise between the computing power available (an embedded DSP), time > required to gather samples, and frequency accuracy. I think I've reached > a sweet spot where Goertzel output reacts/stabalizes in about 1 second and > has a bandwidth of about 1Hz. > > Unfortunately, I've noticed that when the input to the system is changed > suddenly, like shifting the input tone frequency or a quick change in dB > level of the input, the other of the two Goertzel algorithms always spikes > high. This occurs whether or not the input signal is increasing or > decreasing in amplitude or shifting further or closer in frequency. I > suspected it may have been an aliasing affect since my analysis buffer > compounds a few sets of data to create an _almost_ sliding goertzel, but I > have not had any success with windowing or lowpass filtering. I have been > searching for a solution, but I'm not sure what the technical name of this > phenomenon is and haven't had much luck. > > I wold appreciate any suggestions and will provide more information if > it's helpful. > > Thank you, > Louis Simons
Sudden changes in the value of a signal will introduce wideband frequency components; you would see spikes in the frequency content at many frequencies when you have a discontinuity in the waveform. Jason
On Fri, 03 Aug 2007 08:31:06 -0700, cincydsp wrote:

> On Aug 3, 8:11 am, "superlou" <lsim...@safeflight.com> wrote: >> I have been using the Goertzel to pick out two different frequencies from a >> fairly noisy signal (testing using sine tones for now). The response time >> is also very critical in my application and I have been working to >> compromise between the computing power available (an embedded DSP), time >> required to gather samples, and frequency accuracy. I think I've reached >> a sweet spot where Goertzel output reacts/stabalizes in about 1 second and >> has a bandwidth of about 1Hz. >> >> Unfortunately, I've noticed that when the input to the system is changed >> suddenly, like shifting the input tone frequency or a quick change in dB >> level of the input, the other of the two Goertzel algorithms always spikes >> high. This occurs whether or not the input signal is increasing or >> decreasing in amplitude or shifting further or closer in frequency. I >> suspected it may have been an aliasing affect since my analysis buffer >> compounds a few sets of data to create an _almost_ sliding goertzel, but I >> have not had any success with windowing or lowpass filtering. I have been >> searching for a solution, but I'm not sure what the technical name of this >> phenomenon is and haven't had much luck. >> >> I wold appreciate any suggestions and will provide more information if >> it's helpful. >> >> Thank you, >> Louis Simons > > Sudden changes in the value of a signal will introduce wideband > frequency components; you would see spikes in the frequency content at > many frequencies when you have a discontinuity in the waveform. >
Which means that _any_ linear bandpass filter that you put in there, Goertzel or not, will exhibit similar behavior. -- Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
>On Fri, 03 Aug 2007 08:31:06 -0700, cincydsp wrote: > >> On Aug 3, 8:11 am, "superlou" <lsim...@safeflight.com> wrote: >>> I have been using the Goertzel to pick out two different frequencies
from a
>>> fairly noisy signal (testing using sine tones for now). The response
time
>>> is also very critical in my application and I have been working to >>> compromise between the computing power available (an embedded DSP),
time
>>> required to gather samples, and frequency accuracy. I think I've
reached
>>> a sweet spot where Goertzel output reacts/stabalizes in about 1 second
and
>>> has a bandwidth of about 1Hz. >>> >>> Unfortunately, I've noticed that when the input to the system is
changed
>>> suddenly, like shifting the input tone frequency or a quick change in
dB
>>> level of the input, the other of the two Goertzel algorithms always
spikes
>>> high. This occurs whether or not the input signal is increasing or >>> decreasing in amplitude or shifting further or closer in frequency.
I
>>> suspected it may have been an aliasing affect since my analysis
buffer
>>> compounds a few sets of data to create an _almost_ sliding goertzel,
but I
>>> have not had any success with windowing or lowpass filtering. I have
been
>>> searching for a solution, but I'm not sure what the technical name of
this
>>> phenomenon is and haven't had much luck.
>> Sudden changes in the value of a signal will introduce wideband >> frequency components; you would see spikes in the frequency content at >> many frequencies when you have a discontinuity in the waveform. >>
So this is a textbook example of a sharp change in the time-domain being composed of a very wide curve in the frequency domain.
>Which means that _any_ linear bandpass filter that you put in there, >Goertzel or not, will exhibit similar behavior. >
While the frequency domain characteristics are inevitable, is there a means to mitigate some of the effect? So far most methods I have found involve averaging sets of data, except I cannot afford to wait the time required for the output to settle. In application, the filters should not see as sharp changes as those induced by my testing rig (signal levels should change smoothly in the real world), but I would have more confidence if the results currently weren't as severe. I was initially using a less efficient FFT before the Goertzel, and I did not see as much of this effect although the FFT is a linear transform. Are there any non-linear filters I could look look into?
On Aug 6, 5:21 am, "superlou" <lsim...@safeflight.com> wrote:
> >On Fri, 03 Aug 2007 08:31:06 -0700, cincydsp wrote: > > >> On Aug 3, 8:11 am, "superlou" <lsim...@safeflight.com> wrote: > >>> I have been using the Goertzel to pick out two different frequencies > from a > >>> fairly noisy signal (testing using sine tones for now). The response > time > >>> is also very critical in my application and I have been working to > >>> compromise between the computing power available (an embedded DSP), > time > >>> required to gather samples, and frequency accuracy. I think I've > reached > >>> a sweet spot where Goertzel output reacts/stabalizes in about 1 second > and > >>> has a bandwidth of about 1Hz. > > >>> Unfortunately, I've noticed that when the input to the system is > changed > >>> suddenly, like shifting the input tone frequency or a quick change in > dB > >>> level of the input, the other of the two Goertzel algorithms always > spikes > >>> high. This occurs whether or not the input signal is increasing or > >>> decreasing in amplitude or shifting further or closer in frequency. > I > >>> suspected it may have been an aliasing affect since my analysis > buffer > >>> compounds a few sets of data to create an _almost_ sliding goertzel, > but I > >>> have not had any success with windowing or lowpass filtering. I have > been > >>> searching for a solution, but I'm not sure what the technical name of > this > >>> phenomenon is and haven't had much luck. > >> Sudden changes in the value of a signal will introduce wideband > >> frequency components; you would see spikes in the frequency content at > >> many frequencies when you have a discontinuity in the waveform. > > So this is a textbook example of a sharp change in the time-domain being > composed of a very wide curve in the frequency domain. > > >Which means that _any_ linear bandpass filter that you put in there, > >Goertzel or not, will exhibit similar behavior. > > While the frequency domain characteristics are inevitable, is there a > means to mitigate some of the effect? So far most methods I have found > involve averaging sets of data, except I cannot afford to wait the time > required for the output to settle. In application, the filters should not > see as sharp changes as those induced by my testing rig (signal levels > should change smoothly in the real world), but I would have more > confidence if the results currently weren't as severe. > > I was initially using a less efficient FFT before the Goertzel, and I did > not see as much of this effect although the FFT is a linear transform.
Did you try to make any quick changes to your input test signals near the middle of your FFT windows? -- rhn A.T nicholson d.0.t C-o-M
>On Aug 6, 5:21 am, "superlou" <lsim...@safeflight.com> wrote: >> >On Fri, 03 Aug 2007 08:31:06 -0700, cincydsp wrote: >> >> >> On Aug 3, 8:11 am, "superlou" <lsim...@safeflight.com> wrote: >> >>> I have been using the Goertzel to pick out two different
frequencies
>> from a >> >>> fairly noisy signal (testing using sine tones for now). The
response
>> time >> >>> is also very critical in my application and I have been working to >> >>> compromise between the computing power available (an embedded
DSP),
>> time >> >>> required to gather samples, and frequency accuracy. I think I've >> reached >> >>> a sweet spot where Goertzel output reacts/stabalizes in about 1
second
>> and >> >>> has a bandwidth of about 1Hz. >> >> >>> Unfortunately, I've noticed that when the input to the system is >> changed >> >>> suddenly, like shifting the input tone frequency or a quick change
in
>> dB >> >>> level of the input, the other of the two Goertzel algorithms
always
>> spikes >> >>> high. This occurs whether or not the input signal is increasing
or
>> >>> decreasing in amplitude or shifting further or closer in
frequency.
>> I >> >>> suspected it may have been an aliasing affect since my analysis >> buffer >> >>> compounds a few sets of data to create an _almost_ sliding
goertzel,
>> but I >> >>> have not had any success with windowing or lowpass filtering. I
have
>> been >> >>> searching for a solution, but I'm not sure what the technical name
of
>> this >> >>> phenomenon is and haven't had much luck. >> >> Sudden changes in the value of a signal will introduce wideband >> >> frequency components; you would see spikes in the frequency content
at
>> >> many frequencies when you have a discontinuity in the waveform. >> >> So this is a textbook example of a sharp change in the time-domain
being
>> composed of a very wide curve in the frequency domain. >> >> >Which means that _any_ linear bandpass filter that you put in there, >> >Goertzel or not, will exhibit similar behavior. >> >> While the frequency domain characteristics are inevitable, is there a >> means to mitigate some of the effect? So far most methods I have
found
>> involve averaging sets of data, except I cannot afford to wait the
time
>> required for the output to settle. In application, the filters should
not
>> see as sharp changes as those induced by my testing rig (signal levels >> should change smoothly in the real world), but I would have more >> confidence if the results currently weren't as severe. >> >> I was initially using a less efficient FFT before the Goertzel, and I
did
>> not see as much of this effect although the FFT is a linear transform. > >Did you try to make any quick changes to your input >test signals near the middle of your FFT windows? >
I thought so, especially as the windows were longer when I was using an FFT. I will have to check on this tomorow. Could be that the FFT was just as susceptible and I didn't notice it. I've done some testing with a real signal (not sharply changing) and had pretty good results with little spurious response. If there was a means of controlling it I would be much more confident.
>-- >rhn A.T nicholson d.0.t C-o-M > >
>>On Aug 6, 5:21 am, "superlou" <lsim...@safeflight.com> wrote: >>> >On Fri, 03 Aug 2007 08:31:06 -0700, cincydsp wrote: >>> >>> >> On Aug 3, 8:11 am, "superlou" <lsim...@safeflight.com> wrote: >>> >>> I have been using the Goertzel to pick out two different >frequencies >>> from a >>> >>> fairly noisy signal (testing using sine tones for now). The >response >>> time >>> >>> is also very critical in my application and I have been working
to
>>> >>> compromise between the computing power available (an embedded >DSP), >>> time >>> >>> required to gather samples, and frequency accuracy. I think I've >>> reached >>> >>> a sweet spot where Goertzel output reacts/stabalizes in about 1 >second >>> and >>> >>> has a bandwidth of about 1Hz. >>> >>> >>> Unfortunately, I've noticed that when the input to the system is >>> changed >>> >>> suddenly, like shifting the input tone frequency or a quick
change
>in >>> dB >>> >>> level of the input, the other of the two Goertzel algorithms >always >>> spikes >>> >>> high. This occurs whether or not the input signal is increasing >or >>> >>> decreasing in amplitude or shifting further or closer in >frequency. >>> I >>> >>> suspected it may have been an aliasing affect since my analysis >>> buffer >>> >>> compounds a few sets of data to create an _almost_ sliding >goertzel, >>> but I >>> >>> have not had any success with windowing or lowpass filtering. I >have >>> been >>> >>> searching for a solution, but I'm not sure what the technical
name
>of >>> this >>> >>> phenomenon is and haven't had much luck. >>> >> Sudden changes in the value of a signal will introduce wideband >>> >> frequency components; you would see spikes in the frequency
content
>at >>> >> many frequencies when you have a discontinuity in the waveform. >>> >>> So this is a textbook example of a sharp change in the time-domain >being >>> composed of a very wide curve in the frequency domain. >>> >>> >Which means that _any_ linear bandpass filter that you put in there, >>> >Goertzel or not, will exhibit similar behavior. >>> >>> While the frequency domain characteristics are inevitable, is there a >>> means to mitigate some of the effect? So far most methods I have >found >>> involve averaging sets of data, except I cannot afford to wait the >time >>> required for the output to settle. In application, the filters
should
>not >>> see as sharp changes as those induced by my testing rig (signal
levels
>>> should change smoothly in the real world), but I would have more >>> confidence if the results currently weren't as severe. >>> >>> I was initially using a less efficient FFT before the Goertzel, and I >did >>> not see as much of this effect although the FFT is a linear
transform.
>> >>Did you try to make any quick changes to your input >>test signals near the middle of your FFT windows? >> > >I thought so, especially as the windows were longer when I was using an >FFT. I will have to check on this tomorow. Could be that the FFT was >just as susceptible and I didn't notice it. I've done some testing with
a
>real signal (not sharply changing) and had pretty good results with
little
>spurious response. If there was a means of controlling it I would be
much
>more confident.
Another interesting effect that has cropped up is that each goertzel I am running is responding (passing) to _two_ frequencies: the desired frequency, and one 4 Hz below it.
> >>-- >>rhn A.T nicholson d.0.t C-o-M >> >> >