Package: dsp
Estimate power spectrum or power density spectrum
The dsp.SpectrumEstimator
computes the power
spectrum or the power density spectrum of a signal, using the Welch
algorithm and the filter bank approach.
When you choose the Welch method, the object computes the averaged modified periodograms to compute the spectral estimate. When you choose the filter bank approach, an analysis filter bank splits the broadband input signal into multiple narrow subbands. The object computes the power in each narrow frequency band and the computed value is the spectral estimate over the respective frequency band. The filter bank approach produces a spectral estimate with a higher resolution, a more accurate noise floor, and more precise peaks than the Welch method, with low or no spectral leakage. These results are for signals with relatively small FFT lengths. They come at the expense of increased computation and slower tracking.
The spectrum can be expressed in Watts or in decibels. This object can also estimate the maxhold and minhold spectra of the signal. The object supports C and C++ code generation.
To estimate the power density spectrum:
Define and set up your spectrum estimator object. See Construction.
Call step
to estimate the power density
spectrum according to the properties of the object.
Note:
Starting in R2016b, instead of using the 
SE = dsp.SpectrumEstimator
returns
a System object, SE
, that computes the frequency
power spectrum or the power density spectrum of real or complex signals.
This System object uses the Welch's averaged modified periodogram
method and filter bank based spectral estimation method.
SE = dsp.SpectrumEstimator('
returns
a PropertyName
',PropertyValue
,...)Spectrum Estimator
System object, SE
,
with each specified property name set to the specified value. You
can specify additional namevalue pair arguments in any order as (Name1,Value1
, ..., NameN,ValueN
).

Sample rate of input Specify the sample rate of the input in, hertz, as a finite
numeric scalar. The default value is 

Spectrum type Specify the spectrum type as one of 

Number of spectral averages Specify the number of spectral averages as a positive, integer
scalar. The Spectrum Estimator computes the current power spectrum
or power density spectrum estimate by averaging the last 

Source of the FFT length value Specify the source of the FFT length value as one of 

FFT Length Specify the length of the FFT that the Spectrum Estimator uses
to compute spectral estimates as a positive, integer scalar. This
property applies when you set the 

Welch or filter bank Specify the spectral estimation method as one of


Number of filter taps per frequency band Specify the number of filter coefficients, or taps, for each
frequency band. This value corresponds to the number of filter coefficients
per polyphase branch. The total number of filter coefficients is given
by 

Window function Specify a window function for the spectral estimator as one
of 

Side lobe attenuation of window Specify the side lobe attenuation of the window as a real, positive
scalar, in decibels (dB). This property applies when you set the 

Frequency range of the spectrum estimate Specify the frequency range of the spectrum estimator as one
of If you set the If you set the If you set the The default value is 

Power units Specify the units used to measure power as one of 

Reference load Specify the load that the spectrum estimator uses as a reference
to compute power values as a real, positive scalar in ohms. The default
value is 

Output maxhold spectrum Set this property to 

Output minhold spectrum Set this property to 
clone  Create spectrum estimator object with same property values 
getFrequencyVector  Get the vector of frequencies at which the spectrum is estimated 
getRBW  Get the resolution bandwidth of the spectrum 
isLocked  Locked status for input attributes and nontunable properties 
reset  Reset the internal states of the spectrum estimator 
step  Estimate the power spectrum or powerdensity spectrum of a signal 
Let x
be the input frame. We first multiply x
by
the window, and scale it by the window power. We then take FFT of
the signal, calling it Y
, and take the square magnitude
using Z = Y*conj(Y)
. We average the last N Z
s
and scale the answer by the sample rate.
For further information refer to the Algorithms section in Spectrum Analyzer, which uses the same algorithm.
The spectrum estimator uses an analysis filter bank to estimate
the power spectrum. For more details on the implementation, see the Algorithm section in dsp.Channelizer
.
The filter bank based spectrum estimator splits the broadband input signal, x(n), into multiple narrow bands and computes the power in each band. Each value becomes the estimate of the power over that narrow frequency band. The power in all the narrow bands forms the spectral estimate vector.
[1] Hayes, Monson H. Statistical Digital Signal Processing and Modeling. Hoboken, NJ: John Wiley & Sons, 1996
[2] Kay, Steven M. Modern Spectral Estimation: Theory and Application. Englewood Cliffs, NJ: Prentice Hall, 1999
[3] Stoica, Petre and Randolph L. Moses. Spectral Analysis of Signals. Upper Saddle River, NJ: Prentice Hall, 2005
[4] Welch, P. D. "The use of fast Fourier transforms for the estimation of power spectra: A method based on time averaging over short modified periodograms," IEEE Transactions on Audio and Electroacoustics, Vol. 15, 1967, pp. 70–73.
[5] Harris, F.J. Multirate Signal Processing for Communication Systems. Prentice Hall. 2004, pp. 208–209.