Вы находитесь на странице: 1из 16

3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

Published July 21, 2011 by Mathuranathan

Sampling Theorem Baseband Sampling


(9 votes, average: 4.56 out of 5)

For Matlab demo of sampling see here.

Nyquist-Shannon Sampling Theorem is the fundamental base over which


all the digital processing techniques are built. Processing a signal in digital
domain gives several advantages (like immunity to temperature drift,
accuracy, predictability, ease of design, ease of implementation etc..,) over
analog domain processing.

Analog to Digital conversion:

In analog domain, the signal that is of concern is continuous in both time


and amplitude. The process of discretization of the analog signal in both
time domain and amplitude levels yields the equivalent digital signal. The
conversion of analog to digital domain is a three step process 1)
Discretization in time Sampling 2) Discretization of amplitude levels
Quantization 3) Converting the discrete samples to digital samples
Coding/Encoding

Components of ADC

http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 1/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

The sampling operation samples (chops) the incoming signal at regular


interval called Sampling Rate (denoted by Ts). Sampling Rate is
determined by Sampling Frequency (denoted by Fs) as

1
Ts =
Fs

Lets consider the following logical questions: * Given a real world signal,
how do we select the sampling rate in order to faithfully represent the
signal in digital domain ? * Is there any criteria for selecting the sampling
rate ? * Will there be any deviation if the signal is converted back to analog
domain ? Answer : Consult the Nyquist-Shannon Sampling Theorem to
select the sampling rate or sampling frequency.

Nyquist-Shannon Sampling Theorem:

The following sampling theorem is the exact reproduction of text from


Shannons classic paper[1],

If a function f(t) contains no frequencies higher than W cps, it is


completely determined by giving its ordinates at a series of points spaced
1/2W seconds apart.

Sampling Theorem mainly falls into two categories : 1) Baseband Sampling


Applied for signals in the baseband (useful frequency components
extending from 0Hz to some Fm Hz) 2) Bandpass Sampling Applied for
signals whose frequency components extent from some F1 Hz to F2Hz
(where F2>F1) In simple terms, the Nyquist Shannon Sampling Theorem
for Baseband can be explained as follows

Baseband Sampling:

If the signal is confined to a maximum frequency of Fm Hz, in other words,


the signal is a baseband signal (extending from 0 Hz to maximum Fm Hz).

In order for a faithful reproduction and reconstruction of an analog


signal that is confined to a maximum frequency Fm, the signal should be

http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 2/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

sampled at a Sampling frequency (Fs) that is greater than or equal to


twice the maximum frequency of the signal.

Fs 2Fm

Consider a 10Hz sine wave in analog domain. The maximum frequency


present in this signal is Fm=10 Hz (obviously no doubt about it !!!). Now, to
satisfy the sampling theorem that is stated above and to have a faithful
representation of the signal in digital domain, the sampling frequency can
be chosen as Fs >=20Hz. That is, we are free to choose any number above
20 Hz. Higher the sampling frequency higher is the accuracy of
representation of the signal. Higher sampling frequency also implies more
samples, which implies more storage space or more memory
requirements. In time domain, the process of sampling can be viewed as
multiplying the signal with a series of pulses (pulse train) at regular
interval Ts. In frequency domain, the output of the sampling process
gives the following components Fm (original frequency content of the
signal), FsFm,2FsFm,3FsFm,4FsFm and so on and on

Baseband Sampling

Now the sampled signal contains lots of unwanted frequency components


(FsFm,2FsFm,). If we want to convert the sampled signal back to
analog domain, all we need to do is to filter out those unwanted frequency
http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 3/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

components by using a reconstruction filter (In this case it is a low pass


filter) that is designed to select only those frequency components that are
upto Fm Hz. The above process mentions only the sampling part which
samples the incoming analog signal at regular intervals. Actually a
quantizer will follow the sampler which will discretize (quantize)
amplitude levels of the sampled signal. The quantized amplitude levels are
sent to an encoder that converts the discrete amplitude levels to binary
representation (binary data). So when converting the binary data back to
analog domain, we need a Digital to Analog Converter (DAC) that converts
the binary data to analog signal. Now the converted signal after the DAC
contains the same unwanted frequencies as well as the wanted component.
Thus a reconstruction filter with proper cut-off frequency has to placed
after the DAC to filter out only the wanted components.

