# NC Machine Tools Fault Diagnosis Based on Kernel PCA andk-Nearest Neighbor Using Vibration Signals

Authors: Zhou Yuqing; Sun Bingtao; Li Fengping; Song Wenlei
Journal: Shock and Vibration
 (2015)

---

## Abstract

This paper focuses on the fault diagnosis for NC machine tools and puts forward a fault diagnosis method based on kernel principal component analysis (KPCA) andk-nearest neighbor (kNN). A data-dependent KPCA based on covariance matrix of sample data is designed to overcome the subjectivity in parameter selection of kernel function and is used to transform original high-dimensional data into low-dimensional manifold feature space with the intrinsic dimensionality. The kNN method is modified to adapt the fault diagnosis of tools that can determine thresholds of multifault classes and is applied to detect potential faults. An experimental analysis in NC milling machine tools is developed; the testing result shows that the proposed method is outperforming compared to the other two methods in tool fault diagnosis.


---

## Body

## 1. Introduction

Numerical control (NC) machines are some of the most common classes of machining equipment and play important roles in industry relying on their high automation and stability. However, NC machines generally are subject to failures by inner flimsy tools in practice, which may decrease machinery service performance such as the manufacturing quality and operation safety. Therefore, the demand to fault diagnosis for NC machine tools accurately and reliably has attracted considerable interests. However, it is a challenge to develop and adopt effective signal processing techniques that can discover the crucial damage information from responsive signals.Tool’s damage, such as wear and gap, will occur on the tool’s face contacting with the chip or on the flank due to the friction between the tool and the workpiece material. A commonly used effective method is analyzing signals gathered by sensors to reveal fault features with the help of effective signal processing techniques. Traditional signal processing techniques in the fault diagnosis include time-domain analysis [1], frequency-domain analysis [2], time-frequency analysis [3], and wavelet analysis [4]. Wavelet analysis method can be viewed as an extension of the conventional spectral technique by an adjustable window size and adds a scale variable through a wavelet basis function with the inner product transform. So far, wavelet analysis has been widely used in machinery fault diagnosis, such as rotor [5], bearing [6], and gear [7].However, how to choose a suitable wavelet basis function to match the machine signal structure remains an open issue despite many current alternative types. There is still a lack of generally accepted effective methods to solve the issue [8]. Although some authors provided multiwavelet transform for fault diagnosis [9, 10], these methods also determined the wavelet basis functions previously. In this paper, for overcoming deficiencies of above methods, a fault diagnosis method based on kernel principal component analysis (KPCA) and k-nearest neighbor (kNN) is put forward. KPCA is used to obtain independent local relevance in parameters. Firstly, the original data set transformed high-dimensional data into low-dimensional manifold feature space with the intrinsic dimensionality by KPCA, and the kernel function of KPCA is constructed with covariance matrix of sample data to avoid the subjectivity of choosing kernel function. The kNN technique is applied to low-dimensional manifold feature space to detect potential faults.The rest of this paper is organized as follows. Section2 discusses the selection of impressible statistical parameters in time and frequency domains. Section 3 reviews the standard KPCA method and provides a data-dependent kernel PCA method. Section 4 describes the kNN rule and improves it to adapt the situation of multifault classes. Section 5 presents the novel fault diagnosis method of KPCA-kNN. In Section 6, the proposed method is applied to experimental study, and the fault diagnosis results are compared with other approaches. The conclusions of this work are summarized in Section 8.


## 2. Statistical Feature Parameters in Time-Frequency Domain with Tool Vibration Signal

