A Nonlinear Model-Predictive Contouring Controller for Shared Control Driving Assistance in High-Performance Scenarios

An increasing number of vehicles today are equipped with advanced driver-assistance systems that provide humans involved in the driving tasks with continuous and active support. State-of-the-art implementations of these systems frequently rely on an underlying vehicle controller based on the model-predictive control strategy. In this article, we propose a nonlinear model-predictive contouring controller for a driving assistance system in high-performance scenarios. The design follows specific features to ensure the effectiveness of the interaction, namely, adaptability with respect to the current vehicle state, high-performance driving capabilities, and tunability of the assistance system. First, the control algorithm performance is evaluated offline and compared with a commercial lap-time minimizer, then experimental implementation of the assistance system with the human driver (HD) in the loop has been accomplished on a professional dynamic driving simulator, where an evaluation of the specific features has been performed: 1) a gg-bound is exploited to adapt the controller’s behavior to different driver abilities; 2) the controller’s adaptability to unexpected HD behavior is tested; and 3) the controller’s ability to handle the vehicle at the limit of maneuverability is established. The obtained strategy, then, demonstrates to be suitable as an underlying vehicle controller for a driver-assistance system on a racing track.


I. INTRODUCTION
I N THE last decade, the use of advanced driver-assistance systems (ADASs) has been spreading in all types of vehicles [1]. A large research effort has been dedicated to the design of systems with autonomy-like characteristics, aimed at assisting the driver in increasing both safety in emergency situations and comfort in highway and urban scenarios. When safety is the main goal, control systems are usually designed to intervene promptly only in dangerous situations [2]- [4], while when driving comfort is of interest, ADASs provide continuous assistance to the human driver (HD) in a shared control mode, effectively considering the driver-in-the-loop and operating typically under mild dynamic conditions [5]- [10]. Specifically, these implementations rely on a vehicle controller, often based on model-predictive control (MPC) techniques, which generates input signals for the actual vehicle commands (e.g., accelerator, brake, gear, or wheel angle) and/or for the HD interaction system (e.g., haptic interaction through active pedal or steering, visual or auditory cues, etc.). In such a shared control strategy, the human-machine interaction guarantees that drivers can always overwhelm the controller (under simple implementation assumptions, e.g., saturation of the controller maximum force application), allowing an effective handling of the human-machine contradictory. Moreover, the controller is designed to provide continuous feedback to the driver, aiming at reducing the workload of the driver and increasing the overall performance [8], [11], [12].
Notably, research on shared driver-assistance systems for high-performance driving, e.g., in track driving scenarios, is still scarce, although availability of such systems may impact on both industrial applications [13] and training processes [14]. In this context, in fact, an ADAS could be used to ensure safety even at the limit of handling, to allow safe practicing and to ease the testing of high-performance vehicles by common drivers. In such a driving scenario, the main challenge is to provide continuous assistance and feedback to the driver while driving at the edge of vehicle maneuverability. Indeed, due to the presence of the human-in-the-loop (HIL), the vehicle controller has to continuously adapt to the actual vehicle state, which might deviate significantly from the expected one. Ensuring such adaptability at the limit of vehicle performance requires the custom design of a vehicle controller. In this framework, we propose an innovative high-performance vehicle control system, based on a nonlinear MPC (NMPC) strategy, which is specifically tailored for driver-assistance systems. The NMPC technique, in fact, is an optimization-based control scheme that is spreading in industrial applications thanks to the availability of fast or distributed algorithms that usually rely on the specific structure of the problem and smart initialization, often seeking for suboptimal solutions [15]- [17]. The proposed strategy allows computing both the vehicle commands and the resultant This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ trajectory for use in different levels of human-automation cooperation, ranging from overriding the human controls to suggesting the optimal actions.
To fit the HIL high-performance scenario, a controller that operates at high sampling rate (50 Hz) has been implemented. Then, inspired by the vehicle control literature [18]- [20], a contouring NMPC formulation [21] (NMPCC) has been adopted, addressing a minimum travel time objective in the NMPC cost function. This strategy allows the optimal trajectory and the relative velocity profile to be computed online by the controller, ensuring a high-performance control objective consistent with the current state (position and attitude) of the vehicle.
To ensure high performance in the contouring formulation framework, it is crucial to balance the need to provide both adequate knowledge of the track in the near future (i.e., a long enough prediction horizon) and an accurate model description with limited computational load. In this regard, a detailed control model that grants real-time capabilities of the controller has been implemented. MPC implementations for shared control ADASs are usually based on simple vehicle models, whereas state-of-the-art high-performance vehicle controllers typically implement more accurate and complex models [18], [19], [22]- [25]. The four-wheel vehicle model described in [24] is adopted and modified to include load transfer, gear shift predictions, longitudinal forces saturation, and an ellipsoid tire friction constraint [20]. The latter characteristic has been also used as a calibration parameter to tailor the performance of the assistance system to different driver abilities.
Since, in the application at hand, the steering action of the controller ultimately defines the haptic feedback for the driver, a specific feature has been introduced in the model. To this end, additional local information about the coupling of longitudinal and lateral tire forces is supplied through a time-varying parameter, thus allowing precise control actions under high slip conditions.
Recent ADASs operate at different levels and provide different types of feedback to the driver [1], e.g., by lifting control of the vehicle, applying torque/force on vehicle controls, giving visual or auditory feedback, etc. In this regard, recent studies have shown that user acceptance is highly dependent on the degree of autonomy of the system [26]. Accordingly, to validate the control algorithm at different levels of cooperation between the human and the vehicle controller, three representative schemes have been defined for the design and validation: 1) full autonomy, where the controller overrides the human commands; 2) longitudinal autonomy, where the NMPCC controls the longitudinal controls and interacts on the steering wheel with the human; and 3) full interaction, where the HD controls the car, while the controller corrects the actions on the steering wheel and suggests the correct braking action to the HD through a LED on the dashboard. Note that the last scheme exploits information about future optimal controls, requiring reliable predictions, which are obtained by the combination of accurate modeling, the ellipsoidal constraint, and high control frequency.
The algorithm has been tested on a professional driving simulator (see Fig. 1), to obtain efficient validation with the HD in the loop while ensuring safety and repeatability. Furthermore, co-simulation with high-fidelity vehicle simulation software Fig. 1. Compact dynamic driving simulator is composed of a cockpit, an active belt and active seat system, four legs for tilting and vertical motion, a high-resolution cylindrical screen, and a high-fidelity vehicle simulation software (VI-CRT).
within the simulator makes the difference between the control model and the simulation model comparable to experimental conditions. Summarizing, the main contributions of this article are: 1) the definition of a contouring controller, tailored for ADAS at the limit of handling and 2) its validation on a high-fidelity, real-time, simulation platform with the HIL. The following features are introduced to implement the proposed innovative strategy.
1) Real-time capabilities with 50-Hz control frequency and sufficiently long prediction horizon, obtained by a specific implementation with a fast NMPC solver [15]; 2) The capability of high-performance driving, obtained by the definition of a tailored modeling that revealed to be effective in high sideslip conditions; 3) The adaptability to unexpected behavior of the HD, obtained by the combination of the contouring formulation and the soft constraint on the track bounds; 4) The adaptability to the HD's ability, obtained from the gg-diagram soft constraint, which can be used to specify the driver's skills in terms of maximum accelerations. In Section II, the internal model used by the controller is described and in Section III, the NMPC control problem is defined. In Section IV, a comparison with a commercial lap-time minimizer (VI-MaxPerformance [27]) in a high-fidelity vehicle simulation environment, and an analysis of the impact of the local information about the combined tire slip is reported. In Section V, the experimental environment is presented. Experimental results are reported in Section VI, using the three different interaction schemes, showing the capability of the system to achieve the proposed characteristics. Conclusions are drawn in Section VII.

