Integrated Diagnostic Framework for Process and Sensor Faults in Chemical Industry

This study considers the problem of distinguishing between process and sensor faults in nonlinear chemical processes. An integrated fault diagnosis framework is proposed to distinguish chemical process sensor faults from process faults. The key idea of the framework is to embed the cycle temporal algorithm into the dynamic kernel principal component analysis to improve the fault detection speed and accuracy. It is combined with the fault diagnosis method based on the reconstruction-based contribution graph to diagnose the fault variables and then distinguish the two fault types according to their characteristics. Finally, the integrated fault diagnosis framework is applied to the Tennessee Eastman process and acid gas absorption process, and its effectiveness is proved.


Introduction
The main goal of the chemical industry is to improve the efficiency and accuracy of manufacturing facilities. As the automation level of the chemical industry continues to improve, the scale of production increases and the complexity of the system grows continually. The probability of failure and fault in chemical system also increases. Compared with the permanent termination of the system caused by failure, the system offset caused by fault can be detected in time, and then corresponding measures can be taken to avoid accidents [1]. Therefore, distinguishing the type of faults in the chemical process is the key to reducing operator errors and ensuring system safety and reliability.
In recent years, many fault diagnosis methods for chemical processes have emerged. These methods diagnose different faults [2][3][4][5]. However, no distinction is made between the types of faults themselves. In an actual chemical process, faults can be divided into process faults and sensor faults [6]. Process faults are characterised by multivariate coordination. The occurrence of process fault means that the operating state of the system deviates from the normal value. Sensor fault has variable independence, and the fault variable is unique. The sensor fault interferes with the stability of the system and affects the judgment of the operator, which may lead to fault. Therefore, it is very important to diagnose process faults and sensor faults in modern industrial processes [7][8][9].
The fault diagnosis method is the key to ensure safe and effective operation of the process [10]. Generally, fault diagnosis methods can be divided into three categories: model-based [11], knowledge-based [12], and data-based [13] methods. Among them, the principal component analysis (PCA) in data-based methods is widely used for process and sensor fault diagnosis in chemical processes [14,15]. Ku [16], kernel principal component analysis (KPCA) [17], and dynamic kernel principal component analysis (DKPCA) [18] for process fault diagnosis. Qin et al. [19] improved the DPCA method and proposed a comprehensive model for sensor fault diagnosis. Wang et al. [20] put forward a new strategy based on PCA for sensor fault diagnosis. Li et al. [21] proposed a sensor fault diagnosis method based on density-based clustering and PCA. When using various PCA models for fault diagnosis, the diagnosis space is divided into two subspaces called principal subspace and residual subspace. T 2 statistics and squared prediction error (SPE) statistics are constructed to characterise the mean and variance information, respectively, of the processes in the two subspaces [22]. In the process of fault detection using T 2 and SPE statistics, the following four types of monitoring results may appear: (1) neither of the statistics exceeds the control limit; (2) T 2 statistics do not exceed the limit, but SPE statistics exceed the limit; (3) T 2 statistics exceed the limit; and SPE statistics exceed the limit. (4) T 2 statistics and SPE statistics both exceed the limit. When the SPE statistics change significantly (results (2) and (4)), it means that the normal operating model represented by the PCA model is destroyed, and a process fault or sensor fault has occurred. When the T 2 statistic changes significantly and the SPE statistic does not change (result (3)), it indicates that the relationship between the variables is approximately satisfied, but the system has undergone some transformation, which may be due to a change in operating conditions or a system fault. Result (1) indicates that the system is normal [23]. According to results (2) and (4), this study makes a detailed distinction between process faults and sensor faults in chemical processes.
Chemical processes are characterised by large amounts of data and complex calculations. The abovementioned improved methods also have this limitation. To detect the occurrence of faults more rapidly and accurately, the PCA method has been improved accordingly. In temporal logic algorithms [24], the temporal logic can qualitatively describe the behaviour of the system over time, because it has a large number of operators such as 'always' and 'final'. Clarke et al. [25] proposed a computational temporal logic to describe the behaviour of concurrent systems. For chemical processes, a cycle temporal algorithm (CTA) was proposed based on traditional temporal logic to solve a large amount of chemical data and the problem of low calculation accuracy. By combining it with the DKPCA method, it can capture most of the fault information in the system and improve the detection accuracy. the operator can respond to the fault timely and effectively. The fault type is further distinguished through the fault identification step.
When the system detects that a fault has occurred, it needs to locate the current fault location and fault variables, and then determine whether the fault is a process fault or a sensor fault. Currently, the most widely used method for fault variable location is the contribution graph [26]. The method is based on quantifying the contribution of each process variable to a single principal component score. The contribution of each process variable to the main component in the out-of-control state is added, and it is called variable contribution [27,28]. In recent years, many variable identification methods have been reported [29][30][31][32]. This study uses the reconstruction-based contribution (RBC) graph method to reconstruct the faulty variables, emphasises the cross-correlation between variables, and clearly shows the relationship between them. The variable characteristics of different faults are used to determine whether the fault type is a process fault or a sensor fault, so as to provide technical support for the next operation of the subsequent operator.
The current chemical process fault diagnosis methods for process and sensor faults are independent of each other, Sensor faults on non-control loops will not directly cause accidents, but will affect operator judgment and the accuracy of process fault diagnosis. Therefore, it is necessary to distinguish between sensor faults and process faults. A process fault is when the process itself deviates from the normal state, and the sensor fault process itself does not deviate from the normal state, but the sensor index deviates from the true value. Sensor faults on non-control loops will not directly cause accidents, which will affect operator judgment and the accuracy of process fault diagnosis. There is no corresponding integrated model to distinguish process and sensor faults in detail. When a sensor fault occurs in a chemical process, it is regarded as a process fault by default, which could cause operator errors and accidents. Therefore, it is particularly important to distinguish between Sensors 2021, 21, 822 3 of 22 process faults caused by real fault fluctuations and sensor faults indicated by false data. This paper proposes a CTA to improve the calculation speed and eliminate the redundancy problem caused by big data calculation. The CTA combined with DKPCA improves the fault detection speed and accuracy. Combined with the fault identification model based on the RBC graph, it emphasises the strong correlation of variables while extracting fault information. Finally, an integrated diagnostic framework for distinguishing sensor and process faults in a chemical process is obtained. The framework has the advantages of fast detection speed, high detection accuracy, and accurate fault variables. Its application to the Tennessee Eastman (TE) process and acid gas absorption process proves the effectiveness of the proposed integrated fault diagnosis framework.
The remainder of this paper is structured as follows. In Section 2, the CTA, DKPCA method, and RBC graph are introduced. In Section 3, the method proposed in the previous section is used to build an integrated fault diagnosis framework to distinguish between process and sensor faults. In Section 4, The TE process is compared with other fault detection methods to prove the advantages of the proposed method, and then four faults in the TE process and three faults in the acid gas absorption process are selected to demonstrate the effectiveness of the integrated fault diagnosis framework in distinguishing process and sensor faults. In Section 5, we summarise our work.

