MATLAB Answers

How to rectify a signal and determine the envelope spectra for the FFT? - Envelope analysis

18 views (last 30 days)
Hishan Faizer
Hishan Faizer on 25 Nov 2020
Commented: Hishan Faizer on 27 Nov 2020
Hello folks, I am trying to determine the harmful frequencies of my signal. Therefore, I need to do a so called " envelope analysis" for my signal.
I have measured two signal from my sensor. My sensor is located at the tire. Both signals have a shape like sinus. First, I need to rectify the signal. This is done by the following:
XY = sqrt(X.^2+Y.^2);
XY = XY - mean(XY);
Now, I need to determine the envelope curve of my signal. This is done by the following code:
[up1,~] = envelope(XY,30,'analytic');
After that, I need to compute the FFT in order to calculate the harmful frequencies. This is done by the following:
FFTq(up1);
function [f,P] = FFTq(data)
Fs = 1000; % Sampling frequency
T = 1/Fs; % Sampling period
L = length(data); % Length of signal in ms
t = (0:L-1)*T; % Time vector
f = Fs*(0:(L/2))/L; % frequency
FFT = fft(data);
P2 = abs(FFT/L);
P = P2(1:L/2+1);
end
My Matlab program is compiling without any errors. However, the result is not how I expected it. The literature says, that computing the envelope spectra via FFT will provide a better result than computing the FFT. This not the case here. Therefor, I was thinking that my implementation could have some mistakes. Can someone double check my code?
Kind regards

  9 Comments

Show 6 older comments
Hishan Faizer
Hishan Faizer on 26 Nov 2020
As I took a closer look to the first paper ( MFPT-Bearing-Envelope-Analysis.pdf ) the author is using some Matlab functions like "envhetsv" which is not defined in the paper. I also googled this function but couldnt find a explanation.
Mathieu NOE
Mathieu NOE on 27 Nov 2020
you're right this function does not officially exist , I guess it's a home made function designed by the author; too bad he does not publish this code
BTW, are you aware of this function : envspectrum
es = envspectrum(x,fs) returns the envelope spectrum of a signal x sampled at a rate fs. If x is a matrix, then the function computes the envelope spectrum independently for each column and returns the result in the corresponding column of es.
this should do all the hard work for you !
Hishan Faizer
Hishan Faizer on 27 Nov 2020
Thank you for suggesting the function envspectrum. I already tried envspectrum and it does not deliver good results as the FFT or the Welch Method (Example 2 MFPT-Bearing-Envelope-Analysis.pdf ) does. I am supprised by this, because computing the harmful frequnecies with the envelope signal should deliver better results than with the FFT according to most of the ressources/papers I found.
Results from the function envspectrum:
Results from the function psde:
As you can see, the PSDE function is showing me three peaks (90 Hz, 180 Hz and 270 Hz) whereas the envelope function does only show one peak at 90 Hz.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by