Manuscript Offprint
arXiv:2610.40257Learned Terminal Costs for Short-Horizon Model Predictive Control of Autonomous Trucks in Interactive Highway Traffic
Hooman Hamze
Chalmers University of Technology
Gothenburg, Sweden
Benjamin Houshmand
Chalmers University of Technology
Gothenburg, Sweden
Erik Börve
Chalmers University of Technology
Gothenburg, Sweden
Trucks Technology and Industrial
Division, Volvo Group
Gothenburg, Sweden
Morteza Haghir Chehreghani
Chalmers University of Technology
and University of Gothenburg
Gothenburg, Sweden
morteza.chehreghani@chalmers.se
Deepthi Pathare
Chalmers University of Technology
and University of Gothenburg
Gothenburg, Sweden
Trucks Technology and Industrial
Division, Volvo Group
Gothenburg, Sweden
Nikolce Murgovski
Chalmers University of Technology
Gothenburg, Sweden
Abstract
Autonomous highway driving for heavy-duty trucks is a challenging control problem. The greater mass, dimensions and intricate dynamics increase the requirements for cooperation from surrounding traffic in critical maneuvers, requiring a careful balance between safety constraints and efficient long-horizon decision making. Model Predictive Control (MPC) provides rigorous constraint satisfaction but relies on terminal cost which can limit its effectiveness at short, computationally affordable horizons. Reinforcement Learning (RL) captures long-term driving behavior but offers no constraint guarantees and tends toward overly conservative policies when trained under sparse collision penalties. In this paper, we propose a hybrid MPC and RL framework for highway driving in autonomous trucks, where a finite-horizon MPC, solved via dynamic programming, uses a pre-trained RL model for terminal cost estimation. We evaluate the framework in a simulation environment with reactive surrounding traffic and compare it against pure MPC with zero terminal cost, rollout with terminal cost estimation using a base policy, and pure RL. Results show that the hybrid approach achieves zero collisions with the lowest cost of any configuration.
Keywords
Autonomous Driving, Reinforcement Learning, Model Predictive Control, Dynamic Programming, Heavy Duty Vehicle
Achieving a reliable autonomous vehicle is, however, considerably harder for heavy vehicles than for passenger cars. A truck pulling a trailer has coupled dynamics that a single rigid-body vehicle does not. The trailer does not track the tractor's path directly, which makes both motion planning and the underlying control problem more involved [6]. Its size and limited maneuverability mean that routine highway actions such as lane changes and merges are harder and require more cooperation from surrounding traffic [5]. Highway driving is, in addition, inherently interactive for any vehicle. An agent's own actions influence what nearby drivers do next, so a controller that reacts only to the present state, without any model of how the situation might unfold, tends to be either too timid to be useful or too naive to be safe [5]. Meeting all of these requirements at once is the central difficulty this paper addresses.
Two methodological families dominate the literature on autonomous vehicle decision-making and control: Model Predictive Control (MPC) and Reinforcement Learning (RL) [27]. MPC formulates driving as a constrained optimization problem. Given a model of the vehicle and its surroundings, solve for the control sequence that minimizes a cost over a finite look-ahead horizon subject to constraints on speed, acceleration, steering, and collision avoidance, then apply only the first action and re-solve at the next step. Beyond the visible horizon, the controller must fall back on an approximate terminal cost standing in for everything that happens afterwards. A short horizon with a crude terminal cost is fast to solve but can behave poorly, while a longer horizon is more reliable but increasingly expensive online. RL, by contrast, learns a decision policy directly from interaction, with no requirement
Both authors contributed equally to this research.
that the dynamics be known, which suits the strategic aspects of driving. However, a learned policy offers no guarantee its output will respect a physical or safety constraint, and its behavior outside the situations it was trained on is unpredictable, which has motivated explicit out-of-distribution detection for learned driving policies [11].
Several works rely on MPC alone for interactive highway maneuvers. Börve et al. [6] couple an autonomous truck's trajectory optimization with an iterative update against a traffic predictor to capture genuine interactivity during forced lane changes, but at the cost of solving several parallel nonlinear optimizations every control step, with no formal convergence guarantee and a terminal cost fixed by design. Brito et al. [5] use MPC with a hand-tuned, fixed velocity reference for merging in dense traffic and report a markedly higher collision rate than the same architecture using a learned reference instead.
RL alone has also been used directly for tactical driving decisions. Acquarone et al. [1] apply a TD3 agent to cooperative adaptive cruise control for heavy-duty battery electric vehicles, achieving substantial energy savings by exploiting air-drag reduction in a platoon, though the controller is longitudinal only and does not address lane-level decisions. Hoel et al. [10] trained a Double-DQN agent to choose discrete lane-change and speed actions for a truck-trailer combination, but like every pure-RL controller, without formal safety guarantees at all. Later in [11], they proposed a bayesian RL technique that estimates uncertainty of decisions to choose safe actions, measurably reducing collisions outside the training distribution at the cost of a hand-set threshold and roughly double the training time. Pathare et al. [23] separated high level and low decision making between RL and physics based controllers, which improved safety and driving efficiency relative to letting RL act directly. However, the fixed rule-based execution layer carries none of MPC's constraint guarantees.
Motivated by these complementary shortcomings, a number of recent works combine MPC and RL. A first group targets MPC's tunable parameters. Gupta et al. [9] add an RL-trained throttle correction in parallel with an MPC. Chen et al. [7] use RL to choose the prediction horizon for single-vehicle path tracking beating fixed-horizon baselines, but without any surrounding traffic. Zarrouki et al. [33] pre-compute a catalog of cost-function weight sets that are each individually verified safe, and let an RL agent only ever choose among them for vehicle motion control. Wang et al. [31] let RL tune a single MPC weight conditioned on a risk classification for car-following. A second group interfaces a learned component with MPC at the level of a discrete decision or reference trajectory. Mallick et al. [17] propose a learned gear-shift schedule fed into a continuous MPC. Reiter et al. [26] let an RL policy reshape an MPC's entire reference trajectory and cost weighting for autonomous racing, beating both a non-strategic MPC and an end-to-end RL policy while remaining safe. Albarella et al. [2] combine a Double-DQN decision layer with two NMPCs for highway driving, though the NMPC terminal cost stays fixed. In all of these, learning never touches the terminal cost itself.
A separate line of work uses RL to approximate the terminal cost directly. Bertsekas [4] provides the theoretical foundation, showing that one step of MPC look-ahead on top of an approximate terminal cost is equivalent to one Newton step on the Bellman equation, so even a mediocre approximation yields a near-optimal policy after sufficient look-ahead. Building on this, Morita et al. [22] use a learned value function as the terminal cost of an MPPI controller for a robot; Lin et al. [15] and Moreno-Mora et al. [21] learn it via policy and value iteration respectively for general nonlinear systems; and Kang et al. [12] learn it online for a robotic manipulator. All of these are validated on continuous low-level control in single-agent, non-reactive settings, and none addresses the discrete tactical decisions or interactive multi-agent traffic that motivate the present work.
Two limitations cut across this literature. First, every learned-terminal-cost method operates on continuous low-level control; none addresses a discrete tactical decision such as a lane change, where the terminal cost must interact with a combinatorial DP optimization. Second, the entire terminal-cost-learning line is validated only in single-agent, non-reactive settings. It is not tested in an interactive environment where surrounding vehicles respond to the ego and thereby shift the very state distribution the value function was trained on. Conversely, the hybrid schemes that do operate in traffic [7, 9, 17, 31, 33] confine learning to horizon selection, a handful of cost weights, or an additive correction, and never learn the terminal cost that governs beyond-horizon foresight. No prior work integrates a learned or even rollout-based terminal cost into a MPC for a discrete tactical highway-driving problem, nor evaluates whether such a terminal cost remains effective when surrounding traffic is genuinely reactive.
We develop a highway controller for an autonomous truck that solves its finite-horizon MPC problem by dynamic programming over a discretized state-action space, and replaces the usual hand-designed terminal cost with a DQN-learned terminal cost, trained offline and inserted directly into the DP backward pass. For the purpose of benchmarking, a rollout terminal cost approximations, obtained by simulating a working base policy forward from the end of the horizon is also developed. Both retain MPC's exact constraint handling and receding-horizon replanning. Our contributions are as follows:
(1) We propose a hybrid MPC and RL framework for autonomous highway driving of a heavy-duty truck. The MPC performs speed control and lane-change decisions over a discrete state-action grid, while a pre-trained Deep Q-Network (DQN) provides the terminal cost to improve long-term decision making.
(2) We evaluate the effectiveness of the proposed framework in a highway traffic simulation by comparing it with conventional MPC and rollout-based terminal cost methods. The proposed DQN-based terminal cost consistently improves safety and decision consistency under both deterministic and noisy observation settings.
(3) We demonstrate that incorporating a learned terminal cost enables short-horizon MPC to achieve the best balance between safety, driving performance, and computational efficiency. The proposed three-step MPC eliminates the need for computationally expensive long-horizon optimization while remaining suitable for real-time implementation.
2 PROBLEM FORMULATION
We consider an autonomous heavy truck operating on a multi-lane highway in the presence of surrounding traffic. Surrounding vehicles are not controlled by the ego truck, but respond to its actions through their own car-following and lane-changing models [8, 13], so the environment is interactive and the optimal policy depends on multi-step predictions of how traffic will evolve.
2.1 System Model
The ego truck's state at step k is:
where is longitudinal position, is lane index and is the number of lanes, is velocity with and as its bounds, and is a lane-change counter that enforces transition and cooldown durations. The control input:
pairs a discretized longitudinal acceleration with a discrete lane-change command . The ego dynamics
evolve under a discrete-time kinematic model; the lane and counter update jointly, so a new lane-change command is accepted only once the counter has cleared its transition time and the ego truck reaches its target lane. Section 3.2 provides more details on the lane-change command and the counter.
Surrounding vehicles have states , where is the set of vehicles within sensor range at step . Their future states at step are uncertain for two reasons. First, the initial observations are subject to sensor measurement noise. Second, even with perfect initial observations, surrounding vehicles' future behavior can only be approximated by a simplified prediction model. They respond to each other and to the ego in ways that are not fully predictable. Both sources of uncertainty accumulate over the prediction horizon and must be accounted for in the controller design. A detailed description of the prediction model is provided in Section 3.1.
2.2 The MPC Problem
The fundamental control objective is to find a policy minimizing the expected cumulative cost over the full traffic state :
where the expectation is over the stochastic evolution of surrounding traffic. Solving Eq. (4) directly is intractable because it requires optimizing over an infinite sequence of future actions under physical constraints and uncertain traffic. MPC provides a tractable approximation by truncating the optimization horizon to N steps and re-optimizing at every step using the latest observations. Given the discretized state and action spaces, the resulting finite-horizon problem can be solved online using Dynamic Programming (DP). However, performing the DP backward pass over the full joint state space would be intractable, as the state grid grows exponentially with the number of surrounding vehicles [3]. The DP is therefore performed over the ego vehicle's state space , while the predicted surrounding vehicle states are treated as time varying parameters during the optimization. This is reflected in the conditional notation : the ego trajectory is optimized while the surrounding states enter as given parameters at each step.
Because the surrounding vehicle states are uncertain, we formulate the control task as a chance-constrained MPC [19]. At each step , the controller solves:
s.t.
where is a stage cost penalizing undesired ego actions and states, conditioned on surrounding vehicle states; approximates the cost-to-go beyond the horizon; is the set of ego states that are safe with respect to the surrounding vehicles at step ; and encode state and action limits; is the risk tolerance for collision avoidance; and is a discount factor. Unlike the undiscounted objective common in classical MPC, down-weights stage costs at later horizon steps. Section 3.3 discusses the motivation for this choice.
Only the first optimal action is applied, and the state is then re-measured and the problem re-solved at . This corrects automatically for prediction errors as new observations arrive.
The chance constraint Eq. (5c) treats as a random variable incorporating both measurement noise and prediction model uncertainty, and requires the ego to remain safe with probability at least . Under a Gaussian uncertainty model, this constraint admits a deterministic equivalent [19] in which the required safe distance is inflated by a margin proportional to the predicted position standard deviation. Suppressing that margin recovers a deterministic controller acting on the nominal prediction , which serves as a baseline to isolate the benefit of uncertainty handling.
The design burden of Eq. (5) is the terminal cost . Classical stability theory [18] requires , an associated terminal constraint set , and a local controller to jointly satisfy a set of Lyapunov-type conditions, which is already difficult to construct for general nonlinear systems [25]. In the present setting, this difficulty is compounded by the presence of surrounding vehicles. The terminal set must be control-invariant under the terminal controller, but invariance cannot be guaranteed when surrounding vehicles are free to arbitrarily enter or leave the ego's vicinity beyond the planning horizon.
Solving Eq. (5) by DP makes it straightforward to substitute alternative terminal cost approximations into the same backward pass.
2.3 The Terminal Cost Approximation Problem
The quantity that approximates can be characterized exactly. Viewing the same task as a Markov Decision Process (MDP) [29], the agent at state selects under a policy , incurs cost
, and transitions to . The value function of ,
satisfies the Bellman equation:
and the optimal value function minimizes over the action at every state:
Setting in Eq. (5) makes the truncated and unconstrained (we cannot exactly compute the target cost if constraints are imposed beyond the horizon) N-step problem exact, and its solution coincides with the optimal infinite-horizon policy for any , since accounts precisely for all cost incurred beyond the horizon. This holds because Eq. (5) is the Bellman recursion unrolled N times, which requires the discount factor of the MPC objective, the discounting applied to the terminal cost, and the discount factor defining to be identical; a mismatch would make the truncated problem a different optimization rather than an exact reformulation. is therefore the ideal terminal cost, and it encodes exactly the information the MPC lacks beyond step N.
However, for the constrained system considered here, cannot be obtained. The dynamics depend on surrounding vehicles whose behavior is not modeled in closed form, and the recursion Eq. (8) admits no analytical solution. The terminal cost must therefore be approximated. Hence, the design question becomes how much approximation error can be tolerated. Bertsekas [4] shows that solving Eq. (5) with and applying only the first action is equivalent to one Newton step on the Bellman optimality equation Eq. (8). The closed-loop policy is consequently more accurate than itself since an imperfect terminal cost is substantially corrected by even a few steps of look-ahead, and the residual error decreases sharply as N increases. A short horizon is thus sufficient provided is a reasonable approximation of , which is what makes the terminal cost, rather than the horizon length, the effective design variable.
Section 3 presents an RL-based model to obtain , to be used directly in the DP backward pass as the terminal cost.
3 Proposed Method
Figure 1 illustrates the architecture of proposed hybrid method. At each step, the controller observes the current traffic state, constructs a discretized state-action grid, and evaluates the terminal cost, then runs the backward DP to recover the optimal action sequence. Only the first action is sent to simulator, and the loop repeats. For benchmarking, we also evaluate pure MPC, which sets ; a rollout-based terminal cost, which simulates a base policy forward from the horizon boundary; and pure RL, which applies the learned policy directly without any MPC optimization.
3.1 Trajectory Prediction
Evaluating the safety terms of the cost in Section 3.2 over the prediction horizon requires an estimate of each surrounding vehicle's future position, speed, and lane at every horizon step ,
Ego vehicle interacting with other vehicles in SUMO environment

