Next Article in Journal
Immobilization of Pseudomonas fluorescens Lipase on Hollow Poly(o-phenylenediamine) Microspheres and Its Application in the Preparation of Citronellyl Acetate
Previous Article in Journal
Use of Potential Immobilized Enzymes for the Modification of Liquid Foods in the Food Industry
Previous Article in Special Issue
Ground Risk Assessment for Unmanned Aircraft Focusing on Multiple Risk Sources in Urban Environments
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Research on Path Planning and Tracking Control of Autonomous Vehicles Based on Improved RRT* and PSO-LQR

College of Automobile and Traffic Engineering, Nanjing Forestry University, Nanjing 210037, China
*
Author to whom correspondence should be addressed.
Processes 2023, 11(6), 1841; https://doi.org/10.3390/pr11061841
Submission received: 10 May 2023 / Revised: 1 June 2023 / Accepted: 16 June 2023 / Published: 19 June 2023
(This article belongs to the Special Issue Intelligent Techniques Used for Robotics)

Abstract

:
Path planning and tracking control are essential parts of autonomous vehicle research. Regarding path planning, the Rapid Exploration Random Tree Star (RRT*) algorithm has attracted much attention due to its completeness. However, the algorithm still suffers from slow convergence and high randomness. Regarding path tracking, the Linear Quadratic Regulator (LQR) algorithm is widely used in various control applications due to its efficient stability and ease of implementation. However, the relatively empirical selection of its weight matrix can affect the control effect. This study suggests a path planning and tracking control framework for autonomous vehicles based on an upgraded RRT* and Particle Swarm Optimization Linear Quadratic Regulator (PSO-LQR) to address the abovementioned issues. Firstly, according to the driving characteristics of autonomous vehicles, a variable sampling area is used to limit the generation of random sampling points, significantly reducing the number of iterations. At the same time, an improved Artificial Potential Field (APF) method was introduced into the RRT* algorithm, which improved the convergence speed of the algorithm. Utilizing path pruning based on the maximum steering angle constraint of the vehicle and the cubic B-spline algorithm to achieve path optimization, a continuous curvature path that conforms to the precise tracking of the vehicle was obtained. In addition, optimizing the weight matrix of LQR using POS improved path-tracking accuracy. Finally, this article’s improved RRT* algorithm was simulated and compared with the RRT*, target bias RRT*, and P-RRT*. At the same time, on the Simulink–Carsim joint simulation platform, the PSO-LQR is used to track the planned path at different vehicle speeds. The results show that the improved RRT* algorithm optimizes the path search speed by 34.40% and the iteration number by 33.97%, respectively, and the generated paths are curvature continuous. The tracking accuracy of the PSO-LQR was improved by about 59% compared to LQR, and its stability was higher. The position error and heading error were controlled within 0.06 m and 0.05 rad, respectively, verifying the effectiveness and feasibility of the proposed path planning and tracking control framework.

1. Introduction

In recent years, the rapid development of artificial intelligence has driven the technological progress of self-driving vehicles and intelligent transportation systems. Autonomous vehicles are one of the core components of intelligent transportation systems with increasing safety and reliability requirements [1,2,3,4]. Path planning and tracking control are two core issues in the autonomous driving system. The main goal of path planning is to efficiently find a collision-free and feasible path from the starting point to the target point in the workspace, while path tracking control solves the problem of how to control the vehicle to move along the pre-planned path [5,6]. The planned path’s quality directly affects the vehicle’s driving performance during autonomous driving. In contrast, the ability to accurately and stably track the planned path directly affects the vehicle’s driving safety. Therefore, path planning and tracking performance are significant for autonomous driving vehicles.
Scholars have proposed many practical algorithms and methods to address the challenges and difficulties in path planning for autonomous vehicles. Path planning algorithms can be divided into five types based on their principles: graph search methods, sampling methods, intelligent bio-inspired methods, numerical optimization methods, and artificial potential field methods [7,8]. Among them, the Rapidly-Exploring Random Tree (RRT), a sampling-based path planning method, is widely used in autonomous vehicle path planning due to its advantages, such as probability completeness, efficiency, scalability, and robustness [9]. However, the traditional RRT algorithm has limitations regarding long path search time and slow algorithm convergence speed. To address the limitations of the traditional RRT algorithm, scholars have proposed many improved RRT methods. A path planning technique based on Goal-Biased RRT [10] has been developed to increase the planning efficiency while also increasing the search efficiency of the algorithm by adding a probability element to the random sampling to create a non-random sampling extension mode. Additionally, some scholars have proposed the RRT-Connect algorithm [11], which generates random trees separately from the starting and target nodes, reducing the search space and improving search speed. To address the shortcomings of the RRT algorithm in ensuring asymptotic optimality, the RRT* algorithm changes the search mode by reselecting the parent node and rewiring, thus generating paths with the best or approximate best length [12].
In order to improve the convergence performance and feasibility of the RRT* algorithm, scholars have proposed the Informed-RRT* [13], which uses heuristic methods to reduce the planning problem to a subset of the original domain, thus improving the algorithm’s search speed. However, its performance is sensitive to the initial solution. Other researchers have attempted to introduce additional algorithmic features to improve RRT and enhance the efficiency of path planning. Qureshi et al. [14] proposed P-RRT*, which uses potential artificial fields to obtain new nodes and reduce the time required to expand to the goal. Chen et al. [15] proposed a VPF-RRT* algorithm for path planning, which introduces virtual potential fields into the RRT* algorithm to adjust the positions of path nodes and solve the problem of excessive randomness in the RRT algorithm. Fan et al. [16] proposed a trajectory planning method based on the target-biased bidirectional APF-RRT* algorithm, which integrates the Artificial Potential Field (APF) method with the Bi-RRT* algorithm that has a target-bias strategy, significantly reducing redundant points. Ayawli et al. [17] proposed an improved heuristic RRT-A* algorithm, in which the A-Star (A*) cost function is introduced into the RRT algorithm to optimize performance. Meanwhile, several metric functions are used as heuristic information functions to measure the performance of different metric functions, optimizing the planning path and reducing computational costs. However, although these algorithms have made significant improvements compared to the traditional RRT, they have yet to consider the steering constraints of the wheels, which means that they have not been directly applied to path planning for autonomous vehicles. Therefore, Ghosh et al. [18] proposed a kinematic constraint Bi-RRT (KB-RRT) algorithm, which limits the number of generated nodes without affecting accuracy and combines kinematic constraints to generate smooth trajectories. Peng et al. [19] proposed a path planning algorithm based on a kinematic constraint RRT integrated with the trajectory parameter space (TP space), introducing a new method to select candidate nodes for tree expansion and integrating RRT with TP space to meet kinematic constraints and improve performance through narrow passages. Liao et al. [20] proposed the Stack-RRT*, which can be combined with smoothing schemes based on different parameter curves to generate feasible paths with different continuity. These algorithms have significantly improved planning efficiency, reduced computational cost, and met kinematic constraints. However, further research and improvements are still needed to achieve more efficient, precise, and safe path planning for autonomous vehicles.
In addition to research on path planning techniques, tracking and control technology are also essential in autonomous vehicles. Generally, there are two types of autonomous vehicle path-tracking control methods: geometric-based methods and model-based methods. Geometric-based methods include the pure pursuit [21] and Stanley methods [22], which are widely used for handling vehicle or robot path tracking problems due to their simplicity and good performance. However, geometric methods are only suitable for vehicles that ignore their dynamic characteristics. In contrast, the model-based path-tracking method is more suitable for autonomous vehicles in real driving scenarios. Model-based tracking methods can be divided into methods based on the kinematics model and methods based on the dynamic model. The control method based on a dynamic model improves the safety and reliability of vehicles under complex working conditions [23]. There are many control methods based on dynamic models, such as Proportional–Integral–Differential (PID) control [24], Fuzzy Logic control [25], Sliding Mode control [26], Model Predictive control [27], and Linear Quadratic Regulator (LQR) control [28]. LQR controllers are widely used in autonomous vehicle path tracking due to their high-precision tracking performance, algorithmic simplicity, applicability to nonlinear systems, and ability to consider dynamic constraints. However, while LQR methods can stabilize the system, they do not consider disturbance terms and can lead to system errors. Therefore, Kapania et al. [29] proposed a feedback + feedforward steering controller to maintain vehicle stability under extreme maneuvering conditions while minimizing the path deviation. However, at high speeds, the steady-state path deviation significantly increases. Xu et al. [30] added path curvature feedforward control to LQR feedback control to reduce the steady-state error of the controller. Yang et al. [31] proposed a feedforward + predictive LQR Lateral control method, which suits intelligent vehicles’ lateral tracking control problem under complex working conditions. Although research based on the LQR control methods has been widely applied to autonomous vehicles, problems, such as input instability in solving LQR, can affect the controller’s performance. Therefore, many researchers have improved control effects by adding optimization algorithms to optimize LQR. Lu et al. [32] proposed an adaptive LQR Path-Tracking controller, which uses a genetic algorithm to optimize the parameters of LQR and applies a fitness function that considers tracking accuracy and vehicle stability. The results show the effectiveness of the controller in improving tracking accuracy and vehicle stability. Wang et al. [33] proposed a lateral path control strategy based on an improved LQR algorithm, which uses fuzzy control to adjust the weight coefficients of LQR in real time according to the vehicle state, improving tracking accuracy, steering stability, and computational efficiency. The improvements made to the LQR algorithm in these studies have shown promising results, but there is still room for further improvement in control accuracy and stability.
The literature review above provides an overview of various research achievements on path planning and tracking control strategies for autonomous vehicles, with numerous studies conducted by scholars in this field. However, the performance of path planning and tracking control for autonomous driving still needs to be improved, and a comprehensive framework is needed to cope with different driving scenarios. This paper proposes a novel framework that combines path planning and tracking control. The framework utilizes an improved RRT* algorithm for path planning, considering the actual operating environment of the vehicle and whether the planned path can meet the requirements for vehicle tracking. Additionally, a PSO-LQR controller is designed for path-tracking testing to form a closed loop, and the feasibility of the proposed planning approach is verified.
The main contributions of this paper:
(1)
For the driving intention of autonomous driving and the urban road scenario in which it is located, this study changes the sampling range of random points from the original complete state space sampling to adaptive Gaussian sampling around the nearest node, which reduces the invalid execution in the sampling process, decreases the number of algorithm iterations, and shortens the computation time.
(2)
This study introduces an improved artificial potential field method into the RRT* algorithm. For the nearest nodes, the target point and random sampling point are set to have different attractive forces on them, and the concept of road boundary repulsion is introduced to make the obstacles and road boundary repel the nearest nodes. The combined direction of gravitational and repulsive forces is used as the extension direction of the new node to control the growth of the random tree toward the target point, reduce randomness, and speed up the path search. This study also uses path pruning based on the maximum steering angle constraint of the vehicle and the thrice B-spline algorithm to optimize the sampled generated paths to obtain paths that match the actual tracking of the vehicle.
(3)
In this study, a PSO-LQR controller with feedforward control is designed to eliminate the external disturbances caused by the target path. Meanwhile, an objective function considering both tracking accuracy and vehicle stability is established to maintain vehicle stability and achieve higher tracking accuracy. The performance of the PSO-LQR controller is verified in this study by conducting simulation experiments on the LQR controller before and after optimization. Moreover, tracking experiments are conducted for planned paths at different speeds using the PSO-LQR controller to verify the feasibility of the improved RRT* algorithm for path planning and the effectiveness of the tracking control performance.
The organization of this paper is as follows: Section 2 introduces the improved RRT* algorithm, Section 3 introduces the PSO-LQR path tracking method, and Section 4 conducts experiments and analysis. Finally, in Section 5, this paper summarizes its contributions and proposes future research directions.

