y=envelope(Signal,Fs) computes the Envelope of the input Signal with a Sampling Frequency 'Fs' and gives the envelope signal by Hilbert transform method as the output y.
The function computes the envelope of the signal by two different methods.
First Method: By Using Low Pass Filter. The Signal is Squared, passed
through LPF and then taken square root.
Second Method: Using Hilbert Transform. Hilbert Transform is taken using the inbuilt function in Matlab
The Function Displays the FFT of the original signal and also the FFT of
the envelope signal by both the methods
The function basically is for computing Envelope Signal for Condition Monitoring of rotating equipments by vibration based bearing fault diagnosis.
The File 's4.mat' is the vibration signal recorded from a OR faulty
bearing with a sampling frequency of 12000Hz. The Fault frequency is 161Hz and is brought out in envelope signal which was hidden in the original FFT.
Don't forget to rate or comment on the matlab central site
Helo Santhana Raj, I found this envelope code useful in my research work and used it in analyzing my works.
Thank you for a nice example.
It seems that the length of the signal that you took is smaller than 4096. By default, I have taken a 4096 point FFT. So, unless you feed in a signal larger than 4096, the code will throw error.
Possible solutions are that you either pad zeros to your signal or reduce the No of points of the FFT(Variable N in the code)
"Index exceeds matrix dimensions
Error in envelope (line 46)"
I have sent you an email on your gmail account.
The carrier must be present in the received signal for envelope detection to work. The formula is (1+m(t))*c(t)
Any specific doubts, you can drop me a mail.
Many thanks for your quick reply. Just one last question. I did some simulation for Amplitude modulations, where my message frequency is 10 Hz and carrier frequency is 100 Hz. But after running your script, the detected frequency is 20 Hz and not 10 Hz.
N = 50000;
fs = 1000;
t = (0:N-1)/fs;
msg = cos(2*pi*10*t);
carrier = cos(2*pi*100*t);
x = msg.*carrier;
output = envelope(x, fs);
Am not Fully Sure of the carrier frequency. But I have always assumed it to be the natural frequency of the system, either bearing or the motor itself. But whatever be the case, the carrier frequency is supposed to be very high and a generally a 0.1 cut off frequency would comfortably remove it here.
Hope this helps.
Thanks for your reply. In bearing analysis, what is considered as carrier frequency? I have read few papers and all say different definitions.
Yep. U guessed right. The shaft speed is about 29Hz.
Thanks for Rating.
Very nice code and good example. I just have one question. The other spike at 29.3 Hz, does it correspond to shaft speed?
good, can be used normally.thanks very much.
Hi friend , thank you very much
True, This is just a demonstration of the two methods. Who would want to use different methods when one's ultimate aim is to do some envelope detection.
I thought it would be easier, as any one can compare the methods for their application and use the code from the program by coping those set of lines and reusing them in their main code.
"clc; close all;" is not a friendly idea. Why do you want to close my figures?
This function cannot be used to create the envelope directly. It is more a demonstration of the two different method with harddoced coefficients, creation of figures and overwriting the output y repeatedly. So before a user can calculate the envelopes matching to a specific problem, substantial re-programming is required.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.