In the manufacturing process, tool vibration is caused by a variety of factors that are main reasons for tool damages, such as cutting force, built up edge, material inhomogeneity, and ambient conditions. Hence, using the vibration signals to identify tool’s damage is reasonable [11, 12]. Both amplitude and distribution of the vibration signals change along with tools’ state from sharp to worn. Previous studies [11–13] have shown that some time and frequency domain features can indicate tool’s damage. Although these mentioned features are indicative of tool’s fault from different aspects, they have different importance. In addition, considering that the dimensions of these parameters are different, this paper employs dimensionless feature parameters to analysis. According to previous literatures [14] and our experimental studies, eight impressible dimensionless statistical feature parameters in time and frequency domains are chosen. Brief mathematical descriptions of these features are shown in Table 1.Table 1
Dimensionless statistical feature parameters.
Domain
Parameter
Formula
Remark
Time
Waveform
C
1
=
x
rms
x
-
abs
x
-
=
1
n
∑
i
=
1
n
x
i
,
x
rms
=
1
n
∑
i
=
1
n
x
i
2,
Peak
C
2
=
x
m
x
rms
x
-
abs
=
1
n
∑
i
=
1
n
x
i
,
x
m
=
max
⁡
x
i
∣
i
=
1
,
…
,
n,
Kurtosis
C
3
=
∑
i
=
1
n
(
x
i
-
x
-
)
4
/
s
4
n
-
1
-
3
s
=
1
n
-
1
∑
i
=
1
n
(
x
i
-
x
-
)
2
Wherex
i is a signal series for i = 1, 2, …, n, n is the number of data points
Frequency
Stabilization ratio
C
4
=
N
0
N
m
P
m
=
max
⁡
P
i
∣
i
=
1
,
…
,
n,
Wave-height ratio
C
5
=
P
m
P
rms
Power spectrum standard deviation
C
6
=
∑
i
=
1
n
/
2
(
f
i
-
f
m
)
2
·
P
i
∑
i
=
1
n
/
2
P
i
N
m
=
∑
i
=
1
n
/
2
f
i
4
·
P
i
∑
i
=
1
n
/
2
f
i
2
·
P
i,
Frequency high-low ratio
C
7
=
∑
i
=
n
/
4
n
/
2
P
i
∑
i
=
1
n
/
4
P
i
N
0
=
∑
i
=
1
n
/
2
f
i
2
·
P
i
∑
i
=
1
n
/
2
P
i,
Degree of irregular
C
8
=
N
0
N
m
P
rms
=
1
n
/
2
∑
i
=
1
n
/
2
P
i
2
Wheref
i is the frequency signal with x
i by Fast Fourier Transform (FFT) and P
i is the power spectrum of f
i


## 3. Data-Dependent Kernel Principal Component Analysis (KPCA)

### 3.1. Kernel Principal Component Analysis

Principal component analysis (PCA) has played a significant role in dimensionality reduction, noise removal, and feature extraction from the original data set as a preprocessing step in data mining. It is readily implemented and it is effective when dealing with common cases encountered frequently. However, for complicated cases in industrial practice, especially nonlinearity, PCA is unsuccessful as it is linear by nature. A modified PCA technique, kernel principal component analysis (KPCA) [15] has been proposed to tackle the nonlinear problems in recent years. As a nonlinear form of PCA, KPCA can efficiently compute principal components in a high-dimensional feature space by the use of integral operators and nonlinear kernel functions [16].LetX
m
×
n
=
(
x
i
,
x
2
,
…
,
x
n
)
≜
(
z
1
,
z
2
,
…
,
z
m
)
T, (
x
i
∈
R
m
,
z
j
∈
R
n
) be the n training samples for KPCA learning. The basic idea of KPCA is first to define a nonlinear map ϕ: z
i
→
ϕ
(
z
i
)
∈
F
h, (
i
=
1
,
…
,
m
) which represents a high-dimensional feature space F and then to apply PCA to the data in space F. However, it is difficult to do so directly because the dimension of the feature space F can be arbitrarily large or even infinite. In implementation, the implicit feature vector in F does not need to be computed explicitly, while it is just done by computing the inner product of two vectors in F with a kernel function.The mapping ofz
i is simply noted as ϕ
(
z
i
)
=
ϕ
i. Principal components may be extracted by solving the eigenvalue equation of the sample covariance C
ϕ:  λ
ν
=
C
ϕ
ν. By defining the kernel matrix K of dimension m
×
m such that(1)
K
i
j
=
k
z
i
,
z
j
=
ϕ
z
i
T
ϕ
z
i
=
ϕ
i
·
ϕ
i
.Here, k
(
z
i
,
z
j
) is the calculation of the inner product of two vectors in F with a kernel function. The eigenvalue problem may be put in the form m
λ
α
=
K
α, where α identifies the eigenvector V after normalization. Centralize K by(2)
K
′
=
K
-
1
m
K
-
K
1
m
+
1
m
K
1
m
.Here, matrix 1
m
=
(
1
/
m
)
m
×
m.The eigenvectors identified in the feature spaceF can be considered as kernel principal components (KPCs) which characterize the dynamical system. Note that, since the number of eigenvectors (i.e., nonlinear PCs) is the same as the number of samples, it is higher than the number of (linear) PCs given by PCA. The KPCA method is termed “nonlinear” since the feature mapping in the space F is achieved by a nonlinear function.


### 3.2. Data-Dependent Kernel Function