Aliasing and Anti-aliasing:

Consider a signal with two frequency components f1=10Hz which is our


desired signal and f2=20Hz which is a noise.Lets say we sample the signal
at 30Hz. The first frequency component f1=10Hz will generate following
frequency components at the output of the multiplier (sampler)
10Hz,20Hz,40Hz,50Hz,70Hz and so on. The second frequency component
f2=20Hz will generate the following frequency components at the output of
the multiplier 20Hz,10Hz,50Hz,40Hz,80Hz and so on

Aliasing and Anti-aliasing

Note the 10Hz component that is generated by f2=20Hz. This 10Hz


component (which is a manifestation of noisy component f2=20Hz) will
interfere with our original f1=10Hz component and are

http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 4/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

indistinguishable.This 10Hz component is called alias of the original


component f2=20Hz (noise). Similarly the 20Hz component generated by
f1=10Hz component is an alias of f1=10Hz component. This 20Hz alias of
f1=10Hz will interfere with our original component f2=20Hz and are
indistinguishable. We do not need to care about the interference that
occurs at 20Hz since it is a noise and any way it has to be eliminated. But
we need to do something about the aliasing component generated by the
f2=20Hz. Since this is a noise component, the aliasing component
generated by this noise will interfere with our original f1=10Hz component
and will corrupt it. Aliasing depends on the sampling frequency and its
relationship with the frequency components. If we sample a signal at Fs, all
the frequency components from Fs/2 to Fs will be alias of frequency
components from 0 to Fs/2 and vice versa. This frequency Fs/2 is called
Folding frequency since the frequency components from Fs/2 to Fs folds
back itself and interferes with the components from 0Hz to Fs/2 Hz and
vice versa. Actually the aliasing zones occur on the either sides of 0.5Fs,
1.5Fs, 2.5Fs,3.5Fs etc All these frequencies are also called Folding
Frequencies that causes frequency reversal. Similarly aliasing also occurs
on either side of Fs,2Fs,3Fs,4Fs without frequency reversals. The
following figure illustrates the concept of aliasing zones.

Folding Frequencies and Aliasing Zones

In the above figure, zone 2 is just a mirror image of zone 1 with frequency
reversal. Similarly zone 2 will create aliases in zone 3 (without frequency
reversal), zone 3 creates mirror image in zone 4 with frequency reversal
and so on In the example above, the folding frequency was at Fs/2=15Hz,
so all the components from 15Hz to 30Hz will be the alias of the
components from 0Hz to 15Hz. Once the aliasing components enter our
band of interest, it is impossible to distinguish between original
components and aliased components and as a result, the original content of
the signal will be lost. In order to prevent aliasing, it is necessary to
remove those frequencies that are above Fs/2 before sampling the signal.
This is achieved by using an anti-aliasing filter that precedes the analog
to digital converter. An anti-aliasing filter is designed to restrict all the

http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 5/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

frequencies above the folding frequency Fs/2 and therefore avoids aliasing
that may occur at the output of the multiplier otherwise.

A complete design of ADC and DAC

Thus, a complete design of analog to digital conversion contains an anti-


aliasing filter preceding the ADC and the complete design of digital to
analog conversion contains a reconstruction filter succeeding the DAC.

ADC and DAC chain

Note: Remember that both the anti-aliasing and reconstruction filters are
analog filters since they operate on analog signal. So it is imperative that
the sampling rate has to be chosen carefully to relax the requirements for
the anti-aliasing and reconstruction filters.

Effects of Sampling Rate:

Consider a sinusoidal signal of frequency Fm=2MHz. Lets say that we


sample the signal at Fs=8MHz (Fs>=2*Fm). The factor Fs/Fm is called over-
sampling factor. In this case we are over-sampling the signal by a factor of
Fm=8MHz/2MHz = 4. Now the folding frequency will be at Fs/2 = 4MHz.
http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 6/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