II. VEHICLE MODEL FOR CONTROL
In the vehicle control literature, different models have been proposed for four-wheel vehicles, ranging from complex four wheels to simple bicycle models. A complete four-wheel model, including load transfer, wheel dynamics, and the full Pacejka tire model is proposed in [22]. Due to the presence of wheel dynamics, however, the ordinary differential equation (ODE) system is stiff, thus computationally unsuitable for long prediction horizons and high-frequency control. Less onerous four-wheel models with simplified longitudinal tire dynamics have been proposed in [23] and [24]. Alternatively, in the presence of simple bicycle models, additional control strategies are adopted, as in [20], where an ellipsoidal friction constraint is included to account for the combined tire behavior, and specific strategies, designed for a vehicle with independent electric motors on the wheels, are implemented to account for the simplifying assumptions.
The proposed internal NMPCC model is a four-wheel vehicle based on the description in [24], supplemented by load transfers, gear shift predictions, longitudinal force saturation, and an ellipsoidal tire friction constraint, improving the overall prediction capabilities of the controller. Moreover, a timevarying parameter has been used to model the lateral force dependency on the longitudinal slip, in order to handle locally the tire forces coupling. The model has been reformulated with respect to the curvilinear abscissa s.

A. Model Dynamics
The vehicle dynamics model is described aṡ where ξ(t) ∈ R n x is the state of the vehicle, u(t) ∈ R n u is the input, and p(t) ∈ R n p is the time-varying parameter vector. The main quantities and parameters of the model are described in Table I. The system dynamics φ is characterized by the equation of motion of the vehicle center of mass (CM) [23], i.e., 1 Subscripts i ∈ {f , r} refer to front or rear wheels, j ∈ {l, r} left or right wheels. The projection of cornering and longitudinal forces in the vehicle frame yields The steering angle is here assumed to be the same for both front wheels. In Fig. 2, the physical quantities involved and directions and application point of the forces are described.
The dynamics in the inertial frame are then computed aṡ where (X, Y) is the position of the vehicle's CM in the inertial frame. Finally, the sideslip angle of the vehicle is defined as

