Biomedical User Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I decide on sampling frequency?

Dear all,

I enjoy reading the discussions in this group very much. They all illustrate a keen interest in some of my areas of teaching in biomedical engineering.

One thing that strikes me, is the tendency to use inadequate sampling frequencies. The Nyquist sampling theorem says we should sample with a frequency that is more than twice the highest frequency in the continuous-time (some call it an analog) signal. But the question is, what is the highest frequency in the signal? I'll answer this based on our practice in a course where my students build an ECG ampligier and learn to develop a LabVIEW program for acquisition, filtering, display and logging to ascii file.

First one has to decide on the bandwidth of the information, one wants to acquire from the signal. For non-critical recordings of the ECG a bandwidth of 150 Hz is usually adequate. Following the instrumentation amplifier my students then have constructed a high-pass filter to block half-cell potentials in the electrode-skin interface and a low-pass filter for reducing aliasing, i.e. the effect of sampling with a too low sampling frequency. Our lowpass filter is a 4th order Butterworth filter with a cut-off frequency of 150 Hz. For every decade above 150 Hz, the filter attenuates the signal by 80 dB (20 dB per filter order). So at 1500 Hz our ECG signal is attenuated by 80 dB.

How much attenuation do we need? In our case we use a NI USB-6212 which has a 16 bit converter. The dynamic range of an ADC is approximately 6 dB per bit. Thus our ADC will not sense signals attenuated below 16 times 6 dB = 96 dB. We should then choose that frequency where our signal is attenuated 96 dB as our half-sampling frequency. We know from above that our lowpass filter gives 80 dB attenuation at 1500 Hz. While that in itself is not adequate to reach the criteria of 96 dB attenuation, we much remember that the ECG signal has an attenuation by itself, which at 1500 Hz certainly is more than 20 dB. Adding that to the filter attenuation of 80 dB we should have a signal attenuation at 1500 Hz of at least 100 dB.

We then define 1500 Hz as the highest frequency component in our signal and choose the sampling frequency to be two times that (from the Nyquist sampling theorem), so we end up with a sampling frequency for the ECG of 3000 Hz.

10 - 20 years ago such a high sampling frequency would have been considered completely fanatic. However, with current technology this is easily achieved.

In summary, we define the stop band frequency for our anti-aliasing (lowpass) filter to be that frequency, where the signal is attenuated below the lowest signal amplitude detectable by the ADC. Then we set our sampling frequency to be two times the filter stop band frequency. This approach is not specific to ECG signal, but can (should) be applied to signal sampling in general.

The consequences of sampling with too low sampling frequency is seen most easily in the amplitude spectrum of the signal (one of the results of performing a Fourier transformation). Some might then think that aliasing is only a problem if you need to do Fourier transformation of the sampled signal. This is not correct. The results of a Fourier transformation simply presents the same signal in a different manner. The errors introduced by aliasing is therefore also present in the time-domain signal, although there they are essentially impossible to see.

So, keep on sampling, just a little faster than you might think.

Best regards,

K. Henneberg, Associate professor, Ph. D.

Director of undergraduate studies in Medicine and Technology

Technical University of Denmark

Message 1 of 4
(16,007 Views)

Hi Dr. Henneberg,

Thank you for the posting - this is very nice and clear description of a process to determine the sampling rate in physiological data acquisition. I think that one of the reasons that many commercial monitoring and diagnostic instruments still do not sample at such high rates is that the aliasing introduced by lower sampling rates at some point is just too small to be seen in the time domain - after all, biosignals (like ECG or EEG) are still mostly visually interpreted by a physician and a small amount of aliasing artifact is too small to see given the dynamic range of the display device (whether a LCD screen or a print out).  The dynamic range of a traditional pen/ink strip chart recorder is probably about 100:1  (0.5mm pen width and 50mm total displacement) and I don't think most LCD screens are much better.  So pushing the aliasing artifact below a single bit of dynamic range in a 16-bit system is still considered overkill.  It is true, though, that the trade-offs that we we forced to make over the cost of higher sampling rates have largely disappeared (cost of A/D technology, processor and interface bandwidths, and memory/storage), so  there is little penalty to sampling at what seem today like very high sampling rates. 

Steve

0 Kudos
Message 2 of 4
(7,395 Views)

Dear Steve,

Thank you for your response. I agree completely. If you only want to study the acquired signal by visual inspection, then a lower sampling frequency is adequate.

However, as soon as you want to do quantitative feature extractions beyond heart rate calculations, or other types of more research oriented analyses, I still think one should avoid aliasing altogether.

A good example of disregard for aliasing is when our students download ECG waveforms from Physionet for their assigments in signal processing courses. On Physionet you will find ECG waveforms sampled at 360 Hz. Those signals were probably only ment for visual inspection, not for spectral analysis.

If one does not want to live with the larger data sets, it is very easy in LabVIEW to do further lowpass filtering and decimation of samples.

Best regards,

K. Henneberg

0 Kudos
Message 3 of 4
(7,395 Views)

I agree with Steve. Although ECG has a bandwidth up to 150 Hz, the spectrum analysis shows the majority of the frequency component is below 30 Hz. Even if there is a 150 Hz component, it is too small to be a concern even without the filtering. The bottom line is to determine the sampling frequency from the signal to be digitized, not from the response of the anti-aliazing filter. That is why a much lower sampling frequency is usually used, e.g. 500 Hz.

Wei Lin

0 Kudos
Message 4 of 4
(7,395 Views)