Throttle valve opening control quantity optimization method, device, equipment and storage medium

By optimizing PID parameters using a BP neural network and combining the BP neural network with a PID controller, the problem of low control accuracy of the throttle valve was solved, achieving automated control of wellhead casing pressure and bottom hole pressure, and reducing well control risks.

CN118050992BActive Publication Date: 2025-10-28CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410190101.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-20
Publication Date
2025-10-28
Estimated Expiration
2044-02-20

AI Technical Summary

Technical Problem

Existing technologies have limited control accuracy for throttle valves, especially in nonlinear control where robustness is poor, leading to high well control risks.

Method used

By combining a BP neural network with a PID controller, the BP neural network adaptively optimizes the PID parameters and adjusts the throttle valve opening in real time, thereby achieving automatic control of wellhead casing pressure and bottom hole pressure.

Benefits of technology

It improves the accuracy and robustness of PID control, effectively prevents overflow and blowout, and ensures the safety of the drilling site.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118050992B_ABST
    Figure CN118050992B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, equipment, and storage medium for optimizing the throttle valve opening control quantity. The method includes: obtaining a first input layer result and a second input layer result based on the current casing pressure value and the expected casing pressure value of the current round; obtaining a hidden layer result based on the first input layer result and the second input layer result; obtaining an output layer result based on the hidden layer result; determining PID parameters based on the output layer result and the sampling period, obtaining a target control quantity based on the PID parameters, the current casing pressure value, and the expected casing pressure value; and adjusting the current casing pressure value based on the target control quantity. The method of the present application, by combining a BP neural network with a PID controller, can respond to different operating conditions at an oil drilling site in real time, and adaptively optimize the PID parameters at the control algorithm level according to different operating conditions, thereby improving the throttle valve opening control accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of drilling technology, and in particular to a method, apparatus, equipment, and storage medium for optimizing the control quantity of a throttle valve opening. Background Technology

[0002] Spills and blowouts during oil drilling not only seriously endanger the lives of offshore platform engineers but also release large amounts of crude oil, hydrogen sulfide, and various greenhouse gases into the ocean, causing enormous economic losses and ecological disasters. The commonly used technique for handling spills and blowouts is choke control, a core component of well control technology. However, regardless of the chosen choke control method, it is essential to adjust the choke valve opening in real time based on the changes in bottom hole pressure to apply a reasonable wellhead casing pressure. This ensures that the wellbore pressure balance is restored and rebuilt while maintaining a bottom hole pressure slightly higher than the formation pressure.

[0003] Related technologies employ computer software to control bottomhole pressure balance, resulting in the development of a choke control system and a well control parameter monitoring system. This system can collect downhole pressure data and well control-related parameters in real time. The software analyzes and calculates the data, and adjusts the choke valve opening in real time within a simulation system based on the results. However, the relationship between the choke valve opening and casing pressure is non-linear. Especially when the choke valve opening is low, even slight changes in the opening can cause drastic fluctuations in casing pressure, limiting the adjustment accuracy of the simulation system in this technology.

[0004] Therefore, existing technologies suffer from limited control accuracy of throttle valves. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for optimizing the control quantity of a throttle valve opening, in order to solve the problem of limited control accuracy of throttle valves in the prior art.

[0006] Firstly, this application provides a method for optimizing the control quantity of a throttle valve opening, including:

[0007] Based on the current over-the-counter (OT) value and the expected OOT value in the current round, the results of the first input layer and the second input layer are obtained. The current OOT value is determined based on the historical control values ​​of the previous round. The first input layer result is the result obtained by inputting the current OOT value into the first input layer neuron of the BP neural network input layer. The second input layer result is the result obtained by inputting the expected OOT value into the second input layer neuron of the BP neural network input layer.

[0008] Based on the results of the first input layer and the second input layer, the hidden layer results are obtained, wherein the hidden layer results are obtained by inputting the results of the first input layer and the second input layer into the hidden layer neurons of the BP neural network.

[0009] Based on the hidden layer results, the output layer results are obtained. The output layer results are the results obtained by inputting the hidden layer results into the output layer neurons of the BP neural network.

[0010] The PID parameters are determined based on the output layer results and the sampling period. The sampling period is determined based on the period for collecting the current pressure value.

[0011] The target control quantity is obtained based on the PID parameters, the current pressure value, and the desired pressure value.

[0012] Adjust the current casing pressure value according to the target control amount.

[0013] Secondly, this application provides a throttle valve opening control quantity optimization device, comprising:

[0014] The first processing module is used to obtain the first input layer result and the second input layer result based on the current and expected pressure values ​​of the current round.

[0015] The second processing module is used to obtain the hidden layer results based on the first input layer results and the second input layer results;

[0016] The third processing module is used to obtain the output layer results based on the hidden layer results;

[0017] The determination module is used to determine the PID parameters based on the output layer results and the sampling period;

[0018] The calculation module is used to obtain the target control quantity based on the PID parameters, the current pressure value, and the desired pressure value.

[0019] The adjustment module is used to adjust the current casing pressure value according to the target control value.

[0020] Thirdly, this application provides an apparatus, including: a processor, and a memory communicatively connected to the processor;

[0021] The memory stores instructions that the computer executes;

[0022] The processor executes computer execution instructions stored in memory to implement the above method.

[0023] Fourthly, this application provides a storage medium that stores computer-executable instructions, which, when executed by a processor, are used to implement the above-described method.