B. Forces
The longitudinal drag force and the downforce are modeled as [28] where ρ is the air density, C x,z i are the drag coefficients, and A x,z i are the interested section area. The longitudinal tire forces in each wheel reference frame are computed as where the engine and braking forces are where μ is the tire friction coefficient, r w is the wheel radius, and the saturation function is defined as Then, the engine and braking torques at the wheels are where γ t,b are the normalized throttle and braking efforts, τ MAX brk,i is the maximum torque given by the braking system to front/rear wheels, and τ MAX,min eng,i are the maximum and minimum torque values expressed by the engine at front/rear wheels at a given gear and are changed as a time-varying parameter to model gearshift. To compute the torques in the prediction horizon, an iterative strategy predicting the engine rpm and, hence, gearshift, based on the predicted velocity is used. Specifically, the engine rpm is computed as where diff ratio and gear ratio are the input/output torque ratios at the differential and at the gearbox (in a specific gear), respectively. The dependence of τ MAX,min eng,i with respect to the engine rotational velocity has been neglected.
The normal forces are modeled as where the load transfer in steady-state condition Fz is computed by To avoid an algebraic loop in the model, the forces used for the load transfer dynamics computation are F sat0 x (total longitudinal force expressed in the vehicle frame saturated at nominal F z ) and F static y (the sum of the lateral forces computed at nominal F z on each wheel). The lateral forces model is based on Pacejka's Magic Formula [29]. The lateral forces expression is where B is the stiffness factor, which regulates the slope, C is the shape factor, which determines the stretching with respect to the side slip, D is the peak factor, which defines the peak value, E is the curvature factor, which affects the transition to the constant saturation value, and β i,j are the wheels side slip angles. Moreover, local information about the tire coupling has been included through the introduction of the term G yk i,j as a time-varying parameter, computed as [29] where k i,j is the current longitudinal slip, B yk is a function of the lateral slip, E yk , C y k , and G yk0 are tire dependent parameters. The structure of the lateral force factors leads to a cornering force model of the form The sideslip angle of each wheel is computed as where the longitudinal and lateral velocities in each wheel frame are and the velocities along x and y directions are

C. Spatial Reformulation
The dynamics have been reformulated in spatial coordinates with respect to the arc length s along the track in order to allow time to be a minimization variable, to set the spatial constraints, and to eliminate the dependency on the velocity in the trajectory reference for the controller. This has been previously studied, e.g., in [30] and [31], and the procedure is summarized in the following for completeness. The reference trajectory σ is parameterized in s and the curvature of the trajectory ζ = (1/ρ), where ρ is the instantaneous curvature radius, is locally defined as The lateral and angular tracking errors are computed as where ψ s is the reference yaw angle and (X s , Y s ) is the absolute reference position at the current spatial coordinate while (X, Y) and ψ are the absolute current position and yaw angle (see Fig. 3). The tracking errors dynamics are [32] e ψ =ψ − ζṡ The state vector ξ is differentiated w.r.t s using the chain rule as .

