Adaptive soft-sensing method for water content in crude oil based on incremental Gaussian mixture regression
By introducing an incremental Gaussian mixed regression model during oil production and updating components using SKLD value, the problem of decreasing detection accuracy of crude oil moisture content during oil production is solved, efficient adaptive prediction and model update are achieved, and the oil production process is improved Control quality.
Patent Information
- Application Number
- CN202111521026.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2041-12-13
AI Technical Summary
During the oil production process, it is difficult to achieve real-time accurate measurement of crude oil moisture content online detection, and the soft measurement model trained by historical samples cannot match the current oil production process of changing states, resulting in a decrease in prediction accuracy. The existing adaptive update method has limitations.
Adaptive soft measurement method based on incremental Gaussian hybrid regression is adopted to collect historical data and real-time data, establish and update the Gaussian hybrid regression model, and use SKLD value to judge component fusion to realize adaptive update of the model, reducing prediction errors and over- Fit.
It improves the update efficiency and prediction accuracy of the model, alleviates the overfitting problem of soft measurements, realizes real-time adaptive prediction of crude oil moisture content, and reduces database storage space and training time.
Smart Images

Figure CN114239264B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of prediction and control of the water content of crude oil in an oil production process, and in particular to an adaptive soft measurement method for the water content of crude oil based on incremental Gaussian mixture regression. Background Art
[0002] The water content of crude oil is one of the important measurement parameters in the process of crude oil extraction and production, and it is also an important indicator for evaluating the production capacity of oil wells and oil fields. With the rapid development of the oil industry and the surging oil production year by year, the development of oil fields in my country has also entered the stage of high water content or even ultra-high water content in recent years. The water content in the output fluid is large and the water content is high. In order to timely understand and grasp the production status of the oil production process so as to carry out targeted fracturing or water injection of underground reservoirs, guide the execution of subsequent production plans, ensure that the oil wells are always in the best production state, and ultimately achieve the purpose of improving the development efficiency of oil wells and improving the recovery efficiency of crude oil, the measurement of the water content of crude oil has become extremely urgent. In the actual production process of the oil production industry, the water content of crude oil cannot be detected online, and it is difficult to measure it accurately in real time under the current technical conditions. In order to solve this problem, through the variables that are relatively easy to detect in the acquisition process, according to a certain optimal criterion, a mathematical model with these variables as input and the water content of crude oil as output is constructed to realize the online estimation of the water content of crude oil. This is the soft measurement technology commonly used in the oil production industry.
[0003] The development of soft sensor modeling methods has a significant demand for large-scale industrial data. Among them, the Gaussian mixture regression model can well solve the nonlinearity and non-Gaussianity in the industrial process and is widely used in the prediction of quality variables in the industrial process. However, there are still some problems in the soft sensor modeling process. For example, in the oil production process, due to various factors such as changes in the process environment state, aging of platform instruments and equipment, and degradation of catalyst activity, the operating conditions often change, and the physical and chemical properties of the process are in constant change, which easily leads to the continuous decline in the accuracy of the offline soft sensor model. The modeling data represents the past state and operating condition information of the oil production process. The soft sensor model trained on historical samples cannot match the current oil production process that has undergone state changes, so it cannot accurately predict the output variable value (crude oil water content). In order to correctly track the state of the oil production process, the model needs to be updated and corrected in a timely adaptive manner. In view of the time-varying characteristics of the oil production process, some experts have proposed effective strategies such as recursive method, sliding window method and real-time learning method, but there are also certain limitations. Summary of the invention
[0004] The purpose of the present invention is to provide an adaptive soft measurement method for the water content of crude oil based on incremental Gaussian mixture regression, which introduces the idea of increment into the incremental Gaussian mixture regression model to help the model adapt to new data in the online oil production process, thereby realizing adaptive soft measurement of the water content of crude oil in the oil production process; so as to solve the shortcomings of the commonly used model adaptive update method.
[0005] To achieve the above object, the present invention provides an adaptive soft sensing method for water content in crude oil based on incremental Gaussian mixture regression, which is characterized by comprising the following steps:
[0006] S1. Collect historical oil production process data as training data set P(x, y)∈R n×m , x is the input auxiliary variable, y is the water content of crude oil, n is the number of samples, m is the number of variables, and R is a real number set;
[0007] S2. Standardize the oil production process training data set P collected in step S1: convert it into a data set with a mean of 0 and a variance of 1
[0008] S3. Using the standardized new data set of oil production process Establish a Gaussian mixture regression model offline to predict the water content of crude oil;
[0009] S4: After the collected real-time oil production process data is standardized, the quality of the new data is predicted using step S3 and the predicted value of the water content of the crude oil is output. Laboratory sampling to obtain the true output of crude oil water content new After that, the sample data is collected into a new data set Z; when the data volume of Z is greater than the preset value m, a new Gaussian mixture regression model is trained through step S3 to fit the data set Z, and only the model parameters and the number of training data need to be stored in the historical database;
[0010] S5. In order to update the historical model according to the information contained in the new data of the oil production process, the SKLD value between the components of the historical Gaussian mixture regression model and the newly created Gaussian mixture model is first calculated to determine whether the SKLD value exceeds a threshold value η. If the SKLD value exceeds the threshold value, the components cannot be fused, but if the SKLD value is less than the threshold value, the components can be fused.
[0011] S6. As new data of the oil production process flows in, steps S4 and S5 are continuously repeated to achieve adaptive quality prediction of the water content of the crude oil during the oil production process.
[0012] Preferably, in step S3, the Bayesian Information Criterion BIC value is calculated to determine the optimal number of Gaussian components K of the model, and a set of initial parameters is given. Use the expected maximum EM algorithm to learn the parameters of the model;
[0013] The formula for iteratively updating parameter values of the EM algorithm is:
[0014]
[0015]
[0016]
[0017] in and They represent the mean, covariance, and prior probability of the sample belonging to the kth Gaussian component at the qth iteration; p (q) (C k |w i ) is the posterior probability that the i-th training sample belongs to the k-th Gaussian component; until the maximum likelihood objective function converges, the estimation of the Gaussian mixture regression model parameters is completed; the mean vector and covariance matrix of each component of the model are expressed as:
[0018]
[0019] In each model component, the conditional probability distribution of the crude oil water content y given the auxiliary variable x is calculated as follows:
[0020]
[0021] The mean vector Covariance matrix The conditional probability distribution of crude oil water content y is:
[0022]
[0023] in It is expressed as the posterior probability that the training sample x belongs to the kth Gaussian component. After collecting the auxiliary variable x of the new data, the water content of crude oil is predicted by the soft sensor model as follows:
[0024]
[0025] The number of modeling data n and the local model parameters Stored in the historical database, no need to save historical data.
[0026] Preferably, in step S5, the SKLD value calculation formula is as follows:
[0027]
[0028]
[0029] Where φ1 and φ2 represent the components of the original and newly created Gaussian mixture models, μ and ∑ represent the mean vector and covariance matrix of the Gaussian mixture model components, and D represents the dimension of the variable;
[0030] When the SKLD value is less than the threshold η, the original model component j and the newly created model component k are considered statistically equivalent and merged into a new component;
[0031] The parameter update formula for the new component is as follows:
[0032]
[0033]
[0034]
[0035] When the SKLD value is greater than the threshold η, it is judged that the original model component j and the newly created model component k are not statistically equivalent, so the respective mean vector μ and covariance matrix ∑ are kept unchanged, and the weights of the respective components are updated.
[0036] Weight The update formula is as follows:
[0037] When the current component belongs to a newly created model:
[0038] When the current component belongs to the original model:
[0039] Aiming at the strong time-varying characteristics in the oil production process, the present invention introduces the idea of increment into the Gaussian mixture regression model, and proposes an adaptive soft measurement method for the water content of crude oil based on the incremental Gaussian mixture regression model to adapt to new data in the online environment of the oil production industry. The traditional Gaussian mixture regression model is expanded into an adaptive soft measurement model. Compared with other traditional adaptive soft measurement models, the advantages of the present invention are mainly reflected in alleviating the overfitting of soft measurement, reducing prediction errors, and improving the updating efficiency of the model.
[0040] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a step diagram of the adaptive soft measurement method of crude oil water content based on incremental Gaussian mixture regression of the present invention;
[0042] Figure 2 It is a schematic diagram of the modeling of the adaptive soft-sensing method for water content in crude oil based on incremental Gaussian mixture regression of the present invention;
[0043] Figure 3It is a process structure diagram of the oil production industry of the adaptive soft measurement method of crude oil water content based on incremental Gaussian mixture regression of the present invention;
[0044] Figure 4 It is a prediction output result diagram of the crude oil water content adaptive soft measurement method based on incremental Gaussian mixture regression of the present invention;
[0045] Figure 5 This is the predicted output result graph of the sliding window Gaussian mixture regression model;
[0046] Figure 6 A plot of the prediction output of the instantaneously learned Gaussian mixture regression model. DETAILED DESCRIPTION
[0047] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0048] An adaptive soft sensing method for water content in crude oil based on incremental Gaussian mixture regression includes the following steps:
[0049] S1. Collect historical oil production process data as training data set P(x, y)∈R n×m , x is the input auxiliary variable, y is the water content of crude oil, n is the number of samples, m is the number of variables, and R is a real number set.
[0050] S2. Standardize the oil production process training data set P collected in step S1: convert it into a data set with a mean of 0 and a variance of 1
[0051] S3. Using the standardized new data set of oil production process The Gaussian mixture regression model was built offline.
[0052] First, calculate the Bayesian Information Criterion BIC value, determine the optimal number of Gaussian components K of the model, and give a set of initial parameters Use the expected maximum EM algorithm to learn the parameters of the model;
[0053] The formula for iteratively updating parameter values of the EM algorithm is:
[0054]
[0055]
[0056]
[0057] in and They represent the mean, covariance, and prior probability of the sample belonging to the kth Gaussian component at the qth iteration; p (q) (C k |wi ) is the posterior probability that the i-th training sample belongs to the k-th Gaussian component; until the maximum likelihood objective function converges, the estimation of the Gaussian mixture regression model parameters is completed. The mean vector and covariance matrix of each component of the model are expressed as:
[0058]
[0059] In each model component, the conditional probability distribution of the crude oil water content y given the auxiliary variable x is calculated as follows:
[0060]
[0061] The mean vector Covariance matrix The conditional probability distribution of crude oil water content y is:
[0062]
[0063] in It is expressed as the posterior probability that the training sample x belongs to the kth Gaussian component. After collecting the auxiliary variable x of the new data, the water content of crude oil is predicted by the soft sensor model as follows:
[0064]
[0065] The number of modeling data n and the local model parameters Stored in the historical database, no need to save historical data.
[0066] S4: After the collected real-time oil production process data is standardized, the quality of the new data is predicted using step S3 and the predicted value of the water content of the crude oil is output. Laboratory sampling to obtain the true output of crude oil water content new After that, the sample data is collected into a new data set Z; the root mean square error RMSE is used to quantitatively evaluate the performance of the soft sensor model.
[0067]
[0068] Where i = 1, 2, ..., N, N represents the total length of the test data set, Y i and They represent the true value and predicted value of the crude oil water content variable respectively;
[0069] When the data volume of Z is greater than the preset value m, a new Gaussian mixture regression model is trained through step S3 to fit the data set Z, and only the model parameters and the number of training data need to be stored in the historical database.
[0070] S5. In order to update the historical model according to the information contained in the new data of the oil production process, the SKLD (Symmetric Kullback-Leibler Divergence) value between the components of the historical Gaussian mixture regression model and the newly created Gaussian mixture model is first calculated to determine whether the SKLD value exceeds the threshold η. If it exceeds the threshold, the components cannot be fused, but if it is less than the threshold, they can be fused.
[0071] The SKLD value calculation formula is as follows:
[0072]
[0073]
[0074] Where φ1 and φ2 represent the components of the original and newly created Gaussian mixture models, μ and ∑ represent the mean vector and covariance matrix of the Gaussian mixture model components, and D represents the dimension of the variable;
[0075] When the SKLD value is less than the threshold η, it is judged that the original model component j and the newly created model component k are statistically equivalent and can be merged into a new component.
[0076] The parameter update formula for the new component is as follows:
[0077]
[0078]
[0079]
[0080] When the SKLD value is greater than the threshold η, it is judged that the original model component j and the newly created model component k are not statistically equivalent, so the respective mean vector μ and covariance matrix ∑ are kept unchanged, and the weights of the respective components are updated.
[0081] Weight The update formula is as follows:
[0082] When the current component belongs to a newly created model:
[0083] When the current component belongs to the original model:
[0084] S6. As new data of the oil production process flows in, steps S4 and S5 are continuously repeated to achieve adaptive quality prediction of the water content of the crude oil during the oil production process.
[0085] The water content of crude oil of new data is predicted using a historical Gaussian mixture regression model, while new labeled data is collected. When the new data reaches the set value, the historical model is updated incrementally to achieve adaptive quality prediction of the oil production industry process. The idea of increment can be interpreted as a data stream clustering method based on probability density, which means that a learning system can continuously learn new knowledge from new samples and save previously learned knowledge. The advantage of the method of the present invention is that the update process discards historical data, and only the number of historical data and model parameters need to be saved, thereby greatly reducing the storage space occupied by the database; at the same time, the model parameters established using historical data are updated, which significantly reduces the time for subsequent training.
[0086] Example
[0087] The following example of an actual oil production process is used to illustrate the performance of the incremental Gaussian mixture regression model.
[0088] In the actual oil production process, the use of offline manual measurement methods has the advantages of high accuracy and precision, but due to its long sampling interval and small single sampling volume, the collected samples are not representative and have high randomness. In addition, the offline manual method requires a lot of manpower and material resources, and cannot meet the trend of oil field digitalization and automation development. The use of online measurement methods is also expensive and not conducive to large-scale promotion, as well as difficult to use and maintain. In order to improve the control quality of the oil production process and reduce the measurement cost, it is necessary to establish an adaptive soft measurement model for the water content of crude oil in the oil production process. Table 1 shows the key quality variable of crude oil water content and the selected 10 auxiliary variables.
[0089] Table 1 Sample variable description
[0090] Label name U1 Oil well casing pressure U2 Sensitive probe output voltage value U3 Injection volume of injection well U4 Injection well injection pressure U5 Oil wellhead pressure U6 Oil wellhead temperature U7 Instantaneous flow rate of oil wellhead U8 Water mineralization value U9 Oil drilling machine stroke U10 Oil drilling machine stroke times Y Crude oil water content
[0091] For the oil production process, 7000 process data were collected at equal time intervals. The first 1000 data were taken as the initial training samples for modeling in time sequence, and then the crude oil water content value of the new sample was predicted and the model was updated with different update step sizes to achieve the best prediction effect. In order to verify the adaptive soft measurement method for crude oil water content of the present invention, the commonly used soft measurement update methods: sliding window and real-time learning were compared. The prediction accuracy and running time of the three methods of the present invention, sliding window Gaussian mixture regression model and real-time learning Gaussian mixture regression model at the best effect are shown in Table 2. The running results of the three methods are shown in Table 2. Figure 4 , Figure 5 , Figure 6 shown.
[0092] Table 2 Prediction results and calculation time of three adaptive update methods
[0093]
[0094] contrast Figure 4 and Figure 5 It can be seen that the prediction effect of the incremental Gaussian mixture regression model is significantly better than that of the sliding window Gaussian mixture regression model. The reason is that the sliding window Gaussian mixture regression model only uses the most recent data to build a model each time, and discards the past data information, resulting in poor prediction effect on the mutation process. Figure 4 and Figure 6 By comparison, it can be found that the instant learning Gaussian mixture regression model has a poor effect in the early stage of prediction. The reason is that the number of historical samples in the early stage of prediction is small, and it is difficult to select a suitable data set for modeling. As the number of historical samples increases, both methods achieve better results because both methods preserve the information of historical data more completely. In general, the prediction accuracy of the incremental Gaussian mixture regression model of the present invention is higher.
[0095] Table 2 gives a comparison of the prediction effect and calculation time of the three adaptive update methods. From the perspective of prediction accuracy, the method of the present invention has a relatively better performance in prediction accuracy. Compared with the sliding window Gaussian mixture regression model, the RMSE is reduced by 0.77787, and compared with the instant learning Gaussian mixture regression model, the RMSE is reduced by 0.11601. From the perspective of update time, since the update process of the method of the present invention only requires historical model parameters, the number of historical data, and the newly trained model parameters and sample number, there is no need to retrain the model with a large amount of historical data, thereby greatly improving the update efficiency.
[0096] Therefore, the present invention adopts the above-mentioned adaptive soft measurement method of crude oil water content based on incremental Gaussian mixture regression, introduces the idea of increment into the incremental Gaussian mixture regression model, helps the model adapt to new data in the online oil production process, and realizes adaptive soft measurement of crude oil water content in the oil production process; it can solve the shortcomings of commonly used model adaptive update methods.
[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. An adaptive soft-sensing method for water content in crude oil based on incremental Gaussian mixture regression, characterized in that: The following steps are involved: S1. Collect historical oil production process data as training data set P(x, y)∈R n×m , x is the input auxiliary variable, y is the water content of crude oil, n is the number of samples, m is the number of variables, and R is a real number set; S2. Standardize the oil production process training data set P collected in step S1: convert it into a data set with a mean of 0 and a variance of 1 S3. Using the standardized new data set of oil production process Establish a Gaussian mixture regression model offline to predict the water content of crude oil; S4: After the collected real-time oil production process data is standardized, the quality of the new data is predicted using step S3 and the predicted value of the water content of the crude oil is output. Laboratory sampling to obtain the true output of crude oil water content new After that, the sample data is collected into a new data set Z; when the data volume of Z is greater than the preset value m, a new Gaussian mixture regression model is trained through step S3 to fit the data set Z, and only the model parameters and the number of training data need to be stored in the historical database; S5. In order to update the historical model according to the information contained in the new data of the oil production process, the SKLD value between the components of the historical Gaussian mixture regression model and the newly created Gaussian mixture model is first calculated to determine whether the SKLD value exceeds a threshold value η. If the SKLD value exceeds the threshold value, the components cannot be fused, but if the SKLD value is less than the threshold value, the components can be fused. S6. As new data of the oil production process flows in, steps S4 and S5 are continuously repeated to achieve adaptive quality prediction of the water content of the crude oil during the oil production process.
2. The method for adaptive soft sensing of water content in crude oil based on incremental Gaussian mixture regression according to claim 1 is characterized in that: In step S3, the Bayesian Information Criterion BIC value is calculated to determine the optimal number of Gaussian components K of the model and give a set of initial parameters Use the expected maximum EM algorithm to learn the parameters of the model; The formula for iteratively updating parameter values of the EM algorithm is: in and They represent the mean, covariance, and prior probability of the sample belonging to the kth Gaussian component at the qth iteration; p (q) (C k |w i ) is the posterior probability that the i-th training sample belongs to the k-th Gaussian component; until the maximum likelihood objective function converges, the estimation of the Gaussian mixture regression model parameters is completed; the mean vector and covariance matrix of each component of the model are expressed as: In each model component, the conditional probability distribution of the crude oil water content y given the auxiliary variable x is calculated as follows: The mean vector Covariance matrix The conditional probability distribution of crude oil water content y is: in It is expressed as the posterior probability that the training sample x belongs to the kth Gaussian component. After collecting the auxiliary variable x of the new data, the water content of crude oil is predicted by the soft sensor model as follows: The number of modeling data n and the local model parameters Stored in the historical database, no need to save historical data.
3. The method for adaptive soft sensing of crude oil water content based on incremental Gaussian mixture regression according to claim 1 is characterized in that: In step S5, the SKLD value calculation formula is as follows: Where φ1 and φ2 represent the components of the original and newly created Gaussian mixture models, μ and ∑ represent the mean vector and covariance matrix of the Gaussian mixture model components, and D represents the dimension of the variable; When the SKLD value is less than the threshold η, the original model component j and the newly created model component k are considered statistically equivalent and merged into a new component; The parameter update formula for the new component is as follows: When the SKLD value is greater than the threshold η, it is judged that the original model component j and the newly created model component k are not statistically equivalent, so the respective mean vector μ and covariance matrix ∑ are kept unchanged, and the weights of the respective components are updated. Weight The update formula is as follows: When the current component belongs to a newly created model: When the current component belongs to the original model:
Citation Information
Patent Citations
An oil well working fluid level self-adaptive prediction method based on fuzzy evaluation
CN109740661A
Self-adaptive soft measurement method based on semi-supervised incremental Gaussian mixture regression
CN112650063A