Non-Singleton Type-3 Fuzzy Approach for Flowmeter Fault Detection: Experimental Study in a Gas Industry

The main contribution of this paper is to develop a new flowmeter fault detection approach based on optimized non-singleton type-3 (NT3) fuzzy logic systems (FLSs). The introduced method is implemented on an experimental gas industry plant. The system is modeled by NT3FLSs, and the faults are detected by comparison of measured end estimated signals. In this scheme, the detecting performance depends on the estimation and modeling performance. The suggested NT3FLS is used because of the existence of a high level of measurement errors and uncertainties in this problem. The designed NT3FLS with uncertain footprint-of-uncertainty (FOU), fuzzy secondary memberships and adaptive non-singleton fuzzification results in a powerful tool for modeling signals immersed in noise and error. The level of non-singleton fuzzification and membership parameters are tuned by maximum correntropy (MC) unscented Kalman filter (KF), and the rule parameters are learned by correntropy KF (CKF) with fuzzy kernel size. The suggested learning algorithms can handle the non-Gaussian noises that are common in industrial applications. The various types of flowmeters are investigated, and the effect of common faults are examined. It is shown that the suggested approach can detect the various faults with good accuracy in comparison with conventional approaches.


Introduction
Instrument error is defined as the error between the actual and measured values. The instant error detection in large oil and gas industries, petrochemicals, power plants, etc., has long been important, and therefore, more research has focused on these industries. At an oil refinery, for example, everything happens relatively large: liquids flow in tons per hour, temperatures are measured in the hundreds to thousands of degrees Celsius, and electricity is generated in megawatts. Thousands and millions of dollars are spent at any given time because a small or faulty system defect can cause heavy damage to the whole system and workers or major losses. Therefore, to achieve acceptable safety, remarkable durability and well efficiency sensor management should be taken to account.
Due to the importance of processes, in the field of oil and gas jobs, thousands of sensors have already been installed in and around their physical systems.
Another source of error is the data logger system. In most data acquisition systems (DASs), there exist both systematic (e.g., nonlinearity) and random (e.g., electronic noise) error effects simultaneously. While systematic errors are a relatively stable feature of a DAS, random errors may be smaller or larger in different situations, and it is important to understand how they reduce the overall system performance. It is obvious that the higher number of sampling times and the number of bits used in the sampling process lead to the higher accuracy of analog-to-digital conversion signal. The difference between the original signal and the digitized signal is called the quantization error. Furthermore, the difference between the highest and lowest levels of signals that can be converted to digital by a certain number of bits is called Dynamic Range. Quantization error distorts the digital signal. This is because the analog signal at the sampling points must be rounded to the nearest value that can be detected and converted in the system. The higher number of bits used in the conversion process causes the sampled values to be closer to the original values, and therefore, the difference between the digital signal and the original analog signal becomes smaller [1].

