Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | zero lag Butterworth filter

There are 6 messages in this thread.

You are currently looking at messages 0 to 6.


zero lag Butterworth filter - adamchapman - 2010-01-25 15:55:00

Im trying to implement a zero-lag butterworth Filtert as described in
tha paper at
http://www3.uta.edu/faculty/ricard/Grad%20Biomech/Pezzack/Robertson%20(2003)%20Design%20and%20responses%20of%20butterwor
th%20filters.pdf

My understanding is that the output of the filter needs to be reversed
and passed back through the filter a second time, but this time with
the data in reverse.

I think that in eqn(7) of the paper; for the second pass trought the
filter, I just replace the x's with the output of the first filter
pass, but the data multiplied by the "b" coefficients puzzle me. I
suppose they would be replaced with previous outputs of the second
filter pass.

However, I don't see how the data is reversed for this second pass.

Any help is greatly appreciated.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: zero lag Butterworth filter - Tim Wescott - 2010-01-25 17:39:00



On Mon, 25 Jan 2010 12:55:46 -0800, adamchapman wrote:

> Im trying to implement a zero-lag butterworth Filtert as described in
> tha paper at
> http://www3.uta.edu/faculty/ricard/Grad%20Biomech/Pezzack/Robertson%20
(2003)%20Design%20and%20responses%20of%20butterworth%20filters.pdf
> 
> My understanding is that the output of the filter needs to be reversed
> and passed back through the filter a second time, but this time with the
> data in reverse.

Correct.
> 
> I think that in eqn(7) of the paper; for the second pass through the
> filter, I just replace the x's with the output of the first filter pass,
> but the data multiplied by the "b" coefficients puzzle me. I suppose
> they would be replaced with previous outputs of the second filter pass.

Yes.  The filter itself does not change, just the data that you pass 
through it.

> However, I don't see how the data is reversed for this second pass.

You have a vector of data x, with elements x[0] through x[n].  You run 
that through the filter specified by (7) once to get a filtered vector 
y.  Then you set 
x[0] = y[n], x[1] = y[n-1], etc. to x[n] = y[0].
Then you run this new x through the _same_ filter to get the filtered 
vector y (which is in reverse time).  Then you time-reverse y _again_ to 
get the answer you're looking for.

In case this wasn't clear before, this algorithm only works after the 
fact -- you can't apply it in real time.

-- 
www.wescottdesign.com
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: zero lag Butterworth filter - adamchapman - 2010-01-27 06:19:00

> In case this wasn't clear before, this algorithm only works after the
> fact -- you can't apply it in real time.

Ah, I suppose it's useless for following stock prices then



______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: zero lag Butterworth filter - Rune Allnor - 2010-01-27 07:32:00

On 27 Jan, 12:19, adamchapman <adamchapman1...@hotmail.co.uk> wrote:
> > In case this wasn't clear before, this algorithm only works after the
> > fact -- you can't apply it in real time.
>
> Ah, I suppose it's useless for following stock prices then

Well - yes.

And it has nothing to do with the filter being zero phase
or real time or anything like that. Filters as used in DSP
are designed from the assumption that the data are stationary,
which stock market data are not.

Stock market data are, to some extent, similar to random
walk data, which DSP filters are not very well suited to
deal with. So if you want to mess with data with random
walk-type characteristics, you might want to find analysis
methods that are better suited to random walk-type data.

Rune
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: zero lag Butterworth filter - Jerry Avins - 2010-01-27 09:04:00

Rune Allnor wrote:
> On 27 Jan, 12:19, adamchapman <adamchapman1...@hotmail.co.uk> wrote:
>>> In case this wasn't clear before, this algorithm only works after the
>>> fact -- you can't apply it in real time.
>> Ah, I suppose it's useless for following stock prices then
> 
> Well - yes.
> 
> And it has nothing to do with the filter being zero phase
> or real time or anything like that. Filters as used in DSP
> are designed from the assumption that the data are stationary,
> which stock market data are not.
> 
> Stock market data are, to some extent, similar to random
> walk data, which DSP filters are not very well suited to
> deal with. So if you want to mess with data with random
> walk-type characteristics, you might want to find analysis
> methods that are better suited to random walk-type data.

I want a filter that will tell me the name of a winner at the track 
tomorrow. If the stock market, why not the racetrack?

Jerry
-- 
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: zero lag Butterworth filter - robert bristow-johnson - 2010-01-27 14:41:00

On Jan 25, 3:55=A0pm, adamchapman <adamchapman1...@hotmail.co.uk> wrote:
> Im trying to implement a zero-lag butterworth filter as described in
> tha paper athttp://www3.uta.edu/faculty/ricard/Grad%20Biomech/Pezzack/Rob=
ertson%2...
>
> My understanding is that the output of the filter needs to be reversed
> and passed back through the filter a second time, but this time with
> the data in reverse.

are you referring to what is commonly called "filtfilt"?

if so, the end response is not a butterworth, but some filter with |H
(w)|^2.

> I think that in eqn(7) of the paper; for the second pass through the
> filter, I just replace the x's with the output of the first filter
> pass, but the data multiplied by the "b" coefficients puzzle me. I
> suppose they would be replaced with previous outputs of the second
> filter pass.
>
> However, I don't see how the data is reversed for this second pass.

is this real time?  if not real time, isn't it obvious?

but if it *is* real time, then one does it with a buffer and blocks of
samples, and there's an issue of overlap-adding the results with those
of the previous block.  but it won't be *zero* lag.  the end result
will be constant delay for all frequencies, which can be considered
"zero-lag" along with this known and fixed delay.

r b-j
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.