Discretionary Lane-Change Decision and Control via Parameterized Soft Actor-Critic for Hybrid Action Space

This study focuses on a crucial task in the field of autonomous driving, autonomous lane change. Autonomous lane change plays a pivotal role in improving traffic flow, alleviating driver burden, and reducing the risk of traffic accidents. However, due to the complexity and uncertainty of lane-change scenarios, the functionality of autonomous lane change still faces challenges. In this research, we conducted autonomous lane-change simulations using both deep reinforcement learning (DRL) and model predictive control (MPC). Specifically, we used the parameterized soft actor--critic (PASAC) algorithm to train a DRL-based lane-change strategy to output both discrete lane-change decisions and continuous longitudinal vehicle acceleration. We also used MPC for lane selection based on the smallest predictive car-following costs for the different lanes. For the first time, we compared the performance of DRL and MPC in the context of lane-change decisions. The simulation results indicated that, under the same reward/cost function and traffic flow, both MPC and PASAC achieved a collision rate of 0%. PASAC demonstrated a comparable performance to MPC in terms of average rewards/costs and vehicle speeds.


Introduction
The development of autonomous driving has indeed brought revolutionary changes to transportation [1].Autonomous driving technology not only alleviates the burden on drivers and improves traffic flow but, more importantly, it significantly reduces traffic accidents caused by human errors when driving.According to the World Health Organization, nearly 1.3 million people die in road traffic accidents globally each year, with 94% attributed to driver errors.In lane-change scenarios in particular, the actions of surrounding vehicles are often challenging to predict, making automated lane-change a critical task for autonomous vehicles.
Research has indicated that nearly 10% of highway accidents are caused by lane-change maneuvers [2].Therefore, a safe, smooth, and efficient automated lane-change mechanism is crucial for autonomous vehicles.To achieve this goal, the vehicle's architecture must possess efficient and robust execution capabilities that are able to handle uncertainties in the operating environment, make rational decisions, and execute appropriate actions to cope with the potentially adversarial or cooperative behaviors of surrounding vehicles.
Currently, automated lane changing in autonomous driving is considered Level 2 automation [3].Advanced driver-assistance systems such as lane keeping assist (LKA), lane centering control (LCC), and adaptive cruise control (ACC) [4] are relatively wellestablished, but the lane-change function still requires further development and improvement.Although there has been some progress in research in automated lane-change decision-making, this functionality has not yet been widely implemented in vehicles.
MPC stands out as a method of optimizing a sequence of future control actions to address real-time control problems.For instance, Ji proposed a collision-free trajectory planning method based on artificial potential fields and multi-constraint MPC [5].Raffo presented an MPC-based trajectory tracking method, with two cascaded MPC controllers handling vehicle kinematics and dynamics models, effectively reducing computational complexity [6].Xu introduced an MPC controller for a lane-keeping system, utilizing a five-point interpolation method to generate a reference trajectory [7].Similarly, Sameul conducted simulations comparing MPC and PID controllers for trajectory tracking in autonomous vehicles, finding that MPC exhibited better robustness in various scenarios, including vehicle load, longitudinal velocity, and steering changes [8].Hang proposed a human-like decision-making framework, combining potential field methods and MPC for collision-free path planning.Additionally, he introduced a module that integrated decision-making and motion planning, considering the social behavior of surrounding traffic participants [9,10].
On the other hand, reinforcement learning (RL) has consistently been a research hotspot in the field of decision-making.For instance, the AlphaGo Go-playing robot, which defeated the human Go champion, was a result of training in discrete-action reinforcement learning [11].Currently recognized discrete-action reinforcement learning algorithms include the Deep Q-Network (DQN) [10], Double DQN (DDQN) [12], and Rainbow [13], among others.Continuous-action reinforcement learning algorithms include the Deep Deterministic Policy Gradient (DDPG) [14], Twin-Delayed DDPG (TD3) [15], Soft Actor Critic (SAC) [16], and so on.
Few papers have proposed different methods for obtaining hybrid action spaces [17].One highly cited method is parameterized DDPG (PA-DDPG), introduced in 2016 by scholars from the University of Texas, which utilizes continuous-action reinforcement learning to address hybrid action spaces [18].Another well-cited method is the Parameterized Deep Q-Network (PDQN), proposed in 2018 by researchers from Tencent AI Lab, which combines actor-critic learning and Q-learning, utilizing Q-learning instead of critic learning in DDPG for discrete action selection [19].In 2019, scholars from the University of Twente proposed an improved approach called multi-pass P-DQN (MPDQN) [20], which distributes continuous action inputs to the Q-network based on the correspondence between discrete and corresponding continuous actions, resulting in more reasonable Q-value outputs.In 2022, scholars from Tianjin University introduced the HyAR-TD3 algorithm [21], which employs representation learning to map continuous action spaces and hybrid action spaces.
Currently, most literature uses discrete reinforcement learning to achieve optimal control for non-mandatory automated lane changing of autonomous vehicles [22][23][24][25][26]. Typically, these papers adopt a hierarchical control approach, where the upper-level control outputs lane-change decisions using discrete reinforcement learning (discrete control variables), and the lower-level control uses a car-following model to output the vehicle acceleration (continuous control variables).However, only a few studies have applied hybrid-action reinforcement learning to automated lane-change decision-making and control.In 2021, scholars from the University of Washington proposed the Hybrid Deep Q-Learning and Policy Gradient (HDQPG) to achieve automated lane-change of vehicles [27].
In this paper, we use the PASAC algorithm tailored for hybrid-action spaces.We trained the model using traffic simulation software on the SUMO platform for various traffic scenarios.To validate the algorithm's superior performance in terms of stability and optimality, we compared the results of PASAC with MPC, considering metrics such as collision rate, average speed, value function, and jerk.However, it is crucial to note some known differences between the two approaches.First, MPC requires online optimization and demands relatively powerful computing resources for real-time applications, raising monetary concerns about practical deployment [28].On the other hand, the DRL solution, based on neural networks, despite being time-consuming during offline training, has short execution times and is suitable for real-time applications.Second, MPC relies on a modelbased approach, while DRL control solutions, based on black-box neural networks, lack theoretical guarantees [29].
In our MPC model, the ego vehicle needs to assess whether executing a lane-change maneuver is beneficial.If deemed beneficial, it adjusts its position and speed to prepare for the lane change; otherwise, it chooses to follow the preceding vehicle.In RL, the intelligent agent interacts with the environment, selects actions based on the current state, and continually updates its policy based on environmental feedback in the form of rewards.The intelligent agent in reinforcement learning can learn adaptive driving strategies for lane-change problems, enabling vehicles to make intelligent lane-change decisions.
The primary contribution of this work is the introduction of the PASAC algorithm for discretionary lane changing, as well as the first quantitative and comprehensive comparison of the hybrid-action space reinforcement learning algorithm PASAC with MPC.We experimentally verified the superiority of PASAC in lane-change decision and control, and conducted a detailed analysis of its performance.To the best of our knowledge, such a comparison does not exist in the literature.This not only provides new insights into the application of hybrid-action space reinforcement learning in practical control problems but also offers empirical support for the comparison of reinforcement learning with traditional control methods.
Regarding the structure of this paper, the second section provides a detailed introduction to the PASAC algorithm.The application of PASAC and MPC in lane-change scenarios is discussed in the third and fourth sections, respectively.The fifth section compares the DRL and MPC methods.Finally, conclusions are drawn in the sixth section.

Parameterized Soft Actor-Critic
In this section, we present an overview of the hybrid action space structure using the SAC algorithm.

Reinforcement Learning
Reinforcement learning is a learning method employed for decision-making and control.In reinforcement learning, an agent takes actions based on the current time step's environmental state, and subsequently, the environment transitions to a new state in the next time step as a result of that action.The agent also receives rewards based on the actions taken, and both the actions and rewards have a certain probabilistic nature.The objective of reinforcement learning algorithms is to learn effective policies by maximizing the expected discounted cumulative reward for each episode.Specifically, the discounted cumulative reward for a state-action pair is referred to as the Q-value, denoted asQ(s t , a t ) = E τ=T τ=t γ τ−T r(s τ , a τ ) .Here, r(s τ , a τ ) represents the reward for the state s and action a at time step τ, and γ ∈[0,1] is the discount factor.The resolution of reinforcement learning problems adheres to the Bellman optimality principle.This principle asserts that if the optimal Q-value for the next step is known, then the action for the current time step must also be optimal.In other words, for an optimal policy, Q(s t , a t ) * = r(s t , a t ) + γQ * (s t+1 , a t+1 ), with * denoting the optimality.This principle forms the foundation for devising effective policies in reinforcement learning.

Soft Actor-Critic
The actor-critic architecture is a core component of the RL algorithm, as proposed by Sutton and Barto (1999) [30].It is used to solve action selection and value function learning.In this context, we consider a parameterized state value function V, a soft Q function, and a policy network.The parameters of these networks are denoted as ψ, ψ, θ, and ϕ, respectively.The SAC algorithm considers the maximum entropy objective in reinforcement learning's maximum expectation, and the modified expectation is In this formula, "•" represents all possible actions.ρ π denotes the new policy.The higher the entropy H, the stronger the system's uncertainty.In other words, a policy with higher entropy provides more significant action unpredictability.To regulate the impact of entropy on the policy, the SAC algorithm introduces a hyperparameter α, which plays a pivotal role in determining the relative significance of the entropy term on rewards.
The primary objective in training the soft value function is to minimize the square of residuals.In essence, through the optimization of the soft value function, the goal is to diminish the disparity between model predictions and actual observations, thereby enhancing the overall efficacy of the training process.
The gradient can be estimated using an unbiased estimator The parameters of the soft Q-value function are determined by minimizing the residual of the Bellman equation.
After optimizing with a stochastic gradient The method of translating strategies using neural networks is as follows: ϵ t represents an input noise vector sampled from a fixed distribution, such as a spherical Gaussian distribution.The objective function is denoted as where π ϕ is defined by the function f ϕ , the gradient of Equation ( 9) is as follows:

Parameterized Soft Actor-Critic
In this context, we define a Markov decision process with a parameterized action space.The action space consists of a set of discrete actions, denoted as n .In our environment, the actor network outputs m continuous parameters to form continuous actions and selects n − m continuous parameters as weights for the discrete actions (m < n).The discrete action is determined by choosing the action with the maximum weight among the n − m continuous parameters, expressed as a d = max(a m+1 , a m+2 , ......a n ).The role of the actor network is to simultaneously decide which discrete action to execute and how to parameterize that action.Here, we adopt an approach similar to Delalleau 2019 [31], but unlike the former, our discrete actions are deterministic rather than stochastic.
The PASAC algorithm is similar to the algorithm proposed by Peter Stone in 2016 [18], as illustrated below: The actor neural network can directly output continuous actions, and for discrete actions, it outputs the action with the maximum weight, where the weights are normalized within the range [

End for End for Output θ, ψ, ϕ
In order to gain a comprehensive understanding of the decision-making process of the PASAC algorithm, we provide a detailed explanation of its neural network framework.Refer to Figure 1 for an illustration.In the structure diagram, the agent has two branches for handling actions-one for processing continuous actions and another for processing discrete actions.The outputs of these two branches are integrated into the final action decision, enabling the agent to learn and execute tasks in a mixed-action space.

PASAC for Lane Changing
In this section, we utilize the open-source simulator SUMO [32].This integrated framework is employed to construct the RL environment, governing the behavior of autonomous vehicles.We present a model for autonomous lane changing based on reinforcement learning.By explicitly modeling states, actions, and rewards, the objective is to realize intelligent lane-change decisions for vehicles navigating through intricate traffic scenarios.

Scenario Settings
In the conducted experiments detailed in this paper, we utilized a straight roadway with a length of 1000 m and two lanes.The lane change scenario in SUMO is shown in Figure 2, the red car represents the ego vehicle, while the green cars represent the surrounding vehicles .

Action
In this context, we define the action space as In Equation ( 12), the symbol '0' signifies the choice to postpone the lane change, indicating the intent to maintain the current position within the ego lane.Conversely, the symbol '1' represents an immediate decision to execute the lane change, manifesting the intention to promptly transition to the target lane.These symbols denote discrete actions.'a ego t ', on the other hand, is a continuous action representing the acceleration of the ego vehicle.

Reward
The reward function is crafted with the objective of motivating positive behaviors and discouraging undesirable actions within the decision-making process of autonomous vehicles.In this paper, distinct rewards are allocated for tasks such as distance control, successful lane changes, adherence to speed limits, and collision avoidance.Drawing upon this concept, we formulated the following reward function.
where R total is the total reward for the simulation scene.Where R collision is the penalty for vehicle collisions.
In Equation ( 14), R act is the penalty for frequent lane changes by vehicles, w 0 is the corresponding weight, and y t and y t−1 represent the current and previous time step's lateral positions of the vehicle.Note that when the distance to the preceding vehicle satisfies the ACC spacing, this reward penalty will not be computed, thus aligning with the MPC cost function.
Through a comprehensive analysis of the disparity between the actual speed and the desired speed of the ego vehicle, coupled with meticulous management of the spacing between the ego vehicle and its preceding and following counterparts, we skillfully crafted a longitudinal acceleration control strategy.The primary aim of this strategy is to mitigate the likelihood of collisions between vehicles, strategically initiating lane-change maneuvers during instances of reduced speed in the ego vehicle, thereby further optimizing the overall travel time.In consideration of passenger comfort, we implemented a penalty mechanism for changes in longitudinal acceleration, seeking to strike a harmonious balance between driving efficiency and the overall passenger experience.The specific reward function is delineated as follows: In Equations ( 15) and ( 16), w 1 , w 2 , w 3 , and w 4 denote the corresponding weights.Here, d safe represents the desired safe distance, v safe is the desired safe speed, and jerk signifies the rate of change of acceleration for the ego vehicle.
In order to comprehensively present the key parameters involved in our analysis, we introduce a parameter table (Table 1) at this point.It is worth noting that the weights were determined though manual turning.

Model Predictive Control Model
In MPC, the control inputs are determined by solving an optimization problem at each time step, taking into account the current state of the system and predicting its evolution over the horizon.This optimization process aims to minimize a predefined cost function, Here, we compare the costs for different lanes and initiate a lane change for the lane with the lowest cost.The lane change is instantaneous, wherein no lateral control is considered, the same as for DRL.
It is worth noting that we used YALMIP to handle optimization solutions.By leveraging the open-source YALMIP, we formulated and solved the MPC optimization problem.YALMIP can be installed in MATLAB, providing programmers with various shooting and optimization methods to address nonlinear optimization problems.In this section, the principles of the decision control for the self-driving vehicle under MPC are introduced.These include the state-space equations, cost function, constraints, future state estimation, and variable-spacing strategy.

State-Space Equations
The state-space equations for the MPC we implemented are as follows: It is worth noting that we simplified vehicles to a point mass, without considering the vehicle dynamics [33], as for DRL. x(k with In Formula, s represents the longitudinal coordinate of the vehicle.x is utilized as the input, where d p t and d f t denote the distances to the preceding and following vehicles, respectively.The variables △v p t and △v f t represent the ego vehicle velocity differences with the preceding and following vehicles, while v ego , a ego t , and j ego t denote the velocity, acceleration, and jerk of the vehicle, respectively.u represents the control variable, where T s is the time interval, with T s set to 0.1 s.

Cost Function
Formula ( 22) is consistent with the PASAC reward function.The primary objectives of the first and second terms are to ensure appropriate distances with the lead and following vehicles.The distance with the following vehicle is not penalized for the current lane, while it is penalized for the target lane.The third term aims to maintain a safe ego speed.
The fourth term is designed to enhance driving comfort by penalizing jerk.The MPC cost does not include a penalty for frequent lane changes.

Future State Estimation
In the prediction horizon of MPC, scholars like Paolo Falcone fixed the values of slip and friction coefficients within the predictive time horizon, ensuring they remained constant and equal to the estimated values at the current moment [34].Similarly, in this paper, we chose N = 5 as the prediction horizon and utilized the same velocity of the leading vehicle at the current time step during the prediction horizon.

TLACC (Two-Lane Adaptive Cruise Control)
TLACC is a decision and control algorithm based on MPC (Algorithm 2).Where J c and J denote the future driving costs for the current lane and the target lane, respectively.l sw is the lane change signal, where 0 indicates staying in the current lane, and 1 indicates a change to the target lane.J th is the threshold value for the future driving cost on the current lane that must be satisfied for a lane change, withJ th set to 0.8.u c d is the desired control input, and u d and u target are the expected control inputs for driving on the current lane and the target lane, respectively.k p is the extra weight for the future driving cost during a lane change, with k p set to 0.1.The extra weight prevents frequent lane changes.

Comparison Results of DRL and MPC
Under the same conditions of relevant cost functions, input states, and traffic flow, this section presents the test results of the DRL and MPC controllers.

DRL Training
For the training of the reinforcement learning model, we chose total simulation timesteps of 300,000, with each timestep set to 0.1 s.The training was conducted on a computer equipped with an 8-core (16-thread) AMD processor and an NVIDIA GeForce RTX 3050 Ti GPU, and the training process took approximately 3 h.It is noteworthy that, before the start of each episode, there was a 50-m buffer for the initialization of main-road traffic.
In our study, to achieve effective training of the reinforcement learning model, we meticulously selected and configured a set of crucial hyperparameters.The choice of these hyperparameters directly impacted the model's performance and the stability of the training process.In Table 2, we provide a detailed list of the hyperparameters utilized during training, along with their corresponding values.

DRL Testing
The trained policy underwent additional testing with an extended 350,000 simulation time steps, representing 500 episodes.In order to better assess the performance of the model, we selected a typical initial condition where the leading vehicle's initial velocity was set to 12.89 m/s, and the ego vehicle's initial velocity was set to 13.89 m/s.The traffic flow density was 0.11 vehicles/second, for two lanes.

Comparison and Analysis
In the following sections, we compare the performance of MPC and RL in executing lane-change tasks for autonomous vehicles.
In Figure 3, the solid line represents the training curve of PASAC, and it can be observed that it approached convergence around 150,000 steps.The dashed line represents the total cost of MPC averaged over 5 episodes.The performance comparison results between PASAC and MPC are shown in Table 3.The average speed and cost for PASAC were superior to MPC.This implies that PASAC achieved better speed and time performance.Additionally, PASAC tended to execute more lane changes compared to MPC.In Figure 4, the red solid line represents the self-driving vehicle controlled by the MPC method, while the deep blue solid line represents the vehicle controlled by the reinforcement learning algorithm PASAC.With PASAC, the vehicle decelerated suddenly and then accelerated, while with MPC, it accelerated first and then decelerated.The green and yellow dashed lines respectively represent lane changes by the self-driving vehicle under PASAC and MPC.
It can be observed that the lane changes under PASAC and MPC occurred at different times (MPC occurred around 22 s, while PASAC occurred around 51 s).This was because, for PASAC and MPC, the surrounding vehicles were in different states before the sudden lane change occurred.The self-driving vehicle under PASAC changed lanes immediately after a sudden deceleration, then accelerated to maintain a higher speed.On the other hand, the self-driving vehicle under MPC changed lanes after a sudden acceleration, maintaining a stable speed.In the simulation results depicted in Figure 5, the acceleration and jerk of both MPC and PASAC demonstrate smooth motion characteristics, avoiding abrupt accelerations and vibrations, significantly enhancing the comfort of the driver.Figures 6 depicts the     The lateral position of the autonomous vehicle on the road is shown in Figure 6, with dashed lines representing the road boundaries and solid lines distinctly outlining the precise location of the vehicle along the center line of the road.Through the visual contrast between the dashed and solid lines, we can clearly observe where the ego vehicle initiated lane changes.

Generalization Analysis
The complexity and dynamism of the environment can lead to a sub-optimal performance of the policy obtained during the training phase when applied to unseen settings.To thoroughly assess the algorithm's performance, we conducted a series of tests encompassing 100 episodes, including traffic densities of 0.05 and 0.20.Table 4 presents the performance metrics, including the collision rate, average speed, and cost, across the various testing stages.Our findings indicate that, following testing in multiple traffic densities, the algorithm exhibited relatively stable performance in new environments.

Conclusions
In this study, we used a hybrid-action reinforcement learning algorithm, PASAC, and compared it with MPC for decision and control problems of autonomous vehicles during the lane-change process.Both MPC and PASAC achieved a collision rate of 0%.They shared the same control update frequency and were capable of handling hybridaction space problems.We maintained identical testing conditions for PASAC and MPC, including traffic density and traffic scenarios.The results indicated that, in the absence of modeling errors, PASAC outperformed MPC in terms of the value function.Nevertheless, the PASAC algorithm still encountered collisions in scenarios with higher traffic flow, due to inadequate machine learning generalization.One of the challenges lies in the lack of theoretical analysis of the relationship between neural networks and optimal control, which could be a crucial area for future research.In the future, we also will consider more complex conditions, such as harsh weather conditions and unexpected road incidents.
a 2 , ......a n .Each discrete action a ∈ A d is associated with a corresponding set of continuous parameters, represented as a

Figure 1 .
Figure 1.(a) The framework on the left is the standard SAC architecture designed for continuous operation.The actor outputs mean and standard deviation vectors µ and σ, which are utilized for injecting standard normal noise ϵ and applying the tanh nonlinearity (to keep the actions within a bounded range).The critic estimates the corresponding Q value based on the state and the actor's action a c .(b) On the right, we use the parameterized SAC structure.including the mean µ and the variance σ for the continuous components.It outputs continuous actions a c and k d .The largest k d among continuous actions is selected for the discrete action.The critic network still takes the state s, continuous actions a c and k d as inputs.

3. 2 .
StateAt time t, the distance between the ego vehicle and the preceding vehicle d p t , the distance between the ego vehicle and the following vehicle d f t , the distance from the ego vehicle to the preceding vehicle in the target lane d target p t , the distance from the ego vehicle to the following vehicle in the target lane d target f t , ego vehicle's speed v ego , ego vehicle's acceleration a ego t , the speeds of the preceding car and following car v p t , v f t , as well as the speeds of the preceding and trailing cars in the target lane v

Figure 4 .
Figure 4. Lane change in the simulation.
lateral position and distance to the leading vehicle in the simulations of PASAC and MPC for the ego vehicle.

Figure 5 .
Figure 5. Acceleration and jerk during the simulation.

Figure 6 .
Figure 6.Distance to the leader and lateral position during the simulation.

Figure 6
Figure 6 illustrates the distance from the ego vehicle to the leading vehicle, with a set safety following distance of 25 m.To optimize the safety, both MPC and PASAC choose to initiate lane changes before reaching the 25 m distance to the leading vehicle.Note that there was a sudden change in the distance between the ego vehicle and the leading vehicle, indicating a successful lane change and a subsequent alteration in the state of the leading vehicle.The lateral position of the autonomous vehicle on the road is shown in Figure6, with dashed lines representing the road boundaries and solid lines distinctly outlining the precise location of the vehicle along the center line of the road.Through the visual contrast between the dashed and solid lines, we can clearly observe where the ego vehicle initiated lane changes.

Table 3 .
Comparison of results from 100 episodes of testing.

Table 4 .
The generalization results across different traffic densities for 100 episodes.traffic flow density is ϕ = 0.11 vehicles/second (veh/s) during training. The