Chapters 7

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 64

Dr.

Mohammed Abdel-Hafez
Department of Electrical Engineering

11/15/2020 ELEC 604, M. hafez 1


Lecture Outline
Proakis: Chapter 7 (US Edition).
 7.1: Frequency Domain Sampling: The
Discrete Fourier Transform (DFT).
 7.2: Properties of the DFT.
 4.3: Linear Filtering Methods based on DFT.
 Practice Questions.
 Assignment 5.

11/15/2020 ELEC 604, M. hafez 2


11/15/2020 ELEC 604, M. hafez 3
The Discrete Fourier Transform

11/15/2020 ELEC 604, M. hafez 4


The Discrete Fourier Transform

11/15/2020 ELEC 604, M. hafez 5


Frequency Domain Sampling

11/15/2020 ELEC 604, M. hafez 6


Frequency Domain Sampling

11/15/2020 ELEC 604, M. hafez 7


Frequency Domain Sampling

11/15/2020 ELEC 604, M. hafez 8


Frequency Domain Sampling

11/15/2020 ELEC 604, M. hafez 9


Intuition

11/15/2020 ELEC 604, M. hafez 10


Example

11/15/2020 ELEC 604, M. hafez 11


Example

11/15/2020 ELEC 604, M. hafez 12


Example

11/15/2020 ELEC 604, M. hafez 13


Example

11/15/2020 ELEC 604, M. hafez 14


DTFT, DTFS and DFT

11/15/2020 ELEC 604, M. hafez 15


Frequency Domain Sampling

11/15/2020 ELEC 604, M. hafez 16


Frequency Domain Sampling and
Reconstruction

11/15/2020 ELEC 604, M. hafez 17


Frequency Domain Sampling and
Reconstruction

11/15/2020 ELEC 604, M. hafez 18


Frequency Domain Sampling and
Reconstruction

= 𝑿(𝒏)

11/15/2020 ELEC 604, M. hafez 19


Frequency Domain Sampling and
Reconstruction

≠ 𝑿(𝒏)

11/15/2020 ELEC 604, M. hafez 20


Frequency Domain Sampling and
Reconstruction

11/15/2020 ELEC 604, M. hafez 21


Example

11/15/2020 ELEC 604, M. hafez 22


Example
conti…..

11/15/2020 ELEC 604, M. hafez 23


Example Cont…..

11/15/2020 ELEC 604, M. hafez 24


The Discrete Fourier Transform Pair

11/15/2020 ELEC 604, M. hafez 25


Example

11/15/2020 ELEC 604, M. hafez 26


DFT Example

How??? Use
(𝑒 𝑗𝜃 −𝑒 −𝑗𝜃 )
sin 𝜃 =
2𝑗

11/15/2020 ELEC 604, M. hafez 27


Example Conti….
Magnitude and phase characteristics of the Fourier transform
for signal, 𝐿 = 10

𝜔𝐿
sin
𝑋 𝜔 = 2
𝜔
sin
2
𝜔𝐿
𝐿−1 sin
− 𝜔 2 >0
2 𝜔
sin
𝜃 𝜔 = 2
𝜔𝐿
𝐿−1 sin
𝜋− 𝜔 2 <0
2 𝜔
sin
2

11/15/2020 ELEC 604, M. hafez 28


Example Conti…..
Magnitude and phase of an N-point DFT L = 10.

11/15/2020 ELEC 604, M. hafez 29


11/15/2020 ELEC 604, M. hafez 30
DFT Properties
 Periodicity. If 𝑥(𝑛) and 𝑋(𝑘) are an N-point DFT pair, then
𝑥(𝑛 + 𝑁) = 𝑥(𝑛) 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑛
𝑋(𝑘 + 𝑁) = 𝑋(𝑘) 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑘

 Linearity. If

then for any real-valued or complex-valued constants 𝑎1 and 𝑎2 ,

11/15/2020 ELEC 604, M. hafez 31


DFT Properties
 Symmetry: In analogy with all other frequency-domain
transforms, the DFT of a real sequence possesses conjugate
symmetry about the origin with 𝑋(−𝑘) = 𝑋 ∗ (𝑘). Since the DFT is
periodic, 𝑋(−𝑘) = 𝑋(𝑁 − 𝑘). This also implies conjugate
𝑁
symmetry about the index 𝑘 = , and thus,
2

𝑋 −𝑘 = 𝑋 𝑘 𝑎𝑛𝑑 𝑋 −𝑘 = 𝑋(𝑁 − 𝑘)
 If N is odd, the conjugate symmetry is about the half-integer value
𝑁 𝑁
. The index 𝑘 = is called the folding index.
2 2