Literature Review
The sensor fault detection (FD) is an important issue in various studies. Many researchers have paid attention to this problem. For example, in [2], some main features are identified by FLSs to determine the healthy conditions, and based on the extracted features, a fault detection method is proposed. In [3], by the curve fitting approach, the phase difference is detected in Coriolis flowmeters, and its accuracy is compared with Fourier-based methods. The variable selection method by the use of the causality approach is studied in [4] for the FD problem in the gas industry. The results are compared with filter-based and embedded-based methods, and it is shown that model identification by the suggested variable selection approach improves the FD performance. In [5], the fault of pressure sensors is studied, and a dynamic model is optimized to predict the pressure. In this paper, a pressure observe is designed to predict the sensor output, and the convergence is theoretically analyzed. In [6], by the use of Kalman filter, the flow is estimated, and by the Lyapunov approach, the stability is investigated. In [7], a wireless FD scheme is developed to detect the current fault in motors, and its energy consumption and detection accuracy are investigated. In [8], the detectability problem is taken into account, and the sensor locations are optimized to improve the FD accuracy. The FD of virtual sensors is studied in [9], and the accuracy of linear regression approaches is investigated. Considering various sensors, such as temperature and airflow virtual sensors, the suggested method is examined on a real building in Denmark, and it is shown that abnormal oscillation in temperature is strongly detected. In [10], a fiber-optic approach is introduced, and its accuracy and maintenance cost is studied. The variance shift scheme is formulated in [11] to construct an FD method for a navigation system. In [12], an FD system is developed for switching systems with uncertain switching modes, and the accuracy of the FD method is examined on a three-tank system. A multimodal FD approach is designed in [13] to detect shunt failures. The various FD methods for heating/cooling systems are reviewed in [14]. In [15], by the use of historical data, the outputs of sensors are predicted, and by comparison with the measured data, the fault is detected. The frequency estimation approach is developed in [16] for an FD problem.
Recently, the machine learning methods and artificial intelligence techniques have been developed for various applications, such as helicopter hydraulic FD problems, medical diagnosis systems, risk assessment applications, and so on [17][18][19][20]. These approaches have also been employed for FD problems in a few studies. For example, in [21], a neural network (NN) is used for modeling the signal dynamics and prediction, and based on the NN model, an FD scheme is developed for pneumatic valves. In [22], the genetic algorithm is suggested for online optimization of an NN and designing an FD system.
In [23], an NN-based FD is proposed for hydraulic systems, and it is shown that using NNs improves the accuracy. A deep learned NN scheme is designed in [24] for the FD problem in gas turbines. In [25], an FLS is used to approximate the flow pattern, and then based on the FLS model, the flow is predicted, and an FD scheme is designed. In [26], a recurrent NN is optimized to detect the fault in the drilling process of gas industries. An FD system based on NNs is suggested in [27] for reactive distillation, and its diagnosis capability is compared with conventional approaches. The support vector machine is developed in [28] for modeling flow patterns and fault detection. In [29], a simple NN is learned by the backpropagation approach, and it is used for the prediction of fluidization velocity and FD in gas industries.
The type-3 FLSs (T3-FLSs) have been recently developed to improve the estimation capability of conventional FLSs and improve the robustness against noisy environments. T3-FLSs have been employed in various practical problems, such as energy management [30], gyroscopes [31], forecasting problems [32], industrial 5G converters [33], and so on. In the aforementioned studies, it is verified that the developed T3-FLSs give a better performance in noisy conditions. However, it has not been used for fault detection problems in industrial systems.
In most of the above reviewed FD methods, the data uncertainties are neglected, and the signal dynamic/pattern is estimated by the noisy measured data. Furthermore, the simple learning methods have been used, and they cannot handle the non-Gaussian noise. The non-Gaussian noise is very prevalent in industrial applications. In this paper, by the use of a novel approach based on the non-singleton fuzzification, the uncertainty of historical measurement data is also considered. A type-3 FLS with high estimation capability in a noisy environment is presented to predict the signal pattern and fault detection well. The nonlinear Kalman approach with a fuzzy kernel size is formulated for learning NT3FLS in the presence of non-Gaussian measurement noise.

General View on Suggested Approach
The general view of the suggested approach is shown in Figure 1. The main signals are modeled by the designed NT3-FLS, and then by comparing the measurement signals and approximated signals, the faults are detected.

