Oil well working condition fault early warning method and system

Through the improved fuzzy C-mean clustering model, oil well production data is clustered, working conditions are identified and fault warning information is generated, which solves the problem of low oil well fault detection efficiency and realizes timely early warning and management of faults.

CN119671534AInactive Publication Date: 2025-03-21DAQING ANHUASITE PETROLEUM MASCH EQUIP MFG CO LTD

Patent Information

Application Number
CN202411729049.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During the production process, the oil well is affected by various external factors, resulting in complex working conditions and frequent failures. The traditional fault detection methods are inefficient and the failure time is not found in time.

Method used

A method of early warning for oil well working conditions is proposed. By collecting historical production data of oil wells, extracting characteristic data, training an improved fuzzy C-mean clustering model, clustering the production data to be tested to obtain the working condition category, and generating early warning information when the fault category is detected.

Benefits of technology

It realizes timely and accurate warnings for oil well failures, reduces the demand for manual inspection, improves work efficiency, and is conducive to management and supervision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119671534A_ABST
    Figure CN119671534A_ABST
Patent Text Reader

Abstract

The invention discloses an oil well working condition fault early warning method and system, and relates to the technical field of oil well control. According to the technical key points, the method comprises the following steps: firstly, extracting a 10-dimensional feature vector of oil well production data, and identifying an oil well which may have a fault through a fault early warning model based on improved fuzzy C-means clustering by using the 10-dimensional feature vector, according to the improved fuzzy C-means clustering algorithm, by purposefully selecting an initial clustering center and improving a target function, the defect that an FCM clustering algorithm is prone to falling into local optimum is overcome, and meanwhile the separation between the clustering centers is ensured; furthermore, a global search method-firefly algorithm is added on the basis, a calculation method of the clustering center is optimized, and a global optimal solution can be effectively found. The oil well fault can be timely and accurately found and treated in time, manual inspection is not needed, the working efficiency is improved, and management and supervision are facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of oil well control, and in particular to an oil well operating condition fault early warning method and system. Background Art

[0002] In oilfield exploitation, rod extraction is currently the main method of oil production. In actual production, pumping wells are often affected by external factors such as sand, wax, water, and gas, resulting in complex and changeable working conditions of pumping wells and frequent failures. Various failures of pumping wells seriously affect the normal production of oil production, resulting in a decline in the production efficiency of oilfield enterprises.

[0003] The traditional fault detection method is to manually analyze the production data intuitively. This method is inefficient and the fault is not discovered in time. In recent years, digital oil fields and intelligent oil fields have become the development trend of modern oil fields. With the installation and operation of various data acquisition systems, major oil fields have realized the online collection of oil well production data all day long. The collected oil well production data is diversified, massive and diverse. At present, the oil well production data accumulated in oil fields has increased exponentially. These data contain important information about the working status of oil wells. During the production process, oil wells are affected by liquid, gas, sand, wax, etc., and components are gradually worn out, which eventually leads to faults. Production data will also change with the change of the degree of oil well wear. Therefore, it is worth in-depth study how to effectively warn of faults in the early stage and take countermeasures in advance. Summary of the invention

[0004] In view of the above problems, the present invention proposes an oil well operating condition fault early warning method and system, in an effort to solve or at least alleviate at least one of the above problems.

[0005] According to one aspect of the present invention, a method for early warning of oil well operating condition failure is provided, the method comprising the following steps:

[0006] S1. Collect historical production data of oil wells;

[0007] S2. Extract features from the historical production data to obtain a training sample data set;

[0008] S3, training improved fuzzy C-means clustering model based on training sample data set;

[0009] S4. Clustering the feature data corresponding to the production data to be measured using the trained improved fuzzy C-means clustering model to obtain the corresponding working condition category;

[0010] S5. When the operating condition category is a fault category, generate fault warning information.

[0011] Furthermore, the historical production data includes dynamometer diagram data, electrical parameter data, wellhead temperature data, oil well parameter data and wellhead pressure data.

[0012] Furthermore, the training sample data set in S2 includes extracted feature data and operating condition category labels; wherein, the feature data include: maximum load, minimum load, dynamometer area, displacement from opening point to closing point of floating valve, displacement from opening point to closing point of fixed valve, basic scale entropy of maximum load, basic scale entropy of minimum load, basic scale entropy of dynamometer area, basic scale entropy of displacement from opening point to closing point of floating valve, basic scale entropy of displacement from opening point to closing point of fixed valve; the operating condition category labels include normal operating condition and fault category, and the fault category includes floating valve leakage, fixed valve leakage, double pump leakage, unbalanced pumping unit, pipe leakage, and rod breakage.

