Anda di halaman 1dari 180

ACKNOWLEDGEMENT

I would like to convey my most sincere thanks to my project supervisors, Prof Xu

Jianxin and A/Prof Sanjib Kumar Panda for their encouragement and advices. Their

profound knowledge and experiences in the field of machine learning techniques and

machine system are my source of inspiration. I also appreciate the opportunity to work in

the field of Empirical Mode Decomposition, which is the most versatile and powerful

signal processing tool I have read.

I would like to thank Mr Woo Ying Chee and Mr Mukaya Chandra from the

Electrical Machine and Drives Laboratory, who helped in setting up the Machine Fault

Simulator, DAQ measurement systems and preparing workstations for MATLAB

simulations used in the project, and their help in booking meeting room for project

briefing.

Lastly, I would like to thank Dr N. Rehman and Dr D.P. Mandic for making the

Noise-Assisted Multi-variate Empirical Mode Decomposition MATLAB code publicly

available at http://www.commsp.ee.ic.ac.uk/~mandic/research/emd.htm, and Dr G.

Rilling and Dr P. Flandrin for making the mono-variate Empirical Mode Decomposition

MATLAB code publicly available at http://perso.ens-lyon.fr/patrick.flandrin/emd.html.

i
TABLE OF CONTENTS
CHAPTER 1: INTRODUCTION ................................................................................................. 1
1.1 Objectives ............................................................................................................. 2
1.2 Thesis Organization.............................................................................................. 3
1.3 Fault Mode Statistics Survey................................................................................ 6
1.4 Literature Survey .................................................................................................. 8
1.4.1 Vibration Signature Analysis ........................................................................ 8
1.4.2 Motor Current Signature Analysis ................................................................ 9

CHAPTER 2: MECHANICS OF MACHINE FAULT MODES ...................................................... 14


2.1 Eccentricity......................................................................................................... 15
2.1.1 Static Eccentricity ....................................................................................... 15
2.1.2 Dynamic Eccentricity.................................................................................. 16
2.1.3 Mixed Eccentricity Motor Current Signature ............................................. 17
2.2 Unbalanced Rotor Fault ..................................................................................... 18
2.2.1 Unbalanced Rotor Fault Motor Current Signature...................................... 20
2.3 Bearing Faults .................................................................................................... 20
2.3.1 Bearing Faults Vibration Signatures ........................................................... 22
2.3.2 Bearing Faults Motor Current Signatures ................................................... 25
2.4 Bearing General Roughness ............................................................................... 26
2.5 Broken Rotor Bar Motor Current Signature ....................................................... 27
2.6 Shorted Stator Winding Fault Motor Current Signature .................................... 28
2.7 Healthy Machine Signature ................................................................................ 29
2.8 Dynamic Estimation of the Machine Slip .......................................................... 30

CHAPTER 3: MOTOR CURRENT SIGNATURE AND VIBRATION SIGNATURE ANALYSIS ......... 32


3.1 Motor Current signal Analysis or Vibration Analysis? ...................................... 32
3.2 Challenges of Motor Current Signature Analysis .............................................. 33
3.3 Discussions: Proposed Ensemble Spectrum Approach ...................................... 35

CHAPTER 4: ARTIFICIAL INTELLIGENCE TECHNIQUES FOR MACHINE FAULT DIAGNOSIS .... 37


4.1 k-Nearest Neighbour (k-NN) ............................................................................. 37
4.1.1 k-NN Algorithm .......................................................................................... 38
4.2 Self-Organizing Map (SOM) ............................................................................. 38

ii
4.2.1 Structure and Operation of SOM ................................................................ 39
4.2.2 SOM Algorithm .......................................................................................... 41
4.3 Support Vector Machine (SVM) ........................................................................ 42
4.3.1 Multi-Class SVM (M-SVM) ....................................................................... 44
4.3.2 M-SVM Algorithm ..................................................................................... 45
4.4 Empirical Mode Decomposition (EMD) ............................................................ 46
4.4.1 EMD Algorithm .......................................................................................... 47
4.4.2 Mode Mis-alignment ................................................................................... 48
4.4.3 Multi-variante EMD.................................................................................... 57
4.4.4 Mode Mixing .............................................................................................. 57
4.4.5 Noise-assisted Multi-variate EMD (N-A M-EMD) .................................... 57

CHAPTER 5: A STUDY ON AUTOMATIC DIAGNOSIS OF BEARING AND UNBALANCED ROTOR


FAULTS .............................................................................................................................. 59
5.1 Fault Diagnosis using Time-Domain Vibration Signatures ............................... 59
5.1.1 Similarity measures by Cross-Correlation Operator ................................... 60
5.2 Machine Fault Simulator .................................................................................... 66
5.3 Machine Signatures Collection .......................................................................... 69
5.4 Experimental Results.......................................................................................... 70
5.5 Discussions: Difficulty in choosing a suitable value for k ................................. 71
5.6 Discussions: Larger Training Samples ............................................................... 72
5.7 Visualization of Classification Results by k-NN ............................................... 72
5.8 Fault Diagnosis using Frequency-Domain Vibration Signatures ....................... 75
5.8.1 Discrete Wiener Filter ................................................................................. 76
5.8.2 Frequency Analysis of Vibration Signatures .............................................. 78
5.8.2.1 Frequency content of Healthy Machine .................................................... 78
5.8.2.2 Frequency content of Unbalanced Rotor fault .......................................... 78
5.8.2.3 Frequency content of Bearing fault ........................................................... 78
5.8.2.4 Discussion on vibration frequency analysis .............................................. 78
5.8.3 Feature Extraction of Frequency domain information ................................ 83
5.8.4 Cluster Analysis of Vibration Feature Vectors ........................................... 84
5.8.5 Further Feature Extraction .......................................................................... 85
5.8.6 Multi-class SVM (M-SVM) for Classifying Machine Fault Data .............. 86

iii
5.9 Discussions: Frequency-domain Analysis of Vibration Signatures ................... 88

CHAPTER 6: A STUDY ON MOTOR CURRENT SIGNATURE USING EMPIRICAL MODE


DECOMPOSITION ................................................................................................................ 89
6.1 Fourier Transform .............................................................................................. 89
6.2 Wavelet Transform ............................................................................................. 91
6.3 Hilbert-Huang Transform................................................................................... 92
6.3.1 Hilbert Spectrum ......................................................................................... 93
6.3.2 Marginal Hilbert Spectrum ......................................................................... 94
6.4 Discussion: EMD as a suitable Analysis Tool ................................................... 94
6.5 N-A M-EMD Experiment Results...................................................................... 95
6.5.1 Discussions: IMF Derived by EMD ........................................................... 97
6.5.2 Discussions: Filter-bank Property of EMD Algorithm ............................... 99
6.5.3 Discussions: Significance of IMF1, IMF2, IMF3, IMF4......................... 101
6.5.4 Discussions: Significance of IMF10, IMF11 ........................................... 103
6.5.5 Discussions: Significance of IMF5, IMF6, IMF7, IMF8, IMF9 ............. 104
6.6 Visualization of the Comparison results by SOM ............................................ 107
6.7 Discussions: Discovery of Unique Features by SOM ..................................... 107

CHAPTER 7: CONCLUSION ................................................................................................ 111

REFERENCES .................................................................................................................... 113

APPENDIX A: INTRINSIC MODE FUNCTIONS DERIVED BY N-A MEMD ALGORITHM FOR


MACHINE SPEED AT 20HZ ................................................................................................. 124

APPENDIX B: HILBERT SPECTRUM AND MARGINAL HILBERT SPECTRUM OF MACHINE


SIGNATURE (AT MACHINE SPEED OF 20HZ) INTRINSIC MODE FUNCTION 5 TO 9 .............. 131

APPENDIX C: PSEUDO CODE FOR 2-CLASS SVM LEARNING ............................................. 135

APPENDIX D: PSEUDO CODE FOR MULTI-CLASS SVM LEARNING .................................... 140

APPENDIX E: PSEUDO CODE FOR SOM LEARNING............................................................ 147

APPENDIX F: PSEUDO CODE FOR K-NN LEARNING............................................................ 160

iv
SUMMARY
Induction machine are used widely in industrial process e.g., steel mills, chemical

plants etc. it is therefore vital to condition monitor the health of the machine to prevent

unexpected and untimely failure. Their untimely downtime have significant economic

and social impact, such as, disruption to production process, spoilage to work-in-

progress, costly plant process re-start etc. It is therefore useful to investigate automatic

machine fault detection and diagnosis techniques. This creates the motivation for this

study. Why condition monitoring? Incipient machine faults can be detected by continuous

monitoring [1]. As such, condition-based maintenance has become a new maintenance

methodology that has rapidly been adopted by the industry as the standard operating

procedure. In the past, it is essentially a routine periodic machine shutdown for servicing

and inspection. This method has proved to be inefficient. In condition-based

maintenance, the machine is carefully and continuously condition monitored for

symptoms of failure. Based on such continuous tracking of the machine health-states,

imminent failures is detected and planned shutdown made, only when necessary. This

way, machine downtime and maintenance costs are reduced, and asset security and

reliability increased, both achieving efficiency and profitability for the organization. With

this in view, this project investigates the various machine condition monitoring

techniques, with the objective to implement effective automatic fault detection and

diagnosis methods, to reveal developing incipient faults, so that timely intervention is

made to prevent sudden catastrophic failures.

v
LIST OF TABLES
Table 1.1: Summary of percentage of each of the failure mode. ........................................ 6
Table 1.2: Fault statistics on 8 surveyed articles. (*MC denotes Most Common fault) ..... 7
Table 1.3: Percentage of each of the failure mode derived from Table 1.2. ....................... 7

Table 5.1: Similarity Measure for v1, v2 and v3 ................................................................. 66


Table 5.2: Training and test sets for k-NN classification. ................................................ 69
Table 5.3: Fault classification confusion matrix. .............................................................. 70
Table 5.4: Classification result summary.......................................................................... 70
Table 5.5: Tabulated results of error rate (%) with various k-neighbor values. ............... 71
Table 5.6: Distribution of spectrum of machine vibration signatures. ............................. 83
Table 5.7: Fault classification confusion matrix of vibration signature. .......................... 87
Table 5.8: M-SVM classification of vibration signatures result summary. ...................... 88

Table 6.1: Similarity measures of same-indexed pair of machine current IMFs at 20Hz. 98
Table 6.2: Similarity measures of same-indexed pair of machine current IMFs at 30Hz. 98
Table 6.3: Similarity measures of same-indexed pair of machine current IMFs at 40Hz. 98
Table 6.4: Frequency band for HTY30 (IMF 5-9) machine current signature. .............. 100

vi
LIST OF FIGURES
Figure 1.1: Approaches of this project to investigate machine fault diagnosis. ............... 13

Figure 2.1: Perturbation force (Fc) created by unbalanced mass (m) rotating at . ........ 19
Figure 2.2: Unbalanced rotor fault signatures at various machine speeds. ....................... 19
Figure 2.3: Bearing assembly. .......................................................................................... 21
Figure 2.4: Defective rolling elements (adopted from [93]). ............................................ 21
Figure 2.5: Raceway faults (adopted from [93]). .............................................................. 22
Figure 2.6: Rolling element pitch, diameter and contact angle of a bearing. ................... 23
Figure 2.7: Rolling element fault signatures at various machine speeds. ......................... 24
Figure 2.8: Inner raceway fault signatures at various machine speeds. ............................ 24
Figure 2.9: Outer raceway fault signatures at various machine speeds. ........................... 25
Figure 2.10: Healthy machine signatures at various machine speeds. .............................. 29

Figure 4.1: Connections between the input and output neurons of SOM. ........................ 39
Figure 4.2: Linear decaying learning rate versus learning steps of a SOM. ..................... 40
Figure 4.3: Support vectors, decision boundary and margin of 2-class SVM. ................. 43
Figure 4.4: Multi-class SVM using one-versus-all learning strategy. .............................. 45
Figure 4.5: Mono-variate EMD of BRG signature. .......................................................... 49
Figure 4.6: Mono-variate EMD of UBR signature. .......................................................... 50
Figure 4.7: Mono-variate EMD of HTY signature. .......................................................... 51
Figure 4.8: Extremum of two signals x1(t) and x2(t). ........................................................ 52
Figure 4.9: Mean of 3D tube of complex signal signals zb(t)........................................ 53
Figure 4.10: Evolution of bi-variate complex signal for (|HTY40(t)|,|BRG40(t),t). ......... 53
Figure 4.11: Mean of complex signal signals zt(t). ........................................................... 54
Figure 4.12: Evolution of tri-variate complex signal for
(|HTY40(t)|,|BRG40(t)|,|BRB40(t)|).................................................................................. 55
Figure 4.13: Mode mixing. ............................................................................................... 56
Figure 4.14: N-A M-EMD on signal with Guassian white noise added. .......................... 58

Figure 5.1: Template matching using cross-correlation of machine signatures. .............. 60


Figure 5.2: Deterministic signals v1(t), v2(t) and v3(t). ...................................................... 61
Figure 5.3: Normalized cross-correlation sum coefficients of a pair signature. ............... 64
Figure 5.4: Machinery Fault Simulator (MFS) by SpectraQuest, Inc............................. 66
Figure 5.5: Schematic of machine signature acquisition using DAQ by Dewetron. ...... 67
Figure 5.6: Bearing fault simulation using MFS. ............................................................. 68
Figure 5.7: Unbalanced rotor fault simulation using MFS. .............................................. 68
Figure 5.8: Error rate (%) versus k-neighbor values. ........................................................ 71
Figure 5.9: Unbalanced rotor fault misclassified as healthy machine. ............................. 73
Figure 5.10: Healthy machine signatures correctly classified. ......................................... 73
Figure 5.11: Unbalanced rotor signature correctly classified. .......................................... 74

vii
Figure 5.12: Unbalanced rotor signature correctly classified. .......................................... 75
Figure 5.13: Wiener Filter................................................................................................. 77
Figure 5.14: Filtered machine signatures at fr=15Hz and 31Hz. ...................................... 77
Figure 5.15: Frequency content of HTY signatures at fr=15Hz........................................ 79
Figure 5.16: Frequency content of HTY signatures at fr=31Hz........................................ 79
Figure 5.17: Frequency content of UBR signatures at fr=16Hz........................................ 80
Figure 5.18: Frequency content of UBR signatures at fr=32Hz........................................ 80
Figure 5.19: Frequency content of BRG signatures at fr=15Hz........................................ 81
Figure 5.20: Frequency content of BRG signatures at fr=32Hz........................................ 82
Figure 5.21: 11-dimensional feature vector at fr=15Hz and 31Hz.................................... 84
Figure 5.22: Semantic map of vibration signatures from two SOM different simulations.
........................................................................................................................................... 85
Figure 5.23: 2-dimensional feature vector. ....................................................................... 86
Figure 5.24: M-SVM classification (Gaussian kernel hsvm=8.0, slack factor C=0.1) of
vibration signature. ........................................................................................................... 87

Figure 6.1: Fourier Series (a finite sum of a 10Hz square wave with n=3 and n=10). ..... 90
Figure 6.2: Different wavelet basis functions. .................................................................. 92
Figure 6.3: A 7-channel Motor Current Signature decomposition by N-A MEMD. ........ 96
Figure 6.4: EMD as filter-banks for HTY30 (IMF 5 9) machine current signature. ..... 99
Figure 6.5: IMF1, IMF2, IMF3, IMF4 of the machine signatures at 20Hz. ................... 101
Figure 6.6: IMF1, IMF2, IMF3, IMF4 of the machine signatures at 30Hz. ................... 102
Figure 6.7: IMF1, IMF2, IMF3, IMF4 of the machine signatures at 40Hz. ................... 102
Figure 6.8: IMF10 and IMF11 (residue) of the machine signatures at 20Hz. ................ 103
Figure 6.9: IMF10 and IMF11 (residue) of the machine signatures at 30Hz. ................ 103
Figure 6.10: IMF10 and IMF11 (residue) of the machine signatures at 40Hz. .............. 103
Figure 6.11: IMF5-9 of the HTY machine signatures at 20Hz. ...................................... 104
Figure 6.12: IMF5-9 of the BRG machine signatures at 20Hz. ...................................... 105
Figure 6.13: IMF5-9 of the BRB machine signatures at 20Hz. ...................................... 105
Figure 6.14: IMF5-9 of the UBR machine signatures at 20Hz. ...................................... 106
Figure 6.15: IMF5-9 of the SWF machine signatures at 20Hz. ...................................... 106
Figure 6.16: Feature map using fea_IMF vector at fs=20Hz. ......................................... 108
Figure 6.17: Feature map using fea_IMF vector at fs=30Hz. ......................................... 109
Figure 6.18: Feature map using fea_IMF vector at fs=40Hz. ......................................... 110

viii
LIST OF SYMBOLS &ACRONYMS

ai: non-zero Lagrange multipliers

BMU: Best Matching Unit of SOM

bo: SVM bias

BRG: Bearing fault

BRB: Broken rotor bar

C: slack factor of SVM

Db: is the diameter of the rolling element

Dc: is the rolling element pitch

di , dj: data label for OVA learning strategy for M-SVM

"EMD": Empirical Mode Decomposition

fr: rotor frequency

FR: rotor mechanical frequency

fs: fundamental supply frequency

g0: radial air-gap length in the case of a uniform air-gap

hsvm: Guassian kernel width

h: inverter harmonic order

HTY: healthy machine

IMF: Intrinsic Mode Function

isD: instantaneous values of direct-axis component of monitored stator current

isQ: instantaneous values of quadrature-axis component of the monitored stator current

k-NN: k-Nearest Neighbor

ix
Lm: three-phase magnetizing inductance

Lr: three-phase self-inductance of the rotor winding

Ls: stator transient inductances

m: rotor unbalanced mass

MFS: machine fault simulator

MMF: magneto motive force

MCSA: Motor Current Signature Analysis

M-SVM: multi-class Support Vector Machine

N: is the number of rotor bars

NB: is the number of rolling elements

nd: eccentricity order number, (static eccentricity=0, dynamic eccentricity=1)

N-A MEMD: noise-assisted MEMD

OVA: one-versus-all learning strategy for M-SVM

P: number of pole-pairs

P0: average air-gap permeance

r: distance between the centre of rotation and the centre of gravity of the rotor

Rr: resistance of rotor phase winding

s: machine slip

SOM: Self-Organizing Map

SWF: Shorted stator winding fault

SVM: support vector machine

Tr: open-circuit rotor time constant given by Lr/Rr

UBR: Unbalanced rotor fault

x
w_som(i,j): SOM output neurons weight vector

w_svmi: SVM weight term

wk[i]: Wiener filter weights at instant ith

xi: support vectors for a SVM

zb(t): complex signal in space (|x1(t)|, |x2(t)|,t)

zt(t): complex signal in space (|x1(t)|, |x2(t)|, |x3(t)|)

: rolling element contact angle

: nudge-to-zero constant for Wiener filter

0: initial learning rate of SOM

: angular position of r

r: angular position of the rotor with respect to the stator reference

: constant to adjust the rate of convergence of the weights for Wiener filter

: order of the stator time harmonics present in the power supply

: degree of eccentricity

: particular angular position along the stator inner surface

n: phase delay

rd: instantaneous values of direct-axis component of the rotor flux linkage

rq: instantaneous values of quadrature-axis component of the rotor flux linkage

: rotor shaft rotational speed

1: angular stator frequency

sl: angular slip frequency

v: frequency of the kth vibration due to bearing defect

xi
LIST OF RELEVANT PUBLICATIONS

1. W.-Y. Chen, J.-X. Xu, S.K. Panda, A Study on Automatic Machine Condition

Monitoring and Fault Diagnosis for Bearing and Unbalanced Rotor Faults, IEEE

International Symposium on Industrial Electronics (ISIE2011), Poland, Gdansk, 28-

30 Jun 2011, Accepted for publication

2. W.-Y. Chen, J.-X. Xu, S.K. Panda, Application of Artificial Intelligence Techniques

to the Study of Machine Signatures, IEEE International Symposium on Industrial

Electronics (ISIE2012), China, Hangzhou, 28-31 May 2012, Manuscript submitted

for publication

xii
CHAPTER 1: INTRODUCTION

The field of machine condition monitoring and fault diagnosis is vast. A literature

survey; which is presented subsequently, has shown wide ranging diagnostic techniques.

Various machine operation quantities may be used for monitoring the health of a motor,

e.g., partial discharge, thermo-graphic monitoring of hot-spots, chemical content; such as,

oil degradation detection, wear debris detection, machine axial leakage flux, acoustic,

torque, machine power efficiency, machine vibration signal, and motor current signature

[2, 3]. Among these, the technique by analyzing machine stator current is known as

Motor Current Signature Analysis (MCSA) is the state-of-the-art technique [102]. It is a

popular research area where many algorithms have been proposed, but a single effective

method that is able to detect and diagnosis multiple classes of machine fault still elude

researchers.

The current harmonics that is present in the motor current is mainly created by the

machine asymmetries and vibrations due to machine faults. Hence, this project focuses on

two fault detection techniques, namely, vibration signature and MCSA. There are a

number of issues to address in the formulation of a reliable fault detection and diagnosis

scheme [4]:

definition of a single diagnostic procedure for any type of faults

insensitive to and independent of operating conditions

reliable fault detection for position, speed and torque controlled drives

reliable fault detection for drives in time-varying conditions

quantify a stated fault threshold independent of operating conditions

1
1.1 Objectives

With the above issues in mind, this project aims to accomplish two main

objectives, namely,

Objective 1: To investigate and formulate an automatic machine condition monitoring

scheme to detect and diagnose the most common machine fault modes,

namely, bearing and unbalanced rotor fault, that is insensitive to machine

operating speed

Objective 2: To investigate and study the use of MCSA to cover a wider range of

machine fault modes; apart from bearing and unbalanced rotor faults, to

include broken rotor bars and shorted winding faults as well, where

vibration analysis is difficult to diagnose, and to discover unique nonlinear

and non-stationary features for automatic fault classifications

In these studies, computational intelligence are applied. Of particular interests, are

the Self-Organizing Map (SOM), multi-class Support Vector Machine (M-SVM), k-

Nearest Neighbor (k-NN) case-based learning and the Empirical Mode Decomposition

(EMD).

On the first objective, this project has formulated and implemented a simple and

effective data-based scheme, using time-domain vibration data, for the continuous

automatic condition monitoring and diagnosis of bearing and unbalanced rotor faults is

proposed. The key idea is to use a novel normalized cross-correlation sum operator as

2
similarity measure, and in combination with the use k-NN algorithm for the effective

automatic classification of machine faults. This technique is both noise-tolerant and shift-

invariant., It also has a low error rate and insensitive to machine operating speed, as

shown subsequently in this thesis. Further, the diagnosis of these two mechanical faults

using vibration frequency-domain information is also shown, where SOM is used to

discover cluster information on the extracted features in an unsupervised fashion, and an

M-SVM is next used to derive the clusters globally optimal separating hyperplanes for

the automatic classification of the fault modes.

On the second objective, this project use EMD technique to study the motor

current signatures harmonic contents of a healthy machine (HTY), a machine with

bearing fault (BRG), unbalanced rotor fault (UBR), broken rotor bar fault (BRB) and

shorted stator winding fault (SWF). In this project, new unique non-linear and non-

stationary features are discovered for these fault modes at machine operating speed of

20Hz and 30Hz. However, it is also observed in this project that uniqueness of these

features is not obvious at higher speed of 40Hz. With the newly discovered unique

features at 20Hz and 30Hz, future works on automatic fault classifications by a single

effective fault detection and diagnosis scheme based on EMD technique is achievable.

1.2 Thesis Organization

This thesis consists of seven chapters.

3
Chapter 1: Introduction on the issues of formulating a reliable machine fault diagnostic

scheme, and the rationale for condition monitoring using MCSA and vibration

analysis, and sets the stage for stating the objectives of this research. Fault

statistics and literature survey are also carried out to compile the fault

statistics and identifies the most common failure modes. This allows research

effort to be directed at the most common failure modes. Fault diagnostic

technique literature survey is next conducted, to understand how various novel

diagnostic techniques are formulated and the difficulties encountered. This

identifies niche research area where this project adds values.

Chapter 2: Mechanics of machine fault elucidates the origin of different type of

machine faults, presents the various fault vibration signatures and the

expected motor current fault spectrum for MCSA.

Chapter 3: Motor Current Signature and Vibration Signature Analysis explain the

difficulties, challenges and issue of vibration analysis and MCSA techniques

and a new approach is proposed.

Chapter 4: Application of Artificial Intelligence (AI) techniques for fault diagnosis

presents the various AI techniques used in this project.

Chapter 5: A study on Automatic Diagnosis of Bearing and Unbalanced Rotor faults

presents the results of the data-based machine fault detection and diagnosis

4
scheme using time-domain vibration data. It explains how cross-correlation

sum operation in time-domain data series is a suitable similarity measure for

the vibration signatures for the purpose of automatic pattern classification

using k-NN classifier, and presents the fault classification error rate and

confusion matrix. It also presents feature extraction using vibration frequency-

domain information, fault-class clusters study and discovery using

unsupervised learning by SOM, the clusters globally optimal separating

hyperplane derived from a M-SVM using one-versus-all learning strategy, and

the M-SVM classification error rate and confusion matrix.

Chapter 6: A study on Motor Current Signature using Empirical Mode

Decomposition explains the disadvantages of the traditional analysis tool for

MCSA using Fourier-based and Wavelet transform, the rationale for using

EMD techniques as an effective tool for the analysis of machine current

signatures, with a view to discover new information that Fourier and Wavelet

transform may not be able to reveal.

Chapter 7: Conclusion

5
In the next, a fault mode statistics survey is carried out with a view to identify the

most commonly occurring machine fault modes. The survey article in 1985 [5] reveals

that bearing fault is the most common machine fault mode. The followings further survey

and present the situation in the 1990s.

1.3 Fault Mode Statistics Survey

In [1], a detail survey on fault statistics was done in 2008. In this comprehensive

survey, several sources; including the private communication between the author and an

original equipment manufacturer, referenced about 80 journal papers published in IEEE

and IEE on the subject over the past 26 years since 2008, were used. The table below

summaries the survey result.

Table 1.1: Summary of percentage of each of the failure mode.

Failure Modes %
Bearing 52.5%
Stator Related 22.0%
Rotor Related 13.0%
Others 12.5%

A majority of the failure mode is due to bearing (52.5%). If bearing fault is

combined with stator related faults, this together accounted for more than 87.5% of the

total faults. Further fault information from referenced articles [6-13] is conducted. The

following table summarizes the findings.

6
Table 1.2: Fault statistics on 8 surveyed articles. (*MC denotes Most Common fault)

Referenced articles [6] [7] [8] [9] [10] [11] [12] [13]
Bearing 45% 50% - 45% 52% 41% 50% 40%
Stator Related - 40% - - 25% 37% 40% -
Rotor Related - 10% 10% - 6% 10% 10% -
Others - - - - 17% 12% - -

By taking the average across the rows of Table 1.2, the following table is derived.

Table 1.3: Percentage of each of the failure mode derived from Table 1.2.

Failure Modes %
Bearing 46.1%
Stator Related 35.5%
Rotor Related 9.2%
Others 14.5%

Table 1.3 presents a similar failure mode statistics as in Table 1.1. Bearing fault

accounted for more than half the total faults, and the second most common fault is the

stator related faults. These two faults together accounts for more than at least 65% of the

total faults. This finding is consistent with that in Table 1.1. As such, from Table 1.3,

bearing faults accounts for about half of the fault modes, hence it is worthwhile to focus

research effort on bearing faults. If the fault coverage is extended to include rotor and

stator related faults e.g., unbalanced rotor, broken rotor bars and shorted stator windings,

about 85% of all fault modes is covered. With this information, objective 2, presented

above, is set.

7
1.4 Literature Survey

This section presents the literature survey to shed lights on the various techniques

used and progress made. The survey focuses on machine vibration signature and MCSA,

as these techniques are able to detect bearing, unbalanced rotor, broken rotor bars and

shorted stator windings fault modes [1].

1.4.1 Vibration Signature Analysis

Vibration signature analysis is the most commonly monitored operation parameter

for detection and diagnosis of mechanical fault modes e.g., bearing defects and

eccentricities [14]. Using Wavelet techniques to preprocess the vibration signal is

popular. The articles [15-17] presented such a study where the wavelet coefficients were

the feature vectors. It is interesting to note that, in Elsevier collection of articles, the use

of Morlet wavelet basis function is common, whereas in IEEE collection of articles,