2. Path Planning Algorithm

2.1. Vehicle Kinematic Model

In vehicle path planning, it is necessary to consider the kinematic characteristics of the vehicle itself to ensure that the planned path meets the kinematic constraint conditions of the vehicle. This ensures that the planned path can meet the vehicle’s steering motion characteristics, thereby ensuring the stability and safety of the driving process. The vehicle kinematic model established in this paper is shown in Figure 1.
In the state space shown in Figure 1, the state of the vehicle can be represented by the variable q = ( x , y , θ , δ f ) , where ( x , y ) represents the coordinate position of the rear axle of the vehicle, θ represents the angle between the longitudinal axis of the vehicle and the X-axis, and δ f represents the steering angle of the front wheel. It is necessary to satisfy | δ f | δ f max and l as the wheelbase, and R as the turning radius.
Under the constraint of the front wheel steering angle, the vehicle cannot reach any position in the state space. Assuming that the vehicle moves at a constant speed v parallel to the ground, the vehicle can be simplified as a two-degree-of-freedom bicycle model represented by Equation (1).
x ˙ y ˙ θ ˙ = v · cos ( θ ) sin ( θ ) tan δ f l .
The relationship between the front wheel steering angle, wheelbase, turning radius, and curvature can be obtained.
ρ max = 1 R min = tan δ f max l
where R min represents the minimum turning radius, ρ max represents the maximum curvature, and δ f max represents the maximum steering angle of the front wheels.
Based on the kinematic model and the analysis of the maximum front wheel turning angle, it is known that the curvature of the planned path should satisfy the constraint of the maximum front wheel turning angle. However, the RRT* algorithm does not consider the constraints of the vehicle kinematic model, and the planned path does not fit the kinematic characteristics of the vehicle. Therefore, the path planning of the vehicle can be constrained based on the maximum front wheel turning angle and path curvature to meet the actual driving path requirements of the autonomous vehicle.

2.2. RRT* Algorithm

Some researchers have proposed the RRT* algorithm. Before introducing the RRT* algorithm, this paper first presents the RRT algorithm proposed by other researchers as a basis. The RRT algorithm uses a random sampling method to expand the tree from the initial point to the target point. During each iteration, the RRT algorithm randomly selects a point q r a n d in the state space. If the point falls within a non-obstacle interval, it will traverse the random expansion tree to find the nearest node q n e a r e s t to the random point. If the line between q r a n d and q n e a r e s t does not collide with obstacles and the distance between them is less than the expansion step size, q r a n d is added to the random tree as a new node q n e w . If the distance between q r a n d and q n e a r e s t is greater than the expansion step size, a point on the line between q r a n d and q n e a r e s t , at a distance of the expansion step size from q n e a r e s t , is intercepted as q n e w and added to the random expansion tree. The nearest node to q n e w is then considered the parent node of q n e w . Repeat this iteration process until a feasible path is found from the initial point to the target point.
In contrast, the RRT* algorithm introduces two improvements: reselecting parent nodes and rewiring. Reselecting the parent nodes means that after the RRT algorithm finds a new node, the nearest node to the new node among all nodes within a predefined radius r is selected as the parent node of the new node. Rewiring refers to reorganizing all nodes in the tree near the newly selected parent node after selecting a new parent node, with the principle of minimizing the cost of all nodes to the starting point. These two processes complement each other, with reselecting the parent nodes minimizing the cost of the newly generated node’s path as much as possible, and rewiring reducing redundant paths in the random tree after generating a new node, thereby reducing path costs. These improvements significantly reduce the path cost of the RRT algorithm.
To improve the search efficiency of the RRT* algorithm, researchers have proposed a goal-biased RRT* algorithm, which, given a target-biased probability factor p t a r g e t , and a random probability value p is obtained between 0 and 1. When p > p t a r g e t , a random state named q r a n d is obtained in the search space, otherwise q r a n d is equal to q g o a l . This algorithm maintains the characteristics of the original algorithm and accelerates the convergence speed to the target node.

2.3. Improved RRT* Algorithm

The flow chart of the improved RRT* algorithm in this paper is shown in Figure 2. Firstly, the algorithm is initialized, and relevant parameters are set. Then the variable sampling area method is used to restrict the generation of random sampling points. After generating the random sampling point q r a n d , find its nearest node q n e a r e s t , use the improved APF method to calculate the generation direction of the new node, and finally generate a new node q n e w in that direction. If there is no collision with the obstacle, the new node will be added to the random tree and determine whether it reaches the target point. If there is a collision or the target point is not reached, the initialization is returned to continue the cycle until the target point is reached. Then the final curvature continuous path is obtained by the path optimization method. The new improvements of the algorithm are explained in detail below.

2.3.1. Variable Sampling Area

In traditional RRT* and Goal-Bias RRT* algorithms, the random sampling of nodes is based on the entire state space. However, in structured road scenarios where autonomous vehicles operate, the vehicle’s movement is constrained by traffic rules. Therefore, random sampling based on the entire state space will produce many invalid plans. The variable sampling area method adaptively samples within a range around the current nearest node using Gaussian sampling. This method dynamically adjusts the sampling interval according to the characteristics of the current state space, which helps improve the efficiency and accuracy of the algorithm.
As shown in the coordinate system in Figure 3, vehicles need to move in the direction of the lane markings while avoiding obstacles represented by the black box. Depending on the driving intent of the vehicle, the RRT* algorithm should focus more on sampling in front of the vehicle during random sampling. Therefore, the Gaussian sampling will be more consistent with actual driving behavior. Using the state space information around the current nearest node, the sampling area of the new random node is limited to an adaptive fan-shaped range along the X-axis direction of the nearest node, as shown in Equation (3):
Φ = x , y | x = x o + r cos η , y = y o + r sin η
r = σ r r r a n d + r o η = σ η η r a n d + η o , r o = ε ρ ( q , q o b s ) η o = π 2 arctan ρ x ( q , q g o a l ) ρ y ( q , q g o a l )
where Φ is the dynamic sampling area, q ( x o , y o ) is the nearest node on the random tree during the sampling process, ( x , y ) is the coordinate of the new sampling point, r , η is the Gaussian parameter obtained from Equation (4), r o , η o is the mean of the Gaussian distribution relative to ( x o , y o ) , ( σ r , σ η ) is the standard deviation of the Gaussian distribution in the radial and circumferential directions, ( r r a n d , η r a n d ) is a random variable that follows a standard Gaussian distribution. ρ ( q , q o b s ) represents the Euclidean distance between the nearest node and the center of the obstacle, ε is a constant, ρ x ( q , q g o a l ) and ρ y ( q , q g o a l ) represent the Euclidean distances between the nearest node and the target point in the X and Y directions, respectively.

