Battery model impact on time-optimal co-design for electric racing cars: review and application

The sustainable mobility trend touches the racing world as well, from the hybridization of Formula 1 (F1) and Le Mans Hypercars to the fully electric Formula E racing class. In this scenario, the research community is studying how to push electric racing vehicles to their limit, combining vehicle dynamics and energy management, to successfully solve the minimum lap time problem. Recently, this class of problems has been enlarged towards optimal sizing, with a particular interest in batteries, which represent the main bottleneck for electric vehicle performance. In this work, starting from a thorough review of literature approaches, we define a general optimization framework of minimum lap and race time problems for electric vehicles, suitable to figure out the impact of different modeling choices on both problem structure and optimal variables profiles. Exploiting a case study on Generation 3 (Gen 3) of Formula E cars, we delve into the impact of battery models' complexity on both optimal sizing and optimal battery usage. We show how highly detailed models are necessary to study the evolution of both battery and vehicle control variables during the race, while, simple models are more than sufficient to address the battery sizing problem.


I. INTRODUCTION
In the last decade, the interest in vehicles equipped with electric powertrains has considerably increased in light of the transition towards sustainable mobility.In this context, many technological challenges have emerged [1], and batteries represent one of the most impelling obstacles towards the fullscale adoption of Electric Vehicles (EV).Indeed, the current technologies available on the market suffer from multiple weaknesses, such as high costs, lower energy and power densities than fuel, and safety concerns [2].
As often happens in the automotive field, the most challenging technological progresses are driven by racing competitions, and vehicle electrification does not represent an exception.This fact is demonstrated by the hybridization pursued by Formula 1 (F1) and Le Mans Hypercars, and, most importantly, by the fully electric Formula E racing class, which has just revealed the plan for the new Generation 4, which will start racing in 2026.In racing competitions, performance is merely evaluated by the lap time, and in the specific case of electric vehicles, batteries represent the main bottleneck for performance.Indeed, manufacturers have to cope with the trade-off between the high energy and high power density of current state-of-the-art technologies, as a fragile balance among disposable energy, power, and weight.The pivotal role of batteries is also motivated by the continuous development of new technologies for automotive (see [3] for a complete overview), which represents a significant opportunity in the direction of performance enhancement in the future.Compared to urban vehicles, where the sizing of batteries and other powertrain components is chosen to maximize mileage and durability while satisfying economical constraints, in the racing context the focus is shifted towards the maximization of the vehicle performance given the requirements of the specific competition, e.g., mileage, weight, and power limitations.Thus, in the described scenario, the ability to evaluate the performance and to select the size of powertrain and battery pack components, for a given application, represents a key tool for racing vehicle manufacturers.
Literature Review.As a consequence, in the scientific literature many works have emerged tackling the problem of performance optimization for electric racing vehicles, where the role of the different components is taken into account, as in [4], [5], with an eye on batteries in [3], [6].These works rely on the definition of an Optimal Control Problem (OCP), where each vehicle component is suitably modeled, and the time to cover a single lap or a full race is minimized, as a proxy for the vehicle performance.Minimum Lap Time (MLT) problems are widely studied in the scientific community of vehicle dynamics, as a tool to analyze and understand how to improve vehicle performance [7], [8], from the coupling of Quasi Steady State (QSS) methods and g-g plots [9], up to modern OCP solutions [10], starting from the 1990s.The family of OCP consists of a nonlinear optimization problem, setup to minimize the lap time and constrained by the vehicle dynamics.In this context, employed models span a variety of approaches: the vehicle can be modeled through either a simple point mass or a more complex multi-degrees-of-freedom (DOF) model, e.g., in [11], [12], while the trajectory can either be dictated or left free as an additional design variable.In the world of hybrid and electric vehicles, the standard vehicle model is the single DOF point mass driving on a fixed trajectory (see [4], [13]- [19]), especially when the focus is on the design of either the energy storage system or the powertrain, since it is able to grab the most relevant energy-related phenomena.As exceptions, [20] and [5] propose MLT solutions employing respectively a double track model with load transfer, and a fourteen DOF model including suspensions.The literature of OCP for hybrid electric vehicles is polarized towards the convex formulation based on [21], from the first work in [13] on a hybrid F1 car, followed by [14] and [15].Inside this convex framework, [4] represents the first example of MLT for fully electric arXiv:2312.17003v2[eess.SY] 7 Jun 2024 racing vehicles, where special effort is given to model and analyze the impact of both electric motor and transmission layouts.In all mentioned works, given the lap time objective, the battery is always modeled through a highly simplified equivalent circuit with constant voltage.In the light of sizing and management of the energy storage system, together with the temperature management of powertrain elements, a natural extension of MLT problems is represented by Minimum Race Time (MRT) ones, where mileage represents a key aspect in the optimization.In this scenario, [22] proposes a trajectory optimization OCP to devise a two laps race strategy for an autonomous electric vehicle, accounting for the temperature of the electric motor; while, in the flavor of convex formulations, [23] enlarges the MLT problem to a race as a sequence of stints for an endurance car, to outcome the optimal race strategy.In this context, the optimal sizing of batteries for electric racing vehicles has been addressed only by [6] and by its hybrid architecture extension in [3], which have first introduced a more complex battery model, where the voltage depends on the state-of-charge of the battery, to retrieve more reliable battery outcomes.These two works tackle the race problem in the same way as MLT ones, enlarging the optimization to the whole race length.It is worth mentioning that, different approaches to the race problem are proposed in [23] and [19], where a model of the lap time is learned from a large multitude of MLT-OCP solutions (e.g., through Artificial Neural Networks as in [19]), and the whole race is optimized through a simpler higher level problem, merging multiple laps.
Aim and Scope.Considering the described state-of-the-art, the objective of our research is the study of the impact that different models can have on the structure of the resulting OCP, and on the obtained optimal size of a battery pack.In particular, we aim at highlighting the role of battery models, whose variety of choices entails the need for a precise guideline to catch different design objectives.In this way, we can address the problem of understating the amount of battery information that is needed a-priori when designing the battery pack for a racing application.Moreover, as a byproduct, we aim to tidy up the multiplicity of literature approaches for each component of a racing EV, inside a unified mathematical framework.
Main Contributions.The novel contributions of our work can be decomposed into two main branches.(i) We outcome a comprehensive literature review of minimum lap-race time problems for electric racing vehicles, with a focus on the different models employed for each subsystem: vehicle dynamics, powertrain and brakes, and batteries.Moreover, we show that the manifold of approaches available in the literature can be framed in a unified mathematical description of the problem, whose structural breakdown allows a straightforward analysis of its properties as a function of the modeling choices.Finally, to enhance the overall readability, all the derived model formulations are summarized in Tab.I, where the entire OCP is reconstructed, both in convex and non-convex forms.(ii) Regarding the impact of battery models, we leverage the previous works in [6] and [3] as a starting point, moving the focus from the selection of the best chemistry towards the choice of the most suitable battery model as a function of the designer objective.In this respect, we derive a practical guideline to select the complexity of the battery model, tailored to the desired objective, via a meaningful case study: the Formula E Generation 3 (Gen 3) in the 2021 Rome ePrix circuit, i.e, the current most challenging racing scenario for fully electric vehicles.The results suggest that the simplest possible battery model, whose parameters can be retrieved from easy-access datasheets, is sufficient to attain consistent sizing results, while the need for realistic behaviors of the optimized variables, for control purposes, can be obtained only via the more complex models, whose characterization might ask for further identification processes.In addition, we provide a detailed comparison between convex and non-convex formulations, showing their consistency in terms of race time and sizing results, but also their differences in the optimal profiles introduced by the needed relaxations in the convex solutions.
Outline.In Section II, the joint minimum race time and battery sizing problem is formally defined, highlighting the structural breakdown of the constraints and deriving its bi-level formulation.In Section III, the different modeling approaches of each vehicle subsystem are analyzed in detail, discussing the impact of the different choices on the convexity property of the optimization problem.Finally, the case study is tackled in Section IV, where the impact of the derived battery models is discussed both in terms of sizing results and of the obtained profiles reliability, providing a useful guideline for the problem.The paper is ended in Section V with concluding remarks.