Daubechies wavelet is popular. Higher order spectral analysis using Bispectral transform,

is used for noise suppression, detection of non-Gaussian data, and to detect nonlinearity

of the fault information in [18]. Envelope analysis is used in [19, 20] for feature

extraction. Article [21] showed that combining features extracted from Mel-frequency

Cepstral Coefficients (MFCC) and Kurtosis, are effective for diagnosing bearing faults.

Independent component analysis can be used to extract features from vibration signatures

for bearing fault diagnosis [22]. After feature extraction, AI techniques e.g., neural

network, SVM, SOM, are next used to predict fault modes. Excellent examples of works

done are [23-26].

8
However, the most interesting technique is the use of EMD for the analysis of

machine vibration signatures, where the basis function is derived based on empirical data

in terms of Intrinsic Mode Functions (IMFs). Articles [27-31] presented such a study.

The IMFs thus derived are the feature vectors for fault diagnosis.

1.4.2 Motor Current Signature Analysis

A survey on MCSA technique reveals that the approaches are numerous and

wide-ranging. The articles maybe broadly categorized into: reviews, model construction

for fault modes, feature extraction techniques, and the use of computational intelligence

for machine fault diagnosis.

Over the years, a series of reviews have been made by [1, 4, 7, 32-37]. They offer

a good overview on how progress has been made. A notable change is the progress from

the use of traditional Fourier transform e.g., Fast Fourier Transform (FFT), to analyze

motor current signatures, and the increasingly popular use of Wavelet transform e.g.,

Discrete Wavelet Packet transform, to identify fault spectrum and extract unique features

for fault diagnosis. FFT is the traditional tool for MCSA where by locating individual

fault spectrum, the machine fault is diagnosed. This approach is successful for broken

rotor bars and eccentricities faults [11, 38, 39].

In [40, 41], a good comparative study of the various techniques for MCSA for

broken rotor bar and air-gap eccentricities is presented. In [42], a good review is given on

the various diagnosis methods for stator voltage asymmetry and rotor broken bars.

However, these techniques are mainly Fourier based. It is worth to note that, as the fault

spectrum is functions of machine slip, it is particularly difficult to locate the fault


9
spectrum in low slip situation. Further, since motor current signature is non-linear and

non-stationary in nature [43], as such, Wavelet multi-resolution decomposition approach

is popular. In [44-52], Wavelet transform is used to decompose the motor current into

various approximate and detail levels wavelet coefficients, and features are extracted

from these coefficients for fault diagnosis. Diagnoses of bearing, broken rotor bar,

eccentricities faults were reported. However, careful selection of a wavelet basis function

is not trivial [40, 49], as wavelet decomposition is a convolution computation of machine

signature with wavelet basis function and hence a different choice of basis function

produces different results.

Beside wavelet technique, other high resolution frequency-domain techniques e.g.,

Eigen-analysis Multiple Signal Classification (MUSIC) spectrum Estimator, Welch, Burg

[53] are used. In [54], these techniques are applied for the detection of rotor cage faults.

In [8], a detail study using different auto-regressive parametric methods e.g., Yule-

Walker, and the possibility of using a lower sampling rate were explored. The article [55],

showed that a sliding window ROOT-MUSIC algorithm for bearing fault diagnosis is

possible, and in [56] a novel combination of maximum covariance method for frequency

tracking and Zoom-FFT technique, to selectively increase the frequency resolution of the

frequency range of interest for fault diagnosis were demonstrated. Other methods

incorporating temporal information of the motor current using higher order statistic, such

as, spectral kurtosis is used in [57].

With the popular use of inverter speed controller for machine, the effect of PWM

inverter harmonics on MCSA was investigated in [58, 59]. In [60], inverter input and

output current were studied with a view to detect the twice fundamental frequency

10
harmonics for diagnosis of rotor faults. It is shown that detection of these harmonics is

possible using inverter input current near zero frequency.

To extend the type of fault coverage, stator winding faults are investigated as well.

In [61], a novel diagnostic indicator for stator winding fault, that does not involve ground

fault, is formulated using positive and negative sequence line-voltage and line-current

information. The key idea is that various indicators were determined at various machine

speeds, and a kind of lookup table was created for diagnosis at different machine

operating speed. However, the use of line-voltage, made the method invasive, where

potential transformer (PT) is required. The article [62] presented a method using

Extended Parks Vector Approach (EPVA), where instead of observing the ovality of the

signature in the D-Q plane, the frequency-domain information revealed the presence of

fault for stator winding. This approach may be used for bearing fault as well [10].

Survey also revealed other innovative approaches. Instead of using steady-state

information, transient start-stop information may be used for diagnosis as well, as shown

in [63, 64]. In [6], monitoring instantaneous power factor and motor efficiency [65] are

possible approaches too. An interesting approach is presented in [66], where a noise

cancellation technique was used for diagnosing general roughness fault. The scheme

assumed that all frequencies that are not related to the bearing faults, e.g., supply

frequency, supply unbalance harmonics, the eccentricity harmonics, the slot harmonics,

saturation harmonics and interferences from environmental sources are regarded as noise

and are estimated by a Wiener Filter. All these noise components are then cancelled out

by their estimate in a real-time manner. The remaining components are hence related to

11
bearing fault, and the RMS value of this noise-cancelled signal is next calculated online

as fault index, with impending fault as an increase in fault index.

Model-based approach aims to construct a mathematical model of the machine

and thereby using the model to analysis and predict fault mode [67-74]. Finite element

analysis is popular for simulating and studying of fault mode; especially for broken rotor

bar. Winding-Function model is specially formulated for modeling air-gap eccentricity as

shown in [75, 76].

Data-based approach collects real machine fault data rather than using

sophisticated mathematical model to calculate them, and uses these data as examples for

fault diagnosis. These examples are collected from fault simulator. With the fault data

available, AI techniques e.g., SOM, neural network, fuzzy logic, M-SVM etc., are used to

automatically classify the faults [77-81]. Other modeling approaches are possible, such as,

[12] use Autoregressive (AR) Spectrum Estimation; a form of parametric spectrum

estimation technique to model a healthy motor signature, and deviation from this baseline

indicates a bearing general roughness fault. However, this method requires the use of

notch-filter to remove the dominant fundamental frequency and a series of filter banks to

remove the harmonics of other possible faults e.g., unbalance voltage source, cyclical

load torque, eccentricities, broken rotor bars, rotor slotting effects etc. This adds to the

complexity of this method. Recently, the use of Independent Component Analysis (ICA)

has achieved remarkable results, where the diagnostic procedure is independent of

machine operation speed for the diagnosis of bearing and broken rotor bars [82-84].

12
EMD is applied for the diagnosis of shorted stator winding fault and broken rotor

bars in [85, 86]. However, in each of the study, only one fault mode was covered. This

runs the risk of mis-diagnosing a fault, as another fault signatures not covered in the

study, may produce similar features. This project aims to widen the scope of motor

current signature study to cover more fault modes. Figure 1.1 illustrates the approaches of

this project to investigate the automatic fault diagnosis of AC synchronous machine. In

the next, the mechanics of machine fault mode is presented.

AC synchronous machine fault diagnosis

Vibration signatures Motor current signatures

Unbalanced Rotor Bar fault Broken Rotor Bar fault

Bearing fault Unbalanced Rotor Bar fault

Bearing fault

Shorted Winding fault

Time-domain analysis Time-domain analysis

Normalized Cross-correlation Empirical Mode Decomposition

Wiener filter

Frequency-domain analysis Frequency-domain analysis

Hilbert Hwang Transform


Fast Fourier Transform

Figure 1.1: Approaches of this project to investigate machine fault diagnosis.

13
CHAPTER 2: MECHANICS OF MACHINE FAULT
MODES

Machine is a moving magnetic apparatus. Its various parts are subject to kinetic

energy, magnetic energy, operational thermal stress and harsh environmental conditions

e.g., humidity and chemical corrosion, causing wear and tear, and ultimately numerous

types of fault may develop. Faults are categorized as electrical or mechanical faults.

Electrical failure modes are mostly insulation failure of core, stator winding, rotor

winding and rotor bar breakage. Mechanical failure modes are mostly bearing failure,

rotor eccentricities e.g., unbalanced rotor; caused for example by wear and tear,

accumulation of deposits and temperature changes etc., and creating unequal distribution

of rotor mass.

An ideal healthy machine has physical constructional symmetry, such as, an

equally spaced and constant air-gap length, equal rotor resistances in the rotor and stator

windings and a balanced rotor. However, there are inherent construction asymmetries and

imperfections in an actual healthy machine, for example, the air-gap length is not

perfectly spaced and as the rotor rotates the air-gap length varies, and the rotor and stator

winding resistances for each phase are not the same. These minor physical asymmetries

generate unequal magnetic flux and as a result magnetic force induced vibrations are

caused. Hence, a healthy machine is expected to generate some low magnitude

vibrations.

A faulty machine has much more severe physical and electrical asymmetries,

generating larger unequal magnetic flux, and the resultant magnetic force creates larger

vibrations. The resulting vibrations, which are a series of movement of the machine parts

14
cause variations in magnetic permanence of the air-gap. The stator windings, acting like a

transducer, pick up these stray magnetic fluxes and induce current harmonics into the

stator current. In the next presents the detail mechanics of some major fault modes,

namely, 1) eccentricity, 2) unbalanced rotor, 3) bearing general roughness, 6) bearings

faults, 5) broken rotor bar, and 6) shorted stator winding fault.

2.1 Eccentricity

Induction machine may fail due to air-gap eccentricity. Air-gap eccentricity

occurs due to shaft deflection, inaccurate positioning of the rotor with respect to stator,

bearing wear, stator core movement etc. Air-gap eccentricity creates unbalanced radial

forces and hence unbalanced magnetic pull that may cause rotor-to-stator rub, and

ultimately results in damage of the stator core and stator windings.

2.1.1 Static Eccentricity

There are two types of air-gap eccentricity: static and dynamic eccentricity. In

static air- gap eccentricity, the position of the minimal radial air-gap length is fixed in

space. For example, static air-gap eccentricity may be caused by the ovality shaped of the

core, or by incorrect positioning of the stator or rotor during commissioning stage. The

air-gap of static eccentricity is independent of r, the angular position of the rotor with

respect to the stator reference, and is given by [87]

g ( ) g 0 g 0 cos (0,1) (2.1)

where is the degree of eccentricity and g0 is the radial air-gap length in the case of a

uniform air-gap, and is the particular angular position along the stator inner surface.

15
2.1.1.1 Static Eccentricity Motor Current Signature

With the motion of the air-gap given in (2.1), it can be shown that the harmonic

frequency components in the stator currents of an induction machine with static air-gap

eccentricity are given by [87],

1 s
Fstatic _ ECC kN f s k 1,2,3...
P (2.2)

where fs is the fundamental supply frequency, k an integer, N number of rotor slots, nd

eccentricity order number, (static eccentricity is nd =0, dynamic eccentricity is nd =1), P is

the number of pole-pairs, is the order of the stator time harmonics that are present in the

power supply driving the motor, taking the values 1, 3, 5, etc, and s the slip.

2.1.2 Dynamic Eccentricity

In the case of dynamic eccentricity, the centre of the rotor is not at the centre of

rotation and the position of minimum air-gap rotates and varies with the rotor. This

misalignment maybe caused for example by, a bent rotor shaft, bearing wear or

misalignment, mechanical resonance at critical speed, etc. The air-gap of dynamic

eccentricity is given by [59]

(2.3)
g ( , r ) g 0 g 0 cos( r ) (0,1)

where is the degree of eccentricity, r is the angular position of the rotor with respect to

the stator reference, g0 is the radial air-gap length in the case of a uniform air-gap, and

16
is the particular angular position along the stator inner surface. The corresponding

permeance variation due to dynamic eccentricity is [59],

Pg ( , r ) P0 Pn cos(n( r ) n )
(2.4)
n

where P0 is the average air-gap permeance and n is the phase delay.

2.1.2.1 Dynamic Eccentricity Motor Current Signature

Due to permeance variation as a result of eccentricity, side-band components

appear around the slot harmonics in the stator line current frequency spectrum. The

frequency components in the stator currents of an induction machine with to dynamic air-

gap eccentricity are given by [3, 88],

1 s
Fdyn _ ECC (kN n d ) f s k 1,2,3...
P (2.5)

where fs is the fundamental supply frequency, k an integer, N number of rotor slots, nd

eccentricity order number, (static eccentricity is nd =0, dynamic eccentricity is nd =1), P is

the number of pole-pairs, is the harmonic of the stator magneto motive force (MMF)

time harmonics, given by 1, 3, 5, etc., and s the slip.

2.1.3 Mixed Eccentricity Motor Current Signature

However, in a practical machine, both static and dynamic eccentricities are

present. This mixed eccentricity creates the following harmonics in the machine current

[4],
1 s
Fmix _ ECC 1 k fs k 1,2,3...
P (2.6)
17
With the use of VSI, additional harmonics are introduced [59, 89],

Fvsi _ ECC h f s k f r h, k 1,2,3... (2.7)

where h is the inverter harmonic order, fs is the fundamental supply frequency and fr is

the rotor frequency. It is hence possible to detect air-gap eccentricity by monitoring

motor current.

2.2 Unbalanced Rotor Fault

Unbalance rotor is a type of eccentricity fault where the off-center rotation of the

rotor is caused by unbalanced mass rather than bent rotor shaft. It is the most common

source of excessive vibration [90, 91]. Possible causes are, asymmetrical mass

distribution of the rotating element as a result of wear, erosion, material buildup, thermal

expansion or contraction, causing shaft bending or misalignment. As a result, the centre

of gravity of the rotating element does not coincide with the centre of rotation, and at the

point of unbalanced mass creates a synchronous radial perturbation force (Fc), causing a

forced vibration. This phenomenon is described by the following expression, assuming a

rigid isotropic rotor system [14],

(2.8)
Fc m r 2 e j ( t )

where m is the unbalanced mass, r is the distance between the centre of rotation and the

centre of gravity of the rotor, is the shaft rotational speed, is the angular position of r

and j is the complex operator. Figure 2.1 illustrates this.

18
Fc

Machine centerline and


center of rotation
m
r
Rotor

Machine center of gravity

Figure 2.1: Perturbation force (Fc) created by unbalanced mass (m) rotating at .

Figure 2.1 shows some sample vibration signatures of unbalanced rotor fault at

various machine speeds. A characteristic oscillatory sine wave is observed.

Figure 2.2: Unbalanced rotor fault signatures at various machine speeds.

19
2.2.1 Unbalanced Rotor Fault Motor Current Signature

With the motion of the rotor described by Eq. (3.8), the expected current

harmonics for a machine with unbalanced rotor is given by [92],

1 s
FUBR 1 k fs k 1,2,3... (2.9)
P

where fs is the supply frequency and s is the machine slip.

2.3 Bearing Faults

Machines with rolling element bearings have moving bearings e.g., spherical

balls, tapered rollers or cylindrical rollers, to support the rotating shaft. The machine

bearing assembly consists of four basic components, namely, the outer race, inner race,

rolling elements which are the ball bearings inside the cage, and the retainer or the cage.

The balls are bounded by the cage, which ensures a uniform distance between the balls

and prevents ball-to-ball contacts. These rolling elements are always in metal-to-metal

contact with the inner and outer raceway, and as a result are subject to constant wear and

tear. Figure 2.3 is an illustration of the construction of the bearing assembly and the

various type of bearing faults.

20
a
d
b
e

c f
g

a. Outer raceway fault e. Inner raceway


b. Rolling element fault f. Shaft
c. Inner raceway fault g. Rolling element
d. Retainer h. Outer raceway

Figure 2.3: Bearing assembly.

Bearing and raceway wear and tear present initially as general roughness and

progresses to metal fatigue, and ultimately spall and chip on the surface of the rolling

elements [93]. Figure 2.4 and 2.5 show severely chipped rolling elements and spalled

raceway faults. These defective surfaces on these components are a source of machine

vibration. A chipped rolling element spins as it revolves around the raceway. When it is

in contact with the defective surface of the raceway, an impact pulse is produced, creating

a free vibration. In the absence of significant damping medium in the bearing assembly,

the impact pulses decay exponentially.

Figure 2.4: Defective rolling elements (adopted from [93]).

21
Spalled

Spalled

Figure 2.5: Raceway faults (adopted from [93]).

2.3.1 Bearing Faults Vibration Signatures

There are four basic motions that describe the dynamics of faulty bearing

movement, namely, cage, outer race, inner race or rolling elements. Each fault generates

a unique natural frequency. The following equations show the natural frequencies

associated with each of the bearing single-point defect, where the cage fault, outer race

fault, inner race fault and rolling element fault frequencies are FC, FO, FI and FB

respectively [59],

1 Db cos
FC FR 1
2 Dc (2.10)

N B Db cos
FO FR 1
2 Dc (2.11)

N B Db cos
FI FR 1
Dc
(2.12)
2

22
Dc Db cos
2

FB FR 1
Db Dc
(2.14)

where FR is the rotor mechanical frequency, NB is the number of rolling elements, Dc is

the rolling element pitch, Db is the diameter of the rolling element, and is the rolling

element contact angle. Figure 2.6 illustrates this. Therefore, these fault frequencies are

functions of the bearing geometry, the number of rolling elements, and the bearing

rotational speed.
Contact Angle ()

Rolling Element
diameter (Db)

Pitch (Dc)

Figure 2.6: Rolling element pitch, diameter and contact angle of a bearing.

Figure 2.7, 2.8 and 2.9 show the fault vibration signatures, measured in

acceleration (m/s2), of a faulty rolling element, inner raceway and outer raceway at

different machine operating speeds.

23
Figure 2.7: Rolling element fault signatures at various machine speeds.

Figure 2.8: Inner raceway fault signatures at various machine speeds.

24
Figure 2.9: Outer raceway fault signatures at various machine speeds.

2.3.2 Bearing Faults Motor Current Signatures

Bearing defect causes minute radial movement of the rotor, and hence is a kind of

dynamic eccentricity. However, the difference between dynamic eccentricity and bearing

fault is the characteristic of the mechanical oscillations. For the former, an eccentric rotor

causes a non-uniform sinusoidal air-gap, but for the latter, bearing defect causes an

instantaneous mechanical impulse displacement in the air-gap, giving rise to vibrations

that cause air-gap permeance variation that is a complex sum of an infinite number of

rotating eccentricities [94]. With instant eccentricities generated by the bearing fault, the

air-gap is given by [59],


g ( , r ) g 0 g 0 cos( v t )
k
(2.15)

25
where v is the frequency of the kth vibration due to bearing defect, and the permeance

variation are of the machine is [59],

