# An MEC Architecture-Oriented Improved RRT Algorithm for Regional Trajectory Planning

Authors: Qingwen Han; Ziyun Huang; Lingqiu Zeng; Yunqu Wu; Lei Ye; Hui Zu; Yu Lei
Journal: Mobile Information Systems
 (2021)

---

## Abstract

Multi-access Edge Computing (MEC), which could provide real-time computing ability, is considered as an effective approach to improve performance of Vehicular Ad Hoc Network (VANET). MEC could process regional vehicles information and generate real-time road hazard features, which could be used to realize trajectory planning progress of vehicles. In this paper, an MEC-oriented VANET infrastructure is presented, and a road hazard feature-based trajectory planning method is proposed. Back Propagation (BP) neural network is employed to predict road hazard feature changing, while a hazard-based cost function is defined. Then, an improved Rapidly Exploring Random Tree (RRT) algorithm is proposed for novel regional trajectory planning. A joint simulation is done based on SUMO and NS3 platforms. Simulation results verify the effectiveness and stability of the proposed algorithm.


---

## Body

## 1. Introduction

The rapid development of V2X technology makes it possible to share real-time information among all traffic participants, such as vehicles, pedestrians, and public transportation facilities. V2X communication, which helps road drivers avoid potential threats by exchanging safe warning information, such as environment feature, bad driving state, etc., is considered as an important approach to improve road safety and driving safety [1]. Until now, most of autonomous driving systems are constructed based on active safe technology, which employ on-board sensors and cameras to collect corresponding information, such as road state, surrounding vehicle’s state, and pedestrian, to make real-time decision-making control [2]. However, road test results show that active safe autonomous vehicles hardly adapt to complex road environment.Trajectory planning technique, which aims to find a collision-free path from an initial state to a goal state with optimal or near-optimal path cost, becomes one of useful applications in autonomous vehicles [3]. However, most of the current researches on the movement of vehicles is mainly in the micro and macro perspective; the former is mainly concerned about the movement of a single vehicle on the road but ignore the overall situation, while the latter is mainly concerned about road traffic state but ignore the relationship between road vehicles, both of which are difficult to achieve the regional vehicles trajectory planning. Obviously, if road vehicles look down from heaven with God’s eyes, namely, mesoscopic, they could get the characteristics of specific road section and generate a preset mesoscopic trajectory, which could greatly decrease computing burden of motion level control and enhance the real-time feature of autonomous control. The only question is how to get God’s perspective.Fortunately, alone with the development of VANET, both researchers and industries believe that Multi-access Edge Computing (MEC), which connects with RSU [1], is useful in getting road hazard distribution feature, which could be employed as basis of mesoscopic trajectory planning. Therefore, based on MEC architecture, most recent approaches for trajectory planning take on-road vehicle status into consideration. Under MEC architecture, mesoscopic trajectory generation progress includes two critical problems: dynamic road hazard feature evaluation and collision-free trajectory generation.In our previous work, an Ising model is proposed to divide the road into a finite number of adjacent grids that are used as the basic unit, which realize the evaluation of road hazard [4]. To get the dynamic feature of road hazard feature, in this paper, an Ising model-based hazard map generation method and a two-level BP neural network are employed to get the dynamic hazard feature of specific road segment, which is used as basic criteria for collision-free trajectory generation. Hence, in this paper, a dynamic road hazard distribution map-oriented regional trajectory planning method is presented; meanwhile, an improved RRT algorithm is proposed to generate mesoscopic trajectory.Specifically, the contributions of this paper are as follows:(i)
A road hazard feature-based trajectory planning method is proposed.(ii)
BP neural network is employed to predict road hazard feature changing, while a hazard-based cost function is defined.(iii)
An improved RRT algorithm is proposed for novel regional trajectory planning.The rest of this article is organized as follows. Section2 presents the related work, and Section 3 describes the MEC framework used in this paper. In Section 4, the road hazard distribution characteristic evaluation and prediction method is presented. The proposed trajectory planning algorithm is discussed in Section 5, while the corresponding experiment set and results analysis are given in Section 6. Finally, conclusions and future works are discussed in Section 7.


## 2. Related Work

In the past few years, many researchers have done a lot of researches in Advanced Driver Assistance Systems (ADAS) and Autonomous Driving (AD) functions design. They are devoted to assisting drivers in avoiding road risks by obtaining real-time status data of the driver, the vehicle, and the surrounding environment to improve driving safety and improve the vehicle track. Hence, vehicle trajectory planning-related technologies have attracted many researchers’ attention. In this section, we analyze related works from three aspects, which are network architecture, road hazard state evaluation and prediction, and collision-free trajectory generation.


### 2.1. Network Architecture

In the last decade, cloud computing, which aims at centralized computing, storage, and network management in the clouds [5], is considered as an effective approach to support intelligent applications. However, cloud computing could not satisfy the demand of time-critical applications, especially for intelligent connected vehicles. Hence, to meet the requirements of autonomous driving, literature [6] proposed an MEC-oriented architecture, which takes full advantage of roadside equipment and vehicle on-board equipment, to overcome the shortcomings of centralized cloud computing in terms of latency and throughput. MEC servers, which connect with RSUs, collect real-time vehicle information, execute corresponding processing task, and provide processing results to road vehicles [1]. In the literature [7], an MEC server is deployed at RSU to improve real-time feature and then could provide real-time service for autonomous vehicles, such as local driving trajectory. In literature [8], the authors discuss about the effectiveness and real-time feature of MEC framework and think that RSU-oriented MEC could provide real-time service for autonomous vehicles, such as local driving trajectory plan, regional vehicle distribution information sharing, etc. Hence, in this paper, we assume that vehicular network is feasible and road vehicle’s information can be efficiently accessed and processed by edge computing approach. Under the assumed condition, an MEC-oriented processing procedure is proposed to provide real-time service for autonomous vehicles, such as local driving trajectory plan, regional vehicle distribution information sharing, etc. [8].


### 2.2. Road Hazard State Evaluation and Prediction

For road hazard state evaluation and prediction, risk avoidance is one of the hot points that should be considered in the design of Advanced Driver Assistance Systems (ADAS) and Autonomous Driving (AD) functions. Due to the complex road environment, it is unfeasible to evaluate all possible states of the involved traffic participants [9]. Hence, a road hazard distribution map is proposed, which is useful to decision makers in ADAS/AD system [10].It is well known that a mesoscopic trajectory is decided by road grid hazard state on arrival time instead of present moment. That is said, we should consider not only current hazard state, but also the dynamic feature of hazard distribution map. Then, the performance of prediction method greatly influences effectiveness of output trajectory.Road hazard not only depends on the cruising features of ego-car, but also is influenced by the surrounding driving contexts, such as road condition, traffic density, regional average speed, surrounding traffic participants’ characteristics, etc. Eggert [11] proposed a microscopic risk model, which could estimate the risk that a dangerous event like an accident can happen within a future time interval, being useful to driving trajectory schedule. Moreover, he declares that predictive risk map is useful in driving strategy generation process. However, the risky probability is a statistic parameter, which is calculated based on historic data, and hardly to evaluate real-time feature of road traffic. In [12], a vehicle-passing scenario is employed to illustrate future collision event probability and survival function for the case of multiple risks. However, vehicle-passing scenario proposed in [12] only considers single passing vehicle row. In practice, instead of single vehicle row, an ego-car should try to pass vehicle group in object region, which includes multirow and multicolumn vehicles. In our previous work, a revised Ising model is proposed to explain road hazard distribution factor [4] and to take both joint threat of regional vehicles and regional threat distribution function into account in risk estimation progress. However, literature [4] did not consider the dynamic feature of hazard distribution map.As mentioned above, a mesoscopic trajectory is decided by road grid hazard state on arrival time instead of present moment so that road hazard prediction should be considered. Moreover, traffic prediction approach, such as short-time multistep traffic prediction model [13] and BP neural network [14], could be used to predict traffic trend of a series discrete time points in the future. Based on the above, in this paper, we employ Ising model-based hazard map generation method and a two-level BP neural network to get the dynamic hazard feature of specific road segment.


