Lecture 6 - Spectrum Estimation PDF
Lecture 6 - Spectrum Estimation PDF
1
Lecture Outlines
•Introduction
Fourier Series and Transform
Time/Frequency Resolutions
Autocorrelation & spectrum estimation
•Non-parametric Methods
Periodogram
Modified Periodogram
Bartlett’s Method
Welch’s Method
Blackman-Tukey Method
•Parametric Methods
2
Fourier Series and Transform
Im
sin(k0t ) cos(k0t )
jk0t
e
Re
t
ck e jk0t 1 T0 2
jk0t
x(t ) , ck x(t )e dt
k T0 T0 2
k=…,-1,0,1,…
x(t ) c(k )
T0 n
k
T0 ff t 1
T0 Ton Toff T0 4
Fourier Transform:
x(t ) X ( f )e j 2ft
df X ( f ) x(t )e j 2ft dt
,
x(t ) X( f )
T0 ff
t k
5
Discrete Fourier Transform (DFT)
x(0) X (0)
DFT
x(1) X (1)
N 1 2km
j
X (k ) x(m)e N
m 0
x( N 1) X ( N 1)
N 1 2km
x(m) X (k )e
j
N
, k ....,1,0,1,....
m 0
6
Introduction
• Spectrum Estimation: To estimate the
power spectral density (PSD) of signal.
• PSD is the DTFT of the autocorrelation
sequence.
• Estimating the power spectrum is
equivalent to estimating the
autocorrelation.
Autocorrelation & Spectrum estimation
Autocorrelation:
N
1
lim {
N 2 N 1 n N
x(n k ) x * (n)} rx (k )
Power spectrum :
Px (e jk
) x
r ( k
k
) e jk
•Peroidogram
•Modified periodogram
•Bartlett method
•Welch method
•Blackman-Tukey method
11
The periodogram
Estimated autocorrelation:
N 1 k
1
ˆrx (k )
N
x ( n k ) x * ( n)
n 0
ˆ jk
Pper (e ) rx (k )e
ˆ
k
jk
12
The Periodogram
• If x[n] is only measured over a finite interval, say n=0,1,….,N-1 ,
then we can estimate the autocorrelation sequence using:
• In order to ensure that the values of x[n] that fall outside the
interval [0,N-1] are excluded, we can write:
x(n)
N n N
ˆ j 1 j j 1 j 2
Pper (e ) X N (e ) X N (e ) | X N (e ) |
N N
15
Example : Periodogram of White Noise
rx (k ) (k )
2
x
Px (e )
jw 2
x
• Thus the power spectrum should be constant.
• Consider a sample realization of white noise of
unite variance and N=32
The periodogram of white noise
1 1
xN (n) DFT X N (k ) | . |2 Pˆper (e j 2k N
) | X N ( k ) |2
N N
17
The periodogram of white noise cont.
18
White noise power spectrum
Periodogram of sinusoid in noise
1 2
A
2 j 1 2
Px (e ) v A ( 0 )
2
v2 2
0 19
Periodogram of sinusoid in noise cont.
y1 (n) z1 (n)
win (1)
1
| . |2 ˆ j1
PX (e ) z1 ( N 1)
N
y 2 ( n) z 2 ( n)
PˆX (e j2 ) z2 ( N 1)
1
win (2) | . |2
N
x(n)
yL (n) z L (n)
win (L) 1
| . |2 ˆ jL
PX (e ) zL ( N 1)
N
20
Matlab Code
clear all;
close all;
A=1;
N=100;
fs=0.3;
n=1:N;
rn=randn(1,N);
phi=2*pi*rand(1,N);
x=A.*exp(j*2*pi*fs*n+phi)+rn;
Px=abs(fft(x,1024)).^2/length(n);
w=2.*pi.*[0:1023]./1024;
plot(w./(2*pi),Px)
xlabel('\bf Normalized Frequency')
ylabel('\bf Periodogram')
Title('\bf [A=1,N=100]')
7
6 6
6
5 5
5
Periodogram
Periodogram
Periodogram
4
4
4
3
3
3
2
2
2
1
1 1
0
0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalized Frequency 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency Normalized Frequency
6 9
0.6
8
5 0.5
7
Periodogram
Periodogram
Periodogram
4 6 0.4
5
0.3
3
4
0.2
2 3
2 0.1
1
1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Normalized Frequency
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency Normalized Frequency
A=0.001
Periodogram Bias
1 N 1 k
N k
rˆx (k ) E{}
N
n 0
rx (k )
N
rx (k )
N | k |
| k | 0
E{Pˆper (e j )} rx (k )wB (k )e _ jk w B (k) N
0 o.w
1
E{Pˆper (e j )} Px (e j ) WB (e j )
2
lim E{Pˆper (e j )} Px (e j )
N
1 2
A
4
ˆ 2 1 2
E{Pper (e )} v A [WB (e j ( 0 ) ) WB (e j ( 0 ) )]
j
2
k 0
2
k 0 24
N
Example: x(n) 1sin(0.4n ) v(n)
N 128 N 512
25
Periodogram Resolution
x(n) A1 sin(n1 1 ) A1 sin(n2 2 ) v(n)
j 1 2 1
Px (e ) v A1 ( 1 ) A2 ( 2 )
2 2
2 2
ˆ 1 2
E{Pper (e )} v A1 [WB (e j ( 1 ) ) WB (e j ( 1 ) )]
j 2
4
1 2
A2 [WB (e j ( 2 ) ) WB (e j ( 2 ) )]
4
Set equal to the width of main lobe of the spectral window
at it’s half power or 6dB point.
ˆ j 2
Res[ Pper (e )] 0.89
N 26
Example: x(n) 1sin(0.4n 1 ) 1sin(0.45n 2 ) v(n)
N 128 N 512
27
Properties of the periodogram
n 1 2
1
ˆ j
Pper (e )
N
x
n 0
( n ) wR ( n ) e jn
1
Bias: E{Pˆper (e j )} Px (e j ) WB (e j )
2
2
Resolution: Res[ Pˆper (e j )] 0.89
N
28
Modified Periodogram
2
1 1
Pˆper (e j ) | X N (e j ) |2
N N
x ( n) w
n
R (n)e jn
ˆ j 1 j j 2 sin( N 2) j ( N 1) 2
j
Pper (e ) Px (e ) * WR (e ) , WR (e ) e
2N sin( 2)
2
1
PˆM (e j )
NU
x ( n) w
n
R ( n ) e jn
N 1 2
1 1
W (e
j 2
U w( n ) ) d
N n 0 2N
29
Example: x(n) 0.1sin(0.2n 1 ) 1sin(0.3n 2 ) v(n)
N=128 N=128
Rectangular Window Hamming Window 30
Properties of the M-periodogram
2
1
PˆM (e j )
NU
x (
n
n ) wR ( n ) e jn
N 1 2
1
U
N
w(n)
n 0
1
Bias: E{PˆM (e j )} j j 2
Px (e ) W (e )
2NU
L
i
x (
n 0
n ) e jn
; i 1 , 2 , ..., k
....
32
x1 (n) x2 (n) xk (n)
Properties of Bartlett’s method
k 1 L 1 2
1
ˆ j
PB (e )
N
x ( n
i 0 n 0
iL ) e jn
1
Bias: E{PˆB (e j )} Px (e j ) WB (e j )
2
2
Resolution: Res[ PˆB (e j )] 0.89k
N
ˆ j 1 2 j
Variance: Var{Pper (e )} Px (e )
k
33
Example:x(n) 1sin(0.25n 1 ) 3sin(0.45n 2 ) v(n)
....
36
Properties of Welch’s method
k 1 L 1 2
1
PˆW (e j )
KLU
x(n iD )e
i 0 n 0
jn
k 1
1 1 L 1
PˆW (e ) PˆM(i ) (e j )
j
U w(n)
2
,
L i 0 L n 0
1
Bias E{PˆB (e j )} j j 2
Px (e ) W (e )
2LU
Variance
ˆ j 9 L 2 j
Var{Pper (e )} Px (e ) with 50% overlap 37
16 N
Example: x(n) 1sin(0.2 1 ) 3sin(0.25 2 ) v(n)
•For any finite data record of length N, the variance of rˆx (k ) will be large
for values of k that are close to N. for example:
1
rˆx ( N 1) x( N 1) x(0) at lag k n 1
N
•In Bartlett & Welch, the variance is decreased by reducing the variance of
autocorrelation estimate by averaging.
42
Blackman-Tukey’s method cont.
M
PˆBT (e )
j
x
ˆ
r (
k M
k ) w( k ) e jk
43
Properties of B-T’s method
M
PˆBT (e j ) x
ˆ
r (
k M
k ) w( k ) e jk
ˆ j 1
Bias E{PBT (e )} Px (e j ) W (e j )
2
M
1
Variance Var{PˆBT (e )} P (e ) w2 (k )
j
x
2 j
N M
44
windowing: x(n) 3sin(0.2 1 ) 1sin(0.25 2 ) v(n)
45
N 512 , M 128 N 512 , M 128
Hanning Blackman
Performance comparisons
46
Summery
variability Resolution Figure of merit
2 2
Periodogram 1 0.89 0.89
N N
1 2 2
Bartlett 0.89k 0.89
k N N
91 2 2
Welch 1.28 0.72
8k L N
Blackman 2M 2 2
0.64 0.43
Tukey 3 N M N
47
***50% overlap and the Bartlett window***