Beruflich Dokumente
Kultur Dokumente
04
Discrete Fourier Transform
Introduction
Recalled the exponential form of Fourier series (see Equations 18 and 20 from Chapter
11.02),
~
(18, Ch. 11.02)
f (t ) = C k e ikw0t
k =
~ 1
(20, Ch. 11.02)
Ck = f (t ) e ikw0 t dt
T 0
~
While the above integral can be used to compute Ck , it is more preferable to have a
~
discretized formula version to compute C k . Furthermore, the Discrete Fourier Transform (or
DFT) [15] will also facilitate the development of much more efficient algorithms for Fast
Fourier Transform (or FFT), to be discussed in Chapters 11.05 and 11.06.
(1)
k =0
(2)
(3)
k =0
In the above formula, n is an integer counter. However, f (n) and t n do NOT have to be
integer numbers.
Multiplying both sides of Equation (3) by e ilw0 n , and performing the summation on n , one
obtains ( note: l = integer number)
11.04.1
11.04.2
Chapter 11.04
N 1
f ( n) e
ilw0 n
n =0
~
= Ck eikw0 n e ilw0 n
(4)
~
= C k e i ( k l ) w0 n
(5)
N 1 N 1
n =0 k =0
N 1 N 1
n =0 k =0
N 1 N 1
~ i ( k l ) N n
= C k e
(6)
n =0 k =0
Switching the order of summations on the right-hand-side of Equation (6), one obtains
N 1
f ( n) e
Define
2
il
n
N
n =0
N 1
A = e
2
n
~ N 1 i ( k l ) N
= Ck e
N 1
k =0
(7)
n =0
2
i ( k l )
n
N
(8)
n =0
A = e im 2n
(9)
n =0
N 1
Hence:
n =0
A= N
Case(2): ( k -l ) is NOT a multiple integer of N
In this case, from Equation (8) one has
i ( k l ) 2
N
A = e
n =0
N 1
Define:
a=e
i ( k l )
2
N
2
2
= cos(k l ) ) + i sin (k l ) )
N
N
A = an
n=0
(10)
(11)
(12)
(13)
(14)
From mathematical handbooks, the right side of Equation (14) represents the geometric
series, and can be expressed as
A = a n = N if a = 1
11.04.3
(15)
n =0
1 aN
if a 1
(16)
1 a
Because of Equation (13), hence Equation (16) should be used to compute A . Thus
1 aN
(See Equation (12))
(17)
A=
1 a
1 e i ( k l ) 2
=
1 a
Since ( k 1 ) is still a multiple of 2 , hence
(18)
e i ( k l ) 2 cos{(k l )2 } + i sin{(k l )2 }
=1
Substituting Equation (17) into Equation (18), one gets
(19)
A=0
Thus, combining the results of case (1) and case (2), one gets (see Equations (10) and
Equation (19))
(20)
A= N +0
Substituting Equation (20) into Equation (8), and then referring to Equation (7), one gets
N 1
N 1
~
ilw0 n
(20a)
=
)
(
f
n
e
Ck N
=
n=0
k =0
Recalled k = l + mN (where l, m are integer numbers), and since k must be in the range
0 N 1 , therefore m = 0 . Thus:
k = l + mN becomes k = l
Equation (20a) can, therefore, be simplified to
N 1
~
(20b)
f (n)eilw0 n = Cl N
Thus
where
and
n=0
~
~
1 N 1
C l = C k = f (n)e ikw0 n
N n =0
N 1
1
= f (n){cos(kw0 n) i sin(kw0 n)}
N n =0
(21)
n tn
N 1
~
f (n) = C k e ikw0 n
k =0
N 1
~
= Ck {cos(kw0 n) + i sin( kw0 n)}
Remarks:
k =0
(3, repeated)
11.04.4
Chapter 11.04
( ikw0 n )
( ik
2
n )
N
E=e
=e
If one replaces n by ( N n) (or (n N ) ) into the above equation, then one obtains
ik
2
( n N )
N
( ik
*n )
= e N e ( ik 2 ) = 1
=E
Thus, Equation (1) indicates that the force corresponding to frequencies of order n and
( N n) = n N have the same values. Hence
N
wn = nw for n
2
N
= ( N n) w for n >
2
N
and the frequency corresponding to n = is the highest frequency that can be considered in
2
the discrete Fourier series ( w N is called the Nyquist frequency). If there are harmonic (force)
e
components above w N in the original function, then these higher components will introduce
2
F (t ) = 100 cos(2nt )
n =1
then, the minimum value of N ( = Number of sample data points ) should be N min = 32.
1
(b) The factor , shown in the DFT Equation (21), is merely a scale factor. It can also be
N
placed in the inverse Fourier Transform Equation (1), but not both.
Thus, Equations (21) and (1) can be re written as
N 1
ik w0 =
n
~
C n = f ( k )e N
(22)
k =0
1 N 1 ~ ik w0 = n
(23)
f ( k ) = Cn e N
N n=0
To avoid computation with complex numbers, Equation (22) can be expressed as
N 1
~
~
(22a)
CnR + iCnI = f R (k ) + i f I (k ) {cos( ) i sin( )}
k =0
where
2
(22b)
= k w0 =
n
N
N 1
~
~
C nR + iC nI = f R (k ) cos( ) + f I (k ) sin( ) + i f I (k ) cos( ) f R (k ) sin( )
k =0
} {
11.04.5
The above complex number equation is equivalent to the following 2 real number
equations
N 1
~
(22c)
C nR = {f R (k ) cos( ) + f I (k ) sin( )}
k =0
N 1
~
C nI = f I (k ) cos( ) f R (k ) sin( )
(22d)
k =0
Computer program implementation for the DFT equations (22c, 22d) are given at
http://numericalmethods.eng.usf.edu/simulations/mtl/11fft/dft.m .
Detailed Explanation About Aliasing Phenomenon, Nyquist Samples, Nyquist Rate.
When a function f (t ), which may represent the signals from some real-life phenomenon
~
(shown in Figure 1), is sampled, it basically converts that function into a sequence f (k ) at
discrete locations of t. These discrete locations are assumed to have equally spaced and the
~
distance between any 2 samples is t. Thus, f (k ) represents the value of f (t ), at
t = t0 + kt , where t0 is the location of the first sample (at k = 0). If the sample locations
were done properly, then the original function f (t ), can be recovered through interpolation
process of these discrete sample values.
11.04.6
Chapter 11.04
1
.
2 wmax
The above sampling theorem can be loosely explained through the help of Figure 3.
uniformly spaced intervals t apart, with t =
11.04.7
11.04.8
Chapter 11.04
11.04.9
In Figure 4, a sinusoidal signal is sampled at the rate of 6 samples per 1 cycle (or ws = 6w0 ).
Since this sampling rate does satisfy the sampling theorem requirement (ws 2wmax ) , the
reconstructed signal does correctly represent the original signal. However, as indicated in
6
Since this sampling rate does NOT satisfy the requirement (ws 2wmax ) , the reconstructed
signal would wrongly represent the original signal.
References
[1] E.Oran Brigham, The Fast Fourier Transform, Prentice-Hall, Inc. (1974).
[2] S.C. Chapra, and R.P. Canale, Numerical Methods for Engineers, 4th Edition, Mc-Graw
Hill (2002).
[3] W.H . Press, B.P. Flannery, S.A. Tenkolsky, and W.T. Vetterling, Numerical Recipies,
Cambridge University Press (1989), Chapter 12.
[4] M.T. Heath, Scientific Computing, Mc-Graw Hill (1997).
[5] H. Joseph Weaver, Applications of Discrete and Continuous Fourier Analysis, John
Wiley & Sons, Inc. (1983).
FAST FOURIER TRANSFORM
Topic
Discrete Fourier Transform
Summary Textbook notes on discrete Fourier transform
Major
General Engineering
Authors
Duc Nguyen
Date
July 25, 2010
Web Site http://numericalmethods.eng.usf.edu