## 2 Controller Design  
The two most critical steps during designing a path tracking controller for mining vehicles based on NMPC are establishing a prediction model and designing a rolling optimization function. In order to obtain the error between future mining vehicles and the given path, the prediction model should predict the future vehicle pose based on the current vehicle pose and future control inputs. This model can be designed based on a kinematics model because there is some research showing that the kinematics model can simulate movement characteristics of mining vehicles [3; 28; 29; 30; 31; 32; 33; 34]. In this kinematics model, bodies of the mining vehicle are considered as the rigid body, and the force analysis of tires is ignored. Figure 3 shows the kinematics of mining vehicles. Table 1 shows the physical meaning of the parameters. At the articulated point, the velocity of the front body is the same as that of the rear body. Therefore, in the fixed coordinate system \((X,Y)\), the kinematic model of mining vehicles can be deduced from the following formulas:  
\[\left\{ \begin{array}{c}v_{f}=v_{r}\cos\gamma+\dot{\theta}_{r}L_{r}\sin\gamma \\ \dot{\theta}_{f}L_{f}=v_{r}\sin\gamma-\dot{\theta}_{r}L_{r}\cos\gamma\\ \gamma=\theta_{f}-\theta_{r}\end{array} \right. \tag{1}\]  
Figure 3: Model of articulated vehicle. For mining vehicles, the pose of the front axle center \(P_{f}\) is often used as the control target:  
\[\left\{ \begin{array}{l}\dot{x}_{f}=v_{f}\cos\theta_{f}\\ \dot{y}_{f}=v_{f}\sin\theta_{f}\end{array} \right. \tag{2}\]  
The kinematic model of mining vehicles can be obtained by simultaneous formulas (1) and (2), which can be rewritten as a matrix:  
\[\left[ \begin{array}{l}\dot{x}_{f}\\ \dot{y}_{f}\\ \dot{\theta}_{f}\\ \dot{\gamma}\end{array} \right]=\left[ \begin{array}{c}\cos\theta_{f}\\ \sin\theta_{f}\\ \frac{\sin\gamma}{L_{f}\cos\gamma+L_{\sigma}}\\ 0\end{array} \right]v_{f}+\left[ \begin{array}{c}0\\ 0\\ \frac{L_{\tau}}{L_{f}\cos\gamma+L_{\tau}}\\ 1\end{array} \right]w_{\gamma} \tag{3}\]  
where \(w_{\gamma}\) is the articulated angular speed. The kinematics model (3) can be abbreviated as:  
\[\dot{\mathbf{x}}=f(\mathbf{x},\mathbf{u}) \tag{4}\]  
where:  
\[\left\{ \begin{array}{l}\mathbf{x}=\left[\begin{array}{ccc}x_{f}&y_{f}&\theta _{f}&\gamma\end{array}\right]^{T}\\ \mathbf{u}=\left[\begin{array}{cc}v_{f}&w_{\gamma}\end{array}\right]^{T} \end{array} \right. \tag{5}\]  
If the sampling interval \(T\) is small enough, the value of \(\dot{\mathbf{x}}\) changes are very small during this period. Thus:  
\[\mathbf{x}(i+1|t)=\mathbf{x}(i|t)+T\dot{\mathbf{x}}(i|t) \tag{6}\]  
where \(\mathbf{x}(i|t)\) is the \(i\)-th predicted state of mining vehicles at \(t\), especially, \(\mathbf{x}(0|t)\) is the current state. Bring (4) to (6):  
\[\mathbf{x}(i+1|t)=\mathbf{x}(i|t)+Tf(\mathbf{x}(i|t),\mathbf{u}(i|t)) \tag{7}\]  
Then, all state information of mining vehicles in the prediction horizon can be obtained:  
\[ \begin{array}{lcl}\mathbf{x}(1|t)&=&\mathbf{x}(0|t)+Tf(\mathbf{x}(0|t), \mathbf{u}(0|t))\\ &\vdots\\ \mathbf{x}(i|t)&=&\mathbf{x}(i-1|t)+Tf(\mathbf{x}(i-1|t),\mathbf{u}(i-1|t))\\ &\vdots\\ \mathbf{x}(N_{c}+1|t)&=&\mathbf{x}(N_{c}|t)+Tf(\mathbf{x}(N_{c}|t),\mathbf{u }(N_{c}|t))\\ &\vdots\\ \mathbf{x}\big{(}N_{p}\big{|}t\big{)}&=&\mathbf{x}\big{(}N_{p}-1\big{|}t\big{)} +Tf\big{(}\mathbf{x}\big{(}N_{p}-1\big{|}t\big{)},\mathbf{u}(N_{c}|t)\big{)} \end{array}  \tag{8}\]  
where \(N_{p}\) is the prediction horizon and \(N_{c}\) is the control horizon. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Physical Meaning** & **Front Body** & **Rear Body** \\ \hline Axle center & \(P_{f}\Big{(}X_{f},Y_{f}\Big{)}\) & \(P_{r}(X_{r},Y_{r})\) \\ Length & \(L_{f}\) & \(L_{r}\) \\ Velocity & \(v_{f}\) & \(v_{r}\) \\ Heading & \(\theta_{f}\) & \(\theta_{r}\) \\ Radius & \(R_{f}\) & \(R_{r}\) \\ Articulated point & \(o\) \\ Steering center & \(O_{c}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The physical meaning of parameters.