[0024] The throttle valve opening control optimization method, device, equipment, and storage medium provided in this application combine a BP neural network with a PID controller. Based on the BP neural network, it can respond to different working conditions at the oil drilling site in real time, and adaptively optimize the PID parameters at the control algorithm level according to different working conditions. It can automatically control the actual casing pressure to near the target casing pressure in a short time without relying on the engineer's field experience, thereby realizing automatic adjustment of the throttle valve opening and controlling the wellhead casing pressure and bottom hole pressure in oil drilling. It effectively solves the problems of low control accuracy and poor robustness of PID controllers in nonlinear control. Attached Figure Description

[0025] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0026] Figure 1 This is a schematic diagram illustrating an application scenario of a throttle valve opening control quantity optimization method provided in an embodiment of this application.

[0027] Figure 2 A flowchart illustrating the throttle valve opening control optimization method provided in this application embodiment;

[0028] Figure 3 A schematic diagram illustrating the automatic control effect of the throttling and killing process on casing pressure, provided by the throttling valve opening control quantity optimization method in the embodiments of this application.

[0029] Figure 4 A schematic diagram illustrating the changes in PID parameters during automatic casing pressure control in a corresponding simulated throttling and well-killing process provided in this application embodiment;

[0030] Figure 5 This is a schematic diagram of the throttle valve opening control optimization device provided in the embodiments of this application;

[0031] Figure 6 This is a schematic diagram of the device provided in an embodiment of this application.

[0032] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0033] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0034] Choke-and-control technology is a method of controlling and stabilizing bottom hole pressure by using a choke valve to control the entry and exit of kill fluid. This technology is mainly used for kick control and overflow control to prevent blowouts and protect oil and gas reservoirs. There are several implementation methods for choke-and-control technology, such as the choke method and the circulation method. The choke method controls the bottom hole pressure by adjusting the entry amount of kill fluid by controlling the opening degree of the choke valve. This method is suitable for wells with low formation pressure and small overflows. During choke-and-control, it is necessary to closely monitor parameters such as the density, viscosity, and temperature of the kill fluid, as well as parameters such as the opening degree of the choke valve, tubing pressure, and casing pressure to ensure the effectiveness and safety of the choke-and-control process.

[0035] In existing technologies, PID (Proportional-Integral-Derivative) control is used to automatically control the opening of the throttle valve, thereby achieving automated throttling and well control. PID control is a control strategy based on proportional, integral, and derivative operations and their combinations. It calculates the control quantity based on the system error using proportional, integral, and derivative operations. Proportional (P) control is the simplest control method, where the controller's output is proportional to the input error signal; however, when only proportional control is used, a steady-state error exists in the system output. Integral (I) control, in integral control, calculates the control quantity based on the integral of the input error signal. Integral control can eliminate steady-state error. Derivative (D) control, in derivative control, controls the system based on the derivative of the error signal (i.e., the rate of change of the error), which can reduce spikes. A PID controller is a controller that calculates the control quantity based on the system error using proportional, integral, and derivative operations.

[0036] However, the relationship between the throttle valve opening and the casing pressure is non-linear, especially at low throttle valve openings. Even slight changes in the throttle valve opening can cause drastic fluctuations in casing pressure. Therefore, it is necessary to optimize the parameters of the PID controller—P (proportional unit), I (integral unit), and D (derivative unit)—to adjust the throttle valve opening control quantity to cope with the drastic fluctuations in casing pressure. Existing PID parameter optimization techniques set a separate set of PID parameters for each control scenario. In practical applications, the current control scenario is acquired through sensors, and different PID parameters are switched. If a sudden situation occurs in a control scenario (i.e., the PID parameters corresponding to the sudden situation are not pre-set), or the transition between different control scenarios is rapid, the existing PID parameter optimization methods will have poor control performance in these situations, thus affecting the throttle valve opening control effect.

[0037] Therefore, this application provides a method for optimizing the control quantity of a throttle valve opening. By adaptively optimizing the PID parameters through a BP neural network algorithm, different PID parameters can be tuned in real time under different construction conditions, effectively reducing the impact of the nonlinear characteristics of the throttle valve on the PID control, thereby improving the control accuracy and robustness of the PID control and reducing well control risks.

[0038] Figure 1 This is a schematic diagram illustrating a scenario for optimizing the throttle valve opening control quantity, as provided in an embodiment of this application. Figure 1 As shown, the system includes a PID controller, a signal amplifier, an electro-hydraulic proportional valve, a hydraulic system, and a throttle valve.

[0039] The system parameters are affected by factors such as the throttle valve structure and the hydraulic pipeline supply pressure. Specifically, the PID controller calculates the control quantity or control signal, which is then amplified by a signal amplifier to output an amplified control signal. This amplified control signal is transmitted to the electro-hydraulic proportional valve, which adjusts its opening according to the signal magnitude, thereby regulating the amount of hydraulic oil entering the throttle valve spool. Different hydraulic oil volumes change the displacement of the throttle valve piston, and changes in the hydraulic oil within the throttle valve spool adjust the throttle valve opening. Different throttle valve openings change the casing pressure, which is then fed back to the PID controller via the system. The system acquires the necessary data for calculations using sensors. For example, a pressure sensor is used to obtain the pressure at the oil drilling site, and a displacement sensor is used to obtain the throttle valve opening. The throttle valve controls the casing pressure at the wellhead, thereby controlling the bottom hole pressure.

[0040] The opening degree of the throttle valve is determined by both the actual and expected casing pressure values. The actual and expected casing pressure values ​​are used as training data, and as inputs to the BP neural network. The PID parameters are used as outputs for parametric modeling. Finally, a parametric model that can obtain and optimize PID parameters at any time is established, so that different PID parameters can be tuned in real time according to different construction conditions.