Pg ( , r ) P0 Pn, k cos(n(n v t n, k ) (2.16)


k n
Therefore, the periodical changes in the machine permeance, in turn, creates

harmonics in the stator current shown below [59],

FBRG f s k f v k 1,2,3... (2.17)

where fs is the supply frequency and fv is FC, FO, FI or FB. With the use of inverter, there

is interaction between the inverter harmonics and bearing fault induced harmonics and

the expected bearing fault spectrum is [59],


FBRG h f s k f v k 1,2,3... (2.18)

where h is the inverter harmonic order.

2.4 Bearing General Roughness

It was reported in the literature that, there should be a distinction between bearing

fault and general roughness of the bearing [12]. General roughness of bearing is an early

sign of impending bearing fault. However, it does not show a distinctive failure mode like

bearing fault whereby clear and visible point-faults are developed e.g., cracks, pitting and

other localized damages. Normally, general roughness is simulated by de-greasing the

bearing, thus causing great friction of bearing movement and hence general roughness.

Whereas for bearing faults, it is simulated by creating holes e.g., drilling, on the raceway

assembly. Different level of fault severity can be created by creating holes of various

diameters. General roughness is reported to cause a general increase in the noise level in

the motor signature, and does not exhibit any particular frequency spikes. Generalized

26
roughness fault is subtle and does not have clear distinguishable defects. Therefore, it

does not have a unique fault frequency, but rather, it manifests as a general and

unpredictable increase in magnitude and broadband changes in vibration and stator

current frequencies. However, general roughness is considered as a kind of eccentricity

fault [95]. Therefore, instead of measuring the vibration frequencies, the machine

condition can be monitored by stator current harmonics to detect harmonics created by

the minute variations in the machine permeance.

2.5 Broken Rotor Bar Motor Current Signature

Rotating machine subjects its rotor to prolong kinetic, electrical and thermal

stresses, and breakage results as material fatigue develops over time. Breakage increases

the rotor resistance of the broken rotor bars and causes electrical asymmetry and

distortion of the rotor bar currents, and hence distorts the three-phase magnetic field. The

rotor MMF is distorted as well. This distorted rotor MMF consists of a forward and

backward rotating wave with respect to the rotor fixed reference frame. The former is the

main magnetic field and the latter is due to the rotor electrical asymmetry caused by the

breakage. The backward travelling wave induces a stator voltage harmonic component at

the frequency (12s)fs where fs is the stator supply frequency and s is the slip. This stator

voltage harmonics in turns creates a stator current harmonic of the same frequency [72],

FBRB 1 2 s f s k 1,2,3... (2.19)

The interaction of these side band currents with flux and the speed ripple creates

additional harmonics at frequency [72],

FBRB _ lu 1 2 k s f s k 1,2,3... (2.20)

27
where fs is the supply frequency, s is the machine slip, the difference gives the lower

sideband and the sum gives the upper sideband. These frequencies are a function of the

machine slip (s). Therefore, these frequencies are dynamic in nature and vary as the

operational condition of the motor varies. At higher slip, and spectra are further away

from fs, and at lower slip the spectrum lines are close to fs and are difficult to detect.

2.6 Shorted Stator Winding Fault Motor Current Signature

The most common kind of fault related to stator winding of induction motors are:

phase-to-ground, phase-to-phase and short-circuit of coils of the same or different phase

(turn-to-turn fault). These insulation faults maybe caused by hot spots in the stator

winding, oil contamination, moisture, dirt, electrical discharges, slack core lamination,

cooling system failure [2].

In this fault mode, the winding turn-to-turn fault is the subject of interest for

condition monitoring, as such short-circuit fault involving different phase is difficult

detected by the usual machine protection relays. If it persists undetected, causes heating

and ultimately progress rapidly to phase-ground or phase-phase faults with little

warnings, damaging the machine core permanently. Short-circuited turns on the stator of

the induction motor causes asymmetry of the three-phase stator winding, and the effect is

the presence of three-phase negative sequence currents. The diagnosis of shorted turns

using MCSA is to detect the frequency components in Eq. (2.21) since the rotating flux

induces corresponding harmonics in the stator winding [96],

1 s
FSWF kN 1 f s k 1,2,3... (2.21)
P

28
where N is the number of rotor bars, P is the number of pole-pairs, s is the induction

machine slip, fs is the supply frequency.

2.7 Healthy Machine Signature

Serving as a reference, healthy machine signatures are recorded. A healthy

machine has a low level of vibration, as observed in Figure 2.10, and may contain

harmonics due to inherent physical constructional asymmetries and imperfections.

Figure 2.10: Healthy machine signatures at various machine speeds.

29
2.8 Dynamic Estimation of the Machine Slip

From the preceding sections, it is clear that some of the fault spectrums are

functions of machine slip (s). Hence, to locate the fault spectrum, machine slip has to be

determined. This section presents a method for determining machine slip. It is possible to

construct a slip-sensing device by using the instantaneous values of the stator voltages

and currents of the induction motor. This method is referenced from Peter Vas,

Parameter Estimation, Condition monitoring, and diagnosis of Electrical Machines.

Using the dynamic model of an induction machine, the angular slip frequency sl

is obtained from the stator voltages and currents of the machine. The instantaneous

machine slip, s, can thus be obtained as,


sl
s , (2.22)
1
where sl is the angular slip frequency and 1 is the angular stator frequency. Using the

following expression, the angular slip frequency can be obtained,

Lm
rd i sQ rq i sD
Tr
sl , (2.23)
rd rq
2 2

where isD is the instantaneous values of direct-axis component of monitored stator

current, isQ is the instantaneous values of quadrature-axis component of the monitored

stator current, rd is the instantaneous values of direct-axis component of the rotor flux

linkage, rq is the instantaneous values of quadrature-axis component of the rotor flux

linkage, Tr is the open-circuit rotor time constant given by Lr/Rr, where Lr is three-phase

30
self-inductance of the rotor winding, Rr is the resistance of rotor phase winding and Lm is

the three-phase magnetizing inductance.

The instantaneous values of direct- and quadrature-axis components of the rotor

flux linkage rq is calculated as,

d '
dt
L

r r u s ( R s L s p )i s .
Lm
'
(2.24)

where Ls is the stator transient inductances. With an integrator 1/s, rq is calculated.

Therefore, with the instantaneous values of the terminal quantities, usD, usQ, isD

and isQ measured, the machine parameters Lr, Rr, Lm and Ls known, the rotor flux linkage

rq is calculated, and in turn the instantaneous machine slip (s) is determined using Eq.

(2.23). Similar schemes based on slip determination have indeed been implemented in

[97, 98].

31
CHAPTER 3: MOTOR CURRENT SIGNATURE
AND VIBRATION SIGNATURE ANALYSIS

MCSA technique is a popular method of monitoring the condition of a motor

where the stator current is used for fault diagnosis. It has been used in many industrial

cases since 1980s with good results [11, 38]. Its history dates back to early 1970s when

the US Nuclear Regulatory Commission needs to check the conditions of motors located

inside the nuclear reactors using non-intrusive techniques. Oak Ridge National Labs

initiated research for this technology. It was found that motor current was always

modulated by any faults conditions inside the motor. This is because a faulty machine

creates asymmetries. These physical asymmetries generate vibrations. The resulting

vibrations, which are a series of minute movement of the machine parts cause variations

in magnetic permeance of the air-gap. The stator windings, acting like a transducer, pick

up these stray fluxes and hence induce current harmonics into the stator current.

Therefore by doing spectrum analysis of the motor current signals, faults can be detected

online without disturbing its operation e.g., shutdown.

3.1 Motor Current signal Analysis or Vibration Analysis?

MCSA is the state-of-the-art techniques [102]. MCSA technique has many

advantages. It is non-invasive, where stator current is measured simply by using current

transformers (CT) and no other special equipment is needed. By simply processing the

motor current signals, fault diagnostic information is extracted. Numerous faults can be

diagnosed using MCSA: damaged rotor bar, such as, broken rotor bars, static or dynamic

32
eccentricities, for example, due to unbalanced rotor, bearing defects, stator winding

shorted [1, 3].

As such, condition of a machine can be monitored and diagnosed at a remote

location, which may be located in a hazardous environment or inaccessible location, and

the machine does not need to be physically disassembled for diagnosis where individual

parts are inspected for signs of faults. Motor current is highly sensitive to changes in the

magnetic flux of the machine, any minute changes, due for example to machine faults,

induces harmonics in the motor current. Therefore, prognosis of incipient fault is also

made possible by MCSA. This way fault is pre-empted and spare parts ordered well in

advance before the actual faults develop, and allows for speedy repairs and shortened

shutdown time. These advantages have greatly motivated researches in MCSA. However,

there are a few issues with MCSA as presented below.

3.2 Challenges of Motor Current Signature Analysis

Fault signals are nonlinear and non-stationary. From Eq. (2.2), (2.5), (2.6), (2.9),

(2.10-2.12), (2.14), (2.19-2.21), fault frequencies are functions of the machine slip and

require the calculation of instantaneous machine slip. Instantaneous machine slip can be

calculated using Eq. (2.23) and Eq. (2.24), as shown above. However, the method is

invasive as it requires the installation of Potential Transformer (PT); a direct connection

to live electric bus-bar is needed for voltage sensing, and requires accurate machine

parameters. It is also particularly difficult to locate the fault spectrum in low slips

situations, where the fault spectrum is very close to the fundamental supply frequency.

33
For bearing faults, as shown in Eq. (2.10-2.14), accurate dimensional

measurements of the machine parts e.g., contact angle, rolling element diameter etc., is

crucial for successful location of the fault spectrum. Therefore, a method that is machine

parameter-free is desirable.

Fault signatures have extremely low signal-to-noise ratio. Typically the fault

signal magnitude is in the order of 10-4 volts and the is very close to the noise floor, and a

suitably high sampling rate is needed to ensure sufficient harmonic information is

captured, and yet at the same time a sufficiently high frequency resolution is required.

When high frequency resolution is required, this posed a constraint that limits low

sampling rate to be used, in order to have better frequency resolution when using FFT

analysis.

Fault spectrum contaminated by noises is a challenge. Such as by machine

inherent harmonics that arise from constructional asymmetries, the use of variable speed

drive introduces additional harmonics into the stator current, contaminated by harmonics

from supply unbalance e.g., unequal loading of single-phase loads on a three-phase

supply source, and by harmonics due to nonlinear load e.g., dirty sources from

nonlinear load such as IT digital devices.

An inspection of the expressions given for the fault spectrum of eccentricities

fault and shorted stator windings, show that these expressions produce similar harmonics.

These expressions are reproduced below. The harmonics of is machine eccentricities is

given by,
1 s
FECC (kN nd ) f s k 1,2,3... (3.1)
P

34
and for unbalanced rotor fault,
1 s
FUBR 1 k fs k 1,2,3... (3.2)
P

and shorted stator windings fault,

1 s (3.3)
FSWF kN 1 f s k 1,2,3...
P

Hence, it is difficult to differentiate these set of harmonics caused by three

different fault modes, where for example, shorted stator winding fault may be confused

with those that may arise due to inherent eccentricities [96, 99, 100], especially under

extreme low signal-to-noise ratio situation and presence of varying load torque effect

[101]. There exist risks of mis-diagnosing shorted stator windings with eccentricities e.g.,

unbalanced rotor.

3.3 Discussions: Proposed Ensemble Spectrum Approach

[102] presents a good comparison on the fault diagnostic technique based on

vibration and current signature analysis, while vibration signature is a good indicator for

diagnosing machine faults, current signature offers numerous advantages and with

suitable analytic tools both are effective tools for machine diagnosis.

As the fault mode survey in the preceding section has shown, bearing fault and

unbalanced rotor form the majority of the machine fault modes, and it is difficult to detect

and differentiate unbalanced rotor and bearing faults using motor current signatures

spectrum, thus vibration signatures are used instead for diagnosis of these two fault

modes.

35
Since machine instantaneous slip calculation for the purpose of determining

individual fault spectrum is difficult and invasive, it is proposed that a range of spectrum

is considered instead. This way, ensembles of frequency lines are together considered to

detect the fault. By identifying the unique fault spectrum range, machine faults is thus

detected and diagnosed. To do this, the traditional Fourier and Wavelet based frequency

domain analysis tools is not used, since motor current signature is nonlinear and non-

stationary. EMD is used instead where no a prior assumption is made about the machine

signatures, but by using empirical data only.

36
CHAPTER 4: ARTIFICIAL INTELLIGENCE
TECHNIQUES FOR MACHINE FAULT DIAGNOSIS

An approach to machine fault diagnosis is the data-based method, whereby

machine fault diagnosis is to associate an unseen machine diagnostic parameters e.g.,

vibration signals, stator motor current spectrum, torque variations etc., with the various

known fault parameters, stored a priori in a database. This fault data base is next used as

training samples for machine learning, after which the fault knowledge is stored in the

neuronal weights for subsequent automatic fault detection and diagnosis. As such,

machine fault diagnosis is solved as a pattern recognition problem. In this chapter,

various AI techniques used in the project are presented.

4.1 k-Nearest Neighbour (k-NN)

k-NN algorithm is an empirical classification method, where it uses actual data of

the subject matter, in this case machine signatures, to serve as model to solve the class

prediction problem. Given labeled training data set D={(y1,1) (y2,2) (y3,3) (yn,n)},

where yn are the templates and n its class, 1-NN algorithm finds a template among D

set, that is closest; based on some similarity measure S(y,), to the unseen test vector y,

and assign y to the class which belongs. Hence, by using a suitable similarity measure,

the predicted class , is given by,

y arg max [S1 ( y, y1 ) S2 ( y, y 2 ) Sn ( y, y n )], y (4.1)


n

37
k-NN classifier has been used widely in many applications, such as, in handwritten

character recognition [103]. It has also been used successfully for sub-space learning and

dimensionality reduction [104]. It is proposed to use k-NN classifier for machine fault

diagnosis. It is a type of classifier based on non-parametric statistical pattern recognition,

where the probability density function assumes arbitrary distributions.

4.1.1 k-NN Algorithm

Given data set D={(y1,1) (y2,2) (y3,3) (yn,n)}, where yn are the templates

and n its class, the k-NN algorithm is,

1: initialize programme parameters and set a value for k, the number of nearest

neighbors to feature vector

2: select a feature vector from the test set

3: calculate similarity metric for all the prototypes with the feature vector

4: choose the k prototypes that is most similar to the feature vector

5: within the chosen k prototypes count the votes

6: decide the winner

7: update confusion matrix and repeat 2 for the next feature vector

4.2 Self-Organizing Map (SOM)

SOM is a type of neural network that is trained using unsupervised learning to

produce a low-dimensional; normally two-dimensional, discretized representation of the

input space of the training samples, called a map. This makes SOM useful for visualizing

38
low-dimensional views of high-dimensional data. SOM is different from other artificial

neural networks, in the sense that they use a neighborhood function to preserve the

topographical properties of the input space [105, 106]. It was invented by Professor

Teuvo Kohonen, Helsinki University of Technology, Finland, during the 1960s, and it is

sometimes called a Kohonen map.

4.2.1 Structure and Operation of SOM

SOM consists of two layers; an input layer and an output layer in a planar 2D grid

of NxM arrays. All input nodes are connected to all the output nodes. It is a feed-forward

network. The Figure 5.1 shows the basic SOM architecture.

Figure 4.1: Connections between the input and output neurons of SOM.

At the start of the SOM algorithm, each element of the weight vector is initialized

randomly to a real number between 0 and 1. Each data set is arranged column-wise in a

matrix. Other SOM parameters are also specified, namely, the SOM size (NxM), the
39
initial learning rate, the initial effective width of the SOM, and number of learning

iterations. This project uses a special linear learning function rather than an exponential

learning function to reduce the learning time [107],

n (4.2)
(n) 0 * 1
iteration

where (n) is the learning rate as a function of learning step n, iteration the number of

defined learning steps, and 0 the initial learning rate. Figure 4.2 shows this linearly

decaying learning rate.

Figure 4.2: Linear decaying learning rate versus learning steps of a SOM.

40
4.2.2 SOM Algorithm

The SOM algorithm is,

1: initialize weight vectors of each output neuron randomly

2: normalization of the input vectors

x mean( x) (4.3)
x'
std ( x)

3: select an input vector, x(:,n), randomly

4: WHILE learning iteration is less than specified, DO for each output neurons weight

vector, w_som(i,j)

calculate the Euclidean distance between the input and weight vector

locate the output neuron that has the smallest distance, the Best Matching Unit

(BMU),

eud arg min zi w _ somij (n) , n 1,2,3..... (4.4)


i

5: update BMU and the neurons in the neighborhood of BMU, using the adaptive

updating rule,
w _ somij i j (n) ( z (n) w _ somij (n)) (n), n 1,2,3..... for BMU ' s neighbours
w _ somij (n 1)
w _ somi j ( z (n) w _ somij (n)) (n), n 1,2,3..... for BMU
(4.5)

where Hij(n) is the neighborhood function and (n) is the decaying learning rate

6: increment learning iteration and repeat 3

41
4.3 Support Vector Machine (SVM)

SVM algorithm seeks to maximize the geometric margins of the separating hyper-

planes using support vectors, which in turns results in a globally optimal hyper-plane

where the probability of misclassification error is lowered. As the separating hyper-plane,

is derived in a structured way by constrained quadratic programming method, therefore a

global minimum is guaranteed. SVM is able to work on very small sample size without

having to deal with the problem of having to determine the statistical properties of the

training sample and over-fitting problem. Based on Covers Theorem, the probability that

different classes are linearly separable increases, when data points in the input space are

nonlinearly mapped to a higher dimensional feature space. Therefore, to lower error rate,

a suitable transformation of the input data set into higher dimensional space is needed.

This is achieved by using a kernel for transformation. Kernel trick is used to calculate

such a kernel transformation rather than the actual full expansion of the transformation, in

order to avoid the curse of dimensionality. Such use of kernel has made SVM a very

versatile algorithm, whereby the user chooses a suitable kernel to suit the application.

Common examples of kernels are Gaussian and Polynomial functions.

To further enhance classification accuracy, slack variables are introduced, and the

constant C is associated with these slack variables. After learning off-line, the SVM

performs classification task in a computationally efficient way using support vectors,

which are a sub-set of the training samples. Figure 4.3 illustrates the separating hyper-

plane i.e., the decision boundary and support vectors for two-class problem that is

linearly non-separable. Figure 4.3 bottom-panel is a zoom-in view of the top-panel.

42
Class 2

Class 1

Class 1

region
Zoom-in view

Class 2 training Class 1 training

Test Sample

Decision Boundary, g(x)=0

Margin

Support Vectors

Figure 4.3: Support vectors, decision boundary and margin of 2-class SVM.

Class 1 data set is x and class 2 data set is +. The support vectors are those data
points with . Notice the support vectors are at both sides of the decision boundary,
and these support vectors define the decision boundary. The following presents the
formulation of a 2-class SVM.

43
4.3.1 Multi-Class SVM (M-SVM)

SVM is originally designed as a binary classifier. However, it can be easily

extended to a multi-class setting. There are numerous methods for solving a multi-class

problem, with one-versus-all (OVA) learning strategy being the easiest to implement and

produces reasonable results [108]. There are other methods, such as, one-versus-one,

hierarchical tree-based methods etc., as shown in [109]. In OVA approach, K-number of

SVMs is required to classify K-classes of data. Each SVM is trained using one class (Si)

against the rest of the classes (Sj), i.e., the class label (di and dj) for training is defined as,

Si {( xi , di )}ii 1n , di {11 ,12 ,... 1n } i j


(4.12)
S j {( x j , d j )} jj 1m , d j {11 ,12 ,... 1m } j i

After training, each SVM classifies the input feature vector by returning a

discriminant value. There are thus K discriminant values, one for each class, and are

calculated using the following,

gk (X ) a d K(X , x )
iL
i i i L {ai , d i , xi } (4.13)

where L is a sub-set of the training samples, consists of xi support vectors, ai are the non-

zero Lagrange multipliers, and the associated di labels, and a suitable kernel K(X,xi). The

absolute value of the discriminant value g(X) is used. The input feature vector belongs to

the class where the SVM that gives the largest discriminant value, namely,

(4.14)
k arg max {abs( g k ( X ))} k
k

44
The following figure illustrates this approach,

abs( g1 ( X ))
SVM-1
abs( g 2 ( X ))
SVM-2 max() i
X

abs( g k ( X ))
SVM-k

Figure 4.4: Multi-class SVM using one-versus-all learning strategy.

4.3.2 M-SVM Algorithm

Given the data sets as in Eq. (4.12), the M-SVM algorithm does,

1: load and define the training set and test set

2: FOR Kth SVM for a K-class problem, training one SVM versus the rest, DO

3: form the Gram matrix (K) and the Hessian matrix (H) for optimization

4: define the quadprog() parameters and calculate the Lagrange Multipliers

5: find support vector to calculate the weight term w_svmi and bias bo

6: save the support vectors, labels, Lagrange multipliers i, and the bias bo

7: use the support vectors, labels, Lagrange multipliers i and bias bo, to calculate the

discriminant values for classifications (Eq. (4.13)),

N
g k ( X ) i d i K ( x, xi )
i 1

8: Repeat 2 for other SVM to obtain another gk(X)

9: Predict class by using Eq. (4.14),

k arg max {abs( g k ( X ))} k


k

45
4.4 Empirical Mode Decomposition (EMD)

Empirical Mode Decomposition (EMD) is an adaptive signal analysis method

invented by Dr Norden Huang [110]. In EMD, the decomposition does not use a priori

basis function, but in an adaptive fashion, based on actual empirical data [110]. In this

sense, it allows the data to speak for themselves, rather than using a pre-defined basis

function, and the resulting transformation a mere convolution computation. EMD uses a

iterative sifting process to reduce a time-domain signal to its lowest frequency, call the

Intrinsic Mode Function (IMF). The sifting process derived a series of IMFs, and stops

according to a certain stoppage criteria, and when the resulting IMF is monotonic and

there is only one extremum in the data span. By superimposing these IMFs thus derived,

the original signal is re-constituted. Upon deriving the IMFs further analysis maybe

carried out using Hilbert-Huang transform, where the amplitude / instantaneous

frequency information can be graphed on a Frequency versus Time plot call the Hilbert

Spectrum and an Amplitude versus Frequency plot call the Marginal Hilbert Spectrum.

Each IMF satisfies the following two conditions [110],

C1) in the given time series, the number of extrema and the number of zero crossings

must either equal or differ at most by one

C2) at any data point, the mean value of the envelope defined using the local maxima and

the envelope defined using the local minima is zero

46
4.4.1 EMD Algorithm
Given an arbitrary time series data x(t), the algorithm of EMD does,

1: start the shifting process by identify all local extrema

connect them by a cubic spline to form the upper and lower envelope

calculate the mean m1 of the two envelopes

2: subtract m1 from x(t), and the proto-mode (proto-IMF) h1 is thus obtained,

h1 x(t ) m1 (4.15)

3: check if h1 meet condition C1 and C2. If not, h1 is used as the data for the next

iteration,

h11 h1 m1 (4.16)

Thus at k-iteration, the IMF is given by,


h1k h1( k 1) m1k (4.17)

4: check if stoppage criteria is met. One possible stoppage criteria is [110],


T 2

h k 1 (t ) hk (t )
SDk t 0
T

h
t 0
2
k 1 (t ) (4.18)

5: after the stoppage criteria is met, store h1k in c1, and the first IMF is derived as c1,

given by,

c1 h1k , r1 x(t ) c1 (4.19)

where r1 is the residue. This residue may contains long-period variations i.e.,

possible sinusoids in the signal, and use as data for the next iteration, as follows,
rn rn 1 c n
(4.20)

6: Go back to 1 if rn has more than one extremum

47
Eq. (4.18) is the normalized square difference between two successive sifting

operations. The obtained SD value has to be smaller than a predetermined value. This is

usually done by assigning a small value in the order of 10-3 to SD at the start of the EMD

programme. It is observed that from the above algorithm, the number of extrema in the

time series decrease after each extraction of an IMF, and thus guarantee that the time

series is completely decomposed in a finite number of steps. The decomposition process

stops when the residue rn becomes monotonic or when it has only one extremum where

no further IMF can be extracted. Thus the original data x(t) is decomposed into n-number

of IMFs, whose summation re-constitutes the original data x(t), that is [110],
n
x(t ) c j rn (4.21)
j 1

4.4.2 Mode Misalignment

When there are more than one time series e.g., x1(t), x2(t), x3(t) ..., a mono-variate

EMD analyses on these time series one by one may produce for each time series IMFs

that does not have the same scale even though they are same indexed. This is expected,

since EMD decomposition is an automatic adaptive and time variant filtering [111]. This

problem is known as the mode misalignment [112]. In the study of machine fault

signatures harmonic, a number of signatures from different fault modes are decomposed

by EMD, and their IMFs thus derived are compared, to identify uniqueness for each fault

class. In order to examine and compare the spectrum content of each signature, it is

desirable to compare the same indexed IMF across different signatures. When using this

approach to real-world machine fault signature, the mode misalignment problem is

encountered. This complicates the study of the machine signature harmonic. The

48
followings illustrate this when some machine signatures; recorded at a sampling rate of

20kHz, are decomposed by standard EMD one by one.

Figure 4.5: Mono-variate EMD of BRG signature.

Figure 4.4 shows the decomposition of BRG signature with five IMFs. Subplot 1 shows

the original signature, labeled as IMF0. IMF1 and IMF2 are the high-frequency

components and IMF3 is the fundamental supply frequency. IMF4 and IMF5 are the low-

frequency long-term trend.

49
Figure 4.6: Mono-variate EMD of UBR signature.

Figure 4.5 shows the decomposition of UBR signature with six IMFs. Subplot 1 shows

the original signature. IMF1 and IMF2 are the high-frequency components and IMF3 is

the fundamental supply frequency. IMF4 to IMF6 are the low-frequency long-term

trend. Even though the same numbers of IMFs are derived from two different EMD

sifting processes, it is difficult to conclude that IMF1 and IMF2 from two different

signatures are of the same scale. Figure 4.6 shows the EMD of a HTY signature with six

IMFs. This time, IMF4 is the low-frequency component, and in this case, mode

misalignment is clear with compare to the previous two cases.

50
Figure 4.7: Mono-variate EMD of HTY signature.

4.4.3 Multi-variate EMD (M-EMD)

A possible solution is the use of multi-variate EMD (M-EMD). This project uses

the M-EMD algorithm by Rehman et al. (2010) [112, 113] to study the harmonics of

machine signature. In the standard mono-variate EMD setting, the local mean is

calculated by taking the interpolation between the local maxima and minima, i.e., the

decomposition extract oscillatory components in the time series. Figure 4.7 illustrates the

cubic spline interpolation of the extremum of an arbitrary signal x1(t). The mean of x1(t)

is the average of the extremum envelope.

51
|x1(t)|
Maxima envelope

Mean of x1(t)

x1(t)

Minima envelope
time

Figure 4.8: Extremum of two signals x1(t) and x2(t).

However, in a multi-variate setting, a different approach is required. Given N set

of signals, a possible approach to construct the multi-variate EMD problem is to express

the given set of signals in multi-dimensional space as complex signals, and seek to

extract rotating components from the complex signals as intrinsic modes, and thus

separating the slowly rotating components from rapidly rotating ones. That is, in a bi-

variate setting (i.e., N=2), given two time series x1(t) and x2(t), the bi-variate complex

signal zb(t) is [114],

z b (t ) x1 (t ) j x2 (t ) (4.22)

Figure 4.8 illustrates the complex signal zb(t) is the complex space (|x1(t)|, |x2(t)|,t). The

mean, shown in green line, is the average value in the 3D tube enclosed by the

extremum shown in blue line.

52
|x1(t)|

3D extremum tube
time

Mean of zb(t)

zb(t)

|x2(t)|

Figure 4.9: Mean of 3D tube of complex signal signals zb(t).

For this project, the complex signal is shown in Figure 4.9, in the complex space for

machine signatures HTY40 and BRG40 for duration of 0.06 second.

Figure 4.10: Evolution of bi-variate complex signal for (|HTY40(t)|,|BRG40(t),t).

53
For a tri-variate setting (i.e., N=3), given three time series x1(t), x2(t) and x3(t), the tri-

variate complex signal zt(t), also known as quaternion signal, is [115],

z t (t ) ix1 (t ) j x2 (t ) k x3 (t ) (4.23)

Figure 4.10 illustrates the complex signal zt(t) is the complex space (|x1(t)|, |x2(t)|, |x3(t)|).

The mean, shown in green line, is the average value in the 3D space enclosed by the

extremum of zt(t).

|x1(t)|

|x3(t)|

Mean of zt(t)

zt(t)

|x2(t)|

Figure 4.11: Mean of complex signal signals zt(t).

For this project, the complex signal is shown below in the complex space for machine

signatures HTY40, BRG40 and BRB40 for duration of 0.06 second.

54
Figure 4.12: Evolution of tri-variate complex signal for (|HTY40(t)|,|BRG40(t)|,|BRB40(t)|).

For a 5-class study of the machine signature harmonics, i.e., N>3, a multi-variate

setting is needed. A possible approach is to generate N-dimensional multiple envelops of

the signal by projections along different directions in N-dimensional spaces, and these

projections are next averaged to obtain the local mean. Given a set of N component

multi-variate signal [116],

x(t )Tt1 x1 (t ), x 2 (t ), x N (t ), (4.24)

Generate a set of direction vectors xk for projections based on quasi-Monte Carlo-based

low-discrepancy sequences [116],



xk x k 1 , x k 2 , x k N , (4.25)

where the angles of projection is given by angles,

k k 1 , k 2 , k N 1 , (4.26)

55
Next the algorithm calculate a projection pk(t) for the input signal x(t) along direction

vector xk for all k i.e., the whole set of direction vectors (from k=1 to K). From the each

of the k-set of projections, the envelope ek(t) (from k=1 to K) of each projections is

determined, and the mean is defined as [116],


1 K
m(t ) e k (t ). (4.27)
K k 1
From m(t), the usual sifting process proceeds to determine the IMFs.

4.4.4 Mode Mixing

There is usually noise n(t) being coupled into the measurement of data i.e., x(t) +

n(t). This causes mode mixing. Mode mixing is when there exists a signal of similar scale

in different IMF. This is due to the presence of transient signals, or signal intermittency.

Figure 4.12 illustrates this by using a synthetic time series s(t); denoted by IMF0, which

contains three tones, one high frequency (IMF1) and two low frequency (IMF2 and

IMF3) tones.

Figure 4.13: Mode mixing.

56
In the absence of white Gaussian noise, the three IMFs are derived from s(t) using

standard EMD, which correspond to each of the component of s(t), as shown in Figure

4.12 right-panel. However, when white Gaussian noise is added, the three component

tones cannot be recovered. Fig 4.12 left-panel shows the noise-perturbed IMFs, where it

is observed that multi-tone is present in the IMFs. This phenomenon is mode mixing.

4.4.5 Noise-assisted Multi-variate EMD (N-A M-EMD)

To deal with this problem, a noise-assisted EMD approach is adopted. For a

mono-variate EMD, a different white Gaussian noise is added to s(t) for each complete

iteration of the sifting process i.e., from Eq. (4.15) to Eq. (4.20), thus yielding a series of

N set IMFs corresponding to each sifting process. The ensemble of these N set of IMFs is

next averaged, i.e., the ensemble averaging, to obtain the final IMFs that is free from

mode mixing. That is [110],

1 N
IMF j lim
N N

k 1
IMFk , j (4.28)

However, a practical value for N is a few hundreds [110],


1 N
IMF j IMFk , j (4.29)
N k 1

Similarly, M-EMD is also plagued by noise. Therefore, a noise-assisted M-EMD

(N-A M-EMD) algorithm by Rehman et al. (2010) [112, 113], is used in this study. In N-

A M-EMD algorithm, all the signatures are submitted for decomposition in a single

application of the algorithm. To resolve the mode mixing problem due to the presence of

noise, two additional channels of white Gaussian noise are added. This two noise

57
channels are discarded after the EMD sifting processes. Figure 4.13 demonstrates the

result of such decomposition by N-A M-EMD where mode mixing is resolved.

Figure 4.14: N-A M-EMD on signal with Guassian white noise added.

58
CHAPTER 5: A STUDY ON AUTOMATIC
DIAGNOSIS OF BEARING AND UNBALANCED
ROTOR FAULTS

This chapter presents the diagnostic scheme proposed using time-domain and

frequency-domain vibration analysis, to diagnose two of the most common mechanical

faults, namely, bearing and unbalanced rotor faults.

5.1 Fault Diagnosis using Time-Domain Vibration Signatures

Fault diagnosis may be solved as a pattern recognition problem. There are mainly

four approaches to pattern recognition, namely, template matching, statistical

classifications, syntactic or structural matching, and neural networks. In the template

matching approach, a database of templates or prototypes is stored. A classifier next

assigns an unseen input feature vector, by comparing the feature vector with the set of

prototypes, and assigns the feature vector to a particular class based on certain similarity

measure. K-NN algorithm is used to accomplish such machine learning, and in

combination with the use of a normalized cross-correlation sum operator as similarity

measure, for the effective diagnosis of bearing and unbalanced rotor faults, using time-

domain vibration signatures only with low error rate.

59
Figure 5.1 illustrates the proposed scheme.

Machine Fault
Detection and Diagnosis

Signature k-NN algorithm


Template
Database

Bearing Unbalanced Healthy


fault Rotor fault Machine
signatures signatures signatures

Time-domain
vibration
signature

Figure 5.1: Template matching using cross-correlation of machine signatures.

5.1.2 Similarity measures by Cross-Correlation Operator

To automatically classify the fault signatures between the three classes, namely,

the unbalanced rotor fault, bearing fault and healthy machine, a suitable similarity

measure needs to be defined. There are many ways to define the similarity between a

template (q) and a feature vector (p) of dimension N. Such as, by Euclidean distance

[116]
S e ( p, q ) ( p q ) T ( p q )
(5.1)

where the objective is to find the minimum Euclidean distance among the templates, and

to associate the feature vector to that template with minimum distance.

60
There is also the simple cross-correlation between q and p [117],

Ssc ( p, q) pT q (5.2)

A value of 1 indicates perfect matching, and a value close to 0 indicates

otherwise. The geometrical interpretation is that, the angle between two perfectly

matching vector pair is 0o, and its cosine is 1; and an orthogonal vector pair at 90o and its

cosine is 0. The objective is thus to find the maximum correlation value among the

templates for a feature vector, and classify the feature vector to that template. However,

these similarity measures are suitable for synchronized static pattern, and are not suitable

for machine fault signatures in this study that have time lags among the samples, as these

are recorded at different time snap-shots. By using the aforementioned similarity

measures on these signatures, large errors are made, leading to inaccurate classification.

The following experiment which uses deterministic signals illustrates this.

Figure 5.2: Deterministic signals v1(t), v2(t) and v3(t).

61
Given three deterministic signals, as shown in Figure 5.2, namely, a half square-

wave v1(t), a half sine-wave v2(t), and a half sine-wave v3(t), that is time shifted by 30ms,

and v1(t) and v2(t) are templates for matching to feature vectors, v3(t). As observed from

Figure 5.2, even though v2(t) is identical to v3(t), their Euclidean distance at 0.3568, is

further than the distance between v1(t) and v2(t) at 0.1109. This is due to the time shift. In

this case, if Euclidean distance is a measure of similarity, then a half square-wave is

associated with a half sine-wave. The situation is not improved by using simple cross-

correlation. v2(t) is identical to v3(t) in shape, but their simple cross-correlation value is

0. This reflects the fact that both signals are uncorrelated, but actually they are time

shifted. If simple cross-correlation is used as similarity measure, then a half square-

wave is again associated with a half sine-wave.

Thus, the use of cross-correlation sum operator is proposed. Cross-correlation

sum operation between two signals is not just simply template matching, but also taking

the temporal structure of the two signals into consideration, hence shift invariance. It is

also noise tolerance, as will be shown. Feature extraction is not required, and original

vibration data are used without synchronization. This allows the original data to speak for

itself. The following elaborates the advantages of this similarity measure, where it is both

shift-invariant and noise-tolerant.

For two bounded signals p(t) and q(t), the cross-correlation is defined as,
T
1 (5.3)
R pq ( ) lim
T 2T p(t ) q(t ) dt
T

where is the time lag of the two signals. To implement the cross-correlation similarity

measure for discrete signals, the cross-correlation sum operator is used [117],

62
N 1
R pq ( ) p (t ) q (t ). (5.4)
t 0

The Normalized Cross-Correlation sum operator is given by normalizing Eq. (5.4) with

the l2-norm of the respective template and feature vector,


N 1

p (t ) q (t )
t0
R pq ( ) . (5.5)
p (t ) q (t )

The cross-correlation sum Eq. (5.5), is computed at every time interval , and produces a

vector of cross-correlation sum coefficients rpq() of 2N-1 dimension with value between

[-1 1] as in Eq. (5.6) [117],

rpq ( ) [r1 r2 r2 N 1 ], rpq 1x 2 N 1 . (5.6)

This way, the time lag between p(t) and q(t) is considered, hence shift-invariant.

A value of 1 indicates perfect match, a value of 0 indicates no relationship, and a value of

1 indicates direct opposite. Figure 5.3 shows the superimposed plot of the normalized

cross-correlation sum coefficients between a pair of unbalanced rotor signatures (denoted

by UBR/UBR), and between an unbalanced rotor and a healthy signature (denoted by

UBR/HTY).

63
Figure 5.3: Normalized cross-correlation sum coefficients of a pair signature.

The cross-correlation sum between two similar signatures (UBR/UBR); the blue

plot produces higher cross-correlation sum coefficients than between two dissimilar

signatures (UBR/HTY), the magenta plot. Therefore, the similarity measure between any

two signatures is the maximum of vector rpq(), from Eq. (5.6), that is,

(5.7)
S xc ( p, q) arg max[r1 r2 rj ] .
j

Cross-correlation sum operator is able to work on noisy signals. The following

illustrates this.

64
Let us add zero-mean additive noise n(t), to deterministic signals p(t) and q(t), and

normalized the expression Rpq() by 1/N , where N is the length of the signal,

N 1
1
R pq ( )
N
[ p (t ) n (t )][q (t ) n (t )]
t 1

1 N 1
[ p (t ) q (t ) n (t ) q (t )
N t 1
p (t ) n (t ) n (t ) n (t )]

