Sei sulla pagina 1di 29

Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.

in

Module 1 : Discrete Fourier Transforms (DFT)


DFT : Frequency domain sampling and reconstruction of discrete time signals. DFT as a linear transformation, its relationship with other
transforms. Properties of DFT, Multiplication of two DFTs- the Circular convolution.

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).

1.1 - Frequency Domain Sampling and Reconstruction of Discrete time signals

1.1(a) - Need of Frequency Domain Sampling

The Fourier transform X() of a discrete time signal x(n) is given as


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

to 2 and hence the spacing between the samples .
N

Using  = k in equation (1) results
N

2π −j

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

To determine Minimum value of N

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

kn −j

kn

x n e−j kn
X k = ⋯+ x n e N + x n e N + N +⋯
N
n=−N n=0 n=N

The above summation can be represented as


∞ 𝑙N +N −1
2π 2π
x n e−j kn
X k = N
N
𝑙 =−∞ n =𝑙N
If the index of the inner summation is changed from n to (n – lN);
then the limits will be n = 0 and n = (N – 1)
∞ N −1
2π 2π
x n − 𝑙N e−j kn
X k = N
N
𝑙 =−∞ n=0

Interchanging the order of summation results


N −1 ∞ N−1
2π −j

kn

xp n e−j kn
X k = x n − 𝑙N e N = N − − − − − − − (A)
N
𝑛=0 𝑙=−∞ 𝑛=0

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)

Case2: N < L : Aliasing :


Let N = 3, since N < L, there are two samples are overlapping at n = 3,6..etc. This called aliasing and it is not
possible to obtain x(n) from xp (n).
To avoid aliasing in time domain, the number of samples in the frequency spectrum must be greater than the
number of samples in time domain sequence, i.e N > L
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 2
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in

Reconstruction:
The periodic signal xp (n) can be expressed by discrete Fourier series as
N−1

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

From equations (A) and (C)


1 2π X[k]
ck = X k = where k = 0,1 2 … N − 1
N N N
Hence equation (C) can be written as
N−1
1 2π 2π
k ej kn
xp n = X N n = 0,1,2, … . N − 1 − − − − − − − (D)
N N
𝑘=0

Equation (D) gives the expression for time domain sequence xp (n) from frequency domain samples X k .
N
Hence the time domain sequence can be constructed from frequency domain sampling.

1.2(a) - Definition of DFT


Let x(n) be a discrete signal of length L, X(k) be the DFT of x(n)
The N point DFT of x(n) where N  L is defined as
N −1
2π 2π
x n e−j k n
X k =X k = N for k = 0,1,2 3 … … … N − 1 − − − − − − − −(1)
N
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

WN can be expressed as |WN| = 1|-(2/N)

1.3 (a) - Properties of Twiddle Factor

(1) Periodicity : WNk+N = WNk

Proof: WNk+N = e–j(2/N) (k+N)

WNk+N = e–j(2k/N) . e–j(2k) = WNk (1) = WNk

(2) Symmetry property: WNk+N/2 = – WNk

Proof: WNk+N/2 = WNk WNN/2 = WNk e–j(2k/2N)

WNk+N/2 = WNk e–jk = WNk (–1) = –WNk

(3) Conjugation: WN* = WN –1

Proof: WN* = [ e–j(2/N) ]* = [ej(2/N) ] = WN –1

(4) Modifying the period : WN 2k = WN/2 k

Proof: WN 2k = e–j2(2k/N) = e–j(2k/N/2) = WN/2 k

1.3(b) - DFT as a Linear Transformation


N−1

The DFT X k = x n WN 𝑘 n k = 0, 1 2 ,3 … … … N − 1 can be expressed as


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 4
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in

1.4 Relationship of the DFT to other Transforms

1.4(a) - Relationship between DFT and Z transform


The Z – transform of N-point sequence x(n) is given by
N−1

X z = x n z− n
n=0
Evaluate X(z) at N equally spaced points on the unit circle at z = e(j2k/N)
N−1
j2π kn

X z | j2π k = x n e N = X(k)
z=e N
n=0

1.4(b) - Relationship between DFT and DFS