Figure 1: Architecture of controller
since their true future behavior is not known to the controller. To model typical highway driving behavior, surrounding vehicles are extrapolated forward from their currently observed states under a constant-acceleration assumption, holding each vehicle's lane fixed for the duration of the relatively short horizon. Among the prediction strategies evaluated, this approach achieves the lowest mean position error at all tested horizon lengths, attributed to the short timescales involved where the current acceleration is the dominant predictor of near-term position.
However, this prediction is affected by the uncertainty in initial measurements. Each surrounding vehicle’s initial position, speed, and acceleration are observed with additive Gaussian noise:
with independent. Propagating these through the constant-acceleration model yields a Gaussian distribution over the predicted position at horizon step i, with variance:
so positional uncertainty grows with the horizon step, quadratically in the speed noise and quadratically in the acceleration noise.
A neighbor vehicle that is actively executing a lane change at the time of prediction is handled separately, since its true lane occupancy is ambiguous while it is physically transitioning between lanes. Rather than committing it to either lane, such a vehicle is represented by two copies in the predicted trajectory set, the original vehicle on its origin lane and a duplicate ghost vehicle, with identical position, speed, and acceleration, placed on its target lane. This ensures the safety and collision terms of account for the neighbor vehicle's presence in both lanes during the transition, preventing the controller from planning a maneuver into a gap that is already being closed by an in-progress lane change. More details of the tested prediction models are provided in Appendix B.
3.2 Cost Function under Uncertainty
The stage cost combines seven terms into a single weighted sum:
Of these, only the safety and collision terms depend on the predicted states of surrounding vehicles, and therefore only these are affected by the uncertainty. The remaining terms are functions of the ego state alone and are unaffected.
The speed and acceleration terms shape the nominal driving behavior:
where is the reference speed and are tunable weights penalizing speed deviation and control effort.
A lane change is penalized once per maneuver, at the step it is initiated, using the counter that governs the transition lock:
where is a fixed penalty and is the counter threshold below which a new lane change is permitted. A separate cooldown penalty , with a larger fixed value , discourages a second maneuver shortly after the first without making necessary back-to-back changes prohibitively costly. A progressive left-lane penalty , zero in the rightmost lane, encourages the truck to return to the slow lane once an overtaking maneuver is no longer beneficial.
The safety and collision terms depend on the bumper-to-bumper gaps and to the relevant neighbors, which are computed from the predicted surrounding vehicles' states. Safety and collision avoidance requirement of Eq. (5c) is imposed on both front and back gaps. For front gap:
where is the speed-dependent safe distance, a minimum gap, and a time headway. Since is Gaussian with standard deviation , this admits the deterministic equivalent:
where is the inverse Gaussian CDF. Because grows with i by Eq. (10), the controller becomes progressively more conservative at later horizon steps. Similar logic applies to back gap.
Safety is enforced as a quadratic penalty when a gap falls below , applied to the front vehicle at all times and to the rear vehicle on the target lane whenever a lane change is commanded:
where and if .
A large fixed penalty is charged whenever the front gap becomes non-positive, or whenever a commanded lane change would place the ego closer to a faster rear vehicle on the target lane than that vehicle could brake to match within its maximum deceleration. This braking-distance check is more conservative than a simple gap test, since a positive but rapidly closing rear gap can still result in a collision shortly after the maneuver completes. It is necessary because the DP assigns no back collision penalty to a vehicle already in the ego's lane, and penalizes rear risk on the target lane only during a commanded change.
3.3 Discounted Objective
The discount factor introduced in Eq. (5) departs from the undiscounted objective common in classical MPC, and is motivated by the structure of the uncertainty in this setting. As i grows, measurement noise accumulates through the prediction model and the constant-acceleration assumption of Section 3.1 degrades, so costs evaluated near rest on weaker evidence than those near . The factor down-weights them accordingly, preventing the controller from over-committing to uncertain predictions.
The same factor is applied to the terminal cost, so that is discounted consistently with the stage costs it summarizes. Using the same in RL training additionally ensures that the learned and the accumulated stage costs are expressed on a common scale, which is required for the exactness argument of Section 2.3.
3.4 RL-Based Terminal Cost Approximation
Following the MDP formulation of Section 2.3, the agent observes a 14-dimensional state comprising the ego speed and lane index, bumper-to-bumper gaps and relative velocities to the nearest neighbor vehicle in the current lane and each adjacent lane, and two indicators encoding the phase of an in-progress lane change or cooldown. The action space is the same acceleration and lane-change pair used by the MPC. The reward is the negative of the MPC stage cost, , where is for that the learned value function and the MPC's own cost share a scale by construction. A Q-network is trained via standard DQN [20] to approximate . DQN is used rather than an actor-critic method such as PPO because the quantity required at the horizon boundary is an estimate of the optimal cost-to-go. The identity makes an off-policy Q-network an estimate of by construction, whereas an actor-critic critic estimates for the policy being learned, which would bias the DP toward that policy's behavior rather than the optimum of the MPC objective.
Given the reward definition above, the optimal Q-function satisfies:
(17) so can be rescaled into the MPC's cost units as a terminal cost:
where denotes the trained Q-network parameters.
Since the DP state and the RL observation use different representations, a mapping converts one into the other before the Q-network is queried. The mapping constructs from the predicted traffic state at horizon step by computing the relevant gaps, relative velocities, and lane-change indicators that form the 14-dimensional RL observation.
3.5 Rollout-Based Terminal Cost Approximation
To provide a baseline for the RL-based approach, we additionally adapt the approach of [3] to our setting. Rather than tabulating a cost-to-go via DP over an extended horizon, the rollout terminal cost extends planning online. From each terminal state , a base policy is simulated forward for further steps, and the resulting stage costs are accumulated into . The base policy re-implements the Krauss car-following model [13] used internally by simulator for longitudinal propagation of surrounding vehicles, holding their lanes fixed. The rollout therefore does not invoke the simulator at runtime, instead using this lightweight re-implementation directly for steps. The ego vehicle additionally considers a lane change during the rollout when the gaps to the target lane's leader and follower are safe and the resulting speed is closer to the reference.
Both the DP backward pass and the rollout apply the same discount factor , so a cost incurred at rollout step beyond the horizon carries the same weight it would under a longer single DP horizon, keeping the combined -step estimate consistent across the MPC/rollout boundary.
4 Results and Discussion
4.1 Experimental Setup
The proposed framework is evaluated in a simulation environment developed using Simulation of Urban MOBility (SUMO) [16], an open-source microscopic traffic simulator. The controller interacts with the environment through TraCI, SUMO's Traffic Control Interface, which provides surrounding vehicle states and accepts longitudinal and lateral commands for the ego vehicle at each step.
The scenario is a three-lane, one-way highway segment. The ego vehicle is a heavy-duty truck, and surrounding vehicles follow SUMO's Krauss car-following model [13] and LC2013 lane-change model [8], with desired speeds sampled uniformly within a fixed range, maintaining an approximately constant traffic density around the ego. Each episode runs for a fixed maximum duration or terminates on a collision. The dynamics and cost parameters are listed in Appendix D.
4.2 RL Training
The DQN is trained using Stable-Baselines3 [24] in the deterministic simulation environment, under a range of hyperparameter