II. THE JOINT MINIMUM RACE TIME AND BATTERY SIZING PROBLEM
As already discussed in [6], the joint optimization of race time and battery size can be cast as a single Co-design Optimization Problem (Co-OP), relating the sizing parameters of the battery pack to their impact on the achievable race performance on a given circuit.In the literature, this codesign framework represents a common approach to tackle sizing problems of hybrid electric vehicles, both in racing, as in this work, and in non-racing applications.In the latter scenario, the final objective is typically different from time minimization (see [24]- [26]), and mainly focused on standard hybrid powertrains.In this work, we build up the formulation provided in [6] for the racing context, highlighting how different modeling choices, with special attention to batteries, impact the properties and the outcomes of the resulting Co-OP.Towards this aim, we structurally divide the set of optimization variables U of the Co-OP as U = [u s , u v , u p , u b ], where u s represents the set of sizing battery parameters for a fixed cell technology, and u v , u p , u b collect, respectively, all state and control variables related to the vehicle dynamics, the powertrain and braking system, and the battery.From this description, the Co-OP can be mathematically formulated as: where, the objective t race defined in (1a) represents the overall race time to be minimized, while the feasible set, defined by the intersection of constraints (1b)-(1f), can be easily interpreted, thanks to the partition of U as follows.
(i) Set S defines the admissible values for the tunable battery size parameters, which are typically expressed through box constraints.(ii) Sets V , P, B model the evolution of the state variables and the possible physical limitations respectively of vehicle dynamics, powertrain and battery subsystems.Such three constraint sets are independent of the other subsystems' variables, while they can be affected by the sizing ones u s , as shown in Section III.As an example, B constrains the evolution of the state-of-charge of the battery based on both the battery current and the size of the battery itself.(iii) Set C models the coupling among the subsystems, and possibly the sizing variables.As already discussed in [6] and [27], Problem (1) can be reformulated, safeguarding the global optimum, as a bilevel optimization problem composed of two nested layers: the sizing variables u s are optimized in the outer layer, where the cost function is evaluated through the inner one, which solves the minimum race time problem, given a fixed value for the sizing variables ūs ∈ S .The described bi-level optimization problem can be formulated as: Before moving on, we introduce here a fundamental modeling tool, common to all subsystems of the problem.As explained before, the main objective of the sizing problem in (1) for a racing vehicle is the minimization of the race time, which can be expressed as: where t is the time, S is the race length.To formulate an Optimal Control Problem (OCP), we exploit a state-space reformulation where the covered space along the race-line s becomes the independent variable [13], [28] and the link between space and time is given by the vehicle speed v: As extensively used in the following section, (4) represents the building block to transform all dynamic equations in each subsystem of Problem (2) from time to space domain.To highlight the strong dependence of all state equations from the vehicle speed v, Problem (2) can be rewritten as: where v is omitted in the first constraint because, as it will be explained in the next section, it always belongs to vector u v .Thus, we remark that the vehicle speed profile is an optimization variable, and is not imposed a-priori.The formulation of Problem ( 5) provides a plain description of the optimization problem, where each subsystem -vehicle, powertrain and battery -is modeled through an independent set of constraints plus the coupling terms, possibly shaped by the fixed sizing variables.
In the following sections, a comprehensive overview of the modeling approaches employed in the literature for each subsystem is presented, highlighting their impact on the structure of the optimization problem, and on the significance of both sizing results and optimal profiles via a suitable case study.

