*3.3. Nonlinear Model Predictive Controller System for Drift Driving*

Figure 6 shows the control system of the developed NMPC-based drift control method. First, the curvature (*ρr*) and reference speed (*vr*) of the driving trajectory are provided by a path-generation algorithm. The drift equilibrium state is then obtained from the three-dimensional (3D) maps shown in Figure 7. Given the vehicle speed and steering angle at each time step, the 3D maps are configured to output the equilibrium states, i.e., *βeq*,*req*, and *Fxreq* , based on the equilibrium analysis presented in Section 2.

The drift equilibrium points obtained from the 3D maps were assembled into the target state vector of the NMPC. The rear-wheel speed, *vw*, that allows the vehicle to maintain the drift maneuver was calculated with the developed NMPC algorithm.

While maintaining the drift condition through rear-wheel control using the NMPC, an additional pure pursuit algorithm was used as the steering-angle controller to follow the desired trajectory. Similar to the NMPC, the pure pursuit algorithm inputs the current vehicle position and the target trajectory and computes the steering angle (*δ*) from future time steps *k* to *k* + *N*. Figure 8 illustrates the path-following implementation of the pure pursuit control algorithm.

**Figure 6.** The 1:10-scale nonlinear model predictive control-based drift control system.

**Figure 7.** 3D maps of the equilibrium states of the (**a**) sideslip angle (*β*), (**b**) yaw rate (*r*), and (**c**) rear-wheel force (*Fxr*).

**Figure 8.** Vehicle state during drift driving.

In the pure pursuit control algorithm, the waypoints are determined from the center point of the rear-wheel axis, which is switched to the center point of the vehicle to simplify the control law. Each waypoint is located at distance *l <sup>d</sup>* along the straight line in the direction of the target body's sideslip angle. The vehicle's trajectory over *N* future steps was computed using Equation (1), and the front-wheel steering angles up to *N* future steps were calculated as

$$\begin{split} \delta\_k &= \operatorname{atan} \frac{2L\sin\theta\_k^{c\eta}}{l\_d^{l}} + k\_\beta e\_{\beta\_k} \\ &= \operatorname{atan} \left( \frac{2L\sin\theta\_k}{l\_d^{l}} \right) + k\_\beta \left( \beta\_k^{c\eta} - \beta\_k \right). \end{split} \tag{8}$$

The first term in Equation (8) represents the control input that allows the vehicle to head toward the waypoints, and the second term represents the control input for creating the vehicle's track, i.e., *βeq*. To obtain the future equilibrium states followed by the NMPC, the steering-angle inputs from the pure pursuit control algorithm are applied to the 3D drift equilibrium maps.

#### **4. Drift-Driving Test of the Nonlinear Model Predictive Controller**

#### *4.1. Test Scenario*

The performance of the NMPC-based drift control method was evaluated through numerical simulations. The controller was required to follow 8-shaped trajectories with diameters of2m(<sup>1</sup> and <sup>2</sup> ) and 2.5 m (<sup>3</sup> and <sup>4</sup> ), as shown in Figure 9.

**Figure 9.** Numerical drift test scenarios.

The control period and NMPC prediction period were set to 50 Hz (0.02 s) and 20 steps, respectively. Under these settings, the NMPC system can predict the maneuver for 0.4 s.
