Abstract
Trajectory tracking for autonomous vehicles is usually solved by designing control laws that make the vehicles track predetermined feasible trajectories based on the trajectory error. This type of approach suffers from the drawback that usually the vehicle dynamics exhibits complex nonlinear terms and significant uncertainties. Toward solving this problem, this work proposes a novel approach in trajectory tracking control for nonholonomic mobile robots. We use a nonlinear model predictive controller to track a given trajectory. The novelty is introduced by using a set of modifications in the robot model, cost function, and optimizer aiming to minimize the steady-state error rapidly. Results of simulations and experiments with real robots are presented and discussed verifying and validating the applicability of the proposed approach in nonholonomic mobile robots.
Keywords
Introduction
This article proposes a nonlinear model predictive controller. approach to solve the trajectory tracking problem (TTP) of a nonholonomic wheeled mobile robot. One of the first surveys dealing with the nonholonomic control problems is provided by Kolmanovsky and McClamroch. 1 In the survey, the authors mention two problems (motion planning control systems and feedback stabilization) and point out three other important issues: models of nonholonomic control systems, new control approaches for motion planning of nonholonomic systems and stabilization of these new approaches. Nonetheless, new approaches in optimal control arise after that. 2,3 One of these introduced approaches is the model predictive control (MPC). The MPC problem has its origin in the late 1970s and has being developed considerably since then. 4 According to Findeisen and Allgöwer, 5 the MPC problem is formulated as solving, online, a finite horizon open loop optimal control problem subject to system dynamics and constraints involving states and controls.
TTPs for autonomous vehicles are usually solved by designing control laws that make the vehicles track predetermined feasible trajectories by way of minimizing the trajectory error that is the difference between the robot pose and the trajectory coordinates. 6 However, this approach suffers from the drawback that usually the vehicle dynamics exhibit complex nonlinear terms and significant uncertainties, specially when nonholonomicity is present. The controller attempts to make the outputs catch up with the time-parameterized desired outputs. This may lead to closed loop performance difficulties and too large control signals. 7 In contrast, one can argue that we can counter this problem by more complex modeling in classic NMPC or by using robust NMPC. More complex modeling brings up the increase in computational cost 8 while robust approaches usually use learning-based approaches either increases the computational cost or need a off-line training phase. 9 Some works on nonlinear path following control in robotics have been proposed 10 –13 using other approaches. To deal with the above difficulties, here we propose a nonlinear model predictive control (NMPC) to solve the TTP and increase the controller accuracy by considering each position of the given global path as a position of a virtual target to be pursued. This has led us to modify the classic NMPC controller applied to the TTP.
Therefore, our main contribution is to propose a NMPC that uses a modified cost function to minimize the distance between the robot pose and the given global trajectory coordinate, and minimize the difference between the robot orientation and the orientation acquired from the vector of the distance between the robot pose and the reference coordinate, instead of tracking the error in the robot’s pose regarding the predicted coordinates given by the path generator subblock. These modifications can be observed in Figure 1, which will be detailed furthermore. As a consequence, we do not use a path generator subblock for the prediction horizon in the NMPC. As a result, it increases the nonlinearity of the system. To maintain the stabilization of the steady state of the system, we use the 1-norm in the control effort term of the modified cost function. To better handle these nonlinearities, we use the Resilient Propagation (RPROP) algorithm to minimize the cost function. 14 With all of these modifications, our proposal is able to perform the control in a desirable way. Some recent approaches also use the concept of a virtual leader. 15,16 Although they differ from our approach in numerous parts, it is interesting to note that they confirm that approaches not error dependent are beginning to become more studied due to its better results with respect to classical NMPC.