III. MINIMUM RACE TIME MODELING
As anticipated, the focus of this work is the analysis of the properties of the inner layer problem -i.e., the minimum race time one -looking at the impact on the sizing results of the outer one.So, we remark that we do not deepen the properties of the outer layer, mainly for two reasons: (i) it represents a different topic that requires a dedicated analysis, and (ii) in most cases, like in the example of Section IV, it can be easily solved either through greedy brute-force approaches, like gridding, or via more efficient gradient-free solutions, as in [3], [6], with Bayesian Optimization, due the limited size and discrete nature of the problem.
Given this premise, in this section, the different modeling approaches employed in the literature for each subsystem of the inner layer of Problem ( 5) are considered, analyzing their impact on the problem structure.A specific focus is given to the convexity property, which plays a fundamental role in optimization [29].Indeed, convex formulations of optimization problems can be very convenient for two main reasons [29]: (i) any local minimum is also a global one, and (ii) the availability of reliable and efficient off-the-shelf solvers.Thus, convexity represents a nice to have property also for the class of problems tackled in this work, in order to guarantee global optimality and ease of solution despite the possible huge dimension of the problem itself, as discussed by many works, like [4], [13].On the other hand, many physical laws employed in these problems are modeled by non-convex relationships, requiring possible significant approximations to keep them convex.This clean trade-off between convex and non-convex approaches is investigated in detail in this section from a modeling prospective, while the effect on results is addressed in Section IV.We refer to Tab.I for a summary of all the possible models described in the following of the section.

