Method for calculating pump indicator diagram based on ground indicator diagram of physical information neural network

Through the method based on physical information neural network, the suspension displacement and load data in the ground power diagram are processed, and the pump power diagram of the downhole pump is calculated, which solves the problem of distortion of the working status information of the downhole pump in the prior art, and realizes more accurate and efficient pump power diagram calculation.

CN120218121APending Publication Date: 2025-06-27NORTHEASTERN UNIV CHINA

Patent Information

Application Number
CN202510288165.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The prior art is difficult to effectively solve the distortion problem of downhole pump working status information in the ground power diagram, which makes it difficult to accurately measure and calculate the pump power diagram.

Method used

The method of calculating the pump power diagram based on the ground power diagram based on the physical information neural network is adopted. The suspension displacement and load data are interpolated, and the boundary conditions of the one-dimensional damped wave equation are set as the boundary conditions, variable replacement is performed to eliminate the difference in scale feature, a physical information neural network model is constructed and the model parameters are trained to generate the pump power diagram.

Benefits of technology

This method simplifies the calculation process of the pump power diagram, reduces the complexity and calculation cost in traditional methods, and improves the accuracy and reliability of downhole pump working status information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218121A_ABST
    Figure CN120218121A_ABST
Patent Text Reader

Abstract

The invention provides a method for calculating a pump indicator diagram based on a ground indicator diagram of a physical information neural network, and relates to the technical field of petroleum production. The method comprises the following steps: firstly, processing displacement data and load data at a suspension point of a rod-pumped well, and setting a displacement function and a load function at the suspension point as boundary conditions of a one-dimensional wave equation with damping for describing the fluctuation of a sucker rod string; converting the dimensioned one-dimensional wave equation with damping into a dimensionless one-dimensional wave equation with damping; then determining the structure of a physical information neural network model, constructing a physical constraint according to a dimensionless one-dimensional wave equation with damping, and determining a total loss function of the physical information neural network model; and finally, training the physical information neural network model to obtain model parameters of the physical information neural network, outputting the displacement and the load at the plunger of the oil well pump by the trained physical information neural network model, and generating a pump indicator diagram after variable replacement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of oil production, and particularly to a method for calculating a pump dynamometer card based on a ground dynamometer card by using a physics-informed neural network. Background Art

[0002] A dynamometer card is a curve of the load varying with displacement at any cross-section of a sucker rod, and its geometric shape is crucial for judging the working state of a downhole pump. The pump dynamometer card is a curve of the load and displacement at the plunger of the downhole pump, which can directly reflect the actual working state of the downhole pump. However, the measurement method of the pump dynamometer card is complex in technology and high in maintenance cost, making it difficult to obtain the information of the pump dynamometer card in practice. The ground dynamometer card describes the relationship between the load and displacement at the polished rod, and has the advantage of convenient measurement. However, the working state information of the downhole pump needs to be transmitted to the polished rod at the ground through the sucker rod. During this process, the information will be affected by many factors such as the elastic deformation and vibration of the sucker rod string, resulting in a certain degree of distortion of the measured load and displacement at the polished rod, and ultimately affecting the working state information of the downhole pump contained in the ground dynamometer card. A method to solve the above problems is to establish the relationship between the pump dynamometer card and the ground dynamometer card, and calculate the difficult-to-measure pump dynamometer card with the easily-measured ground dynamometer card. By modeling the sucker rod string as a type of hyperbolic partial differential equation, and modeling the information in the ground dynamometer card and the pump dynamometer card as the upper and lower boundary conditions and the initial value conditions of the differential equation, the existing method transforms the problem of calculating the pump dynamometer card from the ground dynamometer card into the problem of solving the definite solution of the above partial differential equation. It should be noted that the solution of this type of partial differential equation is usually expressed in the form of an infinite series, making it difficult to apply the above method to engineering practice. Therefore, the existing results mainly achieve the purpose of calculating the pump dynamometer card from the ground dynamometer card by solving the numerical solution of the partial differential equation.

[0003] Currently, the methods for solving the numerical solution of the above partial differential equation mainly include classical numerical methods such as the finite difference method and the finite element method. These numerical methods all obtain the approximate solution of the partial differential equation by dividing the solution domain into grids and constructing a difference scheme. The numerical methods usually require the grids to meet certain conditions, otherwise the convergence of the numerical solution cannot be guaranteed. A physics-informed neural network is a deep neural network model embedded with physical mechanisms, which provides a new idea for solving partial differential equations in the field of engineering technology and has been widely applied in many fields. It should be noted that there is no physics-informed neural network method for the problem of calculating the pump dynamometer card from the ground dynamometer card. In addition, directly extending the existing physics-informed neural network method to this problem will result in too long network training time and cannot guarantee an ideal solution.

[0004] The patent with the application number CN117436319A proposes "A method for calculating the production gas-oil ratio of pumping wells based on surface dynamometer cards". The implementation scheme of this patent is as follows: using the central difference formula to approximate the partial derivative, transforming the solution problem of the one-dimensional damped wave equation into the solution problem of the difference equation at grid points, and obtaining the approximate solution by iteratively solving the difference equation, so as to draw the pump dynamometer card of the oil well.

[0005] The patent with the application number CN106991231A proposes "A method and system for determining the pump power diagram of a pumping well". The implementation scheme of this patent is as follows: First, use the method of separation of variables to split the one-dimensional damped wave equation into a displacement function and a load function. Second, perform Fourier series expansion on the displacement function and the load function and intercept a finite number of terms in the front. Finally, use the surface dynamometer card data to determine the coefficients in the truncated Fourier series, so as to obtain the pump dynamometer card of the oil well.

[0006] The patent with the application number CN113468466A proposes "A method for solving the one-dimensional wave equation with multiple working conditions based on neural network". The implementation scheme of this patent is as follows: regarding the neural network as an approximator of the equation solution, taking the control equation, initial conditions, and boundary conditions as terms of the loss function respectively, and by randomly sampling in the solution domain and combining the automatic differentiation technology of the deep learning framework with the Adam optimization algorithm, a method for solving the one-dimensional wave equation with multiple working conditions is given.

[0007] The Chinese patent CN117436319A "A method for calculating the production gas-oil ratio of pumping wells based on surface dynamometer cards" uses the finite difference method to solve the one-dimensional damped wave equation. The finite difference method requires constraining the time step and space step to meet the convergence condition, which may lead to a large number of manual experimental debugging in complex problems. In addition, the accuracy of the finite difference solution depends seriously on the grid density, and a high-density grid will lead to a large increase in the amount of calculation.