Dynamic Kernel PCA
Generally, the PCA can only be effectively performed in the observation set of linear and steady-state changes. When the data change nonlinearly and dynamically, the PCA method can be converted to changes in linear data after mapping. However, the analysis method based on the kernel function does not need to calculate the eigenvector as the PCA method but to convert it into the eigenvalue and eigenvector of the kernel matrix. Thus, it avoids the calculation for obtaining the eigenvector in the high-dimensional space and converting it into projection, solving the linear combination of kernel functions, and by capturing the data dynamic matrix [23][24][25][26][27][28][29][30][31][32][33][34][35], it also solves the dynamic matching problem of the PCA model. Hence, the calculation is greatly simplified.
Assuming that the normal data set X contains m variables, and each variable has n observations, the vectors at time t and augmented matrix X(s) containing the observations at the previous s time to reflect the relationship between the variables' dynamic relationship.
Then, the dynamic matrix X(s) is used to establish the dynamic principal component model through the PCA method, and then the dynamic characteristics can be analysed.
where T is the score matrix, P is the load matrix, and E is the residual matrix, which is the projection of the sample in the residual space. For nonlinear problems, the principle of the KPCA is to map the input data to the high-dimensional feature space through the inner product kernel function Φ to perform the PCA, thereby turning the two linearly inseparable points in the low-dimensional space into linearly separable ones. After nonlinear mapping, the observation vector x i (t : t − s) is mapped to Φ i (t : t − s), and the dynamic data augmentation matrix X(s) is mapped to Φ(s).
Then, the covariance matrix of the feature space can be expressed as Suppose the eigenvalue λ corresponding to the matrix C F , the eigenvector ν, and the coefficient α i (i = 1, 2, . . . , N) such that.
The corresponding characteristic equation is Equations (4) and (6) are combined to obtain: By defining the kernel matrix K ∈ R N×N , K ij = K ij = φ j (t : t − s), φ i (t : t − s) , from the above formula, the feature vector can be obtained as where α = [α 1 , α 2 , . . . , α N ] T . Before adopting the PCA on the feature space F, we first standardise the data, that is, replace K with the following equation: (9) where I N is equal to 1 N multiplied by an N × N identity matrix E ∈ R N×N . Therefore, the PCA in the feature space F is equivalent to solving the eigenvalue of Equation (6).
Combining Equations (8) and (4), the eigenvector α of the kernel matrix K can be derived from the eigenvector υ of the matrix C F , and it satisfies where k = 1, 2, . . . , p. p is the number of principals. By calculating the projection of the mapping data on the feature vector ν k , we find the principal component: To solve the eigenvalues of Equation (8), we use t k to calculate the feature space principal vector in the input space and introduce the kernel function K = exp − x − y 2 /2σ 2 into the feature space to avoid directly calculating the nonlinear mapping.