The DFS coefficients for a periodic sequence xp (n) over period N are given by
N −1
1 2π
xp n e−j kn
c k = N ; k = 0,1 2 … N − 1 − − − − − − − (𝐴)
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

From equations (A) and (B) results X(k) = N c(k)

1.4(c) - Relationship between DFT and DTFT


DTFT of x(n) is given by

2πk
X  = x n e−j n using  =
N
𝑛=−∞
N −1
2πk −j

kn
X = xp n e N =X k − − − −DFT of x(n)
N
𝑛=0

Numerical Proble ms:

𝑁−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

(i) x(n) = (n)


1; 𝑛=0
Solution: 𝑥 𝑛 = 𝛿 𝑛 =
0; 𝑛≠ 0
N−1 N−1
2π 2π
−j kn
𝛿 𝑛 e−j kn
X k = x n e N = N = 1 at n = 0
𝑛=0 𝑛=0

Hence (n)  DFTN  1

(ii) x(n) = (n – no )


1; 𝑛 = 𝑛𝑜
Solution: 𝑥 𝑛 = 𝛿 𝑛 − 𝑛𝑜 =
0; 𝑛 ≠ 𝑛𝑜
N−1 N−1
2π 2π 2π
−j kn
𝛿 𝑛 − 𝑛𝑜 e−j kn
= e−j k 𝑛𝑜
X k = x n e N = N N = WN kn o
n=n o
𝑛=0 𝑛=0

Similarly 𝛿 𝑛 + 𝑛𝑜  DFTN  WN −kn o

(iii) x(n) = an and compute the DFT value of x(n) = 0.5 n ; 0  n  3

Solution:
N−1 N−1 N−1 N −1 kN
−j

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

x(n) = 0.5n Here a = 0.5, N = 4

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

N−1 N−1 N−1


−j

kn
2π ko n
j −j

kn −j
2π (k −ko )n 1 − e−j2π (k −ko )
𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧: X k = x n e N = e N e N = e N = 2π
1 − e−j N k−ko n
𝑛=0 𝑛=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 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

X 0 = 0.33 + 0.33 + 0.33 = 1


2π 4π
X 1 = 0.33 + 0.33e−j 3 + 0.33e−j 3 = 0.33 − 0.165 − j0.286 − 0.165 + j0.286 = 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 7
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in

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

2πk 4πk 6πk


X K = x 0 eo + x 1 e−j 4 + x 2 e−j 4 + x 1 e−j 4

π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

X 2 = 1 e−jπ + 2 e−jπ2 + 3 e−j3π = −1 + 2 − 3 = −2


π3 18π
X 3 = 1 e−j 2 + 2 e−jπ3 + 3 e−j 4 = j − 2 − 3j = −2 − 2j
X(k) = { 6, (–2 + 2 j), –2 , (–2 – 2 j) }

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.

Solution: (i) Method 1: 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}
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

2πk 4πk 6πk πk 6πk


X K = x 0 eo + x 1 e−j 4 + x 2 e−j 4 + x 1 e−j 4 = 1 1 + 1 e−j 2 + (1)e−jπk + (0)e−j 4

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 2 = 1 + 1 e−jπ + 1 e−jπ2 + 0 e−j3π = 1 − 1 + 1 + 0 = 1


π3 18π
−j −j
X 3 = 1+ 1 e 2 + 1 e−jπ3 + 0 e 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

(ii) Here N = 8 and x(n) = { 1, 1, 1}

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

Comment: For N = 8; the resolution of the spectrum is better compared to N = 4

6. Find the DFT of x(n) = ( –1)n for 0  n  7

Solution: Here N = 8, x(n) = { 1, –1, 1, –1, 1, –1, 1, –1}


N −1 7

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

7. Find the IDFT of X(k) given


X(k) ={255, 48.63 + j166.05, –51+ j102, –78.63 + j46.05,–85–78.63– j46.05, –51– j102, 48.63 – j166.05 }

N −1 7
1 1
Solution: x n = X k WN −kn = X k W8 −kn
N 8
𝑘=0 𝑘=0

8. Find the IDFT of X(k) = { 4, – 2j, 0, 2j }


N −1 3
1 −kn
1
Solution: x n = X k WN = X k W4 −kn
N 4
𝑘=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.

