File Exchange

image thumbnail

Morphological Analysis for Bearing Fault detection

version 1.0 (2.34 KB) by

Applies the selected morphological operators on the signal.

9 Ratings



View License

Y= morph_analysis(sig,fault_fr,RPM) Applies the Mathematical morphology operation on the signal "sig". To be basically used for Condition Monitoring of Rotating Equipments.
The Morphological operations done are
Gradient 1: Beucher Gradient(Dilate - Erode)
Gradient 2: Signal - Erode
Gradient 3:Dilate - Signal
It outputs a FFT graph of the signal along with the gradients. It also prints on the Command Window, about the availability of Fault in the specified frequency.

Comments and Ratings (15)

Santhana Raj

Santhana Raj (view profile)

@Rafaella Dantas:

The fault frequency is the bearing fault frequency that you should be looking for. It depends on the physical dimensions of the bearing. You can refer any book to get the formula for fault frequency for your bearing.

All the best. Contact by mail for quicker response.

Dont forget to rate.

I don't understand how I can find the 'fault_fr'. Can you help me? Thank you!

Santhana Raj

Santhana Raj (view profile)

The signal has been taken from CWRU bearing databased. Just search for Case Western Reserve University, Bearing data center. You would get a good collection of vibration data with bearing faults.

If you want some more data, look for NASA's prognostics site.

Can u give the details about value of rpm for the given signal.Please provide basic information about details of signal used in this program.Sir is there any open source link from where we can load more signals for analysis.Please help.

From the base paper i was able to guess it as 29Hz is it correct?


Anwesh (view profile)

Santhana Raj

Santhana Raj (view profile)

Ya, You are correct.
Fs- Sampling Frequency

N- No of points in FFT, preferably of 2^n format, less than the number of values in input

fault_tym=inverse of fault frequency

X- Fs*fault_tym. Can be proven that the result will be better if the number of structural elements taken is a multiple of Fs*fault_tym. Which multiple provides better result is being compared in this code. You can chk the ieee paper for further details...


Anwesh (view profile)

The programs works well for me
can you describe the terms Fs , N i.e N= 4*2048 , X in the program.I figured out Fs to be sampling frequency

Santhana Raj

Santhana Raj (view profile)

@Hemo Khalifa,

The program works fine for me. I cant directly provide a example/demo here. But I have already given how to call the function and the meaning of the variable in the comment portion of the file. If you want to understand the code, You can check my page,

If you are facing any specific error in executing the code, Drop me a mail with the error, I would be glad to help.

Hemo khalifa

it's no working with me, can you give an example or add demo


Mike (view profile)


tk (view profile)

n chow

n chow (view profile)

MATLAB Release
MATLAB 7.13 (R2011b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video