[0041] A BP neural network can refer to a multi-layer feedforward neural network model based on the backpropagation algorithm. It consists of an input layer, one or more hidden layers, and an output layer. Through this hierarchical structure, it can learn and store complex input-output mapping relationships. The learning process of a BP neural network is mainly divided into the forward propagation stage and the backpropagation stage.

[0042] During the forward propagation phase, the input signal is passed from the input layer to the hidden layer, and finally to the output layer. Each neuron in each layer calculates its output value based on the output of the neuron in the previous layer and the current weights and biases. This output value is then used as the input to the neuron in the next layer.

[0043] During the backpropagation phase, after the network produces an output, it compares it with the expected output to calculate the error. This error is then propagated backward from the output layer to the input layer, with each weight adjusted accordingly to minimize the total error of the entire network. This process is typically implemented using gradient descent.

[0044] Backpropagation (BP) neural networks automatically adjust their parameters by learning from samples, enabling them to approximate any complex nonlinear relationship. A trained network can make reasonable predictions and classifications of unseen data.

[0045] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0046] Figure 2 This is a flowchart illustrating the throttle valve opening control optimization method provided in this embodiment. The execution entity of this method can be a computer or other server; this embodiment does not impose any particular limitations. Figure 1 As shown, the method may include:

[0047] Step S110: Based on the current over-the-counter pressure value and the expected over-the-counter pressure value of the current round, obtain the first input layer result and the second input layer result. The current over-the-counter pressure value is determined according to the historical control quantity of the previous round. The first input layer result is the result obtained by inputting the current over-the-counter pressure value into the first input layer neuron of the BP neural network input layer. The second input layer result is the result obtained by inputting the expected over-the-counter pressure value into the second input layer neuron of the BP neural network input layer.

[0048] The current casing pressure value for the current cycle is the pressure value collected from the wellhead by the system according to the needs of the current cycle. After the historical control quantity is transmitted to the throttle valve, this pressure value reflects the actual casing pressure after the throttle valve opening is adjusted. The expected casing pressure value for the current cycle can be a preset ideal casing pressure value, which can be determined according to the current operating conditions, process requirements, and data acquisition needs. Using the current casing pressure value and the expected casing pressure value as inputs, the optimal PID parameters are found through the training and learning of the BP neural network to achieve ideal control performance and match the actual casing pressure value with the expected casing pressure value. The first input layer result is the result obtained by inputting the current casing pressure value into the first input layer neuron of the BP neural network, and the second input layer result is the result obtained by inputting the expected casing pressure value into the second input layer neuron of the BP neural network.

[0049] The input layer of a BP neural network consists of a first input layer neuron that processes the current hemostatic pressure value and a second input layer neuron that processes the desired hemostatic pressure value. The input of the BP neural network's input layer... and output satisfy:

[0050]

[0051] in, For the input layer, p is the output of the input layer. a (k) represents the actual casing pressure value during the kth sampling period, p t (k) represents the expected overlay pressure value during the kth sampling period, and i represents the number of neurons in the input layer of the BP neural network.

[0052] Step S120: Obtain the hidden layer result based on the first input layer result and the second input layer result, wherein the hidden layer result is the result obtained by inputting the first input layer result and the second input layer result into the hidden layer neurons of the BP neural network.

[0053] The hidden layer structure can include multiple neurons, the number of which can be determined based on the number of input / output units, the complexity of the problem, and the characteristics of the data. The number of neurons in the hidden layer is typically between the number of neurons in the input layer and the number of neurons in the output layer. Optionally, the hidden layer in this embodiment includes three neurons.

[0054] Input of the hidden layer of a BP neural network and output satisfy:

[0055]

[0056]

[0057] In the formula, As input to the hidden layer, is the output of the hidden layer, h is the number of neurons in the hidden layer of the BP neural network, and Q is the number of neurons in the hidden layer; The first objective weight represents the weighting coefficient between each neuron in the input layer and each neuron in the hidden layer, and can be adjusted and corrected using the BP neural network algorithm.

[0058] The activation function for neurons in the hidden layer is the hyperbolic tangent activation function, or tanh function, with the following expression:

[0059]

[0060] Step S130: Based on the hidden layer results, obtain the output layer results. The output layer results are obtained by inputting the hidden layer results into the output layer neurons of the BP neural network.

[0061] The output layer consists of three neurons, the number of which corresponds to the number of PID parameters.

[0062] Input to the output layer of a BP neural network and output satisfy:

[0063]

[0064]

[0065] in, For the input of the output layer, For the output of the output layer, is the weight of the second objective, and o is the number of neurons in the hidden layer; The second objective weight represents the weighting coefficient between each neuron in the hidden layer and each neuron in the output layer, and can be adjusted and corrected using the BP neural network algorithm.

[0066] Step S140: Determine the PID parameters based on the output layer results and the sampling period. The sampling period is determined based on the period for collecting the current pressure value.

[0067] The sampling period is the period during which the pressure sensor in the throttling and killing well collects pressure values. Since the data transmission has time intervals, the mathematical model of the PID controller needs to be discretized first. Therefore, when determining the PID parameters, the corresponding PID parameters need to be derived by back-deriving the output layer structure based on the discretization process.

[0068] Step S150: Obtain the target control quantity based on the PID parameters, the current pressure value, and the desired pressure value.

[0069] The target control quantity satisfies:

[0070]

[0071] e p (k)=p t (k)-p a (k), (1.8)

[0072] Where u(k) is the control variable, K p T is the proportionality coefficient. i T is the integral coefficient. d e is the differential coefficient. p (k) represents the error between the current casing pressure value and the expected casing pressure value, p a (k) represents the actual casing pressure value during the kth sampling period, p t (k) represents the expected pressure value during the kth sampling period.

[0073] Step S160: Adjust the current casing pressure value according to the target control value.

[0074] After determining the optimal combination of PID parameters, the PID controller will calculate the corresponding target control quantity u(k). The control signal corresponding to u(k) will enter the signal amplifier, electro-hydraulic proportional valve and throttle valve. The change in the opening degree of the throttle valve will affect the actual casing pressure value, thus forming a closed-loop control.

[0075] The throttle valve opening control optimization method provided in this application combines a BP neural network with a PID controller. Based on the BP neural network, it can respond to different working conditions at the oil drilling site in real time, and adaptively optimize the PID parameters at the control algorithm level according to different working conditions. It can automatically control the actual casing pressure to near the target casing pressure in a short time without relying on the engineer's field experience, thereby realizing automatic adjustment of the throttle valve opening. This effectively solves the problems of low control accuracy and poor robustness of PID controllers in nonlinear control, and effectively prevents the occurrence of overflow, blowout, etc., or prevents the further deterioration of overflow or blowout, ensuring the safety of personnel and equipment at the drilling site.

[0076] In some embodiments, the step S140 of determining the PID parameters based on the output layer results and the sampling period includes the following steps:

[0077] Determine the first output layer output result of the first output layer neuron, the second output layer output result of the second output layer neuron, and the third output layer output result of the third output layer neuron in the output layer results.

[0078] Determine the scaling factor based on the output of the first output layer.

[0079] Based on the output results of the first output layer, the output results of the second output layer, and the sampling period, the integration coefficients are determined, and the integration coefficients satisfy the following:

[0080]

[0081] Among them, K p K is the output result of the first output layer. i This is the output result of the second output layer, where T is the sampling period. i is the integral coefficient.

[0082] Based on the output results of the first output layer, the third output layer, and the sampling period, the differential coefficients are determined, and the differential coefficients satisfy the following:

[0083]

[0084] Among them, K p K is the output result of the first output layer. d This is the output result of the third output layer, where T is the sampling period. d is the integral coefficient.

[0085] The PID parameters are obtained based on the proportional coefficient, derivative coefficient, and integral coefficient.

[0086] In the process of obtaining PID parameters, since the pressure sensor sampling in the automated well control process is periodic and its data transmission has time intervals, the mathematical model of the PID controller needs to be discretized first. The sampling period of the pressure sensor is set to T. Then, the difference between two adjacent samplings of the control quantity is: Δu(k) = u(k) - u(k-1), where Δu(k) is specifically:

[0087]

[0088] Therefore, let We can obtain the discretized u(k):

[0089] u(k)=u(k-1)+K p [e p (k)-e p[(k-1)]+K i e p (k)+K d [e p (k)-2e p (k-1)-e p (k-2)] (2.2)

[0090] From the above equation, we can see that u(k) is actually related to K. p K i K d u(k-1) and p a (k) is a nonlinear function related to variables, representing the PID controller's calculation of the next control step, which combines the control effects of the current control moment and the previous two control moments. The signal corresponding to this value will continue to enter subsequent devices such as signal amplifiers to complete the entire closed-loop control. As for K... p K i K d The optimal parameter combination can be found through the training and learning of neural networks to achieve ideal control performance. Therefore, after obtaining the output layer results, based on K... p K i and K d The PID parameters (K) can be obtained. p T i T d ).

[0091] In some embodiments, step S160 includes the following steps:

[0092] First, the PID controller generates a control signal based on the target control quantity.

[0093] Then, the control signal is amplified to obtain the amplified control signal.

[0094] Finally, based on the control amplification signal, the opening of the throttle valve is adjusted to adjust the current sleeve pressure value.

[0095] The PID controller calculates the control quantity and generates a control signal. After the control signal is amplified, it outputs an amplified control signal. The amplified control signal is transmitted to the electro-hydraulic proportional valve, which changes its opening according to the signal magnitude, thereby regulating the amount of hydraulic oil entering the throttle valve core. Different amounts of hydraulic oil change the displacement of the throttle valve piston, and the change in hydraulic oil in the throttle valve core adjusts the opening of the throttle valve. Thus, different throttle valve openings change the wellhead casing pressure, resulting in the next casing pressure value.

[0096] In some embodiments, after step S160, the following step is further included:

[0097] The next set of pressure values ​​is obtained, which is the adjusted casing pressure value based on the current casing pressure value. In other words, after the throttle valve is adjusted according to the target control quantity output by the PID controller in the current cycle, the wellhead casing pressure value obtained by the pressure sensor in the next sampling cycle is the next set of pressure values.

[0098] If the next set pressure value does not match the expected set pressure value, then the next set pressure value is used as the current set pressure value for the next round, and the steps of obtaining the first input layer result and the second input layer result based on the current set pressure value and the expected set pressure value are re-executed until the adjusted current set pressure value matches the expected set pressure value.

[0099] The desired pressure value is the ideal pressure value under the current operating conditions. Adjusting the actual pressure value to the desired pressure value or close to it within a certain range is the ideal adjustment state, meaning the actual pressure value matches the desired pressure value. If the next pressure value does not match the desired pressure value, i.e., the next pressure value is not within the ideal error range, further adjustment is still needed. Therefore, steps S110 to S160 are repeated to automatically control the actual pressure to near the target pressure within a short time.

[0100] This embodiment continuously adjusts and optimizes the throttle valve opening by acquiring the next set pressure value and comparing it with the expected set pressure value, thereby improving the stability and accuracy of the control system.

[0101] In some embodiments, before re-executing the step of obtaining the first input layer result and the second input layer result based on the current overlay pressure value and the expected overlay pressure value, a first historical weight between the input layer and the hidden layer, and a second historical weight between the hidden layer and the output layer are first determined, wherein both the first historical weight and the second historical weight correspond to the historical overlay pressure value.

[0102] By analyzing the error between the current and desired casing pressure values, and adjusting the weights of the first and second objectives in conjunction with the system's control performance evaluation indicators, we can obtain the target weights suitable for the current operating conditions. This leads to the optimal PID parameters for adjusting the actual casing pressure value. The control performance evaluation indicators can employ commonly used system control performance evaluation standards, such as the following evaluation standard table:

[0103] Table 1 Reference Table for Control Performance Evaluation Standards

[0104]

[0105] In the process of system control, the smaller the value of this comprehensive evaluation index of control performance, the better the control performance of the system.

[0106] Then, based on the first historical weight and the second historical weight, the first target weight and the second target weight are determined. Based on the control performance evaluation index, and by adjusting the first historical weight and the second historical weight in conjunction with the current and expected over-the-counter pressure values, the first target weight and the second target weight can be obtained.

[0107] Furthermore, the BP neural network is adjusted according to the first target weight and the second target weight to re-execute the step of obtaining the first input layer result and the second input layer result based on the current casing pressure value and the expected casing pressure value, that is, repeating steps S110 to S160, thereby further improving the accuracy and response speed of the throttle valve opening control.

[0108] This embodiment utilizes historical data and information to adaptively adjust the BP neural network, thereby better responding to fluctuations and changes in the casing pressure value. This helps improve the performance and stability of the throttle valve opening control, providing a more reliable and accurate control strategy for practical applications.

[0109] In some embodiments, determining the first target weight and the second target weight based on the first historical weight and the second historical weight includes the following steps:

[0110] First, determine the objective function, which satisfies:

[0111]

[0112] Where Obj(k) is the objective function, e p (k) represents the error between the current casing pressure and the desired casing pressure at time k. In this embodiment, the ISE evaluation standard is used as the control performance evaluation index, and an objective function is obtained based on the control performance evaluation index, with the goal of reducing the difference between the current casing pressure and the desired casing pressure.

[0113] Then, based on the second historical weights, the hidden layer results, and the objective function, the second objective correction amount is determined. The second objective correction amount satisfies:

[0114]

[0115] in, Let η be the second objective correction value, α be the learning rate, α be the inertia coefficient, and Obj(k) be the objective function.

[0116] As the weight of the second objective, It is the second historical weight.

[0117] For equation (2.4) Further derivation is shown in equation (2.5):

[0118]

[0119] Calculate each term in equation (2.5) separately, where the first term... Second item It is unknown; approximation is achieved using a sign function. Replacing computation with symbolic functions may affect computational accuracy, which can be compensated for by adjusting the learning rate η. (Third term) The value of can be derived from equation (2.0) to obtain:

[0120]

[0121]

[0122]

[0123] Fourth item The value can be derived from equation (1.4), since but

[0124] Fifth item Based on the above derivation process, The expression can be transformed into:

[0125]

[0126]

[0127] Where o = 1, 2, 3, Let η be the second objective correction value, α be the learning rate, α be the inertia coefficient, and Obj(k) be the objective function. As the second historical weight, e p (k) represents the error between the current casing pressure value and the expected casing pressure value.

[0128] Therefore, the weight of the second objective is determined based on the second objective correction amount and the second historical weight.

[0129] Furthermore, the first target correction amount is determined based on the first historical weight, the second target weight, the input layer input, the hidden layer input, and the second target correction amount. The input layer input is determined based on the current overhang value and the expected overhang value, and the hidden layer input is determined based on the first input layer result and the second input layer result.

[0130] The correction amount for the first objective is similar to that for the second objective, and the correction amount for the first objective satisfies the following:

[0131]

[0132] Using the same derivation process, the computational method for the learning process of the hidden layer can be obtained, resulting in:

[0133]

[0134]

[0135] in, Let η be the first objective correction value, α be the learning rate, α be the inertia coefficient, and Obj(k) be the objective function. For the input layer, As input to the hidden layer, As the weight of the second objective, It is the first historical weight.

[0136] Therefore, the first target weight is determined based on the first target correction amount and the first historical weight.

[0137] After determining the first target weight and the second target weight, steps S110 to S160 are executed to obtain the PID parameter K at the k-th sampling. p K i K d ,Right now:

[0138]

[0139] The output of the output layer is the optimal combination of P, I, and D parameters for the current k-th sample, calculated according to Equations 1.9 and 2.0. p T i T d This will be directly adjusted to the PID controller, resulting in better control performance from the mathematical model u(k) of the PID controller (refer to Equation 1.7).

[0140] In some embodiments, the input layer input and the hidden layer input are obtained by the following steps:

[0141]

[0142] in, p is the input to the input layer. a (k) represents the actual casing pressure value during the kth sampling period, p t (k) represents the expected overlay pressure value at the kth sampling period, and i represents the number of neurons in the input layer;

[0143] Based on the results of the first and second input layers, the hidden layer inputs are determined, and the hidden layer inputs satisfy the following:

[0144]

[0145] in, is the input to the hidden layer, h is the number of neurons in the hidden layer, and Q is the number of neurons in the hidden layer; The first objective weight represents the weighting coefficient between each neuron in the input layer and each neuron in the hidden layer.

[0146] The throttle valve opening control optimization method provided in this application can also be applied to throttle kill equipment. Based on the principle of automatic control, an automated throttle kill system can be formed, such as... Figure 1 As shown, this system can be directly integrated with choke and well control devices at oil drilling sites, automatically adjusting the choke valve opening to control casing pressure, thereby further controlling bottom hole pressure, preventing further exacerbation of overflow and blowout, and ensuring the safety of personnel and equipment at the drilling site. Simultaneously, a BP neural network adaptive optimization method for PID parameters is proposed. By embedding the BP neural network into the PID controller, adaptive optimization of the PID controller parameters is achieved at the control algorithm level, effectively solving the problems of low control accuracy and poor robustness of PID controllers in nonlinear control.

[0147] Figure 1 The system shown is a relatively complex nonlinear system. System parameters are affected by factors such as the throttle valve structure and hydraulic pipeline supply pressure. The control signal calculated by the PID controller is amplified and output as a signal amplifier. This amplified control signal enters the electro-hydraulic proportional valve, which changes its opening degree according to the signal magnitude, thereby changing the amount of hydraulic oil entering the throttle valve spool. Different hydraulic oil quantities change the displacement of the throttle valve piston, thus changing the throttle valve opening. In summary, according to the attached... Figure 1 The signal amplifier, electro-hydraulic proportional valve, hydraulic pipelines and throttle valve in the hydraulic system are derived and superimposed to establish the physical control model of the throttle valve automatic control system, thereby obtaining the total transfer function of the PID controller.

[0148] An automatic control simulation system for a throttle valve was built in MATLAB's Simulink using the above overall transfer function. Please refer to the system architecture for details. Figure 1 For the module corresponding to the throttle valve opening control optimization method, the parameters were set as follows during simulation: PID parameters were set within the range of [0.0001, 1], the learning rate was set to 0.6, the maximum number of iterations was 200, and the convergence tolerance was 10⁻⁸. A target casing pressure curve was set based on a case study of casing pressure changes at the drilling site. Random casing pressure disturbances were also generated during the simulation to test the anti-interference capability of the PID controller. After iteration and simulation, the PID controller embedded with a BP neural network continuously controlled the throttle valve during the simulation, causing the actual casing pressure to continuously change. Please refer to [link to relevant documentation]. Figure 3The actual and target pressure curves were compared, revealing that the PID controller performed well. Due to its adaptive optimization of the PID controller parameters, the various performance characteristics of the PID controller were improved, further demonstrating the feasibility and superiority of the proposed method of adaptively optimizing PID parameters using a BP neural network algorithm.

[0149] Figure 4 yes Figure 3 The parameters P(K) of the PID controller during the simulation process p ), I(T i ), D(T d ) Change diagram, from Figure 4 It is clear that the PID controller adjusts its parameters in real time according to different situations, enabling it to maintain good control performance under various conditions.

