mmitton
Newbie
- Joined
- May 24, 2012
- Messages
- 3
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- South Africa
- Activity points
- 1,353
And does not a simple low-pass RC filter perform a "running average" of the input signal?Still "running average" is the wrong name for the filter. It's just a simple first order low pass filter.
No.And does not a simple low-pass RC filter perform a "running average" of the input signal?
Ok, so semantically it does not conform to the mathematical definition of a "running average" even though it performs an average over time of the input signal, similar to a mathematical running average (albeit they can give somewhat different results).No.
If you write the mathematical equations of an RC filter and a running average (which i’m too lazy to do) you’ll see that they’re different. Basically, an RC output is an integral from t=0, a running average is calculated over a fixed block of time.
Sorry but last I checked, you are not in charge of what I call something.your filter: is a first order low pass. Don't call it "averaging" at all.
Sorry but last I checked, you are not in charge of what I call something.
Since you stubbornly refuse to accept reality, here's a thought experiment for you: Say you have a dc signal of 1 microvolt, and there's a transient of 50000000000000000 volts. The effect of that transient will persist forever in your RC filter; it will disappear once the moving-average window moves past that time.Sorry but last I checked, you are not in charge of what I call something.
It does an average of the signal over time, so I will continue to call it "averaging" even if it's not technically a "running average".
I did an internet search and understand what a "mathematical" running average is.
That does not mean it has to be a mathematical running average to be called an average over time.
I agree on the technical definition of a running average.Call a bird a dog if you feel better then. It just spreads confusion. There are definitions, and a technician should follow them.
I already said I understood the difference.Since you stubbornly refuse to accept reality,
A running average (moving average): https://en.wikipedia.org/wiki/Moving_averageAnd does not a simple low-pass RC filter perform a "running average" of the input signal?
Yes, I know: You see no problem.But I seen no problem with saying that an RC filter performs an average of the input over time.
Not the way I do it, but perhaps this is not called a "running average", although it acts the same as an RC low-pass filter running averager.
You take a sample and add a small percentage (typically some factor of 2 to simplify the math) of the difference (with sign) between that and the previous average value to give a new average value (emulating an RC low-pass filter).
There is no window size, and the averaging "time-constant" is determined by the sample frequency and what percentage of the difference that you add.
Okay, thanks for posting that.This is a "weighted moving average". If you don't include the word "weighted", people who read what you have written will assume that you mean that the weights are equal. That is what is commonly understood. If you just called your procedure a "weighted moving average" nobody could complain.
How many lines of code does it require and how many samples per second is it calculating?The code runs on an ATMEGA328. The running average code is quite fast.
I see that it certainly has a settling time benefit if that is needed in the application.I guess you should try it to find out about the benefit.
It's ADC data rate is 2 channels 3600samples/s 24bit resolution. Continously real time processing. Surely losing not a single sampleHow many lines of code does it require and how many samples per second is it calcul
I've build a true RMS measurement device for mains frequency (50Hz). It squares all input values, calculates the (what I call "true" running) average. Calculates the square root.
If you do the "averaging" with your filter, you either get a lot of ripple, or it takes long time to settle.
With my FIR averaging it takes less than 26ms to settle to less than 0.1% (ripple)
(Mathematically it should be perfect (no ripple and 20ms settling time) but only for perfect 50.000Hz. My solution needs 26ms because it also takes care for small frequency deviations)
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?