Cycle Temporal Algorithm (CTA)
In this section, a new method, the CTA, is proposed, which extends the qualitative trend analysis (QTA) method [36] to temporal constraints, extracts based on temporal series, and calculates the difference between the temporal threshold and the linear fitting error relationship. The linear correlation between variables is preserved, and the principal component is obtained by the subsequent DKPCA method. The correlation saves most of the process differences. Each principal component is a linear combination of all the variables. The data are cyclically segmented and merged, which reduces the amount of calculation, increases the calculation speed, and eliminates the redundancy generated by the calculation of the large data matrix.
The temporal logic equation is summarised and defined as follows: where T is 'always true', 'negation' ( ), and 'combination' (∧), which are standard Boolean join operators.
δ e is the preset threshold. Where δ e = 4σ 2 , σ is the standard deviation of the data sequence.
x[τ] represents the data point at time τ. k and c are constant parameters.
To eliminate the problem of slow calculation and calculation redundancy in the state of big data, the parameters and thresholds are extracted on the basis of temporal logic, and the data are processed through cycle segmentation and cycle merge. The specific process of the CTA is shown in Figure 1. the process differences. Each principal component is a linear combination of all the variables. The data are cyclically segmented and merged, which reduces the amount of calculation, increases the calculation speed, and eliminates the redundancy generated by the calculation of the large data matrix. The temporal logic equation is summarised and defined as follows: [ , ] ⊣ | ∧ | [ , ] , where Τ is 'always true', 'negation' (⊣), and 'combination' (∧), which are standard Boolean join operators. The time series operators ̅ [ , ] , [ , ] , and [ , ] represent the derived 'always', the derived 'final', and the derived 'until', and To eliminate the problem of slow calculation and calculation redundancy in the state of big data, the parameters and thresholds are extracted on the basis of temporal logic, and the data are processed through cycle segmentation and cycle merge. The specific process of the CTA is shown in Figure 1. The CTA process is divided into a cycle segmentation process and a cycle merge process. For the cycle segmentation process, according to the entire data sequence = 〈 , , … 〉, = 1 is set as the data segment start, the segment start point and the end point are set, and a linear fitting is performed on the segment. The fitting equation is ( [ ] = + ), where and represent the slope and the y-axis intercept, respectively. If the linear fitting error is greater than the extracted threshold , the sequence is halved. The linear fitting of the first half of the sequence is repeated until the linear fitting error is not greater than the predetermined error threshold . First, it is determined whether the end of the segment reaches the end point, and then, it is determined whether the data are divided into segments. The linear fitting calculation is expressed in Equation (12). The CTA process is divided into a cycle segmentation process and a cycle merge process. For the cycle segmentation process, according to the entire data sequence x = x 1 , x 2 , . . . x n , L = 1 is set as the data segment start, the segment start point b L and the end point e L are set, and a linear fitting is performed on the segment. The fitting equation is (x[τ] = k L τ + c L ), where k L and c L represent the slope and the y-axis intercept, respectively. If the linear fitting error err is greater than the extracted threshold δ e , the sequence x is halved. The linear fitting of the first half of the sequence is repeated until the linear fitting error is not greater than the predetermined error threshold δ e . First, it is determined whether the end of the segment reaches the end point, and then, it is determined whether the data are divided into L segments. The linear fitting calculation is expressed in Equation (12).
For the cycle merge process, the obtained L segment data sequence is used as the input into the cycle merge process. First, the data segment is counted by i = 2, and the multi-segment data are linearly fitted. Contrary to the cycle segmentation part, when the linear fitting error err is less than the threshold δ e , merge the i−th sequence with the i − 1th sequence, then subtract 1 in segments, and merge in turn until the linear fitting error is greater than the threshold δ e . It is judged whether i is greater than L, and if it is, the merge ends.
Based on the above segmented fitting method, cycle segmentation and cycle merge are performed for a given data sequence. A sequence of quaternions of degree L can be obtained.
, k i and c i are the slope and y-axis intercept of the i-th segment of linear fitting, respectively. The integers b i and e i represent the start and end times of the data segment, respectively, and the corresponding atomic predicate is expressed in Equation (14).
Based on the above, the temporal logic equation is reconstructed as: Among them, if i ∈ [1, L − 1], then ϕ i u i . Eventually, the CTA is formed. The CTA combines the temporal logic to define the principle of the segmented cycle and determines the size of the cycle, the error threshold, and the final segment starting point and end point. The cycle segmentation of the model data is completed to reduce the dimensionality of the matrix, improving the calculation accuracy and eliminating the calculation redundancy.

RBC Graph
The numerical method of the RBC graph is used to identify the variable contribution rate.
Fault variable reconstruction is used to realise the accurate identification and separation of process and sensor faults by eliminating the influence of observed variables in the fault subspace.
When the system detects a fault f i , the observation vector is . . , m, and m represent the number of process variable observations. The sampling time is omitted here, but the nature of the problem is not changed. If the process vector is reconstructed along the ζ T i direction, the corresponding relationship is where z i represents the original value of the process view vector that is not affected by the fault, and Φ is defined as a positive definite symmetric matrix. Then, the joint index index 2 (z i ) for process monitoring can be obtained: When the reconstruction vector z i is infinitely close to or equal to the original value of the observation vector during the normal operation of the process, the joint index in the above equation reaches the minimum, indicating that this is the optimal reconstruction. Therefore, according to Equation (17), the first derivative of the fault parameter is calculated and set to be equal to 0, so that the optimal fault parameter is From Equations (17) and (18), it can be deduced that the reconstruction contribution of the variable x i to the joint index is Substituting the relationship Φ = LΛL T into the above equation to restore, the reconstruction contribution of the variable x i to the joint index is obtained as: where LΛL T i represents the i-th diagonal component of matrix LΛL T .

Integrated Fault Diagnosis Framework
Modern chemical process faults are mainly divided into process faults and sensor faults. Process faults are caused by large deviations in the system, and they are real faults in the system. Sensor faults are caused by sensor faults of the detection system, and the data are falsely indicated. The system remains normal. Therefore, a process fault is a multi-variable coordination, and a sensor fault is a false indication of a single measured variable. To further distinguish the types of faults when faults occur, this paper proposes an integrated fault diagnosis framework to distinguish the two types of faults in detail. The integrated fault diagnosis framework is shown in Figure 2. From Equations (17) and (18), it can be deduced that the reconstruction contribution of the variable to the joint index is Substituting the relationship = into the above equation to restore, the reconstruction contribution of the variable to the joint index is obtained as: where ( ) represents the -th diagonal component of matrix .

