You are on page 1of 27

DIGITAL SIGNAL PROCESSING

LECTURE #40, 41, 42


22ND – 24TH MAY 2023
6.1 IDEAL PERIODIC SAMPLING OF CONTINUOUS-TIME
SIGNALS
 Periodic sampling is defined by the relation:
𝑥 𝑛 = 𝑥𝑐 𝑡 ȁ 𝑡=𝑛𝑇 = 𝑥𝑐 𝑛𝑇 , −∞ < 𝑛 < ∞
where 𝑇 is the fixed time interval between samples and called the sampling period. The reciprocal of the
sampling period, 𝐹𝑠 = 1/𝑇, is called sampling frequency or sampling rate.
 The term ideal sampling means instantaneous sampling, where each sample is measured with infinite
accuracy. (Similarly, a practical ADC refers to the representation of this measured sample with finite
number of bits.)
6.1 IDEAL PERIODIC SAMPLING OF CONTINUOUS-TIME
SIGNALS

Questions to ask:
 Are the samples 𝑥[𝑛] sufficient to describe uniquely the original continuous-time signal?
 How can 𝑥𝑐 𝑡 be reconstructed from 𝑥[𝑛]?
These questions are important as an infinite number of signals can generate the same set of samples.
6.1 IDEAL PERIODIC SAMPLING OF CONTINUOUS-TIME
SIGNALS

 In other words, the samples do not tell us anything about the


values of the signal between sampling times.
 The answer to these questions lies in the frequency domain, that
is, in the relation between the spectra of 𝑥𝑐 𝑡 and 𝑥[𝑛].
∞ ∞
1 2𝜋 1
𝑋 𝜔 = ෍ 𝑋𝑐 Ω − 𝑘 = ෍ 𝑋𝑐 Ω − Ω𝑠 𝑘
𝑇 𝑇 𝑇
𝑘=−∞ 𝑘=−∞

Two necessary conditions are:


𝑋 Ω = 0, Ω > Ω𝐻
Ω𝑠 ≥ 2Ω𝐻
CHAPTER 7 – THE DISCRETE FOURIER TRANSFORM

 (7.1) Frequency domain sampling: The discrete Fourier transform

 (7.2) Properties of the DFT

 (7.3) Linear filtering methods based on DFT

 (7.4) Frequency analysis of signals using the DFT


7.1 – FREQUENCY-DOMAIN SAMPLING: THE DISCRETE
FOURIER TRANSFORM

Introduction/motivation:

DTFT is a vey essential tool for discrete-time signals:



𝑋 𝜔 = ෍ 𝑥 𝑛 𝑒 −𝑗𝜔𝑛
𝑛=−∞

why can’t we use a computer to compute the DTFT 𝑋 𝜔 from data 𝑥 𝑛 ?

 The DTFT requires an infinite number of terms to be summed over 𝑛 = … , −3, −2, −1, 0, 1, 2, 3, …

 The DTFT must be evaluated at an infinite number of points over the interval −𝜋 ≤ 𝜔 < 𝜋

While, the first problem is solved for a “finite-duration” signal, but the second problem always remains.

Solution: Discretize DTFT, i.e. compute DTFT at a finite set of points.


7.1 – FREQUENCY-DOMAIN SAMPLING: THE DISCRETE
FOURIER TRANSFORM

∞ 𝑁−1

𝑋 𝜔 = ෍ 𝑥 𝑛 𝑒 −𝑗𝜔𝑛 = ෍ 𝑥 𝑛 𝑒 −𝑗𝜔𝑛 For a finite-


duration x[n].
𝑛=−∞ 𝑛=0
7.1 – FREQUENCY-DOMAIN SAMPLING: THE DISCRETE
FOURIER TRANSFORM

𝑁−1 𝑁−1
2𝜋 2𝜋
𝑋 𝑘 = ෍𝑥 𝑛 −𝑗 𝑘𝑛
𝑒 𝑁 = ෍𝑥 𝑛 𝑒 −𝑗
𝑁
𝑘𝑛 For a finite-
duration x[n].
𝑛=0 𝑛=0
THE DISCRETE FOURIER TRANSFORM - EXAMPLE

Let a time-domain signal be given as:


𝑛
1
𝑥𝑛 = 𝑢 𝑛 −𝑢 𝑛−6
2
Its frequency-domain signal, computed via
DTFT is:
𝑒 𝑗3𝜔 − (0.56 )𝑒 −𝑗3𝜔 5
−𝑗 2𝜔
𝑋 𝜔 = 1 1 𝑒
𝑗 2𝜔 −𝑗 2𝜔
𝑒 − 0.5𝑒
The DFT will be computed as:
𝑁−1
2𝜋
−𝑗 𝑁 𝑘𝑛
𝑋 𝑘 = ෍𝑥 𝑛 𝑒
𝑛=0
THE DISCRETE FOURIER TRANSFORM - EXAMPLE