2.3.2. Improved APF-RRT* Algorithm

Based on the RRT* algorithm, adding an improved artificial potential field can improve the direction of new node generation and speed up the search efficiency of the random tree. The traditional APF algorithm is first introduced to pave the way for introducing the improved strategy. q ( x o , y o ) is the nearest node in the random tree during the sampling process, which generates an attractive field function U att ( q ) according to Equation (5) and a repulsive field function U rep ( q ) according to Equation (6). The total potential field U total ( q ) is the sum of these two fields, as shown in Equation (7):
U att ( q ) = 1 2 k a g ρ 2 ( q , q g o a l )
U rep ( q ) = 1 2 k r 1 ρ ( q , q o b s ) 1 ρ 0 ρ ( q , q o b s ) ρ 0 0 ρ ( q , q o b s ) ρ 0
U total ( q ) = U rep ( q ) + U att ( q )
where k a g is the attraction gain factor of the target point to the nearest node is taken as 1.5 in this paper, k r is the repulsion gain factor of the obstacle is taken as 2 in this paper, ρ 0 is the maximum distance at which the repulsion force acts, and ρ ( q , q g o a l ) represents the Euclidean distance between the nearest node and the target point. The magnitudes of the attraction and repulsion forces are the negative gradients of the attraction field function and the repulsion field function, respectively. Therefore, the attraction function is defined as shown in Equation (8). Similarly, the repulsion function is shown in Equation (9).
F att ( q ) = k a g ρ ( q , q g o a l )
F rep ( q ) = k r 1 ρ ( q , q o b s ) 1 ρ 0 ρ ( q , q o b s ) ρ 0 0 ρ ( q , q o b s ) ρ 0
To increase the exploratory nature of the algorithm and enable better exploration of the unknown regions, this paper proposes an improvement to the attraction field as follows. Firstly, the attraction field generated by the target point and the randomly sampled point are defined as U attg ( q ) and U attr ( q ) , respectively, and their sum is the new attraction field function U att ( q ) , as shown in Equation (10). This produces a new attraction function F att ( q ) , as shown in Equation (11).
U att ( q ) = U attg ( q ) + U attr ( q ) = 1 2 ( k a g ρ 2 ( q , q g o a l ) + k a r ρ 2 ( q , q r a n d ) )
F att ( q ) = F attg ( q ) + F attr ( q ) = k a g ρ ( q , q g o a l ) + k a r ρ ( q , q r a n d )
where k a r is the gain coefficient for the attraction field produced by the sampled point towards the nearest node is taken as 1.5 in this paper, ρ ( q , q r a n d ) is the Euclidean distance between the nearest node and the sampled point, F attg ( q ) and F attr ( q ) are the attractions generated by the target point, and the random sample towards the nearest node, respectively.
In the primary APF method, when the car reaches the target point, the attractive force becomes zero while the repulsive force remains non-zero, leading to the problem of the elusive target. Moreover, when the resultant direction of all the repulsive forces from obstacles is the same as the direction of the attractive force, and the car has not yet reached the target point, it is possible to get stuck in a local optimum where the repulsive and attractive forces are equal. To solve these problems, the traditional repulsive field of the local optimal improvement method proposed by other researchers is improved in this paper by introducing a modulation factor ρ n ( q , q g o a l ) in the repulsive field function, which produces a new repulsive field function U rep ( q ) as shown in Equation (12), which ensures that the repulsive and attractive forces only reduce to zero simultaneously when the car reaches the target point, thus solving the problems of local optima and elusive targets.
U rep ( q ) = 1 2 k r 1 ρ ( q , q o b s ) 1 ρ 0 2 ρ n ( q , q g o a l ) ρ ( q , q o b s ) ρ 0 0 ρ ( q , q o b s ) > ρ 0
F rep ( q ) = k r 1 ρ ( q , q o b s ) 1 ρ 0 ρ n ( q , q g o a l ) ρ 2 q , q o b s ρ ( q , q o b s ) n 2 k r 1 ρ ( q , q o b s ) 1 ρ 0 2 ρ n 1 ( q , q g o a l ) ρ ( q , q g o a l )
where F rep ( q ) is the new obstacle repulsion function, ρ ( q , q o b s ) and ρ ( q , q g o a l ) are the unit vectors of the nearest node and obstacle and the direction of the target point, respectively, n is an arbitrary constant, and n = 2 is taken here after many tests.
However, vehicles are different from robots when they travel on roads. They are not only constrained by obstacles but also by the road itself. According to the driving experience, the boundary area of the road is the most dangerous, followed by the centerline area, and the lane centerline area is the least dangerous. The force exerted on the vehicle by the road boundary is shown in Figure 4.
According to the distribution of road danger levels mentioned above, the potential field function of the road boundary needs to be considered in segments. When the vehicle is in the area between the centerlines of two lanes, it is in a relatively safe zone. The influence of the potential field changes slowly with position, so a function with a relatively gentle change trend is used. In other areas where the danger level is higher, the influence of the potential field changes quickly with position, so a function with a more extensive change trend is used. Taking a dual carriageway as an example, considering the above factors, the potential field function of the road boundary established is shown as Equation (14), and the boundary potential field generated by the road boundary produces the road boundary repulsive force shown as Equation (15), pushing the vehicle away from illegal areas on the road boundary and ensuring the safety of the path.
U road ( q ) = k road 1 e y o y l 1 , y o L 4 k road 2 sin 2 y o y l L , L 4 < y o < 3 L 4 k road 3 e | y o y r | 1 , y o 3 L 4
F road ( q ) = k road 1 e | y o y l | , y o L 4 k road 2 cos 2 y o y l L , L 4 < y o < 3 L 4 k road 1 e y o y r , y o 3 L 4
where k road 1 and k road 2 are the potential energy gain coefficients of the road boundary; y l and y r is the horizontal position of the centerline of the inner and outer lanes; L is the width of the road.
Based on the Goal Biased RRT*, an improved APF method is combined, where both the target point and random sampling point exert attraction on the nearest node, and obstacles exert a repulsive force on it. At the same time, considering the road environment where the autonomous driving vehicle is located, the road boundary repulsive force is introduced. The force diagram of the nearest node q ( x o , y o ) is shown in Figure 5, and the direction of the resultant force F total   is drawn using the parallelogram rule, as shown in Equation (16). Its direction serves as the extension direction for new nodes, controlling the growth of the random tree towards the target point to reduce randomness and accelerate path search speed.
F total ( q ) = F att ( q ) + F rep ( q ) + F road ( q )
Then the resultant force F total   is decomposed into F x and F y , corresponding to the components of the x-axis and y-axis, respectively, then in the case of the expansion step λ , the position of the new node is q n e w x n e w , y n e w , as shown in Equation (17):
x n e w = x o + λ F x F x + F y y n e w = y o + λ F y F x + F y
The path planning for autonomous vehicles in road scenarios was achieved by fusing the RRT* algorithm and the improved APF method. The algorithm introduces the concepts of attraction field and repulsion field to control the growth direction of the RRT* algorithm towards the target point as much as possible in the tree expansion direction. After defining the attraction field and repulsion field functions, their resultant force direction can be used as the expansion direction of new nodes for node expansion. In this way, the tree growth towards the target point can be controlled during the path planning process to reduce randomness and improve path search speed.

2.3.3. Path Optimization Algorithms