A. Vehicle Dynamics Model
In the minimum lap/race time framework, especially when the main goal is the sizing of the energy storage system, the point-mass model is typically employed [4], [13]- [19], to face the trade-off between model accuracy and complexity.The reason is two-fold: (i) the race-line is considered fixed and lap invariant, and (ii) the point-mass model is sufficient to capture all the energy related phenomena, which are the key elements for the battery sizing problem, as validated from an energy-related perspective in [6] or [18] against a commercial simulator.The point mass model describes the dynamics of a vehicle only by means of the evolution of the longitudinal speed, which is computed by the following force balance: initialized as: where v is the vehicle speed tangential to the fixed race-line, which is described by the curvature ρ R (s) and slope θ(s).
The force F drag = C drag v 2 represents the drag resistance, defined by the aerodynamic drag coefficient C drag , which is the predominant friction contribution in racing cars due to the high speed.
The force F roll = C roll F z is the rolling resistance, which is proportional, via the rolling coefficient C roll , to the vertical load F z , which is defined later in (10).Force F g = M g sin(θ), instead, is the gravitational resistance, where g = 9.81 m/s 2 is the gravitational acceleration.Parameter M is the total mass of the vehicle, comprising the battery M b and the chassis M v one, and R w is the radius of a single equivalent wheel.Finally, T w , i.e., the total torque applied to the wheel, is the control variable that affects the longitudinal speed, while v 0 represents the initial speed, which can model either a standstill or a rolling start.Following the state-space reformulation introduced in (4), the vehicle state equation becomes: (8) We highlight that, all the variables are expressed in a coordinate frame attached to the vehicle, where the x axis is the longitudinal direction, the z axis points upwards, normal to the track, and the y axis completes the right-handed coordinate system.We refer to [3] for a pictorial representation.Given the assumptions of point-mass model and fixed trajectory, the lateral dynamics is accounted for via the friction-ellipse static constraint [6], [20], limited by the peak values of longitudinal and lateral friction, µ x and µ y as: where total longitudinal, lateral and vertical forces -respectively F x , F y and F z -acting on the vehicle are defined as: where the aerodynamic downforce is expressed as , and C down is the aerodynamic downforce coefficient.Exploiting the force definitions, (9) becomes (11) It is worth mentioning that, in many literature works, e.g., [4], [13], the ellipse constraint is relaxed by a rectangle, decoupling longitudinal and lateral limits, allowing the computation in advance of the maximum vehicle speed value achievable along the race-line, combining expressions of lateral and vertical forces in (10).For the purpose of our work, we stick with the ellipse formulation, which represents a better description of the driving at the limit concept typical of the racing scenario.From the above description of the vehicle model, we can specify the cost function in (5), the vector of optimization variables u v = [v(s), T w (s)], and the constraint set V , composed by equations (7,8,11).In this formulation, which is summarized in Tab.I, non-convexity arises due to multiple reasons: i) the term 1  v in the cost function (5), ii) the term 1 v and the term proportional to v 2 in the state dynamics equality constraint (8), and iii) the fourth-order polynomial dependence from v in the inequality constraint (11).Nevertheless, different works, starting from [21] and [13], have shown that it is possible to rewrite the vehicle dynamics part of the optimization problem into a convex framework.This formulation is achieved from the non-convex one by following the three steps below.
(i) The lethargy dt ds (s) is introduced as an additional optimization variable, making the cost function (5) linear, thus convex: Despite this, the link between vehicle speed v(s) and lethargy still introduces the non-convex constraint v• dt ds = 1, which can be however relaxed as: that is a convex constraint since it can be expressed as the second-order cone (see [4] and [13] for more details) where v = 1 m/s is the normalization speed.(ii) The kinetic energy of the vehicle E kin (s) is introduced as a state variable in place of the speed v(s), generating a linear, thus convex, state equation, since the spatial derivative of an energy is a force, and the drag resistance is a linear function of the kinetic energy: initialized as: Finally, the non-convex quadratic equality constraint between kinetic energy and speed, E kin (s) = 1 2 M v(s) 2 , is relaxed as: to obtain a convex quadratic inequality constraint.(iii) The non-convex ellipse limit in (11) can be expressed as a convex constraint exploiting the norm operator and the linearity of both centripetal and aerodynamic forces with respect to kinetic energy: ) To retrieve a convex formulation for the vehicle dynamics, the two relaxations ( 13) and ( 17) are necessary, but, fortunately, they do not change the global optimum.Indeed, the solution of the relaxed problem is equivalent to the non-relaxed one, because both constraints would be satisfied with equality.Indeed, 1) to minimize the race time, the lethargy dt ds must be minimized, meaning that, given a vehicle speed the first relaxation (13) would be satisfied with equality; 2) then, for the same reason, the optimal solution would maximize the vehicle speed, which is limited by the kinetic energy constraint, leading to the tight satisfaction of the second relaxation (17).
To recap, the convex formulation of the vehicle dynamics has u v = dt ds (s), v(s), E kin (s), T w (s) as set of optimization variables, and the set V defined as in Tab.I as the set of constraints (14,15,16,17,18).We claim that the vehicle dynamics part of the optimization problem in (5) can be expressed, without approximation, as a convex problem, at the price of two additional optimization variables, one for each constraint relaxation, which may increase the computational burden.We remark also that this convex formulation is not limited to the point-mass model of a vehicle, but it can be extended to more complex scenarios, as shown by [20] with a double-track model for a minimum lap time problem.

