Quadratic Support Vector Machine and K-Nearest Neighbor Based Robust Sensor Fault Detection and Isolation

Fault detection plays a serious role in high-cost and safety-critical processes. There are two main drivers for continuous improvement in the area of early detection of process faults safety and reliability of technical plants. Detect fault in Geophone string sensors (SG-10) are very important in oil exploration to avoid loss economy. Methods are developed to enable earlier detection of process faults than the traditional limit and trend checking based on a single process variable and the development of these methods is a key matter. Classification methods will be used for pattern recognition and as such is appropriate for fault detection. In supervised training input-output pairs, both for normal and fault conditions, are presented to the network. The models were trained on the free fault and fault sensors. Then the Quadratic Support Vector Machine (QSVM) and k-Nearest Neighbor (KNN) as the classifiers are used. The test results for measuring the performance of 1232 sample classifiers from data show that the accuracy of fault-free sensor recognition is 97.4 % and 100% consecutively for these classifiers.


Fault detection plays a serious role in high-cost and safety-critical
processes.There are two main drivers for continuous improvement in the area of early detection of process faults safety and reliability of technical plants.Detect fault in Geophone string sensors  are very important in oil exploration to avoid loss economy.Methods are developed to enable earlier detection of process faults than the traditional limit and trend checking based on a single process variable and the development of these methods is a key matter.Classification methods will be used for pattern recognition and as such is appropriate for fault detection.In supervised training input-output pairs, both for normal and fault conditions, are presented to the network.The models were trained on the free fault and fault sensors.Then the Quadratic Support Vector Machine (QSVM) and k-Nearest Neighbor (KNN) as the classifiers are used.The test results for measuring the performance of 1232 sample classifiers from data show that the accuracy of fault-free sensor recognition is 97.4 % and 100% consecutively for these classifiers.

INTRODUCTION
The technical systems are increasingly sophisticated as the industry progresses.The more complicated the system, the more vulnerable it is to faults.In order to protect the system as soon as it is defective, failures must be quickly detected and isolated and remedied which require effective Fault Detection and Isolation (FDI) techniques.[1].If a fault occurs on a sensor, corrective measures should be taken immediately.In addition, with the work of this sensor's increased function, there may be various problems with the sensor, such as drift, loss of accuracy, bias, and total failure.Thus, sensor data may not be accurately calculated, which can lead to an optimal deviation of the industrial system or equipment that affects the safety and economy of production [2].Several univariate and multivariate techniques for process monitoring have been developed in the literature regarding fault detection.[3].
Methods based on a pattern recognition FDI transform the FDI problem into a classification problem.Pattern recognition-based FDI methods have the following benefits compared to traditional FDI methods.First, it is possible to flexibly apply pattern recognition-based methods that can save effort and time significantly.Second, FDI methods based on pattern recognition have a better FDI efficiency than traditional methods, since they learn the fault patterns from the fault-free data and fault data.Third, when some important variables are not available, pattern recognition-based approaches can still work well and they will learn the patterns of fault that may still be unique to the restricted variables.Finally, the theories and algorithms for pattern recognition are developed and a lot of information and tools are available [4].Little research on pattern recognition is available based on sensor fault detection and isolation methods.SVM and KNN are the dominant algorithms among the pattern recognition algorithms in FDI.
The SVM standard is a well-known supervised machine learning algorithm that is commonly used for classifying data.The classifier relies only on a small part of the vectors of support, applies the concept of reducing structural risk in the statistical theory of learning, and solves the problems of non-linearity and local minima.Extensive studies have shown that good performance on different classification problems can be achieved by the standard SVM.However, as a supervised learning algorithm, sufficient labeled data are required to achieve good classification performance.In this study, the extracted features were linear and nonlinear to detect the fault and classified using the quadratic support vector machine (QSVM) [5,6,7].
On the other hand, The KNN classifier is one of the most common and useful pattern recognition methods.KNN classifies each testing dataset based on its KNN.The distance between the samples of research and all the samples of training should be measured in order to find the k-nearest neighbors.This requires a huge amount of computing overhead in the case of big data.These approaches typically lead to the exact k of nearest neighbors being identified [8,9].The KNN algorithm has many attractive benefits.As a nonparametric classification method, the KNN algorithm does not need a training process.Particularly, it does not require prior knowledge about the statistical properties of the training instances, and can directly classify the query based on the information provided by the training set [10].This research will define the classification process of sensor fault detection and isolation with QSVM and KNN methods.The classification phase starts with the acquisition of sensor data in the form of the Real number, free-fault and fault feature extraction and classification with QSVM and KNN.
The rest of the paper will be organized as follows.Section 2 provides a brief background of related works.Section 3 gives an explanation of FDI and classification methods QSVM and KNN techniques.Section 4 estimates the performance of the classifier.In section 5 the experimental results are presented.Section 6 describes the conclusion and future suggestions.