Due to the random sampling nature of the RRT* algorithm during path searching, if the path is directly generated from the goal point back to the starting point, the resulting path will inevitably be more tortuous. It may not meet the maximum curvature constraints required for vehicle steering, as well as resulting in redundant nodes, leading to an unnecessary increase in path cost. Therefore, this paper proposes a path-pruning method based on the maximum steering angle constraint of the vehicle. As shown in Figure 6, starting from the goal node q g o a l , it is connected to the starting node q s t a r t , and the intersection between the line segment and obstacles is checked. If there is no intersection, the nodes between the two path nodes are pruned, and the line connecting them is considered as the optimal path. If there is an intersection, node q 2 is connected to the goal node q g o a l , and the intersection check is repeated while also checking whether the angle formed by the two adjacent path segments generated by nodes q s t a r t , q 2 , and q g o a l satisfies the maximum steering angle constraint of the vehicle. If it does not satisfy one of the judgment criteria, it will continue to connect to q 3 and q g o a l , and repeat the above judgment. If both judgment criteria are met, it will be considered as the next path point of q s t a r t , and the above operation is repeated until the final path that does not intersect with obstacles and meets the maximum steering angle constraint of the vehicle is obtained. This ensures that the path curvature does not exceed the maximum curvature when using B-spline curves for smooth paths and outputs the path. The path after pruning optimization is shown as a solid line in Figure 6.
After the above path clipping, the path still has the problem of discontinuous curvature. Therefore, a cubic B-spline curve is used to smooth the path and make the curvature of the planned path continuous. If there are n + 1 control points in total, the K-th order B-spline curve is defined as:
P ( t ) = p 0 , p 1 , , p n B 0 , K ( t ) B 1 , K ( t ) B n , K ( t ) = i = 0 n P i B i , K ( t )
where P ( t ) are control points; B i , K ( t ) is the basis function of cubic B-splines, recursively obtained according to the DeBoor-Cox formula:
B i , 0 ( t ) 1 t i t t i + 1 0   O t h e r w i s e K = 1 B i , 3 ( t ) = ( t t i ) B i , 2 ( t ) t i + 3 t i + ( t i + 4 t ) B i + 1 , 2 ( t ) t i + 4 t i + 1 K 2
In this study, three uniform B-splines were selected to smooth the planned path, and the repeatability of the nodes at both ends was set to 3. Then the basis function can be expressed as:
B 0 , 3 ( t ) = 1 6 ( 1 t ) 3 B 1 , 3 ( t ) = 1 6 3 t 3 6 t 2 + 4 B 2 , 3 ( t ) = 1 6 3 t 3 + 3 t 2 + + 3 t + 1 B 3 , 3 ( t ) = 1 6 t 3
Here, the vector interval of parameter nodes is set to [0, 1]. By substituting Equation (20) into Equation (18), the expression of the third-order quasi-uniform B-spline curve can be obtained:
P ( t ) = P 0 B 0 , 3 ( t ) + P 1 B 1 , 3 ( t ) + P 2 B 2 , 3 ( t ) + P 3 B 3 , 3 ( t ) , t 0 , 1 .

3. Path Tracking Controller

3.1. Establishment of Path Tracking Model

3.1.1. Vehicle Dynamic Model

The path tracking control of autonomous driving vehicles mainly studies the lateral dynamic characteristics of the vehicle, involving the vehicle’s lateral and yawing movements. To simplify the calculations, it is assumed that the vehicle’s coaxial wheels have the same lateral stiffness and turning angle, and thus, the coaxial wheels can be merged. This simplifies the vehicle’s dynamic model to a two-degree-of-freedom lateral dynamic model [34,35], as shown in Figure 7.
Assuming the vehicle is driving at a constant speed and under the condition where the front wheel steering angle δ f and the front and rear wheel slip angles α f and α r are small, lateral load transfer can be ignored. According to the magic formula tire model [36], the vehicle’s dynamic Equation can be expressed as:
m a y = F y f + F y r = C f α f + C r α r = C f φ ˙ a + v y v x δ f + C r v y φ ˙ b v x I z φ ¨ = a F y f b F y r = a C f α f b C r α r = a C f φ ˙ a + v y v x δ f b C r v y φ ˙ b v x
where m is the mass of the entire vehicle; F y f and F y r are the lateral forces of the front and rear wheels, respectively; I z is the rotational inertia of the vehicle around the Z-axis; φ ˙ is the vehicle’s yaw rate; a and b are the distances from the center of mass of the vehicle to the front and rear axles, respectively, C f and C r are the lateral stiffness of the front and rear wheels, respectively; v x is the longitudinal speed of the vehicle; v y is the lateral velocity of the vehicle.
Define y ˙ = v y to get the vehicle dynamics model:
y ¨ φ ¨ = C f + C r m v x a C f b C r m v x v x a C f b C r I z v x a 2 C f + b 2 C r I z v x y ˙ φ ˙ + C f m a C f I z δ f

3.1.2. Path Tracking Error Model

When an autonomous vehicle is tracking a reference path, it will mainly experience lateral error and heading angle error. As shown in Figure 8, the shortest distance between the vehicle’s center of mass and the reference path projection point is defined as the lateral error e d . The difference between the vehicle’s actual heading angle θ and the reference heading angle θ r is defined as the heading angle error e θ . For convenience of calculation, it is assumed that the vehicle’s center of mass has a lateral deviation angle β = 0 , and the vehicle’s heading angle error is e φ = φ θ r . In actual control, the controller is required to eliminate these two errors in real time to enable the vehicle to track the planned path in real time. Based on the lateral error and heading angle error, the first-order derivatives of lateral error e ˙ d and heading angle error e ˙ φ can be calculated.
e ˙ d = v x e φ + v y
e ˙ φ = φ ˙ φ ˙ r
Combining Equation (23), the second-order derivative of the lateral error e ¨ d and the second-order derivative of the heading angle error e ¨ φ can be obtained.
e ¨ d = C f + C r m v x e ˙ d + C f + C r m e φ + a C f b C r m v x e ˙ φ + a C f b C r m v x v x θ ˙ r + C f m δ f
e ¨ φ = a C f b C r I z v x e ˙ d + a C f b C r I z e φ + a 2 C f + b 2 C r I z v x e ˙ φ + a 2 C f + b 2 C r I z v x θ ˙ r + a C f I z δ f
Further transformations on the above formula result in the following state-space Equations for the lateral and heading errors in the steering process of autonomous driving vehicles:
e ˙ d e ¨ d e ˙ φ e ¨ φ = 0 1 0 0 0 C f + C r m v x C f + C r m a C f b C r m v x 0 0 0 1 0 a C f b C r I z v x a C f b C r I z a 2 C f + b 2 C r I z v x e d e ˙ d e p e ˙ φ + 0 C f m 0 a C f I z δ f + 0 a C f b C r m v x v x 0 a 2 C f + b 2 C r I z v x θ ˙ r
Then the state space Equation about the tracking error of vehicle dynamics can be obtained:
X ˙ = A X + B U + C θ ˙ r .
In practical applications, we frequently work with discrete data, and the path generated by the path planning algorithm described earlier consists of a series of reference points rather than a continuous path. Hence, we opt for discrete LQR control. To design a discrete LQR controller, we discretize Equation (31) by ignoring the impact of the C θ ˙ r term, resulting in the state space Equation for discrete vehicle tracking errors.
X k + 1 = A ¯ X k + B ¯ U k
where: A ¯ = I A d t 2 1 I + A d t 2 ; B ¯ = B d t .

3.2. Design of LQR Path Tracking Controller Based on Particle Swarm Optimization

The overall structure of the path-tracking controller is shown in Figure 9. Firstly, based on the path tracking error model, an LQR controller is designed as the central part of the path-tracking controller so that the vehicle can travel along the reference path; on this basis, the particle swarm optimization algorithm is used to optimize the weight matrices Q and R of the LQR controller to improve its performance, and a feedforward control method is used as the steering angle compensation to eliminate the steady-state error of the system and further optimize the path tracking effect.

3.2.1. LQR Controller Design

LQR is an optimization problem that minimizes the performance objective function under given constraints and obtains the optimal feedback control by solving the corresponding algebraic Riccati Equation [37]. Its advantage in autonomous driving path tracking control is that when the system state deviates from the steady state due to obstacles or unexpected events, it can ensure that the vehicle tracking control system approaches the ideal path without causing too much computational workload. The LQR control problem of the vehicle lateral path tracking controller can be expressed as:
min J = k = 0 X k T Q X k + U k T R U k
Q = diag q 1 , q 2 , q 3 , q 4
R = [ q 5 ]
where X denotes the system’s state variable, while U represents its control variable. The weighted matrix Q indicates the level of emphasis placed on the corresponding control target in terms of state error representation. The weight matrix of the control variable is denoted by R . The weight coefficients for lateral error, the lateral error rate of change, heading error, and the heading error rate of change are, respectively, represented by q 1 , q 2 , q 3 , q 4 . The weight coefficient of the front wheel steering angle is given by q 5 . These weight coefficients reflect the relative importance of the variables. Larger values correspond to faster convergence of the related state variable towards the target value.
Then, the Lagrange multiplier method is used to construct the constrained optimization problem for solving extreme values. The cost function under constraint conditions is:
J = k = 0 n 1 X k T Q X k + U k T R U k + λ k + 1 T A ¯ X k + B ¯ U k λ k + 1 T X k + 1 + X n T Q X n .
The constructed Hamiltonian function H k = X k T Q X k + U k T R U k + λ k + 1 T A ¯ X k + B ¯ U k , Equation (34) can be simplified as:
J = k = 0 n 1 H k λ k T X k + X n T Q X n λ n T X n .
The control quantity of LQR obtained by solving the extreme value of Equation (35) is:
U k = R + B ¯ T P B ¯ 1 B ¯ T P A ¯ X k
where P is obtained by calculating Riccati Equation P k 1 = Q + A ¯ T P k I + B ¯ R 1 B ¯ T P k 1 A ¯ .
Equation (36) can be simplified as:
U k = k X k
where k = [ k 1 , k 2 , k 3 , k 4 ] is the result of the LQR controller and also the feedback coefficient of the front wheel angle.