E [ p (t ) q (t )] E [n (t ) q (t )]
E [ p (t ) n (t )] E [n (t ) n (t )] (5.8)

where E[] is the expectation operator. Since the noise is zero-mean, p(t) and q(t)

deterministic, and with large N, the terms involving the noise in Eq. (5.8) are destroyed.

That is,
E [n (t )] E [q (t )] 0
E [ p (t )] E [n (t )] 0
E [n (t )] E [n (t )] 0 . (5.9)

Ultimately, Eq. (5.8) is reduced to Eq. (5.10), which is the same expression as in Eq.

(5.4), except with an additional normalizing constant term 1/N. Therefore Rpq(), is

recovered without the noise term n(t), hence noise tolerance.

R pq ( ) E [ p (t ) q (t )]
1 N 1 (5.10)
p (t ) q (t )
N t 1

By using Eq. (5.5), the time shift of the two signals is accounted for. The

similarity measure indicates that v2(t) and v3(t) have a perfect match with a maximum

cross-correlation sum value of 1, hence v3(t) is correctly classified as v2(t). As such, to

65
take into consideration the temporal characteristic of these machine signatures, Eq. (5.7)

is used as a similarity measure in this study. Table 5.1 shows the resulting similarity

measures Se(p,q), Ssc(p,q) and Sxc(p,q).

Table 5.1: Similarity Measure for v1, v2 and v3

Se(p,q) Ssc(p,q) Sxc(p,q)


v1(t) / v2(t ) 0.1109 0.9192
v1(t) / v3(t ) 0.3115 0 0.9192
v2(t) / v3(t)) 0.3568 0 1.0000

5.2 Machine Fault Simulator

To simulate the two fault modes in this study, a machine fault simulator (MFS), as

shown in Figure 5.4, by SpectraQuest, is used. It is a 1/2 HP 239V/50Hz/3-phase AC

variable speed synchronous machine.

Tachometer Vibration sensor


Machine driver
VSI Speed
Controller

Figure 5.4: Machinery Fault Simulator (MFS) by SpectraQuest, Inc.

Figure 5.5 shows the schematic of the experimental setup.

66
VSI 230Vac CPU

Dewetron DAQ

CT

Figure 5.5: Schematic of machine signature acquisition using DAQ by Dewetron.

The template database contains 270 signatures of bearing fault (denoted by BRG),

unbalanced rotor fault (denoted by UBR), and healthy machine (denoted by HTY) with

90 samples for each class. 10 samples are recorded at each machine operating speed of

15Hz, 17Hz, 19Hz, 21Hz, 23Hz, 25Hz, 27Hz, 29Hz and 31Hz. BRG class consists of a

mixture of rolling element fault, inner raceway fault and outer raceway fault. Similarly,

the test set contains 270 unseen signatures with 90 samples for each class. 10 samples are

recorded at each machine operating speeds of 16Hz, 18Hz, 20Hz, 22Hz, 24Hz, 26Hz,

28Hz, 30Hz and 32Hz.

67
Vibration sensor

Faulty
bearing
Loader

Figure 5.6: Bearing fault simulation using MFS.

Figure 5.6 shows the experimental setup to simulate the various bearing fault. The

acceleration of the machine vibration is measured by a stud-mounted piezoelectric

accelerometer of 10kHz bandwidth above the bearing journal. Vibration signatures are

recorded by DEWETRON digital data acquisition system with a sampling frequency of

5kHz using Hanning windowing. Each data block of the vibration signature is 4000 in

length, representing a snap-shot time window of 800ms.

Vibration sensor

Rotor with screws


attached

Figure 5.7: Unbalanced rotor fault simulation using MFS.

68
Figure 5.7 shows the experiment setup to simulate unbalanced rotor fault. Two

rotors with screws attached are mounted on the shaft. The weight of these screws

generates unequal centrifugal forces when the rotor spins, thus creating vibrations due to

rotor unbalance.

5.3 Machine Signatures Collection

The example database contains 270 signatures of bearing fault (BRG), unbalanced

rotor fault (UBR), and healthy machine (HTY) with 90 samples for each class, where 10

samples are recorded at each machine operating speed of 15Hz, 17Hz, 19Hz, 21Hz,

23Hz, 25Hz, 27Hz, 29Hz and 31Hz. BRG class consists of a mixture of rolling element

fault, inner raceway fault and outer raceway fault. The test set contains 270 unseen

signatures with 90 samples for each class. To demonstrate the ability of cross-correlation

sum operator to work on unseen data, 10 samples are recorded with a different machine

operating speeds for the training set at 16Hz, 18Hz, 20Hz, 22Hz, 24Hz, 26Hz, 28Hz,

30Hz and 32Hz.

Table 5.2: Training and test sets for k-NN classification.

Training Set fs (Machine Operating Frequency, Hz) Sample size


Healthy (HTY) 15/17/19/21/23/25/27/29/31 90
Bearing fault (BRG) 15/17/19/21/23/25/27/29/31 90
Unbalanced rotor (UBR) 15/17/19/21/23/25/27/29/31 90
Test Set fs (Machine Operating Frequency, Hz) Sample size
Healthy (HTY) 16/18/20/22/24/26/28/30/32 90
Bearing fault (BRG) 16/18/20/22/24/26/28/30/32 90
Unbalanced rotor (UBR) 16/18/20/22/24/26/28/30/32 90

69
5.4 Experimental Results

The classification result is presented in Table 5.3 and 5.4. An overall error rate of

0.74% is achieved. For UBR class the error rate is 2.22%, and for both BRG and HTY

classes the error rate is 0%. The average computation time per test sample is 0.2s with a

feature vector dimension of 4000.

Table 5.3: Fault classification confusion matrix.

Predicted Class
UBR BRG HTY Error Rate (%)
Ground UBR 88 0 2 2.22 %
Truth BRG 0 90 0 0%
HTY 0 0 90 0%

Table 5.4: Classification result summary.

k (nearest neighbor): 1
Similarity measure: Eq. (6.7)
Overall error rate (%): 0.74 %
Feature vector dimension: 4000
Template sample size: 270
Test sample size: 270
Computation time per test sample: 0.2 s

The value of k is varied to locate an optimal value for k. Odd values of k are used

deliberately so as to avoid a tie in the voting.

70
Table 5.5 tabulates the classification error rate at different k values.

Table 5.5: Tabulated results of error rate (%) with various k-neighbor values.

k Error Rate (%)


1 0.74 %
3 1.85 %
5 1.48 %
7 0.74 %
9 1.11 %
11 0.74 %

Error Rate (%) Vs k-neighbor

2.00%

1.80%
1.85%
1.60%

1.40% 1.48%
Error Rate (%)

1.20%

1.00% 1.11%

0.80%

0.60% 0.74% 0.74% 0.74%

0.40%

0.20%

0.00%
1 3 5 7 9 11
k-neighbor

Figure 5.8: Error rate (%) versus k-neighbor values.

5.5 Discussions: Difficulty in choosing a suitable value for k

The best error rate is achieved at k equals 1, 7 and 9 where the error rate is 0.74%.

As more nearest neighbors are being enclosed by the Voronoi cell, the error rate

increases. A higher value of k provides a smoother decision boundary and provides

71
probabilistic information, thus tends to give better generalization for classification of

unseen input feature vectors. However, with a higher k, the Voronoi cell is increased;

encompassing other categories in the process, and this destroys the locality of the

estimation. As a result the error rate increases. Evidently it also increases the

computational burden. In this project, at k equals 7 and 11, the error rate reduces as more

prototype of the same class is enclosed. However, from Figure 5.8, a good value of k is

equal to 1 which produces the lowest error rate with least computational burden.

5.6 Discussions: Larger Training Samples

k-NN works well for multi-modal distribution, provided that the training sample

is sufficiently large, so that the probability distribution function is as continuous as

possible. With larger training samples, computational burden and memory requirement

are increased as well. This is especially so when the dimension of the feature vector is

high. For this project, even though the dimension of the feature vector is high at 4000, the

average execution of 0.2 second for one feature vector.

5.7 Visualization of Classification Results by k-NN

To provide visual inspection of the classification, plots of the classification results

are made, as shown in Figure 5.9, 5.10, 5.11 and 5.12. Subplot 1 shows the test vector to

be classified. The symbol => denotes classified as. Subplot 2 shows the template that

the test vector is associated with. Subplot 3 is a graph of maximum cross-correlation sum

values (denoted by max xc) versus the location of the prototype in the database. It shows

the winners max xc value, and its location among the 270 templates in the database.

72
Figure 5.9: Unbalanced rotor fault misclassified as healthy machine.

In Figure 5.9, a UBR signature is misclassified as HTY signature, as the

winners max xc value is 0.13547 and belongs to HTY class.

Figure 5.10: Healthy machine signatures correctly classified.

73
Fig. 5.10 shows a correctly classified HTY signature. The winners value is

0.11365. This value is the highest among the templates, hence the winner belongs to

HTY signature and class prediction is HTY. Visual inspections of subplot 1 and 2

verified this.

Figure 5.11: Unbalanced rotor signature correctly classified.

Figure 5.11 shows a correctly classified UBR signature. The winners value is

0.17628. This value is the highest among the templates and belongs to UBR class.

Therefore, the test vector is predicted to be UBR class.

74
Figure 5.12: Unbalanced rotor signature correctly classified.

Fig. 5.12 shows a correctly classified BRG signature. In this case, k is 11 and

subplot 4 shows the voting scheme. With 11 against 0 for HTY class, the predicted class

is therefore HTY class.

5.8 Fault Diagnosis using Frequency-Domain Vibration Signatures

This section presents vibration analysis in frequency-domain. To study vibration

spectrum in frequency-domain, noise in time-domain signature is removed so as to reveal

the spectrum that are accountable for the vibration. There are various ways to de-noise

signal e.g., ensemble synchronized averaging, band specific filtering etc. In this project

an adaptive filter is used. An adaptive filter is preferred instead of using a low-pass or

75
high-pass filter, because these band specific filters simply remove all the stop-band

frequencies, and this may also remove frequencies that may contain fault information.

5.8.1 Discrete Wiener Filter

The vibration signatures are filtered by a Discrete Wiener filter. Discrete Wiener

filter is an adaptive filter that adjusts its filter coefficients, or filter weights wk[i] i.e., the

weights at instant ith, to produce an estimated output [k], that is free from uncorrelated

components i.e., the correlated component estimate, and this estimated output is an

optimal estimate of the original signal, in the least-mean-square (LMS) error sense. This

LMS error ek, the uncorrelated components, is computed iteratively using successive

samples of the input signal y[k], by Widrow-Hoff LMS algorithm, show below [117],

N 1
y [k ] wk [i ]x[k i ], (5.11)
i 0

ek y [k ] y [k ], (5.12)

wk 1 [i ] wk [i ] 2 ek x[k i ]. (5.13)

where is the nudge-to-zero constant to prevent drift of the signal from optimal or to

grow in magnitude during adaptation, especially for long signals, and is a constant to

adjust the rate of convergence of the weights to optimal values.

76
Figure 5.13 shows the scheme [117],


y [k ] y [k ] ek [k ] ek [k ] y [k ] y [k ]

N 1
y [k ] wk [i]x[k i]
Delay
i 0

Wiener
Filter

Figure 5.13: Wiener Filter.

The feedback error signal ek, is used to adjust the Wiener filters coefficients and

generates an estimated signal [k], that is free from uncorrelated components and noise.

Therefore, by using an adaptive filter, the temporally correlated deterministic portion of

the signal is preserved, and is separated from the uncorrelated stochastic portion of the

signal and noise. In the first 100ms, the filtered signal is flat and appears compressed.

This is due to the adaptation algorithm finding convergence. After about 100ms, the

algorithm converges. Figure 5.14 shows this effect.

Figure 5.14: Filtered machine signatures at fr=15Hz and 31Hz.

77
5.8.2 Frequency Analysis of Vibration Signatures

From the mechanics of the vibration signals, an unbalanced rotor fault generates a

low frequency of one-times (i.e., commonly refers as 1X) rotor shaft rotational speed due

to the forced-vibration created by the unbalanced mass [14], and bearing faults generate a

high frequency ring due to the free-vibration created by the impact of single-defect

surface [90, 93]. To examine the frequency content of the vibration signatures, the time-

domain signals are transformed into the frequency-domain representation by discrete-

time Fourier transform is given by [117],

(5.14)
X ( ) x[n] e j n .
n

Figure 5.15 to 5.20 shows the before and after filtering of the machine

vibration signatures. Subplot 1 is the original spectrum and subplot 2 is the filtered

spectrum. The interesting frequency range is highlighted in red.

5.8.2.1 Frequency Content of Healthy Machine

After filtering healthy machine vibration signature, the interesting frequency is in

the range of 100-900Hz. The vibration is mainly due to metal-to-metal sliding contacts of

the bearing assembly and other inherent constructional asymmetries. The dominant

frequencies are clearly visible in the range 200-400Hz.

78
Figure 5.15: Frequency content of HTY signatures at fr=15Hz.

However, as the speed increases, additional spectrum appears in the range of 600-

900Hz and become dominant, as higher rotational speed causes more free-vibrations due

to metal-to-metal contacts. However, the magnitude is low in the order of 10-3.

Figure 5.16: Frequency content of HTY signatures at fr=31Hz.

79
5.8.2.2 Frequency Content of Unbalanced Rotor Fault

The 1x rotor rotational speed is clearly visible in the 0-60Hz range. This dominant

frequency is responsible for the time-domain signal characteristic sinusoidal oscillation.

Figure 5.17: Frequency content of UBR signatures at fr=16Hz.

Figure 5.18: Frequency content of UBR signatures at fr=32Hz.

80
5.8.2.3 Frequency Content of Bearing Faults

The high frequencies rings created by the free-vibration from single-defect

impacts on metallic surface are clearly visible in the range of 800-1100Hz and 1900-

2100Hz. These are unique to bearing faults. Figure 5.19, 5.20 show this.

Figure 5.19: Frequency content of BRG signatures at fr=15Hz.

As the rotational speed of the machine increases to 32Hz, the spectrum in the

range 800-1100Hz and 1900-2100Hz becomes dominant, as the rings impact on the

metallic surfaces increases in force and magnitude.

81
Figure 5.20: Frequency content of BRG signatures at fr=32Hz.

5.8.2.4 Discussions on Vibration Frequency Analysis

From the above figures, it is observed for healthy machine, that the regions of

interest are 0-60Hz and above 600Hz, in that there is very low magnitude or no spectra in

these regions. For unbalanced rotor fault, the regions of interest are the low frequency 0-

60Hz, mainly due to the forced-vibrations as a result of the unbalanced mass at 1X

synchronous machine speed. For bearing fault, the regions of interest are in the high

frequencies of 800-1100Hz and 1900-2100Hz, mainly due to the significant free-

vibrations as a result of the impact of the single-point defect. Table 5.6 summaries this

observation.

82
Table 5.6: Distribution of spectrum of machine vibration signatures.

Fault Class Frequency Range (Hz)


Healthy machine 0 60 800 1100 1900 2100
LOW HIGH LOW
Bearing fault 0 60 800 1100 1900 2100
LOW HIGH HIGH
Unbalanced rotor 0 60 800 1100 1900 2100
HIGH LOW LOW

In the next, feature extraction is carried out to condense the 2500-dimensional

frequency vector into a compact 11-dimensional feature vector.

5.8.3 Feature Extraction of Frequency domain information

Feature extraction aims to reduce the dimensionality of the input vector, such that

the reduced dimension vector contains all the necessary data for classification, and is a

compact and faithful representation of the original input vector. Using the region of

interest, the spectrum of each signature is divided into 11 equal segments. The root-

mean-square (RMS) value of each segment is computed. The resulting 11 values thus

obtained, are arranged in an 11-dimensional vector as in Eq. (5.15). This is the feature

vector for the vibration signatures.

SOM _ feature_ vector fea1 fea2 fea11 . (5.15)

Figure 5.21 shows some of the feature vectors.

83
Figure 5.21: 11-dimensional feature vector at fr=15Hz and 31Hz.

As observed, unbalanced rotor fault produces a feature vector that has a high

value in the first dimension (fea1) and very low value for the remaining 10 dimensions

i.e., fea2, fea3..fea11, whereas the healthy machine has a very low value for fea1 and

fea9, and bearing fault has a very low value for fea1 and high value for fea9. With feature

extracted, SOM is next used to visualize this 11-dimensional data and to discover

clustering for classification in an unsupervised way.

5.8.4 Cluster Analysis of Vibration Feature Vectors

SOM is used to study the cluster of vibration feature vectors in an unsupervised

way. The input to the SOM consists of 540 11-dimensional feature vectors from

unbalanced rotor signatures, healthy signatures and bearing faulty signatures. These

vectors are arranged columnwise to form an 11x540 input matrix, are normalized to value

of [0 1] and submitted to the SOM for learning. After the learning process, a map is a

84
created that groups the input feature vectors according to their topological characteristics,

and hence clustering of vectors from the same class is formed.

Figure 5.22: Semantic map of vibration signatures from two SOM different simulations.

Figure 5.22 shows two fault maps obtained by two separate simulation runs,

each with the neuronal weights initiated differently and randomly. Each map shows three

distinct clusters, each belonging to a particular machine condition status class, namely

unbalanced rotor, healthy machine and bearing fault. All the 540 feature vectors have

been packed into a 10x10 grid, in three distinct clusters. Even though the clusters in both

figures are oriented differently, its non-overlapping distinctness in clusters is preserved.

Therefore SOM has discovered three distinct clusters.

5.8.5 Further Feature Extraction

Instead of using an 11-dimensional feature vector, further feature extraction is

carried out to derive a set of unique 2-dimensional feature vectors (fea_2D_SVM), using

only the first (fea1) and ninth feature (fea9) only.

85
fea _ 2 D _ SVM fea1 fea9 . (5.16)

Figure 5.23 shows the plot of fea1 versus fea9. Three distinct clusters are observed. The

left panel shows the zoom-in view.

Figure 5.23: 2-dimensional feature vector.

5.8.6 Multi-class SVM (M-SVM) for Classifying Machine Fault Data

M-SVM is next used to classify the 2-dimensional machine fault feature vector

(fea_2D_SVM). Even though SOM is able to perform clustering operation as

demonstrated in the preceding section, its decision boundary obtained by neighborhood

function learning is not optimal. M-SVM is a classifier whose separating hyper-plane is

derived based on structural risk minimization and the optimization of the support vectors

from the different classes, and thus optimal. Figure 5.24 shows the hyper-plane using a

Guassian kernel width (h) of 8.0 and a slack factor (C) of 0.1. An error rate of 1.48% is

achieved. Table 5.7 and 5.8 show the fault classification result and confusion matrix. The

training set is shown as circle and the test set as +. The training samples with black

circle are the support vectors.

86
Figure 5.24: M-SVM classification (Gaussian kernel hsvm=8.0, slack factor C=0.1) of vibration
signature.

Table 5.7: Fault classification confusion matrix of vibration signature.

Predicted Class
UBR BRG HTY Error Rate (%)
Ground UBR 84 4 0 4.44 %
Truth BRG 0 90 0 0%
HTY 0 0 90 0%

87
Table 5.8: M-SVM classification of vibration signatures result summary.

hsvm (kernel width): 8.0


C (slack factor): 0.1
b1 from class 1 versus 2 and 3: 1.019
b2 from class 2 versus 1 and 3: 1.134
b3 from class 3 versus 1 and 2: -0.920
Number of Support Vectors: 342
Error rate (overall): 1.48%
Feature vector dimension: 2
Template sample size: 270
Test sample size: 270
Computation time per test sample: 40.38 s

5.9 Discussions: Frequency-domain Analysis of Vibration Signatures

By selecting interesting features in frequency-domain, the 2400-dimensional

feature vector is reduced to 2-dimensional feature vector. Such dimensionality reduction

has not degraded the diagnostic information. This is shown by M-SVM automatically

classifying the 2-dimensional feature vectors with an error rate of 1.48%. Bearing fault

generates high frequency vibrations while unbalanced rotor creates dominant 1x machine

rotation speed frequency. Therefore, by examining vibration signals in these frequency

ranges, bearing and unbalanced rotor faults can be effectively detected and diagnosed.

88
CHAPTER 6: A STUDY ON MOTOR CURRENT
SIGNATURE USING EMPIRICAL MODE
DECOMPOSITION

This chapter presents the study and experiments carried out using EMD

technique, to discover new harmonic information about faulty machine signatures. This

approach is unlike all previous methods which use Fourier transform harmonic analysis

and wavelet decomposition as shown in the literature survey, and also in [86, 118], where

EMD is used to study one fault mode only. The objective is to identify harmonics that are

unique to each fault signature so as to validate that different machine fault indeed

generates a unique harmonic in the motor current. In the next, rationale for the use of this

technique is explained.

6.1 Fourier Transform

Fourier transform is the most well-known and most commonly used tool for

signal analysis. The main assumption is that any arbitrary square-integrable signal, x(t)

consists of an infinite sum of simple sinusoidal basis functions, as follows [117],

2nt

c e
i
x (t ) n
T
, (6.1)
n

Figure 7.1 illustrates Eq. (6.1). It shows a 10Hz square wave (black plot) being

approximated by the sum of 3 terms sinusoids (blue plot) and 10 terms sinusoids (red

plot). The wiggles represents information distortions.

89
Figure 6.1: Fourier Series (a finite sum of a 10Hz square wave with n=3 and n=10).

Each of these basis functions is a complex exponential, each of a frequency that is

an integer multiple of 1/T i.e., a family of harmonics. This assumes periodicity of the

signal, and in the case of non-periodicity signal, the integral is extended from positive

infinity to negative infinity. cn is a series of weighting coefficients; the Fourier

coefficients, where the optimal value for cn, is the correlation between x(t) and e-i2nt/T

over the interval [0 T]. Thus [117],

T 2nt
F x(t ) cn
1 i

T 0
T
x (t ) e dt.
(6.2)

which gives the Fourier Transform.

90
6.2 Wavelet Transform

Similarly, wavelet transform decomposes a square-integrable signal x(t) into a

family of wavelet bases s,(t) and weighting coefficients W(s,).


1 1 t
x (t )
C
0
W (s, )
s s
ds d .
(6.3)

where C is a constant depending on the base function. Thus, the wavelet transform is,


1 t
W ( s, ) x(t ) d , x(t ) L2 ( R)
*

s s (6.4)

where the wavelet basis function a,b(t) is,

1 t
s , (t ) . s 0, (6.5)
s s

In the above expression, s is the scale parameter inversely related to frequency,

is the translation in time, and (t) is called the prototype (mother) wavelet and s,(t)

the daughter wavelets. A unique property of a wavelet is that is has to be zero-mean on

the real line that is localized in time and frequency. In order to fulfill the zero-mean

condition, a wavelet thus needs to be oscillatory. Also, the wavelet transform has better

localization at low frequency than higher frequency components. Therefore, wavelet

transform is functions of time and frequency, describing the information on x(t) at various

time window and frequency bands, allowing information of x(t) on frequency and

amplitude variations at different time to be captured, that is, it reveals non-stationary

information of x(t). Figure 6.2 illustrates some of the different types of wavelet basis

functions.

91
Figure 6.2: Different wavelet basis functions.

6.3 Hilbert-Huang Transform

In order to study the non-linearity and non-stationary of x(t), the time-frequency-

energy model of x(t) is required. Fourier transform is unable to reveal such information.

A possible way to describe non-stationary of x(t) is to find instantaneous frequency and

instantaneous amplitude. Hilbert transform is able to yield this information. Hilbert

transform is another integral transform.

Instead of using a sinusoidal basis function for convolution with x(t), a kernel

1/(t-) and Cauchy Principal integral is used,



x(t )
1 1 (6.6)
P x(t ) d , x(t ) L2 ( R)

t

Cauchy Principle Integral is an integration technique (by Cauchy) that solves the

singularity problem at point t=.

From the Hilbert transform Eq. (6.6), the analytic function z(t) is obtained,

z(t ) x(t ) i x(t ), (6.7)

92
With Eulers identity, the analytic function z(t) is expressed alternatively as,

(6.8)
z (t ) a(t ) e i (t ) .

where a(t) is the instantaneous amplitude, (t) is the instantaneous phase function and

is the instantaneous frequency,

x(t ) d
a(t ) x(t ) 2 2 x(t ), (t ) tan 1 , . (6.9)
x(t ) dt

In Hilbert-Huang transform, IMFs is the x(t). Using instantaneous amplitude and

instantaneous frequency information, the x(t), can be expressed as a function of

instantaneous frequencies j(t) and amplitudes aj(t) of the IMFs thus derived using the

aforementioned EMD algorithm, as

n i ( t ) dt (6.10)
x(t ) Re a j (t )e j
j 1

where Re[] is the real part of the term aj(t)e ij(t)dt.

6.3.1 Hilbert Spectrum

With Hilbert-Huang transform and the instantaneous quantities aj(t) and j(t), a

two-dimensional graph of Frequency versus Time is plotted with the amplitude aj(t)

shown as colour bar. This graph is the Hilbert spectrum, and shows how the frequency of

the IMF varies with time.

93
6.3.2 Marginal Hilbert Spectrum

By summing the various amplitude aj(t) of the IMF of the same frequency across

different time span, as follows, T


h( ) H ( , t )dt. (6.11)
0

and a graph of Amplitude versus Frequency can be plotted. This graph is the Marginal

Hilbert spectrum. Marginal Hilbert spectrum shows the distribution of various

frequencies and the along the x-axis and amplitude of each frequency on the y-axis.

Nonlinear and non-stationary information about each IMF is observed by analyzing the

Hilbert spectrum and Marginal Hilbert spectrum.

6.4 Discussion: EMD as a suitable Analysis Tool

From Eq. (6.2), it is clear Fourier decomposition depends heavily on the pre-

defined sinusoidal basis function and has a strong a priori assumptions about x(t) of being

linear, periodic and stationary. From the nature of the inner product of two functions,

Fourier transform is the project of x(t) onto the sinusoidal basis function, and hence there

is no guarantee that the particular choice of sinusoidal basis function produces good

transformation. Motor current signal is non-stationary, i.e., fault frequencies are a

function machine slip, speed and loading conditions, thus changes as the loading

conditions vary. To analyze the motor current spectrum using FFT is very difficult to

locate the fault frequencies precisely and accurately, unless the machine operating

conditions are held constant in steady state conditions. Also, during FFT transformation,

the temporal relationship between the frequency and time is lost.

94
Similarly, from Eq. (6.4), wavelet transform at scale s and time is a projection of

x(t) onto the wavelet with scale s and time shift , and hence shows how similar x(t) is to

that particular wavelet. Therefore, the decomposition relies on the good choice of the a

priori assumed wavelet basis function. Good decomposition results is obtained if the

wavelet function with similar features as x(t) is used, hence skillful and careful selection

of the wavelet basis function is not trivial [52].

Many real-world data series is non-linear and non-stationary [119].

Transformation of x(t) based on these simplistic assumptions clearly lead to information

loss. EMD method, in contrast, is not constrained by this, as it is free of predefined basis

function, but derived them directly from actual empirical data i.e., x(t), in the form of

iterating sifting processes (Eq. (4.15-4.20)), to derive the IMFs in an adaptive fashion. As

such, the IMFs thus derived are the basis functions, and allow for the direct reconstitution

of x(t) by Eq. (6.10).

6.5 N-A M-EMD Experiment Results

In this experiment, motor current signatures of healthy machine (denoted by

HTY), Unbalanced rotor fault (UBR), Bearing fault (BRG), Broken rotor bar (BRB) and

Shorted stator winding fault (SWF) at machine operating speed of 20Hz, 30Hz and 40Hz;

almost spanning the entire normal machine operation speed, are studied. To avoid loss of

harmonic information in the time-domain signature, a higher sampling rate of 100kHz is

used. Three sets of signatures at machine operating speed of 20Hz, 30Hz and 40Hz, and

two sets of white Guassian noise, are submitted to N-A MEMD algorithm, to extract

95
harmonic information for a 5-class signature simultaneously. Figure 6.3 illustrates the

design of the multi-variate EMD problem.

HTY n1
channel channel
1 6
BRG n2
channel channel
2 7
BRB
channel
3
UBR
channel
4
SWF
IMF 1 channel IMF 1
IMF 1 5 IMF 1
IMF 1
IMF 2 IMF 1 IMF 2
IMF 2 IMF 1 IMF 2
IMF 2
IMF 3 IMF 2
IMF 3 IMF 2 IMF 3
. IMF 3 IMF 3
. IMF 3 .
.
. IMF 3 . .
. .
. . . .
. .
. . . . .
. .
. . . . .
.
. . . .
IMF n . .
IMF n IMF n
. IMF n
IMF n
IMF n
IMF n