RELATED WORKS
In the last two decades, FDI for any system has gained increasing attention.Many studies have therefore been documented in connection with FDI fields, as well as some previous studies that performed computer vision and image processing classifications based on KNN algorithm and SVM were decided to carry out in much the same way as studies conducted.
Mohapatra et al. (2020), this study compared 6 different faults in machine learning approaches (Multi-Layer Perceptron (MLP) Neural Network, KNN, Decision Tree (DT), SVM, Gaussian Naive Bayes (GNB), and Random Forest classifier (RF) employed for Tokamak sensor fault detection) The impact of detection technologies on fault detection and traditional identification of magnetic position sensors.From the comparative results found, the best method found among the six machine learning methods in terms of accuracy and speed is the random forest classifier Method.[11].
In the study conducted by Saleh et al. (2019).Use the modified KNN (MKNN) method, it has been compared to (1) KNN ( 2) SVM (3) weighted KNN (4) fuzzy SVM (5) brain emotional learning (BEL) in classification terms of precision, accuracy, and recall.On the other hand, MKNN has less time for testing than KNN and weighted KNN [12].Saleem et al. (2019).The study compared Classification algorithms in the classification of plant species and results have been obtained that the KNN algorithm has better performance than Naïve Bayes, DT and SVM with 97.6 % and 98.8 % accuracy and recall values respectively when tested in the 'Flavia' dataset [13].
In this report, by Liu et al. (2019) proposes accuracy of the new pattern classification enhancement (CAI) approach that works with the local consistency matrix.When classified to another class, the quality matrix represents the conditional probability of an item falling into one class., and is calculated based on the object's K-NN.The experimental results indicate that CAI greatly increases the accuracy of the classification and is robust in value selection.[14].
The deep learning technique has been used by Ramesh et al. (2019), Gabor wavelets and moment functions have been used for the characters in the initial efforts.With the advent of machine learning, it was attempted to achieve appropriate accuracies for SVMs and feature vectors.ANNs have also been used for Deep Belief Networks, claiming a considerable improvement in performance.It was claimed that more advanced techniques such as CNN were used only to recognize Kannada numerals [15].
Yue Yu et al. (2020) in this study, two enhancements are proposed.The first improvement is to propose a Corrected Reconstruction Algorithm (CRA) in order to increase the accuracy of the reconstruction.Multi-sensor faults when reconstructing, the conventional principal component analysis (PCA) reconstruction has lower accuracy.A cyclic PCA model (CPCA) to monitor failures in multi-sensors are the second improvement.The aim of this is to improve the ability of the PCA model to detect multiple sensor faults.While these useful changes were made, the desired results were also obtained by the experiments obtained in this paper.Some defects still occur.For example, under the same conditions, the accuracy of common-mode faults in reconstruction is lower than that of sensor faults.And the PCA model is unable to determine the sensor failure type [16].

I. Fault Detection and Isolation (FDI)
Nowadays the oil utilization extends very important economic source in all countries, and oil exploration is the first step to search about this source.The sensors are one of the oil exploration steps and start sensing the data that will be informed about the oil.This important economic source makes more careful about reliability and dependability.So, try to take the sensors away from (fault) that causes the sensors to fail or stop anyway.This will be achieved by continuous monitoring supported with good fault detection and fault classification capabilities.With these two capabilities fault detection and isolation, the sensors will have performance and reliability.Also, fault detection and isolation help in reducing the severe consequences of the various faults.The structure of the Firstly, the data collected from the oil exploration company that reads from the geophone sensor string (SG-10) must cover all cases of sensor fault and fault-free in which to do the best model training.Secondly, the data in the dataset for fault and fault-free training is filtered and randomly distributed.Thirdly, the variables that can properly represent the sensor fault and fault-free cases are chosen.The variables should be chosen carefully.Then, the training data is normalized.Fourthly, models of Pattern Recognition (QSVM, KNN) are trained using pre-processed data obtained at the end of the third step.It uses a hypersphere in a high dimensional space with a tight boundary to formulate the fault and fault-free data distribution.Then, the FDI performance of Pattern Recognition (QSVM, KNN) models is tested using both training data and test data.If the accuracy is not acceptable will go back to the third stage, or the Pattern Recognition (QSVM, KNN) models are successful.It is recommended to try various selections of variables and to choose the one with the best results.Trained Pattern Recognition (QSVM, KNN) models will be used in the online FDI process [17,18].
The online detection and isolation of faults are to monitor the process variables of the sensors concerned.Monitoring data are pre-processed, variables are selected and normalized as in the offline model training process.The trained Pattern Recognition (QSVM, KNN) models are then used to check whether the monitoring data are an outlier.Depending on the limit of the sensor features.If one or more of these features are larger than the predefined threshold, a fault is detected and reported to the manager.If not, the sensor will be fault-free.
As a result, fault detection and isolation become one of the most important topics in sensors, this topic will be discussed in this paper.The multiple fault detection and isolation considered here are based on the four types of a sensor fault (resistance, noise, leakage and tilt).