3.2.2. Feedforward Control

By bringing Equation (37) into Equation (29), it can be obtained that:
X ˙ = ( A B k ) X + C θ ˙ r
At this point, no matter what value k takes, X ˙ cannot be zero. If only LQR feedback control is used, there will be a constant steady-state error; Therefore, we remove the influence of the C θ ˙ r term by introducing a feedforward control variable δ f f , and the system control variable after adding feedforward control is:
U = k X + δ f f
When X ˙ = 0 , the expression for the state variable of the system without steady-state error is:
X = ( A B k ) 1 A B δ f f + C θ ˙ r
From Equation (40), it can be concluded that in order to achieve the optimal control effect, it is necessary to calculate the appropriate δ f f , so that the steady-state error of the system is 0. Based on Equation (28), the steady-state error Equation of the system is calculated as follows:
e d e ˙ d e φ e ˙ φ = 1 k 1 δ f f θ ˙ r v x a + b b k 3 m v x 2 a + b b C f + a C r k 3 a C r 0 θ ˙ r v x b + a a + b m v x 2 C r 0
According to Equation (41), it can be seen that:
e φ = θ ˙ r v x b + a a + b m v x 2 C r = β .
In the previous text, for the convenience of calculation, assuming that the lateral deviation angle of the vehicle’s center of mass is β = 0 , the heading angle error of the vehicle is e φ = φ θ r but e θ = φ + β θ r = 0 , so the heading error can be directly eliminated. If you want the lateral error e d = 0 , the feedforward control quantity δ f f is:
δ f f = ρ a + b b k 3 m v x 2 a + b b C f + a C r k 3 a C r
where ρ = θ ˙ r v x is the path curvature.

3.3. Optimization of LQR Controller Based on Particle Swarm Optimization Algorithm

PSO (particle swarm optimization) is widely used in parameter optimization problems because of its simplicity and fast convergence [38,39,40]. In the PSO algorithm, the optimization problem is transformed into a search problem for the optimal solution, which is easy to implement and has global search ability. The PSO algorithm finds the optimal LQR weight matrix by conducting a global search in the search space, further improving the control system’s performance. Figure 10 shows the algorithm flowchart of applying PSO to optimize the LQR weight matrix.
Firstly, the parameters required for the LQR algorithm need to be configured, followed by the initialization of the position and velocity of particles, including the initial value of the LQR weight matrix, which should be randomly generated within a feasible range. Then, the control quantity of LQR is calculated using the generated weight matrix Q and R, and the Simulink model is called to calculate relevant parameters. The fitness function of each particle is obtained by calculating the fitness function based on the parameters obtained from running the model. The fitness function is a vital component of the particle swarm algorithm. Taking into account the characteristics of autonomous driving vehicles and driving scenarios and considering the relationship between the frequency domain and time domain, this study designed a fitness function F based on the sum of the integral time multiplied by the absolute error (ITAE) of lateral error e d , heading error e φ , roll angle velocity φ ˙ , and lateral acceleration a y , to simultaneously consider path tracking accuracy and vehicle stability.
min F = 0 T t e d ( t ) d t + 0 T t e φ ( t ) d t + 0 T t φ ˙ ( t ) d t + 0 T t a y ( t ) d t
Then, for each particle, find its best solution: the position and weight matrix with the smallest fitness value. Find the current global best solution, which is the position and weight matrix with the smallest fitness value among all particles, and update the velocity and position of each particle based on Equation (45):
V i ( t + 1 ) = ω V ( t ) i + c 1 r 1 p best _ i   X i ( t ) + c 2 r 2 g best   X i ( t ) X i ( t + 1 ) = X i ( t ) + V i ( t + 1 )
where V i ( t ) and X i ( t ) are the velocity and position of the i -th particle in the t -th iteration, p best _ i   is the personal optimal solution of the i -th particle, g best   is the current global optimal solution, ω is the inertia factor, c 1 and c 2 are learning factors, r 1 and r 2 are random numbers between [0, 1].
Loop until the specified termination criterion is reached, and output the current global optimal solution and the optimal value of the LQR Weight Matrix, as shown in Table 1.

4. Simulation Analysis

4.1. Simulation Analysis of Path Planning

Simulations were performed using Matlab 2020(b) (sourced from MathWorks, a company located in Natick, MA, United States) on a Windows 10 computer with an Intel Core i7-12700F CPU and 32 G RAM. This paper compares the simulation results of four algorithms, RRT*, Goal-Biased RRT*, P-RRT*, and Improved-RRT*, for three Map scenarios. The Improved-RRT* algorithm exhibits fast convergence, short planning time, and high security of the planned path. The simulated Maps are 2D environments, with Map 1 and 3 having dimensions of 7 m × 100 m and Map 2 having dimensions of 7 m × 120 m, representing three different scenarios. As shown in Figure 11, in the simulation, the vehicle starts at the starting point in rose red and ends at the endpoint in blue. The obstacle vehicles and road boundaries are represented in dark green, the blue line indicates the sampling process, and the red line indicates the final generated path. Each method was tried 30 times in each Map situation to remove the influence of randomness, and the average result was calculated. The results include the average path length, average path search time, average number of iterations, and average memory consumption, which are recorded and presented in Table 2, Table 3 and Table 4, respectively.
Map 1 depicts a two-lane changing scenario where the vehicle must avoid three obstacles on the right lane and switch to the left lane. As shown in Figure 11a, the original RRT* algorithm employs full-state space random sampling, generating unnecessary sampling processes and resulting in a longer and more tortuous path. Figure 11b displays the simulation results of the Goal-Biased-RRT* algorithm, which significantly reduces the sampling process and improves the search efficiency by incorporating a target bias strategy. Figure 11c shows the simulation results of the P-RRT* algorithm, which enhances search speed and simplifies redundant nodes by adding attractive field constraints. However, it still generates redundant nodes around obstacles due to the lack of obstacle exclusion effect. In contrast, Figure 11d illustrates the Improved-RRT* algorithm, which restricts the variable sampling area and introduces an improved APF algorithm to enhance search efficiency. Although the path length of the Improved-RRT* algorithm does not show a significant advantage compared to the previous algorithms, the distance between the path and obstacles has a certain safety margin, thus improving the path safety.
By analyzing the data in Table 2, the path length of the proposed algorithm is 1.67% shorter than that of the original RRT* algorithm. Compared with the P-RRT* algorithm, the average running time and iteration times are reduced by 29.13% and 33.24%, respectively, and reduces memory consumption by about 15.8%. The results demonstrate that the proposed algorithm can significantly reduce the number of random points, improve the convergence speed, and ensure algorithm stability.
Map 2 depicts a passing scenario in a double-lane road, where the vehicle needs to pass a single obstacle on the right lane and also avoid two obstacles on the left lane, requiring two lane changes to complete the passing maneuver. The simulation results are shown in Figure 12. It can be seen that for such a complex environment, the advantages of the proposed algorithm are more evident. Although the reduction in path length compared to other methods is relatively small, the paths generated by other methods are not good and too close to the obstacle cars, with a low safety margin. As shown in Figure 12d, the improved algorithm proposed in this paper plans a smoother path in this scenario, with a greater distance from the obstacle cars and a higher level of safety. It also reduces the large number of redundant nodes, shortening the search time. Analyzing the data in Table 3, the new algorithm reduces the average path length by 0.96% compared to the original RRT* algorithm. Compared with the P-RRT* algorithm, the average running time is reduced by 39.67%, the average number of iterations is reduced by 34.69%, and the algorithm memory consumption is reduced by 18.4%. Therefore, the proposed algorithm can significantly reduce unnecessary sampling processes and iterations, demonstrating its stability.
The Map 3 scenario is mainly used to verify the effectiveness of the improved algorithm in this paper under different obstacle sizes and shapes, and the simulation results are shown in Figure 13. On the same road as Map 1, obstacles of different sizes and shapes appear, and the proposed improved algorithm is still practical for such a complex environment. The improved algorithm in this paper can still plan the path with a high safety factor while the redundant nodes are significantly reduced, and the path search speed is accelerated. According to the data analysis in Table 4, the average path length planned by the improved algorithm is 2.14% less than that of the RRT* algorithm. Compared with the P-RRT* algorithm, the average running time of the improved algorithm is reduced by 34.56%, the average number of iterations is reduced by 37.31%, and the memory consumption is reduced by 16.4%. The proposed algorithm still performs well in the face of obstacles of different sizes and shapes.
In the simulations of the three Map scenarios shown in Figure 11, Figure 12 and Figure 13, although the improved RRT* algorithm generates the base path, there are problems such as too many path points, too long path length, and too large path curvature, which do not meet the driving conditions of autonomous vehicles and are not the required optimal paths. Therefore, in this study, the path generated by the improved algorithm was optimized using path pruning based on the maximum steering angle of the vehicle and the third-order B-spline algorithm. The optimization results are shown in Figure 14. The red path represents the initially generated path, while the green path represents the trimmed path, and it can be seen that the redundant points in the path have been reduced. The black path represents the optimized final, whose curvature is shown in Figure 15. The path curvature after path optimization in all three Map scenarios is continuous and can meet the vehicle driving requirements.