[0013] Furthermore, the improvements of the improved fuzzy C-means clustering model described in S3 include: selection of initial cluster centers, improvement of the objective function, and improvement of the cluster center update process using the firefly algorithm.

[0014] Furthermore, the selection of the initial cluster center includes: calculating the distance between each sample in the training sample data set to generate a sample distance matrix; defining the two samples with the closest distance as one category, and selecting any one of the two samples as the initial cluster center of the first category; determining the minimum distance threshold between the samples based on the distance relationship between the samples; using the sample distance matrix to calculate other samples whose distances from the two samples in the first category are greater than the minimum distance threshold, defining the two closest points in these samples as one category, and defining any one of the two samples as the initial cluster center of the second category; similarly, finding samples whose distances from the determined samples are greater than the minimum distance threshold among the remaining samples, and selecting the two points with the shortest distance among these samples as one category, and selecting any one of the two samples as the initial cluster center of the category; repeating the above process until the set number of clusters is found.

[0015] Furthermore, the objective function is:

[0016]

[0017] In the formula, Y represents the sample data set; U represents the membership matrix of each sample in the sample data set to each cluster center; P represents the cluster center matrix; N represents the total number of sample data; C represents the total number of categories; μ ij represents the degree of membership; m represents the fuzzy weighted index; d ij Represents sample x j The same cluster center p of the i-th type i The Euclidean distance between ik represents the cluster center p of the i-th class iand the k-th cluster center p k The weighted distance between ik represents the influence of each cluster center, β∈[0,1].

[0018] Furthermore, the fuzzy C-means clustering model improved based on the training sample data set training in S3 includes:

[0019] Initialize algorithm parameters: set the number of clusters C, the number of samples N, the fuzzy index m, the iteration stop threshold ε, the step size factor α, and the maximum attraction β0;

[0020] Calculate the initial cluster center, i.e. the firefly position, based on the sample distance matrix and the minimum distance threshold;

[0021] According to the initial cluster center, calculate the Euclidean distance between the sample and the initial cluster center;

[0022] Calculate the membership matrix of each firefly according to the membership matrix formula based on the Euclidean distance;

[0023] The objective function is calculated according to the membership matrix and the position of the fireflies, and it is determined whether the difference between the maximum and minimum values ​​of the objective function is less than the iteration stop threshold ε. If so, the corresponding membership is calculated by the firefly with the smallest objective function value; otherwise, the attraction of the fireflies is calculated according to the attraction calculation formula, and the fireflies with large objective function values ​​move to the fireflies with small objective function values ​​according to the position update formula, and the membership matrix and objective function of each firefly are calculated repeatedly;

[0024] Output the clustering results and the cluster center corresponding to the maximum membership value in each category.

[0025] Furthermore, the membership matrix formula is:

[0026]

[0027] Furthermore, the attractiveness calculation formula is:

[0028]

[0029] In the formula, γ represents the absorption rate of light; r ab represents the Euclidean distance between the a-th firefly and the b-th firefly;

[0030] The position update formula is:

[0031]

[0032] In the formula, t represents the number of iterations; z a represents the position of the ath firefly; rand is and za A random vector of the same size, with a value range of [0, 1]; e is the same as z a A column vector of the same size with all elements set to 1.

[0033] According to another aspect of the present invention, an oil well operating condition fault early warning system is provided, the system comprising:

[0034] A data collection module configured to collect historical production data of oil wells;

[0035] A feature extraction module configured to extract features from the historical production data to obtain a training sample data set;

[0036] A model training module configured to train an improved fuzzy C-means clustering model based on a training sample data set;

[0037] A clustering module is configured to cluster feature data corresponding to the production data to be measured using a trained improved fuzzy C-means clustering model to obtain corresponding operating condition categories;

[0038] The fault warning module is configured to generate fault warning information when the operating condition category is a fault category.

[0039] The beneficial technical effects of the present invention are:

[0040] The present invention proposes a method and system for early warning of oil well working condition faults based on an improved fuzzy C-means clustering model. First, a 10-dimensional feature vector of oil well production data is extracted and the 10-dimensional feature is used to identify the oil wells that may fail through a fault early warning model based on improved fuzzy C-means clustering. The improved fuzzy C-means clustering algorithm avoids the disadvantage that the FCM clustering algorithm is prone to fall into local optimality by purposefully selecting the initial clustering center and improving the objective function, while ensuring the separation between clustering centers. Further, a global search method-firefly algorithm is added on this basis to optimize the calculation method of the clustering center, which can effectively find the global optimal solution. Experiments show that the addition of the firefly algorithm effectively improves the experimental accuracy of FCM, achieves the purpose of dimensionality reduction, and can provide new ideas for future algorithm research. The present invention can timely and accurately discover oil well faults and handle them in a timely manner without manual inspection, thereby improving work efficiency and facilitating management and supervision. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:

[0042] Figure 1is a flow chart of an oil well operating condition fault early warning method according to an embodiment of the present invention;

[0043] Figure 2 is a flow chart of an improved FCM algorithm in an embodiment of the present invention;

[0044] Figure 3 It is a structural block diagram of an oil well operating condition fault early warning system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0046] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, equipment, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software. In this article, it is to be understood that any number of elements in the drawings is for illustration and not limitation, and any naming is only for distinction and does not have any limiting meaning.

[0047] The embodiment of the present invention provides an oil well operating condition fault early warning method, such as Figure 1 As shown, the method comprises the following steps:

[0048] S1. Collect historical production data of oil wells;

[0049] S2. Extract features from the historical production data to obtain a training sample data set;

[0050] S3, training improved fuzzy C-means clustering model based on training sample data set;

[0051] S4. Clustering the feature data corresponding to the production data to be measured using the trained improved fuzzy C-means clustering model to obtain the corresponding working condition category;

[0052] S5. When the operating condition category is a fault category, generate fault warning information.

[0053] The method starts from S1. In S1, historical production data of oil wells are collected.

[0054] According to an embodiment of the present invention, production data is collected and acquired by RTU (Remote Terminal Unit), which is a remote measurement and control system responsible for monitoring and controlling field signals and industrial equipment. The collected data includes five categories: dynamometer data, electrical parameter data, wellhead temperature data, oil well parameter data and wellhead pressure data. The dynamometer data is collected once every half an hour. The dynamometer data is a two-dimensional array composed of load data and displacement data. Each dynamometer contains 200 sampling points, and the load data of each sampling point corresponds to the displacement data one by one. The temperature sensor installed at the wellhead can collect the wellhead temperature data, and the collection frequency is once every 5 minutes. The temperature data collected on site fluctuates greatly due to the influence of local temperature. The pressure data is collected by the pressure sensor installed at the wellhead, and the collection frequency is once every 5 minutes. The electrical parameter data is collected by the electrical parameter collection module, which is installed in the motor control box of the pumping unit. It is used to collect the current and voltage at the input end of the pumping unit and calculate the instantaneous electrical power. The collection frequency is once every half an hour, and the collection time is consistent with the dynamometer data collection time. The oil well parameter data include mass water content, pump depth, pump diameter, pump stroke, pump sprint, dynamic liquid level, etc.

[0055] After the above data is collected, it is transmitted to the central server through RTU, and then summarized by the central server and stored in the oilfield database for preservation.

[0056] Select some historical production data, after feature extraction processing, finally form a sample data set containing 16,000 records, which includes: 1) Feature data: maximum load, minimum load, dynamometer area, displacement from the opening point to the closing point of the floating valve, displacement from the opening point to the closing point of the fixed valve, basic scale entropy of maximum load, basic scale entropy of minimum load, basic scale entropy of dynamometer area, basic scale entropy of displacement from the opening point to the closing point of the floating valve, basic scale entropy of displacement from the opening point to the closing point of the fixed valve, a total of 10 dimensions; 2) Working condition label: seven working condition categories, including normal working condition, floating valve leakage, fixed valve leakage, double pump leakage, unbalanced pumping unit, pipe leakage, and rod breakage, of which the last six are all working condition failures. 85% of the sample data set is extracted as a training set, and the remaining 15% is used as a test set to verify the prediction effect of the model.

[0057] Then, S2 is executed, in which feature extraction is performed on the historical production data to obtain a training sample data set.

