AVEC’18 A Controller for Automated Drifting Along Complex Trajectories Jonathan Y. Goh, T. Goel & J. Christian Gerdes Department of Mechanical Engineering Stanford University, California, USA E-mail: jongoh@stanford.edu Topics/Vehicle Dynamics and Chassis Control The ability to operate beyond the stable handling limits is important for the overall safety and robustness of autonomous vehicles. To that end, this paper describes a controller framework for automated drifting along a complex trajectory. The controller is derived for a generic path, without assuming operation near an equilibrium point. This results in a physically insightful control law: the rotation rate of the vehicle’s velocity vector is used to track the path, while yaw acceleration is used to stabilize sideslip. To accurately achieve these required state derivatives over a broad range of conditions, nonlinear model inversion is used in concert with low-level wheelspeed control. Experiments on a full-scale vehicle demonstrate excellent tracking of a trajectory with varying curvature, speed, and sideslip. 1 INTRODUCTION Traditional vehicle control architectures typically assume inde- pendent lateral/longitudinal control, and stable sideslip dynam- ics. Exceeding a vehicle’s handling limits, however, can lead to both strong input coupling and yaw/sideslip instability, render- ing this simplified approach ineffective. Yet, drivers in profes- sional ‘drifting’ events can achieve precise control over both sideslip and the vehicle’s path, despite operating entirely out- side the vehicle’s stability limits. The development of controllers for automated drifting could extend the usable state-space be- yond these limits, thereby helping ensure that the widest possible range of maneuvers is available to an autonomous vehicle. Early examples in the literature demonstrated stabilization of the vehicle states about a single drift equilibrium, both in simu- lation by Velenis et al. [9], and experiment by Hindiyeh et al. [4]. Because the problem is underactuated with the standard set of in- puts, steering and drive torque, tracking a path in addition to sta- bilizing sideslip is not straightforward. Some recent works have demonstrated this experimentally for simple, constant-curvature circles. The controller by Werling et al. [11] combined sideslip stabilization with tracking a vehicle course, while the formula- tion by Goh et al. [3] explicitly followed a path. However, due to restrictive assumptions in vehicle modelling or controller for- mulation, these approaches cannot be easily extended to more complex trajectories. Throughout the literature, studies of drifting have used a large range of vehicle model fidelity. Two-state single-track models were used by Ono et al. [6] and Voser et al. [10] to discuss the unstable dynamics of drifting. Three-state single- track models with both forces as direct inputs [4] [3], and with explicit modelling of steering and throttle delay [11], have been used for experimentally-verified controller design. And a four wheel model with steady-state weight transfer and wheel- speed/differential dynamics was linearized by Velenis et al. [9] for a Linear Quadratic Regulator. Striking a balance between model accuracy and tractability of the equations of motion is still an open question. Contrasting with these various approaches, this paper presents an automated drifting controller explicitly designed to handle complex trajectories. Sideslip and lateral error from a curvilin- ear path co-ordinate system are chosen as objectives. The de- sired controller dynamics are first derived without assuming a specific vehicle model, or that the vehicle is near an equilibrium point. The resulting control law, expressed in terms of vehicle state derivatives, is surprisingly simple and intuitive. It leverages Figure 1: MARTY during an automated drifting test the decoupling of sideslip and yaw dynamics that occurs when drifting: the rotation rate of the vehicle’s velocity vector is used directly to track the path; then, by yawing the vehicle faster or slower than its velocity vector, we can simultaneously control the sideslip of the vehicle. To realize this control law, a vehicle model is required to map these desired state derivatives to the inputs. Rather than relying on oversimplifying assumptions, nonlinear model inver- sion is used in conjunction with low-level wheelspeed control to achieve good accuracy over the broad range of conditions en- countered in a complex trajectory. Experiments on the full-scale MARTY test vehicle (Figure 1) confirm the effectiveness of the controller on a trajectory with curvature that varies from 1/7 to 1/20m, speed that varies from 25 to 45km/h, and up to -40 of sideslip. 2 VEHICLE MODEL In this section we first introduce the equations of motion for the force-based single-track model in a curvilinear co-ordinate sys- tem; tire force models are then described. 2.1 Equations of Motion 2.1.1 Path Tracking States and Dynamics The vehicle, shown schematically in Figure 2, has three states: yaw rate r, velocity V and sideslip β. To incorporate path track- ing, we introduce several additional states. The vehicle course, φ, is the direction of the vehicle’s velocity vector measured to a fixed inertial frame χ. The dynamics of φ are simply: ˙ φ = ˙ β + r (1) The position of the vehicle is tracked using a curvilinear coordi- nate system relative to the reference trajectory. The lateral error