Signal Processing Toolbox
  Go to function:
    Search    Help Desk 
pmcov    Examples   See Also

Power spectrum estimate using the modified covariance method.

Syntax

Description

pmcov estimates the power spectral density (PSD) of the signal vector x[n] using the modified covariance method. This method fits an autoregressive (AR) model to the signal by minimizing the forward and backward prediction errors in the least-squares sense. The spectral estimate returned by pmcov is the magnitude squared frequency response of this AR model. The correct choice of the model order p is important.

Pxx = pmcov(x,p,nfft) returns Pxx, the power spectrum estimate. x is the input signal, p is the model order for the all-pole filter, and nfft is the FFT length (defaults to 256 if not specified). Pxx has length (nfft/2+1) for nfft even, (nfft+1)/2 for nfft odd, and nfft if x is complex.

[Pxx,freq] = pmcov(x,p,nfft) returns Pxx, the power spectrum estimate, and freq, a vector of frequencies at which the PSD was estimated. If the input signal is real-valued, the range of freq is [0,]. If the input signal is complex, the range of freq is [0,2].

[Pxx,freq] = pmcov(x,p,nfft,Fs) uses the signal's sampling frequency, Fs, to scale both the PSD vector (Pxx) and the frequency vector (freq). Pxx is scaled by 1/Fs. If the input signal is real-valued, the range of freq is [0,Fs/2]. If the input signal is complex, the range of freq is [0,Fs]. Fs defaults to 1 if left empty, [].

[Pxx,freq] = pmcov(x,p,nfft,Fs,'range') specifies the range of frequency values to include in freq. range can be:

pmcov(...) plots the power spectral density in the first available figure window. The frequency range on the plot is the same as the range of output freq for a given set of parameters.

pmcov(...,'squared') plots the PSD directly, rather than converting the values to dB.

Example

Because the method estimates the spectrum by fitting an AR model to the signal, first create the AR system (all-pole filter) that generates the input. Check the magnitude response of the process with freqz.

Now generate the input signal x by filtering white noise through the AR system. Estimate the PSD of x based on a fourth-order AR model (since we know that the original AR system, a, has order 4).

Diagnostics

The first input argument must be a full vector; otherwise pmcov generates the following error message:

If you specify an empty matrix for the second argument, pmcov generates the following error message:

See Also

armcov
Compute an estimate of AR model parameters using the modified covariance method.
lpc
Linear prediction coefficients.
pburg
Power spectrum estimate using the Burg method.
pcov
Power spectrum estimate using the covariance method.
pmtm
Power spectrum estimate using the multitaper method (MTM).
pmusic
Power spectrum estimate using MUSIC eigenvector method.
prony
Prony's method for time domain IIR filter design.
pwelch
Estimate the power spectral density (PSD) of a signal using Welch's method.
pyulear
Power spectrum estimate using Yule-Walker AR method.

References

[1] Marple, S.L. Digital Spectral Analysis. Englewood Cliffs, NJ: Prentice Hall, 1987. Chapter 7.



[ Previous | Help Desk | Next ]