View Single Post
Old 09-22-2015, 08:32 AM   #2060 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
Cutting off filtering above a certain speed is the neat part. Each time the period gets cut in half, you cut the severity of the running average in half. Higher speed signals are cleaner, so you aren't really compromising anything. So, waveforms with half-periods greater than 16384/10000 seconds get a running average of
CurrentAverage = (1023*currentAverage + newNoisyCurrent)/1024.

Waveforms with half-periods greater than 8192/10000 seconds get a running average of
CurrentAverage = (511*currentAverage + newSlightlyLessNoisyCurrent)/512.

...
cut in half
cut in half
...

Waveforms with half-periods greater than 16/10000 seconds (get a running average of
CurrentAverage = (1*currentAverage + newcurrent)/2.

Anything with a half-period less than 16/10000 sec gets no filtering. But that works out to friggen 18750 RPM (electrical RPM)! The required shifting and scaling of the filtered signal in order to obtain the secret original is the exact same for all. Cut period in half, and cut filtering in half cancels itself out. The only tradeoff is less filtering on signals that are cleaner anyway!
__________________
kits and boards

Last edited by MPaulHolmes; 09-22-2015 at 08:46 AM..
  Reply With Quote
The Following 2 Users Say Thank You to MPaulHolmes For This Useful Post:
mpgmike (02-15-2022), thingstodo (09-22-2015)