Engee documentation

envspectrum

The envelope spectrum for equipment diagnostics.

Library

EngeeDSP

Syntax

Function call

  • es,f,env,t = envspectrum(x,fs) — returns the spectrum of the envelope of the signal x, sampled with frequency fs, as well as the frequency vector f, on which the spectrum is calculated es, the envelope of the signal env and the moments of time t in which the argument is evaluated env.

    If x is a matrix, then the function calculates the envelope spectrum independently for each column and returns the result in the corresponding column of the matrix es.

  • es,f,env,t = envspectrum(___,Name=Value) — sets additional parameters using arguments like «name-value». The parameters include the algorithm Method, used to calculate the envelope of the signal, and the frequency range Band, in which the spectrum is estimated.

  • 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.

Типы данных

Float32, Float64

Support for complex numbers

Yes

# fs — sampling rate
scalar

Details

The sampling frequency, set as a positive real scalar.

Типы данных

Float32, Float64

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.

Типы данных

Float32, Float64

Support for complex numbers

Yes

# FilterOrder — FIR filter order

+ 50 (by default) | scalar

Details

The FIR filter order is set as a positive integer.

  • If for an argument Method the value is set "hilbert", then this argument determines the order of the bandpass FIR filter.

  • If for an argument Method the value is set "demod", then this argument determines the order of the low-pass FIR filter.

Типы данных

Int32, Int64

# 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 Method the value is set "hilbert", then the function performs the following actions:

    1. Filters the signal with a bandpass filter. The FIR filter has the order specified by the argument FilterOrder, and the cutoff frequencies are ba[1] and ba[2], where ba — the frequency range specified by the argument Band.

    2. Calculates the analytical signal using the function hilbert.

    3. Calculates the envelope of the signal as the absolute value of the analytical signal.

  • If for an argument Method the value is set "demod", then the function performs the following actions:

    1. Performs complex signal demodulation. The signal is multiplied by , where .

    2. 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 .

    3. 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.

Literature

  1. Randall, Robert Bond. Vibration-Based Condition Monitoring. Chichester, UK: John Wiley & Sons, 2011.