Figure 2: Holdout evaluation reward across five training runs, shown as mean ± one standard deviation.
settings summarized in Appendix D. Training with perfect state observations allows the agent to focus on learning long-term cost structure without the added variance of noisy measurements; the resulting value function is then used as a terminal cost within the stochastic MPC formulation, where measurement uncertainty is handled explicitly by the chance constraint.
In every run, the model is checkpointed every 100k steps, and each checkpoint is evaluated on 10 holdout seeds with deterministic actions. Since the evaluation reward is dominated by rare, high-cost collision events, holdout performance varies between checkpoints, so a two-stage selection is used: the ten highest-scoring checkpoints are re-evaluated on 500 independent seeds, and the final model is chosen on mean reward and mean speed, the latter excluding policies that avoid collisions only by driving well below the reference speed. To assess reproducibility, the selected configuration was trained five times with this procedure.
Figure 2 shows the holdout reward across the five runs. All runs improve rapidly within the first few million steps and fluctuate around a common level thereafter. Every run produced a collision-free policy at normal driving speed, with a mean reward of and average speeds of m/s across runs (Table 6, Appendix D). The model from the first run is used as the terminal cost throughout.
4.3 Controller Comparison
The proposed hybrid MPC-RL controller and three baselines are evaluated on 100 independent stochastic episodes. Deterministic results, obtained by suppressing measurement noise and setting which gives to recover the nominal predicted gaps, are reported in Appendix A as a baseline to isolate the contribution of uncertainty handling.
The proposed hybrid MPC-RL controller uses the learned value function to approximate the terminal cost as derived in Section 3.4, and is evaluated across horizons . Pure MPC uses the same DP formulation with zero terminal cost ( ), isolating the effect of lookahead length alone. Rollout replaces the terminal cost with a rollout estimate from Section 3.5, evaluated at two rollout horizons to study how rollout length affects terminal cost quality. Pure RL applies the trained DQN policy directly with no MPC optimization, providing a reference for what the learned value function achieves without constraint handling or receding-horizon replanning. Deterministic variants of pure MPC, rollout
and 20), and hybrid MPC-RL apply noise-free conditions with full knowledge of the states of surrounding vehicles.
Table 1 reports collision rate, cost per step, cost standard deviation across all episodes ( ), cost standard deviation across collision-free episodes only ( ), mean speed, and computation time per step, together with the full cost decomposition. Table 2 compares selected configurations against their deterministic counterparts.
4.4 Discussion
4.4.1 Effect of the terminal cost. At a one-step horizon, pure MPC produces collisions in 86% of the episodes. With a single optimization step, the controller minimizes only the immediate stage cost with no visibility of future states. When the ego truck approaches a slow leader, the speed-tracking term encourages maintaining , but because the front safety cost grows quadratically with gap shortfall, the DP evaluates deceleration as expensive once the gap is already small. The only apparently cheaper option is a lane change, but the target lane may have its own slow leader, a situation the one-step DP cannot see. The cost decomposition confirms this. At N = 1 the safety cost dominates at over 130,000 and the collision cost reaches over 100,000, while the speed cost is zero because the controller never deviates from before colliding. Adding one step of lookahead drops the collision rate to zero, since even 0.4 s of preview is sufficient for the DP to evaluate the consequence of not decelerating.
The hybrid controller at N = 1 eliminates this failure mode entirely, achieving zero collisions. The learned terminal cost provides a long-term value signal that recognizes proximity to a slow leader as a high-cost state even when the immediate stage cost appears moderate, compensating for the absence of explicit future trajectory optimization. The hybrid at N = 3 achieves the best overall result (329 cost, 0% collisions), outperforming pure MPC at N = 5 (754 cost) while using a substantially shorter horizon. The cost decomposition shows that the safety cost at hybrid N = 3 (309) is 59% lower than pure MPC N = 5 (747), meaning the hybrid maintains larger safety margins on average, not just fewer collisions. This confirms the central claim of this work, namely that a learned terminal cost approximation achieves better driving quality at shorter, cheaper horizons than a zero terminal cost at longer ones. Acceleration and cooldown costs are negligible across all controllers and do not drive any of the observed differences.
The horizon also interacts with how effectively the controller handles prediction uncertainty. At N = 2, the wider safety distances derived from the growing prediction uncertainty add conservatism that increases cost relative to shorter-horizon pure MPC, because the RL terminal value does not internally account for the tightened safety buffers it was not exposed to during training. At N = 3, the additional headroom from prediction-uncertainty-aware safety distances corrects a failure mode that occurs at this horizon without significantly penalizing the already-conservative terminal value signal, yielding the best overall result. This suggests that a moderate horizon and prediction uncertainty-aware safety distances are mutually reinforcing, where the horizon provides enough lookahead for the safety distances to be absorbed without sacrificing efficiency, while the safety distances correct edge cases the terminal cost alone misses.
4.4.2 Rollout horizon length and base policy quality. The rollout controller with partially improves short-horizon safety. The collision rate at drops from 86% to 39%, confirming that the rollout estimate introduces genuine long-term awareness. However, it does not eliminate collisions at any horizon, and the total cost remains up to 44 times higher than the hybrid at the same . The dominant cost terms are safety and collision, indicating that the rollout estimate is systematically overoptimistic. The base policy simulates a future in which the ego keeps a safe gap, but the actual closed-loop trajectory plays out differently because surrounding traffic evolves in ways the Krauss-based, no-lane-change rollout does not capture. The uncertainty margin partially compensate for this at by suppressing overoptimistic lane-change trajectories, which is why at achieves zero collisions.
Increasing the rollout horizon to consistently degrades performance. Collision rates are several times higher than for at every horizon beyond , and cost per step is substantially larger. The discount factor reduces the weight of distant rollout steps, but the accumulated prediction mismatch over 20 steps outweighs this correction. The DP is guided toward trajectories that appear favorable under a long rollout simulation but prove unsafe in practice. This demonstrates that the quality of a rollout terminal cost is bounded by the accuracy of the base policy, not by the length of the simulation, and that extending the rollout horizon is counterproductive when the base policy is imperfect.
4.4.3 Pure RL as a direct policy. Pure RL achieves zero collisions and a total cost of 551, competitive with pure MPC at N = 3. The cost decomposition reveals a qualitatively different structure from the hybrid. The speed cost (18.0) is more than three times higher than for pure MPC or hybrid ( and respectively), and the acceleration cost (2.4) is the highest of any safe controller, reflecting a jerky longitudinal profile compared to the DP-optimized trajectories. These observations are consistent with a known tendency of value-based policies. The sparse, large collision penalty dominates training, producing a policy that avoids collisions conservatively through large gaps and low speed rather than by optimizing the full multi-objective cost. This conservatism makes pure RL a poor stand-alone controller for a truck that must maintain traffic flow, but it is precisely what makes the learned value function effective as a terminal cost. It provides a cautious, risk-averse signal that discourages the hybrid DP from ending the horizon in states with insufficient safety margins.
4.4.4 Comparison with deterministic baseline. Table 2 compares selected configurations against their deterministic counterparts. The effect is not uniform. For configurations that already produce collisions in the deterministic setting, accounting for prediction uncertainty consistently reduces or eliminates collisions while also reducing cost, because the collision has big penalty and the wider safety distances suppress the overoptimistic trajectories that caused the deterministic failures. For configurations that are already collision-free deterministically, accounting for uncertainty sometimes increases cost due to the added conservatism of the wider safety distances. For example, the cost for hybrid controller
Table 1: Stochastic controller performance evaluation and detailed cost decomposition.
| Controller | N | Performance Results | Detailed Cost Decomposition | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Coll. % | Cost/step | Mean Speed | Time (ms) | |||||||||||||
| Pure MPC | 1 | - | 86% | 234,519 | 233,924 | 17,447 | 25.0 | 2.5 | 0 | 0 | 130,826 | 103,692 | 0.0286 | 0.0067 | 0.9703 | |
| Pure MPC | 2 | - | 0% | 1,769 | 3,076 | 3,076 | 22.2 | 4.3 | 8.00 | 0.36 | 1,759 | 0 | 0.0149 | 0.0038 | 1.1031 | |
| Pure MPC | 3 | - | 0% | 830 | 2,022 | 2,022 | 22.6 | 6.3 | 5.82 | 0.51 | 823 | 0 | 0.0147 | 0.0030 | 1.0109 | |
| Pure MPC | 4 | - | 0% | 1,259 | 2,625 | 2,625 | 22.6 | 11.4 | 5.69 | 0.58 | 1,252 | 0 | 0.0136 | 0.0030 | 0.9717 | |
| Pure MPC | 5 | - | 0% | 754 | 2,019 | 2,019 | 22.6 | 17.5 | 5.68 | 0.58 | 747 | 0 | 0.0133 | 0.0030 | 0.9629 | |
| Rollout | 1 | 10 | 39% | 65,159 | 74,003 | 4,740 | 22.6 | 9.1 | 5.56 | 0.60 | 3,606 | 61,546 | 0.0364 | 0.0284 | 0.5256 | |
| Rollout | 2 | 10 | 0% | 1,072 | 3,058 | 3,058 | 22.5 | 15.1 | 6.17 | 0.65 | 1,065 | 0 | 0.0198 | 0.0052 | 0.4532 | |
| Rollout | 3 | 10 | 1% | 3,261 | 10,832 | 6,023 | 22.6 | 25.6 | 5.86 | 0.62 | 1,915 | 1,338 | 0.0208 | 0.0048 | 0.4511 | |
| Rollout | 4 | 10 | 2% | 3,978 | 13,137 | 5,021 | 22.6 | 41.5 | 5.85 | 0.61 | 1,286 | 2,686 | 0.0207 | 0.0070 | 0.4553 | |
| Rollout | 5 | 10 | 1% | 2,499 | 9,352 | 2,314 | 22.6 | 55.8 | 5.68 | 0.60 | 1,154 | 1,338 | 0.0216 | 0.0070 | 0.4478 | |
| Rollout | 1 | 20 | 43% | 65,150 | 73,027 | 4,265 | 22.7 | 12.8 | 5.31 | 0.62 | 4,701 | 60,443 | 0.0442 | 0.0396 | 0.6592 | |
| Rollout | 2 | 20 | 3% | 5,851 | 15,892 | 3,204 | 22.5 | 23.1 | 6.05 | 0.63 | 1,793 | 4,050 | 0.0242 | 0.0124 | 0.4769 | |
| Rollout | 3 | 20 | 4% | 6,395 | 18,937 | 2,447 | 22.7 | 37.1 | 5.51 | 0.60 | 1,652 | 4,736 | 0.0234 | 0.0091 | 0.4495 | |
| Rollout | 4 | 20 | 4% | 5,129 | 18,845 | 3,021 | 22.6 | 59.3 | 5.65 | 0.60 | 1,739 | 3,384 | 0.0224 | 0.0085 | 0.4636 | |
| Rollout | 5 | 20 | 2% | 2,390 | 16,475 | 1,666 | 22.7 | 85.8 | 5.53 | 0.58 | 1,035 | 1,348 | 0.0239 | 0.0097 | 0.4646 | |
| Pure RL | - | - | 0% | 551 | 1,029 | 1,029 | 20.8 | 0.3 | 18.0 | 2.4 | 529 | 0 | 0.017 | 0.02 | 2.17 | |
| Hybrid | 1 | - | 0% | 1,475 | 1,692 | 1,692 | 21.1 | 29.1 | 15.25 | 2.55 | 1,454.34 | 0 | 0.0229 | 0.0184 | 3.0524 | |
| Hybrid | 2 | - | 0% | 585 | 1,380 | 1,380 | 21.1 | 52.8 | 15.53 | 1.97 | 563.73 | 0 | 0.0205 | 0.0126 | 3.4646 | |
| Hybrid | 3 | - | 0% | 329 | 1,488 | 1,488 | 21.1 | 91.6 | 14.90 | 1.80 | 309.01 | 0 | 0.0194 | 0.0112 | 3.4633 | |
| Hybrid | 4 | - | 0% | 979 | 2,947 | 2,947 | 21.2 | 161.4 | 14.70 | 1.73 | 958.83 | 0 | 0.0218 | 0.0146 | 3.3872 | |
| Hybrid | 5 | - | 1% | 1,872 | 8,333 | 2,173 | 21.2 | 176.0 | 14.85 | 1.67 | 1,184.33 | 668.11 | 0.0213 | 0.0114 | 3.2741 | |
Table 2: Deterministic vs. stochastic comparison for representative configurations.
| Controller | N | Det. Coll. | S. Coll. | Det. Cost | S. Cost |
|---|---|---|---|---|---|
| Pure MPC | 4 | 1% | 0% | 1,590 | 1,259 |
| Pure MPC | 5 | 0% | 0% | 448 | 754 |
| Rollout | 2 | 1% | 0% | 2,078 | 1,072 |
| Rollout | 5 | 3% | 1% | 5,072 | 2,499 |
| Hybrid | 2 | 0% | 0% | 257 | 585 |
| Hybrid | 3 | 1% | 0% | 1,015 | 329 |
at N = 2 increases by 128% (257 → 585). Three configurations improve on both axes, becoming collision-free while also reducing cost: pure MPC at N = 4, rollout at N = 2, and the hybrid at N = 3. Of these, the hybrid at N = 3 shows by far the largest improvement (1,015 → 329), making it the strongest configuration overall. This pattern confirms that the uncertainty-aware formulation is more conservative where predictions are uncertain and the deterministic controller would otherwise take risks.
4.4.5 Computational cost. All controllers remain within the 200 ms simulation-time budget, with the hybrid at N = 5 the most expensive at 176.0 ms. The hybrid controller's cost grows faster with horizon than pure MPC because each reachable terminal state requires a forward pass through the Q-network, which has two hidden layers of 256 units, in addition to the DP state-space expansion. The best-performing configuration, hybrid N = 3, uses 91.6 ms per step, under half the budget, so the recommended operating point carries a substantial timing margin. Batching terminal-state network evaluations or reducing the network size would lower this further and provide headroom for longer horizons on more constrained hardware. It should be noted that the reported times are influenced by the workload of the shared computational cluster at the time of evaluation.
5 Conclusion
This paper presented a hybrid MPC-RL framework for autonomous highway driving of a heavy-duty truck, in which a chance-constrained finite-horizon MPC solved over a discretized state-action space uses a DQN-learned approximation of the true cost-to-go as its terminal cost. The framework was evaluated against pure MPC, rollout-based, and pure RL baselines in a traffic simulator with reactive surrounding vehicles.
The results show that a learned terminal cost resolves the short horizon failure of pure MPC, achieves better driving quality at shorter horizons than a zero terminal cost at longer ones, and remains within real-time computational budget. Extending the rollout horizon degrades rather than improves performance, showing that rollout quality is bounded by base policy accuracy rather than simulation length.
Limitations include a straight homogeneous road, a kinematic ego model with no continuous lateral control, and a trajectory prediction model that assumes constant acceleration and fixed lanes for surrounding vehicles, which becomes less accurate at longer horizons and misses reactive lane-change behavior. Future work can address these by extending to richer road geometries, incorporating more accurate and reactive prediction models, and batching network evaluations to reduce computational cost at longer horizons.
Acknowledgments
This work was partially supported by the Wallenberg AI, Autonomous Systems and Software Program (WASP) funded by the Knut and Alice Wallenberg Foundation.
References
[1] Matteo Acquarone, Federico Miretti, Daniela Misul, and Luca Sassara. 2023. Cooperative Adaptive Cruise Control Based on Reinforcement Learning for Heavy-Duty BEVs. IEEE Access 11 (2023), 127145–127156. doi:10.1109/ACCESS.2023.3331827
[2] Nicola Albarella, Dario Giuseppe Lui, Alberto Petrillo, and Stefania Santini. 2023. A hybrid deep reinforcement learning and optimal control architecture for autonomous highway driving. Energies 16, 8 (2023), 3490. doi:10.3390/en16083490
[3] Dimitri P. Bertsekas. 2012. Dynamic Programming and Optimal Control, Vol. II: Approximate Dynamic Programming (4th ed.). Athena Scientific.
[4] Dimitri P Bertsekas. 2024. Model predictive control and reinforcement learning: A unified framework based on dynamic programming. IFAC-PapersOnLine 58, 18 (2024), 363–383. doi:10.1016/j.ifacol.2024.09.056
[5] Bruno Brito, Achin Agarwal, and Javier Alonso-Mora. 2022. Learning Interaction-Aware Guidance for Trajectory Optimization in Dense Traffic Scenarios. IEEE Transactions on Intelligent Transportation Systems 23, 10 (2022), 18808–18821. doi:10.1109/TITS.2022.3160936
[6] Erik Börve, Nikolce Murgovski, and Leo Laine. 2023. Interaction-Aware Trajectory Prediction and Planning in Dense Highway Traffic using Distributed Model Predictive Control. In 2023 62nd IEEE Conference on Decision and Control (CDC). 6124–6129. doi:10.1109/CDC49753.2023.10384178
[7] Zhenbin Chen, Jiaqin Lai, Peixin Li, Omar I Awad, and Yubing Zhu. 2024. Prediction Horizon-Varying Model Predictive Control (MPC) for Autonomous Vehicle Control. Electronics 13, 8 (2024), 1442. doi:10.3390/electronics13081442
[8] Jakob Erdmann. 2015. SUMO's lane-changing model. (2015), 105–123. doi:0.1007/978-3-319-15024-6_7
[9] Prakhar Gupta, Jonathon M. Smereka, and Yunyi Jia. 2024. Reinforcement Learning Compensated Model Predictive Control for Off-road Driving on Unknown Deformable Terrain. arXiv preprint arXiv:2408.09253 (2024). doi:10.48550/arXiv.2408.09253
[10] Carl-Johan Hoel, Krister Wolff, and Leo Laine. 2018. Automated Speed and Lane Change Decision Making using Deep Reinforcement Learning. In 2018 21st International Conference on Intelligent Transportation Systems (ITSC). 2148–2155. doi:10.1109/ITSC.2018.8569568
[11] Carl-Johan Hoel, Krister Wolff, and Leo Laine. 2020. Tactical Decision-Making in Autonomous Driving by Reinforcement Learning with Uncertainty Estimation. In 2020 IEEE Intelligent Vehicles Symposium (IV). IEEE, 1563–1569. doi:10.1109/IV47402.2020.9304614
[12] Erlong Kang, Hong Qiao, Ziyu Chen, and Jie Gao. 2022. Tracking of Uncertain Robotic Manipulators Using Event-Triggered Model Predictive Control With Learning Terminal Cost. IEEE Transactions on Automation Science and Engineering 19, 4 (2022), 2801–2815. doi:10.1109/TASE.2022.3152166
[13] Stefan Krauß. 1998. Microscopic modeling of traffic flow: Investigation of collision free vehicle dynamics. Ph.D. Dissertation.
[14] Alex Leslie and Dan Murray. 2025. An Analysis of the Operational Costs of Trucking: 2025 Update. Technical Report. American Transportation Research Institute (ATRI).
[15] Min Lin, Zhongqi Sun, Yuanqing Xia, and Jinhui Zhang. 2024. Reinforcement Learning-Based Model Predictive Control for Discrete-Time Systems. IEEE Transactions on Neural Networks and Learning Systems 35, 3 (2024), 3312–3324. doi:10.1109/TNNLS.2023.3273590
[16] Pablo Alvarez Lopez, Michael Behrisch, Laura Bieker-Walz, Jakob Erdmann, Yun-Pang Flötteröd, Robert Hilbrich, Leonhard Lücken, Johannes Rummel, Peter Wagner, and Evamarie Wiessner. 2018. Microscopic Traffic Simulation using
SUMO. In 2018 21st International Conference on Intelligent Transportation Systems (ITSC). 2575–2582. doi:10.1109/ITSC.2018.8569938
[17] Samuel Mallick, Gianpietro Battocletti, Qizhang Dong, Azita Dabiri, and Bart De Schutter. 2025. Learning-Based MPC for Fuel Efficient Control of Autonomous Vehicles With Discrete Gear Selection. IEEE Control Systems Letters 9 (2025), 1117–1122. doi:10.1109/LCSYS.2025.3575335
[18] David Q Mayne, James B Rawlings, Christopher V Rao, and Pierre OM Scokaert. 2000. Constrained model predictive control: Stability and optimality. Automatica 36, 6 (2000), 789–814. doi:10.1016/S0005-1098(99)00214-9
[19] Ali Mesbah. 2016. Stochastic Model Predictive Control: An Overview and Perspectives for Future Research. IEEE Control Systems Magazine 36, 6 (2016), 30–44. doi:10.1109/MCS.2016.2602087
[20] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. 2015. Human-level control through deep reinforcement learning. nature 518, 7540 (2015), 529–533. doi:10.1038/nature14236
[21] Francisco Moreno-Mora, Lukas Beckenbach, and Stefan Streif. 2023. Predictive Control with Learning-Based Terminal Costs Using Approximate Value Iteration. IFAC-PapersOnLine 56, 2 (2023), 3874–3879. 22nd IFAC World Congress. doi:10.1016/j.ifacol.2023.10.1320
[22] Mitsuki Morita, Satoshi Yamamori, Satoshi Yagi, Norikazu Sugimoto, and Jun Morimoto. 2024. Goal-Conditioned Terminal Value Estimation for Real-time and Multi-task Model Predictive Control. arXiv preprint arXiv:2410.04929 (2024). doi:10.48550/arXiv.2410.04929
[23] Deepthi Pathare, Leo Laine, and Morteza Haghir Chehreghani. 2023. Improved Tactical Decision Making and Control Architecture for Autonomous Truck in SUMO Using Reinforcement Learning. In 2023 IEEE International Conference on Big Data (BigData). 5321–5329. doi:10.1109/BigData59044.2023.10386803
[24] Antonin Raffin, Ashley Hill, Adam Gleave, Anssi Kanervisto, Maximilian Ernestus, and Noah Dormann. 2021. Stable-Baselines3: Reliable Reinforcement Learning Implementations. Journal of Machine Learning Research 22, 268 (2021), 1–8.
[25] James B. Rawlings, David Q. Mayne, and Moritz M. Diehl. 2024. Model predictive control : theory, computation, and design (2nd ed.). Nob Hill Pub.
[26] Rudolf Reiter, Jasper Hoffmann, Joschka Boedecker, and Moritz Diehl. 2023. A Hierarchical Approach for Strategic Motion Planning in Autonomous Racing. In 2023 European Control Conference (ECC). 1–8. doi:10.23919/ECC57647.2023.10178143
[27] Rudolf Reiter, Jasper Hoffmann, Dirk Reinhardt, Florian Messerer, Katrin Baumgärtner, Shambhuraj Sawant, Joschka Bödecker, Moritz Diehl, and Sebastien Gros. 2026. Synthesis of model predictive control and reinforcement learning: Survey and classification. Annual Reviews in Control 61 (2026), 101045. doi:10.1016/j.arcontrol.2026.101045
[28] Santokh Singh. 2015. Critical reasons for crashes investigated in the national motor vehicle crash causation survey. Technical Report DOT HS 812 115. National Highway Traffic Safety Administration (NHTSA), Washington, DC.
[29] Richard S Sutton, Andrew G Barto, and Andrew Barto. 1998. Reinforcement learning: An introduction. Vol. 17. MIT press Cambridge. doi:10.1017/S0263574799271172
[30] Elizabeth Turnbull. 2017. Hours of service of drivers: Harnessing autonomous technology for safer operations. Jurimetrics 58, 1 (2017), 105–125.
[31] Liwen Wang, Shuo Yang, Kang Yuan, Yanjun Huang, and Hong Chen. 2023. A Combined Reinforcement Learning and Model Predictive Control for Car-Following Maneuver of Autonomous Vehicles. Chinese Journal of Mechanical Engineering 36, 1 (2023), 80. doi:10.1186/s10033-023-00904-7
[32] Nan Xu, Xiaohan Li, Qiao Liu, and Di Zhao. 2021. An Overview of Eco-Driving Theory, Capability Evaluation, and Training Applications. Sensors 21, 19 (2021). doi:10.3390/s21196547
[33] Baha Zarrouki, Marios Spanakakis, and Johannes Betz. 2024. A Safe Reinforcement Learning driven Weights-varying Model Predictive Control for Autonomous Vehicle Motion Control. In 2024 IEEE Intelligent Vehicles Symposium (IV). 1401–1408. doi:10.1109/IV55156.2024.10588747
A Deterministic Controller Results
The deterministic evaluation of the controllers is obtained by suppressing measurement noise and setting so that and the tightened safe distance of Eq. (15) reduces to the nominal . The controller then acts on the nominal predicted gaps with full knowledge of the surrounding vehicle states. All other settings, including the 100 evaluation episodes and the checkpoint used for the terminal cost, are identical to the stochastic evaluation of Section 4.3, so the two differ only in the treatment of uncertainty. Table 3 reports the aggregate results and Table 4 the corresponding cost decomposition. The cooldown penalties are negligible throughout, therefore are omitted from Table 4.
Table 3: Deterministic controller results.
| Controller | N | Coll. % | Cost/step | Mean Speed | Time/step (ms) | |
|---|---|---|---|---|---|---|
| Pure MPC | 1 | - | 88% | 241,871 | 25.0 | 2.5 |
| Pure MPC | 2 | - | 0% | 1,084 | 22.1 | 4.3 |
| Pure MPC | 3 | - | 0% | 647 | 22.6 | 6.3 |
| Pure MPC | 4 | - | 1% | 1,590 | 22.6 | 11.4 |
| Pure MPC | 5 | - | 0% | 448 | 22.7 | 17.5 |
| Rollout | 1 | 10 | 34% | 53,562 | 22.5 | 7.8 |
| Rollout | 2 | 10 | 1% | 2,078 | 22.6 | 14.4 |
| Rollout | 3 | 10 | 2% | 4,079 | 22.6 | 21.8 |
| Rollout | 4 | 10 | 2% | 5,203 | 22.6 | 37.4 |
| Rollout | 5 | 10 | 3% | 5,072 | 22.6 | 75.1 |
| Rollout | 1 | 20 | 32% | 49,333 | 22.8 | 11.4 |
| Rollout | 2 | 20 | 13% | 12,735 | 22.6 | 23.1 |
| Rollout | 3 | 20 | 10% | 8,946 | 22.7 | 33.1 |
| Rollout | 4 | 20 | 15% | 12,363 | 22.6 | 59.8 |
| Rollout | 5 | 20 | 7% | 8,942 | 22.8 | 122.0 |
| Hybrid | 1 | - | 0% | 883 | 21.1 | 17.1 |
| Hybrid | 2 | - | 0% | 257 | 21.1 | 49.8 |
| Hybrid | 3 | - | 1% | 1,015 | 21.2 | 113.7 |
| Hybrid | 4 | - | 0% | 300 | 21.2 | 171.5 |
| Hybrid | 5 | - | 2% | 2,178 | 21.1 | 242.3 |
Table 4: Cost decomposition for each controller type (deterministic).
| Controller | N | |||||||
|---|---|---|---|---|---|---|---|---|
| Pure MPC | 1 | - | 0.0 | 0.0 | 131,885 | 109,984 | 0.027 | 1.00 |
| Pure MPC | 2 | - | 8.2 | 0.1 | 1,075 | 0 | 0.013 | 0.98 |
| Pure MPC | 3 | - | 5.8 | 0.2 | 640 | 0 | 0.013 | 1.00 |
| Pure MPC | 4 | - | 5.8 | 0.2 | 916 | 667 | 0.013 | 0.96 |
| Pure MPC | 5 | - | 5.3 | 0.2 | 442 | 0 | 0.013 | 1.01 |
| Rollout | 1 | 10 | 6.4 | 0.2 | 2,500 | 51,052 | 0.023 | 0.49 |
| Rollout | 2 | 10 | 6.0 | 0.2 | 1,403 | 667 | 0.018 | 0.36 |
| Rollout | 3 | 10 | 5.7 | 0.2 | 2,069 | 1,335 | 0.019 | 0.41 |
| Rollout | 4 | 10 | 5.8 | 0.2 | 3,851 | 2,012 | 0.018 | 0.46 |
| Rollout | 5 | 10 | 5.9 | 0.3 | 3,033 | 2,030 | 0.019 | 0.46 |
| Rollout | 1 | 20 | 5.0 | 0.2 | 3,436 | 45,892 | 0.030 | 0.52 |
| Rollout | 2 | 20 | 5.8 | 0.2 | 2,068 | 10,660 | 0.022 | 0.45 |
| Rollout | 3 | 20 | 5.3 | 0.2 | 1,309 | 7,632 | 0.022 | 0.42 |
| Rollout | 4 | 20 | 5.6 | 0.2 | 1,700 | 10,656 | 0.022 | 0.44 |
| Rollout | 5 | 20 | 5.0 | 0.2 | 3,441 | 5,496 | 0.021 | 0.49 |
| Hybrid | 1 | - | 15.4 | 1.4 | 863 | 0 | 0.024 | 3.13 |
| Hybrid | 2 | - | 15.3 | 1.3 | 237 | 0 | 0.017 | 3.61 |
| Hybrid | 3 | - | 14.6 | 1.3 | 325 | 671 | 0.018 | 3.53 |
| Hybrid | 4 | - | 14.9 | 1.3 | 280 | 0 | 0.016 | 3.46 |
| Hybrid | 5 | - | 14.9 | 1.2 | 821 | 1,338 | 0.023 | 3.32 |
B Trajectory Prediction Methods
Two strategies were considered for predicting the future states of surrounding vehicles over the MPC horizon.
Reactive Multi-Agent Prediction. The first strategy propagates surrounding vehicles forward using a re-implementation of SUMO's internal car-following logic. At each prediction step , every neighbor vehicle adjusts its speed based on its gap to the vehicle immediately ahead of it, following the Krauss safe-speed model [13]. The ego vehicle is projected at constant speed and fixed lane to serve as a stable reference for those reactions, avoiding a circular dependency between the controller's own plan and the neighbors' predicted responses.
While this approach captures realistic following behavior in principle, it introduces a systematic error at the boundary of the sensor range. The lead vehicle in each lane, the frontmost vehicle visible to the ego, has no visible leader within the sensor range, so the car-following model treats it as having a clear road ahead and accelerates it toward its reference (maximum) speed. This artificial acceleration propagates backward through the platoon, producing growing position errors over longer horizons. Freezing the boundary leader at constant speed mitigates this to some extent, but compounding model-mismatch errors still accumulate at every step as small inaccuracies in each vehicle's response to the ego's projected state propagate forward through the chain.
Constant-Acceleration Extrapolation. The second strategy extrapolates each surrounding vehicle forward from its currently observed position , speed , and acceleration , holding the lane assignment fixed:
This model requires no knowledge of the neighbor vehicles' car-following parameters and introduces no inter-vehicle dependencies, so boundary effects do not arise.
Comparison. Both methods were evaluated by comparing predicted positions against ground-truth SUMO positions at each horizon step , across 100 seeds using the pure MPC controller. The mean position error (bias) and its standard deviation are reported in Table 5 for the longest horizon (), which has the most error.
Table 5: Mean () and standard deviation () of position prediction error (m) for .
| Direction | Reactive | Const. acc. | ||
|---|---|---|---|---|
| Front | 0.031 | 0.222 | -0.002 | 0.089 |
| Front-left | 0.079 | 0.295 | 0 | 0.112 |
| Front-right | 0.059 | 0.262 | 0.001 | 0.096 |
| Back-left | 0.243 | 0.436 | 0.005 | 0.133 |
| Back-right | 0.167 | 0.393 | 0 | 0.131 |
Constant-acceleration extrapolation achieves lower mean absolute error and standard deviation than the reactive model at all horizon steps. At (1 s ahead), the standard deviation remains
Table 6: Selected model of each training run for the final hyperparameter setting, evaluated on 500 seeds.
| Run | Checkpoint | Collision % | Mean reward | (m/s) |
|---|---|---|---|---|
| 1 | 16.1M | 0 | 20.8 | |
| 2 | 12.6M | 0 | 20.1 | |
| 3 | 6.8M | 0 | 20.5 | |
| 4 | 13.6M | 0 | 20.8 | |
| 5 | 17.5M | 0 | 20.6 | |
| Across runs | 0 | 20.6 | ||
Table 7: MPC/DP solver, DQN network, and training parameters. Bold denotes selected value; parentheses list other values tested.
| Parameter | Value |
|---|---|
| MPC / DP solver | |
| Prediction horizon | 1–5 |
| Rollout horizon | 10, 20 |
| Discount factor | 0.98 |
| Velocity grid step | 0.2 m/s |
| Acceleration levels | 5 |
| DQN network | |
| Hidden layers | [256, 256] |
| Replay buffer size | 400,000 |
| Batch size | 64 |
| Target network update | 10,000 steps |
| DQN training (tuned) | |
| Discount factor | 0.98 (0.90, 0.95, 0.995) |
| Speed weight | 1 (3, 5, 10) |
| Learning rate | () |
| Sensor range | 150 m (100 m) |
| Expl. rate | 0.01 (0.001) |
| Checkpoint | 16.1 M steps |
Table 8: Simulation, vehicle, and MPC cost parameters.
| Parameter | Value |
|---|---|
| Simulation | |
| Time step | 0.2 s |
| Episode length | 300 s |
| Lanes | 3 |
| Traffic density | 30 veh/km |
| Surrounding speed range | [20, 30] m/s |
| Sensor range | 150 m |
| Ego vehicle | |
| Speed limits | [0, 33.33] m/s |
| Reference speed | 25 m/s |
| Acceleration | |
| Vehicle length | 12 m |
| Lane-change duration | 2.0 s |
| MPC cost function | |
| Speed weight | 1 |
| Acceleration weight | 1 |
| Safety weight | 1000 |
| Left-lane weight | 2 |
| Min gap | 5 m |
| Time headway | 2.0 s |
| Lane-change penalty | 10 |
| Cooldown penalty | 30 |
| Collision penalty | |
below 0.15 m, confirming that the current acceleration is the dominant predictor of near-term position at the short timescales used by the DP solver. Constant-acceleration extrapolation is therefore adopted as the prediction model throughout this work.
C Rollout Base Policy
The rollout base policy propagates the ego vehicle and surrounding vehicles forward for steps using lightweight analytical models, avoiding invocation of the SUMO simulator at runtime.
Surrounding vehicles. Each surrounding vehicle is propagated longitudinally using the Krauss safe-speed model [13], holding its lane fixed throughout the rollout. The safe speed for vehicle following its leader is:
where is the maximum deceleration, is the reaction time, is the leader's speed, and is the gap to the leader. The vehicle then accelerates toward its desired speed subject to .
Ego vehicle. For the ego vehicle, the safe speed is computed using the speed-dependent safe distance:
where is a minimum gap and is a time headway, applied to the front vehicle at all times and to the rear vehicle on the target lane whenever a lane change is commanded. At each rollout step, the ego considers a lane change if three conditions are met simultaneously: the gap to the target lane's leader exceeds ; the gap to the target lane's follower exceeds ; and the achievable speed in the target lane is closer to than in the current lane. If conditions are met, the lane change is executed; otherwise the ego remains in its current lane. The ego state is then updated as:
where indexes rollout steps and is computed to reach the target safe speed. The accumulated discounted stage cost over the rollout is
where is the rollout policy described above. Surrounding vehicle lane changes during the rollout horizon are not modeled, which makes the rollout optimistic in scenarios where a neighboring vehicle cuts in during the rollout extension.
D RL Model and Simulation Hyperparameter Tuning
Table 6 lists the model selected from each of the five training runs of Section 4.2, evaluated on 500 seeds. The configuration used in Section 4.2 was reached through the sequence of experiments summarized in Table 7, and Tables 8 list the simulation and MPC cost parameters. Each setting was trained and screened on the 10 hold-out seeds; only the final configuration was carried through the full 500-seed evaluation, so the outcomes below are qualitative and are not directly comparable to Table 6.
Training initially used a discount factor of , which produced policies that avoided collisions by decelerating to a near standstill. Lowering the discount factor to 0.95 and 0.90 removed the degenerate behavior but left training unstable, with no checkpoint surviving the 500-seed evaluation; was retained.
The learning rate was reduced from to , which noticeably reduced the amplitude of the oscillation in the holdout curve without eliminating it. The sensor range was increased from 100 m to 150 m, and the final exploration rate was set to ; a lower value of 0.001 produced comparable holdout results but a higher proportion of degenerate checkpoints.
The speed weight deserves particular attention. Values of 3, 5, and 10 were tested, and while all trained stably, they degrade the hybrid controller rather than the RL policy itself. Because the reward is defined as the negative MPC stage cost (Section 3.4), any differing from the value used by the MPC rescales the learned Q-values relative to the stage costs accumulated over the horizon, so the terminal cost is no longer expressed in the same units as the objective it is inserted into. The speed weight in training must therefore match the MPC cost function, i.e. , independently of which value trains best in isolation.