For a given data set, the key step is to select a corresponding optimal kernel function in order to obtain the optimal nonlinear feature transformation. There are several kernel functions can be chosen, such as Gaussian, Quadratic, Radial basis function, and polynomial. It is worth noting that the above kernel functions give different results if inappropriate parameters are chosen. However the selection of parameters in these kernel functions is arbitrary and does not have theoretical rules for reference. Since the geometric structure of data in the kernel feature spaceF is determined by the kernel function, it is desirable to choose the target kernel function to be data-dependent.In this paper, a data-dependent kernel based on the Gaussian kernel is designed. The Gaussian kernel function is(3)
k
z
i
,
z
j
=
exp
⁡
-
z
i
-
z
j
2
2
σ
2
,where σ is a measure of the data spread, and it implicitly assumes the same variance for each entry of the sample vector (i.e., the data is isotropic), which cannot be satisfied in many practice situations.We consider the generalized Gaussian kernel:(4)
k
z
i
,
z
j
=
exp
⁡
-
1
2
z
i
-
z
j
T
H
-
1
z
i
-
z
j
,where H is a transformation matrix. In cases where certain input transformations are known to leave function values unchanged, the use of H can also allow such invariance to be incorporated into the kernel function.A choice forH is the m
×
m covariance matrix:(5)
H
=
E
z
-
μ
z
z
-
μ
z
T
,where z is the data vector and μ
z is the corresponding mean vector. By assuming that the entries of the sample vector are independent, it can be simplified by dropping the off-diagonal elements as(6)
H
=
Diag
Diag
E
z
-
μ
z
z
-
μ
z
T
.Here, diag
(
·
) extracts the diagonal elements of covariance matrix H, which are then used to construct a diagonal matrix by diag
(
·
), and the obtained kernel by this matrix H is called independent DDK [17].While (3) implicitly assumes all sample vectors have the same variance, this is not necessary for the generalized Gaussian kernel. And if all sample vectors have the same variance σ
2, then H
=
σ
2
I and the generalized Gaussian kernel (4) will reduce to the conventional Gaussian kernel (3). Using the kernel function (4) with covariance matrix of sample data, the local geometric structure of data can remain in the kernel feature space F.


### 3.3. Algorithm of Data-Dependent KPCA

The description of feature extraction process of NC tools with data-dependent KPCA is as follows.(1)
GainV groups vibration time-domain signals data of NC machine, and transform every group data to frequency-domain signals by FFT.
(2)
Calculate eight feature parametersC
1
–
C
8 of each group, respectively, to compose observed data set X
=
{
X
v
j
}
V
×
8, define the average and standard deviation of column vectors as μ
X
=
{
μ
X
j
}
1
×
8, S
X
=
{
S
X
j
}
1
×
8, and normalize data set X.
(3)
Reduce dimension ofX by KPCA described in Section 3. In the operation of KPCA, take (4) as the kernel function and the covariance matrix of X as the matrix H to transform X into new data X
F.
(4)
Compute the8
×
8 kernel matrix K and centralize K to K
′ using (2). Solve the eigenvalue problem of K
′, obtain the eigenvalues λ
j and eigenvectors v
j of K
′. Set Λ as the eigenvalue list sort by decreasing order, choose the number of kernel principal components U with the principle of the minimum value that the cumulative contribution rate is above 75% [18, 19].
(5)
Calculate the load matrixW: W
=
Y
Λ
U, where Λ
U denotes the diagonal matrix by the first U eigenvalues in Λ, and Y
=
{
Y
1
,
Y
2
,
…
,
Y
U
}
8
×
U is the eigenvectors matrix corresponding to the first U eigenvalues.


## 3.1. Kernel Principal Component Analysis

