Modeling and Control for Dynamic Drifting Trajectories

Drifting, or cornering with rear tires that exceed slip limits, represents a trade-off of stability for controllability while operating at the limits of friction. Recent work has demonstrated exceptional performance by autonomous systems of stabilization and path tracking a vehicle around an unstable drifting equilibrium. However, safely navigating unexpected or challenging road conditions that require an autonomous vehicle to operate at the limits of friction is likely to require dynamic, non-equilibrium maneuvers. These trajectories activate underlying dynamics, such as weight transfer and wheelspeed, which significantly affect the forces acting on the vehicle. In this paper, we present a modeling and control framework for dynamic drifting trajectories. First, a novel vehicle model is proposed that strikes an appropriate balance of fidelity and complexity. Then, this vehicle model is embedded into a Nonlinear Model Predictive Control policy that can maintain stability and path tracking while performing dynamic drifting maneuvers. This work is validated experimentally using “Takumi”, an autonomous Toyota Supra, that demonstrates root mean squared path tracking error of 13 centimeters and a peak error of just 47 cm. Finally, a simulation study suggests parameter uncertainty, rather than additional model fidelity, is the primary limitation of further increasing controller performance.


Modeling and Control for Dynamic Drifting Trajectories
Trey P. Weber and J. Christian Gerdes , Member, IEEE Abstract-Drifting, or cornering with rear tires that exceed slip limits, represents a trade-off of stability for controllability while operating at the limits of friction.Recent work has demonstrated exceptional performance by autonomous systems of stabilization and path tracking a vehicle around an unstable drifting equilibrium.However, safely navigating unexpected or challenging road conditions that require an autonomous vehicle to operate at the limits of friction is likely to require dynamic, non-equilibrium maneuvers.These trajectories activate underlying dynamics, such as weight transfer and wheelspeed, which significantly affect the forces acting on the vehicle.In this paper, we present a modeling and control framework for dynamic drifting trajectories.First, a novel vehicle model is proposed that strikes an appropriate balance of fidelity and complexity.Then, this vehicle model is embedded into a Nonlinear Model Predictive Control policy that can maintain stability and path tracking while performing dynamic drifting maneuvers.This work is validated experimentally using "Takumi", an autonomous Toyota Supra, that demonstrates root mean squared path tracking error of 13 centimeters and a peak error of just 47 cm.Finally, a simulation study suggests parameter uncertainty, rather than additional model fidelity, is the primary limitation of further increasing controller performance.
Index Terms-Autonomous vehicles, control and optimization, drifting, nonlinear model predictive control, vehicle dynamics.