B. Battery Model
In this section, we discuss the core topic, namely the modeling of the battery subsystem in Problem (5).In a sizing problem, the battery model should be able to capture (i) the internal energy losses, (ii) the dynamics of the disposable energy, and (iii) its physical limitations constraining the achievable performance, while keeping the complexity as low as possible.In this scenario, electro-chemical models [30] are far away from being exploitable, and it is well-established that Equivalent Circuit Models (ECM) can be the right tool to use, see [3], [6], [18], [23].The family of ECMs is wide, and we can search for the right balance between complexity and accuracy, which affects both the structure of the problem and the significance of the results.In the next part of the section, we describe three possible modeling approaches, with increasing complexity, from a non-convex perspective, and then, as in Section III-A, we discuss how, whether it is possible, to obtain a convex formulation for the subsystem.
All three models share some common variables and equations, that are summarized in this paragraph.The battery pack is made of a multitude of cells, taken from a specific technology.Each cell technology is characterized by its weight m cell , a nominal capacity q cell , an internal resistance r 0,cell , and an Open-Circuit Voltage (OCV) v oc , the latter possibly function of the state-of-charge (SoC), labelled with ζ in the equations, of the cell.From these definitions, the related variables at the battery level can be computed as functions of the battery size parameters, i.e., the number of cells in series N s and in parallel N p : Each battery model includes also the SoC dynamics, which is expressed through the battery current I b (s) using the spatial reformulation in (4) as: Moreover, the whole battery pack weight M b , affecting the vehicle mass M in (6), can be expressed as: where α is the packaging factor accounting for the weight of the battery case, which is modeled as the (1 − α) percentage of the overall weight.Then, to exploit the battery in its correct operating region, strict constraints, obtained from cell limits on voltage (v min , v max ), current (i min , i max ), and SoC, are introduced: where V b is the battery voltage at the terminals, whose expression depends on the chosen model.Finally, to comply with possible regulations, a limit on the power achievable at the terminals of the battery, i.e., P b (s) = V b (s) • I b (s), is introduced: In the following, the peculiarities of each non-convex battery model are described, deriving its own formulation inside the optimization problem. 1) Static ECM with constant OCV (V n -R).
It is the simplest model, where the open-circuit voltage is assumed to be constant and equal to the nominal value:  (20,22,23), where This second model integrates the well-known dependence of the open-circuit voltage from the state-ofcharge to improve accuracy, i.e., where the dependence can be any nonlinear function matching experimental data.In this second model, vector is the same as the first one, while the constraint set B is very similar to the previous case, as shown in Tab.I, where In this last case, we leverage the Randle model, which adds dynamic components to the second static equivalent circuit in the form of RC pairs, which account for the relaxation dynamics in the cell.In our work, we consider a model with a single RC pair, chosen as the one with the longest time constant [30], because fast ones are typically characterized by much lower resistance values, thus less impacting on the disposable energy.We enlarge the set of optimization variables, to include an additional state, namely the voltage V 1 across the equivalent RC pair at the battery level, whose resistance and capacitance values at the battery level are obtained using Thevenin's equivalent from cell's ones as

Ns
Np , and whose state equation reads as From this addition, set B enlarges the previous one including (24), as visible in Tab.I, where As stated before, all the three introduced models are defined through non-convex constraints, due to the presence of term As explained for the vehicle dynamics model, the spatial derivative of energy is a force, meaning that, declaring the open-circuit and terminal forces, F oc (s) and F b (s), from the respective powers P oc (s) and P b (s) as: we can derive the state equation for the battery energy evolution as: (ii) From simple manipulations of the equations, the power loss in the internal resistance can be written as: Exploiting the definition of F oc (s), F b (s), and lethargy dt ds , the power loss in the internal resistance can be written in terms of forces as: To obtain a convex formulation, ( 28) is relaxed by: which is a second-order cone, as shown in [4]: where v = 1 m/s and F = 1 N are normalization terms.This last relaxation requires an important remark: if on the one hand, it allows to obtain a convex formulation of the model, on the other hand, differently from the vehicle dynamics case, it is satisfied with equality only when the battery energy should be optimized to minimize the race time.In all other cases, the internal battery loss can be overestimated, leading to nonphysical profiles, as shown in Fig. 6 for the case study.Finally, from (25), the battery linear inequality constraints ( 22) and ( 23) are rewritten in terms of forces as: where From the above description, in the convex reformulation the vector u b is defined as u b = [E b (s), F oc (s), F b (s)], while the constraint set B, as in Tab.I, contains equations (26,30,31).
To conclude, we highlight once more that this convex reformulation is possible only for the model with constant OCV introducing the aforementioned relaxation.Even if in [31] a linear dependence of such a relationship is integrated into a convex framework for energy optimization, its applicability can not be extended to the minimum lap-race time problem, due to the needed spatial reformulation.

