{'fraction_non_alphanumeric': 0.0240942457968269, 'fraction_numerical': 0.004676770068671561, 'mean_word_length': 4.789239204934887, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Development of a hybrid racing car model and optimization of the torque delivery strategy by means of genetic algorithms

This paper proposes an optimization of torque strategy of All Wheel Drive hybrid vehicle taking part to Le Mans Hypercar championship. Using the software VI-Grade CarRealTime an existing reference model has been considered, and new co-simulated model with CarRealTime and Simulink with custom torque distribution has been defined. Subsequently, a simpler vehicle model has been developed only in Simulink to speed up the optimization problem, while conserving the same torque strategy of the co-simulated model. Regarding the optimization problem, two analysis are proposed. The first one is based on single-objective optimization that reduces the fuel consumption, by optimizing the use of the electric powertrain along the track; the second one is a multi-objective optimization that minimizes the fuel consumption and variation of State of Charge (SoC) using the same decision variable of single-objective optimization. The same penalty function is adopted in both cases to have a final SoC equal to the initial one. This analysis allow to design the size of battery and fuel tank as low as possible.


Introduction
Since 2020/21 season a new category in the World Endurance Championship (WEC) has been introduced, named Le Mans Hypercar (LMH), as replacement of LMP1-H category. For this group two powertrain solutions are available: one Rear Wheel Drive (RWD) with an Internal Combustion Engine (ICE), and the other with a hybrid powertrain, with ICE RWD plus an Electric powertrain (E) at the Front Wheel Drive (FWD) [1].
In both layouts the same power curve must be respected, as shown in Figure 1. In standard condition (i.e. atmospheric pressure 1010 mbar, ambient temperature 20°C, relative humidity 0% and no Balance of Performance applied) the maximum power achievable is 500 kW.
Moreover for the hybrid solution, the maximum power deliverable by the electric motor is 200 kW. Even though the ICE solution with a single engine it is easier from a design perspective, the hybrid solution gives huge advantages in the vehicle dynamics, thus justifying the adoption of an additional powertrain. In facts, this solutions aims to reduce the lap-time, increasing the overall powertrain efficiency thanks to the high efficiency of the electric powertrain. For hybrid powertrain, the FIA rules imposes that no electric power can be used when the vehicle speed is lower than 120 km/h with dry tack condition and 150 km/h with wet condition [1]. The hybrid powertrain has been preferred, because an All Wheel Drive (AWD) vehicle gives more control in the corners and allows an improved vehicle strategy during an endurance race, allowing to demand the required power to a powertrain rather than the other (for example if a powertrain reaches overheating conditions, it is possible moves the request to the other). A more complex powertrain layouts as which adopted, require a more complex traction strategy as well. Nevertheless, a hybrid solution gives the possibility to apply different energy strategies, which has beneficial effects during an endurance race, for example in terms of lap time. Many solutions can be discovered with a hybrid powertrain, but in this study only a few are taken into account, in particular those useful in an early stage of the car development.
Given the powertrain architecture, FIA regulations gives the freedom to choose the capacity of the Electric Energy Storage (ES) and fuel tank, thus the energy available for each powertrain and thus different distributions of the torque between the two powertrain systems can be used. Therefore an optimization of the ES and fuel tank capacity is needed, from which different torque strategies are derived.
The paper is structured as follows: in first section all vehicle models used are explained, then the optimization problem is presented and eventually results are discussed.

CarRealTime Model
As mentioned in the Introduction, the first model was defined in the software VI-Grade CarRealTime (CRT). In fact this software offers an easy implementation of all physical characteristics of the vehicle, translating into a fast and robust lap time simulation, which is used as reference lap time for all next steps. This software simulates a 14 DOF (Degree of Freedom) vehicle model: 6 degrees for rigid free For this study, this part of vehicle modelling is assumed as a given reference model. In fact, CRT is able to simulate a hybrid powertrain, as shown in Figure 2, according to the hybrid configuration indicated by FIA (See article 6.3 [1]). However, CRT does not allow a custom torque distribution between powertrains, thus for example if the driver requires 50% of the available torque, then 50% of torque of all powertrains will be provided. This limitation of CRT requires a custom torque distribution development, which has been obtained in this paper combining CRT with Simulink.

Co-Simulated Model
For the purpose of this study it is necessary to define a custom torque distribution of the two powertrains. The intention is to maintain the vehicle model in CRT (including the powertrain) while in Simulink model only determines how to split the target torque between the two powertrains.
To do that, CRT offers a Simulink library that easily permits to transfer the variables from CRT to Simulink and vice versa. The following variables are transferred from CRT to Simulink: • Target Torque: torque necessary to follow the vehicle speed profile; • Max ICE Torque: maximum torque available from engine torque curve at rated engine speed; • Min ICE Torque: minimum torque available from engine torque curve at rated engine speed; • Engine ratio: the total ratio from engine to wheel (primary engine ratio • gearbox actual ratio • rear differential ratio); • Max E-Torque: maximum torque available from e-motor torque curve at rated motor speed; • Min E-Torque: minimum torque available from e-motor torque curve at rated motor speed; • Engine speed, measured in rpm; • E-motor speed, measured in rpm; • Vehicle path: the position along the track, measured along the curvilinear coordinate, measured in m; • Vehicle speed, measured in km/h; • Front longitudinal slips to implement a basic slip ratio control; Figure 3 shows the Simulink subsystem that, given the target torque from CRT as input, calculates the torque to the electric powertrain and to the ICE. To understand the torque strategy, it is important highlight that in the LMH regulations three important limitations are given for hybrid powertrains: Starting from these boundary conditions given by the rules, an algorithm to split the torque between the two powertrains has been proposed. Before exposing it, it is preferable clarify that hereafter when performance of the powertrain is limited by the physics, it means that the maximum power available is given by the specifications of the motor for the E-powertrain or from the ICE for the internal combustion powertrain, that could be different from what indicated by the FIA rules, depending by the choice of the powertrains. The strategy workflow is the following:

Torque distribution.
• The total target torque is initially assigned to the electric torque. If the target torque is greater than the maximum deliverable E-torque, then the E-torque will be equal to the maximum value.
Note that the limit of the electric powertrain is in turn given by two limits: o The limit of the motor itself, given by the physics of the motor, that must be lower than the torque curve given by the producer; o The power limitations imposed by rules, that if the power is positive (traction phase) must be equal to the maximum battery power -200 kW -minus the efficiency of the motor and inverter. On the other hand if the power is negative (brake phase) the maximum power at the motor will be the limit of the battery power plus the efficiency of the motor and inverter; • The E-torque can be controlled with a switch that reset the torque amount if: o The SoC is out of the bounds; o When user decided to de-activate it via a control variable. This control variable will be the control variable that the optimization will use to decide when activate the epowertrain; • The difference between the target torque and the E-torque (zero if the target torque is lower than maximum E-torque) is given to the ICE torque; • A block check the vehicle speed: if it is lower than 120 km/h, the ICE torque will be equal to the target torque. If vehicle speed is greater than 120 km/h, no changes are made. • A slip ratio control is made on the front wheel. If the maximum slip ratio between the two front wheels is greater than a constant, then the E-torque will be reduced by a factor given by the ratio between the constant and the actual maximum slip ratio. If the slip ratio is lower no action are done; • FIA Power limit: in this block is computed the maximum power by FIA rules. To do that it is necessary to use the ICE speed that gives the power limit at rated speed by means of a look-up table. If the total power of the powertrain is lower than the FIA limit, no actions are taken. Conversely, if the total power of the powertrain is bigger than FIA limit, the ICE power will be reduced in order that the sum of E power and ICE power comply the FIA power limit. No modification are applied to the E-power; • The torque assigned to the ICE is limited to the maximum torque achievable by the physics of the engine;  Figure 3. Torque strategy definition in Simulink.

Simulink model
The models presented in the previous sections presents intrinsic limitations for the scope of this paper, and in particular: For this reason another model was defined to run an optimization in a reasonable time, having the same torque strategy explained in the co-simulated model.
To this aim all vehicle dynamics previously treated in CRT was transferred into Simulink. At this point is important to remember that this study is simplified and focused only on the longitudinal dynamics. Furthermore, since the optimization problem does not change the power profile but only how it is split between the front and rear powertrain, therefore it is possible use the CRT variables in Simulink, where lateral dynamics are not modelled. Since this study it is not focused in the reduction of lap-time, the comparison with previous models can be done overlapping the speed profiles. This assumption is acceptable because if the vehicle characteristics and power profile of the whole powertrain does not change among the models, then the vehicle speeds as first approximation are not be affected. Since the vehicle speed is assumed an invariant between the models, it will be used as reference variable for the driver modelling of the Simulink model.

Longitudinal vehicle model. The vehicle model chosen for the
Simulink implementation is a model commonly known as "single-track model", used in many books of vehicle dynamics [2,3,4]. The equation that describes the longitudinal dynamics of the vehicle is expressed in equation (1).
Furthermore, to take into account some lateral dynamics effects, in particular the effect of the front steering wheels, the equation of the longitudinal vehicle has been changed to: where δ is the steer angle at wheel, express as mean of toe angle of front wheels, see equation ( These lateral data are taken from the results of the co-simulated model. As afore mentioned, because of the power profile along the track is not affected -in first approximation -by the power split, it is acceptable use steer and lateral force data from the same simulation made with the co-simulated model.

Driver modelling.
A simple driver is modelled in Simulink, to replace the more complex CRT driver. The control is performed via a PID controller, where the input error variable is the difference between the actual speed and the reference speed, given by a target velocity profile made with the CRT model with a powertrain of 720 kW. The choice of using a more powerful engine is to ensure that the Simulink model can only follow the CRT model in order to remove any upper bound to the performance of the optimized solution. The PID is tuned with the dedicated Simulink Toolbox Simulink Design Optimization. In Figure 4 is shown the vehicle speed profile obtained with the Simulink model compared to the co-simulated model.

Optimization problem
The focus of this study moves now to the optimization problem. It is worth recalling that the aim of this optimization is to reduce the fuel consumption, by defining where the electric powertrain is to be used, taking into account that the energy available from the battery is equal to the net recover energy net of the e-powertrain after losses. A second optimization in addition to fuel consumption reduction is the battery size minimization, by reducing the difference between the maximum and minimum value of SoC in a lap. The adopted approach is as follows: initially perform a single-objective optimization to define the fuel per lap consumption and have an indication of the maximum battery capacity necessary to cover the optimized lap; secondly a multi-objective optimization is performed to identify the relation between the fuel-consumption and the battery capacity, the battery capacity being set from the single-objective optimization. The optimization has been made in MATLAB using the toolbox Optimization Toolbox, coupled with Parallel Computing Toolbox and Global Optimization Toolbox, has been used.

Single-objective problem
The first optimization aims to minimize the fuel consumption. The decision variable used for this study is the activation/de-activation of the electric powertrain, transferring the torque request from the electric motor to the ICE (see Section 2.2.1). The variable domain is limited to the straights of the track, that in this study are intended as part of the track where the performance is power-limited and not tire-limited. With this definition are defined in each track a number of straights where it is up to the optimizer define where to use the e-powertrain. In fact, the algorithm consider that in each straights, if the conditions permits it, e-powertrain must be used at the beginning of the straights, and the optimizer decide where to stop the use of the e-powertrain.

Multi-objective problem
In this optimization the goal is to minimize two variables during a lap: the fuel consumption and the difference between the maximum SoC and the minimum SoC. This optimization gives a correlation between the fuel consumption and the battery size, and thus it is possible define the best e-powertrain activation in different race strategy condition, i.e. the e-power profile that minimize the fuel consumption, or the SoC use, depending on which is fixed.

Genetic algorithm
The genetic algorithm has been used because the decision variable used for this study is not a continuous variable, and this make impossible to use gradient-optimization based algorithms such as "fmincon" present in MATLAB. To better illustrate the necessity for a genetic algorithm, Figure 5 shows a typical profile activation of the e-powertrain.   As expected, Figure 7 shows that the correlation between the two objective variables to minimize are inverse dependent. The figure shows the result of an optimization performed by means of 20 generations and 200 individuals per generation. This combination, like in the single-objective function, is the result of a trade-off between accuracy and simulation time for the whole optimization. Another test was run with a bigger population and more generations (250 individuals and 896 generations); as a result it converged before max generations limit was reached (reached at 117 iterations) thus demonstrating that results are acceptable with the first choice of generations and individuals, as suggested in [5].

Conclusion
In this work, a method for torque strategy definition has been proposed to minimize the fuel consumption and battery usage. VI-Grade CarRealTime has been used to define an initial velocity profile target and vehicle dynamics behaviour. A second model in co-simulation between CRT and Simulink has been developed to define a custom torque strategy in the hybrid powertrain. Finally a Simulink vehicle model has been defined to reduce the computational effort in the optimization process. More precisely the optimization problem has been split in two optimization: the former, consisting in a single-objective optimization, defined the minimum fuel consumption and a target battery size; the latter, consisting in a multi-objective optimization, defined the correlation between the minimum battery size and the minimum fuel consumption. Thanks to these two processes it was possible to define a target for battery and fuel tank sizing.