[0058] According to an embodiment of the present invention, feature extraction processing includes: extracting features reflecting the information of the dynamometer diagram from the dynamometer diagram data, including the maximum uplink load and the maximum downlink load, the minimum uplink load and the minimum downlink load, and the area of ​​the dynamometer diagram. The basic scale entropy feature can be calculated according to the following process: first, the data is vector-converted from 1 dimension to m dimension, then the m-dimensional vector is converted into a corresponding symbol sequence according to the basic scale parameter, and finally the relevant probability is counted from the symbol sequence and the basic scale entropy value is calculated.

[0059] Then, S3 is executed, in which an improved fuzzy C-means clustering model is trained based on the training sample data set.

[0060] According to an embodiment of the present invention, an improved fuzzy C-means clustering model is used to cluster known categories, obtain sample classification results and the cluster center of each category, and give each category a meaning through analysis.

[0061] The fuzzy C-means clustering (FCM) algorithm is an iterative soft clustering method. In the process of clustering objects, it does not simply divide the objects into a certain category, but calculates the probability of the objects belonging to all categories, allowing samples to belong to multiple clusters at the same time with different probabilities.

[0062] Assume that there are n elements in the sample set to be clustered, and the sample elements are represented by Y = {y1, y2, ..., y n},y i There are k characteristics, denoted by y i ={y i1 ,y i2 ,…,y ik} is called y i The eigenvector of the sample is U=[μ ij ]; where μ ij represents the jth sample y i For the degree of membership of the i-th class, the objective function of the fuzzy C-means clustering algorithm can be described as:

[0063]

[0064] The constraints are:

[0065]

[0066] In the formula, the objective function J m(Y,U,P) is the sum of squares of the Euclidean distances between samples and cluster centers, which is a dimensionless value; U represents the membership matrix of each sample in the sample set to each cluster center; P represents the cluster center matrix; m represents the fuzzy weighted index, which controls the fuzziness of the membership matrix. The larger m is, the higher the fuzziness; d ij Represents sample y i The same cluster center p i The Euclidean distance between .

[0067] The clustering process of the FCM clustering algorithm is the process of solving the minimization objective function. In the algorithm solution process, the membership values ​​between the sample and each cluster center are independent, so the solution to minimize the FCM objective function can be expressed as:

[0068]

[0069] The Lagrange multiplier method is used to solve the optimal solution of the above equation under the constraints of the membership function, which is expressed as:

[0070]

[0071] After obtaining the minimum value of the objective function, the sample membership matrix and cluster center of the sample set are obtained. The solution of the membership matrix and cluster center can be expressed as:

[0072]

[0073] Since each iteration of the algorithm is carried out in the direction of solving the minimum value of the objective function, and the objective function may have many local minimum values ​​in the iterative process, if the initial cluster center selected by initialization happens to be near the minimum value of a local area, the algorithm may converge to the local area, thereby obtaining a local optimal result, and cannot guarantee the global optimal clustering effect. The selection of the initial cluster center is too random, which will not only affect the clustering results, that is, fall into the local optimal situation, but also affect the entire clustering iteration process, that is, the objective function value changes rapidly in the early stage of the iteration. Moreover, the objective function of the traditional FCM algorithm only considers the distance relationship between the sample and the cluster center, and does not consider the separation distance relationship between the cluster centers, which is easy to produce unsatisfactory clustering results.

[0074] Therefore, the embodiments of the present invention make the following improvements.

[0075] First, the initial cluster center is selected by the following method: the distance between each sample is calculated to generate a sample distance matrix, the two samples with the closest distance are classified as one class, and any one of the two samples is selected as the first class initial cluster center; then, according to the distance relationship between the samples, the minimum distance threshold between the samples is determined, and the sample distance matrix is ​​used to calculate other samples whose distances from the two samples in the first class are greater than the minimum distance threshold, and the two points closest to these samples are classified as one class, and any one of the two samples is defined as the second class initial cluster center; similarly, find samples whose distances from the determined samples are greater than the minimum distance threshold among the remaining samples, and select the two points with the shortest distance among these samples as one class, and select any one of the two samples as the initial cluster center of this class; repeat the above process until the set number of clusters C is found.

[0076] The initial clustering center is selected according to the above process. After the initial clustering center of the first category is determined, the remaining samples are judged by combining the sample distance matrix and the minimum distance threshold. The initial clustering centers of other categories are selected from the remaining samples in turn to achieve the purpose of selecting multiple feasible domains of samples.