I. INTRODUCTION
P ASSENGER vehicles are conventionally designed to un- dersteer at the limit of handling.While cornering with maximum lateral acceleration, the front tires tend to reach the friction limit before the rear.This means the vehicle's rotational dynamics remain predictable and stable -but at the expense of controllability.When the front tires are friction saturated, additional steering input can no longer alter the vehicle's trajectory [1].In contrast, limit oversteer -cornering with rear tires at the friction limit -offers the opposite trade-off.The vehicle maintains controllability despite operating at the saturation limit of the rear tires, but the rotational dynamics become unstable [2].However, in this region of the state space unstable equilibria exist that the vehicle can operate around [3].This is the foundation of the sport of drifting -a cornering technique that involves deliberately oversteering and then countersteering so that the vehicle maintains a large sideslip angle.A skilled driver can exploit the stability-controllability tradeoff and perform agile maneuvers despite operating at the friction limit.Gray et al. demonstrated that drifting maneuvers, particularly in lower friction environments, have the potential to increase autonomous vehicle safety [4].The authors implemented a hierarchical control framework with a motion primitive path planner for obstacle avoidance.In some scenarios, an obstacle could not be avoided without performing a drifting (limit oversteering) maneuver.Zhao et al. took this idea even further by justifying the use of emergency drifting maneuvers for autonomous vehicles [5].By considering backward reachability of collision objects, the authors developed an architecture that determines when it's absolutely necessary to switch from a baseline controller to a "beyond-the-limit" controller to avoid obstacles.
Recently, stabilization of an autonomous vehicle (AV) around a drifting equilibrium has been explored extensively.The potential to maintain stability despite rear tire force saturationand even track a desired path while doing so -has important implications for safety systems of AVs.Velenis et al. stabilized a drifting vehicle using a linear controller that coordinates steering and drive inputs, and validated it in high fidelity simulation [6].Hindiyeh and Gerdes achieved sustained, robust drifts of a full scale test vehicle using a sliding surface controller [7].Several approaches have even managed to track a path in addition to maintaining stability.Goh and Gerdes followed a circular path while stabilizing a drift equilibrium in a full scale electric test vehicle [8].The controller achieved sideslip angles as large as 45°and tracked a desired path within 0.4 meters.Peterson et al. achieved even smaller path tracking error using a linear quadratic regulator and constant speed assumptions [9].But limiting autonomous drifting to states around equilibria significantly restricts the potential applications to safety systems for an AV.Controlling an AV around dynamic, non-equilibrium drifting trajectories could allow it to adeptly handle an emergency scenario such as maneuvering around obstacles or quickly changing directions, despite operating against the friction limit.
Dynamic drifting trajectories, characterized by rear tire force saturation, large sideslip angles, and non-zero (often large) state derivatives, are fundamentally more difficult for the controller to track.This is because they require the vehicle to operate against actuation limits and excite dynamics that would otherwise be dormant and neglected near an equilibrium.However, some approaches have been successful in following such trajectories with an autonomous vehicle.Goh developed a control policy that regulates the rotation rate of the vehicle's velocity vector for path tracking and yaw acceleration for sideslip stabilization [10].This controller executed dynamic "Figure 8" trajectories with about 1.5 meters of path tracking error in a full-scale electric test vehicle.Goh utilized online parameter estimation for the front cornering stiffness and rear tire friction, which varied by up to 44% and 19%, respectively, from their nominal values.This parameter variation potentially reflects the excitation of unmodeled dynamics such as weight transfer.Goel also performed "Figure 8" trajectories using the same electric test vehicle but using optimal control techniques [11].This approach achieved a path tracking error of about 0.7 meters by using front brakes as an additional actuator.However, the author specifically notes the lack of a weight transfer model as a limitation of their approach and a primary direction for future work.
To harness the full potential of dynamic, non-equilibrium drifting trajectories, these modeling elements need to be addressed.Weight transfer is a well-studied phenomenon in more orthodox vehicle applications, such as while trail-braking during a cornering maneuver [12], but has not been extensively studied for drifting.Furthermore, it is well documented that tire parameters such as cornering stiffness and friction coefficient are a function of the normal load of the tire, creating a complex coupling between tire forces and weight transfer [13], [14].Wheelspeed dynamics also play an important role in determining the forces acting on the driven axle while drifting.Considering the velocity vector of the rear tire contact patch using wheelspeed is critical in achieving accurate desired forces while drifting [10].Wheelspeed dynamics encode the physical limitations on how quickly the rear tire forces can be changed, which is a limiting factor in performing transient drifting maneuvers.Accounting for these dynamics crucially allows us to select a control policy that anticipates the vehicle's behavior during a transient maneuver, rather than reacting to parameter variation or model mismatch.
In this paper, we present the first combination of dynamic model and controller capable of leveraging drifting to execute highly dynamic maneuvers at a level of precision necessary for collision avoidance without relying on additional actuation.This involves extending previous models to explicitly include wheelspeed and dynamic longitudinal load transfer.Furthermore, we present some evidence that the residual tracking error with this approach lies within that expected from reasonable parameter variation, suggesting that this level of modeling complexity is not only necessary but potentially sufficient for control.
This paper is structured as follows: in Section II we describe the vehicle model developed for this work.Section III details the NMPC formulation that allows us to embed the vehicle model directly in the high-level control policy.Then, Section IV introduces Takumi, the full scale vehicle testing platform used in this work.Section V presents simulations and real world experiments to validate the vehicle model and controller before presenting results for dynamic drifting trajectories in Section VI.Finally, in Section VII we discuss the convergence of the NMPC optimization, compare our approach with the state-of-the-art, and present a simulation study on tire parameter uncertainty before concluding remarks in Section VIII.I.

A. Single Track Vehicle Model
The vehicle is modeled as a rigid body, with the tires on each axle lumped together as seen in Fig. 1.Variable definitions and parameter values for the vehicle model are listed in Table I.The rate of change of the vehicle's yaw rate, velocity, and sideslip can then be derived using Newton's Laws: Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
To place the vehicle's center of mass relative to the reference path, the following path coordinates are used: [s, e, Δφ].The rate of change of these path coordinates can be written as follows:

B. Weight Transfer Dynamics
Dynamic weight transfer has a large influence on vehicle design.For example, performance oriented vehicles are generally rear wheel drive to take advantage of the rearward shift in normal load under acceleration.And for most vehicles, brakes are larger on the front axle to take advantage of the additional weight borne by those tires under braking.
Fig. 2 illustrates a drifting vehicle in two configurations: −55°a nd −25°of sideslip angle, which represents the sideslip range demonstrated later in this paper.Because drifting is a cornering technique, the vehicle has a large centripetal acceleration even when speed is constant.Due to larger sideslip angles than while conventionally cornering, this acceleration vector is pointed towards the front of the vehicle, causing a significant amount of weight to shift to the rear axle.
Longitudinal weight transfer has an important effect on the vehicle dynamics at the limit of friction.The yaw dynamics are particularly sensitive.Any longitudinal load transfer changes the total force capacity of each axle and their ability to balance the total yaw moment.In contrast, lateral weight transfer has a minimal effect on the total axle forces (i.e.F yF , F yR , or F xR in Fig. 1) and the net moment due to a difference in coaxial forces is relatively small.Capturing the effect of lateral weight transfer presents a significant increase in model complexity.Considering four tires independently requires more vehicle states, more complicated dynamics, and twice the number of tire parameters.As demonstrated later in Section VII, dynamic drifting maneuvers have a sensitivity to tire parameter variation.Using a model that requires more parameters could amplify this effect.Finally, the controller presented in Section III relies on computing a nonlinear optimization problem online, which motivates developing a vehicle model that strikes an appropriate balance of complexity and fidelity.For these reasons, we only model weight transfer along the longitudinal axis of the vehicle.
We model the normal load at each axle using first order dynamics similar to Subosits [15], such that the load transfer states asymptotically approach their steady-state values due to the forces acting at each axle.
The normal force acting at each axle is then:

C. Rear Wheelspeed Dynamics
While drifting, the vehicle's rear axle operates at the friction limit which creates a coupling between lateral and longitudinal tire forces.Increasing F xR reduces F yR , and vice versa, because the tire contact patch can only generate a total force of μF zR .This means that opening the throttle, which for conventional driving only affects the longitudinal dynamics of the vehicle, also has a significant effect on the yaw rate and sideslip angle.
In order to perform dynamic drifting maneuvers, rear wheelspeed is used to quickly rotate the rear tire force vector between the lateral and longitudinal directions.To capture the physical limitations on how fast this vector can be rotated, the rate of change of the rear axle wheelspeed is modeled as a function of applied torque.These dynamics are found by performing a moment balance on the rear axle:

D. Tire Models
For the front tire, the force-slip relationship is represented using a brush tire model that assumes purely lateral slip [16].The front slip angle is calculated using the single track vehicle kinematics as follows: The lateral front tire force is then defined using: where C α is the cornering stiffness, α slide = tan −1 ( 3F y,max C α ), and F y,max = μF z , because the total force available is related only to friction and normal load when there is no longitudinal braking force applied.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
The combined effects of large lateral and longitudinal rear tire slip are captured with a coupled-slip tire model [14].The rear slip angle and slip ratio are computed as follows: Then, the rear tire forces are defined as:

E. Modified Tire Model Parameters
Below the limits of friction, cornering stiffness determines the sensitivity of lateral tire force to slip angle.Normal load has a strong effect on cornering stiffness.This effect is approximated as affine in a region around nominal operating conditions similar to Pacejka [14]: We use a similar approach for the rear friction coefficient:

III. NONLINEAR MODEL PREDICTIVE CONTROL
Performing dynamic drifting maneuvers requires the vehicle to operate in an unstable region of the state space, close to actuator limitations, and balance multiple objectives.This problem is well suited for Nonlinear Model Predictive Control (NMPC).NMPC can consider nonlinear dynamics, reason about actuator constraints, and can be used for trajectory following.Due to the receding horizon nature of this control strategy and the ability to directly embed our vehicle model, NMPC enables us to consider how control inputs will affect state evolution over future time-steps and track complex trajectories.
In the following section, we detail the setup of the NMPC problem.First we discretize our dynamic vehicle model from Section II into equality constraints, ensuring trajectories computed by NMPC are dynamically feasible with respect to our model.Then we describe the cost function which embeds the state tracking objective and the input constraints which describe the actuator limitations of the vehicle.
The NMPC algorithm is implemented using CasADi -an open source tool for nonlinear optimization and algorithmic differentiation [17].We utilize an interior point optimizer (IPOPT) as the solver and use Robot Operating System (ROS) to manage timing between function calls to the NMPC algorithm and sending actuator commands to the vehicle [18], [19].A block diagram for the overall NMPC structure can be seen in Fig. 3.

