Abstract

Autonomous driving has recently been in considerable progress, and many algorithms have been suggested to control the motions of driverless cars. The model predictive controller (MPC) is one of the efficient approaches by which the speed and direction of the near future of an automobile could be predicted and controlled. Even though the MPC is of enormous benefit, the performance (minimum tracking error) of such a controller strictly depends on the appropriate tuning of its parameters. This paper applies the particle swarm optimization (PSO) algorithm to find the global minimum tracking error by tuning the controller’s parameters and ultimately calculating the front steering angle and directed motor force to the wheels of an autonomous vehicle (AV). This article consists of acquiring vehicle dynamics, extended model predictive control, and optimization paradigm. The proposed approach is compared with previous research in the literature and simulation results show higher performance, and also it is less computationally expensive. The simulation results show that the proposed method with only three adjustable parameters has an overshoot of about 8% and its RMSE is 0.72.

1. Introduction

Driverless cars have become popular in recent years because they promise to transform cities, provide universal access to mobility, and increase transport efficiency [1]. Another reason which attracts researchers and automobile industries is autonomous cars are expected to be by far the safest and more comfortable compared to human driving. Human driving is accident-prone as our tiredness and even wrong or delayed decisions undeniably affect our driving efficiency, which causes loss of property and deaths [2]. In recent decades, numerous studies of research pertinent to the dynamic and control of four-wheel automobiles have been conducted. In [3], the statistical performance of kinematic and dynamic bicycle models is analyzed. Such models are the simplification of four-wheel cars in which two rear wheels and two front wheels are lumped into one (imaginary) rear and front wheel, respectively. A more complex vehicle dynamic is developed in [4] which consists of five connected subsystems: one vehicle body and four wheels, rigidly coupled to the vehicle body. But the more sophisticated a model, the more difficult would be the identification of its parameters and the more challenging approaches to design efficient controllers. Moreover, the nonlinearities of the vehicle’s dynamic represent big challenges against the controller design. While, in many cases, linearization is a good tradeoff between simplicity and accuracy, the nonlinear models are generally expected to be more trustworthy in various scenarios as cover all dynamical moods of a system [5].

In the case of controllers, different control techniques have been utilized for the steering angle and speed control of autonomous vehicles. Proportional-integral-derivative (PID) controller is one of the well-known classical methods. In [6], PID gains are adjusted by a radial basis neural network for AVs to control the AV’s speed. A PID controller is developed for controlling AV’s lateral position in [7]. However, PID controllers cannot handle the system constraints, and they cannot guarantee effective performance in different maneuvers. In [8], a car-following structure is developed for AVs based on fuzzy logic. The introduced control mechanism is developed for the AVs on the highways to provide a safe traffic stream. In [9], a fuzzy logic controller is introduced for a mobile robot to follow various trajectories. However, the developed fuzzy logic controller is complicated in that it requires special microprocessing for practical implementation. In [10, 11], neural networks are utilized for path planning to AVs. The availability of the data set for training and testing the neural networks represents a big challenge against the implementation of neural networks. If the data set is not enough and not accurate, the performance of the neural network might not be efficient. On the other side, the MPC is evaluated as a sufficient control technique for different applications including simple and complicated models [12, 13]. In [14], a linear stochastic MPC is proposed for the safety guarantee in some manure and highway simulations showing the effectiveness of the proposed method regarding performance and safety. In [15], there is a comparison between linear and nonlinear MPCs for cruise control in electric vehicles. The performance of both linear and nonlinear MPCs depends on the suitable tuning of their parameters. In the other words, the tracking of regular and irregular reference signals with fewer overshoot, short rise and settling time, and small steady-state error is the main target of the controller which is only met by accurate tuning. These performance criteria are proposed in many studies such as in [16, 17]. However, they limited the trajectory tracking to only step responses. To avoid this, in this paper we propose the minimum error tracking which is efficient for any reference signals (it is not limited to step signals). To tune MPC’s parameters, many approaches like [18] present the application of the genetic algorithm to find the optimal weighting of MPC. In reference [19], MPC is supervised by fuzzy logic. The fuzzy logic supervisor fulfills the online tuning of the predictive control parameters. Moreover, neural networks are mostly used for model identification in MPCs. In [20], a novel tuning approach for MPC based on the artificial neural network along with the PSO algorithm is formulated. But this approach is not promisingly able to find the global optimum. Similarly, in [4], a modified neural network is proposed to tune MPC’s parameters for robotic manipulators. It is worth noting that throughout the tuning process, computational expenses are a considerable matter. In [21], a new low computational burden design is proposed to adjust the gains of the hybridization between the discrete-time Laguerre function and MPC based on the social ski driver algorithm. This algorithm is developed as a recent artificial intelligence technique. Furthermore, in the concept of robustness of uncertainties, a robust model predictive strategy based on an arithmetic optimization algorithm in [22] tends to handle the uncertainties for automatic voltage regulators [23]. A new robust control strategy is introduced in the paper to design the MPC gains. In [24, 25], another optimal nonlinear MPC is designed based on a new modified multitracker optimization algorithm. The merits of this improved intelligence technique are confirmed to track different linear and nonlinear trajectories and to prevent it from becoming trapped in a local optimum in the process of tuning its parameters. In addition, in [25], a nonfragile PID controller is also proposed to deal with uncertainties while determining the optimal gains of a PID controller.

