**1. Introduction**

To achieve the goal of automated driving, classical electronic vehicle dynamics systems are essential to prevent the vehicle from going beyond the limit of handling. Systems such as ABS or ESP can make interventions to keep the vehicle in a safe condition that improves road safety significantly. As stated in [1–3], road traffic crashes are a considerable concern in motorized countries because of their impact on society and the economy. As an evolution, in this paper, the authors introduce a new breed of electronic vehicle dynamics system which, instead of preventing the drift scenario in the case of an emergency situation, it uses it as an optimal cornering method to stabilize the vehicle. Moreover, the proposed method also provides a solution for high-sideslip cornering on varying road surfaces. The performance of autonomous vehicles should be as good as human drivers or better to gain social trust and acknowledgement. Controlling drift scenarios on varying road surfaces proves a high level of controllability even in situations that can be challenging

**Citation:** Czibere, S.; Domina, Á.; Bárdos, Á.; Szalay, Z. Model Predictive Controller Design for Vehicle Motion Control at Handling Limits in Multiple Equilibria on Varying Road Surfaces. *Energies* **2021**, *14*, 6667. https://doi.org/10.3390/ en14206667

Academic Editor: Sheldon Williamson

Received: 6 September 2021 Accepted: 5 October 2021 Published: 14 October 2021

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

**Copyright:** © 2021 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/).

for professional human drivers. The control and better understanding of these kinds of motions can support the more widespread usage of fully automated cars of the future.

In the last decade, the development of fully automated vehicles seems to have been one of the most primary focuses of development for many automobile manufacturers. On the other hand, the control of normal driving scenarios such as in [4–7] have been at the center of their research in most cases. One drawback of these methods is that they are unable to stabilize the vehicle beyond the limit of handling. To improve road safety, automated vehicles should also be capable of performing high-sideslip maneuvers such as drifts.

This manuscript describes drift maneuvers using equilibrium points as stated in [8,9]. It was shown in [10] that a three-state bicycle model with a nonlinear tire model could be used for steady-state drift control design. The three-state bicycle model describes the motion of the vehicle by three state variables, which are the longitudinal velocity, the lateral velocity, and the yaw-rate. Measurements on a real vehicle were taken for adequate model parametrization.

In [11], the advantages, such as more accurate tracking of the desired operating point and a better disturbance rejection capability, of MIMO (multiple-input multiple-output) controllers were stated over SIMO (single-input single-output) approaches. The authors used optimal control to achieve drift maneuvers. An LQR (linear quadratic regulator) controller was designed for this purpose.

A study was conducted in [12], where the authors performed path control at the limit of handling using the state-dependent Riccati equation technique. Their objective was to minimize lateral path-tracking error while tires operate in limit handling. The proposed controller showed robust path-tracking performance even when the rear wheels were operated beyond their friction limits, and large body sideslip prevailed.

A robust, state-feedback control approach was introduced in [13] with uncertain disturbances to maintain drift maneuvers. A 4-DOF nonlinear vehicle dynamics model was established with the so-called UniTire model (for more information, see [14]). The authors performed drift both in steady and in transient states with this approach. It was also concluded that vehicles, which can drive in drift conditions, are considerably safer.

The model predictive control (MPC) scheme is an optimizing control theory that is becoming popular owing to abilities such as handling constraints directly or future prediction in the design process. Nonetheless, MPC is not a common choice in the field of autonomous drifting but more favored in path tracking, as shown in [15]. In that paper, a so-called multilayer MPC was designed. Three path-tracking controllers were used with fixed velocities and with a velocity decision controller. The author pointed out the outstanding performance of the multilayer MPC as an appropriate choice for real-time application in the field of vehicle motion control.

Adaptive cruise control for cut-in scenarios based on MPC was introduced in [16]. The author defined a finite state machine to manage vehicle control in different scenarios. In addition, MPC was used to realize coordinate control of the host vehicle and the cut-in vehicle.

Since the number of actuators that directly control the motion of a vehicle is expected to multiply [17–19], this will open up new possibilities for controlling maneuvers such as drift more precisely. Having proper control of these actuators will allow performing maneuvers that are impossible even for a professional human driver.

