pburg() - Signal Processing
pxx = pburg(x,order) returns
the power spectral density (PSD) estimate, pxx,
of a discrete-time signal, x, found using Burg's
method. When x is a vector, it is treated as
a single channel. When x is a matrix, the PSD
is computed independently for each column and stored in the corresponding
column of pxx. pxx is the
distribution of power per unit frequency. The frequency is expressed
in units of rad/sample. order is the order of
the autoregressive (AR) model used to produce the PSD estimate.
examplepxx = pburg(x,order,nfft) uses nfft points
in the discrete Fourier transform (DFT). For real x, pxx has
length (nfft/2+1) if nfft is
even, and (nfft+1)/2 if nfft is
odd. For complex–valued x, pxx always
has length nfft. pburg uses
a default DFT length of 256.
[pxx,w] = pburg(___) returns
the vector of normalized angular frequencies, w,
at which the PSD is estimated. w has units of
rad/sample. For real-valued signals, w spans
the interval [0,π] when nfft is
even and [0,π) when nfft is
odd. For complex-valued signals, w always spans
the interval [0,2π).
example[pxx,f] = pburg(___,fs) returns
a frequency vector, f, in cycles per unit time.
The sampling frequency, fs, is the number of
samples per unit time. If the unit of time is seconds, then f is
in cycles/second (Hz). For real-valued signals, f spans
the interval [0,fs/2] when nfft is
even and [0,fs/2) when nfft is
odd. For complex-valued signals, f spans the
[pxx,w] = pburg(x,order,w) returns
the two-sided AR PSD estimates at the normalized frequencies specified
in the vector, w. The vector, w,
must contain at least two elements.
[pxx,f] = pburg(x,order,f,fs) returns
the two-sided AR PSD estimates at the frequencies specified in the
vector, f. The vector, f,
must contain at least two elements. The frequencies in f are
in cycles per unit time. The sampling frequency, fs,
is the number of samples per unit time. If the unit of time is seconds,
then f is in cycles/second (Hz).
[___] = pburg(x,order,___,freqrange) returns
the AR PSD estimate over the frequency range specified by freqrange.
Valid options for freqrange are: 'onesided', 'twosided',
[___,pxxc] = pburg(___,'ConfidenceLevel',probability) returns
the probability × 100%
confidence intervals for the PSD estimate in pxxc.
examplepburg(___) with no output arguments
plots the AR PSD estimate in dB per unit frequency in the current
pxx = pburg(x,order)pxx = pburg(x,order,nfft) example[pxx,w] = pburg(___)[pxx,f] = pburg(___,fs) example[pxx,w] = pburg(x,order,w)[pxx,f] = pburg(x,order,f,fs)[___] = pburg(x,order,___,freqrange)[___,pxxc] = pburg(___,'ConfidenceLevel',probability)pburg(___) example
Burg PSD Estimate of an AR(4) ProcessOpen This Example
Create a realization of an AR(4) wide-sense stationary random process. Estimate the PSD using Burg's method. Compare the PSD estimate based on a single realization to the true PSD of the random process.
Create an AR(4) system function. Obtain the frequency response and plot the PSD of the system.A = [1 -2.7607 3.8106 -2.6535 0.9238];
[H,F] = freqz(1,A,,1);
Create a realization of the AR(4) random process. Set the random number generator to the default settings for reproducible results. The realization is 1000 samples in length. Assume a sampling frequency of 1 Hz. Use pburg to estimate the PSD for a 4th-order process. Compare the PSD estimate with the true PSD.rng default
x = randn(1000,1);
y = filter(1,A,x);
[Pxx,F] = pburg(y,4,1024,1);
legend('True Power Spectral Density','pburg PSD Estimate')
Reflection Coefficients for Model Order DeterminationOpen This Example
Create a realization of an AR(4) process. Use arburg to determine the reflection coefficients. Use the reflection coefficients to determine an appropriate AR model order for the process. Obtain an estimate of the process PSD.
Create a realization of an AR(4) process 1000 samples in length. Use arburg with the order set to 12 to return the reflection coefficients. Plot the reflection coefficients to determine an appropriate model order.A = [1 -2.7607 3.8106 -2.6535 0.9238];
x = filter(1,A,randn(1000,1));
[a,e,k] = arburg(x,12);
The reflection coefficients decay to zero after order 4. This indicates an AR(4) model is most appropriate.Obtain a PSD estimate of the random process using Burg's method. Use 1000 points in the DFT. Plot the PSD estimate.pburg(x,4,length(x))
Burg PSD Estimate of a Multichannel SignalOpen This Example
Create a multichannel signal consisting of three sinusoids in additive
white Gaussian noise. The sinusoids' frequencies are 100 Hz, 200 Hz, and 300 Hz. The sampling frequency is 1 kHz, and the signal has a duration of 1 s.
Fs = 1000;
t = 0:1/Fs:1-1/Fs;
f = [100;200;300];
x = cos(2*pi*f*t)'+randn(length(t),3);
Estimate the PSD of the signal using Burg's method with a 12th-order autoregressive model. Use the default DFT length. Plot the estimate.morder = 12;
Output / Return Value
Alternatives / See Also