**1. Introduction**

To maximize passenger safety, future autonomous vehicles will be required to operate in various road environments and cope with various emergencies. A common emergency situation is high lateral slippage of the rear wheels on a sharply curved path or an icecovered road, which leads to oversteering (see Figure 1). In such a situation, an autonomous vehicle should be capable of guaranteeing safety.

**Citation:** Lee, T.; Seo, D.; Lee, J.; Kang, Y. Real-Time Drift-Driving Control for an Autonomous Vehicle: Learning from Nonlinear Model Predictive Control via a Deep Neural Network. *Electronics* **2022**, *11*, 2651. https://doi.org/10.3390/ electronics11172651

Academic Editors: Bai Li, Youmin Zhang, Xiaohui Li and Tankut Acarman

Received: 7 July 2022 Accepted: 23 August 2022 Published: 24 August 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

Drift technology (Figure 2) is a vehicle control strategy developed for use in motorsports. This technology enables professional racecar drivers to quickly generate high yaw rates that cannot be achieved with normal steering maneuvers. Such a driving technique requires expert driving skills to handle the vehicle's behavior at its dynamic limit. Additionally, it is also used as a method for maintaining vehicle stability when an unintentional oversteering phenomenon occurs while driving.

**Figure 2.** Drift control maneuver.

Drift control methods for autonomous vehicles have been extensively studied. For example, the University of California, Berkeley [1] and Stanford University [2,3] have been developing drift control methods for several years. However, most existing control methods are based on the drift equilibrium state derived from vehicle dynamics. In particular, methods have been proposed to control a vehicle using a counter-steering maneuver that turns the steering wheel opposite to the turning direction [4,5]. Recent studies have introduced reinforcement learning techniques for developing drift control algorithms [6].

A drift control algorithm based on a nonlinear model predictive control (NMPC) method was also developed, which is a method using real-time numerical optimization to compute the control inputs minimizing the cost function [7,8].

In general, NMPC is based on real-time optimization techniques over a finite future horizon. The NMPC approach has many advantages; for instance, it considers the input and state constraints along with the dynamics during numerical optimization. However, the unpredictable computational time of most numerical optimization algorithms has limited the performance of NMPC in real-time control applications. To overcome this limitation, this study proposes a drift controller based on a deep neural network (DNN) algorithm. The proposed controller learns from data generated using the model predictive control (MPC) technique and demonstrates similar control performance as NMPC while delivering better real-time performance.

With the continued development of algorithms and computing devices, artificial intelligence (AI) is now being applied to various industrial applications. In automated vehicle research, AI advances enhance the integrity and safety of automated vehicle software. AI is also expected to serve as a solution for critical safety scenarios that are difficult to manage with conventional approaches [9,10].

The development of AI techniques that could improve the existing control systems has been addressed in several studies in various contexts. In particular, the performance of existing control systems has been improved by learning the driving from the data, enabling shared control between a driver and an autonomous driving system [11].

Other studies have attempted to increase the online performance of proportional integral derivative controllers by learning through an artificial neural network (ANN) [12–14]. Recently, primal-dual NNs have improved the real-time performance and stability of MPC [15].

Several studies have been conducted to improve the performance of the controller by reducing the uncertainty of the model using an ANN. In particular, the performance of MPC can be significantly improved by learning from real-time data, which provide knowledge of the target model [16–27].

The present study develops an NMPC-based drift control method that accurately tracks the predefined trajectories of an automated vehicle by using an established vehicle model. The developed NMPC-based drift controller is then replaced by a DNN-based controller pretrained on the data generated from the previously designed closed-loop trajectories of the NMPC method.

By replacing the previously designed NMPC method with the proposed DNN-based controller, we avoid the need for complex numerical optimization of the vehicle control, thereby reducing the computational load. The computational time of the DNN-based controller is very small and predictable in general, once the training process is complete. However, the computational cost of the NMPC method is often high and very unpredictable because its optimization problem includes many free variables that must be explored under many constraints. By switching the iterative numerical optimization process with a fixed number of NN computational processes, real-time implementation of the final control algorithm on a cheaper controller platform can be achieved and the real-time performance of the control method can be guaranteed. The new technique is especially advantageous in safety-critical applications such as automated vehicle control [28–31].

The following sections describe the development process. Section 2 analyzes the vehicle dynamics that were used for the NMPC's design, and the simulation is introduced. The vehicle model is based on a 1:10-scaled vehicle (the test platform for future research). Section 3 presents the NMPC design process under which the automated vehicle performs the drift maneuver while following the desired curved trajectories. Section 4 illustrates the closed-loop simulation results of the designed NMPC, and Section 5 presents the design of the DNN-based controller. The research conclusions are presented in Section 6.

#### **2. Vehicle Dynamics Analysis**