A. Dynamics Constraints
Gathering the dynamic equations from Section II, our state vector is x = [r, V, β, s, e, Δφ, ω R , ΔF z , δ, τ] T and input vector is u = [ δ, τ ] T .Modeling inputs as the rate of change of our actuators allows us to constrain and cost the actuator slew rates directly.For the dynamic constraints that link each stage of our time-horizon, we convert to a spatial coordinate system of our path distance variable s.This is a convenient way to formulate the drifting problem, as it allows us to cost our deviation from any reference states with respect to distance along the desired path, rather than time.
The state horizon is integrated trapezoidally: Finally, for a uniformly spaced horizon of N stages, the dynamic equality constraints for the optimization problem can be written as:

B. Cost Function and Actuator Constraints
Before formulating the cost function, reference states are subtracted and the quantity is normalized with a maximum desired value.Reference states are computed by taking the current measured s position and interpolating from a predefined desired path.This serves two purposes: it makes cost function weight tuning more intuitive and when gradients are scaled appropriately, the optimization algorithm (IPOPT) will converge Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply. faster.
where e *,max is the maximum desired deviation from reference for that state variable.The objective function is formulated as quadratic in state and input vectors and summed along the horizon: and the Q and R matrices are diagonal: Relatively large costs are put on tracking the desired path (k e ) and desired sideslip angle (k β ).A small cost on rear wheelspeed (k ω R ) encourages the controller to operate close to the equilibrium wheelspeed and use steering for any small corrections, while k Δφ improves damping in the lateral path tracking state.Finally, a very small cost on yaw rate (k r ) aids in convergence time of the nonlinear optimization, while not overly restricting the controller's ability to use yaw rate to generate sideslip angle.
Costs on actuator slew rates (k δ and k τ ) help ensure a smooth closed-loop response.
The terminal cost matrix Q term incentivizes the NMPC to plan trajectories that are continuously feasible.In addition to the dynamic state constraints in Section III-A, actuator limitations are imposed on steering, steering rate of change, wheel torque, and wheel torque rate of change.
The resulting optimization problem is: where the actuator limitations in (35)-(38) come from the physical specifications of the vehicle, and x initial comes from a delay compensation scheme that projects the measured state forward in time by the nominal NMPC solve time, similar to Brown and Gerdes [20].
The controller runs at a nominal rate of 50 Hz and is implemented on the drifting platform described in the following section.

C. Horizon Selection
The length of the NMPC horizon (30 meters) was selected so that the NMPC can plan through the entire dynamic drifting maneuver performed in Section VI (∼20 meters).
Previous work has shown 50 ms to be an adequate integration time for vehicle dynamics [21].Specifically, for NMPC at the friction limits, Brown and Gerdes compared a variety of integration methods and sampling times [20].A 50 ms sampling time using second order Runge-Kutta integration was found to perform very well and with reasonable computation time.For this work, Δs was selected as 0.5 meters to correspond to a sampling time of approximately 50 ms for the trajectories performed (velocity of ∼10 m/s).

IV. TAKUMI: A PURPOSE-BUILT TOYOTA SUPRA DRIFTING PLATFORM
Takumi is a fifth-generation Toyota Supra prototype vehicle that has been heavily modified to become an autonomous drifting platform (Fig. 4).Autonomous experiments are performed with a driver behind the wheel for safety.However, data in this work is recorded while the safety driver is not in control of any actuators.

A. Powertrain
Takumi is powered by a BMW B58 inline 6 cylinder engine with an aftermarket BorgWarner turbocharger.A 6-speed Samsonas sequential transmission and OS Giken limited slip differential deliver power to the rear wheels.Takumi produces 526 HP and 536 ft-lbs of torque @ 6450 rpm.

B. Actuation
Takumi's steering system has been modified with a Nanotech drive motor, Sendix F3668 optical CAN encoder, and Wisefab Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
WFA90 front steering angle suspension kit.Takumi can command +/−42 degrees of steering at the road wheel.A proprietary brake-by-wire system allows for independent braking pressure to be commanded at any of the four wheels.Finally, a Motec M142 ECU provides throttle-by-wire capability.Appendix B details the implementation of the steering and engine low-level control laws.