Principal component analysis (PCA) has played a significant role in dimensionality reduction, noise removal, and feature extraction from the original data set as a preprocessing step in data mining. It is readily implemented and it is effective when dealing with common cases encountered frequently. However, for complicated cases in industrial practice, especially nonlinearity, PCA is unsuccessful as it is linear by nature. A modified PCA technique, kernel principal component analysis (KPCA) [15] has been proposed to tackle the nonlinear problems in recent years. As a nonlinear form of PCA, KPCA can efficiently compute principal components in a high-dimensional feature space by the use of integral operators and nonlinear kernel functions [16].LetX
m
×
n
=
(
x
i
,
x
2
,
…
,
x
n
)
≜
(
z
1
,
z
2
,
…
,
z
m
)
T, (
x
i
∈
R
m
,
z
j
∈
R
n
) be the n training samples for KPCA learning. The basic idea of KPCA is first to define a nonlinear map ϕ: z
i
→
ϕ
(
z
i
)
∈
F
h, (
i
=
1
,
…
,
m
) which represents a high-dimensional feature space F and then to apply PCA to the data in space F. However, it is difficult to do so directly because the dimension of the feature space F can be arbitrarily large or even infinite. In implementation, the implicit feature vector in F does not need to be computed explicitly, while it is just done by computing the inner product of two vectors in F with a kernel function.The mapping ofz
i is simply noted as ϕ
(
z
i
)
=
ϕ
i. Principal components may be extracted by solving the eigenvalue equation of the sample covariance C
ϕ:  λ
ν
=
C
ϕ
ν. By defining the kernel matrix K of dimension m
×
m such that(1)
K
i
j
=
k
z
i
,
z
j
=
ϕ
z
i
T
ϕ
z
i
=
ϕ
i
·
ϕ
i
.Here, k
(
z
i
,
z
j
) is the calculation of the inner product of two vectors in F with a kernel function. The eigenvalue problem may be put in the form m
λ
α
=
K
α, where α identifies the eigenvector V after normalization. Centralize K by(2)
K
′
=
K
-
1
m
K
-
K
1
m
+
1
m
K
1
m
.Here, matrix 1
m
=
(
1
/
m
)
m
×
m.The eigenvectors identified in the feature spaceF can be considered as kernel principal components (KPCs) which characterize the dynamical system. Note that, since the number of eigenvectors (i.e., nonlinear PCs) is the same as the number of samples, it is higher than the number of (linear) PCs given by PCA. The KPCA method is termed “nonlinear” since the feature mapping in the space F is achieved by a nonlinear function.


## 3.2. Data-Dependent Kernel Function

For a given data set, the key step is to select a corresponding optimal kernel function in order to obtain the optimal nonlinear feature transformation. There are several kernel functions can be chosen, such as Gaussian, Quadratic, Radial basis function, and polynomial. It is worth noting that the above kernel functions give different results if inappropriate parameters are chosen. However the selection of parameters in these kernel functions is arbitrary and does not have theoretical rules for reference. Since the geometric structure of data in the kernel feature spaceF is determined by the kernel function, it is desirable to choose the target kernel function to be data-dependent.In this paper, a data-dependent kernel based on the Gaussian kernel is designed. The Gaussian kernel function is(3)
k
z
i
,
z
j
=
exp
⁡
-
z
i
-
z
j
2
2
σ
2
,where σ is a measure of the data spread, and it implicitly assumes the same variance for each entry of the sample vector (i.e., the data is isotropic), which cannot be satisfied in many practice situations.We consider the generalized Gaussian kernel:(4)
k
z
i
,
z
j
=
exp
⁡
-
1
2
z
i
-
z
j
T
H
-
1
z
i
-
z
j
,where H is a transformation matrix. In cases where certain input transformations are known to leave function values unchanged, the use of H can also allow such invariance to be incorporated into the kernel function.A choice forH is the m
×
m covariance matrix:(5)
H
=
E
z
-
μ
z
z
-
μ
z
T
,where z is the data vector and μ
z is the corresponding mean vector. By assuming that the entries of the sample vector are independent, it can be simplified by dropping the off-diagonal elements as(6)
H
=
Diag
Diag
E
z
-
μ
z
z
-
μ
z
T
.Here, diag
(
·
) extracts the diagonal elements of covariance matrix H, which are then used to construct a diagonal matrix by diag
(
·
), and the obtained kernel by this matrix H is called independent DDK [17].While (3) implicitly assumes all sample vectors have the same variance, this is not necessary for the generalized Gaussian kernel. And if all sample vectors have the same variance σ
2, then H
=
σ
2
I and the generalized Gaussian kernel (4) will reduce to the conventional Gaussian kernel (3). Using the kernel function (4) with covariance matrix of sample data, the local geometric structure of data can remain in the kernel feature space F.


## 3.3. Algorithm of Data-Dependent KPCA

The description of feature extraction process of NC tools with data-dependent KPCA is as follows.(1)
GainV groups vibration time-domain signals data of NC machine, and transform every group data to frequency-domain signals by FFT.
(2)
Calculate eight feature parametersC
1
–
C
8 of each group, respectively, to compose observed data set X
=
{
X
v
j
}
V
×
8, define the average and standard deviation of column vectors as μ
X
=
{
μ
X
j
}
1
×
8, S
X
=
{
S
X
j
}
1
×
8, and normalize data set X.
(3)
Reduce dimension ofX by KPCA described in Section 3. In the operation of KPCA, take (4) as the kernel function and the covariance matrix of X as the matrix H to transform X into new data X
F.
(4)
Compute the8
×
8 kernel matrix K and centralize K to K
′ using (2). Solve the eigenvalue problem of K
′, obtain the eigenvalues λ
j and eigenvectors v
j of K
′. Set Λ as the eigenvalue list sort by decreasing order, choose the number of kernel principal components U with the principle of the minimum value that the cumulative contribution rate is above 75% [18, 19].
(5)
Calculate the load matrixW: W
=
Y
Λ
U, where Λ
U denotes the diagonal matrix by the first U eigenvalues in Λ, and Y
=
{
Y
1
,
Y
2
,
…
,
Y
U
}
8
×
U is the eigenvectors matrix corresponding to the first U eigenvalues.


