7/29/2019 Fourier Transforms of Discrete Signals
1/33
Chapter 12
Fourier Transforms of Discrete Signals
7/29/2019 Fourier Transforms of Discrete Signals
2/33
Sampling
Continuous signals are digitized using digital computers
When we sample, we calculate the value of the continuoussignal at discrete points
How fast do we sample
What is the value of each point
Quantization determines the value of each samples value
7/29/2019 Fourier Transforms of Discrete Signals
3/33
Sampling Periodic Functions
- Note that wb = Bandwidth, thus if then aliasing occurs
(signal overlaps)
-To avoid aliasing
-According sampling theory: To hear music up to 20KHz a CDshould sample at the rate of 44.1 KHz
7/29/2019 Fourier Transforms of Discrete Signals
4/33
Discrete Time Fourier Transform
In likely we only have access to finite amount of data
sequences (after sampling)
Recall for continuous time Fourier transform, when the
signal is sampled:
Assuming
Discrete-Time Fourier Transform (DTFT):
7/29/2019 Fourier Transforms of Discrete Signals
5/33
Discrete Time Fourier Transform
Discrete-Time Fourier Transform (DTFT):
A few points
DTFT is periodic in frequency with period of 2p
X[n] is a discrete signal
DTFT allows us to find the spectrum of the discrete signal as viewed
from a window
7/29/2019 Fourier Transforms of Discrete Signals
6/33
Example D
See map!
7/29/2019 Fourier Transforms of Discrete Signals
7/33
Example of Convolution
Convolution
We can write x[n] (a periodic function) as an infinite sum of the
function xo[n] (a non-periodic function) shifted N units at a time
This will result
Thus
See map!
7/29/2019 Fourier Transforms of Discrete Signals
8/33
Finding DTFT For periodic signals
Starting with xo[n]
DTFT of xo[n]
Example
7/29/2019 Fourier Transforms of Discrete Signals
9/33
Example A & B
notes
notes
X[n]=a|n|, 0 < a < 1.
7/29/2019 Fourier Transforms of Discrete Signals
10/33
DT Fourier Transforms
1. W is in radian and it is between
0 and 2p in each discrete time
interval
2. This is different from w where it
was between INF and + INF
3. Note that X(W) is periodic
7/29/2019 Fourier Transforms of Discrete Signals
11/33
Properties of DTFT
Remember:
For time scaling note that
m>1 Signal spreading
7/29/2019 Fourier Transforms of Discrete Signals
12/33
Fourier Transform of Periodic Sequences
Check the map~~~~~See map!
7/29/2019 Fourier Transforms of Discrete Signals
13/33
Discrete Fourier Transform
We often do not have an infinite amount of data which is
required by DTFT
For example in a computer we cannot calculate uncountable infinite
(continuum) of frequencies as required by DTFT
Thus, we use DTF to look at finite segment of data
We only observe the data through a window
In this case the xo[n] is just a sampled data between n=0, n=N-1 (Npoints)
7/29/2019 Fourier Transforms of Discrete Signals
14/33
Discrete Fourier Transform
It turns out that DFT can be defined as
Note that in this case the points are spaced 2pi/N; thus the
resolution of the samples of the frequency spectrum is2pi/N.
We can think of DFT as one period of discrete Fourier series
7/29/2019 Fourier Transforms of Discrete Signals
15/33
A short hand notation
remember:
7/29/2019 Fourier Transforms of Discrete Signals
16/33
Inverse of DFT
We can obtain the inverse of DFT
Note that
7/29/2019 Fourier Transforms of Discrete Signals
17/33
Using MATLAB to Calculate DFT
Example:
Assume N=4
x[n]=[1,2,3,4]
n=0,,3
Find X[k]; k=0,,3
or
7/29/2019 Fourier Transforms of Discrete Signals
18/33
Example of DFT
Find X[k]
We know k=1,.., 7; N=8
7/29/2019 Fourier Transforms of Discrete Signals
19/33
Example of DFT
7/29/2019 Fourier Transforms of Discrete Signals
20/33
Example of DFT
Time shift Property of DFT
Other DFT properties: http://cnx.org/content/m12019/latest/
Polar plot for
7/29/2019 Fourier Transforms of Discrete Signals
21/33
Example of DFT
E l f DFT
7/29/2019 Fourier Transforms of Discrete Signals
22/33
Example of DFT
Summation for X[k]
Using the shift property!
E l f IDFT
7/29/2019 Fourier Transforms of Discrete Signals
23/33
Example of IDFT
Remember:
E l f IDFT
7/29/2019 Fourier Transforms of Discrete Signals
24/33
Example of IDFT
Remember:
F t F i T f Al ith
7/29/2019 Fourier Transforms of Discrete Signals
25/33
Fast Fourier Transform Algorithms
Consider DTFT
Basic idea is to split the sum into 2 subsequences of length
N/2 and continue all the way down until you have N/2
subsequences of length 2
Log2(8)
N
R di 2 FFT Al ith T i t FFT
7/29/2019 Fourier Transforms of Discrete Signals
26/33
Radix-2 FFT Algorithms - Two point FFT
We assume N=2^m
This is called Radix-2 FFT Algorithms
Lets take a simple example where only two points are given n=0, n=1; N=2
http://www.cmlab.csie.ntu.edu.tw/cml/dsp/training/coding/transform/fft.html
y0
y1
y0
Butterfly FFT
Advantage: Less
computationally
intensive: N/2.log(N)
G l FFT Al ith
7/29/2019 Fourier Transforms of Discrete Signals
27/33
General FFT Algorithm
First break x[n] into even and odd
Let n=2m for even and n=2m+1 for odd
Even and odd parts are both DFT of a N/2 point
sequence
Break up the size N/2 subsequent in half by letting2mm
The first subsequence here is the term x[0], x[4],
The second subsequent is x[2], x[6],
1
1)2sin()2cos(
)]12[(]2[
2/
2
2/
2/
2/2/
2/
2/
2/
2
12/
0
2/
12/
0
2/
N
N
jNN
m
N
N
N
m
N
Nm
N
mk
N
mk
N
N
m
mkN
kN
N
m
mkN
W
jeW
WWWW
WW
mxWWmxW
ppp
E l
7/29/2019 Fourier Transforms of Discrete Signals
28/33
Example
1
1)2sin()2cos(
)]12[(]2[][
2/
2
2/
2/
2/2/
2/
2/
2/
2
12/
0
2/
12/
0
2/
N
N
jN
N
m
N
N
N
m
N
Nm
N
mk
N
mk
N
N
m
mkN
kN
N
m
mkN
W
jeW
WWWW
WW
mxWWmxWkX
ppp
Lets take a simple example where only two points are given n=0, n=1; N=2
]1[]0[]1[]0[)]1[(]0[]1[
]1[]0[)]1[(]0[]0[
1
1
0
0
1.0
1
1
1
0
0
1.0
1
0
0
0.0
1
0
1
0
0
0.0
1
xxxWxxWWxWkX
xxxWWxWkX
mm
mm
Same result
FFT Al ith F i t FFT
7/29/2019 Fourier Transforms of Discrete Signals
29/33
FFT Algorithms - Four point FFT
First find even and odd parts and then combine them:
The general form:
FFT Algorithms 8 point FFT
7/29/2019 Fourier Transforms of Discrete Signals
30/33
FFT Algorithms - 8 point FFT
http://www.engineeringproductivitytools.com/stuff/T0001/PT07.HTM
Applet: http://www.falstad.com/fourier/directions.html
A Simple Application for FFT
7/29/2019 Fourier Transforms of Discrete Signals
31/33
A Simple Application for FFT
t = 0:0.001:0.6; % 600 points
x = sin(2*pi*50*t)+sin(2*pi*120*t);y = x + 2*randn(size(t));
plot(1000*t(1:50),y(1:50))
title('Signal Corrupted with Zero-Mean Random Noise')
xlabel('time (milliseconds)')
Taking the 512-point fast Fourier transform (FFT): Y = fft(y,512)
The power spectrum, a measurement of the power at various
frequencies, is Pyy = Y.* conj(Y) / 512;
Graph the first 257 points (the other 255 points are redundant) on a
meaningful frequency axis: f = 1000*(0:256)/512;
plot(f,Pyy(1:257))
title('Frequency content of y')
xlabel('frequency (Hz)')
This helps us to design an effective filter!
ML Help!
Example
7/29/2019 Fourier Transforms of Discrete Signals
32/33
Example
Express the DFT of the 9-point {x[0], ,x[9]} in terms of the
DFTs of 3-point sequences {x[0],x[3],x[6]}, {x[1],x[4],x[7]},
and {x[2],x[5],x[8]}.
Later
References
7/29/2019 Fourier Transforms of Discrete Signals
33/33
References
Read Schaums Outlines: Chapter 6
Do Chapter 12 problems: 19, 20, 26, 5, 7