You are on page 1of 15

A Report

on

Using Support Vector Machines as an aid in


Condition Monitoring
By
Bharadwaj G V
2013A4PS461H

Under the supervision of


Prof. Sabareesh Geeta Rajasekaran
SUBMITTED IN THE FULFILLMENT OF THE REQUIREMENTS OF
PROJECT COURSE(BITS MEF376)

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, PILANI


HYDERABAD CAMPUS
(August 2015 November 2015)

Date of Submission: 27-11-2015


1|Page

Title of project: Using Support Vector Machines as an aid in Condition Monitoring


ID NO. /Name of student:

2013A4PS461H

Bharadwaj.G.V

Discipline of student: Mechanical Engineering


Name of the Faculty: Prof. Sabareesh Geeta Rajasekaran
Key Words: Condition Monitoring-Machine Learning-Support Vector Machines-ConstraintsWavelet Transform-Graphical User Interface
Project Areas: Condition Monitoring, Vibration, Machine Learning
Abstract:
Condition based maintenance is the logical alternative to Corrective and Scheduled maintenance.
First, vibration data versus time is obtained from experiments. Usually, fault detection using
vibration data is practiced by taking a Fourier transform of the data and noticing characteristic
frequencies. This project aims to develop a machine learning classification program which can
predict the type of fault from vibration data and then compare the results with the conventional
method following which a GUI is to be developed

2|Page

ACKNOWLEDGEMENTS
I would like to thank Prof.Sabareesh Geeta Rajasekaran fro giving me the opportunity to work
on this project. His guidance has been invaluable and he had created a congenial atmosphere for
the multidisciplinary study that this project requires.

3|Page

Table of Contents
1

Introduction ............................................................................................................................. 5
1.1

Scope and Objective ......................................................................................................... 5

1.2

Support Vector Machines ................................................................................................. 5

1.3

Wavelet Transform ........................................................................................................... 6

Support Vector Machine Classification ................................................................................... 8


2.1

Input Space and Feature Space......................................................................................... 8

2.2

Code ................................................................................................................................. 9

2.3

Results ............................................................................................................................ 10

Graphical User Interface ........................................................................................................ 12


3.1

Layout............................................................................................................................. 12

3.2

Results ............................................................................................................................ 12

Conclusions ........................................................................................................................... 15

Directions for Future Study ................................................................................................... 15

References ............................................................................................................................. 15

4|Page

1 Introduction
1.1 Scope and Objective
Condition based maintenance is the logical alternative to Corrective and Scheduled maintenance.
It ensures that the device doesn't have unscheduled downtime while simultaneously exhausting
the full life of various components. There are usually many techniques which are used for
condition monitoring.

Vibration Analysis
Acoustic Emission
Oil Analysis
Ultrasonic Testing Techniques
Strain Measurement

For this project, we will be using vibration data obtained from the experimental setup.

Conventionally, People use Charts


Intention is to develop a Machine Learning Model to predict Values
Graphical User Interface

1.2 Support Vector Machines


The support vectors are the data points that are closest to the separating hyper-plane; these points
are on the boundary of the slab.

Figure 1.1: Support Vectors


Figure1: illustration of SVM with + indicating data points of type 1, and indicating data points of type 1.

5|Page

However, it is often the case that in order to eectively separate the data, we must use a feature
space that is of (sometimes very much) higher dimension than our input space. For such
applications, alternative mapping functions are used. Such mapping functions are called Kernel
Functions. They help in increasing the classification accuracy. A few examples are:

Radial Basis Function


Polynomials
Multilayer Perceptron

Our present application requires us to classify into 3 classes, namely

Healthy Setup
Defective Bearing
Defective Gears

But usually SVMs are used only for a binary classification. Therefore, for this application, a One
versus All approach is employed to achieve the desired result. The design is such that the model
classifies the object into one class or decides that the object belongs to the other classes. This is
repeated for all the classes until the classifier correctly identifies which class the object belongs
to.
Input Vector

Class 3
versus
(Class 1 AND Class 2)

Class 2
versus
(Class 1 AND Class 3)

Class 1
versus
(Class 2 AND Class 3)

