obw
The width of the occupied frequency band.
| Library |
|
Syntax
Function call
-
bw = obw(___,freqLims,p)— sets the frequency range in which the occupied frequency band is calculated. This syntax can include any combination of input arguments from the previous syntaxes, provided that the second input argument is eitherFs, orf. If the second input argument is passed as empty,obwuses a normalized frequency. This syntax also definespas a percentage of the total signal power contained in the occupied bandwidth.
-
obw(___, out=:plot)— plots the SPM or power spectrum in the current graph window and signs the frequency band.
Arguments
Input arguments
# x — input signal
+
vector | the matrix
Details
An input signal specified as a vector or matrix. If x — vector, it is considered as a single channel. If x — the matrix, obw calculates the occupied frequency band independently for each column. x must be a finite number.
| Типы данных |
|
#
Fs —
sampling
rate
positive real scalar
Details
The sampling frequency, set as a positive real scalar. The sampling rate is the number of samples per unit of time. If time is measured in seconds, then the sampling frequency is indicated in hertz.
| Типы данных |
|
# pxx — spectral power density
+
vector | the matrix
Details
The spectral power density (SPM), defined as a vector or matrix with real non-negative elements. If pxx — one-sided evaluation, then it must correspond to the real signal. If pxx — the matrix, obw calculates the occupied frequency band of each column pxx regardless.
The power spectral density should be expressed in linear units, not in decibels. Use the function db2pow to convert decibel values to power values.
| Типы данных |
|
# sxx — power spectrum estimation
+
vector | the matrix
Details
An estimate of the power spectrum, defined as a vector or matrix with real non-negative elements. If sxx — the matrix, obw calculates the occupied frequency band of each column sxx regardless.
The power spectrum should be expressed in linear units, not in decibels. Use the function db2pow to convert decibel values to power values.
| Типы данных |
|
# rbw — frequency resolution
+
positive scalar
Details
Frequency resolution, set as a positive scalar. The frequency resolution is the product of two quantities: the frequency resolution of the discrete Fourier transform and the equivalent noise bandwidth of the window used to calculate the SPM.
| Типы данных |
|
# freqLims — frequency limits
+
two-element vector
Details
The limiting frequencies specified as a two-element vector of real values. If the argument is freqLims if not specified, then obw uses the entire frequency band of the input signal.
| Типы данных |
|
# p — percentage of power
+
99 (by default) | positive scalar
Details
The percentage of power given as a positive scalar of 0 before 100. Function obw calculates the frequency difference between the points where the integrated power intersects and percent of the total power in the spectrum.
| Типы данных |
|
Output arguments
# bw is the width of the occupied frequency band
+
scalar | vector
Details
The width of the occupied frequency band, returned as a scalar or vector.
-
If the sampling rate is specified, then
bwit has the same units of measurement asFs. -
If the sampling frequency is not specified, then
bwit has units of measurement of rad/count.
# flo,fhi — frequency band boundaries
+
scalars | vectors
Details
Frequency band boundaries returned as scalars or vectors.
# power — power stored in the frequency band
+
scalar | vector
Details
The power stored in the frequency band, returned as a scalar or vector.
Algorithms
To determine the occupied frequency band, the function obw calculates an estimate of the spectral power density of a periodogram using a rectangular window, and integrates it using the midpoint rule. The occupied frequency band is the frequency difference between the points where the integrated power intersects 0.5% and 99.5% of the total power in the spectrum.
The same value of the occupied frequency band bw can be obtained from the signal x with sampling rate Fs in three ways.
Straight from the signal |
|
From the periodogram of the signal |
bw = obw(P,F) |
From the estimation of the spectral power (SPM Welch) of the signal |
bw = obw(P,F) |
Because the function obw It uses an intermediate representation to convert the input signal from the time domain to the frequency domain. The returned occupied frequency band may vary depending on the signal conversion method, the number of DFT points, and the window size.
|