Solution: Here N = 4 and x(n) = { 0,1, 2, 3}


N −1 3
2π nk 2πnk 2πk 4πk 6πk
−j
X k = x n e N = x n e−j 4 = x 0 + x 1 e−j 4 + x 2 e−j 4 + x(3)e−j 4

𝑛=0 𝑛=0

πk 3πk
X k = 0 + 1 e−j 2 + 2 e−jπk + x(3)e−j 2

k = 0; X 0 = 0 + 1 e−0 + 2 e−0 + 3 e−o = 1 + 2 + 3 = 6


π 3π
k = 1; X 1 = 0 + 1 e−j2 + 2 e−jπ + 3 e−j 2 = −j + 2 −1 + 3 j = −2 + 2j

k = 2; X 2 = 0 + 1 e−jπ + 2 e−j2π + x 3 e−j3π = −1 + 2 − 3 = −2


3π 9π
k = 3; X 3 = 0 + 1 e−j 2 + 2 e−j3π + x 3 e−j 2 = j − 2 − 3j = −2 − 2j

10. Find the 8 point DFT of x(n) = (n) + ( n – 1) + (n – 2). Plot the magnitude and phase spectrum.

Solution: x(n) = { 1, 1, 1 } since N =8, x(n) = { 1, 1, 1, 0, 0, 0, 0, 0 }

Refer problem 5 (ii)

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 = [ X z ]z=e j2π k /N = [0.5(1 + z −2 )]z=e j2π k /4 = 0.5 1 + e−jπk = 0.5 1 + −1 k

X(k) = { 1, 0, 1, 0 }

12. Given X(k) = { 2, 1 + j, 0, 1 – j } find x(n)


Solution: Method 1: Here N = 4 and X(k) = { 2, 1 + j, 0, 1 – j }
N−1 3
1 j
2πnk 1 2πnk 1 2πn 4πn 6πn
x n = X k e N = X k ej 4 = X 0 + X 1 ej 4 + X 2 ej 4 + X 3 ej 4
N 4 4
𝑘=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 11
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in

1 2πn 4πn 6π n 1 πn 3πn


x n = 2 + 1 + j ej 4 + 0 ej 4 + 1 − j ej 4 = 2 + 1 + j ej 2 + 1 − j ej 2
4 4
1 1
n = 0; x 0 = 2 + 1 + j e0 + 1 − j e0 = 2 + 1 + j + 1 − j =1
4 4
1 π 3π 1
n = 1; x 1 = 2 + 1 + j e j2 + 1 − j e j 2 = 2 + 1 + j (j) + 1 − j (−j) = 0
4 4
1 π2 3π2 1
n = 2; x 2 = 2 + 1 + j ej 2 + 1 − j ej 2 = 2− 1−j− 1+ j = 0
4 4
1 π3 9π 1
n = 3; x 3 = 2 + 1 + j ej 2 + 1 − j ej 2 = 2 + 1 + j (−j) + 1 − j (j) = 1
4 4
x(n) = { 1, 0, 0, 1 }

Method 2: Here N = 4 and X(k) = { 2, 1 + j, 0, 1 – j }

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

6πk 10πk 2π(3k) 2π(5k)


𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧: X k = cos + j3 sin = cos + j3sin⁡
16 16 16 16
2π 2π 2π 2π
j 3k −j 3k j 5k −j 5k
e 16 +e 16 e 16 −e 16 W16 −3k + W16 3k W16 −5k − W16 5k
X k = +3 = + 3j
2 2j 2 2j

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

For a casual sequence; δ n + 3 = δ n + 5 = 0


1
𝑛=3
2
Hence 𝑥 𝑛 = 3
𝑛= 5
2
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

Taking IDFT on both sides


1 6 1 1 1 1 1 1 1 1 1
𝑥 𝑛 = 𝛿 𝑛 + = , , , , , , , , ,
5 5 5 5 5 5 5 5 5 5 5

15. Find the 5 point of the discrete time signal x(n) = { 1, 2, 3, 1 }

Solution: N = 5; hence x(n) = { 1, 2, 3, 1, 0 }