## 4. Multiclasses Fault Diagnosisk-Nearest Neighbor

ThekNN method is the simplest, yet most useful approach to general pattern classification, and has been widely applied in pattern classification. Its principle is based on an intuitive concept that data points of the same class should be closer in the feature space. Specifically, for a given unlabeled sample, kNN finds the k-nearest labeled samples in the training data set and assigns to the class that appears most frequently within the k-subset (i.e., k-nearest neighbors). kNN’s error rate has been proven to be asymptotically at most twice that of the Bayesian error rate [20]. kNN has been used for image clustering [21] and cardiac arrhythmia diagnosis [22], and so forth, but few published researches can be found in machine fault detection. In this paper, the kNN classifier is used to evaluate the reduced feature vectors by KPCA for avoiding relatively local relevance between parameters and reducing computation complexity.He and Wang provided a fault detection method using thek-nearest neighbor method for semiconductor manufacturing processes, named FD-kNN [23]. It is based on the idea that the trajectory of a normal sample is similar to the trajectories of normal samples in the training data, and the trajectory of a fault sample must exhibit some deviation from the trajectories of normal training samples. However, FD-kNN just determines two classes (normal and abnormal) which cannot be applied directly in NC machine tools, because they have several fault classes (normal, wear, gap, etc.) that we want to determine. In this paper, a multiclasses fault diagnosis kNN method (MFD-kNN) is proposed based on FD-kNN.The proposed MFD-kNN method consists of three steps for model training.(1)
For theith fault class B
(
i
) in training data, finding k nearest neighbors for each sample s
q
(
i
) in the same class, s
q
(
i
) denotes the qth sample in the ith fault class.
(2)
Calculate thekNN squared distance for each sample: D
(
s
q
(
i
)
)
=
(
1
/
k
)
∑
t
=
1
k
(
d
q
t
(
i
)
)
2, where d
q
t
(
i
) denotes squared Euclidean distance from sample s
q
(
i
) to its tth nearest neighbor in the ith fault class.
(3)
Determine the corresponding control limitD
α
(
i
) of the ith fault class B
(
i
). The threshold D
α
(
i
) with a significance level α can be determined by an assumption that D
(
s
k
i
)
2 following a noncentral χ
2 distribution, which can be estimated using the Matlab functionchilimit in the PLS Toolbox.The choice ofk is usually uncritical [23]. In general, the value of k is greater and the effect of noise is fewer, but the boundary between normal and faults is less distinct. The value of k can be set to be a modest number, such as 5, 7, and 10, based on the sample size.


## 5. Fault Diagnosis Approach for NC Machine Tools Based on KPCA and MFD-kNN

The fault diagnosis approach for NC machine tools in this paper includes two phases. The first phase focuses on model training, reducing dimension of feature parameters by data-dependent KPCA, and determining thresholds of different fault classes using MFD-kNN method. The second phase is fault detection for unknown working tools. The specific procedure is constructed through the following main steps as shown in Figure 1.Figure 1
Sketch of fault diagnosis process for NC machine tools based on KPCA and MFD-kNN.


### 5.1. Model Training

Step 1.
Gain vibration time-domain signals of NC machine in several fault classesB
(
i
), such as all tools normal, single tool wear, and single tool gap. Then divide signals of each fault class into V groups which include continuous n signals data, respectively; transform every group data to frequency-domain signals by FFT.Step 2.
For the normal class (all tools are normal), calculate the averageμ
X and standard deviation S
X of feature vectors, and extract nonlinear features using the data-dependent KPCA algorithm provided in Section 3, obtain the kernel principal components Y, and load matrix W.Step 3.
StandardizeC
(
B
i
) by the average μ
X and the standard deviation S
X: C
(
B
i
)
*
=
{
C
v
j
B
i
*
∣
C
v
j
B
i
*
=
(
C
v
j
B
i
-
μ
X
j
)
/
S
X
j
,
v
=
1,2
,
…
,
V
,
j
=
1,2
,
…
,
8
}, and multiply C
v
j
B
i
* to the load matrix W to obtain the time-frequency principal components Y
(
B
i
) of the B
i fault: Y
(
B
i
)
=
C
v
j
B
i
*
W.Step 4.
For every fault classB
(
i
), determine the corresponding control limit D
α
(
i
) using the MFD-kNN method proposed in Section 4.


