A method for predicting oil pump characteristics based on improved neural network
By improving the neural network method, combining firework optimization and principal component analysis, and optimizing the activation function, the traditional least squares method solves the problem of insufficient accuracy and speed in the prediction of oil pump characteristics, and achieves a more efficient prediction effect.
Patent Information
- Application Number
- CN202210498824.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-09
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2042-05-09
AI Technical Summary
The traditional least squares method easily ignores the potential relationship between data in the prediction of oil pump characteristics, and it is difficult to effectively reflect the impact caused by changes in oil properties, resulting in insufficient prediction accuracy and convergence speed.
Using an improved neural network method, the historical data set for reservoir development is constructed, the oil property data is processed using principal component analysis and dimensionality reduction, and the mixed parameter combination is optimized in combination with the fireworks excellence method, and the activation function is improved as a parameter linear rectifier function, thereby enhancing the neural network convergence speed and prediction accuracy.
The accuracy and convergence speed of oil pump characteristics prediction are improved, making the prediction results closer to the actual value, and enhancing the stability of the neural network and the ability to seek global optimal solutions.
Smart Images

Figure CN115017204B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an oil pump characteristic prediction method based on an improved neural network, belonging to the technical field of oil pipeline storage and transportation. Background Art
[0002] The characteristics of an oil pump refer to the relationship between flow, head and power. Determining the characteristics of an oil pump is of great significance for regulating the transportation volume of an oil pipeline and reducing the operating costs of an oil pipeline.
[0003] The traditional least square method is used to fit the curve of oil pump characteristics, which has certain guiding significance for the prediction of oil pump characteristics. However, due to the simple mapping relationship of the least square method, it is easy to ignore some potential relationships between data, and when the physical properties of oil products change, the least square method cannot well reflect the impact of the change in physical properties, which has certain limitations. Summary of the invention
[0004] In view of the problems existing in the above-mentioned prior art, the present invention provides a method for predicting oil pump characteristics based on an improved neural network, which can improve the convergence speed and prediction accuracy of oil pump characteristics prediction.
[0005] In order to achieve the above object, the present invention provides a method for predicting oil pump characteristics based on an improved neural network, comprising the following steps:
[0006] A. Constructing a historical data set of reservoir development:
[0007] Obtain oil physical property data and oil pump characteristic data from the pipeline real-time database and the oil pump operation database, use principal component analysis technology to reduce the dimension of complex oil physical property data, extract the main characteristic components of oil physical properties, map the oil physical property data and oil pump characteristic data to the same data source, remove noise data and fill in missing values to obtain the oil pump characteristic historical data set;
[0008] B. Use fireworks optimization method to optimize the combination of hybrid parameters:
[0009] (1) Build the initial model:
[0010] Improve the initial model of the oil pump characteristics prediction of the neural network, construct the input layer, hidden layer and output layer of the neural network, and use the sigmoid function as the activation function of the neural network; randomly extract a proper amount of data from the historical data set of oil pump characteristics, use the mean square error as the loss function, and adjust the initial neural network model for oil pump characteristics prediction;
[0011] (2) Modify the activation function:
[0012] The parametric linear rectification function is used to replace the initial sigmoid activation function of the neural network. The calculation formula is:
[0013]
[0014] Among them, x is the input variable, a is the slope of the negative part;
[0015] (3) Fireworks group initialization:
[0016] Set the maximum number of iterations of the fireworks optimization method to T, the number of fireworks to N, the maximum number of fireworks explosion sparks to m, the maximum explosion radius of fireworks to d, the number of mutation sparks to L, and use the weight w of the neural network, the threshold θ, and the slope a of the negative part of the activation function as the position vector of each firework, expressed as: Xi = ((Xiw,Xi θ ,Xia), where Each firework represents a feasible solution that can optimize the combination of neural network hybrid parameters; randomly initialize the firework group X = {X i ,X2,...,X N}, with mean square error MSE((X i ) as the fitness function of fireworks f((X i );
[0017] (4) Initialize the best fireworks, the worst fireworks, and the global optimal fireworks:
[0018] Calculate the fitness value of each firework and compare the fitness values of all fireworks. Take the feasible solution of the hybrid parameter combination with the smallest fitness value as the best firework X g =(X gw ,X gθ ,X ga ), the feasible solution of the hybrid parameter combination with the largest fitness value is the worst fireworks X e =(X ew ,X eθ ,X ea ), the best fireworks X g =(X gw ,X gθ ,X ga ) as the global optimal neural network hybrid parameter combination X p =(X pw ,X pθ ,X pa )’s initial value;
[0019] (5) Perform fireworks explosions:
[0020] According to Best Fireworks X g =(X gw ,X gθ ,X ga ) and Worst Fireworks X e =(X ew,X eθ ,X ea ) and calculate the fitness value of each firework Xi∈{X1,X2,...,X N The number of sparks that can be produced by the explosion is M i and the maximum explosion radius D i , the hybrid parameter combination with good fitness produces a large number of feasible solutions in a small range, and the hybrid parameter combination with poor fitness produces a small number of feasible solutions in a larger range of neighborhoods; fireworks Xi∈{X1,X2,...,X N The number of sparks that can be produced by the explosion is M i and the maximum explosion radius D i The calculation formulas are:
[0021]
[0022]
[0023] Among them, m is the maximum number of fireworks explosion sparks, d is the maximum explosion radius of fireworks, ε is a very small constant, f(X e ) is the worst fireworks X e The fitness value, f(X g ) is the best fireworks X g The fitness value of
[0024] (6) Perform fireworks Gaussian mutation:
[0025] Randomly select L fireworks X from the fireworks group i ∈{X1,X2,...,X N} Perform Gaussian mutation operation on it to generate Gaussian mutation sparks. The mutation formula is:
[0026] X i =X i ×e(0,1);
[0027] Among them, e(0,1) is a Gaussian distribution with a mean of 0 and a variance of 1;
[0028] (7) Update fireworks group:
[0029] A mixed parameter combination with the smallest fitness value is selected from the sparks generated by the fireworks and retained, and N-1 of the remaining mixed parameter combinations are randomly selected and retained;
[0030] (8) Update the best fireworks, the worst fireworks, and the global optimal fireworks:
[0031] Relatively reserved N fireworks X i ∈{X1,X2,...,X N}, update the best fireworks Xg =(X gw ,X gθ ,X ga ) and Worst Fireworks X e =(X ew ,X eθ ,X ea ), the firework with the smallest fitness X g =(X gw ,X gθ ,X ga ) as the global optimal neural network hybrid parameter combination X p =(X pw ,X pθ ,X pa );
[0032] (9) Iterate to obtain the optimal combination of mixing parameters:
[0033] Repeat steps 5) to 8) until the maximum number of iterations T is met. At this time, X p =(X pw ,X pθ ,X pa ) is the optimal mixed parameter combination of the oil pump characteristic prediction neural network;
[0034] (10) Update the parameters of the neural network and activation function:
[0035] The weights of the optimal neural network Threshold and the slope of the negative part of the activation function The initial neural network model is brought in to form a final model for predicting oil pump characteristics based on the improved neural network. The final model for predicting oil pump characteristics is used to predict characteristic data to be calculated, thereby realizing the prediction of oil pump characteristics.
[0036] Furthermore, in step (7), when the remaining multiple mixing parameter combinations are randomly retained, the fitness of the mixing parameter combination is used to calculate the probability of being selected. The greater the fitness of the mixing parameter combination, the greater the probability of being selected and retained.
[0037] The present invention builds an oil pump characteristic prediction model based on an improved neural network, makes full use of the good global optimization ability of fireworks optimization, optimizes the weight and threshold combination in the oil pump characteristic neural network prediction model, improves the convergence speed of the neural network, and effectively seeks the global optimal solution; uses a parameter linear rectification function to replace the initial activation function of the neural network, and adds the slope of the negative part of the linear rectification function to the fireworks optimization method, thereby enhancing the stability of the back propagation (BP) neural network and improving the accuracy of the oil pump characteristic prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a work flow chart of the present invention;
[0039] Figure 2 It is a simulation result diagram of the predicted value and actual value of the oil pump head characteristic of the present invention;
[0040] Figure 3 It is a simulation result diagram of the predicted value and actual value of the power characteristic of the oil delivery pump of the present invention;
[0041] Figure 4 It is a simulation result diagram comparing the prediction results of the oil pump head characteristics of the present invention with those of the existing BP neural network and GA-BP neural network;
[0042] Figure 5 It is a simulation result diagram comparing the prediction results of oil pump power characteristics of the present invention with those of the existing BP neural network and GA-BP neural network. DETAILED DESCRIPTION
[0043] The present invention will be further described below in conjunction with the accompanying drawings.
[0044] like Figure 1 As shown, a method for predicting oil pump characteristics based on an improved neural network includes the following steps:
[0045] A method for predicting oil pump characteristics based on an improved neural network comprises the following steps:
[0046] A. Constructing a historical data set of reservoir development:
[0047] Obtain oil physical property data and oil pump characteristic data from the pipeline real-time database and the oil pump operation database, use principal component analysis technology to reduce the dimension of complex oil physical property data, extract the main characteristic components of oil physical properties, map the oil physical property data and oil pump characteristic data to the same data source, remove noise data and fill in missing values to obtain the oil pump characteristic historical data set;
[0048] B. Use fireworks optimization method to optimize the combination of hybrid parameters:
[0049] (1) Build the initial model:
[0050] Improve the initial model of the oil pump characteristics prediction of the neural network, construct the input layer, hidden layer and output layer of the neural network, and use the sigmoid function as the activation function of the neural network; randomly extract a proper amount of data from the historical data set of oil pump characteristics, use the mean square error as the loss function, and adjust the initial neural network model for oil pump characteristics prediction;
[0051] (2) Modify the activation function:
[0052] The parametric linear rectification function is used to replace the initial sigmoid activation function of the neural network. The calculation formula is:
[0053]
[0054] Among them, x is the input variable, a is the slope of the negative part;
[0055] (3) Fireworks group initialization:
[0056] Set the maximum number of iterations of the fireworks optimization method to T, the number of fireworks to N, the maximum number of fireworks explosion sparks to m, the maximum explosion radius of fireworks to d, the number of mutation sparks to L, and use the weight w of the neural network, the threshold θ, and the slope a of the negative part of the activation function as the position vector of each firework, expressed as: Xi = ((Xiw,Xi θ ,Xia), where Each firework represents a feasible solution that can optimize the combination of neural network hybrid parameters; randomly initialize the firework group X = {X i ,X2,...,X N}, with mean square error MSE((X i ) as the fitness function of fireworks f((X i );
[0057] (4) Initialize the best fireworks, the worst fireworks, and the global optimal fireworks:
[0058] Calculate the fitness value of each firework and compare the fitness values of all fireworks. Take the feasible solution of the hybrid parameter combination with the smallest fitness value as the best firework X g =(X gw ,X gθ ,X ga ), the feasible solution of the hybrid parameter combination with the largest fitness value is the worst fireworks X e =(X ew ,X eθ ,X ea ), the best fireworks X g =(X gw ,X gθ ,X ga ) as the global optimal neural network hybrid parameter combination X p =(X pw ,X pθ ,X pa )’s initial value;
[0059] (5) Perform fireworks explosions:
[0060] According to Best Fireworks X g =(X gw ,X gθ ,Xga ) and Worst Fireworks X e =(X ew ,X eθ ,X ea ) and calculate the fitness value of each firework Xi∈{X1,X2,...,X N The number of sparks that can be produced by the explosion is M i and the maximum explosion radius D i , the hybrid parameter combination with good fitness produces a large number of feasible solutions in a small range, and the hybrid parameter combination with poor fitness produces a small number of feasible solutions in a larger range of neighborhoods; fireworks Xi∈{X1,X2,...,X N The number of sparks that can be produced by the explosion is M i and the maximum explosion radius D i The calculation formulas are:
[0061]
[0062] Among them, m is the maximum number of fireworks explosion sparks, d is the maximum explosion radius of fireworks, to avoid the numerator and denominator being 0, ε is taken as a very small constant, f(X e ) is the worst fireworks X e The fitness value, f(X g ) is the best fireworks X g The fitness value of
[0063] (6) Perform fireworks Gaussian mutation:
[0064] Randomly select L fireworks X from the fireworks group i ∈{X1,X2,...,X N} Perform Gaussian mutation operation on it to generate Gaussian mutation sparks. The mutation formula is:
[0065] X i =X i ×e(0,1);
[0066] Among them, e(0,1) is a Gaussian distribution with a mean of 0 and a variance of 1;
[0067] (7) Update fireworks group:
[0068] A mixed parameter combination with the smallest fitness value is selected from the sparks generated by the fireworks and retained, and N-1 of the remaining mixed parameter combinations are randomly selected and retained;
[0069] (8) Update the best fireworks, the worst fireworks, and the global optimal fireworks:
[0070] Relatively reserved N fireworks X i ∈{X1,X2,...,X N} fitness value, update the best fireworks X g =(X gw ,X gθ ,X ga ) and Worst Fireworks X e =(X ew ,X eθ ,X ea ), the firework with the smallest fitness X g =(X gw ,X gθ ,X ga ) as the global optimal neural network hybrid parameter combination X p =(X pw ,X pθ ,X pa );
[0071] (9) Iterate to obtain the optimal combination of mixing parameters:
[0072] Repeat steps 5) to 8) until the maximum number of iterations T is met. At this time, X p =(X pw ,X pθ ,X pa ) is the optimal mixed parameter combination of the oil pump characteristic prediction neural network;
[0073] (10) Update the parameters of the neural network and activation function:
[0074] The weights of the optimal neural network Threshold and the slope of the negative part of the activation function The initial neural network model is brought in to form a final model for predicting oil pump characteristics based on the improved neural network. The final model for predicting oil pump characteristics is used to predict characteristic data to be calculated, thereby realizing the prediction of oil pump characteristics.
[0075] As a preferred implementation, in step (7), when the remaining multiple mixing parameter combinations are randomly retained, the fitness of the mixing parameter combination is used to calculate the probability of being selected. The greater the fitness of the mixing parameter combination, the greater the probability of being selected and retained.
[0076] like Figure 2 The simulation results of the predicted value and the actual value of the oil pump head characteristic of the present invention are shown;
[0077] like Figure 3 The simulation results of the predicted value and the actual value of the power characteristic of the oil pump of the present invention are shown;
[0078] like Figure 4The figure shows the simulation results of the comparison between the prediction results of the oil pump head characteristics of the present invention and the existing BP neural network and GA-BP neural network;
[0079] like Figure 5 The figure shows the simulation results of the comparison between the prediction results of the oil pump power characteristics of the present invention and the existing BP neural network and GA-BP neural network;
[0080] It can be seen from the above simulation result diagram that the oil pump characteristic prediction method based on the improved neural network proposed in the present invention can better realize the prediction of the oil pump characteristics, and its prediction result of the oil pump characteristics is relatively closer to the actual value.
Claims
1. A method for predicting oil pump characteristics based on improved neural network, characterized in that: The following steps are involved: A. Constructing a historical data set of reservoir development: Obtain oil physical property data and oil pump characteristic data from the pipeline real-time database and the oil pump operation database, use principal component analysis technology to reduce the dimension of complex oil physical property data, extract the main characteristic components of oil physical properties, map the oil physical property data and oil pump characteristic data to the same data source, remove noise data and fill in missing values to obtain the oil pump characteristic historical data set; B. Use fireworks optimization method to optimize the combination of hybrid parameters: (1) Build the initial model: Improve the initial model of the oil pump characteristics prediction of the neural network, construct the input layer, hidden layer and output layer of the neural network, and use the sigmoid function as the activation function of the neural network; randomly extract a proper amount of data from the historical data set of oil pump characteristics, use the mean square error as the loss function, and adjust the initial neural network model for oil pump characteristics prediction; (2) Modify the activation function: The parametric linear rectification function is used to replace the initial sigmoid activation function of the neural network. The calculation formula is: Among them, x is the input variable, a is the slope of the negative part; (3) Fireworks group initialization: Set the maximum number of iterations of the fireworks optimization method to T, the number of fireworks to N, the maximum number of fireworks explosion sparks to m, the maximum explosion radius of fireworks to d, the number of mutation sparks to L, and use the weight w of the neural network, the threshold θ, and the slope a of the negative part of the activation function as the position vector of each firework, expressed as: Xi = ((Xiw,Xi θ ,Xia), where Each firework represents a feasible solution that can optimize the combination of neural network hybrid parameters; randomly initialize the firework group X = {X i ,X2,...,X N }, with mean square error MSE((X i ) as the fitness function of fireworks f((X i ); (4) Initialize the best fireworks, the worst fireworks, and the global optimal fireworks: Calculate the fitness value of each firework and compare the fitness values of all fireworks. Take the feasible solution of the hybrid parameter combination with the smallest fitness value as the best firework X g =(X gw ,X gθ ,X ga ), the feasible solution of the hybrid parameter combination with the largest fitness value is the worst fireworks X e =(X ew ,X eθ ,X ea ), the best fireworks X g =(X gw ,X gθ ,X ga ) as the global optimal neural network hybrid parameter combination X p =(X pw ,X pθ ,X pa )’s initial value; (5) Perform fireworks explosions: According to Best Fireworks X g =(X gw ,X gθ ,X ga ) and Worst Fireworks X e =(X ew ,X eθ ,X ea ) and calculate the fitness value of each firework Xi∈{X1,X2,...,X N The number of sparks that can be produced by the explosion is M i and the maximum explosion radius D i , the hybrid parameter combination with good fitness produces a large number of feasible solutions in a small range, and the hybrid parameter combination with poor fitness produces a small number of feasible solutions in a larger range of neighborhoods; fireworks Xi∈{X1,X2,...,X N The number of sparks that can be produced by the explosion is M i and the maximum explosion radius D i The calculation formulas are: Among them, m is the maximum number of fireworks explosion sparks, d is the maximum explosion radius of fireworks, ε is a very small constant, f(X e ) is the worst fireworks X e The fitness value, f(X g ) is the best fireworks X g The fitness value of (6) Perform fireworks Gaussian mutation: Randomly select L fireworks X from the fireworks group i ∈{X1,X2,...,X N } Perform Gaussian mutation operation on it to generate Gaussian mutation sparks. The mutation formula is: X i =X i ×e(0,1); Among them, e(0,1) is a Gaussian distribution with a mean of 0 and a variance of 1; (7) Update fireworks group: A mixed parameter combination with the smallest fitness value is selected from the sparks generated by the fireworks and retained, and N-1 of the remaining mixed parameter combinations are randomly selected and retained; (8) Update the best fireworks, the worst fireworks, and the global optimal fireworks: Relatively reserved N fireworks X i ∈{X1,X2,...,X N }, update the best fireworks X g =(X gw ,X gθ ,X ga ) and Worst Fireworks X e =(X ew ,X eθ ,X ea ), the firework with the smallest fitness X g =(X gw ,X gθ ,X ga ) as the global optimal neural network hybrid parameter combination X p =(X pw ,X pθ ,X pa ); (9) Iterate to obtain the optimal combination of mixing parameters: Repeat steps 5) to 8) until the maximum number of iterations T is met. At this time, X p =(X pw ,X pθ ,X pa ) is the optimal mixed parameter combination of the oil pump characteristic prediction neural network; (10) Update the parameters of the neural network and activation function: The weights of the optimal neural network X pw =(x pw1 ,x pw2 ,...,x pwu ), threshold X pθ =(x pθ1 ,x pθ2 ,...,x pθu ) and the slope of the negative part of the activation function X pa =(x pa1 ,x pa2 ,...,x pau ) is brought into the initial neural network model to form a final model for predicting oil pump characteristics based on the improved neural network, and the final model for predicting oil pump characteristics is used to predict the characteristic data to be calculated, thereby realizing the prediction of oil pump characteristics.
2. The oil pump characteristic prediction method based on improved neural network according to claim 1 is characterized in that: In step (7), when the remaining multiple mixing parameter combinations are randomly retained, the fitness of the mixing parameter combination is used to calculate the probability of being selected. The greater the fitness of the mixing parameter combination, the greater the probability of being selected and retained.
Citation Information
Patent Citations
Spinning quality prediction method based on firework algorithm improved BP neural network
CN107169565A
Fan fault intelligent diagnosis method based on improved firework algorithm
CN111753751A
Neural network structure searching method, image processing method and device
CN112445823A
Face recognition method for improving convolutional neural network based on firework algorithm
CN112733720A
Filtering, smoothing, memetic algorithms, and feasible direction methods for estimating system state and unknown parameters of electromechanical motion devices
US20170147922A1