The aim of the current article is to perform steady-state drifting in multiple equilibria on varying road surfaces conditions, using the adaptive MPC topology. Whilst multilayer MPC is a cluster of predefined linear controllers with a decision controller, the adaptive MPC proposed by the authors is a more general approach of one controller with a predefined model with an updating strategy, for which successive linearization was chosen.

Controller performance was investigated in a simulation environment in different test cases for which a three-state, one-track model was defined with a nonlinear tire model. It is shown that the developed adaptive MPC is a practical solution for motion control and automated drifting that can handle changing road conditions, model nonlinearities, and actuator constraints. The computational requirement of a nonlinear MPC is high, and the nonlinear optimization problem might not be solved in real time. In this article, the authors use a linear MPC coupled with a quadratic cost function, of which the computational needs can be handled by currently available hardware. The contribution of this paper is twofold. The first contribution is the application of a multilayer MPC for vehicle drift control, as there was previously no research in which MPC was applied. The second contribution is the ability of the proposed controller to handle the change in friction during vehicle drifting. In the other research presented above, the authors applied a fixed constant friction coefficient during vehicle drift in both simulation and measurement. In this paper, the proposed controller can handle the changes in friction without aborting the drift motion, which results in excellent adaptability of the proposed method, and which is also crucial for real-life driving scenarios.

#### **2. Vehicle Modeling and Simulation Setup**

In this section, the vehicle model which served as a basis for the controller design and implementation, as well as for software-in-the-loop (SIL) evaluation of the proposed MPC framework, is presented. For model identification purposes, measurements with a series production coupé sports car were used. A single-track model was built up for both simulations and controller design with a nonlinear tire model.

#### *2.1. Vehicle Modeling*

First and foremost, a vehicle model must be defined for the appropriate controller design and SIL testing. Considering the desired application, high fidelity is required to capture the dynamical behavior of the vehicle; moreover, low computational demand is also necessary to allow embedded application. In this paper, a three-state, two-wheel bicycle model with a nonlinear tire model was chosen for this purpose. It was shown in [10,11,20] that a two-wheel bicycle model can be sufficient for optimal control methods to achieve steady-state self-drifting.

#### 2.1.1. Two-Wheel Planar Vehicle Dynamics

The equations of motion in longitudinal and lateral directions, and the yaw dynamics of the vehicle are presented in differential Equations (1)–(3) based on the Newtonian laws, as described in detail in [21]. Please refer to Appendix A for a better understanding of the applied nomenclature.

$$
\dot{V}\_x = \frac{1}{m}(F\_x - F\_A) + rV\_y. \tag{1}
$$

$$
\dot{V}\_y = \frac{1}{m} F\_y - rV\_\mathbf{x}.\tag{2}
$$

$$
\dot{\sigma} = \frac{1}{I\_z} M\_z. \tag{3}
$$

The longitudinal (Equation (4)) and lateral (Equation (5)) forces, and the yaw torque (Equation (7)) can be derived from the tire forces as described below, along with the air drag (Equation (6)). The yaw torque (7) is applied at the center of gravity (CoG) of the vehicle.

$$F\_{\mathbf{x}} = F\_{\mathbf{x}F}\cos\delta + F\_{\mathbf{x}R} - F\_{\mathbf{y}F}\sin\delta. \tag{4}$$

$$F\_y = F\_{yF}\cos\delta + F\_{yR} + F\_{xF}\sin\delta.\tag{5}$$

$$F\_A = \frac{1}{2} A \,\,\rho \,\,\mathbb{C}\_A \,\, V\_x^2. \tag{6}$$

$$M\_z = aF\_{yF}\cos\delta - bF\_{yR} + aF\_{xF}\sin\delta.\tag{7}$$

The sideslip angle of the front (Equation (8)) and rear (Equation (9)) wheels, and the sideslip angle of the vehicle, which is applied at the center of gravity (Equation (10)), can be calculated in the following way:

$$\alpha\_f = \arctan\left(\frac{V\_y + ar}{V\_x}\right) - \delta\_\prime \tag{8}$$

$$a\_I = \arctan\left(\frac{V\_y - br}{V\_x}\right),\tag{9}$$

$$\beta = \arctan\left(\frac{V\_y}{V\_x}\right). \tag{10}$$