Figure 6.3: A 7-channel Motor Current Signature decomposition by N-A MEMD.

Two channels of white Gaussian noise, channel 6 and 7, denoted by n1 and n2,

are added to this 7-channel presentation of multi-variate EMD. Appendix A shows the

EMD of HTY20, BRG20, BRB20, UBR20, SWF20 and added noise n1, n2

96
6.5.1 Discussions: IMF Derived by EMD

It is observed that the decomposition has derived eleven IMFs. With mode mixing

and mode misalignment problems resolved, same-indexed IMFs across different motor

current signatures are compared. To study the intrinsic modes derived by EMD

algorithm, a pair of IMF from different machine signatures is compared, such as, between

HTY20 IMF1 and BRG20 IMF1, HTY20 IMF1 and UBR20 IMF1, HTY20 IMF1 and

SWF IMF1 etc. To have an objective comparison between the same-indexed IMFs across

different signatures, the normalized cross-correlation sum between these same-indexed

pairs of IMFs are computed to determine their similarity to each other, as shown in Eq.

(6.11), N 1

p (t ) q (t ) (6.11)
R pq ( ) t 0
p (t ) q (t )

Next a vector rpq, with each element of the vector a normalized cross-correlation

value, evalauated at every time interval , is form as shown in Eq (6.12),

(6.12)
rpq ( ) [r1 r2 r2 N 1 ], rpq 1 x 2 N 1

The similarity measure between any two pair of same-indexed IMFs motor

current signatures is the maximum of the rpq vector, that is,

S ( p, q) arg max[r1 r2 rk ]
k (6.13)

Using Eq. (6.11), (6.12) and (6.13), the following cross-correlation results is tabulated.

97
Table 6.1: Similarity measures of same-indexed pair of machine current IMFs at 20Hz.

IMF2 IMF3 IMF4 IMF5 IMF6 IMF7 IMF8 IMF9 IMF10


HTY/BRG: 0.7260 0.9640 0.8661 0.0854 0.0655 0.1535 0.5187 0.7185 0.9873
HTY/BRB: 0.7177 0.9575 0.8671 0.1194 0.0981 0.2442 0.5746 0.7741 0.9866
HTY/UBR: 0.7234 0.9621 0.8682 0.1206 0.0954 0.1743 0.5874 0.7771 0.9875
HTY/SWF: 0.7280 0.9632 0.8664 0.1174 0.0747 0.1806 0.5969 0.7871 0.9871
BRG/BRB: 0.8934 0.9751 0.8874 0.8518 0.6599 0.3290 0.6546 0.9081 0.9958
BRG/UBR: 0.9211 0.9851 0.9043 0.8936 0.6451 0.3417 0.6713 0.9289 0.9970
BRG/SWF: 0.9206 0.9862 0.8874 0.8784 0.6904 0.3800 0.6435 0.9166 0.9966
BRB/UBR: 0.9970 0.9983 0.9949 0.9863 0.7383 0.5646 0.7322 0.9727 0.9992
BRB/SWF: 0.9964 0.9977 0.9979 0.9899 0.8143 0.6784 0.7861 0.9747 0.9995
UBR/SWF: 0.9985 0.9997 0.9987 0.9885 0.9263 0.8792 0.9052 0.9893 0.9998

Table 6.2: Similarity measures of same-indexed pair of machine current IMFs at 30Hz.

IMF2 IMF3 IMF4 IMF5 IMF6 IMF7 IMF8 IMF9 IMF10


HTY/BRG: 0.7125 0.9495 0.9522 0.1039 0.0707 0.3328 0.6430 0.6111 0.9906
HTY/BRB: 0.7131 0.9501 0.9530 0.1535 0.1752 0.4391 0.7347 0.7472 0.9924
HTY/UBR: 0.7825 0.9613 0.9444 0.2107 0.2359 0.5588 0.9350 0.9644 0.9999
HTY/SWF: 0.7039 0.9438 0.9497 0.1315 0.1476 0.4465 0.7307 0.7679 0.9925
BRG/BRB: 0.9775 0.9983 0.9706 0.9080 0.7278 0.3886 0.8438 0.5799 0.9975
BRG/UBR: 0.7111 0.9451 0.9474 0.1600 0.1101 0.3662 0.6470 0.5685 0.9909
BRG/SWF: 0.9352 0.9840 0.9571 0.8794 0.7214 0.3593 0.8451 0.6141 0.9978
BRB/UBR: 0.7052 0.9449 0.9514 0.1790 0.1312 0.4968 0.7407 0.7341 0.9923
BRB/SWF: 0.9653 0.9845 0.9939 0.9591 0.8257 0.4209 0.9313 0.9612 0.9999
UBR/SWF: 0.7035 0.9500 0.9481 0.1823 0.1431 0.4607 0.7426 0.7549 0.9924

Table 6.3: Similarity measures of same-indexed pair of machine current IMFs at 40Hz.

IMF2 IMF3 IMF4 IMF5 IMF6 IMF7 IMF8 IMF9 IMF10


HTY/BRG: 0.8143 0.9593 0.9638 0.7301 0.6426 0.3727 0.7563 0.6736 0.9956
HTY/BRB: 0.9674 0.9897 0.9904 0.9259 0.8156 0.7053 0.9610 0.9668 0.9996
HTY/UBR: 0.9538 0.9847 0.9837 0.8533 0.7687 0.5129 0.9527 0.9795 0.9995
HTY/SWF: 0.9794 0.9931 0.9960 0.9392 0.8588 0.6225 0.9627 0.9855 0.9998
BRG/BRB: 0.8147 0.9622 0.9647 0.8087 0.6701 0.3321 0.7693 0.6522 0.9962
BRG/UBR: 0.9013 0.9583 0.9669 0.8053 0.6108 0.3323 0.7890 0.6453 0.9966
BRG/SWF: 0.8516 0.9607 0.9677 0.7688 0.6220 0.3320 0.7703 0.6691 0.9962
BRB/UBR: 0.8909 0.9624 0.9868 0.9315 0.8317 0.6995 0.9599 0.9770 0.9999
BRB/SWF: 0.9141 0.9704 0.9895 0.9443 0.8212 0.6210 0.9600 0.9704 0.9998
UBR/SWF: 0.9919 0.9973 0.9949 0.9462 0.8906 0.7575 0.9740 0.9885 0.9997

98
6.5.2 Discussions: Filter-bank Property of EMD Algorithm

From Table 6.1, 6.2 and 6.3, it is observed that IMF5 to IMF9 are unique having

low maximum cross-correlation sums, whereas IMF2-4 and IMF10 closely resemble with

each other as their maximum cross-correlation sums having high score, and hence not

unique. Since IMF 5 to 9 are unique, analysis is focus on these intrinsic modes. Figure

6.4 shows the Hilbert spectrum and Marginal Hilbert Spectrum of machine signatures at

30Hz machine speed in subplot 1 and subplot 2 to 6 respectively, with amplitude in log-

scale.

Figure 6.4: EMD as filter-banks for HTY30 (IMF 5 9) machine current signature.

99
It is also observed that the sifting process the EMD algorithm has in fact separated

the signatures into a few frequency bands, acting essentially like a wavelet-like filter

[120], with the highest frequency band associated with lower indexed IMF. Table 6.4

summaries the frequency bands associated with each IMF.

Table 6.4: Frequency band for HTY30 (IMF 5-9) machine current signature.

IMF Frequency range (Hz)


5 1000 - 9000
6 900 - 4000
7 300 - 2000
8 200 - 1000
9 150 - 600

The Hilbert spectrum shows the spectrum activities as function of time, where

each color dot in the plot represents a frequency at a particular point in time. It shows that

the machine signature is a complicated signal producing a wide range of frequencies.

However, the main spectra activity is around 100Hz to 800Hz from IMF8 and IMF9.

With the effective separation of the harmonic into separate frequency bands, it allows the

identification of interesting unique spectrum for the study of signature, and to discard the

common intrinsic modes that show the same features across different signatures. The

following section elaborates further on this.

100
6.5.3 Discussions: Significance of IMF1, IMF2, IMF3, IMF4

IMF1 is the added white Guassian noise and is discarded. IMF2, IMF3 and IMF4

are the common intrinsic modes to all the signatures, since their maximum cross-

correlation sums of these pairs of IMFs have almost the same values with high scores.

They are visually indistinguishable and closely resemble the same-indexed IMFs of other

signatures. They are the common intrinsic modes for the signatures, due primarily to the

harmonics from supply voltage inverter high frequency switchings, high-frequency noise

and the interactions between harmonics.

Figure 6.5: IMF1, IMF2, IMF3, IMF4 of the machine signatures at 20Hz.

101
Figure 6.6: IMF1, IMF2, IMF3, IMF4 of the machine signatures at 30Hz.

Figure 6.7: IMF1, IMF2, IMF3, IMF4 of the machine signatures at 40Hz.

102
6.5.4 Discussions: Significance of IMF10, IMF11

IMF10 is the fundamental supply frequency by the Voltage Supply Inverter (VSI).

EMD has neatly separated the fundamental supply frequency; which is the dominant

frequency of the machine signature analysis. This separation is achieved by the adaptive

sifting process and no notch filter is required. This is a marked difference from all

surveyed literatures where notch filtering is used to remove this dominant frequency.

Figure 6.8: IMF10 and IMF11 (residue) of the machine signatures at 20Hz.

Figure 6.9: IMF10 and IMF11 (residue) of the machine signatures at 30Hz.

Figure 6.10: IMF10 and IMF11 (residue) of the machine signatures at 40Hz.

103
The residue correctly shows a long term trend of zero as the preceeding IMF10

is a sinosoid of zero-mean. With the observations discussed thus far, IMF1, IMF2, IMF3,

IMF4, IMF10 and IMF11,which is the residue, are discarded.

6.5.5 Discussions: Significance of IMF5, IMF6, IMF7, IMF8, IMF9

IMF5, IMF6, IMF7, IMF8, IMF9 are of interest, as they show significant

differences in their maximum cross-correlation sum values. Therefore, they are of interest

to the study of identifying uniqueness of different machine fault signatures. The figures

below show some of these IMFs, especially IMF5 to 9 at 20Hz machine speed. Their

corresponding Hilbert spectrum and Marginal Hilbert spectrum are shown in Appendix

B.

Figure 6.11: IMF5-9 of the HTY machine signatures at 20Hz.

104
Figure 6.12: IMF5-9 of the BRG machine signatures at 20Hz.

Figure 6.13: IMF5-9 of the BRB machine signatures at 20Hz.

105
Figure 6.14: IMF5-9 of the UBR machine signatures at 20Hz.

Figure 6.15: IMF5-9 of the SWF machine signatures at 20Hz.

106
6.6 Visualization of the Comparison results by SOM

In this section, the difference between the pair of machine signature is visualized

using SOM. It is well-known that SOM preserves the topological order of multi-

dimensional feature vectors, where feature vectors of the same type clusters together, and

presents such visualization of the clusters in a 2D-grid. Using this unique capability of

SOM, the Euclidean distances among the different pair of same-indexed IMF comparison

results are visualized. The SOM input consists of a 5x10 matrix, with each column is a

feature vector, fea_IMF, created by using the maximum cross-correlation sum of same-

index IMF5 to IMF9 of different signatures, as follows,

fea _ IMF IMF 5 IMF 9 (6.14)


T
IMF 6 IMF 7 IMF 8

In the next, a 20x20 SOM leans the topological order of the feature vectors, and

display their Euclidean distance relationships on a 2D grid. Each dot on the grid

represents a SOM neuron. Figure 6.16, 6.17 and 6.18 show this.

6.7 Discussions: Discovery of Unique Features by SOM

It is observed from Figure 6.16 that HTY/UBR is close to HTY/SWF. However,

all other vectors are further apart and equally spaced. HTY/BRG and HTY/BRB are far

apart. Therefore, at low machine speed of 20Hz, motor current is unable to generates

unique sigantures that allows the diagnosis of four separate machine fault modes under

this study, namely, bearing, unbalanced rotor, broken rotor bars and shorted stator

windings.

107
Figure 6.16: Feature map using fea_IMF vector at fs=20Hz.

It is observed from Figure 6.17, at higher machine speed of 30Hz, HTY/UBR and

HTY/SWF features are farther now than at 20Hz. This indicates that UBR and SWF

signatures are more distinct to HTY signature than at 20Hz. This allows for the diagnosis

of unbalanced rotor fault and shorted stator windings. HTY/BRB and HTY/BRG are

clearly apart and hence allow for the diagnosis for bearing and broken rotor bar faults. All

other feature vectors are far apart and almost equally spaced. This indicates they are

unique.

108
Figure 6.17: Feature map using fea_IMF vector at fs=30Hz.

At even higher speed of 40Hz, HTY/SWF and HTY/UBR vectors are far apart as

at 30Hz, as shown in Figure 6.18. HTY/BRB and HTY/BRG are still clearly apart and

hence allow for diagnosis for bearing and broken rotor bar faults.

109
Figure 6.18: Feature map using fea_IMF vector at fs=40Hz.

EMD has discovered unique non-linear and non-stationary features at machine

operating speed of 30Hz and 40Hz. Unbalanced rotor and shorted stator windings faults

produce similar harmonics at lower speed machine of 20Hz, blurring the uniqueness of

the signatures of unbalanced rotor fault and shorted stator windings, to allow for fault

diagnosis purposes. Therefore, there is a potential risk that an unbalanced rotor fault

maybe wrongly diagnosed as shorted stator windings, and vice versa.

110
CHAPTER 7: CONCLUSION

This project has demonstrated a simple and effective data-based scheme, using

time-domain vibration data, for the continuous automatic condition monitoring and

diagnosis of the two most common machine fault modes, namely, bearing and

unbalanced rotor faults. The key idea is to use a novel normalized cross-correlation sum

operator as similarity measure and the use of k-NN algorithm, for the automatic

classification of machine faults. This technique is both noise-tolerant and shift-invariant.

Experiments conducted showed that a low error rate of 0.74% is achieved and insensitive

to a wide range of machine operating speed from 15Hz to 32Hz. As such, objective 1

mentioned in Chapter 1 has been achieved.

Further, this project also showed the successful diagnosis of these two mechanical

faults using vibration frequency-domain information, where SOM is used to discover

cluster information on the extracted features in an unsupervised way, and an M-SVM is

next used to derive the clusters globally optimal separating hyper-plane for the automatic

classification of the fault modes. A low error rate of 1.48% is achieved and insensitive to

a wide range of machine operating speed from 15Hz to 32Hz. This has achieved

objective 1 mentioned in Chapter 1.

This project also study of motor current signature harmonic content using EMD

technique. A wide range of fault modes are studied, namely, bearing fault, unbalanced

rotor fault, broken rotor bar fault and shorted stator winding fault, which together

accounts for more than 85% of all machine fault mode. This project has demonstrated the
111
use of the unique filter bank property of EMD algorithm, to effectively separate the

various harmonics presence in the machine signatures, namely, the high-frequency

switching harmonics by VSI and high-frequency noise, and the low-frequency

fundamental supply frequency. By such separation of the common modes, unique non-

linear and non-stationary features are discovered at machine operating speed of 30Hz and

40Hz. This has achieved objective 2 mentioned in Chapter 1.

However, it is also observed in this project that the uniqueness of the signatures is

not clearly present in lower machine operating speed of 20Hz. With these unique features

at machine speed of more than 30Hz extracted, automatic fault classifications by a single

effective fault detection and diagnosis scheme based on EMD technique can be achieved.

This will lay the foundation for future works for using EMD technique for machine fault

detection and diagnosis.

112
REFERENCES

[1] P.J. Tavner, Review of condition monitoring of rotating electrical machines,


Electric Power Applications, IET, vol.2, Issue 4, pp.215 247, Jul 2008

[2] P.J. Tavner, J. Penman, Condition Monitoring of Electrical Machine, Research


Studies Press Ltd, Letchworth, Hertfordshire, UK, 1987

[3] P. Vas, Parameter Estimation, Condition monitoring, and diagnosis of Electrical


Machines, Oxford Science Publications, Clarendon Press, US, 1993

[4] A. Bellini, F. Filippetti, C. Tassoni, Advances in Diagnostic Techniques for


Induction Machines, IEEE Transactions on Industrial Electronics, vol. 55, no.
12, Dec 2008

[5] IEEE Motor Reliability Working Group, Report of large motor reliability
survey of industrial and commercial installations, Part I, IEEE Trans. Ind. Appl.,
vol. IA-21, no. 4, pp.853864, Jul 1985

[6] A. Ibrahim, M. El Badaoui, F. Guillet, F. Bonnardot, A New Bearing Faults


Detection Method in Induction Machines Based on Instantaneous Power Factor,
IEEE Transactions on Industrial Electronics, 2003

[7] S. Nandi, H.A. Toliyat, Xiaodong Li, Condition monitoring and fault diagnosis
of electrical motors-a review, IEEE Transaction on Energy Conversion,
vol.20, Issue 4, pp.719 729, Dec 2005

[8] B. Ayhan, H.J. Trussell, Mo-Yuen Chow, Myung-Hyun Song, On the Use of a
Lower Sampling Rate for Broken Rotor Bar Detection With DTFT and AR-
Based Spectrum Methods, IEEE Transactions on Industrial Electronics,
vol.55, Issue 3, pp.1421 1434, Mar 2008

[9] G. Bouleux, A. Ibrahim, F. Guillet, R. Boyer, A subspace-based rejection


method for detecting bearing fault in asynchronous motor, IEEE Transaction on
Condition Monitoring and Diagnosis, 2008. CMD 2008, pp.171 174, 21-24
Apr 2008

[10] J.L.H. Silva, A.J.M. Cardoso, Bearing failures diagnosis in three-phase


induction motors by extended Park's vector approach, 31st Annual Conference
of IEEE Industrial Electronics Society, IECON 2005. 6-10 Nov 2005

[11] W.T. Thomson, M. Fenger, Case histories of current signature analysis to detect
faults in induction motor drives, IEEE International Electric Machines and
Drives Conference, 2003. IEMDC'03., vol. 3, pp.1459 - 1465, 1-4 Jun 2003
113
[12] J.R. Stack, T.G. Habetler, R.G. Harley, "Bearing fault detection via
autoregressive stator current modeling, IEEE Transactions on Industry
Applications, vol. 40, Issue 3, pp.740 747, May-Jun 2004

[13] Wei Zhou, T.G. Habetler, R.G. Harley, Bin Lu, Incipient Bearing Fault
Detection via Stator Current Noise Cancellation using Wiener Filter,
Diagnostics for Electric Machines, Power Electronics and Drives, 2007.
SDEMPED 2007, pp.11-16, 6-8 Sep 2007

[14] D.E. Bently, C. T. Hatch, B. Grisson, Fundamentals of Rotating Machinery


Diagnostics, Bently Pressurized Bearing Company, 2002

[15] Jun Zhang, Rui-Xin Li, Pu Han, Dong-Feng Wang, Xi-Chao Yin, Wavelet
Packet Feature Extraction for Vibration Monitoring and Fault Diagnosis of
Turbo-Generator, Machine Learning and Cybernetics, 2003. Proceedings of The
IEEE International Conference, pp.76 81, 2-5 Nov 2003

[16] Wensheng Su, Fengtao Wang, HongZhu, Zhixin Zhang, Zhenggang Guo,
Rolling element bearing faults diagnosis based on optimal Morlet wavelet filter
and autocorrelation enhancement, Elsevier, Science Direct, Mechanical Systems
and Signal Processing Mechanical Systems and Signal Processing 24 (2010),
pp.14581472, 2010

[17] Shibin Wang, Weiguo Huang, Z.K. Zhu, Transient modeling and parameter
identification based on wavelet and correlation filtering for rotating machine
fault diagnosis, Elsevier, Science Direct, Mechanical Systems and Signal
Processing 25 (2011) 12991320, 2011

[18] I. Lasurt, A.F. Stronash, J. Penman, A Fuzzy Logic Approach to the


Interpretation of Higher Order Spectra Applied to Fault Diagnosis in Electrical
Machines, IEEE 2000

[19] SpectraQuest, Inc., Rotating Machinery Fault Diagnosis Techniques Envelope


and Cepstrum Analyses, Tech Note, SpectraQuest Inc., 2009

[20] A. Muthukumarasamy, S. Ganeriwala, Diagnosis of Rolling Element Bearing


Faults using Envelope Analysis, Tech Note, SpectraQuest Inc., 2009

[21] F.V. Nelwamondo, T. Marwala, Faults Detection Using Gaussian Mixture


Models, Mel-Frequency Cepstral Coefficients and Kurtosis, 2006 IEEE
International Conference on Systems, Man, and Cybernetics, Oct 8-11, 2006,
Taipei, Taiwan

[22] A. Widodo, Bo-Suk Yang, Tian Han, Combination of independent component


analysis and support vector machines for intelligent faults diagnosis of induction

114
motors, Elsevier, Science Direct, Expert Systems with Applications 32 (2007)
pp.299312, 2007

[23] L.M.R Baccarini, V.V.R. Silva, B.R. Menezes, W.M. Caminhas, SVM practical
industrial application for mechanical faults diagnostic, Elsevier, Science Direct,
Expert Systems with Applications 38 (2011) pp. 69806984, 2011

[24] Chang-Ching Lin, Shien-Chii Shieh, Intelligent Vibration Signal Diagnostic


System Using Artificial Neural Network, 2009 IEEE Second International
Conference on Intelligent Computation Technology and Automation, 2009

[25] Bo Li, G. Goddu, Mo-Yuen Chow, Detection of Common Bearing Faults Using
Frequency-Domain Vibration Signals and a Neural Network Based Approach,
Proceedings of the American Control Conference Philadelphia, Pennsylvania,
Jun 1998

[26] Wei He, Xiang Zhou, Application of the Wavelet-SOFM Network in Roll
Bearing Defect Diagnosis, IEEE, Global Congress on Intelligent Systems, 2009

[27] Yu Yang, Dejie Yu, Junsheng Cheng, A fault diagnosis approach for roller
bearing based on IMF envelope spectrum and SVM, Elsevier, Science Direct,
Measurement 40 (2007) 943950, 2007

[28] Hui Li, Haiqi Zheng, Liwei Tang, Instantaneous Energy Spectrum Based Gear
Fault Detection and Diagnosis, IEEE Sixth International Conference on Fuzzy
Systems and Knowledge Discovery, 2009

[29] O.R. Seryasat, M.A. Shoorehdeli, F. Honarvar, A. Rahmani, Haddadnia, Multi-


fault diagnosis of ball bearing using intrinsic mode functions, Hilbert marginal
spectrum and multi -class support vector machine, 2nd International Conference
on Mechanical and Electronics Engineering (ICMEE 2010), 2010

[30] Zhang Bo-Wen, Qi Wei, Yang Dong, Tang Xiaocheng, Song Zhihuan, The
Application of Frequency Family Separation Method in Rolling Bearing Fault
diagnosis Based on Empirical Mode Decomposition, Proceedings of the 29th
Chinese Control Conference, Beijing, China, Jul 29-31, 2010

[31] Hui Li, Yucai Wang, Yanfang Ma, Ensemble Empirical Mode Decomposition
and Hilbert-Huang Transform Applied to Bearing Fault Diagnosis, 3rd
International Congress on Image and Signal Processing (CISP2010), 2010

[32] S. Nandi, H.A. Toliyat, Condition monitoring and fault diagnosis of electrical
machines-a review, Industry Applications Conference, 1999. Thirty-Fourth IAS
Annual Meeting. Conference Record of the 1999, IEEE, vol. 1, pp.197 204, 3-7
Oct 1999

115
[33] F. Filippetti, G. Franceschini, C. Tassoni, P. Vas, "Recent Developments of
Induction Motor Drives Fault Diagnosis Using AI Techniques, IEEE
Transactions on Industrial Electronics, vol. 47, no. 5, Oct 2000

[34] M.H. Benbouzid, A Review of Induction Motors Signature Analysis as a


Medium for Faults Detection, IEEE Transactions on Industrial Electronics, vol.
47, no. 5, Oct 2000

[35] S.H. Kia, A.M Mabwe, H. Henao, G.A. Capolino, Wavelet Based Instantaneous
Power Analysis for Induction Machine Fault Diagnosis Wavelet Based
Instantaneous Power Analysis for Induction Machine Fault Diagnosis, IEEE
Industrial Electronics, IECON 2006 - 32nd Annual Conference. pp.1229 1234,
2006

[36] D. Basak, A. Tiwari, S.P. Das, Fault diagnosis and condition monitoring of
electrical machine Fault diagnosis and condition monitoring of electrical
machines - A Review, Industrial Technology, 2006. ICIT 2006. IEEE
International Conference, pp. 3061 3066, 2006

[37] W. Zhou, T.G. Habetler, R.G. Harley, Stator Current-Based Bearing Fault
Detection Techniques: A General Review, Diagnostics for Electric Machines,
Power Electronics and Drives, SDEMPED, pp.7 10, 2007

[38] W.T. Thomson, M. Fenger, Current signature analysis to detect induction motor
faults, Industry Applications Magazine, IEEE , vol. 7, Issue 4, pp.26 34, Jul-
Aug 2001

[39] N. Mehala, R. Dahiya, Motor Current Signature Analysis and its Applications
in Induction Motor Fault Diagnosis, International Journal of Systems
Applications, Engineering & Development, vol. 2, Issue 1, 2007

[40] I. Tsoumas, E. Mitronikas, G. Georgoulas, A. Safacas, A comparative study of


induction motor current signature analysis techniques for mechanical faults
detection, SDEMPED 2005 - International Symposium on Diagnostics for
Electric Machines, Power Electronics and Drives Vienna, Austria, 7-9 Sep 2005

[41] C. Kral, T.G. Habetler, R.G. Harley F. Pirker, G. Pascoli, H. Oberguggenberger,


C.J.M. Fenz, A Comparison of Rotor Fault Detection Techniques with Respect
to the Assessment of Fault Severity, Symposium on Diagnostics for Electric
Machines, Power Electronics and Drives, Atlanta, GA, USA, 24-26 Aug 2003

[42] K. Bacha, M. Gossa, H. Henao, G.A. Capolino, Comparative Investigation of


Diagnosis Media of Stator Voltage Asymmetry and Rotor Broken Bars in
Induction Machines, IEEE Industrial Electronics, IECON 2006 - 32nd Annual
Conference, pp: 5040 5045, 2006

116
[43] J. Cusido, L. Romeral, J.A Ortega, J.A Rosero, A.G. Espinosa, Fault Detection
in Induction Machines Using Power Spectral Density in Wavelet
Decomposition, IEEE Transactions on Industrial Electronics, vol. 55, Issue
2, pp. 633 643, Feb 2008

