Sie sind auf Seite 1von 4

Sampling rate and aliasing on a virtual laboratory

Mihai Bogdan
University of Lucian Blaga Sibiu, Faculty of Engeneering,
Str. Emil Cioran, no.4, 550025 Sibiu, Romania, E-Mail: mihai.bogdan@ulbsibiu.ro
Abstract – The converting analog input
sampling frequency (which is continuous in
determines the quality of nature) and converting it
the analog signal that is to digital form (which is
converted. Higher discrete in nature). But
sampling frequency adequate number of
achieves better samples must be taken
conversion of the analog from a given analog signal
signals. The minimum in order to effectively
sampling frequency reconstruct it back from Figure 2. Sampling a
required to represent the its samples. The sinusoid at Nyquist
signal should at least be ‘adequate’ number of frequency (Aliased)
twice the maximum samples needed is
As seen in Figure 3,
frequency of the analog determined by the
when the sampling
signal under test (this is Nyquist-Shannon
Figure 1. Aliasing occur frequency is less than the
called the Nyquist rate). theorem. The theorem
when the sampling rate is Nyquist rate, the signal is
In the following virtual states that the perfect
much too low for the aliased to a frequency less
instrument, an example reconstruction of an frequency of an input signal than the original
of sampling is shown. If analog signal is possible
frequency. Perfect
the sampling frequency is when the sampling For a given input reconstruction is observed
equal or less then twice frequency is greater than
twice the maximum signal of bandwidth f 0 , in Figure 4 where the
the frequency of the Nyquist criterion is met.
input signal, a signal of frequency of the signal the sampling frequency
But when sampling
lower frequency is being sampled [2]. f s should be strictly frequency is exactly equal
generated from such a Aliasing is the
greater than 2 f 0 , to to the Nyquist rate the
process (this is called appearance of phantom
reconstructed waveform
aliasing). frequencies when a signal ensure perfect appears as an alias at DC.
The goal of this paper is is not sampled at a high reconstruction of the
to teach students basic enough rate. In films signal from the samples. If
concepts of sampling rate (which are normally f s = 2 f 0 , then f s is
and aliasing, to become sampled at 24 frames per
second) you can often see said to be the Nyquist
familiar with this
the wheels of cars or frequency. It is important
concepts.
stagecoaches slow down, to note that information
stand still, or even appear may be lost if a signal is
Keywords:
to rotate backwards. This sampled exactly at the
sampling, aliasing,
is aliasing [4]. Nyquist frequency. For
virtual instrument.
The next figure illustrates example, the sine wave in
how aliasing would occur Figure 2 has a frequency Figure 3. Sampling at fs < 2f
when the sampling rate is of 1/2 Hz. The Nyquist
I. INTRODUCTION
much too low for the frequency is therefore 1
frequency of an input Hz. If we sample the sine
The analysis of
signal. The solid curve wave at a rate of 1 Hz, say
real world signals is
represents the analog at t=0, t=1, t=2, and so on,
a fundamental
signal at a comparatively all the sample values
problem for many selected will be 0. The
engineers and high frequency. Circles
show where samples were signal will look as if it
scientists, especially were identically 0, and no
for electrical taken at a relatively low
sampling rate. The dotted reconstruction method
engineers since will be able to recreate the
almost every real line illustrates the Figure 4. Sampling at fs
apparent frequency of the 1/2 Hz sine wave. This
world signal is > 2f
changed into sampled waveform, indicates that f s > 2 f 0 is
electrical signals [1]. completing about two a strict condition to be The alias frequency is the
Sampling is the cycles in the period that met. absolute value of the
process of converting an the original signal difference between the
input from a continuous completed 20 cycles. frequency of the input
form to a discrete form. In signal and the closest
reference to integer multiple of the
instrumentation this sampling rate.
generally means
For example, assume the To be completely (Figure 6) above. Practical
sampling frequency, fs, is sure that the anti-aliasing filters pass
100 Hz. Also assume that frequency content of all frequencies < f1 and cut
the input signal contains the input signal is off all frequencies > f2.
the following frequencies: limited, a lowpass The region between f1 and
25 Hz, 70 Hz, 160 Hz, and filter (a filter that f2 is known as the
510 Hz, as shown in the passes low transition band, which
following illustration. frequencies but contains a gradual
attenuates the high attenuation of the input
frequencies) is frequencies. Although you
added before the want to pass only signals
ADC. This filter is with frequencies < f1, the
called an anti-alias signals in the transition
filter because it band could still cause
prevents the aliasing aliasing.
components from Therefore, in practice, you
being sampled by should use a sampling
attenuating the frequency greater than
higher frequencies two times the highest
Frequencies below the (greater than frequency in the transition
Nyquist frequency (fs/2 = Nyquist). band. Because this
50 Hz) are sampled Anti-aliasing filters sampling frequency turns
Figure 7.The Front Panel of
correctly, as shown in the are analog filters. out to be more than two VI
following illustration. The following times the maximum input
Frequencies above the illustration shows an frequency (f1), you might
Nyquist frequency appear ideal anti-alias filter. see that the sampling rate
as aliases. For example, is more than twice the
F1 (25 Hz) appears at the maximum input
correct frequency, but F2 frequency.
(70 Hz), F3 (160 Hz), and
F4 (510 Hz) have aliases II. THE VIRTUAL
at 30 Hz, 40 Hz, and 10 INSTRUMENT
Hz, respectively.
Figure 8. The Block
This section presents
Diagram of VI
the virtual instrument
programs that were The next figures shows
Figure 5. Ideal Anti-alias developed to help students
Filter examples of a 5 Hz
for demonstrate the sinusoid sampled at
concept of proper and various frequencies. In
improper sampling, as Figure 9, the sampling
discussed above. frequency is 10 times the
Figure 7 and 8 analog signal frequency,
present the Front Panel or 50 Hz. It can be seen
Use the following and the Block Diagram of that the original signal can
equation to calculate the VI. be exactly reconstructed
the alias frequency: from the samples. The
Alias Freq. = ABS signal in Figure 9 has
(Closest Int. Mult. of been properly sampled.
Figure 6. Practical Anti-
Sampling Freq. – alias Filter In, Figure 10 the sampling
Input Freq.) frequency is 2,5 times the
where ABS means An ideal anti-aliasing analog signal frequency.
the absolute value. filter passes all the desired This example is more
For example, input frequencies (below complicated since the
Alias F2 = |100 – 70| f1) and cuts off all the signal cannot be exactly
= 30 Hz undesired frequencies reconstructed by simply
Alias F3 = |(2)100 – (above f1). However, an connecting the sample
160| = 40 Hz ideal anti-aliasing filter is points. However, the
Alias F4 = |(5)100 – not physically possible. In samples actually
510| = 10 Hz practice, filters look as correspond to only one
shown in illustration analog signal since no
other sinusoid or this is easy, because a sine computer will be
combination of sinusoids wave only contains one sufficiently true to the
will produce this pattern. frequency. However, a original.
Therefore, the signal in square wave contains •Frequencies at least
Figure 10 can be said to many higher frequency above theNyquist
have proper sampling. In components in addition to frequency will be
Figure 11, the sampling its fundamental repetition eliminate before sampling,
frequency is 1,25 times frequency. You can see in order to avoid aliasing.
the analog frequency. In this on the Frequency
this example, not only do Spectrum.
we have difficulty REFERENCES
reconstructing the analog
signal, but we have also [1] M. Bogdan, M. Panu, A.
constructed a different Viorel, Teaching data
sine wave from the acquisition on a virtual
original analog signal. laboratory, the 4th
Balkan Region
This phenomenon of
Conference on
signals changing Engineering Education,
frequency after sampling ISSN 1843-6730, 12-14
is called aliasing. This Iulie, Sibiu, 2007.
signal has most certainly [2] National Instruments
Figure 10. Reconstructing
been improperly sampled. an Analog Signal of 5 Hz. “LabVIEW Graphical
(Sample Frequency = 2,5 Progra-mming Course”,
times analog frequency) 2007.
[3] M. Bogdan, M. Panu,
On the quantization of
analogue signals, Acta
Universitatiss
Cibiniensis, Vol. XXXII,
ISSN 1221-4930, Sibiu,
1999.
[4] Analog Sampling
Basics, available at:
http://
zone.ni.com/devzone/cda
/tut/p/id/3016.
If data is taken at a
certain sampling rate and
the continuous signal
frequency is below the
Nyquist frequency, the
signal can be properly
reconstructed from the
samples and the frequency
Figure 9. Reconstructing an
of the digitized signal will
Analog Signal of 5 Hz. match the frequency of
(Sample Frequency = 10 the continuous signal.
Figure 11. Reconstructing
times analog frequency) However, when the
an Analog Signal of 5 Hz.
(Sample Frequency = 1,25 continuous signal
times analog frequency) frequency is above the
Nyquist rate, aliasing
changes the frequency
IV. CONCLUSIONS into something that can be
represented in the sampled
As a result of the data.
sampling theorem, a Whenever you are
digital signal cannot sampling, always make
contain frequencies above sure that:
one-half the sampling rate •The sampling frequency
or Nyquist frequency. If is high enough so that the
you are using a sine wave, sampled signal in the

Das könnte Ihnen auch gefallen