### 5.2. Fault Detection

Step 5.
Collect continuousn vibration time-domain signals data U of NC machine under operating condition periodically while the state of tools is unknown and to identify, transform signals data of U to frequency-domain signals by FFT.Step 6.
Calculate eight feature parametersU
C
1
–
U
C
8 of signals, and standardize U by the average μ
X and the standard deviation S
X: U
*
=
{
U
j
*
∣
U
j
*
=
(
U
j
-
μ
X
j
)
/
S
X
j
,
j
=
1,2
,
…
,
8
}. Then multiply to the load matrix W to obtain the time-frequency principal components Y
(
U
) of the unknown tools: Y
(
U
)
=
U
*
W.Step 7.
IdentifyY
(
U
)’s k nearest neighbors for each fault class Y
(
B
i
) in the training data set.Step 8.
CalculateY
(
U
)’s kNN squared distance D
U
(
i
)
=
(
1
/
k
)
∑
k
=
1
k
(
d
U
k
(
i
)
)
2.Step 9.
Calculater
u
(
i
)
=
D
U
(
i
)
/
D
α
(
i
), and compare r
u
(
i
) with the number 1, if r
u
(
i
)
≤
1, U can be considered as a sample of the ith fault class. Otherwise, it is not belong to the ith fault class.Step 10.
Three results could possibly be obtained by Step9. One result is that U belongs to a single class; it can be determined that U belongs to the corresponding class distinctly. The second result is that U does not belong to any known class, in other words, r
u
(
i
)
>
1 for all i. In this case, they have to stop working and check tools for a possible unknown damage, handle it, and update the diagnosis model. And the last result is that U belongs to several classes. This situation could happen despite very small probability. In this case, calculate the confidence level c
l
(
i
) of D
U
(
i
) using the Matlab functionchilimit with scaling value and degrees of freedom calculated in Step 4. U belongs to the class q: q
=
max
⁡
{
i
∣
c
l
(
i
)
×
(
1
-
r
u
(
i
)
)
}.


## 5.1. Model Training

Step 1.
Gain vibration time-domain signals of NC machine in several fault classesB
(
i
), such as all tools normal, single tool wear, and single tool gap. Then divide signals of each fault class into V groups which include continuous n signals data, respectively; transform every group data to frequency-domain signals by FFT.Step 2.
For the normal class (all tools are normal), calculate the averageμ
X and standard deviation S
X of feature vectors, and extract nonlinear features using the data-dependent KPCA algorithm provided in Section 3, obtain the kernel principal components Y, and load matrix W.Step 3.
StandardizeC
(
B
i
) by the average μ
X and the standard deviation S
X: C
(
B
i
)
*
=
{
C
v
j
B
i
*
∣
C
v
j
B
i
*
=
(
C
v
j
B
i
-
μ
X
j
)
/
S
X
j
,
v
=
1,2
,
…
,
V
,
j
=
1,2
,
…
,
8
}, and multiply C
v
j
B
i
* to the load matrix W to obtain the time-frequency principal components Y
(
B
i
) of the B
i fault: Y
(
B
i
)
=
C
v
j
B
i
*
W.Step 4.
For every fault classB
(
i
), determine the corresponding control limit D
α
(
i
) using the MFD-kNN method proposed in Section 4.


## 5.2. Fault Detection

Step 5.
Collect continuousn vibration time-domain signals data U of NC machine under operating condition periodically while the state of tools is unknown and to identify, transform signals data of U to frequency-domain signals by FFT.Step 6.
Calculate eight feature parametersU
C
1
–
U
C
8 of signals, and standardize U by the average μ
X and the standard deviation S
X: U
*
=
{
U
j
*
∣
U
j
*
=
(
U
j
-
μ
X
j
)
/
S
X
j
,
j
=
1,2
,
…
,
8
}. Then multiply to the load matrix W to obtain the time-frequency principal components Y
(
U
) of the unknown tools: Y
(
U
)
=
U
*
W.Step 7.
IdentifyY
(
U
)’s k nearest neighbors for each fault class Y
(
B
i
) in the training data set.Step 8.
CalculateY
(
U
)’s kNN squared distance D
U
(
i
)
=
(
1
/
k
)
∑
k
=
1
k
(
d
U
k
(
i
)
)
2.Step 9.
Calculater
u
(
i
)
=
D
U
(
i
)
/
D
α
(
i
), and compare r
u
(
i
) with the number 1, if r
u
(
i
)
≤
1, U can be considered as a sample of the ith fault class. Otherwise, it is not belong to the ith fault class.Step 10.
Three results could possibly be obtained by Step9. One result is that U belongs to a single class; it can be determined that U belongs to the corresponding class distinctly. The second result is that U does not belong to any known class, in other words, r
u
(
i
)
>
1 for all i. In this case, they have to stop working and check tools for a possible unknown damage, handle it, and update the diagnosis model. And the last result is that U belongs to several classes. This situation could happen despite very small probability. In this case, calculate the confidence level c
l
(
i
) of D
U
(
i
) using the Matlab functionchilimit with scaling value and degrees of freedom calculated in Step 4. U belongs to the class q: q
=
max
⁡
{
i
∣
c
l
(
i
)
×
(
1
-
r
u
(
i
)
)
}.


