spectralEntropy
Spectral entropy of signals and spectrograms.
| Library |
|
Syntax
Function call
-
se = spectralEntropy(___,Name,Value)— sets parameters using one or more name-value arguments.
-
spectralEntropy(___;out=:plot)— plots the spectral entropy. You can specify an input combination of any of the above syntax options.-
If the input signal is in the time domain, the spectral entropy graph is plotted as a function of time.
-
If the input signal is in the frequency domain, the spectral entropy graph is plotted depending on the frame number.
-
Arguments
Input arguments
# x is an input signal in the time or frequency domain
+
column vector | the matrix
Details
An input signal in the time or frequency domain, specified as a vector or matrix.
x it must be substantial.
Interpretation x the function depends on the form f.
For more information about signal area specifications and valid syntaxes, see Spectral entropy specifications for the signal domain.
| Типы данных |
|
#
f is
the sampling frequency (Hz) or frequency vector (Hz)
1 (by default) | scalar | vector
Details
Sampling rate (Hz)
or a vector of frequencies (Hz), specified as a numeric scalar or vector, respectively. Interpretation x the function depends on the form f:
-
If
f— numeric scalar, functionspectralEntropyinterpretsxas a signal in the time domain, andf— as a sampling rate in Hz. In this casexmust be a real vector or a matrix. Ifx— the matrix,spectralEntropyinterprets columns as separate channels. -
If
f— numeric vector, functionspectralEntropyinterpretsxas a signal in the frequency domain, andf— as a frequency vector in Hz corresponding to the linesx. In this casexmust be a real array of size , where — the number of spectral values at the specified frequenciesf, — the number of individual spectra, and — the number of channels.Number of rows in
xmust be equal to the number of elementsf.
For more information about signal area specifications and valid syntaxes, see Spectral entropy specifications for the signal domain.
| Типы данных |
|
Name-value input arguments
Specify optional argument pairs as Name,Value, where Name — the name of the argument, and Value — the appropriate value. Name-value arguments should be placed after other arguments, but the order of the pairs does not matter.
Use commas to separate the name and value, and Name put it in quotation marks.
If you specify other arguments of the "name-value" type, the function |
temporal area
# Window — the window used in the time domain
+
rectwin(round(f*0.03)) (by default) | vector
Details
The window used in the time domain, defined as a real vector. The number of vector elements must be in the range [1,size(x,1)]. The number of vector elements should also be greater. OverlapLength. If the argument is Window not specified, function spectralEntropy uses the length of the window, which splits x into eight overlapping segments.
| Типы данных |
|
# OverlapLength — the number of samples overlapping between adjacent windows
+
round(f*0.02) (by default) | a non-negative scalar
Details
The number of samples overlapping between adjacent windows, set as an integer in the range [0,size(Window,1)). If the argument is OverlapLength not specified, function spectralEntropy uses a value that provides 50% overlap between segments.
| Типы данных |
|
# FFTLength — the number of elements in the DFT
+
numel(Window) (by default) | a positive integer scalar
Details
The number of elements used to calculate the DFT of window input samples, set as a positive integer scalar. If no argument is given, FFTLength by default, it is equal to the number of elements in Window.
| Типы данных |
|
# SpectrumType — spectrum type
+
"power" (by default) | "magnitude"
Details
The type of spectrum specified as "power" or "magnitude":
-
"power"— spectral entropy is calculated for a one-sided power spectrum; -
"magnitude"— spectral entropy is calculated for a one-sided amplitude spectrum.
| Типы данных |
|
temporal and frequency domains
# out — type of output data
+
:data (by default) | :plot
Details
Type of output data:
-
:data— the function returns data; -
:plot— the function returns a graph.
Additional Info
Spectral entropy
Details
The spectral entropy (SE) of a signal is a measure of the distribution of its spectral power. This concept is based on Shannon entropy, or information entropy, in information theory. SE considers the normalized distribution of signal power in the frequency domain as a probability distribution and calculates its Shannon entropy. In this context, the Shannon entropy is the spectral entropy of a signal. This property can be useful for extracting features during fault detection and diagnosis [2], [1]. SE is also widely used as a feature in speech recognition [3] and biomedical signal processing [4].
The equations for spectral entropy follow from the equations for the power spectrum and the probability distribution of the signal. For the signal The power spectrum is , where — discrete Fourier transform of . Probability distribution in this case, it is equal to
Spectral entropy calculated as follows
Rationing:
where — the total number of frequency points. The denominator It represents the maximum spectral entropy of white noise, evenly distributed in the frequency domain.
If the time-frequency power spectrogram is known , then the probability distribution takes the form
The spectral entropy is still equal to
To calculate the instantaneous spectral entropy from a given time-frequency power spectrogram , probability distribution at a time equally
Then the spectral entropy at a time is equal to
Spectral entropy specifications for the signal domain
Details
You can set the signals in the time or frequency domain, and the function spectralEntropy returns the spectral entropy of the specified signal. Depending on the signal area, you can specify the following input arguments and syntax.
| Area | x |
f |
Acceptable syntaxes | Valid name-value arguments |
|---|---|---|---|---|
Temporary |
Column vector The matrix |
Numeric scalar (sampling rate) |
|
|
Frequency |
The matrix An array of size |
Vector from elements (frequency vector) |
|
Algorithms
The function calculates the spectral entropy as described in [5]:
where
-
— spectral value in bin ;
-
and — band boundaries in bins, which are used to calculate spectral entropy.
Literature
-
Pan, Y. N., J. Chen, and X. L. Li. «Spectral Entropy: A Complementary Index for Rolling Element Bearing Performance Degradation Assessment.» Proceedings of the Institution of Mechanical Engineers, Part C: Journal of Mechanical Engineering Science. Vol. 223, Issue 5, 2009, pp. 1223–1231.
-
Sharma, V., and A. Parey. «A Review of Gear Fault Diagnosis Using Various Condition Indicators.» Procedia Engineering. Vol. 144, 2016, pp. 253–263.
-
Shen, J., J. Hung, and L. Lee. «Robust Entropy-Based Endpoint Detection for Speech Recognition in Noisy Environments.» ICSLP. Vol. 98, November 1998.
-
Vakkuri, A., A. Yli‐Hankala, P. Talja, S. Mustola, H. Tolvanen‐Laakso, T. Sampson, and H. Viertiö‐Oja. «Time‐Frequency Balanced Spectral Entropy as a Measure of Anesthetic Drug Effect in Central Nervous System during Sevoflurane, Propofol, and Thiopental Anesthesia.» Acta Anaesthesiologica Scandinavica. Vol. 48, Number 2, 2004, pp. 145–153.
-
Misra, H., S. Ikbal, H. Bourlard, and H. Hermansky. «Spectral Entropy Based Feature for Robust ASR.» 2004 IEEE International Conference on Acoustics, Speech, and Signal Processing.