D. Full Model
The minimization of the travel time over the prediction horizon must be considered in the definition of the cost function to enable the contouring formulation; hence, the time has been included as a state variable with the following ODEṫ = (1/ṡ). The full-state vector is then given by (23) and the input computed by the algorithm is whereδ f ,γ t , andγ b are the derivatives of the actual input to the vehicle and are slack variables, whose role will be discussed in Section III. This formulation allows a smooth action of the controller and avoids too aggressive, unrealistic behaviors.
The dynamics equation of the model used in the NMPC algorithm can be compactly written as where is the timevarying parameter vector expressed as function of the curvilinear abscissa s.

III. NMPCC ALGORITHM
In this work, an NMPCC algorithm for assisted driving in a high-performance scenario is designed. The goal of the controller is to compute steering, throttle, brake commands, and their derivatives in a future window, being reliable at the limit of performance. The NMPCC algorithm is based on MATMPC [15], [33], [34], an opensource software built in MATLAB for a real-time NMPC solution. MATMPC has a number of algorithmic modules and can achieve real-time simulation in MATLAB by coding each module in MATLAB API for C. Ease of prototyping and debugging is maintained thanks to the MATLAB environment.
In MATMPC, a nonlinear programming problem (NLP) is formulated at sampling instant i by applying direct multiple shooting [35] to an optimal control problem over the prediction horizon S = [s 0 , s f ], which is divided into N shooting intervals [s 0 , s 1 , . . . , s N ], as follows: where ξ ·|i = (ξ 0|i , ξ 1|i , . . . , ξ N|i ) , and u ·|i = (u 0|i , u 1|i , . . . , u N−1|i ) ; andξ 0 represents the measurement of the current state. System states ξ k|i ∈ R n ξ are defined at the discrete arc-length point s k for k = 0, . . . , N and the control inputs u k|i ∈ R n u for k = 0, . . . , N − 1 are piecewise constant. Their definitions are given in (23) and (24). Here, (26d) is defined by r(ξ k|i , u k|i ) : R n ξ × R n u → R n r and r(ξ N|i ) : R n ξ → R n l with lower and upper bounds r k|i , r k|i . Equation (26c) refers to the continuity constraint where φ k (ξ k|i , u k|i ; p k|i ) is a numerical integration operator that solves (25) with initial condition ξ(0) = ξ 0|i and returns the solution at s k+1 .
The real-time iteration (RTI) scheme [16] is employed to reduce the time required to solve (26). The RTI scheme performs a single sequential quadratic programming (QP) iteration to solve (26). By this means, (26) is linearized only once and a QP problem is solved at each sampling instant. Details on the QP formulation can be found in [15]. Moreover, a nonuniform grid (NUG) strategy [36] has been used for lowering the computational burden and let the controller predict a sufficiently long horizon (as specified in Section IV-A). The local convergence of the algorithm is ensured by the RTI guarantees on contractivity and boundness of the loss of optimality compared to optimal feedback control [37], [38]. Specifically, the RTI scheme achieves convergence of the NMPC problem on-the-fly, i.e., as the system dynamics evolve [38].
To effectively generate the vehicle commands, the cost function for the NMPC is defined as The penalty on the sideslip β is used to choose how restrained the behavior of the vehicle should be. The cost γ t ·γ b penalizes simultaneous throttling and braking, whereas the ζ · γ t cost is used to make the controller accelerate smoothly while exiting the curves. The objective variable time t supports the computation of a time-minimizing path and its weight can be used to tune the importance of the performance index. The terms on the inputs ensure a smooth control action. The slack variables are used to define the soft constraints [39] discussed in the next paragraph. Finally, the terms related to errors e y and e ψ , used only as terminal objective variables, are introduced to integrate information about the trajectory over the prediction horizon.
The constraints are defined as where the constraints on δ f , γ t , and γ b are intrinsic bounds of the actual vehicle controls, while those onδ f ,γ t , andγ b are added in order to improve the smoothness of the computed inputs and can be used to easily tune the aggressivity of the NMPC driving commands. Also, the slack variables have been constrained in order to help the optimization procedure restricting the search space of the inputs. Finally, three soft constraints have been added to make the controller predict a trajectory with the desired features while supporting the robustness of the overall procedure. In fact, due to the interaction with the human actually driving on the simulator, the behavior of the vehicle could be significantly different from the predicted one, and the presence of hard constraints would easily lead to failures in the NLP solution. Specifically, the first soft constraint is introduced on the sideslip of the vehicle in order to force the controller to regain control of the vehicle in case of skidding; the second one is used to firmly correct the human trajectory in case of out-of-the-track future situations. Finally, the last soft constraint is designed to make the controller respect the required gg diagram, which represent the maximum combined longitudinal-lateral acceleration that can be induced by the combined longitudinal-lateral behavior of the tire forces [40]. μ x and μ y are the longitudinal and lateral friction coefficients of the tires, respectively, whereas the considered accelerations on the vehicle arë At the ith sampling instant, the control input is updated by where u i * is the solution of the QP. The first sample of u i * is applied to the vehicle, the prediction horizon is shifted forward and the optimization procedure is repeated with the updated state measurement.