[44] He Zhengjia, Zhao Jiyuan, He Yibin, Meng Qingfeng, Wavelet transform and
multiresolution signal decomposition for machinery monitoring and diagnosis,
Industrial Technology, 1996. (ICIT '96), Proceedings of The IEEE International
Conference, pp.724 727, 2-6 Dec 1996

[45] L. Eren, M.J. Devaney, Bearing damage detection via wavelet packet,
Proceedings of the 19th IEEE Instrumentation and Measurement Technology
Conference, 2002. IMTC/2002, vol.1, pp.109 113, 21-23 May 2002

[46] H. Douglas, P. Pillay, A.K. Ziarani, A new algorithm for transient motor current
signature analysis using wavelets, IEEE Trans. Ind. Appl., vol. 40, no. 5, pp.
13611368, Sep/Oct 2004

[47] S.H. Kia, A.M. Mabwe, H. Henao, G.A. Capolino, Wavelet Based
Instantaneous Power Analysis for Induction Machine Fault Diagnosis, 2006

[48] S.H. Kia, H. Henao, G.A. Capolino, Diagnosis of Broken-Bar Fault in Induction
Machines Using Discrete Wavelet Transform Without Slip Estimation, IEEE
Transactions on Industry Applications, vol. 45, no. 4, Jul/Aug 2009

[49] R. Yan, Robert X. Gao, Energy-Based Feature Extraction for Defect Diagnosis
in Rotary Machines, IEEE Transactions on Instrumentation and Measurement,
vol. 58, no. 9, Sep 2009

[50] A. Bouzida, O. Touhami, R. Ibtiouen, A. Belouchrani, M. Fadel, A. Rezzoug,


Fault Diagnosis in Industrial Induction Machines through Discrete Wavelet
Transform, 2009

[51] R.N. Dash, B. Subudhi, S. Das, Induction Motor Stator Inter-Turn Fault
Detection Using Wavelet Transform Technique, 2010 5th International
Conference on Industrial and Information Systems, ICIIS 2010, Jul 29 - Aug 01,
2010

[52] Enzo C.C. Lau, H.W. Ngan, Detection of Motor Bearing Outer Raceway Defect
by Wavelet Packet Transformed Motor Current Signature Analysis, IEEE
Transactions on Instrumentation and Measurement, vol. 59, no. 10, Oct 2010

[53] M.H. Benbouzid, M. Vieira, C. Theys, Induction Motors Faults Detection and
Localization Using Stator Current Advanced Signal Processing Techniques,
IEEE Transactions on Power Electronics, vol. 14, no. 1, Jan 1999

117
[54] L.A. Pereira, D. Fernandes, D.S. Gazzana, F.B. Libano, S. Haffher, Application
of the Welch, Burg and MUSIC Methods to the Detection of Rotor Cage Faults
of Induction Motors , Transmission & Distribution Conference and Exposition:
Latin America, 2006. TDC'06. IEEE/PES , pp.1 - 6, 2006

[55] M. Djeddi, P. Granjon, B. Leprettre, Bearing Fault Diagnosis in Induction


Machine Based on Current Analysis Using High-Resolution Technique,
Diagnostics for Electric Machines, Power Electronics and Drives, SDEMPED,
pp.23 28, 2007

[56] A. Bellini, A. Yazidi, F. Filippetti, C. Rossi, G.A. Capolino, High Frequency


Resolution Techniques for Rotor Fault Detection of Induction Machines, IEEE
Transactions on Industrial Electronics, vol. 55, no. 12, Dec 2008

[57] A. Bellini, M. Cocconcelli, F. Immovilli, R. Rubini, Diagnosis of mechanical


fault Diagnosis of mechanical faults by spectral kurtosis energy, Industrial
Electronics, 2008. IECON 2008. 34th Annual Conference of IEEE , pp.3079
3083, 2008

[58] A. Miletic, M. Cettolo, Frequency Converter Influence on Induction Motor


Rotor Faults Detection Using Motor Current Signature Analysis - Experimental
Research, SDEMPED 2003 -Symposium on Diagnostics for Electric Machines,
Power Electronics and Drives, Atlanta, CA, USA, 24-26 Aug 2003

[59] B. Akin, U. Orguner, H.A. Toliyat, M. Rayner, Low Order PWM Inverter
Harmonics Contributions to the Inverter-Fed Induction Machine Fault
Diagnosis, IEEE Transactions on Industrial Electronics, vol. 55, no. 2, Feb 2008

[60] I.P. Georgakopoulos, E.D. Mitronikas, A.N. Safacas, I.P. Tsoumas, Rotor fault
detection in inverter drive systems using inverter input current analysis, XIX
International Conference on Electrical Machines - ICEM 2010, Rome, 2010

[61] J. Sottile, F.C. Trutt, J.L Kohler, Experimental investigation of on-line methods
for incipient fault detection [in induction motors], Industry Applications
Conference, 2000. Conference Record of the 2000 IEEE pp.2682 - 2687 vol.4,
2000

[62] Srgio, M.A. Cruz, A.J.M Cardoso, Stator Winding Fault Diagnosis in Three-
Phase Synchronous and Asynchronous Motors, by the Extended Parks Vector
Approach , IEEE Transactions on Industry Applications, vol. 37, no. 5, Sep/Oct
2001

[63] J.A. Antonino-Daviu, M. Riera-Guasp, J.R. Folch, M.P.M Palomares,


Validation of a New Method for the Diagnosis of Rotor Bar Failures via
Wavelet Transform in Industrial Induction Machines, IEEE Transactions on
Industry Applications, vol. 42,no. 4, Jul/Aug 2006

118
[64] S. Nandi, Detection of Stator Faults in Induction Machines using Residual
Saturation Harmonics, IEEE Transactions on Industrial Applications, vol. 42,
no. 5, Sep/Oct 2006

[65] L. Frosini, E. Bassi, Stator Current and Motor Efficiency as Indicators for
Different Types of Bearing Faults in Induction Motors, Industrial Electronics,
vol.57, issue: 1 pp.244 251, 2010

[66] Wei Zhou, T.G. Habetler, R.G. Harley, Bin Lu, Incipient Bearing Fault
Detection via Stator Current Noise Cancellation using Wiener Filter, IEEE
International Symposium on Diagnostics for Electric Machines, Power
Electronics and Drives, 2007. SDEMPED 2007, pp.11 16, 6-8 Sept 2007

[67] K. Cho, J. Lang, S. Umans, Detection of broken rotor bars in induction motors
using state and parameter estimation, IEEE Transactions on Industry
Applications, vol. 28, no. 3, pp.702709, May/Jun 1992

[68] O. A. Mohammed, N. Y. Abed, S. Ganu, Modeling and characterization of


induction motor internal faults using finite element and discrete wavelet
transforms, 2007

[69] E. Darie, E. Darie, About Modeling of Induction Motor Faults, 6TH


International Conference on Electromechanical and Power Systems Chi-in-u,
Rep. Moldova, Oct 4-6, 2007

[70] R. Fiser, Application of a finite element method to predict damage induction


motor performance, IEEE Transactions on Magnetics, vol. 37, no. 5, pp. 3635
3639, 2001

[71] J. Faiz, B. M. Ebrahimi, Locating rotor broken bars in induction motors using
finite element method, Energy Convers. Manage, vol. 50, no. 1, pp.125131,
Jan 2009

[72] C. Kral, A. Haumer, C. Grabner, Modeling and Simulation of Broken Rotor


Bars in Squirrel Cage Induction Machines, Proceedings of the World Congress
on Engineering 2009, vol. I, WCE 2009, London, U.K. Jul 1 - 3, 2009

[73] M. Riera-Guasp, M.F. Cabanas, J.A. Antonino-Daviu, M. Pineda-Sanchez,


C.H.R. Garca, Influence of Nonconsecutive Bar Breakages in Motor Current
Signature Analysis for the Diagnosis of Rotor Faults in Induction Motors, IEEE
Transactions on Energy Conversion, vol. 25, no. 1, Mar 2010

[74] V. Fireteanu, P. Taras, Teaching induct ion machine through finite element
models, 18th International Conference on Electrical Machines, 2008. ICEM
2008. pp.1 6, 2008

119
[75] H.A. Toliyat, M.S. Areffen, A.G. Parlos, A method for Dynamic Simulation of
Air-Gap Eccentricity in Induction Machine, IEEE Transactions on Industry
Applications, vol. 32, no. 4 July/Aug 1996

[76] G.M. Joksimovic, J. Penman, The Detection of Inter-Turn Short Circuits in the
Stator Windings of Operating Motors, IEEE Transactions on Industrial
Electronics, vol. 47, no. 5, Oct 2000

[77] H. Nejjari, M.H. Benbouzid, Monitoring and Diagnosis of Induction Motors


Electrical Faults Using a Current Parks Vector Pattern Learning Approach,
IEEE Transactions on Industry Applications, vol. 36, no. 3, May/Jun 2000

[78] L. Eren, A. Karahoca, M.J. Devaney, Neural network based motor bearing fault
detection, Proceedings of the 21st IEEE Instrumentation and Measurement
Technology Conference, 2004. IMTC 04., pp.1657 1660, vol.3, 18-20 May
2004

[79] L.A. Pereira, G. Silva, L.F.A Pereira, Motor current signature analysis and
fuzzy logic applied to the diagnosis of short-circuit faults in induction motors,
31st Annual Conference of IEEE Industrial Electronics Society, 2005, IECON
2005, 6-10 Nov 2005

[80] I. Aydin, M. Karakose, E. Akin, Artificial immune based support vector


machine algorithm for fault diagnosis of induction motors, International Aegean
Conference on Electrical Machines and Power Electronics, 2007. ACEMP '07,
pp.217 221, 2007

[81] K. Teotrakooll, M.J. Devaney, L. Eren, Bearing Fault Detection in Adjustable


Speed Drives via a Support Vector Machine with Feature Selection using a
Genetic Algorithm, I2MTC 2008 - IEEE International Instrumentation and
Measurement Technology Conference Victoria, Vancouver Island, Canada, May
12-15, 2008

[82] T.W. Chua, W.W. Tan, Z.-X. Wang, C.S. Chang, Hybrid time-frequency
domain analysis IEEE International Symposium on for inverter-fed induction
motor, IEEE International Symposium on Industrial Electronics (ISIE), pp.1633
1638, 2010

[83] Z.-X. Wang, C.S. Chang, T.W. Chua, W.W. Tan, Ensemble and individual
noise reduction method for induction-motor signature analysis, 8th International
Conference on Advances in Power System Control, Operation and Management
(APSCOM 2009), pp.1 6, 2009

[84] Z.-X. Wang, C.S. Chang, X. German, W.W. Tan, Online fault detection of
induction motors using independent component analysis and fuzzy neural

120
network, 8th International Conference on Advances in Power System Control,
Operation and Management (APSCOM 2009), pp.1 6, 2009

[85] A. Rosero, L. Romeral, J.A. Ortega, E. Rosero, Short-Circuit Detection by


Means of Empirical Mode Decomposition and WignerVille Distribution for
PMSM Running Under Dynamic Condition, IEEE Transactions on Industrial
Electronics, vol. 56 , pp.4534 4547, 2008

[86] R. Puche-Panadero, M. Pineda-Sanchez, M. Riera-Guasp, J. Roger-Folch, J.A.


Antonino-Daviu, J. Perez-Cruz, Diagnosis of rotor bar breakages based on the
Hilbert Transform of the current during the startup transient, IEEE International
conference on Electric Machines and Drives 2009, IEMDC '09, pp.1434 1440,
2009

[87] S. Nandi H.A. Toliyat, A.G. Parlos, Performance Analysis of A Single Phase
Induction Motor Under Eccentric Conditions, IEEE Industry Applications
Society Annual Meeting, New Orleans, Louisiana, Oct 5-9, 1997

[88] S. Nandi, H.A. Toliyat, Xiaodong Li, Condition Monitoring and Fault
Diagnosis of Electrical MotorsA Review, IEEE Transactions on Energy
Conversion, vol. 20, no. 4, Dec 2005

[89] D. Morinigo-Sotelo, L.A. Garcia-Escudero, O. Duque-Perez, M. Perez-


Alonso, Practical Aspects of Mixed-Eccentricity Detection in PWM Voltage-
Source-Inverter-Fed Induction Motors, IEEE Transactions on Industrial
Electronics, vol. 57, no. 1, Jan 2010

[90] M.L. Adams, Jr, Rotating Machinery Vibration: From Analysis to


Troubleshooting, Marcel Dekker, New York, 2001

[91] SpectraQuest, Inc., Applied Vibration Analysis Training Manual & Laboratory
Exercises, Richmond, Virginia, 2009

[92] R.R. Obaid, T.G. Habetler, D.J. Gritter, A Simplified Technique for Detecting
Mechanical Faults using Stator Current in Small Induction Motors, 2000

[93] R.A. Guyer, Jr, Rolling Bearings Handbook and Troubleshooting Guide,
Chilton Book Company, Radnor, Pennsylvania, 1996

[94] C. Riley, K. Lin, T.G Habetler, G.B. Kliman, Stator current harmonics and their
causal vibrations: A preliminary investigation of sensorless vibration monitoring
applications, IEEE Trans. Ind. Appl., vol. 35, no. 1, pp. 9499, Jan/Feb 1999

[95] A.M. Knight, S.P. Bertani, Mechanical fault detection in a medium sized
induction motor using stator current monitoring, IEEE Transactions on Energy
Conversion, vol. 20, no. 4, Dec 2005

121
[96] S. Nandi, H.A. Toliyat, Novel frequency domain based technique to detect
incipient stator inter-turn faults in induction machines, IEEE Industry
Applications Conference, 2000. vol. 1, pp.367 374, 2000

[97] J. Stein, G. B. Kliman, R. A. Koegl , R. D. Endicott, M. W. Madden,


Noninvasive Detection of Broken Rotor Bars in Operating Induction Motors,
IEEE Transactions on Energy Conversion, vol. 3, no. 4, Dec 1988

[98] Jee-Hoon Jung, Jong-Jae Lee, Bong-Hwan Kwon, Online Diagnosis of


Induction Motors Using MCSA, IEEE Transactions on Industrial Electronics,
vol.53, no.6, Dec 2006

[99] P.V.J. Rodriguez, M. Negrea, A. Arkkio, A General Scheme for Induction


Motor Condition Monitoring, SDEMPED 2005 - International Symposium on
Diagnostics for Electric Machines, Power Electronics and Drives, Vienna,
Austria, 7-9 September 2005

[100] L.A. Pereira, D.S Gazzana, L.F.A. Pereira, Motor current signature analysis and
fuzzy logic applied to the diagnosis of short-circuit faults in induction motors,
31st Annual Conference of IEEE on Industrial Electronics Society, 2005, IECON
2005, 2005

[101] C. Concari, G. Franceschini, C. Tassoni, Discerning mechanical load


unbalances from rotor faults in induction machines through current space vector
components, IECON 2010 - 36th Annual Conference on IEEE Industrial
Electronics Society, pp. 2609-2614, 2010

[102] A. Bellini, F. Immovilli, R. Rubini, C. Tassoni, Diagnosis of Bearing Faults of


Induction Machines by Vibration or Current Signals: A Critical Comparison,
Industry Applications Society Annual Meeting, 2008. IAS '08. IEEE 2008

[103] A. Nosary, T. Paquet, L. Heutte, A. Bensefia, Handwritten Text Recognition


Through Writer Adaptation, IEEE Proceedings, 8th International Workshop on
Frontiers in Handwriting Recognition, IWFHR'02, Niagara-on-the-Lake, Canada,
pp.363-368, 2002

[104] Y. Pan, S.S Ge, A. Mamun, Weighted locally linear embedding for dimension
reduction, Pattern Recognition, doi: 10.1016/j.patcog.2008.08.024, 2008

[105] T. Kohonen, H. Ritter, Self-Organizing Semantic Maps, Biological


Cybernetics, pp. 241-254, 1989

[106] S. Haykin, "Neural Networks- A comprehensive foundation", Prentice Hall


International, Inc., NJ, USA, 1999

[107] T. Kohonen, Self-Organizing Maps, Springer, 3rd edition, 2000

122
[108] S. Bernhard., S.J Alexander, Learning with Kernels Support Vector Machines,
Regularization, Optimization and Beyond, MIT press, US, 2002

[109] F. Malgani, L. Bruzzone, Classification of Hyperspectral Remote Sensing


Images With Support Vector Machines, IEEE Transactions on Geoscience and
Remote Sensing, vol. 42, no 8 Aug 2004

[110] N.E. Huang, Z.H Wu, A Review On Hilbert-Huang Transform: Method and its
Applications to Geophysical Studies, Reviews of Geophysics, 46, RG2006 /
2008, Paper number 2007RG000228, 6 Jun 2008

[111] P. Flandrin, G. Rilling, P. Gonalvs, Empirical Mode Decomposition as a


Filter Bank, IEEE Signal Processing Letters, vol. 11, no. 2, Feb 2004

[112] N. Rehman, D. P. Mandic, Multivariate empirical mode decomposition,


Proceedings of the Royal Society A, vol. 466, pp. 12911302, 2010

[113] N. Rehman, D.P. Mandic, Supplementary material to Multivariate Empirical


Mode Decomposition, Proceedings of the Royal Society A, 2010

[114] G. Rilling, P. Flandrin, P. Gonalves, J.M. Lilly, Bivariate Empirical Mode


Decomposition, IEEE Signal Processing Letters, vol. 14, no. 12, Dec 2007

[115] N. Rehman, D.P. Mandic, Empirical Mode Decomposition for Trivariate


Signals, IEEE Transactions on Signal Processing, vol. 58, no. 3, Mar 2010

[116] J.V. Uspensky, Theory of Equations, McGraw-Hill, pp. 256, New York, 1948

[117] J. Kronennurger, J. Sebeson, Analog and Digital Signal Processing: An


Integrated Computational Approach with MATLAB, Thomson Delmar
Learning, NY, 2008

[118] J. Rosero, L. Romeral, J.A. Ortega, E. Rosero, Short Circuit Fault Detection in
PMSM by means of Empirical Mode Decomposition and Wigner Ville
Distribution, IEEE Transactions on Industrial Electronics, 2008

[119] N.E. Huang, Z.H. Wu, A Review On Hilbert-Huang Transform: Method and its
Applications to Geophysical Studies, Reviews of Geophysics, 46, RG2006 /
2008, Paper number 2007RG000228, 6 Jun 2008

[120] N. Rehman, D. P. Mandic, Filter Bank Property of Multivariate Empirical Mode


Decomposition, IEEE Transactions on Signal Processing, vol. , no. , Month
2011

123
APPENDIX A: INTRINSIC MODE FUNCTIONS DERIVED BY N-A MEMD
ALGORITHM FOR MACHINE SIGNATURES AT MACHINE SPEED OF 20HZ

Figure A 1: EMD of HTY20 signature.

124
Figure A 2: EMD of BRG20 signature.

125
Figure A 3: EMD of BRB20 signature.

126
Figure A 4: EMD of UBR20 signature.

127
Figure A 5: EMD of SWF20 signature.

128
Figure A 6: EMD of added noise n1.

129
Figure A 7: EMD of added noise n2.

130
APPENDIX B: HILBERT SPECTRUM AND
MARGINAL HILBERT SPECTRUM OF MACHINE
SIGNATURE (AT MACHINE SPEED OF 20HZ)
INTRINSIC MODE FUNCTION 5 TO 9

Figure B 1: Hilbert Spectrum and Marginal Hilbert Spectrum for (IMF 5-9) of the BRG
machine signatures at 20Hz.

131
Figure B 2: Hilbert Spectrum and Marginal Hilbert Spectrum for (IMF 5-9) of the BRB
machine signatures at 20Hz.

132
Figure B 3: Hilbert Spectrum and Marginal Hilbert Spectrum for (IMF 5-9) of the UBR
machine signatures at 20Hz.

133
Figure B 4: Hilbert Spectrum and Marginal Hilbert Spectrum for (IMF 5-9) of the SWF
machine signatures at 20Hz.

134
APPENDIX C: PSEUDO CODE FOR 2-CLASS SVM
LEARNING
% S U P P O R T V E C T O R M A C H I N E (SVM)
% - 2 class problem
% - Training SVM
% Written By : Chen Wee Yuan (HT080482M)
% Date : 1 Dec 2009
clear all; clc; close all;
%new test data
gp1=[1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 ...
4 4 4 4 4 5 5 5 5 5 12 12 12 12 12 ...
13 13 13 13 13 14 14 14 14 14 15 15 15 15 15 ...
16 16 16 16 16;
11 12 13 14 15 ...
11 12 13 14 15 ...
11 12 13 14 15 ...
11 12 13 14 15 ...
11 12 13 14 15 ...
6 7 8 9 10 ...
6 7 8 9 10 ...
6 7 8 9 10 ...
6 7 8 9 10 ...
6 7 8 9 10];
[r cgp1]=size(gp1);
figure;
for i=1:cgp1
plot(gp1(1,i), gp1(2,i),''); grid on; hold on;
text(gp1(1,i), gp1(2,i),'1','Color',[0 1 0]); grid on; hold on;
end

gp2=[1 1 1 1 2 2 2 2 3 3 3 3 ...
4 4 4 4 5 5 5 5 6 6 6 6 ...
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ...
8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 ...
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 ...
10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 ...
11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 ...
16 16 16 16;
17 18 19 20 17 18 19 20 17 18 19 20 17 18 19 20 17 18 19 20 ...
20 17 18 19 ...
20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 ...
20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 ...
20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 ...
20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 ...
4 3 2 1 4 3 2 1 4 3 2 1 4 3 2 1 4 3 2 1 4 3 2 1];

[r cgp2]=size(gp2);
for i=1:cgp2
plot(gp2(1,i), gp2(2,i),''); grid on; hold on;
text(gp2(1,i), gp2(2,i),'2','Color',[1 0 1]); grid on; hold on;
end
axis( [0 18 0 22]);

135
title('2-class SVM training samples');

%define gp1 and gp2 labels


d1=ones(cgp1,1);
d2=-1*ones(cgp2,1);
di=[d1;d2];

trainx=[gp1 gp2];
ntrainx=[cgp1 cgp2];
[trainx,ps]=mapminmax(trainx);
save trainx;
save ntrainx;

%set SVM parameter - soft-margin p, C


%beta1=1;beta0=1;
%gaussian
rl=3.1; C=1;
%polynomials
%p=2.5; C=1; rl=p;
kernelpara=[rl C]; save kernelpara;

%map and scale train data to [-1,1]


xi=trainx;
%xi_test=mapminmax('apply',testx,ps); %use the same to scale test data
%calculate the Gram Matrix%
tic;
[r1 c1]=size(xi);
for i=1:c1
for j=1:c1
%K(i,j)=(xi(:,i)'*xi(:,j)+1)^p; %polynomial kernel
%K(i,j)=xi(:,i)'*xi(:,j); %linear kernel hard-margin
%K(i,j)=tanh(beta0*xi(:,j)'*xi(:,i)+beta1);
K(i,j)=exp(-1*(xi(:,j)-xi(:,i))'*(xi(:,j)-xi(:,i))/2*rl^2); %exp kernel
end
end
%check Gram Matrix for Mercers condition where negative eigenvalues exist
[rx cx]=size(K);
ev=eig(K);
for i=1:rx
if ev(i)< 0
fprintf('one of the eigenvalues is negative, ...\n');
fprintf('this kernel candidate is not admissable\n');
flag=1;
break
end
end
%if flag==1;break;end
% calculate the Hessian Matrix for maximization problem %
for i=1:c1
for j=1:c1
%H(i,j)=di(i)*di(j)*xi(:,i)'*xi(:,j); %linear kernel hard margin
%H(i,j)=di(i)*di(j)*(xi(:,i)'*xi(:,j)+1)^p; %polynomial kernel
%H(i,j)=di(i)*di(j)*tanh(beta0*xi(:,j)'*xi(:,i)+beta1);
H(i,j)=di(i)*di(j)*exp(-1*(xi(:,j)-xi(:,i))'*(xi(:,j)-xi(:,i))/2*rl^2); %exp kernel
end
end

136
% solving the dual problem for Langrange multipliers (alpha) %
f=-1*ones(c1,1); %maximization problem
A=zeros(1,c1);
b=zeros(1,1);
Aeq=di';
beq=zeros(1,1);
lb=zeros(c1,1);
%ub=ones(c1,1)*1e6; %for hard-margin
ub=ones(c1,1)*C; %for soft-margin
a0=0.1*randn(c1,1); %randomly initialise initial alphas
options=optimset('LargeScale','off','MaxIter',3000);
[a,fval,exitflag,output,alpha]=quadprog(H,f,A,b,Aeq,beq,lb,ub,a0,options);

% finds the support vectors xsv %


for ( all the given datapoints )
{ find the non-zero Langrange Multipliers (alpha) }
end

% support vector xsv for weights and bias calculations: find the weight term-(wok) using support vector
wok=0;
for i=1:c1
%wok=wok+a(i)*di(i)*(xsv{1}'*xi(:,i)+1)^p; %polynomial kernel
%wok=wok+a(i)*di(i)*(xsv{1}'*xi(:,i)); %linear kernel hard-margin
%wok=wok+a(i)*di(i)*tanh(beta0*xsv{1}'*xi(:,i)+beta1);
wok=wok+a(i)*di(i)*exp(-1*(xsv{1}-xi(:,i))'*(xsv{1}-xi(:,i))/2*rl^2); %exp kernel
end
bo=1/dsv{1}-wok; %find the bias bo using ds

sim_time=toc; sim_time;
save xsv; save dsv; save asv; save bo;

% S U P P O R T V E C T O R M A C H I N E (SVM)
% - 2 class problem
% - Testing SVM constructed
% Written By : Chen Wee Yuan (HT080482M)
% Date : 1 Dec 2009

clear all; clc; close all;

load xsv; load dsv; load asv; load bo;


load ntrainx; load trainx; load kernelpara;

gridsize_x=1.5; gridsize_y=1.5;
[rt ct]=size(xi);
%set SVM parameter - soft-margin p, C
%beta1=1;beta0=1; %p=6;C=1;
rl=kernelpara(1,1); C=kernelpara(1,2);

%test data
gpt1=[3.3 14.5; 13.5 8.9];
gpt2=[3.2 8.3 8.6 9.3 13.3;19.5 19.3 10.4 2.3 2.3];
testx=[gpt1 gpt2];
di_test=[1;1;-1;-1;-1;-1;-1];
xi_test=mapminmax('apply',testx,ps);

137
tic;
% test SVM using test_set
[r2 cw]=size(xi_test);
ker1=0;
[rsv csv]=size(xsv);
number_sv=csv;
for j=1:cw
for i=1:csv
sv=xsv{i};
%ker1(i,j)=xi_test(:,j)'*xi(:,i); %linear kernel hard-margin
%ker1(i,j)=(xi_test(:,j)'*xi(:,i)+1)^p; %polynomial kernel
%ker1(i,j)=tanh(beta0*xi_test(:,j)'*xi(:,i)+beta1);
ker1(i,j)=exp(-1*(xi_test(:,j)-sv)'*(xi_test(:,j)-sv)/2*rl^2); %exp kernel
end
end
dv=cell2mat(dsv)';
av=cell2mat(asv)';
gx=(av.*dv)'*ker1+bo*ones(1,cw);

for i=1:cw
if gx(i)>0;
gx(i)=1;
elseif gx(i)<0;
gx(i)=-1;
end
end
dnew1=gx;
sim_time=toc;

% check accuracy using test_set


err1=0; correct1=0; wrong1=0;
err1=di_test'+dnew1;
for i=1:cw
if err1(i)==0 %(-1)+(+1)=0 wrong
wrong1=wrong1+1;
elseif err1(i)==2
correct1=correct1+1; %(+1)+(+1)=2 correct, (-1)+(-1)=-2 correct
elseif err1(i)==-2
correct1=correct1+1;
end
end
accw1=(wrong1/cw)*100;
accc1=(correct1/cw)*100;
fprintf('Classification Report - Test using TEST SET\n');
fprintf('Number of Test samples : %d\n\n', cw);
%fprintf('Percentage Correct classification : %f%%\n', accc1);
fprintf('Error Rate : %f%%\n', accw1);
fprintf('Number of Training samples: %d\n', ct);
fprintf('Number of Support Vectors : %d\n', number_sv);
fprintf('SVM bias (bo) : %d\n', bo);
fprintf('Total sim-time : %d\n\n', sim_time);

% plots - decision boundary and data points


[xtesta1,xtesta2]=meshgrid([-1*gridsize_x:0.5:gridsize_x],[-1*gridsize_y:0.5:gridsize_y]);
[rplot cplot]=size(xtesta1);
xtest1=reshape(xtesta1,1,rplot*cplot);

138
xtest2=reshape(xtesta2,1,rplot*cplot);
xqtest=[xtest1;xtest2];

%calculate discriminate values using SVM over the entire plot grid
[r c]=size(xqtest);
ker1=0;
[rsv csv]=size(xsv);
number_sv=csv;
for j=1:c
for i=1:csv
sv=xsv{i};
%ker1(i,j)=(xqtest(:,j)'*xi(:,i)+1)^p; %polynomial kernel
%ker1(i,j)=tanh(beta0*xi_test(:,j)'*xi(:,i)+beta1);
ker1(i,j)=exp(-1*(xqtest(:,j)-sv)'*(xqtest(:,j)-sv)/2*rl^2); %exp kernel
end
end
dv=cell2mat(dsv)';
av=cell2mat(asv)';
gx=(av.*dv)'*ker1+bo*ones(1,c);
%convert the data to a x-y grid for contourf() plot
gxmat=reshape(gx,rplot,cplot);

%plotting meshgrid
figure;
contourf(xtesta1,xtesta2,gxmat,10);shading flat;hold on
[cs,h]=contour(xtesta1,xtesta2,gxmat,[-1 0 1],'k');
clabel(cs,h);
set(h,'LineWidth',2);
colorbar;

%plot training data points


cgp1=ntrainx(1,1);
for i=1:cgp1
plot(trainx(1,i),trainx(2,i),'xg','LineWidth',2);grid on;hold on;
end
cgp2=ntrainx(1,2);
for ii=cgp1+1:cgp1+cgp2
plot(trainx(1,ii),trainx(2,ii),'+m','LineWidth',2);grid on;hold on;
end
%plot test data points
for i=1:2
plot(xi_test(1,i),xi_test(2,i),'pg','LineWidth',2);grid on;hold on;
end
for i=3:7
plot(xi_test(1,i),xi_test(2,i),'pg','LineWidth',2);grid on;hold on;
end
%plot support vectors
xsup=cell2mat(xsv);
[r c]=size(xsup);
for i=1:c
plot(xsup(1,i),xsup(2,i),'ok','LineWidth',2);grid on;hold on;
end
hold off;
xlabel('X1');ylabel('X2');
title('2-class SVM Decision Boundary, Margin and Support Vectors');
axis([-1*gridsize_x gridsize_x -1*gridsize_y gridsize_y]);

139
APPENDIX D: PSEUDO CODE FOR MULTI-CLASS
SVM LEARNING
%MULTICLASS SUPPORT VECTOR MACHINE (M-SVM)
% - multiclass classification by one-versus-all learning strategy (OVA)
% Written By : Chen Wee Yuan (HT080482M), 28/11/2009
%
% Main programme
%----------------
clear all; clc; close all;

%training data
a1=[5.2 1.2]';a2=[5.4 2.2]';a3=[5.8 6.5]';a4=[1.2 0.9]';
gpo1=[a1 a2 a3 a4];

b1=[5 1]';b2=[5 2]';b3=[6 1]';b4=[6 2]';


gpo2=[b1 b2 b3 b4];

c1=[1 6]';c2=[1 7]';c3=[2 6]';c4=[3.2 0.7]';


gpo3=[c1 c2 c3 c4];

d1=[5 6]';d2=[5 7]';d3=[6 6]';d4=[6 7]';


gpo4=[d1 d2 d3 d4];

e1=[3 3.5]';e2=[3.5 6.5]';e3=[4 3.5]';e4=[4 4.5]';


gpo5=[e1 e2 e3 e4];

%test data
gpt1=[3.4 6.7]';
gpt2=[5.5 1.5]';
gpt3=[1.1 6.5]';
gpt4=[5.5 6.5]';
gpt5=[3.1 0.55]';

%test data
xi_test=[gpt1 gpt2 gpt3 gpt4 gpt5];
%provide correct answers for calculation of error rate
classi=[1 2 3 4 5];

%Normalization of data to [-1 1]


xi=[gpo1 gpo2 gpo3 gpo4 gpo5];
%normalize training data
[xi,ps]=mapminmax(xi);
%normalise the input
xi_test=mapminmax('apply',xi_test,ps);

%divide training data into seperate groups for plotting


gp1=xi(:,1:4);
gp2=xi(:,5:8);
gp3=xi(:,9:12);
gp4=xi(:,13:16);
gp5=xi(:,17:20);

140
%initializations: select SVM kernel parameters
% Gaussian Kernel-
% REMARKS: higher rl creates less smooth decision boundaries
rl=7.7; C=0.23;
% Polynomial Kernel-
% REMARKS: p=1 is linear machine
%p=2; C=2;

%SVM learning using rl / C and training samples


%----------------------------------------------
%function call to calculate support vectors and biases
[xsv1 dsv1 asv1 bo1]=fxSVMova_learning_demo(gp1,gp2,gp3,gp4,gp5,rl,C);
[xsv2 dsv2 asv2 bo2]=fxSVMova_learning_demo(gp2,gp1,gp3,gp4,gp5,rl,C);
[xsv3 dsv3 asv3 bo3]=fxSVMova_learning_demo(gp3,gp1,gp2,gp4,gp5,rl,C);
[xsv4 dsv4 asv4 bo4]=fxSVMova_learning_demo(gp4,gp1,gp2,gp3,gp5,rl,C);
[xsv5 dsv5 asv5 bo5]=fxSVMova_learning_demo(gp5,gp1,gp2,gp3,gp4,rl,C);
%set the looping according to number of test vectors
[r nclass]=size(xi_test);
for i=1:nclass
%select one test vector at a time
xinput=xi_test(:,i);

%SVM classifications using support vectors and biases


%-----------------------------------------------------
%function call to calculate the discrimant values
gxo1=fxSVMova_classifying_demo(xsv1,dsv1,asv1,bo1,rl,xinput);
gxo2=fxSVMova_classifying_demo(xsv2,dsv2,asv2,bo2,rl,xinput);
gxo3=fxSVMova_classifying_demo(xsv3,dsv3,asv3,bo3,rl,xinput);
gxo4=fxSVMova_classifying_demo(xsv4,dsv4,asv4,bo4,rl,xinput);
gxo5=fxSVMova_classifying_demo(xsv5,dsv5,asv5,bo5,rl,xinput);

%Decisions from discriminant values


deci{i}=[gxo1 gxo2 gxo3 gxo4 gxo5]; %abs
end

%plot decision boundaries


%------------------------
grid_x=1.5; grid_y=1.5;
[gxmat1 xz yz gxplot1]=fxSVMova_plotting_demo(xsv1,dsv1,asv1,bo1,rl,grid_x,grid_y);
[gxmat2 xz yz gxplot2]=fxSVMova_plotting_demo(xsv2,dsv2,asv2,bo2,rl,grid_x,grid_y);
[gxmat3 xz yz gxplot3]=fxSVMova_plotting_demo(xsv3,dsv3,asv3,bo3,rl,grid_x,grid_y);
[gxmat4 xz yz gxplot4]=fxSVMova_plotting_demo(xsv4,dsv4,asv4,bo4,rl,grid_x,grid_y);
[gxmat5 xz yz gxplot5]=fxSVMova_plotting_demo(xsv5,dsv5,asv5,bo5,rl,grid_x,grid_y);

%plotting meshgrid
gxmat_all=(gxmat1+gxmat2+gxmat3+gxmat4+gxmat5);
cmax=max(gxmat_all(:));
figure;
contourf(xz,yz,gxmat_all,10);shading flat;hold on
%[cs,h]=contour(xz,yz,gxmat_all,[1 0 -1],'k');
[cs,h]=contour(xz,yz,gxmat_all,[cmax 0],'k');
clabel(cs,h);
set(h,'LineWidth',2);
colorbar;

%plot training data points

141
[r c]=size(gp1);
for i=1:c
plot(gp1(1,i),gp1(2,i), '.m','MarkerSize',25,'LineWidth',2); grid on; hold on;
end
%plot test data points
[r c]=size(xi_test);
for i=1:1
plot(xi_test(1,i),xi_test(2,i), 'pm','LineWidth',2); grid on; hold on;
end
[r c]=size(gp2);
for i=1:c
plot(gp2(1,i),gp2(2,i), '.g','MarkerSize',25,'LineWidth',2); grid on; hold on;
end
%plot test data points
[r c]=size(xi_test);
for i=2:2
plot(xi_test(1,i),xi_test(2,i), 'pg','LineWidth',2); grid on; hold on;
end
[r c]=size(gp3);
for i=1:c
plot(gp3(1,i),gp3(2,i), '.c','MarkerSize',25,'LineWidth',2); grid on; hold on;
end
%plot test data points
[r c]=size(xi_test);
for i=3:3
plot(xi_test(1,i),xi_test(2,i), 'pc','LineWidth',2); grid on; hold on;
end
[r c]=size(gp4);
for i=1:c
plot(gp4(1,i),gp4(2,i), '.y','MarkerSize',25,'LineWidth',2); grid on; hold on;
end
%plot test data points
[r c]=size(xi_test);
for i=4:4
plot(xi_test(1,i),xi_test(2,i), 'py','LineWidth',2); grid on; hold on;
end
[r c]=size(gp5);
for i=1:c
plot(gp5(1,i),gp5(2,i), '.r','MarkerSize',25,'LineWidth',2); grid on; hold on;
end
%plot test data points
[r c]=size(xi_test);
for i=5:5
plot(xi_test(1,i),xi_test(2,i), 'pr','LineWidth',2); grid on; hold on;
end

%plot support vectors


sv1=cell2mat(xsv1); sv2=cell2mat(xsv2);
sv3=cell2mat(xsv3); sv4=cell2mat(xsv4); sv5=cell2mat(xsv5);
xsup=[sv1 sv2 sv3 sv4 sv5];
[r c]=size(xsup);
for i=1:c
plot(xsup(1,i),xsup(2,i),'ok','MarkerSize',10,'LineWidth',2);grid on; hold on;
end
hold off;
title('5-class SVM Decision Boundaries, Margin and Support Vectors');

142
%find winners
%------------
winner=zeros(1,nclass);

% REMARK: each row of deci[] is output by svm-1, svm-2 ...svm-k


% nclass is indexing test vector , svmn is indexing winning svm
for i=1:nclass
winloc=deci{i};
win=max(winloc);
[r svmn]=find(winloc==win,1);
winner(i)=svmn; %arg max is the winner
end
winner;

%calculate 1) error rate


% 2) confusion matrix
[r c]=size(classi);
cmx={};
cmerr=zeros(nclass,nclass);
cmcor=zeros(nclass,nclass);
err=0;
for i=1:c
cor1=classi(:,i);
cor2=winner(i);
if cor1~=cor2;
err=err+1;
cmerr(cor1,cor2)=1;
cmx{i}=cmerr;
cmerr=cmerr*0; %reset matrix to zero
end
if cor1==cor2;
cmcor(cor1,cor2)=1;
cmx{i}=cmcor;
cmcor=cmcor*0; %reset matrix to zero
end
end
%report error rate
err_rate=100*err/c;
fprintf('Error rate: %f\n', err_rate);

cm=0;
for i=1:c
cm=cm+cmx{i};
end
confusion_matrix=cm;
%report confusion matrix
confusion_matrix

% multi-class SVM learning function

function [xsv0 dsv0 asv0 bo]=fxSVMova_learning_demo(gp0,gp1,gp2,gp3,gp4,rl,C)


%
%S V M one-versus-all learning
%-----------------------------
%setup training data
x0=gp0; x1=gp1; x2=gp2; x3=gp3; x4=gp4;

143
xi=[x0 x1 x2 x3 x4];

[r c]=size(x0); %WARNING: each class must have the same training samples
%training labels
% REMARKS: dp is +1 ; % dn is -1
dp=ones(1,c); dn=-1*ones(1,c);
di=[dp dn dn dn dn]';

%calculate the Gram Matrix


tic;
[r1 c1]=size(xi);
for i=1:c1
for j=1:c1
%K(i,j)=(xi(:,i)'*xi(:,j)+1)^p; %polynomial kernel
%K(i,j)=xi(:,i)'*xi(:,j); %linear kernel hard-margin
%K(i,j)=tanh(beta0*xi(:,j)'*xi(:,i)+beta1);
K(i,j)=exp(-1*(xi(:,j)-xi(:,i))'*(xi(:,j)-xi(:,i))/2*rl^2); %exp kernel
end
end

%check Gram Matrix for Mercers condition


%where negative eigenvalues exist
[rx cx]=size(K);
ev=eig(K);
for i=1:rx
if ev(i)< 0
fprintf('WARNING: one of the eigenvalues is negative...\n');
fprintf('This kernel candidate is not admissable\n');
break
end
end

% calculate the Hessian Matrix for maximization problem %


for i=1:c1
for j=1:c1
%H(i,j)=di(i)*di(j)*xi(:,i)'*xi(:,j); %linear kernel hard margin
%H(i,j)=di(i)*di(j)*(xi(:,i)'*xi(:,j)+1)^p; %polynomial kernel
%H(i,j)=di(i)*di(j)*tanh(beta0*xi(:,j)'*xi(:,i)+beta1);
H(i,j)=di(i)*di(j)*exp(-1*(xi(:,j)-xi(:,i))'*(xi(:,j)-xi(:,i))/2*rl^2); %exp kernel
end
end

% solving the dual problem for Langrange multipliers (alpha) %


f=-1*ones(c1,1); %for maximization problem
A=zeros(1,c1);
b=zeros(1,1);
Aeq=di';
beq=zeros(1,1);
lb=zeros(c1,1);
%ub=ones(c1,1)*1e6; %for hard-margin
ub=ones(c1,1)*C; %for soft-margin
a0=0.1*randn(c1,1); %randomly initialise initial alphas
options=optimset('LargeScale','off','MaxIter',2000);
[a,fval,exitflag,output,alpha]=quadprog(H,f,A,b,Aeq,beq,lb,ub,a0,options);
% find the support vectors xsv
for ( all the given data points )

144
{ find all non-zero Lagrange Multipliers (alpha) }
end

%figure, plot(a,'.b','MarkerSize',20); grid on; %plot alphas


%title('Lagrange Multipliers (a>0 are Support Vectors)','FontSize',12,'LineWidth',3);

% support vector xsv for weights and bias calculations:


% find the weight term-(wok) using support vector
wok=0;
for i=1:c1
%wok=wok+a(i)*di(i)*(xsv{1}'*xi(:,i)+1)^p; %polynomial kernel
%wok=wok+a(i)*di(i)*(xsv{1}'*xi(:,i)); %linear kernel hard-margin
%wok=wok+a(i)*di(i)*tanh(beta0*xsv{1}'*xi(:,i)+beta1);
wok=wok+a(i)*di(i)*exp(-1*(xsv0{1}-xi(:,i))'*(xsv0{1}-xi(:,i))/2*rl^2); %exp kernel
end
bo=1/dsv0{1}-wok; %find the bias bo using ds

sim_time=toc; sim_time;

%report learning
fprintf('Number of Support Vectors : %d\n', number_sv);
fprintf('SVM bias (bo) : %d\n', bo);
fprintf('Total sim-time : %d\n\n', sim_time);

% multi-class SVM classifying function


function gxpo=fxSVMova_classifying_demo(xsv,dsv,asv,bo,rl,xinput)
%
%SVM output
[r2 cw]=size(xinput);

ker1=0;
[rsv csv]=size(xsv);
for j=1:cw
for i=1:csv
sv=xsv{i};
%ker1(i,j)=xi_test(:,j)'*xi(:,i); %linear kernel hard-margin
%ker1(i,j)=(xi_test(:,j)'*xi(:,i)+1)^p; %polynomial kernel
%ker1(i,j)=tanh(beta0*xi_test(:,j)'*xi(:,i)+beta1);
ker1(i,j)=exp(-1*(xinput(:,j)-sv)'*(xinput(:,j)-sv)/2*rl^2); %exp kernel
end
end
dv=cell2mat(dsv)';
av=cell2mat(asv)';
gxpo=(av.*dv)'*ker1+bo*ones(1,cw);
gxpo=abs(gxpo); %abs(g(x))

function [gxmat xz yz gxpos]=fxSVMova_plotting_demo(xsv,dsv,asv,bo,rl,gridsize_x,gridsize_y)


%
%plots - decision boundary and data points
%-----------------------------------------
[xz,yz]=meshgrid([-1*gridsize_x:0.1:gridsize_x],[-1*gridsize_y:0.1:gridsize_y]);
[rplot cplot]=size(xz);
xz0=reshape(xz,1,rplot*cplot);
yz0=reshape(yz,1,rplot*cplot);
xplot=[xz0;yz0];

145
%calculate discriminate values using SVM over the entire plot grid
[r c]=size(xplot);
ker1=0;
[rsv csv]=size(xsv);
number_sv=csv;
for j=1:c
for i=1:csv
sv=xsv{i};
%ker1(i,j)=(xqtest(:,j)'*xi(:,i)+1)^p; %polynomial kernel
%ker1(i,j)=tanh(beta0*xi_test(:,j)'*xi(:,i)+beta1);
ker1(i,j)=exp(-1*(xplot(:,j)-sv)'*(xplot(:,j)-sv)/2*rl^2); %exp kernel
end
end
dv=cell2mat(dsv)';
av=cell2mat(asv)';
gxplot=(av.*dv)'*ker1+bo*ones(1,c);
%extract only the positive values to plot the winners only
gxpos=(gxplot+abs(gxplot))/2;
%convert the data to a x-y grid for contourf() plot
gxmat=reshape(gxpos,rplot,cplot);

146
APPENDIX E: PSEUDO CODE FOR SOM
LEARNING

PART 1: Initiatization and Create Input Matrix

%
% S E L F O R G A N I Z I N G M A P (SOM)
%
% Written by : Chen Wee Yuan (HT080482M)
%
%a SOM for cluster discovery and visualizing high-dimensional data in %2D grid
%
% date: 20/07/2010

% clear all registers, close figures, clear screen for next run
clear all; close all; clc;

% Input vectors
a=0.2; b=1.0;
x1s=[a;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0]; % dove 16x1
x1a=[b;0;0;b;0;0;0;0;b;0;0;b;0]; % 13x1
x_dove=[x1s; x1a]; % 29x1

x2s=[0;a;0;0;0;0;0;0;0;0;0;0;0;0;0;0];
x2a=[b;0;0;b;0;0;0;0;b;0;0;0;0]; % hen
x_hen=[x2s; x2a];

x3s=[0;0;a;0;0;0;0;0;0;0;0;0;0;0;0;0];
x3a=[b;0;0;b;0;0;0;0;b;0;0;0;b]; % duck
x_duck=[x3s; x3a];

x4s=[0;0;0;a;0;0;0;0;0;0;0;0;0;0;0;0];
x4a=[b;0;0;b;0;0;0;0;b;0;0;b;b]; % goose
x_goose=[x4s; x4a];

x5s=[0;0;0;0;a;0;0;0;0;0;0;0;0;0;0;0];
x5a=[b;0;0;b;0;0;0;0;b;b;0;b;0]; % owl
x_owl=[x5s; x5a];

x6s=[0;0;0;0;0;a;0;0;0;0;0;0;0;0;0;0];
x6a=[b;0;0;b;0;0;0;0;b;b;0;b;0]; % hawk
x_hawk=[x6s; x6a];

x7s=[0;0;0;0;0;0;a;0;0;0;0;0;0;0;0;0];
x7a=[0;b;0;b;0;0;0;0;b;b;0;b;0]; % eagle
x_eagle=[x7s; x7a];

x8s=[0;0;0;0;0;0;0;a;0;0;0;0;0;0;0;0];
x8a=[0;b;0;0;b;b;0;0;0;b;0;0;0]; % fox
x_fox=[x8s; x8a];

x9s=[0;0;0;0;0;0;0;0;a;0;0;0;0;0;0;0];

147
x9a=[0;b;0;0;b;b;0;0;0;0;b;0;0]; % dog
x_dog=[x9s; x9a];

x10s=[0;0;0;0;0;0;0;0;0;a;0;0;0;0;0;0];
x10a=[0;b;0;0;b;b;0;b;0;b;b;0;0]; % wolf
x_wolf=[x10s; x10a];

x11s=[0;0;0;0;0;0;0;0;0;0;a;0;0;0;0;0];
x11a=[b;0;0;0;b;b;0;0;0;b;0;0;0]; % cat
x_cat=[x11s; x11a];

x12s=[0;0;0;0;0;0;0;0;0;0;0;a;0;0;0;0];
x12a=[0;0;b;0;b;b;0;0;0;b;b;0;0]; % tiger
x_tiger=[x12s; x12a];

x13s=[0;0;0;0;0;0;0;0;0;0;0;0;a;0;0;0];
x13a=[0;0;b;0;b;b;0;b;0;b;b;0;0]; % lion
x_lion=[x13s; x13a];

x14s=[0;0;0;0;0;0;0;0;0;0;0;0;0;a;0;0];
x14a=[0;0;b;0;b;b;b;b;0;0;b;0;0]; % horse
x_horse=[x14s; x14a];

x15s=[0;0;0;0;0;0;0;0;0;0;0;0;0;0;a;0];
x15a=[0;0;b;0;b;b;b;b;0;0;b;0;0]; % zebra
x_zebra=[x15s; x15a];

x16s=[0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;a];
x16a=[0;0;b;0;b;b;b;0;0;0;0;0;0]; % cow
x_cow=[x16s; x16a];

Xinput=[x_dove x_hen x_duck x_goose x_owl x_hawk...


x_eagle x_fox x_dog x_wolf x_cat x_tiger...
x_lion x_horse x_zebra x_cow]; % 29x16

% Normalization of input vector%


% 1) normalize the symbol matrix%
[row col]=size(Xinput);
a={};
X1={};
for i=1:row
a{i}=Xinput(i,:);
Xmean(i)=mean(a{i}); %mean of row elements
Xstd(i)=std(a{i}); %std of col elements
Xn=(Xinput(i,:)-Xmean(i))/Xstd(i); %normalize row
X1{i}=Xn;
z1(i,:)=X1{i}; %normalize input matrix
end

% 2) normalized input vector z by "divide by max"


%
a=z1(:);
q=max(a);
for r=1:row
for c=1:col
z(r,c)=z1(r,c)/q; %normalized input vector z divide by max

148
end
end
save z;

% Initialize neurons weights matrix randomly %


N=10;M=10;
[row col]=size(Xinput);
w={};
for i=1:N %y-axis
for j=1:M %x-axis
for k=1:row
somw(k)=rand;
end
w1{i,j}=somw; %weight for updating
end
end
w9=w1; save w9;

PART 2: SOM Learning Self Ordering and Convergence Phase

% This programme is for SOM learning %


% - newSOM4featuremap.m 3 July 2009 %
% Initialize parameters %
clear all; clc;
N=10;M=10; %size of SOM (N=x,M=y)
eta0=0.0368; rr0=2;
load z;load w13_trained;w=w13_trained;

% start SOM learning


tic

iteration=2000; % specify number of iterations

[row col]=size(z);
for n=1:iteration
for type=1:col %column of input vector z
% calculate Euclidean distances between the z and neuron weight w %
for i=1:N %ith-row neuron
for j=1:M %jth-col neuron
w1=w{i,j}'; %select one neurons starting w{1,1}
z1=z(:,type); %select one input vector starting z(:,1)
for k=1:row
ed1(k)=(z1(k)-w1(k))^2;%calculate euclidean distance of w and z
ed2(n,type)=sum(ed1);
end
ed(i,j)=sqrt(sum(ed1)); %euclidean distance
end %end-j
end %end-i

% locate winning neuron


clear winner y x;
winner=min(ed(:)); %find the best matching unit
[y x]=find(ed==winner); %xth-col, yth-row is winner location

% resolve a tie for two winners

149
[r c]=size(x);
if r ~=1 %more than one winner!
a=x(1); x=[]; x=a;
end
[r c]=size(y);
if r ~=1 %more than one winner!
a=y(1); y=[]; y=a;
end

% calculate new effective width


rr(n)=rr0*exp(-1*n/(iteration/log10(rr0)));
nr(n)=round(rr(n)); %radius in integer

% Neighbour neurons covered by the radius (rk)


clear rk rkk; %re-set radius
rk=nr(n); %amount of off-set
rkk=rk*2+1; %size of the BMU matrix-square matrix of rkk X rkk

% Generate neighbourhood matrices bmux and bmuy


clear bmux bmuy bmuxa bmuxb bmuxc bmuya bmuyb bmuyc; %reset matrices
for irow=1:rkk
for jcol=1:rk
bmuxa(irow,jcol)=x+jcol; %x-col co-ordinates to the +inf
bmuya(irow,jcol)=y+jcol; %y-row co-ordinates to the -inf
end
end

for irow=1:rkk
for jcol=1:rk
bmuxb(irow,jcol)=(x-rk)+jcol-1; %x-col co-ordinates to the -inf
bmuyb(irow,jcol)=(y-rk)+jcol-1; %y-row co-ordinates to the +inf
end
end

bmuxc=x*ones(rkk,1); %x-col co-ordinates at the center


bmuyc=y*ones(rkk,1); %y-row co-ordinates at the center
bmux=[bmuxb bmuxc bmuxa];
bmuy=[bmuyb bmuyc bmuya]';

% check boundary cases by finding those negative and zero co-ordinates


[r,c]=find(bmux <= 0); %find out-of-boundary co-ordinates
[r1,c1]=size(r);
for i=1:r1
x1=r(i); y1=c(i); %extract row-col of the BMUx matrix
bmux(x1,y1)=0; %set to 0
end %end-for-i

[r,c]=find(bmuy <= 0); %find out-of-boundary co-ordinates


[r1,c1]=size(r);
for i=1:r1
x1=r(i); y1=c(i); %extract row-col of the BMUy matrix
bmuy(x1,y1)=0 ; %set to 0
end %end-for-i

% check boundary cases by finding those >M co-ordinates


[r,c]=find(bmux > M); %find out-of-boundary co-ordinates

150
[r1,c1]=size(r);
for i=1:r1
x1=r(i); y1=c(i); %extract row-col of the BMUx matrix
bmux(x1,y1)=0 ; %set to 0
end %end-for-i

[r,c]=find(bmuy > M); %find out-of-boundary co-ordinates


[r1,c1]=size(r);
for i=1:r1
x1=r(i); y1=c(i); %extract row-col of the BMUy matrix
bmuy(x1,y1)=0 ; %set to 0
end %end-for-i

% check boundary cases by finding those >N co-ordinates


[r,c]=find(bmux > N); %find out-of-boundary co-ordinates
[r1,c1]=size(r);
for i=1:r1
x1=r(i); y1=c(i); %extract row-col of the BMUx matrix
bmux(x1,y1)=0 ; %set to 0
end %end-for-i

[r,c]=find(bmuy > N); %find out-of-boundary co-ordinates


[r1,c1]=size(r);
for i=1:r1
x1=r(i); y1=c(i); %extract row-col of the BMUy matrix
bmuy(x1,y1)=0 ; %set to 0
end %end-for-i

% set out-of-boundary elements to zero for bmux and bmuy


hz=bmux.*bmuy;
[r,c]=find(hz);
[r1,c1]=size(r);
for i=1:r1
x1=r(i); y1=c(i);
hz(x1,y1)=1; %set to 1
end
bmuxf=hz.*bmux; %set out of boundary elements to 0
bmuyf=hz.*bmuy; %set out of boundary elements to 0

% reshape neighbourhood matrices


[r,c]=find(bmuxf); %find non-zero elements
[r1,c1]=size(r);
rowmin=min(r); rowmax=max(r); norow=rowmax-rowmin+1;
colmin=min(c); colmax=max(c); nocol=colmax-colmin+1;

clear Qx Qy;
for i=1:r1
x1=r(i); y1=c(i);
Qx(i)= bmuxf(x1,y1);
end
bmux=reshape(Qx,norow,nocol);

[r,c]=find(bmuyf); %find non-zero elements


[r1,c1]=size(r);
rowmin=min(r); rowmax=max(r); norow=rowmax-rowmin+1;
colmin=min(c); colmax=max(c); nocol=colmax-colmin+1;

151
for i=1:r1
x1=r(i); y1=c(i);
Qy(i)= bmuyf(x1,y1);
end
bmuy=reshape(Qy,norow,nocol);

% Calculate the euclidean distance between neurons e(i,j)


clear distx disty eud;
[rx cx]=size(bmux); [ry cy]=size(bmuy);
for i=1:rx
for j=1:cx
distx = bmux(i,j)-x;
disty = bmuy(i,j)-y;
eud(i,j)=sqrt(distx^2+disty^2);
end
end

% Calculate neighbourhood functions h(i,j)


clear h;
for i=1:rx
for j=1:cx
h(i,j)=exp((-1*eud(i,j)^2)/(2*nr(n)^2));
end
end

% calculate new learning rate


eta(n)=eta0*exp(-1*n/iteration);

% weight updates w{i,j}


clear hh xbmu ybmu w2 err error;
for i=1:rx
for j=1:cx
hh=h(i,j);
xbmu=bmux(i,j); %col
ybmu=bmuy(i,j); %row
w2=w{ybmu,xbmu};
z1=z(:,type);
error=z1'-w2;
w2=w2+hh*error*eta(n); %weight updates!
w{ybmu,xbmu}=w2;
end %end-for j - next output neuron
end %end-for i - next output neuron

% store x,y,type for plotting


winlocxf(n,type)=x;
winlocyf(n,type)=y;
wintypef(n,type)=type;
end %end-col, next input vector

% calculate quantization error


for i=1:col
x=winlocxf(i);
y=winlocyf(i);
type=wintypef(i);
z1=z(:,type);
wTemp=w{y,x};

152
QeTemp=z1-wTemp';
end %end-for-QuanError
QuanError(n)=mean(QeTemp);
n
end %end-iteration

time=toc; sim_time=time/60; sim_time

w13_trained2=w;
save w13_trained2; %store trained weight matrix
save nr;
save eta;

% plot quantization error


figure(2); plot(QuanError,'-b','LineWidth',3);
title('Quantization Error','FontSize',12,'LineWidth',3);
grid on; hold off;

% plot shrinking neighbourhood radius


figure(3); plot(rr,'-b','LineWidth',3); hold on;
plot(nr,'-m','LineWidth',2);
title('Shrinking neighbourhood radius: step and contineous','FontSize',12,'LineWidth',3);
grid on; hold off;

% plot decaying learning rate


figure(4); plot(eta,'-b','LineWidth',3);
title('Decaying learning rate','FontSize',12,'LineWidth',3);
grid on; hold off;

PART 3: Generate Feature Map and Semantic Map

% This programme generate semantic map,feature map


% calculate the SOM quality
% - newSOM4semanticmap.mat 3 July 2009

%Initialize parameters
clear all; clc;
N=10;M=10; %size of SOM (N=x,M=y)
load z;
load w13_trained22; w=w13_trained22;

% start matching
index=0;
[row col]=size(z);

% calculate Euclidean distances between the z and neuron weight w


for i=1:N %ith-row map
y=i;
for j=1:M %jth-col map
x=j;
index=index+1;
w1=w{i,j}'; %select one neurons starting w{1,1}

for type=1:col %select a type of input vector


z1=z(:,type); %select one input vector starting z(:,1)
error=z1-w1;

153
ed=error.*error;
ed1=sum(ed);
ed2=sqrt(ed1);
edwinner(type)=ed2; %euclidean distance
end

% locate winning type


clear winvalue;
winvalue=min(edwinner);
[row wintype]=find(edwinner==winvalue); %found!
winners{index}=[y x wintype];
end %end-j
end %end-i
save winners;

% plot Semantic Map


figure;
for index=1:N*M
winnerTemp=winners{index};
wy=winnerTemp(1); wx=winnerTemp(2); wtype=winnerTemp(3);

if wtype==1; %dove
plot(wy,wx,'or','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==2; %hen
plot(wy,wx,'om','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==3; %duck
plot(wy,wx,'og','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==4; %goose
plot(wy,wx,'oc','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==5; %owl
plot(wy,wx,'oy','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==6; %hawk
plot(wy,wx,'ob','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==7; %eagle
plot(wy,wx,'ok','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==8; %fox
plot(wy,wx,'pc','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==9; %dog
plot(wy,wx,'pm','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==10; %wolf
plot(wy,wx,'py','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==11; %cat
plot(wy,wx,'pr','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==12; %tiger
plot(wy,wx,'pb','MarkerSize',20,'LineWidth',3);hold on;

154
end
if wtype==13; %lion
plot(wy,wx,'pk','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==14; %horse
plot(wy,wx,'sm','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==15; %zebra
plot(wy,wx,'sr','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==16; %cow
plot(wy,wx,'sg','MarkerSize',20,'LineWidth',3);hold on;
end
end

axis([1 10 1 10]); grid on;


legend('dove','hen','duck','goose','owl',...
'hawk','eagle','fox','dog','wolf',...
'cat','tiger','lion','horse','zebra',...
'cow',1);
title('SOM-Semantic Map','FontSize',12,'LineWidth',3);
hold off;

% calculate the topological order preservation quality


BMU={}; PASS=0;
load winners;
% winners matrix
index=0;
for i=1:N %ith-row map
y=i;
for j=1:M %jth-col map
x=j;
index=index+1;
aa=winners{index};
bb(y,x)=aa(3);
end
end

[row col]=size(z);
for type=1:col %column of input matrix

% locate first winning neuron


[y x ed]=locateBMU(N,M,w,z,row,type);
x1=x; y1=y; type1=type;

% check are they same type ?


what_type=bb(y1,x1);
same_type=type1-what_type;
if same_type~=0 %error!
type1=999;
end

wTemp=w{y1,x1};
[r c]=size(wTemp);
wTemp=999*ones(r,c);
w{y1,x1}=wTemp;

155
a=[y1 x1 type1];
BMU1{type}=a;
end

for type=1:col
% locate second winning neuron
[y x ed]=locateBMU(N,M,w,z,row,type);
x2=x; y2=y; type2=type;

% check are they same type ?


what_type2=bb(y2,x2);
same_type2=type2-what_type2;
if same_type2~=0 %error!
type2=999;
end

wTemp=w{y2,x2};
[r c]=size(wTemp);
wTemp=999*ones(r,c);
w{y2,x2}=wTemp;

b=[y2 x2 type2];
BMU2{type}=b;
end

% check if 1st and 2nd BMU are adjacent neurons


for type=1:col
a=BMU1{type};
b=BMU2{type};
diffx=a(2)-b(2);
diffy=a(1)-b(1);
if a(3)==b(3) && diffx==1 || diffy==1 || diffx==-1 || diffy==-1
PASS=PASS+1;
end
end

% calculate topographical error/quality


TopoError=(PASS/col)*100

% plot Feature Map with 1st BMUs


figure;
for index=1:col
winnerTemp=BMU1{index};
wy1=winnerTemp(1); wx1=winnerTemp(2); wtype=winnerTemp(3);

if wtype==1; %dove
plot(wy1,wx1,'or','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==2; %hen
plot(wy1,wx1,'om','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==3; %duck
plot(wy1,wx1,'og','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==4; %goose

156
plot(wy1,wx1,'oc','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==5; %owl
plot(wy1,wx1,'oy','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==6; %hawk
plot(wy1,wx1,'ob','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==7; %eagle
plot(wy1,wx1,'ok','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==8; %fox
plot(wy1,wx1,'pc','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==9; %dog
plot(wy1,wx1,'pm','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==10; %wolf
plot(wy1,wx1,'py','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==11; %cat
plot(wy1,wx1,'pr','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==12; %tiger
plot(wy1,wx1,'pb','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==13; %lion
plot(wy1,wx1,'pk','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==14; %horse
plot(wy1,wx1,'sm','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==15; %zebra
plot(wy1,wx1,'sr','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype==16; %cow
plot(wy1,wx1,'sg','MarkerSize',20,'LineWidth',3);hold on;
end
end
axis([1 10 1 10]); grid on;
legend('dove','hen','duck','goose','owl',...
'hawk','eagle','fox','dog','wolf',...
'cat','tiger','lion','horse','zebra',...
'cow',1);
title('SOM-Feature Map','FontSize',12,'LineWidth',3);
hold off;

% plot Feature Map with 2nd BMU %


figure;
for index=1:col
winnerTemp=BMU1{index};
wy1=winnerTemp(1); wx1=winnerTemp(2); wtype1=winnerTemp(3);
winnerTemp=BMU2{index};
wy2=winnerTemp(1); wx2=winnerTemp(2); wtype2=winnerTemp(3);

checkerror{index}=[wtype1 wtype2];

157
if wtype1~=wtype2 %check error!
wtype=0;
end

if wtype1==1; %dove1
plot(wy1,wx1,'or','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==1; %dove2
plot(wy2,wx2,'or','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==2; %dove1
plot(wy1,wx1,'om','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==2; %dove2
plot(wy2,wx2,'om','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==3; %duck1
plot(wy1,wx1,'og','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==3; %duck2
plot(wy2,wx2,'og','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==4; %goose1
plot(wy1,wx1,'oc','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==4; %goose2
plot(wy2,wx2,'oc','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==5; %owl1
plot(wy1,wx1,'oy','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==5; %owl2
plot(wy2,wx2,'oy','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==6; %hawk1
plot(wy1,wx1,'ob','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==6; %hawk2
plot(wy2,wx2,'ob','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==7; %eagle1
plot(wy1,wx1,'ok','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==7; %eagle2
plot(wy2,wx2,'ok','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==8; %fox1
plot(wy1,wx1,'pc','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==8; %fox2
plot(wy2,wx2,'pc','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==9; %dog1
plot(wy1,wx1,'pm','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==9; %dog2

158
plot(wy2,wx2,'pm','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==10; %wolf1
plot(wy1,wx1,'py','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==10; %wolf2
plot(wy2,wx2,'py','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==11; %cat1
plot(wy1,wx1,'pr','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==11; %cat2
plot(wy2,wx2,'pr','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==12; %tiger1
plot(wy1,wx1,'pb','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==12; %tiger2
plot(wy2,wx2,'pb','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==13; %lion1
plot(wy1,wx1,'pk','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==13; %lion2
plot(wy2,wx2,'pk','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==14; %horse1
plot(wy1,wx1,'sm','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==14; %horse2
plot(wy2,wx2,'sm','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==15; %zebra1
plot(wy1,wx1,'sr','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==15; %zebra2
plot(wy2,wx2,'sr','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype1==16; %cow1
plot(wy1,wx1,'sg','MarkerSize',20,'LineWidth',3);hold on;
end
if wtype2==16; %cow2
plot(wy2,wx2,'sg','MarkerSize',20,'LineWidth',3);hold on;
end
end
axis([1 10 1 10]); grid on;
title('SOM-Feature Map with first BMU and second BMU (87.5%)',...
'FontSize',12,'LineWidth',3); hold off

159
APPENDIX F: PSEUDO CODE FOR K-NN
LEARNING
%
%K-NEAREST NEIGHBOURHOOD CLASSIFIER
%
% Written by : Chen Wee Yuan (HT080482M)
%
% a k-NN Classifier for machine fault diagnosis using 350 prototypes of
% 1) healthy (HTY)
% 2) unbalanced rotor faults (UBR)
% 3) bearing faults (BRG)
% signatures.
%
% File name: newKNN_fd3c.m
%
% Notes: non-parametric approach
% 1) 29 Sep 2009
% 2) 13 Mar 2010
% 3) 27 Mar 2010
% 4) 17 Apr 2010
% 5) 3 May 2010
% 6) 23 Jun 2010
clear all;
close all;
clc;

%load data sets: across-frequencies classifications


load Xts_18Mar2011;
load Xtr_18Mar2011;
train_all=Xtr_all;
test_all=Xts_all;

%select options
%option=1; sim_metric='Euclidean distance'; %1 for euclidean distance
option=2; sim_metric='cross-correlation'; %2 for xcorr

%select K value for k-nearest-neighbour


K=1;

%define time series (x-axis)


window=800; %800ms window
dim=length(train_all(1,:)); %dimension of the signature
intervals=window/dim; %intervals for the time series
tx=0:intervals:window-intervals; %time series for x-axis

knngo=1; if knngo==1

%set k-NN parameters


%======================================================================
%set the number of classes
fault_category=3;

160
%initializations
CORRECT=0; wins={}; win=0; %correct counters
error_list={}; jj1=0; pointer_train=0; %error set pointer
ok_list={}; jj2=0; pointer_test=0; %correct set pointer
rxx={}; rxxmax={}; jj3=0; %for storing xcorr values
ok_xclist={}; error_xclist={}; %xx_xclist
error_details={}; %xx_details
error_wincounts={}; ok_wincounts={}; %xx_wincounts

[training_sample_size c1]=size(train_all); %train set sample size


[test_sample_size fea_dim]=size(test_all); %test set sample size

test_loops=test_sample_size/3; %test loops per class

%compute CPU time


t=cputime;

for kk=1:fault_category %test 3 classes


idts1=1;
idts2=test_sample_size/3; %<-user defined interval for test set
%select a test set and assign a correct answer to the feature vector
if kk==1 ; test_x=test_all(idts1+0*idts2:1*idts2,:); fault_class=1; end %ubr
if kk==2 ; test_x=test_all(idts1+1*idts2:2*idts2,:); fault_class=2; end %brg
if kk==3 ; test_x=test_all(idts1+2*idts2:3*idts2,:); fault_class=3; end %hty

%C L A S S I F I C A T I O N S
%================================================================
for i=1:test_loops %loop all test samples
pointer_test=pointer_test+1;

%select a test fault signature


x_test=test_x(i,:);

%calculate the similarity with all members of train set


for j=1:training_sample_size
x_train=train_all(j,:); %select a train vector

%similarity option:
%check similarity using euclidean distance
if option==1
eud=0; ed=0;
eud(j)=sqrt(sum((x_test - x_train).^2));
ed=eud';
end
%check similarity using xcorr
if option==2
xc0=xcorr(x_test,x_train)/(norm(x_test)*norm(x_train));
xclist(j)=max(xc0);

end

xclist0=xclist; %store original copy of xclist

end

%chose K number of winners within a ball of radius

161
%initialize and clear windetails before next storage
%windetail==[K-neighbour win_value win_location]
windetails=zeros(K,3);
%initialize winners counter
win1=0; win2=0; win3=0;

for j=1:K
%similarity option:
if option==1 %for euclidean distance only, find one winner
winval=min(ed);
[r c]=find(ed==winval,1);
end
if option==2 %for xcorr() only, find one winner
winval=max(xclist);
[c r]=find(xclist==winval,1);
end

%cast a vote...
idtr1=1;
idtr2=training_sample_size/3; %<-user defined interval for train set
if r>=0*idtr2+idtr1 && r<=1*idtr2, win1=win1+1; ft=1;end %ubr
if r>=1*idtr2+idtr1 && r<=2*idtr2, win2=win2+1; ft=2;end %brg
if r>=2*idtr2+idtr1 && r<=3*idtr2, win3=win3+1; ft=3;end %hty

%store winner's details


windetails(j,:)=[ft winval r]; %store winner value and location

end %end-for-K, find next neighbour

%count the votes...


win=[win1 win2 win3];

%find one winner that has the highest vote


[r cw]=find(win==max(win),1);
%winner is...
if cw==1, winner_class=1; end %ubr
if cw==2, winner_class=2; end %brg
if cw==3, winner_class=3; end %hty

%generate winner count for confusion matrix:


%kk for a page for each fault category,
%i for member of test set
win_count=zeros(size(win)); %preallocate win_count matrix
win_count(cw)=1; %set winner to 1
wins{kk,i}=win_count; %store win_count in array

%find the best neighbour for plotting...


winvalx=0;
winlocx=0;
k=0;
for i=1:K
if windetails(i,1)==winner_class %find the same class within K
k=k+1;
winvalx(k)=windetails(i,2);
winlocx(k)=windetails(i,3);
end

162
end
%best neighbour is max xcorr value...
[r c]=find(winvalx==max(winvalx),1);
pointer_train=winlocx(c);
%store list for display...
xclist1=zeros(size(xclist)); %reset and preallocate xclist2
xclist1(pointer_train)=max(winvalx);

%update number of correct classification and ok_list


if winner_class == fault_class;
CORRECT=CORRECT+1;
jj1=jj1+1; %correct counter
ok_list{jj1}=[pointer_test...
fault_class...
pointer_train...
winner_class]; %correct list
ok_xclist{jj1}=[xclist0;xclist1]; %correct's xcorr values
ok_wincounts{jj1}=win; %for debugging only!
end

%generate an error list to record errors for error display


if winner_class ~= fault_class;
jj2=jj2+1; %error counter
error_list{jj2}=[pointer_test...
fault_class...
pointer_train...
winner_class]; %error list
error_xclist{jj2}=[xclist0;xclist1]; %error's xcorr values
error_details{jj2}=windetails; %for debugging only!
error_wincounts{jj2}=win; %for debugging only!
end

end %for-j-loop select next fault signature

end %for-kk-loop

%compute CPU time


CPU_time=(cputime-t)/60; %in minutes
%print error rate
Error_Rate=(1-CORRECT/test_sample_size)*100;
%generate confusion matrix
%===================================================================
%preallocate confusion matrix
cm0=zeros(fault_category);
cm=zeros(fault_category);

%confusion matrix for all digits


for kk=1:fault_category
for i=1:test_loops
a=wins{kk,i};
cm0(kk,:)=a;
cm(kk,:)=cm(kk,:)+cm0(kk,:);
end
end

%error rate (%) for each class

163
ubrer=(cm(1,2)+cm(1,3))*100/test_loops;
brger=(cm(2,1)+cm(2,3))*100/test_loops;
htyer=(cm(3,1)+cm(3,2))*100/test_loops;

%display confusion matrix


disp(' Confusion Matrix for machine fault signatures');
disp(' ---------------------------------------------');
disp(' UBR BRG HTY error rate (%)');
disp([' UBR ',sprintf('%3d',cm(1,1)),' ',sprintf('%3d',cm(1,2)),...
' ',sprintf('%3d',cm(1,3)),' ',sprintf('%4.2f',ubrer),'%']);

disp([' BRG ',sprintf('%3d',cm(2,1)),' ',sprintf('%3d',cm(2,2)),...


' ',sprintf('%3d',cm(2,3)),' ',sprintf('%4.2f',brger),'%']);

disp([' HTY ',sprintf('%3d',cm(3,1)),' ',sprintf('%3d',cm(3,2)),...


' ',sprintf('%3d',cm(3,3)),' ',sprintf('%4.2f',htyer),'%']);

%display result summary


disp(' ');
disp(' Machine Fault Diagnosis: k-NN Result Summary');
disp(' --------------------------------------------');
if option==1
k='N.A';
disp([' k (nearest neighbors) : ',k]);
end
if option==2
disp([' k (nearest neighbors) : ',sprintf('%2d',K)]);
end
disp([' Similarity Metric : ',sim_metric,'']);
disp([' Error Rate : ',sprintf('%4.2f',Error_Rate),'%']);
disp([' Feature Vector Dimension: ',sprintf('%4d',fea_dim),'']);
disp([' Computation Time : ',sprintf('%4.2f',CPU_time),' min']);
disp([' Template sample size : ',sprintf('%4d',training_sample_size),'']);
disp([' Test sample size : ',sprintf('%4d',test_sample_size),'']);
disp([' Date / Time : ',datestr(now),'']);

optionplotresult=1;
if optionplotresult==1
%plot error_list
%error_list{jj}=[pointer_test...
% fault_class...
% pointer_train...
% winner_class];%error list
[r c]=size(error_list);
fault=0; afault=0;
%xc1=0; xc2=0; maxxc=0;
for j=1:2
plotindex=error_list{j};
index_test=plotindex(1); x1=test_all(index_test,:);
index_train=plotindex(3); x2=train_all(index_train,:);
%true...
if plotindex(2)==1; fault='UBR';end
if plotindex(2)==2; fault='HTY';end
if plotindex(2)==3; fault='BRG';end

%predicted...

164
if plotindex(4)==1; afault='UBR';end
if plotindex(4)==2; afault='HTY';end
if plotindex(4)==3; afault='BRG';end

%colour table
%[1 0 0] r red : UBR
%[0 1 0] g green : BRG
%[0 0 1] b blue : HTY
figure;
subplot(4,1,1),plot(tx,x1,'-b','LineWidth',1);
%title(['' fault ' => [' int2str(j) ' Test vector ' ...
%title(['[ Test vector ' int2str(index_test) ' of ' int2str(test_sample_size) ' ] ' fault ' =>
'],'FontSize',11);
title(['' fault ' => '],'FontSize',11);
% title(['' fault ' => ['' Test vector ' ...
% int2str(index_test) ' of ' int2str(test_sample_size) ' ]'],'FontSize',11);
ylabel('acc. (ms^-^2)'); grid on;

subplot(4,1,2),plot(tx,x2,'Color',[0 0.8 0],'LineWidth',1);


%title(['[ Template ' int2str(index_test) ' of ' int2str(training_sample_size) ' ] ' fault ''],'FontSize',11);
title(['' afault ''],'FontSize',11);
%title(['' afault ' [Template ' int2str(index_train) ' of ' ...
% int2str(training_sample_size) ' ]'],'FontSize',11);
xlabel('time (ms)'); ylabel('acc. (ms^-^2)'); grid on;

subplot(4,1,3)
xc0=error_xclist{j};
xc1=xc0(1,:);
xc2=xc0(2,:); a=max(xc1);
mask0=zeros(1,training_sample_size/3);
mask1=ones(1,training_sample_size/3);
mask=[mask1 mask0 mask0]; ubrx=xc1.*mask;
mask=[mask0 mask1 mask0]; brgx=xc1.*mask;
mask=[mask0 mask0 mask1]; htyx=xc1.*mask;
mask=[mask1 mask1 mask1]; maxxc=xc2.*mask;

c=training_sample_size;
%for plotting the legend
stem(training_sample_size+25,0.05,'MarkerFaceColor','r',...
'Marker','square','LineStyle','-','Color','r'); hold on; %UBR
stem(training_sample_size+25,0.05,'MarkerFaceColor',[0 0.8 0],...
'Marker','square','LineStyle','-','Color',[0 0.8 0]); hold on; %BRG
stem(training_sample_size+25,0.05,'MarkerFaceColor','b',...
'Marker','square','LineStyle','-','Color','b'); hold on; %HTY
stem(training_sample_size+25,0.05,'MarkerFaceColor','k',...
'Marker','square','LineStyle','-','LineWidth',2,'Color','k'); hold on; %winner
stem(training_sample_size+25,0.05,'MarkerFaceColor','w',...
'Marker','square','LineStyle','-','LineWidth',2,'Color','w'); hold on; %dummy
%for plotting the legend

for i=1:training_sample_size
ubr=ubrx(:,i);
if ubr~=0
stem(i,ubr,'MarkerFaceColor','r','Marker','square',...
'LineStyle','-','Color','r'); hold on;
end

165
end
for i=1:training_sample_size
brg=brgx(:,i);
if brg~=0
stem(i,brg,'MarkerFaceColor',[0 0.8 0],'Marker','square',...
'LineStyle','-','Color',[0 0.8 0]); hold on;
end
end
for i=1:training_sample_size
hty=htyx(:,i);
if hty~=0
stem(i,hty,'MarkerFaceColor','b','Marker','square',...
'LineStyle','-','Color','b'); hold on;
end
end
for i=1:training_sample_size
maxxc1=maxxc(:,i);
if maxxc1~=0;
stem(i,maxxc1,'MarkerFaceColor','k','Marker','square',...
'LineStyle','-','LineWidth',3,'Color','k'); hold off;
end;
end
q=max(maxxc);
title([' max xc values Vs Template location (winner^,s max xc value = ' num2str(q) '
)'],'FontSize',12);
xlabel(['Template location (winner^,s location = ' num2str(index_train) ' )'],'FontSize',10); %axis tight;
%xlabel('Template location');
ylabel('max xc value'); grid on;
%axis([1 350 0 a+maxxc1+0.1]);
legend('UBR','HTY','BRG','winner','Location','BestOutside');

subplot(4,1,4),
winbar=error_wincounts{j};
stem(1,winbar(1),'MarkerFaceColor','r',...
'Marker','square','LineStyle','-','LineWidth',2,'Color','r'); hold on; %UBR
stem(2,winbar(2),'MarkerFaceColor',[0 0.8 0],...
'Marker','square','LineStyle','-','LineWidth',2,'Color',[0 0.8 0]); hold on; %BRG
stem(3,winbar(3),'MarkerFaceColor','b',...
'Marker','square','LineStyle','-','LineWidth',2,'Color','b'); hold on; %HTY
title(['Vote Counts (winner^,s vote = ' int2str(max(winbar)) ' / k= ' int2str(K) ')'],'FontSize',11);
xlabel('Fault Class'); ylabel('Votes'); grid on;
legend('1:UBR','2:BRG','3:HTY','Location','BestOutside');
axis=([1 3 0 max(winbar)]);
end

%plot ok_list
%ok_list{jj}=[pointer_test...
% fault_class...
% pointer_train...
% winner_class]; %ok list
%[r c]=size(ok_list);
fault=0;
afault=0;
xc1=0;
xc2=0;
maxxc=0;

166
clear index_test index_train x1 x2 plotindex;
for j=1:20:270 %plot a few graphs
plotindex=ok_list{j};
index_test=plotindex(1); x1=test_all(index_test,:);
index_train=plotindex(3); x2=train_all(index_train,:);
%true...
if plotindex(2)==1; fault='UBR';end
if plotindex(2)==2; fault='HTY';end
if plotindex(2)==3; fault='BRG';end

%predicted...
if plotindex(4)==1; afault='UBR';end
if plotindex(4)==2; afault='HTY';end
if plotindex(4)==3; afault='BRG';end

%colour table
%[1 0 0] r red :UBR
%[0 1 0] g green :BRG
%[0 0 1] b blue :HTY

figure;
subplot(4,1,1),plot(tx,x1,'-b','LineWidth',1);
%title(['' fault ' => [' int2str(j) ' Test vector ' ...
%title(['[ Test vector ' int2str(index_test) ' of ' int2str(test_sample_size) ' ] ' fault ' =>
'],'FontSize',11);
title(['' fault ' => '],'FontSize',11);ylabel('acc. (ms^-^2)'); grid on;

subplot(4,1,2),plot(tx,x2,'Color',[0 0.8 0],'LineWidth',1);


%title(['[ Template ' int2str(index_test) ' of ' int2str(training_sample_size) ' ] ' fault ''],'FontSize',11);
title(['' afault ''],'FontSize',11);
%title(['' afault ' [Template ' int2str(index_train) ' of ' ...
% int2str(training_sample_size) ' ]'],'FontSize',11);
xlabel('time (ms)'); ylabel('acc. (ms^-^2)'); grid on;

subplot(4,1,3),
xc0=ok_xclist{j};
xc1=xc0(1,:);
xc2=xc0(2,:); %a=max(xc1);
mask0=zeros(1,training_sample_size/3);
mask1=ones(1,training_sample_size/3);
mask=[mask1 mask0 mask0]; ubrx=xc1.*mask;
mask=[mask0 mask1 mask0]; brgx=xc1.*mask;
mask=[mask0 mask0 mask1]; htyx=xc1.*mask;
mask=[mask1 mask1 mask1]; maxxc=xc2.*mask;

%for plotting the legend


stem(training_sample_size+15,0.05,'MarkerFaceColor','r',...
'Marker','square','LineStyle','-','Color','r'); hold on; %UBR
stem(training_sample_size+15,0.05,'MarkerFaceColor',[0 0.8 0],...
'Marker','square','LineStyle','-','Color',[0 0.8 0]); hold on; %BRG
stem(training_sample_size+15,0.05,'MarkerFaceColor','b',...
'Marker','square','LineStyle','-','Color','b'); hold on; %HTY
stem(training_sample_size+15,0.05,'MarkerFaceColor','k',...
'Marker','square','LineStyle','-','LineWidth',2,'Color','k'); hold on; %winner
stem(training_sample_size+15,0.05,'MarkerFaceColor','w',...
'Marker','square','LineStyle','-','LineWidth',2,'Color','w'); hold on; %dummy

167
%for plotting the legend
for i=1:training_sample_size
ubr=ubrx(:,i);
if ubr~=0
stem(i,ubr,'MarkerFaceColor','r','Marker','square',...
'LineStyle','-','Color','r'); hold on;
end
end
for i=1:training_sample_size
brg=brgx(:,i);
if brg~=0
stem(i,brg,'MarkerFaceColor',[0 0.8 0],'Marker','square',...
'LineStyle','-','Color',[0 0.8 0]); hold on;
end
end
for i=1:training_sample_size
hty=htyx(:,i);
if hty~=0
stem(i,hty,'MarkerFaceColor','b','Marker','square',...
'LineStyle','-','Color','b'); hold on;
end
end
for i=1:training_sample_size
maxxc1=maxxc(:,i);
if maxxc1~=0;
stem(i,maxxc1,'MarkerFaceColor','k','Marker','square',...
'LineStyle','-','LineWidth',2,'Color','k'); hold off;
end;
end
q=max(maxxc);
%title('max xc values Vs Template location','FontSize',11);
title([' max xc values Vs Template location (winner^,s max xc value = ' num2str(q) '
)'],'FontSize',12);
xlabel(['Template location (winner^,s location = ' num2str(index_train) ' )'],'FontSize',10); %axis tight;
%xlabel('Template location');
ylabel('max xc value'); grid on;
%axis([1 300 0 max(xc1)+0.1]);
legend('UBR','HTY','BRG','winner','Location','BestOutside');

subplot(4,1,4),
winbar=ok_wincounts{j};
stem(1,winbar(1),'MarkerFaceColor','r',...
'Marker','square','LineStyle','-','LineWidth',2,'Color','r'); hold on; %UBR
stem(2,winbar(2),'MarkerFaceColor',[0 0.8 0],...
'Marker','square','LineStyle','-','LineWidth',2,'Color',[0 0.8 0]); hold on; %BRG
stem(3,winbar(3),'MarkerFaceColor','b',...
'Marker','square','LineStyle','-','LineWidth',2,'Color','b'); hold on; %HTY
title(['Vote Counts (winner^,s vote = ' int2str(max(winbar)) ' / k= ' int2str(K) ')'],'FontSize',11);
xlabel('Fault Class'); ylabel('Votes'); grid on;
axis=([1 3 0 max(winbar)]);
legend('1:UBR','2:BRG','3:HTY','Location','BestOutside');
end
end %if option
end

168

Anda mungkin juga menyukai