C. Sensing and Computation
Takumi receives position, heading, velocity, and acceleration measurements from an Oxford Technical Systems RT4003 GNSS/INS with dual GPS antennae.A dSpace MicroAutoBox II real time computer runs a Simulink model of the vehicle.This manages the timing and communication between the various low-level systems on the car -such as the Motec ECU, an auxiliary computer running the NMPC framework, and various sensors.
A custom-built RAVE Linux computer runs the ROS program that interfaces the NMPC framework and the MicroAutoBox via UDP packets sent over ethernet.This computer is equipped with an Intel Xeon 8 core, 3.3 GHz CPU and NVIDIA GeForce RTX 3080 Ti GPU.

V. MODEL VALIDATION
Before testing the vehicle model and controller proposed in Sections II and III for dynamic drifting trajectories, it's important to first assess the validity of this approach.The following section describes simulations and experiments conducted to demonstrate the importance of the additional modeling of weight transfer and wheelspeed dynamics for drifting.
An experiment was designed to excite weight transfer and wheelspeed dynamics and observe the controller's tracking performance.While drifting along a constant radius path of 10 meters, the reference sideslip angle sweeps between −55°and −25°, as depicted in Fig. 2.This sideslip angle range spans the actuation space of Takumi, requiring steering angles as large as −38°.Additionally, it corresponds to a ΔF z range of {916, 1705} N, or about 12% to 23% change of the static normal load of either axle, and a large rear wheelspeed range of {33, 64} radians/second.

A. Simulation Results
We conduct three simulations, using parameters listed in Tables I & II.First, the NMPC controller is simulated using all of the dynamics described in Section II in both the simulator and dynamical constraints of the controller (34).Then, two more simulations are conducted, one without the weight transfer dynamics (8) and one without wheelspeed dynamics (11) in the controller.In Fig. 5 the baseline case (including the full vehicle model in the NMPC controller) tracks the desired reference states closely.Then, omitting the weight transfer model results in increased tracking errors in both the low and high sideslip regions.This matches intuition, as the tire parameters for this simulation were selected using nominal normal loads for a sideslip of −40°.Finally, the simulation omitting wheelspeed  dynamics results in large oscillations in all states as the controller begins to attempt to track the changing sideslip angle reference.This is due to the controller's inherent assumption that the rear tire forces can be changed according to the τ limits in (38) and there is no drivetrain inertia.The simulation results in oscillations that don't decay until the reference sideslip angle no longer changes.

B. Experimental Results
To validate the conclusions drawn from simulation, they are repeated as experiments.These tests were performed using Takumi, the vehicle platform described in Section IV, on a Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.Takumi's tracking performance for velocity, sideslip angle, and lateral path error can be seen in Fig. 6.Takumi achieved RMS errors of 0.1 m/s, 1.7 degrees, and 6.7 cm, respectively, in the baseline (full vehicle model) case.When weight transfer is removed from the vehicle model, there is similar tracking performance in velocity and sideslip angle, but the controller is unable to track the path with the same accuracy (RMS errors of 0.12 m/s, 1.6 degrees, and 25.8 cm, respectively).These two experimental results closely resemble the corresponding simulations in Fig. 5, with respect to trend and magnitude of the state errors.This underlines the significant improvement in controller performance that the vehicle model developed in Section II provides.
By modeling weight transfer and wheelspeed dynamics in the high level tracking controller, Takumi maintains consistent performance despite the redistribution of almost 1 kN of normal force throughout the experiment, verified by an onboard accelerometer in Fig. 7.This weight transfer has a peculiar  effect on the front tire curve in Fig. 8.There is a significant reduction in F yF of ∼20% as slip angle magnitude increases from −8°to −13°.This effect comes from the sensitivity of front cornering stiffness to normal load, as modeled by (20).While front slip angle increases in magnitude, the normal load decreases due to the change in sideslip angle which results in reduction of front cornering stiffness.The net effect is less lateral force.In Fig. 9, tire forces are plotted throughout the experiment.Observed tire forces (computed using the force observer described in Appendix A) are overlaid with the modeled forces with and without weight transfer.While the front cornering stiffness sensitivity causes a large model mismatch in F yF , the rear tire forces (F xR ,F yR ) are less sensitive to the changing normal load.This is because the rear friction sensitivity to weight transfer is small and any change in normal load is distributed between the longitudinal and lateral components of the rear tire force.Additionally, by modeling the time delays of wheelspeed associated with drivetrain inertia, we do not observe any of the oscillations seen in the simulated case of omitting wheelspeed dynamics.By incorporating longitudinal weight transfer and tire parameter sensitivity into a model predictive control policy, changes in normal load and the subsequent effect on the dynamics are anticipated.Longitudinal weight transfer has a dominating effect on the front tire model due to cornering stiffness sensitivity.A direct comparison of a drifting experiment with/without weight transfer dynamics demonstrates an improvement of path tracking RMS error from 25.8 to 6.7 cm (and peak error from 50 cm to 10 cm).Additionally, incorporating wheelspeed dynamics is essential to prevent state oscillations due to rear tire force delays caused by drivetrain inertia.