C. Powertrain, Brakes and Coupling Constraints
The integration of the battery and vehicle models is achieved via both coupling constraints and powertrain-brakes modeling, whose models are highly influenced by the required level of detail.In racing electric cars, we identify three main components connecting the battery to the vehicle: (i) inverter, (ii) electric motor, and (iii) gear-box.As a preliminary observation, the dynamics involved in these subsystems are typically orders of magnitude faster than the vehicle one, so that, as far as we are aware, no state variables are considered in any previous work (inside vector u p ).The only exception regards the temperature dynamics of the electric motor, see [22] and [17], which however falls outside the domain of interest of this work, where we stick with the assumption in [6] and [3] of the presence of a properly sized cooling system able to keep the temperature under control.
The inverter is rarely accounted for in literature: in [23] the losses are modeled through a fitted quadratic function, framing it in the convex scenario through a similar relaxation technique used for the battery pack in (29); in [32], instead, the losses are introduced on semiconductor level, including both conduction and switching losses in a non-convex optimization setup.On the contrary, the electric motor is widely considered: [20], [23] and similarly [4], account for the motor limits and its losses via a quadratic model, fitted from data, as functions of the operating point; [17] and [18] employ a simpler model of the losses, just proportional to the square of the output power.In all these approaches, the models of the losses are relaxed, similarly to (29), to be included in a convex framework.We remark that the same approaches can be employed without relaxations in a non-convex setup, like in [19] for F1 hybrid cars.Finally, regarding the gear-box, most literature works, see [23] and [20], use a Fixed Gear Transmission (FGT) model with constant gear ratio and efficiency.However, [4] enlarges the analysis comparing the FGT model with a Continuously Variable Transmission (CVT), where the losses are included via a fitted quadratic model, always relaxed to be in a convex framework.
Despite more complex models can be included, as in [32] and [23], given the energetic perspective of battery sizing problems, we employ the simplest possible one, namely a single average efficiency η mapping the entire chain from the battery to the wheel, thus, including the electric motor, the inverter, and the gear-box.In this way, the focus is given to the impact of the different battery models discussed in Section III-B.Despite its simplicity, a fixed efficiency with a bi-directional flow of power can not be easily modeled, since the value of the efficiency is a discontinuous function of the sign of battery current: where T m (s) is the torque delivered by the electric motor, which is part of the powertrain variables u p , together with the brake negative torque T br : The discontinuity in (32) can be smoothed as proposed in [6] to obtain a non-convex differentiable equality constraint: where β η represents a design smoothing variable.In conclusion, in the non-convex scenario, the sets P and C , as shown in Tab.I, are defined respectively by the constraint on the negative sign of the brake torque (34), and by ( 32) and (33) for the efficiency of the transmission, along with the definition of the total torque at the wheel as the sum of motor and brakes (34).
As already stated, the smoothing of the efficiency model in (33) still represents a non-convex constraint.Nevertheless, a convex solution can be obtained employing a technique proposed in the literature for the gear-box efficiency [20].In this solution, see also Tab.I, the brake torque does not explicitly appear, so that u p and set P can be left empty, since the total torque applied to the wheel T w (s) includes the electric motor one.The discontinuous efficiency is accounted for in the coupling constraint via the following double inequality: The constraint relaxation in ( 35) requires a two-fold explanation: (i) Tw Rw − ηF b ≤ 0 models the traction phase, and it is satisfied with equality when the battery energy should be optimized to minimize the race time; (ii) Tw Rw − 1 η F b ≤ 0 models the braking phase, where the difference between wheel and efficiency-scaled battery power is allocated to the mechanical brakes as: If, on the one hand, such an implicit brake formulation allows to reduce the number of optimization variables with simpler constraints; on the other hand, it does not allow the simulation of situations where mechanical brakes are absent or power limited, like for the rear emergency brakes of Formula E Generation 3, which can be easily handled with the non-convex formulation in (34).

IV. THE IMPACT OF BATTERY MODEL ON MRT AND SIZING: A CASE STUDY
To evaluate the impact of the different modeling choices described in Section III, a case study is addressed.Similarly to [3], [6], the vehicle is a Formula E car, specifically the Generation 3, and its parameters are shown in Tab.II.Concerning the battery cell, we considered a single technology, the Sony Murata US18650VTC6 (VTC6), representative of the racing context, as demonstrated by its usage in the Formula E Generation 2 championship.Its parameters, are reported in Tab.III, highlighting if they are available from easy-access datasheets * , † or if an identification process is required.The identified parameters come from three different identification procedures proposed in [33], considered as possible alternative models.To summarize, the following models are considered: (i) V n -R, characterized by the nominal constant open-circuit voltage and one resistance; (ii) V SoC -R, with a SoC-dependent open-circuit voltage and one resistance; (iii) V SoC -RC, with an RC couple in addiction to V SoC -R, taking into account the three sets of values in Tab.III.The impact of the modeling strategies is analyzed following these two steps: (i) the optimal battery size -for the 23 laps of the 2021 Rome ePrix (see [3] for a pictorial representation) -is compared using the different battery models in the nonconvex formulation; (ii) the evolution of vehicle speed and battery variables is discussed for the optimal battery size, highlighting the potential differences induced by the different battery models; finally, the consequences of using the convex formulation are also discussed.We highlight that, in this specific scenario, the slope θ(s) is set equal to zero, because the considered track is flat.Both approaches have been discretized with ds = 15 m using the fourth-order explicit Runge-Kutta method [34], which keeps the linearity -and so convexity -in the convex formulation, and increases the overall accuracy in presence of significant discretization lengths.The value of the discretization step, coherent with previous works in [6] and [3], is chosen as a compromise between accuracy and complexity, allowing to achieve both consistent sizing results and speed profiles, even when compared with finer space discretizations.The non-convex approach is parsed with CasADi [35] and solved by employing the interior-point algorithm (IPOPT) [36] combined with the MA57 linear solver [37].The convex approach, instead, is parsed with YALMIP [38] and solved using MOSEK [39].Regarding the computational load, we highlight that there are no strict requirements since the optimizations are performed offline.To a give a flavour, the non-convex case with the V n -R battery model, which has a total of 30362 optimization variables and 75903 constraints, takes on average 43.5 s to return the optimal solution on a personal computer equipped with a 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz 2.30 GHz processor and a 16GB RAM.

