Parametric Power Spectral Density Estimation

advertisement
Parametric Power Spectral Estimation
Richard Hayes
Parametric Power Spectral Density Estimation.
Introduction
Non parametric methods are based on the use of the fourier transform of the data
sequence either directly through the use of the periodogram or indirectly by obtaining
the fourier transform of the autocorrelation function of the data.
Parametric methods are based on a model of the data and thus require a priori
knowledge of the data so that an appropriate model of the data may be specified. The
model with its unknown parameters is proposed and a method of parameter estimation
is used to estimate the values of the parameters. The frequency response of the model
is then the estimate of the PSD.
Non Parametric Spectral Estimation analyses the data without making any
assumptions about the data thus it is more general and robust.
Parametric methods can give a more accurate spectral estimate for shorter blocks of
data. They also do not suffer from the leakage effects of windows and therefore
provide greater frequency resolution for the same data lengths
Theoretical Background
A discrete-time time invariant systems can be represented in the following form
q
H ( z) 
 b( k ) z
B( z )

A( z )
k
k 0
1
1   b( k ) z  k
k 1
If a white noise, v(n), is input to the system, the output signal, x(n), is a stochastic
process and its power spectrum is given by
Pxx( )  
2
v
B ( )
2
A( )
2
or
Pxx( z )   2 v
B ( z ) B ( z 1 )
A( z ) A( z 1 )
This is an autoregressive moving average process of order (p,q).
It can be shown that the following correlation relationship exists for this arma
process:
p
 2c(k )
0k q
rx (k )   a(m)rx (k  m)   v
k q
m 1
0
For an autoregressive process this becomes
Page 1 of 8
Parametric Power Spectral Estimation
H ( z) 
B( z )

A( z )
Richard Hayes
b(0)
1
1   b( k ) z  k
k 1
Pxx( )   2v
b(0)2
A( )
2
and for the correlations
p
0
rx (k )   a(m)rx (k  m)   2
m 1
 v
0k q
k 0
This equation can be written out in matrix form
rx (1) .... rx ( p)   1 
 rx (0)
1 
 r (1)



 
rx (0)
.... rx ( p  1)  a(1)
x

   v 2b(0) 2 0
 :
 : 
:
:
:



 
rx (0)   a( p) 
0
 rx ( p) rx ( p  1) ....
This a set of linear equations which can be solved for the a parameters if the rx
correlations are known. These are called the Yule Walker Equations for an AR
process.
Practical Demonstration of Yule Walker Method
Power Spectral Density estimation by determination of the parameters of an autoregressive model based on the Yule Walker Equation solved by the Levinson Durbin
Recursion.
The signal to be analysed is assumed to be gererated by a white noise stimulus driving
a linear process with parameters ak where
x(n)  b0e(n)  a1e(n  1)  a2e(n  2)  a3e(n  3) ....  al e(n  l )
The MATLAB function aryule.m is useed toestimate the parameters ak. The help text
for aryule gives
ARYULE AR parameter estimation via Yule-Walker method.
A = ARYULE(X,ORDER) returns the polynomial A corresponding to the
AR parametric signal model estimate of vector X using the Yule-Walker
(autocorrelation) method. ORDER is the model order of the AR system.
This method solves the Yule-Walker equations by means of the LevinsonDurbin recursion.
Generating the noisy data.
The data is generated using the randn function. This data is then passed through the
filter
Page 2 of 8
Parametric Power Spectral Estimation
H ( z) 
Richard Hayes
1
( z  .7)( z  .68  .68 j )( z  .68  .68 j )( z  .5  .5 j )( z  .5  .5 j )
p=[.7 .68+.68j .68-.68j .1+.5j .1-.5j]
z=1;
k=1;
[B,Ax]=zp2tf(z,p,k); % convert from pole zero form to transfer function
form
e=randn(size(t));
x=filter(B,Ax,e);
plot(t,x);xlabel('time; in seconds');ylabel('Amplitude');title('signal whose
PSD is to be estimated')
For comparison it is noted that the ak parameters corresponding to the pole/zero mode
used are
Ax=[1.0000 -2.2600 2.5488 -1.5583 0.6174 -0.1683];
signal whose PSD is to be estimated
15
10
Amplitude
5
0
-5
-10
-15
-20
0
200
400
600
time; in seconds
800
1000
1200
Figure 1.
The poles are plotted in the z-plane in relation to the unit circle. The two poles at
.68+.68j and .68-.68j are close to the unit circle. These are responsible for the
resonance at approximately 0.78 rad/s or .78/(2π) = 0.12 Hz. See figure 3. One of the
main purposes of the experiment is to see if the model determined from the data will
have poles placed with sufficient accuracy so that the peak in the spectrum is well
estimated.
Page 3 of 8
Parametric Power Spectral Estimation
Richard Hayes
Pole zero plot of a linear process
1
0.8
0.6
Imaginary Part
0.4
0.2
0
-0.2
-0.4
-0.6
MATLAB
COMMAND
Zplane(1,Ax)
-0.8
-1
-1
-0.5
0
Real Part
0.5
1
Fig 2. Pole-Zero plot of linear process
The true spectrum of the data is plotted by plotting the frequency response of the
modle from which the data was obtained.
[H,w]=freqz(1,Ax,512);
plot(w*.5/pi,20*log10(abs(H)),'k')
For comparison later with the model generated using ARYULE it is noted here that the
denominator of the process used in generating the ‘unknown’ data is given by :
Ax= [1.0000 -2.2600 2.5488 -1.5583 0.6174 -0.1683]
Page 4 of 8
Parametric Power Spectral Estimation
Richard Hayes
Fig 3. True PSD of signal
Parameter Estimation – generating the model
The model is generated using ARYULE and the order of the model
denominator polynomial A must be provided.
% Estimate the denominator coeffs A
A = ARYULE(x,Order)
[HH,w]=freqz(1,A,512);
plot(20*log10(abs(HH)),'r')
A plot of the estimated PSD can be superimposed on the true PSD for
comparison.
Figure 4 overpage shows the results of using ARYULE with Order=4,
generating the denominator of the model as:
A=[1.0000 -1.8820 1.6202 -0.4621 -0.0225]
Page 5 of 8
Parametric Power Spectral Estimation
Richard Hayes
Fig 4. True PSD of signal and parametrically estimated PSD (N=4)
Figure 5 below shows the results of using ARYULE with Order=5,
generating the model
A = [ 1.0000 -2.2879 2.5701 -1.5510 0.5822 -0.1529].
Fig 5. True PSD of signal and parametrically estimated PSD (N=5)
Page 6 of 8
Parametric Power Spectral Estimation
Richard Hayes
The relative positions of the true and estimated poles can also be
examined.
Fig 6. Poles of the Process that generates the data x.
Fig 7. Poles of the Model of the process that generates the data x.
Page 7 of 8
Parametric Power Spectral Estimation
Richard Hayes
For comparison the process and model (estimate of model) can be
compared:
Process: Ax = [0.68 + 0.68j
0.5j]
0.68 - 0.68j
0.7
0.1 + 0.5j
Model : A = [0.6749 + 0.677j
0.1094 - 0.4697j].
0.6749 - 0.677j
0.7194 0.1094 + 0.4697j
Further investigations
Now that the procedure is clear investigate how things work with
processes that are not true AR in nature. For example try a narrow
passband digital filter.
Page 8 of 8
0.1 -
Download