In this paper, we use the kinematic bicycle model and nonlinear MPC to control the lateral position and speed of AVs. The controller parameters are tuned based on particle swarm optimization. The proposed procedure is more computationally efficient than what have been proposed in the literature such as [17, 18]. Moreover, the simulation result shows the performance of tracking desired trajectories is much better than what was proposed in the mentioned studies.

2. Vehicle Dynamic and Model

Figure 1 depicts the main forces on a car on the road. The vehicle’s longitudinal motion, governed by Newton’s second law of motion, can be described as follows [26]:where is the mass of the vehicle, including powertrain inertial effects, is longitudinal velocity. Here, is chosen to be the sum of tractive or braking force at the wheels, is the road gradient resistance, and is rolling resistance in which is the coefficient of friction and is the road slope which is a function of position. In the term representing aerodynamic drag, is the air density, is the vehicle front area, and is the aerodynamic drag coefficient.

The nonlinear continuous time equations that describe the kinematic bicycle model [3] are summarized in (6)–(9). See Figure 2 where and are the coordinates of the center of mass in an inertial frame , is the inertial heading, and and represent the distance from the center of the mass of the vehicle to the front and rear axles, respectively. is the angle of the current velocity of the center of mass with respect to the longitudinal axis of the car, and the control inputs are the front steering angles .

3. Nonlinear Model Predictive Control

A nonlinear system could be described in the following model:

Here, is the state space, is the nonlinear dynamic, is the input, denotes the external disturbance on the system, is the output, and is the measurement model. MPC uses a model of the system to make predictions about the system’s future behavior, and by solving an online optimization algorithm to find the optimal control action, drives the predicted output to the reference. It can also handle input and output constraints. MPC has preview capability; it can incorporate future reference information into the control problem to improve controller performance. MPC predicts the future control signal within finite steps named the control horizon “M” and utilizes the prediction of the system output within finite steps named the prediction horizon “P” to predict the proper control moves. The best control moves are selected according to the decreasing of a quadratic objective function. This objective function is formulated in the following term:

Subject to the system dynamic (7) and (8) and the following inequalities:

Here, is the desired reference, , are the Euclidian norm, and is the input-output ratio weighting factors. In (9), the first term penalizes the output reference tracking, and the second one penalizes the slope of changes in the input signal.

The constraints (10) and (11) are considered for both longitudinal speed and lateral position. These make the algorithm much more liable to be implemented in reality. As the signal control of longitudinal velocity is supposed to be the motor force which obliviously cannot be overvalued or fluctuated in high frequencies because of mechanical constraints in the vehicle’s motor. For controlling the lateral position, in addition to mechanical constraints, the steering angle should be intentionally limited for the sake of safety driving, especially in high speeds. Nevertheless, if the algorithm suggests an over or under-rated signal control, it is considered as a lower or upper limited band, respectively.

The extended dynamic model predictive controller (EDMC) is based on a nonlinear model and a simultaneous linear model. During computing control signals, EDMC tries to reduce the difference between nonlinear and simultaneous linear models, doing so based on step responses. In a linear system, the step response of a system is computed by the convolution series.

For the step of output prediction and steps of horizon control, this could be shown in the following matrices. Here, is the simultaneous linear model output, is the Toeplitz matrix of step responses which are driven by feeding a step signal to the nonlinear dynamic. For computing the elements of , it does not need to compute all elements of step response and it can be computed by evaluating , in the nonlinear dynamic.

By assuming , the matrix form of the objective function described in (9) can be rewritten in the following form:where ; by defining , the signal control is

Moreover, the disturbance term is composed of nonlinear disturbance and measurement disturbance, shown by and , respectively.

For the external disturbance, the best approach is to assume this disturbance does not change in the near future and equal to the difference between the measurement output and the nonlinear mode’s output.

Since and are functions of , in the main loop of the algorithm, there is a fixed point iterative approach to solve the following equations:

4. Optimization Problem