### 2.3. Collision-Free Trajectory Generation

In general, regional trajectory planning, which considers both real-time road traffic state and autonomous vehicle cruising information, is used to generate a reliable driving trajectory for the autonomous vehicle within a future short time. However, without God’s perspective, autonomous vehicles used active-safety approach, which realizes decision-making process according to the real-time information providing by on-broad equipment, such as radars, sensors, and cameras, instead of calculating a collision-free trajectory in advance [15].Finding a collision-free path from the initial state to the target state with optimal or near-optimal path costs is one of the key technologies to achieve automated vehicles. Traditional trajectory planning methods could be divided into four categories, which are specific function-based methods, optimal constraint-based control methods, machine learning-based methods, and path-based search methods, respectively [16]. Specific function-based methods typically use a specific trajectory function for path planning, such as cubic polynomial functions [16]. However, this kind of methods is not applicable for complex road environment. Methods based on optimal constraint control, such as Artificial Potential Field [17], are to supplement some necessary optimal constraint indicators and then plan a better driving trajectory. Due to algorithm limitation, optimal constraint-based control methods are easy to stray into local optimal. It is true that machine learning-based methods are useful to construct a good planning model [18]. Unfortunately, the output of this method shows a poor environment adaptive feature. Path search-based methods, such as Dijkstra algorithm, A∗ algorithm, Rapid Exploration Random Tree (RRT) algorithm, etc. [19], usually discretize the road and then start the path search based on the discretization results. Due to their environment adaptability, path search-based planning algorithms become the most widely used trajectory planning method.On-road vehicles who want to obtain a collision-free trajectory should find a valid searching method. RRT algorithm, which uses random samples from the search space to realize collision detection, can effectively solve the problem of trajectory planning in high-dimensional space and complex constraints. Then, a predictive hazard map should be used as searching basis for RRT algorithm [20]. Literature [21] presented an improved RRT-based motion planner for autonomous vehicles to effectively navigate in cluttered environments with narrow passages. In literature [22], the authors used connectivity feature as the basis of random tree expansion. Hence, in this paper, connectivity feature should be denoted by grid hazard value, which is the basic parameter of our proposed improved RRT algorithm. Moreover, a dynamic hazard feature-based cost function is defined to fulfill trajectory searching progress.


## 2.1. Network Architecture

In the last decade, cloud computing, which aims at centralized computing, storage, and network management in the clouds [5], is considered as an effective approach to support intelligent applications. However, cloud computing could not satisfy the demand of time-critical applications, especially for intelligent connected vehicles. Hence, to meet the requirements of autonomous driving, literature [6] proposed an MEC-oriented architecture, which takes full advantage of roadside equipment and vehicle on-board equipment, to overcome the shortcomings of centralized cloud computing in terms of latency and throughput. MEC servers, which connect with RSUs, collect real-time vehicle information, execute corresponding processing task, and provide processing results to road vehicles [1]. In the literature [7], an MEC server is deployed at RSU to improve real-time feature and then could provide real-time service for autonomous vehicles, such as local driving trajectory. In literature [8], the authors discuss about the effectiveness and real-time feature of MEC framework and think that RSU-oriented MEC could provide real-time service for autonomous vehicles, such as local driving trajectory plan, regional vehicle distribution information sharing, etc. Hence, in this paper, we assume that vehicular network is feasible and road vehicle’s information can be efficiently accessed and processed by edge computing approach. Under the assumed condition, an MEC-oriented processing procedure is proposed to provide real-time service for autonomous vehicles, such as local driving trajectory plan, regional vehicle distribution information sharing, etc. [8].


## 2.2. Road Hazard State Evaluation and Prediction

For road hazard state evaluation and prediction, risk avoidance is one of the hot points that should be considered in the design of Advanced Driver Assistance Systems (ADAS) and Autonomous Driving (AD) functions. Due to the complex road environment, it is unfeasible to evaluate all possible states of the involved traffic participants [9]. Hence, a road hazard distribution map is proposed, which is useful to decision makers in ADAS/AD system [10].It is well known that a mesoscopic trajectory is decided by road grid hazard state on arrival time instead of present moment. That is said, we should consider not only current hazard state, but also the dynamic feature of hazard distribution map. Then, the performance of prediction method greatly influences effectiveness of output trajectory.Road hazard not only depends on the cruising features of ego-car, but also is influenced by the surrounding driving contexts, such as road condition, traffic density, regional average speed, surrounding traffic participants’ characteristics, etc. Eggert [11] proposed a microscopic risk model, which could estimate the risk that a dangerous event like an accident can happen within a future time interval, being useful to driving trajectory schedule. Moreover, he declares that predictive risk map is useful in driving strategy generation process. However, the risky probability is a statistic parameter, which is calculated based on historic data, and hardly to evaluate real-time feature of road traffic. In [12], a vehicle-passing scenario is employed to illustrate future collision event probability and survival function for the case of multiple risks. However, vehicle-passing scenario proposed in [12] only considers single passing vehicle row. In practice, instead of single vehicle row, an ego-car should try to pass vehicle group in object region, which includes multirow and multicolumn vehicles. In our previous work, a revised Ising model is proposed to explain road hazard distribution factor [4] and to take both joint threat of regional vehicles and regional threat distribution function into account in risk estimation progress. However, literature [4] did not consider the dynamic feature of hazard distribution map.As mentioned above, a mesoscopic trajectory is decided by road grid hazard state on arrival time instead of present moment so that road hazard prediction should be considered. Moreover, traffic prediction approach, such as short-time multistep traffic prediction model [13] and BP neural network [14], could be used to predict traffic trend of a series discrete time points in the future. Based on the above, in this paper, we employ Ising model-based hazard map generation method and a two-level BP neural network to get the dynamic hazard feature of specific road segment.


## 2.3. Collision-Free Trajectory Generation

