# A Simulation Study on Pressure Control in Oil Well Drilling Using Gain-Scheduled PID Controllers
###### Abstract
The integration of digital and automation technologies is emerging as a key component in the oil and gas industry, enabling improved operational efficiency and reducing risks associated with drilling. Digitalization has driven the adoption of technologies such as artificial intelligence, the Internet of Things (IoT), and process automation, which are transforming the way operations are managed on offshore platforms. These advancements are essential for achieving sustainability goals and improving safety in operations, aligning with the energy transition toward a net-zero future by 2050 [8]. Despite these advances, there is a clear gap in the literature regarding the integration of PID controllers adjusted by Gain Scheduling (GS) to handle the complexity of nonlinear systems in drilling at different operational depths [9]. While PID controllers are known for their simplicity and effectiveness in many industrial systems, their application in systems with nonlinear behavior, such as drilling wells, presents significant challenges due to the lack of dynamic adaptation to the variable conditions of the process. By applying GS, the PID gains are adjusted in real time according to operating conditions, providing a more manageable and less costly solution to tackle the system's complexity and improve the maneuverability and stability of the drilling process [10]. In the context of BHP control, initial studies such as [PERSON] (2006) developed mathematical models that describe the drilling process and bottom-hole pressure based on surface measurements. These models allow the representation of the drilling system considering the fluid movement within the drill string [11]. Various authors have used this approach to design controllers and test them through simulations of typical problems in drilling, such as circulation losses, power failures, and influxes [12]. The proposed Gain-Scheduled PID control method introduces significant improvements in stability and robustness for oil well drilling systems compared to traditional control strategies. Unlike conventional PID controllers, which require manual tuning, the Gain-Scheduled approach automatically adapts to varying drilling depths, ensuring consistent performance. Additionally, this method outperforms Model Reference Adaptive Control (MRAC) by providing enhanced stability at deeper operational points while maintaining ease of implementation and computational efficiency. These advantages position the proposed method as a practical and innovative solution to address the challenges of nonlinear system dynamics in drilling operations. However, due to the inherent complexity of the problem and the need to control pressure at different operational points, such as various drilling depths, specific adjustments of control parameters are required [13]. To tackle this challenge, an Internal Model Control (IMC) strategy with two degrees of freedom is proposed for tuning and specifying PID parameters. In parallel, the behavior of these parameters was evaluated through simulations using the Gain-Scheduled (GS) method in Simulink/Matlab. Additionally, an Adaptive Controller based on a reference model was implemented to analyze system responses and compare the results obtained. This comparative analysis aimed to identify the methodology that offers superior performance in terms of stability, robustness, ease of implementation, and programming. The remainder of this paper is organized as follows: Section 2 presents the mathematical modeling of the drilling system, including nonlinear equations, linearization, and the Laplace representation. Section 3 details the design of the PID controller parameters using the IMC methodology and their application across various depths. Section 4 discusses the implementation and comparison of two adaptive controllers: the Gain-Scheduled PID and Model Reference Adaptive Control (MRAC). This section also includes the simulation results for different operational scenarios.