IV. OFFLINE PERFORMANCE VALIDATION
Since the controller must be able to handle challenging high-performance situations, a validation test has been made, by comparing with a commercial dynamic minimum laptime tool, VI-MaxPerformance. VI-MaxPerformance is based on an iterative procedure that acts on the velocity profile to minimize lap time [27]. The comparison has been made on virtualization of the Paul Ricard race track (Le Castellet, France), shown in Fig. 4, which is 5665-m long.
The vehicle dynamics are computed using the simulation tool VI-CarRealTime (VI-CRT), a multibody software specifically designed to reproduce vehicle behavior for highperformance driving in real time [27]. The underlying simulation model is composed of 14 degrees of freedom, 6 for the chassis and 2 for each wheel, and it includes comprehensive dynamics of tire, chassis, suspensions, brakes, engine, and transmission.
The co-simulation is performed in Simulink, connecting a VI-CRT simulation block with the NMPC controller. In particular, the controlsδ f ,γ t , andγ b computed by the NMPCC controller are integrated and given as inputs to the simulation block. VI-CRT is used to simulate the dynamics of the vehicle at 1000 Hz while the control action is updated by the NMPCC controller at f c = 50 Hz.

A. Controller Setup
The NMPC tool MATMPC has been set to use Explicit Runge-Kutta 4 integrator, HPIPM as the QP sparse solver [41] with the RTI scheme [16]. To achieve satisfactory performance in trajectory planning, the prediction horizon should be long enough to predict the entire dynamics of both the longest corner on the track, to start positioning and braking in advance, and of consecutive corners in the chicanes, to calculate a trajectory consistently. However, to maintain real-time capabilities of the controller, the number of shooting points was limited to N = 140. Moreover, to maintain good tracking performances, a dense integration at the beginning of the control horizon is needed. Therefore, NUG steps [36] have been set as follows: where a : b : c means from a to c with step b in meters, enabling a prediction length of 400 m on track. Note that the first step, that is 2-m long, allows computing coherently the first input, i.e., valid for more than one control period (T c = f −1 c = 20 ms), until the velocity is less than 100 (m/s). The implemented configuration, using the RTI scheme and NUG, is specifically realized as to effectively control the vehicle at the limit of handling. In this conditions, in fact, the control frequency must be high enough, e.g., to react in a high sideslip condition with a countersteering action, while the prediction horizon must be long enough, as stated before. To ensure both features, a very fast solution method is implemented through the RTI scheme, while a reduction of the needed points in the prediction horizon is achieved by NUG.
The tuning of the NMPC controller parameters is essential to obtain an effective and proficient controller. The weight choice is accomplished in two phases: a first tuning operation is carried out in offline simulation, in order to obtain the best achievable performance, while a further refinement is obtained during HIL experiments, in order to enhance the interaction between the controller and the HD. The choice of weights initially obtained on the offline simulation, indeed, led to rapid and abrupt changes in control actions and, when interacting with the driver on the steering wheel, generated annoying highfrequency vibrations. In this sense, increasing the weights on the control derivatives promoted smoother controller behavior.
The described empirical analysis has been conducted and the weights for the cost function have been manually set as W = diag 5 · 10 3 , 10 5 , 6 · 10 −1 , 10 1 , 4 · 10 1 10 −2 , 10 −2 , 3 · 10 2 , 5 · 10 −1 , 10 2 . (32) In particular, the sideslip weight and the time weight have been set as to maintain the correct tradeoff between a restrained behavior and high performance, a high weight on γ t · γ b is used for preventing contemporary throttling and braking, the weight on ζ · γ t has been set to obtain a throttle action at the curve exit that does not lead to tire spinning, the input derivatives have been penalized to obtain the desired smoothness of the control actions, the weights on the slack variables for sideslip and lateral errors have been increased until the controller firmly corrects the vehicle behavior in unstable or out-of-the-track future situations, and finally, a high penalty on the gg constraint slack variable has been set to comply with the desired maximum performance.
The terminal weights have been set unchanged for the present variables already analyzed, whereas the weights on the reference errors have been set as to address that the predicted trajectory concludes, at the end of the prediction horizon, within a reference corner-cutting trajectory, whose generation is discussed in the next paragraph. The reference trajectory for the final point of the prediction horizon employed in this test has been computed using the Corner Cutting procedure embedded in the commercial tool VI-Road. The process, given the centerline, the track width, and the vehicle width, computes a path that minimizes where ι(s) is a measure of the path length, ζ(s) is the local path curvature, and w ι = 6·10 −3 and w ζ = 4 are the respective weights. The minimization is constrained in order to maintain the vehicle within the track. Finally, the bounds in (28) have been set as where the bound δ f ∈ [−(π/20), +(π/20)] is the limit of the vehicle steering system; γ t and γ b ∈ [0, 1] are normalized; the bounds on the control derivatives are set as to ensure a smooth action of the controller; the bounds on the slack variables ∈ [−10 5 , +10 5 ] are set to increase the robustness of the optimization procedure; the limit on the soft  constraint β + slip ∈ [−(π/15), +(π/15)] is set to heavily penalize excessive oversteering and the one on the lateral error e y + err ∈ [−5, +5] as to force the vehicle within the track boundaries; and finally, the bound on the soft constraint for the gg is set as the vehicle acceleration limit. 2