In general, regional trajectory planning, which considers both real-time road traffic state and autonomous vehicle cruising information, is used to generate a reliable driving trajectory for the autonomous vehicle within a future short time. However, without God’s perspective, autonomous vehicles used active-safety approach, which realizes decision-making process according to the real-time information providing by on-broad equipment, such as radars, sensors, and cameras, instead of calculating a collision-free trajectory in advance [15].Finding a collision-free path from the initial state to the target state with optimal or near-optimal path costs is one of the key technologies to achieve automated vehicles. Traditional trajectory planning methods could be divided into four categories, which are specific function-based methods, optimal constraint-based control methods, machine learning-based methods, and path-based search methods, respectively [16]. Specific function-based methods typically use a specific trajectory function for path planning, such as cubic polynomial functions [16]. However, this kind of methods is not applicable for complex road environment. Methods based on optimal constraint control, such as Artificial Potential Field [17], are to supplement some necessary optimal constraint indicators and then plan a better driving trajectory. Due to algorithm limitation, optimal constraint-based control methods are easy to stray into local optimal. It is true that machine learning-based methods are useful to construct a good planning model [18]. Unfortunately, the output of this method shows a poor environment adaptive feature. Path search-based methods, such as Dijkstra algorithm, A∗ algorithm, Rapid Exploration Random Tree (RRT) algorithm, etc. [19], usually discretize the road and then start the path search based on the discretization results. Due to their environment adaptability, path search-based planning algorithms become the most widely used trajectory planning method.On-road vehicles who want to obtain a collision-free trajectory should find a valid searching method. RRT algorithm, which uses random samples from the search space to realize collision detection, can effectively solve the problem of trajectory planning in high-dimensional space and complex constraints. Then, a predictive hazard map should be used as searching basis for RRT algorithm [20]. Literature [21] presented an improved RRT-based motion planner for autonomous vehicles to effectively navigate in cluttered environments with narrow passages. In literature [22], the authors used connectivity feature as the basis of random tree expansion. Hence, in this paper, connectivity feature should be denoted by grid hazard value, which is the basic parameter of our proposed improved RRT algorithm. Moreover, a dynamic hazard feature-based cost function is defined to fulfill trajectory searching progress.


## 3. MEC Network Architecture

Multi-access Edge Computing (MEC) technology, which is introduced by the European Telecommunications Standards Institute (ETSI) Industry Specification Group (ISG) on MEC [23], offers cloud-computing capabilities within the radio access network (RAN) and an information technology service environment at the edge of the mobile network, close to mobile subscribers. Edge, which refers to both the base stations themselves [e.g., evolved node B (eNB), radio network controller (RNC), etc.] and data centers close to the radio network (e.g., located at RSUs), allows the third parties to deploy innovative applications and services toward mobile subscribers, enterprises, and vertical segments, flexibly and rapidly, while the common consumer may experience improved performance and new services offered by the MEC system [24].The MEC framework, as presented in Figure1, includes three layers, namely, cloud layer, MEC layer, and general vehicle layer. The first layer is cloud layer, which is used to store historic data and execute model training task. The second layer is the MEC layer, which includes edge computing nodes. All edge computing nodes are located at the back end of RSUs and execute regional centralize computing task. Each RSU maintains a local database and connects with core cloud through wired connection. The third layer is network node layer, which includes general vehicles. All road vehicles are assumed to equip with PC5 interface. Specifically, via PC5 interface, road vehicles can receive application-oriented information and update basic safety messages (BSMs) to RSUs.Figure 1
MEC network architecture.The service flow is described as follows.Step 1. Road vehicles periodically upload BSM, which includes driving information, such as cruising speed, location, heading, etc., to home RSUs.Step 2. RSUs collect regional vehicles information. MECs at the back end of RSUs calculate out local hazard distribution feature and upload calculation results to cloud layer.Step 3. Cloud layer collects calculation outputs of MEC layer and store them as historic data set Eh. Then, BP model training process is done. The trained model is sent back to MEC layer via wired network.Step 4. Based on the trained model, MEC layer executes an incremental learning process of BP neural network and predicts dynamic feature of regional hazard state and then hands out prediction results to road vehicles.Step 5. According to the dynamic regional hazard feature, road vehicles generate a collision-free trajectory via improved RRT algorithm.


## 4. Road Hazard Distribution

### 4.1. Road Hazard Distribution

In our previous work, Ising model, a model in statistical mechanics to study the magnetic dipole moments of atomic spins, is used to explain the intervehicle relationship. Two factors, which are vehicle health level and intervehicle relationship factor [4], are defined to denote regional hazard level.The intervehicle relationship [4] between vehicles i and j at time t is defined as(1)Ri,j,t=fHi,t,Hj,t,dijt,ρt,Δvijt,where Hi,t and Hj,t represent the health level of vehicles i and j, respectively, ρ is vehicle density of object region, Δvij is the speed difference between vehicles i and j, and dij is the distance between vehicles i and j. The health level [25] of the vehicle is determined by the driving behavior of the driver and the physical properties of the vehicle.Then intervehicle relation energy of vehiclei at time t is(2)Ei,t=∑j=1nRi,j,t.The radiant energy ofEi,t on each grid is(3)Ei,grid,t=∑i=1nEi,tLi2,where Li is the distance between vehicle i and object grid center.The energy of each grid is(4)Egrid,t=∑i=1nEi,grid,t.Hence, the radiant energy on each grid of the road can be obtained, and the corresponding grid energy radiation model is the road hazard distribution model constructed in this paper.


### 4.2. Dynamic Trend of Grid Feature

Here, we assume that front road is composed of several grids with hazard state vectors. Then,(5)St=Et1,Et2,…,Etn,where St represents hazard state vector of road at time t, which is composed of the hazard of each grid of the road at time t, and Eti is the hazard of grid i at time t.Using discrete time step indicest,t+1,…,t+s (time step size Δt), hazard state vector sequences are additionally introduced as follows: (6)St,t+s=St,St+1,…,St+s,which describes the hazard state of the road from t (now) until the time t+s (future).As mentioned earlier, considering the computing power of RSU, we employ two-level BP neural network to fulfill dynamic hazard feature prediction. The proposed network is shown in Figure2.Figure 2
Two-level BP neural network.As shown in Figure2, two levels of training process, which are cloud-level training and MEC-level training, are used. Due to its strong computing power, cloud layer is used to store historic data and fulfill model training process. Training results are sent to MEC, which is deployed with RSU. According to training results, MEC executes predicting task.The two-level training process is described as follows.


#### 4.2.1. Cloud-Level Training

The input of BP neural network is the road hazard value setS1,S2,…,St−1. The trained model is sent to RSU.


#### 4.2.2. MEC-Level Training

According to the trained model, MEC conducts incremental training using the hazard data from the past timet−m to t to obtain St+1. Then, incremental training process output St+2, St+3, and so on, St+s.Here, BP neural network includes one input layer, one output layer, and one hidden layer, while the error rate is limited to 0.001 during training. Moreover, in order to save computation resources, the training time is limited to 10000.


### 4.3. Feasible Grid Discovery

In some way, a collision-free path is generated according to the feasible grid distribution feature of front road. Hence, this problem is transformed into a problem of feasible grid discovery. In general, a low-level hazard grid should be considered as a feasible grid. However, the dynamic feature of grid hazard should be taken into account either.Assuming the threshold of hazard detection isEth, grid feasibility, denoted by fg, is defined as threshold-crossing frequency of grid hazard value. Then, we assume that the threshold of grid feasibility is fgth. Therefore, a feasible grid evaluation mechanism is proposed as follows:IfEgridi,t<Eth, grid i is considered as an optional feasible grid at time t and denoted by gridi,t∈Gf,ot.Calculatefg of all grids belonging to Gf,ot. If fgi,t<fgth, grid i is set as a feasible grid at time t. Then, the set of feasible grids at time t should be denoted by Gft.Using discrete time step indicest,t+1,…,t+s (time step size Δt), feasible grids set sequences are additionally introduced as follows:(7)Gft,t+s=Gft,Gft+1,…,Gft+s.The connectivity area of feasible grids should be considered as the basis of collision-free path generation.


