Path Tracking of Mining Vehicles Based on Nonlinear Model Predictive Control

Featured Application: This work is used for unmanned mining vehicles or articulated mobile robots. Abstract: Path tracking of mining vehicles plays a signiﬁcant role in reducing the working time of operators in the underground environment. Because the existing path tracking control of mining vehicles, based on model predictive control, is not very effective when the longitudinal velocity of the vehicle is above 2 m/s, we have devised a new controller based on nonlinear model predictive control. Then, we compare this new controller with the existing model predictive controller. In the results of our simulation, the tracking accuracy of our controller at the longitudinal velocity of 4 m/s is close to that of the existing model predictive controller, at the longitudinal velocity of 2 m/s. When longitudinal velocity is 4 m/s, the existing model predictive controller cannot drive the mining vehicle to track the given path, but our nonlinear model predictive controller can, and the maximum displacement error and heading error are 0.1382 m and 0.0589 rad, respectively. According to these results, we believe that this nonlinear model predictive controller can be used to improve the performance of the path tracking of mining vehicles.


Introduction
In the underground mining environment, ensuring the safety of operators is very important and difficult. Compared with traditional mining systems, automatic systems can reduce the working time of operators, and less working time can ensure better safety [1][2][3]. Automatic mining systems often include unmanned articulated vehicles, so path tracking, as a core part of unpiloted technology, plays an important role. The task of path tracking is to drive vehicles to track the given path [4][5][6].
Studies of the path tracking of articulated vehicles can also prove that the system constraint is not considered in control methods other than MPC. In the work of Dekker et al., the difference in the articulated angle speed between the actual vehicle and the model is clearly caused by system constraints [24]. Tan et al. did not give control variables in their paper [25]. In the work of Zhao et al., the articulated angle speed is also significantly larger than the limit of real vehicles [26]. In addition, Sasiadek et al. mentioned that not considering constraints is the weakness of their work [27]. Although there are hardware devices to prevent over-constraints in actual vehicles, frequent activation of such devices not only increases operating costs but may also cause danger. It is very advantageous to use MPC to solve this problem at the controller level.
However, there are few papers on path tracking of mining vehicles based on MPC due to the special articulated steering structure of mining vehicles. A mining vehicle is shown in Figure 1. Until now, only Nayl et al. have devised a path tracking controller for articulated vehicles based on switching-MPC [28][29][30]. There is no doubt that the work of Nayl et al. is groundbreaking, but there are still some problems with their controller.
For the MPC-based controller, the predicted error is one that the controller needs to eliminate in the future. Nayl et al. derives the prediction model based on an error model, thus future errors are predicted based on current errors and possible future inputs [28][29][30]. If the control input is assumed to be unchanged, after a sampling interval of this model, the predicted error is shown in Figure 2. When the curvature and heading of the given path are invariant, the longitudinal velocity of mining vehicles affects the reliability of predicted errors. When longitudinal velocity is slow, the reliability of predicted errors is high, as shown in Figure 2a. In contrary, when longitudinal velocity is fast, the reliability of predicted errors is low, as shown in Figure 2b. These characteristics make that Nayl et al.'s controller performs not good enough when the longitudinal velocity is fast. In Figure 2, e d f p is the predicted displacement error and e d f r is the actual future displacement error. Although there are hardware devices to prevent over-constraints in actual vehicles, frequent activation of such devices not only increases operating costs but may also cause danger. It is very advantageous to use MPC to solve this problem at the controller level. However, there are few papers on path tracking of mining vehicles based on MPC due to the special articulated steering structure of mining vehicles. A mining vehicle is shown in Figure 1. Until now, only Nayl et al. have devised a path tracking controller for articulated vehicles based on switching-MPC [28][29][30]. There is no doubt that the work of Nayl et al. is groundbreaking, but there are still some problems with their controller.
For the MPC-based controller, the predicted error is one that the controller needs to eliminate in the future. Nayl et al. derives the prediction model based on an error model, thus future errors are predicted based on current errors and possible future inputs [28][29][30]. If the control input is assumed to be unchanged, after a sampling interval of this model, the predicted error is shown in Figure 2. When the curvature and heading of the given path are invariant, the longitudinal velocity of mining vehicles affects the reliability of predicted errors. When longitudinal velocity is slow, the reliability of predicted errors is high, as shown in Figure 2a. In contrary, when longitudinal velocity is fast, the reliability of predicted errors is low, as shown in Figure 2b. These characteristics make that Nayl et al.'s controller performs not good enough when the longitudinal velocity is fast. In Figure 2, dfp e is the predicted displacement error and dfr e is the actual future displacement error.   Although there are hardware devices to prevent over-constraints in actual vehicles, frequent activation of such devices not only increases operating costs but may also cause danger. It is very advantageous to use MPC to solve this problem at the controller level. However, there are few papers on path tracking of mining vehicles based on MPC due to the special articulated steering structure of mining vehicles. A mining vehicle is shown in Figure 1. Until now, only Nayl et al. have devised a path tracking controller for articulated vehicles based on switching-MPC [28][29][30]. There is no doubt that the work of Nayl et al. is groundbreaking, but there are still some problems with their controller.
For the MPC-based controller, the predicted error is one that the controller needs to eliminate in the future. Nayl et al. derives the prediction model based on an error model, thus future errors are predicted based on current errors and possible future inputs [28][29][30]. If the control input is assumed to be unchanged, after a sampling interval of this model, the predicted error is shown in Figure 2. When the curvature and heading of the given path are invariant, the longitudinal velocity of mining vehicles affects the reliability of predicted errors. When longitudinal velocity is slow, the reliability of predicted errors is high, as shown in Figure 2a. In contrary, when longitudinal velocity is fast, the reliability of predicted errors is low, as shown in Figure 2b. These characteristics make that Nayl et al.'s controller performs not good enough when the longitudinal velocity is fast. In Figure 2, dfp e is the predicted displacement error and dfr e is the actual future displacement error.   By analyzing the researches about MPC, we find that the nonlinear model predictive control (NMPC) is more suitable to solve this problem [7][8][9][10][11][12][13][14][15][16]. Compared to the linear time-varying model predictive control (LTV-MPC) [7][8][9][10], the NMPC has a longer accurate prediction horizon [11][12][13][14][15][16]. Thus, an NMPC-based controller is designed and presented in this paper to improve the accuracy of the control system when the longitudinal velocity of mining vehicles is fast. The performance of this path tracking controller is verified by simulation, and a path tracking controller devised by Nayl et al. is taken as a comparison. In the results of our simulation, the maximum displacement error and maximum heading error of the path tracking system based on NMPC are 0.1382 m and 0.0589 rad, respectively. Besides, when above tracking accuracy is achieved, the longitudinal velocity of the NMPC controller is 4 m/s, and the switching-MPC controller can achieve similar tracking accuracy at only 2 m/s. Therefore, we believe that our work is significant to the unmanned driving of articulated vehicles.
The rest of this paper is arranged as follows. In Section 2, the NMPC-based path tracking controller of mining vehicles is introduced. Section 3 is a detailed presentation of the simulation results, and Section 4 is the conclusion of this paper.

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: By analyzing the researches about MPC, we find that the nonlinear model predictive control (NMPC) is more suitable to solve this problem [7][8][9][10][11][12][13][14][15][16]. Compared to the linear time-varying model predictive control (LTV-MPC) [7][8][9][10], the NMPC has a longer accurate prediction horizon [11][12][13][14][15][16]. Thus, an NMPC-based controller is designed and presented in this paper to improve the accuracy of the control system when the longitudinal velocity of mining vehicles is fast. The performance of this path tracking controller is verified by simulation, and a path tracking controller devised by Nayl et al. is taken as a comparison. In the results of our simulation, the maximum displacement error and maximum heading error of the path tracking system based on NMPC are 0.1382 m and 0.0589 rad, respectively. Besides, when above tracking accuracy is achieved, the longitudinal velocity of the NMPC controller is 4 m/s, and the switching-MPC controller can achieve similar tracking accuracy at only 2 m/s. Therefore, we believe that our work is significant to the unmanned driving of articulated vehicles.
The rest of this paper is arranged as follows. In Section 2, the NMPC-based path tracking controller of mining vehicles is introduced. Section 3 is a detailed presentation of the simulation results, and Section 4 is the conclusion of this paper.

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 ( ) , XY , the kinematic model of mining vehicles can be deduced from the following formulas: cos sin sin cos

