Prescribed Performance Guided Safe Reinforcement Learning for Roundabout Navigation of Autonomous Vehicles
Connected and Autonomous Vehicles (CAVs) face significant challenges in roundabout navigation due to dense traffic interactions and unpredictable agent behaviors, necessitating high levels of adaptability and safety. While the combination of Reinforcement Learning (RL) and Model Predictive Control (MPC) offers a promising approach, existing frameworks suffer from a structural mismatch where pointwise RL decisions fail to align with MPC's trajectory level optimization, and often lack rigorous safety guarantees.
From the abstract. Our summary is in progress.
Full paper
Prescribed Performance Guided Safe Reinforcement Learning for Roundabout Navigation of Autonomous Vehicles
Published under CC BY 4.0. Reproduced with attribution; original at arXiv:2610.27732 (PDF).
Abstract
Connected and Autonomous Vehicles (CAVs) face significant challenges in roundabout navigation due to dense traffic interactions and unpredictable agent behaviors, necessitating high levels of adaptability and safety. While the combination of Reinforcement Learning (RL) and Model Predictive Control (MPC) offers a promising approach, existing frameworks suffer from a structural mismatch where pointwise RL decisions fail to align with MPC’s trajectory level optimization, and often lack rigorous safety guarantees. This work proposes RLTrajGen-PPMPC-CBF, a hierarchical framework for safe, smooth and comfort roundabout navigation, which regulates the coupling between RL-based planning and MPC-based control. We employ Prescribed Performance Constraints (PPC) to enforce a gradual, stable convergence between reference trajectories and control outputs, ensuring MPC tracking performance remains consistent with intended behavior from RL. Additionally, a Control Barrier Function (CBF) layer provides real-time safety corrections that are fed back into the RL process. Simulation results in the MetaDrive environment demonstrate that our method achieves a 6.25% increase in average success rate and a 65.87% reduction in Motion Sickness Dose Value (MSDV) compared to the optimal baseline, meanwhile accelerating training convergence.
Index Terms:
Connected and autonomous vehicles, deep reinforcement learning, model predictive control, prescribed performance control, control barrier functions
I Introduction
The advancement of Intelligent Transportation Systems (ITS) has accelerated the deployment of Connected and Autonomous Vehicles (CAVs), enabling them to navigate diverse urban environments [1, 2, 3, 4]. Significant progress has been achieved in standard driving tasks, including lane keeping [5, 6, 7], lane changing [8, 9], and adaptive cruise control [10, 11]. However, roundabouts remain particularly challenging due to dense vehicle interactions and rapidly changing traffic conditions, where planning or control failures may compromise both safety and ride comfort [5, 12].
Current autonomous driving approaches mainly fall into learning-based and model-based methods. Reinforcement Learning (RL) has demonstrated strong capability in high-dimensional perception and decision-making [13, 14, 15, 16]. However, its model-free nature makes it difficult to explicitly incorporate vehicle dynamics and safety constraints [17, 18]. In contrast, Model Predictive Control (MPC) explicitly considers system dynamics and constraints, while Control Barrier Functions (CBFs) have been widely integrated into MPC to provide formal safety guarantees [19, 20, 21, 22]. Nevertheless, model-based approaches generally exhibit limited adaptability in highly dynamic environments.
To combine the adaptability of RL with the capability to enforce safety and other constraints of MPC, hybrid RL-MPC frameworks have recently attracted increasing attention [23, 24, 25, 26]. Oliveira et al. [25] employed RL to determine discrete decision variables to accelerate MPC optimization, while Lubars et al. [26] combined DDPG with MPC, where MPC served as a safety backup for potentially unsafe RL actions. Zhang et al. [8] further incorporated a CBF safety filter into an RL-MPC framework (Fig. 1(b)). Nevertheless, these methods still suffer from a structural mismatch: RL produces pointwise decisions whereas MPC optimizes trajectories, limiting MPC’s ability to accurately realize the planning intent and resulting in less smooth trajectories in complex driving scenarios. Zhang et al. [8] introduced a CBFG-PPO framework (Fig. 1 (b)), where RL provides target states for MPC, and CBF filters unsafe actions and feeds corrections back to RL. Nevertheless, RL produces pointwise decisions while MPC optimizes over trajectories in this framework, which results in structural mismatch and limits MPC’s ability to accurately realize RL intent, producing less smooth trajectories for CAVs in complex environments.
To address the mentioned issues, we propose a novel RLTrajGen-PPMPC-CBF framework, as illustrated in Fig. 1 (c), and validate its effectiveness in a roundabout scenario. The proposed framework consists of three key components: an RL-based Trajectory Generator (RLTrajGen) that facilitates high-level decision making by producing reference trajectories, a prescribed performance MPC (PPMPC) that dynamically adjusts trajectory tracking within a predefined performance envelope, and a CBF-based safety filter that corrects unsafe behaviors. Specifically, we first introduce a trajectory generator that transforms the pointwise outputs of RL into reference trajectories for MPC tracking. In addition, we incorporate a prescribed performance constraint (PPC) mechanism to progressively reduce the tracking error, enabling MPC to more accurately follow the trajectories generated by RL. This design improves the consistency between planning and control, facilitating more stable policy learning and enhanced navigation performance. The main contributions of this work are summarized below:
- We design a trajectory generation mechanism that converts single-step outputs from RL into trajectories with adaptive parameters for MPC tracking, thereby effectively resolving the structural mismatch between RL and MPC and significantly accelerating the convergence of training.
- We utilize PPC to regulate the coupling between RL-based planning and MPC-based control, which is the first one in RL-MPC hierarchical framework to our best knowledge. Our method facilitates the progressive reduction of trajectory tracking errors between the planning and control layers, thus balancing the adaptability to complex scenarios and the safety for autonomous systems, and improving ride comfort by producing smoother trajectories.
The remaining sections are organized as follows. Section II introduces the dynamic model of CAVs, prescribed performance constraints, control barrier functions, and formulates the safe navigation problem. Section III presents the RLTrajGen-PPMPC-CBF framework. Section IV includes simulation results and compares our approach with baselines. Section V concludes the paper and outlines future directions.
II Preliminaries and Problem Formulation
II-A System Model
The discrete-time dynamics of a CAV is modeled as
\bm{x}_{k+1}=f(\bm{x}_{k},\bm{u}_{k})where the state \bm{x}_{k}=[x_{k},y_{k},v_{k},\theta_{k}]^{T} includes longitudinal and lateral positions, speed, and heading, respectively. The control input \bm{u}_{k}=[a_{k},\delta_{k}]^{T} comprises acceleration and steering. For the sake of discussion, we adopt the kinematic bicycle model to discretize the dynamics:
\begin{array}[]{c}\begin{bmatrix}x_{k+1}\\
y_{k+1}\\
v_{k+1}\\
\theta_{k+1}\end{bmatrix}\end{array}=\begin{array}[]{c}\begin{bmatrix}x_{k}+v_{k}\cos(\theta_{k}+\beta_{k})\cdot T_{s}\\
y_{k}+v_{k}\sin(\theta_{k}+\beta_{k})\cdot T_{s}\\
v_{k}+a_{k}\cdot T_{s}\\
\theta_{k}+\dfrac{v_{k}\sin\beta_{k}}{l_{r}}\cdot T_{s}\end{bmatrix}\end{array}where T_{s} is the sampling period, l_{f} and l_{r} represent the distances from the front and rear wheels to the center of mass, and \beta_{k} is the slip angle defined as \beta_{k}=\arctan(\tan\delta_{k}\cdot l_{r}/(l_{f}+l_{r})). This model allows for iterative prediction of future vehicle states.
II-B Prescribed Performance Constraints
To ensure asymptotic error convergence, the tracking error e(t) can be constrained within a shrinking bound:
-\sigma_{L}p(t)<e(t)<\sigma_{R}p(t)where the performance function p(t) satisfies: 1) it is smooth, strictly positive, and monotonically decreasing; 2) \underset{t\to 0}{\lim}p(t)=p_{0}, \underset{t\to\infty}{\lim}p(t)=p_{\infty}, with p_{0}>p_{\infty}>0. From [27], we utilize the form p(t)=(p_{0}-p_{\infty})\mathrm{e}^{-\iota t}+p_{\infty}, with decay rate \iota\in[0,1]. To incorporate PPC into controller design, the constrained error is transformed into an unconstrained one via e(t)=\Xi(\zeta)p(t), where \Xi(\zeta) is smooth, strictly increasing, bounded as \Xi(\zeta)\in(-\sigma_{L},\sigma_{R}) and given by:
\Xi(\zeta)=\frac{\sigma_{R}\mathrm{e}^{\zeta}-\sigma_{L}\mathrm{e}^{-\zeta}}{\mathrm{e}^{\zeta}+\mathrm{e}^{-\zeta}},\quad\zeta=\frac{1}{2}\ln\frac{e(t)/p(t)+\sigma_{L}}{\sigma_{R}-e(t)/p(t)}.II-C Control Barrier Functions
For system dynamics (1), a superlevel safe set \mathcal{C} is induced by a continuously differentiable function h:\mathbb{R}^{n}\to\mathbb{R} as:
\displaystyle\mathcal{C} \\ \displaystyle=\{\bm{x}\in\mathbb{R}^{n}\mid h(\bm{x})\geq 0\}, \\ \displaystyle\partial\mathcal{C} \\ \displaystyle=\{\bm{x}\in\mathbb{R}^{n}\mid h(\bm{x})=0\}, \\ \displaystyle\mathrm{Int}(\mathcal{C}) \\ \displaystyle=\{\bm{x}\in\mathbb{R}^{n}\mid h(\bm{x})>0\}.And h(\cdot) is defined as a discrete-time CBF [28] if it satisfies
h(\bm{x}_{k+1})-(1-\gamma_{k})h(\bm{x}_{k})\geq 0,\quad\gamma_{k}\in(0,1]which guarantees the forward invariance of the safe set \mathcal{C}. By designing the control input \bm{u}_{k} to satisfy (6), the system remains within \mathcal{C} for all t>0 to maintain safe operation.
II-D Problem Formulation
A vehicle navigates in a two-dimensional roundabout (see Fig. 1), where other vehicles appear randomly. Let I^{\mathrm{ov}}=\{i\mid i\in\mathbb{Z}_{\geq 0}\} represent the index set of vehicles within the control zone. When a new vehicle enters, the smallest unused index i_{\mathrm{new}}=\min\{i\in\mathbb{Z}_{\geq 0}\mid i\notin I^{\mathrm{ov}}\} is assigned. This index is subsequently removed when the vehicle exits, ensuring a dynamic mapping between indices and vehicles. To achieve safe and efficient roundabout navigation, the ego vehicle is required to optimize three objectives: travel time, control effort, and safety, which are later incorporated into the RL reward design and MPC optimization formulations.
Definition 1 (Travel Time).
The travel time for the ego vehicle to reach the destination is defined as a positive stage objective function r_{1}(\bm{x}) and should be minimized:
J_{1}=t_{T}-t_{0}=\int_{t_{0}}^{+\infty}\delta(\bm{p}_{\tau})\,\mathrm{d}\tau=\Phi\left[\int_{t_{0}}^{+\infty}r_{1}(\bm{x}_{\tau})\,\mathrm{d}\tau\right]where \bm{p}_{\tau}=(x_{\tau},y_{\tau}) is the ego vehicle position, \delta(\bm{p}_{\tau}) indicates whether the destination set \mathcal{X}_{T} has been reached, and \Phi(\cdot) is a strictly increasing mapping.
(\bm{q}_{t},\bm{w}_{t}). The action \bm{q}_{t} is processed by the trajectory generator (bottom left) to construct Trajectory Generator \mathcal{G}_{t} and produce a prediction sequence \bm{z}_{t}^{*} of length n_{p}, which is then used to solve an MPC problem yielding u^{\mathrm{MPC}_{t}}. This control input is refined by the CBF module (bottom right) to obtain u^{\mathrm{CBF}_{t}}, which is applied to the environment to generate rewards for RL training.Definition 2 (Energy Consumption).
Given a positive control cost function C(\cdot), minimize the accumulated energy cost:
J_{2}=\int_{t_{0}}^{t_{T}}C(\bm{u}_{\tau})\,\mathrm{d}\tauDefinition 3 (Safety Penalty).
Each vehicle should maintain a minimum safe distance \delta from its surrounding vehicles, i.e., \mathrm{dist}(\bm{p}_{t},\bm{p}^{\mathrm{ov}_{i}}_{t})\geq\delta. Safety violations are quantified by a positive function r_{2}(\bm{p},\bm{p}^{\mathrm{ov}}) and the cumulative penalty is
J_{3}=\int_{t_{0}}^{t_{T}}r_{2}(\bm{p}_{\tau},\bm{p}^{\mathrm{ov}_{i}}_{\tau})\,\mathrm{d}\tau,where larger r_{2}(\cdot) corresponds to more severe violations.
Problem 1 (Roundabout Navigation of CAVs).
Given a CAV modeled by (1), design the optimal control law \bm{u} for safe navigation of the CAV and minimize the objective function:
\displaystyle\min_{\bm{x},\bm{u}}\ \int_{t_{0}}^{+\infty}\Big[r_{1}(\bm{x}_{\tau})+\big(C(\bm{u}_{\tau})+r_{2}(\bm{p}_{\tau},\bm{p}^{\mathrm{ov}_{i}}_{\tau})\big)\delta(\bm{p}_{\tau})\Big]\,\mathrm{d}\tau \\ \displaystyle s.t.\left\{\begin{array}[]{l}\bm{x}_{\tau}\in\mathcal{C}_{\mathrm{safe}}\\
\bm{u}_{\min}\leq\bm{u}\leq\bm{u}_{\max}\end{array}\right.where u_{\min}, u_{\max} denote the lower and upper bounds of \bm{u}, respectively, and \mathcal{C}_{\mathrm{safe}} defined from (5) denotes the safe set for collision avoidance of the vehicles.
III hierarchical framework for safe navigation
III-A Framework Overview
The proposed framework consists of three coupled layers, as illustrated in Fig. 2: 1) a high-level decision-making layer that specifies reference motion intentions through a learned policy; 2) a low-level control layer that tracks the resulting reference trajectory and computes control inputs based on the dynamic model; and 3) a safety mediation layer that corrects unsafe behaviors during execution.
In general, the framework follows a standard reinforcement learning training and evaluation pipeline. At each time step, the high-level agent produces actions that generate a reference state sequence \bm{z}^{*}_{t} of length n_{p}:
\bm{z}^{*}_{t}=\{\bm{z}^{*}_{t+i}\}=\{(v^{*}_{t+i},\theta^{*}_{t+i})\mid i=0,1,\cdots,n_{p}-1\}where \bm{z}^{*}_{t} represents the desired future motion of the ego vehicle. The low-level controller is responsible for tracking this reference trajectory, and the corresponding tracking error e incorporated into the cost function MPC is given as:
e=\mathrm{dist}(\bm{z}_{t},\bm{z}^{*}_{t})where \bm{z}_{t} denotes the trajectory generated by MPC and \mathrm{dist}(\cdot) measures the deviation from the reference. After any potentially unsafe action output from the MPC is corrected using a CBF-based filter, the resulting control input \bm{u}_{t}=[a_{t},\delta_{t}]^{T} is applied to the simulated vehicle. This interaction with the environment yields a reward, thereby completing one training iteration.
- \bm{r_{1}}
- r_{\mathrm{dest}}
- Progress to destination
- \|\bm{l}_{t}-\bm{l}_{t-1}\|
- r_{\mathrm{speed}}
- Speed regulation
- v_{t}/v_{\max}
- r_{\mathrm{steer}}
- Steering change penalty
- -\|\theta_{t}-\theta_{t-1}\|
- r_{\mathrm{terminal}}
- Terminal reward
- 10 if arrived, else 0
- \bm{r_{2}}
- r_{\mathrm{crash}}
- Crash penalty
- -5 if crash, else 0
III-B RL-based Trajectory Generator
The surrounding environment is perceived through onboard sensors, such as LiDAR, and encoded into a 259-dimensional observation vector. This vector contains various parameters including the vehicle speed v_{t}, steering angle \delta_{t}, previous throttle/brake command u_{t-1}, previous steering angle \delta_{t-1}, yaw rate r_{t}, heading difference to the lane \Delta\psi, distances to the left and right lane boundaries d_{L} and d_{R}, lateral lane position p_{lat}, projected distances along the lane heading d_{\parallel}, projected lateral distances d_{\perp}, lane curvature radius R, turn direction flags C, lane angles \theta, and surrounding LiDAR features \bm{s}^{sur}_{t}.
The action space includes adjustable parameters for a generated reference trajectory and its prescribed performance tracking weights. Specifically, the action is defined as \bm{a}_{t}=(\bm{q}_{t},\bm{w}_{t}). \bm{w}_{t}=[w_{t}^{v},w_{t}^{\theta}]\in\mathbb{R}^{2} is a weight vector that adjusts the strictness of the prescribed trajectory tracking performance in the MPC. \bm{q}_{t}=[\nu_{t}^{*},\kappa_{t}^{*}]\in\mathbb{R}^{2} specifies the structure of a Trajectory Generator \mathcal{G}_{t}(\bm{x}_{t};\bm{q}_{t}):\mathbb{R}^{4}\to\mathbb{R}^{2\times n_{p}} and helps to generate the reference trajectory by the following state transition function:
\left\{\begin{array}[]{l}v_{t+i}^{*}=\nu_{t}^{*},\,i=0,\cdots,n_{p}-1,\\
\theta_{t+i}^{*}=\theta_{t+i-1}^{*}+v_{t+i-1}^{*}\kappa_{t}^{*}\Delta t,\,i=1,\cdots,n_{p}-1,\\
\theta_{t}^{*}=\theta_{t}.\end{array}\right.Fig. 3 illustrates a segment of the resulting reference trajectory. The velocity profile is piecewise constant, while the heading angle evolves as a continuous piecewise linear function. By modifying the Trajectory Generator, different reference trajectory shapes can be obtained.
Based on the optimal control problem defined in (10), two reward terms are designed: r_{1} for goal-reaching behavior and r_{2} for collision avoidance, which are presented in Table I in detail. Specifically, r_{1} is composed of four components as r_{1}=r_{\mathrm{dest}}+r_{\mathrm{speed}}+r_{\mathrm{steer}}+r_{\mathrm{terminal}}. Here, r_{\mathrm{dest}}=\|\bm{l}_{t}-\bm{l}_{t-1}\| measures progress toward the goal, r_{\mathrm{speed}}=v_{t}/v_{\max} encourages efficient motion, r_{\mathrm{steer}}=-\|\theta_{t}-\theta_{t-1}\| penalizes abrupt steering changes, and r_{\mathrm{terminal}}=10 is assigned upon successful arrival. Meanwhile, the collision-related reward is defined as r_{2}=r_{\mathrm{crash}}, where r_{\mathrm{crash}}=-5 in the event of a collision and 0 otherwise.
\mathrm{e}^{-\iota\Delta t}), and random weights from normal distributions \mathcal{N}\sim(\mathrm{e}^{-\iota\Delta t},\sigma^{2}) where \sigma=0.1/0.2/0.3. (right) Schematic of the reference Trajectory Generator parameterized by (\nu_{t}^{*},\kappa_{t}^{*}).Proximal Policy Optimization (PPO) is adopted for policy learning. The policy network \pi_{\theta}(\bm{a}_{t}|\bm{o}_{t}) generates actions from observations, while the value network V_{\omega}(\bm{o}_{t}) estimates the state value. The Generalized Advantage Estimation (GAE) is computed as
\hat{A}_{t}=\delta_{t}+\gamma\lambda(1-d_{t+1})\hat{A}_{t+1},\delta_{t}=r_{t}+\gamma(1-d_{t+1})V_{t+1}-V_{t}where V_{t}=V_{\omega}(\bm{o}_{t}) represents the value function, r_{t} denotes the reward, d_{t} indicates episode termination, \gamma is the discount factor, and \lambda controls the bias–variance trade-off.
The loss functions of the two networks in PPO are defined:
L^{\mathrm{CLIP}}(\theta)=\hat{\mathbb{E}}_{t}[\min(r_{t}(\theta)\hat{A}_{t},\mathrm{clip}(r_{t}(\theta),1-\varepsilon,1+\varepsilon)\hat{A}_{t})],L(\omega)=\hat{\mathbb{E}}_{t}[(r_{t}+\gamma V_{\omega}(\bm{o}_{t+1})-V_{\omega}(\bm{o}_{t}))^{2}]where \mathrm{clip} is a clipping function that constrains r_{t}(\theta) to [1-\varepsilon,1+\varepsilon], and r_{t}(\theta):=\pi_{\theta}(\bm{a}_{t}|\bm{o}_{t})/\pi_{\theta_{\mathrm{old}}}(\bm{a}_{t}|\bm{o}_{t}). The final training objective is a weighted combination of the policy and value losses:
L_{\mathrm{final}}=a_{1}L^{\mathrm{CLIP}}(\theta)+a_{2}L(\omega),\,a_{i}\in(0,1),\,i=1,2.III-C MPC with PPC-based cost
Prescribed performance constraints (PPC) progressively shrinks the error bounds, ensuring that the error asymptotically converges to a specified value. This characteristic can be directly integrated into the construction of \mathrm{dist}(\bm{z}_{t},\bm{z}^{*}_{t}) in (12). Given that \mathrm{dist}(\bm{z}_{t},\bm{z}^{*}_{t}) is evaluated in discrete time, the performance function in PPC must first be discretized. Denoting the sampling interval as \Delta t and defining a discrete-time performance function p_{k}=p(k\Delta t), we obtain:
p_{k+1}=p((k+1)\Delta t)=wp_{k}+(1-w)p_{\infty}Following [29, 30], the parameter w=\exp(-\iota\Delta t) is treated as time-varying, i.e., w=w_{k}:=w(k). Then, (19) can be rewritten as:
p_{k+1}=w_{k}p_{k}+(1-w_{k})p_{\infty},\,k=0,1,\dots,+\inftyThe effectiveness of (20) can be verified in Fig. 3. The error transformed by this discrete-time performance metric is used to define the distance function:
\displaystyle\mathrm{dist}(\bm{z}_{t},\bm{z}_{t}^{*}) \\ \displaystyle=\mathrm{dist}([v_{t},\theta_{t}],[v_{t}^{*},\theta_{t}^{*}]) \\ \displaystyle=\left\|\big[\Xi^{-1}(\bar{e}_{t}^{v}),\Xi^{-1}(\bar{e}_{t}^{\theta})\big]\right\|where the normalized errors \bar{e}_{t}^{v}, \bar{e}_{t}^{\theta} are defined as
\bar{e}_{t}^{v}=\frac{v_{t}-v_{t}^{*}}{p_{\tau}^{v}},\,\bar{e}_{t}^{\theta}=\frac{\theta_{t}-\theta_{t}^{*}}{p_{\tau}^{\theta}}.Here, p_{\tau}^{v} and p_{\tau}^{\theta} are the discrete-time performance functions for v and \theta, respectively. The two performance functions correspond to weights \bm{w}_{t}=[w_{t}^{v},w_{t}^{\theta}]\in\mathbb{R}^{2} introduced in Sec.III-B. The PPC timer is reset at the beginning of each episode, and \tau denotes the relative time within the episode.
With the defined PPC-based distance function, the MPC problem is then formulated as
\displaystyle\underset{\bm{u}}{\min}\;J(\bm{z}_{t}^{t+n_{p}},\bm{u}_{t}^{t+n_{p}-1})= \\ \displaystyle\sum_{i=0}^{n_{p}-1}\left[\underbrace{\mathrm{dist}(\bm{z}_{t+i},\bm{z}_{t+i}^{*})}_{\text{state error}}+\underbrace{\|\bm{u}_{t+i}\|}_{\text{control cost}}\right]+\underbrace{\mathrm{dist}(\bm{z}_{t+n_{p}},\bm{z}_{t+n_{p}}^{*})}_{\text{terminal cost}} \\ \displaystyle s.t.\left\{\begin{array}[]{l}\bm{x}_{t+i+1}=\hat{f}(\bm{x}_{t+i},\bm{u}_{t+i}),\\
\bm{z}_{t+i}=[\bm{0}_{2\times 2},\bm{I}_{2\times 2}]\bm{x}_{t+i},\\
\bm{u}_{\min}\leq\bm{u}_{t+i}\leq\bm{u}_{\max},\,i=0,\dots,n_{p}-1\end{array}\right.where \bm{0}_{2\times 2} and \bm{I}_{2\times 2} denote the zero and identity matrices, respectively, and \hat{f} follows the dynamics in (2). Solving (23) yields the optimal state and control sequences. We define \bm{x}_{t}^{\mathrm{MPC}}=\bm{x}_{t+1}, \bm{z}_{t}^{\mathrm{MPC}}=[\bm{0}_{2\times 2},\bm{I}_{2\times 2}]\bm{x}_{t}^{\mathrm{MPC}}, and denote the applied control as \bm{u}_{t}^{\mathrm{MPC}}, which will be used in Sec.III-D.
III-D CBF-based safety filter
CBF is employed to synthesize a safety filter to correct potentially unsafe behaviors generated by MPC. In a roundabout scenario, the primary safety objective is to avoid inter-vehicle collisions. To this end, each vehicle is approximated by an ellipse, which enables a quantitative formulation of collision-avoidance constraints. As illustrated in Fig. 4, a vehicle is first approximated by a rectangle and then enclosed by a circumscribed ellipse. Let a and b denote the semi-major and semi-minor axes, respectively. The equation of a non-rotated ellipse centered at \bm{x}_{o} is (\bm{x}-\bm{x}_{o})^{T}\bm{D}(\bm{x}-\bm{x}_{o})=1, where \bm{D}=\mathrm{diag}(1/a^{2},\,1/b^{2}).
For an ellipse rotated by an angle \theta, a coordinate transformation is applied using the rotation matrix \bm{R}_{\theta}=[\cos\theta,\sin\theta;-\sin\theta,\cos\theta], yielding (\bm{x}-\bm{x}_{o})^{T}\bm{R}_{\theta}^{T}\bm{D}\bm{R}_{\theta}(\bm{x}-\bm{x}_{o})=1. Then, let \bm{Q}_{\theta}=\bm{R}_{\theta}^{T}\bm{D}\bm{R}_{\theta}. To compute the distance between two ellipses, consider the line connecting their centers, along which a point is given by \bm{x}=\bm{x}_{o}+\bm{e}t, where \bm{e} is the unit direction vector. Substituting into the ellipse equation yields t=1/\sqrt{\bm{e}^{T}\bm{Q}_{\theta}\bm{e}}. Accordingly, the distance between the boundaries of two ellipses is defined as d_{\mathrm{F}}(\bm{x})=\|\bm{e}_{o_{1,2}}\|-1/\sqrt{\bm{e}^{T}\bm{Q}_{\theta}\bm{e}}-1/\sqrt{\bm{e}^{T}\bm{Q}_{\varphi}\bm{e}}, where \bm{e}_{o_{1,2}}=\bm{x}_{o_{1}}-\bm{x}_{o_{2}} and \bm{e}=\bm{e}_{o_{1,2}}/\|\bm{e}_{o_{1,2}}\|. The obstacle-avoidance function is then defined as h(\bm{x})=d_{\mathrm{F}}(\bm{x})-d_{\min}. For clarity, only one safety constraint is considered here. The resulting CBF optimization problem is formulated as:
\displaystyle\underset{\bm{u}}{\min}\,J(\bm{u}_{t})=\|\bm{u}_{t}-\bm{u}_{t}^{\mathrm{MPC}}\| \\ \displaystyle s.t.\left\{\begin{array}[]{l}\bm{x}_{t+1}=\hat{f}(\bm{x}_{t},\bm{u}_{t}),\\
h(\bm{x}_{t+1})-(1-\gamma)h(\bm{x}_{t})\geq 0.\end{array}\right.Solving (24) yields \bm{x}_{t+1} and \bm{u}_{t}, which are denoted as \bm{x}_{t}^{\mathrm{CBF}}=\bm{x}_{t+1} and \bm{u}_{t}^{\mathrm{CBF}}=\bm{u}_{t}. The corresponding state representation is defined as \bm{z}_{t}^{\mathrm{CBF}}=[\bm{0}_{2\times 2},\bm{I}_{2\times 2}]\bm{x}_{t}^{\mathrm{CBF}}.
Inspired by [8], the policy loss term in (16) is strategically modified to allow the reinforcement learning agent to learn CBF-induced corrective behavior:
\displaystyle L^{\mathrm{CLIP}}(\theta)= \\ \displaystyle\left\{\begin{array}[]{l}\mathbf{case\;1}\;\|\bm{z}_{t}^{\mathrm{CBF}}-\bm{z}_{t}^{\mathrm{MPC}}\|<\delta_{\bm{z}}\\
\hat{\mathbb{E}}_{t}[\min(r_{t}(\theta)\hat{A}_{t},\mathrm{clip}(r_{t}(\theta),1-\varepsilon,1+\varepsilon)\hat{A}_{t})],\\
\\
\mathbf{case\;2}\;\|\bm{z}_{t}^{\mathrm{CBF}}-\bm{z}_{t}^{\mathrm{MPC}}\|\geq\delta_{\bm{z}}\\
\hat{\mathbb{E}}_{t}[\bm{z}_{t}^{\mathrm{CBF}}-[\bm{I}_{2\times 2},\bm{0}_{2\times 1}]\bm{\mu}_{t}(\theta)].\end{array}\right.Here, \delta_{\bm{z}} denotes the threshold beyond which the CBF intervention is considered significant. If that is the case, the original loss term is replaced by case 2, encouraging the policy mean \bm{\mu}_{t}(\theta)=\mathbb{E}_{\bm{a}_{t}\sim\pi_{\theta}(\bm{a}_{t}|\bm{o}_{t})}[\bm{a}_{t}]\in\mathbb{R}^{4} to better align with the CBF-corrected state.
IV Experiments
IV-A Simulation Platform Setup
The roundabout simulation environment is built in MetaDrive and is illustrated in Fig. 5, with some key parameters specified as follows. The computer running reinforcement learning training is equipped with an AMD EPYC 7453 processor, with CUDA version 12.9 and Python version 3.11.4. During training, four parallel environments are used for sampling, followed by training on an NVIDIA RTX 4090 GPU. A fixed random seed is set at the initialization of each process to ensure the reproducibility of the experiments. The key hyperparameters of the framework listed in Fig. 5 have been manually carefully tuned.
IV-B Benchmark Comparison
- Benchmark
- M1
- PPO-only
- The RL policy directly outputs control commands [a,\delta] to the simulator, following the official MetaDrive tutorial [31] and serving as a standard baseline.
- M2
- PPO-MPC
- RL provides high-level decisions, while MPC acts as the low-level controller, without additional coupling modules.
- M3
- CBFG-PPO
- A safety-augmented variant of M1 that incorporates a CBF layer to enforce safety constraints and guide subsequent updates in the learning process [8].
- Ablation
- M4
- RLTrajGen-MPC-CBF
- Replaces the RL module in M3 with RLTrajGen to generate a reference trajectory for MPC tracking.
- M5
- RL-PPMPC-CBF
- Replaces the MPC module in M3 with PPMPC, applying progressive penalties to tighten trajectory tracking errors.
- M6
- Our Method
- The full RLTrajGen-PPMPC-CBF framework, combining RL-based trajectory generation with progressively constrained MPC.
We select three baselines as the main comparison methods, namely PPO-only, PPO-MPC, and CBFG-PPO from [8]. Detailed descriptions of these methods are provided in Table II. During training, a monitor is employed to record the average reward(AR) and average success rate(ASR) of each episode. The collected data are smoothed using a sliding window and are illustrated in Fig. 6 and Fig. 7. As shown in these figures, M6 achieves the highest AR and ASR, reaching 178.05 and 96.25%, respectively. These results outperform PPO-only (AR 156.74, ASR 67.50%), PPO-MPC (AR 159.18, ASR 63.75%), and CBFG-PPO (AR 161.59, ASR 77.50%). Otherwise, among all methods, M6 exhibits the fastest convergence. Specifically, it converges within approximately 1300 steps, whereas the other baseline methods typically require about 3000–5000 steps for convergence.
The optimal policy from each method is implemented in the ego vehicle and assessed in the simulation environment. Fig. 8 illustrates the changes in velocity, heading angle, acceleration, and steering angle during driving, while Fig. 9 displays the actual driven trajectory. Compared to the baselines, our method keeps acceleration and steering angle within a narrower range, ensuring smoother and safer vehicle behavior. Additionally, our approach employs a distinct route planning strategy by selecting lanes with fewer surrounding vehicles and executing gradual lane changes at lower speeds, thereby enhancing ride comfort in autonomous scenarios.
IV-C Ride comfort and behavior
To evaluate the comfort of algorithms during driving, appropriate metrics must be selected. Following the ISO 2631 standard, the weighted root-mean-square (RMS) of each acceleration component is commonly used to measure vehicle roughness [32]. Accordingly, the motion sickness dose value (MSDV) is adopted as an indicator of motion sickness and is defined as:
\mathrm{MSDV}=\sqrt{\int_{0}^{T}[\tilde{a}(t)]^{2}\,\mathrm{d}t}where T denotes the duration of observation and \tilde{a}(t) represents the weighted acceleration (including both longitudinal and lateral components). Given both longitudinal and lateral accelerations, the discrete forms of MSDV are presented as:
\mathrm{MSDV}_{V}=\sqrt{\frac{1}{N}\sum_{i=1}^{N}a_{x,i}^{2}},\,\mathrm{MSDV}_{L}=\sqrt{\frac{1}{N}\sum_{i=1}^{N}a_{y,i}^{2}}where a_{x,i} is the longitudinal acceleration at time step i, directly obtained from the simulation. a_{y,i} is the lateral acceleration at time step i, estimated by a_{y,i}=(\delta_{i+1}-\delta_{i})v_{i}/\Delta t.
\mathrm{MSDV} and \mathrm{JERK}.- M1
- 156.74
- 67.50%
- 0.643
- 2.216
- 1.714
- 49.97
- M2
- 159.18
- 63.75%
- 0.997
- 3.077
- 4.005
- 67.49
- M3
- 161.59
- 77.50%
- 0.991
- 2.863
- 4.555
- 62.76
- M4
- 138.68
- 38.75%
- 0.992
- 2.697
- 2.915
- 66.55
- M5
- 170.02
- 90.00%
- 0.458
- 2.229
- 2.229
- 14.81
- M6
- 178.05
- 96.25%
- 0.457
- 0.690
- 2.483
- 8.815
In addition to MSDV, human perception is particularly sensitive to changes in acceleration, motivating the use of JERK as another comfort metric, defined as:
\mathrm{JERK}=\sqrt{\int_{0}^{T}\left[\frac{\mathrm{d}a}{\mathrm{d}t}\right]^{2}\mathrm{d}t}Its discrete longitudinal and lateral forms are given by:
\mathrm{JERK}_{V}=\sqrt{\sum_{i=1}^{N}\mathrm{diff}(a_{x,i})^{2}},\,\mathrm{JERK}_{L}=\sqrt{\sum_{i=1}^{N}\mathrm{diff}(a_{y,i})^{2}}All methods in Table II are evaluated using the MSDV and JERK metrics, and the corresponding results are illustrated in Fig. 10. M6 achieves the lowest values in \mathrm{MSDV}_{V} (0.457), \mathrm{MSDV}_{L} (0.449), and \mathrm{JERK}_{L} (8.815). Although its \mathrm{JERK}_{V} value (2.483) is slightly higher than that of M1 (1.714) and M5 (2.229), the proposed method overall demonstrates the best ride comfort among all evaluated approaches.
IV-D Ablation Study and Analysis
To validate the effectiveness of RLTrajGen and PPMPC, we conducted two ablation experiments: RLTrajGen-MPC-CBF and RL-PPMPC-CBF. These experiments are designed to explore the individual contributions of each module. Detailed descriptions of the methods can be found in Table II.
IV-D1 Effect of the RLTrajGen module
The replacement of the RL module in M3 with the RLTrajGen module results in M4. In terms of AR, M4 demonstrates faster convergence compared to M3, indicating that RLTrajGen significantly enhances convergence speed. However, the overall performance of M4 is notably inferior to that of other benchmarks, suggesting that merely incorporating RLTrajGen is not sufficient for optimal results. In addition, M5 removes the RLTrajGen module from the complete framework M6. The experimental results show that M6 achieves faster convergence in both AR and ASR than M5. These findings indicate that the Trajectory Generator resolves the structural mismatch between RL and MPC which accelerated the agent’s learning process.
IV-D2 Effect of the PPMPC module
M5 is obtained by replacing the MPC module in M3 with PPMPC. This leads to a substantial change in vehicle behavior: the overall profiles of velocity, heading angle, acceleration, and steering angle reduce to fewer oscillations, resulting in a smoother trajectory in Fig. 9. This improvement arises because traditional MPC often neglects the cost induced by trajectory tracking errors, focusing instead on reducing control effort, which can gradually deteriorate performance. Meanwhile, constraining trajectory tracking errors with fixed weights is generally impractical: if the weight is set too small, MPC may ignore trajectory errors, whereas if it is set too large, the optimization problem may become infeasible. Therefore, the PPMPC module needs to be integrated with RL for more flexible parameters. By comparing the average success rate of M5 and M3, PPMPC substantially improves safety, increasing the success rate from 77.50% to 96.25%. In addition, PPMPC achieves markedly better performance in terms of MSDV and JERK than M3, further demonstrating enhanced ride comfort.
V Conclusion
This work proposes a hierarchical learning based control framework for roundabout navigation of CAVs. Our approach tackles the oscillation issues caused by the structural mismatch between RL and MPC to facilitate smoother and more gradual decision-making. Trajectories are generated from RL policies and utilized to solve an MPC problem with PPC defined costs. Safety is ensured by a CBF layer, allowing the agent to learn the revised actions. Simulations on the MetaDrive platform validate the superior performance of our algorithm through the construction and modular comparison of five baseline methods. Our framework not only achieves the highest average reward and success rate, but also returns the smoothest trajectory measured by MSDV and JERK, demonstrating its potential for real-world driving scenarios. Future research will extend this framework to enhance navigation robustness in more complex dynamic environments.