VI. DYNAMIC TRAJECTORY VALIDATION
The vehicle model and controller are now put the the test of tracking a dynamic "Figure 8" trajectory.This experiment requires Takumi to rapidly transition between −40°and 40°of sideslip angle in just 2 seconds (an overhead view of the path can be seen in Fig. 10).Two such maneuvers are linked together to create a full "Figure 8" trajectory.During each transition maneuver, the trajectory requires Takumi to rapidly vary wheelspeed between 44 and 34 rd/s.The resulting acceleration causes ΔF z to vary between 1400 and 450 N over the same duration.The reference trajectory was computed offline in a fashion similar to Goh [10].

A. Experimental Results
Takumi navigates the "Figure 8" trajectory with ease, successfully stabilizing the vehicle despite rapid changes in sideslip angle and wheelspeed.Throughout the experiment, Takumi achieves RMS errors of 0.24 m/s, 2.4°, and 13 cm in velocity, sideslip angle, and lateral path error (Fig. 11).Peak lateral errors for each dynamic transition maneuver of the trajectory are just 47 and 37 centimeters.
In Fig. 13, modeled forces are overlaid with observed forces during the "Figure 8" experiment.The tire models in Section II perform well, closely matching the observed forces throughout the trajectory.There are small disturbances in F yF and F xR , particularly at s = 260 and 380 meters.These disturbances coincide with peaks in path tracking error in Fig. 11.Once the vehicle departs from the path, the controller encounters a predicament: the velocity vector must be rotated such that the vehicle reduces path tracking error but also maintains the desired  Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
sideslip angle.These competing demands can normally be resolved by assigning a higher cost to tracking the path in the cost function.However, this relationship is not as straightforward during a dynamic drifting trajectory as the vehicle operates near actuation limits and with large yaw rates.Returning to the path too aggressively incurs large costs in other states and risks exceeding stability limits.This behavior was observed empirically.Further increasing the path tracking cost (k e ) begins to induce oscillations in yaw rate, sideslip angle, and velocity.Eventually, Takumi becomes unstable during the transition of the "Figure 8" when the path tracking cost is too large.This suggests that for this control strategy and vehicle model, path tracking performance cannot be further increased without significant trade-offs with stability.
In summary, force disturbances during a dynamic drifting trajectory present complex trade-offs for the controller to navigate.The result in this paper demonstrate the robustness of the NMPC, as disturbances of several thousand Newtons incur less than half a meter of path tracking error, before the controller quickly returns to the path while maintaining stability.In the following section, we discuss the convergence of the NMPC, compare these results with prior work, and suggest limitations on further increasing controller performance.

A. Remarks on NMPC Convergence
Due to the nonlinearity of the vehicle model from Section II, the optimization has no guarantee of convergence.Empirically, the optimization converged reliably at a mean solution time of 18.91 ms during the experiment in Section VI.A possible explanation for this efficiency of the NMPC lies in an analysis performed by Peterson et al. regarding the underlying linear structure of the single track vehicle model [9].Simulations of a linearized vehicle model while drifting matched the full nonlinear dynamics well.The eigenstructure was shown to vary smoothly and consistently even as the linearization point changes.
This characteristic of the single track vehicle model at large sideslip angles could explain why the nonlinear solver IPOPT reliably solves our NMPC problem.While IPOPT relies on a complicated line-search and barrier method, the underlying solver uses Newton's method for each step [18].Applying Newton's method on a linearly-constrained quadratic program has favorable convergence properties.

