You are on page 1of 32

Mrs.

Aarti Bang,
VIIT, Pune
DFT
ond
SpecfroI AnoIysis of SiqnoIs
Mrs.Aarti Bang,
VIIT, Pune
Confinuous Time Cose Fourier Trunsform
dt e t h F H
Ft j

2
) ( ) ( dF e F H t h
Ft j

2
) ( ) (
Mrs.Aarti Bang,
VIIT, Pune
Discrefe Time Cose Discrefe Time Fourier
Tronsform

n
n j
e n h H

) ( ) (

d e H n h
n j
) (
2
1
) (
Mrs.Aarti Bang,
VIIT, Pune
Discrefe Fourier Tronsform

1
0
/ 2
) ( ) (
N
n
N nk j
e n h k H

1 ..... 2 , 1 , 0 N k

1
0
/ 2
) (
1
) (
N
k
N nk j
e k H
N
n h

DFT
IDFT
1 ..... 2 , 1 , 0 N n
Mrs.Aarti Bang,
VIIT, Pune
e.q.
F~I0 H; Fs ~ o4 H; M ~ 3Z
0 5 1 0 1 5 2 0 2 5 3 0 3 5
0
2
4
G
8
1 0
1 2
1 4
1 G
|
|
X
[
|
|
|
x(n) ~ sin(Z*pi*n*I0/o4)
Mrs.Aarti Bang,
VIIT, Pune

n
n j
e n h H

) ( ) (

1
0
/ 2
) ( ) (
N
n
N nk j
e n h k H

N
k

N
k
Fs
F
k
2 2

N
kF
F
s
k

Mrs.Aarti Bang,
VIIT, Pune
F~II H; Fs ~ o4 H; M ~ 3Z
0 5 10 15 20 25 30 35
0
2
4
G
8
10
12
|
|
X
[
|
|
|
This phenomenon is coIIed
Mrs.Aarti Bang,
VIIT, Pune
The phenomenon of fhe spreod of enerqy
from o sinqIe frequency fo mony
frequency Iocofions is coIIed Ieokoqe.
Mrs.Aarti Bang,
VIIT, Pune
F~II H; Fs ~ o4 H; M ~ o4
0 10 20 30 40 50 G0 70
0
5
10
15
20
25
30
35
|
|
X
[
|
|
|
Mrs.Aarti Bang,
VIIT, Pune
Windowinq
x(n) ~ x(n) x w(n)
where
)
1 2
2
cos( 46 . 0 54 . 0 ) (


N
n
n w

n ~ 0I, M-I
Mrs.Aarti Bang,
VIIT, Pune
0 10 20 30 40 50 G0 70
-1
-0.8
-0.G
-0.4
-0.2
0
0.2
0.4
0.G
0.8
1
input signal
0 5 10 15 20 25 30 35
-1
-0.8
-0.G
-0.4
-0.2
0
0.2
0.4
0.G
0.8
1
input signal
Mrs.Aarti Bang,
VIIT, Pune
0 10 20 30 40 50 G0 70
0
0.1
0.2
0.3
0.4
0.5
0.G
0.7
0.8
0.9
1
hamming window
0 5 10 15 20 25 30 35
0
0.1
0.2
0.3
0.4
0.5
0.G
0.7
0.8
0.9
1
hamming window
Mrs.Aarti Bang,
VIIT, Pune
0 10 20 30 40 50 G0 70
-1
-0.8
-0.G
-0.4
-0.2
0
0.2
0.4
0.G
0.8
1
windowed signal
0 5 10 15 20 25 30 35
-1
-0.8
-0.G
-0.4
-0.2
0
0.2
0.4
0.G
0.8
1
windowed signal
Mrs.Aarti Bang,
VIIT, Pune
0 5 10 15 20 25 30 35
0
1
2
3
4
5
G
7
|
|
X
[
|
|
|
32 pt. DFT of windowed signal
Mrs.Aarti Bang,
VIIT, Pune
0 5 10 15 20 25 30
0
2
4
G
8
10
12
14
1G
F
|
X
[
F
|
|
DFT
e.q.
F~I0 H; Fs ~ o4 H; M ~ 3Z
Mrs.Aarti Bang,
VIIT, Pune
PeIofionship of DFT wifh Z - Tronsform

n
n
z n x z X ) ( ) (
Sample X(z) at N equally spaced points
on unit circle
N nk j
k
e z
/ 2
k = 0,1,..,N
j
re z
On unit circle
j
e z

n
n j
e n x z X

) ( ) (

1
0
/ 2
) ( ) (
N
n
N nk j
e n x z X

Mrs.Aarti Bang,
VIIT, Pune
Mrs.Aarti Bang,
VIIT, Pune
Controlling Gain by Pole-Zero Placement
Frequency response can be
controlled by assigning poles and
zeros at specific locations.
To enhance the gain at a
frequency, we assign a pole at that
frequency.
To decrease the gain at a
frequency, we assign a zero at that
frequency
Mrs.Aarti Bang,
VIIT, Pune
Spectral Analysis of Sinusoidal signals
or
Deterministic Signals
or
Stationary Signal
Signal length or Window length N
Effect of:
DFT length R
Window function
x(n) = 0.5sin(2*pi*n*f1) + sin(2*pi*n*f2)
f1 = 0.22 f2 = 0.34
Mrs.Aarti Bang,
VIIT, Pune
Effect of increasing length of DFT R by zero padding
Window function : Rectangular
Difficult to determine
whether there is one or
more sinusoids and their
exact locations.
0 5 10 15
0
1
2
3
4
5
G
|
|
X
[
|
|
|
N = 1G, R=1G
Mrs.Aarti Bang,
VIIT, Pune
0 5 10 15 20 25 30 35
0
1
2
3
4
5
G
7
8
|
|
X
[
|
|
|
N= 1G, R=32
Size of DFT is increased
(by zero padding)
There is some concentration
Around k=7, & k=11
Mrs.Aarti Bang,
VIIT, Pune
0 20 40 G0 80 100 120 140
0
1
2
3
4
5
G
7
8
|
|
X
[
|
|
|
N = 1G, R=128
Peaks around k=27 & k=45
No. of minor peaks
Not clear whether additional
sinusoids of lesser strengths
are present
I
Increasing R improves sampling accuracy of
DTFT reducing spectral separation of adjacent
DTFT samples
Mrs.Aarti Bang,
VIIT, Pune
Frequency Resolution Property
Minimization of leakage using a tapered window
x(n) = 0.85sin(2*pi*n*f1) + sin(2*pi*n*f2)
f1 = 0.22 f2 = 0.26
Mrs.Aarti Bang,
VIIT, Pune
0 2 4 G 8 1 0 1 2 1 4 1 G
0
0 . 5
1
1 . 5
2
2 . 5
3
3 . 5
4
4 . 5
|
|
X
[
|
|
|
N = 1 G , R= 1 G
Leakage is minimized
due to windowing
Mrs.Aarti Bang,
VIIT, Pune
0 1 0 2 0 3 0 4 0 5 0 G 0 7 0
0
0 . 5
1
1 . 5
2
2 . 5
3
3 . 5
4
4 . 5
|
|
X
[
|
|
|
N = 1 G , R= G 4
Increasing R,
No change in resolution
Mrs.Aarti Bang,
VIIT, Pune
0 20 40 G0 80 100 120 140
0
2
4
G
8
10
12
14
1G
18
|
|
X
[
|
|
|
N = G4, R=128
Increasing the window length improves the frequency resolution
i.e. it can resolve two closer frequencies.
Mrs.Aarti Bang,
VIIT, Pune
Hamming window:
Width of main lobe : 8*pi/N
We can resolve two frequencies, if their difference is
close to (greater than) half the main lobe width
i.e. 8*pi/2*N
Frequency difference is 0.04
For N=16, it is 0.125 (8*pi)/(2*pi*N*2)
For N=64, it is 0.03125
Mrs.Aarti Bang,
VIIT, Pune
0 0.5 1 1.5 2 2.5 3 3.5
-80
-G0
-40
-20
0
20
40
Frequency response of Hanning Window
Main lobe
Side lobes
Mrs.Aarti Bang,
VIIT, Pune
Non-Stationary signals
Signals that change with time.
Mrs.Aarti Bang,
VIIT, Pune
Stationary Non-Stationary
0 50 100 150 200 250 300
-4
-3
-2
-1
0
1
2
3
4
x = 1 +4 +8 +1G
0 50 100 150 200 250 300
-1
-0.8
-0.G
-0.4
-0.2
0
0.2
0.4
0.G
0.8
1
1 4 8 1G
Mrs.Aarti Bang,
VIIT, Pune
0 50 100 150 200 250 300
0
20
40
G0
80
100
120
140
dft of stationary signal
0 50 100 150 200 250 300
0
5
10
15
20
25
30
35
dft of non-stationary signal
Mrs.Aarti Bang,
VIIT, Pune
Spectral Analysis of Random Signals
Estimate Power Density Spectrum
Periodogram Method
Signal x(n) sectioned into smaller blocks
Window w(n)
Modified blocks g(n) = x(n) x w(n)
Compute DFT of each modified block
Take square of magnitudes ( Periodogram)
Take average of all periodograms