File Exchange

## Statistical Spectrum and Frequency Estimation Examples

version 1.0.0.0 (597 KB) by
Examples from the M. Hayes' famous book "Statistical Digital Signal Processing and Modeling".

Updated 21 Dec 2017

Some important classical (non-parametric) and modern (parametric) statistical spectrum and frequency estimation algorithms are demonstrated, reproducing the examples from chapter 8 of M. Hayes book. Namely, the following Methods are exposed:
A) Non-parametric Methods.
i) The Periodogram.
ii) Barlett's Method: Periodogram Averaging.
iii) Welch's Method: Averaging Modified Periodograms.
iv) Blackman-Tukey Method: Periodogram Smoothing.
B) Parametric Methods.
i) The Autocorrelation Method.
ii) The Covariance Method.
iii) The Modified Covariance Method.
iv) The Burg Algorithm.

C) Frequency Estimation.
i) Pisarenko Harmonic Decomposition (PHD).
ii) Multiple Signal Classification (MUSIC).
iii) The Eigenvector Method.
iv) The Minimum Norm Algorithm.

### Cite As

Ilias Konsoulas (2021). Statistical Spectrum and Frequency Estimation Examples (https://www.mathworks.com/matlabcentral/fileexchange/57772-statistical-spectrum-and-frequency-estimation-examples), MATLAB Central File Exchange. Retrieved .

Alex Myagkov

@ Ilias Konsoulas

Thanks for answers, but I have a problem: this page unavailable (error 404). Is it possible to get the files from another link, maybe they are somewhere else?

Ilias Konsoulas

@ Pedro: You must download the required SSP toolbox (from Hayes contribution) first to make all scripts runnable.

Pedro Marçal

hey!
i'm reading your code, it's great and it's helping me a lot!
but there are parts missing that makes it impossible to run and test. the methods from 8.5.3 are not written on the scripts
thank you

function Px = musich(x,p,M)

%MUSIC Frequency estimation using the MUSIC algorithm.

%-----

%USAGE Px=music(x,p,M)

%

% The input sequence x is assumed to consist of p complex

% exponentials in white noise. The frequencies of the

% complex exponentials and the variance of the white noise

% are estimated using the MUSIC algorithm.

%

% x : input sequence

% p : number of complex exponentials to find

% M : number of noise eigenvectors to use

%

% The frequency estimates are found from the peaks of the

% pseudospectrum Px.

%

%

%---------------------------------------------------------------

% copyright 1996, by M.H. Hayes. For use with the book

% "Statistical Digital Signal Processing and Modeling"

% (John Wiley & Sons, 1996).

%---------------------------------------------------------------

x = x(:);
N=length(x);

if M<p+1 | length(x)<M, error('Size of R is inappropriate'), end

[X R ]= corrmtx(x,M-1,'modified');

[v,d]=eig(R);

[y,i]=sort(diag(d));

Px=0;

for j=1:M-p

Px=Px+abs(fft(v(:,i(j)),1024));

end

Px=-20*log10(Px);

end

Salim Rukhsar

Salim Rukhsar

when i run Example 8.6.5. A, Matlab shows phd is not defined. how should i define this. Thanks in advance

Ilias Konsoulas

All the examples and demos run perfectly on my machine, Windows 7, Home Premium and MatLab R2015b.

robot

The link posted by Ilias Konsoulas no longer works. You can find the functions on this site here:

https://www.mathworks.com/matlabcentral/fileexchange/2183-statistical-digital-signal-processing-and-modeling?focused=5042738&tab=function

They do not work in modern matlab. There are some typos (N's need to be changed to M's) and some semicolons need to be removed form the end, for, and if functions. I will post a link later with the updated code when I get them all cleaned.

Nam Hoang Le

and a lot of functions I can not find in your examples. please show? Thank u

Ilias Konsoulas

@ Michael: As stated in the

Michael Nygaard

the music function used - where do I find this?

##### MATLAB Release Compatibility
Created with R2011b
Compatible with any release
##### Platform Compatibility
Windows macOS Linux

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!