[0150] Figure 5 This is a schematic diagram of the throttle valve opening control optimization device 500 provided in an embodiment of this application. Figure 5 As shown, the throttle valve opening control optimization device 500 includes: a first processing module 510, a second processing module 520, a third processing module 530, a determination module 540, a calculation module 550, and an adjustment module 560. Wherein:

[0151] The first processing module 510 is used to obtain the first input layer result and the second input layer result based on the current pressure value and the expected pressure value of the current round.

[0152] The second processing module 520 is used to obtain the hidden layer result based on the first input layer result and the second input layer result.

[0153] The third processing module 530 is used to obtain the output layer results based on the hidden layer results.

[0154] The determination module 540 is used to determine the PID parameters based on the output layer results and the sampling period.

[0155] The calculation module 550 is used to obtain the target control quantity based on the PID parameters, the current pressure value, and the desired pressure value.

[0156] The adjustment module 560 is used to adjust the current casing pressure value according to the target control value.

[0157] In this embodiment, the determining module 540 can also be specifically used for:

[0158] Determine the first output layer output result of the first output layer neuron, the second output layer output result of the second output layer neuron, and the third output layer output result of the third output layer neuron in the output layer results.

[0159] Determine the scaling factor based on the output of the first output layer.

[0160] The integral coefficients are determined based on the output results of the first output layer, the output results of the second output layer, and the sampling period.

[0161] The differential coefficients are determined based on the output results of the first output layer, the output results of the third output layer, and the sampling period.

[0162] The PID parameters are obtained based on the proportional coefficient, derivative coefficient, and integral coefficient.

[0163] In this embodiment, the adjustment module 560 can also be specifically used for:

[0164] Generate control signals based on the target control quantity;

[0165] The control signal is amplified to obtain the amplified control signal;

[0166] Adjust the opening of the throttle valve according to the control amplification signal to adjust the current sleeve pressure value.

[0167] In this embodiment, the first processing module 510 can also be specifically used for:

[0168] After adjusting the current casing pressure value according to the target control value, the method also includes:

[0169] Obtain the next set of pressure values, which are adjusted versions of the current pressure value.

[0170] If the next set pressure value does not match the expected set pressure value, then the next set pressure value is used as the current set pressure value for the next round, and the steps of obtaining the first input layer result and the second input layer result based on the current set pressure value and the expected set pressure value are re-executed until the adjusted current set pressure value matches the expected set pressure value.

[0171] In this embodiment, the first processing module 510 can also be specifically used for:

[0172] Before re-executing the step of obtaining the first input layer result and the second input layer result based on the current overhang value and the expected overhang value, the first historical weight between the input layer and the hidden layer, and the second historical weight between the hidden layer and the output layer are determined, wherein the first historical weight and the second historical weight both correspond to the historical overhang value;