II. Classification Method
A. Quadratic Support Vector Machine (QSVM) Quadratic SVM is the advancement of the SVM method used for the non-linear classification of multiclass data.A linear classifier is the fundamental theory of SVM and has been progressing more to operate on nonlinear issues by integrating high-dimensional workspace kernel trick concepts.In order to explore the potential of SVM capabilities, this development increases research interest in the field of pattern recognition.It is possible to describe the SVM principle clearly as a way of finding the best hyperplane.The SVM approach in Figure ( 2) can be seen.The hyperlink is used to distinguish the input data from the two classes.Figure (2a) displays data from two classes symbolized by green circles and blue boxes, which are Class 1 data and Class 2 data.The problem of classification can be fixed by the SVM classification method.It is achieved by finding out a line that can distinguish the two data classes.By measuring the margins of the hyperplane and its maximal points, the best hyperplane separator can be achieved.The distance between the hyperplane and the nearest data is the margin of each class.The Support Vector is the data nearest to the best hyperplane.The best hyperplane is shown in Figure 2b by the solid line.In the second class, Hyperplane is better placed straight away.The classification data obtained is not linear, but some classes are not linear in their groupings [19].A modified SVM can solve the nonlinear problem.By entering the Kernel function, the SVM is modified.On nonlinear models, kernels have been trying to make linear models work.It is achieved by mapping to a higher dimension to make the linear model non-linear.The data representation will change this.Two features describe each example as (1) [19].
For this data, there is no linear separator in (1).To make each example mapped as a linear model nonlinear (2).
The data now in a new description has three features, becomes linearly separable.The change in the representation of the data is shown in Figure 3.  4). = (, ) = (  ) 2  (4) a mapping ∅ to higher-dimensional space is known as (5).
The simplest kernel description is a way of giving by mapping ∅ a higher dimension.In addition, the dot product kernel (, ) also measures∅()  ∅().
Each kernel k is associated with mapping features ∅. ∅ takes the input  ∈  (input space) and mapping it to F (feature space).Kernel (, ) takes two inputs and gives the similarities of its Fspace.The mapping is shown in ( 6) and (7).
The Kernel Matrix K over the data is also defined by the kernel function k.Considering N examples { 1 , 2 ,… .,   } the (i,j)-th entry as K defined as (8).
Description:   : Similarity in the feature F space between the i-th and the j-th example. : N x N matrix of similarity in pairs of examples between in space F.  is a symmetric and positive definite matrix.
The following are the common kernels with real values for vector inputs it can be seen at ( 8) - (12).
In this paper, we use the quadratic kernel to classify the sensor into the free fault and fault.Quadratic Support Vector Machine (QSVM) is called for SVM Method with quadratic kernel [19].

B. K-Nearest Neighbor (KNN)
K-Nearest Neighbor (KNN) is an interesting method of classification in data mining, which is often referred to as lazy learning.K-Nearest Neighbor (KNN) is included in instance-based learning where the training data set is stored so that the classification of new data that has not been classified data can be categorized by comparing the data that is most similar to the training set with the nearest neighbor concept.When there is less distance, a neighbor is considered the closest.KNN keeps all the training examples and puts off learning until new data is classified, that's why it's named lazy learning.[20].
The KNN works on implementation to evaluate its k nearest neighbor based on the shortest distance from the sample data instance query [21].The sample data is projected into multidimensional space, where a data feature is defined by each dimension.That means that each similar sample will be categorized by the KNN into one class.For an unknown test specimen, the decision on KNN will depend on how closely the sample is tested to each nearest sample per class and will then be given to one such class as illustrated in Figure 4.In classifying an unknown pattern, the nearest neighbor rule has some problems.When there are m sample numbers per pattern, determined then m distances to each sample point from the test pattern must be found to ensure the nearest neighbor.It is also necessary for all these sample points to be stored.This leads to an improvement in both the algorithm's mathematical operation and storage complexity.As the number of features increases, more samples of training data are required; thus, storage and computational complexities are increased.[22].

