Re: how to avoid phase shift introduced due to low pass filtering.



On Wed, 30 Apr 2008 10:18:07 -0400, Jerry Avins wrote:

rajesh wrote:
hi,

I have a signal sampled at 16 kHz and i have a corresponding
timing file which contains
the time values of certain discrete events occurring in this
signal.

Now I want to down sample this signal to 8 kHz and then mark
those events occuring
in the signal using the timing file.

This looks straight forward but there is problem with it coz
when i am downsampling the
16 kHz signal to 8 kHz i need to pass the 16 kHz signal through
a low pass filter which
introduces a phase shift into the signal. coz of this phase
shift I am not able to mark the
events correctly in the downsampled 8 KHz signal.

I tried reversing the signal and passing it through the lowpass
filter again before down
sampling. But is this the correct way of doing it. What is the
best way to deal with this problem?

You _can_ remove the phase shift by running the file backwards, as you
suggest. Be aware that the amplitude response of the filter is squared.
That increases attenuation in the stopband, but also ripple in the
passband. A symmetric FIR produces no phase shift; why not use one?

Note also that any filter corrupts both ends of the file. The transients
are as long as the filter's impulse response, so with any one filter,
the more passes, the more of the file is currupted.

Jerry

More correctly (and yes, I'm picking nits), a symmetric FIR has an
_easily predictable_ phase shift -- it's just a pure delay that doesn't
change with frequency. If you're doing this all as a post-processing
operation then this delay is no problem at all; if you're trying to do
this in real time, with your events getting detected and labeled within
some finite amount of time, then it may be a big deal.

--
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
.



Relevant Pages

  • Re: Multiplex decoder nearly rewired.
    ... >> I saw the filter in the Quad circuit and i don't know what F it is for, 55khz, ... > 55 kHz, with a null tuned to 67 kHz according to the alignment ... The parallel LC circuit is in series with the composite signal going to the matrix. ... > still necessary in the US to eliminate the 67 kHz SCA sub carrier, ...
    (rec.audio.tubes)
  • Re: Multiplex decoder nearly rewired.
    ... since there is no 19kHz filter indicated. ... 55 kHz, with a null tuned to 67 kHz according to the alignment ... > so that good separation is possible across a wide band. ... constant vs. frequency for the demodulated left and right audio signals. ...
    (rec.audio.tubes)
  • Re: how to avoid phase shift introduced due to low pass filtering.
    ... I have a signal sampled at 16 kHz and i have a corresponding ... in the signal using the timing file. ... filter again before down ... A symmetric FIR produces no phase shift; ...
    (comp.dsp)
  • Re: how to avoid phase shift introduced due to low pass filtering.
    ... I have a signal sampled at 16 kHz and i have a corresponding ... in the signal using the timing file. ... filter again before down ... More correctly, a symmetric FIR has an _easily predictable_ phase shift -- it's just a pure delay that doesn't change with frequency. ...
    (comp.dsp)
  • Re: Filter =?ISO-8859-1?Q?f=FCr_PWM?=
    ... Ich habe die Bauteilwerte mit dem Programm "Filter Pro" ... Stufe garnicht, das Filtern machen dann die Stufen dahinter. ... Ich habe grade nochmal die PWM unter verschiedenen Bedingungen simuliert. ... Bei einer bestimmten symmetrischen Erzeugung könnte bei 20 KHz PWM noch 4 KHz Signal möglich zu sein. ...
    (de.sci.electronics)