# A Simulation Study on Pressure Control in Oil Well Drilling Using Gain-Scheduled PID Controllers
## 2 Wellbore Pressure Model
### Implementation of the Process Model  
To implement the process model, it was essential to have the well and reservoir parameters, which were then integrated into the model. Studies conducted by [20; 21; 22; 23; 24; 25; 26; 27] collected data from well and reservoir sections at various depths. Table 1 presents the specifications that remain across all laboratory operating points. Values for diameter and area are added to the table for the drill string and annular regions (\(d_{d}\), \(d_{a}\), \(A_{d}\), and \(A_{a}\)), while Table 2 details parameters that vary with depth, thereby altering the process model. These values were calculated following a linear trend based on the parameters reported by the aforementioned authors.  
The data from Tables 1 and 2 were integrated into Equations (12)-(15). The state equation could be represented using the Laplace transform in Equation (16). Subsequently, the process model had to be adapted to a predefined structure compatible with IMC-type control, which will be explained in the next chapter. The structure was configured in  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameters** & **Value** & **Units** \\ \hline \(\beta_{a}\) & 7000 & [Bar] \\ \(\beta_{d}\) & 11,000 & [Bar] \\ \(\rho_{a}\) & 0.0119 & \(10^{-5}\) [kg/m\({}^{3}\)] \\ \(\rho_{d}\) & 0.0125 & \(10^{-5}\) [kg/m\({}^{3}\)] \\ \(q_{r}\) & 0.001 & [m\({}^{3}\)/s] \\ \(q_{b}\) & 0.015 & [m\({}^{3}\)/s] \\ \(d_{a}\) & 0.134 & [m] \\ \(d_{d}\) & 0.151 & [m] \\ \(A_{a}\) & 0.0481 & [m\({}^{2}\)] \\ \(A_{d}\) & 0.0141 & [m\({}^{2}\)] \\ \hline \hline \end{tabular}
\end{table}
Table 1: Fixed parameters used in the modeling of the drilling system [20; 22; 24; 26].  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Depth [m]** & **500** & **1000** & **2000** & **3000** & **4000** & **5000** \\ \hline \(V_{a}\) [m\({}^{3}\)] & 24.07 & 48.14 & 96.29 & 144.43 & 192.58 & 240.72 \\ \(V_{d}\) [m\({}^{3}\)] & 7.05 & 14.10 & 28.21 & 42.31 & 56.41 & 70.51 \\ \(M_{4}\) [\(10^{-5}\) kg/m\({}^{4}\)] & 399.2 & 798.4 & 1596.7 & 2395.1 & 3193.5 & 3991.9 \\ \(M_{d}\) [\(10^{-5}\) kg/m\({}^{4}\)] & 1431.5 & 2862.9 & 5725.9 & 8588.8 & 11,452 & 14,315 \\ \(F_{a}\) [\(10^{-5}\) m\({}^{7}\)/kg] & 3942.7 & 7885.3 & 15,771 & 23,656 & 31,541 & 39,427 \\ \(F_{d}\) [\(10^{-5}\) m\({}^{7}\)/kg] & 44,194 & 88,388 & 176,780 & 265,160 & 353,550 & 441,940 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Depth-dependent parameters for drilling system modeling [21; 23; 25; 26; 27].  
Simulink using the data from Tables 1 and 2, and simulations were conducted using the Dormand-Prince algorithm with a sampling rate of 0.01 s. Once the process was set up, the function u(t) was excited with a step function. The response to this excitation was fitted to Equation (17) using the Curve Fitting tool in Matlab R2020a, achieving a coefficient of determination of 0.99.  
Figure 2 shows the unstable response (due to the integrator term) across different operational points. It can be observed that, as the drilling depth increases, the slope of the trend decreases. This indicates that at shallower depths, the process is more sensitive to the control \(u(t)\); in other words, pressure variation occurs more rapidly at shallower depths with a given action of the control valve. The results exhibit a trend similar to that observed experimentally in [21].