Date post: | 27-Oct-2015 |
Category: |
Documents |
Upload: | krishnagdeshpande |
View: | 33 times |
Download: | 1 times |
DISCRETE FOURIER TRANSFORM
1. Introduction
The sampled discrete-time fourier transform (DTFT) of a finite length, discrete-time signal isknown as the discrete Fourier transform (DFT). The DFT contains a finite number of samplesequal to the number of samples N in the given signal. Computationally efficient algorithms forimplementing the DFT go by the generic name of fast Fourier transforms (FFTs). This chapterdescribes the DFT and its properties, and its relationship to DTFT.
2. Definition of DFT and its Inverse
Lest us consider a discrete time signal x (n) having a finite duration, say in the range 0 ≤ n ≤N-1.The DTFT of the signal is
N-1
X ( ) = x (n)e-jwn (1)
n-0
Let us sample X using a total of N equally spaced samples in the range : (0,2), so thesampling interval is 2 That is, we sample X() using the frequencies.
N= k = 2k , 0 ≤ k ≤N-1.
N-1
Thus X (k) = x (n)e-jwn (2)
n-0
N-1
X (k) = x (n)e- j2kn (2)
n-0N
The result is, by definition the DFT.
That is ,
Equation (0.2) is known as N-point DFT analysis equation. Fig 0.1 shows the Fourier transformof a discrete – time signal and its DFT samples.
x(w)
0 2 w
Fig.1 Sampling of X(w) to get x(k)
While working with DFT, it is customary to introduce a complex quantityWN = e-j2 /N
Also, it is very common to represent the DFT operation
N=1
X(k) = DFT ( x(n)) = x(n) WNkn, 0≤n≤N-1
n=0
The complex quantity Wn is periodic with a period equal to N. That is,WN
a+N = e-j+2/N(a+N) = e-j2 /N n = WNa where a is any integer.
Figs. 0.2(a) and (b) shows the sequence for 0≤n≤N-1 in the z-plane for N being even andodd respectively.
6 55 7 4 6
4 0 0
3 1 3 1
2 2
(a) (b)
Fig.2 The Sequence for even N (b) The sequence for odd N.
The sequence WkN
N for 0 ≤ n ≤ N-1 lies on a circle of unit radius in the complex planeand the phases are equally spaced, beginning at zero.
The formula given in the lemma to follow is a useful tool in deriving and analyzingvarious DFT oriented results.
2.1. Lemma
N-1
Wkn = N (k) = { N, k = 0(3)
n-0 N 0, k ≠ 0
Proof :N-1
an = 1 - aN : a≠ 1n-0 1 - a
We know thatApplying the above result to the left side of equation (3.3), we get
N-1
(WkN) n = 1- Wk
NN = 1- e-j2 k
NN
n= 01- Wk
NN 1- e-j2 k
NN : k ≠ 0
= 1 - 1
1- e- j2 kN
N
= 0, k ≠ 0
when k = 0, the left side of equation (3.3) becomes
N-1 N-1
WN0xn = 1 = N
n= 0 n =0
N-1 N, k = 0Hence, we may write WN
0xn = 0, k ≠ 0n=0
= N (k), 0≤ k≤ N-1
2.2 Inverse DFT
The DFT values (X(k), 0≤ k≤ N-1), uniquely define the sequence x(n) through the inverse DFTformula (IDFT) :
N-1
x (n) = IDFT (X(k) = 1 X(k) WN-kn , 0≤ k≤ N-1
N k=0
The above equation is known as the synthesis equation.
N-1 N-1 N-1
Proof : 1 X(k) WN-kn = 1 [ x(m) WN
km] = WN-kn
N k=0 N k=0 m=0
N-1 N-1 N-1
= 1 x(m) [ WN-(n-m)k]
N k=0 m=0
It can be shown that
N-1
WN(n-m)k = N , n = m
0, n ≠ mHence,
N-1
1 x(m) N (n-m)
N
= 1 x Nx (m) ( sifting property)N m=n
= x(n)
2.3 Periodicity of X (k) and x (n)
The N-point DFT and N-point IDFT are implicit period N. Even though x (n) and X (k) aresequences of length – N each, they can be shown to be periodic with a period N because theexponentials WN
±kn in the defining equations of DFT and IDFT are periodic with a period N. Forthis reason, x (n) and X (k) are called implicit periodic sequences. We reiterate the fact that forfinite length sequences in DFT and IDFT analysis periodicity means implicit periodicity. Thiscan be proved as follows :
N-1
X (k) = x(n) WNkn
N-p=0
X (k+N) = x(n) WN(k+N)n
Since, WNNn = e-j2nNn = 1, we get
N-1
X (k+N) = x(n) WN-kn
n=0= X (k)
N-1
Similarly, x (n) X (k) WN-kn
k=0
N-1
x (n+N) = 1 X(k) WN-k(n+N)
N k=0
N-1
= 1 X(k) WN-kn WN
-kn
N k=0
Since, WN-kn = e-j2/N kN = e-j2k = 1, we get
N-1
x(n+N) = 1 X(k) WN-kn
= x (n)
Since, DFT and its inverse are both periodic with period N, it is sufficient to compute theresults for one period (0 to N-1). We want to emphasize that both x (n) and X (k) have a startingindex of zero.
A very important implication of x (n), being periodic is, if we wish to find DFT of aperiodic signal, we extract one period of the periodic signal and then compute its DFT.
Example 1 Compute the 8 – point DFt of the sequence x (n) given below :
x (n) = (1,1,1,1,0,0,0,0)
SolutionThe complex basis functions, W for 0 n 7 lie on a circle of unit radius as shown in Fig. Ex.3
W86
W85 W87
W84 1.0 Re(z)
W83 W81
W82
Fig. 3 Sequence W80 for 0≤ n ≤ 8.
Since N = 8 we get W = e –j2/8
Thus,W8
0 = 1
W81 = e -j/4 = 1 – j 1
2 2W8
2 = e -j/2 = – j
W83 = e -j3/4 = 1 – j 1
2 2W8
4 = -W80 = -1
By definition, the DFT of x (n) is
X ( k) = DFTI (x (n))
= W8kn
= 1+1 x W8k + W8
-2k + W83k .
= 1 + W8k + W8
2k + W83k k = 0, 1…7
X(0) = 1+1+1+1 = 4X(1) = 1+ W8
1 + W82 + W8
3 = 1 – j2.414
X(2) = 1+ W82 + W8
4+ W86 = 0
X(3) = 1+ W83 + W8
6+ W81 = 1 – j0.414
X(4) = 1 + W84 + W8
0+ W84 = 0
X(5) = 1+ W85 + W8
2 + W87 = 1+j0.414
X(6) = 1+ W86 + W8
4 + W82 = 0.
X(7) = 1+ W87 + W8
6 + W85 = 1+j2.414
Please note the periodic property : WNa = WN
a+N where a is any integer.
Example 2 : Compute the DFT of the sequence defined by x (n) = (-1) n fora. = N= 3b. N = 4,c. N odd,d. N even.
SolutionX (k) = DFT (x-n)
N-1
= (-1)n WNnk
n-0
N-1
(-1)n [WNk] n
n=0= 1 – (1)N for WN
k ≠-1
1+ WNk
a. N = 3
X(k) = 2 = 2 0≤ k ≤ 21+ WN
k 1+ cos (2k/3) – j sin ((2k/3)
b. N = 4 X (k) = 0 for W4k ≠-1 or k≠ 2
With k = 2 we getN-1
X(2) (-1)n W42n
n=0= 1 - W4
2 + W44 - W4
6
= 1 – (-1) + (-1)2– (-1)2 = 4
Hence, X (k) = 48(k-2)
c. We know that
W42n – e-j2 / N k
If N = 2k, we get WNk= -1.
Since N is odd no k exists. This means to say that WNk -1 for all k from 0 to N-1.
Therefore,X(k) = 2 0≤ k ≤ N-1
1+ WNk
d. N even WNk = - 1, if k = N/2.
X ( k) = 0 for k ≠ N/2
With k = 2, we getN-1
And x (N/2) = [- WNk] n
n=0N-1
= [1] = Nn=0
Hence X (k) = N (k-N/2)
Example 3. Compute the inverse DFT of the sequence,
X(k) = (2,1+j,0,1 –j)
Solution
x (n) = IDFT (X(k))N-1
1 x(n) WN-kn , 0 ≤ n ≤N -1
N n=0
Please note that :
WN-kn = [ WN
kn]*
Since, N = 4, we get
N-1
x (n) = 1 X(k) W4-kn , 0 ≤ n ≤3
4 n=0
= 1 [X(0) W4-0xn + X(1) W4
-n + X (2) W4-2n + X (3) W4
-3n]4
= 1 [2 + (1+j) W4-n +0 + (1-j) + X (3) W4
-3n]4
Hence, x (0) = 1 [2 + (1+j) +(1-j)] = 14
x (1) = 1 [2 + (1+j) W4-1 +(1-j) W4
-3] = 14
x (2) = 1 [2 + (1+j) W4-2 +(1-j) W4
-6] = 14
Because of periodicity, W4-6 = W4
-2
Hence, x (2) = 1 [2 + (1+j) (-1) + (1-j) (-1)] = 04
x (3) = 1 [2 + (1+j) W4-3 +(1-j) W4
-9] = 14
Because of periodicity, W4-9 = W4
-5 = W4-1
Hence, x (3) = 1 [2 + (1+j) W4-3 +(1-j) W4
-1]4
= 1 [2 + (1+j) (-j) (-j) + (1-j) ] = 14
Hence, x(n) = (1,0,0,1)
3. Matrix Relation for Computing DFT
The defining relation for DFT of a finite length sequence x (n) is
N-1
X (k) = x(n) Wnkn , 0.1, …… N-1
n=0
Let us evaluate X (k) for different values of k in the range (0, N-1) as given below :X (0) = WN
0 x (0) + WN0 x (1) + …… + WN
0 x (N-1)
X (1) = WN0 x (0) + WN
1 x (1) + …… + WN(N-1) x (N-1)
X (2) = WN0 x (0) + WN
2 x (1) + …… + WN2(N-1) x (N-1)
X (N-1) = WN0 x (0) + WN
(N-1)x (1) + ….. =+ WN(N-1) (N-1) x (N-1)
Putting the N DFT equations in N unknowns in the matrix form, we getX = WNx
Here X and x are (N x 1) matrices, and Wn is an (N x N) square matrix called the DFT matrix.The full matrix form is described by
X(0) WN0 WN
0 WN0 WN
0 x(0)
X(1) WN0 WN
1 WN2 WN
(N-1) x(1)
X(2) = WN0 WN
2 WN4 WN
kn x(2)
: : : : : :X(N-1) WN
0 WNN-1 WN
2(N-1) WN(N-1)(N-1) x(N-1)
The elements WNkn of WN are called complex basis functions or twiddle factors.
Example : Compute the 4-point DFT of the sequence, x(n) = (1,2,1,0).
SolutionWith N = 4, W4 = e-j2 /4 = -j.We know that
X = WN x
X(0) W40 W4
0 W40 W4
0 x(0)
X(1) W40 W4
1 W42 W4
3 x(1)
X(2) = W40 W4
2 W44 W4
6 x(2)
X(3) W40 W4
3 W46 W4
0 x(3)
Exploiting the periodic property WN0 = WN
n+N where a is any integer the above matrix relationbecomes.
X(0) W40 W4
0 W40 W4
0 x(0)
X(1) W40 W4
1 W42 W43 x(1)
X(2) = W40 W4
2 W40 W4
2 x(2)
X(3) W40 W4
3 W42 W4
1 x(3)
X(0) 1 1 1 1 1X(1) 1 -j -1 j 2X(2) = 1 -1 1 -1 1X(3) 1 j -1 -j 0
Hence,X(k) = (4, -j2, 0, j2)
4. Matrix Relation for Computing IDFT
We know that x = WN1X
Premultiplying both the sides of the above equation by we get
WN-1-X = WN
-1 WNx
WN-1X = x
Or x = WN-1X
In the above equation (.8) x = WN-1 is called IDFT matrix.
The defining equation for finding IDFT of a sequence X (k) is
N-1
X (n) = 1 X(k) W , 0≤ n ≤ N-1N k=0
N-1
= 1 X (k) [WNkn ]*
N k=0
The first set of N IDFT equation in N unknowns may be expressed in the matrix form as
x = 1 W*NX
N
Where W*N denotes the complex conjugate of WN. Comparision of equation (3.8) and (3.9)leads us to conclude that
WN-1 = 1/N W*N
This very important result shows that W-1N requires only conjugation of Wn multiplied by 1/N.
an obvious computational advantage. The matrix relations (.7) and (.9) together define DFT as alinear transformation.
5. Using the DFT to Find the IDFT
We know thatN-1
x* (n) = 1 X(k) WN-kn , n= 0,1 …. N-1
N k=0
Taking complex conjugates on both the sides of the above equation, we get
N-1
x*(n) = 1 X(k) WN-kn *
N k=0
N-1
x*(n) = 1 X*(k) WN-kn * (10)
N k =0
The right – hand side of equation (3.10) is recognized as the DFT of X* (k), so we can rewriteequation (3.10) as follows :
x*(n) = 1 DFT (X*(k))N
Taking complex conjugates on both the sides of equation (11), we get
x*(n) = 1 [DFT (X*(k))]N
The above results suggests the DFT algorithm itself can be used to find IDFT. In practice, this isindeed what is done.
6. Properties of DFTIn the following section, we shall discuss some of the important properties of the DFt. They arestrikingly similar to other frequency domain transforms, but must always be used in keeping withimplied periodicity for both DFT and IDFT in time and frequency domains.
6.1 Linearity
DFT (ax1(n) + bx2(n)j = aX1(k) + bX2(k), k = 0, N =1
If X1(k) and X2(k) are the DFTs of the sequence x1 (n) and x2 (n), respectively, both of lengths
N.
Proof :
N-1
We know that DFT [x(n)] = x(n) WNkn
n=0
Letting x (n) = ax1(n) + bx2(n) we getN-1
DFT = ax1(n) + bx2(n) = (ax1(n) +bx2 (n)] WNkn
n=0N-1
= a x1(n) WNkn + b x1(n) WN
kn
n=0
= aX1 (k) + bX2(k), 0 ≤ k≤ N-1
Sometimes we represent the linearity property as given belowDFT
ax1 (n) + bx2(n) aX1 (k) + bX2(k)
Example : Find the 4- point DFT of the sequenceX(n) = cos ( n) + sin ( n)
4 4Use linearity property.
Solution
Given N = 4,WN = e j2 /n W = e j /2
We know that, W40 = 1
Hence, W40 = 1
W41 = e = -j
W43 = e = -1
x1 (n) = cos ( /4 n )Let
x2 (n) = sin ( /4 n )
andThen, the values of x (n) and x2 (n) for 0 <n <3 tabulated below :
N x1 (n) = cos ( /4 n ) x2 (n) = sin ( /4 n )
0 1 01 1 1
2 22 0 13 -1 1
2 2
X1 (k) = DFT (x1 (n))
3
x1 (n) W4kn, k = 0,1,2,3
n=0
X1 (k) = 1 + 1 W4k +0 – 1 W4
3k
2 2Hence, X1 (0) = 1 + 1 – 1 = 1
2 2X1 (1) = 1 + 1 W4
1 – 1 W43 = 1 –j1.414
2 2X1 (2) = 1 + 1 W4
2 – 1 W46
2 2= 1 + 1 W4
2 – 1 W24 = 1
2 2X1 (3) = 1 + 1 W4
3 – 1 W49
2 2= 1 + 1 W4
3 – 1 W41
2 2Similarly, X2 (k) = DFT (x2 (n))
3
x2 (n) W4kn
n=0
X2 (k) = 1 W4k + W4
2k + 1 W43k
2 2Hence, X2 (0) = 1 + 1 + 1 = 2.414
2 2X2 (1) = 1 W4
1 + W42 + 1 W4
3 = -1
2 2X2 (2) = 1 W4
2 + W40 + 1 W4
9
2 2= 1 W4
3 + W46 + 1 W4
9 = -0.414
2 2
X2 (3) = 1 W43 + W4
6 + 1 W49
2 2= 1 W4
3 + W42 + 1 W4
1 = -1
2 2
Finally, applying the linearity property, we getX (k) = DFT ( x1(n) + x2(n))
= X1(k) + X2(k)= ( X1(0) + X2(0), X1(1) + X2(1). X1(2), X2(2), X1(3) + X2 (3) )= (3.414. – j1.414.0.586. j1.414)
k=0
It may be noted that the arrow, explicitly represents the position index of k = 0 or n = 0 of agiven sequence. The absence of this arrow also implicitly means that the first element in asequence always has the index k = 0 or n = 0.
Example Compute DFT (x(n)) of the sequence given below using the linearity property.x (n) = cosh an, 0 ≤ n ≤ N-1
SolutionGiven x(n) = cosh an, 0 ≤ n ≤ N-1
Then the N point DFT of the sequence x (n) is
X (k) = DFT [x(n)] = DFT ( cosh an)
= DFT 1 ean + 1 e-an
2 2Applying linearity property, we get
X (k) = 1 DFT [e an ] + 1 DFT [e -an ], 0 ≤ n ≤ N-12 2
We know from Example 3.5, thatDFT (b N ) = b N -1 , 0 ≤ k ≤ N-1
b WNk -1
Hence, X (k) = 1 e a(N) - 1 + e a(N) - 12 e a(N) WN
k -1 e -a WNk - 1
= WN-kn ( e a(N-1) + e -a(N-1) - e -a + e –a ] - e –aN- e –aN +2
2[1- WNk (ea – ea ) + WN
k ]= 1 – cosh Na + WN
k [cosh ( N-1)a – cosh a] , 0 ≤ k ≤ N-1
1- 2 WNk cosha + WN
k
6.2 Circular time shift
If DFT [x(n)] = X (k).Then DFt [x(n-m))] = X(k), 0 ≤ n ≤ N-1
Proof :
N=1
x (n) = 1 [ X (k) WN-kn
N k=0
N=1
x (n-m) = 1 [ X (k) WNk(n-m)
N k=0
Since, the time shift is circular, we can write the above equation asN=1
x (n-m) = 1 [ X (k) WNkm ] WN
-kn
N k=0 x (n-m)N = IDFt [ X(k) WN
km]
or DFT [x(n-m) N ] = WNkm X (k)
In terms of the transform pair, we can write the above equation is
DFT
x (n-m)N WNkm X (k)
Example Find the 4- point DFT of the sequence, x(n) = (1, -1, 1, -1) Also, using time shiftproperty, find the DFT of the sequence, y(n) = x (n-2)4.
Solution
Given N = 4We know that
W40= 1, W4
1= -j
W42 = -1, W4
3 = jHence, X (k) = DFT (x (n) )
3
= x(n) W4kn , 0 ≤ k≤ 3
n=0= 1 W4
0k x – 1 x W4k +1 x W4
2k - 1 x W43k
= 1- W41+W4
2k - W43k
X(0) = 1 -1 +1 -1 = 0X(1) = 1 - W4
1+ W42- W4
3 = 0
X(2) = 1 - W42 + W4
4 - W46
= 1- W42+ W4
0 - W42 = 4
X(3) = 1 - W43 + W4
6- W49
= 1- W43 + W4
2- W41= 0
Given y (n) = x(n-2) 4
Applying circular time shift property, we getY(k) = W4
2k X (k), k = 0,1,2,3
Y(0) = W40 X(0) = 0
Y(1) = W42 X (1) = 0
Y(2) = W44 = W4
0 x(2) = 4
Y(3) = W46x (3) = W4
2 x (3) = 0Hence, Y(k) = (0,0,4,0)
k-0
Example Suppose x(n) is a sequence defined on 0 -7 only as ( 0,1,2,3,4,5,6,7),a. Illustrate x(n-2) isb. If DFT (x(n)) = X (k), what is the DFT (x (n-2)s)
Solutiona. GivenTo generate x (n-2) move the last 2 samples of x (n) to the beginning.That is, x (n-2) = (6,7,0,1,2,3,4,5)
s(n-2)g7
56 4
2 31
0 1 2 3 4 5 6 7 n
It should be noted that x (n-2) is implicity periodic with a period N = 8.b. Let y(n)=x(n-2) 8
Applying circular time shift property, we get
Y(k) = W32k X(k)
Example : Let X (k) donate a 6-point DFT of a length – 6 real sequence, x(n). The sequence isshown in Fig. Ex 3.17, without computing the IDFT, determine the length -6 sequence, y(n)
whose 6-point DFT is given by, Y (k) = W32k X(k)
1 2 3 x(n)0
4 5-1
Fig. Sequence x(n)
SolutionWe may write
W32k = e-j2/3nx2k
= e-j2/3nx2k
Hence, W32k = W64k
It is given in the problem that
Y(k) = W3 j2k X(k)
Y(k) = W64k X(k)
We know that DFT (x(n=m) N = WNmk X(k)
IDFT WNmk X(k) = x(n-m) NHence, y(n) = x(n-4)6Since, x(n) = (1,-1,2,3,0,0)We get x(n-4) is by moving the last 4 samples of x(n) to the beginning
y(n) = x(n-4) 6= (2,3,0,0,1-1)
Circular frequency shift ( Multiplication by exponential in time-domain)If DFT (x(n)) = X (k), then DFT = X (k-1) N.
Proof :
N-1
X (k) = DFT (x (n)) = x(n) WNkn, 0 ≤ k ≤ N-1n=0
N-1
X(k-1) =x(n) WN(k-1)n
Since, the shift is frequency is circular, we may write the above equation as
N-1
X(k-1)8 = { x(n) WN-ln } WNkn
n=0
Hence, DFT {x(n) WN-ln } = X (k=1)N
Example Compute the 4-point DFT of the sequence x (n) = (1,0,1,0), Also, find y (n) if Y (k) =X (k-2) 4.
SolutionGiven N = 4.
Also W40 = 1, W4l =-j, W42 =-1, W43 =j,
The DFT of the sequence, x (n) is3
X(k) = x(n) W4kn , 0 ≤ k≤ 3
= 1x W40k + 0+1 x W42k =0
= 1 +W42k
X(0) = 1+1= 2X(1) = 1+W24 = 0
X(2) = 1+W04 = 2
X(3) = 1+W24 = 0
X(0) = 1+1= 2X(k) = X(k-2))4
Given Y(k) = X(k-2) 4
We know that, DFT (WN-ln x (n)) = X(k-l)N
That is, y(n) = WN-ln x (n) DFT Y(k) = X(k-1)N
Hence, y(n) = W4-2n x (n)
y(0) = W4-0 x (0) = 1
y(1) = W4-2 x (1) = 0
y (2) = W4-4 x (2)
= W4-0 x (2) = 1x 1 =1
y(3) = W4-6 x (3) = W4-2 x (3) = 0
That is, y(n) = (1,0,1,0)n=0
Circular convolutionUnlike DFT convolution in DFT in circular consider two sequence x(n) and y(n) the
circular convolution of x(n) and y(n) in given by
Let f (n) = x (n) x y(n)
N-1
x(n+N) = 1 x(n-m) Nh(m) 0 ≤ n ≤ N-1m=0N-1
= x(m) h(n-m) nn=0
Point to be noted here in that x(n) and y(n) should be of same length
Example :
Let x (n) = 1,1,1 y (n) = 1,-2,2Retain x (n) as it is and circularly fold y (n) i.e. y(n) = 1,2,-2.
N x(m) y(n-m)N f(n)
0 1,1,1 1,2,-2 1 x 1+1x2+1x-2 = 11 1,1,1 -2,1,2 1 x -2 + 1x1 + 1x2 = 12 1,1,1 2,-2,1 1 x 2, +1x-2 + 1x1 = 1
h (n) = 1,1,1
SummaryN-1
1) x (k) = x(n) e-jwn
n=0N-1
= x(n) Wnkn
n=0
N-1
2) x (n) = 1 x(n) Wnkn 0≤ n≤ N-1
N k=0
3) Periodicity of Wnkn
W6
8
W5
8W
78
W4
8W
08
=W4
6W
N= W
N+N
-W7
8= W
38
W1
8= -W
58
W2
8
= W8
84) DFT { ax1(n) + bx2(n) } = ax1 (k) + bx2(k)
5) DFT {x(n-m)N} = WNmk x (k)
6) DFT {Wn-lnx(n) } = x(k-l)N
7) X (k) = Xy (N-k)
8) DFT {x(N-n)} = x(N-k)
9) DFT { xe (n) } = 1 DFT {x(n) + 1 DFT { x(-n)N)}
2= 1 x (k) + 1 x (-k) N
2 210) DFT { x1 (n) x2(n) } = 1 x 1(k) x2 (k)
N