Particle swarm optimization (PSO) is a bio-inspired algorithm that optimizes an objective function by iteratively trying to improve a candidate solution with regard to a given measure of quality in the solution space. It is different from other optimization algorithms in such a way that only the objective function is needed and it is not dependent on the gradient or any differential form of the objective. This method was originally proposed in [27] to find the maximum or minimum of a function defined on a multidimensional vector space. In this paper for the NLMPC, the mean square error (MSE) objective function is suggested to find the optimal parameters: prediction horizon , control horizon , and weighting factor .where and is the start and end time of desired pattern, respectively. What was developed in references [17, 18] is not only limited to step reference signal but also is rather computationally expensive than what is proposed in this paper. However, the objective function (22) is quite efficient for any desired pattern. In addition, the objective function (15) has only three variables to the optimization problem.

Following would be the algorithm of tuning EDMC using PSO. Assume there are particles by which the position of each particle is denoted by . Beside the position, there is a velocity for each particle, denoted by . In the iteration of , the position and velocity of particles in the next iteration are updated by the following rules:

The constant is the inertia weight. It determines how much should the particle keep on with its previous velocity. The constants and are called the cognitive and the social coefficients, respectively. They control how much weight should be given between refining the search result of the particle itself and recognizing the search result of the swarm. is the position that gives the minimum which is ever explored by particle , and is that explored by all the particles in the swarm.

The proposed algorithm of EDMC along with PSO can be expressed in Algorithm 1 and Figure 3.

Given the patterns of for both lateral position and longitudinal velocity
PSO loop for finding optimal , and
For
 Compute the step responses by evaluating , in the nonlinear dynamics, using equations (5)–(8).
 Evaluating Toeplitz and matrices, using (13) and (14).
 Evaluating , using (18)
 Loop for computing and
  Initialing
  Computing , using (16)
  Update , using (21)
 End
 Computing input signals:
End

5. Simulations and Results

In this section, the performance of the proposed optimization paradigm, in comparison with the approaches in [17, 18] is shown. Moreover, the robustness of the EDMC in the case of disturbance rejection and the uncertainties in the model’s parameters is illustrated. To begin with, in the PSO-MPC approach in [17] and GA-MPC in [18], the weighting factors of the control horizon and prediction horizon were supposed to be different in each step. As a result, the PSO algorism has to search in the higher dimensional space, which makes the algorithm computationally expensive, particularly while the long horizon of control and prediction are needed. However, proposed objective function (15), only has to have three parameters to tune.

The nominal parameters of the vehicle dynamic are shown in Table 1 [28]. And, the suggested EDMC parameters (, , ) are tuned by the PSO algorithm for each desired output pattern.

The performance of the auto-tuned MPC for the control of speed and lateral position is shown in Figures 4 and 5, respectively. The response of the PSO-MPC algorithm, alongside the results of methods presented in [17, 18] ( and for speed control and and for lateral position control), is shown. While the objective function in the PSO-MPC is defined to reduce overshoot, steady-state error, and rise and settling time, the objective function in this paper (MSE) represents the response performance more efficiently.

The results of the comparison are summarized in Tables 2 and 3 for the vehicle speed and lateral position, respectively.

Tables 2 and 3 show that the proposed method has a much better performance compared to the other two methods. Note that the sampling time for the speed controller is and the PSO algorithm would tune the parameters at , , and . However, is chosen for the lateral position controller at the constant speed of and the parameters are tuned at , , and . The results show that it can provide a good tracking performance and is more computationally effective rather than conventional MPCs. It is worth noting that there is no limitation to simultaneously implementing both speed and lateral position controllers. Another merit of the proposed approach is the robustness in the case of uncertainties in the model parameters and external disturbances. Figures 69 show how the controller deals with uncertainty in the parameters in , comparing to the nominal value (Table 1).

It is crystal clear that the proposed paradigm can control the lateral position and speed of an AV at a high range of performance. In comparison with the previous studies [17, 18], the proposed algorithm not only results in better performance but also takes less time to tune the controller’s parameters. The details are shown in Tables 2 and 3. Moreover, the robustness of the controller shows it is not sensitive to accurate identification of the nonlinear model’s parameters. Figure 10 illustrates the performance of the tracking nonlinear reference signal in the presence of fluctuating slope of the road.

The result shows the robustness of the proposed approach in no stationary environment.

6. Conclusions

For the formation control of the lateral position and speed of an AV, this paper first modeled the dynamic of a four-wheel vehicle by applying the kinematic bicycle model. Afterward, the study formulated the EDMC algorithm. Finally, the PSO algorithm is devoted to finding the optimal solution by tuning the controller’s parameters. The output results emphasize that the proposed method is superior to the other methods and it is more effective to track regular and irregular trajectories with a desired mean square error, short settling time, and less overshoot. The simulation results show the proposed approach desirably meets the performance criteria. Moreover, the suggested technique is robust versus the system parameters uncertainties. For future work, the reference signals could be extracted from recently developed control strategies such as reinforcement learning. Furthermore, regarding collision avoidance and safe driving, the motion of other vehicles should be taken into account [24].

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.