# Fault Diagnosis Method and Application of ESP Well Based on SPC Rules and Real-Time Data Fusion

Authors: Junzheng Yang; Song Wang; Chunfeng Zheng; Gang Feng; Guanghao Du; Chaodong Tan; Dan Ma
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Aiming at the popularization and application of a real-time monitoring parameter acquisition system of the electric submersible pump (ESP) well, this paper proposes a fault diagnosis method of ESP well operation based on the SPC rule and prior knowledge fusion. Based on the study of parameter variation rules of ESP well, the SPC expansion rule model is established; by analyzing the variation of some typical characteristic parameters of ESP well, combined with SPC expansion rules and expert experience, a priori knowledge of fault diagnosis of ESP well is formed, that is, multiparameter fault analysis table and weight factor; the SPC extended rule model and prior knowledge are fused to establish the fault probability model of ESP well, form the fault diagnosis method of ESP well, develop the online fault diagnosis software of ESP well, and deploy it in 425 ESP wells in a block. Taking five types of tubing leakage, pump wear, shaft breakage, gas influence, and pump plugging as examples, the application process of fault diagnosis method is analyzed. The research and application show that compared with other fault diagnosis methods, this method needs a smaller time window and higher diagnosis accuracy. By setting multiple time windows, this diagnosis method is applied to calculate the fault probability of ESP well in real time, solve the real time and accurate identification of 14 sudden faults and gradual faults, and significantly improve the intelligent diagnosis level of production faults of ESP well.


---

## Body

## 1. Introduction

Artificial lift is used in 95% of oil wells worldwide. Among them, there are about 130,000 ESP lifting wells, second only to pumping unit rod pump wells. ESP oil wells lift the most liquid volume, and their annual crude oil output accounts for about 60% of the world’s total oil volume, and ESP accounts for 43% of the global annual artificial lifting costs [1, 2]. The performance and service life of ESP in service in oilfields are affected by many problems, such as complex wellbore, high temperature, high pressure, high viscosity fluids, high gas-liquid ratio fluids, sand production, and waxing, which lead to shaft breakage in ESP well, tubing leakage, pump plugging, pump wear, gas influence, pump reverse, and tubing plugged. The fault of the ESP not only increases the maintenance cost of the oil well inspection pump operation but also indirectly affects the oil well production due to factors such as the shutdown of the operation and the reduction in the recovery period after the operation, and the loss of economic benefits increases. In order to ensure the smooth operation of ESP well, it is necessary to select a scientific and reasonable method for early fault diagnosis of ESP well.At present, the fault diagnosis methods of ESP wells are divided into single-parameter diagnosis and multiparameter diagnosis. Among them, single-parameter diagnosis refers to monitoring the change law of a single parameter for fault diagnosis, mainly including the current card diagnosis method and holding pressure diagnosis method. The current card method was first proposed by Powers [3]. The paper analyzes the reasons for the formation of the typical characteristics of the current card in detail and provides a theoretical basis for the fault diagnosis of the current card. Initially, engineers and managers used manual identification of current cards to diagnose the faults of ESP wells, but the real time and accuracy were poor [4]. With the continuous development of neural networks, a large number of experts and scholars have begun to study the use of neural networks for current card recognition [5, 6]. It avoids the different interpretation results of the same ammeter card due to differences in personal knowledge and experience during manual identification. The pressure holding diagnosis method is based on the pressure holding by quickly closing the wellhead back pressure valve under the normal operation and shutdown state of the ESP well, recording the relationship between the wellhead tubing pressure and time during the entire holding pressure process, and drawing the holding pressure curve. And then, the fault of the ESP is analyzed according to the form and characteristic value reflected by the curve. For example, Zheng et al. [7] conducted a theoretical analysis of the relationship between the holding pressure value and time of the ESP well based on the working principle of the ESP and the theory of seepage mechanics, established a mathematical model of the holding pressure curve of ESP wells, and drawn typical holding pressure characteristic curves under different working conditions. Gu et al. [8] established the theoretical pressure holding curve model by analyzing the gas-liquid flow state in the wellbore before holding pressure, combined the characteristic curve of the ESP and the inflow performance curve of the oil well, and determined the extraction method of the characteristic parameters of the curve. Judge the fault type by comparing it with the characteristic parameters of the actual pressure holding curve. Single-parameter diagnosis only uses one parameter of pressure or current, which can diagnose fewer types of faults, and the accuracy of the diagnosis results is poor.Multiparameter diagnosis refers to the simultaneous monitoring of the changing laws of multiple parameters to perform fault diagnosis together. In recent years, with the widespread application of the Internet of Things in oilfields, more and more real-time data from wellhead and downhole of ESP wells can be collected on the oilfield site, providing a data basis for the multiparameter diagnosis of ESP. Multiparameter diagnosis mainly includes threshold diagnosis method, comprehensive parameter diagnosis method, and expert system diagnosis method. The threshold diagnosis method is to diagnose the fault by setting the variation range of multiple parameters under different fault conditions and judging whether the variation range of the parameter exceeds the set threshold. There are two common threshold diagnosis methods: direct threshold method, which sets different thresholds for production parameters [9]; the indirect threshold method extracts the characteristic values of production parameters and sets different thresholds for them, such as expected value, average value, variance, and other characteristics [10-11]. The comprehensive parameter diagnosis method uses artificial intelligence algorithms to analyze multiple real-time monitoring parameters and obtain the diagnosis results. For example, Al-Jasmi et al. and Bermudez et al. [12, 13] established fault diagnosis models for ESP wells based on fuzzy logic algorithms, fault trend tables, and weighting factors. They realized the diagnosis of five types of faults for ESP wells. Patri et al. [14] used the time series shapelets method to analyze the shape changes of the collected historical data according to the pump intake pressure, current value, and voltage value measured by the multisensor measurement of the ESP well and judge whether a fault occurred. Barrios et al. [15] selected pump intake pressure, pump discharge pressure, flow, torque, pump intake temperature, and pump discharge temperature as characteristic values and used two decision tree classification algorithms to establish a fault diagnosis model. Diagnose the fault of oil nozzle closure, pump intake pressure increase, fluid viscosity increase, and gas influence during the operation of the multistage centrifugal pump. The expert system is an intelligent computer program system that contains a large amount of knowledge and experience at the level of experts in a certain field; that is, it can use the knowledge and expert experience of the oil and gas industry to deal with complex problems in the field of artificial lift fault diagnosis [16]. There are some expert systems for fault diagnosis of ESP, such as the ForeSite system of Weatherford, Schlumberger’s Avocet system, and Halliburton’s Voice of the Oilfield™ system, and an ESP fuzzy expert diagnosis system based on membership functions and fuzzy rules developed by Grassian et al. [17]. Although multiparameter diagnosis improves the accuracy of diagnosis, there are still some problems: the threshold diagnosis method is difficult to set a unified threshold for different faults to satisfy all oil wells in the same oil field. In addition, the thresholds of production parameters under different faults are different in different production stages of the same oil well; the comprehensive parameter diagnosis method can diagnose fewer types of faults; the expert system diagnosis method lacks self-learning ability for knowledge and examples, and it is difficult to realize the effective update iteration of the diagnosis model [18].Statistical process control (SPC) technology refers to the analysis and real-time monitoring of products based on statistical analysis technology and control chart, early warning of abnormal trends in the production process, and scientifically distinguishing the change trend of real-time operation parameters [19]. In recent years, with the continuous rise of intersection, integration, and penetration between different disciplines [20], SPC technology has been gradually applied to fault diagnosis in the oil and gas industry. Mejía and Gutiérrez [21] proposed an architecture of online monitoring, acquisition, transmission, storage, and data processing based on SPC technology, which can detect and diagnose the ESP lift well in real time and accurately. Zheng et al. [22] carried out the research on the production fault diagnosis technology of water injection wells based on SPC rules and real-time data fusion. Based on the established SPC expansion rules, multiparameter rule fault chart, and weight factor table, the fault diagnosis model of water injection wells was established, and the real time and accurate diagnosis of 13 working conditions of water injection wells were realized. To sum up, the fault diagnosis based on SPC technology can solve the problems of real time and accuracy in the fault process and provides a new research idea for the fault diagnosis of ESP well.In view of the above problems, this paper proposes a production fault diagnosis method of ESP well based on SPC expansion rules and real-time data fusion, establishes the fault diagnosis model of ESP well, and establishes the fault diagnosis system of ESP well. The field application shows that the diagnosis system can diagnose the fault of ESP well in real time and accurately. It has important practical significance for guiding field production, reducing the number of faults, prolonging the pump inspection cycle, reducing oil production cost, and improving the economic benefits of oilfield development. It also provides a new reference for fault diagnosis of other lifting wells.


