03-05-2010 04:46 PM
I am using a NI USB-6210 to sample a pressure sensor. The pressure sensor has 0-5Vdc that corresponds to 0-30psia. In air the sensor rides around 2.5V (~1 atm ~ 14.4psi). I have notice some interesting / undesired noise if I am sampling below 10KHz. Specifically I see ~1 to 3 Hz ripple when do a running average of a hundred points. For example, it is very evident when I sample at 4 Khz (see attached image). At a frequency say, 16Khz sampling the low frequency ripple is gone (see attached image). In both images the grey is the raw data and the blue line is a 100 point running average. Granted these are pretty low level signal...the pk to pk noise once averaged is around a millivolt. Its just the fact that the noise has some sturcture that really bothers me. I do not believe this is a result of the average, however, I may be missing someting. My thinking is if the noise is something in the environment shouldn't I resolve the structure better at higher frequency, it shouldn't go away, right? I am use to seeing 60Hz noise for power supplies and such and do not see anything like that. What kind of physical process could be going on around a hertz? Could be static build up on the ADC? Anyone run into a similiar issue? Any best practices out there...should I be grounding the unused AI channels? BTW I am sampling using differential input.
Any help would be appreciated. Thanks
03-08-2010 06:09 PM
Hey Chris, and welcome to the NI Discussion Forums!
I have two things to mention about this.
1. Notice the y-scale of your graphs. On the first one, 4kHz with the noise, you can see that the noise is about 1mV pk-pk. On the second graph, the y-scale is a little tighter, but the noise is still about 1mV pk-pk. So the overall accuracy is about the same. This doesn't answer the question of the 3Hz frequency, but it is interesting to note.
2. On both cases you are averaging 100 points. At 4kHz this equals 0.025 seconds. Try increasing the number of points averaged at 16kHz to 400, in order to have the same time frame averaged. I'd be interested to see what that looks like.
03-12-2010 08:46 AM
Some thoughts.
1. I'm not so sure your running average isn't a factor. If it is, then I'd expect Eric's suggestion to average the same time interval worth of data in each trial to produce a similar 1-3 Hz artifact at a lower amplitude.
2. Off-to-the-side experiment. Investigate the properties of your running average filter. For example, generate the data for a 42 Hz or a 21 Hz sine wave with a 4 kHz update rate. Now pass it through your 100-pt (40 Hz) running average filter. I predict a low amplitude 2 Hz sinusoidal artifact. This is analogous (but not identical) to the aliasing you'd get if you sampled a 42 Hz waveform at 40 Hz.
3. Consider doing FFT's on your data *before* the running average. Look for freq "spikes" that don't shift with sample rate.
As to your thinking about a higher sampling rate doing a better job of resolving the structure of a periodic phenomenon - yes you're on the right track. However, once you're already oversampling by 10-20x, there are diminishing returns from increasing the sample rate. You're already oversampling the apparent 1-3 Hz phenomenon by at least 1000x, so there's little if anything left to gain.
-Kevin P