bandpower
Band power
Syntax
Description
returns the average power computed by integrating the power spectral density
(PSD) estimate p
= bandpower(pxx
,f
,"psd")pxx
. The integral is approximated by the
rectangle method. The input f
is a vector of frequencies
corresponding to the PSD estimates in pxx
. The
"psd"
option indicates that the input is a PSD estimate
and not time series data.
returns the average power contained in the frequency interval
p
= bandpower(pxx
,f
,freqrange
,"psd")freqrange
. If the frequencies in
freqrange
do not match values in
f
, the closest values are used. The average power is
computed by integrating the power spectral density (PSD) estimate
pxx
. The integral is approximated by the rectangle
method. The "psd"
option indicates the input is a PSD
estimate and not time series data.
Examples
Input Arguments
Output Arguments
Algorithms
To determine the band power, bandpower
computes a periodogram
power spectrum estimate using a rectangular window.
You can obtain the same value of band power, bPow
, from a
signal x
at a sample rate fs
in these
three ways.
Directly from the signal |
bPow = bandpower(x,fs,[0 fs/2]) |
From the periodogram of the signal |
[P,F] = periodogram(x,[],[],fs); bPow = bandpower(P,F,[0 fs/2],"psd") |
From the power spectral estimate (Welch's PSD) of the signal |
[P,F] = pwelch(x,rectwin(length(x)),[],[],fs); bPow = bandpower(P,F,[0 fs/2],"psd") |
Note
Because bandpower
uses an intermediary representation
to transform the input signal from the time domain to frequency domain, the
returned band power might vary, depending on the signal transformation method,
number of DFT points, and window size.
References
[1] Hayes, Monson H. Statistical Digital Signal Processing and Modeling. New York: John Wiley & Sons, 1996.
[2] Stoica, Petre, and Randolph Moses. Spectral Analysis of Signals. Upper Saddle River, NJ: Prentice Hall, 2005.