High-Speed Forward and Reverse Tractor-Trailer Driving with Learned Vehicle Dynamics
Tractor-trailer systems are difficult to control, especially unstable during reverse motion, and their dynamics depend on difficult-to-measure factors, including road friction and suspension coefficients. We introduce a learned dynamics model for tractor-trailer control and compare it with a reduced-order dynamics model with Fiala tire forces as an analytic baseline.
From the abstract. Our summary is in progress.
Full paper
High-Speed Forward and Reverse Tractor-Trailer Driving with Learned Vehicle Dynamics
Published under CC BY 4.0. Reproduced with attribution; original at arXiv:2611.20324 (PDF).
\DeclareCaptionFont
mysize
Abstract
Tractor-trailer systems are difficult to control, especially unstable during reverse motion, and their dynamics depend on difficult-to-measure factors, including road friction and suspension coefficients. We introduce a learned dynamics model for tractor-trailer control and compare it with a reduced-order dynamics model with Fiala tire forces as an analytic baseline. Specifically, we compare a model predictive path integral (MPPI) controller that uses the learned dynamics model to an MPPI controller that uses the analytic model, as well as to three additional baseline controllers. In the main closed-loop tracking experiments across four simulated environments, MPPI with learned dynamics achieves mean speeds closer to the target magnitudes and lower root-mean-square (RMS) hitch angles than MPPI with the analytic model at every tested setpoint, with higher completion rates in seven of eight reverse configurations. [Project Page] 1 [Code]
I INTRODUCTION
Despite advances in autonomous vehicle control [1, 2], uncertain dynamics remain challenging [3]. Particularly, Model Predictive Control (MPC), which uses predictions from a system model to optimize a finite-horizon control sequence subject to input and state constraints, is a common control framework applied to vehicle control. As MPC relies on predicted costs and constraint violations determine the selected inputs, model errors can degrade closed-loop performance [3, 4].
These challenges are particularly pronounced in tractor-trailer systems, whose coupled dynamics are nonlinear [5]. Tractor-trailers are unstable, especially in reverse, and trailer motion must be controlled indirectly through tractor control [6]. At high speeds, the controller must anticipate the vehicle, tire, and hitch behavior while tracking the target velocity and path and avoiding jackknifing. Changes in road friction alter available tire forces, while terrain, load transfer, and suspension motion introduce effects that two-dimensional models struggle to capture. Prediction is challenging when these vehicle states and environmental parameters are only partially observed.
Recent approaches to handling uncertainty have focused on designing MPC schemes with learned dynamics, reducing the reliance on a fixed analytic dynamics prior [3, 7, 8, 9, 10]. Another approach is policy adaptation: Rapid Motor Adaptation (RMA) augments a base policy with a latent representation of the operating conditions [11]. The policy is trained in simulation with additional environmental information not available in operating conditions. At deployment, an adaptation module infers the latent representation from recent state-action history, while the base policy weights remain fixed. This approach has also been extended to bipedal robots [12]. Safe Deep Policy Adaptation combines an adaptive reinforcement learning policy with learned dynamics and a control barrier function (CBF) filter [13]. We focus on a different approach: we learn the dynamics of the system directly rather than adapting a control policy online.
Learning-based MPC addresses model mismatch by learning vehicle dynamics directly from data [14, 9] or learning a residual correction to an analytic model [15]. Gaussian processes (GP) are commonly used for the learning framework, as they provide native uncertainty quantification output and have been shown to be effective estimators in low-data regimes [10]. More recently, however, neural dynamics have arisen as an alternative [3, 7, 16] because they scale to large offline datasets and can use finite histories of state–action pairs to infer latent operating conditions and mitigate partial observability [14, 9].
Recent tractor-trailer methods address forward and reverse parking using barrier-rate-guided MPPI [17], navigation using learned geometric distance estimates within MPPI [18], and safety-critical trajectory planning for general N-trailer systems [19]. High-speed studies have used analytic models for lateral stabilization and forward trajectory tracking, including active trailer steering [20] and tube MPC for robustness to model uncertainty and disturbances [21]. Learned vehicle dynamics have also been used to improve robustness to state-estimation error and environmental variation, including in towing tasks [22]. Here, we address high-speed reverse tracking of a tractor-trailer system, which requires jointly tracking the target velocity and path and regulating the hitch angle under uncertain vehicle and environmental dynamics.
We propose a predictive control framework for high-speed forward and reverse tractor-trailer tracking under uncertain dynamics, combining a compact history-conditioned dynamics model with MPPI to balance velocity tracking, path following, and hitch-angle regulation. Our main contributions are:
- We integrate a learned dynamics model that takes a fixed-length state-action history as input with MPPI for high-speed forward and reverse tractor-trailer control under uncertain vehicle and environmental dynamics.
- We derive a reduced-order tractor-trailer dynamics model using Fiala tire forces without constant longitudinal velocity assumptions to accurately characterize the forwards and reverse driving of tractor-trailers.
- We demonstrate high-speed forward and reverse tracking in high-fidelity simulation across friction and terrain variations, the latter of which is absent from the training data.
II PRELIMINARIES
II-A Notation
The sets of natural and real numbers are denoted by \mathbb{N} and \mathbb{R}, respectively. We denote the normal distribution with mean \mu and covariance \Sigma by \mathcal{N}(\mu,\Sigma). For a sequence \{\bm{a}_{n}\}, we write \bm{a}_{p:q}=(\bm{a}_{p},\ldots,\bm{a}_{q}), with both endpoints included. We use t for the current discrete control-step index, \tau for a discrete index within the prediction horizon, and \Delta t>0 for the sampling interval. Furthermore, I_{2} denotes the 2\times 2 identity matrix.
II-B System Dynamics
Consider a discrete-time nonlinear system
\bm{x}_{t+1}=f(\bm{x}_{t},\bm{u}_{t};\bm{\vartheta})where \bm{x}_{t}=(\bm{s}_{t},\bm{z}_{t})\in\mathcal{X}\subseteq\mathbb{R}^{n} is the state at time t\in\mathbb{N}, partitioned into a measured \bm{s}_{t}\in\mathbb{R}^{n_{s}} and non-measured \bm{z}_{t}. Then, \bm{u}_{t}\in\mathcal{U}\subset\mathbb{R}^{m} is the control input at time t, and \bm{\vartheta}\in\mathbb{R}^{p} collects the vehicle and environment parameters such as mass distribution, suspension and tire characteristics, powertrain behavior, and the friction and terrain of the track. Note that \vartheta does not vary with time.
II-C Model Predictive Path Integral Control
Model predictive path integral (MPPI) control is a sampling-based method for controlling nonlinear systems [7, 23]. At control step t, let T\geq 1 be the prediction-horizon length, K\geq 1 the number of sampled control sequences, and \bm{u}_{t:t+T-1} the nominal control sequence. MPPI samples Gaussian perturbations with positive-definite covariance \Sigma\in\mathbb{R}^{m\times m} independently across rollout steps and samples. The rollout commands are \bm{v}_{\tau}^{(k)}=\operatorname{clip}_{\mathcal{U}}(\bm{u}_{\tau}+\bm{\epsilon}_{\tau}^{(k)}), where \bm{\epsilon}_{\tau}^{(k)}\sim\mathcal{N}(\bm{0},\Sigma), \tau=t,\ldots,t+T-1, and k=1,\ldots,K. Here \bm{u}_{\tau} is the nominal control sequence at prediction step \tau and \operatorname{clip}_{\mathcal{U}} applies the componentwise input bounds. Each sampled rollout sequence is computed with the next state predictor \tilde{f}, initialized at \tilde{\bm{s}}_{t}^{(k)}=\bm{s}_{t}. The k-th trajectory satisfies
\tilde{\bm{s}}_{\tau+1}^{(k)}=\tilde{f}(\tilde{\bm{s}}_{\tau}^{(k)},\bm{v}_{\tau}^{(k)}),\quad\tau=t,\ldots,t+T-1.Let C_{j}:\mathcal{S}\times\mathcal{U}\to\mathbb{R} be the stage cost at time index j=\tau-t within the prediction horizon. The rollout cost is
S^{(k)}=\sum_{\tau=t}^{t+T-1}\Bigl[C_{\tau-t}(\tilde{\bm{s}}_{\tau}^{(k)},\bm{v}_{\tau}^{(k)})+\gamma\,\bm{u}_{\tau}^{\top}\Sigma^{-1}(\bm{v}_{\tau}^{(k)}-\bm{u}_{\tau})\Bigr].where the second term is the importance-sampling correction, scaled by the tunable parameter \gamma. The normalized sampling weights are
\displaystyle\eta \\ \displaystyle=\sum_{k=1}^{K}\exp\left(-\frac{1}{\lambda}\left(S^{(k)}-\min_{1\leq\ell\leq K}S^{(\ell)}\right)\right) \\ \displaystyle w^{(k)} \\ \displaystyle=\frac{1}{\eta}\exp\left(-\frac{1}{\lambda}\left(S^{(k)}-\min_{1\leq\ell\leq K}S^{(\ell)}\right)\right)where \lambda>0 is the sampling temperature. The control sequence is updated as \bm{u}_{\tau}\leftarrow\sum_{k=1}^{K}w^{(k)}\bm{v}^{(k)}_{\tau}. Its first input is applied to the plant, and the remaining sequence is shifted to initialize the next control cycle.
II-D Problem Formulation
At each control step, we aim to solve the following receding-horizon control problem, for \tau=t,\ldots,t+T-1:
\displaystyle{\bm{u}}_{t:t+T-1}^{\star}= \\ \displaystyle\argmin_{\bm{u}_{t:t+T-1}\in\mathcal{U}^{T}}\sum_{\tau=t}^{t+T-1}C_{\tau-t}(\tilde{\bm{s}}_{\tau},\bm{u}_{\tau}) \\ \displaystyle\text{s.t.}\quad\tilde{\bm{s}}_{t}=\bm{s}_{t}, \\ \displaystyle\widetilde{\mathcal{H}}_{t}=\mathcal{H}_{t},\ \tilde{\bm{s}}_{\tau+1}=\tilde{f}_{\bm{\theta}}(\widetilde{\mathcal{H}}_{\tau},\bm{u}_{\tau}).where \widetilde{\mathcal{H}}_{t} is the state-action history of length H defined as
\displaystyle\widetilde{\mathcal{H}}_{t} \\ \displaystyle:=\bigl(\bm{s}_{t-H+1:t},\bm{u}_{t-H+1:t-1}\bigr)and \tilde{f}_{\bm{\theta}} is the internal dynamics representation of the controller. We solve (5) using MPPI with fixed parameters \bm{\theta}. In particular, we learn \tilde{f}_{\bm{\theta}} from an offline dataset \mathcal{D} of observed state-action trajectories from (1) to support high-speed forward and reverse driving when f, \bm{\vartheta}, and \bm{z}_{t} are unavailable. We evaluate whether the learned predictor improves prediction accuracy and closed-loop performance relative to the analytic model.
III METHODOLOGY
III-A Tractor-trailer Dynamics
We first derive an analytic baseline of planar tractor-trailer dynamics with Fiala tire forces to accurately characterize the coupled longitudinal, lateral, yaw, and hitch motion in both forward and reverse driving while remaining low-dimensional enough for sampling-based MPC. Our model is similar to [24], but we do not have the simplifying assumption of constant longitudinal velocity, which does not hold in practical driving scenarios [25].
We approximate the tractor by a bicycle model and the trailer by a single axle, as shown in Fig. 1. We differentiate quantities between the tractor and trailer using a subscript 1 or 2 respectively. For body i, let \phi_{i} be its yaw angle, m_{i} be its mass, and I_{zi} be its yaw moment of inertia about its center of mass. Let l_{1f} and l_{1r} denote the distance from the tractor’s center of mass to its front and rear axles respectively, while l_{2f} and l_{2r} run from the trailer’s center of mass to the hitch and its modeled axle. Let h be the distance from the tractor’s center of mass to the hitch, \alpha:=\phi_{1}-\phi_{2} be the hitch angle, and \delta_{f} be the physical front-wheel steering angle.
The tractor’s center-of-mass position is \bm{p}_{1}:=(p_{1x},p_{1y}), and v_{1x},v_{1y} are its longitudinal and lateral body-frame velocities. We define \bm{f}_{1f}:=(f_{1xf},f_{1yf}) as the tractor’s front tire forces in the front-wheel frame, \bm{f}_{1r}:=(f_{1xr},f_{1yr}) as the tractor’s rear tire forces in the body frame, and \bm{f}_{2r}:=(f_{2xr},f_{2yr}) as the trailer’s tire forces in the trailer frame.
Let \bm{f}_{h} be the force the trailer exerts on the tractor at the hitch, expressed in the tractor frame, \bm{f}_{1}:=\bm{f}_{1r}+R_{\delta_{f}}\bm{f}_{1f}=(f_{1x},f_{1y}) the total tractor tire force, \tau_{1}:=-l_{1r}f_{1yr}+l_{1f}(R_{\delta_{f}}\bm{f}_{1f})_{y} its yaw moment, and \bm{w}:=\bm{v}_{1}-h\dot{\phi}_{1}\bm{e}_{y} the tractor’s velocity at the hitch, with \bm{e}_{y}:=(0,1) and J:=\left[\begin{smallmatrix}0&-1\\ 1&0\end{smallmatrix}\right]. The Newton–Euler equations of both bodies and the hitch constraint are
\displaystyle\begin{split}m_{1}(\dot{\bm{v}}_{1}+\dot{\phi}_{1}J\bm{v}_{1})&=\bm{f}_{1}+\bm{f}_{h},\\
I_{z1}\ddot{\phi}_{1}&=\tau_{1}-hf_{hy},\end{split} \\ \displaystyle\begin{split}m_{2}(\dot{\bm{v}}_{2}+\dot{\phi}_{2}J\bm{v}_{2})&=\bm{f}_{2r}-R_{\alpha}\bm{f}_{h},\\
I_{z2}\ddot{\phi}_{2}&=-l_{2r}f_{2yr}-l_{2f}(R_{\alpha}\bm{f}_{h})_{y},\end{split} \\ \displaystyle\bm{v}_{2} \\ \displaystyle=R_{\alpha}\bm{w}-l_{2f}\dot{\phi}_{2}\bm{e}_{y}.The system has an algebraic loop: \dot{\bm{v}}_{1} depends on \bm{f}_{h}, which by (8) depends on \dot{\bm{v}}_{2}, which depends on \dot{\bm{v}}_{1} through (9). Differentiating (9) with \frac{d}{dt}R_{\alpha}=\dot{\alpha}JR_{\alpha} closes this loop,
\dot{\bm{v}}_{2}=R_{\alpha}\dot{\bm{w}}+\dot{\alpha}JR_{\alpha}\bm{w}-l_{2f}\ddot{\phi}_{2}\bm{e}_{y},which is affine in \dot{\bm{\nu}}. We solve the translational component of (8) for R_{\alpha}\bm{f}_{h}, substitute (10), and insert the result into (7) and the rotational component of (8). This eliminates \bm{f}_{h} and leaves a system that is linear in the accelerations, M(\alpha)\dot{\bm{\nu}}=\bm{b}, with
\displaystyle M(\alpha)=\begin{bmatrix}\bar{m}&0&0&-\rho s\\
0&\bar{m}&-m_{2}h&-\rho c\\
0&-m_{2}h&I_{z1}+m_{2}h^{2}&\rho hc\\
-\rho s&-\rho c&\rho hc&I_{z2}+m_{2}l_{2f}^{2}\end{bmatrix}, \\ \displaystyle\bm{b}=\begin{bmatrix}f_{1x}+\hat{f}_{2x}+\dot{\phi}_{1}(m_{1}v_{1y}+m_{2}\tilde{v}_{2y})+gc\\
f_{1y}+\hat{f}_{2y}-\dot{\phi}_{1}(m_{1}v_{1x}+m_{2}\tilde{v}_{2x})-gs\\
\tau_{1}-h(\hat{f}_{2y}-m_{2}\dot{\phi}_{1}\tilde{v}_{2x}-gs)\\
\rho\dot{\phi}_{1}v_{2x}-(l_{2f}+l_{2r})f_{2yr}\end{bmatrix},where \hat{\bm{f}}_{2}:=R_{\alpha}^{\!\top}\bm{f}_{2r} and \tilde{\bm{v}}_{2}:=R_{\alpha}^{\!\top}\bm{v}_{2} are the trailer force and velocity in the tractor frame and g:=\rho\dot{\alpha}\dot{\phi}_{2}. Since \tfrac{1}{2}\bm{\nu}^{\top}M(\alpha)\bm{\nu} is the kinetic energy, M(\alpha) is symmetric positive definite for every \alpha, so (11) has a unique solution.
Lateral tire forces are modeled using the Fiala brush model,
f_{y}=\begin{cases}-C_{c}\tan\beta+\dfrac{C_{c}^{2}\lvert\tan\beta\rvert\tan\beta}{3\mu f_{z}}-\dfrac{C_{c}^{3}\tan^{3}\beta}{27\mu^{2}f_{z}^{2}},&\lvert\beta\rvert<\beta_{\mathrm{sl}},\\[4.0pt]
-\mu f_{z}\operatorname{sgn}\beta,&\text{otherwise},\end{cases}where C_{c}\in\{C_{1f},C_{1r},C_{2r}\} is the cornering stiffness of the corresponding axle, f_{z} is its static normal load, including the trailer’s tongue load, and \mu is the tire–road friction coefficient, which the analytic model fixes to \hat{\mu}. The saturation slip angle is \beta_{\mathrm{sl}}=\arctan(3\mu f_{z}/C_{c}), and the wheel slip angle is \beta=\operatorname{atan2}(v_{\perp},\max(\lvert v_{\parallel}\rvert,\epsilon)), where v_{\parallel} and v_{\perp} are wheel-frame velocities and \epsilon>0 regularizes the low-speed denominator.
The tractor is rear-wheel driven. Given the normalized commands u_{\delta},u_{a}\in[-1,1], the steering angle is \delta_{f}=\delta_{\max}u_{\delta}, and the rear longitudinal force tracks the commanded acceleration a_{\mathrm{cmd}}=a_{\max}\max(u_{a},0)-b_{\max}\max(-u_{a},0) up to the friction limit,
f_{1xr}=\mu f_{z}\tanh\!\big(m_{1}a_{\mathrm{cmd}}/(\mu f_{z})\big),with f_{1xf}=f_{2xr}=0. At the rear axle, the saturation force \mu f_{z} in (12) is replaced by \sqrt{(\mu f_{z})^{2}-f_{1xr}^{2}}, so throttle and braking reduce the available lateral force. Combining (11) with the planar kinematics gives
\dot{\bm{q}}=\begin{bmatrix}R_{\phi_{1}}\bm{v}_{1}&\dot{\phi}_{1}&\dot{\phi}_{2}&M(\alpha)^{-1}\bm{b}\end{bmatrix}^{\top},where \bm{q}:=(p_{1x},p_{1y},\phi_{1},\phi_{2},\bm{\nu}^{\top})^{\top} is the state of the analytic model.
III-B Controller Architecture
We integrate a learned dynamics model with MPPI for high-speed forward and reverse tractor-trailer control under uncertain vehicle and environmental dynamics. The model jointly predicts longitudinal, lateral, yaw, and actuator responses from recent observations and commands. It is trained offline, while its predictions maps the most recent H steps of \mathcal{I}_{t}, \mathcal{H}_{t}:=(\bm{s}_{t-H+1:t},\bm{u}_{t-H+1:t-1}), and a candidate command \bm{u}_{t} to \tilde{\bm{s}}_{t+1}=\tilde{f}_{\bm{\theta}}(\mathcal{H}_{t},\bm{u}_{t}).
III-B1 Dataset Collection
We collect trajectories in the BeamNG.tech simulator on a flat asphalt environment with no snow, slope, or banking variation. We collect uniform friction \mu\in\{0.2,0.4,\dots,1.0\}, recording simulator states at time intervals \Delta t=0.05 s without added measurement noise. Forward data are collected from analytic-model MPPI at v^{\star}\in\{20,30,\dots,90\} km/h tracking a sinusoidal trajectory along the environment to better explore vehicle handling limits with added random control input noise. More specifically, we track lateral centerline offset e_{\mathrm{ref}}(\varsigma)=\tfrac{3}{8}W\sin(\varsigma/W) along arc length \varsigma, with applied input u^{\mathrm{app}}_{t}=\mathrm{clip}_{\mathcal{U}}(u^{\mathrm{MPPI}}_{t}+w_{t}), w_{t}\sim\mathcal{N}(0,0.09I_{2}), where u^{\mathrm{MPPI}}_{t} denotes the MPPI control output at time t. Reverse data are collected similarly, tracking v^{\star}\in\{-20,\dots,-50\} km/h but without sinusoidal tracking or input noise. We also augment the dataset with left–right mirroring. To cover large hitch angles, we add reverse runs at v^{\star}\in\{-60,-50,-40\} km/h from MPPI using intermediate learned models.
III-B2 Model Training
Our standard model is a multilayer perceptron (MLP) that predicts observed-state dynamics from H=4 state-action pairs. We explore other history lengths in Section IV-D. For brevity, we write v_{x}=v_{1x} and v_{y}=v_{1y}. The model takes input
(\sin\alpha,\cos\alpha,v_{x},v_{y},\dot{\phi}_{1},\dot{\phi}_{2},\delta,a,u_{\delta},u_{a})_{t-H+1:t}and predicts the finite-difference rates
(\dot{v}_{x},\dot{v}_{y},\ddot{\phi}_{1},\ddot{\phi}_{2},\dot{\delta},\dot{a})_{t}.Here \bm{u}=(u_{\delta},u_{a})\in\mathcal{U}=[-1,1]^{2} contains normalized steering and longitudinal actuation commands, with observed responses \delta,a. At the start of each rollout, we initialize the history with the H most recent observations and the H-1 most recently applied commands. We append the first command from the sampled sequence to the command history to form the predictor input. The magnitude of u_{a} denotes the throttle command if u_{a} is positive and denotes braking when negative. The actuator response a is computed as the realized throttle minus the realized braking. Denote the normalized steering angle by \delta and the physical steering angle by \delta_{f}. We use finite differences of the measured velocities, yaw rates, and actuator states for training.
During rollouts, we integrate the predicted rates with forward Euler to update these states and use the vehicle kinematics to update position and orientation. The MLP has four hidden layers of 128 neurons each. Inputs and targets are standardized using train set means and standard deviations.
III-B3 MPPI Controller and Cost Function
Each MPPI rollout initializes its own history from measurements, then updates its window with predicted states and sampled controls (Fig. 2). Every rollout computes a cost that promotes target-velocity tracking and penalizes track-boundary and hitch-angle violations. The violation penalty c_{\text{viol}} is
\displaystyle c_{\text{viol}} \\ \displaystyle=c_{\text{track}}+c_{\text{jackknife}} \\ \displaystyle c_{\text{track}} \\ \displaystyle=\max\left(0,\lvert e_{\mathrm{lat}}\rvert-0.45W_{\mathrm{track}}+0.1\right) \\ \displaystyle c_{\text{jackknife}} \\ \displaystyle=\max(0,\lvert\alpha\rvert-\alpha_{\mathrm{max}})where e_{\mathrm{lat}} is the signed lateral deviation of the tractor’s center of mass from the track centerline, \alpha_{\mathrm{max}} is the prescribed jackknife threshold, and W_{\mathrm{track}} is the track width. Distances in (15) are measured in meters, so the constant 0.1 represents a 0.1\,\mathrm{m} margin. When \lvert\alpha\rvert>\alpha_{\mathrm{max}}, we consider the tractor-trailer to have jackknifed. Additionally, we define
\displaystyle c_{\text{vel}} \\ \displaystyle=\lvert v^{\star}-v_{\mathrm{track}}\rvert \\ \displaystyle c_{\text{center}} \\ \displaystyle=e_{\text{lat}}^{2} \\ \displaystyle c_{\text{hitch}} \\ \displaystyle=\alpha^{2}where v^{\star} is the signed target velocity and v_{\mathrm{track}} is the signed velocity along the track centerline. Combining (15)–(18), the stage cost at time index j=\tau-t\in\{0,\ldots,T-1\} within the prediction horizon is
\displaystyle C_{j}(\bm{s},\bm{u})={} \\ \displaystyle 0.99^{j}\cdot 10^{7}c_{\text{viol}}+k_{v}c_{\text{vel}} \\ \displaystyle+k_{c}c_{\text{center}}+k_{a}c_{\text{hitch}}.where k_{v}, k_{c}, and k_{a} are penalty weights.
The K rollout costs update the control sequence to approximately solve (5), and the first command is applied. This command and the new observation update the measured history for replanning. Main tracking experiments initialize the history with H steps of analytic-model MPPI.
IV SIMULATION RESULTS
We address three research questions:
- Does MPPI with learned dynamics improve forward and reverse tracking relative to MPPI with the analytic model across friction and terrain variations?
- How do learned and analytic dynamics compare in trajectory rollout prediction, and does exposing the true friction coefficients close the gap?
- How does closed-loop performance compare among selected learned predictors with history lengths
H\in\{1,4,8\}?
IV-A Experimental Setup
Simulation environments: We evaluate the controllers in BeamNG.tech [26], whose internal plant dynamics are unavailable to the controllers. The inputs are \bm{u}=(u_{\delta},u_{a})\in[-1,1]^{2}, and the observed state is \bm{s}=(p_{1x},p_{1y},\phi_{1},\phi_{2},v_{1x},v_{1y},\dot{\phi}_{1},\dot{\phi}_{2},\delta,a)\in\mathbb{R}^{10}. The unobserved z_{t} contains state information including vehicle pitch and roll, suspension states, and powertrain states, while vehicle parameters, friction, and terrain enter through \vartheta. The tractor-trailer follows a predefined racetrack at high target speeds in forward and reverse motion, providing a stress test of dynamics prediction. The track follows the general layout of the Circuit de Barcelona-Catalunya. Unobserved plant states \bm{z}_{t} include vehicle pitch and roll, suspension states, local road friction and roughness, and powertrain behavior.
The four test environments are:
- Asphalt: A flat track with uniformly high-friction asphalt.
- Snow: A flat asphalt track with irregularly distributed snow patches that vary the local friction.
- Slope: A uniformly high-friction track with elevation changes and banking.
- Snow + Slope: The same asphalt-snow pattern as in the Snow scenario, with the same terrain pattern as the Slope scenario.
Figure 3 shows the combined snow and terrain modifications.
Controllers: We compare the following five controllers:
- Controller 1 (Ours): An MPPI controller using the learned dynamics model described in Section III-B.
- Controller 2: An MPPI controller with the analytic model described in Section III-A.
- Controller 3: A hybrid controller that uses a linear quadratic regulator (LQR) [27] for steering and proportional–integral–derivative (PID) control [28] for longitudinal actuation. The LQR controller operates on a linearization of the analytic dynamics model at the
\alpha=0operating point and assumesv_{y}=0and constantv_{x}. - Controller 4: A gradient-based MPC controller that uses IPOPT [29] with direct shooting under the analytic dynamics model.
- Controller 5: A gradient-based model predictive contouring control (MPCC) controller [30] using our analytic dynamics model.
IV-B Closed-Loop Tracking
Figure 4 shows representative reverse-driving trajectories of Controller 1 in the four environments defined in Section IV-A. Table I gives the MPPI settings for these main tracking experiments.
- k_{v}
- 1\times 10^{2}
- 5\times 10^{1}
- k_{c}
- 1\times 10^{0}
- 5\times 10^{1}
- k_{a}
- 7\times 10^{2}
- 1\times 10^{2}
- \lambda (temperature)
- 150
- 100
- \operatorname{diag}(\Sigma)
- (7\times 10^{-2},\,0.2)
- (2\times 10^{-2},\,0.2)
- K (samples)
- 500
- 500
- T (horizon steps)
- 80
- 65
- \gamma
- 0.0
- 0.0
- \Delta t (s)
- 0.05
- 0.05
Table II summarizes performance in the four scenarios.
- Controller
- v^{\star}
- \bar{v}
- \bar{\alpha}_{\mathrm{rms}}
- \bar{N}
- C/J/S/O/F
- \bar{v}
- \bar{\alpha}_{\mathrm{rms}}
- \bar{N}
- C/J/S/O/F
- \bar{v}
- \bar{\alpha}_{\mathrm{rms}}
- \bar{N}
- C/J/S/O/F
- \bar{v}
- \bar{\alpha}_{\mathrm{rms}}
- \bar{N}
- C/J/S/O/F
- No data
- (km/h)
- (km/h)
- (deg)
- (steps)
- (out of 9)
- (km/h)
- (deg)
- (steps)
- (out of 9)
- (km/h)
- (deg)
- (steps)
- (out of 9)
- (km/h)
- (deg)
- (steps)
- (out of 9)
- 1: Ours
- -30
- 29.1
- 1.14
- 500
- 9/0/0/0/0
- 29.1
- 1.18
- 500
- 9/0/0/0/0
- 25.4
- 1.03
- 455
- 8/0/1/0/0
- 20.4
- 10.82
- 386
- 6/0/3/0/0
- -50
- 47.2
- 1.75
- 500
- 9/0/0/0/0
- 46.0
- 1.82
- 500
- 9/0/0/0/0
- 42.1
- 3.06
- 498
- 8/1/0/0/0
- 30.4
- 15.41
- 413
- 4/0/5/0/0
- 80
- 75.4
- 2.57
- 500
- 9/0/0/0/0
- 72.6
- 2.72
- 500
- 9/0/0/0/0
- 70.7
- 2.67
- 500
- 9/0/0/0/0
- 69.1
- 2.83
- 500
- 9/0/0/0/0
- 2: MPPI (analytic) [7]
- -30
- 19.7
- 5.25
- 392
- 5/0/4/0/0
- 19.6
- 7.82
- 403
- 5/0/4/0/0
- 22.3
- 2.86
- 498
- 8/0/1/0/0
- 16.7
- 11.47
- 365
- 4/0/5/0/0
- -50
- 22.7
- 6.70
- 448
- 6/0/3/0/0
- 22.8
- 8.49
- 417
- 5/0/4/0/0
- 22.5
- 6.48
- 457
- 6/0/3/0/0
- 18.1
- 15.86
- 321
- 2/1/6/0/0
- 80
- 71.1
- 3.00
- 500
- 9/0/0/0/0
- 68.7
- 3.26
- 500
- 9/0/0/0/0
- 67.1
- 3.19
- 500
- 9/0/0/0/0
- 64.8
- 3.66
- 500
- 9/0/0/0/0
- 3: LQR–PID [27, 28]
- -30
- 30.8
- 4.80
- 495
- 8/0/0/1/0
- 30.6
- 5.36
- 439
- 6/0/0/3/0
- 28.5
- 10.02
- 446
- 6/0/0/3/0
- 24.0
- 16.56
- 377
- 3/6/0/0/0
- -50
- 45.1
- 14.41
- 452
- 6/1/0/2/0
- 48.8
- 8.97
- 407
- 6/3/0/0/0
- 46.9
- 10.58
- 396
- 6/3/0/0/0
- 37.1
- 16.91
- 352
- 3/3/0/3/0
- 80
- 74.8
- 2.45
- 436
- 6/0/0/3/0
- 72.4
- 2.36
- 442
- 6/0/0/3/0
- 71.7
- 2.52
- 500
- 9/0/0/0/0
- 70.7
- 2.53
- 500
- 9/0/0/0/0
- 4: Shooting MPC [29]
- -30
- 28.4
- 3.11
- 500
- 9/0/0/0/0
- 23.5
- 20.22
- 373
- 5/1/3/0/0
- 19.9
- 16.32
- 478
- 7/2/0/0/0
- 16.7
- 20.79
- 338
- 4/0/5/0/0
- -50
- 32.2
- 54.93
- 107
- 0/9/0/0/0
- 31.9
- 39.96
- 244
- 0/6/0/3/0
- 26.3
- 28.09
- 293
- 3/3/3/0/0
- 23.5
- 30.59
- 292
- 3/3/3/0/0
- 80
- 71.3
- 12.28
- 471
- 5/1/0/3/0
- 69.1
- 9.16
- 468
- 6/3/0/0/0
- 69.5
- 8.13
- 490
- 6/0/0/3/0
- 66.7
- 11.80
- 475
- 6/0/0/3/0
- 5: MPCC [30]
- -30
- 22.0
- 26.57
- 301
- 0/3/2/4/0
- 21.9
- 39.16
- 261
- 0/3/3/3/0
- 18.1
- 30.46
- 374
- 1/0/7/0/1
- 14.1
- 31.79
- 275
- 0/1/6/2/0
- -50
- 39.3
- 14.74
- 261
- 0/3/1/4/1
- 30.2
- 24.95
- 203
- 0/2/3/4/0
- 37.3
- 17.98
- 352
- 1/3/1/3/1
- 25.5
- 25.63
- 202
- 0/1/3/5/0
- 80
- 68.0
- 6.06
- 400
- 4/0/0/5/0
- 66.1
- 4.82
- 407
- 4/0/0/4/1
- 64.5
- 6.73
- 379
- 3/0/0/5/1
- 64.4
- 5.74
- 426
- 4/0/0/5/0
IV-B1 Asphalt Scenario
Controller 1 is the only controller to complete all nine 500-step runs at each of the three setpoints, v^{\star}\in\{-30,-50,80\}\,\mathrm{km/h}. It achieves the lowest RMS hitch angle at both reverse setpoints. In forward motion, Controller 3 achieves a lower RMS hitch angle but completes fewer runs. Controller 1 also achieves mean speeds closer to the target magnitudes than Controller 2 at every setpoint. At -50\,\mathrm{km/h}, for example, Controller 1 achieves \bar{v}=47.2\,\mathrm{km/h}, \bar{\alpha}_{\mathrm{rms}}=1.75^{\circ}, and nine completions, compared with 22.7\,\mathrm{km/h}, 6.70^{\circ}, and six completions for Controller 2.
IV-B2 Snow Scenario
Controller 1 completes all nine Snow runs at each setpoint, with mean speeds closer to the target magnitudes than Controller 2. It has no jackknife or stall failures despite its higher reverse speeds, unlike Controller 2, which stalls in four of nine runs at each reverse setpoint. Controller 3 has higher RMS hitch angles in reverse but a slightly lower forward value (2.36^{\circ} vs. 2.72^{\circ}). Controller 4 has higher RMS hitch angles and fewer completed steps than Controller 1 at every setpoint. Controller 5 has the fewest completed steps at each setpoint and the fewest completions overall.
IV-B3 Slope Scenario
In the Slope environment, Controller 1 completes eight of nine runs at each reverse setpoint, compared with all nine on Asphalt and Snow. The two reverse terminations consist of one stall at -30\,\mathrm{km/h} and one jackknife at -50\,\mathrm{km/h}. It still achieves mean speeds closer to the target magnitudes and lower RMS hitch angles than Controller 2 at every setpoint. It completes at least as many reverse runs and has lower reverse RMS hitch angles than every baseline. In forward motion, Controller 3 matches its completion rate with a slightly higher mean speed and lower RMS hitch angle.
IV-B4 Snow + Slope Scenario
Controller 1 has the most reverse completions and the lowest reverse RMS hitch angles on Snow + Slope, although stalls limit its completion rate. This combined environment also has the largest reduction in reverse completions for MPPI with learned dynamics: 10 of 18 runs, compared with 18 of 18 on Snow and 16 of 18 on Slope. It is the only controller with no jackknife failures across the three setpoints. Controller 3 achieves a higher mean speed and slightly lower RMS hitch angle in forward driving, but completes fewer reverse runs, with more jackknife or off-track failures.
IV-B5 Summary Across Environments
Across the eight reverse configurations in Table II, Controller 1 completes 62 of 72 runs, compared with 41 of 72 for Controller 2. The corresponding stall counts are nine and 30, while each controller has one jackknife failure. Controller 1 also achieves higher mean speeds and lower RMS hitch angles in every reverse configuration. Both MPPI variants complete all 36 forward runs. LQR–PID has lower forward RMS hitch angles than MPPI with learned dynamics in all four environments, with fewer completions on Asphalt and Snow.
Despite the learned predictor not receiving terrain-map information, unlike the terrain-aware model in [16] and terrain variation absent from its training data, we find that the learned model transfers to the tested terrain profiles, but combined snow and terrain variation still causes stalls, as Controller 1 completes six of nine reverse runs at -30\,\mathrm{km/h} and four of nine at -50\,\mathrm{km/h}.
IV-C Dynamics Prediction Error
We compare the multi-step dynamics prediction accuracy of the following models:
- The analytic model (defined in Section III-A), with fixed friction
\mu=1. - The analytic model, given the ground-truth tractor and trailer contact-friction coefficients.
- The fully learned model with
H=4.
From MPPI trajectories with learned dynamics, we select one five-second BeamNG.tech segment per direction and environment. Each predictor replays the same 100 recorded commands (\Delta t=0.05\,\mathrm{s}) from the same measured state without resets, fixing actions across models; the learned predictor initializes from four measured state-action pairs. The friction-aware model receives recorded contact-friction sequences, not a map evaluated along its predicted path. Figure 5 shows Snow + Slope rollouts and absolute wrapped hitch-angle and longitudinal velocity errors. Table III reports position and wrapped hitch-angle RMSE over the 100 predicted states, excluding the common initial state.
- Direction
- Environment
- e_{p}
- e_{\alpha}
- e_{p}
- e_{\alpha}
- e_{p}
- e_{\alpha}
- Reverse
- Asphalt
- 5.8
- 96.5
- 7.4
- 113.0
- 4.2
- 101.1
- No data
- Snow
- 7.0
- 130.1
- 4.9
- 107.9
- 4.0
- 88.2
- No data
- Slope
- 7.7
- 132.6
- 8.2
- 134.2
- 2.2
- 78.7
- No data
- Snow + Slope
- 8.1
- 131.5
- 7.3
- 111.6
- 2.1
- 83.4
- Forward
- Asphalt
- 7.3
- 93.4
- 6.6
- 95.3
- 1.4
- 2.1
- No data
- Snow
- 7.3
- 82.3
- 11.9
- 83.8
- 10.8
- 16.0
- No data
- Slope
- 3.5
- 80.4
- 2.7
- 79.2
- 5.7
- 1.1
- No data
- Snow + Slope
- 8.4
- 85.7
- 14.7
- 84.0
- 7.5
- 8.7
During reverse driving, the learned model achieves the lowest position RMSE in all four environments and the lowest hitch-angle RMSE in three of four. On Asphalt, the fixed-friction analytic has lower hitch-angle RMSE (96.5^{\circ} versus 101.1^{\circ}). Figure 5(e) shows slower initial growth of the learned model’s hitch-angle error, although its error becomes large later in the five-second horizon.
During forward driving, the learned model achieves the lowest hitch-angle RMSE in all four environments. Across the eight selected segments, the friction-aware analytic model has lower position RMSE than the fixed-friction analytic model in four cases and lower hitch-angle RMSE in four cases. Providing the true friction value to the analytic model does not allow it to match the performance of the learned model (Q2) and does not consistently improve dynamics prediction. This is likely due to the effects of other unmodeled dynamics. We note that these comparisons do not establish how much of the remaining error comes from unmodeled vehicle behavior and how much comes from other environmental effects.
The five-second diagnostic horizon also exceeds the main MPPI horizons of 4.0\,\mathrm{s} forward and 3.25\,\mathrm{s} reverse. The large late reverse errors show the limits of open-loop prediction despite the closed-loop tracking results above. Because hitch error is wrapped, a late decrease after a large trailer rotation need not indicate recovery.
IV-D History-Length Comparison
We compare selected predictors with H\in\{1,4,8\} on a separate Snow + Slope segment, using three seeds at one start per direction (Table IV). The H=1 model uses fixed-friction training, whereas H=4 and H=8 use mixed-friction data.
- No data
- (km/h)
- (km/h)
- (deg)
- (steps)
- (out of 3)
- H=1
- -30
- 15.8
- 29.29
- 98
- 0/3/0/0/0
- No data
- 80
- 48.0
- 22.27
- 278
- 0/2/0/1/0
- H=4
- -30
- 30.0
- 2.84
- 500
- 3/0/0/0/0
- No data
- 80
- 51.6
- 29.29
- 345
- 0/3/0/0/0
- H=8
- -30
- 30.9
- 2.87
- 500
- 3/0/0/0/0
- No data
- 80
- 64.0
- 6.07
- 500
- 3/0/0/0/0
- Analytic
- -30
- 18.9
- 13.78
- 393
- 2/0/1/0/0
- No data
- 80
- 53.3
- 20.00
- 356
- 0/2/0/1/0
For this comparison, we use K=1500, T=80/75 for forward/reverse driving, \lambda=100, \operatorname{diag}(\Sigma)=(0.01,0.2), \gamma=0, and \Delta t=0.05\,\mathrm{s}. The weights (k_{v},k_{c},k_{a}) are (20,50,100) forward and (50,50,200) reverse. All candidates use these numerical MPPI settings. Both the starting segment and tuning differ from the main experiments, so completion rates should not be compared directly with Table II.
The H=1 model completes no runs in either direction; all three reverse runs end in jackknifing, with a mean duration of 98 control steps. Both H=4 and H=8 complete all reverse runs, with similar RMS hitch angles of 2.84^{\circ} and 2.87^{\circ}. The H=4 mean speed is also closer to the target magnitude than that of H=8.
Their forward outcomes differ: H=4 jackknifes in all three runs, whereas H=8 completes all three and has the lowest forward RMS hitch angle. Its mean speed of 64.0\,\mathrm{km/h} remains below the 80\,\mathrm{km/h} target. The forward RMS hitch angle does not decrease monotonically with H, as the H=4 value exceeds that of H=1. The analytic model completes two reverse runs and no forward runs. Although its forward mean speed and RMS hitch angle are better than those of H=4, neither completes a forward run. These results answer Q3 for the selected predictors, but differences in their training data (fixed vs mixed friction) prevent attributing the outcomes to history length alone.
V CONCLUSION
We evaluated MPPI with learned tractor-trailer dynamics against a Fiala-based analytic model and additional controllers. In every tracking configuration, learned dynamics brought mean speeds closer to the target magnitudes and reduced RMS hitch angles relative to analytic-model MPPI. Reverse completions increased from 41 to 62 of 72 runs. This advantage persisted on slope and banking absent from training, although combined snow and terrain variation limited reverse completion. On a separate Snow + Slope segment, controllers using H=4 and H=8 predictors completed all reverse runs, but only H=8 completed all forward runs. Future work should consider other sources of uncertainty, such as trailer payload variation.