[0173] The first target weight and the second target weight are determined based on the first historical weight and the second historical weight.

[0174] Based on the first target weight and the second target weight, the BP neural network is adjusted to re-execute the steps of obtaining the first input layer result and the second input layer result based on the current overlay pressure value and the expected overlay pressure value.

[0175] In this embodiment, the first processing module 510 can also be specifically used for:

[0176] Determine the objective function;

[0177] The second objective correction amount is determined based on the second historical weight, the hidden layer results, and the objective function.

[0178] The weight of the second objective is determined based on the second objective correction amount and the second historical weight.

[0179] The first target correction amount is determined based on the first historical weight, the second target weight, the input layer input, the hidden layer input, and the second target correction amount. The input layer input is determined based on the current overhang value and the expected overhang value, and the hidden layer input is determined based on the first input layer result and the second input layer result.

[0180] The first target weight is determined based on the first target correction amount and the first historical weight.

[0181] In this embodiment, the first processing module 510 can also be specifically used for:

[0182] The input layer input is determined based on the current and expected casing pressure values.

[0183] The hidden layer input is determined based on the results of the first and second input layers.

[0184] As can be seen from the above, the throttle valve opening control quantity optimization device of this embodiment consists of a first processing module 510, which obtains a first input layer result and a second input layer result based on the current and desired pressure values ​​of the current cycle; a second processing module 520, which obtains a hidden layer result based on the first and second input layer results; a third processing module 530, which obtains an output layer result based on the hidden layer result; a determination module 540, which determines the PID parameters based on the output layer result and the sampling period; a calculation module 550, which obtains the target control quantity based on the PID parameters, the current pressure value, and the desired pressure value; and an adjustment module 560, which adjusts the current pressure value based on the target control quantity. Thus, the optimal PID parameters are obtained in real time according to the operating conditions, making the actual pressure value closer to the desired pressure value, thereby improving the throttle valve control accuracy.

[0185] Figure 6 This is a schematic diagram of the device provided in an embodiment of this application. Figure 6 As shown, the device is an electronic device 600, which may include one or more processors 601 with processing cores, one or more memory 602 with computer-readable storage media, communication components 603, and other components. The processor 601, memory 602, and communication components 603 are connected via a bus.

[0186] In the specific implementation process, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to perform the data processing method described above.

[0187] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0188] In the above Figure 6 In the illustrated embodiments, it should be understood that the processor 610 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0189] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0190] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0191] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0192] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0193] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.

[0194] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.

[0195] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as these combinations of technical features do not contradict each other, they should be considered within the scope of this specification.

[0196] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0197] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for optimizing the control quantity of a throttle valve opening, characterized in that, include: Based on the current over-the-counter (OT) value and the expected OTT value in the current round, the first input layer result and the second input layer result are obtained. The current OTT value is determined based on the historical control values ​​of the previous round. The first input layer result is the result obtained by inputting the current OTT value into the first input layer neuron of the BP neural network input layer. The second input layer result is the result obtained by inputting the expected OTT value into the second input layer neuron of the BP neural network input layer. Based on the results of the first input layer and the second input layer, the hidden layer results are obtained, wherein the hidden layer results are obtained by inputting the results of the first input layer and the second input layer into the hidden layer neurons of the BP neural network. Based on the hidden layer results, the output layer results are obtained, which are the results obtained by inputting the hidden layer results into the output layer neurons of the BP neural network; Based on the output layer results and sampling period, the PID parameters are determined. The sampling period is the period during which the pressure sensor in the throttling and killing well collects the current casing pressure value. The determination of the sampling period needs to be combined with the time for optimizing the PID tuning parameters using the BP neural network and the throttling valve operation time. The target control quantity is obtained based on the PID parameters, the current pressure value, and the desired pressure value. According to the target control quantity, the opening of the throttle valve is adjusted to adjust the current sleeve pressure value. The pressure drop of the throttle valve has a strong nonlinear characteristic, and the opening control process is a dynamic optimization process throughout the entire process. The step of determining the PID parameters based on the output layer results and the sampling period includes: Determine the first output layer output result output by the first output layer neuron, the second output layer output result output by the second output layer neuron, and the third output layer output result output by the third output layer neuron in the output layer results; Determine the scaling factor based on the output result of the first output layer; Based on the output results of the first output layer, the output results of the second output layer, and the sampling period, the integration coefficients are determined, and the integration coefficients satisfy the following: , in, This is the output result of the first output layer at time k. This represents the output result of the second output layer at time k, where T is the sampling period. The integral coefficient; Based on the output results of the first output layer, the output results of the third output layer, and the sampling period, the differential coefficients are determined, and the differential coefficients satisfy the following: , in, This is the output result of the first output layer at time k. This represents the output result of the third output layer at time k, where T is the sampling period. These are the differential coefficients; The PID parameters are obtained based on the proportional coefficient, the derivative coefficient, and the integral coefficient. After adjusting the current casing pressure value according to the target control value, the method further includes: Obtain the next set pressure value, wherein the next set pressure value is the adjusted set pressure value of the current set pressure value; If the next set pressure value does not match the expected set pressure value, then the next set pressure value is used as the current set pressure value for the next round, and the steps of obtaining the first input layer result and the second input layer result based on the current set pressure value and the expected set pressure value are executed again until the adjusted current set pressure value matches the expected set pressure value. The method further includes: Before re-executing the step of obtaining the first input layer result and the second input layer result based on the current overlay pressure value and the expected overlay pressure value, a first historical weight between the input layer and the hidden layer, and a second historical weight between the hidden layer and the output layer are determined, wherein both the first historical weight and the second historical weight correspond to the historical overlay pressure value; Based on the first historical weight and the second historical weight, determine the first target weight and the second target weight; The BP neural network is adjusted according to the first target weight and the second target weight to re-execute the step of obtaining the first input layer result and the second input layer result based on the current overlay pressure value and the expected overlay pressure value.