B. Comparison With VI-MaxPerformance
The results on the Paul Ricard track show the capability of the controller to achieve performance comparable with those of the commercial tool VI-MaxPerformance (VI-MXP). In particular, VI-MXP has been tested both on the cornercutting path and on the NMPCC controller trajectory, leading to a lap time of 113.27 and 112.46 s, respectively, while for the NMPCC controller the lap-time is 112.16 s. Interestingly, the NMPCC trajectory results to be faster than the corner-cutting one also for the commercial lap time minimizer (see Table II).
The commands given by VI-MXP following the NMPCC path and the NMPCC are shown in Fig. 5, where it can be observed that the NMPCC exhibits a smoother behavior than VI-MXP. This affects in particular the velocity profile, which is smoother and more representative of a human behavior in the NMPCC case. Note that the smoothness of the control actions is fundamental for the assistance system in order to propose consistent and human-like behavior.
The mean computational time for the controller is 12 ms while the maximum is 16 ms, which is compatible with the 50-Hz control frequency in this real-time application.

C. Impact of the Local Information on the Combined Tire Condition
Controlling a vehicle at the limit of handling requires a sufficiently accurate knowledge of tire forces. In fact, under conditions of high longitudinal forces, e.g., originated by accelerating after a curve or braking before it, a significant reduction in tire lateral force occurs, with a relevant impact on vehicle behavior. The information described through the time-varying parameter G yk , see (14) and Fig. 6, is then crucial to correctly characterize such conditions. Since G yk varies at very high frequency, the parameter is provided to the controller and processed as linearly fading in the first 5 steps of the prediction horizon. The impact of such a solution is evaluated on the last turn of the track through two closed-loop simulations obtained with and without scaling of the lateral forces with G yk (Figs. 7 and 8), namely, Sim w/G yk and Sim w/o G yk . In both cases, one-step-ahead sideslip predictions and steering derivative control are shown. An offline evaluation of the same quantities computed with the alternative approach, i.e., with G yk in the Sim w/o G yk and vice versa, is overimposed for comparison. It can be noticed that the one-step-ahead sideslip predictions obtained without G yk is highly underestimated (blue line), leading to a high side slip condition in the case G yk is not used in closed loop.
In both cases, without this information, the sideslip evolution is highly underestimated. This fact leads to a curve exit traveled with the expected restrained behavior (sideslip around 4 • ) in Test W/, and to a loss of control of the rear of the car in Test W/O.
The effect of this predictions on the computed steering derivative control is clearly visible, which is particularly important in the application at hand since it is used to generate steering feedback to the driver (see Section VI-C).

