Professional Documents
Culture Documents
Lecture02 FT 1D
Lecture02 FT 1D
f(t), F(f) :
Fourier Transform Pair = 2f
analysis
time, t frequency, f
F
f(t) F(f) = F[f(t)]
synthesis
FT History 1
Astronomic predictions by Babylonians/Egyptians likely via trigonometric sums.
1669: Newton stumbles upon light spectra (specter = ghost) but fails to
recognise “frequency” concept (corpuscular theory of light, & no waves).
1807: Fourier presents his work on heat conduction Fourier analysis born.
Diffusion equation series (infinite) of sines & cosines. Strong criticism by peers
blocks publication. Work published, 1822 (“Theorie Analytique de la chaleur”).
FT History 2
19th / 20th century: two paths for Fourier analysis - Continuous & Discrete.
CONTINUOUS
Fourier extends the analysis to arbitrary function (Fourier Transform).
Dirichlet, Poisson, Riemann, Lebesgue address FS convergence.
Other FT variants born from varied needs (ex.: Short Time FT - speech analysis).
Relatively easy
Problem in solution
Solution in
Frequency Space Frequency Space
A detour
Inverse Fourier
Fourier
Transform
Transform
Difficult solution
Original Problem Solution of Original
Problem
Time vs Frequency Domain
1 T
The signal power in the signal x(t) is P lim
T 2T
T
| x(t ) |2 dt
1 1
E | et u(t ) |2 dt e2t dt e 2t 0
0 2 2 t
0 2 4 6
The signal x(t) is an energy signal. Since E is finite, the signal power P = 0.
j0t
Example 2: Let us consider another periodic signal x(t ) Ae
2
Signal x(t) has a period T 0 , and it cannot be an energy signal.
0
The power of the signal is
1 T0 / 2 1 T0 / 2
jt 2
P | Ae | dt A2dt A2
T0 T0 / 2 T0 T0 / 2
T
1 (signal average over a period, i.e. DC term &
a0 s(t)dt
T zero-frequency component.)
0
T
2
ak s(t) cos(kω t) dt
T Note: {cos(kωt), sin(kωt) }k
0
form orthogonal base of
T
2 function space.
- bk s(t) sin(kω t) dt
T
0
FS Convergence
Dirichlet conditions
(a) s(t) piecewise-continuous;
Rate of convergence
T
Example:
if s(t) is discontinuous, then
square wave
|ak|<M/k for large k (M>0)
s(t)
0 π
0 2 4 6 8 10 t
-0.5
π 2π
1
ak cos kt dt cos kt dt 0 (odd function)
-1
π
0 π -1.5
π 2π
1
- bk sinkt dt sinkt dt ...
2
1 cos kπ * Even & Odd functions
π k π
0 π s(x)
4 Even :
k π , k odd
s(-x) = s(x)
x
0 , k even
s(x)
Odd :
4 4 4
sw(t) sin t sin 3 t sin 5 t ... s(-x) = -s(x) x
π 3π 5π
FS analysis - 2
Fourier spectrum
representations zk = (rk , k )
bk rk rk = ak 2 + bk 2
s(t) vk (t) k k = arctan(bk /ak )
k 0 ak
Rectangular Polar
vk = akcos(k t) - bksin(k t) vk = rk cos (k t + k)
rk
ak rK = amplitude, 4/π
All are zeros.
K = phase 4/3π
f1 3f1 5f1 f
f1 2f1 3f1 4f1 5f1 6f1 f fk=k /2 θk
-bk
f1 3f1 5f1 f
4/π
4/3π
of square-wave.
FS Synthesis
Periodic functions and signals may be expanded into a series of sine and
cosine functions
sw1 (t)
(t)
9(t)
5
7
3
11 --b-bkbkksin(kt)
sin(kt)
sin(kt)
sin(kt)
0
kkk1
11
-0.5
-1
-1.5
0 2 4 6 8 10
t
Overshoot exist @ 1
0
79
sw79 (t) - bk sin(kt) -0.5
k 1
-1
-1.5
0 2 4 6 8 10
t
2π k n Orthogonality in DFS:
1 N 1 j
ck s[n] e
~ N
N 2π n(k-m)
n 0 N 1 j
1
~ ~ e N δ k,m
Note: ck+N = ck same period N N
n 0
i.e. time periodicity propagates to frequencies!
synthesis
2π k n N consecutive samples of s[n]
N1 j completely describe s in time
s[n] ~ ck e N
or frequency domains.
k 0
1-Volt square-wave
-5 0 1 2 3 4 5 6 7 8 9 10 n
s[n]: period N, duty factor L/N 0 L N
1 1
L ~
, k 0, N, 2N,... 0.6 0.6 ck 0.6 0.6
N
0.24 0.24 0.24 0.24
0.2
~
ck π k (L 1) π kL
j sin
e N N 0 1 2 3 4 5 6 7 8 9 10 k
, otherwise
N π k
sin
N k 0.4
0.4
0.2 0.2
-0.4 -0.4
Fourier Transform (FT)
• F() is computed from f(t) by the Fourier
Transform:
FT: F ( f ) f (t )e i 2 ft
dt
Inverse FT:
1
f (t ) F ( f )e i 2f t
df F ( )e i t
d
2
Inverse Fourier Transform (FT)
• A non-periodic function can be represented as a sum of
sin’s and cos’s of (possibly) all frequencies:
1
f ( x)
2
F ( )eix d
Euler’s Identity:
e cos x i sin x
ix eix cos x i sin x
f (t ) (t ) F( f ) 1
2
1.3
1.3
1.1
1.1
0.9
0.9
0.7
0.7
0.5
0.5
0.3
0.3
0.1
0.1
-0.1
-0.1
-0.3
-0.3
-0.5
f(x) F()
-0.5
Example 2: Box Function and Its Transform
F( f ) f ( x )e i 2 f x dt
1 / 2
e i 2 f t dt Euler’s Identity:
1 / 2
1
1 / 2
ei x cos x i sin x
e i 2 f t
i 2 f 1 / 2
e i f ei f
1
i 2 f
f (t ) cos(0t ) cos(2 f 0t ) F ( f ) ( f f 0 ) ( f f 0 )
1
2
1.5
1
0.5
-1 1
-0.5
-1
-1.5
f(x) F()
F ( f ) ( f f 0 ) ( f f 0 )
1
f (t ) sin(0t ) sin(2 f 0t )
2i
1.5
1
0.5
-1
0
-0.5
1
-1
-
-1.5
f(x) F()
-0.5
0.18 0.18
0.13 0.13
0.08 0.08
0.03 0.03
-0.02 -0.02
f(x) F()
Typical Fourier Transform Pairs
0.5
0.4 Gaussian
0.3
t2
1
0.2
f (t ) e 2
0.1
2
0
0 5 10 15 20 25 30 35 40 45 50
6 Gaussian
5
4 f2
1
3
F( f ) e 2
2
1
2
0
0 50 100 150 200 250
Time domain
0.14
0.12
0.1
0.08
0.06
0.04
0.02
-5 -4 -3 -2 -1 0 1 2 3 4 5
Time [Sec.]
-3
x 10
15 Real part
Imaginary part
10
-5
1.5
Sinc function
1
sin t
f (t ) sinc t
0.5
0 t
-0.5
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
6 Square wave
5
4
1 f 1
3
F( f ) 2
0 f 1
2
1 2
0
-100 -50 0 50 100
Time domain
0.8
0.6
0.4
0.2
-0.2
-50 -40 -30 -20 -10 0 10 20 30 40 50
Time [Sec.]
-3
x 10
3
Absolute value
2 Real part
Imaginary part
1
-1
-2
-3
-100 -50 0 50 100
Freq. [Hz]
Typical Fourier Transform Pairs
0.8
0.6
0.4 Exponential
0.2
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
30
25
20
15
Lorentzian
10
0
0 50 100 150 200 250
FACTS (Properties) of Fourier
Transform
6 6
4 4
2 2
0 0
-2 -2
-4 -4
-6 -6
-8 -8
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
seconds seconds
The Discrete Fourier Transform (DFT)
k 0
N 1
Inverse DFT: 1
(Reconstruction)
hk
N
n
H
n 0
e 2ikn N
DFS properties
Time Frequency
Multiplication * 1 N1
s[n] ·u[n] S(h)U(k - h)
N h 0
N1
Convolution *
s[m] u[n m] S(k)·U(k)
m 0
Time shifting s[n - m] j
2π k m
e T S(k)
Frequency shifting j
2π h t S(k - h)
e T s[n]
An undersampled signal
sin(28t), SR = 8.5 Hz
2
1.5
f0 = 8 Hz
0.5
-0.5
-1 Undersampled:
-1.5
fs < 2f0 = 16 Hz
-2
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Nyquist Sampling Theorem
• Also known as the Nyquist Theorem, is a principle that
engineers follow in the digitization of analog signals
(analog-to-digital conversion, ADC);
• Samples of the analog waveform must be taken frequently
enough in order to result in a faithful reproduction of the
signal.
fs > 2fN
This is 'Oversampling' that will take time fs < 2fN
and create a large digital data. This is ‘undersampling' that is not
enough to well represent the signal.
fs = 2fN
Nyquist Sampling Rate = The
minimum sample rate that
captures the "essence" of the
analog information.
Nyquist Frequency and Nyquist Rate
IDFT
aliasing
Reconstructed signal from
the undersampled discrete If fs < 2fmax , overlapping aliasing will occur, making
signal will be different the sampled discrete signal representation
different to the original continuous one.
Undersampled Aliasing
(fs < 2fN)
undersampled
X Filter window
Un-aliasing
Various filter windows:
o Blackman
-2fs -fs -fmax fmax fs 2fs o Hamming
o Hanning
One way to reduce the overlapping aliasing is to o Lanczos
use low-pass-filter to “cutoff” the overlapped high o Parzen
frequencies, but it will lose some high-frequency o Flat Top
components of the original continuous signal.
Various Window Functions
(apodization function, tapering function)
Hanning window ex1_2_windowfilters.m
n
w[n] sin 2 0n N
Spatial Frequency Domain
1
N
0.8
Hamming window
Hanning
2n
0.6
N 0.4 Kaiser
Lanczos
Kaiser window 0.2
Blackman
0
0 100 200 300 400 500
Samples
Spatial Domain
Lanczos window
2n
sin 1 0.8 Hanning
2n N
w[n ] sin c 1 0.6 Hamming
N 1
2n Kaiser
N 0.4
Lanczos
Blackman window 0.2 Blackman
0
1 2n 4n
w[n] 0.5 cos cos , 0 n N -0.2
2 N 2 N 240 245 250 255 260 265 270
Bins
Practice Rules
• Substitute variables n=2r for n even and n=2r+1 for odd WN e j 2 / N
N / 2 1 N / 2 1
Xk x[2r]W 2rk
N x[2r 1]W N
2r 1k
r 0 r 0
N / 2 1 N / 2 1
x[2r]W W x[2r 1]W
r 0
rk
N/2
k
N
r 0
rk
N/2
Gk W Hk k
N
O(N2) operations
2 πiu2 x 2 πiu( 2 x 1)
1 N / 21 1 N / 2 1
F(u) f (2x )e
N x 0
N
f (2x 1)e
N x 0
N
even x odd x
1 1 N / 2 1 2 πi ux 2 πi u
1 N / 2 1 2 πi ux
f ( 2x )e N / 2 e N
f ( 2x 1)e N / 2
2 N / 2 x 0 N / 2 0
x
0 1 2 3 4 5 6 7 0 2 4 6 1 3 5 7
figure(1);
Subplot(3,1,1); plot(time1,sound1); legend('train '); xlabel('Time [Sec.]'); axis tight;
subplot(3,1,2); plot(f1, abs(sound1_FFT)); legend('Amplitude-FFT');
xlabel('Freq.[Hz]'); ylabel('Amplitude'); axis tight;
Subplot(3,1,3); plot(f1, angle(sound1_FFT)*RAD); legend('Phase-FFT');
xlabel('Freq.[Hz]'); ylabel('Phase Angle [Deg.]'); axis tight;
MATLAB Practice - 1-D Fourier Transform
Sound Signal Frequency Analysis - Train
1
Train
0.5
-0.5
-1
0.2 0.4 0.6 0.8 1 1.2 1.4
Time [Sec.]
Amplitude-FFT
0.06
Amplitude
0.04
0.02
Phase-FFT
100
-100
-0.5
1 2 3 4 5 6 7 8
Time [Sec.]
-3
x 10
10
Amplitude-FFT
8
Amplitude
6
4
2
Phase-FFT
100
-100
0.5
IFFT back to time domain.
0
Noise reduced but also
-0.5 lost some high freq.
1 2 3 4 5 6 7 8 components.
Time [Sec.]
MATLAB Practice - 1-D Fourier Transform
(Use LPF to filter out high frequency noise)
FFT
Time domain Audio Frequency Domain
Signal Signal
LPF
Inverse Fourier
Transform
LPF Filtered
Time domain Audio Frequency Domain
Signal Signal
1-D Fourier Transform
- Nuclear Magnetic Resonance (NMR) Signal
Multiple Frequency Signal FT Analysis
-Nuclear Magnetic Resonance (NMR) Spectroscopy
Pro1_2_NMR.m
t
• An: amplitude
3
f (t ) An sin(2f n t ) e •
T2 n fn: Resonant freq.
n 1 • T2n: relaxation time
3
f1 = 80 Hz, T21 = 1 s
f1 f2 f3 2
f = 90 Hz, T2 = .5 s
2 2
1 f3 = 100 Hz, T23 = 0.25 s
80 Hz 90 Hz 100Hz 0
T21 T22 T23 -1
A1 A2 A3 -3
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
100
80
fs = 256 Hz 60
40
20
0
0 20 40 60 80 100 120
Frequency [Hz]
Multiple Frequency Signal FT Analysis
-Nuclear Magnetic Resonance (NMR) Spectroscopy
(Undersampled Example) Pro1_2_NMR.m
3
f1 = 80 Hz, T21 = 1 s
2
f = 90 Hz, T2 = .5 s
2 2
1 f3 = 200 Hz, T23 = 0.25 s
Time-domain
0
NMR Signal -1
-2 SR = 256 Hz
-3
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
100
Frequency domain 80
60
NMR Signal 40
20
0
0 20 40 60 80 100 120
Frequency [Hz]
FFT of Free Induced Decay (FID)
(NMR Signal)
T2 = 0.5s
1
t
0
f t sin2ft exp
-1
f = 8 Hz
SR = 256 Hz
T2 = 0.5 s
T 2
-2
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
70
60
50
F f
40
30
20
10
0
0 20 40 60 80 100 120
FFT of Free Induced Decay (FID)
(NMR Signal)
2
t
1
f = 8 Hz
SR = 256 Hz f t sin2ft exp
T2 = 0.1 s T2
0
-1
-2
T2 = 0.1s
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
14
12
10
0
0 20 40 60 80 100 120
FFT of Free Induced Decay (FID)
(NMR Signal)
2
t
f t sin2ft exp
1
0 T2
-1 f = 8 Hz T2 = 2 s
SR = 256 Hz
T2 = 2 s
-2
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
200
150
100
50
0
0 20 40 60 80 100 120
Effect of Changing Sample Rate fs
2
SR = 256 Hz
SR = 128 Hz
1
t
f t sin2ft exp
0
T2
-1 f = 8 Hz
T2 = 0.5 s T2 = 0.5 s
-2
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
70 35
60 30
50 25
40 20
30 15
20 10
10 5
0 0
0 10 20 30 40 50 60
Effect of Changing Sample Rate fs
• Lowering the sample rate fs:
– Reduces the Nyquist frequency, which will reduces
the maximum measurable frequency
– Does not affect the frequency resolution
1 ST = 2.0 s ST = 2s
ST = 1.0 s
0
vs
-1
ST = 1s
f = 8 Hz
T2 = .5 s
-2
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
70 F ( f ) f (t )ei 2 ft dt
60
50
40
30
Df DT 1
20
10
0
0 2 4 6 8 10 12 14 16 18 20
1 1
Df
• Reducing the sampling duration: DT ST
– Lowers the frequency resolution Df
– Does not affect the range of frequencies you can measure
Effect of Changing Sampling Duration ST
F ( f ) f (t )ei 2 ft dt
2
-1
-2
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
200
150
100
50 f = 8 Hz
T2 = 2.0 s
0
0 2 4 6 8 10 12 14 16 18 20
Effect of Changing Sampling Duration ST
(Zero-padding)
1
zero-padding
0.5 ST = 0.5s singal
f = 100 Hz
T2 = 0.25s
0
fs = 256 Hz
-0.5
-1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
F ( f ) f (t )ei 2 ft dt
Time[s]
25
20 zero-padding DFT
ST = 0.5s singal DFT
15
10
0 20 40 60 80 100 120
Freq.[Hz]
20
Original time-
15
domain signal
10
-1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 FFT
Time[s]
-0.5
Frequency domain Zero padding
0 20 40 60 80 100 120
IFFT
25
20
Original time domain signal
15
Interpolated signal by zero-padding Interpolated Time
10
domain signal
5
-1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time[s]
1-D Fourier Transform
- Radar Range Profile
1-D Fourier Transform - Radar Range Profile
The tomographic images are generally formed by Transmission Tomography
by illuminating an object with signal (x-rays, microwaves, or ultrasound) and
measuring the energy that passes through the object to the other side.
When microwave or ultrasound is used for imaging, the transmitted signal is
almost immeasurable because of large impedance discontinuities and other
attenuation losses.
For this reason, most radar and medical ultrasonic imaging is done using
reflected signals, or Reflection Tomography, to construct a quantitative
cross-sectional image from reflection data.
One nice aspect of Reflection Tomography, especially in comparison with
Transmission Tomography, is that transmission and reception are now done
from the same side, and it is not necessary to encircle the object with
transmitters and receivers for gathering the “projection” data.
Examples:
o Ultrasound B-scan imaging
o Radar Imaging
o Radar-based microwave biomedical imaging
1-D Fourier Transform - Radar Range Profile
D > cT/2
x(t) h(t)
z (t ) x (t ) h(t )
Z( f ) X ( f ) H( f )
Time
Z ( f ) z (t )e i 2 ft dt
z(t) X ( f ) x (t )e i 2 ft dt
H ( f ) h(t )e i 2 ft dt
Down Range
r
Range profile
Radar 2ri
transmitter ti
c
Ns
f0 10 GHz
Bandwidth 3 GHz E ( f ) i exp( j 4fri / c)
i 1
(x1, y1), 1 (-0.3, 0.3), 1.8
(x2, y2), 2 (0, 0), 1.0 Range Profile:
(x3, y3), 3 (0.2, -0.2), 1.8
) E ( f ) df IFFT E ( f )
2r
(x4, y4), 4 (0.3, 0.3), 1.8 (t ) (
No. of Frequencies 128 c k
1-D Fourier Transform - MATLAB Practice
(Radar Range Profile)
ex1_3_rangeprofile.m
0.5
0
Scatters
-0.5
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
Range[m]
6
|E(f)|
4
Radar scattering signal (freq.
2
domain, amplitude only)
9.4 9.6 9.8 10 10.2 10.4 10.6
Freq.[GHz]
IFFT
1.5
1
(r)
0.5 Time (range) domain
range profile
-2.6 -2.4 -2.2 -2 -1.8 -1.6 -1.4 -1.2 -1 -0.8 -0.6
Range[m]
MATLAB Practice - 1-D Fourier Transform
(Radar Range Profile)
clear ex1_3_rangeprofile.m
c = 3e8;
DR = 0.1; %% set range rsolution
Bandwidth = c/(2*DR);
f0 = 10e9; %% central frequency f0
NF = 128; %% number of frequencies through the band
df = Bandwidth / (NF-1);
f = [f0 - Bandwidth/2:df:f0 + Bandwidth/2];
figure(1);
subplot(3,1,1); plot(X, Y,'bo'); xlabel('Range[m]'); axis tight;
xlim([-1 1]);ylim([-0.5 0.5]);
subplot(3,1,2); plot(f/1e9,abs(E)); xlabel('Freq.[GHz]'); axis tight;
subplot(3,1,3); plot(dr,abs(et),'-'); xlabel('Range[m]'); axis tight;
xlim([-2.6 -0.6]);
Radar Range Profile- Resolution
D > cT/2
The resolution of radar is its ability to
distinguish between targets in very
close range.
Time
The range resolution of a radar
system can be simplified as :
cT c
Dr
2 2B Down Range
o T: Time duration of pulse
D < cT/2
o B: bandwidth of radar signal
Higher bandwidth leads to better
range resolution.
Time
t f
Radar Range Profile Resolution
Ns
E ( f ) i exp( j 2fRi )
i 1
2 fx c c
Range resolution: ft 1 Dx
c 2Df 2 B
c 3 108
Dr 0.05m
2Df 2 3 109
Visualizing the Fourier Image in MATLAB
Consider a discrete function with limited time duration:
x(0), x(), x(2), … , x((N-1)) )
The DFT is theoretically useful, but in practical computer
implementation, we actually follow transformation, called the finite
Fourier transform (FFT):
N 1 N 1
X k e j 2 / N kn
1
X k x[n]e j 2 / N kn IDFT: x[n ]
N k 0
n 0
for k = 0, 1 , … , N-1
We see that the X[k] are the samples of the continuous function
X(f) in frequency domain with
fk= k/(N), … , k = 0, 1, …, N-1
A sampling interval of in the t-domain implies a sampling interval of
1/(N in the frequency domain if we use the same N point DFT
without zero-padding.
With zero-padding, say we actually use NFFT points in DFT, then
fk= k/(N), … , k = 0, 1, …, N - 1
F F after fftshift
1 N/2 N N/2 N 1 N/2-1
f(t) 0.5
0
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
Time(Sec.)
20
0
F = fft(f)
-20
-30 -20 -10 0 10 20 30
Freq.(Hz)
20
10
fftshift(F) 0
-10
-20
-30 -20 -10 0 10 20 30
Freq.(Hz)
Visualizing the Fourier Image in MATLAB
Fuv_shift = fftshift(Fuv);
Fuv Fuv after fftshift
1 N/2 N N/2 N 1 N/2-1
M/2
M/2 M
1
M M/2-1
f(x) |F()|
^
F
T x
-1/2T 1/2T
f(x) |F()|
^
F
x
T/2 -1/T 1/T