N −1 4
kn
X k = x n WN = x n W5 kn = x 1 W5 0 + x 1 W5 k + x 2 W5 2k + x 3 W5 3k + x 4 W5 4k
𝑛=0 𝑛=0

X k = 1 + 2W5 k + 3W5 2k + W5 3k

X 0 = 1 + 2W5 0 + 3W5 0 + W5 0 = 7

X 1 = 1 + 2W5 1 + 3W5 2 + W5 3 = −1.618 − 𝑗3.076

X 2 = 1 + 2W5 2 + 3W5 4 + W5 6 = 1 + 2W5 2 + 3W5 4 + W5 1 = 0.618 + j0.712

X 3 = 1 + 2W5 3 + 3W5 6 + W5 9 = 1 + 2W5 3 + 3W5 1 + W5 4 = 0.618 − j0.712

X 4 = 1 + 2W5 4 + 3W5 8 + W5 12 = 1 + 2W5 4 + 3W5 3 + W5 2 = −1.618 + 𝑗3.076

16. Find the DFT of x(n) = u(n) – u(n – 5)

Solution: x(n) = { 1, 1, 1, 1,1 } N=5

Refer previous problem to find out DFT X(k) = { 5, 0, 0, 0, 0, 0 }

17. Find the 8 point DFT of x(n) = { 2, 2, 2, 2, 2, 2, 2, 2 }

Solution: x(n) = 2[1,1,1,1,1,1,1,1] = 2(1)n 0 n7 hence N = 8

Taking DFT on both sides; X(k) = 2 N (k) = 16 (k)

18. Find the DFT of x(n) = (–1)n ; 0  n  3

Solution: x(n) = ( - 1)n = { 1, –1, 1, –1} Use 4 point Twiddle matrix and determine DFT
X(k) = { 0, 0, 4, 0}

19. Find the DFT of x(n) = (–1)n +1 ; 0  n  5

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 }

20. Find the DFT of x(n) = (–1)n +1 ; 0  n  5


N−1 N −1 N −1
kn n kn
1 − (−1)N WN N 1 − (−1)N
Solution: X k = x n WN = −1 WN = (−1 WN k )n = =
1 − (−1)WN k 1 + WN k
𝑛=0 𝑛=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

Ex: x(n) = { 1, -1, 1, -1 } for N = 4 and its DFT is X(k) = { 0, 0, 4, 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 )

Solution: x(n) = (n) + ( n -1) + (n – 2).

(a) X(ej ) = 1 + e –j + e –j2 = e –j . e j + e –j + e –j .e –j

X(ej ) == e –j [e j +1 + e –j ]= e –j [1 + e j + e –j ]

X(ej ) = e –j [1+2cos] and |X(ej )| = |X()| = [1+2cos]

(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

|X(k)| = { 3, 2.414, 1, 0.414, 1, 0.414, 1, 2.414 }


(c) N = 4; 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 3
= = 4
N N


|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

1.5 - Properties of DFT


The signal x(n) and its DFT X(k) is represented as a pair x(n)  DFT X(k)

1.5(a) - Periodicity: If x(n) and X(k) are DFT pair,

If x(n + N) = x(n) for all n


then X(k + N) = X(k) for all k

Proof: By the definition of DFT

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

a x1 (n) + b x2 (n)  DFT a X1 (k) + b X2 (k) where a and b are constants.

Proof: By the definition of DFT


N −1
2πkn
−j
X k = x n e N if x n = a x1 n + b x2 n ,then
𝑛=0
N−1 N−1 N−1
2πkn 2πkn 2πkn
−j −j −j
X k = [a x1 n + b x2 n ] e N = a x1 n e N + b x2 n e N = a X1 k + b X2 k
𝑛=0 𝑛=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 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)}

X(k) = {3.414, –j1.414, 0.586, j1.414 }


1.5(c) - Circular Symmetries of a Sequence

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

xp n = x n − lN where l is the index


𝑙=−∞
xp (n) is the periodic repetition of x(n) and hence it can be concluded that
𝑥𝑝 𝑛 𝑓𝑜𝑟 0 ≤ 𝑛 ≤ 𝑁 − 1
x(n)  DFT X(k) xp (n)  DFT X(k) and 𝑥 𝑛 =
0 𝑜𝑡𝑕𝑒𝑟𝑤𝑖𝑠𝑒
#
If xp (n) is shifted by k units to right and the new sequence x p (n) can be expressed as