C. Evaluation Metrics
In this paper, the evaluation metrics commonly used to estimate the performance of the classifier were selected.Specificity, sensitivity and accuracy are these metrics.When each of these metrics is higher, the predictive capacity of the predictor becomes greater.The metrics used are listed below in the article.TP is a true positive, TN is a true negative, FN is a false negative and FP is a false positive [23].
Accuracy; It is the ratio of the classifier's correct estimates to all estimates and its Eq. ( 14).

I. Data collection
Data read by geophone string sensors (SG-10) from Oil Exploration Company and data samples as shown in Table I were taken for use in experimental work.In this data, four features used for fault detection and isolation have a fault and fault-free sensors.The QSVM and K-NN Classification methods were used to design the model of the sensor fault detection and isolation.These two different approaches were used to split the dataset into training and test data.Four features were to classify the sensor into fault-free or fault and measured the performance by the accuracy and sensitivity and specification for each classification method.

II. Quadratic Support Vector Machine (QSVM)
The QSVM classifier's classification accuracy is (97.4 %), sensitivity is (98.3 %,) and specificity is (96.4 %) for sensor fault detection and isolation.As shown in the Confusion Matrix in Figure 5 and Region of Convergence Curve (ROC Curve) as shown in Figure 6.

III. K-Nearest Neighbor (KNN)
The KNN classifier of sensor fault detection and isolation was excellent and the accuracy, sensitivity and specificity were (100 %) for all as shown in the Confusion Matrix in Figure 7 and Region of Convergence Curve (ROC Curve) as shown in Figure 8.

CONCLUSION
In this paper, the authors used a new and practical approach to detect the fault in its sensor using Classification methods.These approaches use the four features as parameters to specify the fault or free fault sensor using QSVM and KNN classifiers.Measure classifier performance has been done by the accuracy, sensitivity and specificity as is shown Previous in the result section.In this case, the approach succeeded, and pattern recognition methods achieved distinct results, and the KNN method was the best depend on Evaluation metrics.Furthermore, other classifiers and various sensors, such as accelerometer or pressure sensor also can be used instead of the Geophone string sensor (SG-10) for different kinds of other sensor faults and also can be implemented on the available card.

Figure 1 :
Figure 1: Structure of Pattern Recognition (QSVM, KNN)-based sensor faults detection and isolation strategy [17].In the offline model training process, one class data description model is developed based on Pattern Recognition (QSVM, KNN).Firstly, the data collected from the oil exploration company that reads from the geophone sensor string (SG-10) must cover all cases of sensor fault and fault-free in which to do the best model training.Secondly, the data in the dataset for fault and fault-free training is filtered and randomly distributed.Thirdly, the variables that can properly represent the sensor fault and fault-free cases are chosen.The variables should be chosen carefully.Then, the training data is normalized.Fourthly, models of Pattern Recognition (QSVM, KNN) are trained using pre-processed data obtained at the end of the third step.It uses a hypersphere in a high dimensional space with a tight boundary to formulate the fault and fault-free data distribution.Then, the FDI performance of Pattern Recognition (QSVM, KNN) models is tested using both training data and test data.If the accuracy is not acceptable will go back to the third stage, or the Pattern Recognition (QSVM, KNN) models are successful.It is recommended to try various selections of variables and to choose the one with the best results.Trained Pattern Recognition (QSVM, KNN) models will be used in the online FDI process[17,18].The online detection and isolation of faults are to monitor the process variables of the sensors concerned.Monitoring data are pre-processed, variables are selected and normalized as in the offline model training process.The trained Pattern Recognition (QSVM, KNN) models are then used to

Figure 4 :
Figure 4: KNN Example Two-class classification [22]Here k=5 distances.The Euclidean distance can be determined as follows: ): A ratio of true value to positive value is the value of those considered positive.The sensitivity equation is defined as follows: Specificity (TNR); Provides the ratio of the negatives estimated by the classifier to the negatives.The specificity of the equation is defined:

Figure 5 :
Figure 5: QSVM classifier Confusion matrix Diagonal elements are the correct classification of the samples and the off-diagonal elements are the incorrect classification of the samples.

Figure 7 :
Figure 7: KNN classifier confusion matrix Diagonal elements are the correct classification of the samples and the off-diagonal elements are the incorrect classification of the samples.