Integrated Fault Diagnosis Framework
Modern chemical process faults are mainly divided into process faults and sensor faults. Process faults are caused by large deviations in the system, and they are real faults in the system. Sensor faults are caused by sensor faults of the detection system, and the data are falsely indicated. The system remains normal. Therefore, a process fault is a multi-variable coordination, and a sensor fault is a false indication of a single measured variable. To further distinguish the types of faults when faults occur, this paper proposes an integrated fault diagnosis framework to distinguish the two types of faults in detail. The integrated fault diagnosis framework is shown in Figure 2. The integrated fault diagnosis framework for process and sensor faults is mainly composed of two parts: fault detection and fault identification. Through the fault detection step, various faults in the system are accurately and rapidly detected. Fault identification involves identifying specific fault variables by reconstructing the variable diagram method for the detected fault and distinguishing the fault types by using the process and  The integrated fault diagnosis framework for process and sensor faults is mainly composed of two parts: fault detection and fault identification. Through the fault detection step, various faults in the system are accurately and rapidly detected. Fault identification involves identifying specific fault variables by reconstructing the variable diagram method for the detected fault and distinguishing the fault types by using the process and sensor fault characteristics.

Fault Detection
The fault detection part of the integrated fault diagnosis framework combines the CTA and DKPCA models. Using the cycle segmentation and cycle merge characteristics of the CTA model, the detected data are finely divided and calculated, which minimises a series of external influences such as noise, and the segmented calculation also speeds up the detection speed and accuracy. The fault information is saved to the greatest extent. The framework detects system faults timely and effectively.
First, the detailed process of cycle segmentation is shown in Figure 3. the detection speed and accuracy. The fault information is saved to the greatest extent. The framework detects system faults timely and effectively. First, the detailed process of cycle segmentation is shown in Figure 3. (1) For the process data set, first define a segment as the first segment, that is, = 1.
(2) Extract the optimal threshold from the temporal logic equation for the first segment of the process data set that has been determined, and define the start time and end time of the segment. (3) Perform piecewise data fitting for segment = 1. The fitting equation is shown in Equation (10). Calculate the linear piecewise fitting error , and determine whether the linear fitting error reaches the threshold . If is less than , the segmentation stops and the current segment number is the optimal number of segments. If is greater than , go to step 4.
(4) Divide the data that do not meet the threshold requirement, = + 1, define the segment end time = /2 for the new data segment, and repeat step 3 for linear fitting.
Cycle segmentation calculates the linear fitting error , until is less than the threshold , and enters the next judgment.
(5) Judge in the data segment that reaches the threshold whether the end point of the current segment reaches the end point of the initial process data; if not, reset the start = − 1 and end points = of the unsegmented part, and enter again the step 3 of the cycle segmentation part. When the end point is reached, the cycle segmentation process ends. After obtaining the best segmentation data of the segment, the segmentation data are used as the input into the DKPCA fault detection model. The fault detection process (1) For the process data set, first define a segment as the first segment, that is, L = 1.
(2) Extract the optimal threshold δ e from the temporal logic equation for the first segment of the process data set that has been determined, and define the start time b 1 and end time e 1 of the segment.
(3) Perform piecewise data fitting for segment L = 1. The fitting equation is shown in Equation (10). Calculate the linear piecewise fitting error err, and determine whether the linear fitting error reaches the threshold δ e . If err is less than δ e , the segmentation stops and the current segment number is the optimal number of segments. If err is greater than δ e , go to step 4.
(4) Divide the data that do not meet the threshold requirement, L = L + 1, define the segment end time e L = e L /2 for the new data segment, and repeat step 3 for linear fitting. Cycle segmentation calculates the linear fitting error err, until err is less than the threshold δ e , and enters the next judgment.
(5) Judge in the data segment that reaches the threshold δ e whether the end point of the current segment reaches the end n point of the initial process data; if not, reset the start b L = e L − 1 and end points e L = n of the unsegmented part, and enter again the step 3 of the cycle segmentation part. When the end point is reached, the cycle segmentation process ends.
After obtaining the best segmentation data of the L segment, the segmentation data are used as the input into the DKPCA fault detection model. The fault detection process is shown in Figure 4.  The DKPCA model calculation is divided into offline modelling process and online detection process.
Offline modelling process: (1) The offline modelling part collects the normal segmentation data set , sets the superposition time and the previous time of each data set, and obtains the dynamic augmentation matrix , .
(3) Calculate the piecewise kernel matrix K, where the kernel function is selected as the Gaussian kernel function = exp (−‖ − ‖ /2 ).
(4) Calculate the number of principal spaces and the number of residual subspaces according to the cumulative percentage of variance (CPV) method. The equation for calculating the cumulative variance percentage is as follows: where is the characteristic value of covariance, is the number of variables, and is the number of principal components.
(5) Calculate the standard control limit of the no-fault condition , , , , as shown in Equations (22) and (23), and enter step 5 of online detection after the calculation is completed.
, , , , where and respectively represent the mean and variance based on , . The DKPCA model calculation is divided into offline modelling process and online detection process.
Offline modelling process: (1) The offline modelling part collects the normal segmentation data set X i , sets the superposition time t and the previous time s of each data set, and obtains the dynamic augmentation matrix X s,i .
(3) Calculate the piecewise kernel matrix K, where the kernel function is selected as the Gaussian kernel function K = exp − x − y 2 /2σ 2 .
(4) Calculate the number of principal spaces and the number of residual subspaces according to the cumulative percentage of variance (CPV) method. The equation for calculating the cumulative variance percentage is as follows: where λ is the characteristic value of covariance, J is the number of variables, and N is the number of principal components.
(5) Calculate the standard control limit of the no-fault condition SPE i,lim , T 2 i,lim , as shown in Equations (22) and (23), and enter step 5 of online detection after the calculation is completed.
where v i and m 2 i respectively represent the mean and variance based on X s,i . Online detection process: (1) Enter the new process data set X i,new that needs to be detected. In the same way as step 1 of the offline stage, set the vector of the superimposition time t and the previous time s to obtain the dynamic augmentation matrix X s,i,new .
(2) The obtained dynamic augmentation matrix is used to centralise the feature vector.
(3) Calculate the new kernel matrix K new by segmenting the centralised data. The kernel function used is consistent with the offline phase, which is a Gaussian kernel function.
(4) Calculate the number of principal spaces using the CPV method.   (24) and (25). Verify whether T 2 s,i or SPE s,i statistics exceed the control limit T 2 s,i,lim , SPE s,i,lim . If they exceed the control limit, it indicates that the system has a fault condition, and then enter the fault identification stage. Otherwise, it is determined to be normal, and return to step 1 to continue testing another new set of process data.
where Λ i = T i n T T i n /(N n − 1), andP i (J i × l i ) and T i n (N n × l i ) are the load matrix and score matrix of the i-th DKPCA model, respectively. I J i (J i × J i ) is the unit matrix. In addition, let the column vector z(J × 1) represent the current observation data point and divide z them into the corresponding L blocks based on the L variable block in the previous section, which is z i J i × 1 (i = 1, 2, . . . , L).
After detecting the fault of the segmented data, the segmented data are used as the input into the cycle merge process for merging, so as to determine the confirmation of the fault of the entire process.
The detailed process of cycle merge is shown in Figure 5.
(1) The L segment T 2 i and SPE i statistics obtained after the DKPCA model calculation part is completed are used as the input into the cycle merging stage.
(2) Set i = 2, merge according to the reverse step of cycle segmentation, perform linear fitting on the first two segments, calculate the linear fitting error err, and determine whether the linear fitting error reaches the obtained threshold δ e .
(3) If err is greater than the threshold δ e , go to step 4. If the threshold δ e is greater than err, merge the i−th and i − 1th segments, and the total length of the data segment at this time is L − 1. Return to the stage of step 2 to merge, the merged data and the next segment data are reset to the first and second segments, and the merge is repeated.
(4) When err is greater than the threshold δ e , it is judged whether the number of merged data segments L is less than i. If it is smaller than i, the cycle ends, and the final merged data segment is obtained. If L is greater than i, then continue to merge until L is greater than i. The cycle merge ends. dition, let the column vector ( × 1) represent the current observation data point and divide them into the corresponding blocks based on the variable block in the previous section, which is ( × 1)( = 1,2, … , ).
After detecting the fault of the segmented data, the segmented data are used as the input into the cycle merge process for merging, so as to determine the confirmation of the fault of the entire process.
The detailed process of cycle merge is shown in Figure 5.  After completing the cycle merge process, the fault detection part of the integrated fault diagnosis model is completed, and the two statistics T 2 s,i and SPE s,i detected are determined. If T 2 s,i and SPE s,i exceed the calculated control limits T 2 s,i,lim and SPE s,i,lim , the system is considered to be faulty, and the fault identification part of the next part is further analysed.