## 2. Models and Methods

The production monitoring system for ESP wells includes two parts, the surface and the underground, as shown in Figure1. Sensors, flow meters, and power supply systems are installed on the ground, which can measure parameters such as frequency (Fr), voltage (V), motor current (MC), wellhead temperature (WT), and flow (F). In the underground part, the multifunction sensor is installed under the motor and is in line with the completion tool. Different sensors can be selected to obtain different parameters, which can measure the pump discharge pressure (POP), pump intake pressure (PIP), pump intake temperature (PIT), motor temperature (MT), tubing pressure (TP), pressure difference (PD), and other parameters. The ESP production monitoring system can monitor the dynamics of downhole motors, pumps, and wells in real time and provide a data basis for fault diagnosis by obtaining accurate data in real time.Figure 1
ESP well monitoring system.At present, the fault diagnosis based on SPC has made great progress, but the fault diagnosis method of SPC is only data to data, and the accuracy of diagnosis results is low. Therefore, this study proposes a fault diagnosis method based on the fusion of prior knowledge and SPC; that is, the multiparameter rule chart and weight factor of the electric pump well are used as prior knowledge to improve the accuracy of the diagnosis model.The fault diagnosis process of ESP well in this study is shown in Figure2 (in the figure, i represents the monitoring parameter, and j represents the fault type), which is mainly divided into four processes: (1) input the monitoring parameters into the established SPC expansion rule model, and output the monitoring parameter change rate ai; (2) establish a priori knowledge model, that is, multiparameter fault analysis table Bij and weight factor Cij of ESP well; (3) use multiparameter analysis table, monitoring parameter change rate, and weighting factor to establish fault diagnosis model; (4) input the parameter change rate into the fault diagnosis model, and output the probability Wj of each working condition. The greater the probability value, the greater the possibility of such a working condition.Figure 2
Working condition diagnosis process based on the fusion of prior knowledge and SPC.


### 2.1. SPC Extended Rule Model

The traditional SPC technology is based on the assumption that the process quality characteristics obey the normal distribution and are constructed according to the 3σ principle to record the quality of the production process. The sampling interval (h) and sampling interval (n) in the monitoring process are fixed, and the control limit coefficient is set to constant 3. It is assumed that a process quality characteristic X follows a normal distribution; that is,(1)X∼Nμ0,σ2,where μ is the mean of X and σ2 is the variance of X.Under the condition of equal sample sizen, according to the principle of 3 σ, there are(2)Pμ0−3σn<x¯<μ0+3σn=0.9973.Under the condition of the reasonable control of process mean, the probability of sample mean falling intoμ0−3σ/n,μ0+3σ/n is 99.73%. Therefore, the traditional measurement mean control chart divides it into the controlled area and out of control area by control upper limit (UCL), control lower limit (LCL), and control center limit (CL), in which(3)LCL=μ0−3σn,CL=μ0,UCL=μ0+3σn.The control limit coefficient of the traditional measurement mean control chart is completely determined according to practical experience, so it is difficult to ensure the scientificity of decision-making. Therefore, scholars take the control limit coefficientK as the decision variable to optimize the economy and statistics of the control chart. The control upper limit (UCL), control lower limit (LCL), and control center limit (CL) of the control chart are set as follows:(4)LCL=μ0−kσn,CL=μ0,UCL=μ0+kσn..The conventional SPC control diagram in the national standard is shown in Figure3, making k=n. In the figure, the center line CL=ui; the value range of area A above the center line CL: ui∼ui+σi; the value range of area B above the center line CL: ui+σi∼ui+2σi; the numerical range of C zone above the center line CL: ui+2σi∼ui+3σi; the numerical range of A area under the center line CL: ui∼ui−σi; the numerical range of zone B under the center line CL: ui−σi∼ui−2σi; the numerical range of C zone under the center line CL: ui−2σi∼ui−3σi. Among them, i is a certain real-time monitoring parameter collected by the ESP well; ui is the mean value of the real-time monitoring parameter i of the ESP well; σi is the standard deviation of the real-time monitoring parameter i of the ESP well.Figure 3
Conventional SPC control diagram.The standard SPC criterion is the eight commonly used discrimination criteria in the national standard GB/T4901-2001 conventional control chart, see Table1 for details.Table 1
Standard SPC eight different criteria.
SPC guidelinesSpecific rulesGuideline 11 point falls outside of zoneAGuideline 29 consecutive points fall on the same side of the center line CLGuideline 36 consecutive points have the same change trendGuideline 4Adjacent points in consecutive 14 points alternate up and downGuideline 52 out of 3 consecutive points fall outside of zoneB on the same side of the center line CLGuideline 64 out of 5 consecutive points fall outside theC zone on the same side of the center line CLGuideline 715 consecutive points fall within theC area on both sides of the center line CLGuideline 88 consecutive points fall on both sides of the center lineC, and none of them are in the C zoneWhen the SPC criterion is applied to the fault diagnosis of ESP well, it is hoped that it cannot only distinguish the abnormalities of monitoring parameters but also describe the change trend of parameters. Therefore, the standard SPC is expanded into 13 criteria and 5 types of trend characteristics (fluctuation, rise, sudden increase, drop, and sudden drop), forming extended SPC rules, see Table2 for details. The meaning of each area in the table is the same as that in Table 1.Table 2
Extended SPC rules.
Serial numberSPC guidelinesTrend characteristicsSpecific rule1Guideline 1Sudden increaseA point falls on the center line CL and outside of zoneA2Guideline 2Sudden dropA point falls below the center line CL and outside of zoneA3Guideline 3Rise9 consecutive points fall outside of zoneB above the center line CL4Guideline 4Decline9 consecutive points fall outside of zoneB below the center line CL5Guideline 5Rise6 consecutive points increase, and the last point is outside of zoneA6Guideline 6Decline6 consecutive points decrease, and the last point is outside zoneA7Guideline 7FluctuationAdjacent points in consecutive 14 points alternate up and down, and the difference between the maximum value and the minimum value is greater than 3 times the standard deviation8Guideline 8Fluctuation2 out of 3 consecutive points fall outside of zoneB above the center line CL9Guideline 9Fluctuation2 out of 3 consecutive points fall outside of zoneB below the center line CL10Guideline10Rise4 out of 5 consecutive points fall outside theC area above the center line CL11Guideline11Decline4 out of 5 consecutive points fall outside theC area below the center line CL12Guideline12Fluctuation15 consecutive points fall within theC area on both sides of the center line CL13Guideline13Fluctuation8 consecutive points fall on both sides of the center line CL and are not in theC zoneAccording to the extended SPC rule table, 15 data points are specified for each diagnosis.


### 2.2. Prior Knowledge—Multiparameter Fault Analysis Table