Our anti-aliasing filter has to be designed to strictly cut off all the
frequencies above 4MHz to prevent aliasing. In practice, ideal brick wall
response for filters is not possible. Any filter will have a transition band
between pass-band and stop-band. Sharper/faster roll off transition band
(or narrow transition band) filters are always desired. But such filters are
always of high orders. Since both the anti-aliasing and reconstruction
filters are analog filters, high order filters that provide faster roll-off
transition bands are expensive (Cost increases proportionally with filter
order). The system also gets bulkier with increase in filter order.Therefore,
to build a relatively cheaper system, the filter requirement in-terms of
width of the transition band has to be relaxed. This can be done by
increasing the sampling rate or equivalently the over-sampling factor.
When the sampling rate (Fs) is increased, the distance between the
maximum frequency content Fm and Fs/2 will increase. This increase in
the gap between the maximum frequency content of the signal and Fs/2
will ease requirements on the transition bands of the anti-aliasing analog
filter. Following figure illustrates this concept. If we use a sampling
frequency of Fs=8MHz (over-sampling factor = 4), the transition band is
narrower and it calls for a higher order anti-aliasing filter (which will be
very expensive and bulkier). If we increase the sampling frequency to
Fs=32MHz (over-sampling factor = 32MHz/2MHz=16), the distance between
the desired component and Fs/2 has greatly increased that it facilitates a
relatively inexpensive anti-aliasing filter with a wider transition band.
Thus, increasing the sampling rate of the ADC facilitates simpler lower
order anti-aliasing filter as well as reconstruction filter. However, increase
in the sampling rate calls for a faster sampler which makes ADC expensive.
It is necessary to compromise and to strike balance between the sampling
rate and the requirement of the anti-aliasing/reconstruction filter.

Effects of Sampling Rate

Application : Up-conversion

http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 7/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

In the above examples, the reconstruction filter was conceived as a low


pass filter that is designed to pass only the baseband frequency
components after reconstruction. Remember that any frequency
component present in zone 1 will be reflected in all the zones (with
frequency reversals in even zones and without frequency reversals in odd
zones). So, if we design the reconstruction filter to be a bandpass filter
selection the reflected frequencies in any of the zones expect zone 1, then
we achieve up-conversion. In any communication system, the digital signal
that comes out of a digital signal processor cannot be transmitted across as
such. The processed signal (which is in the digital domain) has to be
converted to analog signal and the analog signal has to be translated to
appropriate frequency of operation that fits the medium of transmission.
For example, in an RF system, a baseband signal is converted to higher
frequency (up-conversion) using a multiplier and oscillator and then the
high frequency signal is transmitted across the medium. If we have a band-
pass reconstruction filter at the output of the DAC, we can directly achieve
up-conversion (which saves us from using a multiplier and oscillator). The
following figure illustrates this concept.

Application : Upconversion

Reference:

[1] Claude E. Shannon, Communication in the presence of noise


,Proceedings of the IRE, Vol 37, no.1,pp.10-21,Jan 1949

http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 8/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

See also:

[1] Oversampling, ADC DAC Conversion,pulse shaping and Matched Filter


[2] Bandpass Sampling

Recommended Books:

External Resources:

[1] Video Lectures on Signals and Systems, Filter Design and Transforms [2]
A Guide on Frequency Analysis and Manipulation using MATLAB [3] A
short presentation on Quantization [4] Useful Matlab Functions and Scripts
for Audio Signals and Systems [5] Mathworks Designing a Sigma-Delta
ADC from Behavioral Model to Verilog and VHDL [6] Anti-aliasing and
quantization of audio signals and digital images using Matlab

Share this:

Share 223 Tweet Share 0 Share submit

More

Previous Post
Simulation of OFDM system in Matlab BER Vs Eb/N0 for OFDM in AWGN
channel
http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 9/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

Next Post
Sampling Theorem Bandpass or Intermediate or Under Sampling

Mathuranathan
Mathuranathan Viswanathan - Founder and Author @
gaussianwaves.com which has garnered worldwide
readership. He is a masters in communication
engineering and has 9 years of technical expertise in
channel modeling and has worked in various
technologies ranging from read channel design for hard
drives, GSM/EDGE/GPRS, OFDM, MIMO, 3GPP PHY layer
and DSL. He also specializes in tutoring on various
subjects like signal processing, random process, digital
communication etc.., LinkedIn Profile