Fault Identification
After the fault detection part of the integrated fault diagnosis model is completed, the fault variables in the process are identified. In this study, the RBC model is used to reconstruct and identify the fault variables, and finally, the process and sensor faults are distinguished in detail.
The fault identification process is shown in Figure 6.
(1) When the system detects a fault, it is used as the input to the fault identification part. The fault variable is first reconstructed using the principle of variable reconstruction, and the reconstruction index index 2 (z i ) is calculated.
(2) Optimise the fault parameter f i to capture most of the fault information.
(3) Calculate the contribution rate of variable reconstruction and calculate the percentage of the current variable contribution rate according to the multivariate statistical method. The final contribution percentage of the reconstruction variables is obtained.
According to the obtained variable reconstruction percentage, the current fault is distinguished as a process or sensor fault in detail. Process faults are generated internally by the system. They arise from a state deviation of the system control variables, which then spreads to other measured variables, and finally leads to faults. A sensor fault refers to the fault of the sensor of a measured variable, which causes false indications of the data, but the system itself does not fail. However, the operator mistakenly believes that the variable has a fault and adjusts the variable setting value, which will cause the system to fail and eventually evolve into a process fault. Therefore, it can be observed that the sensor fault is a single-variable data offset, whereas the process fault is a multi-variable coordination.