The air drag force *FA* is considered zero in the above equations since the speed of drift results in neglectable air drag. Due to small values, rolling and pitching dynamics are also neglected. Since the test vehicle is rear-wheel-driven, and there is no braking during this specific drift maneuver, *FxF* is considered zero throughout this paper.

#### 2.1.2. Nonlinear Tire Model

The forces in the above-defined equations awaken in the contact patches of the tires. Owing to the complex, heterogeneous structure of pneumatic rubber tires [22], tire models vary in a wide-scaled spectrum regarding their specific application. According to complexity levels, finite element models [23] and empirical models [24] are also widespread in the literature. For achieving a simple, but meaningful tire model for a control-oriented approach, the so-called brush tire model was selected for calculating the lateral tire force.

The equations below can be used for describing the lateral force of the tires in both saturated and unsaturated phases. Saturation refers to the operating range of the tire, where the change in the lateral slip does not affect the generated force. Physically meaningful consideration was derived in [25,26].

For the front tire where no longitudinal forces are considered, the lateral tire force can be calculated on the basis of the following equations, where *αsl* denotes tire sideslip limit where the tires become saturated:

$$F\_{yF} = \begin{cases} -\mathbb{C}\_{aF} \tan(a) + \frac{\mathbb{C}\_{aF} \overline{\cdot}^2}{3\mu F\_{zF}} \tan(a) |\tan(a)| - \frac{\mathbb{C}\_{aF} \overline{\cdot}^3}{2\Im \mu^2 F\_{zF}^2} \tan(a)^3, & |a| \le a\_{sl} \\ -\mu F\_{zF} \text{sgn}(a), & |a| > a\_{sl} \end{cases},\tag{11}$$

$$\alpha\_{sl\\_F} = \arctan\left(\frac{3\mu F\_{zF}}{\mathcal{C}\_{aF}}\right). \tag{12}$$

In the case of the rear tire, a solution must be found to also add the longitudinal forces to the model. A similar approach could be applied that was also used for deriving the lateral forces, although the wheel speeds would appear as additional states in the model. To overcome this matter, the connection between the longitudinal and lateral forces was determined with the friction circle and described by a coupling factor, as suggested in [10]. As stated below, *ξ* determines the amount of lateral force that can be reached directly from the friction.

$$F\_y^{\text{max}} = \zeta \mu F\_{zR}.\tag{13}$$

$$\xi = \frac{\sqrt{\left(\mu F\_{zR}\right)^2 - F\_{xR}^2}}{\mu F\_{zR}}.\tag{14}$$

Accordingly, Equation (11) can be augmented to compute both the lateral and the longitudinal forces for the rear tire.

$$F\_{yR} = \begin{cases} -\mathbb{C}\_{aR} \tan(a) + \frac{\mathbb{C}\_{aR}}{\mathbb{S}\_{\mathbb{S}} \mu\_{zR}} \tan(a) |\tan(a)| - \frac{\mathbb{C}\_{aR} \mathbb{S}^{\mathbb{S}}}{2 \mathbb{T}\_{\mathbb{S}}^{2} \mu^{2} F\_{zR}^{2}} \tan(a)^{\mathbb{S}}, & |a| \le a\_{sl} \\\ -\mathbb{S} \mu F\_{zR} \text{sgn}(a), & |a| > a\_{sl} \end{cases} . \tag{15}$$

$$\varkappa\_{sl\\_R} = \arctan\left(\frac{3\mathfrak{J}\_s^\pi \mu F\_{zR}}{\mathbb{C}\_{aR}}\right). \tag{16}$$

#### *2.2. Model Parameter Identification Measurements*

Model parameter identification was conducted by the authors. The test vehicle, which was used as a source of model parameter identification measurements, possesses a 3.0 L twin-turbocharged straight-six engine. As for the characteristics of the engine, it is able to produce 550 N·<sup>m</sup> torque between 2350 and 5230 RPM and 411 HP (302 kW) between 5230 and 7000 RPM. The test vehicle has a rear-wheel drive and a seven-speed dual-clutch automatic transmission.

The position of the center of gravity, depicted in Figure 1, was determined by measuring the axle weights. As a result, 925 kg was measured on the first axle, and 895 kg was measured on the second axle. Taking the total length of the wheelbase, which is 2.69, the position of the center of gravity is situated 1.37 m far away in front of the second axle.

