envspectrum
The envelope spectrum for equipment diagnostics.
| Library |
|
Syntax
Function call
-
envspectrum(___,out=:plot)— plots the envelope of the signal and the spectrum of the envelope.
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 one channel. If x — the matrix, then the function envspectrum calculates the envelope spectrum independently for each column and returns the result in the corresponding column of the matrix es.
| Типы данных |
|
| Support for complex numbers |
Yes |
#
fs —
sampling
rate
scalar
Details
The sampling frequency, set as a positive real scalar.
| Типы данных |
|
Input arguments «name-value»
Specify optional argument pairs as Name=Value, where Name — the name of the argument, and Value — the appropriate value. Type arguments «name-value» they should be placed after the other arguments, but the order of the pairs does not matter. You can specify multiple pairs «name-value».
# Method is an algorithm for calculating the envelope of a signal
+
"demod" (by default) | "hilbert"
Details
The algorithm for calculating the envelope of the signal, defined as "demod" or "hilbert". For more information, see Algorithms.
# Band — frequency range for calculating the envelope spectrum
+
[fs/4 fs*3/8] (by default) | vector
Details
The frequency range for calculating the envelope spectrum, defined as a two-element vector with strictly increasing values from zero to the Nyquist frequency.
| Типы данных |
|
| Support for complex numbers |
Yes |
# FilterOrder — FIR filter order
+
50 (by default) | scalar
Details
The FIR filter order is set as a positive integer.
| Типы данных |
|
# out — type of output data
+
:data (default) | :plot
Details
Type of output data:
-
:data— the function returns data; -
:plot— the function returns a graph.
Output arguments
# es — envelope spectrum
+
vector | the matrix
Details
The envelope spectrum returned as a vector or matrix.
# f — frequencies
+
vector
Details
The frequencies at which the envelope spectrum is calculated, returned as a vector.
# env — the envelope of the signal
+
vector | the matrix
Details
The envelope of the signal returned as a vector or matrix.
# t — time values
+
vector
Details
The time values at which the envelope of the signal is calculated, returned as a vector.
Algorithms
Function envspectrum first removes the constant offset from the input signal x, and then calculates the envelope of the signal.
-
If for an argument
Methodthe value is set"hilbert", then the function performs the following actions:-
Filters the signal with a bandpass filter. The FIR filter has the order specified by the argument
FilterOrder, and the cutoff frequencies areba[1]andba[2], whereba— the frequency range specified by the argumentBand. -
Calculates the analytical signal using the function
hilbert. -
Calculates the envelope of the signal as the absolute value of the analytical signal.
-
-
If for an argument
Methodthe value is set"demod", then the function performs the following actions:-
Performs complex signal demodulation. The signal is multiplied by , where .
-
Filters the demodulated signal with a low-pass filter to calculate the analytical signal. The FIR filter has the order specified by the argument
FilterOrder, and the cutoff frequency . -
Calculates the envelope of the signal as twice the absolute value of the analytical signal.
-
After calculating the envelope of the signal, the function removes the constant offset from the envelope and calculates the envelope spectrum using the FFT.