L AT E ST A RT I C L E S S I G N A L P RO C E S S I N G

A N A L O G TO D I G I TA L C O N V E R S I O N D I G I TA L TO A N A L O G C O N V E R S I O N
OV E R SA M P L I N G SA M P L I N G T H E O R E M S I G N A L P RO C E S S I N G

http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 10/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

2Comments Gaussianwaves
1 Login

Recommend 1 Share SortbyBest

Jointhediscussion

RajeshBalakrishnan4yearsago
Inthebelowtopic,
AliasingandAntialiasing:
Considerasignalwithtwofrequencycomponentsf1=10Hzwhichisourdesiredsignal
andf2=20Hzwhichisanoise.Letssaywesamplethesignalat30Hz.Thefirst
frequencycomponentf1=10Hzwillgeneratefollowingfrequencycomponentsatthe
outputofthemultiplier(sampler)10Hz,20Hz,30Hz,50Hz,70Hzandsoon.

10Hz,20Hz,30Hz,50Hz,70Hz,Isthiscorrect???Ithinkyou'llnotgetaharmonicat30
Hz.Itshouldbe40Hz.
Reply Share

Mathuranathan>RajeshBalakrishnan4yearsago
HiRajesh,
Thanksforspottingthemistake.Wehavemadethechangestothetext.
Reply Share

ALSOONGAUSSIANWAVES

HowtoplotFFTusingMatlabFFTof ChirpSignalFrequencySweeping
basicsignals:SineandCosinewaves FFTandpowerspectraldensity
7comments3yearsago 6comments3yearsago
MohandHieverybody,Ineedtodofftto MathuranathanThefrequencyofthe
obtainthefrequencycontentofmysignal chirpsignalvarieswithtime,hencethe
andcalculatetheenergytoobtainthe amplitudeofeachfrequencycomponent
doesnot
HowtoInterpretFFTresultscomplex SignificanceofRMS(RootMean
DFT,frequencybinsandFFTShift Square)value
3commentsayearago 2comments2yearsago
MathuranathanThanksforyour MathuranathanRMSvaluewillbeequal
valuablefeedback.Iwilltrytoincorporate tostandarddeviationONLYwhenthe
yoursuggestionstofurtherimprovethe signalhaszeromean.Seepointnumber
article. 3under
Subscribe d AddDisqustoyoursiteAddDisqusAdd Privacy

http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 11/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

Log in with:

SEARCH ARTICLES

Search... Go

LIKE THIS WEBSITE ? SUBSCRIBE

Enter your email address to subscribe to this blog and receive notifications of new posts by
email.

Join 109 other subscribers

EmailAddress

Subscribe

PARTICIPATE AND WIN

Participate in Forums and win 32-GB microSD every month. Just top the leaderboard with
maximum reps at the end of each month

http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 12/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

SEARCH QUESTIONS

Searchquestions&answers Search

GRAB THIS EBOOK TODAY

http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 13/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

RECENT QUESTIONS

BER for BPSK modulation in AWGN, Rayleigh, and Rician fading channels

1 Answer | 0 Votes

OFDM with QPSK

0 Answers | 0 Votes

QPSK Complex input

1 Answer | 0 Votes

Correct the statement

1 Answer | 0 Votes

Could not able to get the results,can u help me in this concern

1 Answer | 0 Votes

RECENTLY SUBMITTED

http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 14/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

A mathematical theory of communication Shannon

An Introduction to Information Theory and Applications


More tutorials

CATEGORIES

8-PSK

Book reviews

BPSK

Channel Coding

Channel Modelling

http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 15/16
3/8/2017 SamplingTheoremBasebandSamplingGaussianWaves

Constellations

Correlative Coding

Digital Modulations

DPSK

Estimation Theory

Free Books

GMSK

Hamming Codes

Inter Symbol Interference

Interleaver

Introduction

Latest Articles

Line Coding

M-PSK

M-QAM

Matlab Codes

MIMO systems

OFDM

Probability

Pulse Shaping

http://www.gaussianwaves.com/2011/07/samplingtheorembasebandsampling/ 16/16

Вам также может понравиться