#
xp n = xp n − k = x n − k − lN
𝑙=−∞

𝑥𝑝 # 𝑛 𝑓𝑜𝑟 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

Illustration: Let the shift k = 2 and periodicity N = 4

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

x# 1 = x (−1 )4 = x 3 ; Shift x(n) circularly one sample in anticlockwise direction

x # 2 = x (0 )4 = x 0 ; No shift or shift x(n) by 4 samples in ACW direction

x # 3 = x (1 )4 = x 1 ; Shift x(n) circularly one sample in clockwise direction

Circularly Even Sequence: Circularly Odd Sequence:


A sequence is said to be circularly even if it is symmetric about the A sequence is said to be circularly odd if it is anti-symmetric about
point zero on the circle. x(N – n) = x1 (n) the point zero on the circle. x(N – n) = – x1 (n)
Illustration: Illustration:
consider x(n) = { 4,6,8,6} ; N = 4 x1(n) = x(4 – n) consider x(n) = { 4, –6, 8, 6} ; N = 4 x1(n) = x(4 – n)
x 1(0) = x(4 – 0) = x(0); x1 (1) = x(4 – 1) = x(3) ; x 1(0) = x(4 – 0) = x(0); x1 (1) = x(4 – 1) = x(3) ;
x 1(2) = x(4 – 2) = x(2) ; x1 (3) = x( 4 – 3) = x(1) x 1(2) = x(4 – 2) = x(2) ; x1 (3) = x( 4 – 3) = x(1)

x1 (n) = { 4,6,8,6} x1 (n) = { 4,6,8, –6}

Circularly Folded Sequence : A circularly folded sequence is represented by x((–n))N


and is obtained by plotting x(n) clockwise direction along the circle. It is represented as
x((–n)) N = x(N – n)

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  

Let q = 1, then x((- n))N = x( – n + N) = x((N – n))N

25. If x(n) = { 6, 5, 4, 3 } Sketch x1 (n) = x((n – 2))4 0  n 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 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

Solution: (i) Let x1 (n) = 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

x1 (4) = x((4– 3))6 = x( 1) = 2 x1 (5) = x((5– 3))6 = x( 2) = x(2) = 1

x1 (n) = { –1, 2, 3, 1, 2, 1 } (Shift x(n) by three samples in ACW direction )

(ii) Let x2 (n) = x((n + 2))6

x2 (0) = x(( 2))6 = 1 ; x2 (1) = x((1+2))6 = x( 3) = –1 ; x2 (2) = x((2+2))6 = x(4) = 2

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

x2 (n) = { 1, –1, 2, 3, 1, 2 } (Shift x(n) by two samples in CW direction )

(iii) Let x3 (n) = x((n + 3))6

x3 (0) = x((3))6 = x(3) = –1 ; x3 (1) = x((1+3))6 = x(4) = 2; x2 (2) = x((2+3))6 = x(5) = 3

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

x1 (n) = { –1, 2, 3, 1, 2, 1 } (Shift x(n) by three samples in CW direction )

1.5 (d) - Symmetry Properties


Let x(n) be a complex valued function and can be expressed as
x(n) = xR(n) + j xI(n) and its corresponding DFT is also complex and is given as
X(k) = XR(k) + j XI(k)
By the definition of DFT
N −1 N−1
2πkn 2𝜋𝑘𝑛 2𝜋𝑘𝑛
−j
X k = x n e N = [xR n + jxI n ] cos − jsin
𝑁 𝑁
𝑛=0 𝑛=0

Equating the real and imaginary parts


N −1
2𝜋𝑘𝑛 2𝜋𝑘𝑛
XR k = xR n cos + xI n sin
𝑁 𝑁
𝑛=0
N −1
2𝜋𝑘𝑛 2𝜋𝑘𝑛
XI k = − xR n sin − xI n cos
𝑁 𝑁
𝑛=0

The corresponding sequences obtained taking IDFT are


