CN110029986B - Beam-pumping unit working fluid level prediction method based on particle swarm extreme learning machine - Google Patents
Beam-pumping unit working fluid level prediction method based on particle swarm extreme learning machine Download PDFInfo
- Publication number
- CN110029986B CN110029986B CN201910302780.8A CN201910302780A CN110029986B CN 110029986 B CN110029986 B CN 110029986B CN 201910302780 A CN201910302780 A CN 201910302780A CN 110029986 B CN110029986 B CN 110029986B
- Authority
- CN
- China
- Prior art keywords
- data
- learning machine
- extreme learning
- particle swarm
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- E—FIXED CONSTRUCTIONS
- E21—EARTH DRILLING; MINING
- E21B—EARTH DRILLING, e.g. DEEP DRILLING; OBTAINING OIL, GAS, WATER, SOLUBLE OR MELTABLE MATERIALS OR A SLURRY OF MINERALS FROM WELLS
- E21B47/00—Survey of boreholes or wells
- E21B47/04—Measuring depth or liquid level
- E21B47/047—Liquid level
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
Abstract
The invention provides a method for predicting the working fluid level of a beam-pumping unit based on a particle swarm extreme learning machine, which comprises the following steps: collecting historical working fluid level data through an oil pumping well; carrying out data preprocessing; inputting the test data into an extreme learning machine model to obtain a dynamic liquid level prediction value of the extreme learning machine; taking the root mean square error as an adaptive value of the particle swarm algorithm; optimizing the weight w and the deviation b of a parameter input layer of the limit learning machine by adopting a particle swarm algorithm to obtain an optimal value in a global range; obtaining a dynamic liquid level prediction model based on a particle swarm optimization extreme learning machine; and inputting the preprocessed data to be tested into a dynamic liquid level prediction model based on a particle swarm optimization extreme learning machine to obtain a prediction result of the data to be tested. Compared with the method for measuring the working fluid level by using an instrument, the method reduces the cost for obtaining the working fluid level and reduces the accident risk caused by installing the instrument at the wellhead. Experiments prove that the method has good prediction effect.
Description
Technical Field
The invention belongs to the field of soft measurement, and particularly relates to a method for predicting the working fluid level of a beam-pumping unit based on a particle swarm extreme learning machine.
Background
The dynamic liquid level of the beam-pumping unit is a key parameter in the oil exploitation process, and is used for adapting to a complex oil exploitation environment. The dynamic liquid level can be measured efficiently, safely, continuously and accurately, the production state of the beam pumping unit can be mastered, and the oil extraction efficiency is improved.
The existing method for measuring the working fluid level of the beam-pumping unit is an echo method, namely, empty projectiles are shot at the position of a sleeve of a wellhead, then generated sound wave signals are transmitted along the pipe wall, when the signals contact the surface of liquid, pulse signals are reflected, and the working fluid level of a pumping well is obtained through receiving the signals and manual analysis. The disadvantages of the echo method are quite obvious: the interference effect on the sound wave is large due to the complex environment of oil well production. Secondly, because the measuring instrument needs to be installed at the oil well mouth, the working efficiency of the pumping well is influenced, and danger is easy to generate. Thirdly, the application requirement of the echo method is harsh, the downhole casing pressure needs to be less than 3 MPa, and the echo method can not be used basically when the casing pressure is larger than the value. Fourthly, manual operation is needed when the signal acquisition working fluid level is calculated, the labor intensity is high, and the cost is high.
Disclosure of Invention
The invention provides a method for predicting the working fluid level of a limit learning machine walking beam type oil pumping unit based on particle swarm, which solves the problems of high strength, high production cost and the like of manual measurement.
The technical scheme adopted by the invention for solving the problems is as follows:
the invention discloses a method for predicting the working fluid level of a limit learning machine walking beam type oil pumping unit based on particle swarm, which comprises the following steps:
step 1: collecting historical working fluid level data through a pumping well, comprising: suspension point load, suspension point displacement, wellhead oil pressure, wellhead casing pressure and daily oil production capacity of a pumping well; the suspension point load and the suspension point displacement are obtained through an indicator diagram acquisition instrument, the wellhead casing pressure is obtained through installing a pressure measurement instrument on a wellhead, the average load of an upper stroke and a lower stroke is calculated according to the suspension point load through the acquired indicator diagram data, and the pumping efficiency of the pumping unit is calculated according to the daily liquid yield of the pumping unit;
step 2: carrying out data preprocessing on the collected historical working fluid level data, wherein the data preprocessing comprises the following steps: normalizing data, eliminating abnormal data and supplementing the eliminated data, wherein the specific process is as follows:
normalizing the average load of the upper stroke and the lower stroke, the daily fluid production of the pumping well and the oil pressure casing pressure, and normalizing the data to [0,1], wherein the normalization processing formula is as follows:
y=(Yi-Ymin)/(Ymax-Ymin) (1)
wherein, YmaxIs the maximum value of data, YminIs the minimum value of data, YiIs the value of the ith data.
According to the collected historical data of the dynamic liquid level of the beam type sucker-rod pump, eliminating abnormal data by adopting a 3 sigma method:
Calculating a data deviation pi,i=1,2…n;
Calculating the sample standard deviation σ:
if pi|>And 3 sigma, if the data is judged to be abnormal data, deleting the data.
And supplementing the data after the elimination, and supplementing the data by taking the average value of the numerical values of the previous point and the next point of the abnormal point as a substitute value.
And step 3: dividing the preprocessed data into extreme learning machine training data and testing data, establishing an extreme learning machine model by using the training data, and inputting the testing data into the extreme learning machine model to obtain a dynamic liquid level prediction value of the extreme learning machine;
and 4, step 4: calculating a root mean square error by using the dynamic liquid level predicted value of the extreme learning machine and the corresponding dynamic liquid level actual value, and taking the root mean square error as an adaptive value of a particle swarm algorithm, wherein the method specifically comprises the following steps:
wherein: RMSE is root mean square error, YiAs actual value of dynamic level, XiThe dynamic liquid level predicted value of the extreme learning machine is shown, and N is the number of the dynamic liquid level data.
And 5: the method comprises the following steps of optimizing a parameter input layer weight w and a deviation b of a limit learning machine by adopting a particle swarm algorithm based on a particle swarm algorithm adaptive value of a root mean square error, and obtaining an optimal value in a global range, wherein the method comprises the following specific steps:
step 5.1: manually determining the number N of population and the maximum iteration number in the data collected by the beam pumping unit;
step 5.2: and randomly initializing a particle population, wherein the particles in the population are composed of input layer weight values w and bias values b.
Wherein, CzIs the z particle in the population; k is the number of nodes of the hidden layer and n is the dimension of the input vector. w is the weight of the input layer and b is the offset.
Step 5.3: based on the fitness of the particle, the optimal positions of the individual and the population of the particle are obtained simultaneously, and the adaptive value fitness (P) of the particle is updatedbest) And fitness (G)best):
Wherein, PbestIs the optimal position of the individual particles, GbestAs the optimum position of the particle population, XiAs position of the current particle population, XjAnd eta is the fault tolerance rate of the position of the current particle individual.
Step 5.4: update of position and velocity of particles:
d-dimension position update formula of particle i:
wherein the content of the first and second substances,the speed of the iteration itself for t times; w is the inertial weight; c. C1,c2Is an acceleration factor; r is1,r2Is a constant value, and takes the value of [0,1]To (c) to (d);the d-dimensional component of the airspeed vector for the t +1 th iteration particle i,the d-dimensional component of the position vector of the t +1 th iteration particle i.
Step 5.5: if the maximum iteration number is reached, the optimal input layer weight w and the optimal deviation b are obtained, the step 6 is switched to, otherwise, t is t +1, i is i +1, and j is j +1, the step 5.3 is switched to, and the particle swarm iteration parameter is optimized again;
step 6: and substituting to obtain the optimal input layer weight w and the optimal deviation b to obtain a dynamic liquid level prediction model based on the particle swarm optimization extreme learning machine, wherein the specific process is as follows:
step 6.1: the input sample of the extreme learning machine algorithm optimized by the particle swarm is (x)i,yi)∈Rm×RnWherein the input vector is xi=[x1,x2,…,xm]The output vector is yi=[y1,y2,…,yn]Then, the mathematical model of the extreme learning machine is:
wherein, betai=[βi1,βi2,…,βin]For outputting the weight, G (-) is an extreme learning machine activation function optimized by the particle swarm, t (x)j) Predicted output value for extreme learning machine, wi、biRespectively optimal for step 5Inputting layer weight and deviation; (blank space)
Step 6.2: setting the number of training samples equal to the number of hidden layer neurons, i.e. L ═ m, then whatever value w, b take, the following formula:
wherein, ti=[t1i,t2i,…,tni]TI is 1,2, … L. L is the number of training samples, and m is the number of hidden layer neurons;
step 6.3: constructing an output vector matrix formula: substituting equation (10) into equation (11) yields:
expressing (12) in matrix form: h β ═ Y, where,
step 6.4: constructing a pseudo-inverse matrix: since w, b has been optimized by the particle swarm optimization algorithm, H is a constant matrix, and the value of β is the least square solution of H β ═ Y, i.e., H, b is the least square solution of YThe least squares solution obtained is:wherein, the pseudo inverse matrix H+Is equal to H+=(HTH)-1HT;
Step 6.5: constructing a dynamic liquid level prediction model based on a particle swarm optimization extreme learning machine based on a pseudo-inverse matrix:
y(xi)=H(HTH)-1HTT (13)
wherein:
and 7: acquiring field dynamic liquid level data as to-be-tested data through an oil pumping well, preprocessing the to-be-tested data in the step 2 to obtain preprocessed to-be-tested data, and inputting the preprocessed to-be-tested data into a dynamic liquid level prediction model based on a particle swarm optimization extreme learning machine to obtain a prediction result of the to-be-tested data.
The beneficial technical effects are as follows:
the dynamic liquid level prediction model of the beam pumping unit is established by utilizing the advantages of high search speed, high efficiency and strong search capability of the particle swarm algorithm, the particle swarm algorithm is applied to optimize the input layer weight w and the bias b of the extreme learning machine, the prediction precision of the dynamic liquid level prediction model of the extreme learning machine optimized based on the particle swarm algorithm is improved, and the information requirement of the beam pumping unit on the dynamic liquid level in the oil extraction process is met.
Compared with the method for measuring the working fluid level by using an instrument, the method reduces the cost for obtaining the working fluid level and reduces the accident risk caused by installing the instrument at the wellhead. Experiments prove that: the prediction of the dynamic liquid level of the beam pumping unit based on the extreme learning machine algorithm of the particle swarm has good prediction effect.
Drawings
FIG. 1 is a flow chart of a method for predicting the working fluid level of a extreme learning machine beam-pumping unit based on particle swarm in the embodiment of the invention;
FIG. 2 is a flowchart illustrating optimization of a parameter input layer weight and a deviation of a limit learning machine by a particle swarm algorithm according to an embodiment of the present invention;
FIG. 3 is a flowchart of a dynamic liquid level prediction model for constructing an optimized extreme learning machine based on a particle swarm optimization according to an embodiment of the invention;
FIG. 4 is a graph of the error between the predicted value and the actual value of the dynamic liquid level of the sucker-rod pump using the support vector machine algorithm in accordance with an embodiment of the present invention.
FIG. 5 is a graph of the error between the predicted and actual values of the dynamic liquid level of the sucker-rod pump using an extreme learning algorithm in accordance with an embodiment of the present invention.
FIG. 6 is an error graph of the predicted value and the actual value of the dynamic liquid level of the sucker-rod pump of the extreme learning machine optimized by the particle swarm optimization according to the embodiment of the invention.
FIG. 7 is a graph comparing predicted values and actual values of dynamic liquid level of a sucker rod pump using a support vector machine algorithm in accordance with an embodiment of the present invention;
FIG. 8 is a graph comparing predicted values and actual values of dynamic liquid level of a sucker rod pump using an extreme learning machine algorithm in accordance with an embodiment of the present invention;
FIG. 9 is a comparison graph of the predicted value and the actual value of the dynamic liquid level of the sucker rod pump of the extreme learning machine optimized by the particle swarm optimization according to the embodiment of the invention.
Detailed Description
The invention is further explained by combining the attached drawings and the specific implementation example, as shown in fig. 1, the invention provides a method for predicting the working fluid level of a limit learning machine walking beam type pumping unit based on particle swarm, which comprises the following steps:
step 1: collecting historical working fluid level data through a pumping well, comprising: suspension point load, suspension point displacement, wellhead oil pressure, wellhead casing pressure and daily oil production capacity of a pumping well; the suspension point load and the suspension point displacement are obtained through an indicator diagram acquisition instrument, the wellhead casing pressure of the beam pumping unit is obtained through installing a pressure measurement instrument on a wellhead, the average load of an upper stroke and a lower stroke is calculated according to the suspension point load through the acquired indicator diagram data, and the pumping efficiency of the pumping unit is calculated according to the daily liquid yield of the pumping unit;
step 2: carrying out data preprocessing on the collected historical data, wherein the data preprocessing comprises the following steps: normalizing data, eliminating abnormal data and supplementing the eliminated data, wherein the specific process is as follows:
normalizing the average load of the upper stroke and the lower stroke, the daily fluid production of the pumping well and the oil pressure casing pressure, and normalizing the data to [0,1], wherein the normalization processing formula is as follows:
y=(Yi-Ymin)/(Ymax-Ymin) (1)
wherein, YmaxIs the maximum value of data, YminIs the minimum value of data, YiIs the value of the ith data.
According to the collected historical data of the dynamic liquid level of the beam type sucker-rod pump, eliminating abnormal data by adopting a 3 sigma method:
Calculating a data deviation pi,i=1,2…n;
Calculating the sample standard deviation σ:
if pi|>And 3 sigma, if the data is judged to be abnormal data, deleting the data.
And supplementing the data after the elimination, and supplementing the data by taking the average value of the numerical values of the previous point and the next point of the abnormal point as a substitute value.
And step 3: dividing the preprocessed data into extreme learning machine training data and testing data, establishing an extreme learning machine model by using the training data, and inputting the testing data into the extreme learning machine model to obtain a dynamic liquid level prediction value of the extreme learning machine;
the extreme learning machine algorithm is a novel single hidden layer neural network algorithm. The extreme learning machine algorithm is hundreds of times faster than traditional machine learning algorithms such as BP and SVM. The extreme learning machine algorithm can not only obtain the minimum training error, but also calculate the output minimum norm. Meanwhile, the extreme learning machine has some disadvantages, and the training prediction capability of the extreme learning machine is not ideal under the condition that the distribution of data samples is very unstable. The input layer weight and bias of the extreme learning machine are given at random, and have great influence on the generalization performance of the extreme learning machine. The training steps of the extreme learning machine are as follows:
the input layer weights w and offsets b are randomly generated.
H is calculated from the activation function of the extreme learning machine algorithm. The activation function in the present invention is:
and 4, step 4: calculating a root mean square error by using the dynamic liquid level predicted value of the extreme learning machine and the corresponding dynamic liquid level actual value, and taking the root mean square error as an adaptive value of a particle swarm algorithm, wherein the method specifically comprises the following steps:
wherein: RMSE is root mean square error, YiAs actual value of dynamic level, XiThe dynamic liquid level predicted value of the extreme learning machine is shown, and N is the number of the dynamic liquid level data.
And 5: the particle swarm optimization method based on the root mean square error optimizes the weight w and the deviation b of the parameter input layer of the limit learning machine by adopting the particle swarm optimization, obtains the optimal value in the global scope, and comprises the following specific steps as shown in fig. 2:
particle Swarm Optimization (PSO) is an intelligent global Optimization algorithm based on bird Swarm foraging. Optimizing is carried out by simulating predation behaviors of the bird group and adopting individual cooperation and information sharing mechanisms of the bird group.
Step 5.1: manually determining the number N of the population and the maximum iteration number in the data collected by the beam pumping unit, wherein the number N of the manually determined population is 30; the maximum number of iterations is 300;
step 5.2: and randomly initializing a particle population, wherein the particles in the population are composed of input layer weight values w and bias values b.
Wherein, CzIs the z particle in the population; k is the number of nodes of the hidden layer and n is the dimension of the input vector. w is the weight of the input layer and b is the offset.
Step 5.3: based on the fitness of the particle, the optimal positions of the individual and the population of the particle are obtained simultaneously, and the adaptive value fitness (P) of the particle is updatedbest) And fitness (G)best):
Wherein, PbestIs the optimal position of the individual particles, GbestAs the optimum position of the particle population, XiAs position of the current particle population, XjAnd eta is the fault tolerance rate of the position of the current particle individual.
Step 5.4: update of position and velocity of particles:
d-dimension position update formula of particle i:
wherein the content of the first and second substances,the speed of the iteration itself for t times; w is the inertial weight; c. C1,c2Is an acceleration factor; r is1,r2Is a constant value, and takes the value of [0,1]To (c) to (d);the d-dimensional component of the airspeed vector for the t +1 th iteration particle i,the d-dimensional component of the position vector of the t +1 th iteration particle i.
Step 5.5: if the maximum iteration number is reached, the optimal input layer weight w and the optimal deviation b are obtained, the step 6 is switched to, otherwise, t is t +1, i is i +1, and j is j +1, the step 5.3 is switched to, and the particle swarm iteration parameter is optimized again.
Step 6: and substituting to obtain the optimal input layer weight w and the optimal deviation b to obtain a dynamic liquid level prediction model based on the particle swarm optimization extreme learning machine, wherein as shown in fig. 3, the specific process is as follows:
step 6.1: the input sample of the extreme learning machine algorithm optimized by the particle swarm is (x)i,yi)∈Rm×RnWherein the input vector is xi=[x1,x2,…,xm]The output vector is yi=[y1,y2,…,yn]Then, the mathematical model of the extreme learning machine is:
wherein, betai=[βi1,βi2,…,βin]For outputting the weight, G (-) is an extreme learning machine activation function optimized by the particle swarm, t (x)j) Predicted output value for extreme learning machine, wi、biRespectively obtaining the optimal input layer weight and the optimal deviation in the step 5;
a common activation function is as follows:
gaussian function: g (a, b, x) ═ exp (-b | | | x-a | | non-woven hair2);
fourier function: g (a, b, x) ═ sin (a · x + b);
multiple quadratic function: g (a, b, x) ═ (| | | x-a | | | non-conducting phosphor2+b2)1/2;
t(xj) Is the output value. w is aiAnd b is a parameter for particle swarm optimization.
Step 6.2: setting the number of training samples equal to the number of hidden layer neurons, i.e. L ═ m, then whatever value w, b take, the following formula:
wherein, ti=[t1i,t2i,…,tni]TI is 1,2, … L. L is the number of training samples, and m is the number of hidden layer neurons;
the value of the training sample L is typically made larger than the number of hidden layer neurons. Then:
step 6.3: constructing an output vector matrix formula: substituting equation (10) into equation (11) yields:
expressing (12) in matrix form: h β ═ Y, where,
step 6.4: constructing a pseudo-inverse matrix: since w, b has been optimized by the particle swarm optimization algorithm, H is a constant matrix, and the value of β is the least square solution of H β ═ Y, i.e., H, b is the least square solution of YThe least squares solution obtained is:wherein, the pseudo inverse matrix H+Is equal to H+=(HTH)-1HT;
Step 6.5: constructing a dynamic liquid level prediction model based on a particle swarm optimization extreme learning machine based on a pseudo-inverse matrix:
y(xi)=H(HTH)-1HTT (13)
wherein:
and 7: acquiring field dynamic liquid level data as to-be-tested data through an oil pumping well, preprocessing the to-be-tested data in the step 2 to obtain preprocessed to-be-tested data, and inputting the preprocessed to-be-tested data into a dynamic liquid level prediction model based on a particle swarm optimization extreme learning machine to obtain a prediction result of the to-be-tested data.
And evaluating the working fluid level prediction error of the beam pumping unit according to the real dynamic liquid level and the predicted dynamic liquid level of the beam pumping unit.
500 groups of data of a certain oil well are collected, 400 groups of working fluid level data are adopted as an extreme learning machine for training particle swarm optimization, and finally 100 groups of data are used for verifying the accuracy and the effectiveness of an extreme learning machine model based on particle swarm optimization. The evaluation criteria of the model are as follows:
calculating Mean Square Error (MSE):
Calculate Root Mean Square Error (RMSE):
Calculate Mean Absolute Error (MAE):
Calculate mean percent error rate (MAPE):
In order to verify the accuracy of the particle swarm optimization extreme learning machine algorithm, the accuracy is compared with the extreme learning machine algorithm, and through simulation analysis, a model prediction comparison table is as follows:
TABLE 1 evaluation index Table
As can be seen from table 1 and fig. 4, 5, 6, 7, 8, and 9, the dynamic level prediction based on the particle swarm optimization extreme learning machine algorithm is superior to the dynamic level prediction based on the extreme learning machine algorithm and the support vector machine algorithm. The extreme learning mobile liquid level prediction model based on the particle swarm algorithm can be obtained, and the curve fitting capability is good. The dynamic liquid level measurement based on the particle swarm extreme learning machine algorithm does not need manual measurement, the cost of the dynamic liquid level measurement is reduced, the danger caused by the installation of a measuring instrument at an oil well mouth is avoided, and the prediction precision meets the actual requirement.
The invention has the following beneficial effects and advantages:
the method utilizes the advantages of simple particle swarm optimization setting and strong global search capability to establish the dynamic liquid level prediction model of the sucker rod pump well based on the particle swarm optimization extreme learning machine algorithm, and performs parameter optimization on the parameters w and b in the extreme learning machine through the particle swarm optimization, so that the precision and the generalization capability of the dynamic liquid level prediction model are improved, and the dynamic liquid level prediction model has higher stability through the continuous increase of the prediction time.
The method utilizes a data-driven method to predict the working fluid level of the sucker rod oil well, does not need manual measurement, reduces the cost of measuring the working fluid level, avoids the danger caused by installing a measuring instrument at the mouth of the oil well, researches the working fluid level prediction method based on the particle swarm extreme learning theory, ensures the prediction precision of the working fluid level of the sucker rod oil well, and can meet the requirement on the working fluid level information in the control process of the sucker rod oil well. Through experimental analysis, good effects are obtained, and the effectiveness of the proposed invention in the working fluid level of the sucker-rod pumping well is proved.
Claims (5)
1. A method for predicting the working fluid level of a beam-pumping unit based on a particle swarm extreme learning machine is characterized by comprising the following specific steps of:
step 1: collecting historical working fluid level data through a pumping well, comprising: suspension point load, suspension point displacement, wellhead oil pressure, wellhead casing pressure and daily oil production capacity of a pumping well; the suspension point load and the suspension point displacement are obtained through an indicator diagram acquisition instrument, the wellhead casing pressure is obtained through installing a pressure measurement instrument on a wellhead, the average load of an upper stroke and a lower stroke is calculated according to the suspension point load through the acquired indicator diagram data, and the pumping efficiency of the pumping unit is calculated according to the daily liquid yield of the pumping unit;
step 2: carrying out data preprocessing on the collected historical working fluid level data, wherein the data preprocessing comprises the following steps: normalizing the data, eliminating abnormal data and supplementing the eliminated data;
and step 3: dividing the preprocessed data into extreme learning machine training data and testing data, establishing an extreme learning machine model by using the training data, and inputting the testing data into the extreme learning machine model to obtain a dynamic liquid level prediction value of the extreme learning machine;
and 4, step 4: calculating a root mean square error by using the dynamic liquid level predicted value of the extreme learning machine and the corresponding dynamic liquid level actual value, and taking the root mean square error as an adaptive value of a particle swarm algorithm;
and 5: optimizing the weight w and the deviation b of a parameter input layer of the limit learning machine by adopting a particle swarm algorithm based on the particle swarm algorithm adaptive value of the root mean square error to obtain an optimal value in a global range;
step 6: substituting to obtain an optimal input layer weight w and an optimal deviation b to obtain a dynamic liquid level prediction model based on a particle swarm optimization extreme learning machine;
and 7: acquiring field dynamic liquid level data as to-be-tested data through an oil pumping well, preprocessing the to-be-tested data in the step 2 to obtain preprocessed to-be-tested data, and inputting the preprocessed to-be-tested data into a dynamic liquid level prediction model based on a particle swarm optimization extreme learning machine to obtain a prediction result of the to-be-tested data.
2. The method for predicting the working fluid level of a beam-pumping unit based on a particle swarm extreme learning machine according to claim 1, wherein in the step 2, the collected dynamic liquid level data is preprocessed, and the specific process is as follows:
normalizing the average load of the upper stroke and the lower stroke, the daily fluid production of the pumping well and the oil pressure casing pressure, and normalizing the data to [0,1], wherein the normalization processing formula is as follows:
y=(Yi-Ymin)/(Ymax-Ymin) (1)
wherein, YmaxIs the maximum value of data, YminIs the minimum value of data, YiIs the value of the ith data;
according to the collected historical data of the dynamic liquid level of the beam type sucker-rod pump, eliminating abnormal data by adopting a 3 sigma method:
Calculating a data deviation pi,i=1,2…n;
Calculating the sample standard deviation σ:
if pi|>3 sigma, if the data is judged to be abnormal data, deleting the data;
and supplementing the data after the elimination, and supplementing the data by taking the average value of the numerical values of the previous point and the next point of the abnormal point as a substitute value.
3. The method for predicting the working fluid level of a beam-pumping unit based on a particle swarm extreme learning machine according to claim 1, wherein the root mean square error is used as an adaptive value fitness of a particle swarm algorithm in the step 4, and specifically comprises the following steps:
wherein: RMSE is root mean square error, YiAs actual value of dynamic level, XiThe dynamic liquid level predicted value of the extreme learning machine is shown, and N is the number of the dynamic liquid level data.
4. The method for predicting the working fluid level of a beam-pumping unit based on a particle swarm extreme learning machine according to claim 1, wherein in the step 5, a particle swarm algorithm is adopted to optimize the parameter input layer weight w and the deviation b of the extreme learning machine, so that an optimal value is obtained in a global scope, and the method comprises the following specific steps:
step 5.1: manually determining the number N of population and the maximum iteration number in the data collected by the beam pumping unit;
step 5.2: randomly initializing a particle population, wherein the particles in the population are all composed of an input layer weight w and a bias b:
wherein, CzIs the z particle in the population; k is the number of nodes of the hidden layer, n is the dimension of the input vector, w is the weight of the input layer, and b is the offset;
step 5.3: based on the fitness of the particle, the optimal positions of the individual and the population of the particle are obtained simultaneously, and the adaptive value fitness (P) of the particle is updatedbest) And fitness (G)best):
Wherein, PbestIs the optimal position of the individual particles, GbestAs the optimum position of the particle population, XiAs position of the current particle population, XjThe position of the current particle individual is shown as eta, and the fault tolerance rate is shown as eta;
step 5.4: update of position and velocity of particles:
d-dimension position update formula of particle i:
wherein the content of the first and second substances,the speed of the iteration itself for t times; δ is the inertial weight; c. C1,c2Is an acceleration factor; r is1,r2Is a constant value, and takes the value of [0,1]To (c) to (d);the d-dimensional component of the airspeed vector for the t +1 th iteration particle i,d-dimensional component of position vector of t +1 th iteration particle i;
step 5.5: if the maximum iteration number is reached, the optimal input layer weight w and the optimal deviation b are obtained, the step 6 is switched to, otherwise, t is t +1, i is i +1, and j is j +1, the step 5.3 is switched to, and the particle swarm iteration parameter is optimized again.
5. The dynamic liquid level prediction method of the beam-pumping unit based on the particle swarm extreme learning machine according to claim 1, wherein in the step 6, the optimal input layer weight w and the optimal deviation b are obtained by substitution, and a dynamic liquid level prediction model based on the particle swarm optimization extreme learning machine is constructed, and the specific process is as follows:
step 6.1: the input sample of the extreme learning machine algorithm optimized by the particle swarm is (x)i,yi)∈Rm×RnWherein the input vector is xi=[x1,x2,…,xm]The output vector is yi=[y1,y2,…,yn]Then, the mathematical model of the extreme learning machine is:
wherein, betai=[βi1,βi2,…,βin]For outputting the weight, G (-) is an extreme learning machine activation function optimized by the particle swarm, t (x)j) Predicted output value for extreme learning machine, wi、biRespectively obtaining the optimal input layer weight and the optimal deviation in the step 5;
step 6.2: setting the number of training samples equal to the number of hidden layer neurons, i.e. L ═ m, then whatever value w, b take, the following formula:
wherein, ti=[t1i,t2i,…,tni]TI is 1,2, … L, L is the number of training samples, and m is the number of hidden layer neurons;
step 6.3: constructing an output vector matrix formula: substituting equation (10) into equation (11) yields:
expressing (12) in matrix form: h β ═ Y, where,
step 6.4: constructing a pseudo-inverse matrix: since w, b has been optimized by the particle swarm optimization algorithm, H is a constant matrix, and the value of β is the least square solution of H β ═ Y, i.e., H, b is the least square solution of YThe least squares solution obtained is:wherein, the pseudo inverse matrix H+Is equal to H+=(HTH)-1HT;
Step 6.5: constructing a dynamic liquid level prediction model based on a particle swarm optimization extreme learning machine based on a pseudo-inverse matrix:
y(xi)=H(HTH)-1HTT (13)
wherein:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910302780.8A CN110029986B (en) | 2019-04-16 | 2019-04-16 | Beam-pumping unit working fluid level prediction method based on particle swarm extreme learning machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910302780.8A CN110029986B (en) | 2019-04-16 | 2019-04-16 | Beam-pumping unit working fluid level prediction method based on particle swarm extreme learning machine |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110029986A CN110029986A (en) | 2019-07-19 |
CN110029986B true CN110029986B (en) | 2021-08-17 |
Family
ID=67238509
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910302780.8A Active CN110029986B (en) | 2019-04-16 | 2019-04-16 | Beam-pumping unit working fluid level prediction method based on particle swarm extreme learning machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110029986B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112395730A (en) * | 2019-08-12 | 2021-02-23 | 北京国双科技有限公司 | Method and device for determining working fluid level depth parameter of pumping well |
CN111144917A (en) * | 2019-09-06 | 2020-05-12 | 国网河北省电力有限公司电力科学研究院 | Equipment investment analysis method based on particle swarm extreme learning machine |
CN112487699A (en) * | 2019-09-11 | 2021-03-12 | 北京国双科技有限公司 | Working fluid level determining method, working fluid level determining model obtaining method and related equipment |
CN112798280B (en) * | 2021-02-05 | 2022-01-04 | 山东大学 | Rolling bearing fault diagnosis method and system |
CN113203953B (en) * | 2021-04-02 | 2022-03-25 | 中国人民解放军92578部队 | Lithium battery residual service life prediction method based on improved extreme learning machine |
CN113268755B (en) * | 2021-05-26 | 2023-03-31 | 建投数据科技(山东)有限公司 | Method, device and medium for processing data of extreme learning machine |
CN113569463A (en) * | 2021-06-17 | 2021-10-29 | 南京理工大学 | Projectile aerodynamic coefficient identification method based on extreme learning |
CN114233272B (en) * | 2021-12-17 | 2023-09-22 | 西安安森智能仪器股份有限公司 | Intelligent exploitation control method and device for natural gas well |
CN115001353B (en) * | 2022-05-09 | 2023-06-16 | 上海达坦能源科技股份有限公司 | Intelligent control method and control system for variable frequency speed regulation of oil pumping well |
CN115907205A (en) * | 2022-12-14 | 2023-04-04 | 大连理工大学 | Chemical production process quality prediction method integrating multi-working-condition analysis |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2297532C1 (en) * | 2005-08-16 | 2007-04-20 | Общество с ограниченной ответственностью Томское научно-производственное и внедренческое общество "СИАМ" (ООО ТНПВО "СИАМ") | Method for determining level of liquid in annular space of oil product wells |
CN201448105U (en) * | 2009-07-02 | 2010-05-05 | 西安威正电子科技有限公司 | Device for automatically measuring movable liquid level in oil well by double sound sources |
CN102359368B (en) * | 2011-07-14 | 2013-11-27 | 哈尔滨工业大学 | Working fluid level prediction method for submersible reciprocating-type oil pumping unit based on support vector machine |
CN103089246B (en) * | 2013-01-25 | 2015-11-04 | 东北大学 | A kind of assay method of Dlagnosis of Sucker Rod Pumping Well dynamic liquid level |
CN108805215B (en) * | 2018-06-19 | 2021-06-11 | 东北大学 | Dynamic liquid level soft measurement method for sucker-rod pump pumping well based on improved drosophila algorithm |
-
2019
- 2019-04-16 CN CN201910302780.8A patent/CN110029986B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110029986A (en) | 2019-07-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110029986B (en) | Beam-pumping unit working fluid level prediction method based on particle swarm extreme learning machine | |
CN108764540B (en) | Water supply network pressure prediction method based on parallel LSTM series DNN | |
Wu et al. | Machine learning-based method for automated well-log processing and interpretation | |
CN112001270B (en) | Ground radar automatic target classification and identification method based on one-dimensional convolutional neural network | |
CN106677763B (en) | Dynamic integrated modeling-based oil well working fluid level prediction method | |
CN110363337B (en) | Oil measuring method and system of oil pumping unit based on data driving | |
CN108804720B (en) | Oil pumping machine fault diagnosis method based on improved traceless Kalman filtering and RBF neural network | |
CN101799888B (en) | Industrial soft measurement method based on bionic intelligent ant colony algorithm | |
CN111985610A (en) | System and method for predicting pumping efficiency of oil pumping well based on time sequence data | |
CN110427654A (en) | A kind of predictive model of landslide construction method and system based on sensitiveness | |
CN110472689B (en) | Sucker-rod pump pumping well moving liquid level soft measurement method based on integrated Gaussian process regression | |
CN104481496A (en) | Fault diagnosis method of sucker-rod pump well | |
CN112446559A (en) | Large-range ground subsidence space-time prediction method and system based on deep learning | |
CN107256316B (en) | Artificial intelligence electromagnetic logging inversion method based on high-speed forward result training | |
CN115640744A (en) | Method for predicting corrosion rate outside oil field gathering and transportation pipeline | |
CN114912364A (en) | Natural gas well flow prediction method, device, equipment and computer readable medium | |
CN112926251B (en) | Landslide displacement high-precision prediction method based on machine learning | |
CN113988479A (en) | Pumping well multi-well dynamic liquid level depth prediction method based on dynamic and static information feature fusion neural network | |
CN113203953B (en) | Lithium battery residual service life prediction method based on improved extreme learning machine | |
CN114021474A (en) | Relay life prediction method based on improved wolf algorithm optimization | |
KR20200058258A (en) | System and method for predicting ground layer information, and a recording medium having computer readable program for executing the method | |
CN114154401A (en) | Soil erosion modulus calculation method and system based on machine learning and observation data | |
NO20200978A1 (en) | Optimized methodology for automatic history matching of a petroleum reservoir model with ensemble kalman filter | |
Ju et al. | Hydrologic simulations with artificial neural networks | |
CN107688702B (en) | Lane colony algorithm-based river channel flood flow evolution law simulation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |