Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample signals with an anti-aliasing filter

Solved!
Go to solution

I am using PCI-6259, PCI 6221, and USB 6221 cards in different setups. What I understand is that the anti-aliasing filter on all these cards is fixed to pass up to 1MHz frequencies. If I am sampling a signal from a RG58U BNC cable which is supposed to contain highest usable frequency of 1kHz but there is high frequency noise present in there. Would sampling the signal at 2kHz be enough to acquire the signal properly, or would those high frequencies affect the low frequency components upon sampling?

 

I am reading about over-sampling which allows you to use digital filter (I'm guessing software-based filter can be used) if you sample the data at a higher rate. You still have to use anti-aliasing filter but the parameter requirements are more relaxed. Would this work in my case? The anti-aliasing filter on my cards has very high bandwidth so I'm not sure how much oversampling I should do to acquire the signal properly. Is there an equation?

 

Also, If the analog inputs to the DAQ cards are being generated by a filter (for exampling when recording ECG or EEG) which allows you to specify a frequency pass-band, do I still need an anti-aliasing filter? Would the distance between the amplifier and DAQ card many a difference when it comes to noise generation on the cable?

 

 

In general I'm just trying to see whether my current method of sampling at Nyquish rate with the cards I have is good or not. I simply record the data without even applying any digital filtering (software-based).

0 Kudos
Message 1 of 7
(6,098 Views)

Generally what you are trying to do with anti-aliasing is reduce the amount of out-of-band power enough to prevent the aliasing of that stuff so that it is insignificant.  You can't eliminate it completely.

 

Your EEG/ECG or other amplifiers that have built-in bandpass filtering will usually have gentle filter roll-offs (not sharp "brick wall" filters the way that anti-aliasing filters are typically designed).  For this reason, you will want to sample the outputs from these amplifiers at maybe 10 times the high cutoff to ensure that any out of band energy is well attenuated.  For example, an ECG amplifier that has a 50Hz high filter should probably be acquired at a minimum of 500Hz since the energy in this signal at the Nyquist (250Hz) should be well attenuated even with a gradually rolling off filter.

 

If you are doing biomedical acquisition, please visit our Biomedical User Community at www.ni.com/biomedusers - lots of good content, including a free LabVIEW Biomedical Starter Kit.

0 Kudos
Message 2 of 7
(6,061 Views)

Thank you Steve! That was very helpful.

Currently I am actually sampling everything including EEG and ECG at 10kS/s so I guess it's safe. Is there any document which I can refer to explain why I need to sample at approximately 10 times the high frequency?

 

What about signals that do not come from an amplifier or a device that bandpasses the signal? I am reading data from a temprature sensing device which produce an analog output containing the temperature as the signal value*100. If I don't care about the frequency components, do I still need a minimum sampling rate?

 

Finally, I am also sampling digital signals using the AiSampleClock. I would assume sampling at the Nyquist frequency for TTL signals would be good enough to prevent aliasing because there won't be any high frequency components in it due to noise. Is this a good assumption?

0 Kudos
Message 3 of 7
(6,050 Views)

You can find lots of papers/articles on sampling rate and anti-aliasing...but the 10x figure is just a good rule of thumb from experience.  Higher rates are better, but at some point you are wasting memory, processor time, A/D board cost, etc. needlessly.  At 10kS/s you are safely digitizing signals (and noise) up to the 5kHz Nyquist so there is no fear of aliasing signals up to that frequency.  Presumably there will be very little power anywhere up that high (or above) in the signal you are digitizing if the signal has power of interest in the 1-100Hz range.  If it does, then you have an inappropriately designed amplifier (and we are back to why people use anti-aliasing filters).  Bottom line:  the steeper the cut-off on your anti-aliasing filter, the closer to Nyquist you can set your sample rate which may be important from a speed, efficiency, cost, bandwidth, etc. perspective.  If you are not constrained much, then by all means set the sampling rate much higher than needed and then digitally post-filter in LabVIEW.

 

Your temperature device is filtering the output somehow if it is outputting an analog signal - the output is probably heavily filtered to prevent noise (power supply, coupled EMI/RFI interference, etc.) from showing up on the output.  You may want to sample the output 10/sec and average to get a more accurate/stable reading.  You'll just have to see how noisy the raw readings are and see how much this helps.

 

When sampling digital signals you are usually more concerned about losing timing information, so the sample rate that you choose is determined by the time resolution that you need to identify the edges of the signal and the minimum pulse width that you can detect.  For example, a 10kS/s sample rate will give you edge uncertainty or timing resolution of 1/10Khz or 0.1 msec and you could completely miss a pulse that is just slightly less than this in width.  There is actually lots of high frequency information in those pulses (that's what is creating those sharp edges - remember your Fourier series?) - but often you are only trying to detect 1's and 0's and not the actual shape of the waveform which is why Nyquist is not usually considered for digital detection. So pick a sampling rate that will guarantee that you will detect the shortest pulse you expect and fast enough to guarantee the timing resolution that you need for the pulse edges.

0 Kudos
Message 4 of 7
(6,045 Views)

Thanks again. It's much more clear now. I will look for some papers that talk about minimum sampling rate required for reducing aliasing.

 

As for the digital detection, I'm recording a TTL signal which has 100 us pulse duration, with a period of 1 second. Currently I'm recording it at 20S/s. This would give me a timing resolution of 50us which is enough to detect the 100 us pulse. Also, the jitter in detecting the rising edge would be 50 us. Even if I was sampling at slightly above 10kS/s, the timing resolution would be silghtly below 100us and the jitter would also be 100us, so that would be a fair sampling rate too. Is this correct?

0 Kudos
Message 5 of 7
(6,039 Views)
Solution
Accepted by topic author abdel2

That's correct - if you go down to 10kS/s then the timing resolution and minimum pulse detection would be 100us.  Whether that is a fair sampling rate or not depends on your requirements for timing accuracy and jitter.  In other words, if it is OK that your detection of the pulse could be delayed by up to 100us then a 10kS/s sampling rate should be OK.

Message 6 of 7
(6,025 Views)

Thank you! I have a much better understanding now.

0 Kudos
Message 7 of 7
(6,009 Views)