N−1
1 2𝜋𝑘𝑛 2𝜋𝑘𝑛
xR n = XR k cos − XI n sin
𝑁 𝑁 𝑁
𝑘=0
N −1
1 2𝜋𝑘𝑛 2𝜋𝑘𝑛
XI k = XR k sin + XI k cos
𝑁 𝑁 𝑁
𝑛=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 19
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in

1.5(d1) - Symmetry Property for real valued sequence x(n)

If x(n) is real, then X(N – k) = X* (k) = X(–k)


Proof: By the definition of DFT
N −1
2πkn
−j
X k = x n e N put k = N − k
𝑛=0
N −1 N−1
2πn 2πnN 2πnk
−j N−k −j j
X N−k = x n e N = x n e N e N = X −k − − − − − − − − − −(a)
𝑛=0 𝑛=0
N −1
2πkn
j
X∗ k = x n e N − − − − − − − − − −(b)
𝑛=0
From equations (a) and (b)  X(N – k) = X* (k) = X(–k)

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)

Put k = 5; X(5) = X* (N – k) = X* (8 – 5) = X* (3) = [2– j2]* = 2 + j2


Put k = 6; X(6) = X* (N – k) = X* (8 – 6) = X* (2) = [– j4]* = j4

Put k = 7; X(7) = X* (N – k) = X* (8 – 7) = X* (1) = [2 + j2]* = 2 – j2

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.

Solution: N = 5;(odd) symmetry occurs at k = N/2 = 2.5.


Hence from symmetry property, X(4) = X*(N – k) =X* (5 – k) = X* (5 – 4) = X* (1) and X(3) = X* (2)
N−1 5
kn
X k = x(n) WN = x(n) W5 kn = x 0 + x 1 W5 k + x 2 W5 2k + x 3 W5 3k + x 4 W5 4k = 1 + W5 2k + W5 4k
n=0 k =0
Put k = 0; X 0 = 1 + W5 0 + W5 0 = 3
Put k = 1; X 1 = 1 + W5 2 + W5 4 = 1 + e−j2π (2)/5 + e−j2π (4)/5 = 0.5 + j0.364
Put k = 2; X 2 = 1 + W5 2(2) + W5 4(2) = 1 + e−j2π 2 (2)/5 + e−j2π 4 (2)/5 = 0.5 + j1.538
From symmetry property, X(4) = X*(N – k) = X* (5 – 4) = X* (1) = 0.5 – j0.364
and X(3) = X*(N – k) = X* (5 – 3) = X* (2) = 0.5 – j1.538

30 Show that the given sequence x(n) = 4(n) + 3( n – 1) + 2(n – 2) + (n – 3) satisfies symmetry
property for N = 6

Solution: x(n) = { 4, 3, 2, 1 } modified sequence x(n) = { 4, 3, 2, 1, 0, 0 }


5

X k = x(n) W6 kn = x 0 + x 1 W6 k + x 2 W6 2k + x 3 W6 3k + x 4 W6 4k = 4 + 3W6 k + 2W6 2k + W6 3k


k =0
X(0) = 4 + 3 + 2 + 1 = 10
X 1 = 4 + 3W6 1 + 2W6 2 + W6 3 = 3.5 − j4.33
X 2 = 4 + 3W6 2 + 2W6 2(2) + W6 3(2) = 2.5 − j0.866
X 3 = 4 + 3W6 3 + 2W6 2(3) + W6 3(3) = 2
X 4 = 4 + 3W6 4 + 2W6 2(4) + W6 3(4) = 2.5 + j0.866 = X* (2)
X 5 = 4 + 3W6 5 + 2W6 2(5) + W6 3(5) = 3.5 + j4.33 = X* (1)
Hence the given sequenced satisfies symmetry property.

1.5(d2) - Symmetry Property for Real and Even Sequence

For a real valued and even sequence x(n) = x(N – n) -------- 0  n  (N – 1)

then the corresponding DFT is


N −1
2𝜋𝑘𝑛
XR k = x n cos −− −− −− −− 0≤ k ≤ N− 1
𝑁
𝑛=0

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

1.5 (d3) - Symmetry Property for real and odd sequence