B. Comparison With Prior Art
The experimental results in Section VI demonstrate that our vehicle model and controller can perform highly dynamic drifting trajectories that exceed the tracking performance of prior work.Goh first achieved dynamic drifting maneuvers using a controller that imposes stable path tracking and sideslip dynamics by inverting a single track vehicle model [10].While similar to the vehicle model described in this work, it does not incorporate wheelspeed dynamics or weight transfer.Goh used online parameter estimators for the front axle cornering stiffness and rear axle friction coefficient, which varied as much as 44% and 19%.Goh's work is a significant achievement -the first demonstration of such maneuvers by an autonomous vehiclebut had about 1.5 meters of path tracking error.This may not be sufficient for the safety system of an autonomous vehicle.Our work builds on Goh's result by modeling the dynamics causing this parameter variation and using a predictive controller that can anticipate these effects, rather than react to them.
Goel demonstrated impressive results for a similar "Figure 8" maneuver by leveraging the same vehicle model as Goh in a Nonlinear Model Predictive Controller and incorporating front brakes as an additional actuator [11].This approach achieved a path tracking error of 0.7 meters for the maneuver.Goel highlighted that the use of front brakes was a significant factor in managing model mismatch, particularly from neglecting longitudinal weight transfer.Additionally, Goel incorporated hard constraints on the magnitude of front lateral force, front braking force, and rear drive force, which may limit the possible range of maneuvers or tracking performance.Goel's call to attention for the need to model longitudinal weight transfer was an important inspiration for our work.To directly quantify this difference, Fig. 6 compares our model with one omitting longitudinal weight transfer.Finally, when applying our model to a dynamic drifting maneuver, the controller achieves a peak tracking error of 47 cm without the use of additional actuation (front brakes).

C. Sensitivity to Parameter Variation
How much further can path tracking error be improved?Is there a control strategy, or additional modeling that can further reduce the tracking error for dynamic drifting trajectories?Potentially, but tracking precision is inherently limited by the certainty of our model parameters, particularly the tires.
Tire friction changes both dynamically and spatially.The large wheelspeeds associated with drifting result in a wide range of rear tire temperatures [22].Due to large slip ratios, tire wear is a factor in determining friction as well.And even in a controlled testing environment, road surface variation occurs.For example, in Fig. 12 Takumi can be observed drifting on an asphalt surface with residual tire rubber from previous experiments.In some areas these markings are much thicker, causing the tire friction coefficient to vary.And while we have assumed a first order longitudinal weight transfer model to address this, other effects such as pitch, roll, suspension dynamics, and lateral weight transfer are neglected.Cornering stiffness, as demonstrated by this work, is sensitive to changes in normal load.It is also a function of temperature and inflation pressure [23].
To understand how parameter uncertainty affects path tracking of dynamic drifting trajectories, we present a simulation study using the "Figure 8" trajectory.In Fig. 14, the NMPC is simulated with mismatches in tire parameters and the results are overlaid with the experimental data from Fig. 11.A tire parameter uncertainty of just 10% yields similar tracking errors to that observed empirically with Takumi.This sensitivity imposes an inherent constraint on tracking performance.
Laurense showed that accurate friction parameters are essential to operate at the true limit of handling for autonomous racing applications, and even a 10% friction estimation error is difficult to achieve [24].When drifting, because the rear tires are constantly at the friction limit, online friction estimation may be feasible.However, this underlines the fundamental limitation of reacting to model variation instead of anticipating it.Although NMPC is effective in planning dynamic drifting maneuvers over a receding horizon, it is still vulnerable to discrepancies in the predicted dynamics due to tire parameter variation.

VIII. CONCLUSION
Using a Nonlinear Model Predictive Control policy, dynamic drifting trajectories are performed using a full scale Toyota Supra test vehicle.By considering weight transfer and wheelspeed evolution over a receding horizon, the controller navigates the trajectory with velocity, sideslip angle, and path tracking RMS errors of 0.24 m/s, 2.4°, and 13 cm respectively and a peak path tracking error of just 47 cm.
Experiments performed with and without weight transfer dynamics in the vehicle model demonstrated a significant difference in performance.A simulation study suggests that parameter uncertainty is the primary limitation to further decreasing path tracking error for transient drifting maneuvers.Advantages of further increasing model fidelity, such as a double track model with lateral weight transfer, therefore could provide diminishing returns at the expense of computational complexity.
This work presents an important step towards safely controlling autonomous vehicles in the presence of rear-tire saturation.Despite operating at the limits of handling and actuation, we achieve unprecedented tracking performance for dynamic drifting trajectories by explicitly considering wheelspeed and weight transfer dynamics.This opens up new possibilities for autonomous vehicles in emergency scenarios, particularly on low friction surfaces.Driving at the rear friction limits to avoid an obstacle or maintain stability does not need to come at the expense of motion planning fidelity.