Through the analysis of the characteristic parameter changes of some typical working conditions of ESP wells, combined with the fault diagnosis investigation of domestic and foreign oil fields and oil companies, the trend of wellhead and downhole monitoring parameters of 14 typical working conditions of ESP wells is analyzed and counted. We have constructed a multiparameter fault analysis table for ESP well faults, as shown in Table3.Table 3
Multiparameter fault analysis table of ESP well.
Working condition typeFrMCMTVPIPPOPPDPITWTTPFNormal00000000000Shaft breakage0−2101−1−21−1−1−1Tubing leakage001−11−1−11−1−1−1Pump plugging0−1101−1−110−1−1Perforation plugging0−110−1−1110−1−1Water-cut rise010011110−1−1Wellhead shut-in0−2102221−12−2Reservoir pressure increase000011−11111Gas influence0−10−11−1−11−1−1−1Pump wear0−1101−1−110−1−1Frequency increase1221−2221122Choke stab0000−2−2−2−10−22Pump reverse−1−1101−1−110−1−1Tubing plugged0−11011−11−1−1−1Among them, 0 means fluctuation; 1 means rise; 2 means sudden increase; −1 means decline; −2 means sudden decline.


### 2.3. Working Condition Diagnosis Method

The working condition diagnosis process of ESP well is as follows.


#### 2.3.1. Standardization of Time Window Monitoring Data

It is known from Table3 that 15 points of the constructed SPC expansion rule model are used for a trend judgment. In practical applications, the number of data points in the diagnostic time window may not be equal to 15, and the data must be standardized to 15 points. Therefore, in order to ensure that the number of data points in the time window is equal to 15, this paper proposes the data analysis granularity S formula:(5)S=T15t×60,where T—diagnosis time window, min; t—ESP monitoring system parameter collection time interval, s.


#### 2.3.2. Monitoring Parameter Change Rateai Calculation

Select the fault diagnosis time window, determine the data analysis granularityS, and calculate the average value of each consecutive S data point as one data point. Use the established SPC expansion rule model to calculate the change trend of each parameter in this time period, and make the change trend of its parameter iai (−2, −1, 0, 1, 2). Suppose the change trend of each parameter is shown in Table 4.Table 4
Trend valuesai of monitoring parameters in the diagnostic time window of ESP wells.
Monitoring parametersiParameter 1Parameter 2⋯⋯ParameternTrendaia1a2⋯⋯an


#### 2.3.3. Standard Change TrendBij Calculation

The standard change trendBij refers to the standard change trend of the parameter when a certain fault occurs, that is, the change trend value of the parameter i corresponding to the fault i in Table 1.


#### 2.3.4. Calculation of Weighting FactorCij

The weighting factorCij refers to the contribution value of each parameter to this kind of fault when a certain kind of fault occurs. The cumulative sum of the weighting factors Cij of all parameters under each type of fault is 1. The value of the weight factor Cij is the weight value of the parameter i corresponding to the fault j in Table 5. Table 5 shows the fault weight factors of ESP wells obtained according to expert scores and actual conditions on-site. These factors should be calibrated regularly according to the actual operating conditions of ESP wells.Table 5
Weighting factorCij of 14 working condition types.
Working condition typeFrMCMTVPIPPOPPDPITWTTPFNormal000.10.10.10.10.100.10.10.2Shaft breakage0.10.050.200.10.050.050.050.050.20.15Tubing leakage0.10.150.10.10.050.050.050.050.050.150.15Pump plugging0.10.20.050.10.10.050.050.050.10.150.05Perforation plugging0.050.10.050.050.150.150.10.10.10.050.1Water-cut rise0.050.20.050.050.050.150.050.10.050.10.15Wellhead shut-in00.050.050.050.150.20.150.050.150.050.1Reservoir pressure increase0.050.050.10.050.150.010.050.150.150.10.05Gas influence0.10.050.10.050.150.150.20.15000.05Pump wear0.10.20.10.10.050.050.050.10.150.050.05Frequency increase0.30.050.050.050.10.10.10.0500.10.1Choke stab00.050.050.050.20.150.20.0500.150.1Pump reverse0.050.10.150.10.050.150.10.10.050.050.1Tubing plugged00.050.10.050.150.150.10.10.10.10.1


#### 2.3.5. Calculation of ESP Fault ProbabilityWj

The probability of fault refers to the probability of a certain fault. That is, to compareai with Bij and add the weighting factor Cij in the corresponding Table 5 under equal conditions, its value is the probability of occurrence of working condition j. The calculation formula is as follows:(6)Wj=∑i=1nCij×1−sgnaj−Bij,where Wj is the probability of occurrence of fault j, and the larger Wj, the greater the probability of occurrence of fault j; sgnx is a symbolic function, and its function expression is as follows:(7)sgnx==1=0=−1x>0x=0x<0.


## 2.1. SPC Extended Rule Model

The traditional SPC technology is based on the assumption that the process quality characteristics obey the normal distribution and are constructed according to the 3σ principle to record the quality of the production process. The sampling interval (h) and sampling interval (n) in the monitoring process are fixed, and the control limit coefficient is set to constant 3. It is assumed that a process quality characteristic X follows a normal distribution; that is,(1)X∼Nμ0,σ2,where μ is the mean of X and σ2 is the variance of X.Under the condition of equal sample sizen, according to the principle of 3 σ, there are(2)Pμ0−3σn<x¯<μ0+3σn=0.9973.Under the condition of the reasonable control of process mean, the probability of sample mean falling intoμ0−3σ/n,μ0+3σ/n is 99.73%. Therefore, the traditional measurement mean control chart divides it into the controlled area and out of control area by control upper limit (UCL), control lower limit (LCL), and control center limit (CL), in which(3)LCL=μ0−3σn,CL=μ0,UCL=μ0+3σn.The control limit coefficient of the traditional measurement mean control chart is completely determined according to practical experience, so it is difficult to ensure the scientificity of decision-making. Therefore, scholars take the control limit coefficientK as the decision variable to optimize the economy and statistics of the control chart. The control upper limit (UCL), control lower limit (LCL), and control center limit (CL) of the control chart are set as follows:(4)LCL=μ0−kσn,CL=μ0,UCL=μ0+kσn..The conventional SPC control diagram in the national standard is shown in Figure3, making k=n. In the figure, the center line CL=ui; the value range of area A above the center line CL: ui∼ui+σi; the value range of area B above the center line CL: ui+σi∼ui+2σi; the numerical range of C zone above the center line CL: ui+2σi∼ui+3σi; the numerical range of A area under the center line CL: ui∼ui−σi; the numerical range of zone B under the center line CL: ui−σi∼ui−2σi; the numerical range of C zone under the center line CL: ui−2σi∼ui−3σi. Among them, i is a certain real-time monitoring parameter collected by the ESP well; ui is the mean value of the real-time monitoring parameter i of the ESP well; σi is the standard deviation of the real-time monitoring parameter i of the ESP well.Figure 3
Conventional SPC control diagram.The standard SPC criterion is the eight commonly used discrimination criteria in the national standard GB/T4901-2001 conventional control chart, see Table1 for details.Table 1
Standard SPC eight different criteria.
SPC guidelinesSpecific rulesGuideline 11 point falls outside of zoneAGuideline 29 consecutive points fall on the same side of the center line CLGuideline 36 consecutive points have the same change trendGuideline 4Adjacent points in consecutive 14 points alternate up and downGuideline 52 out of 3 consecutive points fall outside of zoneB on the same side of the center line CLGuideline 64 out of 5 consecutive points fall outside theC zone on the same side of the center line CLGuideline 715 consecutive points fall within theC area on both sides of the center line CLGuideline 88 consecutive points fall on both sides of the center lineC, and none of them are in the C zoneWhen the SPC criterion is applied to the fault diagnosis of ESP well, it is hoped that it cannot only distinguish the abnormalities of monitoring parameters but also describe the change trend of parameters. Therefore, the standard SPC is expanded into 13 criteria and 5 types of trend characteristics (fluctuation, rise, sudden increase, drop, and sudden drop), forming extended SPC rules, see Table2 for details. The meaning of each area in the table is the same as that in Table 1.Table 2
Extended SPC rules.
Serial numberSPC guidelinesTrend characteristicsSpecific rule1Guideline 1Sudden increaseA point falls on the center line CL and outside of zoneA2Guideline 2Sudden dropA point falls below the center line CL and outside of zoneA3Guideline 3Rise9 consecutive points fall outside of zoneB above the center line CL4Guideline 4Decline9 consecutive points fall outside of zoneB below the center line CL5Guideline 5Rise6 consecutive points increase, and the last point is outside of zoneA6Guideline 6Decline6 consecutive points decrease, and the last point is outside zoneA7Guideline 7FluctuationAdjacent points in consecutive 14 points alternate up and down, and the difference between the maximum value and the minimum value is greater than 3 times the standard deviation8Guideline 8Fluctuation2 out of 3 consecutive points fall outside of zoneB above the center line CL9Guideline 9Fluctuation2 out of 3 consecutive points fall outside of zoneB below the center line CL10Guideline10Rise4 out of 5 consecutive points fall outside theC area above the center line CL11Guideline11Decline4 out of 5 consecutive points fall outside theC area below the center line CL12Guideline12Fluctuation15 consecutive points fall within theC area on both sides of the center line CL13Guideline13Fluctuation8 consecutive points fall on both sides of the center line CL and are not in theC zoneAccording to the extended SPC rule table, 15 data points are specified for each diagnosis.