Physical Meaning Front Body Rear Body
Axle center For mining vehicles, the pose of the front axle center P f is often used as the control target: .
The kinematic model of mining vehicles can be obtained by simultaneous formulas (1) and (2), which can be rewritten as a matrix: where w γ is the articulated angular speed. The kinematics model (3) can be abbreviated as: where: If the sampling interval T is small enough, the value of .
x changes are very small during this period. Thus: where x(i|t) is the i-th predicted state of mining vehicles at t, especially, x(0|t) is the current state. Bring (4) to (6): Then, all state information of mining vehicles in the prediction horizon can be obtained: u(0|t)) . . .
where N p is the prediction horizon and N c is the control horizon. Therefore, the errors between the future mining vehicle and the given path are: where x re f is the information on the given path.
In addition, in order to make the control as smooth as possible, the following items to the optimization goal are added: where u(t − 1) is the control input before a sampling interval and it is a known quantity.
Then, the optimization objective function is defined as: Therefore, rolling optimization is to solve the constrained optimization problem in every sampling period: min In the above equations, ρ is weight factor of relaxation factor ε, Q, and R are the weight matrices, v f min , v f max , w γmin , w γmax , and (γ min , γ max ) are the system constraints of the mining vehicle. These constraints are hard constraints. Since the mining vehicle usually travels at a slow longitudinal velocity, the large centrifugal force does not exist. Therefore, soft constraints, such as lateral acceleration, are not added.
The control inputs in the control horizon can be obtained by solving (12): The first element is the real control input of the path tracking system: These control inputs continue until the next sampling period.