## 6. Experiment Design

The FV-2215 horizontal Longmen machining center (see Figure2) is used for the experimental test, in which characteristics are illustrated in Table 2. The cutting tools used in this test are carbide tools #RPMW1003# in a face milling cutter #EMR 5R160-40-8T# with four teeth, its shape and different tool state are shown in Figure 3. The experimental setup for the in-process detection of tool fault is illustrated in Figure 4. The tool vibration signals are monitored by a uniaxial accelerometer (PCB352C22) which was placed at the tool rest in the direction perpendicular to tool face, and sent to a data acquisition instrument (ECON Avant (MI-7016)) and a portable computer.Table 2
Characteristics of the machining center.
Type
Horizontal
Model
FV-2215
Maximum speed of rotation
4000 (rpm)
Positioning accuracy
0.025 (mm)
Maximum feed rate
5000 (mm/min)Figure 2
The FV-2215 horizontal Longmen machining center.Figure 3
Samples of milling cutter shape and different tools.
(a)
Face milling cutter
(b)
Normal tool sample
(c)
Wear tool sample
(d)
Gap tool sampleFigure 4
Experiment illustration.Tool states in this experiment are alternatively three situations: normal, single tool wear, and single tool gap, and tool gap is cut with approximately 4 mm depth using electro-discharge machining. Aluminum alloy samples #7075-T351# of size (150 mm, 100 mm, 500 mm) are fixed on the machining center. In this experiment, cutting speed and depth are 500 rpm and 2 mm respectively.


## 7. Result and Discussion