## 2.2. Prior Knowledge—Multiparameter Fault Analysis Table

Through the analysis of the characteristic parameter changes of some typical working conditions of ESP wells, combined with the fault diagnosis investigation of domestic and foreign oil fields and oil companies, the trend of wellhead and downhole monitoring parameters of 14 typical working conditions of ESP wells is analyzed and counted. We have constructed a multiparameter fault analysis table for ESP well faults, as shown in Table3.Table 3
Multiparameter fault analysis table of ESP well.
Working condition typeFrMCMTVPIPPOPPDPITWTTPFNormal00000000000Shaft breakage0−2101−1−21−1−1−1Tubing leakage001−11−1−11−1−1−1Pump plugging0−1101−1−110−1−1Perforation plugging0−110−1−1110−1−1Water-cut rise010011110−1−1Wellhead shut-in0−2102221−12−2Reservoir pressure increase000011−11111Gas influence0−10−11−1−11−1−1−1Pump wear0−1101−1−110−1−1Frequency increase1221−2221122Choke stab0000−2−2−2−10−22Pump reverse−1−1101−1−110−1−1Tubing plugged0−11011−11−1−1−1Among them, 0 means fluctuation; 1 means rise; 2 means sudden increase; −1 means decline; −2 means sudden decline.


## 2.3. Working Condition Diagnosis Method

The working condition diagnosis process of ESP well is as follows.


### 2.3.1. Standardization of Time Window Monitoring Data

It is known from Table3 that 15 points of the constructed SPC expansion rule model are used for a trend judgment. In practical applications, the number of data points in the diagnostic time window may not be equal to 15, and the data must be standardized to 15 points. Therefore, in order to ensure that the number of data points in the time window is equal to 15, this paper proposes the data analysis granularity S formula:(5)S=T15t×60,where T—diagnosis time window, min; t—ESP monitoring system parameter collection time interval, s.


### 2.3.2. Monitoring Parameter Change Rateai Calculation

Select the fault diagnosis time window, determine the data analysis granularityS, and calculate the average value of each consecutive S data point as one data point. Use the established SPC expansion rule model to calculate the change trend of each parameter in this time period, and make the change trend of its parameter iai (−2, −1, 0, 1, 2). Suppose the change trend of each parameter is shown in Table 4.Table 4
Trend valuesai of monitoring parameters in the diagnostic time window of ESP wells.
Monitoring parametersiParameter 1Parameter 2⋯⋯ParameternTrendaia1a2⋯⋯an


### 2.3.3. Standard Change TrendBij Calculation

The standard change trendBij refers to the standard change trend of the parameter when a certain fault occurs, that is, the change trend value of the parameter i corresponding to the fault i in Table 1.


### 2.3.4. Calculation of Weighting FactorCij

The weighting factorCij refers to the contribution value of each parameter to this kind of fault when a certain kind of fault occurs. The cumulative sum of the weighting factors Cij of all parameters under each type of fault is 1. The value of the weight factor Cij is the weight value of the parameter i corresponding to the fault j in Table 5. Table 5 shows the fault weight factors of ESP wells obtained according to expert scores and actual conditions on-site. These factors should be calibrated regularly according to the actual operating conditions of ESP wells.Table 5
Weighting factorCij of 14 working condition types.
Working condition typeFrMCMTVPIPPOPPDPITWTTPFNormal000.10.10.10.10.100.10.10.2Shaft breakage0.10.050.200.10.050.050.050.050.20.15Tubing leakage0.10.150.10.10.050.050.050.050.050.150.15Pump plugging0.10.20.050.10.10.050.050.050.10.150.05Perforation plugging0.050.10.050.050.150.150.10.10.10.050.1Water-cut rise0.050.20.050.050.050.150.050.10.050.10.15Wellhead shut-in00.050.050.050.150.20.150.050.150.050.1Reservoir pressure increase0.050.050.10.050.150.010.050.150.150.10.05Gas influence0.10.050.10.050.150.150.20.15000.05Pump wear0.10.20.10.10.050.050.050.10.150.050.05Frequency increase0.30.050.050.050.10.10.10.0500.10.1Choke stab00.050.050.050.20.150.20.0500.150.1Pump reverse0.050.10.150.10.050.150.10.10.050.050.1Tubing plugged00.050.10.050.150.150.10.10.10.10.1


### 2.3.5. Calculation of ESP Fault ProbabilityWj

The probability of fault refers to the probability of a certain fault. That is, to compareai with Bij and add the weighting factor Cij in the corresponding Table 5 under equal conditions, its value is the probability of occurrence of working condition j. The calculation formula is as follows:(6)Wj=∑i=1nCij×1−sgnaj−Bij,where Wj is the probability of occurrence of fault j, and the larger Wj, the greater the probability of occurrence of fault j; sgnx is a symbolic function, and its function expression is as follows:(7)sgnx==1=0=−1x>0x=0x<0.


## 2.3.1. Standardization of Time Window Monitoring Data

It is known from Table3 that 15 points of the constructed SPC expansion rule model are used for a trend judgment. In practical applications, the number of data points in the diagnostic time window may not be equal to 15, and the data must be standardized to 15 points. Therefore, in order to ensure that the number of data points in the time window is equal to 15, this paper proposes the data analysis granularity S formula:(5)S=T15t×60,where T—diagnosis time window, min; t—ESP monitoring system parameter collection time interval, s.


## 2.3.2. Monitoring Parameter Change Rateai Calculation

Select the fault diagnosis time window, determine the data analysis granularityS, and calculate the average value of each consecutive S data point as one data point. Use the established SPC expansion rule model to calculate the change trend of each parameter in this time period, and make the change trend of its parameter iai (−2, −1, 0, 1, 2). Suppose the change trend of each parameter is shown in Table 4.Table 4
Trend valuesai of monitoring parameters in the diagnostic time window of ESP wells.
Monitoring parametersiParameter 1Parameter 2⋯⋯ParameternTrendaia1a2⋯⋯an


## 2.3.3. Standard Change TrendBij Calculation

The standard change trendBij refers to the standard change trend of the parameter when a certain fault occurs, that is, the change trend value of the parameter i corresponding to the fault i in Table 1.


## 2.3.4. Calculation of Weighting FactorCij

