From: adamchapman on
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.

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.
From: Tim Wescott on
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
From: adamchapman on

> 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



From: Rune Allnor on
On 27 Jan, 12:19, adamchapman <adamchapman1...(a)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
From: Jerry Avins on
Rune Allnor wrote:
> On 27 Jan, 12:19, adamchapman <adamchapman1...(a)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.
�����������������������������������������������������������������������