[0077] Secondly, the objective function of the traditional FCM clustering algorithm represents the distance relationship between each sample and the cluster center, but does not consider the influence relationship between the cluster centers of each category. The embodiment of the present invention comprehensively considers the influence of the distance relationship between each type of sample to the cluster center and the distance relationship between the cluster centers on the clustering results, while ensuring the compactness of samples in the same category, ensuring a certain degree of separation between different categories, and can better avoid the situation where the clustering result is a local optimal solution. The improved objective function is as follows:

[0078]

[0079] In the formula, μ ij represents the degree of membership of the node to the category; p i represents the cluster center of the i-th category, i = 1, 2, 3, ..., C; η ik represents the influence of each cluster center, β∈[0,1]; Y represents the sample data set; U represents the membership matrix of each sample in the sample data set to each cluster center; P represents the cluster center matrix; N represents the total number of sample data; C represents the total number of categories; μ ij represents the degree of membership; m represents the fuzzy weighted index; d ij Represents sample x j The same cluster center p of the i-th type i The Euclidean distance between ik represents the cluster center p of the i-th class i and the k-th cluster center pk The weighted distance between them; when β = 0, the objective function does not consider the influence between cluster centers.

[0080] The Lagrange multiplier method is also used to solve the minimum value of the above objective function, and the update formula of the membership matrix and cluster center is obtained as follows:

[0081]

[0082] Furthermore, since it is easy to obtain a local optimal solution when calculating the location of the cluster center in the FCM algorithm, the firefly algorithm (FA) is used to increase the probability of obtaining a global optimal solution.

[0083] The FA algorithm evaluates the quality of the firefly's location based on the intensity of its luminescence. The location of a firefly with higher brightness is better and more attractive. Fireflies with lower brightness move towards those with higher brightness, while fireflies with the same brightness move randomly. Brightness and attractiveness are two key elements of the firefly algorithm.

[0084] Assume z a represents the position of the a-th firefly, r ab represents the Euclidean distance between the a-th firefly and the b-th firefly. The brightness of firefly b as seen by firefly a is expressed as the following brightness calculation formula:

[0085]

[0086] In the formula, γ represents the absorption rate of light;

[0087] The attraction of firefly b to firefly a is expressed as the following attraction calculation formula:

[0088]

[0089] Where β0 is r ab = Maximum attraction when 0.

[0090] Update the position of the ath firefly according to the following position update formula based on the attraction and the position of the bth firefly:

[0091]

[0092] Among them, α is the step size factor, which is a constant in the range of [0,1]; t represents the number of iterations; z a represents the position of the ath firefly; rand is and z a A random vector of the same size, with a value range of [0, 1]; e is the same as z a A column vector of the same size with all elements set to 1.

[0093] The search process of FA can be described as follows: after initializing the positions of all fireflies, the firefly brightness is calculated according to the objective function and brightness formula to determine the firefly with the highest brightness seen; the attraction is calculated using the attraction formula, the firefly position is updated according to the position update formula, the brightness and attraction are recalculated using the new position and moved again until the maximum number of moves is met or the objective function converges, the iterative calculation is stopped, the final position of each firefly is obtained, and the global optimal solution is obtained.

[0094] In an embodiment of the present invention, the movement process of fireflies replaces the calculation process of cluster centers. After obtaining the coordinates of cluster centers, the calculated objective function can be directly used as a basis for judgment. Fireflies with large objective function values ​​move toward fireflies with small objective function values. The cluster center matrix is ​​used as the position of a firefly, and a column in the matrix is ​​the coordinate of a cluster center.

[0095] In summary, if Figure 2 As shown in Figure 1, the process of training the improved fuzzy C-means clustering model based on the training sample data set is as follows:

[0096] 11) Initialize algorithm parameters: set the number of clusters C, the number of samples N, the fuzzy index m, the iteration stop threshold ε, the step size factor α, and the maximum attraction β0;

[0097] 12) Calculate the initial cluster center, i.e., the firefly position, based on the sample distance matrix and the minimum distance threshold;

[0098] 13) According to the initial cluster center, calculate the Euclidean distance between the sample and the initial cluster center;

[0099] 14) Calculate the membership matrix of each firefly according to the Euclidean distance according to formula (7);

[0100] 15) Calculate the objective function according to the membership matrix and the firefly position, and determine whether the difference between the maximum and minimum values ​​of the objective function is less than the iteration stop threshold ε. If so, calculate the corresponding membership by the firefly with the smallest objective function value; otherwise, calculate the attraction of the firefly according to formula (10), and the firefly with a large objective function value moves to the firefly with a small objective function value according to formula (11), and repeat steps 14) to 15);