**Figure 1.** Bicycle model notations used in the equations.

Parameters of the above-defined brush tire model, such as friction coefficients or cornering stiffness, were necessary to identify in advance. For this purpose, the ISO 13674-2 standard was used with ramp steering maneuvers. The measurement was performed from an initial straight line until the vehicle reached a constant velocity of 100 km/h. In the next step, the neutral gear was selected, and a slow, constant velocity ramp was given as an input to the steering wheel. The ZalaZone Dynamical Platform [27] served as a testing ground for the parameter identification. The friction coefficient of its special, dry asphalt was close to 1 in the case of both tires. As a result of the measurements, the cornering stiffness turned out to be 300,000 N/rad for the front tires and 500,000 N/rad for the rear tires [28]. The measured data points and the characteristics of the tires can be seen in Figure 2.

**Figure 2.** The measured tire curves for the front and rear tires.

#### **3. Equilibrium Analysis**

In this study, steady-state drifting cornering is targeted. It occurs in special locations of the state space, where all the state derivatives are equal to zero, called equilibrium points. With this idea in mind, the equilibria of the system must be determined and analyzed for the desired operation.

According to the three-state bicycle model, the state matrix of the system (Equations (1)–(3)) can be written in the form of

$$\mathbf{x} = \begin{bmatrix} V\_y \\ r \\ V\_x \end{bmatrix}'\tag{17}$$

where the states were chosen as the lateral vehicle speed, yaw rate, and longitudinal vehicle speed.

The control inputs were defined as the roadwheel angle and the rear traction force.

$$\mathbf{u} = \begin{bmatrix} \delta \\ F\_{\mathbf{x}\mathbb{R}} \end{bmatrix}. \tag{18}$$

To locate the equilibria of the system, the following algebraic equation system must be satisfied:

$$
\dot{\mathbf{x}} = F(\mathbf{x}^{\text{eq}}, \mathbf{u}^{\text{eq}}) = 0. \tag{19}
$$

It can be deduced that our system is an underactuated system since we have one more state than control input. This yields that not all the state derivatives can be driven to zero from an arbitrary point of the state space. Furthermore, considering all the equations, one can see that we have fewer equations than variables; therefore, we need to choose some variables to be fixed in advance. This observation indicates that only specific locations of the state space are solutions of the equation system. To solve this problem, the velocity is set to 10 *ms* as a known variable, and the steering angle ranged between −35◦ and +35◦ rad with a step size of 2.86◦. Figures 3–5 show the calculated results of Equation (19) with the described parameters.

For controller performance evaluation, three equilibrium points were chosen to be used in the subsequent sections. Parameter values for the test cases are summarized in Table 1.

**Table 1.** Equilibrium points used in the controller evaluation simulations.


**Figure 3.** Equilibrium lateral speeds as a function of roadwheel angle.

**Figure 4.** Equilibrium yaw rates as a function of roadwheel angle.

**Figure 5.** Equilibrium traction forces versus roadwheel angle.

#### **4. Controller Design**

In this section, the formulation of the control problem is stated. As previously discussed in Section 1, a MIMO controller is necessary to achieve the desired performance. In this manuscript, an adaptive MPC was designed for this purpose. The state matrices are updated for solving the quadratic problem (QP) at every time step. Updating the state matrices can provide a better control performance during varying environmental conditions due to the utilization of actual model parameter estimates such as the road grip. Moreover, it allows using our controller in multiple equilibria with only one controller.

Below, a system with *Nx* states and *Nu* inputs is considered. The system can be described by ordinary differential equations as presented in Section 2.1 and written in the form of Equation (20).

$$
\dot{\mathbf{x}} = F(\mathbf{x}, \boldsymbol{\mu}), \ y = z(\mathbf{x}, \boldsymbol{\mu}). \tag{20}
$$

#### *4.1. MPC Formulation*

Model predictive control is an optimizing control theory that uses the discrete model of the system to predict its behavior in the future. MPC calculates a series of inputs to minimize the predefined cost function at every time step (*Ts*). When the cost function is minimized, the first element of the calculated control inputs is applied. Crucial parameters are the prediction horizon *Np* and the control horizon *Nc. Np* defines the capability of the system in terms of how far it can see into the future. The time horizon *Np*,*t*, which corresponds to the prediction horizon *Np* can be written in the following form:

$$N\_{p,t} = N\_p T\_{s,t} \tag{21}$$

where *m* is a positive integer, and *Ts =* 10 ms throughout this paper. *Nc* defines the number of control inputs that can be optimized in one time step. One should carefully set these parameters to see the transient of the system in advance, thereby avoiding unnecessarily high computational needs. The MPC uses full state feedback that minimizes the cost function below.

$$J(k) = \frac{1}{2} \left( \mathfrak{A}^T \stackrel{\leftarrow}{Q}\_{\mathfrak{X}} \mathfrak{X} + \overline{\mathfrak{u}}^T \stackrel{\leftarrow}{R} \mathfrak{X} + \mathfrak{z}^T \stackrel{\leftarrow}{Q}\_{\mathfrak{z}} \mathfrak{z} \right), \tag{22}$$

where *x*ˆ is the stacked vector of the predicted states, *z*ˆ denotes the performance, and *u* is the control inputs at every time step *k*. *Qx* = *Qx<sup>T</sup>* ≥ 0 ∈ *R*3×3, *Qx* = *Qx<sup>T</sup>* ≥ 0 ∈ *R*3×3, and *R* = *R<sup>T</sup>* > 0 ∈ *R*<sup>1</sup> are weight matrices. Based on this, = *Qx* = *diag*(*Qx*, *Qx*,... *Qx*) ∈ *RNxNp*×*NxNp* , = *Qx* = *diag*(*Qz*, *Qz*,... *Qz*) ∈ *RNxNp*×*NxNp* , and = *R* = *diag*(*<sup>R</sup>*, *R*,... *R*) ∈ *RNuNp*×*NuNp* .

A further advantage of MPC, for instance, over LQ control, is that it handles the constraints of the system directly. Constraints were set in case of the control inputs.

$$-\,\mathfrak{u}\_{\min} \preccurlyeq \mathfrak{u} \preccurlyeq \mathfrak{u}\_{\max}.\tag{23}$$

During the simulation, the physical constraints of the test vehicle were taken into consideration. This means that the steering angle *δ* could range between −35◦ and +35◦, and the driving force *FxR* at the rear wheel was between 0 N and 7000 N.

The evolution matrices in Equation (24) can be determined according to [29]. The D selection matrix was zero throughout in this paper. The system state *x*(*k*) is measured at the time step *k*.

$$
\overbrace{\begin{bmatrix}\mathbf{x}(k+1)\\\mathbf{x}(k+2)\\\vdots\\\mathbf{x}(k+Np)\end{bmatrix}}^{\mathbf{\tilde{x}}} = \overbrace{\begin{bmatrix}A\\A\\\vdots\\A^{N\_p}\end{bmatrix}}^{\mathbf{\tilde{A}}} \mathbf{x}(k) + \overbrace{\begin{bmatrix}B&0&\dots&0\\AB&B&\dots&0\\\vdots&\dots&\ddots&\vdots\\A^{N\_p-1}B&\dots&0&B\end{bmatrix}}^{\mathbf{\tilde{B}}} \overbrace{\begin{bmatrix}u(k)\\u(k+1)\\\vdots\\\vdots\\u(k+N\_p-1)\end{bmatrix}}^{\mathbf{\tilde{B}}} \mathbf{\tilde{X}}(k)
$$

The cost function must penalize both the magnitude of the applied control inputs, steering angle, traction force, and deviation of the states from the reference trajectory in order to formulate the optimization problem, the solution of which is the optimal control inputs. The error vector *z* is the following:

$$
\overbrace{\begin{bmatrix}z(k+1)\\z(k+2)\\ \vdots\\z(k+Np)\end{bmatrix}}^{\frac{z}{}} = \overbrace{\begin{bmatrix}\mathbb{C} & 0 & \cdots & 0\\0 & \mathbb{C} & \cdots & 0\\\vdots & \cdots & \mathbb{C} & \vdots\\0 & \cdots & \cdots & \mathbb{C}\end{bmatrix}}^{\frac{\mathbb{C}}{}} \begin{bmatrix}\mathbf{x}(k+1)\\x(k+2)\\ \vdots\\x(k+Np)\end{bmatrix}.\tag{25}
$$