## 4.1. Road Hazard Distribution

In our previous work, Ising model, a model in statistical mechanics to study the magnetic dipole moments of atomic spins, is used to explain the intervehicle relationship. Two factors, which are vehicle health level and intervehicle relationship factor [4], are defined to denote regional hazard level.The intervehicle relationship [4] between vehicles i and j at time t is defined as(1)Ri,j,t=fHi,t,Hj,t,dijt,ρt,Δvijt,where Hi,t and Hj,t represent the health level of vehicles i and j, respectively, ρ is vehicle density of object region, Δvij is the speed difference between vehicles i and j, and dij is the distance between vehicles i and j. The health level [25] of the vehicle is determined by the driving behavior of the driver and the physical properties of the vehicle.Then intervehicle relation energy of vehiclei at time t is(2)Ei,t=∑j=1nRi,j,t.The radiant energy ofEi,t on each grid is(3)Ei,grid,t=∑i=1nEi,tLi2,where Li is the distance between vehicle i and object grid center.The energy of each grid is(4)Egrid,t=∑i=1nEi,grid,t.Hence, the radiant energy on each grid of the road can be obtained, and the corresponding grid energy radiation model is the road hazard distribution model constructed in this paper.


## 4.2. Dynamic Trend of Grid Feature

Here, we assume that front road is composed of several grids with hazard state vectors. Then,(5)St=Et1,Et2,…,Etn,where St represents hazard state vector of road at time t, which is composed of the hazard of each grid of the road at time t, and Eti is the hazard of grid i at time t.Using discrete time step indicest,t+1,…,t+s (time step size Δt), hazard state vector sequences are additionally introduced as follows: (6)St,t+s=St,St+1,…,St+s,which describes the hazard state of the road from t (now) until the time t+s (future).As mentioned earlier, considering the computing power of RSU, we employ two-level BP neural network to fulfill dynamic hazard feature prediction. The proposed network is shown in Figure2.Figure 2
Two-level BP neural network.As shown in Figure2, two levels of training process, which are cloud-level training and MEC-level training, are used. Due to its strong computing power, cloud layer is used to store historic data and fulfill model training process. Training results are sent to MEC, which is deployed with RSU. According to training results, MEC executes predicting task.The two-level training process is described as follows.


### 4.2.1. Cloud-Level Training

The input of BP neural network is the road hazard value setS1,S2,…,St−1. The trained model is sent to RSU.


### 4.2.2. MEC-Level Training

According to the trained model, MEC conducts incremental training using the hazard data from the past timet−m to t to obtain St+1. Then, incremental training process output St+2, St+3, and so on, St+s.Here, BP neural network includes one input layer, one output layer, and one hidden layer, while the error rate is limited to 0.001 during training. Moreover, in order to save computation resources, the training time is limited to 10000.


## 4.2.1. Cloud-Level Training

The input of BP neural network is the road hazard value setS1,S2,…,St−1. The trained model is sent to RSU.


## 4.2.2. MEC-Level Training

According to the trained model, MEC conducts incremental training using the hazard data from the past timet−m to t to obtain St+1. Then, incremental training process output St+2, St+3, and so on, St+s.Here, BP neural network includes one input layer, one output layer, and one hidden layer, while the error rate is limited to 0.001 during training. Moreover, in order to save computation resources, the training time is limited to 10000.


## 4.3. Feasible Grid Discovery

In some way, a collision-free path is generated according to the feasible grid distribution feature of front road. Hence, this problem is transformed into a problem of feasible grid discovery. In general, a low-level hazard grid should be considered as a feasible grid. However, the dynamic feature of grid hazard should be taken into account either.Assuming the threshold of hazard detection isEth, grid feasibility, denoted by fg, is defined as threshold-crossing frequency of grid hazard value. Then, we assume that the threshold of grid feasibility is fgth. Therefore, a feasible grid evaluation mechanism is proposed as follows:IfEgridi,t<Eth, grid i is considered as an optional feasible grid at time t and denoted by gridi,t∈Gf,ot.Calculatefg of all grids belonging to Gf,ot. If fgi,t<fgth, grid i is set as a feasible grid at time t. Then, the set of feasible grids at time t should be denoted by Gft.Using discrete time step indicest,t+1,…,t+s (time step size Δt), feasible grids set sequences are additionally introduced as follows:(7)Gft,t+s=Gft,Gft+1,…,Gft+s.The connectivity area of feasible grids should be considered as the basis of collision-free path generation.


## 5. Trajectory Planning

Trajectory planning based on real-time assessment of road area hazard allows drivers to obtain the road conditions of the current driving environment and can improve road driving safety and driving efficiency to a certain extent. However, the road environment is complex and vehicle’s velocity is fast, so the effect of path planning based on real-time data is disappointing. Therefore, this paper proposes a path planning method based on dynamic assessment of road hazard. Section4 has already introduced methods for predicting hazard, so this section will introduce the trajectory planning algorithm and a cost function defined in this paper in turn.


### 5.1. RRT Algorithm

The RRT algorithm is a sampling-based incremental iterative trajectory planning algorithm. The algorithm mainly uses the random and incremental generation process of sampling points in the state space to extend the direction of the path search to the unknown blank area, thus achieving fast and efficient search. The core of the algorithm is to use a random search method and can be applied to path search in complex high-dimensional space. The whole RRT algorithm node expansion search process is shown in Figure3 below.Figure 3
Extended search process of RRT.However, the RRT algorithm also has some drawbacks: (1) random sampling leads to slow convergence [11]; (2) the randomness of RRT algorithm lacks certain guidance information, which makes the path results more tortuous and not smooth enough.


### 5.2. Cost Function Definition

To overcome the shortcomings of the RRT algorithm, based on the thought of referencedRRT∗ algorithm [19], this paper proposes a cost function that combines the current road hazard and future hazard distributions. Incorporating this function into the RRT algorithm can make the RRT algorithm preferentially select the mesh with a low risk, thus indicating the direction for the RRT algorithm.In our experiments, we define the cost function mainly composed of the road hazard distribution resultEgrid,t based on the Ising model mentioned in Section 4, trend characteristic St.t+s, and grid feasibility analysis result Gft,t+s. Here, we define a function called FindMinCost to represent the cost function, the pseudocode is shown in Algorithm 1, and the corresponding explanation is presented in Table 1.Algorithm 1: Description of FindMinCost.
(1)
function FindMinCost xnearest,k,laneNum(2)
fori=0⟶kdo(3)
forj=0⟶laneNumdo(4)
ifObstacleFreexijthen(5)
Rij←Feasiblefreexij,Gft+s(6)
Xmin←ChooseMinIsingRiskRij,St,t+s(7)
end if(8)
end for(9)
end for(10)
xnew←ChooseNextPointXmin(11)
end function.Table 1
Explanation of variables and functions in FindMinCost.
Variable/functionExplanationkTraversal depthlaneNumThe number of lanesxijConnection of gridi to jObstaclefreexijFunction for detecting collisionsFeasibleFreexij,Gft+sFunction for judging the reachability of gridsi to j at t+sRijSet of reachable path pointsChooseMinIsingRiskRij,St,t+sFunction for selecting the path with minimum cumulative costXminThe set of points on the minimum cost pathChooseNextPointXminSelect the next extension point from the setXminxnewThe extended new nodeThe specific description of the function is as follows:Step 1. Start with xnearest, use the depth traversal method to extend k units backwards in units of grids, with only one grid per column. Use Gft,t+s to find all possible extension paths that are feasible and have no obstacles and form a path set Rij.Step 2. Calculate the hazard of grid Egrid,t and predict the grid hazard trend St.t+s of each grid in Rij, which are used to evaluate the sum of hazards for each path at time t. Then, calculate cumulative hazard value of each trajectory at time t+s and select the trajectory with the lowest cumulative hazard value as selected trajectory, which is denoted by Xmin.Step 3. Select the node closest to xnearest in path Xmin as the new node xnew.