For a real valued and even sequence x(n) = – x(N – n) -------- 0  n  (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 21
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in

then the corresponding DFT is


N −1
2𝜋𝑘𝑛
XI k = −𝑗 x n sin − −− −− −− − 0 ≤ k ≤ N −1
𝑁
𝑛=0

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

1.5 (d4) - Purely imaginary sequence

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

From complex conjugate property; X( – k ) = X(N – k) = X* (k)


1
DFT xe n = X k + X∗ k If X(k) is of the form X(k) = (a + jb) then
2

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

From complex conjugate property; X( – k ) = X(N – k) = X* (k)


1
DFT xe n = X k − X∗ k If X(k) is of the form X(k) = (a + jb) then
2

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:

(i) x1 (n) = {2, 2, 2, 0, 0, 0, 2, 2 }

x1 ( – n) = {2, 2, 2, 0, 0, 0, 2, 2 }

The given sequence is real and even, hence its DFT purely real

(ii) x2 (n)  x2 ( - n) and also x2 (n)  –x2 (– n)

The given sequence is neither even nor odd. Hence its DFT is neither real nor imaginary

(iii) x2 (n) = –x2 (– n)

The given sequence is real and odd, hence its DFT purely imaginary

33. If X(k) denotes the N point DFT of the sequence x(n)


(i) Show that if x(n) satisfies the relation x(n) = – x(N – 1 – n), then X(0) = 0 (ii) Show that with N even
and if x(n) = x(N – 1 – n), then X(N/2) = 0

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)

x(n) = x(N – 1 – n) = x(8 – 1 – n) = x( 7 – n)

Hence x(0) = x(7); x(1) = x(6); x(2) = x(5) and x(3) = x(4)

Since odd and even have opposite signs, X(N/2) = 0

34. Find the N point DFT of the sequence x(n) = 4 + cos 2 (2n/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

1.5 (e) Circular Convolution – Multiplication of DFT’s

If x1 (n)  DFT X1 (k) and x2 (n)  DFTN X2 (k),

then x1 (n) N x2 (n)  DFTN  X1 (k).X2 (k) .

Here x1 (n) N x2 (n) represents the circular convolution of x1 (n) and x2 (n).

Proof: By the definition of DFT


N−1 N −1
2πkn 2πkp
−j −j
X1 k = x1 n e N and X2 k = x2 p e N

𝑛=0 p=0

Let X3 (k) = X1 (k) X2 (k)

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 N−1 N−1 N−1 N−1 N−1


1 2πkn 2πkp 2πkm 1 j2π(m−n−p)
−j −j j k
= x1 n e N x2 𝑝 e N e N = x1 n x2 (𝑝) e N
N N
𝑘=0 𝑛=0 𝑝=0 𝑛=0 𝑝=0 𝑘=0

NN−1 for a = 1 j2π(m−n−p)


Using the identity a = 1 − aN k
here a = e N
for a ≠ 1
k=0 1 −a
N−1
j2π(m−n−p) j2π(m−n−p)
k
𝑚 − 𝑛 − 𝑝 𝑖𝑠 𝑎𝑛 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑒 𝑜𝑓 𝑁 ; 𝑕𝑒𝑛𝑐𝑒 𝑎 = e N =1 𝑠𝑜 𝑡𝑕𝑎𝑡 e N =N
𝑘=0

Consider the second condition

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

Since (m – n – p) is an integer and e j2π(m−n−p) = 1 always

N−1 N−1 N−1 N−1


−1
1
DFT [X3 k ] = x1 n x2 𝑝 N= x1 n x2 𝑝 where 𝑚 − 𝑛 − 𝑝 𝑖𝑠 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑒 𝑜𝑓 𝑁
N
𝑛=0 𝑝=0 𝑛=0 𝑝=0

Let (m – n – p) = qN so that p = (m – n – qN). Using this value in above equation


N−1 N−1 N−1 N−1

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

Hence x1 (n) N x2 (n)  DFTN  X1 (k).X2 (k)

Multiplication of two DFT’s is equivalent to circular convolution of their sequence in time domain

Stockham’s Method to calculate circular convolution

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 }

Solution: (a) Using linear convolution: y(n) = x1 (n)  x2 (n) Here M = N = 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