Fault Identification
After the fault detection part of the integrated fault diagnosis model is completed, the fault variables in the process are identified. In this study, the RBC model is used to reconstruct and identify the fault variables, and finally, the process and sensor faults are distinguished in detail.
The fault identification process is shown in Figure 6. (1) When the system detects a fault, it is used as the input to the fault identification part. The fault variable is first reconstructed using the principle of variable reconstruction, and the reconstruction index ( ) is calculated.
(2) Optimise the fault parameter to capture most of the fault information. When reconstructing the contribution graph model to determine the fault variables, the possible fault variables are judged: The RBC graph shows that a single variable exceeds the average fault contribution rate. Go to Step 2 for further judgment. If the RBC graph shows that multiple measured variables and a single control variable exceed the average fault contribution rate, it can be determined as a process fault. The corresponding control variable is the root cause of the fault.
For a situation that shows that a single variable has a fault, it is necessary to determine whether the variable is a controlled variable or a measured variable. If the fault variable is a controlled variable, it is determined that the fault is a process fault caused by a single controlled variable. If the fault variable is a measured variable, it is determined that the fault is a fault in the sensor where the variable is located, that is, a false indication of sensor data.
Based on the above detailed fault judgments, the integrated fault diagnosis model for chemical process sensors and process faults can distinguish the process or sensor faults that have occurred, even on the basis of detecting and identifying faults. It provides a technical basis for subsequent operations and helps prevent subsequent faults caused by maloperation.

Tennessee Eastman Process
The TE process was created by Downs and Vogel in 1993 [37] and is widely cited as a benchmark for studies in control and fault diagnosis. The flow chart of the TE process is presented in Figure 7.

Fault Number
Description Type

01
A/C feed ratio, B composition constant (Stream4) Step 02 B composition, A/C ratio constant (Stream4) Step 03 D feed temperature (Stream2) Step 04 Reactor cooling water inlet temperature Step 05 Condenser cooling water inlet temperature Step 06 A feed loss (Stream1) Step 07 C header pressure loss-reduced availability (Stream4) Step 08 A, B, C feed composition (Stream4) Random 09 D feed temperature (Stream2) Random 10 C feed temperature (Stream4) Random 11 Reactor cooling water inlet temperature Random 12 Condenser cooling water inlet temperature Random 13 Reaction kinetics Slow drift 14 Reactor cooling water valve Sticking 15 Condenser cooling water valve Sticking