Classification
Criteria

Result

Figure1.2: One Vs All Flowchart

1.3 Wavelet Transform


A wavelet transform is a time-frequency transformation, like the Fast Fourier Transform which
usualy accounts for the time dependent nature of the frequencies associated with the data.
6|Page

After classification using Support Vector Machines, the developed GUI uses the result from the
classification to plot and show characteristic peaks of the Meyer wavelet transform of the raw
time domain data. The wavelet transform was chosen based on entropy and energy
considerations.

7|Page

2 Support Vector Machine Classification


2.1 Input Space and Feature Space
From the experiments, data for 261 cases is obtained. Each case corresponds to a set of 1000
acceleration values collected at regular time intervals. For each case the following parameters are
evaluated.

Mean of the Data


Standard Error of the Mean: the standard deviation of the sample-mean's estimate of
a population mean.

Kurtosis: Measure of the "tailedness" of the probability distribution of a real-valued


random variable. It is given by

Sum of the acceleration values


Range of Acceleration data: Difference between the maximum acceleration value and the
minimum acceleration value
Maximum Value
Minimum Value
Skewness of Data: a measure of the asymmetry of the probability distribution of a realvalued random variable about its mean.

where:
is the standard deviation of the population
is the mean of the data
4 is the fourth moment about the mean.
The code which accomplishes this is as follows

8|Page

filename2 = 'Healthy_Output.xlsx'; %Features are written to this file


total_samples = 87;
features = zeros(87,8); %Initializing the feature space
for i = 1:total_samples
filename = ['C:\Bajju Stuff\Project\Condition Monitoring\to Balavignesh
and Bharadwaj\gearwithfaultsamplesexp2\backup_',num2str(i),'.xlsx'];
%Filenames are set in loop
[v,T,vT] = xlsread(filename);%Excel file is read
data = v(:,1);%Getting the column from the Excel sheet
L = 10000;%Number of samples
%All the parameters are evaluated
features(i,1) = mean(data);
features(i,2) = std(data)/sqrt(length(data));
features(i,3) = kurtosis(data);
features(i,4) = sum(data);
features(i,5) = range(data);
features(i,6) = min(data);
features(i,7) = max(data);
features(i,8) = skewness(data);
end
xlswrite(filename2,features);%The features are written to the new file

After evaluating the concerned features for all test cases, the data was divided into training(211
Cases) and testing data(50 Cases). Also, only 3 features were considered for training the model
because they were considered characteristic of the particular class of objects. They are:

Standard Error of Mean


Kurtosis
Skewness of the data

2.2 Code
Following the division of the data into training and testing data, the model for the support vector
machines is built. The following function implements the one versus all logic for multiclassification using support vector machines.

9|Page

function [result] = onevsallsvm(TrainingSet,GroupTrain,TestSet)


%TrainingSet is the training data with all rows corresponding to 1 case
%and every column corresponding to a feature.
%GroupTrain is the training result data which has values of the object
%classification.
%TestSet is the set of feature arrays for the Testing data
u=unique(GroupTrain);%has a list of all the different classes
numClasses=length(u);
result = zeros(length(TestSet(:,1)),1);%initializing the results array
%Training
for k=1:numClasses
G1vAll = (GroupTrain==u(k));%A particular class is considered
models(k) =
svmtrain(TrainingSet,G1vAll,'Kernel_Function','rbf','boxconstraint',Inf);
%A single model is then trained to classify wheter the object belongs
%the the class under consideration
end
%Testing
for j=1:size(TestSet,1)
for k=1:numClasses
if(svmclassify(models(k),TestSet(j,:))) %The condition
%checks of the test case under consideration can be classfied
%satisfactorily using one of the svm models
break;
end
end
result(j) = u(k);%the results are stored
end

2.3 Results
In the following snippet, the data is fed into the model and the output result array is compared
with the actual classification data and stored in the column vector measure. A value of 0 in the
measure vector indicates that that particular instance of testing data has been classified correctly.
TestSet = [SEM2,K2,SKEW2];%the test set os prepared from
%the corresponding excel file
result = onevsallsvm(TrainingSet,GroupTrain,TestSet);
%The results are predicted by the model
measure = (result-ActualValues)./ActualValues;
%measure vector is a measure of the error of the classifier

>> sum(measure)/length(measure)
ans =
0

10 | P a g e

The sum of all the values in the measure vector divided by the length is 0. It indicates that the
classifier predicts with a 100% accuracy.
The data which was provided to the support vector machine system was obtained by running the
experimental setup at 1000 RPM. When the SVM was asked to classify the data obtained at 800
RPM and 1200 RPM for Healthy, Bad Bearing and Bad Gear Conditions, all the results were
Healthy Condition. This indicates that the support vectors are drawn such that the conditions at
different RPM always fall into the healthy condition. The difference between RPM can be
accounted for by using more features, or by drawing more support vectors.

11 | P a g e

3 Graphical User Interface


3.1 Layout
The layout of the GUI is as given in figure 3.1. The default values of sampling frequency is
1651.8, for the experimental setup available on campus. The GUI requires the user to select an
excel file with the time domain data. On clicking "Process", the data is plugged into the SVM
model and the prediction is printed on the screen. Using this prediction, the wavelet transform of
the time domain data is analyzed between 2 limits and the frequency at which the maximum peak
value occurs and the difference between the peak value for healthy condition and th epresent
faulty condition is printed on the screen. In subsequent usage, the screen is cleared of all data and
the next set of results are displayed.

Figure 3.1: GUI Layout

3.2 Results
Figures 3.2 and 3.3 illustrate the usage of the GUI for a bad bearing and bad gear condition. As
apparent, the solution is flashed in the text box next to the Static Text:"Prediction by Support
Vector Machines". Following this, the Meyer Transform of the data is plotted in the Axes
section. The red line indicates the place where the maximum peak occurs in the characteristic
range. At present the GUI requires MATLAB to run on a system. once it has been modified to
accommodate more faults, the GUI will be published and converted to a .exe file. Then, it can be
used freely on most systems.
12 | P a g e

Figure 3.2: Bad Gear Condition

From the above and below figures, we realize that the GUI is user friendly and throws the result
on the interface in such a way that any person can use it without any issue.

Figure 3.3: Bad Bearing Condition

13 | P a g e

In case of a healthy condition. the values for Characteristic Frequency and the Difference have
no physical meaning. Hence, in the above case, the GUI indicates to the user that condition is
healthy by changing the color of the text box and not printing any values in the axes section. This
is shown in Figure 3.4

Figure 3.4: Healthy Condition

14 | P a g e

4 Conclusions
From the above explanation, we realize that the code for the support vector machines can be
easily extended to accommodate more faults. Once this is achieved, it will be a very useful tool
for accurate prediction of the condition of the setup. This can help those people who are involved
in maintenance fix the fault without disassembling the entire system. Also, the wavelet transform
in the GUI can be used to compare the obtained results with charts and check if the values
correspond to the same fault as predicted by the SVM.

5 Directions for Future Study

The data for various other faults at other RPM is being collected. Once this is included in
the model, the SVM will be able to exactly predict the faulty conditions such as "Inner
Race Fault", "Outer Race Fault", "Gear undercut Problem" etc.
The graphs should also be modified for all such scenarios.
Once more cases are to be included in the model, 3 features will not be satisfactory to
provide accurate results. Therefore, in this case, the features are to be chosen using a
decision tree(Preferably using the J48 or the ID3 algorithms)

6 References

Fault Diagnostics of roller bearing using kernel based neighborhood score multi-class
support vector machines, V. Sugumaran, G.R. Sabareesh, K.I. Ramachandran
Status and problems of wind turbine structural health monitoring techniques in China,
Wenyi Lu, Baoping Tang, Yonghua Jiang
Condition Monitoring of Wind Turbines: Techniques and Methods, Marquez, Tobias,
Perez, Papelias
Mathworks, http://in.mathworks.com/help/
Wikipedia, https://en.wikipedia.org/wiki/Main_Page
Application of wavelet transform in machine condition monitoring and fault diagnosis: a
review with bibliography, Z.K Peng and F.L Chu

``

15 | P a g e

You might also like