Simulation
The simulation environment is MATLAB/Simulink 2018b, and (12) is solved by using the fmincon function in MATLAB. In order to simulate real-time performance, the desktop real-time module is also enabled. The processor used in the simulation is Intel(R) Core(TM) i5-8500. The simulation system includes a computer model of mining vehicles and the path tracking controller proposed in this paper. The parameters of the model are taken from a real mining vehicle, as shown in Table 2. Since the computer model outputs states directly, we omitted the positioning and sensing systems. (−0.14 rad/s, 0.14 rad/s) In the simulation system, the position error is decomposed into X-direction error and Y-direction error. In order to facilitate reading, e d is defined as displacement error, as shown in Figure 4. e h is heading error.

Simulation
The simulation environment is MATLAB/Simulink 2018b, and (12) is solved by using the fmincon function in MATLAB. In order to simulate real-time performance, the desktop real-time module is also enabled. The processor used in the simulation is Intel(R) Core(TM) i5-8500. The simulation system includes a computer model of mining vehicles and the path tracking controller proposed in this paper. The parameters of the model are taken from a real mining vehicle, as shown in Table 2. Since the computer model outputs states directly, we omitted the positioning and sensing systems. Range of w  (−0.14 rad/s, 0.14 rad/s) In the simulation system, the position error is decomposed into X -direction error and Ydirection error. In order to facilitate reading, d e is defined as displacement error, as shown in Figure   4. h e is heading error. Like the switching-MPC controller proposed by Nayl et al., the NMPC controller is a variable longitudinal velocity controller. However, in order to verify the hypothesis shown in Figure 2, simulations were divided into three groups according to three fixed longitudinal velocities. In each group of simulations, the performance of the NMPC path tracking controller was compared to that of the switching-MPC controller. In all simulations, the parameters of these two controllers were fixed, as shown in Table 3. Each group simulation had the same computer model of mining vehicles and the same given path. The given path consists of the straight line and arc, where the radius of the arc is 15 m. Like the switching-MPC controller proposed by Nayl et al., the NMPC controller is a variable longitudinal velocity controller. However, in order to verify the hypothesis shown in Figure 2, simulations were divided into three groups according to three fixed longitudinal velocities. In each group of simulations, the performance of the NMPC path tracking controller was compared to that of the switching-MPC controller. In all simulations, the parameters of these two controllers were fixed, as shown in Table 3. Each group simulation had the same computer model of mining vehicles and the same given path. The given path consists of the straight line and arc, where the radius of the arc is 15 m. 1 I is the unit matrix. The reason for setting Q = 0.01I is to consider that the default accuracy of fmincon is 10 −6 and the accuracy of path tracking is 10 −4 m. The ratio of Q to R is based on experience, and this ratio does not significantly affect the performance of the controller when it varies over a small range.

Longitudinal Velocity is 2 m/s
In this group of simulations, longitudinal velocity is slow. Figure 5 shows the trajectory. Both the NMPC controller and the switching-MPC controller can drive mining vehicles to track the given path.   Figure 6 presents the articulated angle. The maximum articulated angle is 0.3895 rad and 0.4038 rad in the NMPC control system and the switching-MPC control system, respectively. In contrast, the articulated angle of the NMPC controller changes more smoothly.  Figure 7 shows the articulated angle speed. The maximum articulated angle speed is 0.1085 rad/s and 0.1400 rad/s in the NMPC control system and the switching-MPC control system, respectively. The articulated angle speed of the NMPC controller changes smoothly, but this value of the switching-MPC is chattering.    Figure 9 shows the heading error. The maximum heading error is 0.0343 rad and 0.0429 rad in the NMPC control system and the switching-MPC control system, respectively. The maximum heading error of the NMPC controller is 20.05% smaller than that of the switching-MPC controller.