𝑵=𝟔 𝑵=𝟒 𝑵 = 𝟐𝟎
THE DISCRETE FOURIER TRANSFORM - EXAMPLE

1 𝑛
For 𝑥 𝑛 = 𝑢 𝑛 − 𝑢 𝑛 − 6 , 𝑁 = 6. and the
2

𝟔 −point DFT is computed as:

𝑋 −3 = 0.6562

𝑋[−2] = 0.7031 + 𝑗0.2435

𝑋[−1] = 0.9844 + 𝑗0.5683

𝑋[0] = 1.9688

𝑋 1 = 0.9844 – 𝑗0.5683 = 𝑋 ∗ 1

𝑋 2 = 0.7031 – 𝑗0.2435 = 𝑋 ∗ 2
THE DISCRETE FOURIER TRANSFORM - EXAMPLE

1 𝑛
For 𝑥 𝑛 = 𝑢 𝑛 − 𝑢 𝑛 − 6 , 𝑁 = 6. and the
2

𝟒 −point DFT is computed as:

𝑋[−2] = 0.6562

𝑋[−1] = 0.8125 + 𝑗0.4063

𝑋[0] = 1.9688

𝑋 1 = 0.8125 − 𝑗0.4063 = 𝑋 ∗ 1
THE DISCRETE FOURIER TRANSFORM - EXAMPLE
1 𝑛
For 𝑥 𝑛 = 𝑢 𝑛 − 𝑢 𝑛 − 6 , 𝑁 = 6. and the 𝟏𝟎 −point DFT is
2
computed as:
𝑋[−5] = 0.6562
𝑋[−4] = 0.6921 + 𝑗0.1383
𝑋[−3] = 0.7324 + 𝑗0.3145
𝑋[−2] = 0.9017 + 𝑗0.4896
𝑋[−1] = 1.3613 + 𝑗0.6873
𝑋[0] = 1.9688
𝑋 1 = 1.3613 − 𝑗0.6873 = 𝑋 ∗ 1
𝑋 2 = 0.9017 − 𝑗0.4896 = 𝑋 ∗ 2
𝑋 3 = 0.7324 − 𝑗0.3145 = 𝑋 ∗ 3
𝑋 4 = 0.6921 − 𝑗0.1383 = 𝑋 ∗ 4
SAMPLING THE DISCRETE-TIME FOURIER TRANSFORM
DIFFERENCE BETWEEN I-DTFT AND I-DFT
7.2 PROPERTIES OF THE DFT
If 𝑥[𝑛] and 𝑋[𝑘] are 𝑁 −point DFT pair, then,
1) Periodicity
𝑥෤ 𝑛 + 𝑁 = 𝑥 𝑛 , ∀𝑛
𝑋 𝑘+𝑁 =𝑋 𝑘 , ∀𝑘
2) Linearity
If
𝑥1 𝑛 𝑋1 𝑘
and
𝑥2 𝑛 𝑋2 𝑘
then
𝑎1 𝑥1 𝑛 + 𝑎2 𝑥2 𝑛 𝑎1 𝑋1 𝑘 + 𝑎2 𝑋2 𝑘
7.2 PROPERTIES OF THE DFT

3) Circular symmetries of a sequence


The finite-duration signal 𝑥[𝑟] and the I-DFT signal
𝑥෤ 𝑛 are related as:

𝑥෤ 𝑛 = ෍ 𝑥 𝑛 − 𝑙𝑁
𝑙=−∞

The relation between linear time index (𝑟) and circular


time-index (𝑛) is defined as:
𝑛 = 𝑙𝑁 + 𝑟, 0≤𝑟 ≤𝑁−1
If, for a given 𝑛, it is required to be determined 𝑟, then
the above-mentioned modulo−𝑁 operation is executed,
such that −∞ < 𝑙 < ∞, and 𝑟 ∈ 0, 𝑁 − 1 .
7.2 PROPERTIES OF THE DFT

If 𝑥[𝑛] and 𝑋[𝑘] are 𝑁 −point DFT pair, then,

4) Circular time shift


2𝜋
−𝑗
𝑥 𝑛 − 𝑛0 𝑁 𝑒 𝑁 𝑘𝑛0 𝑋 𝑘

5) Circular frequency shift


2𝜋
𝑗 𝑁 𝑘0 𝑛
𝑒 𝑥𝑛 𝑋 𝑘 − 𝑘0 𝑁
CONCEPT OF CIRCULAR SHIFT (IN TIME AND
FREQUENCY)
 Difference between linear and
circular shift?
 Modulo operation: The linear time
index (𝑟) and the circular time index
(𝑛) are related by the Modulo
operation, read as 𝒏 module 𝑵:
𝑟= 𝑛𝑁

The shifted I-DFT signal 𝑥෤ 𝑛 − 𝑘 is