11/15/2020 ELEC 604, M. hafez 32


DFT Properties
 Time reversal of a sequence. If

11/15/2020 ELEC 604, M. hafez 33


DFT Properties
 Circular Shift and Circular Symmetry
Generating One Period (0 ≤ 𝑛 ≤ 𝑁) of a Circularly
Shifted Periodic Signal
 To generate 𝑥(𝑛 − 𝑛0 ): Move the last 𝑛0 samples of 𝑥(𝑛)
to the beginning.
 To generate 𝑥(𝑛 + 𝑛0 ): Move the first 𝑛0 samples of 𝑥(𝑛)
to the end.
Circular Symmetry for Real Periodic Signals with Period 𝑁
 Circular even symmetry: 𝑥(𝑛) = 𝑥(𝑁 − 𝑛)
 Circular odd symmetry: 𝑥(𝑛) = −𝑥(𝑁 − 𝑛)

11/15/2020 ELEC 604, M. hafez 34


DFT Properties

Circular shift of a sequence


𝑥(𝑛 − 2). 𝑁 = 4

11/15/2020 ELEC 604, M. hafez 35


Example

11/15/2020 ELEC 604, M. hafez 36


Example

11/15/2020 ELEC 604, M. hafez 37


Example

11/15/2020 ELEC 604, M. hafez 38


DFT Properties

11/15/2020 ELEC 604, M. hafez 39


Important DFT Properties

11/15/2020 ELEC 604, M. hafez 40


Important DFT Properties

11/15/2020 ELEC 604, M. hafez 41


Circular Properties

11/15/2020 ELEC 604, M. hafez 42


Modulo Indices and Periodic Repetition

11/15/2020 ELEC 604, M. hafez 43


Modulo Indices and Periodic Repetition

11/15/2020 ELEC 604, M. hafez 44


Circular Symmetry and Convolution

11/15/2020 ELEC 604, M. hafez 45


Example
Perform the circular convolution of the following two
sequences:

 Each sequence consists of four nonzero points.


 The sequences are graphed in a counterclockwise direction on a
circle.
 This establishes the reference direction in rotating one of the
sequences relative to the other.

 𝑥2 −𝑛 is simply the sequence 𝑥 (𝑛) folded, 𝑥3 (0) = 14


4

11/15/2020 ELEC 604, M. hafez 46


Example
Conti….

11/15/2020 ELEC 604, M. hafez 47


Example
Conti….

11/15/2020 ELEC 604, M. hafez 48


Example
By means of the DFT and IDFT, determine the sequence
𝑥3 (𝑛) corresponding to the circular convolution of the sequences
𝑥1 (𝑛) and 𝑥2 (𝑛) given by

11/15/2020 ELEC 604, M. hafez 49


Example Conti…

11/15/2020 ELEC 604, M. hafez 50


Some useful DFT pairs

Proof of exponential DFT:

11/15/2020 ELEC 604, M. hafez 51


Practical Guidleins
In general, the DFT is only an approximation to the actual (Fourier series
or transform) spectrum of the underlying analog signal. The DFT spectral
spacing and DFT magnitude is affected by the choice of sampling rate and
how the sample values are chosen. The DFT phase is affected by the
location of sampling instants. The DFT spectral spacing is affected by the
sampling duration. Here are some practical guidelines on how to obtain
samples of an analog signal 𝑥(𝑡) for spectrum analysis and interpret the
DFT (or DFS) results.
 Choice of sampling instants: The defining relation for the DFT (or
DFS) mandates that samples of 𝑥(𝑛) be chosen over the range 0 ≤ 𝑛 ≤
𝑁 − 1 (through periodic extension, if necessary). Otherwise, the DFT
(or DFS) phase will not match the expected phase.
 Choice of samples: If a sampling instant corresponds to a jump
discontinuity, the sample value should be chosen as the midpoint of the
discontinuity. The reason is that the Fourier series (or transform)
converges to the midpoint of any discontinuity.

11/15/2020 ELEC 604, M. hafez 52


Practical Guidelines
Choice of frequency axis: The computation of the DFT (or DFS) is independent of
the sampling frequency 𝑓𝑠 or sampling interval 𝑡𝑠 = 1/𝑓𝑠 . However, if an analog
signal is sampled at a sampling rate 𝑓𝑠 , its spectrum is periodic with period 𝑓𝑠 . The
DFT spectrum describes one period (𝑁 samples) of this spectrum starting
at the origin. For sampled signals, it is useful to plot the DFT (or DFS) magnitude
and phase against the analog frequency 𝐹 = 𝑘𝑓𝑠 /𝑁 𝐻𝑧, 𝑘 = 0, 1, . . . , 𝑁 − 1 (with
spacing 𝑓𝑠 /𝑁). For discrete-time signals, we can plot the DFT against the digital
frequency 𝑓 = 𝑘/𝑁, 𝑘 = 0, 1, . . . , 𝑁 − 1 (with spacing 1/𝑁). These choices are
illustrated bellow