A. The Impact of Battery Models
The cost function to be minimized, i.e., the race time, in this case study is a sole function of the number of cells in parallel N p , which is chosen as the battery size design parameter: u s = N p .Indeed, the battery cell technology is fixed to be the VTC6, while the number of cells in series N s is 209, so to impose the maximum battery voltage: N s v max = V max .Therefore, to compute the solution, the race time is evaluated for N p ∈ {10, ..., 30} with a grid approach.Results are shown in Fig. 1: it is visible that the computed race time increases along with the model complexity.This trend is motivated by the reduction of net battery capacity, due to both the nonlinear open-circuit voltage characteristics and the total resistance increase (R 0 + R 1 ).We highlight that the set of RC couples is intentionally sorted with increasing R 1 in Tab.III to enhance the readability of the figure.Concerning the optimal point, the first three models (V n -R, V SoC -R, V SoC -RC1) share the same optimum N p = 24, while the other two (V SoC -RC2, V SoC -RC3) have the optimal point in N p = 25.Indeed, this is a natural consequence of a lower net capacity, which calls for a bigger battery size.However, looking at the negligible race time difference between the solutions with 24 and 25 cells in parallel for the more complex models, we can appreciate the limited error introduced by a simpler battery model.In order to compare the evolution of different variables during the race, we consider now N p = 24.Fig. 2 compares the behavior, in the lap-domain, of both SoC and operating regions of battery current and voltage for V n -R, V SoC -R and V SoC -RC3; the latter being the model with RC values with the highest impact on the results (see again Fig. 1).All three solutions end the race with almost zero state of charge, leaving the battery without available energy, meaning that the battery is not oversized.We can also see that the V n -R state of charge profile is more different with respect to V SoC -R and V SoC -RC3, which are closer to each other.This aspect is motivated by the real shape of the OCV in Tab.III that is neglected in V n -R, using the constant nominal one.This has a consequent impact on the battery current and voltage operating regions.At the beginning of the race, the battery is fully charged, meaning that the open-circuit voltage is close to the maximum value allowed at the terminals (as visible from the picture in Tab.III), thus limiting the maximum negative current achievable during braking.On the contrary, when the SoC lowers, the open-circui voltage decreases as well, so that the battery current should increase during traction phases to match the maximum power constraint (23).
Focusing on the fourteenth lap in Fig. 3, it is possible to compare in more detail the different modeling approaches, because, in this lap, the open-circuit voltages of the more complex models are close to the nominal one.First of all, we can appreciate the similarity among the optimized speed profiles, despite the differences in the voltage generated by the RC dynamics in V SoC -RC3, which are compensated by tiny current dissimilarities to match the power requirement.These comments naturally reflect on the achieved race times, as evident by the alike shapes in Fig. 1.The reason behind that is something specific for the racing scenario, where the battery power request is characterized by quick changes from hard braking to full traction, which are much faster than the RC dynamics.Indeed, considering the RC set 3, the time constant R 1 C 1 is equal to 27.77 s, while the change between traction and braking occurs approximately every 3-4 seconds.

B. The Impact of Convex Formulations
The analysis now focuses on the convex formulation, comparing it with the non-convex one with a static battery model with nominal voltage (V n -R), because as discussed in Section III, they are equal except for the relaxation of the constraints (13,17,29,35).Indeed, Fig. 4 shows that the two approaches have the same optimal solution, and the cost function only differs due to numerical errors in the integration, induced by solving two different formulations of the same problem, where different state equations are employed.The motivation of this statement is provided in Fig. 5, where the difference between the two approaches is analyzed with respect to the discretization step ds, for N p = 24.In the figure, the gap between achieved race times and the distributions of vehicle speed differences along the race are reported.We can highlight the monotonic trend towards zero of both quantities when the discretization step decreases, providing thorough evidence that both solutions converge towards the same continuous time formulation of the problem.
The aforementioned relaxations can have an important impact on the behavior of the time-lap varying variables.Indeed, if it is proven in [13], and previously discussed in Section III-A, that to minimize the race time the relaxed constraints (13,17) are satisfied with equality, this is not guaranteed for the other two constraints (29,35).Starting with the relaxation of the battery constraint, we can compute in post-processing the value of an equivalent internal resistance R * 0 (s) that satisfies the constraint (29) with equality: The distribution of the values of R * 0 (s) is shown in Fig. 6 for three battery packs with a different number of cells in parallel.It is visible that: if the battery is oversized (N p = 30), the average value of R * 0 (s) is higher than R 0 , because some energy can be freely dissipated without affecting the race time; on the contrary, when the battery is undersized (N p = 11), R * 0 (s) = R 0 because all the energy is necessary to minimize the race time to finish the race.Finally, we can notice that when N p = 24, the equivalent resistance is closer to the real one R 0 , because the battery is optimally sized to cover the race on the considered circuit.Similar considerations can be made for the relaxation of the powertrain constraint (35).Fig. 7 shows the equivalent efficiency of the powertrain in the battery-wheel power plane, where the fixed efficiency and the forbidden region are highlighted.During traction phases (positive battery power), the optimal solution sticks to the desired fixed efficiency when the battery is either optimally sized or downsized, while it can introduce undesired dissipation when the battery is oversized, for the same reasons as before.In braking phases (negative battery power), the optimal solution is correctly not on the fixed efficiency curve, since the difference is dissipated through the mechanical brakes, as already discussed in Section III.
These last discussions allow us to better highlight the possible drawbacks of the convex formulations for the minimum race time problem.First of all, a convex formulation is possible only for the simplest battery model, with constant OCV, thus limiting the accuracy and the capability to describe the different stages of the race.Moreover, the need of constraint relaxation to achieve convexity might lead to non-physical behaviors in the optimal profiles of energy-related variables, which turn out to be less informative for further analyses and developments.We remark here that, with the specific powertrain layout considered in this work, it is still possible to recompute the electrical variables, like power and current, in post-process, moving backwards from the wheel power through non-relaxed models.As final comment, such post-processing might not always applied.For inwith the hybrid battery pack layout in [3], an explicit model to split the total battery power between the two sources would be available.

