Biomedical Engineering Reference
In-Depth Information
SAMPLING RATE AND THE NYQUIST THEOREM
Without doubt you have heard that according to the Nyquist theorem, a signal should be
sampled at twice its frequency. Yes, and no. There is no data acquisition concept that is
more quoted and less well understood than the Nyquist theorem. Let's explore what this
theorem actually implies for proper data acquisition. Nyquist stated that any bandwidth-
limited signal can be reconstructed from its digitized equivalent if the sample rate is at least
twice the highest-frequency component.
Signal components with a frequency above half the sampling rate are aliased and show
up in a reconstruction as a component with a frequency at the di
ff
erence between its real
frequency and the sampling rate. This e
films of moving cars,
where the wheels seem to be rotating impossibly slow, or even going backward. The aliased
rotation frequency is caused by the slow shutter rate of the camera relative to the fast rota-
tional speed of the wheels' rims. For a dramatic demonstration, pay attention to the appar-
ent behavior of the wheels of a speeding stagecoach in virtually any old western movie.
The way of preventing aliasing is to ensure that there are absolutely no signal compo-
nents at frequencies above half the sampling rate. Assuming that to sample a signal of
approximately x hertz you simply need to select an A/D rate of 2 x just doesn't cut it. The
only ways of making sure are to supersample 2 the signal and to apply antialiasing
ff
ect is commonly seen in
fi
fi
filtering.
Perfectionists insist that all signals to be sampled must be low-pass
filtered to prevent
aliasing. In reality, however, many signals can be sampled fast enough that they are natu-
rally low-pass
fi
filtered by the response of the sensor or by the process being measured. For
example, temperature changes in the body occur so slowly that sampling a temperature
sensor even once per minute su
fi
ces to eliminate aliases by supersampling. Despite this,
care must be taken that power line noise or other high-frequency interference does not con-
taminate the sensor signal by using appropriate shielding, di
ff
erential ampli
fi
cation, and/or
a simple RC low-pass
fi
filter. A good rule of thumb to avoid aliasing when an antiliasing
fi
filter is not used is to supersample at a sampling rate of at least 10 times the highest
expected (un
ltered) signal component.
Ten times supersampling can be unachievable when your application involves the
acquisition of high-frequency signals. Here, the use of antialiasing
fi
fi
filters is unavoidable.
The ideal antialias
fi
filter would be a sharp low-pass
fi
filter that passes all frequencies below
its cutoff
at half the sampling frequency and totally eliminates any components above that
frequency. As we saw in Chapter 2, however, real-world
ff
filters do not yield a perfect step
in the frequency domain, and they will always allow through some components above their
corner frequency. This means that, in practice, sampling must happen at a rate higher than
twice the
fi
fi
filter's cutoff
ff
frequency. Please note that the antialiasing
fi
filter must be an analog
implementation—it is too late to use digital
filtering once you have done the sampling.
The other common misunderstanding about the Nyquist theorem is that although it
states that all the information needed to reconstruct the signal is provided by sampling
at least at twice the highest signal frequency, it does not say that the samples will look
like the signal. Figure 5.12 shows a 48-Hz signal that is sampled at 100 Hz—fast enough
according to Nyquist's theorem—barely more than twice per cycle. It is clear from Fig-
ure 5.12 c , though, that if straight lines are drawn between the samples, the signal looks
amplitude modulated (although the signal's frequency is correctly reproduced). This
e
fi
erent part of the original signal's
cycle. Many engineers would take the modulated signal as an indication that it was sam-
pled improperly. On the contrary, there is enough information to reproduce the original
ff
ect arises because each cycle is taken at a slightly di
ff
2 Most engineers have heard the term oversampling applied to data acquisition. Although it is intuitive that sam-
pling and playing back something at a higher rate looks better than a lower rate—more points in the waveform for
increased accuracy—that's not what oversampling usually means. In fact, oversampling usually refers to output
oversampling and it means generating more samples from a waveform that has already been digitally recorded.
Search WWH ::




Custom Search