The cost function is calculated by substituting Equations (24) and (25) into Equation (22).

$$J = \frac{1}{2}\overline{\boldsymbol{\pi}}^T \boldsymbol{H} \,\,\overline{\boldsymbol{\pi}} + f^T \overline{\boldsymbol{\pi}}.\tag{26}$$

For a more detailed derivation, see [28]. The QP problem is formed in the following equation:

$$\min\_{\boldsymbol{\Pi}} \left[ \frac{1}{2} \overline{\boldsymbol{\mu}}^T \boldsymbol{H} \,\,\overline{\boldsymbol{u}} + \boldsymbol{f}^T \overline{\boldsymbol{u}} \right],\tag{27}$$

subject to

$$-0.6 < \mu\_1 < 0.6,\tag{28}$$

$$0 < \mu\_2 < 7000. \tag{29}$$

#### *4.2. Successive Linearization*

Traditional MPC works on linear and discrete models. Nonetheless, the vast majority of dynamical systems are nonlinear, which is the case of the presented vehicle model introduced in Section 2.1. To be able to create an MPC control scheme, it is reasonable to linearize the nonlinear system and discretize the continuous system afterward. Successive linearization was selected according to [30]. Successive linearization is a key tool to make our model adaptive to environmental and conditional changes in real time. Successive linearization is a linearization method followed by discretization. The idea is to create

a linear MPC for every time step and make it adaptive to the changing conditions by updating the model that the MPC uses to formulate the QP problem, instead of using a more complex control scheme like nonlinear MPC in [31].

The system described in Equation (20) can be linearized in specific operating points by knowing its gradient. One can interpret it as Jacobian linearization. According to the aforementioned specifications, the state matrices of the linearized system can be derived as follows:

$$A\_{\varepsilon}(i,j) = \frac{\partial F\_i}{\partial x\_j}, \ B\_{\varepsilon}(i,j) = \frac{\partial F\_i}{\partial u\_j} \tag{30}$$

$$\mathbb{C}\_{\mathfrak{c}}(i,j) = \frac{\partial z\_i}{\partial x\_j}, \; D\_{\mathfrak{c}}(i,j) = \frac{\partial z\_i}{\partial u\_j}. \tag{31}$$

By knowing the operating points at every time step, the matrices in Equations (30) and (31) can be determined in numerical form. Since MPC works on discrete systems, discretization is required.

The linear continuous system of Equations (30) and (31) can be discretized as defined in Equations (32)–(34).

$$A\_d = \mathfrak{e}^{A\_t T\_s}.\tag{32}$$

$$B\_d = A\_c^{-1} \left( e^{A\_c T\_s} - I \right) B\_c. \tag{33}$$

$$\mathbb{C}\_d = \mathbb{C}\_{\mathfrak{c}} \; \; D\_d = D\_{\mathfrak{c}}.\tag{34}$$

Equations (32)–(34) can be substituted into Equations (24) and (25) at every time step. A MATLAB and Simulink environment was used for model and controller implementation (the implemented MPC controller and the nonlinear vehicle model are marked in blue in Figure 6), as well as for software-in-loop testing. In order to appropriately tune the weight matrices of Equation (22), a simple linear MPC was created for one equilibrium. Since the aim is to control a nonlinear system with a linear controller around an equilibrium, one should take coordinate system transformation into consideration as a result of Jacobian linearization. Coordinate system transformation was applied according to [32]. The control scheme is depicted in Figure 6. Blocks responsible for coordinate transformation between the controller and the vehicle model are marked in yellow.

**Figure 6.** The control scheme.

#### **5. Simulation Results**

In this section, the simulation results are revealed. The first test case was created to tune the parameters of the controller and test its performance. In the second test case, the vehicle was driven through multiple equilibria. Lastly, the alteration of the road surface was considered while driving through multiple equilibria.

#### *5.1. Steady-State Drift in a Single Equilibrium*

