0% found this document useful (0 votes)
108 views

Report

This document summarizes the analysis of vibration signals from machines with different fault types. Five fault types were analyzed: bearing, gearmesh, misalignment, imbalance, and resonance. Vibration data for each fault was plotted in the time and frequency domains. While the time domain plots did not clearly distinguish faults, the frequency domain plots showed differences in peak frequencies. Feature extraction using filters and principal component analysis further separated the faults when plotted. A nearest neighbor algorithm classified the fault types with 80% accuracy.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

Report

This document summarizes the analysis of vibration signals from machines with different fault types. Five fault types were analyzed: bearing, gearmesh, misalignment, imbalance, and resonance. Vibration data for each fault was plotted in the time and frequency domains. While the time domain plots did not clearly distinguish faults, the frequency domain plots showed differences in peak frequencies. Feature extraction using filters and principal component analysis further separated the faults when plotted. A nearest neighbor algorithm classified the fault types with 80% accuracy.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Nishant Bakshi

150104014

Decision System Assignment


Introduction :
This report has been divided into two parts and then subparts for each of the part. The first part
includes the problem set from Lab B1 which is about Data Acquisition and Frequency Analysis.
The first part of the problem is about vibration signal analysis. As per the requirement all the data
files that were given on the MOLE are loaded and are plotted in separate figures 1,2,3,4,5 which
are listed below

Figure-1: Bearing Fault

Figure-2: Gearmesh Fault

Nishant Bakshi
150104014

Figure-3: Misalignment data

Figure-4:Imbalance fault

Figure-5: Resonance fault

Nishant Bakshi
150104014

This completes the first part of the steps for signal analysis that has been mentioned in the
laboratory instruction sheet.
The code segment used is given in table 1
%%loading the data from .mat file
s= importdata('bearing.mat');
k= importdata('gearmesh.mat');
l= importdata('misalignment.mat');
z= importdata('imbalance.mat');
n= importdata('resonance.mat');
%%plotting all the data
figure(1);
plot (s,t);
title('bearing fault')
figure(2)

plot (k);
title('gearmesh fault')
figure(3)
plot (l);
title('misalignment fault')
figure(4)
plot (z);
title('imbalance fault')
figure(5)
plot (s);
title('resonance')

Table-1: code segment for plotting various fault types

After the analysis of the figures (fig1,fig2,fig3,fig4,fig,5) it can be concluded that it is very
difficult to distinguish different fault types as the vibration signature of all the fault types appear
more or less identical apart from their range in the vertical axis which varies.
Now the power spectral density function of each of the fault has been plotted in the figures
6,7,8,9,10.

Figure-6:Bearing fault in frequency domain

Nishant Bakshi
150104014

Figure-7: Gearmesh Fault in frequency domain

Figure8-Misalignment fault in frequency domain

Figure-9:Imbalance fault in frequency domain

Nishant Bakshi
150104014

Figure-10: Resonance Fault in frequency domain