### 5.3. Improved RRT Algorithm

The improved RRT algorithm mainly uses spatial analysis to divide the road into grids of the same size. Each step of the search treeT extension will select the grid with the lowest possible risk, so that the vehicle travels to the road grid area where the road risk is low, thereby ensuring the safe passage of the vehicle through the road area.After adding the cost function mentioned in the previous section, the pseudocode for improving the RRT algorithm is shown in Algorithm2, and the corresponding variables and functions are explained in Table 2.Table 2
Explanation of variables and functions in the algorithm of improved RRT.
Variable/functionExplanationTThe extended search treexinitInitial node, or the starting point of path planningRandomSampleFunction of random samplingxrandRandom points obtained by random samplingNearestT,xrandFunction of finding the nearest point toxrand in tree TxnearestThe nearest point toxrandFindMinCostxnearest,k,laneNumFunction of finding the minimum cost pathxnewThe new node to be expanded in next stepInsertNodexmin,xnew,TFunction of adding new nodes to the search treeAlgorithm 2: Algorithm of improved RRT.
(1)
T←InitializeTree(2)
T←InsertNode∅,xinit,T(3)
fori=0⟶Ndo(4)
xrand←RandomSample(5)
xnearest←NearestT,xrand(6)
xnew←FindMinCostxnearest,k,laneNum(7)
ifObstaclefreexnewthen(8)
T←InsertNodeXmin,xnew,T(9)
end if(10)
end for(11)
return TThe specific algorithm flow is described as follows:Step 1. Initialize the random tree T and add the starting point to the structure of tree T.Step 2. Select the random point xrand in the searching space and find the point xnearest from the tree that is closest to xrand.Step 3. Starting from xnearest, use the cost function to calculate the path with the least risk and determine the new node xnew that should be expanded next.Step 4. Determine if there is an obstacle on the xnearest−xnew connection path; if it exists, return to step 2 to start the next iteration; if not, add the edge formed by xnearest−xnew and the new node xnew to tree T. After repeated iterations, the final path planning result can be obtained.In the improved RRT algorithm in this paper, the cost function is an important basis for random tree expansion. We focus on the hazard value of generated trajectories and corresponding dynamic feature of hazard value. To improve the safety of trajectory, the lowest hazard value grid should be selected as extension node of the random tree.


## 5.1. RRT Algorithm

The RRT algorithm is a sampling-based incremental iterative trajectory planning algorithm. The algorithm mainly uses the random and incremental generation process of sampling points in the state space to extend the direction of the path search to the unknown blank area, thus achieving fast and efficient search. The core of the algorithm is to use a random search method and can be applied to path search in complex high-dimensional space. The whole RRT algorithm node expansion search process is shown in Figure3 below.Figure 3
Extended search process of RRT.However, the RRT algorithm also has some drawbacks: (1) random sampling leads to slow convergence [11]; (2) the randomness of RRT algorithm lacks certain guidance information, which makes the path results more tortuous and not smooth enough.


## 5.2. Cost Function Definition

To overcome the shortcomings of the RRT algorithm, based on the thought of referencedRRT∗ algorithm [19], this paper proposes a cost function that combines the current road hazard and future hazard distributions. Incorporating this function into the RRT algorithm can make the RRT algorithm preferentially select the mesh with a low risk, thus indicating the direction for the RRT algorithm.In our experiments, we define the cost function mainly composed of the road hazard distribution resultEgrid,t based on the Ising model mentioned in Section 4, trend characteristic St.t+s, and grid feasibility analysis result Gft,t+s. Here, we define a function called FindMinCost to represent the cost function, the pseudocode is shown in Algorithm 1, and the corresponding explanation is presented in Table 1.Algorithm 1: Description of FindMinCost.
(1)
function FindMinCost xnearest,k,laneNum(2)
fori=0⟶kdo(3)
forj=0⟶laneNumdo(4)
ifObstacleFreexijthen(5)
Rij←Feasiblefreexij,Gft+s(6)
Xmin←ChooseMinIsingRiskRij,St,t+s(7)
end if(8)
end for(9)
end for(10)
xnew←ChooseNextPointXmin(11)
end function.Table 1
Explanation of variables and functions in FindMinCost.
Variable/functionExplanationkTraversal depthlaneNumThe number of lanesxijConnection of gridi to jObstaclefreexijFunction for detecting collisionsFeasibleFreexij,Gft+sFunction for judging the reachability of gridsi to j at t+sRijSet of reachable path pointsChooseMinIsingRiskRij,St,t+sFunction for selecting the path with minimum cumulative costXminThe set of points on the minimum cost pathChooseNextPointXminSelect the next extension point from the setXminxnewThe extended new nodeThe specific description of the function is as follows:Step 1. Start with xnearest, use the depth traversal method to extend k units backwards in units of grids, with only one grid per column. Use Gft,t+s to find all possible extension paths that are feasible and have no obstacles and form a path set Rij.Step 2. Calculate the hazard of grid Egrid,t and predict the grid hazard trend St.t+s of each grid in Rij, which are used to evaluate the sum of hazards for each path at time t. Then, calculate cumulative hazard value of each trajectory at time t+s and select the trajectory with the lowest cumulative hazard value as selected trajectory, which is denoted by Xmin.Step 3. Select the node closest to xnearest in path Xmin as the new node xnew.


## 5.3. Improved RRT Algorithm

The improved RRT algorithm mainly uses spatial analysis to divide the road into grids of the same size. Each step of the search treeT extension will select the grid with the lowest possible risk, so that the vehicle travels to the road grid area where the road risk is low, thereby ensuring the safe passage of the vehicle through the road area.After adding the cost function mentioned in the previous section, the pseudocode for improving the RRT algorithm is shown in Algorithm2, and the corresponding variables and functions are explained in Table 2.Table 2
Explanation of variables and functions in the algorithm of improved RRT.
Variable/functionExplanationTThe extended search treexinitInitial node, or the starting point of path planningRandomSampleFunction of random samplingxrandRandom points obtained by random samplingNearestT,xrandFunction of finding the nearest point toxrand in tree TxnearestThe nearest point toxrandFindMinCostxnearest,k,laneNumFunction of finding the minimum cost pathxnewThe new node to be expanded in next stepInsertNodexmin,xnew,TFunction of adding new nodes to the search treeAlgorithm 2: Algorithm of improved RRT.
(1)
T←InitializeTree(2)
T←InsertNode∅,xinit,T(3)
fori=0⟶Ndo(4)
xrand←RandomSample(5)
xnearest←NearestT,xrand(6)
xnew←FindMinCostxnearest,k,laneNum(7)
ifObstaclefreexnewthen(8)
T←InsertNodeXmin,xnew,T(9)
end if(10)
end for(11)
return TThe specific algorithm flow is described as follows:Step 1. Initialize the random tree T and add the starting point to the structure of tree T.Step 2. Select the random point xrand in the searching space and find the point xnearest from the tree that is closest to xrand.Step 3. Starting from xnearest, use the cost function to calculate the path with the least risk and determine the new node xnew that should be expanded next.Step 4. Determine if there is an obstacle on the xnearest−xnew connection path; if it exists, return to step 2 to start the next iteration; if not, add the edge formed by xnearest−xnew and the new node xnew to tree T. After repeated iterations, the final path planning result can be obtained.In the improved RRT algorithm in this paper, the cost function is an important basis for random tree expansion. We focus on the hazard value of generated trajectories and corresponding dynamic feature of hazard value. To improve the safety of trajectory, the lowest hazard value grid should be selected as extension node of the random tree.