[0101] 16) Output the clustering results, i.e., categories, and the cluster center corresponding to the maximum membership value in each category.

[0102] Then, S4 is executed. In S4, the trained improved fuzzy C-means clustering model is used to cluster the feature data corresponding to the production data to be measured, and the corresponding working condition category is obtained.

[0103] According to an embodiment of the present invention, unknown test samples are clustered using cluster centers obtained through training, and the degree of membership of each sample to each cluster center is calculated, thereby determining the category to which the sample belongs.

[0104] Then, S5 is executed. In S5, when the operating condition category is a fault category, fault warning information is generated.

[0105] According to an embodiment of the present invention, fault warning information is generated and published to a predetermined communication range, wherein the fault warning information includes: an ID of an oil well where a fault occurs and a corresponding fault category.

[0106] The technical effect of the present invention is further verified through experiments.

[0107] The test set is clustered using the improved fuzzy C-means clustering model of the embodiment of the present invention. The value range of each feature in the test set is set to correspond to different categories, the core number is set to 3, the fuzzy weighted index m is set to 2, and the membership matrix and three categories of cluster centers are obtained: normal state V1, warning period V2, and fault V3. Table 1 is the clustering result of the test set, where the values ​​in the table represent the membership of each sample to each category after clustering, and the samples are classified according to the maximum membership principle. It can be seen from the clustering results of Table 1 that the improved fuzzy C-means clustering model of the embodiment of the present invention can well distinguish different working conditions of oil wells.

[0108] Table 1

[0109]

[0110] The traditional fuzzy C-means clustering model and the improved fuzzy C-means clustering model are compared in early warning experiments to compare the recognition effects of the early warning models under different clustering algorithms. Table 2 compares the recognition results of the two clustering algorithms. It can be found through experiments that the improved fuzzy C-means clustering model of the embodiment of the present invention can reach more than 90% in early warning accuracy.

[0111] Table 2

[0112]

[0113] Another embodiment of the present invention provides an oil well operating condition fault early warning system, such as Figure 3 As shown, the system includes:

[0114] A data collection module 310 configured to collect historical production data of oil wells;

[0115] A feature extraction module 320, configured to extract features from the historical production data to obtain a training sample data set;

[0116] A model training module 330, which is configured to train an improved fuzzy C-means clustering model based on a training sample data set;

[0117] A clustering module 340 is configured to cluster the feature data corresponding to the production data to be measured using the trained improved fuzzy C-means clustering model to obtain the corresponding operating condition category;

[0118] The fault warning module 350 is configured to generate fault warning information when the operating condition category is a fault category.

[0119] The function of the oil well operating condition fault warning system described in this embodiment can be explained by the aforementioned oil well operating condition fault warning method. For the parts not described in detail in this embodiment, please refer to the above method embodiment.

[0120] It should be noted that, although several units, modules or submodules are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided into being embodied by multiple modules.

[0121] In addition, although the operations of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0122] Although the spirit and principle of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.

Claims

1. A method for early warning of oil well operating condition failure, characterized in that: The following steps are involved: S1. Collect historical production data of oil wells; S2. Extract features from the historical production data to obtain a training sample data set; S3, training improved fuzzy C-means clustering model based on training sample data set; S4. Clustering the feature data corresponding to the production data to be measured using the trained improved fuzzy C-means clustering model to obtain the corresponding working condition category; S5. When the operating condition category is a fault category, generate fault warning information.

2. The oil well operating condition fault early warning method according to claim 1, characterized in that: The historical production data includes dynamometer diagram data, electrical parameter data, wellhead temperature data, oil well parameter data and wellhead pressure data.

3. The oil well operating condition fault early warning method according to claim 1, characterized in that: The training sample data set in S2 includes extracted feature data and operating condition category labels; wherein, the feature data include: maximum load during oil well production, minimum load, dynamometer area, displacement from opening point to closing point of floating valve, displacement from opening point to closing point of fixed valve, basic scale entropy of maximum load, basic scale entropy of minimum load, basic scale entropy of dynamometer area, basic scale entropy of displacement from opening point to closing point of floating valve, basic scale entropy of displacement from opening point to closing point of fixed valve; the operating condition category labels include normal operating condition and fault category, and the fault category includes floating valve leakage, fixed valve leakage, double pump leakage, unbalanced pumping unit, pipe leakage, and rod breakage.