In this experiment, three tool fault classes were measured including(
1
) all tools normal (B
1), (
2
) single tool wear (B
2), and (
3
) single tool gap (B
3). It is assumed that all investigated tools have the same damage mechanism. The vibration signals were measured and the sampling frequency was 48,000 Hz, which was determined by the frequency characteristics of tool vibration. A time-domain waveform and its frequency-domain waveform of vibration signals sample of classes (B
1) and (B
2) in 10 s are shown in Figure 5. It can be observed from the figure that the time-domain data appear periodically and the energy of frequency-domain data is dispersed to several band ranges. It is difficult to identify tool’s fault based on time-domain or frequency-domain waveform simply.Figure 5
Time-frequency domain waveform sample of normal and single tool wear classes.
(a)
Time-domain waveform with all tools normal
(b)
Frequency-domain waveform with all tools normal
(c)
Time-domain waveform with single tool wear
(d)
Frequency-domain waveform with single tool wearVibration signals in three tool fault classes are measured 50 times which changes various tools partly in the same state every time. These vibration signals are divided into two parts: 40 times as training set and 10 times testing set. The training set is used to train model in Matlab R2012, which includes calculation of time-frequency statistical parameters (shown in Table1) and dimensionality reduction by KPCA, and determine the control limit of three fault classes by the MFD-kNN method. First in all, 40 group vibration signals in class (B
1) (all tools are normal) are employed to reduce dimension by data-dependent KPCA. The cumulative eigen contribution rate with the first three eigenvalues is 94.3%, which is above the down limit CPV  (
=
75
%
). Hence the number of kernel principal components H
=
3, and kernel principal components Y
(
1
) and the load matrix W are obtained in KPCA. Then, the other two classes’ vibration signals are standardized by the average and the standard deviation of the normal class signals, and transformed into kernel principal components Y
(
2
) and Y
(
3
) which are multiplied by the load matrix W.For every fault classB
i
(
i
=
1,2
,
3
), determine the corresponding control limit D
α
(
i
) using the MFD-kNN method proposed in which the value of k is set to be 5. Take B
1 as an example, find k nearest neighbors for each sample s
q
(
1
) in the B
1 class, and calculate the kNN squared distance for each sample s
q
(
1
): (7)
D
s
q
1
=
1
5
∑
t
=
1
5
d
q
t
1
2
=
1
5
∑
t
=
1
5
∑
i
=
1
3
y
q
i
1
-
y
t
i
1
2
,where y
q
i
1 and y
t
i
1 denote the vector of the qth sample and its tth nearest neighbor.The thresholdD
α
(
1
) (α
=
0.01) is calculated using thechilimit function in the Matlab PLS Toolbox.The values of thresholdD
0.01
(
i
) of three fault classes are shown in Table 3.Table 3
The values of thresholdD
0.01
(
i
) of three fault classes.
Fault class
Threshold value
All tools normal (B
1)
16.35
Single tool wear (B
2)
20.19
Single tool gap (B
3)
19.75For validating the effectiveness of this proposed approach, the remaining 10 times vibration signals in each fault class are used as testing set. Firstly, calculate the testing signals’ time-frequency statistical parameters (shown in Table1), and then these statistical parameters are standardized by the average and the standard deviation of the normal class signals in the training phase and transformed into kernel principal components multiplied by the load matrix W. Sequentially, find k
(
=
5
) nearest neighbors for each testing data U
q by calculating its distance with training data, and calculate its kNN squared distance with the ith fault class D
(
U
q
(
i
)
):(8)
D
U
q
i
=
1
5
∑
t
=
1
5
d
q
t
i
2
=
1
5
∑
t
=
1
5
∑
j
=
1
3
U
q
j
i
-
y
t
j
i
2
,where U
q
i
1 and y
t
i
1 denote the vector of the qth testing data and its tth nearest neighbor.Finally, the value ofr
u
q
(
i
)
=
D
(
U
q
i
)
/
D
0.01
(
i
) is compared with 1, the result is shown in Figure 6. Figure 6(a) is the testing result with B
1 (all tools normal) training set, all points of B
1 testing set located below the threshold and the testing data of other two classes are above the threshold. Figure 6(b) is the testing result with B
2 (single tool wear) training set; the second data of B
2 testing set is above the threshold which should be below it, so this point is not determined to B
2. Figure 6(c) is the testing result with B
3 (single tool gap) training set, the second data of B
2 testing set is below the threshold which should be above it, so this point is determined to B
3. In brief, there is one fault detection error by the proposed method.Figure 6
Test results of three classes with proposed method.
(a)
Testing result withB
1 (all tools normal) training set
(b)
Testing result withB
2 (single tool wear) training set
(c)
Testing result withB
3 (single tool gap) training setPCA-MFD-kNN method and standard KPCA-MFD-kNN method with the same vibration signals are used for comparison, the standard KPCA take the conventional Gaussian kernel (3) as the kernel function. Despite the cumulative eigen contribution rate with the first three values by PCA and standard KPCA being 77.19% and 88.35% which are above the down limit CPV, they are both less than that value of the proposed method. The testing results with PCA-based method are shown in Figure 7. It can be observed that ten points are judged erroneously in Figure 7, one point of B
1 class and one point of B
3 class in training set are excluded from their class, and in the aspect of testing set, two points of B
1 class are determined to B
2 class, three points of B
2 class and one point of B
3 class are determined to B
1 class, and two points of B
3 class are determined to B
2 class.Figure 7
Test results of three classes with PCA-MFD-kNN method.
(a)
Testing result withB
1 (all tools normal) training set
(b)
Testing result withB
2 (single tool wear) training set
(c)
Testing result withB
3 (single tool gap) training setThe testing results with standard KPCA-based method are shown in Figure8. It can be observed that five points are judged erroneously in Figure 8, one point of B
3 class in training set is excluded from its class, and in the aspect of testing set, two points of B
2 class are determined to B
1 class, two points of B
3 class are determined to B
2 class. It is clear that the proposed method is outperforming than the PCA-MFD-kNN and standard KPCA-MFD-kNN methods in tool fault diagnosis.Figure 8
Test results of three classes with standard KPCA-MFD-kNN method.
(a)
Testing result withB
1 (all tools normal) training set
(b)
Testing result withB
2 (single tool wear) training set
(c)
Testing result withB
3 (single tool gap) training set


## 8. Conclusion

The present study proposes a fault detection approach to NC machine tools, which is based on data-dependent kernel principal component analysis (DKPCA) and multiclasses fault diagnosisk-nearest neighbor (MFD-kNN). Firstly, the original data set are transformed high dimensional data into low dimensional manifold feature space with the intrinsic dimensionality by DKPCA, in which the kernel function is constructed with covariance matrix of sample data. The kNN technique is applied to low dimensional manifold feature space to detect potential faults. Future work can be centered on the expansion of fault classes of NC machine’ tool and the efficiency and calculation speed of the proposed method.



---

*Source: 139217-2015-10-25.xml*