A throttle valve response prediction method based on gray box model
Through the throttle valve response prediction method based on the gray box model, the timeliness and accuracy of throttle valve opening adjustment is solved, ensuring the balance between the bottom well pressure and the formation pressure, and improving the safety and efficiency of the drilling process.
Patent Information
- Application Number
- CN202410067739.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-16
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-01-16
AI Technical Summary
During the drilling process, the timeliness and accuracy of the throttle opening adjustment is difficult to ensure, resulting in the failure to effectively balance the formation pressure in the bottom well pressure, affecting the safety and efficiency of the drilling process.
Using the throttle valve response prediction method based on the gray box model, a wellhead pressure prediction model is established by acquiring and preprocessing data, predicting the pressure value to be applied, and correcting it according to the throttle valve response error, updating the gray box model, and improving the section Accuracy of flow valve response.
Timely and accurately adjust the opening of the throttle valve, ensure the balance between the bottom of the well pressure and the formation pressure, and improve the safety and efficiency of the well pressing process.
Smart Images

Figure CN117725840B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a throttle valve response prediction method based on a grey box model, belonging to the technical field of oil drilling well control. Background Art
[0002] As the development of oil and gas fields in my country continues to increase, the scope of development is also expanding. The development environment is becoming more and more severe, and the formation conditions are more complex. If a high-pressure gas layer is encountered during drilling, the gas will enter the annulus, forming a gas-liquid two-phase flow in the annulus, and the drilling fluid will return from the wellhead, resulting in overflow. At this time, the bottom hole pressure decreases and is not enough to balance the formation pressure. The throttle valve needs to be adjusted to balance the bottom hole pressure. Similarly, whether in the drilling process or the well killing process, the bottom hole pressure needs to be kept balanced. During field operations, due to the difficulty in measuring the bottom hole pressure, the adjustment degree of the throttle valve needs to be based on the pump pressure as a reference. This is because the drill pipe contains pure liquid, and the pump pressure can accurately reflect the changes in the bottom hole pressure. For example, if the throttle valve is opened too large, the bottom hole pressure will be too small to balance the formation pressure, and the pump pressure reflected at the wellhead through the drill pipe will also decrease. On the contrary, if the throttle valve is opened too small, the bottom hole pressure will be too large, greater than the formation pressure, and the pump pressure reflected at the wellhead through the drill pipe will also increase. Solving the timeliness and accuracy of throttle valve opening adjustment is the key to ensuring that the bottom hole pressure always balances the formation pressure during the well killing process. It is also the key to ensuring the safety and efficiency of the entire well killing process. It is an objective requirement for the development of drilling technology and ensures the steady progress of national oil and gas field development. Summary of the invention
[0003] In order to overcome the defects in the prior art, the present invention aims to provide a throttle valve response prediction method based on a gray box model, which improves the timeliness and accuracy of the accurate throttle valve opening and provides a reference for well control operations.
[0004] The present invention provides a technical solution to solve the above technical problem: a throttle valve response prediction method based on a gray box model, comprising the following steps:
[0005] S1, obtain data and preprocess the data;
[0006] S2. Establish a wellhead pressure prediction model based on the multiphase flow model;
[0007] S3, predicting the predicted pressure value that should be applied at the wellhead during the well killing process according to the wellhead pressure prediction model, that is, the predicted response value, and causing the throttle valve to respond according to the predicted response value;
[0008] S4, according to the throttle valve response error between the pump pressure after the throttle valve responds and the initial pump pressure, and according to the throttle valve response error, correcting the predicted response value of the throttle valve to obtain a corrected response value;
[0009] S5, taking the wellhead pressure prediction model as a gray box model, using the corrected response value data, training and updating the gray box model to obtain an updated wellhead pressure prediction model;
[0010] S6. Predicting a throttle valve response value according to the updated wellhead pressure prediction model.
[0011] A further technical solution is that the data in step S1 includes wellhead pressure, pump pressure, well depth structure data, drilling tool assembly data, actual drilling trajectory data, wellhead device parameters, gas component parameters, and well killing fluid component parameters.
[0012] A further technical solution is that in step S1, the data is preprocessed based on the Laeda rule.
[0013] A further technical solution is that in step S1, the mean and standard deviation of the data are first calculated, and then the Laetal rule is used to eliminate abnormal data.
[0014] A further technical solution is that the calculation formula for the mean and standard deviation in step S1 is:
[0015]
[0016]
[0017] Where: μ is the data mean; x i is the data acquired in real time; n is the number of data; σ is the standard deviation of the data.
[0018] A further technical solution is that the wellhead pressure prediction model in step S2 is:
[0019]
[0020] v g =C0v m +v d
[0021]
[0022] P a =P bottom -P hl -P hm -P hg -ΔP f
[0023] Where: L a(t+1) L is the height of the top of the miscible phase section at time t+1 of well killing, m; a(t) is the height of the top of the miscible phase section at time t of well killing, m; L b(t+1)L is the bottom height of the miscible phase section at time t+1 of well killing, m; b(t) is the bottom height of the miscible phase section at time t of well killing, m; Z b(t+1) is the compression coefficient of the bottom of the miscible phase section at the time of well killing t+1, dimensionless; Z b(t) is the compression coefficient of the bottom of the miscible phase section at time t of well killing, dimensionless; T b(t+1) is the bottom temperature of the miscible phase at the time of well killing t+1, K; T b(t) is the bottom temperature of the miscible phase at the time of well killing, K; P b(t+1) is the bottom pressure of the miscible phase at the time of well killing t+1, MPa; P b(t) is the bottom pressure of the miscible phase at time t, MPa; v g is the true velocity of the gas phase, m / s; C0 is the gas phase distribution coefficient, dimensionless; v m is the gas-liquid mixing velocity, m / s; v d is the drift velocity, m / s; ΔP f is the flow friction, MPa; f is the Fanning friction coefficient; ρ m is the gas-liquid mixture density, kg / m 3 ; D is the equivalent diameter of the annulus, m; ΔL is the grid length, m; P hl is the liquid column pressure of the well-killing fluid section, MPa; P hg is the gas column pressure of the gas section, MPa; P hm is the mixed phase pressure, MPa; P bottom is the bottom hole pressure, MPa; P a is the predicted pressure value, MPa.
[0024] A further technical solution is that the throttle valve response error calculation formula in step S4 is:
[0025] P Δ =P b -P b0
[0026] Where P Δ is the throttle valve error, MPa; P b is the pump pressure after the throttle valve responds, MPa; P b0 is the initial pump pressure, MPa.
[0027] A further technical solution is that the specific steps of training update in step S5 are:
[0028] (1) Add weights to the modified response data using the principal component analysis method;
[0029] (2) The wellhead pressure prediction model is used as a gray box model, with the acquired data as input and the predicted response value of the throttle valve as output. The cumulative correction error between the predicted response value and the corrected response value is calculated, and it is determined whether the cumulative correction error meets the error accuracy. If not, proceed to the next step.
[0030] (3) Use the online gradient descent method to update the weight of the corrected response value data and iterate to obtain new weights;
[0031] (4) Using the neural network under the new weights, the cumulative correction error between the predicted response value and the corrected response value is calculated;
[0032] (5) Repeat the above steps until the cumulative correction error meets the error range, completing the update of the wellhead pressure prediction model.
[0033] The present invention has the following beneficial effects: the present invention performs throttle valve response by establishing a throttle valve response prediction model, and the established prediction model can simulate the well-killing process, calculate the pressure value of the wellhead during the well-killing process to adjust the throttle valve, and correct the throttle valve response according to the change of the pump pressure. After the correction, the throttle valve historical response data is used to update the prediction model through a neural network based on the gray box model, so that the predicted throttle valve response value is more accurate; the throttle valve response prediction model proposed by the present invention has a certain guiding significance for how to adjust the throttle valve in a timely and accurate manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a schematic diagram of annular fluid distribution;
[0035] Figure 2 Establish an algorithm flow chart for the wellhead pressure prediction model;
[0036] Figure 3 Update algorithm flow chart for prediction model;
[0037] Figure 4 This is a schematic diagram of the gray box model. DETAILED DESCRIPTION
[0038] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] A throttle valve response prediction method based on a gray box model of the present invention comprises the following steps:
[0040] S1. Acquire data (wellhead pressure, pump pressure, well depth structure data, drilling tool assembly data, actual drilling trajectory data, wellhead device parameters, gas component parameters, and well killing fluid component parameters), and pre-process the data for data smoothing and noise reduction;
[0041] Preprocessing is to first obtain the mean and standard deviation of each data, and then use the Laida rule to remove abnormal data;
[0042] The formula for calculating the mean is:
[0043]
[0044] The formula for calculating the mean is:
[0045]
[0046] Where: μ is the data mean; x i is the acquired data; n is the number of data; σ is the standard deviation of the data;
[0047] The Laida Law is as follows:
[0048] In the normal distribution principle, the acquired data is distributed between (μ-3σ, μ+3σ), and the probability that the data is included in this range is 99.74%. The eliminated data should satisfy the following formula:
[0049] (x i -μ)>3σ
[0050] S2. Establish a wellhead pressure prediction model based on the multiphase flow model;
[0051] The length of the mixed phase section in the annulus during well killing is calculated, and then the distribution of gas and liquid phases in the annulus is calculated by differential iteration algorithm in combination with the drift flow model, and the wellhead pressure is further calculated to complete the establishment of the wellhead pressure prediction model;
[0052] The length of the miscible phase section is determined by the following formula:
[0053]
[0054] Where: L a(t+1) L is the height of the top of the miscible phase section at time t+1 of well killing, m; a(t) is the height of the top of the miscible phase section at time t of well killing, m; L b(t+1) L is the bottom height of the miscible phase section at time t+1 of well killing, m; b(t) is the bottom height of the miscible phase section at time t of well killing, m; Z b(t+1) is the compression coefficient of the bottom of the miscible phase section at the time of well killing t+1, dimensionless; Z b(t) is the compression coefficient of the bottom of the miscible phase section at time t of well killing, dimensionless; T b(t+1)is the bottom temperature of the miscible phase at the time of well killing t+1, K; T b(t) is the bottom temperature of the miscible phase at the time of well killing, K; P b(t+1) is the bottom pressure of the miscible phase at the time of well killing t+1, MPa; P b(t) is the bottom pressure of the miscible phase at time t of well killing, MPa;
[0055] The distribution of gas and liquid in the annulus during well killing is calculated by the following formula:
[0056] v g =C0v m +v d
[0057] in:
[0058]
[0059] Where: v g is the true velocity of the gas phase, m / s; C0 is the gas phase distribution coefficient, dimensionless; v m is the gas-liquid mixing velocity, m / s; v d is the drift velocity, m / s; f g is the gas void fraction, dimensionless; K(f g ) is the critical Kutateladze number; v c is the characteristic velocity, m / s; m(φ) represents the effect of well inclination on drift velocity, dimensionless; α g is the volume fraction, dimensionless; ρ g is the gas density, kg / m 3 ρ l is the liquid density, kg / m 3 ; A and B are profile parameters, initially set to 1.2 and 0.3 respectively; γ and β are profile parameter constraints, dimensionless.
[0060] The difference iteration algorithm is:
[0061] (1) First, assume the bottom hole pressure value at time k;
[0062] (2) Calculate the miscible segment height at time k using the miscible segment length calculation formula;
[0063] (3) The annulus is divided into n micro-elements (the unit nodes from the bottom of the well to the wellhead are numbered j = 0, 2, ..., n in sequence). Assume that the gas content of the j node is f j ;
[0064] (4) The gas content of node j is calculated by the drift flow model as E g ;
[0065] (5) Determine f j and Eg Does the difference meet the error accuracy? If not, re-assume the gas content f j Calculate E g , until f j and E g The difference satisfies the error accuracy;
[0066] (6) Assume that the gas content of node j+1 is f j+1 The gas content of node j+1 is calculated by the drift flow model as E g+1 ;
[0067] (7) Calculate to the wellhead according to the above steps, and determine whether the wellhead pressure meets the error accuracy. If not, re-calculate by assuming the bottom hole pressure until the wellhead pressure meets the error accuracy;
[0068] (8) Calculate to the wellhead according to the above steps and find the distribution of gas and liquid phases in the annulus.
[0069] The fluid flow friction is determined by the following formula:
[0070]
[0071] in:
[0072]
[0073] The friction coefficient is determined by the following formula:
[0074]
[0075] Where: ΔP f is the flow friction, MPa; f is the Fanning friction coefficient; ρ m is the gas-liquid mixture density, kg / m 3 ρ l is the liquid density, kg / m 3 ρ g is the gas phase density, kg / m 3 ;f l is the liquid holdup rate; f g is the gas holding rate; v m is the gas-liquid mixing velocity, m / s; v l is the true velocity of the liquid phase, m / s; v g is the true velocity of the gas phase, m / s; v sg is the gas phase superficial velocity, m / s; v sl is the liquid phase superficial velocity, m / s; μ m is the gas-liquid mixed phase viscosity, Pa·s; μ l is the apparent viscosity of the liquid phase, Pa·s; μ gis the gas phase viscosity, Pa·s; D is the annulus equivalent diameter, m; ΔL is the grid length, m; ε is the pipe wall roughness, m.
[0076] The wellhead pressure is determined by the following formula:
[0077] P a =P bottom -P hl -P hm -P hg -ΔP f
[0078] in:
[0079]
[0080] Where: P hl is the liquid column pressure of the well-killing fluid section, MPa; P hg is the gas column pressure of the gas section, MPa; P hm is the pressure of the miscible phase section, MPa; ρ l is the density of the well-killing fluid, kg / m 3 ρ g is the gas density, kg / m 3 ρ m is the mixed phase density, kg / m 3 ; L0 is the annulus depth, m; L a is the top height of the miscible phase section, m; L b is the bottom height of the mixed phase section, m; g is the gravitational acceleration, N / kg; P a is the wellhead pressure, MPa; P bottom is the bottom hole pressure, MPa.
[0081] S3, predicting the predicted pressure value that should be applied at the wellhead during the well killing process according to the wellhead pressure prediction model, that is, the predicted response value, and causing the throttle valve to respond according to the predicted response value;
[0082] S4, according to the throttle valve response error between the pump pressure after the throttle valve responds and the initial pump pressure, and according to the throttle valve response error, correcting the predicted response value of the throttle valve to obtain a corrected response value;
[0083] The throttle valve response error is calculated as follows:
[0084] P Δ =P b -P b0
[0085] Where: P Δ is the throttle valve error, MPa; P b is the pump pressure after the throttle valve responds, MPa; P b0 is the initial pump pressure, MPa;
[0086] If P Δ If it is a positive value, it means that the wellhead pressure caused by the throttle valve response is too large, the bottom hole pressure is greater than the formation pressure, and the throttle valve opening should be increased; if P Δ A negative value indicates that the wellhead pressure caused by the throttle valve response is too small, and the bottom hole pressure is less than the formation pressure. The throttle valve opening should be reduced; the corrected results of both should make the pump pressure equal to the initial pump pressure.
[0087] S5, taking the wellhead pressure prediction model as a gray box model, using the historical corrected response data of the throttle valve, training and updating the gray box model to obtain an updated wellhead pressure prediction model, namely, a throttle valve response prediction model;
[0088] The update algorithm is as follows:
[0089] It is assumed that the wellhead pressure prediction model has been updated at time k-1, and the throttle valve has completed the response correction at time k;
[0090] (1) Add weights to the modified response data using the principal component analysis method;
[0091] (2) The wellhead pressure prediction model is used as a gray box model, with the acquired data as input and the predicted response value of the throttle valve as output. The cumulative correction error between the predicted response value and the corrected response value is calculated, and it is determined whether the cumulative correction error meets the error accuracy. If not, proceed to the next step.
[0092] (3) Use the online gradient descent method to update the weight of the corrected response value data and iterate to obtain new weights;
[0093] (4) Using the neural network under the new weights, the cumulative correction error between the predicted response value and the corrected response value is calculated;
[0094] (5) Repeat the above steps until the cumulative correction error meets the error range, completing the update of the wellhead pressure prediction model;
[0095] S6. Predicting a throttle valve response value according to the updated wellhead pressure prediction model.
[0096] The above description is not intended to impose any form of limitation on the present invention. Although the present invention has been disclosed through the above embodiments, it is not intended to limit the present invention. Any technician familiar with the profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of the technical solution of the present invention.
Claims
1. A throttle valve response prediction method based on a gray box model, characterized in that: The following steps are involved: S1, obtain data and preprocess the data; The data include wellhead pressure, pump pressure, well depth structure data, drilling tool assembly data, actual drilling trajectory data, wellhead device parameters, gas component parameters, and well killing fluid component parameters; S2. Establish a wellhead pressure prediction model based on the multiphase flow model; The length of the mixed phase section in the annulus during well killing is calculated, and then the distribution of gas and liquid phases in the annulus is calculated by differential iteration algorithm in combination with the drift flow model, and the wellhead pressure is further calculated to complete the establishment of the wellhead pressure prediction model; S3, predicting the predicted pressure value that should be applied at the wellhead during the well killing process according to the wellhead pressure prediction model, that is, the predicted response value, and causing the throttle valve to respond according to the predicted response value; S4, according to the throttle valve response error between the pump pressure after the throttle valve responds and the initial pump pressure, and according to the throttle valve response error, correcting the predicted response value of the throttle valve to obtain a corrected response value; S5, taking the wellhead pressure prediction model as a gray box model, using the corrected response value data, training and updating the gray box model to obtain an updated wellhead pressure prediction model; (1) Add weights to the modified response data using the principal component analysis method; (2) The wellhead pressure prediction model is used as a gray box model, with the acquired data as input and the predicted response value of the throttle valve as output. The cumulative correction error between the predicted response value and the corrected response value is calculated to determine whether the cumulative correction error meets the error accuracy. If not, proceed to the next step. (3) Use the online gradient descent method to update the weight of the corrected response value data and iterate to obtain new weights; (4) Using the neural network under the new weights, the cumulative correction error of the predicted response value and the corrected response value is calculated; (5) Repeat the above steps until the cumulative correction error meets the error range, completing the update of the wellhead pressure prediction model; S6. Predicting a throttle valve response value according to the updated wellhead pressure prediction model.
2. A throttle valve response prediction method based on a gray box model according to claim 1, characterized in that: In the step S1, the data is preprocessed based on the Raida rule.
3. The throttle valve response prediction method based on the gray box model according to claim 2 is characterized in that: In step S1, the mean and standard deviation of the data are first calculated, and then the Raida rule is used to eliminate abnormal data.
4. The throttle valve response prediction method based on the gray box model according to claim 3 is characterized in that: The calculation formulas for the mean and standard deviation in step S1 are: Where: is the data mean; To obtain data in real time; n is the number of data; σ is the standard deviation of the data.
5. The throttle valve response prediction method based on the gray box model according to claim 1 is characterized in that: The wellhead pressure prediction model in step S2 is: Where: is the top height of the miscible phase section at time t+1 of well killing, m; is the height of the top of the miscible phase section at time t of well killing, m; is the bottom height of the miscible phase section at time t+1 of well killing, m; is the bottom height of the miscible phase section at time t of well killing, m; is the compressibility coefficient of the bottom of the miscible phase section at the time of well killing t+1, dimensionless; is the compressibility coefficient of the bottom of the miscible phase section at time t of well killing, dimensionless; is the bottom temperature of the miscible phase at the time of well killing t+1, K; is the bottom temperature of the miscible phase at time t of well killing, K; is the bottom pressure of the miscible phase at time t+1 of well killing, MPa; is the bottom pressure of the miscible phase at time t of well killing, MPa; is the gas phase true velocity, m / s; C 0 is the gas phase distribution coefficient, dimensionless; is the gas-liquid mixing velocity, m / s; is the drift speed, m / s; is the flow friction, MPa; f is the Fanning friction coefficient; is the gas-liquid mixture density, kg / m 3 ; D is the annulus equivalent diameter, m; is the grid length, m; is the liquid column pressure of the well-killing fluid section, MPa; is the gas column pressure of the gas section, MPa; is the miscible phase pressure, MPa; is the bottom hole pressure, MPa; is the predicted pressure value, MPa.
6. The throttle valve response prediction method based on the gray box model according to claim 1, characterized in that: The throttle valve response error calculation formula in step S4 is: Where: is the throttle valve error, MPa; is the pump pressure after the throttle valve responds, MPa; is the initial pump pressure, MPa.