## 2 Upper-Level Controller
### Predictive Model  
A central part of model-predictive control is to have an accurate as well as computationally efficient system model. Therefore, the choice of using a kinematic model versus a dynamic model must take into account the desired balance between prediction accuracy and computational efficiency. When used as a prediction model, a kinematic model can calculate future states at a faster speed, which can improve the overall computation efficiency of the controller. However, when the vehicle speed is high, the prediction results may be inaccurate. On the other hand, a dynamic model used as a prediction model can produce more accurate prediction results. However, this would increase the computation time of the controller, and require additional input parameters, such as the vehicle's acceleration and slip angle. These parameters are crucial in vehicle path tracking, but some of them cannot be directly measured by sensors, such as the slip angle. For example, [PERSON] proposed a novel kinematic-model-based method for estimating vehicle slip angle (VSA) by combining information from GNSS and IMU to reduce the computation time and error of slip angle [25]. All these factors need to be considered when selecting a prediction model.  
Figure 1: Diagram of the NMPC path tracking process.  
For underground mining operations, due to the width of the tunnel, road conditions, and safety reasons, vehicles are operated at low speeds, generally not more than 5 m/s. In this speed range, the kinematic model of the articulated vehicle can predict the future state with relative accuracy while ensuring real-time computational speed. Therefore, the nonlinear kinematic model of the articulated vehicle is used as the prediction model.  
The kinematic model is depicted in the global coordinate \(\mathrm{G}(X,~{}Y)\), as shown in Figure 2. The front axle center is chosen as the vehicle state reference point. The derivation of the kinematic model of the articulated vehicle is given in the [19; 26]. The vehicle's nonlinear state-space system can be expressed as a matrix form:  
\[\begin{bmatrix}\dot{x}\\ \dot{y}\\ \dot{\theta}\\ \dot{\gamma}\end{bmatrix}=\begin{bmatrix}\cos\theta&0\\ \sin\theta&0\\ \sin\gamma&\frac{L_{\mathrm{r}}}{L_{\mathrm{f}}\cos\gamma+L_{\mathrm{r}}}\\ 0&1\end{bmatrix}\begin{bmatrix}v\\ \omega\end{bmatrix} \tag{1}\]  
where \(\begin{bmatrix}x&y&\theta&\gamma\end{bmatrix}^{T}\) represents the vehicle's state, \(x\) and \(y\) are the vehicle's coordinate position, \(\theta\) represents the heading angle, \(\gamma\) is the articulated angle between the front and rear bodies, \(\begin{bmatrix}v&\omega\end{bmatrix}^{T}\) represent vehicle's control inputs, \(v\) is the longitudinal speed, \(\omega\) is the steering rate between two bodies, and \(L_{\mathrm{f}}\) and \(L_{\mathrm{r}}\) represent distances from the front and rear axle centers to the articulation point, respectively.  
Assuming \(\chi=\begin{bmatrix}x&y&\theta&\gamma\end{bmatrix}^{T}\) and \(u=\begin{bmatrix}v&\omega\end{bmatrix}^{T}\), the system kinematics can be simply expressed as  
\[\dot{\chi}=\mathrm{f}(\chi,u) \tag{2}\]  
In order to achieve the implementation of NMPC on a computer, the continuous nonlinear system is discretized using the Euler integrator:  
\[\chi(k+1)=\chi(k)+T\mathrm{f}(\chi(k),\Delta u(k)) \tag{3}\]  
\[u(k)=u(k-1)+\Delta u(k) \tag{4}\]  
where \(T\) is the time step of the discretization. \(\Delta u(k)\) is control inputs' increment. Its introduction ensures that it remains within constraints during the solving process.