C. Final Discussion and Sizing Guidelines
From the case study, we can retrieve important information about the minimum race time optimization and the optimal battery sizing for an electric racing car: if, on the one hand, more complex models are fundamental to compute the real evolution of the control variables, on the other hand, simpler ones are sufficient for sizing purposes.As a matter of fact, we have shown how the problem can be simplified up to a convex formulation without experiencing significant errors in the sizing results, as demonstrated by the negligible differences among the different battery models.As a consequence, we can state that the model with constant OCV attains consistent results and can be used as a reference for this purpose, even though the obtained profiles of electrical variables might be not physical.Moreover, since we have shown in Section IV-B that only small race time differences, due to integration errors, are present between its convex and non-convex formulations, we can stick with the former one, exploiting its global optimality properties.
Summarizing the results of this case study, they suggest a guideline on how to approach the battery sizing problems in racing vehicles: (i) optimal sizing can be formulated with the simplest model; in this way, cell information can be retrieved from easy-access datasheets, which typically report the cell weight, the value of the internal resistance, the nominal voltage and the cell operating limits; (ii) more complex models can be experimentally identified, once a cell technology has been chosen and the battery pack sized; (iii) these models can be employed in a minimum race time problem in order to understand more trustworthy evolutions of the variables during the race, with the purpose of designing real-time control strategies.

V. CONCLUSIONS
In this work, we reviewed the minimum lap-race time literature approaches for racing electric vehicles, with a focus on their application to sizing.Through the definition of a general mathematical framework, we analyzed the impact of different modeling choices on the resulting optimization problem, with an eye on convexity.In particular, we focused on different battery models, ranging from static electro-equivalent models with nominal voltage, to dynamical equivalent circuits with a SoC-dependent open-circuit voltage.Their impact on the battery sizing problem has been evaluated through a case study.In this way, it was possible to show that, when the minimum race time paradigm is employed for sizing purposes, simple convex models are more than enough.On the contrary, it is also shown how more complex battery models, requiring non-convex formulations, are more suitable to understand and analyze the time evolution of battery and vehicle variables for control purposes.
Future works will focus on extending the analysis towards the other main components of the electric powertrain: electric motors, transmissions and power electronics.
where v n is the nominal cell voltage.The battery optimization vector is defined as u b = [ζ(s), I b (s)], while the constraint set B, in Tab.I, contains equations ) ≤ F b (s) ≤ P b,max dt ds (s) 0 ≤ E b (s) ≤ E max b , ,

Fig. 1 .
Fig. 1.Comparison of sizing results for all the discussed non-convex battery models, as a function of the number of parallels Np.A zoom around the optimum highlights the similarity among the obtained results.

Fig. 2 .
Fig. 2. Comparison of SoC, current and voltage race profiles with Np = 24, for the three battery models with increasing complexity.For clarity, only the operating region envelopes are depicted for battery currents and voltages.

Fig. 3 .
Fig.3.Comparison of vehicle speed, in the fourteenth lap of the race, with Np = 24, for the three battery models with increasing complexity, a zoom of the current and voltage is given, to appreciate the difference between the models.

Fig. 4 .
Fig. 4. Comparison of sizing results, as a function of the number of parallels Np, between the convex and non-convex approaches for the simplest battery model (Vn-R).

Fig. 5 .
Fig. 5. Comparative analysis of the integration errors between the convex and non-convex formulation of the simplest battery model (Vn-R).Race time discrepancies and distributions of vehicle speed differences are depicted as function ds.

Fig. 6 .
Fig. 6.Distributions of equivalent battery internal resistance along the race for three different battery sizes of the convex problem.

Fig. 7 .
Fig. 7. Comparison of the equivalent powertrain efficiency in the batterywheel power plane for three different battery sizes of the convex problem.

TABLE I SUMMARY
OF THE MINIMUM RACE TIME PROBLEM IN (5).ALL THE MODELS DESCRIBED FOR VEHICLE DYNAMICS, BATTERY, AND POWERTRAIN-BRAKES ARE REPORTED, SPLITTING NON-CONVEX AND CONVEX FORMULATIONS, WHETHER POSSIBLE.