Chapter-5: Sampling Theory
Introduction:
Due to the advancement in modern digital technology, discrete-time signals are
preferrable over continuous-time signals. Therefore, it is necessary to convert
continuous-time signals into discrete-time signals.
Sampling:
Sampling is the processes of converting continuous-time analog signal, 𝑥(𝑡), into a
discrete-time signal 𝑥[𝑛] by taking the “samples” at discrete-time intervals. Sampling
analog signals makes them discrete in time but still continuous-valued. If done
properly (Nyquist theorem is satisfied), sampling does not introduce distortion.
Sampling allows the use of modern digital electronics to process, record, transmit,
store, and retrieve CT signals.
• audio: MP3, CD, cell phone
• pictures: digital camera, printer
• video: DVD
• everything on the web
Sampling Theorem:
• Statement:
A continuous-time signal may be completely represented in its samples and
recovered back if the sampling frequency is 𝑓𝑠 ≥ 2𝑓𝑚 . Here, 𝑓𝑠 is the sampling
frequency and 𝑓𝑚 is the maximum frequency present in the signal.
• Proof:
Consider a continuous time signal x(t). The spectrum of 𝑥(𝑡) is a band limited to 𝑓𝑚 𝐻𝑧 ,i.e., the
spectrum 𝑋(𝜔) of 𝑥(𝑡) is zero for |𝜔| > 𝜔𝑚 .
Sampling of input signal 𝑥(𝑡) can be obtained by multiplying 𝑥(𝑡) with an impulse train 𝛿𝑇𝑠 (𝑡) of period
1
𝑇𝑠 = . The output of multiplier is a discrete-time signal called sampled signal which is represented with
𝑓𝑠
𝑔(𝑡) in the following diagrams:
Fig1: a) A CT signal 𝑥(𝑡)
b) Fourier transform (spectrum) of 𝑥(𝑡)
c) Impulse train 𝛿𝑇𝑠 (𝑡) as sampling function
d) A multiplier
e) Sampled signal
f) Spectrum of sampled signal
We have
𝑔 𝑡 = 𝑥(𝑡)𝛿𝑇𝑠 (𝑡) …..i
where, 𝛿𝑇𝑠 𝑡 = σ∞ 𝑛=−∞ 𝛿(𝑡 − 𝑛 𝑇𝑠 )
then 𝑔 𝑡 = σ∞ 𝑛=−∞ 𝛿(𝑡 − 𝑛 𝑇𝑠 )𝑥(𝑛𝑇𝑠 ) …..ii
That is, the sampled signal consists of impulses spaced at every 𝑇𝑠 seconds. The 𝑛𝑡ℎ
impulse, located at 𝑡 = 𝑛𝑇𝑠 has a strength 𝑥(𝑛𝑇𝑠 ), the value of 𝑥(𝑡) at 𝑡 = 𝑛𝑇𝑠 .
Since, 𝛿𝑇𝑠 𝑡 is periodic with period 𝑇𝑠 , it can be represented in Fourier series as:
𝛿𝑇𝑠 𝑡 = 𝑐0 + σ∞ 𝑛=1 𝑐𝑛 𝑐𝑜𝑠𝑛𝜔𝑠 𝑡
1 2
where, we obtain 𝑐0 = and 𝑐𝑛 = , then we can write
𝑇𝑠 𝑇𝑠
1
𝛿𝑇𝑠 𝑡 = [1 + 2𝑐𝑜𝑠𝜔𝑠 𝑡 + 2𝑐𝑜𝑠2𝜔𝑠 𝑡 + 2𝑐𝑜𝑠3𝜔𝑠 𝑡 + ⋯ ] …..iii
𝑇𝑠
From (i) and (iii), we have
1
𝑔 𝑡 = [𝑥(𝑡) + 2𝑥(𝑡)𝑐𝑜𝑠𝜔𝑠 𝑡 + 2𝑥(𝑡)𝑐𝑜𝑠2𝜔𝑠 𝑡 + 2𝑥(𝑡)𝑐𝑜𝑠3𝜔𝑠 𝑡 + ⋯ ] …..iv
𝑇𝑠
Taking Fourier transform of equation (iv), we obtain the spectrum 𝐺( 𝑗𝜔) of the
signal 𝑔 𝑡 .
1
𝐺 𝑗𝜔 = [𝑋 𝑗𝜔 + 𝑋( 𝑗 𝜔 + 𝜔𝑠 + 𝑋( 𝑗 𝜔 − 𝜔𝑠 +
𝑇𝑠
{𝑋( 𝑗 𝜔 + 2𝜔𝑠 + 𝑋 𝑗 𝜔 − 2𝜔𝑠 + ⋯] …..v
1
Therefore, 𝐺 𝑗𝜔 = σ∞ 𝑛=−∞ 𝑋( 𝑗 𝜔 − 𝑛𝜔𝑠 …..vi
𝑇𝑠
From equation (iv) and (v), it is clear that the spectrum 𝐺 𝑗𝜔 consists of
2𝜋 1
𝑋 𝑗𝜔 repeating periodically with period 𝜔𝑠 = 𝑟𝑎𝑑/𝑠𝑒𝑐 or 𝑓𝑠 = 𝐻𝑧 as shown
𝑇𝑠 𝑇𝑠
in fig.(f).
To reconstruct 𝑥(𝑡) from 𝑔 𝑡 , we must recover 𝑋 𝑗𝜔 from 𝐺 𝑗𝜔 . This is possible
if there is no overlap between successive cycles of 𝐺 𝑗𝜔 . Fig.(f) shows that this
requires
𝑓𝑠 ≥ 2𝑓𝑚
Or 𝜔𝑠 ≥ 2𝜔𝑚
1
Also the sampling interval 𝑇𝑠 = , therefore,
𝑓𝑠
1
𝑇𝑠 ≤
2𝑓𝑠
To recover the original signal 𝑥(𝑡) from its samples 𝑔 𝑡 , the signal 𝑔 𝑡 must pass
through an ideal low pass filter of bandwidth 𝑓𝑚 𝐻𝑧. This proves sampling theorem.
Since impulse pulse train is used as sampling function, it is also called impulse
sampling.
Reconstruction of Signal: The Interpolation Formula
The process of reconstructing a CT signal from its samples is known as interpolation.
To recover the original signal 𝑥(𝑡) from its samples 𝑔 𝑡 , the sampled signal 𝑔 𝑡
must pass through an ideal low pass filter of cut-off frequency 𝑓𝑚 𝐻𝑧.
The expression for sampled signal 𝑔 𝑡 is:
𝑔 𝑡 = 𝑥(𝑡)𝛿𝑇𝑠 (𝑡)
1
Or, 𝑔 𝑡 = [𝑥(𝑡) + 2𝑥(𝑡)𝑐𝑜𝑠𝜔𝑠 𝑡 + 2𝑥(𝑡)𝑐𝑜𝑠2𝜔𝑠 𝑡 + 2𝑥(𝑡)𝑐𝑜𝑠3𝜔𝑠 𝑡 + ⋯ ]
𝑇𝑠
1
Here, the sampled signal contains a component of × 𝑥(𝑡).
𝑇𝑠
To recover 𝑥(𝑡) or 𝑋 𝑗𝜔 , the sampled signal 𝑔 𝑡 must passed through an ideal low
1
pass filter of bandwidth 𝑓𝑚 𝐻𝑧 and gain of .
𝑇𝑠
Therefore, the reconstruction or interpolating filter transfer function can be
expressed as:
𝜔
𝐻 𝑗𝜔 = 𝑇𝑠 × 𝑟𝑒𝑐𝑡( )
4𝜋𝑓𝑚
The 4𝜋𝑓𝑚 comes because of the band lies between −2𝜋𝑓𝑚 to 2𝜋𝑓𝑚 .
The impulse response ℎ 𝑡 of this filter is the inverse Fourier transform of 𝐻 𝑗𝜔 .
ℎ 𝑡 = 𝐹 −1 {𝐻(𝑗𝜔)
1 2𝜋𝑓𝑚
ℎ 𝑡 = 𝑇𝑠 {
2𝜋
−2𝜋𝑓 1. 𝑒 𝑗𝜔𝑡 𝑑𝜔}
𝑚
ℎ 𝑡 = 2 𝑓𝑚 𝑇𝑠 𝑠𝑖𝑛𝑐(2𝜋𝑓𝑚 𝑡)
If the sampling is done at the Nyquist rate then,
1
𝑇𝑠 = or, 2𝑓𝑚 𝑇𝑠 = 1
2𝑓𝑚
Therefore, ℎ 𝑡 = 𝑠𝑖𝑛𝑐 2𝜋𝑓𝑚 𝑡 . This is shown in fig. below.
From above fig., it may be observe that ℎ 𝑡 = 0 for all Nyquist sampling instants
𝑛
𝑡=± except at 𝑡 = 0.Now, when the sampled signal 𝑔 𝑡 is applied at the input
2𝑓𝑚
of the filter, the output will be input 𝑥 𝑡 .
Each sample in 𝑔 𝑡 , being an impulse, produces a sinc pulse of height equal to the
strength of the sample. Addition of the sinc pulses produced by all the samples
results in 𝑥 𝑡 . For instant, the 𝑛𝑡ℎ sample of the input 𝑔 𝑡 is the impulse
𝑥 𝑛𝑇𝑠 𝛿(𝑡 − 𝑛𝑇𝑠 ). The filter output of this impulse will be 𝑥 𝑛𝑇𝑠 ℎ(𝑡 − 𝑛𝑇𝑠 ).
Therefore, the output 𝑥 𝑡 of the filter for the input 𝑔 𝑡 is:
𝑥 𝑡 = σ𝑛 𝑥 𝑛𝑇𝑠 ℎ(𝑡 − 𝑛𝑇𝑠 )
= σ𝑛 𝑥 𝑛𝑇𝑠 𝑠𝑖𝑛𝑐{2𝜋𝑓𝑚 (𝑡 − 𝑛𝑇𝑠 }
1
= σ𝑛 𝑥 𝑛𝑇𝑠 𝑠𝑖𝑛𝑐{2𝜋𝑓𝑚 𝑡 − 𝑛𝜋} (𝑇𝑠 = ) …..i
2𝑓𝑚
Equation (i) representation the interpolation formula, which provides values of 𝑥 𝑡
between samples as a weighted sum of all the sample values.
Nyquist Rate and Nyquist Interval:
When the sampling rate equal to twice the maximum frequency contained in the
given signal (2𝑓𝑚 ) samples per second, then it is called Nyquist sampling rate. That
is, 𝑓𝑠 = 𝑓𝑁 = 2𝑓𝑚
where, 𝑓𝑁 is the Nyquist sampling rate.
Similarly, maximum sampling interval related to Nyquist sampling rate is called
Nyquist interval.
1
𝑇𝑠 = seconds
2𝑓𝑚
Practical Considerations in Sampling:
All the sampling processes discussed so far is under ideal conditions and therefore
reconstructing the original signal is distortionless. But, in practice , due to various
implementation constraints, the expected result may differ from the ideal one .
Following are the differences between ideal and practical sampling:
1. The sampled waveform consists of finite amplitude and duration pulses rather than
ideal impulses.
2. Reconstruction filter are not ideal.
3. The input waveforms are rather time limited not band limited.
Effect of Under Sampling: Aliasing
If the signal 𝑥 𝑡 is not strictly band-limited and/or if the sampling frequency 𝑓𝑠 is
less than 2𝑓𝑚 , then an error called aliasing or fold over error is observed. The
adjacent spectrums overlap if 𝑓𝑠 < 2𝑓𝑚 .
• Aliasing:
The phenomenon of a high frequency in the spectrum of the original signal 𝑥 𝑡 ,
taking on the identity of lower frequency in the spectrum of the sampled signal
𝑥𝛿 (𝑡) is called as aliasing or fold over error.
• Effect of Aliasing:
Due to aliasing, some of the information contained in the original signal 𝑥 𝑡 is lost
in the process of sampling.
• Elimination of Aliasing:
Aliasing can be completely eliminated if we take the following actions:
1. Using an antialiasing filter or prealiasing filter which is strongly band limited LPF (
low pass filter ) with cut-off frequency 𝑓𝑐 = 𝑓𝑚 .
2. Using sampling frequency 𝑓𝑠 > 2𝑓𝑚 . Because of this, even though 𝑥 𝑡 is not strictly
band limited, the spectrums will not overlap. A guard band is created between the
adjacent spectrums as shown in fig. below.
Examples:
1. Determine the Nyquist rate for a continuous-time signal
𝒙 𝒕 = 𝟔𝒄𝒐𝒔𝟓𝟎𝝅𝒕 + 𝟐𝟎𝒔𝒊𝒏𝟑𝟎𝟎𝝅𝒕 − 𝟏𝟎𝒄𝒐𝒔𝟏𝟎𝟎𝝅𝒕
Solution:
Given, 𝑥 𝑡 = 6𝑐𝑜𝑠50𝜋𝑡 + 20𝑠𝑖𝑛300𝜋𝑡 − 10𝑐𝑜𝑠100𝜋𝑡
Comparing above equation with the general form given by
𝑥 𝑡 = 𝐴1 𝑐𝑜𝑠𝜔1 𝑡 + 𝐴2 𝑠𝑖𝑛𝜔2 𝑡 − 𝐴3 𝑐𝑜𝑠𝜔3 𝑡 , we obtain
𝜔1 = 50𝜋 𝜔2 = 300𝜋 𝜔3 = 100𝜋
or 𝑓1 = 25𝐻𝑧 𝑓2 = 150𝐻𝑧 𝑓3 = 50𝐻𝑧
Therefore, the maximum frequency contained in the given signal 𝑥 𝑡 is
𝑓𝑚𝑎𝑥 = 𝑓2 = 150𝐻𝑧
Thus, the Nyquist sampling rate is
𝑓𝑁 = 2𝑓𝑚𝑎𝑥 = 2 × 150 = 300 𝐻𝑧
2. Find the Nyquist rate and the Nyquist interval for the signal
𝟏
𝒙 𝒕 = 𝒄𝒐𝒔 𝟒𝟎𝟎𝟎𝝅𝒕 𝒄𝒐𝒔(𝟏𝟎𝟎𝟎𝝅𝒕)
𝟐𝝅
( try yourself)
3. A CT signal is given below as
𝒙 𝒕 = 𝟔 𝒄𝒐𝒔𝟐𝟎𝟎𝝅𝒕
Determine:
a. Minimum sampling rate ( Nyquist rate ) to avoid aliasing.
b. If sampling frequency 𝒇𝒔 = 𝟒𝟎𝟎 𝑯𝒛 , what is the DT signal obtained after
sampling?
Solution:
a. Given, 𝑥 𝑡 = 6 𝑐𝑜𝑠200𝜋𝑡
Comparing with the general form given as:
𝑥 𝑡 = 𝐴 𝑐𝑜𝑠2𝜋𝑓𝑡, where, 𝜔 = 2𝜋𝑓, we obtain
𝑓 = 100𝐻𝑧
Therefore, minimum sampling rate to avoid aliasing is
𝑓𝑁 = 2𝑓 = 2 × 100 = 200 𝐻𝑧
b. Since, the CT signal is sampled at the rate 𝑓𝑠 = 400 𝐻𝑧, the DT signal can be
obtained by
𝑛 𝑛 𝜋
𝑥 n = 6cos200𝜋 = 6cos200𝜋 = 6cos 𝑛
𝑓𝑠 400 2
Therefore, the DT signal obtained is:
𝜋
𝑥 n = 6 cos 𝑛
2
• Note:
𝟏 𝒏
To obtain DT signal , we know 𝒕 = 𝒏𝑻𝒔 = 𝒏 = .
𝒇𝒔 𝒇𝒔