4.2. Simulation Analysis of Path Tracking Control

The effectiveness and adaptability of the proposed path planning algorithm and path tracking control strategy were verified through joint simulation experiments using CarSim and MATLAB/Simulink. The main parameters of the vehicle are shown in Table 5. To validate the feasibility of the planned path and the effectiveness of the tracking control strategy, the planned paths in two different Map scenarios were tested for path tracking. As the driving environment was a normal urban road with well-dried asphalt surfaces, the road adhesion coefficient was set to 0.8 in this study.
The performance of the PSO-optimized LQR path tracking controller was first verified by using the two paths planned in this paper. Simulation tests were conducted at speeds of 10 m/s and 20 m/s for both LQR and PSO-optimized LQR controllers, and representative parameters were selected for comparison. The results are shown in Figure 16 and Figure 17.
Figure 16 describes the tracking performance of the LQR controller and the PSO-optimized LQR controller under the path of Map 1 at speeds of 10 m/s and 20 m/s. According to parts (a) and (c), the maximum lateral tracking error of the LQR controller can be controlled to within 0.13 m at different speeds, and the PSO-LQR is reduced by about 54% compared to it. Parts (b) and (d) provide the analysis of the overall vehicle stability. When the longitudinal speed is 10 m/s, there is not much difference in the stability of LQR before and after optimization. However, when the speed is increased to 20 m/s, the overall vehicle stability under PSO-optimized LQR control is significantly better.
Figure 17 describes the tracking performance of the LQR controller and PSO-optimized LQR controller under two speeds, 10 m/s, and 20 m/s, on the path of Map 2. Perfect driving in the double-lane scenario is challenging, and both control algorithms have some errors in turns with large curvatures. However, the PSO-optimized LQR controller has a more minor lateral error, and the vehicle can quickly correct the current state when the error is large. By comparing parts (a) and (c), the maximum lateral tracking error of the LQR controller at different speeds in both paths can be controlled within 0.14 m. For the PSO-optimized LQR controller, it is reduced by about 64% to 0.05 m. This indicates that the improved LQR controller can more effectively reduce errors and keep the vehicle in a safe state when the tracking error is large. Similarly, at a speed of 20 m/s, parts (b) and (d) show that the whole vehicle stability under the PSO-optimized LQR controller is higher.
To verify the feasibility of the planned paths and to investigate the accuracy and stability of the improved LQR controller in terms of speed, two planned paths were tracked and tested at three different vehicle speeds. The simulation results are shown in Figure 18 and Figure 19.
A vehicle speed of 20 m/s was added to the first two simulated speeds to better validate the tracking performance of the PSO-LQR tracking controller. The simulation results are presented in Figure 18 and Figure 19. Figure 18a and Figure 19a demonstrate that the vehicle can effectively follow the planned path at all speeds, indicating the robustness of the controller. Figure 18b,c and Figure 19c show that the lateral position tracking error increases with speed; however, the lateral position errors at different paths and speeds can be controlled within 0.06 m, which is within the acceptable range and performs well. Similarly, Figure 18d and Figure 19d indicate that the yaw tracking error can be controlled within 0.05 rad at different speeds, and the differences are insignificant, suggesting that the vehicle’s tracking process is relatively stable. Figure 18b,e,f, and Figure 19b,e,f, describe that as the speed increases, the changes in lateral acceleration, front-wheel steering angle, and yaw rate become greater. Still, the front-wheel angle and lateral acceleration at different speeds do not have any step changes, and the yaw rate can be controlled within an acceptable range, indicating that the tracking process is relatively stable. Overall, the PSO-optimized LQR controller’s robustness, accuracy, and stability are acceptable at speeds that are not too fast. The planned paths meet the tracking requirements of autonomous vehicles and achieve good tracking performance at different speeds.

5. Conclusions

To address the slow convergence and randomness of the RRT* algorithm and the relatively empirical selection of the weight matrix of the LQR algorithm. This paper proposes a framework to improve the RRT* and PSO-LQR algorithms for path planning and tracking control of self-driving vehicles under ordinary urban road conditions. The framework employs a variable sampling area to limit the generation of random sampling points. Moreover, an improved artificial potential field method is integrated into the RRT* algorithm to improve its convergence speed. The path optimization is then performed using path pruning based on the vehicle’s maximum steering angle constraint and the three-time B-spline algorithm to obtain curvature-continuous paths. The simulation results of the average three Map scenarios show that the improved RRT* algorithm optimizes 34.45%, 35.08%, and 16.87% of the path search time, iteration number, and memory consumption, respectively, compared with P-RRT*, demonstrating the significant advantages of the improved algorithm. In addition, the final path optimized by the path optimization algorithm is smooth and curvature continuous, which satisfies the path tracking requirements. In the path-tracking stage, the PSO algorithm optimizes the LQR weight matrix and adds feedforward control compensation to improve the path-tracking accuracy. According to the simulation results under two different paths, the path tracking accuracy of the PSO-LQR path tracking controller is improved by 59% compared with the conventional LQR, and its robustness is also significantly improved. In addition, by comparing the tracking effects under different vehicle speeds, the path tracking errors can all be controlled within 0.06 m, which verifies the effectiveness of the proposed path planning and trajectory tracking framework.
However, further research is required to investigate and address the deployment of the proposed path planning algorithm and tracking control strategy for accurate vehicle testing. In future work, the integration of machine learning and intelligent optimization algorithms into path planning and path tracking control research will be emphasized to develop faster and safer path planners and more precise and efficient path tracking controllers.

Author Contributions