(ii) Using concentric circles method

(iii) Matrix method y(n) = x1 (n) 4 x2 (n)

(iv) Shifting method


𝑁−1 3

𝑦 𝑛 = 𝑥1 𝑚 𝑥2 𝑚 − 𝑛 = 𝑥 1 𝑚 𝑥 2 𝑚 − 𝑛 = {14, 16, 14, 16}


𝑛 =0 𝑛=0

Index x1 (m) x2 (m – n ) y(n)


n
0 2 1 2 1 1 4 3 2 {2*1+ 1*4 +2*3 +1*2} = 14
1 2 1 2 1 2 1 4 3 {2*2+ 1*1 +2*4 +1*3} = 16
2 2 1 2 1 3 2 1 4 {2*3+ 1*2 +2*1 +1*4} = 14
3 2 1 2 1 4 3 2 1 {2*4+ 1*3 +2*2 +1*1} = 16

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 }

Taking IDFT on both sides


N −1 3
1 1
y n = Y(k)WN −kn = Y(k)W4 −kn = {14, 16, 14, 16}
N 4
k =0 k =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)

X1 (k) = { 6, –2 + j2, –2, -2 – j2 } X2 (k) = { 0, 2, 0, 2 }

y(n) = IDFT [Y(k)] = { -2, -2, 2, 2 } Refer problem 36

38. Find the circular convolution between the sequences shown below

Solution: x1 (n) = { 1, 2, 3, 4, 5, 6} x2 (n) = { 0, 0, 1, 0, 0, 0) = (n – 2)

y(n) = x1 (n) N x2 (n) = x1 (n) N (n – 2) = x1 ((n – 2))N = x1 ((n – 2))6

Shift x(n) by two samples in ACW direction y(n) = { 5, 6, 1, 2, 3, 4 }

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

Solution: (i) Circular Convolution: x(n) = { 1, 2, 3, 4} N = 4; h(n) = { 1, 2, 2 } M = 3

Make the length of the sequences L = max(M,N) = max(3, 4) = 4

Hence h(n) = { 1, 2, 2, 0} Let y(n) = x(n) 4 h(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 27
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in

(ii) Linear convolution y(n) = x(n)  h(n)

(iii) Linear convolution using Circular convolution

Modify the length of the sequences to L = M + N – 1 = 4 + 3 – 1 = 6

x(n) = { 1, 2, 3, 4, 0 ,0 } h(n) = { 1, 2, 2, 0, 0, 0} y(n) = x(n) 6 h(n) = { 1, 4, 9, 14, 14, 8 }

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 }

Solution: Similar to problem 36

41. Find the circular convolution between the sequences


x1 (n) = ejn ; 0  n  7 and x2 (n) = u(n) – u(n – 5). Use time domain approach
Solution: x1 (n) = ejn = { 1, –1, 1, –1, 1, –1, 1, –1 } M = 8

x2 (n) = u(n) – u(n – 5) = { 1, 1, 1, 1, 1 } N = 5

For circular convolution make sequence lengths L = max(M, N) = max(8,5) = 8


x2 (n) = { 1, 1, 1, 1, 1, 0, 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 28
Ravi Shankara.M.N. Asst. Professor ECE Dept SCE Bangalore ravi_shankar_mn@yahoo.co.in

y(n ) = x1 (n) 8 x2 (n)

2πn
42 Determine the N point DFT of x n = cos and hence find x(n) N x(n)
N

2πn ej2πn /N + e−j2π n /N Wn −n + Wn n


𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧: x n = cos = =
N 2 2

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

Let y(n) = x(n) N x(n) hence y(n) = IDFT [X(k). X(k)]

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

2πn e j2π n /N +e −j2π n /N W n −n +W n n


𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧: x1 n = cos = =
N 2 2

Wn −n + Wn n δ k+1 + δ k−1
X1 k = DFT = N
2 2

2πn ej2πn /N − e−j2πn /N Wn −n − Wn n


x2 n = sin = =
N 2j 2j

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)]

−N δ k+1 − δ k−1 N 2πn


y n = IDFT N =− sin
2 2j 2 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 29

Potrebbero piacerti anche