Firstly, the control scheme was tested only using Case No. 1 of Table 1 (Equation (1)). This was an important step in order to tune the weight matrices. A PI (proportional–integral) cruise controller was used to accelerate the vehicle from 0 to 8 m/s, after which the control was given to the MPC drift controller. The controller was able to drive the car into a drift state and keep it there simultaneously. Figure 7 shows the simulation results after 8 m/s was reached. The controller needed to cope with the task of accelerating the vehicle by 2 m/s to reach the desired drifting speed. It can be deduced from the results that the designed linear controller was capable of controlling the defined nonlinear system around the desired equilibrium after the proper tuning. This was proven by the simulations where the vehicle performed a high-sideslip cornering motion, as depicted in Figure 8. The movement of the vehicle can also be tracked in this figure. Firstly, the drift controller took over the control at (0,0), after which there was an acceleration period. When all the states were driven to the operating points, the steady-state drift was maintained.

**Figure 7.** Drift scenario around equilibrium Case No. 1.

**Figure 8.** The heading of the vehicle during steady-state drift in equilibrium Case No. 1.

#### *5.2. Steady-State Drift in Multiple Equilibria*

The controller introduced in Section 5.1 was able to maintain the system at the desired operating point. However, it performed poorly in other segments of the state space. The adaptive MPC structure can be a solution for this limitation. This section points out the advantages of adaptive MPC over linear MPC for multi-operating point purposes.

The second step after Section 5.1 was to drift around three different equilibria. In this case, the system was updated, and a new MPC was formed online at every time step. The MPC could not only keep the vehicle at the limit of handling, but it was also able to drive the system from one equilibrium to another. The order of the steady points was based on the idea to test the robustness of the controller. First of all, the controller needed to accelerate the system from 8 m/s to 10 m/s while driving it into a drift state. Furthermore, after drifting in the first circle, the controller needed to drive the vehicle into a circle with a smaller radius and into a considerably bigger one after that. The transition in the first case from Equation (3) to Equation (1) was relatively smaller (these were closer operating points) than that from Equation (1) to Equation (2), as can be seen in Figure 9 by examining the overshoots. The controller was able to cope with both acceleration and deceleration tasks. Figure 10 depicts the control inputs during steady-state drift at the operating points. As can be seen, the control inputs were the same in the steady-state cases as the precalculated values in Table 1.

**Figure 9.** Evolution of states while settling in the three different equilibria.

**Figure 10.** Control inputs during the test while reaching the targeted three different equilibria.

#### *5.3. Drifting on Varying Road Surfaces*

In real-life scenarios, changing road surfaces is a common occurrence. Moreover, during drifting, the vehicle can also go off-road or across wet asphalt areas. The varying friction of road surfaces raises many challenges for autonomous vehicles. Road surface estimation is an active topic in the field of autonomous vehicle development. Machine learning is a promising methodology for road surface estimation, as shown in [33–35]. A new idea was proposed in [35] based on a machine-learning approach to estimate road surface. The authors introduced a methodology that relies on large datasets that can be collected using onboard sensors or dynamic simulations. Online road surface estimation is an essential extension of the proposed method introduced in Section 5.2. Nevertheless, it is beyond the scope of the present work. Hence, preset friction coefficients were used for testing the adaptability of the software.

Simulations confirmed the fact that the tolerance of the linear controller was limited toward road changes. Setting the friction coefficient of the road surface to 0.8 from 0.95, for instance, resulted in poor performance or even instability. Adaptive topology can also be used to eliminate this problem. By having an estimation of the road surface, the friction coefficient can be updated along with the other parameters to provide a more accurate model for the MPC to work on. Road friction is considered a variable in the state matrices updated at every time step before passing them to the MPC for prediction.

The friction coefficient was changed as a step, assuming a sudden alteration of the road surface. The change was made at the same time when the controller attempted to drive the system into a new equilibrium. The grip suddenly changed from 0.8 to 0.95, which is roughly equivalent to a wet to dry road transition. Overall, the alteration of the road friction could be interpreted as a special type of transition between equilibria. Figure 11 shows the evolution of the states during the test case, while Figure 12 depicts the trajectory traveled. Despite the sudden change in the operating conditions, the proposed adaptive MPC controller was able to precisely stabilize both targeted drift equilibria by utilizing the available information of the road grip.

**Figure 11.** Vehicle states during the test case showing the handling of rapid change of road surface grip.

**Figure 12.** Path and heading of the vehicle in the changing road grip test case.
