# A Simulation Study on Pressure Control in Oil Well Drilling Using Gain-Scheduled PID Controllers
## 3 Design of PID Parameters  
The objective of this chapter is to determine the PID parameters for different operational points, which in this case correspond to drilling depths of 500, 1000, 2000, 3000, 4000, and 5000 m. To create the table with the parameters, it was necessary to find the optimal tuning. One of the most commonly used controllers in the industry for managing unstable processes (such as integrative ones) is the IMC controller. Internal Model Control,  
Figure 2: Response of output signal for different operational points. introduced by [28], features a tuning parameter related to the closed-loop response time, allowing the direct assessment of the benefits of dead time compensation. This approach offers a suitable structure that simplifies PID controller tuning, thereby enhancing the performance and robustness of the desired system [29]. In [30], a study is presented that develops an analytical method for tuning PID parameters in integrative processes with time delay based on [31], using an optimization method to determine the PID parameters that ensure greater robustness and system performance. The main difference between [PERSON] and [PERSON]'s method and the traditional IMC method is the incorporation of a filter in the input signal in the feedback loop. The structure of the feedback filter is defined according to Equation (18). \[f(s)=\frac{b^{2}s^{2}+cs+1}{\left(\lambda s+1\right)^{2}\left(\beta s+1\right)} \tag{18}\]  
where \(b=\left(2T\beta\lambda+cLT-\beta\lambda^{2}+\lambda^{2}T\right)/(T+L)\) and \(c=2\lambda+\beta+L\); the constants \(\lambda\) and \(\beta\) are the filter parameters that were determined through optimization in the study. The controller achieves the desired performance for both transient response and disturbance rejection simultaneously, using two-degrees-of-freedom control, as shown in Figure 3. \(F(s)\) is an additional filter called a set-point or reference filter, due to its location in the feedback control system, which improves transient response behavior. The procedures are formulated as an optimization problem, where parameters are obtained by minimizing the performance index of load disturbance rejection represented by the integral absolute error, denoted by IAE-d [32]. Furthermore, a good controller should provide the desired level of robustness, with robustness measured by the maximum sensitivity function \(M\)s, formulated as a constraint [33]. Although the optimization method employed may be complex, analytical tuning rules were provided for both the controller and the set-point filter (19). \[F(s)=\frac{(\lambda s+1)(\beta s+1)}{b^{2}s^{2}+cs+1} \tag{19}\]  
The first-order integrative model with time delay is represented as shown in Equation (20). \[\overline{G}(s)=\frac{K}{s(\tau s+1)}e^{-\theta s} \tag{20}\]  
Figure 3: Block diagram of IMC structure for bit pressure control in drilling systems. Using \(\alpha=L/(L+T)\) and the transformation \(\delta=(L+T)s\), the first-order integrating model plus time delay is represented as shown in Equation (21). \[\overline{G}(s)=\frac{K^{\prime}}{\delta[(1-\alpha)\delta+1]}e^{-\alpha\delta} \tag{21}\]  
where \(K^{\prime}=K(L+T)\). The method in [31] uses Equation (38) as the model for controller design, with \(\alpha\) ranging from 0.01 to 1. The relationship between \(\lambda\) and \(\beta\) is represented by Equation (22). \[\varepsilon=\frac{\beta}{\lambda}= \begin{cases}\hskip 28.452756 pt1,\;0.01\leq \alpha\leq 0.35\\ \hskip 28.452756 pt-0.06(\alpha-1),\;0.35<\alpha\leq 1\end{cases}  \tag{22}\]  
Figure 4 was used to determine the PID parameters based on the system's robustness (\(M\)s) and the parameter \(\alpha\). The presence of time delay in Equation (20) significantly impacts the stability of the system. Time delay introduces a phase lag in the system response, which can lead to reduced performance or instability if not adequately compensated.