The weighting factorCij refers to the contribution value of each parameter to this kind of fault when a certain kind of fault occurs. The cumulative sum of the weighting factors Cij of all parameters under each type of fault is 1. The value of the weight factor Cij is the weight value of the parameter i corresponding to the fault j in Table 5. Table 5 shows the fault weight factors of ESP wells obtained according to expert scores and actual conditions on-site. These factors should be calibrated regularly according to the actual operating conditions of ESP wells.Table 5
Weighting factorCij of 14 working condition types.
Working condition typeFrMCMTVPIPPOPPDPITWTTPFNormal000.10.10.10.10.100.10.10.2Shaft breakage0.10.050.200.10.050.050.050.050.20.15Tubing leakage0.10.150.10.10.050.050.050.050.050.150.15Pump plugging0.10.20.050.10.10.050.050.050.10.150.05Perforation plugging0.050.10.050.050.150.150.10.10.10.050.1Water-cut rise0.050.20.050.050.050.150.050.10.050.10.15Wellhead shut-in00.050.050.050.150.20.150.050.150.050.1Reservoir pressure increase0.050.050.10.050.150.010.050.150.150.10.05Gas influence0.10.050.10.050.150.150.20.15000.05Pump wear0.10.20.10.10.050.050.050.10.150.050.05Frequency increase0.30.050.050.050.10.10.10.0500.10.1Choke stab00.050.050.050.20.150.20.0500.150.1Pump reverse0.050.10.150.10.050.150.10.10.050.050.1Tubing plugged00.050.10.050.150.150.10.10.10.10.1


## 2.3.5. Calculation of ESP Fault ProbabilityWj

The probability of fault refers to the probability of a certain fault. That is, to compareai with Bij and add the weighting factor Cij in the corresponding Table 5 under equal conditions, its value is the probability of occurrence of working condition j. The calculation formula is as follows:(6)Wj=∑i=1nCij×1−sgnaj−Bij,where Wj is the probability of occurrence of fault j, and the larger Wj, the greater the probability of occurrence of fault j; sgnx is a symbolic function, and its function expression is as follows:(7)sgnx==1=0=−1x>0x=0x<0.


## 3. Case Analysis

Based on the above fault diagnosis methods, the ESP well fault diagnosis system is developed, which has the functions of ESP operation monitoring, working condition diagnosis, fault type statistics, system management, and so on. The software is deployed in 425 wells in a certain block for practical application. The software monitoring interface is shown in Figure4.Figure 4
Monitoring interface of ESP well diagnosis system.This paper selects the data of five wells from May 7, 2021, to May 10, 2021, as the research object. The data density is collected every 20 seconds. The working conditions of each well are tubing leakage, pump wear, shaft breakage, gas influence, and pump plugging. These five faults will be analyzed in detail as follows.①
Tubing leakageTubing leakage is usually caused by a fault of the sealing device, disconnection of the oil drain pin, or serious erosion. Generally, the tubing pressure, flow, and motor current will decrease, which may be accompanied by a decrease in voltage, pump discharge pressure, and wellhead temperature. The parameter changes are shown in Figure5.②
Pump wearWhen the sand content in the oil well is high, the pump wear condition will occur, and generally, the impeller of the pump will be worn. When the impeller is worn, the pump discharge pressure and flow will decrease, which may be accompanied by underload shutdown. The motor temperature, pump inlet pressure, and pump inlet temperature may rise, and the parameter changes are shown in Figure6.③
Shaft breakageShaft breakage is a sudden fault, which is easy to occur when the oil well has heavy oil, serious sand production or shutdown, and restart. At this time, the motor current suddenly decreases. Due to the decrease of tubing pressure, the oil well flow also decreases, the pump discharge pressure decreases, and the motor temperature will rise after stabilizing for a period of time. The parameter changes are shown in Figure7.④
Gas influenceGas influence is a gradual fault, which is caused by high gas content in the fluid, low pump hanging depth, or insufficient liquid supply. At this time, the motor current, voltage, pump discharge pressure, wellhead temperature, tubing pressure, and flow will decrease, and the pump inlet pressure and pump inlet temperature will increase due to the increase of gas. In severe cases, airlock will occur, and the parameter changes are shown in Figure8.⑤
Pump pluggingIn the production process, the pump impeller or suction inlet will be blocked due to wax deposition and sand production in the oil well. When the pump plugging, the frequency, voltage, and wellhead temperature remain unchanged; the motor current, pump discharge pressure, pressure difference, and flow decreased; motor temperature, pump inlet pressure, and pump inlet temperature all rise. The parameter changes are shown in Figure9.Figure 5
Monitoring parameters of well_001 well.Figure 6
Monitoring parameters of well_002 well.Figure 7
Monitoring parameters of well_003 well.Next, these five wells are used to analyze the fault diagnosis process in detail.Figure 8
Monitoring parameters of well_004 well.Figure 9
Monitoring parameters of well_005 well.


### 3.1. Standardization of Time Window Monitoring Data

In the ESP well, the speed of different faults is different. For example, the shaft breakage off belongs to a sudden fault, which takes only a few minutes from the beginning of the fault to the complete fault; the pump wear belongs to a gradual fault, which takes more than 20 hours or even longer from the beginning of the fault to the complete fault. If a small time window is selected, some abrupt faults can be accurately and correctly diagnosed, but some gradual faults are difficult to be accurately diagnosed; on the contrary, if a longer time window is selected, the gradual fault can be accurately diagnosed, but the characteristics of some sudden faults will be weakened. Therefore, in order to enable the diagnosis system to capture all types of faults at the same time, the diagnosis time windows are selected as 5 minutes, 60 minutes, and 1440 minutes, respectively, for analysis, and the data density ist=20s. According to formula (5), the data analysis granularity is 1, 12, and 288, respectively. That is, take the average value of the values of 1, 12, and 288 consecutive points as a point, so as to ensure that the number of data points in a specific time window is equal to 15, so that SPC can expand the application of rules.


### 3.2. Calculation of Monitoring Parameter Change Rateai

The calculation process of monitoring parameter change rateai is shown in Figure 10. Input the parameters of the diagnosis time window into the SPC expansion rule model, that is, output the change trend of each parameter.Figure 10
Calculation process of monitoring parameter change rateai.Based on the calculation process of monitoring parameter change rate in Figure10, the SPC expansion rule model is used to calculate the change trend of parameters within 5 minutes, 60 minutes, and 1440 minutes of the time window, see Table 6 for the variation trend of various parameters of different oil wells in the time window.Table 6
Trend changes of different oil wells in different time windows.
Well nameFrMCMTVPIPPDPPDPITWTTPFTime window: 5 minuteswell_0010−11111−1−1−1−1−1well_00200−10010−10−10well_0030−10−1−21−1−20−1−1well_004021−2101−11−2−1well_0050−1−10010−11−10Time window: 60 minuteswell_0010−11011−1−1−1−1−1well_002000−10100−100well_0030−11−211−11−1−1−1well_0040−11−110−1−2−1−1−1well_005011−1110−1−1−10Time window: 1440 minuteswell_0010−11011−1−1−1−1−1well_0020−1−1−1110−1−1−10well_0030−11−111−1−1−1−1−1well_0040−11−110−1−1−1−1−1well_0050−11−1110−1−1−10


### 3.3. Calculation of Fault ProbabilityWj