V. EXPERIMENTAL SETUP
The NMPCC algorithm has been developed for interacting with the HD on a compact dynamic driving simulator (shown in Fig. 1). The driving simulator is composed by a mockup of a cockpit, an active belt and active seat system, four legs for tilting and vertical motion, a high-resolution cylindrical screen, and a high-fidelity vehicle simulation software (VI-CRT), which computes the vehicle's dynamics at 1000 Hz. The steering wheel is equipped with an electric motor to feed torque feedback to the driver. The NMPCC controller, running in Simulink on a dedicated PC, receives the current vehicle states from the simulator, computes the controlsδ f ,γ t , anḋ γ b at 50 Hz, which are sent to the simulator and, if necessary, integrated at 1000 Hz. The obtained control actions are then used differently depending on the chosen interaction scheme. The communication between the simulator and the controller is based on UDP protocol. MATMPC configuration is as described in Section IV. The controller runs on a PC in WINDOWS 10, with Intel Core i7-7700K @ 4.20-GHz CPU.

VI. EXPERIMENTAL RESULTS
Different experimental activities, incrementally involving the HD, have been carried on in order to validate the algorithm in representative interaction schemes and to test the specific Fig. 9. Visualization of the dashboard proposed to drivers in full interaction scheme. The dashboard shows, starting from the left side: the current speed reached by the vehicle; the light used for visual feedback about braking; the current deviation with respect to the best lap time obtained offline with a fully autonomous configuration; the current and the best lap time in the whole driving session; and the current gear state.
features described in the introduction. In particular, the three different interaction schemes used are as follows.
1) Full Autonomy Scheme: In this setup, where the controller is fully in charge of the vehicle, the tunability characteristic, i.e., the possibility to adapt to different driving skills, has been tested. 2) Longitudinal Autonomy Scheme: The test, where the NMPCC controls the longitudinal commands and interact on the steering wheel with the human, has been used to evaluate the controller adaptability to the HD unexpected behavior and the reliability of the NMPCC predictions. 3) Full Interaction Scheme: In this scheme, the HD controls the car, while the controller corrects/suggests the actions on the steering wheel and on the dashboard. The test case is used to demonstrate the NMPCC support capability in highly unstable and fast dynamics vehicle behavior. The system has been tested by different drivers, from novice to expert, with similar results. Specifically, the reported experiments have been conducted with a nonprofessional driver. The interaction between the system and the human is given, for longitudinal autonomy scheme and full interaction scheme, by a steering axis torque τ s , generated by a proportional controller (with P = 3.5) on the control inputδ f computed by the NMPCC. In addition to the steering torque, in the full interaction scheme, the algorithm leverages the predictive capabilities of the NMPCC to provide the driver with visual feedback about the exact moment to brake. Specifically, a light within a dashboard (see Fig. 9) is used as follows: when the blue light is on, no brake actions are required from drivers in the very next future. A yellow light turns on 1 s before the predicted brake action, in order to prepare the driver for braking and reduce reaction time. A red light turns on when the driver is supposed to brake, given the current vehicle state.

A. Full Autonomy Scheme
In this setup, we highlight the tunability of the controller, by manipulating the constraint on the gg-bound. The gg is the representation of longitudinal acceleration with respect to lateral acceleration, used to characterize the performance of a vehicle, and the skill of the driver. This bound is manipulated here Fig. 10. Velocity and command profiles for the standard and gg-bounded configurations. Due to the request for less acceleration in the latter configuration, the braking action starts earlier and the curve is traveled at a lower velocity. Fig. 11. gg-diagram for the standard and gg-bounded configurations, showing longitudinal acceleration with respect to lateral acceleration. The effect of the constraint is to force the accelerations within a smaller ellipsoid.
to modify the behavior of the controller to emulate different abilities of the HD, making the interaction more effective. In this test, the standard configuration described in Section IV-A is compared with a configuration where the soft constraint on the gg-bound [see (28)] has been reduced to 1.3g. This configuration shows the possibility to reduce the aggressiveness of the controller in a direct way. In Fig. 10, the velocity and the controls for the first chicane are shown, while in Fig. 11, the effect of this reduction is shown in terms of gg-diagram. In particular, the constrained configuration brakes less but starting earlier, to achieve a lower longitudinal acceleration, and travels through the curve at lower speed, to maintain lower lateral acceleration.