16-20
Unknown Unknown 21 Valve position constant (Stream 4) Constant position For the TE process data, several different faults are set to distinguish the process and sensor faults. Before fault diagnosis, the basic parameters of the DKPCA model are set. The number of main components is determined by the standard that the CPV > 85% determine. The kernel width of the radial basis function was set to 800, and the confidence level was set to 95%.
Before distinguishing sensor and process faults, the advantages of the proposed model in fault detection are expressed. The number of principal components obtained by the DKPCA method is 28 for 52 variables of TE process, and the number of principal components obtained by proposed model is 26. It can be seen that the principal component obtained by proposed model includes more effective information, while there is invalid The TE process includes 41 measurement variables and 11 manipulation variables. There is a strong correlation between 11 manipulation variables and their related measurement variables, while the correlation between measurement variables is relatively weak. Therefore, this process can be used as the basic process to study the correlation between variables. It includes a normal state and 21 fault states. Each state contains the training data and test data. Among them, there are 960 test data. The fault is introduced in the 160th sample. There are 21 faults in the TE process, of which 16 are known, and the remaining 5 are unknown. Fault modes 1-7 are caused by abnormal steps of some process variables, faults 8-12 are caused by random changes in some process variables; fault 13 is due to changes in reaction dynamics; and faults 14, 15, and 21 are caused by the valve being fixed in a specific position. The 21 faults are listed in Table 1.
For the TE process data, several different faults are set to distinguish the process and sensor faults. Before fault diagnosis, the basic parameters of the DKPCA model are set. The number of main components is determined by the standard that the CPV > 85% determine. The kernel width of the radial basis function was set to 800, and the confidence level was set to 95%.
Before distinguishing sensor and process faults, the advantages of the proposed model in fault detection are expressed. The number of principal components obtained by the DKPCA method is 28 for 52 variables of TE process, and the number of principal components obtained by proposed model is 26. It can be seen that the principal component obtained by proposed model includes more effective information, while there is invalid information in the principal component obtained by DKPCA method. The proposed model is more accurate in information acquisition.
In order to further quantify the accuracy and low detection delay of the proposed model, we measure its monitoring performance by fault detection rate (FDR) and time delay (TD). The Equations of FDR and TD are as follows: where t d is the fault detection time, and t 0 is the fault occurrent time. Step 02 B composition, A/C ratio constant (Stream4) Step 03 D feed temperature (Stream2) Step 04 Reactor cooling water inlet temperature Step 05 Condenser cooling water inlet temperature Step 06 A feed loss (Stream1) Step 07 C header pressure loss-reduced availability (Stream4) Step 08 A, B, C feed composition (Stream4) Random 09 D feed temperature (Stream2) Random 10 C feed temperature (Stream4) Random 11 Reactor cooling water inlet temperature Random 12 Condenser cooling water inlet temperature Random 13 Reaction kinetics Slow drift 14 Reactor cooling water valve Sticking 15 Condenser cooling water valve Sticking 16-20 Unknown Unknown 21 Valve position constant (Stream 4) Constant position The comparison results of FDR and TD statistics between CTA-DKPCA method and other methods are shown in Table 2   Table 2. Comparison of the FDR and TD of KPCA, 2-CLASS SVM [34], and the methods of this study in the TE process ((A) KPCA method, (B) 2-CLASS SVM method [38], (C) This study). The results of TE process fault detection show that the proposed model improves the accuracy of fault detection and the delay of fault detection. After proving the advantages of the model for fault detection, the proposed integrated fault diagnosis framework is used to divide the possible faults in industry in detail.
This study sets four different types of fault situations to distinguish these faults as process faults or sensor faults. The selection and setting of the cases are listed in Table 3. Large-scale jitter of process data Variable 8, data points 150-250, 400-550, and 700-850: set jitter up by 50% 3 Single variable data step Variable 3, set a step fault at data point 300 4 Actual fault TE process fault 1 The first case introduces a drift fault with a drift ratio of 0.1325 at the 0 data point of variable 1: material A flow. The second case is in variable 8: in the ranges of 150-250, 400-550, and 700-850, the reactor liquid level is increased by 50%. The third case is the fault to introduce the data step at the 300th data point of the variable 3: E logistics flow. The last case is TE process simulation fault 1. Use the integrated fault diagnosis framework to diagnose the above 4 types of faults. The result of the integrated fault diagnosis is shown in Figure 5. The T 2 statistic represents the macro situation of the system, that is, when there is a fault, the system can reflect the observable fault. SPE statistics represent the deviation from the normal situation in the system, that is, when the deviation occurs in the system, the normal error situation will be displayed in SPE statistics. So we can see that for the detection sensitivity of the residual subspace, the residual subspace represented by the SPE statistic is higher than the principal subspace represented by T 2 statistic. For the contribution rate of the two subspaces, the principal component space shows the macro fault condition of the system itself, and the residual subspace shows the error of the system, so the T 2 contribution rate is less than the SPE contribution rate. The error variable is observed through the SPE contribution rate, and then the T 2 contribution rate is determined as the main macro fault variable of the system.
According to the integrated fault diagnosis framework, we can obtain the synergetic characteristics of the process fault accompanying variables. The variables of sensor fault are independent of each other. The process fault caused by the fault of the control variable causes the related measurement variables to fail together. Owing to the false indication of the sensor data, the sensor fault has no transferability between the sensors, and the system remains normal.
When the drift fault ratio of case 1 is set to be small, the sensor monitoring has slow data drift, and it is determined that a fault has occurred when the tolerance limit of the sensor is reached. Therefore, it takes longer to detect the system fault with the principal component space T 2 statistic than with the residual subspace SPE statistic to detect the error in the system. From Figure 8e, it can be judged that only when variable 1 exceeds the average fault contribution of the 52 variables, and variable 1 is a measured variable, it is determined that case 1 is a sensor fault with unreliable sensor data based on the fault diagnosis result.
For case 2, the set system fluctuates. The integrated fault diagnosis result shows that the T 2 statistic does not exceed the limit, the principal component space has no fault, and the residual subspace represented by SPE detects the fault in the fluctuation interval. Therefore, it shows that there is an error in the system. The fault identification result also shows that only variable 8 exceeds the control limit, and variable 8 is a measured variable. Therefore, it can be determined that case 2 is a false indication of data fluctuation of the sensor where variable 8 is located. The system remains normal.
Case 3 is a step fault, which is an instantaneous fault, and a single variable in the system is instantly amplified. The existence of a step fault can be detected immediately, and the fault identification result shows that the variable 3 single variable exceeds the limit. Other variables are normal. Thus, it is determined that the sensor where variable 3 is located has a transient fault, which generates the false indication of the data. detection sensitivity of the residual subspace, the residual subspace represented by the SPE statistic is higher than the principal subspace represented by statistic. For the contribution rate of the two subspaces, the principal component space shows the macro fault condition of the system itself, and the residual subspace shows the error of the system, so the contribution rate is less than the SPE contribution rate. The error variable is observed through the SPE contribution rate, and then the contribution rate is determined as the main macro fault variable of the system. According to the integrated fault diagnosis framework, we can obtain the synergetic characteristics of the process fault accompanying variables. The variables of sensor fault are independent of each other. The process fault caused by the fault of the control variable causes the related measurement variables to fail together. Owing to the false indication of the sensor data, the sensor fault has no transferability between the sensors, and the system remains normal. In addition to distinguishing the fault types of the system, the accuracy and speed of fault detection is also an important part of the fault diagnosis framework. Therefore, this study compares the FDR and TD of the four cases of the TE process with other PCAderived algorithms. The results are presented in Table 4. The comparison results show that the fault detection method combined with CTA and DKPCA is far superior to other PCA algorithms in terms of FDR and TD. In terms of time delay, the fault detection algorithm proposed in this paper can detect faults faster than other algorithms. The average fault diagnosis rate and time delay are 92.6% and 8.25 s.
The results show that the integrated fault diagnosis framework proposed in this paper can clearly distinguish between process faults and sensor faults. The fault detection part has excellent performance in FDR and TD. Therefore, when a fault occurs, the operator can respond in time and guide the follow-up operation according to the fault identification part.

Case Study of an Acid Gas Absorption Process from Natural Gas
Methyldiethanolamine (MDEA) is often used as an absorbent in chemical processes to absorb acid gases. A flowchart of the typical absorption process is shown in Figure 9.

Case Number
Fault Situation Description Stream 111 is the absorbent MDEA. It first exchanges heat with cooling water at room temperature through the heat exchanger E-105 and is then cooled to 21 • C, and then enters the absorption tower C-101 from the top. The raw material gas stream 102 enters the absorption tower C-101 from the bottom, flows counter currently with the absorbent MDEA, and absorbs acid gases (H 2 S and CO 2 ) from the natural gas. The overhead gas of the absorption tower C-101 is natural gas containing a large amount of moisture, and then it enters the downstream dehydration system for further dehydration and purification to meet the national natural gas standards. The bottom product of the absorption tower C-101 is rich amine liquid containing acid gas. After heat exchange, the rich amine liquid enters the regeneration tower to resolve acid gas and regenerate the absorbent. According to the Piping and Instrument Diagram (P&ID) chart, the following variables: V1: absorbent MDEA volume flow rate, V2: absorption tower absorbent feed temperature, V3: absorption tower top pressure, V4: Natural gas feed flow, V5: Bottom liquid level height of absorption tower.
Three types of faults are set in the acid gas absorption process, including drift, stuck, and actual fault. The integrated fault diagnosis framework is used to distinguish the three types of faults in detail. Examples of the fault cases are listed in Table 5. An acid gas absorption process is provided for the three different faults. In case 1, a graded drift of the gas flow rate is monitored at the sampling point 250. In case 2, the top pressure of the absorption tower is monitored and a stuck fault is set at the sampling point 250. In case 3, an actual fault is simulated by HYSYS, that is, the temperature of the heat exchanger inlet rises to 30 • C. The integrated fault diagnosis framework is used to detect and identify the three faults, and then distinguish the fault type as a process fault or a sensor fault. The fault diagnosis results are shown in Figure 7.
The diagnosis results for the acid gas absorption process can be obtained. For case 1, because the sensor sensitivity of the actual chemical process and the simulation process are different, the data drift of the actual process will be rapidly detected as the fault occurs, as shown in Figure 10d. The fault identification results show that variable 4 exceeds the average fault contribution rate of 20%, other variables are in a normal state, and variable 4 is the measurement variable of the condenser outlet temperature. Thus, case 1 is a sensor fault.
The actual chemical process often has a sudden stuck. The stuck is also an instantaneous fault; therefore, it will be detected instantaneously. The result of the fault variable also shows that the measured variable 3, absorption tower pressure, exceeds the average contribution rate, and other variables are normal. Hence, it is determined that case 2 is also a sensor fault.
For case 3, we introduced an actual fault of the acid gas absorption process and used the integrated fault diagnosis framework to detect and identify the fault. The detection results show that the fault can be accurately detected. The fault identification result shows that variables 1, 2, and 3 all exceed the control limit, indicating that the system has an offset condition. Therefore, it is determined that case 3 is a process fault.
In the acid gas absorption process, to determine the advantages of the proposed fault detection method in the actual chemical process, the two statistics of FDR and TD are compared with the PCA and its derivative algorithms. The comparison results are presented in Table 6. The actual chemical process often has a sudden stuck. The stuck is also an instantaneous fault; therefore, it will be detected instantaneously. The result of the fault variable also shows that the measured variable 3, absorption tower pressure, exceeds the average contribution rate, and other variables are normal. Hence, it is determined that case 2 is also a sensor fault.
For case 3, we introduced an actual fault of the acid gas absorption process and used the integrated fault diagnosis framework to detect and identify the fault. The detection results show that the fault can be accurately detected. The fault identification result shows that variables 1, 2, and 3 all exceed the control limit, indicating that the system has an offset condition. Therefore, it is determined that case 3 is a process fault.
In the acid gas absorption process, to determine the advantages of the proposed fault detection method in the actual chemical process, the two statistics of FDR and TD are compared with the PCA and its derivative algorithms. The comparison results are presented in Table 6.   The comparison results of various fault detection methods in the acid gas absorption case show that for actual chemical process faults, the fault detection part of the fault diagnosis framework proposed in this paper is far superior than the other algorithms in terms of fault diagnosis accuracy and speed. The FDR reached 99.73%. In cases 2 and 3 TD is 0, and the mean TD is 0.67 s, which proves that the proposed method has the best timeliness for fault detection.
Based on the above fault diagnosis results, it is shown that the CTA proposed in this paper optimises the speed and accuracy of fault detection and detects fault occurrence data points in time. The fault identification part based on the RBC graph can distinguish the chemical process sensor faults and process faults in detail. The group forms an integrated fault diagnosis framework suitable for modern chemical processes.

Conclusions
The distinction between sensor and process faults has always been an important part of chemical process fault diagnosis. This paper proposes an integrated fault diagnosis model that can effectively distinguish between sensor faults and process faults in modern chemical processes. First, a CTA is proposed to improve the calculation speed and accuracy of the model. The proposed algorithm is combined with the DKPCA for fault detection, and it is then combined with the RBC graph model to diagnose fault variables and comprehensively judge the process and sensor faults.
This study used a CTA combined with a DKPCA fault detection model to detect 18 faults in the TE process and verified its advantages in fault detection. Then, we selected four common fault types in the chemical process, including data drift, jitter, step, and actual fault. The fault detection model and the RBC fault diagnosis model were combined to distinguish the four types of faults as process faults or sensor faults in detail. Finally, based on variable correlation and fault transfer characteristics, the data drift, jitter, and step faults were determined as sensor faults, whereas the actual simulated fault was identified as process fault.
Finally, the integrated fault diagnosis model was applied to the acid gas absorption process to verify the effectiveness of the model in an actual chemical process. For the acid gas absorption process, three types of faults, namely, data drift, stuck, and actual faults, were selected to distinguish the fault types through the integrated fault diagnosis model. The results showed that data drift and sticking were sensor faults, and the actual fault was determined as the process fault. Based on the above results, this fault classification framework provides a strong foundation for the safety of chemical processes and ideas for follow-up research on chemical process fault diagnosis.