Hi,

I have a voltage signal (average 1VDC) with some noise on it, ie.

50mV-100mV peak to peak. I am reading this signal into a PC from a DAQ

in 100 sample chunks and would like to display a calculation of the real

time noise for each chunk. What would be a good way to do this? I was

thinking something like THD or RMS voltage noise but I am not sure..

Boxcar moving average and sum of squares then divide by the number of

samples and using the identity < (x-<x>)^2 > = <x^2>-<x>^2

That give the variance and sqrt give you an rms value.

NB the latter is potentially numerically unstable so its better to

subtract an x0 from all readings and add it back at the end. There is a

more correct way but for engineering purposes x0 can be your first ever

sample (or better the mean of the first throw away block).

It won't really matter for 5-10% noise on a baseline but it would matter

for 1ppm noise on a baseline where (1+e)^2 = 1 + 2e + e^2 gets bad

rounding problems on the "e^2" term as e becomes small.

Possibly also worth monitoring it for long term linear drift which is

common with thermal effects.

If you intend to look for harmonic content you might find it helpful to

use a power of two length. 2^N FFTs are common 10^n are less so.

Daqarta will actually do a realtime Fourier analysis for you with zero

effort provided that the signal is in the audio band and you don't mind

plugging it into your PCs sound card. Usually a bit of mains hum too.

http://www.daqarta.com/
Actually a very cute little program. It might even do what you asked for

out of the box in it's latest incarnation. It's a couple of years since

I last did anything with it.

Regards,

Martin Brown