Skip to main content
. 2016 Dec 6;16(12):2069. doi: 10.3390/s16122069
Algorithm 2 Fault Detection based on the Clustering-kNN rule
Input: M clusters, clusters centers CP1,CP2,...,CPM, new test sample xnew, the threshold Dα2 of the D2 statistic
Output: Fault detection result
1: Calculate the distance between the new test sample xnew and each cluster center, denoted by Dxnew,CPi, i=1,2,...,M;
2: Computer the nearest cluster center CP to xnew according to CP=argminDxnew,CPi, i=1,2,...,M;
3: Adopt the cluster of CP as the calculation subset of the new test sample xnew;
4: Apply the kNN algorithm to the calculation subset of xnew, and achieve the value of the D2 statistic;
5: If the value of D2 statistic is larger than the threshold Dα2, output the faulty work condition; otherwise, output the normal work condition.