Conceptualization, Y.Z. and F.G.; methodology, Y.Z. and F.G.; software, F.G. and F.Z.; validation, F.Z. and F.G.; formal analysis, Y.Z. and F.G.; investigation, F.Z.; resources, F.G.; data curation, F.G.; funding acquisition, Y.Z. and F.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Industrial Proactive and Key Technology Program of Jiangsu Province (Grant number BE2022053-2), the Modern Agriculture-Key and General Program of Jiangsu Province (Grant number BE2021339), the Philosophy and Social Science Program of the Higher Education Institutions of Jiangsu Province (Grant number 2021SJA0151), and the Science and Technology Innovation Foundation for Young Scientists of Nanjing Forestry University (Grant number CX2019018).

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Lv, Z.; Shang, W. Impacts of Intelligent Transportation Systems on Energy Conservation and Emission Reduction of Transport Systems: A Comprehensive Review. Green Technol. Sustain. 2023, 1, 100002. [Google Scholar] [CrossRef]
  2. Yang, H.; Zheng, C.; Zhao, Y.; Wu, Z. Integrating the Intelligent Driver Model With the Action Point Paradigm to Enhance the Performance of Autonomous Driving. IEEE Access 2020, 8, 106284–106295. [Google Scholar] [CrossRef]
  3. Khaled Ahmed, S.; Mohammed Ali, R.; Maha Lashin, M.; Fayroz Sherif, F. Designing a New Fast Solution to Control Isolation Rooms in Hospitals Depending on Artificial Intelligence Decision. Biomed. Signal Process. Control 2023, 79, 104100. [Google Scholar] [CrossRef]
  4. Talavera, E.; Díaz-Álvarez, A.; Naranjo, J.E.; Olaverri-Monreal, C. Autonomous Vehicles Technological Trends. Electronics 2021, 10, 1207. [Google Scholar] [CrossRef]
  5. Sun, Y.; Ren, D.; Lian, S.; Fu, S.; Teng, X.; Fan, M. Robust Path Planner for Autonomous Vehicles on Roads with Large Curvature. IEEE Robot. Autom. Lett. 2022, 7, 2503–2510. [Google Scholar] [CrossRef]
  6. bt Mohd Shamsuddin, P.N.F.; bin Mansor, M.A. Motion Control Algorithm for Path Following and Trajectory Tracking for Unmanned Surface Vehicle: A Review Paper. In Proceedings of the 2018 3rd International Conference on Control, Robotics and Cybernetics (CRC), Penang, Malaysia, 26–28 September 2018; pp. 73–77. [Google Scholar]
  7. González, D.; Pérez, J.; Milanés, V.; Nashashibi, F. A Review of Motion Planning Techniques for Automated Vehicles. IEEE Trans. Intell. Transp. Syst. 2016, 17, 1135–1145. [Google Scholar] [CrossRef]
  8. Bresciani, M.; Ruscio, F.; Tani, S.; Peralta, G.; Timperi, A.; Guerrero-Font, E.; Bonin-Font, F.; Caiti, A.; Costanzi, R. Path Planning for Underwater Information Gathering Based on Genetic Algorithms and Data Stochastic Models. J. Mar. Sci. Eng. 2021, 9, 1183. [Google Scholar] [CrossRef]
  9. Zhao, P.; Chang, Y.; Wu, W.; Luo, H.; Zhou, Z.; Qiao, Y.; Li, Y.; Zhao, C.; Huang, Z.; Liu, B.; et al. Dynamic RRT: Fast Feasible Path Planning in Randomly Distributed Obstacle Environments. J. Intell. Robot. Syst. 2023, 107, 48. [Google Scholar] [CrossRef]
  10. Jin, X.; Yan, Z.; Yang, H.; Wang, Q.; Yin, G. A Goal-Biased RRT Path Planning Approach for Autonomous Ground Vehicle. In Proceedings of the 2020 4th CAA International Conference on Vehicular Control and Intelligence (CVCI), Hangzhou, China, 18–20 December 2020; pp. 743–746. [Google Scholar]
  11. Zhu, Y.; Tang, Y.; Zhang, Y.; Huang, Y. Path Planning of Manipulator Based on Improved RRT-Connect Algorithm. In Proceedings of the 2021 2nd International Conference on Big Data & Artificial Intelligence & Software Engineering (ICBASE), Zhuhai, China, 24–26 September 2021; pp. 44–47. [Google Scholar]
  12. Dai, J.; Zhang, Y.; Deng, H. Novel Potential Guided Bidirectional RRT* with Direct Connection Strategy for Path Planning of Redundant Robot Manipulators in Joint Space. IEEE Trans. Ind. Electron. 2023, 1–10. [Google Scholar] [CrossRef]
  13. Gammell, J.D.; Srinivasa, S.S.; Barfoot, T.D. Informed RRT*: Optimal Sampling-Based Path Planning Focused via Direct Sampling of an Admissible Ellipsoidal Heuristic. In Proceedings of the 2014 IEEE/RSJ International Conference on Intelligent Robots and Systems, Chicago, IL, USA, 14–18 September 2014; pp. 2997–3004. [Google Scholar]
  14. Qureshi, A.H.; Ayaz, Y. Potential Functions Based Sampling Heuristic for Optimal Path Planning. Auton. Robot. 2016, 40, 1079–1093. [Google Scholar] [CrossRef] [Green Version]
  15. Chen, Z.; Yu, J.; Zhao, Z.; Wang, X.; Chen, Y. A Path-Planning Method Considering Environmental Disturbance Based on VPF-RRT*. Drones 2023, 7, 145. [Google Scholar] [CrossRef]
  16. Fan, J.; Chen, X.; Liang, X. UAV Trajectory Planning Based on Bi-Directional APF-RRT* Algorithm with Goal-Biased. Expert Syst. Appl. 2023, 213, 119137. [Google Scholar] [CrossRef]
  17. Ayawli, B.B.K.; Mei, X.; Shen, M.; Appiah, A.Y.; Kyeremeh, F. Optimized RRT-A* Path Planning Method for Mobile Robots in Partially Known Environment. Inf. Technol. Control 2019, 48, 179–194. [Google Scholar] [CrossRef] [Green Version]
  18. Ghosh, D.; Nandakumar, G.; Narayanan, K.; Honkote, V.; Sharma, S. Kinematic Constraints Based Bi-Directional RRT (KB-RRT) with Parameterized Trajectories for Robot Path Planning in Cluttered Environment. In Proceedings of the 2019 International Conference on Robotics and Automation (ICRA), Montreal, QC, Canada, 20–24 May 2019; pp. 8627–8633. [Google Scholar]
  19. Peng, J.; Chen, Y.; Duan, Y.; Zhang, Y.; Ji, J.; Zhang, Y. Towards an Online RRT-Based Path Planning Algorithm for Ackermann-Steering Vehicles. In Proceedings of the 2021 IEEE International Conference on Robotics and Automation (ICRA), Xi’an, China, 30 May–5 June 2021; pp. 7407–7413. [Google Scholar]
  20. Liao, B.; Hua, Y.; Wan, F.; Zhu, S.; Zong, Y.; Qing, X. Stack-RRT*: A Random Tree Expansion Algorithm for Smooth Path Planning. Int. J. Control Autom. Syst. 2023, 21, 993–1004. [Google Scholar] [CrossRef]
  21. Li, H.; Luo, J.; Yan, S.; Zhu, M.; Hu, Q.; Liu, Z. Research on Parking Control of Bus Based on Improved Pure Pursuit Algorithms. In Proceedings of the 2019 18th International Symposium on Distributed Computing and Applications for Business Engineering and Science (DCABES), Wuhan, China, 8–10 November 2019; pp. 21–26. [Google Scholar]
  22. Wang, L.; Zhai, Z.; Zhu, Z.; Mao, E. Path Tracking Control of an Autonomous Tractor Using Improved Stanley Controller Optimized with Multiple-Population Genetic Algorithm. Actuators 2022, 11, 22. [Google Scholar] [CrossRef]
  23. Yao, J.; Ge, Z. Path-Tracking Control Strategy of Unmanned Vehicle Based on DDPG Algorithm. Sensors 2022, 22, 7881. [Google Scholar] [CrossRef]
  24. Rupp, A.; Stolz, M. Survey on Control Schemes for Automated Driving on Highways. In Automated Driving: Safer and More Efficient Future Driving; Watzenig, D., Horn, M., Eds.; Springer International Publishing: Cham, Switzerland, 2017; pp. 43–69. ISBN 978-3-319-31895-0. [Google Scholar]
  25. Hu, C.; Chen, Y.; Wang, J. Fuzzy Observer-Based Transitional Path-Tracking Control for Autonomous Vehicles. IEEE Trans. Intell. Transp. Syst. 2021, 22, 3078–3088. [Google Scholar] [CrossRef]
  26. Wu, Y.; Wang, L.; Zhang, J.; Li, F. Path Following Control of Autonomous Ground Vehicle Based on Nonsingular Terminal Sliding Mode and Active Disturbance Rejection Control. IEEE Trans. Veh. Technol. 2019, 68, 6379–6390. [Google Scholar] [CrossRef]
  27. Tian, J.; Yang, M. Research on Trajectory Tracking and Body Attitude Control of Autonomous Ground Vehicle Based on Differential Steering. PLoS ONE 2023, 18, e02732552023. [Google Scholar] [CrossRef]
  28. Tian, J.; Zeng, Q.; Wang, P.; Wang, X. Active Steering Control Based on Preview Theory for Articulated Heavy Vehicles. PLoS ONE 2021, 16, e02520982021. [Google Scholar] [CrossRef]
  29. Kapania, N.R.; Gerdes, J.C. Design of a Feedback-Feedforward Steering Controller for Accurate Path Tracking and Stability at the Limits of Handling. Veh. Syst. Dyn. 2015, 53, 1687–1704. [Google Scholar] [CrossRef] [Green Version]
  30. Xu, S.; Peng, H. Design, Analysis, and Experiments of Preview Path Tracking Control for Autonomous Vehicles. IEEE Trans. Intell. Transp. Syst. 2020, 21, 48–58. [Google Scholar] [CrossRef]
  31. Yang, T.; Bai, Z.; Li, Z.; Feng, N.; Chen, L. Intelligent Vehicle Lateral Control Method Based on Feedforward + Predictive LQR Algorithm. Actuators 2021, 10, 228. [Google Scholar] [CrossRef]
  32. Lu, A.; Lu, Z.; Li, R.; Tian, G. Adaptive LQR Path Tracking Control for 4WS Electric Vehicles Based on Genetic Algorithm. In Proceedings of the 2022 6th CAA International Conference on Vehicular Control and Intelligence (CVCI), Nanjing, China, 28–30 October 2022; pp. 1–6. [Google Scholar]
  33. Wang, Z.; Sun, K.; Ma, S.; Sun, L.; Gao, W.; Dong, Z. Improved Linear Quadratic Regulator Lateral Path Tracking Approach Based on a Real-Time Updated Algorithm with Fuzzy Control and Cosine Similarity for Autonomous Vehicles. Electronics 2022, 11, 3703. [Google Scholar] [CrossRef]
  34. Zhang, J.; Wang, H.; Zheng, J.; Cao, Z.; Man, Z.; Yu, M.; Chen, L. Adaptive Sliding Mode-Based Lateral Stability Control of Steer-by-Wire Vehicles With Experimental Validations. IEEE Trans. Veh. Technol. 2020, 69, 9589–9600. [Google Scholar] [CrossRef]
  35. Li, B.L.; Zeng, L. Fractional Calculus Control of Road Vehicle Lateral Stability after a Tire Blowout. Mechanika 2021, 27, 475–482. [Google Scholar] [CrossRef]
  36. Pacejka, H.B.; Besselink, I.J.M. Magic Formula Tyre Model with Transient Properties. Veh. Syst. Dyn. 1997, 27, 234–249. [Google Scholar] [CrossRef]
  37. Hou, Y.; Xu, X. High-Speed Lateral Stability and Trajectory Tracking Performance for a Tractor-Semitrailer with Active Trailer Steering. PLoS ONE 2022, 17, e02773582022. [Google Scholar] [CrossRef]
  38. Li, Y.; Ma, Z.; Zheng, M.; Li, D.; Lu, Z.; Xu, B. Performance Analysis and Optimization of a High-Temperature PEMFC Vehicle Based on Particle Swarm Optimization Algorithm. Membranes 2021, 11, 691. [Google Scholar] [CrossRef]
  39. Xu, X.; Lin, P. Parameter Identification of Sound Absorption Model of Porous Materials Based on Modified Particle Swarm Optimization Algorithm. PLoS ONE 2021, 16, e02509502021. [Google Scholar] [CrossRef]
  40. Cheng, Z.; Lu, Z. Regression-Based Correction and I-PSO-Based Optimization of HMCVT’s Speed Regulating Characteristics for Agricultural Machinery. Agriculture 2022, 12, 580. [Google Scholar] [CrossRef]