[0008] The Chinese patent CN106991231A "A method and system for determining the pump power diagram of a pumping well" uses the truncated Fourier series method to solve the one-dimensional damped wave equation. The truncated Fourier series method will inevitably introduce truncation errors, and the continuous accumulation of truncation errors will lead to the deviation of the solution result from the true solution.

[0009] The Chinese patent CN113468466A "A method for solving the one-dimensional wave equation with multiple working conditions based on neural network" uses the neural network to solve the one-dimensional homogeneous wave equation without damping under multiple working conditions and simulates the ground vibration wave. However, this method is only applicable to relatively simple models and cannot solve the inhomogeneous one-dimensional damped wave equation. Summary of the Invention

[0010] The technical problem to be solved by the present invention is to provide a method for calculating the pump dynamometer card based on the physical-informed neural network for the ground dynamometer card in view of the deficiencies of the above-mentioned prior art, replacing the traditional finite difference method and truncated Fourier series method, thereby reducing the difficulty of solving the problem of calculating the pump dynamometer card from the ground dynamometer card of the oil well.

[0011] To solve the above technical problem, the technical solution adopted by the present invention is as follows: A method for calculating the pump dynamometer card based on the physical-informed neural network. First, the displacement data and load data at the polished rod of the rod pumping well are processed by interpolation to obtain the displacement function and load function at the polished rod; the displacement function and load function at the polished rod are set as the boundary conditions of the one-dimensional damped wave equation describing the wave motion of the sucker rod string; Secondly, the dimensional one-dimensional damped wave equation is converted into a dimensionless one-dimensional damped wave equation to eliminate the scale feature differences in the time dimension and space dimension; Then, determine the structure of the physical-informed neural network model, construct physical constraints according to the dimensionless one-dimensional damped wave equation, and determine the total loss function of the physical-informed neural network model; Finally, train the physical-informed neural network model to obtain the model parameters of the physical-informed neural network, and the displacement and load at the plunger of the oil pump are output by the trained physical-informed neural network model, and the pump dynamometer card is generated after variable substitution. The method includes the following steps:

[0012] Step 1: Obtain the polished rod displacement data and polished rod load data of the ground dynamometer card, determine the polished rod displacement function and polished rod load function by interpolation, and determine the initial conditions and boundary conditions of the one-dimensional damped wave equation describing the wave motion of the sucker rod string; the polished rod displacement data of the ground dynamometer card is the displacement value at the polished rod of the rod pumping well; the polished rod load data of the ground dynamometer card is the load value at the polished rod of the rod pumping well; the interpolation method is piecewise cubic polynomial interpolation;

[0013] Step 1.1: Collect the polished rod displacement and polished rod load at equal time intervals to obtain the polished rod displacement data and polished rod load data;

[0014] Collect the polished rod displacement and polished rod load within a pumping cycle T at equal time intervals to obtain the polished rod displacement data x s ={t1, t2, …, t i , …, t n} corresponding to the polished rod load data F s ={x1, x2, …, x i , …, x n} and the polished rod load data F s ={F1, F2, …, F i , …, F n}, where n is the number of sampling times within a pumping cycle, t i is the i-th sampling time, xi is the displacement of the polished rod corresponding to the time instant t, and F i is the polished rod load corresponding to the time instant t; i is the displacement of the polished rod corresponding to the time instant t i ;

[0015] Step 1.2: Perform piecewise cubic polynomial interpolation on the polished rod displacement data and polished rod load data obtained in Step 1.1 to obtain the polished rod displacement function U(t) and the polished rod load function D(t), and determine the initial conditions and boundary conditions of the one-dimensional damped wave equation describing the fluctuation of the sucker rod string;