Non-Singleton Interval Type-3 FLS
The type-3 FLSs can model a higher level of uncertainties in contrast to the type-2 counterparts because the secondary membership and also the upper and lower uncertainties in a type-3 fuzzy set are not crisp values, but they are fuzzy sets. To better see the difference, consider a horizontal slice in type-3 and general type-2 fuzzy sets, as shown in Figure 2, we see that the bounds of uncertainties (upper and lower of primary memberships) in the type-3 fuzzy set are not crisp values, but they also interval fuzzy sets. Furthermore, in comparison with general type-2 MFs, the type-3 MFs have more degrees of freedom. As shown in Figure 3, a horizontal slice in the type-3 MFs can be represented by two slices in the general type-2 counterparts. In other words, we theoretically see that the type-3 MFs can model more levels of uncertainties because of their uncertain secondary memberships and uncertain FOU, and also from a functionality view point, we see that the type-3 MFs have more degrees of freedom. The basic idea for type-3 FLSs is presented in [34]. In this paper, the non-singleton form of basic type-3 FLSs is formulated in a fault detection scheme.  The dynamics of the case-study plant are completely unknown. Furthermore, the measured data set is stained with noise. Then in this problem, we are facing a high level of uncertainty, and the type-3 FLSs with better uncertainty modeling capability is used. Furthermore, the non-singleton fuzzification is used to handle the uncertainty of the measured data.
The structure of the NT3FLS for modeling the signal dynamic is described in this section. The general structure is given in Figure 4. The detailed scheme is depicted in Figure 5. The estimated signal is computed as follows.  (1) The inputs of NT3FLS at sample time t are the value of the target signal at sample time t and its previous data ψ(t − 1), . . . , ψ(t − τ). The inputs are denoted by ψ 1 , . . . , ψ τ , where τ is the number of inputs.
(2) In the second step, the non-singleton fuzzification is computed. Gaussian membership functions (MFs) are considered to handle the input uncertainties. The standard division (SD) of this MF represents the uncertainty level of the measured signal. The Gaussian MFs are used because they are derivable, and the non-singleton fuzzification in Gaussian MFs is also much easier in contrast to triangular counterparts.

Learning Algorithm
In this section, the rules and MF parameters and fuzzification level are optimized.

Rule Parameters
To adjust the consequent (rule) parameters of NT3FLS, the CKF is applied as: where where Fσ denotes the kernel function. The kernel size σ is obtained by an FLS [35].

Antecedent Parameters
The centers of MFs cζ and the level of fuzzifications σ ψ are tuned by MUKF as follows.
(1) The designed NT3FLS is rewritten as: where, (3) The sigma-points are defined as: where d a denotes the number of elements of vector θ a , ϕ is covariance matrix of is the κ-th column of (d a + λ)ϕ(t) κ and λ denotes the turning factor. (4) Computeŷ(t) (estimated signal) as: (5) Computeφ andR as:λ where L represents the dimension of χ, and G σ (χ) is: The value of σ is obtained by a FLS [35]. (6) θ a and ϕ are updated as: where γ(t) is

Data Description
The trajectory of the peak of consumption per hour is depicted in Figure 7. The total number of data is 28,673. We see that the peak of consumption is increased each year.
The main reason is the changing of lifestyle and the development of gas supply for various areas.  Figures 8-10. It is seen that consumption is rapidly changed. For example, around the 700th day, the total consumption has suddenly reached 30% of its value.

Modeling
The estimation capability of the suggested NT3FLS is examined. For each input, 11 MFs are considered. The centers of inputs are located in 0, 0.1, 0.2, . . . , 1. It should be noted that the input signals of NT3FLS are normalized between 0 and 1 by dividing the input signals by their upper bounds. The trajectory of the estimated peak of consumption and the actual peak of consumption are shown in Figure 11. We observe that the estimated peak tracks the actual signal with reasonable accuracy. The zoomed view is depicted in Figure 12. The modeling performance of consumption for Line 1 and its zoomed view are depicted in Figures 13 and 14. Similarly, for lines 2-3, the modeling performance zoomed views are depicted in Figures 15-18. The simulations show that the suggested approach is effective, and the estimated signal is well converged to the real signal under a high level of uncertainties and measurement errors.

Fault Detection
Four types of errors are considered, and their effects are examined. First error is named the bias error. A bias error is a constant that is added to the signal. This type of error can be simply detected by a comparison of the signal with other sensor's measurement. The second type of error is the hard error. In hard error, the sensor result in a constant instead of real value. The third type is the scale error. In the scale error, a constant or a time-varying value is multiplied with the signal. The scale error is more difficult than the bias error. The fourth error is the noise error. In noise error, the actual signal is measured with lower or higher values. To detect this type of error, previous samples of the measured signal are required.
All four described errors are applied on the measured data, and the accuracy of the designed scheme is examined. To see the superiority of designed algorithm better, it is compared with a recurrent fuzzy neural network (RFNN) [36], SVM-NN [37] and neurofuzzy (NFLS) [38]. The accuracy of different methods has been shown in Table 1. We see that the suggested method can detect the bias error about 97%, the scaling about 98%, the high noise about 89% and the hard error about 88%. Table 1 verifies that the error detection of the suggested approach is better than other methods. It should be noted that the program is executed 10 times, and the average values are presented.
The detection of four types of errors for total consumption are shown in Figures 19-22. We see that the suggested approach detects all type of errors well. Furthermore, it should be noted that the suggested approach estimates the actual signal well. Similarly, the four types of errors are examined on the peak of consumption data. The results are shown in Figures 23-26. It is seen that, in spite of high variation of the actual signal, it is well estimated and predicted. All type of errors are detected with the desired accuracy.   To better show the superiority of non-singleton fuzzification and high-order FLS, a numerical comparison is given. A Gaussian noise is added to the inputs with various variances. The values of the root-mean-square of modeling errors are compared in Table 2. The mean of the results for 10 epoches are given in Table 2. As seen from Table 2, the type-3 FLS by the non-singleton fuzzification results in better accuracy, particularly in the higher noisy condition. It should be noted that all methods are compared in the same condition and same data set.

Remark 2.
It should be noted that the suggested scheme models the output signal, and then based on the a comparison between the model out and the measured signal, it detects the faults. Then, the training data sets should contain no fault. One way to ensure this is measuring of the training data set by multiple sensors. Furthermore, before starting the training process, the abnormal data sets should be filtered and not used in training. Furthermore, it is emphasized that the measurement errors of output signals are handled by the non-singleton fuzzification. In other words, it is assumed that the input data set is not accurate in terms of measuring error. If the training data set includes fault, it is possible that the system could not detect the actual fault.

Remark 3.
The training process is done in an off-line scheme. Then, the sampling time does not impact the computation cost. Furthermore, in the our-case study system, the speed of changes of gas flow is low, and a fast sampling time is not required. It is obvious that, for fast changing signals, the sampling time should be small enough for better modeling of the signal behavior. Figures 23-26 show that the suggested FD scheme gives a good detection performance versus various faults. Furthermore, Table 2 shows a good robustness against disturbances that have been considered as external noises. In Figures 19-22, the fault is detected in the total consumption, and we see that the changing of load does not effect the FD performance. We see that increasing the trajectories due to the increasing consumption are not detected as faults, and the suggested FLS learns the consumption pattern well.

Conclusions
This paper introduces a new approach for flowmeter fault detection in an experimental project. The actual signals are modeled by the suggested NT3FLS, and the measurement error is well detected, as shown by the comparsion between the predicted signal and measured signal. Four types of errors, such as bias error, scaling error, hard error and noisy measurement error, are considered, and the performance of the suggested scheme is evaluated. First, the data of the case-study system are described, and the modeling accuracy of the suggested approach is examined. It is seen that, in spite of high variation of the actual signals and various errors, the real signals, such as the consumption of three lines and the peak of consumptions, are well estimated by the designed NT3FLS. Second, the accuracy of error detection is examined. The four errors are applied on the total consumption signal and the peak of the consumption signal, and it is shown that the suggested approach detects the error with the desired accuracy. It is shown that the suggested method can detect the bias error about 97%, the scaling about 98%, the high noise about 89% and the hard error about 88%. Comparing the obtained results with some other similar approaches show the superiority of the suggested approach. The main advantages of the suggested approach are: (1) The measurement errors of the recorded historical data are handled by the proposed non-singleton fuzzification. (2) The non-Gaussian noise, which is a prevalent issue in industrial applications, is supported in the suggested scheme. (3) The proposed NT3FLS results in better accuracy in an uncertain environment.