Report
Report
150104014
Nishant Bakshi
150104014
Figure-4:Imbalance 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')
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.
Nishant Bakshi
150104014
Nishant Bakshi
150104014
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
Nishant Bakshi
150104014
Nishant Bakshi
150104014
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)
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.
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.
Nishant Bakshi
150104014
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
algorithm
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