# A Simulation Study on Pressure Control in Oil Well Drilling Using Gain-Scheduled PID Controllers
## 4 Results
### GS Controller and MRAC: Simulation
#### 4.3.4 Mud Loss  
The problems of mud loss and fluid circulation loss, respectively, are also presented. Figure 8 shows the simulation of these disturbances by changing the direction of the flow from the well to the reservoir. A negative ramp function was used in the reservoir flow variable (\(q_{r}\)) during the range of 40 to 80 s, starting with 0.02 to 0.001 m\({}^{3}\)/s [40]. In this situation, circulation loss can vary between values lower than zero and can occur in shorter time intervals, but for the purpose of better illustrating the system response when the two controllers act, an interval of 40 s was adopted. It could be seen in these simulations that the system pressure had already reached the desired pressure (190 bar). The system was simulated and the responses for the GS and MRAC controllers, as already specified, were obtained. The response behavior related to the controller performances during mud loss  
Figure 11: Kick simulation for different depths. (**a**) 500 m, (**b**) 1000 m, (**c**) 2000 m, (**d**) 3000 m, (**e**) 4000 m, and (**f**) 5000 m.  
and for different drilling depths (500, 1000, 2000, 3000, 4000, and 5000 m) was evaluated. The system responses related to mud loss problems are illustrated, as shown in Figure 12.  
The evaluation of the GS controller for reference tracking highlights the good response performance at all drilling depths. It also shows a settling time of approximately 18 s. Regarding the MRAC controller, the system response performance was quite unstable, which became more evident as the depth increased. This was mainly due to the fact that the MRAC adaptive control structure has the capacity to handle constant and variable parameters, such as those related to a process, as well as sudden changes or disturbances that occur during operation [37]. However, there is a parameter in the control structure that multiplies the minimum error derivative, which creates instabilities in the response.  
Establishing adaptive tuning methods for PID parameters has been widely studied in different industrial applications ranging from Model Reference Adaptive Control (MRAC) and Fuzzy Logic Control (FLC) [41] to optimization-based methods such as Particle Swarm Optimization (PSO) [10] and Genetic Algorithms (GAs) [37]. All these methods have  
Figure 12: Mud loss simulation for different depths. (a) 500 m, (b) 1000 m, (c) 2000 m, (d) 3000 m, (e) 4000 m, and (f) 5000 m.  
unique advantages but also come with limitations, depending on the nature of the system in question.  
The Gain-Scheduled (GS) PID control proposed in this study is recognized for its simplicity and practicality. In this regard, MRAC is primarily concerned with Lyapunov-based adaptations and subsequently suffers from instabilities at large depths as it is very sensitive to parameter changes, while the GS method offers a much more stable path by preselecting PID parameters for particularly specified operating conditions. Much like Fuzzy Logic Control, GS has an edge over nonlinearities in that it requires simple rule-based systems that are computationally expensive compared to the lightweight implementation of the GS method.  
Optimization-based methods, such as PSO and GA, can give rise to optimal PID parameters; however, their complexity and the time they might take inhibit their use in real-time implementations for dynamic workings, such as oil well drilling. On the other hand, the Gain-Scheduled method adjusts the PID parameters with just enough overhead for use in a real industrial scenario where cost-effectiveness is of paramount importance.  
The simulation results presented in this study provide further proof that the GS PID controller outperforms the MRAC controller regarding stability and robustness, particularly at larger depths, at which adaptive controllers find it tough to manage nonlinearities. These features indicate that the GS method would work as an economically viable and actively available alternative for adaptive PID tuning in drilling operations.