Figure 1. Vehicle kinematic model.
Figure 1. Vehicle kinematic model.
Processes 11 01841 g001
Figure 2. Improved RRT* algorithm flow chart.
Figure 2. Improved RRT* algorithm flow chart.
Processes 11 01841 g002
Figure 3. Schematic diagram of the variable sampling interval.
Figure 3. Schematic diagram of the variable sampling interval.
Processes 11 01841 g003
Figure 4. Schematic diagram of road boundary constraints.
Figure 4. Schematic diagram of road boundary constraints.
Processes 11 01841 g004
Figure 5. Force analysis diagram of the nearest node.
Figure 5. Force analysis diagram of the nearest node.
Processes 11 01841 g005
Figure 6. Path clipping based on vehicle maximum turning angle constraint.
Figure 6. Path clipping based on vehicle maximum turning angle constraint.
Processes 11 01841 g006
Figure 7. Vehicle dynamics model.
Figure 7. Vehicle dynamics model.
Processes 11 01841 g007
Figure 8. Path tracking model.
Figure 8. Path tracking model.
Processes 11 01841 g008
Figure 9. Path tracking controller framework.
Figure 9. Path tracking controller framework.
Processes 11 01841 g009
Figure 10. Flow chart of particle swarm optimization LQR algorithm.
Figure 10. Flow chart of particle swarm optimization LQR algorithm.
Processes 11 01841 g010
Figure 11. Comparison of path search results in the Map 1 scenario. (a) RRT* path search results; (b) Goal Biased RRT* path search results; (c) P-RRT* path search results; (d) Improved RRT* path search results.
Figure 11. Comparison of path search results in the Map 1 scenario. (a) RRT* path search results; (b) Goal Biased RRT* path search results; (c) P-RRT* path search results; (d) Improved RRT* path search results.
Processes 11 01841 g011
Figure 12. Comparison of path search results in the Map 2 scenario. (a) RRT* path search results; (b) Goal Biased RRT* path search results; (c) P-RRT* path search results; (d) Improved RRT* path search results.
Figure 12. Comparison of path search results in the Map 2 scenario. (a) RRT* path search results; (b) Goal Biased RRT* path search results; (c) P-RRT* path search results; (d) Improved RRT* path search results.
Processes 11 01841 g012
Figure 13. Comparison of path search results in the Map 3 scenario. (a) RRT* path search results; (b) Goal Biased RRT* path search results; (c) P-RRT* path search results; (d) Improved RRT* path search results.
Figure 13. Comparison of path search results in the Map 3 scenario. (a) RRT* path search results; (b) Goal Biased RRT* path search results; (c) P-RRT* path search results; (d) Improved RRT* path search results.
Processes 11 01841 g013
Figure 14. Path optimization in the two Map scenarios. (a) The path optimization process under Map 1; (b) the path optimization process under Map 2; (c) the path optimization process under Map 3.
Figure 14. Path optimization in the two Map scenarios. (a) The path optimization process under Map 1; (b) the path optimization process under Map 2; (c) the path optimization process under Map 3.
Processes 11 01841 g014
Figure 15. The curvature of optimized paths in the two Map scenarios. (a) Optimized path curvature under Map 1; (b) optimized path curvature under Map 2; (c) optimized path curvature under Map 3.
Figure 15. The curvature of optimized paths in the two Map scenarios. (a) Optimized path curvature under Map 1; (b) optimized path curvature under Map 2; (c) optimized path curvature under Map 3.
Processes 11 01841 g015
Figure 16. Comparison of controller tracking effects under path 1. (a) Horizontal position tracking comparison; (b) comparison of lateral acceleration; (c) comparison of lateral errors; (d) compare the front wheel angles.
Figure 16. Comparison of controller tracking effects under path 1. (a) Horizontal position tracking comparison; (b) comparison of lateral acceleration; (c) comparison of lateral errors; (d) compare the front wheel angles.
Processes 11 01841 g016
Figure 17. Comparison of controller tracking effects under path 2. (a) Horizontal position tracking comparison; (b) comparison of lateral acceleration; (c) comparison of lateral errors; (d) compare the front wheel angles.
Figure 17. Comparison of controller tracking effects under path 2. (a) Horizontal position tracking comparison; (b) comparison of lateral acceleration; (c) comparison of lateral errors; (d) compare the front wheel angles.
Processes 11 01841 g017
Figure 18. Comparison of path tracking effects on Map 1 under three different speeds. (a) Horizontal position tracking comparison; (b) comparison of lateral acceleration; (c) comparison of lateral errors; (d) comparison of heading errors; (e) compare the front wheel angles; (f) comparison of yaw rate.
Figure 18. Comparison of path tracking effects on Map 1 under three different speeds. (a) Horizontal position tracking comparison; (b) comparison of lateral acceleration; (c) comparison of lateral errors; (d) comparison of heading errors; (e) compare the front wheel angles; (f) comparison of yaw rate.
Processes 11 01841 g018
Figure 19. Comparison of path tracking effects on Map 2 under three different speeds. (a) Horizontal position tracking comparison; (b) comparison of lateral acceleration; (c) comparison of lateral errors; (d) comparison of heading errors; (e) compare the front wheel angles; (f) comparison of yaw rate.
Figure 19. Comparison of path tracking effects on Map 2 under three different speeds. (a) Horizontal position tracking comparison; (b) comparison of lateral acceleration; (c) comparison of lateral errors; (d) comparison of heading errors; (e) compare the front wheel angles; (f) comparison of yaw rate.
Processes 11 01841 g019
Table 1. Optimal values of LQR weight matrix.
Table 1. Optimal values of LQR weight matrix.
Longitudinal Velocity (m/s)QR
10diag [300 0.01 0.01 4.49]6.02
15diag [270.71 0.01 0.01 119.35]4.91
20diag [1.23 0.01 99.47 62.88]1.39
Table 2. Simulation data under Map 1.
Table 2. Simulation data under Map 1.
AlgorithmRRT*Goal-Biased-RRT*P-RRT*Improved-RRT*
Average path length (m)102.4621100.9605100.8112100.7826
Average running time (s)14.76447.06041.84541.3079
Average iterations480.8310.4219.3146.4
Average memory consumption (MB)44.333.126.622.4
Table 3. Simulation data under Map 2.
Table 3. Simulation data under Map 2.
AlgorithmRRT*Goal-Biased-RRT*P-RRT*Improved-RRT*
Average path length (m)122.3938121.5995121.2425121.2192
Average running time (s)16.881811.97012.86681.0641
Average iterations634.4401.8334.1218.2
Average memory consumption (MB)49.735.332.126.2
Table 4. Simulation data under Map 3.
Table 4. Simulation data under Map 3.
AlgorithmRRT*Goal-Biased-RRT*P-RRT*Improved-RRT*
Average path length (m)102.8306101.2469100.7349100.6376
Average running time (s)12.47308.01402.17271.4296
Average iterations518.5349.7282.5177.1
Average memory consumption (MB)47.434.129.324.5
Table 5. Main parameters of the vehicles.
Table 5. Main parameters of the vehicles.
Parameters/UnitsValue
Vehicle mass/kg1412
Distance from the center of mass to the front axis/mm1015
Distance from the center of mass to the rear axis/mm1895
Moment of inertia/kg·m21536.7
Front-wheel cornering stiffness/N/rad−148,970
Rear wheel cornering stiffness/N/rad−82,204
Wheelbase of the front axle/mm1675
Height of the center of mass/mm540
Effective radius of wheel/mm325
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhang, Y.; Gao, F.; Zhao, F. Research on Path Planning and Tracking Control of Autonomous Vehicles Based on Improved RRT* and PSO-LQR. Processes 2023, 11, 1841. https://doi.org/10.3390/pr11061841

AMA Style

Zhang Y, Gao F, Zhao F. Research on Path Planning and Tracking Control of Autonomous Vehicles Based on Improved RRT* and PSO-LQR. Processes. 2023; 11(6):1841. https://doi.org/10.3390/pr11061841

Chicago/Turabian Style

Zhang, Yong, Feng Gao, and Fengkui Zhao. 2023. "Research on Path Planning and Tracking Control of Autonomous Vehicles Based on Improved RRT* and PSO-LQR" Processes 11, no. 6: 1841. https://doi.org/10.3390/pr11061841

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop