Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a filter identified. 2

Status
Not open for further replies.

itsmoked

Electrical
Feb 18, 2005
19,114
I have a filter, I need someone to bell this cat;


FilteredValue = (0.3 x LastFilteredValue) + [(1.0 - 0.3) x Value]
LastFilteredValue = FilteredValue

What kind of filter is this, weighted box?
Can you point me to an explaination somewhere?

Thanks for the help.
 
Replies continue below

Recommended for you

I think that it has a variety of names. Alpha-beta is one name.

TTFN
 
It appears to me that it is a single pole, recursive, low pass filter.
 
To me, it looks like a first order low pass. Very similar to an RC filter. Also known as an IIR 1st order LP filter. And that is what sreid says too.
 
Huh, never heard of an Alpha-beta IRstuff.

I will search for all combinations.

Thanks much guys..

BTW: It's a nice filter for microprocessors because you can avoid division.

 
It does look like something used in Alpha-Beta, but only the Alpha part (=0.3) is used.

In a physical (Newton) system you usually have Distance, speed, acceleration etc. With those 3 states you have a Alpha-Beta-Gamma (or G-H-K) filter, where the 3 'Greeks' are the gain parameters for each state. (Not including the derived time matrix. 1, t, sqr(t)/2 etc.)

Digital filters like this are the core in regulators, trackers and Kalman filters.
 
IRstuff, that book certainly helped me a lot about a year ago!!!!
I even made it through all the matrix stuff implementing a full Kalman thing :)

I later settled for the easier Simpson filter also mentioned there.
 
itsmoked,

Do you want or need the equations for the coefficients of the filter?
 
sreid; Thank you, but no.

This it turns out, is more generally called, a Weighted Moving Average filter. Turns out it is one of the three standard stock market filters used. Apparently traders frequently use a 200 day moving average. But if a stock starts moving quickly with large amplitude the two hundred day moving average doesn't reflect this worth a dang. So they weight the previous 199 days less and "today" more.

Which is what this filter does (and works well!). The reason I wrote it with that strange second subtraction is to remind me that what ever percent you weight the past with, you must contend with on the present, so everything stays 100%.

Thanks everyone for the help!
 
Weighted moving average is slightly different, since stale data beyond the cutoff is ignored completely.

The filter you describe would be more colloquially called a weighted fading memory filter, because, as long as you have precision to resolve it, every old sample is still weighted into the current value. The weighting of the old value dictates the time constant of the memory of the filter.

TTFN
 
I would agree with that title, for those reasons, absolutely.

I might even call it a "weighted infinite memory filter".
Since there is a piece of the very first reading in the latest calculation. Rather like trying to dilute a batch of liquid by changing out 70% over and over.
 
Yes, that's why it is called an IIR filter (Infinite Impulse Response). Energy from the first sample never really dies (if you forget about truncation). The other type (FIR, Finite Impulse Response) does away with the earlier samples after a finite number of clocks.

Is my terminology very outdated? Or do we not speak the same language when it comes to filters?
 
It just depends on the context.

EE -- IIR, FIR
Finance -- Moving average
Radar -- alpha-beta
Navigation -- Kalman

commensurate with those is that the implementer is usually a different discipline as well

TTFN
 
Thanks! IR.

Much needed clarification!!

I think that I am too much EE - and very little finance or navigation.
 
IRstuff; That is right on! That's exactly what I was seeing in my search of at least 100 sites.

It never solidified in my mind in that clear form.

A star!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor