Professional Documents
Culture Documents
FFT 5 PDF
FFT 5 PDF
Learning Objectives
Discrete Fourier transforms (DFTs) and their relationship
to the Fourier transforms
Implementation issues with the DFT via the FFT
sampling issues (Nyquist criterion)
resolution in the frequency domain (zero padding)
neglect of negative frequency components
()
T N1
Vp ( fn ) =
v p t j exp(2i jn / N )
N j=0
1 N1
v p (tk ) = Vp ( fn )exp(2ikn / N )
T n= 0
t
t j = j t
f n = nf = n / N t
V p ( f n ) = n1 v p ( t j ) exp ( 2 i jn / N )
j =0
N 1
v p ( tk ) = n2 V p ( f n ) exp ( m2 ikn / N )
n =0
1
as long as n1 n2 =
N
()
T N1
Vp ( fn ) =
v p t j exp(2i jn / N )
N j=0
1 N1
v p (tk ) = Vp ( fn )exp(2ikn / N )
T n= 0
These discrete Fourier Transforms can be implemented
rapidly with the Fast Fourier Transform (FFT) algorithm
N
(N-1)2
(N/2)log2N
256
65,025
1,024
1,024
1,046,529
5,120
4,096
16,769,025
24,576
N1
x ( j )exp[2i jk / N ]
j=0
1 N1
X (k ) exp[2i jk / N ]
N = 2n
N k =0
N
x ( j )exp[2i( j 1)(k 1) / N ]
fft(x)
j=1
arrays
ifft(X)
1 N
ar exp[2i(r 1)( s 1) / N ]
N r=1
1 N
bs exp[2i(r 1)( s 1) / N ]
N s=1
1 N
X ( j )exp[2i( j 1)(k 1) / N ]
N j=1
v p (t ) v(t )
Vp ( f ) V ( f )
if
tmax T = Nt
1
fs
2 fmax Nyquist
t
criterion
vp(t)
| Vp(f) | N samples
N samples
-T
tmax
-fs
fmax
fs
T =1.0
t = T / N
0.1429
t = 1/ 8 = 0.125
long
dt = 0.00200400801603
dt = 0.00200000000000
| V (f) | N samples
N samples
f
t
f =1/T
v (t)
fs = 1/t
| V (f) | 2N samples
2N samples
f
2T
f =1/2T
fs = 1/t
0.4
dt = 0.2500
0.3
0.2
0.1
0
0.5 1
1.5
2.5 3
3.5
0.25
0.2
0.15
df = 0.2500
0.1
0.05
0
0.5 1
1.5
2.5 3
3.5
0.2
0.15
0.1
>>axis([ 0 4 0 0.3])
0.05
0.5 1
1.5
2.5 3
3.5
df = 0.1250
half the former df
same sampling frequency
0.25
0.2
0.15
0.1
0.05
20
40
60
80
0.25
0.2
0.15
0.1
0.05
0
0.5 1
1.5
2.5 3
3.5
0.25
0.15
0.05
0.5 1
1.5
2.5 3
3.5
Note that even though there is aliasing here if we do the inverse FFT
of these samples we do recover the original time samples:
>> v1 =IFourierT(vf1,dt);
>> h=plot(t, real(v1), 'ko');
>> set(h, 'MarkerFaceColor', 'k') 0.6
0.5
0.4
0.3
0.2
0.1
0
-0.1
0.5 1
1.5
2.5 3
3.5
A 1 cos ( 2 Ft / N ) cos ( 2 Ft )
y (t ) =
0 otherwise
(0 < t < N / F )
dt = 0.0098
>> y=pulse_ref(1,5,3,t);
-1
>> plot(t, y)
-2
>> yf1=FourierT(y,dt);
>> f=s_space(0, 1/dt, 512);
>> f(end)
ans = 102.2000
0.35
0.3
sampling
frequency
0.25
0.2
if t is in sec
f is in MHz
0.15
Nyquist frequency
= sampling
frequency
0.1
0.05
0
20
40
60
80
100
120
2
1.5
1
Expanded view
0 20 MHz
0.5
0
-0.5
-1
-1.5
-2
0.5
1.5
2.5
3.5
4.5
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
10 12 14 16 18 20
>> y = pulse_ref(1,5,5,t);
1.5
1
0.5
0
-0.5
-1
-1.5
-2
0.5
1.5
2.5
3.5
4.5
0.5
Somewhat more
narrow band pulse
(only 0 - 20 MHz
shown)
0.4
0.3
0.2
0.1
0
10 12 14 16 18 20
>> y = pulse_ref(1,5,10,t);
>> yf3 = FourierT(y, dt);
0
-1
-2
Decrease bandwidth
even more
0.8
0.6
(only 0 - 20 MHz
shown)
0.4
0.2
0
10 12 14 16 18 20
1
0.8
0.6
0.4
0.2
0
10
zero padding
>> t=s_space(0, 10, 1024);
dt = 0.0098
-1
t = s_space(0,5, 512);
we could also zero pad via
t = [t, zeros(1, 512)];
10
1.4
1.2
1
0.8
0.6
0.4
0.2
0
10
positive frequency
components
fmax
| Vp(f) | N samples
negative frequency
fs
components
V ( f ) = V * ( f ) if v(t) is real
?
in time domain
positive frequency
components
fmax
fs
+
v(t ) i
H [v(t )] = V ( f ) exp(2i f t )df
2 2
0
>> y = pulse_ref(1,5,10,t);
>> plot(t, y)
0
-1
-2 0
zero negative
frequency components
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
20
40
60
80
100
120
-1
-2
References