Trailer sway is a persistent contributor to severe crashes among light passenger vehicles towing trailers, yet it remains largely unaddressed by the autonomous vehicle systems now entering this new era of automation. Improper cargo placement rearward of the trailer axle reduces, and can invert, the tongue load transmitted through the hitch. The resulting loss of vertical load at the tow vehicle's rear axle diminishes the lateral tire force available there and degrades yaw stability of the coupled system, admitting a divergent lateral oscillation of the trailer known as trailer sway. Under adverse combinations of speed and loading, this oscillation can progress to jackknifing, in which the articulation angle diverges rapidly and directional control is lost. This work develops a linear state-space model of the yaw-plane dynamics of a light vehicle-trailer combination, parameterized to expose tongue load as an explicit stability-determining quantity. From this model a linear quadratic regulator is synthesized to suppress articulation-angle divergence. Because consumer trailers carry no sensors, the two trailer states the controller needs, trailer yaw rate and articulation angle, are estimated by a Kalman filter from measurements taken only on the tow vehicle. The controller is then implemented and evaluated in a MuJoCo multibody simulation across a range of longitudinal speeds and tongue-load conditions, including the negative-tongue-load regime. Results show a significant decrease in trailer oscillation when controlling a given vehicle's steering with an LQR using tow-vehicle IMU and LiDAR data. These findings indicate that LQR controlled anti-sway systems are a viable control method for future autonomous vehicles.
Figures & tables
Symbol
Quantity
Value
Source
m1
tractor (car) mass
5.5 kg
measured
I1
tractor yaw inertia
0.053 kg m 2
est.
a
tractor CG → front axle
0.144 m
wheelbase/2
b
tractor CG → rear axle
0.144 m
wheelbase/2
h
rear axle → hitch
0.042 m
CAD
Cf
front cornering stiffness
300 N/rad
est.
TABLE I: Vehicle parameters used for the scaled Neoracer platform, as coded in swaykalmaanboundedgraph.jl . Entries marked “est.” are estimates rather than measurements; entries marked “exact” were computed from the CAD geometry.
Fig. 1: Schematic of the coupled tractor–trailer bicycle model in the destabilized (rearward-CG) loading configuration, showing the front, rear and trailer tire forces Fyf , Fyr and Fy2 , the steer angle δ , the articulation angle θ , and the segment lengths a , b , h , L2 and a2 . Numerical values for every labelled quantity are given in Table I .
Fig. 2: Real part of the sway and divergent modes against forward speed for the baseline (forward-CG) loading. Only the real mode crosses zero, at 7.5 m/s; the oscillatory mode stays damped across the whole range. This is open loop.
Fig. 3: Real part of the sway and divergent modes against forward speed for the destabilized (rearward-CG) loading. The oscillatory pair crosses zero at 5.4 m/s while the real mode stays damped, the mirror image of the baseline case. This is open loop.
Fig. 4: Root locus of the four open-loop modes as forward speed sweeps from 1 to 15 m/s, with the baseline (blue) and destabilized (red) loadings overlaid. Circles mark Vmin , stars mark Vmax . The baseline crosses the imaginary axis along the real axis; the destabilized loading crosses as a complex pair.
Fig. 5: Critical sway speed as a function of the hitch-to-trailer-CG distance a2 , computed against the model file’s reference parameter set rather than the Neoracer rig. The trend, not the absolute speeds, is the result here: moving the CG rearward collapses the stable speed range.
Fig. 6: Articulation angle response to a 0.05 rad steering pulse at 6.6 m/s, 80% of critical. The mode rings up to about 25 degrees and decays to near zero within roughly 8 s.
Fig. 7: Articulation angle response to the same 0.05 rad pulse at 8.6 m/s, 105% of critical. The oscillation grows on every cycle and passes 120 degrees within the 10 s window.
Fig. 8: Lateral position of the tractor against time at 6.6 m/s. Even though the articulation angle decays, the vehicle ends about 35 m off its original line.
Fig. 9: Lateral position of the tractor against time at 8.6 m/s. The drift exceeds 60 m and the growing sway oscillation is superimposed on top of it.
State
Weight
Why
v1
0
internal state, not a failure mode; regulated only through coupling
r1
0
internal state, not a failure mode
r2
0
internal state, not a failure mode
θ
50
largest weight: sway is the failure mode we are targeting
ψ1
20
heading error; with y this makes lane keeping the second objective
y
25
lane position error
TABLE II: LQR weighting rationale. The state order is [v1,r1,r2,θ,ψ1,y] .
State
Meaning
Gain
Measurable on tractor?
v1
tractor lateral velocity
−0.1185
indirect (integrated accel.)
r1
tractor yaw rate
0.0708
yes (yaw gyro)
r2
trailer yaw rate
0.0650
no (needs estimator)
θ
articulation angle
−0.1258
no (needs estimator)
ψ1
heading vs. lane
1.2819
yes (LiDAR wall fit)
y
lateral offset from lane
0.5000
yes (LiDAR wall fit)
TABLE III: Where each LQR gain acts, and whether the state it multiplies is directly measurable on the tow vehicle. Gains solved at the V=8.6 m/s design speed.
Fig. 10: Articulation angle and lateral position at 8.6 m/s in the destabilized configuration, with the LQR active (solid) and with no controller (dashed), both released from a 5 degree initial articulation angle. At 105 percent of this configuration’s 5.4 m/s critical speed the uncontrolled articulation angle diverges to about 17 degrees by 10 s, while the controlled response settles within about a second and the lateral position stays flat.
Fig. 11: Commanded steering angle against time under full-state LQR feedback at 8.6 m/s. Peak demand is about 0.77 degrees and the input decays to zero within about 1.5 s.
Mode
Open loop
Closed loop ( u=−Kx )
lane integrators
0,0
−2.794±3.678j
sway pair
+0.139±9.339j
−19.068±17.067j
fast real #1
−9.307
−9.824
fast real #2
−28.626
−22.403
TABLE IV: Open-loop vs. closed-loop poles of the six-state destabilized configuration at the V=8.6 m/s design speed. Modes are paired by continuity along A−tBK as t runs from 0 to 1.
Fig. 12: Articulation angle, true against Kalman-estimated, under tractor-only sensing at 8.6 m/s. The estimate overshoots to about 7.9 degrees during the first 0.15 s while the filter has no information, then converges.
Fig. 13: Trailer yaw rate, true against Kalman-estimated, under tractor-only sensing at 8.6 m/s. The estimate tracks the 0.68 rad/s peak to within about two percent and lags slightly on the return.
Process noise W
Measurement noise Vn
State
Value
Measurement
Value
v1
4.32×10−4
v1
5.74×10−3
r1
8.0×10−5
r1
4.29×10−4
r2
8.9×10−5
ψ1
8.54×10−4
θ
48.26 †
y
1.17×10−3 †
ψ1
6.0×10−5
TABLE V: Final tuned noise covariances from the bounded Nelder–Mead search at the V=8.6 m/s design speed. Search bounds were e−10 to e5 on every diagonal entry. Entries marked † finished against a search bound.
Fig. 14: All six states, true (black) against estimated (red dashed), under LQG with tractor-only sensing at 8.6 m/s. The top row and bottom row are directly measured; the middle row, trailer yaw rate and articulation angle, is reconstructed by the filter.
Fig. 15: Estimation error x−x^ for all six states at 8.6 m/s. The four measured states and the articulation angle collapse within about a second; the trailer yaw-rate error carries a long tail that is still visible at 10 s.
Fig. 16: Commanded steering angle under LQG (estimated-state) feedback at 8.6 m/s. Peak demand is about 0.96 degrees against 0.77 degrees for full-state feedback, and the initial chatter reflects the estimator transient rather than vehicle dynamics.
Fig. 17: LQG run at 8.6 m/s compared against full-state LQR and the uncontrolled system, all released from the same 5 degree initial articulation angle. Estimated-state feedback is nearly indistinguishable from full-state feedback in both the response and the steering command, while the uncontrolled articulation angle diverges past 17 degrees.
Metric
PD wall follower
Six-state LQR
Mean of means sway amplitude (deg)
12.505±0.015
N/A
Mean max sway amplitude (deg)
14.450±0.082
4.356±0.000
Mean 5% settling time (s)
N/A
2.948±0.100
Integral squared error (deg 2 /s)
1459.238±8.392
11.058±0.007
TABLE VI: MuJoCo results at 2.96 m/s, four runs per controller, reported as mean ± standard deviation. Mean-of-means amplitude was recorded only for the PD runs and settling time only for the LQR runs, hence the two empty cells. The LQR reduces peak sway by 70% and integral squared error by more than two orders of magnitude.
Fig. 18: Commanded steering angle in the MuJoCo LQR run, with the ±35 degree mechanical limit shown dashed. The square steps before t=7 s are the imposed swerve disturbance; the controller engages after it, spikes once to about −26 degrees, and then holds near zero.
Fig. 19: Tow-vehicle lateral acceleration (left axis) and yaw acceleration (right axis) through the MuJoCo LQR run, taken from the car IMU. Both are large through the disturbance and recovery and fall to a small residual ripple once the trailer is back in line.
Fig. 20: Eight-panel MuJoCo run under PD wall-following control at 2.96 m/s with cargo 3.5 kg placed 0.040 m behind the trailer axle, following a 0.1 rad swerve disturbance. The hitch oscillation does not decay: it grows out of the disturbance and holds a limit cycle of about ±12 degrees for the rest of the run, with the tow vehicle swinging ±35 degrees against the road and crossing the full width of the lane on every cycle.
Fig. 21: Eight-panel MuJoCo run under six-state LQR control at 2.96 m/s with cargo 3.5 kg placed 0.040 m behind the trailer axle, following a 0.1 rad swerve disturbance. Peak hitch yaw is 4.3 degrees and both the hitch angle and the lane offset return to zero within about 2 s of the disturbance ending.
This paper presents a scalable lateral control framework for robust path tracking of single-body and articulated autonomous vehicles at high speeds. A clothoid-based controller is extended with three key adaptations: 1) an integrated tangential check and Frechet distance method for optimized lookahead and oscillation mitigation; 2) real-time trajectory segment classification for dynamic adjustment of the lookahead search range; and 3) a dual-adaptive, rate-controlled lookahead mechanism responsive to cross-track error and upcoming path geometry. To support different vehicle configurations, the framework also incorporates flexible tracking point selection and curvature-to-steering lookup tables, enabling control of points such as the tractor rear axle, hitch point, or trailer-related locations without changing the core control architecture. The controller is evaluated using high-fidelity TruckSim and Simulink simulations for both standalone and articulated vehicles across dual lane changes and winding-road scenarios. Results demonstrate stable high-speed path tracking, reduced oscillations, effective lookahead adaptation, low cross-track errors, and acceptable lateral acceleration across different vehicle configurations. The results support the use of a unified lateral control architecture that can scale from single-body to articulated autonomous vehicles.
Aashish Shaju, Steve Southward, Mehdi Ahmadian
Center for Vehicle Systems and Safety (CVeSS), Virginia Tech, Blacksburg, VA 24060, USA
Fully autonomous tractor-trailer systems are increasingly deployed in logistics, agriculture, and industrial environments, where precise and robust path-tracking capabilities are essential. However, the articulation between the tractor and the trailer introduces additional nonlinearities and significantly complicates lateral and longitudinal control, particularly during reversing maneuvers. This paper introduces a novel path-tracking algorithm specifically designed for articulated vehicles with a single trailer. The proposed method combines a lateral control law applied at the trailer level with a short-horizon predictive adjustment of the tractor steering angle, ensuring stable convergence toward the desired path in both forward and backward motion. The approach is geometry-based and requires no per-vehicle calibration or training. Simulation studies in a high-fidelity physics simulator show steady-state or final lateral errors of 0.02--0.05m on straight-line, circular, and reverse docking trajectories, which is of the same order of magnitude as, or lower than, the errors reported in the literature. Real-world experiments on a small-scale tractor--trailer robot, with the whole controller running on a low-cost microcontroller, further confirm the feasibility of the approach, with lateral errors below 13mm during repeated reverse docking maneuvers despite a pose detection latency of about 200~ms.
This study introduces an advanced lateral control strategy for autonomous vehicles using a clothoid-based approach integrated with an adaptive lookahead mechanism. The primary focus is on enhancing lateral stability and path-tracking accuracy through the application of Euler spirals for smooth curvature transitions, thereby reducing passenger discomfort and the risk of vehicle rollover. An innovative aspect of our work is the adaptive adjustment of lookahead distance based on real-time vehicle dynamics and road geometry, which ensures optimal path following under varying conditions. A quasi-feedback control algorithm constructs optimal clothoids at each time step, generating the appropriate steering input. A lead filter compensates for the vehicle's lateral dynamics lag, improving control responsiveness and stability. The effectiveness of the proposed controller is validated through a comprehensive co-simulation using TruckSim and Simulink, demonstrating significant improvements in lateral control performance across diverse driving scenarios. Future directions include scaling the controller for higher-speed applications and further optimization to minimize off-track errors, particularly for articulated vehicles.
Aashish Shaju, Steve Southward, Mehdi Ahmadian
Department of Mechanical Engineering, Virginia Tech, Blacksburg, VA 24061, USA