*4.2. Drift Test Results*

In the test scenario, the test vehicle was controlled to drive on routes <sup>1</sup> –<sup>4</sup> repeatedly using the drift maneuver. Figure 10 shows the sideslip angle and yaw rate (*β* and *r*, respectively) of the vehicle during the simulation. In scenarios <sup>1</sup> and <sup>3</sup> , the vehicle drove in the counterclockwise direction; hence, its body sideslip angle was negative and its yaw rate was positive. Conversely, in scenarios <sup>2</sup> and <sup>4</sup> , the vehicle drove in the clockwise direction with a positive body sideslip angle and a negative yaw rate. The designed NMPC method accurately followed the desired sideslip angle and yaw rate provided by the 3D map.

**Figure 10.** Sideslip angle (*β*) and yaw rate (*r*) of the vehicle during the drift maneuver. The dotted red lines and solid blue lines trace the control-target point of the drift control and the vehicle state, respectively.

As shown in Figure 11, the front tire slip never exceeded the limit but the rear tire slip did. Therefore, the front-wheel steering controller required a control-force margin to maintain the desired trajectory, whereas the rear-wheel controller successfully maintained the drift condition by following the desired angle and yaw rate.

**Figure 11.** Front and rear tire slip angles of the vehicle during the drift maneuver. The solid blue curves in the upper and lower panels represent the front and rear tire slip angles of the vehicle, respectively, and the dotted red lines show the upper and lower saturation limits of the tires.

Figure 12 shows the driving trajectory of the NMPC-based drift-driving control method. The vehicle precisely followed the figure-eight-shaped target trajectory.

**Figure 12.** Trajectory of the vehicle during the drift-driving simulation.

#### **5. Design of the Neural Network Drift Controller**

The NMPC method predicts a vehicle's behavior up to a predetermined future time and derives the optimal control inputs through numerical optimization with a predesigned cost function. A notable advantage of this method is consideration of the characteristics (dynamics and constraints) during the system optimization. On the downside, accounting for these constraints significantly increases the computational time of the optimization, which is undesirable in fast real-time control applications.

To overcome these limitations while exploiting the advantages of the developed NMPC method, this study employed a DNN-based control method that uses the driving data generated by the NMPC method during drift behavior.

#### *5.1. Training Data Preprocess*

The DNN was trained on approximately 50,000 sets of simulated trajectory-driving data, collected along the 2-m-diameter path in Figure 10 (counterclockwise driving along Path <sup>1</sup> ).

Because the vehicle states, such as vehicle velocity and sideslip angle, have different units and magnitudes, the data were preprocessed by normalizing as follows:

$$\chi\_{norm} = \frac{\mathfrak{x} - \mathfrak{x}\_{min}}{\mathfrak{x}\_{max} - \mathfrak{x}\_{min}},\tag{9}$$

where *x* represents the variable to be normalized and *xmin* and *xmax* represent the minimum and maximum values, respectively, among the sets of variables *x*. To increase the efficiency of the learning process, only data within the normal range were selected. The standard score *z* was thus defined as follows:

$$z = \frac{\mathfrak{x} - \mu}{\sigma},\tag{10}$$

where *μ* and *σ* signify the mean and standard deviation of the data, respectively.

If the absolute value of the Z score exceeded 2, the datum was excluded from the training data because it was outside the normal range of 95% probability. In this process, the data were assumed to follow a Gaussian distribution. The data normalization results are shown in Tables 2 and 3.


**Table 2.** Training data for steering (lateral) control.

\* Longitudinal position error with respect to the reference point; † Lateral position error with respect to the reference point; <sup>o</sup> Sideslip angle equilibrium point.


**Table 3.** Training data for steering (longitudinal) control.

\* Vehicle's rear-wheel speed.

As an example, Figure 13 presents the data before and after normalizing the sideslip angle. The data were distributed in the range of −0.48–0.43 before normalization (left panel) and the range 0 to 1 after normalization (right panel).

**Figure 13.** Results of preprocessing the training data of sideslip angle.

*5.2. Neural-Network-Based Controller Architecture*

The control system architecture includes two NN controllers (Figure 14). The first NN controller, based on a DNN, controls the steering wheel to drive the vehicle along the

desired trajectory during a drift maneuver. The second NN controller, based on a time delay NN (TDNN), maintains the drift state of the vehicle.

**Figure 14.** Neural-network-based drift control system.

5.2.1. Deep Neural-Network-Based Controller for Steering Control

A typical NN comprises an input layer, one or more hidden layers, and an output layer. To include the characteristics of the system and prevent unstable behavior due to external disturbances [26,27], the present study employed a DNN with six hidden layers. Each of the six hidden layers was configured with 20 artificial neural nodes as shown in Figure 15. The input data of the network (Table 2) include the position error (*xe*, *ye*) between the path point and the vehicle, the body slip angle (*β*), and the body slip-angle equilibrium point (*βeq*) generated from the 3D map. The network outputs the vehicle steering angle (δ) for lateral position control.

**Figure 15.** Deep neural network architecture for lateral positioning control.

#### 5.2.2. Time Delay Neural-Network-Based Controller for Drift State Control

The designed NMPC method for maintaining the drift equilibrium states was replaced with a TDNN-based controller. To include the dynamic characteristics of the vehicle during the drift maneuver, the network structure must reflect the near-past vehicle states. The TDNN structure inputs the current data and the data of the past four steps (*t*, *t*−1, *t*−2, *t*−3, and *t*−4) as follows:

$$\begin{aligned} \text{Current states}: \ X^t &= \left[ v\_{x'}^t, v\_{y'}^t \beta^t, r^t \right], \\\\ \text{Previous states}: \ X^{t-1} &= \left[ v\_x^{t-1}, v\_y^{t-1}, \beta^{t-1}, r^{t-1} \right], \\\\ &\vdots \\\\ \text{X}^{t-4} &= \left[ v\_x^{t-4}, v\_y^{t-4}, \beta^{t-4}, r^{t-4} \right], \\\\ \text{Input Data}: \ I &= \left[ X^t, X^{t-1}, X^{t-2}, X^{t-3}, X^{t-4} \right], \end{aligned} \tag{12}$$

where the number of time delay steps was set to 4. The TDNN-based drift controller (Figure 16) contains six hidden layers, each holding 20 artificial neural nodes.

**Figure 16.** Time delay neural network architecture for drift state control.

The TDNN inputs were the longitudinal and lateral speeds (*vx*, *vy*), body slip angle (*β*), and rotation angular speed (*r*) in Table 3 and the output was the rear-wheel speed (*vw*). The DNN was trained on ~50,000 sets of simulation data obtained from the trajectory-driving data (counterclockwise driving around the 2-m-diameter path; see <sup>1</sup> in Figure 10).

#### **6. Simulation Results of the Neural Network Drift Controller**

The performance of the DNN-based drift control method was evaluated through numerical simulations of a 1:10-scale vehicle driving counterclockwise around a 1-m-radius circle. In this scenario, the vehicle speed was set to 1.7 m/s.

Figure 17 shows the sideslip angles of the front and rear wheels during the drift maneuver. The lateral slip of the front tire did not exceed the saturation limit, whereas the lateral slip of the rear tire exceeded the saturation limit while maintaining the drift condition, allowing the rapid increase of yaw rate that is necessary for following the 1-m-radius circular path. The same phenomenon was observed during the closed-loop simulation using NMPC.

Figure 18 plots the vehicle states during the drift maneuver. Although the TDNNbased rear-wheel controller did not explicitly use the 3D map information of the vehicle equilibrium states, the desired equilibrium points are also plotted as a reference.

**Figure 17.** Front and rear tire slip angles during the drift maneuver. The solid blue lines in the upper and lower panels present the slip angles of the front and rear wheels, respectively, and the dotted red line shows the tire saturation threshold.

**Figure 18.** Vehicle states during a drift maneuver (solid blue lines). The desired equilibrium points (dotted red lines) are plotted for reference.

The vehicle's states accurately followed the desired equilibrium states of the body sideslip angle, yaw rate, and longitudinal velocity, even though the TDNN-based controller does not explicitly have information related to the 3D map. It was concluded that the closed-loop trajectory data generated by the NMPC implicitly included information on the drift equilibrium states, which was transferred to the TDNN-based controller during the learning process.

Figures 19 and 20 display the closed-loop trajectory of the vehicle controlled by the TDNN and the tracking errors, respectively. The mean lateral position error remained at ~0.06 m during the drift maneuver. The designed DNN-based steering controller accurately followed the desired trajectory.

**Figure 19.** Vehicle trajectory during the drift maneuver.

**Figure 20.** Lateral position error during the drift maneuver.

## **7. Conclusions**

In this study, a drift control method for autonomous vehicles was developed as a strategy for managing a dangerous oversteer phenomenon that may occur during driving. First, a NMPC-based drift controller was designed by analyzing the tire model and vehicle dynamics during the drift maneuver. The closed-loop performance of the developed NMPC method was evaluated through numerical simulations of figure-eight-shaped vehicle trajectories with different radii.

Second, a data-driven NN-based control method was employed to overcome the limitations of the real-time performance of the existing NMPC-based drift controller. The DNN- and TDNN-based controllers incorporated the closed-loop performance of the previously designed NMPC method by learning the trajectories and input data obtained from the simulations. The performance of the developed data-driven controller was further verified through realistic numerical simulations, which confirmed the accurate tracking performance of the vehicle along a circular path.

Based on the study results, the proposed data-driven control method has the potential to be used as a controller for autonomous vehicles. The method retains the advantages of the sophisticated model-based NMPC approach for managing expert driving techniques such as drift. In addition, it can learn expert driving skills from a broad range of user data, potentially overcoming the limitations of the current rule-based autonomous driving system.

**Author Contributions:** Conceptualization, T.L., D.S. and J.L.; methodology, T.L.; software, T.L., D.S. and J.L.; validation D.S. and J.L.; formal analysis, T.L. and D.S.; investigation, D.S. and J.L.; resources, D.S., data curation, J.L.; writing—original draft preparation, T.L., D.S., J.L. and Y.K.; writing—review and editing, T.L., D.S. and J.L.; visualization, T.L.; supervision, Y.K.; project administration, Y.K.; funding acquisition, Y.K. All authors have read and agreed to the published version of the manuscript.

**Funding:** This study was supported by the Basic Science Research Program through the National Research Foundation of Korea funded by the Ministry of Education, Science and Technology (NRF2021R1A2C2003254) and the Korea Institute for Advancement of Technology(KIAT) grant funded by the Korea Government(MOTIE) (P0020536, HRD Program for Industrial Innovation).

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**