related to the NEW finite-duration
signal as:
𝑥෤ 𝑛 − 𝑛0 𝑁 = 𝑥 ′ 𝑛
𝑥[𝑛] 𝑥[ 𝑛 − 1 6 ] 𝑥[ 𝑛 − 4 6 ]
7.2 PROPERTIES OF THE DFT

6) Multiplication of 2 DFTs and Circular convolution


For two finite (SIMILAR) duration signals, 𝑥1 𝑛 and 𝑥2 𝑛 with respective DFTs as follows:
𝑁−1
2𝜋
−𝑗 𝑘𝑛
𝑋1 𝑘 = ෍ 𝑥1 𝑛 𝑒 𝑁
𝑛=0
𝑁−1
2𝜋
−𝑗 𝑁 𝑘𝑛
𝑋2 𝑘 = ෍ 𝑥2 𝑛 𝑒
𝑛=0

The product of their DFTs is given as:


𝑋3 𝑘 = 𝑋1 𝑘 𝑋2 𝑘
While the I-DFT 𝑥3 [𝑘] becomes;
𝑥3 𝑘 = 𝑥1 𝑛 𝑁 𝑥2 𝑛
EXAMPLE – COMPUTATION OF CIRCULAR CONVOLUTION
IN TIME DOMAIN
For an input signal 𝑥 𝑛 = 0, 1, 2, 3 applied to the
input of a system with impulse response ℎ 𝑛 =
1, 0, 1, 1 , determine the output via 4-point circular
convolution.

𝑌 𝑘 =𝑋 𝑘 𝐻 𝑘

𝒚𝒏 =𝒙𝒏 𝑵 𝒉𝒏

• PLACE the elements around a circle in counter-


clockwise direction.
• FLIP one of the signals.
• ROTATE the flipped signal in counter clockwise
direction

𝑦 𝑛 = 3, 6, 5, 4
EXAMPLE – COMPUTATION OF CIRCULAR CONVOLUTION
IN TIME DOMAIN
For an input signal 𝑥 𝑛 = 0, 1, 2, 3 applied to the 𝑋 𝑘 = {6, −2 + 𝑗2, −2, −2 − 𝑗2
input of a system with impulse response ℎ 𝑛 =
1, 0, 1, 1 , determine the output via DFT, I-DFT 𝐻 𝑘 = 3, 𝑗, 1, −𝑗
process.
𝑌 𝑘 = 18, −2 − 𝑗2, −2, −2 + 𝑗2
𝒀𝒌 =𝑿𝒌 𝑯𝒌
3
2𝜋
𝑗 4 𝑘𝑛
𝑦 𝑛 =𝑥 𝑛 𝑁 ℎ 𝑛 𝑦 𝑛 = ෍𝑌 𝑘 𝑒
𝑘=0
• COMPUTE DFT of both signals.
• TAKE element-by-element product of both DFT
signals.
• DETERMINE I-DFT.

𝑦 𝑛 = 3, 6, 5, 4
7.3 LINEAR FILTERING METHODS BASED ON THE DFT

(linear convolution using circular convolution)

DIY: Example 7.3.1


7.3.2 FILTERING OF LONG DATA SEQUENCES

 In practical applications, input sequence is usually a very long sequence.

 Since linear filtering performed via DFT involves operations on a block of data, thus the (input) sequence
must be limited in size due to limited memory of a digital computer.

 Since filtering is linear, therefore successive blocks are processed one by one via DFT.

 Two methods used for linear FIR filtering (a long sequence) are:

 Overlap-save method

 Overlap-add method
7.3.2 FILTERING OF LONG DATA SEQUENCES
Overlap-save method
 The filter ℎ[𝑛] is of size 𝑀 samples.
Zeroes are appended to make the size
equivalent to 𝑁 = 𝐿 + (𝑀 − 1).
 𝐿 number of input samples are fetched,
(and after PROCESSING), the input
block becomes of size 𝑁 = 𝐿 + (𝑀 −
1).
 DFTs and I-DFTs are of length 𝑁.
 THE PROCESSING: Each data block
consists of the last 𝑀 − 1 data points of
the previous data block followed by 𝐿 new
data points to form a data sequence of
length 𝑁 = 𝐿 + (𝑀 − 1).
7.3.2 FILTERING OF LONG DATA SEQUENCES
Overlap-add method
 The filter ℎ[𝑛] is of size 𝑀 samples.
Zeroes are appended to make the size
equivalent to 𝑁 = 𝐿 + (𝑀 − 1).
 𝐿 number of input samples are fetched,
(and after PROCESSING), the input
block becomes of size 𝑁 = 𝐿 + (𝑀 −
1).
 DFTs and I-DFTs are of length 𝑁.
 THE PROCESSING: Each data block
consists of 𝐿 input samples followed by
𝑀 − 1 zeros to form a data sequence of
length 𝑁 = 𝐿 + (𝑀 − 1).
WHY ADD 𝑴 − 𝟏 SAMPLES OF OUTPUT BLOCKS?

You might also like