Unit Iii - Discrete Fourier Series & Fourier Transforms Syllabus
Unit Iii - Discrete Fourier Series & Fourier Transforms Syllabus
com
UNIT III – DISCRETE FOURIER SERIES & FOURIER TRANSFORMS
Syllabus
Properties of discrete Fourier series, DFS representation of periodic sequences, Discrete Fourier transforms:
Properties of DFT, linear convolution of sequences using DFT, Computation of DFT, Fast Fourier transforms
(FFT) - Radix-2 decimation in time and decimation in frequency FFT Algorithms, Inverse FFT.
Fourier Series is a mathematical tool that allows the representation of any periodic signal as the sum of
harmonically related complex exponential signals. The Fourier Series representation of a discrete time
periodic signal involves a finite number of terms.
The smallest value of N for which this holds is called the fundamental period. The fundamental frequency is
2𝜋
𝜔0 = 𝑟𝑎𝑑/𝑠𝑎𝑚𝑝𝑙𝑒.
𝑁
A periodic sequence x[n] can be represented by a Discrete Fourier Series made up of complex exponential
2𝜋
signals of fundamental frequency 𝜔0 = and its harmonics.
𝑁
Similar to continuous Fourier Series, the discrete time exponential Fourier Series consists of exponentials
𝑒 𝑗0𝑛 , 𝑒 ±𝑗𝜔0 𝑛 , 𝑒 ±𝑗2𝜔0 𝑛 , ⋯ ⋯ , 𝑒 ±𝑗𝑘𝜔0 𝑛 , ⋯ ⋯ ⋯
The discrete time complex exponentials whose frequencies are separated by 2π are identical.
2𝜋 2𝜋 2𝜋
𝜑𝑘 (𝑛) = 𝑒 𝑗 𝑁 𝑘𝑛 = 𝑒 𝑗 𝑁 𝑘𝑛 𝑒 𝑗2𝜋𝑛 = 𝑒 𝑗 𝑁 (𝑘+𝑁)𝑛 = 𝜑𝑘+𝑁 (𝑛)
i.e., in general, the first harmonic is identical to the (N+1)st harmonic, the second harmonic to (N+2)nd
harmonic, and so on.
This implies that there are only N independent or unique harmonics whose frequencies range over 2π. So, the
Discrete Fourier Series can be expressed as
𝑁−1
2𝜋
𝑥[𝑛] = ∑ 𝑋𝑘 𝑒 𝑗𝑘𝜔0 𝑛 , 𝜔0 =
𝑁
𝑘=0
𝑋𝑘 = |𝑋𝑘 |𝑒 𝑗∠𝑋𝑘
The plot of |𝑋𝑘 | versus ω is called the magnitude spectrum, and the plot of ∠𝑋𝑘 versus ω is called the
phase spectrum.
𝑥[𝑛] ↔ 𝑋𝑘
1. Linearity
If x[n] and y[n] are two periodic signals with period N, and their corresponding DFS coefficients are
Xk and Yk .i.e.,
If 𝑥[𝑛] ↔ 𝑋𝑘
And y[𝑛] ↔ 𝑌𝑘
Then, A𝑥[𝑛] + 𝐵𝑦[𝑛] ↔ 𝐴𝑋𝑘 + 𝐵𝑌𝑘
2. Time – shifting
If 𝑥[𝑛] ↔ 𝑋𝑘
then x[𝑛 − 𝑛0 ] ↔ 𝑒 −𝑗𝑘𝜔0 𝑛0 𝑋𝑘
3. Frequency – shifting
If 𝑥[𝑛] ↔ 𝑋𝑘
Then 𝑒 𝑗𝑛𝜔0 𝑘0 𝑥[𝑛] ↔ 𝑋𝑘−𝑘0
4. Time – reversal
If 𝑥[𝑛] ↔ 𝑋𝑘
Then 𝑥[−𝑛] ↔ 𝑋−𝑘
5. Periodic convolution
If 𝑥[𝑛] ↔ 𝑋𝑘
And y[𝑛] ↔ 𝑌𝑘
6. Multiplication
If 𝑥[𝑛] ↔ 𝑋𝑘
And y[𝑛] ↔ 𝑌𝑘
8. Parseval’s Relation
1
∑ |𝑥[𝑛]|2 = ∑ |𝑋𝑘 |2
𝑁
𝑛=〈𝑁〉 𝑘=〈𝑁〉
The Fourier transform of a discrete – time non periodic sequence x[n] is given by
∞
𝑁−1 𝑁−1
−𝑗2𝜋𝑘𝑛
𝑋(𝑘) = 𝑋(𝜔)| 2𝜋𝑘 =∑ 𝑥[𝑛]𝑒 𝑁 = ∑ 𝑥[𝑛]𝑊𝑁𝑛𝑘 , 𝑘 = 0,1, ⋯ , 𝑁 − 1
𝜔=
𝑁
𝑛=0 𝑛=0
The Inverse Discrete – Fourier Transform is given by
𝑁−1 𝑁−1
1 𝑗2𝜋𝑘𝑛 1
𝑥[𝑛] = ∑ 𝑋(𝑘)𝑒 𝑁 = ∑ 𝑋(𝑘)𝑊𝑁−𝑛𝑘 , 𝑛 = 0, 1, ⋯ , 𝑁 − 1
𝑁 𝑁
𝑛=0 𝑛=0
2𝜋
−𝑗
Where 𝑊𝑁 = 𝑒 𝑁 = 𝑇𝑤𝑖𝑑𝑑𝑙𝑒 𝑓𝑎𝑐𝑡𝑜𝑟
Properties of DFT
1. Periodicity
If 𝑥[𝑛] ↔ 𝑋(𝑘)
then
𝑋(𝑘 + 𝑚𝑁) = 𝑋(𝑘), 𝑚 = 𝑖𝑛𝑡𝑒𝑔𝑒𝑟
𝑎𝑛𝑑, 𝑥[𝑛 + 𝑚𝑁] = 𝑥[𝑛], 𝑚 = 𝑖𝑛𝑡𝑒𝑔𝑒𝑟
i.e., both DFT and Inverse DFT are periodic with period N.
If 𝑥1 [𝑛] ↔ 𝑋1 (𝑘)
And 𝑥2 [𝑛] ↔ 𝑋2 (𝑘)
Thus, a circular shift of an N – point sequence is equivalent to a linear shift of its periodic
extension.
The finite – duration circular time shifted sequence xc[n] is related to the original sequence x[n]
by a modulo operation.
𝑥𝑐 [𝑛] = 𝑥[〈𝑛 − 𝑛0 〉𝑁 ]
Modulo Operation: if the argument (n – n0) is between 0 and N-1, then leave it as it is;
otherwise, add or subtract multiples of N from the argument (n – n0) until the result is between 0
and N – 1.
𝑁−𝑝𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
If 𝑥[𝑛] ↔ 𝑋[𝑘]
𝑁−𝑝𝑜𝑖𝑛𝑡 𝐷𝐹𝑇 𝑘𝑛0
Then 𝑥[〈𝑛 − 𝑛0 〉𝑁 ] ↔ 𝑋[𝑘]𝑊𝑁
4. Circular frequency shifting
𝑁−𝑝𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
If 𝑥[𝑛] ↔ 𝑋[𝑘]
−𝑛𝑘0 𝑁−𝑝𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
Then 𝑊𝑁 𝑥[𝑛] ↔ 𝑋[〈𝑘 − 𝑘0 〉𝑁 ]
𝑁−𝑝𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
If 𝑥[𝑛] ↔ 𝑋[𝑘]
𝑁−𝑝𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
Then 𝑥[〈−𝑛〉𝑁 ] ↔ 𝑋[〈−𝑘〉𝑁 ]
Circularly even sequence
An N – point sequence x[n] is called circularly even if it is symmetric about the point zero on the
circle. This implies that
𝑥[𝑛] = 𝑥[〈−𝑛〉𝑁 ] = 𝑥[𝑁 − 𝑛], 1 ≤ 𝑛 ≤ 𝑁 − 1
Circularly odd sequence
An N – point sequence x[n] is called circularly odd if it is antisymmetric about the point zero on
the circle. This implies that
𝑥[𝑛] = −𝑥[〈−𝑛〉𝑁 ] = −𝑥[𝑁 − 𝑛], 1 ≤ 𝑛 ≤ 𝑁 − 1
6. Conjugate symmetry
𝑁−𝑝𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
If 𝑥[𝑛] ↔ 𝑋[𝑘]
𝑁−𝑝𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
Then 𝑥 ∗ [𝑛] ↔ 𝑋 ∗ [〈−𝑘〉𝑁 ]
7. Circular convolution
𝑁−𝑝𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
If 𝑥1 [𝑛] ↔ 𝑋1 (𝑘)
𝑁−𝑝𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
And 𝑥2 [𝑛] ↔ 𝑋2 (𝑘)
𝑁−𝑝𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
Then𝑥1 [𝑛] ⊗ 𝑥2 [𝑛] ↔ 𝑋1 (𝑘)𝑋2 (𝑘)
𝑁−1
𝑋(𝑘) = ∑ 𝑥[𝑛]𝑊𝑛𝑘
𝑁 , 𝑘 = 0,1, ⋯ , 𝑁 − 1
𝑛=0
2𝜋
Where 𝑊𝑁 = 𝑒 −𝑗 𝑁
𝑋(0) 1 1 1 ⋯ 1 𝑥[0]
(𝑁−1)
𝑋(1) 1 𝑊𝑁 𝑊𝑁2 ⋯ 𝑊𝑁 𝑥[1]
2(𝑁−1)
𝑋(2) = 1 𝑊𝑁2 𝑊𝑁4 ⋯ 𝑊𝑁 𝑥[2]
⋮ ⋮ ⋮ ⋮ ⋯ ⋮ ⋮
[𝑋(𝑁 − 1)] [1 𝑊𝑁
(𝑁−1)
𝑊𝑁
2(𝑁−1)
⋯ 𝑊
(𝑁−1)(𝑁−1) [𝑥[𝑁 − 1]]
]
𝑁
̅ = ̅̅̅̅̅
𝑜𝑟, 𝑿 𝑾𝑵 𝒙 ̅ … … … 𝐸𝑞𝑛. 𝐴
1 −𝑛𝑘
Similarly, for the IDFT equation, 𝑥[𝑛] = 𝑁 ∑𝑁−1
𝑛=0 𝑋(𝑘)𝑊𝑁 , 𝑛 = 0, 1, ⋯ , 𝑁 − 1, the matrix notation would
be
1 ∗
̅ = ̅̅̅̅̅
𝒙 𝑾𝑵 𝑿 ̅ … … … 𝐸𝑞𝑛 𝐵
𝑁
−𝟏 1 ∗
̅̅̅̅̅
𝑾𝑵 = ̅̅̅̅̅
𝑾
𝑁 𝑵
Linear Convolution Using Circular Convolution
The output of an LTI system is the linear convolution of the input x[n] and the system’s impulse response
h[n]. the DFT is a practical approach for implementing linear system operations in the frequency domain.
But, the problem is, the DFT operations result in a circular convolution in time domain , and not the linear
𝑁−𝑝𝑜𝑖𝑛𝑡 𝐼𝐷𝐹𝑇
convolution. i.e., 𝑋1 (𝑘)𝑋2 (𝑘) ↔ 𝑥1 [𝑛] ⊗ 𝑥2 [𝑛]
Let x[n] be of length Nx and h[n] be of length Nh, and let Nx > Nh. then, the result of linear convolution is of
length N = Nx + Nh – 1 , whereas that of cicular convolution is of length N = max (Nx, Nh).
For circular convolution to yield the same result as the linear convolution, both the sequences must be zero –
padded so that both are of length Nx + Nh – 1. Let the padded sequences be xp[n] and hp[n]. then we compute
the N (= Nx + Nh – 1) point circular convolution of xp[n] and hp[n], resulting in a sequence equal to the linear
convolution x[n]*h[n].
𝑁−𝑝𝑜𝑖𝑛𝑡 𝐼𝐷𝐹𝑇
i.e., 𝑋𝑝 (𝑘)𝐻𝑝 (𝑘) ↔ 𝑥[𝑛] ∗ ℎ[𝑛]
To filter signals like speech signals, etc., which are long data sequences, using DFT, it is required to compute
a large DFT. Moreover, the output samples are not available until all the input samples are produced , thus
GVPW DIGITAL SIGNAL PROCESSING Page 7
www.JntukMaterials.com
introducing an unacceptably large amount of delay. To overcome this problem, the input sequence is divided
into smaller sections/blocks, and each block is processed via DFT and IDFT to produce a block of output
data. The output blocks are fitted together to yield the final output sequence. This procedure is called
sectioned / block convolution. There are two ways to do this: overlap – save method and overlap – add
method.
Let h[n] be the impulse response of length M, and x[n] be the input sequence of length much greater than M.
• x[n] is divided into sections xr[n], each of length N, so that each input section overlaps the preceding
section by M – 1 samples.
• The first M – 1 samples of the first section are set to zero.
• Then, the N – point circular convolution, yr[n] of each section xr[n] with h[n] is obtained.
• The first M – 1 samples of each output section must be discarded.
• The remaining N – M + 1 samples from each successive sections are concatenated to reconstruct the
final filtered output.
𝑥[𝑛 + 𝑟𝑁], 0 ≤ 𝑛 ≤ 𝑁 − 1
Where 𝑥𝑟 [𝑛] = {
0, 𝑒𝑙𝑠𝑒
= ∑ 𝑦𝑟 [𝑛 − 𝑟𝑁]
𝑟
Where 𝑦𝑟 [𝑛] = ℎ[𝑛] ∗ 𝑥𝑟 [𝑛]
Since h[n] is of length M and 𝑥𝑟 [𝑛] is of length N, the linear convolution result 𝑦𝑟 [𝑛] is of length N +
M – 1, which can be obtained using N + M – 1 point DFTs.
• Since 𝑥𝑟 [𝑛] is the section of x[n] starting at n = rN, so 𝑦𝑟 [𝑛] also starts at n = rN. But, each 𝑦𝑟 [𝑛] is
of length N + M – 1, whereas each 𝑥𝑟 [𝑛] is of length N.
i.e.,
𝑦0 [𝑛] = ℎ[𝑛] ∗ 𝑥0 [𝑛], 0≤𝑛 ≤𝑁+𝑀−2
𝑦1 [𝑛] = ℎ[𝑛] ∗ 𝑥1 [𝑛], 𝑁 ≤ 𝑛 ≤ 2𝑁 + 𝑀 − 2
𝑦2 [𝑛] = ℎ[𝑛] ∗ 𝑥2 [𝑛], 2𝑁 ≤ 𝑛 ≤ 3𝑁 + 𝑀 − 2, 𝑎𝑛𝑑 𝑠𝑜 𝑜𝑛
Fast Fourier Transform is an efficient algorithm developed by Cooley & Tukey in 1965, used to compute the
DFT with reduced computations. Due to the efficiency of FFT, it is used for spectrum analysis, convolutions,
correlations and linear filtering.
FFT reduces the problem of calculating an N – point DFT to that of calculating many smaller – sized DFTs.
The properties of the twiddle factor WN used in this algorithm are:
𝑁 𝑗2𝜋𝑘
𝑘+
1. 𝑊𝑁 2
= 𝑒− 𝑁 𝑒 −𝑗𝜋 = − 𝑊𝑁𝑘 (Symmetry Property)
𝑗2𝜋𝑘
2. 𝑊𝑁𝑘+𝑁 = 𝑒 − 𝑁 𝑒 −𝑗2𝜋 = 𝑊𝑁𝑘 (periodicity property)
𝑗2𝜋𝑚 𝑗2𝜋
−𝑁
3. 𝑊𝑁𝑚 = 𝑒 − 𝑁 =𝑒 ⁄𝑚
= 𝑊𝑁⁄𝑚
The Decimation – In – Time (DIT) and Decimation – In – Frequency (DIF) FFT algorithms use the “divide –
and – conquer” approach. This is possible if the length of the sequence N is chosen as N = rm. here, r is called
the radix of the FFT algorithm. The most practically implemented choice for r = 2 leads to radix – 2 FFT
𝑁
algorithms. So, with N = 2m, the efficient computation is achieved by breaking the N – point DFT into two 2
𝑁 𝑁
- point DFTs, then breaking each - point DFT into two - point DFTs and continuing this process until 2 –
2 4
point DFTs are obtained. For N=8, the Decimation – In – Time algorithm decomposition would be
𝑁 𝑁
−1 −1
2 2
(2𝑛+1)𝑘
= ∑ 𝑥[2𝑛]𝑊𝑁2𝑛𝑘 + ∑ 𝑥[2𝑛 + 1]𝑊𝑁
𝑛=0 𝑛=0
𝑁 𝑁
−1 −1
2 2
Using the third property of the twiddle factor, WN, the above equation can be rewritten as
𝑁 𝑁
−1 −1
2 2
= ∑ 𝑥[2𝑛]𝑊𝑁𝑛𝑘
⁄
+ 𝑊𝑁𝑘 ∑ 𝑥[2𝑛 + 1]𝑊𝑁𝑛𝑘
⁄
2 2
𝑛=0 𝑛=0
𝑋(𝑘) = ∑ 𝑔[𝑛]𝑊𝑁𝑛𝑘
⁄
+ 𝑊𝑁𝑘 ∑ ℎ[𝑛]𝑊𝑁𝑛𝑘
⁄
2 2
𝑛=0 𝑛=0
Where G(k) and H(k) are the N/2 – point DFTs of g[n] and h[n] respectively. So, G(k) and H(k) are periodic
with period N/2 .i.e.,
𝑁
𝐺 (𝑘 + ) = 𝐺(𝑘) … … 𝑒𝑞𝑛. 4
2
𝑁
𝑎𝑛𝑑, 𝐻 (𝑘 + ) = 𝐻(𝑘) … … 𝑒𝑞𝑛. 5
2
GVPW DIGITAL SIGNAL PROCESSING Page 10
www.JntukMaterials.com
And using the symmetry property of the twiddle factor, WN, and equations4 & 5
For the remaining 4 points X(4) to X(7), we use equations 4, 5, 6 and 7 to get
The above process is repeated for calculating the N/2 point DFTs of g[n] and h[n], and this is continued till
we get two point DFTs. Once we reach a two – point sequence, say p[n]={p[0], p[1]}, its 2 – point DFT
would be
1
𝑃(𝑘) = ∑ 𝑝[𝑛]𝑊𝑛𝑘
2 , 𝑘 = 0,1
𝑛=0
Due to repeated decimations, the input sequence is scrambled, and the order of the final input sequence is
obtained as follows
In this algorithm, we decimate the DFT sequence X(k) into smaller and smaller subsequences (Instead of the
time – domain sequence x[n]).
𝑁
𝑁−1 2 −1 𝑁−1
𝑋(𝑘) = ∑ 𝑥[𝑛]𝑊𝑛𝑘
𝑁 =∑ 𝑥[𝑛]𝑊𝑛𝑘
𝑁 + ∑ 𝑥[𝑛]𝑊𝑛𝑘
𝑁
𝑛=0 𝑛=0 𝑁
𝑛= 2
𝑁 𝑁
−1 −1
2 2
𝑁 𝑛𝑘 𝑁2𝑘
=∑ 𝑥[𝑛]𝑊𝑁𝑛𝑘 + ∑ 𝑥[𝑛 + ]𝑊𝑁 𝑊𝑁
2
𝑛=0 𝑛=0
𝑁
𝑘
𝑏𝑢𝑡, 𝑊𝑁2 = (−1)𝑘
𝑁
−1
2
𝑁 𝑁
𝑋(2𝑘 + 1) = ∑ {𝑥[𝑛] − 𝑥 [𝑛 + ]} 𝑊𝑁𝑛 𝑊𝑁𝑛𝑘 , 𝑘 = 0,1, … , − 1 … … 𝑒𝑞𝑛. 2
2 2 2
𝑛=0
𝑁 𝑁
𝑙𝑒𝑡 𝑔[𝑛] = 𝑥[𝑛] + 𝑥 [𝑛 + ] , 0 ≤ 𝑛 ≤ − 1 … … 𝑒𝑞𝑛. 3
2 2
𝑁 𝑁
𝑎𝑛𝑑, ℎ[𝑛] = {𝑥[𝑛] − 𝑥 [𝑛 + ]} 𝑊𝑁𝑛 , 0 ≤ 𝑛 ≤ − 1 … … 𝑒𝑞𝑛. 4
2 2
Substituting equations 3 & 4 in equations 1 & 2 respectively
𝑁
𝐺(𝑘) = 𝑋(2𝑘), 0 ≤ 𝑘 ≤ −1
2
𝑁
𝑎𝑛𝑑, 𝐻(𝑘) = 𝑋(2𝑘 + 1) 0 ≤ 𝑘 ≤ −1
2
For example, for N=8, using equations 3 & 4, we get
The above process of decimation is repeated for G(k) and H(k), until we reach a 2 – point sequence. The 2 –
point DFT is calculated as in the previous section. The final butterfly diagram for Decimation – In –
Frequency FFT algorithm for N = 8 is as follows
A direct computation of DFT requires a large number of multiplications and additions. An N – point DFT is
given by
𝑁−1
𝑋(𝑘) = ∑ 𝑥[𝑛]𝑊𝑛𝑘
𝑁 , 𝑘 = 0,1, ⋯ , 𝑁 − 1
𝑛=0
In the above equation, each DFT point computation involves N complex multiplications and (N – 1) complex
additions. So, the N – point DFT calculations involve N2 complex multiplications and N(N – 1) complex
additions. This means approximately 106 complex multiplications and additions for a 1024 – point
sequence.
On the other hand, in an FFT algorithm, a basic butterfly in DIT – FFT algorithm is represented as
For a 1024 – point sequence, this means approximately 5120 complex multiplications and 10240
complex additions. i.e., approximately 100 times less additions and 200 times less multiplications than
direct computation of DFT.
As the number of input samples increase, the savings in the number of computations also increase.
In – Place computations
Another advantage of FFT algorithm is In – Place computations. As shown in the previous diagram of a basic
butterfly, any butterfly calculation involves 2 complex inputs a and b, and 2 complex outputs A and B. once,
these two outputs are calculated, the inputs of the butterfly are not used in any other calculation. So, A and B
can be stored in the same memory locations as a and b. this is called In – Place computation.
Let X(k) be the N – point DFT of a length – N sequence x[n]. The inverse DFT is given by
𝑁−1
1
𝑥[𝑛] = ∑ 𝑋(𝑘)𝑊𝑁−𝑛𝑘 , 𝑛 = 0, 1, ⋯ , 𝑁 − 1
𝑁
𝑛=0
𝑁−1
1
𝑜𝑟, 𝑥[𝑛] = ∑ 𝑋(𝑘)(𝑊𝑁𝑛𝑘 )∗ , 𝑛 = 0, 1, ⋯ , 𝑁 − 1
𝑁
𝑛=0
An FFT algorithm can be used to compute the inverse DFT by replacing x[n] by X(k), taking the negative
powers of WN, and dividing the output by N. Hence, in order to compute the inverse DFT from an FFT
algorithm, following steps can be followed
• Take X(k) as the input sequence and x[n] as the output sequence
• Compute FFT by replacing the twiddle factors WN by 𝑊𝑁−1
• Divide the output sequence by N
So, the DIT – FFT algorithm becomes DIF Inverse FFT algorithm and vice – versa.
For example the DIT – Inverse FFT butterfly diagram for N =8 would be as follows