## 6. Experimental Results and Analysis

### 6.1. Simulation Platform

All experiments are done based on SUMO and NS3 platforms. Road traffic scenarios are built by SUMO platform, while V2X communication progress is simulated by NS3 platform. SUMO + NS3 joint simulation process is shown in Figure4.Figure 4
Joint simulation process of SUMO+NS3.The joint simulation process includes four procedures as follows:


#### 6.1.1. Synchronization

NS3 platform sends clock synchronization message to SUMO platform to ensure that two platforms remain in sync.


#### 6.1.2. Vehicle Cruising Information Acquisition

NS3 platform sends vehicle information request to SUMO, while SUMO feeds back corresponding information to NS3.Significantly, this procedure is realized based on a special communication protocol.


#### 6.1.3. Vehicle Control Information Generating

NS3 platform performs communication process simulation and regional vehicles cruising feature analysis and then generates corresponding vehicles control information.


#### 6.1.4. Vehicle Control Message Feedback and Control

NS3 sends generated vehicle control message to SUMO platform. The format of feedback control message is TraCI. According to received control message, SUMO executes vehicle control progress.


### 6.2. Simulation Parameters Setting

Here, SUMO and NS3 platform parameters setting process should be considered.


#### 6.2.1. Simulation Parameters Setting for SUMO

Here, a four-lane straight road is considered to construct simulation. Corresponding parameters setting are given in Table3.Table 3
Parameter setting of SUMO platform.
ParameterValueRoad length1000 mNumber of lanes4Lane width3.2 mNumber of vehicles20, 30Vehicle length5.0 mVehicle width1.8 mMaximum speed50 m/sMaximum acceleration2.6 m/s2Maximum deceleration4.5 m/s2Minimum spacing2.5 m


#### 6.2.2. Simulation Parameters Setting for NS3

The communication scenario of NS3 is set with 20 vehicle nodes and 2 roadside units. Corresponding parameters are shown in Table4.Table 4
Parameter setting of NS3 platform.
ParameterValueNumber of vehicle nodes20, 30Number of RSUs2Vehicle node start and end coordinates(0,0), (1000,0)RSU node coordinates(300,50), (700,50)Cloud node coordinates(0,100), (100,100),…, (900,100)Simulation duration110 s


### 6.3. Simulation Results Analysis

In this part, we shall analyze simulation results from three aspects. Firstly, the simulation process is discussed. Then, the validity of the proposed method is considered. At last, the effectiveness of generation trajectory is analyzed.


#### 6.3.1. Simulation Process

Here, we assume initial prediction time is 29.445 s. Time stepΔt is set as 200 ms, and the length of the historical hazard array Eh is set to 11, while the future time s is set as 5.Simulation results of proposed algorithm are shown in Figure5. Here, snapshots of 4 time points are given.Figure 5
Experimental results with improved RRT algorithm planning.
(a)(b)(c)(d)Figure5(a) shows the snapshot of 29.445 s. Ego-car cruises along the leftmost lane. RSUs collect road vehicles information and use improved RRT algorithm to calculate grid hazard state vector sequences. And then, add the grid with minimum hazard value into the tree which the ego-car should go next. This process is performed every 200 ms. Therefore, in a snapshot of 31.445 s, the ego-car reached the position shown in (b) from position shown in (a).Then, at the next 2 time points, which are 31.445 s and 33.445 s, ego-car executes twice lane change procedures and change cruising lane from the leftmost lane to the rightmost one.


#### 6.3.2. Validity Analysis

To verify the validity of proposed algorithm, the prediction error is studied and the multivariate linear model method and the Long Short-Term Memory (LSTM) neural network are used to compare with it.Here, we consider two scenarios, stable hazard value scenario and variable hazard value scenario.Stable Hazard Value Scenario. The prediction performance of stable hazard value scenario is shown in Figure 6, while the corresponding parameters are listed in Table 5.Figure 6
Hazard value at time point 41.Table 5
Parameter comparison.
Time pointReal hazard valuePredicted hazard value (BP)Predicted hazard value (linear)Predicted hazard value (LSTM)Relative prediction error (%) BPRelative prediction error (%) linearRelative prediction error (%) LSTM421.922.152.572.1011.9833.859.38432.242.042.641.92−8.9317.86−14.29442.011.942.71.79−3.4834.33−10.95451.951.852.771.70−5.1342.05−12.82461.731.782.831.642.8963.58−5.20Avg.6.48238.3310.528As shown in Figure6, the prediction performance of the proposed method is better than that of multivariate linear model method and LSTM neural network method. The relative prediction error of the proposed method is lower than 11.98%, and the average relative prediction error is 6.482%.Variable Hazard Value Scenario. The prediction performance of variable hazard value scenario is shown in Figure 7, while the corresponding parameters are listed in Table 6.Figure 7
Hazard value at time point 11.Table 6
Parameter comparison.
Time pointReal hazard valuePredicted hazard value (BP)Predicted hazard value (linear)Predicted hazard value (LSTM)Relative prediction error (%) BPRelative prediction error (%) linearRelative prediction error (%) LSTM121.311.381.611.475.3422.9012.21131.231.311.491.406.5021.1413.82141.071.251.461.3516.8236.4526.17151.121.191.441.306.2528.5716.07162.81.131.411.26−59.6449.64−55.0172.882.671.72.34−7.2940.97−18.75182.002.531.742.2426.5013.0012.0192.122.411.782.1313.6816.040.47202.692.291.822.06−14.8732.34−23.42212.752.171.861.96−21.0932.3629.82Avg.17.79829.34120.773As shown in Figure7, the proposed method prediction curve could track actual change of hazard value. However, the dynamic lag error is very obvious. On the other hand, the LSTM has a higher error rate and linear prediction could not follow the dramatic change of hazard values and perform a high relatively error rate.As shown in Table6, the performance will deteriorate obviously when the hazard value changes fast and may cause some problem for trajectory planning. However, besides the fast change time point t = 16, the relative prediction error of proposed method is lower than 26.5%. Moreover, the corresponding average relative prediction error is 17.798%.


#### 6.3.3. Effectiveness of Generation Trajectory

To verify the effectiveness of generated trajectory, a comparison experiment is repeated 10 times, while the vehicle number is selected as 20 and 30.To verify the effectiveness of the proposed algorithm, classic RRT, improved RRT [22], improved RRT with linear prediction, and improved RRT with LSTM prediction are selected as contrast.Here, we consider two parameters. One is travel time, while the other is accumulated hazard value of generation trajectory.Experiment results are given in Figure8.Figure 8
Experiment results.
(a)(b)As shown in Figure8(a), overall, the travel times of all five algorithms are basically the same. For medium-density scenario (20 vehicles), the travel time of the proposed method is longer than that of linear prediction RRT. For high-density scenario (30 vehicles), the travel time of the proposed method is longer than that of improved RRT. The main reason for this situation is that the safest trajectory is not always the shortest one.As shown in Figure8(b), trajectory accumulated hazard value of proposed algorithm is lower than that of all other four algorithms and proves the effectiveness of generation trajectory.