4. The oil well operating condition fault early warning method according to claim 1, characterized in that: The improvements of the improved fuzzy C-means clustering model described in S3 include: the selection of initial cluster centers, the improvement of the objective function, and the use of the firefly algorithm to improve the update process of the cluster centers.

5. The oil well operating condition fault early warning method according to claim 4, characterized in that: The selection of the initial cluster center includes: calculating the distance between each sample in the training sample data set to generate a sample distance matrix; defining the two samples with the closest distance as one category, and selecting any one of the two samples as the initial cluster center of the first category; determining the minimum distance threshold between the samples according to the distance relationship between the samples; using the sample distance matrix to calculate other samples whose distances from the two samples in the first category are greater than the minimum distance threshold, defining the two points with the closest distance in these samples as one category, and defining any one of the two samples as the initial cluster center of the second category; similarly, finding samples whose distances from the determined samples are greater than the minimum distance threshold in the remaining samples, and selecting the two points with the shortest distance in these samples as one category, and selecting any one of the two samples as the initial cluster center of the category; repeating the above process until the set number of clusters is found.

6. The oil well operating condition fault early warning method according to claim 5, characterized in that: The objective function is: In the formula, Y represents the sample data set; U represents the membership matrix of each sample in the sample data set to each cluster center; P represents the cluster center matrix; N represents the total number of sample data; C represents the total number of categories; μ ij represents the degree of membership; m represents the fuzzy weighted index; d ij Represents sample x j The same cluster center p i The Euclidean distance between ik represents the cluster center p of the i-th class i and the k-th cluster center p k The weighted distance between them; η ik represents the influence of each cluster center, β∈[0,1].

7. The oil well operating condition fault early warning method according to claim 6, characterized in that: The fuzzy C-means clustering model improved based on the training sample data set described in S3 includes: Initialize algorithm parameters: set the number of clusters C, the number of samples N, the fuzzy index m, the iteration stop threshold ε, the step size factor α, and the maximum attraction β0; Calculate the initial cluster center, i.e. the firefly position, based on the sample distance matrix and the minimum distance threshold; According to the initial cluster center, calculate the Euclidean distance between the sample and the initial cluster center; Calculate the membership matrix of each firefly according to the membership matrix formula based on the Euclidean distance; The objective function is calculated according to the membership matrix and the position of the fireflies, and it is determined whether the difference between the maximum and minimum values ​​of the objective function is less than the iteration stop threshold ε. If so, the corresponding membership is calculated by the firefly with the smallest objective function value; otherwise, the attraction of the fireflies is calculated according to the attraction calculation formula, and the fireflies with large objective function values ​​move to the fireflies with small objective function values ​​according to the position update formula, and the membership matrix and objective function of each firefly are calculated repeatedly; Output the clustering results and the cluster center corresponding to the maximum membership value in each category.

8. The oil well operating condition fault early warning method according to claim 7, characterized in that: The membership matrix formula is:

9. The oil well operating condition fault early warning method according to claim 8, characterized in that: The attractiveness calculation formula is: In the formula, γ represents the absorption rate of light; r ab represents the Euclidean distance between the a-th firefly and the b-th firefly; The position update formula is: In the formula, t represents the number of iterations; z a represents the position of the ath firefly; rand is and z a A random vector of the same size, with a value range of [0, 1]; e is the same as z a Column vectors of the same size with all elements set to 1.

10. An oil well operating condition fault early warning system, characterized in that: include: A data collection module configured to collect historical production data of oil wells; A feature extraction module configured to extract features from the historical production data to obtain a training sample data set; A model training module configured to train an improved fuzzy C-means clustering model based on a training sample data set; A clustering module is configured to cluster feature data corresponding to the production data to be measured using a trained improved fuzzy C-means clustering model to obtain corresponding operating condition categories; The fault warning module is configured to generate fault warning information when the operating condition category is a fault category.

Citation Information

Patent Citations

  • Red tide early-warning method based on graph model construction

    CN108446802A

  • AC asynchronous motor fault diagnosis method based on improved fuzzy C-means clustering

    CN111538960A

  • Product quality prediction method and device of RBF model based on firefly algorithm optimization

    CN113361751A

  • Oil pumping unit fault diagnosis method based on structural information preserving domain adaptation network

    CN114817856A

  • Apparatuses, systems, and methodologies for permeability prediction

    US20180018561A1

Cited By

  • Pantograph crack detection method and system based on multi-sensor data fusion

    CN120214639A