Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
in
Introduction: Digital Signal Processing (D SP) refers to processing of signals by digital systems like Personal Computers (PC) and
systems designed using digital Integrated Circuits (ICs), M icroprocessors, microcontrollers etc. In DSP, all the signals are discrete and the
analog signals such as speech, music, audio etc are converted to discrete form by Analog to Digital Converters (ADC) and after processing,
the signals are converted back to analog form using Digital to Analog Converters (DAC).
M any applications demand the processing of signals in frequency domain. For example, frequency content, energy, power spectrums etc, can
be better analyzed in frequency domain. Hence signals are transformed from time domain to frequency domain using Fourier Transforms (FT)
and Discrete Fourier Transforms (DFT). For discrete signals DFT is used. DFT can also be used for linear filtering and correlation. Once the
required analysis and processing is done, then the signals are transformed back to time domain by Inverse Discrete Fourier Transform (IDFT).
X = x n e−j n − − − − − − − (1)
n=−∞
where is the discrete frequency and is the continuous function from 0 to 2.
Even though x(n) is a discrete time signal, its spectrum is periodic and continuous in nature, hence it cannot be
evaluated using digital computer / digital processor.
Frequency Domain Sampling
To overcome the above problem, the spectrum of X() is sampled uniformly. Let N samples are taken from 0
2π
to 2 and hence the spacing between the samples .
N
2π
Using = k in equation (1) results
N
∞
2π −j
2π
k n
X k = x n e N − − − − − − − − − − − − − (2)
N
n=−∞
Where k is the index for samples and k = 0,1,2,3 … … .. N − 1
Figure shows the samples of X() for N = 8.
2π 2π π 3π
k = 2; = k = 4; =π
k = 0; = k = 0 =0 2 k = 6; =
N 8 2
2π 2π π 3π 5π 7π
k = 1; = k = 1 = k = 3; = k = 5; = k = 7; =
N 8 4 4 4 4
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 1
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
In equation (2), n varies from (– to + ). Divide the summation into individual summations containing only
N samples of x(n).
−1 N−1 2N −1
2π −j
2π
kn −j
2π
kn
2π
x n e−j kn
X k = ⋯+ x n e N + x n e N + N +⋯
N
n=−N n=0 n=N
where xp n = x n − lN = ⋯ + x n + 2N + x n + N + x n + x n − N + x n − 2N + ⋯
l=−∞
xp (n) is the periodic repetition of x(n) with a the period of N samples.
Let x(n) be a non periodic signal with L samples. Signal xp (n) is with period N
Case 1: N > L : No aliasing :
Let L = 4 and N = 6; Observe that x(4) and x(5) are zeros. This is because the signal repeats at 6, 12…. Etc.
Since N >L, no aliasing (overlapping of signal)
Reconstruction:
The periodic signal xp (n) can be expressed by discrete Fourier series as
N−1
2π
ck ej kn
xp n = N ; n = 0,1,2, … . N − 1 − − − − − − − − − − − (B)
𝑘=0
N −1
1 2π
xp n e−j kn
And the Fourier coefficient ck = N ; k = 0,1 2 … N − 1 − − − −(C)
N
𝑛=0
Equation (1) transforms the sequence x(n) of length L N in to a sequence of frequency samples X(k) of length
N. Since the frequency samples are obtained by evaluating the FT X() at set of N (equally spaced) discrete
frequencies, the relation is called Discrete Fourier Transform (DFT) of x(n).
1.2(b) - Definition of IDFT
Let x(n) be a discrete signal of length L, X(k) be the N-point DFT of x(n)
The Inverse DFT of sequence X(k) of length N is defined as
N −1
1 2π
X k ej kn
IDFT [X k ] = x n = N n = 0,1,2, … . N − 1 − − − − − − − (2)
N
k =0
Equation (2) allows us to recover the sequence x(n) from frequency samples and is called Inverse Discrete
Fourier Transform (IDFT).
1.3 – Twiddle Factor WN
2𝜋 2π
Let WN = e−j2π /N = cos − 𝑗𝑠𝑖𝑛
𝑁 N
WN is a complex quantity and is called Twiddle factor and hence DFT and IDFT
equation become
N−1
X k = x n WN 𝑘 n k = 0, 1 2 ,3 … … … (N − 1)
n=0
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 3
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
N−1
1
x n = X k WN −𝑘 n n = 0, 1 2 ,3 … … … (N − 1)
N
k=0
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 4
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
X z = x n z− n
n=0
Evaluate X(z) at N equally spaced points on the unit circle at z = e(j2k/N)
N−1
j2π kn
−
X z | j2π k = x n e N = X(k)
z=e N
n=0
The N-point DFT pair is defined as x(n) DFT X(k) and xp (n) DFT X(k)
N −1 N −1
2π 2π
−j kn
x n e−j kn
Also X k = xp n e N = N ; k = 0,1 2 … N − 1 − − − − − −(B)
𝑛 =0 𝑛 =0
𝑁−1
𝑁; 𝑘 = 0
1. Show that 𝑊𝑁 𝑘𝑛 = 𝑁𝛿 𝑘 =
0; 𝑘 ≠ 0
𝑛=0
𝑁−1 𝑁−1
𝑘𝑛 𝑘 𝑛 𝑊𝑁 𝑘𝑁 − 1 𝑒 −𝑗2𝜋𝑘 − 1
𝑺𝒐𝒍𝒖𝒕𝒊𝒐𝒏: 𝑊𝑁 = [𝑊𝑁 ] = = −𝑗2𝜋𝑘 /𝑁
𝑊𝑁 𝑘 −1 𝑒 −1
𝑛=0 𝑛=0
Since k is an integer, for k 0, the numerator value is 0 and hence the summation becomes zero. for k = 0;
N −1 N−1 N−1
kn 0
WN = WN = 1 = N|k =0 = N δ(k)
n=0 n=0 n=0
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 5
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
N−1 N −1
(k − ko )
Similarly, WN = N|k =ko = N δ k− k o and WN (k+ ko ) = N|k = −ko = N δ k+ k o
n=0 n=0
2. Compute the N – point DFT of the following signals: (i) x(n) = (n) (ii) x(n) = (n – no )
2π k o n
(iii) x(n) = an and compute the DFT value of x(n) = 0.5 n ; 0 n 3 (iv) x n = ej N
N
1; 0≤ n ≤ −1 2πk o n 2πk o n
2
(v) x n = N
(N even) (vi) x(n) = cos (vii) x(n) = sin
N N
0; ≤ n ≤ (N − 1)
2
Solution:
N−1 N−1 N−1 N −1 kN
−j
2π
kn kn n kn k n
1 − aN WN 1 − aN
X k = x n e N = 𝑥 𝑛 WN = (a WN ) = [aWN ] = =
1 − aWN k 1 − aWN k
𝑛=0 𝑛=0 𝑛=0 𝑛=0
1 − aN 1 − 0.54 0.9375
X k = k
= k
= 2πk
1 − aWN 1 − (0.5)W4 −j
4
1 − 0.5 e
2π k o n
(iv) x n = ej N
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 6
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
N −1
1 − e−j2π (k−ko )
X k = 2π = 0 for k ≠ k 0 and for k = k 0 ; X k = 1 = Nδ(k − k o )
−j k −ko n
1−e N 𝑛=0
N
1; 0≤ n≤ −1
2
(v) x n = N
(N even)
0; ≤ n ≤ (N − 1)
2
Solution:
N/2−1 N/2−1 2πk N
−j
2π 2π 1−e N 2 1 − e−jπk 1 − (−1)k
e−j N kn 1 e−j N kn
X k = x n = = 2πk
= 2πk
= 2πk
−j −j −j
𝑛=0 𝑛=0 1−e N 1 −e N 1 −e N
2πk o n
(vi) x(n) = cos N
2π 2π
j k n −j k n
2πk o n e N o +e N o W N −k o n + W N k o n W N k o n + W N −k o n
Solution: x(n) = cos = = =
N 2 2 2
N−1 N −1 N −1
kn
WN ko n + WN −ko n WN (k+ko )n + WN (k−ko )n
X k = x n WN = WN kn =
2 2
𝑛=0 𝑛=0 𝑛=0
N
X k = 2 δ (k − k o + δ (k + k o ; for k = k o
0 for k ≠ k o
2πk o n
(vii) x(n) = sin N
2π 2π
j k n −j k n
2πk o n e N o −e N o W N −k o n − W N k o n W N k o n − W N −k o n
Solution: x(n) = sin = = =
N 2j 2j 2j
N−1 N −1 N −1
kn
WN ko n − WN −ko n WN (k+ko )n − WN (k−ko )n
X k = x n WN = WN kn =
2j 2j
𝑛=0 𝑛=0 𝑛=0
N
δ (k − k o − δ (k + k o ; for k = k o
X k = 2j
0 for k ≠ k o
1
; 0≤𝑛≤2
3. Compute the N point DFT of 𝑥 𝑛 = 3
0; 𝑜𝑡𝑒𝑟𝑤𝑖𝑠𝑒
Solution: Here N = 3 and x(n) = { 0.33, 0.33, 0.33}
N −1 2
2π nk 2πnk 2πk 2π2k
−j −j −j −j
X k = x n e N = x n e 3 = 0.33 + 0.33e 3 + 0.33e 3
𝑛=0 𝑛=0
4π 8π
X 2 = 0.33 + 0.33e−j 3 + 0.33e−j 3 = 0.33 − 0.165 + j0.286 − 0.165 − j0.286 = 0
4. Find the DFT of the sequence x(n) = { 0, 1, 2, 3 }. Plot the magnitude and phase spectrum
Solution: N = 4
N−1 3 3
2πnk 2πnk
−j −j
X K = x n e N = x n e 4 = x n W4 kn
𝑛=0 𝑛=0 𝑛 =0
πk 6πk πk 6πk
X K = 0 + 1e−j 2 + 2e−jπk + 3e−j 4 = 1e−j 2 + 2e−jπk + 3e−j 4
X 0 = 1 eo + 2 eo + 3 eo = 6
π 6π
X 1 = 1 e−j2 + 2 e−jπ + 3 e−j 4 = −j − 2 + 3j = −2 + 2j
1; 0 ≤ 𝑛 ≤ 2
5. Find the DFT of the sequence 𝑥 𝑛 = for (i) N = 4 (ii) N = 8 . Plot magnitude
0; 𝑜𝑡𝑒𝑟𝑤𝑖𝑠𝑒
spectrum of X(K) and comment on the result obtained.
Modify the sequence x(n) for a length of 4 by padding a zero x(n) = {1, 1, 1, 0}
N−1 3 3
2πnk 2πnk
−j −j
X K = x n e N = x n e 4 = x n W4 kn
𝑛=0 𝑛=0 𝑛 =0
X 0 = 1 1 + 1 eo + 1 eo + 0 eo = 3
π 6π
X 1 = 1 + 1 e−j2 + 1 e−jπ + 0 e−j 4 = 1 − j − 1 = 0 = −j
X(k) = { 1, – j, 1, j }
Method 2: Here N = 4 and x(n) = { 1, 1, 1}
Modify the sequence x(n) for a length of 4 by padding a zero x(n) = {1, 1, 1, 0}
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 8
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
N −1 3 3
2π nk 2πnk
−j −j
X k = x n e N = x n e 4 = x n W4 kn
𝑛=0 𝑛=0 𝑛=0
Modify the sequence x(n) for a length of 8 by padding a zeros x(n) = {1, 1, 1, 0, 0, 0, 0, 0}
N −1 7 3
2π nk 2πnk
−j −j
X k = x n e N = x n e 8 = x n W8 kn
𝑛=0 𝑛=0 𝑛=0
X k = x n WN kn = x n W8 kn
𝑛=0 𝑛=0
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 9
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
N −1 7
1 1
Solution: x n = X k WN −kn = X k W8 −kn
N 8
𝑘=0 𝑘=0
x(n) = {1, 2, 1, 0 }
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 10
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
9. Compute the DFT of the sequence x(n) = { 0, 1, 2, 3 } plot the magnitude and phase spectrum.
𝑛=0 𝑛=0
πk 3πk
X k = 0 + 1 e−j 2 + 2 e−jπk + x(3)e−j 2
10. Find the 8 point DFT of x(n) = (n) + ( n – 1) + (n – 2). Plot the magnitude and phase spectrum.
11. Given x(n) = { 0.5, 0, 0.5, 0 }. Using z – transform result find its DFT.
N −1 3
−n
𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧: X z = x n z = x n z −n = x 0 + x 1 z −1 + x 2 z−2 + x 3 z −3 = 0.5(1 + z −2 )
𝑛=0 𝑛=0
X(k) = { 1, 0, 1, 0 }
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 11
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
N−1 3 3
1 j
2πnk 1 2πnk
j 1
x n = X k e N = X k e 4 = X k W4 −kn
N 4 4
𝑘=0 𝑘=0 𝑘=0
6πk 10πk
13. Find the 16 point IDFT of X k = cos + j3sin
16 16
15
1 1 δ n +3 + δ n− 3 3 δ n+5 − δ n− 5
x n = x(n)W16−kn = 16 + 16[
16 16 2 16 2
k =0
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 12
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
3; k=0
14. Find the 10 point IDFT of X k =
1; 1≤k ≤9
1
Solution: X(k) = 1 + 2(k) = 1 + 10 (k)
5
X k = 1 + 2W5 k + 3W5 2k + W5 3k
X 0 = 1 + 2W5 0 + 3W5 0 + W5 0 = 7
Solution: x(n) = ( - 1)n = { 1, –1, 1, –1} Use 4 point Twiddle matrix and determine DFT
X(k) = { 0, 0, 4, 0}
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 13
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
Solution: x(n) = ( - 1)n+1 = { –1, 1, –1, 1, –1, 1} find the 6 point DFT of x(n) Similar to problem 15
X(k) = { 0, 0, 0, –6, 0, 0 }
N
1 − (−1) 2
𝑤𝑒𝑛 𝑁 𝑖𝑠 𝑜𝑑𝑑 ; X k = k
=
1 + WN 1 + WN k
N N
−
j2π N
when N is even; k = hence WN k = WN 2 = e N 2 = e−jπ = −1
2
N −1 N−1
n n n
N
X k = −1 −1 1 = [N] N = Nδ k −
k=
2 2
𝑛=0 𝑛=0
21. Given x(n) = (n) + ( n -1) + (n – 2). (a) Find the FT X(ej ) and plot its spectrum. (b) Get the magnitude
of 8 point DFT of x(n) from X(ej ) (c) Get the magnitude of
X(k) for the first 4 samples of x(n) from X(e j )
(b) N = 8; x(n) = { 1, 1, 1 }
2πk
By definition X k = [X ej ] 2πk or X k = [1 + 2cos ] 2πk = 1 + 2 cos ; k = 0 to 7
= = 8
N N
2π 4π
|X 0 | = |1 + 2 cos 0| = 3 |X 1 | = |1 + 2 cos | = 2.414 |X 2 | = |1 + 2 cos |=1
8 8
6π 8π 10π
|X 3 | = |1 + 2 cos | = 0.414 |X 4 | = |1 + 2 cos |=1 |X 5 | = |1 + 2 cos | = 0.414
8 8 8
12π 14π
X 6 | = |1 + 2 cos |=1 |X 7 | = |1 + 2 cos | = 2.414
8 8
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 14
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
2πk
By definition X k = [X ej ] 2πk or X k = [1 + 2cos ] 2πk = 1 + 2 cos ; k = 0 to 3
= = 4
N N
2π
|X 0 | = |1 + 2 cos 0| = 3; |X 1 | = |1 + 2 cos | = 1;
4
4π 6π
|X 2 | = |1 + 2 cos | =1 |X 3 | = |1 + 2 cos | =1
4 4
|X(k)| = { 3, 1, 1, 1 }
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 15
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
N −1
2πkn
−j
X k = x n e N put k = k + N, then
𝑛=0
N−1 N−1 N −1
2πn (k+N ) 2πnk 2πnN 2πnk
−j −j −j −j
X k+N = x n e N = x n e N .e N = x n e N 1 = X(k)
𝑛=0 𝑛=0 𝑛=0
22. Consider two periodic sequences x(n) and y(n) with period N and M respectively. The sequence w(n)
is defined as w(n) = x(n) + y(n). Show that w(n) is periodic with period MN (ii) Also show that W(k)
represents MN point DFT of an MN length sequence w(n)
Solution: (i) The sequence w(n) is periodic with period MN, hence
w(n + MN) = x(n + MN) + y(n + MN)
x(n) = x(n+N) = x(n+2N) = x(n+3N) = …… = x(n + MN) for all integer multiples of N
Similarly, y(n) = y(n+M) = y(n+2M) = y(n+3M) = …… = y(n + MN) for all integer multiples of M
w(n + MN) = x(n) + y(n) = w(n). Hence w(n) is periodic with period MN
(ii) w(n) is a sequence of length MN and its MN point DFT is given as
MN −1
2πkn
−j
W k = w n e MN k = 0,1, 2, … … (MN − 1)
𝑛=0
1.5(b) - Linearity:
If x1 (n) DFT X1 (k) and x2 (n) DFT X2 (k), then
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 16
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
𝜋𝑛 𝜋𝑛
23. Determine the 4 point DFT of the sequence x n = cos + sin using linearity property
4 4
𝜋𝑛 1 1
Solution: Given N = 4, Let x1 n = cos = { 1, , 0, − } and
4 2 2
𝜋𝑛 1 1
x2 n = sin = { 0, , 1, }
4 2 2
N −1 3 N−1 3
kn kn kn
X1 K = x1 n W4 = x1 n W4 X2 K = x2 n W4 = x2 n W4 kn
𝑛=0 𝑛=0 𝑛=0 𝑛=0
X(k) = X1 (k) + X2 (k) = { X1 (0) +X2 (0), X1 (1) +X2 (1), X1 (2) +X2 (2), X1 (3) +X2 (3)}
If X(k) represents the N – point DFT of sequence x(n), then the IDFT X(k) yield a periodic sequence xp (n)
which is related to original sequence x(n) as
∞
𝑥𝑝 # 𝑛 𝑓𝑜𝑟 0 ≤ 𝑛 ≤ 𝑁 − 1
The corresponding finite duration sequence 𝑥 # 𝑛 =
0 𝑜𝑡𝑒𝑟𝑤𝑖𝑠𝑒
#
The sequence x (n) related to x(n) by circular shift and represented as
N −1
#
x (n) = x n − k − lN = x(n – k , Modulo N ) = x(( n – k))N
𝑙 =0
x # (n) = x( n – k )N = x( n – 2 )4
Note: If the argument n is in between 0 and N – 1 ,
# then leave it as it is; otherwise add/subtract
x 0 = x( – 2 )4 = x 2 ; Shift x(n) circularly two
multiples of N from n until the argument lies in
samples in anticlockwise direction between 0 and N – 1.
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 17
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
24. If x(n) is a finite duration sequence of length N, show that x((- n ))N = X((N – n))N
Solution: If N is the period and if x( - n) is periodic with N, then x((- n))N = x( – n + qN) – q
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 18
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
26. If x(n) = { 1, 2, 1, –1, 2, 3 } Determine (i) x((n – 3))6 (ii) x((n + 2))6 and (iii) x((n – 3))6
x1 (0) = x((– 3))6 = x(6 – 3) = x(3) = –1 ; x1 (1) = x((1– 3))6 = x(– 2) = x(6 – 2) = x(4) = 2
x1 (2) = x((2– 3))6 = x(– 1) = x(6 – 1) = x(5) = 3 x1 (3) = x((3– 3))6 = x(0) = 1
x2 (3) = x((3+2))6 = x(5) =3 ; x2 (4) = x((4+ 2))6 = x(6) = x(0) = 1; x2 (5) = x((5+2))6 = x(7) = x(1) = 2
x3 (3) = x((3+3))6 = x(0) = 1; x3 (4) = x((4 + 3))6 = x(7) = x( 1) = 2; x1 (5) = x((5+ 3))6 = x(8) = x(2) = 1
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 19
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
27. The first 5 points of an 8 point DFT of real valued sequence are { 0, 2+ j2, –j4, 2– j2, 0 }. Find the
remaining samples of the DFT.
Solution: Given N = 8; The sequence is real and hence symmetry occurs at k = N/2 = 4
Using symmetry property of real valued sequence X(k) = X* (N – k)
X(k) = { 0, (2+ j2), –j4, (2– j2), 0, (2+ j2), j4, (2– j2)}
28. The first 5 values of an 8 point DFT X(k) for a real valued sequence are { 0.25, (0.125 – j0.3018), 0,
(0.125 – j0.518), 0 }. Find the remaining values. Estimate the value of x(0).
Solution: Given N = 8; The sequence is real and hence symmetry occurs at k = N/2 = 4
Using symmetry property of real valued sequence X(k) = X* (N – k)
Put k = 5; X(5) = X* (N – k) = X* (8 – 5) = X* (3) = [0.125– j0.518]* = 0.125 + j0.518
Put k = 6; X(6) = X* (N – k) = X* (8 – 6) = X* (2) = [0]* = 0
Put k = 7; X(7) = X* (N – k) = X* (8 – 7) = X* (1) = [0.125 – j0.3018 ]* = 0.125 + j0.3018
X(k) = { 0.25, (0.125 – j0.3018), 0, (0.125 – j0.518), 0, (0.125 + j0.518), 0, (0.125 + j0.3018) }
Estimation of x(0)
N −1 7
1 1
x n = X(k) ej2πkn /N = X(k) ej2π kn /8
N 8
k =0 k =0
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 20
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
1
put n = 0; x(0) = 8 [ X 0 + X 1 + X 2 + X 3 + X 4 + X 5 + X 6 + X 7 = 0.09375
29. Compute the 5 point DFT of the sequence x(n) = { 1, 0, 1, 0, 1 } using symmetry property.
30 Show that the given sequence x(n) = 4(n) + 3( n – 1) + 2(n – 2) + (n – 3) satisfies symmetry
property for N = 6
Proof: For a real valued even sequence, its XI(k) = 0 since xI(n) is zero. Hence X(k) = X R(k) and its IDFT is
N−1
1 2𝜋𝑘𝑛
xR n = X k cos −− − −− −− − 0≤ n ≤ N− 1
𝑁 𝑁
𝑘=0
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 21
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
Proof: For a real valued odd sequence, its XR(k) = 0 since xR(n) is zero. Hence X(k) = XI(k) and its IDFT is
N−1
1 2𝜋𝑘𝑛
xI n = 𝑗 X k sin − −− −− −− − 0 ≤ n ≤ N− 1
𝑁 𝑁
𝑘=0
Purely imaginary sequence is given by x(n) = j xI(n), the DFT of this sequence is given by
N −1 N −1
2𝜋𝑘𝑛 2𝜋𝑘𝑛
XR k = xI n sin and XI k = xI n cos
𝑁 𝑁
𝑛=0 𝑛=0
It is observed that XR(k) is odd and XI(k) is even. Here if xI(n) is odd, then XI(k) becomes zero since cos is even
function and if xI(n) is even, then X R(k) becomes zero since sin is odd function.
31. (i) If x(n) is real and even sequence, then show that its DFT is purely real
(ii) For real and odd sequence show that its DFT is purely imaginary.
𝑥 𝑛 + 𝑥 (−𝑛) 𝑥 𝑛 − 𝑥 (−𝑛 )
Solution: 𝑥 𝑒 (𝑛) = and 𝑥 𝑜 (𝑛) =
2 2
N−1
1 2πkn 1
i DFT xe n = x n + x −n e− N = X k + X −k
2 2
n=0
1
DFT xe n = a + jb + a − jb = a (real value)
2
Hence the DFT of a real valued even function is purely real
N−1
1 2πkn 1
ii DFT xo n = x n − x −n e− N = X k − X −k
2 2
n=0
1
DFT xe n = a + jb − a + jb = jb (imaginary value)
2
Hence the DFT of a real valued odd function is purely imaginary
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 22
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
32. Check whether the sequences given below will have real valued or imaginary valued 8 point DFT
(i) x1 (n) = {2, 2, 2, 0, 0, 0, 2, 2 } (ii) x2 (n) = { 4, –4, 0, 0, 0, 0, –4, –4 }(iii) x3 (n) = {0, 1, 1, 0, 0, 0, –1, –1}
Solution:
x1 ( – n) = {2, 2, 2, 0, 0, 0, 2, 2 }
The given sequence is real and even, hence its DFT purely real
The given sequence is neither even nor odd. Hence its DFT is neither real nor imaginary
The given sequence is real and odd, hence its DFT purely imaginary
Solution: (i) x(n) = – x(N – 1 – n) the given sequence is odd and for odd sequence
N −1 N−1
2πkn
X k = −j x n sin 𝑎𝑛𝑑 𝑒𝑛𝑐𝑒 X 0 = −j x n sin 0 = 0
N
𝑛=0 𝑛=0
(i) x(n) = x(N – 1 – n) the given sequence is even and for even sequence
N −1 N −1 N −1
2πkn 2πnN/2
X k = x n cos 𝑎𝑛𝑑 𝑒𝑛𝑐𝑒 X N/2 = x n cos = x n cos πn
N N
𝑛=0 𝑛=0 𝑛=0
Let N = 8, then X(N/2) = { x(0) – x(1) + x(2) – x(3) + x(4) – x(5) + x(6) – x(7)
Hence x(0) = x(7); x(1) = x(6); x(2) = x(5) and x(3) = x(4)
34. Find the N point DFT of the sequence x(n) = 4 + cos 2 (2n/N); 0 n (N – 1)
Solution: The given sequence is real and even, hence by symmetry property
N −1 N−1
2πkn 2πn 2πkn
X k = x n cos = 4 + cos 2 cos 𝑘 = 0, 1, 2 … . (𝑁 − 1)
N N N
𝑛=0 𝑛=0
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 23
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
Here x1 (n) N x2 (n) represents the circular convolution of x1 (n) and x2 (n).
𝑛=0 p=0
and x3 (m) represents the sequence whose DFT is X3 (k), then using IDFT
N−1 N−1
1 2πkm 1 2πkm
−1 j j
DFT [X3 k ] = X3 k e N = X1 (k)X2 k e N
N N
𝑘=0 𝑘=0
N−1 j2π(m−n−p)
j2π(m−n−p) N
k 1−e N 1−1
e N = j2π(m−n−p) = j2π(m−n−p) =0 𝑠𝑖𝑛𝑐𝑒 𝑚 − 𝑛 − 𝑝 𝑖𝑠 𝑎𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟
𝑘=0 1−e N 1−e N
x2 𝑝 = x2 m − n − qN = x2 m − n, mod N = x2 (m − n )N
𝑝=0 n=0 n=0 m=0
N−1 N−1
DFT −1 [X3 k ] = x1 n x2 (m − n )N
𝑛=0 m=0
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 24
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
x2 (m – n + qN) represents a periodic sequence with period N delayed by n samples and is equivalent to sequence x 2 (m)
shifted circularly by n samples and can be written as
x2 (m – n + qN) = x2 (m – n , modulo N) = x2 (m – n )N
N−1
x3 m = x1 n x2 𝑚 − 𝑛 N − − − − − − − − − − − (A)
𝑛=0
Linear convolution between two sequences x1 (n) and x2 (n) can be defined as
∞
y n = x1 n x2 𝑛 − 𝑘 − − − − − − − − − − − −(B)
𝑘=−∞
Equation (A) is similar to equation (B) and in equation (A) sequence x2 (n ) is shifted circularly.
N−1
x3 m = x1 n x2 n = x1 n x2 𝑚 − 𝑛 N 𝑤𝑒𝑟𝑒 𝑚 = 0,1,2 … . . 𝑁 − 1
𝑛=0
Multiplication of two DFT’s is equivalent to circular convolution of their sequence in time domain
If x1 (n) DFT X1 [k] and x2 (n) DFT X2 [k], then X3 [k] = X1 [k].X2 [k].
The circular convolution between x1 (n) and x2 (n) is given by x3 (n) = IDFT{X3 [k]}
35 Find the circular convolution between the sequences x1 (n) = { 2, 1, 2, 1 } & x2 (n) = { 1, 2, 3, 4 }
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 25
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
36. Find the circular convolution between the sequences x1 (n) = { 2, 1, 2, 1 } & x2 (n) = { 1, 2, 3, 4 }using
Stockham’s method
Solution: Determine X1 (k) and X2 (k) using matrix method.
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 26
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
Y(k) = X1 (k) X2 (k) = { X1 (0) X2 (0), X1 (1) X2 (1), X1 (2) X2 (2), X1 (3) X2 (3)}= { 60, 0, –4, 0 }
37. Compute circular convolution using DFT/IDFT for x1 (n) = n for 0 n 3 and x2 (n) = cos(n/2)
Solution: N = 4 x1 (n) = { 0, 1, 2, 3} x2 (n) = { 1, 0, –1, 0 }
Find X1 (k) and X2 (k). Take the product Y(k) = X1 (k). X2 (k)
38. Find the circular convolution between the sequences shown below
39. Given x(n) = { 1, 2, 3, 4}; h(n) = { 1, 2, 2 } Compute (i) Circular convolution (ii) Linear convolution
(iii) Linear convolution from circular convolution. Comment on the result
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 27
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
Comment: The outputs Circular convolution and Linear convolution are same if the sequence lengths of input
sequences of circular convolution are L = M + N - 1
40. Compute the circular convolution using DFT + IDFT for the following sequences x1 (n) = {2, 3, 1, 1 }
and x2 (n) = { 1, 3, 5, 3 }
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 28
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in
2πn
42 Determine the N point DFT of x n = cos and hence find x(n) N x(n)
N
Wn −n + Wn n δ k+ 1 + δ k− 1
X k = DFT = N
2 2
2
2
δ k+1 + δ k−1 N2 δ k + 1 + δ k − 1
X k .X k = N =
4 2 2
N2 δ k + 1 + δ k − 1 N 2πn
y n = IDFT = cos
2 2 2 N
2π n 2πn
43 Find the circular convolution between the sequences x1 n = cos and x2 n = sin
N N
Wn −n + Wn n δ k+1 + δ k−1
X1 k = DFT = N
2 2
Wn −n − Wn n δ k+ 1 −δ k− 1
X2 k = DFT = N
2j 2j
2 2
δ k+ 1 − δ k+1 −N δ k+1 − δ k−1
X1 k . X2 k = N 2 = N
4 j2 2 2j
Let y(n) = x1 (n) N x2 (n) hence y(n) = IDFT [X1 (k). X2 (k)]
This is a supporting material for the SCE students. Any use for commercial purpose has to be permitted by the author ©Ravi Shankara.M.N. Page 29