## 6.1. Simulation Platform

All experiments are done based on SUMO and NS3 platforms. Road traffic scenarios are built by SUMO platform, while V2X communication progress is simulated by NS3 platform. SUMO + NS3 joint simulation process is shown in Figure4.Figure 4
Joint simulation process of SUMO+NS3.The joint simulation process includes four procedures as follows:


### 6.1.1. Synchronization

NS3 platform sends clock synchronization message to SUMO platform to ensure that two platforms remain in sync.


### 6.1.2. Vehicle Cruising Information Acquisition

NS3 platform sends vehicle information request to SUMO, while SUMO feeds back corresponding information to NS3.Significantly, this procedure is realized based on a special communication protocol.


### 6.1.3. Vehicle Control Information Generating

NS3 platform performs communication process simulation and regional vehicles cruising feature analysis and then generates corresponding vehicles control information.


### 6.1.4. Vehicle Control Message Feedback and Control

NS3 sends generated vehicle control message to SUMO platform. The format of feedback control message is TraCI. According to received control message, SUMO executes vehicle control progress.


## 6.1.1. Synchronization

NS3 platform sends clock synchronization message to SUMO platform to ensure that two platforms remain in sync.


## 6.1.2. Vehicle Cruising Information Acquisition

NS3 platform sends vehicle information request to SUMO, while SUMO feeds back corresponding information to NS3.Significantly, this procedure is realized based on a special communication protocol.


## 6.1.3. Vehicle Control Information Generating

NS3 platform performs communication process simulation and regional vehicles cruising feature analysis and then generates corresponding vehicles control information.


## 6.1.4. Vehicle Control Message Feedback and Control

NS3 sends generated vehicle control message to SUMO platform. The format of feedback control message is TraCI. According to received control message, SUMO executes vehicle control progress.


## 6.2. Simulation Parameters Setting

Here, SUMO and NS3 platform parameters setting process should be considered.


### 6.2.1. Simulation Parameters Setting for SUMO

Here, a four-lane straight road is considered to construct simulation. Corresponding parameters setting are given in Table3.Table 3
Parameter setting of SUMO platform.
ParameterValueRoad length1000 mNumber of lanes4Lane width3.2 mNumber of vehicles20, 30Vehicle length5.0 mVehicle width1.8 mMaximum speed50 m/sMaximum acceleration2.6 m/s2Maximum deceleration4.5 m/s2Minimum spacing2.5 m


### 6.2.2. Simulation Parameters Setting for NS3

The communication scenario of NS3 is set with 20 vehicle nodes and 2 roadside units. Corresponding parameters are shown in Table4.Table 4
Parameter setting of NS3 platform.
ParameterValueNumber of vehicle nodes20, 30Number of RSUs2Vehicle node start and end coordinates(0,0), (1000,0)RSU node coordinates(300,50), (700,50)Cloud node coordinates(0,100), (100,100),…, (900,100)Simulation duration110 s


## 6.2.1. Simulation Parameters Setting for SUMO

Here, a four-lane straight road is considered to construct simulation. Corresponding parameters setting are given in Table3.Table 3
Parameter setting of SUMO platform.
ParameterValueRoad length1000 mNumber of lanes4Lane width3.2 mNumber of vehicles20, 30Vehicle length5.0 mVehicle width1.8 mMaximum speed50 m/sMaximum acceleration2.6 m/s2Maximum deceleration4.5 m/s2Minimum spacing2.5 m


## 6.2.2. Simulation Parameters Setting for NS3

The communication scenario of NS3 is set with 20 vehicle nodes and 2 roadside units. Corresponding parameters are shown in Table4.Table 4
Parameter setting of NS3 platform.
ParameterValueNumber of vehicle nodes20, 30Number of RSUs2Vehicle node start and end coordinates(0,0), (1000,0)RSU node coordinates(300,50), (700,50)Cloud node coordinates(0,100), (100,100),…, (900,100)Simulation duration110 s


## 6.3. Simulation Results Analysis

In this part, we shall analyze simulation results from three aspects. Firstly, the simulation process is discussed. Then, the validity of the proposed method is considered. At last, the effectiveness of generation trajectory is analyzed.


### 6.3.1. Simulation Process

Here, we assume initial prediction time is 29.445 s. Time stepΔt is set as 200 ms, and the length of the historical hazard array Eh is set to 11, while the future time s is set as 5.Simulation results of proposed algorithm are shown in Figure5. Here, snapshots of 4 time points are given.Figure 5
Experimental results with improved RRT algorithm planning.
(a)(b)(c)(d)Figure5(a) shows the snapshot of 29.445 s. Ego-car cruises along the leftmost lane. RSUs collect road vehicles information and use improved RRT algorithm to calculate grid hazard state vector sequences. And then, add the grid with minimum hazard value into the tree which the ego-car should go next. This process is performed every 200 ms. Therefore, in a snapshot of 31.445 s, the ego-car reached the position shown in (b) from position shown in (a).Then, at the next 2 time points, which are 31.445 s and 33.445 s, ego-car executes twice lane change procedures and change cruising lane from the leftmost lane to the rightmost one.


### 6.3.2. Validity Analysis

To verify the validity of proposed algorithm, the prediction error is studied and the multivariate linear model method and the Long Short-Term Memory (LSTM) neural network are used to compare with it.Here, we consider two scenarios, stable hazard value scenario and variable hazard value scenario.Stable Hazard Value Scenario. The prediction performance of stable hazard value scenario is shown in Figure 6, while the corresponding parameters are listed in Table 5.Figure 6
Hazard value at time point 41.Table 5
Parameter comparison.
Time pointReal hazard valuePredicted hazard value (BP)Predicted hazard value (linear)Predicted hazard value (LSTM)Relative prediction error (%) BPRelative prediction error (%) linearRelative prediction error (%) LSTM421.922.152.572.1011.9833.859.38432.242.042.641.92−8.9317.86−14.29442.011.942.71.79−3.4834.33−10.95451.951.852.771.70−5.1342.05−12.82461.731.782.831.642.8963.58−5.20Avg.6.48238.3310.528As shown in Figure6, the prediction performance of the proposed method is better than that of multivariate linear model method and LSTM neural network method. The relative prediction error of the proposed method is lower than 11.98%, and the average relative prediction error is 6.482%.Variable Hazard Value Scenario. The prediction performance of variable hazard value scenario is shown in Figure 7, while the corresponding parameters are listed in Table 6.Figure 7
Hazard value at time point 11.Table 6
Parameter comparison.
Time pointReal hazard valuePredicted hazard value (BP)Predicted hazard value (linear)Predicted hazard value (LSTM)Relative prediction error (%) BPRelative prediction error (%) linearRelative prediction error (%) LSTM121.311.381.611.475.3422.9012.21131.231.311.491.406.5021.1413.82141.071.251.461.3516.8236.4526.17151.121.191.441.306.2528.5716.07162.81.131.411.26−59.6449.64−55.0172.882.671.72.34−7.2940.97−18.75182.002.531.742.2426.5013.0012.0192.122.411.782.1313.6816.040.47202.692.291.822.06−14.8732.34−23.42212.752.171.861.96−21.0932.3629.82Avg.17.79829.34120.773As shown in Figure7, the proposed method prediction curve could track actual change of hazard value. However, the dynamic lag error is very obvious. On the other hand, the LSTM has a higher error rate and linear prediction could not follow the dramatic change of hazard values and perform a high relatively error rate.As shown in Table6, the performance will deteriorate obviously when the hazard value changes fast and may cause some problem for trajectory planning. However, besides the fast change time point t = 16, the relative prediction error of proposed method is lower than 26.5%. Moreover, the corresponding average relative prediction error is 17.798%.


### 6.3.3. Effectiveness of Generation Trajectory

To verify the effectiveness of generated trajectory, a comparison experiment is repeated 10 times, while the vehicle number is selected as 20 and 30.To verify the effectiveness of the proposed algorithm, classic RRT, improved RRT [22], improved RRT with linear prediction, and improved RRT with LSTM prediction are selected as contrast.Here, we consider two parameters. One is travel time, while the other is accumulated hazard value of generation trajectory.Experiment results are given in Figure8.Figure 8
Experiment results.
(a)(b)As shown in Figure8(a), overall, the travel times of all five algorithms are basically the same. For medium-density scenario (20 vehicles), the travel time of the proposed method is longer than that of linear prediction RRT. For high-density scenario (30 vehicles), the travel time of the proposed method is longer than that of improved RRT. The main reason for this situation is that the safest trajectory is not always the shortest one.As shown in Figure8(b), trajectory accumulated hazard value of proposed algorithm is lower than that of all other four algorithms and proves the effectiveness of generation trajectory.


## 6.3.1. Simulation Process

Here, we assume initial prediction time is 29.445 s. Time stepΔt is set as 200 ms, and the length of the historical hazard array Eh is set to 11, while the future time s is set as 5.Simulation results of proposed algorithm are shown in Figure5. Here, snapshots of 4 time points are given.Figure 5
Experimental results with improved RRT algorithm planning.
(a)(b)(c)(d)Figure5(a) shows the snapshot of 29.445 s. Ego-car cruises along the leftmost lane. RSUs collect road vehicles information and use improved RRT algorithm to calculate grid hazard state vector sequences. And then, add the grid with minimum hazard value into the tree which the ego-car should go next. This process is performed every 200 ms. Therefore, in a snapshot of 31.445 s, the ego-car reached the position shown in (b) from position shown in (a).Then, at the next 2 time points, which are 31.445 s and 33.445 s, ego-car executes twice lane change procedures and change cruising lane from the leftmost lane to the rightmost one.


## 6.3.2. Validity Analysis

To verify the validity of proposed algorithm, the prediction error is studied and the multivariate linear model method and the Long Short-Term Memory (LSTM) neural network are used to compare with it.Here, we consider two scenarios, stable hazard value scenario and variable hazard value scenario.Stable Hazard Value Scenario. The prediction performance of stable hazard value scenario is shown in Figure 6, while the corresponding parameters are listed in Table 5.Figure 6
Hazard value at time point 41.Table 5
Parameter comparison.
Time pointReal hazard valuePredicted hazard value (BP)Predicted hazard value (linear)Predicted hazard value (LSTM)Relative prediction error (%) BPRelative prediction error (%) linearRelative prediction error (%) LSTM421.922.152.572.1011.9833.859.38432.242.042.641.92−8.9317.86−14.29442.011.942.71.79−3.4834.33−10.95451.951.852.771.70−5.1342.05−12.82461.731.782.831.642.8963.58−5.20Avg.6.48238.3310.528As shown in Figure6, the prediction performance of the proposed method is better than that of multivariate linear model method and LSTM neural network method. The relative prediction error of the proposed method is lower than 11.98%, and the average relative prediction error is 6.482%.Variable Hazard Value Scenario. The prediction performance of variable hazard value scenario is shown in Figure 7, while the corresponding parameters are listed in Table 6.Figure 7
Hazard value at time point 11.Table 6
Parameter comparison.
Time pointReal hazard valuePredicted hazard value (BP)Predicted hazard value (linear)Predicted hazard value (LSTM)Relative prediction error (%) BPRelative prediction error (%) linearRelative prediction error (%) LSTM121.311.381.611.475.3422.9012.21131.231.311.491.406.5021.1413.82141.071.251.461.3516.8236.4526.17151.121.191.441.306.2528.5716.07162.81.131.411.26−59.6449.64−55.0172.882.671.72.34−7.2940.97−18.75182.002.531.742.2426.5013.0012.0192.122.411.782.1313.6816.040.47202.692.291.822.06−14.8732.34−23.42212.752.171.861.96−21.0932.3629.82Avg.17.79829.34120.773As shown in Figure7, the proposed method prediction curve could track actual change of hazard value. However, the dynamic lag error is very obvious. On the other hand, the LSTM has a higher error rate and linear prediction could not follow the dramatic change of hazard values and perform a high relatively error rate.As shown in Table6, the performance will deteriorate obviously when the hazard value changes fast and may cause some problem for trajectory planning. However, besides the fast change time point t = 16, the relative prediction error of proposed method is lower than 26.5%. Moreover, the corresponding average relative prediction error is 17.798%.


## 6.3.3. Effectiveness of Generation Trajectory

To verify the effectiveness of generated trajectory, a comparison experiment is repeated 10 times, while the vehicle number is selected as 20 and 30.To verify the effectiveness of the proposed algorithm, classic RRT, improved RRT [22], improved RRT with linear prediction, and improved RRT with LSTM prediction are selected as contrast.Here, we consider two parameters. One is travel time, while the other is accumulated hazard value of generation trajectory.Experiment results are given in Figure8.Figure 8
Experiment results.
(a)(b)As shown in Figure8(a), overall, the travel times of all five algorithms are basically the same. For medium-density scenario (20 vehicles), the travel time of the proposed method is longer than that of linear prediction RRT. For high-density scenario (30 vehicles), the travel time of the proposed method is longer than that of improved RRT. The main reason for this situation is that the safest trajectory is not always the shortest one.As shown in Figure8(b), trajectory accumulated hazard value of proposed algorithm is lower than that of all other four algorithms and proves the effectiveness of generation trajectory.


## 7. Conclusion

In this work, we presented a novel trajectory planning approach-based MEC framework for assistance driving and autonomous driving based on road hazard state. We used Ising model to evaluate the behavior of regional traffic participants and find feasible road grid.In this paper, a classical robotic path searching method, RRT algorithm, is employed as a basic approach to generate regional trajectory. To overcome the weakness of RRT, such as bad environmental adaptability, output unstable, etc., a cost function based on current and future hazard distributions is defined to improve the performance of RRT algorithm. This paper uses a two-level BP neural network to predict future risk distribution based on past data. Simulation results show that the proposed method properly solves the flaws of typical RRT algorithm and could generate a reliable trajectory, which could help vehicle avoid potential road risk.However, this paper only considers 4-lane straight road scenario. In our future work, other road scenarios, such as intersection, 2-lane straight road, pedestrian, and nonmotor vehicles, should be discussed to verify the universality of the proposed algorithm as well.



---

*Source: 6689293-2021-04-27.xml*