APPENDIX A TIRE FORCE OBSERVER
The tire force estimation problem is formulated as a linear unknown input observer where forces (F yF , F xR , F yR ) are thought of as unknown inputs to the vehicle.The primary benefit of this method is obtaining observed tire forces while drifting without having to select tire models or tire parameters.Additionally, there's no need to take numerical derivatives of noisy measurement data, which can be problematic.
Since F is unknown, let ẋ be the estimated dynamics.We then write ẋ as the sum of our measured dynamics and a feedback gain (λ) on the difference between our measured and estimated states: where A L denotes a left inverse of A.

APPENDIX B LOW-LEVEL ACTUATOR CONTROL
The autonomous steer and throttle systems rely on low-level control laws to achieve desired actuator commands.Desired steering angle is converted to a current command for the steering motor using a feedback/feedforward policy as follows: where K p and K d are proportional and derivative gains, respectively, and K ff is a constant factor that maps desired front lateral force to feedforward steering motor current.
To achieve desired engine torque, we rely on an intake manifold pressure control law.First, we compute the mass of air in the intake manifold and convert it to a desired manifold pressure and a desired air mass using the ideal gas law and dynamometer data: P man,des = Θ(τ engine ) (48) where R is the ideal gas constant, V man is the volume of the intake manifold, T man is the air temperature, and Θ is a lookup table that maps desired engine torque to desired intake manifold pressure.A feedback control policy is used to control the mass air flow into the intake manifold: ṁin,des = ṁout − K engine (m − m des ) (50) Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

Fig. 1 .
Fig. 1.Single track vehicle model with reference path.Variable definitions are included in TableI.

Fig. 3 .
Fig. 3. Block diagram for the overall NMPC structure.The reference trajectory and measured state from the vehicle are inputs to the NMPC problem.The previously computed control horizon is used to simulate forward the measured state for delay compensation.Steering and torque commands are sent to the vehicle at every time step from the most recently computed control horizon.

Fig. 5 .
Fig. 5. Simulations of a sideslip variation trajectory to excite weight transfer and wheelspeed dynamics.First a baseline simulation with the full vehicle model in the NMPC constraints is conducted.Then, weight transfer and wheelspeed dynamics are removed.

Fig. 6 .
Fig. 6.Vehicle states during the sideslip variation experiment.Data is overlaid from two experiments, one with and one without incorporating longitudinal weight transfer in the vehicle model.From (14), Takumi's rear slip angle can be estimated to be approximately 50°, well past the peak slip angle of the tires.

Fig. 7 .
Fig. 7.Estimated longitudinal weight transfer from Takumi's onboard accelerometer overlaid with the predicted state from NMPC.

Fig. 8 .
Fig. 8. Observed front lateral tire force (see Appendix A) normalized by maximum lateral tire force and plotted against slip angle.Increasing ΔF z corresponds to decreasing normal load on the front axle.

Fig. 9 .
Fig. 9. Modeled forces with and without weight transfer and observed forces for sideslip variation experiment.

Fig. 11 .
Fig. 11.Takumi successfully performs a "Figure 8" experiment, maintaining sideslip stabilization and tracking despite the excitation of wheelspeed and longitudinal weight transfer dynamics.

Fig. 14 .
Fig. 14. "Figure 8" transition is simulated with parameter uncertainty and compared to experimental results from Takumi.
First we convert our vehicle states [r, V, β] to longitudinal and lateral velocity [r, U x = V cos β, U y = V sin β].Now our dynamics are: ẋ = f (x) + A F

Trey P .
Weber received the B.S. degree in mechanical engineering from the University of California, Los Angeles, Los Angeles, CA, USA in 2019, and the M.S. degree in mechanical engineering in 2021 from Stanford University, Stanford, CA, where he is currently working toward the Ph.D. degree in mechanical engineering.He works with the Dynamic Design Lab, where his research focuses on vehicle dynamics, motion planning, and control at the limits of friction.J. Christian Gerdes (Member, IEEE) received the Ph.D. degree from the University of California at Berkeley, Berkeley, CA, USA, in 1996.He is currently a Professor in mechanical engineering with Stanford University, Stanford, CA, and the Director of the Center for Automotive Research with Stanford, Stanford University.His laboratory studies how cars move, how humans drive cars, and how to design future cars that work cooperatively with the driver or drive themselves.When not teaching on campus, he can often be found at the racetrack with students trying out their latest prototypes for the future.