Classical NMPC approach (left) and our approach (right).
Classic nonlinear model predictive controller for trajectory tracking
Many researchers have used NMPC to solve the trajectory tracking control problem of nonholonomic mobile robots.
17
–19
The NMPC’s ability to enable a robot to track a trajectory is due to the fact that the cost functions used by the controller minimize a deviation of the predicted behavior of the robot. The minimization by the optimizer and the predicted behavior are the main blocks of the MPC theory. When applied to solve the trajectory tracking control problem, the NMPC usually is divided into three subblocks: Path generator: This subblock receives the global trajectory calculated by a trajectory generator and creates a reference signal to be followed by the controller in a given prediction horizon; Optimizer: This subblock uses an online numeric minimization method to optimize the cost function and generate the optimal inputs; MPC usually uses the gradient descent algorithm when applied to mobile robotics; and Predictor: The predictor computes the predicted state evolution of the robot itself; it uses a simplified robot model to emulate the robot’s evolution and calculate the final value of the cost function.
Since linear (and even successively linearized or time-variant) MPC is not feasible for this mechanical benchmark problem (as linearizing around any fixed point is not controllable and the assumptions for guaranteed stability do not hold), the potential of nonlinear model predictive control (NMPC) techniques is investigated over the years. 20,21 In contrast, NMPC implementations demonstrated that the expense and reliability of the nonconvex optimization causes problems, causing the tuning process of the controller parameters to be decisive. In general, terminal state constraints are required to guarantee asymptotic stability. 22
Regarding the optimizer subblock, the work of Vougioukas
23
presents a nonlinear model predictive controller for mobile robots. The basic idea is to use a motion model for the vehicle and compute in real time an optimal
To overcome the online optimization issue and to ensure asymptotic convergence of the tracking error, Hedjar et al. 25 used Taylor series approximation in the prediction model. As the years have passed, computational power increased and several researches performed experiments with more complex robot models such as car trailer. 26,27 Recently, obstacle avoidance has also being a topic of research in nonlinear MPC with nonholonomic robots or omnidirectional robots. 7,26,28
When analyzing the predictor subblock, a simple prediction model means less computational cost and less precision in prediction. According to Figure 1, the relevant variables for the kinematic model of a typical two-wheel differential mobile robot are its center position coordinates (
and
Finally, we can perceive the error states (
where a desired reference trajectory is defined by a reference state vector
Now, we need to explicit the relation between linear and angular velocities (
By combining equations (1) and (4), we can obtain a model that expresses the robot’s coordinates and orientation in terms of the angular velocity output by its wheels, as can be seen in equation (5), where
Also, equation (4) can be easily manipulated to show the direct relation between the control input (the linear and angular velocities corresponding to the desired trajectory) and the output (the right and left wheels’ angular velocities). This is shown in equation (6)
In most cases, specially in simulations, the kinematic model of the robot used in the predictor is sufficient to maintain a small tracking error by the MPC/NMPC. Nevertheless, in real robot systems, this model does not suffice. Dead zone, saturation, friction, slippery, uncertainties arisen from parameter variations or from neglected dynamics, and nonholonomicity are examples of nonlinearities that are difficult to model and when it can be modeled, it increases the computational cost of the predictive controller. 30
One way to perform such prediction with high precision and low computational cost is by using neural models such as neural networks. 31 The article by Gomez-Ortega and Camacho 32 presented a way of implementing a MPC for mobile robot path tracking using a nonlinear model of mobile robot dynamics and thus allows an accurate prediction of the future trajectories. In 2007, Conceição et al. 33 presented a nonlinear model-based predictive controller (NMPC) for trajectory tracking of a mobile robot. Methods of numerical optimization to perform real-time nonlinear minimization of the cost function were used and the cost function penalized the robot position error, the robot orientation angle error, and the control effort. Their approach was then improved considering friction in the dynamic model for friction compensation. 34
Finally, in recent researches, stabilization of nonholonomic systems has been studied. 21 One of the last NMPC works discussed on providing optimization-based solutions to the state estimation and tracking control problems in mobile robotics, specially in nonholonomic robotic systems. The work by Jayasiri et al. 35 proposed to solve the estimation problem by using moving horizon estimation approach while using a nonlinear model predictive control (NMPC) for solving the tracking control problem.
In all above-mentioned works, a NMPC’s cost function, when applied to the trajectory tracking of a differential mobile robot, is such as follows
where
This cost function of the NMPC represents the cost to be minimized by the predictive controller. It is typically associated with the dynamical change of the system over time. When applied to minimizing the error in the TTP of mobile robots, this cost function is usually minimized by a classical gradient descent optimization method. In the TTP, the cost function must penalize the difference between the pose of the robot and the pose of reference given by the trajectory generator. Additionally, the cost function has a term that penalizes the control effort. Each of the penalization is associated with a weight that defines the proportion of penalization on the global value of the cost function.
As above mentioned, classical methods 7,17,18,25,28,29 usually use a path generator block to create a path within the prediction horizon. This approach creates a need for the correct modeling of the generated path. In contrast, our approach does not need this block. Furthermore, the cost function we propose is not formulated in the quadratic form but using the 1-norm. This approach increases the nonlinearity of the controller, which in turn can handle the nonlinearities present on the controlled system. 4
A novel nonlinear model predictive controller approach
We now present an approach for nonlinear model predictive control when applied to nonholonomic trajectory tracking of mobile robots. The proposed control approach can achieve better results in trajectory tracking control of mobile robots than classical control approaches. We assume that each position and velocity given by the trajectory generator is the state of a virtual target to be tracked. In turn, it generates a set of modifications on the NMPC classical approach that improves it in such fashion that it increases the controller’s accuracy and the controller’s nonlinearities, that is, we can apply the same cost function weights in different types of trajectory with low steady-state error without the need of retuning the controller gains. With this assumption, we can track the desired coordinates penalizing undesired behaviors.
As above observed, the classical NMPC approach
29,36
has a subblock to generate a path from the robot’s current point to the Optimizer: We use here the RPROP algorithm by Riedmiller and Braun
14
; Predictor: Kinematic robot model and modified cost function.
Figure 2 illustrates the structure of the proposed NMPC uses, where

Controller diagram.
After receiving the states of the robot and the virtual target, the controller’s optimizer subblock provides the control input
The model
As mentioned above, we need to change the prediction model in order to take the global trajectory given positions and velocities as if they were the positions and velocities of a virtual leader to be followed. Therefore, we start our model by using the same equations from the classic prediction model seen in equations (1) to (6), except for equation (3).
The nonholonomic mobile robot model used in the predictor is a nonlinear simplified model that, when properly parameterized, is advantageous in order to reduce the computational load of each cycle of the control algorithm. The model is initialized with motor velocity limitation by detecting saturation and proportionally scaling the other motors velocities that can be seen as an input constraint.
33
The robot state (
and the simulation of the state evolution (
with
Taking into account the presented elements, the position
where
and
and where
The predicted position of the target relative to the robot in an instant
where
The unit vector that indicates the direction of the target with respect to the robot is defined as follows
where || ⋅ || represents the Euclidean norm and
Finally, the bearing of the “virtual target” with respect to the robot is defined as follows
where arctan2(
The optimization algorithm
RPROP is a learning scheme that performs a direct adaptation of the weight step based on local gradient information. RPROP is one of the fastest weight update mechanisms. In contrast to all other algorithms, only the sign of the partial derivative is used to perform both learning and adaptation. This leads to a transparent and yet powerful adaptation process that can be straight forward and very efficiently computed with respect to both time and storage consumption. 14 To overcome the inherent disadvantages of pure gradient descent, RPROP performs a local adaptation of the weight updates according to the behavior of the error function. In substantial difference to other adaptive techniques, the effort of the RPROP adaptation process is not blurred by the unforeseeable influence of the size of the derivative but only is dependent on the temporal behavior of its sign. These characteristics motivated the selection of RPROP to deal with the NMPC optimization problem.
RPROP, as seen in Algorithm I, introduces a time-varying weight step
Resilient propagation.
Due to that backtracking weight step, the derivative is supposed to change its sign once again in the following step. In order to avoid a double penalty of the update value, there should be no adaptation of it in the following step. Therefore, the value of
The cost function
The cost function of the classical NMPC differs from the cost function of our approach in all three terms. Mainly, in our approach, we do not track the trajectory error (the difference between the robot’s pose and the predicted trajectory coordinate
The final cost function has as its first term (17) a penalization of the distance between the target and the robot
The function (18) penalizes the difference between the angle of the robot in the world frame (the orientation of the robot in world frame) and the angle between the robot and the “virtual leader” (trajectory position points). The function
The final cost function (17–19) is a composition of three terms. Nevertheless, we notice that here | ⋅ | denotes 1-norm for vector arguments and absolute value for scalars. Taking into account all the elements previously described, their weights, and a penalization term to the variation of control effort, the cost function that represents all this is as follows
where abs(⋅) returns the absolute value.
Two main differences demonstrate the improvement of our work when compared to the classical NMPC. They are as follows: We do not track the trajectory error, or the difference between the robot position and the given trajectory coordinates; The bearing function was also modified to penalize the difference between the robot orientation and the bearing of the virtual target with respect to robot;
These modifications minimize the steady-state error of the tracked trajectory with efficiency as proven by our results seen in the next section. Nevertheless, it causes a large variation on the control outputs. To handle these variations, we use the 1-norm in the control effort penalization term.
4
However, the disadvantage of 1-norm is its high nonlinearity. Therefore, we adopted RPROP which can handle the nonlinearities introduced by the use of the 1-norm. While, in some works, the use of different gains (matrices
Results
Several simulations and real robot experiments were performed to validate the modified NMPC controller. Regarding the simulations and the comparison, some remarks must be pointed out: In our simulations, we used a Pioneer 3-DX robot model (Figure 3(a)) using MatLab software. The parameters we use are in the MatLab model provided by Martins.
37
Their system includes trajectory changing behaviors as well as white noises in both control signals and robot position. Furthermore, the simulation numerical solver used as the standard Bogacki Shampine method; In our simulations, the maximum robot velocity was 1.2 m/s similar to the work by Martins et al.
38
Nevertheless, in both works, both controllers did not allow the robot linear velocity to go higher than |0.6| m/s; The adaptive parameters for the adaptive dynamic controller (ADC) were found in the work by Martins et al.,
38
in the fourth simulation, and they were Here, the adaptive parameter updating for the ADC started at the beginning of the simulation ( For the classic NMPC and our proposed modified NMPC, we obtained the controller’s gains through the tuning method by Nascimento et al.
40
as seen in Table 1 for both simulation and real robot experiments. Nevertheless, due to the high nonlinearity, we cannot guarantee the optimality of the controller’s gains
4
; As observed in our previous work,
8
we do not need the dynamic model to be present in the prediction model to control the robot. The NMPC behavior, when properly tuned, is more efficient with a kinematic prediction model only. The robot dynamics are present only in the robot model in the simulation; Finally, in simulations, our proposed NMPC used only one set of gains for both circular and eight-shaped trajectories while the classic NMPC had to be tuned for different trajectories obtaining two different sets of gains.

The Pioneer 3-DX robot (a) and the Turtlebot 2 robot (b).
Controllers tuned weights.
In experiments, the Turtlebot 2 nonholonomic mobile robot (Figure 3(b)) was used. The maximum velocity of the Turtlebot robot was 0.4 m/s in experiments.
Simulations
We performed two sets of simulations. Each set has a different trajectory. Both sets have a simulation time of 200 s. The first trajectory is a circular-shaped trajectory with radius = 1 m. During the circular-shaped trajectory, three changes in trajectory are performed varying the radius with an offset of 0.1 m. The second trajectory is an eight-shaped trajectory with the radius = 1 m and the total length = 2 m. In both trajectories, the robot starts from the initial pose
Simulations with both circular-shaped and eight-shaped trajectories were performed comparing the results from three different approaches: an ADC by Martins et al., 38 the classic NMPC, 36 and our proposed NMPC. Figure 4 presents the simulation results from all three control algorithms performing a circular-shaped trajectory. The initial lack of smoothness of our approach observed on the simulation within a circular trajectory is due to the instantaneous effort to converge to the trajectory tracked. This caused an initial bad behavior converging afterwards. This does not concerns the application due to the fact that it can be removed with better gain values found from this or another tuning approach. The tuning approach used here does not guarantee optimality; therefore, it could be found values that would smooth this behavior. This is confirmed by Figure 5(a) that presents the trajectory tracking error comparing the performance of all three controllers over time. Comparing the performance between all three approaches, we have a better result with the proposed NMPC.

Simulation using the Pioneer 3-DX robot model performing a circular trajectory. (a) ADC 39 , (b) NMPC, and (c) proposed NMPC. ADC: Adaptive dynamic controller.

Circular-shaped trajectory error (a) and proposed NMPC output (b) for the Pioneer 3-DX robot model performing a circular-shaped trajectory.
We also present here the output of the proposed NMPC controller’s values over time (Figure 5(b)) for the circular-shaped trajectory. Furthermore, Table 2 presents the comparison of all three controllers through four indexes, 38 namely integral absolute error (IAE), integral square error (ISE), integral of time-weighted squared error (ITSE), and integral time-weighted absolute error (ITAE), which also demonstrate the efficiency of our approach.
Controllers’ performance: Circular-shaped trajectory.
IAE: integral absolute error; ISE: integral square error; ITSE: integral of time-weighted squared error; ITAE: integral time-weighted absolute error.
Figure 6 presents the simulation results from all three control algorithms performing an eight-shaped trajectory. Simulations of the eight-shaped trajectory also demonstrate the efficiency of our approach over the classic NMPC controller and the ADC by analyzing Figure 7(a) that presents the trajectory tracking error comparing the performance of all three controllers over time. Note that the trajectory obtained using our approach converges rapidly to the steady-state point and tries to maintain the steady-state error at minimum. Note also that there are fluctuations at the position (0.5, 2), (0.75, 0.15), and (0.75, 1.4), which are due to the increase in nonlinearity of the closed loop system in this trajectory. These fluctuations can be higher or lower depending on the controller used. Note that these fluctuations are not present neither in the circular trajectory nor during the following real robot experiments that will be presented. If compared with the fourth simulation of the work by Martins et al., 38 one can note also that the mean error value of the ADC was reduced, reaching a mean value of 0.05 m, while in our proposed NMPC, the mean error value was reduced, reaching a mean value of 0.025 m.

Simulation using the Pioneer 3-DX robot model performing an eight-shaped trajectory. (a) Adaptive dynamic controller 39 , (b) NMPC, and (c) proposed NMPC.

Eight-shaped trajectory error (a) and proposed NMPC output (b) for the Pioneer 3-DX robot model performing an eight-shaped trajectory.
The efficiency of our approach can be analyzed through the controller’s output signals (Figure 7(b)) and through Table 3. This table presents the comparison of all three controllers through four indexes used in the eight-shaped trajectory. This table demonstrates the efficiency of our approach by showing that it reached the lower indexes values. In both circular-shaped trajectory and eight-shaped trajectory, our approach reached better results than the other approaches with an average improvement of 2.5 times.
Controllers’ performance: Eight-shaped trajectory.
IAE: integral absolute error; ISE: integral square error; ITSE: integral of time-weighted squared error; ITAE: integral time-weighted absolute error.
Experiments
Also, we performed two sets of real robot experiments similar to the simulation trajectories. The first trajectory is a circular-shaped trajectory with radius = 1 m while the second trajectory is an eight-shaped trajectory with the radius = 1 m and the total length = 2 m. The same offset in the circular path given by the trajectory generation in simulations can be seen also in the real robot experiments. To determine the robots position, we used a common vision-based tracking system.
The robot starts from the initial pose
Figure 8 presents the results of the circular-shaped trajectory performed by the Turtlebot 2 using the proposed NMPC. We can observe that the robot converges rapidly to the path minimizing the distance error to mean value of 0.03 m. The three spikes we see in the plot (Figure 8(b)) are due to the change in the path radius (offset of −0.1 m as above mentioned). Different from simulations, the output signals are more “messy” due to sensor noise.

Performance of Trutlebot 2 mobile robot using the proposed NMPC to track the circular-shaped trajectory. The reference and tracked path (a), the distance error between the reference and performance trajectories (b), the control outputs (c), and the
Figure 9 also presents the Turtlebot 2 performance results but for the eight-shaped trajectory. The robot also converges rapidly to the path minimizing the distance error to mean value of 0.03 m. The single spikes we see in the plot (Figure 9(b)) at 150 s are due to slip, a problem that we will focus in future works. Both Figures 8(c) and 9(c) also present the velocity saturation imposed on the Turtlebot robot as a velocity constraint. These constraints are common on real robot experiments for safety issues and where considered during the optimization loop. In simulation, however, despite it being unnecessary, we used the velocity saturation but limited it to the robot maximum speed. Nevertheless, the robot never reached those saturation speeds.

Performance of Trutlebot 2 mobile robot using the proposed NMPC to track the eight-shaped trajectory. The reference and tracked path (a), the distance error between the reference and performance trajectories (b), the control outputs (c), and the
Finally, Table 4 presents the control indexes (IAE, ISE, ITSE, and ITAE) for both circular-shaped and eight-shaped trajectory experiments with Turtlebot 2 and the proposed NMPC. As in simulations, the values for the eight-shaped trajectory were lower than the circular-shaped trajectory due to the change in radius that occurred three times in the circular-shaped trajectory experiment.
Proposed NMPC performance in real robot experiments.
IAE: integral absolute error; ISE: integral square error; ITSE: integral of time-weighted squared error; ITAE: integral time-weighted absolute error.
Conclusion
This article proposes a set of modifications on the classic NMPC controller applied to trajectory tracking control of nonholonomic systems. We have demonstrated that the use of the classic tracking error approach in a nonlinear model predictive controller is not as effective as observing the trajectory coordinates and desired velocities as the position and velocity of a virtual leader to be followed. The change in the prediction model, cost function, and minimization algorithm increased by almost three times the whole algorithm efficiency.
The proposed approach increases the closed loop nonlinearities enabling the mobile robot to perform both trajectories without the need to retuning. The cost function is also adaptable to receive new penalization terms such as to maximize obstacle avoidance and minimize the error in perception of a target. Both modifications are the starting subject of our future works.
Footnotes
Acknowledgment
The authors would like to thank CNPq for the financial support through the call EDITAL UNIVERSAL MCTI/CNPq N 14/2014 and CAPES through the PNPD Grant.
Declaration of conflicting interests
The author(s) declared no potential conflict of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was financially supported by CNPq and CAPES – Brazil.
