1. Introduction
With the continued advancement of deep-earth and deep-sea oil and gas resource exploration and development, the formation conditions encountered in drilling operations have become increasingly complex. The safe density window between formation pore pressure and lost circulation pressure has narrowed considerably, making it difficult for conventional drilling methods to maintain bottomhole pressure within the safe range at all times, which readily triggers well kick or lost circulation incidents [
1,
2,
3]. Managed pressure drilling (MPD) technology applies an adjustable back pressure at the wellhead to regulate the bottomhole equivalent circulating density in real time, maintaining it precisely within the formation pressure window, and has become a key technical approach for addressing the challenges of narrow density window drilling [
4,
5].
In MPD systems, the choke valve is the core actuator for implementing wellhead back pressure regulation [
6]. Under constant bottomhole pressure (CBHP) conditions, the system adjusts the choke valve opening degree based on the target pressure magnitude, changing the annular flow cross-sectional area at the wellhead to control wellhead back pressure [
4]. Currently, in field operations, choke valve opening degree is primarily adjusted manually by engineers based on the target pressure and real-time back pressure feedback [
6,
7]. However, during MPD operations, formation gas influx transforms the wellbore fluid from single-phase liquid flow to gas–liquid two-phase flow, and the compressibility of gas causes severe wellhead back pressure fluctuations. Meanwhile, under gas–liquid two-phase flow conditions, the relationship between choke valve opening degree and wellhead back pressure exhibits significant nonlinearity—in the small opening degree range, wellhead back pressure is highly sensitive to opening degree changes, and minor opening adjustments can cause abrupt pressure changes [
8,
9]. Under the combined influence of gas–liquid two-phase flow pressure fluctuations and choke valve nonlinear characteristics, wellhead back pressure during manual control exhibits large fluctuations and prolonged settling time, making it difficult for control accuracy and response speed to meet the safe drilling requirements under narrow density window conditions [
10]. Therefore, developing automatic choke valve control methods to replace manual operation has become an urgent need for MPD technology development [
11,
12].
Regarding the automatic regulation of MPD wellhead back pressure, researchers have conducted studies from various perspectives. PID controllers, owing to their simple structure and low dependence on controlled object models, are currently the most widely applied method in MPD back pressure control [
4,
5,
6,
7,
8,
9,
10,
11,
12,
13]; however, conventional fixed-parameter PID struggles to adapt to the strong nonlinear characteristics of choke valves and is prone to overshoot and response lag when operating conditions change [
14,
15]. To overcome the limitations of PID, Gorjizadeh et al. [
16] designed an MPD choke valve fuzzy state feedback controller based on T-S fuzzy modeling, which outperforms conventional PID under actuator constraints, but the fuzzy rule design relies on experience. Sule et al. [
17] and Park et al. [
18] applied nonlinear model predictive control (NMPC) to MPD gas kick scenarios respectively, achieving high pressure tracking accuracy, but the dependence on real-time flow models constrains the convenience of engineering implementation. Liang et al. [
19] applied an improved genetic algorithm to optimize MPD back pressure fuzzy PID parameters. Long et al. [
20] introduced the standard DBO into MPD back pressure PID parameter tuning and verified its feasibility through single-phase flow experiments. Regarding control architecture, Wang [
21] proposed a three-level feedback regulation method that improves regulation efficiency through phased coordination of rapid opening degree positioning and PID fine-tuning, but the PID parameters still rely on manual tuning and lack verification under gas–liquid two-phase flow conditions. Beyond these approaches, adaptive control methods have also been explored for MPD pressure regulation. Carlsen et al. [
22] demonstrated automated well control through a combined PI-IMC-MPC strategy, and Siahaan et al. [
23] proposed an adaptive PID switching controller capable of automatic parameter adjustment across operating conditions, though both involve complex control structures that complicate engineering deployment. Ribeiro et al. [
24] and Sheikhi et al. [
25] introduced neural network-based and nonlinear predictive controllers respectively, demonstrating adaptive capability in pressure regulation but relying on accurate process models and validated primarily under single-phase flow conditions. In general, existing MPD pressure control methods either depend on accurate physical models, involve complex control architectures, or lack experimental validation under gas–liquid two-phase flow conditions.
The above review suggests that architecture-oriented studies tend to rely on manual PID tuning, and improving parameter tuning quality represents a direct path to better control performance. Although the classical Ziegler–Nichols (Z-N) tuning method is operationally simple, its reliance on linear model assumptions leads to large overshoot and pronounced oscillation in nonlinear systems [
26,
27,
28]. With the development of metaheuristic optimization algorithms, intelligent algorithms such as genetic algorithm (GA), particle swarm optimization (PSO), and grey wolf optimizer (GWO) have been widely used for PID parameter tuning due to their gradient-free nature and applicability to nonlinear multimodal optimization problems [
29,
30]. The Dung Beetle Optimizer (DBO), proposed in 2023 as a novel metaheuristic algorithm, has demonstrated convergence speed and solution accuracy superior to PSO, GWO, and other algorithms in multiple benchmark tests [
31]. However, the standard DBO suffers from uneven initial population distribution and insufficient balance between global search and local exploitation [
32]. Researchers have improved DBO by introducing Lévy flight, opposition-based learning, dynamic boundary contraction, and other techniques, and have verified the effectiveness in PID parameter tuning in other industrial domains [
33,
34,
35]. Nevertheless, the aforementioned studies on improved DBO for PID tuning are all oriented toward single-phase, deterministic industrial systems and have not yet been applied to the complex scenario of MPD with strong nonlinear characteristics of gas–liquid two-phase flow, nor have they been experimentally validated. More recently, Cai et al. [
36] applied an adaptive DBO to optimize fuzzy PID parameters for nutrient solution temperature control in hydroponic systems, further confirming DBO’s applicability to nonlinear closed-loop control problems in process engineering. Similarly, Yan et al. [
37] applied a variable universe fuzzy PID strategy to regulate hydraulic system pressure in anchor drilling machines under nonlinear load disturbances, demonstrating that adaptive adjustment of the fuzzy universe can substantially reduce pressure tracking error compared to conventional PID control. These recent advances in intelligent optimization and adaptive strategies across various engineering domains provide strong motivation for developing a tailored, metaheuristic-optimized control architecture for the complex MPD pressure regulation process.
As summarized in
Table 1, existing MPD pressure control methods each present notable limitations in at least one of the following aspects: dependence on accurate physical models, high computational cost, lack of two-phase flow experimental validation, or limited large-deviation handling capability. The proposed method addresses these gaps simultaneously.
The main contributions include: (1) establishing a pressure–opening degree dual-layer cooperative feedback control method, in which two closed-loop feedback layers operate in a switching manner to achieve the synergy between rapid opening degree coarse adjustment and fine pressure regulation, without requiring simultaneous operation of both loops as in conventional cascade control. (2) improving the standard DBO algorithm by incorporating chaotic initialization and adaptive weighting strategies, and designing a comprehensive fitness function to enhance PID parameter tuning effectiveness for the MPD pressure control objective. (3) providing systematic simulation and gas–liquid two-phase flow laboratory experimental validation of the proposed method, demonstrating its effectiveness across a gas void fraction range of 0–46.6%.
3. Results and Discussion
3.1. Simulation Verification
Based on the choke valve control process transfer function established in
Section 2.2, the PID parameter tuning effectiveness of the improved DBO algorithm was verified through unit step response simulation. The transfer function used in the simulation was determined according to the type of needle-type choke valve used in the laboratory experiments, incorporating the transfer processes of the signal amplifier, electro-hydraulic proportional valve, hydraulic cylinder, and choke valve, while considering the actuator response time and pressure transmission delay. The transfer function parameters were identified through the step response characteristics of the needle-type choke valve in preliminary experiments [
39]: under constant flow rate conditions, multiple step inputs of different amplitudes were applied to the choke valve opening degree, and the wellhead back pressure time response curves after each step adjustment were recorded. The graphical method was used to extract the static gain
K (the ratio of steady-state pressure change to opening degree change), equivalent time constants
T1 and
T2 (fitted based on the rising segment of the response curve), and equivalent time delay
δ (the initial response delay) from the response curves. The resulting transfer function is by Equation (24):
This transfer function also serves as the controlled object model for the PID controller in the subsequent laboratory experiments. Using the step response performance of the PID parameters tuned by the Z-N trial-and-error method (
Kp = 1.8,
Ti = 1,
Td = 0.8) as the benchmark, the comparison of PID parameters and control performance indices for the three tuning methods is presented in
Table 3, and the comparison of unit step response curves is shown in
Figure 5.
As shown in
Table 3 and
Figure 5, the PID controller tuned by the Z-N method has an overshoot of 24.8% and a settling time of 8.2 s, with the response curve undergoing multiple oscillations near the target value before stabilizing. The PID controller tuned by the standard DBO algorithm has an overshoot of 11.5% and a settling time of 4.6 s, representing reductions of 53.6% and 43.9% compared with the Z-N method, respectively, but the response curve still exhibits noticeable oscillation. The PID controller tuned by the improved DBO algorithm has an overshoot of 4.0% and a settling time of 1.8 s, with the step response curve rising smoothly and converging rapidly to the target value without noticeable oscillation. Compared with the Z-N method, the overshoot is reduced by 83.9% and the settling time is shortened by 78.0%; compared with the standard DBO, the overshoot is further reduced by 65.2% and the settling time is shortened by 60.9%.
Figure 6 presents the fitness convergence curves of the standard DBO and improved DBO over 200 iterations. The improved DBO reaches a fitness value of 0.642 by iteration 10 and converges to its final value of 1.341 by approximately iteration 100, after which no further improvement occurs. In contrast, the standard DBO achieves only 0.380 at iteration 100 and reaching 0.597 at iteration 200—still below the improved DBO’s converged value. The faster convergence and superior final fitness of the improved DBO originate from the synergistic effect of the two improvements and the fitness function.
The above performance improvements originate from the synergistic effect of the two improvements and the fitness function. The Logistic chaotic map initialization improves the coverage uniformity of the initial population in the three-dimensional PID parameter space, reducing the risk of the algorithm falling into local optima. The adaptive inertia weight enables the search step sizes to dynamically adjust with iterations—larger step sizes in the early phase for global exploration and contracted step sizes in the later phase for improved local exploitation accuracy. Furthermore, the overshoot penalty coefficient λ1 = 7 in the comprehensive fitness function is much larger than the settling time penalty coefficient λ2 = 0.6, causing the optimization process to prioritize overshoot suppression, which is consistent with the low overshoot of only 4.0% achieved by the improved DBO-PID. Based on the PID parameters obtained from the above simulation tuning, the subsequent laboratory simulation experiments were conducted.
3.2. Two-Phase Flow Experimental Verification
3.2.1. Experimental Apparatus and Evaluation Indices
To verify the control performance of the wellhead back pressure automatic control system, a laboratory simulation experimental apparatus was designed and constructed using the needle-type choke valve commonly used in drilling operations as the actuator, with reference to the field choke valve–wellbore structure, as shown in
Figure 7.
The apparatus mainly consists of four components: the control unit (a laptop computer equipped with automatic control software), the execution unit (an automated choke valve control box, hydraulic lines, and a needle-type choke valve), the fluid circulation unit (a simulated wellbore, a plunger pump, an air compressor, and an air storage tank), and the signal acquisition unit (a displacement sensor, pressure sensors, and flow meters). Sensor signals are transmitted to the control unit via optical fiber, which together with the downlink channel for control commands forms a complete control–execution–feedback closed-loop structure. The main technical parameters of the apparatus are as follows: plunger pump liquid flow rate 0–20 m3/h, air compressor gas flow rate 0–20 m3/h, choke valve opening degree 0–44 mm, and wellhead back pressure range 0–0.6 MPa.
Within the technical parameter range of the above apparatus, five groups of two-phase flow experimental schemes were designed, as shown in
Table 4. Experiments A–C were conducted under constant flow rate conditions with a liquid flow rate of 14 m
3/h and a gas flow rate of 6 m
3/h (gas void fraction of 30%), using manual control, conventional PID control, and the automatic control system, respectively. Experiment D tested the system’s disturbance rejection capability by abruptly changing the gas flow rate. Experiment E tested the system’s tracking capability for the target pressure under continuously varying gas void fraction conditions. Among these, Experiment B used PID parameters tuned by the Z-N method, while Experiments C, D, and E used PID parameters tuned by the improved DBO algorithm (all shown in
Table 3).
To quantitatively evaluate the control performance, the following three evaluation indices were selected: settling time Tac, defined as the time required for the actual wellhead back pressure to reach and remain within the steady-state allowable range from the moment of target pressure change, s; maximum overshoot absolute error OAEmax, defined as the maximum absolute deviation between actual back pressure and target value before the system enters steady state, MPa; mean absolute error MAE, defined as the mean value of the absolute deviation between actual back pressure and target value after reaching steady state, MPa. The steady-state criterion is that the absolute error remains less than 0.005 MPa for five consecutive sampling instants (sampling period of 2 s).
3.2.2. Two-Phase Flow Constant Target Pressure Control Experiments
According to the schemes of Experiments A, B, and C in
Table 4, three groups of experiments were conducted under constant target pressure conditions using manual control, conventional PID control, and the automatic control system, respectively. The comparison of wellhead back pressure response curves is shown in
Figure 8, and the summary of key performance indices is presented in
Table 5.
- (1)
Manual control (Experiment A). The average
Tac for manually adjusting the choke valve under two-phase flow conditions was 50 s (
Figure 8a). After manually adjusting the wellhead back pressure to the target value and holding the choke valve opening degree constant, the MAE reflects the inherent pressure fluctuation level of the experimental system under that operating condition. The MAE in the low-to-medium pressure range (0.1–0.3 MPa) was 0.01–0.02 MPa; when the target pressure increased to 0.5 MPa, the MAE increased to 0.05 MPa, because this pressure approaches the upper limit of the air storage tank injection pressure, causing the gas–liquid two-phase flow to become unstable.
- (2)
Conventional PID control (Experiment B). The average
Tac of the conventional PID controller was 50.2 s (
Figure 8b), essentially comparable to the 50 s of manual control, indicating that the conventional PID controller failed to shorten the settling time under two-phase flow conditions. When the target pressure change amplitude reached 0.3 MPa,
Tac increased to a maximum of 92 s, while OAE
max reached 0.035 MPa. As shown by the choke valve opening degree curve in
Figure 8b, the choke valve opening degree adjustment stroke corresponding to multiple target pressure changes exceeded 10 mm. The conventional PID controller only makes small incremental adjustments to the opening degree based on pressure deviation, requiring multiple control cycles to approach the target opening degree in the large stroke interval, thereby prolonging the settling time, while the integral term continuously accumulates in the large deviation interval, leading to overshoot. During the steady-state phase, the PID controller suppressed the MAE to below 0.008 MPa through continuous fine adjustment of the choke valve opening degree, which is lower than the inherent fluctuation level when the choke valve opening degree was fixed in Experiment A, indicating that the continuous feedback of the PID controller provided active compensation for the inherent pressure fluctuations of the system.
- (3)
Automatic control system (Experiment C). The average
Tac of the automatic control system was 25 s (
Figure 8c), representing a 50% reduction compared with both manual control and conventional PID control; OAE
max was 0.009 MPa, a 74% reduction compared with conventional PID; and MAE was less than 0.005 MPa at all target pressures. Taking the initial phase of the experiment as an example, the choke valve was regulated from the fully open state to a target pressure of 0.1 MPa, with an opening degree adjustment stroke of approximately 25 mm and a Tac of 38 s. This initial pressurization event involved a larger valve stroke than any of the subsequent target pressure switching events and is therefore not included in the statistical summary presented in
Table 6, which covers only the five inter-setpoint switching events following the initial pressurization. In Experiment B, a smaller stroke required the PID controller to complete the adjustment through multiple cycles of small incremental adjustments, resulting in a settling time actually longer than the large-stroke adjustment time in Experiment C. In contrast, the automatic control system directly positioned the choke valve near the target opening degree through the rapid opening degree adjustment phase, with the PID controller performing fine regulation only within the small deviation interval. Because the rapid opening degree adjustment phase reduced the initial pressure deviation of the PID fine regulation phase, the PID controller operated in the small deviation interval from the moment of intervention, while overshoot was effectively suppressed.
To further address the repeatability of the control performance,
Table 6 presents the individual performance indices for each target pressure switching event in Experiment C. The mean settling time across the five switching events is 25 ± 7.6 s, with the variation in
Tac attributable to differences in both the pressure change magnitude (Δ
P) and the absolute target pressure level, which together determine the required opening degree adjustment stroke across switching events: the three events with ΔP = 0.1 MPa yield Tac values of 14–32 s across different target pressure levels (0.2, 0.3, and 0.4 MPa), consistent with the expected dependence of settling time on the required valve stroke, while the target pressure of 0.3 MPa appears twice under different initial conditions (Δ
P = 0.1 MPa and Δ
P = 0.2 MPa) and yields
Tac values of 22 s and 24 s respectively, demonstrating good consistency under comparable conditions. In contrast, the steady-state MAE shows markedly lower variability across all five events (0.003 ± 0.001 MPa), confirming that the fine regulation performance of the PID controller is consistent and independent of the pressure change magnitude. These results collectively confirm that the observed variation in Tac is physically consistent with the changing operating conditions, and that the steady-state regulation accuracy of the control system is repeatable under the tested two-phase flow conditions.
The above experiments verified the control performance of the automatic control system under constant target pressure conditions. However, in actual managed pressure drilling operations, gas influx and other factors introduce external disturbances, and the target pressure typically changes continuously with the drilling process. Therefore, it is necessary to further examine the system’s disturbance rejection performance and tracking capability for continuously changing target pressures.
3.2.3. Two-Phase Flow Gas Flow Rate Disturbance Experiment
To evaluate the disturbance rejection performance of the automatic control system against abrupt gas flow rate changes under constant target pressure conditions, Experiment D was conducted. The liquid flow rate was 15 m
3/h, the target pressure was 0.4 MPa, and the gas flow rate was switched among 0, 12, and 18 m
3/h to simulate wellhead pressure disturbances caused by gas influx and gas discharge. The experimental results are shown in
Figure 9 and
Table 7.
The automatic control system exhibited no overshoot in all four gas flow rate step changes, with MAE maintained at 0.003–0.005 MPa during all steady-state phases. When the gas flow rate step change amplitude was 12 m
3/h,
Tac was 24–30 s, and the maximum pressure deviation Δ
Pd was 0.073–0.083 MPa. When the step change amplitude increased to 18 m
3/h,
Tac increased to 42 s and Δ
Pd increased to 0.103 MPa, indicating that the larger the disturbance amplitude, the longer the recovery time required by the system and the greater the transient pressure deviation. As shown by the choke valve opening degree curve in
Figure 9, after each gas flow rate step change, the rapid opening degree adjustment phase first positioned the choke valve near the opening degree matching the new operating condition, followed by the PID fine regulation phase eliminating the remaining pressure deviation. The coordination of the two phases enabled the system to recover from the maximum gas flow rate disturbance (18 m
3/h) within 42 s.
3.2.4. Two-Phase Flow Continuous Pressure Tracking Experiment
To evaluate the tracking capability of the automatic control system under conditions of continuously changing target pressure with simultaneous gas flow rate variations, Experiment E was conducted. The liquid flow rate was 16 m
3/h, the gas flow rate was adjusted multiple times within the range of 0–14 m
3/h (corresponding to gas void fractions of approximately 0–46.6%), and the target pressure varied continuously within the range of 0.1–0.4 MPa, while gas injection flow rate was adjusted simultaneously to simulate pressure disturbances caused by gas void fraction changes resulting from gas influx during managed pressure drilling. The experimental results are shown in
Figure 10 and
Table 8.
The automatic control system exhibited no overshoot throughout the entire continuous tracking process, with an average MAE of 0.004 MPa across the four phases. As shown in
Table 8, the MAE during the continuously changing target pressure phases (gas influx and gas discharge phases) was 0.003 MPa and 0.002 MPa, respectively, lower than the two constant pressure phases (0.006 MPa and 0.005 MPa). The reason is that during the constant pressure phases, multiple adjustments of gas flow rate constituted repeated disturbances to wellhead back pressure, while the choke valve opening degree was maintained near the fixed target value, and the system relied solely on the PID fine regulation phase to passively respond to disturbances. In contrast, during the continuously changing target pressure phases, the choke valve opening degree continuously followed the target opening degree adjustments, and the frequent intervention of the rapid opening degree adjustment phase enabled the system to respond more promptly to pressure deviations caused by gas flow rate changes. The operating conditions of Experiment E encompassed the dual effects of continuously changing target pressure and gas void fraction fluctuations, representing the conditions closest to actual managed pressure drilling field conditions among the five experiments, yet the MAE remained below 0.006 MPa.
3.3. Discussion
Section 3.1 has analyzed the sources of performance improvement of the improved DBO algorithm. The following discussion focuses on the performance of the dual-layer control architecture in the two-phase flow experiments.
The core of the dual-layer cooperative feedback control architecture lies in the rapid opening degree adjustment phase, which addresses the problems of sluggish regulation and susceptibility to overshoot of conventional PID in the large deviation interval. Experiment B shows that the settling time and overshoot of the conventional PID increase nonlinearly with the increase in target pressure change amplitude. This is because the cycle-by-cycle small incremental adjustment strategy requires multiple control cycles to approach the target opening degree in the large stroke interval, during which the integral term continuously accumulates, thereby triggering overshoot. In Experiment C, the opening degree controller rapidly adjusted the choke valve to near the target opening degree, enabling the PID controller to operate within the small deviation interval from the moment of intervention, with limited integral accumulation, effectively suppressing both settling time and overshoot.
The relationship between disturbance amplitude and recovery time exhibits directional asymmetry. For gas injection disturbances, increasing the step change amplitude from 12 to 18 m3/h (50%) caused Tac to rise from 24 to 42 s (75%), reflecting the disproportionately larger target opening degree change and the corresponding increase in regression model prediction error under higher gas flow rates. Conversely, for gas discharge disturbances, Tac decreased from 30 to 24 s under the same amplitude increase, likely because reducing gas content drives the flow toward single-phase liquid behavior with more predictable choke valve characteristics. This directional asymmetry indicates that the accuracy of the target opening degree regression model under varying flow conditions is a key factor governing the system’s disturbance recovery speed.
In Experiment E, the MAE during the continuously changing target pressure phases was lower than that during the constant pressure phases. The reason is that the rapid opening degree adjustment frequently intervened during the continuous change phases, enabling the system to respond more promptly to gas flow rate variations; whereas during the constant pressure phases, the choke valve opening degree was maintained near the fixed target value, and the system relied solely on PID fine regulation to passively compensate for pressure disturbances caused by gas flow rate fluctuations. This result suggests that in actual drilling operations during constant pressure control phases, if frequent gas disturbances are encountered, feedforward compensation based on flow rate signals could be considered to further improve control performance.
The experimental verification in this paper was completed in a laboratory simulation environment, which differs to some extent from actual drilling field conditions. This limitation is mainly reflected in two aspects: first, the wellhead back pressure range in the laboratory experiments (0–0.6 MPa) is lower than the actual field magnitude (typically 1–5 MPa and above). Under high-pressure conditions involving compressible formation gases such as methane, the transfer function parameter (
K,
T1,
T2,
δ) will require re-identification, although the second-order-with-delay model structure has been shown to remain applicable across varying pressure conditions [
15]; second, the PID parameters in this system remained fixed after simulation tuning, and experiments involving dynamic adjustment of PID parameters in response to gradually changing operating conditions have not yet been conducted. In addition, the adaptability of parameters such as the opening degree regression model and switching threshold under complex multiphase fluid conditions remains to be verified.