2. The method according to claim 1, characterized in that, The step of adjusting the current casing pressure value according to the target control value includes: Based on the target control quantity, a control signal is generated; The control signal is amplified to obtain a control amplified signal; The opening of the throttle valve is adjusted according to the control amplification signal to adjust the current sleeve pressure value.

3. The method according to claim 1, characterized in that, The step of determining the first target weight and the second target weight based on the first historical weight and the second historical weight includes: Determine the objective function, which satisfies: , in, Let be the objective function. The error value between the current casing pressure value and the expected casing pressure value at time k; The second target correction amount is determined based on the second historical weight, the hidden layer result, and the objective function; The second target weight is determined based on the second target correction amount and the second historical weight; The first target correction amount is determined based on the first historical weight, the second target weight, the input layer input, the hidden layer input, and the second target correction amount, wherein the input layer input is determined based on the current overhang value and the expected overhang value, and the hidden layer input is determined based on the first input layer result and the second input layer result; The first target weight is determined based on the first target correction amount and the first historical weight.

4. The method according to claim 3, characterized in that, The step of determining the first target correction amount based on the first historical weight, the second target weight, the input layer input, the hidden layer input, and the second target correction amount includes: The input layer input is determined based on the current casing pressure value and the expected casing pressure value, and the input layer input satisfies: , in, For the input layer, This represents the actual sleeve pressure value during the k-th sampling period. is the expected overlay pressure value at the kth sampling period, and i is the number of neurons in the input layer; Based on the results of the first input layer and the second input layer, the hidden layer input is determined, wherein the hidden layer input satisfies: , in, is the input to the hidden layer, h is the number of neurons in the hidden layer, and Q is the number of neurons in the hidden layer; The first objective weight represents the weighting coefficient between each neuron in the input layer and each neuron in the hidden layer.

5. A throttle valve opening control optimization device, characterized in that, include: The first processing module is used to obtain the first input layer result and the second input layer result based on the current pressure value and the expected pressure value of the current round, wherein the current pressure value is determined based on the historical control quantity of the previous round; The second processing module is used to obtain the hidden layer result based on the first input layer result and the second input layer result; The third processing module is used to obtain the output layer result based on the hidden layer result; The determination module is used to determine the PID parameters based on the output layer results and the sampling period, wherein the sampling period is the period during which the pressure sensor in the throttling and killing well collects the current casing pressure value. The determination of the sampling period needs to be combined with the time for optimizing the PID tuning parameters by the BP neural network and the throttling valve operation time. The determining module is specifically used to determine the first output layer output result output by the first output layer neuron, the second output layer output result output by the second output layer neuron, and the third output layer output result output by the third output layer neuron in the output layer result. Determine the scaling factor based on the output result of the first output layer; Based on the output results of the first output layer, the output results of the second output layer, and the sampling period, the integration coefficients are determined, and the integration coefficients satisfy the following: , in, This is the output result of the first output layer at time k. This represents the output result of the second output layer at time k, where T is the sampling period. The integral coefficient; Based on the output results of the first output layer, the output results of the third output layer, and the sampling period, the differential coefficients are determined, and the differential coefficients satisfy the following: , in, This is the output result of the first output layer at time k. This represents the output result of the third output layer at time k, where T is the sampling period. These are the differential coefficients; The PID parameters are obtained based on the proportional coefficient, the derivative coefficient, and the integral coefficient. The calculation module is used to obtain the target control quantity based on the PID parameters, the current pressure value, and the desired pressure value; The adjustment module is used to adjust the opening of the throttle valve according to the target control quantity, so as to adjust the current sleeve pressure value. The throttle valve pressure drop has a strong nonlinear characteristic, and the opening control process is a dynamic optimization process throughout the entire process. After adjusting the current hedging pressure value according to the target control quantity, the first processing module is further configured to obtain the next hedging pressure value, wherein the next hedging pressure value is the hedging pressure value after adjusting the current hedging pressure value; if the next hedging pressure value does not match the expected hedging pressure value, the next hedging pressure value is used as the current hedging pressure value for the next round, and the step of obtaining the first input layer result and the second input layer result based on the current hedging pressure value and the expected hedging pressure value is re-executed until the adjusted current hedging pressure value matches the expected hedging pressure value; The first processing module is further configured to determine a first historical weight between the input layer and the hidden layer, and a second historical weight between the hidden layer and the output layer, before re-executing the step of obtaining the first input layer result and the second input layer result based on the current overlay pressure value and the expected overlay pressure value, wherein the first historical weight and the second historical weight both correspond to the historical overlay pressure value; Based on the first historical weight and the second historical weight, determine the first target weight and the second target weight; The BP neural network is adjusted according to the first target weight and the second target weight to re-execute the step of obtaining the first input layer result and the second input layer result based on the current overlay pressure value and the expected overlay pressure value.

6. An apparatus comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 4.

7. A storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the throttle valve opening control quantity optimization method as described in any one of claims 1 to 4.

8. A computer program product, characterized in that, The computer program product stores computer execution instructions, which, when executed by a processor, are used to implement the throttle valve opening control quantity optimization method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Brushless direct current motor PID speed regulation method based on genetic neural network

    CN111245313A