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..

What's wrong with you? This is a group that discusses global whining, propane prices, water heaters, politics, religion, etc. Please try to stay on topic.

What's wrong with you? This is a group that discusses global whining, propane prices, water heaters, politics, religion, etc. Please try to stay on topic.

----------

What an ignoramous! You must have LID(Liberal infantile Disorder)?

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..

--
Assuming you know the exact representation of the voltage signal then you
can characterize the noise as you wish. RMS, dbV, dbM, THD, or whatever is

Take N samples. Sum and divide by N to get the mean.

Make another pass, summing (sample-mean) squared

Divide that sum by N.

Take the square root.

Bigger N will give more consistant results. 100 is a tad low.

But check that the DAQ board noise is lower than what you're trying to measure. You can do that by shorting the DAQ input and computing the RMS of that.

It's also fun to run an FFT on the samples (lots of them!) and see the frequency structure of the noise.

Signal to noise ratio in this group is good compared to some other groups! I have learned most of what I know about electronics from the people in this group.

Boxcar moving average and sum of squares then divide by the number of samples and using the identity < (x-)^2 > = -^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.

formatting link

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.

I'll tell you how to compute the total harmonic distortion of a DC signal if you'll tell me what the first non-zero frequency harmonic of a 0Hz signal is.

It sounds like you don't know what's signal and what's noise -- that's a sure sign that your measurement will be meaningless.

Having said that, if your signal is much more slowly varying than the time it takes to get your vector of 100 points, and if the noise at that frequency means anything to you (which it shouldn't, if it doesn't have any signal mixed in), then you can just calculate the mean and variance of the 100 points. Mean = signal, variance = noise.

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.