Does A Simple Cap Filter Amount To An Exponential Running Average?

The capacitor is between the output and ground.

Bret Cahill

Reply to
Bret Cahill
Loading thread data ...

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D If you know the source impedance, you know the RC time constant, and the average can be exactly calculated.

Reply to
BobG

The discrete "exponential running average" has a half life which is probably related to / analogous to the RC time const.

formatting link

It's easy to run some numbers in Excel to get an idea of how fast the noise can be smoothed away.

Bret Cahill

Reply to
Bret Cahill

Output of what? That matters.

John

Reply to
John Larkin

The quotient of two signals where one or both have some noise.

A resistor is added or it already has some inherent resistance. The cap is only to smooth out the noise.

The exponential moving average, at least on Excel seems to do the trick. Recent data are heavily weighted, yet large disruptions have little effect, at least if they are short term.

The results aren't nearly as good adding "noise" to a signal on SPICE. The problem may be the "noise" I'm adding is just a pulse or sine function with a constant frequency.

Maybe using several dozen voltage sources, each with only one pulse but at different times, will properly simulate the noise.

Bret Cahill

Reply to
Bret Cahill

I'm not a SPICE user, but I'd be surprised if there wasn't some built-in way to simulate noise. If you can generate a (pseudo) random value for each sample, that's pure white noise.

Best regards,

Bob Masta DAQARTA v4.51 Data AcQuisition And Real-Time Analysis

formatting link
Scope, Spectrum, Spectrogram, Sound Level Meter FREE Signal Generator Science with your sound card!

Reply to
Bob Masta

After playing with some noise on SPICE, a parallel LC to ground tuned to the frequency of the signal seems to amount to an exponential moving average.

It takes longer to get up and running but once it's going it's pretty up to date and pretty impervious to short term noise, even recent large fluctuations.

A simple analog circuit makes it possible to know everything that's going on in case something goes wrong. Saying, "duh, I don't know . . ." doesn't get it.

Even having the right answer doesn't work in many situations.

It's an unforgiving world.

Bret Cahill

Reply to
Bret Cahill

The analog must be ac, the moving average dc.

Bret Cahill

Reply to
Bret Cahill

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.