11/15/2020 ELEC 604, M. hafez 53


Practical Guidelines
Choice of frequency range: To compare the DFT results with
conventional two-sided spectra, just remember that by periodicity, a
negative frequency −𝐹0 (at the index −𝑘0 ) in the two-sided spectrum
corresponds to the frequency 𝑓𝑠 − 𝐹0 (at the index 𝑁 − 𝑘0 ) in the
(one-sided) DFT spectrum.
Identifying the highest frequency: The highest frequency in the
DFT spectrum corresponds to the folding index 𝑘 = 0.5𝑁 and equals
𝑓 = 0.5 for discrete signals or 𝐹 = 0.5𝑓𝑠 Hz for sampled analog
signals. This highest frequency is also called the folding frequency.
For purposes of comparison, its is sufficient to plot the DFT spectra
only over 0 ≤ 𝑘 < 0.5𝑁 (or 0 ≤ 𝑓 ≤ 0.5 for discrete-time signals or
0 ≤ 𝐹 < 0.5𝑓𝑠 Hz for sampled analog signals).

11/15/2020 ELEC 604, M. hafez 54


Practical Guidelines
Plotting reordered spectra: The DFT (or DFS) may also be plotted as
two-sided spectra to reveal conjugate symmetry about the origin by
creating its periodic extension. This is equivalent to creating a reordered
spectrum by relocating the DFT samples at indices past the folding index 𝑘
= 0.5𝑁 to the left of the origin (because 𝑋(−𝑘) = 𝑋(𝑁 − 𝑘)). This
process is illustrated bellow

11/15/2020 ELEC 604, M. hafez 55


Practical Guidelines
Summary
 Sampling: Start at 𝑡 = 0. Choose the midpoint value at jumps.
Sample above the Nyquist rate.
𝑘
 Plotting: Plot DFT against index 𝑘 = 0, 1, . . . , 𝑁 − 1 or 𝑓 = or
𝑁
𝑓𝑠
𝐹= 𝑘 Hz.
𝑁
𝑓𝑠 1
 Frequency spacing of DFT samples: ΔF = Hz (analog) or Δ𝑓 =
𝑁 𝑁
(digital frequency).
 Highest frequency: This equals 𝑓 = 0.5 or 𝐹 = 0.5𝑓𝑠 corresponding
𝑁
to the index 𝑘 = .
2
 For long sequences: The DFT magnitude/phase are usually plotted as
continuous functions.

11/15/2020 ELEC 604, M. hafez 56


11/15/2020 ELEC 604, M. hafez 57
DFT in Linear Filtering
 Suppose that we have a finite-duration sequence 𝑥(𝑛) of length L
which excites an FIR filter with impulse response ℎ(𝑛) of length
M. Without loss of generality, let

the duration of 𝑦(𝑛) is L +M − 1.


𝑥(𝑛) 𝑦(𝑛)
𝐻(𝜔)

where {𝑋(𝑘)} and {𝐻(𝑘)} are the N-point DFTs of the corresponding sequences
𝑥(𝑛) and ℎ(𝑛), respectively.
11/15/2020 ELEC 604, M. hafez 58
Example

11/15/2020 ELEC 604, M. hafez 59


Example Conti….

11/15/2020 ELEC 604, M. hafez 60


Example conti….
 Try circular convolution in the time domain after
padding the sequences 𝑥(𝑛) and ℎ(𝑛) with a
sufficient number of zeros forces the circular
convolution to yield the same output sequence as
linear convolution.

11/15/2020 ELEC 604, M. hafez 61


Example
 Determine the sequence 𝑦(𝑛) that results from the
use of four-point (N=4) DFTs in the previous example

11/15/2020 ELEC 604, M. hafez 62


Practice Proplems
Chapter 7: (Proakis, US Edition)
7.1, 7.2 (a,c), 7.4(a), 7.7, 7.13, 7.14,
,7.23, 7.25, 7.28

11/15/2020 ELEC 604, M. hafez 63


Assignment # 5
Due Date: 26/11/2020
Chapter 7: (Proakis, US Edition)
7.2 (b), 7.6, 7.17, 7.23, (d,e,f), 7.29,
7.30

Use Matlab whenever possible to


simply your solution and illustrate
your graphs
11/15/2020 ELEC 604, M. hafez 64

You might also like