Method, device and equipment for adjusting bottom hole pressure under drilling gas cut condition
By combining the throttle valve opening PID adjustment model and fuzzy neural network under drilling gas invasion conditions, the problem of long and low accuracy of bottom-hole pressure adjustment in the existing technology is solved, and efficient and accurate bottom-hole pressure adjustment is achieved.
Patent Information
- Application Number
- CN202510338292.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-06-06
AI Technical Summary
The existing bottom-hole pressure regulation method under conditions of drilling gas invasion has the problem of long time regulation and low operating accuracy, which is difficult to meet the high accuracy and high efficiency requirements of deep drilling for wellbore pressure regulation.
By combining the throttle valve opening PID adjustment model and the fuzzy neural network, a fuzzy inference control model is constructed, and fuzzy inference is performed based on the real-time iteration value of the bottom hole pressure and the error information of the target value, and the control parameter value is generated to adjust the bottom hole pressure.
Accurate and rapid adjustment of bottom-hole pressure under drilling gas invasion conditions has been achieved, the regulation efficiency and accuracy have been improved, and the risks of secondary disasters such as blowouts and well collapses have been reduced.
Smart Images

Figure CN120100430A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the technical field of oil and gas exploration and development, and specifically to a method, device and equipment for regulating bottom hole pressure under drilling gas invasion conditions. Background Art
[0002] Deep high-temperature and high-pressure drilling projects face many technical challenges, among which the development of high-pressure gas layers, narrow safety density window, and high risk of gas invasion are particularly prominent. During the drilling process, due to the complexity of the formation pressure system and the extremely narrow drilling fluid density window, gas invasion can be caused by a slight negligence, and in severe cases, it may even lead to a blowout accident. Therefore, accurate and efficient regulation of wellbore pressure under gas invasion conditions is one of the core technologies to ensure the safety of deep high-temperature and high-pressure drilling. However, traditional gas invasion treatment methods mainly rely on manual experience, and there are problems such as long regulation time and low operation accuracy, which makes it difficult to meet the high-precision and high-efficiency requirements of deep drilling for wellbore pressure regulation. Especially after gas invasion occurs, manual regulation often lags behind the dynamic changes of downhole pressure, which can easily induce secondary disasters such as blowouts and well collapses, further increasing the risks and costs of drilling operations.
[0003] In order to solve these problems, the automation and intelligent control of wellbore pressure has become an effective means to achieve efficient pressure control in deep and complex formation drilling. However, the existing wellbore pressure automatic control technology still has many limitations. Most of the currently widely used automatic controllers are based on the wellbore gas-liquid two-phase flow model and adopt the proportional integral differential (PID) control algorithm. Although the PID controller has the advantages of simple algorithm and strong robustness, its control parameters are usually fixed, which makes it difficult to adapt to the real-time fluctuation of bottom hole pressure during deep high-temperature and high-pressure drilling. There are still problems such as long control time and low operation accuracy. In addition, the PID controller does not take into account the complexity of the annular air-liquid-solid three-phase flow system. Especially under gas invasion conditions, the phase state of the fluid in the wellbore changes dramatically and the flow behavior is more complicated. It is difficult for traditional PID controllers to achieve accurate pressure control.
[0004] Therefore, how to overcome the problems of long control time and low operation accuracy in the existing methods for adjusting bottom hole pressure under drilling gas invasion conditions, and propose a method for adjusting bottom hole pressure under drilling gas invasion conditions with high precision and high efficiency is a key issue that needs to be solved urgently. Summary of the invention
[0005] The purpose of the embodiments of this specification is to provide a method, device and equipment for regulating bottom hole pressure under drilling gas invasion conditions, so as to overcome the problems of long regulation time and low operation accuracy existing in the existing methods for regulating bottom hole pressure under drilling gas invasion conditions.
[0006] On the one hand, an embodiment of the present specification provides a method for adjusting bottom hole pressure under drilling gas invasion conditions, including: calculating a first error value and a first error change rate according to a first pressure value and a second pressure value; the first pressure value is a real-time iteration value of the bottom hole pressure of the target well under drilling gas invasion conditions; the second pressure value is a target value of the bottom hole pressure of the target well under drilling gas invasion conditions; the first error value is the difference between the second pressure value and the first pressure value; the first error change rate is the change rate of the first error value; inputting the first error value and the first error change rate into a preset fuzzy reasoning control model; the preset fuzzy reasoning control model is obtained by coupling a throttle valve opening PID adjustment model with a fuzzy neural network; generating a third pressure value according to a control parameter value output by the fuzzy reasoning control model; the third pressure value is an updated iteration value of the bottom hole pressure of the target well under drilling gas invasion conditions; calculating a second error value according to the second pressure value and the third pressure value; if the second error value is less than or equal to a preset error threshold, adjusting the bottom hole pressure value of the target well under drilling gas invasion conditions to the third pressure value.
[0007] On the other hand, an embodiment of the present specification provides a device for adjusting bottom hole pressure under drilling gas invasion conditions, including: a first calculation module, used to calculate a first error value and a first error change rate according to a first pressure value and a second pressure value; the first pressure value is a real-time iteration value of the bottom hole pressure of the target well under drilling gas invasion conditions; the second pressure value is a target value of the bottom hole pressure of the target well under drilling gas invasion conditions; the first error value is the difference between the second pressure value and the first pressure value; the first error change rate is the change rate of the first error value; a fuzzy reasoning module, used to input the first error value and the first error change rate into a preset fuzzy reasoning control model; the preset fuzzy reasoning control model is obtained by coupling a throttle valve opening PID adjustment model with a fuzzy neural network; a generation module, used to generate a third pressure value according to a control parameter value output by the fuzzy reasoning control model; the third pressure value is an updated iteration value of the bottom hole pressure of the target well under drilling gas invasion conditions; a second calculation module, used to calculate a second error value according to the second pressure value and the third pressure value; and an adjustment module, used to adjust the bottom hole pressure value of the target well under drilling gas invasion conditions to the third pressure value if the second error value is less than or equal to a preset error threshold.
[0008] On the other hand, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for regulating bottom hole pressure under drilling gas invasion conditions.
[0009] It can be seen from the technical solutions provided by the above embodiments of this specification that the embodiments of this specification can calculate the first error value and the first error change rate according to the first pressure value and the second pressure value; the first pressure value is the real-time iteration value of the bottom hole pressure of the target well under the drilling gas invasion condition; the second pressure value is the target value of the bottom hole pressure of the target well under the drilling gas invasion condition; the first error value is the difference between the second pressure value and the first pressure value; the first error change rate is the change rate of the first error value; the first error value and the first error change rate are input into a preset fuzzy reasoning control model; the preset fuzzy reasoning control model is obtained by coupling the throttle valve opening PID adjustment model with the fuzzy neural network; according to the control parameter value output by the fuzzy reasoning control model, a third pressure value is generated; the third pressure value is the updated iteration value of the bottom hole pressure of the target well under the drilling gas invasion condition; the second error value is calculated according to the second pressure value and the third pressure value; if the second error value is less than or equal to the preset error threshold, the bottom hole pressure value of the target well under the drilling gas invasion condition is adjusted to the third pressure value. Compared with the existing methods, the embodiments of the present specification can obtain a fuzzy reasoning control model by coupling the throttle valve opening PID adjustment model with the fuzzy neural network, and enable the fuzzy reasoning control model to perform fuzzy reasoning on the error information of the real-time iterative value and target value of the bottom hole pressure under the drilling gas invasion condition, thereby accurately and quickly adjusting the bottom hole pressure value of the target well under the drilling gas invasion condition. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art description are briefly introduced below.
[0011] Figure 1 It is a flow chart of a method for regulating bottom hole pressure under drilling gas invasion conditions provided in an embodiment of this specification;
[0012] Figure 2 It is a schematic diagram of a classic PID controller provided in the embodiments of this specification;
[0013] Figure 3 It is a curve comparison diagram of bottom hole pressure and adjustment time of a classic PID controller and a classic PI controller under drilling gas invasion conditions provided in the embodiments of this specification;
[0014] Figure 4 is a schematic diagram of a fuzzy adaptive PID controller provided in an embodiment of this specification;
[0015] Figure 5 It is a curve comparison diagram of bottom hole pressure and adjustment time of fuzzy adaptive PID controller, classic PID controller and classic PI controller under drilling gas invasion conditions provided by the embodiments of this specification;
[0016] Figure 6 It is a principle diagram of a method for regulating bottom hole pressure under drilling gas invasion conditions (fuzzy neural network PID controller) provided in an embodiment of this specification;
[0017] Figure 7 It is a curve comparison diagram of bottom hole pressure and adjustment time of fuzzy neural network PID controller, fuzzy adaptive PID controller, classic PID controller and classic PI controller under drilling gas invasion conditions provided by the embodiments of this specification;
[0018] Figure 8 It is a comparison chart of the change curves of the throttle valve pressure over time when the fuzzy neural network PID controller, the fuzzy adaptive PID controller, and the classic PID controller are processed under the drilling gas invasion condition provided by the embodiments of this specification;
[0019] Fig. 9 It is a comparison diagram of the gas invasion flow rate change curve when the fuzzy neural network PID controller, the fuzzy adaptive PID controller, and the classic PID controller process gas invasion under the drilling gas invasion condition provided by the embodiments of this specification;
[0020] Fig.10 It is a bar graph comparing the changes in gas invasion quality after the fuzzy neural network PID controller, the fuzzy adaptive PID controller, and the classic PID controller are used to process gas invasion control under the drilling gas invasion conditions provided by the embodiments of this specification;
[0021] Fig.11 It is a schematic diagram of the structure of a device for regulating bottom hole pressure under drilling gas invasion conditions provided in an embodiment of this specification;
[0022] Fig.12 It is a schematic diagram of the structural composition of a computer device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0024] Figure 1 This is a flow chart of a method for adjusting bottom hole pressure under drilling gas invasion conditions provided in an embodiment of this specification. When implemented, the method includes the following steps:
[0025] S101: Calculate a first error value and a first error change rate based on a first pressure value and a second pressure value; the first pressure value is a real-time iteration value of the bottom hole pressure of the target well under drilling gas invasion conditions; the second pressure value is a target value of the bottom hole pressure of the target well under drilling gas invasion conditions; the first error value is the difference between the second pressure value and the first pressure value; the first error change rate is the change rate of the first error value.
[0026] In some embodiments, a first error value and a first error change rate may be calculated based on the first pressure value and the second pressure value.
[0027] By calculating the first error value between the real-time iteration value and the target value of the bottom hole pressure of the target well under the condition of drilling gas invasion and the first error change rate of the first error value, on the one hand, the first error value can intuitively reflect the difference between the real-time iteration value and the target value, and on the other hand, the first error change rate can reflect the change trend of the error value over time. By calculating the first error value and the first error change rate, the current calculation state can be quickly judged, providing necessary data support for the calculation of the updated iteration value of the bottom hole pressure of the subsequent target well under the condition of drilling gas invasion.
[0028] For each iteration, the real-time iteration value of the bottom hole pressure of the target well under the drilling gas invasion condition, that is, the first pressure value, can be obtained. For the first iteration, an initial iteration value of the bottom hole pressure of the target well under the drilling gas invasion condition can be set. The initial iteration value is used as the first pressure value corresponding to the first iteration. A target value of the bottom hole pressure of the target well under the drilling gas invasion condition, that is, the second pressure value, can be pre-set. The first error value between the first pressure value and the second pressure value can be calculated. Specifically, the first error value between the real-time iteration value and the target value of the bottom hole pressure of the target well under the drilling gas invasion condition can be subtracted from the second pressure value. The first error change rate of the first error value can be calculated. Specifically, the historical error value, that is, the first error value corresponding to the previous iteration, can be obtained. The first error change rate of the first error value can be calculated using the formula first error change rate = (first error value-historical error value) / historical error value, and the first error change rate can reflect the change trend of the error value over time. For the first iteration, a historical error value that is not 0 can be pre-set, and then the first error change rate of the first error value at the first iteration can be calculated. By calculating the first error value and the first error change rate, the current calculation state can be quickly determined, providing necessary data support for the calculation of updated iterative values of the bottom hole pressure of the subsequent target well under drilling gas invasion conditions.
[0029] S102: Inputting the first error value and the first error change rate into a preset fuzzy inference control model; the preset fuzzy inference control model is obtained by coupling a throttle valve opening PID adjustment model with a fuzzy neural network.
[0030] In some embodiments, the throttle valve opening PID adjustment model includes a preset membership model, a preset fuzzy reasoning rule model and a preset weighted rule model; the preset fuzzy reasoning control model is obtained by coupling the throttle valve opening PID adjustment model with a fuzzy neural network, including: according to the preset membership model, a historical membership matrix corresponding to the historical error value and the historical error change rate can be generated; the historical error value is the difference between the historical iteration value and the target value of the bottom hole pressure of the historical well under the drilling gas invasion condition; the historical error change rate is the change rate of the historical error value; according to the historical error value, the historical error change rate and the historical membership matrix, A fuzzy neural network can be pre-trained; based on the preset fuzzy inference rule model, a historical fuzzy quantity matrix corresponding to the historical membership matrix can be generated; based on the historical membership matrix and the historical fuzzy quantity matrix, a fuzzy inference rule neural network can be pre-trained; based on the preset weighted rule model, a historical control parameter value corresponding to the historical fuzzy quantity matrix can be generated; based on the historical fuzzy quantity matrix and the historical control parameter value, a defuzzification neural network can be pre-trained; based on the pre-trained fuzzy neural network, the pre-trained fuzzy inference rule neural network and the pre-trained defuzzification neural network, a preset fuzzy inference control model can be constructed.
[0031] By pre-training the fuzzified neural network, fuzzy inference rule neural network and defuzzified neural network through the preset membership model, fuzzy inference rule model and weighted rule model, on the one hand, the neural network can capture the complex nonlinear relationship in the data and can adaptively learn the prior knowledge of the preset model through the training data. On the other hand, the pre-trained neural network has a faster reasoning speed and is more suitable for real-time computing. In addition, the pre-trained neural network does not rely on expert experience and manual modeling, has good robustness to noisy data, and can learn effective features from data containing noise.
[0032] The throttle valve opening PID adjustment model may include a preset membership model, a preset fuzzy reasoning rule model and a preset weighted rule model. The historical iteration value and target value of the bottom hole pressure of the historical well using the throttle valve opening PID adjustment model under the drilling gas invasion condition can be obtained, and the historical error value and the historical error change rate of the historical error value can be calculated. The throttle valve opening PID adjustment model may include three control parameters: proportional parameter, differential parameter and integral parameter. By adjusting these three control parameters, the throttle valve opening PID adjustment model can output different historical error values and historical error change rates. The historical error value and the historical error change rate can be fuzzified to obtain the fuzzy quantity of the historical error value and the fuzzy quantity of the historical error change rate. Specifically, according to the actual domain [x L ,x H ] can be combined with the preset discrete domain [-b, b] of the corresponding historical error value fuzzy quantity (or historical error change rate fuzzy quantity), and the historical error value fuzzy quantity (or historical error change rate fuzzy quantity) can be calculated using the following formula:
[0033]
[0034] Where x is the historical error value (or historical error change rate); is the fuzzy value of the historical error value (or the fuzzy value of the historical error change rate); k is the quantization factor. The quantization factor k can be calculated using the formula calculate.
[0035] The discrete domain of the fuzzy quantity of the historical error value, the fuzzy quantity of the historical error change rate, and the fuzzy quantity of the three control parameters related to the PID adjustment model of the throttle valve opening can be preset as {PB, PM, PS, ZE, NS, NM, NB}, that is, {positive large, positive medium, positive small, zero, negative small, negative medium, negative large}. Each parameter in the discrete domain corresponds to a fuzzy quantity, and the degree of belonging to this fuzzy quantity can be calculated using the following formula:
[0036]
[0037] After obtaining the fuzzy quantity of the historical error value and the fuzzy quantity of the historical error change rate, the fuzzy quantity of the historical error value and the fuzzy quantity of the historical error change rate can be input into the preset membership model, and the preset membership model can generate the historical membership matrix corresponding to the historical error value and the historical error change rate. According to the historical error value, the historical error change rate and the historical membership matrix, the fuzzy neural network can be pre-trained. Specifically, a fuzzy neural network can be constructed. The historical error value and the historical error change rate can be used as input parameters of the fuzzy neural network, and the fuzzy neural network predicts and outputs the historical membership matrix. The difference between the predicted historical membership matrix and the real historical membership matrix can be minimized until the fuzzy neural network is fitted, that is, the fuzzy neural network is realized as an agent for the preset membership model. The fuzzy neural network can capture the complex nonlinear relationship in the fuzzy quantity of the historical error value and the fuzzy quantity of the historical error change rate, and can adaptively learn the prior knowledge of the preset membership model through training data. The pre-trained fuzzy neural network has a faster reasoning speed and is more suitable for real-time calculation. In addition, the pre-trained fuzzy neural network does not rely on expert experience and manual modeling, has good robustness to noisy data, and can learn effective features from noisy data.
[0038] The historical membership matrix can be input into a preset fuzzy reasoning rule model, and the preset fuzzy reasoning rule model can generate a historical fuzzy quantity matrix corresponding to the historical membership matrix. According to the historical membership matrix and the historical fuzzy quantity matrix, a fuzzy reasoning rule neural network can be pre-trained. Specifically, a fuzzy reasoning rule neural network can be constructed. The historical membership matrix can be used as an input parameter of the fuzzy reasoning rule neural network, and the fuzzy reasoning rule neural network predicts and outputs the historical fuzzy quantity matrix. The difference between the predicted historical fuzzy quantity matrix and the real historical fuzzy quantity matrix can be minimized until the fuzzy reasoning rule neural network is fitted, that is, the fuzzy reasoning rule neural network is realized to act as an agent for the preset fuzzy reasoning rule model. The fuzzy reasoning rule neural network can capture the complex nonlinear relationship in the historical membership matrix and can adaptively learn the prior knowledge of the preset fuzzy reasoning rule model through the historical membership matrix. The pre-trained fuzzy reasoning rule neural network has a faster reasoning speed and is more suitable for real-time calculation. In addition, the pre-trained fuzzy reasoning rule neural network does not rely on expert experience and manual modeling, has good robustness to noise data, and can learn effective features from data containing noise.
[0039] The historical fuzzy quantity matrix can be input into a preset weighted rule model, and the preset weighted rule model can generate the historical control parameter value corresponding to the historical fuzzy quantity matrix. According to the historical fuzzy quantity matrix and the historical control parameter value, a defuzzification neural network can be pre-trained. Specifically, a defuzzification neural network can be constructed. The membership fuzziness matrix can be used as an input parameter of the defuzzification neural network, and the defuzzification neural network predicts and outputs the historical control parameter value. The difference between the predicted historical control parameter value and the actual historical control parameter value can be minimized until the defuzzification neural network is fitted, that is, the defuzzification neural network is realized to act as an agent for the preset weighted rule model. The defuzzification neural network can capture the complex nonlinear relationship in the historical membership matrix and can adaptively learn the prior knowledge of the preset fuzzy reasoning rule model through the historical membership matrix. The pre-trained defuzzification neural network has a faster reasoning speed and is more suitable for real-time calculation. In addition, the pre-trained defuzzification neural network does not rely on expert experience and manual modeling, has good robustness to noise data, and can learn effective features from data containing noise.
[0040] The pre-trained fuzzified neural network, the pre-trained fuzzy inference rule neural network and the pre-trained defuzzification neural network can be integrated, and the integrated fuzzified neural network, fuzzy inference rule neural network and defuzzification neural network can be used as a fuzzy inference control model.
[0041] In some embodiments, the construction of the preset membership model includes: Construct the preset membership model; wherein x is the fuzzy quantity of the historical error value or the fuzzy quantity of the historical error change rate; a, b and c are preset membership thresholds, representing the starting point, peak point and end point of the fuzzy quantity respectively.
[0042] By using the formula Constructing a preset membership model, on the one hand, only three parameters (starting point, peak point, and end point) are needed to calculate the membership of the fuzzy quantity, with low computational complexity and high computational accuracy. On the other hand, the preset membership model has a high sensitivity near the peak point, which can accurately describe the fuzzy characteristics of the data in a local range, and thus can provide strong data support.
[0043] The preset membership model can be constructed using the following formula:
[0044]
[0045] Where x is the fuzzy quantity of historical error value or the fuzzy quantity of historical error change rate; a, b and c are the preset membership thresholds, which represent the starting point, peak point and end point of the fuzzy quantity respectively. Different membership models can be set according to the distribution characteristics of the fuzzy quantity of historical error value and the fuzzy quantity of historical error change rate, that is, different starting points, peak points and end points can be preset. The preset membership model takes the fuzzy quantity of historical error value and the fuzzy quantity of historical error change rate as input parameters and outputs the historical membership matrix.
[0046] In some embodiments, the construction of the preset fuzzy reasoning rule model includes: constructing an annular air-liquid two-phase flow model of bottom hole pressure and throttle valve opening; constructing a fuzzy reasoning rule table based on the annular air-liquid two-phase flow model; and constructing the preset fuzzy reasoning rule model based on the fuzzy reasoning rule table.
[0047] Through the annular air-liquid two-phase flow model, the response mechanism of the bottom hole pressure to the throttle valve opening can be analyzed, and then the internal relationship between the three control parameters of the throttle valve opening PID adjustment model and the throttle valve opening can be accurately obtained. Based on this relationship, a fuzzy reasoning rule table of the change quantity of the three control parameters of the throttle valve opening PID adjustment model based on the historical membership matrix can be constructed, which is helpful to reasonably perform fuzzy reasoning according to the input historical membership matrix, and then output an accurate historical fuzzy quantity matrix.
[0048] Based on the preset annular air-liquid two-phase flow model, the dynamic response mechanism of bottom hole pressure to throttle valve opening can be deeply analyzed. The annular air-liquid two-phase flow model can simulate the flow behavior of gas-liquid two-phase fluid in the wellbore during drilling, and reveal the law of bottom hole pressure changing with throttle valve opening. Based on this response mechanism, the intrinsic connection between the three control parameters of proportion, integration and differentiation in the throttle valve opening PID adjustment model and the throttle valve opening can be accurately established.
[0049] Based on the above connection, a comprehensive fuzzy reasoning rule table can be constructed, which can take the historical membership matrix related to the historical error value and the historical error change rate as input, perform fuzzy logic reasoning and output the historical fuzzy quantity matrix related to the adjustment of the throttle valve opening. Specifically, when the discrete domain of the fuzzy quantity of the historical error value, the fuzzy quantity of the historical error change rate and the fuzzy quantity of the three control parameters related to the throttle valve opening PID adjustment model is preset as {PB, PM, PS, ZE, NS, NM, NB}, the fuzzy reasoning rule table of the three control parameter changes of the PID controller based on the historical membership matrix can be constructed respectively, as shown in Table 1 (Fuzzy reasoning rule table of proportional parameter change of throttle valve opening PID adjustment model), Table 2 (Fuzzy reasoning rule table of integral parameter change of throttle valve opening PID adjustment model) and Table 3 (Fuzzy reasoning rule table of differential parameter change of throttle valve opening PID adjustment model).
[0050] Table 1
[0051]
[0052] Table 2
[0053]
[0054] Table 3
[0055]
[0056] In some embodiments, the construction of the preset weighted rule model includes: the formula Construct the preset weighted rule model; wherein x is the historical fuzzy quantity; y is the change in the historical control parameter value.
[0057] By using the formula By constructing a preset weighted rule model, the centroid of the area enclosed by the corresponding curve of the historical membership matrix can be used as the output of the historical control parameter value, and it is extremely sensitive to the changes in the input historical fuzzy quantity matrix.
[0058] After obtaining the historical fuzzy quantity matrix, in order to obtain the precise values of the changes in the three control parameters of the throttle valve opening PID adjustment model, it can be defuzzified. The area center method can be used for defuzzification, that is, the center of gravity of the area enclosed by the corresponding curve of the historical membership matrix is used as the final historical control parameter output value. This is more sensitive to the input historical fuzzy quantity matrix. Even if the input historical fuzzy quantity matrix changes slightly, the final historical control parameter output value can also make corresponding changes. Specifically, the following formula can be used to construct a preset weighted rule model:
[0059]
[0060] Where X is the historical fuzzy quantity matrix; y is the change in the historical control parameter value. After calculating the parameter change of the throttle valve opening PID adjustment model, the control parameters of the throttle valve opening PID adjustment model in the latest state can be obtained. The specific calculation method is shown in the following formula:
[0061]
[0062] In the formula, K p_initial , K i_initial and K d_initial It is the initial value of the throttle valve opening PID adjustment model parameter or the control parameter at the previous moment.
[0063] In some embodiments, the first error value and the first error change rate may be input into a preset fuzzy inference control model to output a control parameter value.
[0064] By using a preset fuzzy inference control model, the first error value and the first error change rate can be quickly inferred to generate accurate control parameter values.
[0065] The preset fuzzy inference control model can be integrated by a pre-trained fuzzification neural network, a pre-trained fuzzy inference rule neural network and a pre-trained defuzzification neural network. The first error value and the first error change rate can be fuzzified to generate a corresponding fuzzy quantity vector. Then it is transmitted to the fuzzification neural network in the form of a vector of 1 row and 2 columns. The fuzzification neural network can include 14 neuron nodes, and the two input fuzzy quantity signals are respectively transmitted to 7 membership neuron nodes. The function of each node is equivalent to a membership function, which is used to divide the domain of the input value into 7 fuzzy intervals of the fuzzy quantity domain, namely {PB, PM, PS, ZE, NS, NM, NB}. After the input fuzzy quantity signal is calculated by the membership neuron node, it is transmitted to the fuzzy inference rule neural network in the form of a membership matrix of 2 rows and 7 columns. The fuzzy inference rule neural network can include 49 neuron nodes, each node corresponds to a fuzzy rule, and the input fuzzy quantity is fuzzified by the fuzzification neural network, and the fuzzy quantity matrix obtained by reasoning is transmitted to the defuzzification neural network. The defuzzification neural network may include three weighted neurons, and the weighted neurons may obtain the precise values of the proportional control value, the integral control value and the differential control value of the throttle valve opening PID regulation model after weighted operation of the fuzzy quantity matrix.
[0066] S103: generating a third pressure value according to the control parameter value output by the fuzzy inference control model; the third pressure value is an updated iterative value of the bottom hole pressure of the target well under drilling gas invasion conditions.
[0067] In some embodiments, the control parameter value output by the fuzzy inference control model includes a proportional control value, an integral control value, and a differential control value; generating a third pressure value according to the control parameter value output by the fuzzy inference control model includes: according to the proportional control value, the integral control value, and the differential control value output by the fuzzy inference control model, the formula Determine the opening value of the throttle valve; where u(t) is the opening value of the throttle valve at the current time point t; e(t) is the first error value at the current time point t; K p , K i and K d They are respectively the proportional control value, integral control value and differential control value output by the fuzzy inference control model.
[0068] By using the formula The current throttle valve opening value can be determined quickly and accurately based on the changes in the proportional control value, the integral control value and the differential control value.
[0069] According to the principle of PID adjustment model of throttle valve opening, the automatic adjustment control equation of throttle valve opening can be constructed as follows:
[0070]
[0071] Where u(t) is the opening value of the throttle valve at the current time point t; e(t) is the first error value at the current time point t; K p , K i and K d They are the proportional control value, integral control value and differential control value output by the fuzzy inference control model. According to the proportional control value, integral control value and differential control value output after fuzzy inference, the following formula can be used to quickly and accurately calculate the opening value of the throttle valve:
[0072]
[0073] Where u(t) is the opening value of the throttle valve at the current time point t; e(t) is the first error value at the current time point t; K p , K i and K d They are respectively the proportional control value, integral control value and differential control value output by the fuzzy inference control model.
[0074] In some embodiments, the control parameter value output by the fuzzy inference control model includes a proportional control value, an integral control value, and a differential control value; generating a third pressure value according to the control parameter value output by the fuzzy inference control model includes: according to the opening value of the throttle valve, the formula can be used determining a third pressure value;
[0075] By using the formula The updated iterative value of the bottom hole pressure of the target well under the condition of drilling gas invasion can be quickly and accurately calculated by comprehensively considering the relationship between the pressure drop caused by the gas-liquid-solid three-phase mixture flowing through the throttle valve in the annulus of the target well and the throttle valve opening.
[0076] The pressure drop caused by the gas-liquid-solid three-phase mixture in the target well annulus flowing through the throttle valve can be calculated using the following formula:
[0077]
[0078] Where, Z is the opening value of the throttle valve; C v is the fixed constant of the throttle valve; Q is the total mass flow rate flowing through the throttle valve, unit: kg / s; P top is the pressure value at the throttle valve, i.e. the third pressure value, unit: Pa; P s is the pressure value at the downstream of the throttle valve, unit: Pa; x L-S is the mass flow rate fraction of the gas-liquid mixture in the wellbore; x G is the gas phase mass flow fraction; ρ L-S,top is the density of the gas-liquid mixture at the wellhead, unit: kg / m 3 ρ G,top is the gas phase density at the wellhead, unit: kg / m 3 ; Y is the gas expansion factor. The total mass flow value flowing through the throttle valve is obtained, and the above formula can be solved to determine the updated iterative value of the bottom hole pressure of the target well under the drilling gas invasion condition. Specifically, the opening value of the throttle valve can be input into the following formula to calculate the updated iterative value of the bottom hole pressure of the target well under the drilling gas invasion condition, that is, the third pressure value:
[0079]
[0080] S104: Calculate a second error value according to the second pressure value and the third pressure value.
[0081] In some embodiments, a second error value may be calculated based on the second pressure value and the third pressure value.
[0082] By calculating the second error value between the updated iterative value and the target value of the bottom hole pressure of the target well under the condition of drilling gas invasion, on the one hand, the second error value can intuitively reflect the difference between the updated iterative value and the target value, and on the other hand, the current calculation state can be quickly judged, which provides necessary data support for the calculation of the updated iterative value of the bottom hole pressure of the subsequent target well under the condition of drilling gas invasion.
[0083] The second error value may be calculated based on the second pressure value and the third pressure value. Specifically, the second error value between the updated iterative value of the bottom hole pressure of the target well under drilling gas invasion conditions and the target value may be obtained by subtracting the third pressure value from the second pressure value.
[0084] S105: If the second error value is less than or equal to a preset error threshold, adjust the bottom hole pressure value of the target well under the drilling gas invasion condition to the third pressure value.
[0085] In some embodiments, if the second error value is less than or equal to a preset error threshold, the bottom hole pressure value of the target well under drilling gas invasion conditions may be adjusted to the third pressure value.
[0086] By adjusting the bottom hole pressure value of the target well under drilling gas invasion conditions to a third pressure value when the second error value is less than or equal to a preset error threshold, precise control of the bottom hole pressure is achieved, which helps to ensure the safety of drilling.
[0087] If the second error value is less than or equal to the preset error threshold, that is, the updated iterative value of the bottom hole pressure of the target well under the drilling gas invasion condition meets the regulation demand of the bottom hole pressure, the third pressure value can be set to the bottom hole pressure value of the target well under the drilling gas invasion condition.
[0088] In some embodiments, if the second error value is greater than a preset error threshold, the second error change rate of the second error value can be calculated based on the first error value and the second error value; the second error value and the second error change rate can be used as the new first error value and the new first error change rate, respectively; the steps of inputting the first error value and the first error change rate into a preset fuzzy reasoning control model, generating a third pressure value, calculating the second error value, and using the second error value and the second error change rate as the new first error value and the new first error change rate, respectively, can be iteratively performed until the second error value is less than or equal to the preset error threshold; the bottom hole pressure value of the target well under drilling gas invasion conditions can be adjusted to the third pressure value.
[0089] By iteratively executing the steps of inputting the first error value and the first error change rate into a preset fuzzy reasoning control model, generating a third pressure value, calculating the second error value, and using the second error value and the second error change rate as the new first error value and the new first error change rate, respectively, when the second error value is greater than a preset error threshold, until the second error value is less than or equal to the preset error threshold, accurate control of bottom hole pressure can be ensured, which helps to ensure drilling safety.
[0090] If the second error value is greater than the preset error threshold, that is, the updated iterative value of the bottom hole pressure of the target well under the drilling gas invasion condition does not meet the regulation demand of the bottom hole pressure. The second error change rate of the second error value can be calculated. Specifically, the first error value can be used as the historical error value, and then the second error change rate of the second error value can be calculated using the formula second error change rate = (second error value-historical error value) / historical error value, and the second error change rate can reflect the changing trend of the error value over time. The second error value and the second error change rate can be used as the new first error value and the new first error change rate, respectively, and then iteratively execute the steps of inputting the first error value and the first error change rate into the preset fuzzy reasoning control model, generating the third pressure value, calculating the second error value, and using the second error value and the second error change rate as the new first error value and the new first error change rate, respectively, until the calculated new second error value is less than or equal to the preset error threshold. The bottom hole pressure value of the target well under the drilling gas invasion condition can be adjusted to the third pressure value.
[0091] In some embodiments, if the second error value is greater than a preset error threshold, the preset fuzzy inference control model may be fine-tuned according to the second error value.
[0092] If the second error value is greater than the preset error threshold, that is, the updated iterative value of the bottom hole pressure of the target well under the drilling gas invasion condition does not meet the regulation demand of the bottom hole pressure. The fuzzy reasoning control model can be fine-tuned based on the back propagation mechanism of the fuzzy reasoning control model. Specifically, for the pre-trained fuzzified neural network, the pre-trained fuzzy reasoning rule neural network and the pre-trained defuzzification neural network included in the fuzzy reasoning control model, the partial derivative of the second error value to each neural network parameter matrix can be calculated, and the parameter matrix of each neural network can be adjusted according to the fastest decreasing direction of the second error value and the preset neural network learning rate method. In the iterative execution of the steps of inputting the first error value and the first error change rate into the preset fuzzy reasoning control model, the step of generating the third pressure value, the step of calculating the second error value and the step of using the second error value and the second error change rate as the new first error value and the new first error change rate, respectively, until the calculated new second error value is less than or equal to the preset error threshold, the fuzzy reasoning control model can be fine-tuned based on the second error value calculated in each iteration.
[0093] A specific embodiment of this specification is provided below:
[0094] 1. Take the target well, a gas invasion simulation well with a depth of 8000m, as an example. The well is a vertical well, and the specific wellbore structure and drilling engineering parameters are shown in Table 4. The classic PI controller, classic PID controller, fuzzy adaptive PID controller and fuzzy neural network PID controller were successively constructed to control the bottom hole pressure by adjusting the opening of the wellhead throttle valve to realize the automatic processing of gas invasion accidents, and compare the performance and inherent differences of different controllers in bottom hole pressure control and gas invasion processing.
[0095] Table 4
[0096]
[0097] 2. Classic PID controller test results: Figure 2 The schematic diagram of the classic PID controller is shown in Figure 5. The control parameters of the classic PID controller are optimized by the grid search method. The search range and step size in this process are shown in Table 5.
[0098] Table 5
[0099]
[0100] Different control parameter combinations were evaluated based on control efficiency and overshoot, and it was found that when K p =4.00, K i =0.02 and K d When =3.00, the control efficiency of the bottom hole pressure PID controller is the highest and the overshoot is almost zero, so this combination is selected as the tuning result of the bottom hole pressure PID controller parameters.
[0101] Figure 3 The calculation results show that the pool liquid level reaches the warning value 960s after the gas invasion occurs. The classic PID controller and the classic PI controller start to adjust the bottom hole pressure at the same time. The classic PI controller adjusts the bottom hole pressure to the safety pressure window after 87s, while the classic PID controller only takes 53s to adjust the bottom hole pressure to the safety pressure window, which improves the efficiency by 39%. On the other hand, the classic PI controller takes 110s to adjust the bottom hole pressure to the target bottom hole pressure, while the classic PID controller only takes 73s, saving 34% of the control time.
[0102] 3. Fuzzy adaptive PID controller test results: Figure 4 The schematic diagram of the fuzzy adaptive PID controller is shown. The fuzzy adaptive PID controller is constructed based on the preset fuzzification model, the preset fuzzy inference rule model and the preset weighted rule model proposed in this specification.
[0103] Figure 5The calculation results show that the fuzzy adaptive PID controller has a significantly faster control speed for bottom hole pressure than the classic PID controller. Since the bottom hole pressure was regulated at 960s, the fuzzy adaptive PID controller only needed 42s to regulate the bottom hole pressure to the safe pressure window, while the classic PID needed 53s. Therefore, the fuzzy adaptive PID control suppressed the gas intrusion accident 11s in advance. In addition, the time taken by the fuzzy adaptive PID and the classic PID to adjust the bottom hole pressure to the target value was 60s and 73s respectively. It can be considered that the control efficiency of the fuzzy adaptive PID is improved by about 18% compared with the PID controller, and no overshoot occurs.
[0104] 4. Test results of the fuzzy reasoning control model (fuzzy neural network PID controller) proposed in this manual: Figure 6 The schematic diagram of the fuzzy inference control model (fuzzy neural network PID controller) proposed in this specification is shown.
[0105] Figure 7 The calculation results show that the fuzzy neural network PID controller starts to adjust the bottom hole pressure from 960s, and it only takes 32s to adjust the bottom hole pressure to the safe pressure window, which is 10s earlier than the fuzzy adaptive PID controller, and the efficiency is improved by 24%. On the other hand, the fuzzy neural network PID controller adjusts the bottom hole pressure to the target value at 1010s, and there is no overshoot, which is 10s earlier than the fuzzy adaptive PID controller, and the efficiency is improved by 17%.
[0106] 5. Based on the throttle valve pressure, gas invasion mass flow rate and gas invasion volume, the performance of different intelligent controllers in bottom hole pressure control and gas invasion processing was compared and analyzed.
[0107] Figure 8 The changes of throttle valve pressure over time when dealing with gas intrusion in three bottom hole pressure control models, namely PID controller, fuzzy adaptive PID controller and fuzzy neural network PID controller, are shown. At 960 seconds, the gas intrusion alarm sounded, and the three controls began to adjust the bottom hole pressure at the same time. The PID controller model took 400 seconds from the start of the gas intrusion warning to the end of the gas intrusion treatment, the fuzzy adaptive PID control model took 320 seconds from the gas intrusion alarm to the end of the gas intrusion treatment, and the fuzzy neural network PID control model took only 240 seconds to deal with gas intrusion. The control efficiency was 40% higher than that of the PID control model and 25% higher than that of the fuzzy adaptive PID control model.
[0108] Fig. 9The changes of the gas invasion mass flow rate in the annulus over time in three bottom hole pressure intelligent control models when dealing with gas invasion were compared. In contrast, the fuzzy adaptive PID controller and the fuzzy neural network PID controller, which combine the fuzzy inference engine and the fuzzy neural network, are more efficient in controlling the gas invasion flow rate. Since the start of self-regulation, the gas invasion flow rate can be reduced at a higher rate, avoiding the invasion of more gas and large fluctuations in bottom hole pressure.
[0109] like Fig.10 As shown in the figure, under the same gas invasion conditions, the gas invasion mass during the period when the fuzzy neural network PID controller regulates the bottom hole pressure is 16.63kg, while the gas invasion mass generated by the fuzzy adaptive PID controller and the classic PID controller during the regulation period is 29.68kg and 45.09kg respectively. It can be seen that because the fuzzy neural network PID controller can efficiently regulate the bottom hole pressure, thereby effectively suppressing the gas invasion speed, compared with the classic PID controller, its gas invasion processing ability is improved by 63%.
[0110] The method for adjusting the bottom hole pressure under drilling gas invasion conditions provided in the embodiment of the present specification can calculate a first error value and a first error change rate according to a first pressure value and a second pressure value; the first pressure value is a real-time iteration value of the bottom hole pressure of the target well under drilling gas invasion conditions; the second pressure value is a target value of the bottom hole pressure of the target well under drilling gas invasion conditions; the first error value is the difference between the second pressure value and the first pressure value; the first error change rate is the change rate of the first error value; the first error value and the first error change rate are input into a preset fuzzy reasoning control model; the preset fuzzy reasoning control model is obtained by coupling a throttle valve opening PID adjustment model with a fuzzy neural network; a third pressure value is generated according to the control parameter value output by the fuzzy reasoning control model; the third pressure value is an updated iteration value of the bottom hole pressure of the target well under drilling gas invasion conditions; the second error value is calculated according to the second pressure value and the third pressure value; if the second error value is less than or equal to a preset error threshold, the bottom hole pressure value of the target well under drilling gas invasion conditions is adjusted to the third pressure value. Compared with the existing methods, the embodiments of the present specification can obtain a fuzzy reasoning control model by coupling the throttle valve opening PID adjustment model with the fuzzy neural network, and enable the fuzzy reasoning control model to perform fuzzy reasoning on the error information of the real-time iterative value and target value of the bottom hole pressure under the drilling gas invasion condition, thereby accurately and quickly adjusting the bottom hole pressure value of the target well under the drilling gas invasion condition.
[0111] Based on the above-mentioned method for adjusting the bottom hole pressure under the condition of drilling gas invasion, this specification also proposes an embodiment of a device for adjusting the bottom hole pressure under the condition of drilling gas invasion. Fig.11 As shown, the device 1100 for regulating bottom hole pressure under drilling gas invasion conditions may specifically include the following modules:
[0112] The first calculation module 1101 can be used to calculate a first error value and a first error change rate according to a first pressure value and a second pressure value; the first pressure value is a real-time iteration value of the bottom hole pressure of the target well under drilling gas invasion conditions; the second pressure value is a target value of the bottom hole pressure of the target well under drilling gas invasion conditions; the first error value is the difference between the second pressure value and the first pressure value; the first error change rate is the change rate of the first error value.
[0113] The fuzzy reasoning module 1102 can be used to input the first error value and the first error change rate into a preset fuzzy reasoning control model; the preset fuzzy reasoning control model is obtained by coupling the throttle valve opening PID adjustment model with the fuzzy neural network.
[0114] The generating module 1103 can be used to generate a third pressure value according to the control parameter value output by the fuzzy reasoning control model; the third pressure value is an updated iterative value of the bottom hole pressure of the target well under the drilling gas invasion condition.
[0115] The second calculation module 1104 may be configured to calculate a second error value according to the second pressure value and the third pressure value.
[0116] The adjustment module 1105 may be configured to adjust the bottom hole pressure of the target well under the drilling gas invasion condition to the third pressure value if the second error value is less than or equal to a preset error threshold.
[0117] In some embodiments, the above-mentioned fuzzy reasoning module 1102 can be specifically used to generate a historical membership matrix corresponding to historical error values and historical error change rates according to the preset membership model; the historical error value is the difference between the historical iteration value and the target value of the bottom hole pressure of the historical well under drilling gas invasion conditions; the historical error change rate is the change rate of the historical error value; pre-train a fuzzy neural network according to the historical error value, the historical error change rate and the historical membership matrix; generate a historical fuzzy quantity matrix corresponding to the historical membership matrix according to the preset fuzzy reasoning rule model; pre-train a fuzzy reasoning rule neural network according to the historical membership matrix and the historical fuzzy quantity matrix; generate historical control parameter values corresponding to the historical fuzzy quantity matrix according to the preset weighted rule model; pre-train a defuzzification neural network according to the historical fuzzy quantity matrix and the historical control parameter values; and construct a preset fuzzy reasoning control model according to the pre-trained fuzzification neural network, the pre-trained fuzzy reasoning rule neural network and the pre-trained defuzzification neural network.
[0118] In some embodiments, the fuzzy reasoning module 1102 may also be used to construct the preset membership model according to the following formula:
[0119]
[0120] Where x is the fuzzy quantity corresponding to the historical error value or the historical error change rate; a, b, and c are the preset membership thresholds, representing the starting point, peak point, and end point of the fuzzy quantity, respectively.
[0121] In some embodiments, the above-mentioned fuzzy reasoning module 1102 can also be specifically used to construct an annular air-liquid two-phase flow model of bottom hole pressure and throttle valve opening; construct a fuzzy reasoning rule table based on the annular air-liquid two-phase flow model; and construct the preset fuzzy reasoning rule model based on the fuzzy reasoning rule table.
[0122] In some embodiments, the fuzzy reasoning module 1102 may also be used to construct the preset weighted rule model using the following formula:
[0123]
[0124] Where x is the historical fuzzy quantity; y is the change in the historical control parameter value.
[0125] In some embodiments, the generation module 1103 may be specifically used to determine the opening value of the throttle valve using the following formula according to the proportional control value, integral control value and differential control value output by the fuzzy inference control model:
[0126]
[0127] Where u(t) is the opening value of the throttle valve at the current time point t; e(t) is the first error value at the current time point t; K p , K i and K d They are respectively the proportional control value, integral control value and differential control value output by the fuzzy inference control model;
[0128] According to the opening value of the throttle valve, the third pressure value is determined using the following formula:
[0129]
[0130] Where, Z is the opening value of the throttle valve; C v is the fixed constant of the throttle valve; Q is the total mass flow rate flowing through the throttle valve, unit: kg / s; P top is the pressure value at the throttle valve, i.e. the third pressure value, unit: Pa; P s is the pressure value at the downstream of the throttle valve, unit: Pa; xL-S is the mass flow rate fraction of the gas-liquid mixture in the wellbore; x G is the gas phase mass flow fraction; ρ L-S,top is the density of the gas-liquid mixture at the wellhead, unit: kg / m 3 ρ G,top is the gas phase density at the wellhead, unit: kg / m 3 ; Y is the gas expansion factor.
[0131] In some embodiments, the above-mentioned adjustment module 1105 can be specifically used to calculate the second error change rate of the second error value according to the first error value and the second error value if the second error value is greater than a preset error threshold; use the second error value and the second error change rate as the new first error value and the new first error change rate respectively; iteratively execute the steps of inputting the first error value and the first error change rate into a preset fuzzy reasoning control model, generating a third pressure value, calculating the second error value, and using the second error value and the second error change rate as the new first error value and the new first error change rate respectively until the second error value is less than or equal to the preset error threshold; adjust the bottom hole pressure value of the target well under drilling gas invasion conditions to the third pressure value.
[0132] In some embodiments, the adjustment module 1105 may be further configured to fine-tune the preset fuzzy inference control model according to the second error value if the second error value is greater than a preset error threshold.
[0133] As can be seen from the above, based on the regulating device for bottom hole pressure under drilling gas invasion conditions provided by the embodiment of this specification, the first error value and the first error change rate can be calculated according to the first pressure value and the second pressure value; the first pressure value is the real-time iteration value of the bottom hole pressure of the target well under drilling gas invasion conditions; the second pressure value is the target value of the bottom hole pressure of the target well under drilling gas invasion conditions; the first error value is the difference between the second pressure value and the first pressure value; the first error change rate is the change rate of the first error value; the first error value and the first error change rate are input into a preset fuzzy reasoning control model; the preset fuzzy reasoning control model is obtained by coupling the throttle valve opening PID adjustment model with the fuzzy neural network; according to the control parameter value output by the fuzzy reasoning control model, a third pressure value is generated; the third pressure value is the updated iteration value of the bottom hole pressure of the target well under drilling gas invasion conditions; the second error value is calculated according to the second pressure value and the third pressure value; if the second error value is less than or equal to the preset error threshold, the bottom hole pressure value of the target well under drilling gas invasion conditions is adjusted to the third pressure value. Compared with the existing methods, the embodiments of the present specification can obtain a fuzzy reasoning control model by coupling the throttle valve opening PID adjustment model with the fuzzy neural network, and enable the fuzzy reasoning control model to perform fuzzy reasoning on the error information of the real-time iterative value and target value of the bottom hole pressure under the drilling gas invasion condition, thereby accurately and quickly adjusting the bottom hole pressure value of the target well under the drilling gas invasion condition.
[0134] It should be noted that the units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions divided into various modules. Of course, when implementing this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0135] The embodiment of the present specification also provides a computer device for adjusting the bottom hole pressure under the condition of drilling gas invasion, including a processor and a memory for storing instructions executable by the processor. When the processor is specifically implemented, it can perform the following steps according to the instructions: according to the first pressure value and the second pressure value, calculate the first error value and the first error change rate; the first pressure value is the real-time iteration value of the bottom hole pressure of the target well under the condition of drilling gas invasion; the second pressure value is the target value of the bottom hole pressure of the target well under the condition of drilling gas invasion; the first error value is the difference between the second pressure value and the first pressure value; the first error change rate is the change rate of the first error value; input the first error value and the first error change rate into a preset fuzzy reasoning control model; the preset fuzzy reasoning control model is obtained by coupling the throttle valve opening PID adjustment model with the fuzzy neural network; according to the control parameter value output by the fuzzy reasoning control model, generate a third pressure value; the third pressure value is the updated iteration value of the bottom hole pressure of the target well under the condition of drilling gas invasion; calculate the second error value according to the second pressure value and the third pressure value; if the second error value is less than or equal to the preset error threshold, adjust the bottom hole pressure value of the target well under the condition of drilling gas invasion to the third pressure value.
[0136] In order to complete the above instructions more accurately, refer to Fig.12 As shown, the embodiment of this specification also provides another specific computer device 1200, wherein the computer device 1200 includes a network communication port 1201, a processor 1202 and a memory 1203, and the above structures are connected through internal cables so that each structure can perform specific data interaction.
[0137] The processor 1202 can be specifically used to calculate a first error value and a first error change rate according to a first pressure value and a second pressure value; the first pressure value is a real-time iteration value of the bottom hole pressure of the target well under drilling gas invasion conditions; the second pressure value is a target value of the bottom hole pressure of the target well under drilling gas invasion conditions; the first error value is the difference between the second pressure value and the first pressure value; the first error change rate is the change rate of the first error value; the first error value and the first error change rate are input into a preset fuzzy inference control model; the preset fuzzy inference control model is obtained by coupling a throttle valve opening PID adjustment model with a fuzzy neural network; a third pressure value is generated according to a control parameter value output by the fuzzy inference control model; the third pressure value is an updated iteration value of the bottom hole pressure of the target well under drilling gas invasion conditions; the second error value is calculated according to the second pressure value and the third pressure value; if the second error value is less than or equal to a preset error threshold, the bottom hole pressure value of the target well under drilling gas invasion conditions is adjusted to the third pressure value.
[0138] The memory 1203 may be specifically used to store corresponding instruction programs.
[0139] In this embodiment, the network communication port 1201 can be a virtual port that is bound to different communication protocols so that different data can be sent or received. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. In addition, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it can also be a Bluetooth chip.
[0140] In this embodiment, the processor 1202 may be implemented in any appropriate manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. This specification does not limit this.
[0141] In this embodiment, the memory 1203 includes a volatile memory and a non-volatile memory. The memory 1203 may include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function without a physical form is also called a memory, such as RAM, FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.
[0142] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0143] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0144] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0145] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0146] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for regulating bottom hole pressure under drilling gas invasion conditions, characterized in that: The method comprises: According to the first pressure value and the second pressure value, a first error value and a first error change rate are calculated; the first pressure value is a real-time iteration value of the bottom hole pressure of the target well under the drilling gas invasion condition; the second pressure value is a target value of the bottom hole pressure of the target well under the drilling gas invasion condition; the first error value is the difference between the second pressure value and the first pressure value; the first error change rate is the change rate of the first error value; Inputting the first error value and the first error change rate into a preset fuzzy inference control model; the preset fuzzy inference control model is obtained by coupling a throttle valve opening PID adjustment model with a fuzzy neural network; A third pressure value is generated according to the control parameter value output by the fuzzy inference control model; the third pressure value is an updated iterative value of the bottom hole pressure of the target well under the drilling gas invasion condition; Calculating a second error value according to the second pressure value and the third pressure value; If the second error value is less than or equal to a preset error threshold, the bottom hole pressure value of the target well under the drilling gas invasion condition is adjusted to the third pressure value.
2. The method according to claim 1, characterized in that: The throttle valve opening PID adjustment model includes a preset membership model, a preset fuzzy inference rule model and a preset weighted rule model; The preset fuzzy inference control model is obtained by coupling the throttle valve opening PID adjustment model with the fuzzy neural network, and includes: According to the preset membership model, a historical membership matrix corresponding to the historical error value and the historical error change rate is generated; the historical error value is the difference between the historical iteration value and the historical target value of the bottom hole pressure of the historical well under the drilling gas invasion condition; the historical error change rate is the change rate of the historical error value; Pre-training a fuzzy neural network according to the historical error value, the historical error change rate and the historical membership matrix; According to the preset fuzzy inference rule model, generating a historical fuzzy quantity matrix corresponding to the historical membership matrix; Pre-training a fuzzy inference rule neural network according to the historical membership matrix and the historical fuzzy quantity matrix; Generate historical control parameter values corresponding to the historical fuzzy quantity matrix according to the preset weighted rule model; Pre-training a defuzzification neural network according to the historical fuzzy quantity matrix and the historical control parameter values; A preset fuzzy reasoning control model is constructed according to the pre-trained fuzzification neural network, the pre-trained fuzzy reasoning rule neural network and the pre-trained defuzzification neural network.
3. The method according to claim 2, characterized in that: The method for constructing the preset membership model includes: The preset membership model is constructed according to the following formula: Where x is the fuzzy quantity corresponding to the historical error value or the historical error change rate; a, b, and c are the preset membership thresholds, representing the starting point, peak point, and end point of the fuzzy quantity, respectively.
4. The method according to claim 2, characterized in that: The method for constructing the preset fuzzy inference rule model includes: Construct an annular air-liquid two-phase flow model based on bottom hole pressure and throttle valve opening; According to the annular air-liquid two-phase flow model, a fuzzy inference rule table is constructed; According to the fuzzy reasoning rule table, the preset fuzzy reasoning rule model is constructed.
5. The method according to claim 2, characterized in that: The method for constructing the preset weighted rule model includes: The preset weighted rule model is constructed using the following formula: Where x is the historical fuzzy quantity; y is the change in the historical control parameter value.
6. The method according to claim 1, characterized in that: The control parameter values output by the fuzzy inference control model include proportional control value, integral control value and differential control value; Generating a third pressure value according to the control parameter value output by the fuzzy inference control model includes: According to the proportional control value, integral control value and differential control value output by the fuzzy inference control model, the opening value of the throttle valve is determined using the following formula: Where u(t) is the opening value of the throttle valve at the current time point t; e(t) is the first error value at the current time point t; K p , K i and K d They are respectively the proportional control value, integral control value and differential control value output by the fuzzy inference control model; According to the opening value of the throttle valve, the third pressure value is determined using the following formula: Where, Z is the opening value of the throttle valve; C v is the fixed constant of the throttle valve; Q is the total mass flow rate flowing through the throttle valve, unit: kg / s; P top is the pressure value at the throttle valve, i.e. the third pressure value, unit: Pa; P s is the pressure value at the downstream of the throttle valve, unit: Pa; x L-S is the mass flow rate fraction of the gas-liquid mixture in the wellbore; x G is the gas phase mass flow fraction; ρ L-S,top is the density of the gas-liquid mixture at the wellhead, unit: kg / m 3 ρ G,top is the gas phase density at the wellhead, unit: kg / m 3 ; Y is the gas expansion factor.
7. The method according to claim 1, characterized in that: The method further comprises: If the second error value is greater than a preset error threshold, calculating a second error change rate of the second error value according to the first error value and the second error value; Using the second error value and the second error change rate as a new first error value and a new first error change rate, respectively; Iteratively executing the steps of inputting the first error value and the first error change rate into a preset fuzzy inference control model, generating a third pressure value, calculating the second error value, and using the second error value and the second error change rate as a new first error value and a new first error change rate, respectively, until the second error value is less than or equal to a preset error threshold; The bottom hole pressure value of the target well under the drilling gas invasion condition is adjusted to the third pressure value.
8. The method according to claim 1, characterized in that: The method further comprises: If the second error value is greater than a preset error threshold, the preset fuzzy inference control model is fine-tuned according to the second error value.
9. A device for regulating bottom hole pressure under drilling gas invasion conditions, characterized in that: The device comprises: A first calculation module is used to calculate a first error value and a first error change rate according to a first pressure value and a second pressure value; the first pressure value is a real-time iteration value of the bottom hole pressure of the target well under the drilling gas invasion condition; the second pressure value is a target value of the bottom hole pressure of the target well under the drilling gas invasion condition; the first error value is a difference between the second pressure value and the first pressure value; the first error change rate is a change rate of the first error value; A fuzzy reasoning module, used for inputting the first error value and the first error change rate into a preset fuzzy reasoning control model; the preset fuzzy reasoning control model is obtained by coupling a throttle valve opening PID adjustment model with a fuzzy neural network; A generating module, configured to generate a third pressure value according to the control parameter value output by the fuzzy inference control model; the third pressure value is an updated iterative value of the bottom hole pressure of the target well under the drilling gas invasion condition; A second calculation module, configured to calculate a second error value according to the second pressure value and the third pressure value; The adjustment module is used to adjust the bottom hole pressure value of the target well under the drilling gas invasion condition to the third pressure value if the second error value is less than or equal to a preset error threshold.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.