The calculation process of fault probabilityWj is shown in Figure 11. For data that do not match the multiparameter rule chart, the contribution of fault probability is zero. In the figure, W1 represents the probability of fault 1.Figure 11
Calculation process of fault probability.Based on the calculation steps in Figure11, calculate the probability of occurrence of different oil wells, different diagnosis time windows, and different working conditions by using formula (6), as shown in Table 7. The greater the fault probability value, the greater the possibility of such a fault.Table 7
Probability calculation results of working conditions.
Time window (mins)Working condition typeProbabilityWell name: well_0015Normal0.65Shaft breakage0.70Tubing leakage0.85Pump plugging0.75Perforation plugging0.60Water-cut rise0.25Wellhead shut-in0.10Reservoir pressure increase0.40Gas influence0.35Pump wear0.75Frequency increase0.05Choke stab0.00Pump reverse0.50Tubing plugged0.7560Normal0.50Shaft breakage0.55Tubing leakage0.55Pump plugging0.40Perforation plugging0.40Water-cut rise0.15Wellhead shut-in0.15Reservoir pressure increase0.45Gas influence025Pump wear0.55Frequency increase0.05Choke stab0.05Pump reverse0.70Tubing plugged0.651440Normal0.60Shaft breakage0.90Tubing leakage1.00Pump plugging0.65Perforation plugging0.50Water-cut rise0.25Wellhead shut-in0.20Reservoir pressure increase0.45Gas influence0.85Pump wear0.55Frequency increase0.05Choke stab0.05Pump reverse0.70Tubing plugged0.75Well name: well_0025Normal0.60Shaft breakage0.35Tubing leakage0.55Pump plugging0.50Perforation plugging0.25Water-cut rise0.45Wellhead shut-in0.10Reservoir pressure increase0.30Gas influence0.20Pump wear0.65Frequency increase0.10Choke stab0.10Pump reverse0.55Tubing plugged0.3560Normal0.40Shaft breakage0.55Tubing leakage0.85Pump plugging0.70Perforation plugging0.35Water-cut rise0.45Wellhead shut-in0.10Reservoir pressure increase0.45Gas influence0.50Pump wear0.80Frequency increase0.00Choke stab0.10Pump reverse0.65Tubing plugged0.651440Normal0.20Shaft breakage0.75Tubing leakage0.65Pump plugging0.90Perforation plugging0.65Water-cut rise0.45Wellhead shut-in0.10Reservoir pressure increase0.30Gas influence0.70Pump wear0.80Frequency increase0.00Choke stab0.10Pump reverse0.75Tubing plugged0.65Well name: well_0035Normal0.70Shaft breakage0.90Tubing leakage0.65Pump plugging0.85Perforation plugging0.50Water-cut rise0.55Wellhead shut-in0.35Reservoir pressure increase0.50Gas influence0.80Pump wear0.65Frequency increase0.15Choke stab0.10Pump reverse0.40Tubing plugged0.5060Normal0.50Shaft breakage0.90Tubing leakage0.75Pump plugging0.65Perforation plugging0.40Water-cut rise0.40Wellhead shut-in0.15Reservoir pressure increase0.35Gas influence0.75Pump wear0.55Frequency increase0.05Choke stab0.00Pump reverse0.50Tubing plugged0.551440Normal0.25Shaft breakage0.90Tubing leakage0.85Pump plugging0.80Perforation plugging0.60Water-cut rise0.45Wellhead shut-in0.35Reservoir pressure increase0.40Gas influence0.80Pump wear0.75Frequency increase0.05Choke stab0.00Pump reverse0.80Tubing plugged0.80Well name: well_0045Normal0.70Shaft breakage0.45Tubing leakage0.30Pump plugging0.85Perforation plugging0.25Water-cut rise0.30Wellhead shut-in0.20Reservoir pressure increase0.55Gas influence0.70Pump wear0.35Frequency increase0.05Choke stab0.05Pump reverse0.75Tubing plugged0.7060Normal0.60Shaft breakage0.55Tubing leakage0.40Pump plugging0.70Perforation plugging0.65Water-cut rise0.60Wellhead shut-in0.20Reservoir pressure increase0.50Gas influence1.00Pump wear0.75Frequency increase0.05Choke stab0.35Pump reverse0.25Tubing plugged0.701440Normal0.10Shaft breakage0.70Tubing leakage0.75Pump plugging0.75Perforation plugging0.55Water-cut rise0.50Wellhead shut-in0.20Reservoir pressure increase0.50Gas influence1.00Pump wear0.65Frequency increase0.05Choke stab0.05Pump reverse0.65Tubing plugged0.70Well name: well_0055Normal0.20Shaft breakage0.55Tubing leakage0.80Pump plugging0.75Perforation plugging0.75Water-cut rise0.45Wellhead shut-in0.15Reservoir pressure increase0.45Gas influence0.75Pump wear0.95Frequency increase0.25Choke stab0.15Pump reverse0.55Tubing plugged0.3560Normal0.30Shaft breakage0.55Tubing leakage0.45Pump plugging0.65Perforation plugging0.75Water-cut rise0.55Wellhead shut-in0.25Reservoir pressure increase0.50Gas influence0.15Pump wear0.95Frequency increase0.25Choke stab0.05Pump reverse0.60Tubing plugged0.651440Normal0.20Shaft breakage0.85Tubing leakage0.70Pump plugging1.00Perforation plugging0.75Water-cut rise0.55Wellhead shut-in0.15Reservoir pressure increase0.45Gas influence0.85Pump wear1.00Frequency increase0.05Choke stab0.05Pump reverse0.95Tubing plugged0.75


### 3.4. Analysis of Fault Diagnosis Results

Under the time window of 5 minutes, 60 minutes, and 1440 minutes, take the maximum value of each fault probability as the final fault probability. In order to illustrate the superiority of the fault diagnosis model in this study, well_002 is selected for example analysis, and the fault diagnosis results based on SPC and the fault diagnosis model in this study are calculated, respectively, as shown in Table8.Table 8
Comparison of diagnostic results.
Well nameWorking condition type5 minutes60 minutes1440 minutesMaxDiagnostic resultFault diagnosis model based on SPCwell_002Normal0.600.400.200.60Pump pluggingPump wearShaft breakage0.350.550.750.75Tubing leakage0.550.850.650.85Pump plugging0.500.700.900.90Perforation plugging0.250.350.650.65Water-cut rise0.450.450.450.45Wellhead shut-in0.100.100.100.10Reservoir pressure increase0.300.450.300.45Gas influence0.200.500.700.70Pump wear0.650.800.900.90Frequency increase0.100.000.000.10Choke stab0.100.100.100.10Pump reverse0.550.650.750.75Tubing plugged0.350.650.650.65The fault diagnosis model of this studywell_002Normal0.600.400.200.60Pump pluggingShaft breakage0.350.550.750.75Tubing leakage0.550.750.650.85Pump plugging0.500.850.900.90Perforation plugging0.250.350.650.65Water-cut rise0.450.450.450.45Wellhead shut-in0.100.100.100.10Reservoir pressure increase0.300.450.300.45Gas influence0.200.500.700.70Pump wear0.650.800.800.80Frequency increase0.100.000.000.10Choke stab0.100.100.100.10Pump reverse0.550.650.750.75Tubing plugged0.350.650.650.65By analyzing Table8, it can be seen that when the time window is 60 minutes, the fault diagnosis model in this study can correctly diagnose the fault type, while the fault diagnosis model based on SPC cannot correctly diagnose the fault type when the time window is 1440 minutes. By comparing the final diagnosis results of the two methods, there is only one diagnosis result of the fault diagnosis model in this study, which is the same as the label of the fault well, and the diagnosis is correct, while there are two diagnosis results of the fault diagnosis model based on SPC, which cannot correctly diagnose the fault type. Therefore, the fault diagnosis method proposed in this paper needs a smaller time window and higher diagnosis accuracy.The fault diagnosis results of the other 4 wells are calculated in this study, as shown in Table9. The diagnosis results are consistent with the fault labels of oil wells. Therefore, setting multiple time windows to maximize the probability is an important guarantee for fault identification.Table 9
Diagnosis results of working conditions.
Well nameWorking condition type5 minutes60 minutes1440 minutesMaxDiagnostic resultwell_001Normal0.650.500.600.65Tubing leakageShaft breakage0.700.550.900.90Tubing leakage0.850.551.001.00Pump plugging0.750.400.650.75Perforation plugging0.600.400.500.60Water-cut rise0.250.150.250.25Wellhead shut-in0.100.150.200.15Reservoir pressure increase0.400.450.450.45Gas influence0.350250.850.85Pump wear0.750.550.550.75Frequency increase0.050.050.050.05Choke stab0.000.050.050.05Pump reverse0.500.700.700.70Tubing plugged0.750.650.750.75well_003Normal0.700.500.250.70Shaft breakageShaft breakage0.900.900.900.90Tubing leakage0.650.750.850.85Pump plugging0.850.650.800.85Perforation plugging0.500.400.600.60Water-cut rise0.550.400.450.55Wellhead shut-in0.350.150.350.35Reservoir pressure increase0.500.350.400.50Gas influence0.800.750.800.80Pump wear0.650.550.750.75Frequency increase0.150.050.050.15Choke stab0.100.000.000.10Pump reverse0.400.500.800.80Tubing plugged0.500.550.800.80well_004Normal0.700.600.100.70Gas influenceShaft breakage0.450.550.700.70Tubing leakage0.300.400.750.75Pump plugging0.850.700.750.85Perforation plugging0.250.650.550.65Water-cut rise0.300.600.500.60Wellhead shut-in0.200.200.200.20Reservoir pressure increase0.550.500.500.55Gas influence0.701.001.001.00Pump wear0.350.750.650.75Frequency increase0.050.050.050.05Choke stab0.050.350.050.35Pump reverse0.750.250.650.75Tubing plugged0.700.700.700.70well_005Normal0.200.300.200.30Pump wearShaft breakage0.550.550.850.85Tubing leakage0.800.450.700.80Pump plugging0.750.650.900.90Perforation plugging0.750.750.750.75Water-cut rise0.450.550.550.55Wellhead shut-in0.150.250.150.25Reservoir pressure increase0.450.500.450.50Gas influence0.750.150.850.85Pump wear0.950.951.001.00Frequency increase0.250.250.050.25Choke stab0.150.050.050.15Pump reverse0.550.600.950.95Tubing plugged0.350.650.750.75


## 3.1. Standardization of Time Window Monitoring Data

In the ESP well, the speed of different faults is different. For example, the shaft breakage off belongs to a sudden fault, which takes only a few minutes from the beginning of the fault to the complete fault; the pump wear belongs to a gradual fault, which takes more than 20 hours or even longer from the beginning of the fault to the complete fault. If a small time window is selected, some abrupt faults can be accurately and correctly diagnosed, but some gradual faults are difficult to be accurately diagnosed; on the contrary, if a longer time window is selected, the gradual fault can be accurately diagnosed, but the characteristics of some sudden faults will be weakened. Therefore, in order to enable the diagnosis system to capture all types of faults at the same time, the diagnosis time windows are selected as 5 minutes, 60 minutes, and 1440 minutes, respectively, for analysis, and the data density ist=20s. According to formula (5), the data analysis granularity is 1, 12, and 288, respectively. That is, take the average value of the values of 1, 12, and 288 consecutive points as a point, so as to ensure that the number of data points in a specific time window is equal to 15, so that SPC can expand the application of rules.


## 3.2. Calculation of Monitoring Parameter Change Rateai

The calculation process of monitoring parameter change rateai is shown in Figure 10. Input the parameters of the diagnosis time window into the SPC expansion rule model, that is, output the change trend of each parameter.Figure 10
Calculation process of monitoring parameter change rateai.Based on the calculation process of monitoring parameter change rate in Figure10, the SPC expansion rule model is used to calculate the change trend of parameters within 5 minutes, 60 minutes, and 1440 minutes of the time window, see Table 6 for the variation trend of various parameters of different oil wells in the time window.Table 6
Trend changes of different oil wells in different time windows.
Well nameFrMCMTVPIPPDPPDPITWTTPFTime window: 5 minuteswell_0010−11111−1−1−1−1−1well_00200−10010−10−10well_0030−10−1−21−1−20−1−1well_004021−2101−11−2−1well_0050−1−10010−11−10Time window: 60 minuteswell_0010−11011−1−1−1−1−1well_002000−10100−100well_0030−11−211−11−1−1−1well_0040−11−110−1−2−1−1−1well_005011−1110−1−1−10Time window: 1440 minuteswell_0010−11011−1−1−1−1−1well_0020−1−1−1110−1−1−10well_0030−11−111−1−1−1−1−1well_0040−11−110−1−1−1−1−1well_0050−11−1110−1−1−10


## 3.3. Calculation of Fault ProbabilityWj

The calculation process of fault probabilityWj is shown in Figure 11. For data that do not match the multiparameter rule chart, the contribution of fault probability is zero. In the figure, W1 represents the probability of fault 1.Figure 11
Calculation process of fault probability.Based on the calculation steps in Figure11, calculate the probability of occurrence of different oil wells, different diagnosis time windows, and different working conditions by using formula (6), as shown in Table 7. The greater the fault probability value, the greater the possibility of such a fault.Table 7
Probability calculation results of working conditions.
Time window (mins)Working condition typeProbabilityWell name: well_0015Normal0.65Shaft breakage0.70Tubing leakage0.85Pump plugging0.75Perforation plugging0.60Water-cut rise0.25Wellhead shut-in0.10Reservoir pressure increase0.40Gas influence0.35Pump wear0.75Frequency increase0.05Choke stab0.00Pump reverse0.50Tubing plugged0.7560Normal0.50Shaft breakage0.55Tubing leakage0.55Pump plugging0.40Perforation plugging0.40Water-cut rise0.15Wellhead shut-in0.15Reservoir pressure increase0.45Gas influence025Pump wear0.55Frequency increase0.05Choke stab0.05Pump reverse0.70Tubing plugged0.651440Normal0.60Shaft breakage0.90Tubing leakage1.00Pump plugging0.65Perforation plugging0.50Water-cut rise0.25Wellhead shut-in0.20Reservoir pressure increase0.45Gas influence0.85Pump wear0.55Frequency increase0.05Choke stab0.05Pump reverse0.70Tubing plugged0.75Well name: well_0025Normal0.60Shaft breakage0.35Tubing leakage0.55Pump plugging0.50Perforation plugging0.25Water-cut rise0.45Wellhead shut-in0.10Reservoir pressure increase0.30Gas influence0.20Pump wear0.65Frequency increase0.10Choke stab0.10Pump reverse0.55Tubing plugged0.3560Normal0.40Shaft breakage0.55Tubing leakage0.85Pump plugging0.70Perforation plugging0.35Water-cut rise0.45Wellhead shut-in0.10Reservoir pressure increase0.45Gas influence0.50Pump wear0.80Frequency increase0.00Choke stab0.10Pump reverse0.65Tubing plugged0.651440Normal0.20Shaft breakage0.75Tubing leakage0.65Pump plugging0.90Perforation plugging0.65Water-cut rise0.45Wellhead shut-in0.10Reservoir pressure increase0.30Gas influence0.70Pump wear0.80Frequency increase0.00Choke stab0.10Pump reverse0.75Tubing plugged0.65Well name: well_0035Normal0.70Shaft breakage0.90Tubing leakage0.65Pump plugging0.85Perforation plugging0.50Water-cut rise0.55Wellhead shut-in0.35Reservoir pressure increase0.50Gas influence0.80Pump wear0.65Frequency increase0.15Choke stab0.10Pump reverse0.40Tubing plugged0.5060Normal0.50Shaft breakage0.90Tubing leakage0.75Pump plugging0.65Perforation plugging0.40Water-cut rise0.40Wellhead shut-in0.15Reservoir pressure increase0.35Gas influence0.75Pump wear0.55Frequency increase0.05Choke stab0.00Pump reverse0.50Tubing plugged0.551440Normal0.25Shaft breakage0.90Tubing leakage0.85Pump plugging0.80Perforation plugging0.60Water-cut rise0.45Wellhead shut-in0.35Reservoir pressure increase0.40Gas influence0.80Pump wear0.75Frequency increase0.05Choke stab0.00Pump reverse0.80Tubing plugged0.80Well name: well_0045Normal0.70Shaft breakage0.45Tubing leakage0.30Pump plugging0.85Perforation plugging0.25Water-cut rise0.30Wellhead shut-in0.20Reservoir pressure increase0.55Gas influence0.70Pump wear0.35Frequency increase0.05Choke stab0.05Pump reverse0.75Tubing plugged0.7060Normal0.60Shaft breakage0.55Tubing leakage0.40Pump plugging0.70Perforation plugging0.65Water-cut rise0.60Wellhead shut-in0.20Reservoir pressure increase0.50Gas influence1.00Pump wear0.75Frequency increase0.05Choke stab0.35Pump reverse0.25Tubing plugged0.701440Normal0.10Shaft breakage0.70Tubing leakage0.75Pump plugging0.75Perforation plugging0.55Water-cut rise0.50Wellhead shut-in0.20Reservoir pressure increase0.50Gas influence1.00Pump wear0.65Frequency increase0.05Choke stab0.05Pump reverse0.65Tubing plugged0.70Well name: well_0055Normal0.20Shaft breakage0.55Tubing leakage0.80Pump plugging0.75Perforation plugging0.75Water-cut rise0.45Wellhead shut-in0.15Reservoir pressure increase0.45Gas influence0.75Pump wear0.95Frequency increase0.25Choke stab0.15Pump reverse0.55Tubing plugged0.3560Normal0.30Shaft breakage0.55Tubing leakage0.45Pump plugging0.65Perforation plugging0.75Water-cut rise0.55Wellhead shut-in0.25Reservoir pressure increase0.50Gas influence0.15Pump wear0.95Frequency increase0.25Choke stab0.05Pump reverse0.60Tubing plugged0.651440Normal0.20Shaft breakage0.85Tubing leakage0.70Pump plugging1.00Perforation plugging0.75Water-cut rise0.55Wellhead shut-in0.15Reservoir pressure increase0.45Gas influence0.85Pump wear1.00Frequency increase0.05Choke stab0.05Pump reverse0.95Tubing plugged0.75


## 3.4. Analysis of Fault Diagnosis Results

Under the time window of 5 minutes, 60 minutes, and 1440 minutes, take the maximum value of each fault probability as the final fault probability. In order to illustrate the superiority of the fault diagnosis model in this study, well_002 is selected for example analysis, and the fault diagnosis results based on SPC and the fault diagnosis model in this study are calculated, respectively, as shown in Table8.Table 8
Comparison of diagnostic results.
Well nameWorking condition type5 minutes60 minutes1440 minutesMaxDiagnostic resultFault diagnosis model based on SPCwell_002Normal0.600.400.200.60Pump pluggingPump wearShaft breakage0.350.550.750.75Tubing leakage0.550.850.650.85Pump plugging0.500.700.900.90Perforation plugging0.250.350.650.65Water-cut rise0.450.450.450.45Wellhead shut-in0.100.100.100.10Reservoir pressure increase0.300.450.300.45Gas influence0.200.500.700.70Pump wear0.650.800.900.90Frequency increase0.100.000.000.10Choke stab0.100.100.100.10Pump reverse0.550.650.750.75Tubing plugged0.350.650.650.65The fault diagnosis model of this studywell_002Normal0.600.400.200.60Pump pluggingShaft breakage0.350.550.750.75Tubing leakage0.550.750.650.85Pump plugging0.500.850.900.90Perforation plugging0.250.350.650.65Water-cut rise0.450.450.450.45Wellhead shut-in0.100.100.100.10Reservoir pressure increase0.300.450.300.45Gas influence0.200.500.700.70Pump wear0.650.800.800.80Frequency increase0.100.000.000.10Choke stab0.100.100.100.10Pump reverse0.550.650.750.75Tubing plugged0.350.650.650.65By analyzing Table8, it can be seen that when the time window is 60 minutes, the fault diagnosis model in this study can correctly diagnose the fault type, while the fault diagnosis model based on SPC cannot correctly diagnose the fault type when the time window is 1440 minutes. By comparing the final diagnosis results of the two methods, there is only one diagnosis result of the fault diagnosis model in this study, which is the same as the label of the fault well, and the diagnosis is correct, while there are two diagnosis results of the fault diagnosis model based on SPC, which cannot correctly diagnose the fault type. Therefore, the fault diagnosis method proposed in this paper needs a smaller time window and higher diagnosis accuracy.The fault diagnosis results of the other 4 wells are calculated in this study, as shown in Table9. The diagnosis results are consistent with the fault labels of oil wells. Therefore, setting multiple time windows to maximize the probability is an important guarantee for fault identification.Table 9
Diagnosis results of working conditions.
Well nameWorking condition type5 minutes60 minutes1440 minutesMaxDiagnostic resultwell_001Normal0.650.500.600.65Tubing leakageShaft breakage0.700.550.900.90Tubing leakage0.850.551.001.00Pump plugging0.750.400.650.75Perforation plugging0.600.400.500.60Water-cut rise0.250.150.250.25Wellhead shut-in0.100.150.200.15Reservoir pressure increase0.400.450.450.45Gas influence0.350250.850.85Pump wear0.750.550.550.75Frequency increase0.050.050.050.05Choke stab0.000.050.050.05Pump reverse0.500.700.700.70Tubing plugged0.750.650.750.75well_003Normal0.700.500.250.70Shaft breakageShaft breakage0.900.900.900.90Tubing leakage0.650.750.850.85Pump plugging0.850.650.800.85Perforation plugging0.500.400.600.60Water-cut rise0.550.400.450.55Wellhead shut-in0.350.150.350.35Reservoir pressure increase0.500.350.400.50Gas influence0.800.750.800.80Pump wear0.650.550.750.75Frequency increase0.150.050.050.15Choke stab0.100.000.000.10Pump reverse0.400.500.800.80Tubing plugged0.500.550.800.80well_004Normal0.700.600.100.70Gas influenceShaft breakage0.450.550.700.70Tubing leakage0.300.400.750.75Pump plugging0.850.700.750.85Perforation plugging0.250.650.550.65Water-cut rise0.300.600.500.60Wellhead shut-in0.200.200.200.20Reservoir pressure increase0.550.500.500.55Gas influence0.701.001.001.00Pump wear0.350.750.650.75Frequency increase0.050.050.050.05Choke stab0.050.350.050.35Pump reverse0.750.250.650.75Tubing plugged0.700.700.700.70well_005Normal0.200.300.200.30Pump wearShaft breakage0.550.550.850.85Tubing leakage0.800.450.700.80Pump plugging0.750.650.900.90Perforation plugging0.750.750.750.75Water-cut rise0.450.550.550.55Wellhead shut-in0.150.250.150.25Reservoir pressure increase0.450.500.450.50Gas influence0.750.150.850.85Pump wear0.950.951.001.00Frequency increase0.250.250.050.25Choke stab0.150.050.050.15Pump reverse0.550.600.950.95Tubing plugged0.350.650.750.75


## 4. Conclusion

(1)
Based on the conventional SPC rules, this study developed 13 kinds of SPC expansion rules suitable for judging the change trend of monitoring parameters of ESP wells, established the SPC expansion rule model, and refined the change trend of multiple monitoring parameters in a specific time window in real time, laying the foundation for fault diagnosis of ESP wells.(2)
The proposed fault probability model and ESP well fault diagnosis method realize the diagnosis of 14 different working conditions, and a priori knowledge, namely multiparameter fault analysis table and weight factor, is introduced into the diagnosis model, which reduces the time window required for fault diagnosis and improves the accuracy of diagnosis results.(3)
By setting multiple time windows of 5 minutes, 60 minutes, and 1440 minutes, the diagnosis of sudden faults and gradual faults has been solved, and the accuracy of fault diagnosis has been improved.(4)
In practical applications, this method can appropriately adjust the multiparameter fault analysis table, SPC expansion rules, weight factors, and time windows according to the fluid properties of ESP wells in different blocks and the type of lifting equipment so that the diagnosis method can be applied to other oil wells with high accuracy.(5)
In the future, with the continuous production of oil wells, the operator can further modify the weight factor table according to the historical data obtained in the actual situation and possible faults to ensure the accuracy of the results.



---

*Source: 8497299-2022-07-06.xml*