[0016] In each sampling interval [t i , t i+1 , i = 1, 2,..., n - 1, construct the following polished rod displacement function U i (t) and polished rod load function D i (t):

[0017]

[0018] where x′ i and F′ i are arbitrary real numbers, which respectively determine the way in which the interpolation polynomial passes through the points (t i , x i ) and the points (t i , F i );

[0019] Concatenate the piecewise functions on all intervals to obtain the polished rod displacement function U(t) and the polished rod load function D(t);

[0020] The polished rod displacement function U(t) and the polished rod load function D(t) are the boundary conditions of the one-dimensional damped wave equation describing the fluctuation of the sucker rod string. The one-dimensional damped wave equation and its initial conditions and boundary conditions are specifically as follows:

[0021]

[0022] where u(x, t) is the displacement of the sucker rod relative to the casing at the position x at the time instant t, α(x) and β(x) are the initial conditions satisfied by the one-dimensional damped wave equation, E is the elastic modulus of the sucker rod, A is the cross-sectional area of the sucker rod, a is the propagation speed of the stress wave in the sucker rod, c is the damping coefficient, g is the gravitational constant, L is the length of the sucker rod, and T is the pumping period;

[0023] Step 2: Convert the dimensional one-dimensional damped wave equation into a dimensionless one-dimensional damped wave equation through variable substitution to eliminate the scale feature differences in the time dimension and the space dimension;

[0024] The variable substitution mentioned above is to substitute the defined dimensionless variables and the dimensionless variable into the one-dimensional wave equation with damping, and normalize the independent variables x and t in the one-dimensional wave equation with damping to eliminate the dimension, so as to obtain the dimensionless form of the one-dimensional wave equation with damping and its initial conditions and boundary conditions satisfied;

[0025] The dimensionless form of the one-dimensional wave equation with damping and its initial conditions and boundary conditions satisfied are specifically as follows:

[0026]

[0027] Among them, is the dimensionless variable corresponding to x, is the dimensionless variable corresponding to t, is the solution of the one-dimensional wave equation with damping after dimensionless processing;

[0028] Step 3: Determine the structure of the physics-informed neural network model, which consists of an input layer, a hidden layer, and an output layer;

[0029] The structure of the physics-informed neural network has l layers, l≥2. The input layer is used to receive input data and is not counted in the total number of layers. The l-th layer is the output layer, and the first layer to the l-1-th layer are hidden layers;

[0030] Step 3.1: Sample data points in the dimensionless time and space variable region to construct the input layer of the physics-informed neural network model;

[0031] Generate N dimensionless suspension point displacement data within the dimensionless space variable range of [0,1] Generate N dimensionless time data within the range of [0,1] Pair and to form the coordinates of the data points in the solution region, and form a two-dimensional input matrix with the coordinates of all the data points in the solution region Use the data in two dimensions of x as the input layer of the physics-informed neural network;

[0032] Step 3.2: Design a learnable edge activation function to construct the hidden layer of the physics-informed neural network model;

[0033] Step 3.2.1: Design a learnable edge activation function;

[0034] Determine the edge activation function between the i'-th neuron in the (s-1)-th hidden layer and the j'-th neuron in the s-th layer The specific calculation formula is as follows:

[0035]

[0036] Among them, is the corresponding B in the edge activation function between the \(i'\)-th neuron in the \((s - 1)\)-th layer and the \(j'\)-th neuron in the \(s\)-th layer m,k (·) is the weight, which is a learnable model parameter, and B m,k (·) is the \(m\)-th B-spline basis function of order \(k\) that constitutes the edge activation function. G is the number of equal divisions of the input data interval \([0, 1]\), and \(y\) -k+1 , …, \(y_0 = 0\), …, \(y\) G = 1, …, \(y\) G+k-1 are the nodes of the divided intervals;

[0037] Step 3.2.2: Construct the hidden layer of the physics-informed neural network model;

[0038] Determine the output of the \(j'\)-th neuron in the \(s\)-th hidden layer, and the calculation formula is as follows:

[0039]

[0040] Among them, is the output of the \(j'\)-th neuron in the \(s\)-th hidden layer. Let n s-1 be the number of neurons in the \((s - 1)\)-th hidden layer, and \(n\) s is the number of neurons in the \(s\)-th hidden layer;

[0041] Step 3.3: Determine the number of neurons in the output layer according to the one-dimensional damped wave equation to be solved, and construct the output layer of the physics-informed neural network model;

[0042] The number of neurons in the output layer should match the number of solution variables of the one-dimensional damped wave equation to be solved. According to formula (11), calculate the predicted value of the final output of the physics-informed neural network from the output of the \((l - 1)\)-th hidden layer through the edge activation function

[0043]

[0044] Among them, is the edge activation function connecting the \(i'\)-th neuron node in the \((l - 1)\)-th hidden layer and the \(j'\)-th neuron node in the output layer, is the output of the \(i'\)-th neuron node in the \((l - 1)\)-th hidden layer, and \(n\) l-1 is the number of neuron nodes in the \((l - 1)\)-th hidden layer;

[0045] Step 4: Construct physical constraints based on the dimensionless one-dimensional damped wave equation, and determine the total loss function of the physics-informed neural network model;

[0046] Construct the mean square error loss MSE of the equation itself according to the dimensionless one-dimensional damped wave equation and its initial and boundary conditions determined in Step 2 u , the mean square error loss MSE of the boundary conditions b and the mean square error loss MSE of the initial conditions c , and obtain the total loss function MSE of the physics-informed neural network according to formula (12);

[0047] MSE = λ1MSE u + λ2MSE b + λ3MSE c (12)

[0048] where λ1, λ2, and λ3 are the weight coefficients of the loss terms, and the values of λ1, λ2, and λ3 are estimated according to the influence degree of each loss in the process of equation solving. MSE u , MSE b and MSE c are calculated according to formulas (13), (14), and (15):

[0049]

[0050]

[0051] where, is the displacement of the dimensionless sucker rod at the coordinate output by the neural network, is the coordinate of the data point, is the first-order partial derivative of with respect to is the second-order partial derivative of with respect to and N is the number of data points randomly sampled in the variable region, and M is the number of data points randomly sampled at the boundaries of the variable region

[0052] Step 5: Design a proportional-integral-derivative optimization algorithm to train the physics-informed neural network model and obtain the model parameters of the physics-informed neural network;

[0053] Step 5.1: Design a backpropagation algorithm for the physical neural network model constructed in Step 4, and calculate the gradient of the total loss function with respect to the model parameters;

[0054] Calculate the gradient of the total loss function with respect to the output of the l-th layer, i.e., the output layer of the physics-informed neural network model.

[0055] According to the gradient of the (s + 1)-th layer Back-calculate the gradient of the s-th layer The specific calculation formula is as follows:

[0056]

[0057] where is the gradient of the k-th neuron in the (s + 1)-th layer, is the derivative of the edge activation function connecting the j'-th neuron in the s-th layer and the k-th neuron in the (s + 1)-th layer with respect to its input;

[0058] Calculate the gradient of the total loss function with respect to the m-th model parameter in the edge activation function connecting the i'-th neuron in the (s - 1)-th layer and the j'-th neuron in the s-th layer. The specific calculation formula is as follows:

[0059]

[0060] where is the output of the i'-th neuron in the (s - 1)-th layer;

[0061] Step 5.2: Design a proportional-integral-derivative optimization algorithm to determine the model parameters of the physics-informed neural network model;

[0062] Calculate the first-order moment estimate for the model parameter gradients obtained in Step 5.1. The specific calculation formula is as follows:

[0063]

[0064] where is the gradient of the loss function with respect to the model parameter at the τ-th iteration, I τ is the first-order moment estimate of the gradient at the τ-th iteration, and D τ is the first-order moment estimate of the gradient difference at the τ-th iteration;

[0065] Calculate the second-order moment estimate for the model parameter gradients obtained in Step 5.1. The specific calculation formula is as follows:

[0066]

[0067] where v τ is the second-order moment estimate of the gradient at the τ-th iteration, d τ is the second-order moment estimate of the gradient difference at the τ-th iteration, and λ ∈ (0, 1) is the moving average decay parameter that controls the moment estimate;

[0068] The second - moment estimates of the gradient and the gradient difference for the τ - th iteration are corrected, and the specific calculation formula is as follows:

[0069]

[0070] Among them, is the corrected value of the second - moment estimate of the gradient for the τ - th iteration, is the corrected value of the second - moment estimate of the gradient for the τ - th iteration, and β ∈ (0, 1) is a parameter that controls the exponential decay of the correction bias;

[0071] The iterative formula for determining the model parameters of the physics - informed neural network model is shown as follows:

[0072]

[0073] Among them, is the model parameter calculated at the τ - th iteration η is the learning rate, K P is the proportional - adjustment coefficient, K I is the integral - adjustment coefficient, K D is the differential - adjustment coefficient, and σ is a non - negative constant;

[0074] Step 5.3: According to the iterative formula of the model parameters in Step 5.2, solve the model parameters of the physics - informed neural network model constructed in Step 3;

[0075] According to the iterative formula of the model parameters in Step 5.2, continuously iterate. When the total loss function is less than the set threshold θ or reaches the maximum number of iterations I max terminate the iteration, obtain the model parameters of the physics - informed neural network model, and save the trained physics - informed neural network model;

[0076] Step 6: According to the constructed physics - informed neural network model, solve the dimensionless one - dimensional damped wave equation and draw the pump indicator diagram;

[0077] Obtain the input data according to the method of randomly sampling to generate data points within the variable region described in Step 3.1 Flatten it into the form of a column vector and input it into the physics - informed neural network model obtained in Step 5.3 for calculation, and output the dimensionless displacement data at the plunger of the oil pump Then perform variable substitution on the dimensionless displacement data at the plunger of the oil pump to obtain the actual displacement data u at the plunger of the oil pump, and calculate the load data f at the plunger of the oil pump according to Hooke's law p , pair the displacement and load data at the same moment to generate the pump indicator diagram.

[0078] The present invention proposes a method for solving the surface dynamometer card of an oil well and then calculating the pump dynamometer card using a physics-informed neural network model. By moving the activation function from inside the traditional neuron to the connection between neurons and using the B-spline basis function as the activation function, a new structure of physics-informed neural network is proposed. A backpropagation algorithm for the above-mentioned new physical neural network is designed. By introducing appropriate variable substitutions to eliminate the scale feature differences between the time dimension and the space dimension and integrating the proportional-integral-derivative control idea, a new method for training the physics-informed neural network model is proposed.

[0079] The beneficial effects of adopting the above technical solutions are as follows: The method for calculating the pump dynamometer card from the surface dynamometer card based on the physics-informed neural network provided by the present invention does not involve complex mathematical formula derivations, has the advantages of simple method and convenient calculation, and is expected to replace the traditional finite difference method and truncated Fourier series method. The physics-informed neural network with a new structure has strong time and space representation capabilities and can more accurately describe the solution of the one-dimensional damped wave equation. The physics-informed neural network training method comprehensively considers the historical, current, and future information of the gradient, which helps to guide the model to find the optimal solution along the correct direction, thereby improving the convergence speed and generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 It is a flowchart of a method for calculating the pump dynamometer card from the surface dynamometer card based on the physics-informed neural network provided by an embodiment of the present invention;

[0081] Figure 2 It is a scatter plot of the polished rod displacement data and the polished rod load data and the images of the polished rod displacement function and the polished rod load function provided by an embodiment of the present invention, where (a) is the scatter plot of the polished rod displacement data, (b) is the scatter plot of the polished rod load data, (c) is the image of the polished rod displacement function, and (d) is the image of the polished rod load function;

[0082] Figure 3 It is a schematic diagram of the network structure of the physics-informed neural network provided by an embodiment of the present invention;

[0083] Figure 4 It is a schematic diagram of the data points generated by different sampling methods provided by an embodiment of the present invention, where (a) is the schematic diagram of the data points generated by random sampling, and (b) is the schematic diagram of the data points generated by uniform sampling;

[0084] Figure 5 It is a visualization image of different edge activation functions provided by an embodiment of the present invention, where (a) is the image when the edge activation function is a constant, (b) is the image when the edge activation function is a linear function, (c) is the image when the edge activation function is a quadratic function, and (d) is the image when the edge activation function is a cubic function;

[0085] Figure 6 This is a comparison diagram of the surface dynamometer card provided by the embodiments of the present invention and the solved pump dynamometer card. Detailed implementation manners

[0086] The following combines the accompanying drawings and embodiments to further describe in detail the specific implementation manners of the present invention. The following embodiments are used to illustrate the present invention, but are not used to limit the scope of the present invention.

[0087] For the method of calculating the pump dynamometer card based on the physics-informed neural network from the surface dynamometer card, first, the displacement data and load data at the polished rod of the rod pumping well are processed by interpolation to obtain the displacement function and load function at the polished rod; the displacement function and load function at the polished rod are set as the boundary conditions of the one-dimensional damped wave equation; secondly, the dimensional one-dimensional damped wave equation is converted into a dimensionless one-dimensional damped wave equation through variable substitution to eliminate the scale feature differences in the time dimension and the space dimension; then, the structure of the physics-informed neural network model is determined, physical constraints are constructed according to the dimensionless one-dimensional damped wave equation, and the total loss function of the physics-informed neural network model is determined; finally, the physics-informed neural network model is trained to obtain the model parameters of the physics-informed neural network, and the displacement and load at the plunger of the sucker rod pump are output by the trained physics-informed neural network model, and the pump dynamometer card is generated after variable substitution. As Figure 1 shown, it includes the following steps:

[0088] Step 1: Obtain the polished rod displacement data and polished rod load data of the surface dynamometer card, determine the polished rod displacement function and polished rod load function by interpolation method, and determine the initial conditions and boundary conditions of the one-dimensional damped wave equation describing the wave of the sucker rod string; the polished rod displacement data of the surface dynamometer card is the displacement value at the polished rod of the rod pumping well; the polished rod load data of the surface dynamometer card is the load value at the polished rod of the rod pumping well; the interpolation method is piecewise cubic polynomial interpolation;

[0089] Step 1.1: Collect the polished rod displacement and polished rod load at equal time intervals to obtain the polished rod displacement data and polished rod load data;

[0090] Collect the polished rod displacement and polished rod load within a pumping cycle T at equal time intervals to obtain the polished rod displacement data x s ={t1, t2, …, t i , …, t n} corresponding to the polished rod displacement data and the polished rod load data F s ={x1, x2, …, x i , …, x n} and the polished rod load data F s ={F1, F2, …, F i , …, Fn}, where n is the number of samplings in a pumping cycle, t i is the i-th sampling moment, and x i is the polished rod displacement corresponding to the moment t i , and F i is the polished rod load corresponding to the moment t i .

[0091] In this embodiment, a displacement sensor and a load sensor between the clamping plates of the walking beam are used to collect the polished rod displacement and the polished rod load within a pumping cycle at equal time intervals. Among them, the number of samplings n is 144, the displacement data is x s = {0, 0.01, …, 0}, and the load data is F s = {44.17, 45.25, …, 42.29}.

[0092] Step 1.2: Perform piecewise cubic polynomial interpolation on the polished rod displacement data and the polished rod load data obtained in Step 1.1 to obtain the polished rod displacement function U(t) and the polished rod load function D(t), and determine the initial conditions and boundary conditions of the one-dimensional damped wave equation describing the fluctuation of the sucker rod string;

[0093] In each sampling interval [t i , t i+1 , i = 1, 2, …, n - 1], construct the following polished rod displacement function U i (t) and polished rod load function D i (t):

[0094]

[0095] where x′ i and F′ i are arbitrary real numbers, which respectively determine the way in which the interpolation polynomial passes through the points (t i , x i ) and the point (t i , F i );

[0096] Concatenate the piecewise functions on all intervals to obtain the polished rod displacement function U(t) and the polished rod load function D(t);

[0097] The polished rod displacement function U(t) and the polished rod load function D(t) are the boundary conditions of the one-dimensional damped wave equation describing the fluctuation of the sucker rod string. The one-dimensional damped wave equation and its initial conditions and boundary conditions are specifically as follows:

[0098]

[0099] Among them, \(u(x,t)\) is the displacement (m) of the sucker rod relative to the casing at position \(x\) at time \(t\), \(\alpha(x)\) and \(\beta(x)\) are the initial conditions satisfied by the one-dimensional wave equation with damping, \(E\) is the elastic modulus (Pa) of the sucker rod, \(A\) is the cross-sectional area of the sucker rod (\(m\ 2 ^2\)), \(a\) is the propagation speed (m / s) of the stress wave in the sucker rod, \(c\) is the damping coefficient (1 / s), \(g\) is the gravitational constant (\(m / s\ 2 ^2\)), \(L\) is the length (m) of the sucker rod, and \(T\) is the pumping cycle (s);

[0100] In this embodiment, \(x'\ i = 1.8\), \(F'\ i = 1.2\). According to formulas (1) and (2), the displacement function and load function on each sampling interval \([t i ,t i+1 \) are obtained, and the piecewise functions on all intervals are spliced together to obtain the polished rod displacement function \(U(t)\) and the polished rod load function \(D(t)\). Figure 2 The scatter plots of the polished rod displacement data and polished rod load data, as well as the images of the polished rod displacement function and polished rod load function, are given.

[0101] Step 2: Convert the dimensional one-dimensional wave equation with damping into a dimensionless one-dimensional wave equation with damping through variable substitution to eliminate the scale feature differences in the time dimension and space dimension;

[0102] The variable substitution is to substitute the defined dimensionless variables and dimensionless variable into the one-dimensional wave equation with damping in formulas (3), (4) and (5), and normalize the independent variables \(x\) and \(t\) in the one-dimensional wave equation with damping to eliminate the dimension, obtaining the dimensionless form of the one-dimensional wave equation with damping and its satisfied initial conditions and boundary conditions;

[0103] The dimensionless form of the one-dimensional wave equation with damping and its satisfied initial conditions and boundary conditions are specifically:

[0104]

[0105] Among them, is the dimensionless variable corresponding to \(x\), is the dimensionless variable corresponding to \(t\), is the solution of the one-dimensional wave equation with damping after dimensionless processing.

[0106] In this embodiment, the propagation speed \(a\) of the stress wave in the sucker rod is 5000 m / s 2 , the elastic modulus \(E\) of the sucker rod is \(2.1\times10 11 Pa, and the density \(\rho\) of the sucker rod is 8456 kg / m3 , the length L of the sucker rod is 1800 m, the pumping cycle T is 7.2 s, the damping coefficient c is 0.25, and the gravitational constant g is 9.8 m / s 2 , the cross-sectional area A of the sucker rod is 7.5*10 -4 m 2 , substituting these parameter values into formulas (6), (7) and (8) to obtain the dimensionless one-dimensional damped wave equation and its satisfied initial and boundary conditions.

[0107] Step 3: Determine the structure of the physics-informed neural network model, which consists of an input layer, a hidden layer, and an output layer;

[0108] The structure of the physics-informed neural network has l layers, l≥2. The input layer is used to receive input data and is not counted as the total number of layers. The l-th layer is the output layer, and the first layer to the l-1-th layer are hidden layers;

[0109] In this embodiment, the number of layers l of the constructed physics-informed neural network is 3. Among them, there is 1 input layer, which consists of two neurons and is not counted as the total number of layers. The first layer and the second layer are hidden layers, which consist of 5 neurons and 3 neurons respectively. The third layer is the output layer, which consists of 1 neuron. Figure 3 is the schematic diagram of the network structure of the physics-informed neural network in this embodiment.

[0110] Step 3.1: Sample and generate data points within the dimensionless time and space variable regions to construct the input layer of the physics-informed neural network model;

[0111] Specifically: Generate N dimensionless polished rod displacement data within the dimensionless space variable range [0,1] Generate N dimensionless time data within the range [0,1] Pair and to form the coordinates of the data points in the solution region, and form a two-dimensional input matrix with the coordinates of all data points in the solution region Use the data in the two dimensions of x as the input layer of the physics-informed neural network; In this embodiment, the sampling method of the data points in the solution region can be selected as random sampling, uniform sampling, etc. In this embodiment, random sampling points are selected, N is taken as 5000, and the input matrix composed of the input data of the input layer is

[0112] In this embodiment, the sampling method of the data points in the solution region can be selected as random sampling, uniform sampling, etc. In this embodiment, random sampling points are selected, N is taken as 5000, and the input matrix composed of the input data of the input layer is Figure 4 is the schematic diagram of the data points generated by different sampling methods in the implementation manner of the present invention.

[0113] Step 3.2: Design a learnable edge activation function to construct the hidden layer of the physics-informed neural network model;

[0114] Step 3.2.1: Design a learnable edge activation function;

[0115] Determine the edge activation function between the \(i'\)-th neuron in the \((s - 1)\)-th hidden layer and the \(j'\)-th neuron in the \(s\)-th layer The specific calculation formula is as follows:

[0116]

[0117] Among them, is the corresponding \(B\) in the edge activation function between the \(i'\)-th neuron in the \((s - 1)\)-th layer and the \(j'\)-th neuron in the \(s\)-th layer m,k (·) is the weight, which is a learnable model parameter, \(B\) m,k (·) is the \(m\)-th \(k\)-order B-spline basis function that constitutes the edge activation function, \(G\) is the number of equal partitions of the input data interval \([0, 1]\), \(y\) -k+1 ,…, \(y_0 = 0\),…, \(y\) G = 1,…, \(y\) G+k-1 are the nodes of the partition interval;

[0118] In this embodiment, the order of the B-spline basis function is 4, the number of partition intervals \(G = 5\), the nodes are \(\{y_0 = 0, y_1 = 0.2,\cdots, y_5 = 1\}\), and the extended nodes are \(\{y\) -3 = -0.6,\cdots, y_0 = 0, y_1 = 0.2,\cdots, y_8 = 1.6\}\), and the edge activation function is obtained by the weighted sum of 8 4-order B-spline basis functions \(B\) m,4 (y), \(m = 0, 1,\cdots, 7\). Figure 5 This is a possible schematic diagram of the image of the edge activation function in this embodiment.

[0119] Step 3.2.2: Construct the hidden layer of the physics-informed neural network model;

[0120] Determine the output of the \(j'\)-th neuron in the \(s\)-th hidden layer The calculation formula is as follows:

[0121]

[0122] Among them, is the output of the \(j'\)-th neuron in the \(s\)-th hidden layer. Let n s-1 be the number of neurons in the \((s - 1)\)-th hidden layer, and \(n\) s is the number of neurons in the \(s\)-th hidden layer.

[0123] Step 3.3: Determine the number of neurons in the output layer according to the one-dimensional damped wave equation to be solved, and construct the output layer of the physics-informed neural network model;

[0124] The number of neurons in the output layer should match the number of solution variables of the one-dimensional damped wave equation to be solved. According to formula (11), the predicted value of the final output of the physics-informed neural network is calculated from the output of the (l - 1)-th hidden layer through the edge activation function.

[0125]

[0126] Among them, is the edge activation function between the i'-th neuron node in the (l - 1)-th hidden layer and the j'-th neuron node in the output layer, is the output of the i'-th neuron node in the (l - 1)-th hidden layer, and n l-1 is the number of neuron nodes in the (l - 1)-th hidden layer.

[0127] In this embodiment, to ensure that the number of neurons in the output layer matches the number of solution variables of the one-dimensional damped wave equation, the number of neurons in the output layer is taken as 1.

[0128] Step 4: Construct physical constraints according to the dimensionless one-dimensional damped wave equation, and determine the total loss function of the physics-informed neural network model;

[0129] Construct the mean square error loss MSE of the equation itself according to the dimensionless one-dimensional damped wave equation and its initial conditions and boundary conditions determined in Step 2 u , the mean square error loss MSE of the boundary conditions b and the mean square error loss MSE of the initial conditions c , and obtain the total loss function MSE of the physics-informed neural network according to formula (12);

[0130] MSE = λ1MSE u + λ2MSE b + λ3MSE c (12)

[0131] Among them, λ1, λ2, and λ3 are the weight coefficients of the loss terms. The values of λ1, λ2, and λ3 are estimated according to the influence degree of each loss in the process of equation solving. MSE u , MSE b and MSE c are calculated according to formula (13), formula (14), and formula (15):

[0132]

[0133] Among them, is the output by the neural network.The dimensionless displacement of the sucker rod under the coordinate, are the coordinates of the data points, is for the first-order partial derivative of, is for the second-order partial derivative of, N is the number of data points randomly sampled in the variable region, and M is the number of data points randomly sampled at the boundaries of and the variable region.

[0134] In this embodiment, the values of λ1, λ2, and λ3 are λ1 = 0.01, λ2 = 0.2, and λ3 = 0.3. The number of data points randomly sampled at the boundaries of and the variable region is M = 200.

[0135] Step 5: Design a proportional-integral-derivative optimization algorithm to train the physics-informed neural network model to obtain the model parameters of the physics-informed neural network;

[0136] Step 5.1: Design a backpropagation algorithm for the physics neural network model constructed in Step 4 to calculate the gradient of the total loss function with respect to the model parameters;

[0137] Calculate the gradient of the total loss function with respect to the output of the output layer of the physics-informed neural network model, i.e., the output of the l-th layer The specific calculation formula is as follows:

[0138]

[0139] where, is the output of the output layer of the physics-informed neural network;

[0140] According to the gradient of the (s + 1)-th layer back-calculate the gradient of the s-th layer The specific calculation formula is as follows:

[0141]

[0142] where, is the gradient of the k-th neuron in the (s + 1)-th layer, is the derivative of the edge activation function connecting the j'-th neuron in the s-th layer and the k-th neuron in the (s + 1)-th layer with respect to its input;

[0143] Calculate the gradient of the total loss function with respect to the m-th model parameter in the edge activation function connecting the i'-th neuron in the (s - 1)-th layer and the j'-th neuron in the s-th layer. The specific calculation formula is as follows:

[0144]

[0145] Among them, is the output of the i'-th neuron in the (s - 1)-th layer;

[0146] Step 5.2: Design a proportional-integral-derivative optimization algorithm to determine the model parameters of the physics-informed neural network model;

[0147] Calculate the first-order moment estimate for the model parameter gradient obtained in Step 5.1. The specific calculation formula is as follows:

[0148]

[0149] Among them, is the gradient of the loss function with respect to the model parameter at the τ-th iteration I τ is the first-order moment estimate of the gradient at the τ-th iteration, and D τ is the first-order moment estimate of the gradient difference at the τ-th iteration;

[0150] Calculate the second-order moment estimate for the model parameter gradient obtained in Step 5.1. The specific calculation formula is as follows:

[0151]

[0152] Among them, v τ is the second-order moment estimate of the gradient at the τ-th iteration, d τ is the second-order moment estimate of the gradient difference at the τ-th iteration, and λ ∈ (0, 1) is the moving average decay parameter that controls the moment estimate;

[0153] Correct the second-order moment estimates of the gradient and gradient difference at the τ-th iteration. The specific calculation formula is as follows:

[0154]

[0155] Among them, is the corrected value of the second-order moment estimate of the gradient at the τ-th iteration, is the corrected value of the second-order moment estimate of the gradient at the τ-th iteration, and β ∈ (0, 1) is the parameter that controls the exponential decay of the correction bias.

[0156] Determine the iteration formula for the model parameters of the physics-informed neural network model as shown in the following formula:

[0157]

[0158] Among them, is the model parameter calculated at the τ-th iteration η is the learning rate, KP is the proportional adjustment coefficient, K I is the integral adjustment coefficient, K D is the differential adjustment coefficient, and σ is a very small non-negative constant.

[0159] Step 5.3: According to the iterative formula of the model parameters in step 5.2, solve the model parameters of the physical information neural network model constructed in step 3.

[0160] According to the iteration formula of the model parameters in step 5.2, iterate continuously until the total loss function is less than the set threshold θ or reaches the maximum number of iterations I max When , the iteration is terminated, the model parameters of the physical information neural network model are obtained and the trained physical information neural network model is saved;

[0161] In this embodiment, λ=0.9, β=0.99, learning rate η=0.001, and proportional adjustment coefficient K P =0.8, integral adjustment coefficient K I =0.5, differential adjustment coefficient K D =0.2, parameter σ = 10 -8 .

[0162] Step 6: Solve the dimensionless one-dimensional damped wave equation according to the constructed physical information neural network model and draw the pump performance diagram;

[0163] The input data is obtained by randomly sampling and generating data points in the variable region according to step 3.1. Flatten it into a column vector form and input the physical information obtained in step 5.3 into the neural network model for calculation, and output the dimensionless displacement data at the oil pump plunger. Then, the dimensionless displacement data at the oil pump plunger are replaced by variables to obtain the actual displacement data u at the oil pump plunger, and the load data f at the oil pump plunger is calculated by Hooke's law. p , the displacement and load data at the same time are paired to generate the pump indicator diagram.

[0164] In this embodiment, the physical information neural network outputs dimensionless displacement data at the oil pump plunger: Execute variable substitution and calculate the actual displacement data of the oil well pump plunger as u=(0,0.07,…,0.084,0) T , the load data at the oil pump plunger is calculated by Hooke's law as f p =(0.67,2.21,…,1.10,0.66) T , the displacement and load data at the same time are paired to generate the pump indicator diagram. Figure 6Schematic diagram of the pump dynamometer card calculated from the surface dynamometer card in this embodiment mode.

[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope defined by the claims of the present invention.

Claims

1. A method for calculating a pump dynamometer diagram from a ground dynamometer diagram based on a physical information neural network, characterized in that: include: The displacement data and load data at the suspension point of the rod pumping well are processed by interpolation method to obtain the displacement function and load function at the suspension point; The displacement function and load function at the suspension point are set as the boundary conditions of the one-dimensional damped wave equation describing the vibration of the sucker rod string; The dimensioned one-dimensional damped wave equation is converted into the dimensionless one-dimensional damped wave equation, eliminating the scale characteristic difference between the time dimension and the space dimension; Determine the structure of the physical information neural network model; Based on the dimensionless one-dimensional damped wave equation, physical constraints are constructed to determine the total loss function of the physical information neural network model; Training the physical information neural network model to obtain model parameters of the physical information neural network; The displacement and load at the oil well pump plunger are output by the trained physical information neural network model, and the pump dynamometer diagram is generated after variable substitution.

2. The method for calculating a pump dynamometer diagram from a ground dynamometer diagram based on a physical information neural network according to claim 1, characterized in that: The specific steps include: Step 1: Obtain the suspension point displacement data and suspension point load data of the ground dynamometer diagram, determine the suspension point displacement function and the suspension point load function by interpolation method, and determine the initial conditions and boundary conditions of the one-dimensional damped wave equation describing the fluctuation of the sucker rod string; the suspension point displacement data of the ground dynamometer diagram is the displacement value at the suspension point of the rod pumping well; the suspension point load data of the ground dynamometer diagram is the load value at the suspension point of the rod pumping well; Step 2: Convert the dimensioned one-dimensional damped wave equation into a dimensionless one-dimensional damped wave equation by replacing variables, eliminating the scale characteristic differences between the time dimension and the space dimension; Step 3: Determine the structure of the physical information neural network model, which consists of an input layer, a hidden layer, and an output layer; The structure of the physical information neural network has l layers, l≥2, the input layer is used to receive input data and is not counted in the total number of layers, the lth layer is the output layer, and the first layer to the l-1th layer are hidden layers; Step 4: Construct physical constraints based on the dimensionless one-dimensional damped wave equation and determine the total loss function of the physical information neural network model; Step 5: Design a proportional-integral-differential optimization algorithm to train the physical information neural network model and obtain the model parameters of the physical information neural network; Step 6: Solve the dimensionless one-dimensional damped wave equation based on the constructed physical information neural network model and draw the pump performance diagram.

3. The method for calculating a pump dynamometer diagram from a ground dynamometer diagram based on a physical information neural network according to claim 2, characterized in that: The step 1 comprises: Step 1.1: Collect the suspension point displacement and suspension point load at equal time intervals to obtain the suspension point displacement data and suspension point load data; The suspension point displacement and suspension point load are collected at equal time intervals within a pumping cycle T, and the corresponding values ​​at sampling time t are obtained. s ={t1,t2,…,t i ,…,t n }The corresponding suspension point displacement data x s ={x1,x2,…,x i ,…,x n } and suspension point load data F s ={F1,F2,…,F i ,…,F n }, where n is the number of samples in a pumping cycle, t i is the i-th sampling moment, x i Yes i The corresponding suspension point displacement at the moment, F i Yes i The suspension point load corresponding to the moment; Step 1.2: Perform piecewise cubic polynomial interpolation on the suspension point displacement data and suspension point load data obtained in step 1.1 to obtain the suspension point displacement function U(t) and the suspension point load function D(t), and determine the initial conditions and boundary conditions of the one-dimensional damped wave equation describing the pumping rod string fluctuation; In each sampling interval [t i ,t i+1 ], i = 1, 2, ..., n-1, construct the following suspension point displacement function U i (t) and suspension point load function D i (t): Among them, x′ i and F′ i are arbitrary real numbers that determine how the interpolation polynomial passes through the point (t i ,x i ) and point (t i ,F i ); The piecewise functions on all intervals are spliced ​​together to obtain the suspension point displacement function U(t) and the suspension point load function D(t); The suspension point displacement function U(t) and the suspension point load function D(t) are the boundary conditions of the one-dimensional damped wave equation describing the vibration of the sucker rod string. The one-dimensional damped wave equation and its initial conditions and boundary conditions are specifically as follows: Where u(x,t) is the displacement of the sucker rod relative to the casing at time x, α(x) and β(x) are the initial conditions satisfied by the one-dimensional damped wave equation, E is the elastic modulus of the sucker rod, A is the cross-sectional area of ​​the sucker rod, a is the propagation speed of the stress wave in the sucker rod, c is the damping coefficient, g is the gravity constant, L is the length of the sucker rod, and T is the pumping cycle.

4. The method for calculating a pump dynamometer diagram from a ground dynamometer diagram based on a physical information neural network according to claim 3, characterized in that: The variable replacement described in step 2 is to define the dimensionless variable and dimensionless variables Substitute into the one-dimensional damped wave equation, normalize the independent variables x and t in the one-dimensional damped wave equation to eliminate the dimension, and obtain the dimensionless form of the one-dimensional damped wave equation and the initial conditions and boundary conditions it satisfies; The dimensionless one-dimensional damped wave equation and the initial conditions and boundary conditions it satisfies are specifically: in, is the dimensionless variable corresponding to x, is the dimensionless variable corresponding to t, It is the solution of the one-dimensional damped wave equation after dimensionless treatment.

5. The method for calculating a pump dynamometer diagram from a ground dynamometer diagram based on a physical information neural network according to claim 4, characterized in that: The step 3 comprises: Step 3.1: Sampling and generating data points in the dimensionless time and space variable regions to construct the input layer of the physical information neural network model; Generate N dimensionless suspension point displacement data in the dimensionless spatial variable [0,1] range 1≤j≤N, generates N dimensionless time data in the range [0,1] Will and pair The coordinates of the data points that constitute the solution area are combined into a two-dimensional input matrix The data of two dimensions of x are used as the input layer of the physical information neural network; Step 3.2: Design a learnable edge activation function and construct the hidden layer of the physical information neural network model; Step 3.2.1: Design a learnable edge activation function; Determine the edge activation function between the i′th neuron in the s-1th hidden layer and the j′th neuron in the sth layer The specific calculation formula is as follows: in, is the corresponding B in the edge activation function between the i′th neuron in the s-1th layer and the j′th neuron in the sth layer m,k The weight of (·) is a learnable model parameter, B m,k (·) is the m-th k-th B-spline basis function that constitutes the edge activation function, G is the number of evenly divided input data interval [0,1], y -k+1 ,…,y0=0,…,y G =1,…,y G+k-1 It is the node that divides the interval; Step 3.2.2: Construct the hidden layer of the physical information neural network model; Determine the output of the j′th neuron in the sth hidden layer The calculation formula is as follows: in, is the output of the j′th neuron in the sth hidden layer, let n s-1 is the number of neurons in the s-1th hidden layer, n s is the number of neurons in the sth hidden layer; Step 3.3: Determine the number of neurons in the output layer according to the one-dimensional damped wave equation to be solved, and construct the output layer of the physical information neural network model; The number of neurons in the output layer should match the number of variables to be solved for the one-dimensional damped wave equation. According to formula (11), the output of the l-1th hidden layer is used to calculate the predicted value of the final output of the physical information neural network through the edge activation function. in, is the edge activation function connecting the i′th neuron node of the l-1th hidden layer and the j′th neuron node of the output layer, is the output of the i′th neuron node in the l-1th hidden layer, n l-1 is the number of neuron nodes in the l-1th hidden layer.

6. The method for calculating a pump dynamometer diagram from a ground dynamometer diagram based on a physical information neural network according to claim 5, characterized in that: The step 4 comprises: According to the dimensionless one-dimensional damped wave equation determined in step 2 and its initial and boundary conditions, the mean square error loss MSE of the equation itself is constructed. u , mean square error loss MSE of boundary conditions b and the mean square error loss MSE of the initial conditions c , according to formula (12), the total loss function MSE of the physical information neural network is obtained; MSE=λ1MSE u +λ2MSE b +λ3MSE c (12) Among them, λ1, λ2 and λ3 are the weight coefficients of the loss terms, and the values ​​of λ1, λ2 and λ3 are estimated according to the influence of each loss in the process of solving the equation.

7. The method for calculating a pump dynamometer diagram from a ground dynamometer diagram based on a physical information neural network according to claim 6, characterized in that: The mean square error loss MSE of the dimensionless one-dimensional damped wave equation is u , MSE of boundary conditions b and the MSE of the initial conditions c According to formula (13), formula (14) and formula (15), we can get: in, The output of the neural network is The dimensionless displacement of the sucker rod in coordinates, are the coordinates of the data points, yes right The first-order partial derivative of yes right The second-order partial derivative of , N is the number of data points randomly sampled in the variable region, and M is the number of data points randomly sampled in the variable region. and The number of data points generated by random sampling at the boundary of .

8. The method for calculating a pump dynamometer diagram from a ground dynamometer diagram based on a physical information neural network according to claim 7, characterized in that: The step 5 comprises: Step 5.1: Design a back-propagation algorithm for the physical neural network model constructed in step 4, and calculate the gradient of the total loss function with respect to the model parameters; Calculate the gradient of the total loss function to the output layer of the physical information neural network model, i.e., the output of the first layer According to the gradient of the s+1th layer Reverse calculation of the gradient of the sth layer The specific calculation formula is as follows: in, is the gradient of the kth neuron in the s+1th layer, is the derivative of the edge activation function connecting the j′th neuron in layer s and the kth neuron in layer s+1 with respect to its input; Calculate the gradient of the total loss function relative to the mth model parameter in the edge activation function connecting the i′th neuron in the s-1 layer and the j′th neuron in the s layer. The specific calculation formula is as follows: in, is the output of the i′th neuron in the s-1th layer; Step 5.2: Design a proportional-integral-differential optimization algorithm to determine the model parameters of the physical information neural network model; Calculate the first-order moment estimate for the model parameter gradient obtained in step 5.

1. The specific calculation formula is as follows: in, is the loss function of the model parameters at the τth iteration Gradient Iτ is the first-order moment estimate of the gradient at the τth iteration, and Dτ is the first-order moment estimate of the gradient difference at the τth iteration; The second-order moment estimate is calculated for the model parameter gradient obtained in step 5.

1. The specific calculation formula is as follows: Where vτ is the second-order moment estimate of the gradient at the τth iteration, dτ is the second-order moment estimate of the gradient difference at the τth iteration, and λ∈(0,1) is the moving average decay parameter that controls the moment estimate; The second-order moment estimation of the gradient and gradient difference of the τth iteration is corrected. The specific calculation formula is as follows: in, is the revised value of the second-order moment estimate of the gradient at the τth iteration, is the correction value of the second-order moment estimate of the gradient at the τth iteration, β∈(0,1) is the parameter that controls the exponential decay of the correction deviation; The iterative formula for determining the model parameters of the physical information neural network model is shown in the following formula: in, is the model parameter calculated at the τth iteration η is the learning rate, KP is the proportional adjustment coefficient, KI is the integral adjustment coefficient, KD is the differential adjustment coefficient, and σ is a non-negative constant; Step 5.3: According to the iterative formula of the model parameters in step 5.2, solve the model parameters of the physical information neural network model constructed in step 3; According to the iterative formula of the model parameters in step 5.2, iterate continuously. When the total loss function is less than the set threshold θ or reaches the maximum number of iterations Imax, terminate the iteration, obtain the model parameters of the physical information neural network model and save the trained physical information neural network model.

9. The method for calculating a pump dynamometer diagram from a ground dynamometer diagram based on a physical information neural network according to claim 8, characterized in that: The step 6 comprises: The input data is obtained by randomly sampling and generating data points in the variable region according to step 3.

1. Flatten it into a column vector form and input the physical information obtained in step 5.3 into the neural network model for calculation, and output the dimensionless displacement data at the oil pump plunger. Then, the dimensionless displacement data at the oil pump plunger is replaced with variables to obtain the actual displacement data u at the oil pump plunger. The load data fp at the oil pump plunger is calculated by Hooke's law. The displacement and load data at the same time are paired to generate a pump indicator diagram.

Citation Information

Patent Citations

  • Method and system for determining pump indicator diagram of rod-pumped well

    CN106991231A

  • Multi-working-condition one-dimensional wave equation solving method based on neural network

    CN113468466A

  • Pumping well production gas-oil ratio calculation method based on ground indicator diagram

    CN117436319A

Cited By

  • Bridge damping ratio identification method based on PINNs under dimensionless control equation

    CN120632382A

  • Bridge damping ratio identification method based on PINNs under dimensionless governing equation

    CN120632382B

  • PINN network-based one-dimensional rod elastic-plastic mechanical behavior prediction method

    CN120822344A