The code used to calculate the welch density function for the various fault data is given in table
2.
%% calculating psd for all the faults
figure(6)
pwelch (s,[],[],[],1000)
title('Welch power spectral density estimate
figure(7)
pwelch (k,[],[],[],1000)
title('Welch power spectral density estimate
figure(8)
pwelch (l,[],[],[],1000)
title('Welch power spectral density estimate
figure(9)
pwelch (z,[],[],[],1000)
title('Welch power spectral density estimate
figure(10)
pwelch (n,[],[],[],1000)
title('Welch power spectral density estimate

for bearing fault')


for gearmesh fault')
for misalignment fault')
for imbalance fault')
for resonance fault')

Table2: code segment for finding power density function for all faults
After analyzing the figures 6, 7, 8,9 , 10 it can be concluded that the feature that differentiate (up
to a certain limit) the various fault type is the power to frequency ratio. Peaks of different power
to frequency ratio for different fault types are observed. This still cannot be considered as a solid
conclusion for differentiating various fault type. Thus another method has been used to
differentiate the various fault type.
This method involves the feature extraction from the set of data of various fault type based on
the energy levels in different frequency band. Feature extraction is basically dimensionality
reduction. The main aim of this is to obtain the most relevant information from the original data
and represent that information in a lower dimensionality space so that it can be interpreted easily.

Nishant Bakshi
150104014

Steps involved in features extraction are as following


1. Each set of data has 50,000 values so first they were separated into 50 sets of 1000.
2. Then each of these sets were normalized using the formula Xnormalised = x - x
3. For first feature extraction , power spectral density was calculated using welch method .
Welch command was used. Then the root mean square is calculated . This gives the
first
feature.
4. To extract the second feature signal is filtered through a low pass filter that has 50 Hz and
then psd and root mean square value is calculated. butter is used to filter the signal in
MATLAB.
5. Similarly next features are extracted using the band pass butter worth filter of 11 th order
having cutoff frequency 50-200Hz and then finding its psd and RMS value.
6. Feature four is extracted using the high pass butter worth filter of 18th order having cutoff
frequency 200Hz and then finding its psd and RMS value.
7. Finally a Matrix (main) of each fault is made combining all the features of particular data
set. And this will be used further for data visualization
Same steps are repeated for each of the fault data set and 4 features are extracted for each of the
five data set. The sample code used for one error data set is given in table 3. Similar code is used
for all the five data set and features are extracted.
ns = 1000;js = length(s)/ns;
x_nrms = zeros(js,ns);f1s = zeros(1,js);
for is=1:js %seperating each row and working
blocks = s((is-1)*ns+1:is*ns);
x_nrms(is,:) = blocks - (mean(blocks)*ones(ns,1));
[p1s,f1s]=pwelch(x_nrms,[],[],[],1000);
fs1(is) = (norm(p1s))/sqrt(ns) %%psd x normalized
[B1s,A1s] =butter (11,0.1);
f2s_fil = filter (B1s,A1s,x_nrms(is,:));% using the filter
[p2s,f2s]=pwelch(f2s_fil,[],[],[],1000);
pfs2(is)=(norm(p2s))/sqrt(ns);
[B2s,A2s] = butter (13, [0.1 0.4]);
f3s_fil = filter (B2s,A2s,x_nrms(is,:));
[p3s,f3s]= pwelch(f3s_fil,[],[],[],1000);
fs3(is)= (norm(p3s))/sqrt(ns);
[B3s,A3s] = butter (18,0.4, 'high');
f4s_fil= filter (B3s,A3s,x_nrms(is,:));
[p4s,f4s]= pwelch(f4s_fil,[],[],[],1000);
fs4(is)= (norm (p4s))/sqrt(ns);
end
feature_bearing
[fs1;fs2;fs3;fs4];
The
sample results for= one
of the fault (bearing fault) are depicted below :
fault1 =(feature_bearing)';

Table 3: code segment for psd of bearing fault

Nishant Bakshi
150104014

Figure-11: Power density function of feature 1

Figure-12: 1st feature of the bearing fault

Figure-13: 2nd feature of the bearing fault

Nishant Bakshi
150104014

Figure-14: 3rd feature of the bearing

Figure-15 : 4th feature of the bearing fault

This completes the task 2 of the lab work.

Proceeding to the third task, we need to create a matrix that contains all the (main) feature matrix
of all the faults.
The feature matrix dimension is four so dimensions need to be reduced. For this purpose, the
four - dimensional feature vectors was mapped to two dimensions by principal component
analysis (PCA).

Nishant Bakshi
150104014

Principal component analysis is a statistical tool to highlight variation and bring out strong
patterns in a dataset. It's often used to make data easy to explore and visualize.
The MATLAB code segment used for this is given in table 4.
G = [fault1;fault2;fault3;fault4;fault5];
c= corrcoef(G);
[v,d] = eig(c);
T=[v(:,end)';v(:,end-1)'];
zo=T*G';
figure(1)

plot (zo(1,:),zo(2,:),'*')
figure(2)

plot(zo(1,1:50),zo(2,1:50),'b--o'); hold on;


plot(zo(1,51:100),zo(2,(51:100)),'*'); hold on;
plot(zo(1,101:150),zo(2,101:150),'^'); hold on;
plot(zo(1,151:200),zo(2,151:200),'c*'); hold on;
plot(zo(1,201:250),zo(2,201:250),'--gs'); hold on;

Table 4 : Code segment for data visualization


The output of the all the features are shown in figure 16

Figure-16: The various faults mapped

Nishant Bakshi
150104014

As we can see in figure 16 that it is very difficult to differentiate between the various fault types ,
thus a separate graph was plotted in which different representations were used for different fault.
Figure 17 depicts the plot that has separated fault type.

Figure-17: various fault type

As we can see in figure 17 that all the faults are almost separated from each other. We can see the
red triangles which depict the bearing fault. These are completely separated from all the other
faults.
We can also see that all the other faults overlap each other but each have a range that can be
clearly seen in the figure (namely green line, purple line, and blue stars)
It can be concluded that the faults overlap each other but they can be more or less separated from
each other.

This completes the first part of the lab tasks


The next part involves classification of machines. This classification is done by nearest neighbor
classification algorithm.

Nishant Bakshi
150104014

Nearest neighbor algorithm:


1. Euclidian distance in calculated and this will act as the compare point for shortest
distance.
2. The data set is divided in 2 halves testing data and target data and the variables are
initialized.
3. Both the testing data and training data sets are labelled as this would help in the
programming part.
4. Now the main step is that the Euclidian distance of data set of labelled and unlabeled
data.
5. If the Euclidian distance is less than infinity, then infinity is the Euclidian distance and
its label is exchanged with the earlier Euclidian distance.
6. Basically there is a loop that connects the nodes one by one and it goes on until all the
nodes and finally the distance between 1st and last node is calculated.

Finally the accuracy of our data is calculated using the formula :


Accuracy = (Nc / 75)*100

where

Nc= is calculated by the nearest neighbor algorithm. It is the length of connection between first
and last node.
75 is the the dataset size.
The sample code segment used is as following :

numberOfTrainingCases = 35;
trainingSet =
[fault1(1:numberOfTrainingCases,:);fault2(1:numberOfTrainingCases,:);fault3(1:num
berOfTrainingCases,:);fault4(1:numberOfTrainingCases,:);fault5(1:numberOfTraining
Cases,:)];
testingSet =
[fault1(numberOfTrainingCases+1:end,:);fault2(numberOfTrainingCases+1:end,:);faul
t3(numberOfTrainingCases+1:end,:);fault4(numberOfTrainingCases+1:end,:);fault5(nu
mberOfTrainingCases+1:end,:)];
% Note the below works because all faults are of equal lengths.
numberOfTestingCases = length(fault1) - numberOfTrainingCases;
trainingTarget =
[ones(1,numberOfTrainingCases),ones(1,numberOfTrainingCases)*2,ones(1,numberOfTra
iningCases)*3,ones(1,numberOfTrainingCases)*4,ones(1,numberOfTrainingCases)*5];
testingTarget =
[ones(1,numberOfTestingCases),ones(1,numberOfTestingCases)*2,ones(1,numberOfTesti
ngCases)*3,ones(1,numberOfTestingCases)*4,ones(1,numberOfTestingCases)*5];
% Calculate the total number of test and train classes
totalNumberOfTestingCases = numberOfTestingCases * 5;
totalNumberOfTrainingCases = numberOfTrainingCases * 5;
% Create a vector to store assigned labels
inferredLabels = zeros(1, totalNumberOfTestingCases);
% This loop cycles through each unlabelled item:
for unlabelledCaseIdx = 1:totalNumberOfTestingCases
unlabelledCase = testingSet(unlabelledCaseIdx, :);
% As any distance is shorter than infinity
shortestDistance = inf;
shortestDistanceLabel = 0; % Assign a temporary label
% This loop cycles through each labelled item:
for labelledCaseIdx = 1:totalNumberOfTrainingCases
labelledCase = trainingSet(labelledCaseIdx, :);
% Calculate the Euclidean distance:

Nishant Bakshi
150104014

currentDist = euc(unlabelledCase, labelledCase);


% Check the distance
if currentDist < shortestDistance
shortestDistance = currentDist;
shortestDistanceLabel = trainingTarget(labelledCaseIdx);
end
end % inner loop
% Assign the found label to the vector of inferred labels:
inferredLabels(unlabelledCaseIdx) = shortestDistanceLabel;
end
% outer
Table
5 : Codeloop
segment to evaluate pattern classification using nearest neighbor
Nc = (length(find(inferredLabels==testingTarget));
Accvalue
= (Nc/75)*100
The
of Acc was 98.67%.

algorithm

This completes all the required task of the lab tasks


The benefit of doing this is that in industries where there are hundreds of machines (motors etc.)
are involved, this reduces the risk of breakdown and thus prevents production and other losses.
Other advantage is that it helps to do the preventive maintenances thus increasing the life of
machineries involved.
Conclusions:
1. Vibration signature analysis in time and frequency domain cannot always give accurate
desired result for fault identification. To get accurate results power spectral density
analysis at different frequency and finally features extraction method can be applied.
2. The accuracy for the given sample of data set for pattern classification is 98.67%.

References:
[1] H. Liu and H. Motoda. Feature Extraction, Construction and Selection: A Data Mining
Perspective. Kluwer Academic, 1998.
[2] Prof. Visakan Kadirkamanathan .Decision System . University Lecture,2016

You might also like