B. Longitudinal Autonomy Scheme
In this configuration, the NMPCC controls the throttle and brake, while the HD forces the vehicle onto an unexpected trajectory. In this case, the controller must adapt the predicted trajectory and velocity to the actual state of the vehicle. In   13. Predictions of the velocity in the prediction horizon for the first chicane of the track. The color changes as the time passes, to show the predictions in different time instants. In the prediction horizon, the controller calculates faster velocity profiles, but adapts constantly to lower velocities as the human approaches the curve in unexpected positions. Fig. 12, the trajectory predictions of the NMPCC in the first chicane of the track are shown. In particular, the NMPCC predicts a control sequence that should move the vehicle toward the outside of the track before the curve, with the aim of driving through the curve at a higher speed. However, since the HD does not behave as predicted, the NMPCC is forced to adapt the trajectory and gradually reduce the speed as the car approaches the curve (shown in Fig. 13). In all predictions, however, the controller computes trajectories at the limit of handling, always around the soft acceleration limit of 1.9 g (see Fig. 14). 3 NMPCC predictions and controls, therefore, constantly adapt to the unexpected behavior of the HD, while maintaining a constant performance. In the prediction horizon, the controller computes trajectories at the limit of handling, always around the soft acceleration limit of 1.9 g. Fig. 15. Steering axis torque, the sideslip angle and the steering angle on the ground signals during the oversteer maneuver at the exit of the longest straightway of the track. The controller steering command leads to a torque on the steering wheel that anticipates the sideslip growth, hence promoting the counter steering action in advance.

C. Full Interaction Scheme
In this experiment, in which the HD has full control of the vehicle, an oversteer test has been performed in order to evaluate the controller's support capabilities at the limit of handling of the vehicle. During a high-velocity turn at the end of a straightway, oversteer occurs due to the HD acting too fast on the steering wheel and an analysis of the controller activity in this situation was conducted. In Fig. 15, the steering axis torque, the sideslip angle β, and the ground steering angle δ f are shown, whereas in Fig. 16, a visualization of the maneuver is represented. As the vehicle's sideslip is starting to increase (at 3730 m), the controller leads to a torque on the steering wheel in opposition to the human action. The torque, in fact, is anticipating the growth of the sideslip, thus promoting the counter steering action in advance. Interestingly, once the steering wheel is in a counter-steering position (at Fig. 16. Visualization of the oversteer maneuver at the exit of the longest straightway of the track. The torque is promoting the counter steering action in advance, then, once a stable skidding condition is reached, the controller torque goes to zero. 3770 m), the torque is clearly lowered, hence maintaining the sideslip condition stable. Notably, the traveling velocity during this maneuver is around 45 m/s. In this scenario, the NMPCC control strategy demonstrates its ability to support the HD in highly unstable vehicle behavior with fast dynamics, promoting its use even in extreme situations.

VII. CONCLUSION
In this article, the implementation of a nonlinear model predictive contouring controller for driving assistance in highperformance scenarios has been proposed. Explicit characteristics for the controller have been stated, and their fulfillment has been proven through different experimental activities on a professional driving simulator, with increasing HD involvement. The validation has been made on a challenging racetrack, testing the controller at the handling limit of the vehicle.
The main results of this article are the following: 1) a virtual driver faster than a commercial solution has been obtained; 2) importance of the local information on the combined tire condition has been demonstrated; 3) the possibility to use a gg-bound to adapt the controller behavior to different driver skills has been exhibited; 4) the controller adaptability to unexpected HD behavior has been verified; and 5) the controller capability to stabilize the vehicle at the limit of handling properly interacting on the steering wheel with the HD has been established.
Future research will comprehend the development of a structured torque generation procedure and the application of the implemented controller for the design of an adaptive coaching procedure.