Longitudinal Velocity is 3 m/s
In this group of simulations, longitudinal velocity is faster than that of the first group simulation. Figure 11 shows the trajectory. Both the NMPC controller and the switching-MPC controller can drive mining vehicles to track the given path.  Figure 12 presents the articulated angle. The maximum articulated angle is 0.3940 rad and 0.5589 rad in the NMPC control system and the switching-MPC control system, respectively. The articulated angle of the NMPC controller changes more smoothly than that of the switching-MPC controller.  Figure 13 shows the articulated angle speed. The maximum articulated angle speed is 0.1379 rad/s and 0.1400 rad/s in the NMPC control system and the switching-MPC control system, respectively.  Figure 14 presents the displacement error. The maximum displacement error is 0.0874 m and 0.7217 m in the NMPC control system and the switching-MPC control system, respectively. The maximum displacement error of the NMPC controller is 87.88% smaller than that of the switching-MPC controller.  Figure 15 shows the heading error. The maximum heading error is 0.0461 rad and 0.1458 rad in the NMPC control system and the switching-MPC control system, respectively. The maximum heading error of the NMPC controller is 68.38% smaller than that of the switching-MPC controller.    Figure 17 shows the trajectory. The NMPC controller can drive the mining vehicle to track the given path, but the switching-MPC controller cannot. Figure 18 presents the articulated angle. The maximum articulated angle is 0.4177 rad and 0.6309 rad in the NMPC control system and the switching-MPC control system, respectively. Figure 19 shows the articulated angle speed. The maximum articulated angle speed is 0.1400 rad/s in both the NMPC control system and the switching-MPC control system. Figure 20 presents the displacement error. The maximum displacement error is 0.1382 m in the NMPC control system, while the displacement error of the switching-MPC controller is divergent. Figure 21 shows the heading error. The maximum heading error is 0.0461 rad in the NMPC control system while the heading error of the switching-MPC controller is divergent. Figure 22 presents the computation time. The maximum computation time is 0.0380 s and 0.0120 s in the NMPC control system and the switching-MPC control system, respectively. The maximum computation time of NMPC is less than the sampling interval.      It can be seen from the three groups of simulations that displacement error of the NMPC controller at the longitudinal velocity of 4 m/s is 0.0256 m, which is smaller than that of the switching-MPC controller at the longitudinal velocity of 2 m/s. At the same time, in this case, heading error of the NMPC controller is 0.0032 rad larger than that of the switching-MPC. Thus, the tracking accuracy of the NMPC controller at the longitudinal velocity of 4 m/s is similar to that of the switching-MPC at the longitudinal velocity of 2 m/s.

Conclusions
Path tracking of articulated vehicles is one of the key technologies for mining system automation, which can reduce operators' working time in the underground environment. For path tracking control methods, the researches of Nayl et al. prove that MPC is very useful. In order to improve the ability of mining vehicles to track complex given paths at 2 m/s or faster, we propose an NMPC-based path tracking control method for mining vehicles. By comparing the NMPC controller and the switching-MPC controller, we obtained the following conclusions.
Firstly, the NMPC controller allows mining vehicles to track the given path with less error at longitudinal velocities that are no more than 4 m/s. In the simulation presented in this paper, displacement error is not more than 0.1382 m, and heading error is not more than 0.0461 rad. Secondly, in the simulation presented in this paper, when the mining vehicle is traveling at the same longitudinal velocity, the displacement error of the NMPC controller is at least 70.70% smaller than that of the switching-MPC. Tracking accuracy of the NMPC controller is higher than that of the switching-MPC controller. Thirdly, tracking the accuracy of NMPC at the longitudinal velocity of 4 m/s is similar to that of switching-MPC at the longitudinal velocity of 2 m/s. On the basis of ensuring the same tracking accuracy, NMPC can improve the operating efficiency of mining vehicles better than switching-MPC. Besides, although NMPC is inferior to switching-MPC in real-time performance, the maximum computation time of NMPC is still less than the sampling interval. Therefore, the real-time performance of the NMPC controller can meet the requirements of path tracking.
From the perspective of science, we make the following contributions. On one hand, although NMPC has been proposed very early, its application in path tracking, especially path tracking of articulated vehicles, is not mature. The application of NMPC has not been found before in path tracking of articulated vehicles. Thus, our work is the application of NMPC in a new field. On the other hand, articulated vehicles have different motion characteristics relative to other vehicles, so the control strategies of other vehicles are difficult to use for articulated vehicles directly. In this respect, our work provides a new solution for the automation of articulated vehicles. Furthermore, though it is known that NMPC outperforms linearized MPC in some areas, what are its advantages in path tracking, especially in the path tracking of articulated vehicles? Our work is a satisfactory answer to this question.
In the future, we will focus on the longitudinal velocity control of the articulated vehicle in path tracking. The switching-MPC controller and our NMPC controller can only work at different longitudinal velocities, and they do not automatically adjust the longitudinal velocity within a large range. We also hope to add a dynamic model of the articulated vehicle in future work.