Electric vehicle design, modelling and optimization

Electric vehicles are by many seen as the cars of the future as they are very efficient, produce no local pollution, are silent, and can be used for power regulation by the grid operator. In order to be able to estimate the performances of an electric vehicle it is very important to have a proper model of it. The electric vehicle model is very complex as it contains many different components. Each component needs to be modelled properly in order to prevent wrong conclusions. The design or rating of each component is a difficult task as the parameters of one component affect the power level of another one. There is therefore a risk that one component is rated inappropriately which may make the vehicle unnecessary expensive or inefficient. In this paper a new design model of the electric vehicle is presented. This model is based on the combination of Modelica with ModelCenter. Modelica has been used to model and simulate the electric vehicle and ModelCenter has been used to optimize the design variables. The model ensures that the requirements related to driving distance and acceleration are fulfilled.


Introduction
With the considerable development of the mechanic industry, means of transportation are increasingly numerous.The car remains the most coveted locomotion.There are two major types of vehicles: the usual cars which are equipped with a combustion engine and those which are electric.The electric car has not yet replaced the gasoline car.This type of vehicle has various disadvantages, particularly in terms of cost, autonomy, supply and speed [1].Indeed, the production of different parts of the car is much more complicated, the cost becomes necessarily higher and the battery is drained within few hours.The battery recharging should be carried out approximately every 100 km.These drawbacks are not so far definitive.The increase in fuel prices and emission standards require new technologies that are developed to meet these needs.At the same time, the automotive industry needs always to satisfy its customers by keeping up a high performance standard.For that, manufacturers are trying to find a way to fix it, having the hope that the electric car can win in the near future the heart of consumers.
Preliminary design of electric vehicles [2][3][4] can be performed using different tools such as multi-domain a Corresponding author: amir.guizani@supmeca.frVHDL-AMS, Matlab/Simulink or Modelica.Several studies were performed to improve and optimize models of electric vehicles in order to obtain a more reliable and more efficient vehicle.For example, the authors in [3] focused on the modelling and design of the battery package which should contain enough energy in order to have a certain driving range and have a sufficient power capability for the accelerations and decelerations.The authors in [4] proposed a simple model to the preliminary design of an electric vehicle; this model was used to optimize the characteristics of the propulsion system (DC motor and gearbox) to meet the performance requirements that are related to different test cases such as the acceleration test, the maximum velocity and the velocity in a grade road.The authors in [5] developed an approach for design and optimization of electric vehicles based on combining SysML, Modelica and surrogate modelling techniques.SysML [6] was used in high abstraction level of conceptual design, Modelica [7] was used to model and simulate the physical behaviour of the electric vehicles and surrogate modelling technique was used to extract compact models and use them for the multidisciplinary optimization.
In this paper, we propose a new model for the preliminary design of an electric vehicle.The proposed model This paper is organized as follows: after the introduction, Section 2 describes the modelling of the electric vehicle, Section 3 presents the simulation results to verify the proposed model, Section 4 provides a case study for the optimization of the electric vehicle and Section 5 gives the conclusion remarks.

Modelling of the electric vehicle with Modelica
Different models of an electric vehicle exist [8,9] as there are many possibilities depending on the type of the electric machine (DC or AC motor), the nature of the inverter (single or three phase) and the characteristics of the battery (high or low voltage).
In this paper, the electric vehicle model has been modelled using Modelica language.The mathematical formulation of the electric vehicle has been inspired from the models developed in references [3,10].This model is composed of the following components (Fig. 1): a battery (DC voltage source), a rectifier (DC-AC inverter), an electric machine (electric synchronous motor), a transmission model, a resistive force and a control system.
A current sensor, a power sensor, a speed sensor and a SoC component are used to measure respectively the electric current generated by the battery, the electric power required by the motor, the vehicle velocity and the State-of-Charge of the battery.

Battery
The objective of this part is to create a model able to simulate the real behaviour of a battery, considering its discharge and also the consequent decrease of stateof-charge.A simple model of the battery is shown in Figure 2.
The battery pack consists of the series and/or parallel association of elementary cells.In this paper the battery model is based on an AMP 20 Lithium Ion Cell2 .Figure 3 shows the internal model of the battery developed with Dymola.
This model is made up of blocks chosen from the Dymola libraries.The main objective of this model is to provide a voltage between the two ports of the battery pin p and pin n to simulate the real behaviour.The voltage U b generates a current measured by the Current Sensor.This current is compared with the allowable current I max .The minimum of these two currents is divided by the number of parallel cells N p in order to obtain the current in each cell (represented by the gain 1).The current from one cell i flows in the block SoC.The other input of this block is the battery capacity C 0 expressed in Ah.
The block SoC calculates the state-of-charge by the following equation: where SoC int is the initial state of charge of the battery.The instantaneous value of the SoC is an entry in a table Vb SOC, which provides the voltage of a battery cell.This value, multiplied by the number of series cells Ns (represented by the gain 2), is used as a reference for generating the voltage of the battery.

Inverter
The model of the inverter was developed using a computational code that basically performs the conversion of DC current into an AC current based on the balance between input power, which comes from the battery, and output power, which is delivered to the motor.
As it can be seen in Figure 4, the model is composed of two input pins (p, n), two output pins (P , N ) and two connectors (a, we).The pins n and N are linked to the ground; the pins p and P are responsible for the connection with the battery and the electric motor, respectively.The first connector a represents the control input signal  used to regulate the amplitude of the three-phase voltage and the second connector we is the electric angular frequency of the motor.
The mathematical code of the inverter is developed in Figure 5.It can be seen that there is only one editable parameter nu, which is the inverter efficiency.Thereby, the designer can alter its value according to the manufacturer specifications of the chosen device.The other variables are used just as calculation tools of the voltage, the current and the power at the input and the output of the inverter.The most important aspect that has been considered during the inverter modelling process is to ensure the balance between input and output powers.This relation is given by: Both electric powers P b and P i are calculated by the product between the voltage v and the current i at the input and at the output of the inverter, respectively.
The output voltages of the inverter are three-phase sinusoidal voltages shifted by 2π / 3 one from each other [11].
For example, the expression of the first voltage phase is given by the following equation: The effective voltage V eff is calculated by amplifying the battery voltage V b as follows:

Electric synchronous motor
The model of the motor represents the transition between the electrical and mechanical levels.As it is seen in Figure 6, the model is composed of two pins and two output connectors.The pins P and N are linked to the inverter and the ground, respectively.The mechanical connector flange a is responsible for the connection with the gearbox, which delivers two outputs: the torque flange .tauand the motor shaft angle flange a.phiThe variable we is the third output of the model and consists on the electric angular frequency requested by the motor to reach the requirements of the driving cycle.It's important to point out that this output connector is linked with the parameter we of the inverter model, described and explained previously.
Therefore, the mathematical modelling of the electric motor has been developed according to the above mentioned parameters, the electric circuit equations and the output mechanical connector.The logic modelling and formulation of the equations are fully explained and detailed in the following paragraphs.Firstly, in order to give to the designer the possibility to change the specifications of the synchronous Motor which he wants to insert on his virtual Test Bench, three performance parameters and six variables (necessary to simulate the characteristics of the internal components of the motor) were created, as shown in Figure 7.
The next step was performed with the objective of facilitating the understanding of the mathematical code.Figure 8 shows the list of the used calculation parameters.As it can be seen, three vectors were created to model the instantaneous values of the three-phase current i, open circuit voltage v and electromechanical voltage E, then, four variables were used to accomplish the transition between the electrical and mechanical levels: the torque C, the electric angular velocity we, the mechanical rotation speed wm and the electric power Pe.
After the declaration of all the parameters and variables, the next step is to write the equations system (mechanical, electrical and electromechanical) characteristic of the electric motor.
So in order to model the real behaviour of the model, the following equations are considered: Equations ( 7) and ( 8) are used to calculate the voltage and the current, respectively (according to the two input ports P and N of the motor), Equation ( 9) is required to ensure coherence between the number of unknowns and the number of model equations (the number of unknowns must be equal to the number of equations).These equations are modeled by the first lines of the code in Figure 9.
Then, the equations of electromagnetic force E are considered.Thereby, in order to take into account the three phases, each value of E is related to the value of its respective current [11].This correlation can be represented by Equation (10), in which the coefficient j varies between {0, 1, 2}.
The open electric circuit of the motor is composed of a resistor R, which represents the internal losses of the machine, an inductor L and a mutual inductance M .The equations that govern the behaviour of the motor are developed in Figure 9. Once the calculation of E is completed, the voltages at the different terminal phases can be calculated [11].For example, the expression of the first voltage phase is given by this equation: The total electric power P e is given by the following equation: After all the mathematical relations responsible for modelling the internal behaviour of the motor were completely  described, the focus now is on specifying the values of the output parameters of the model.For this purpose, firstly the motor torque is calculated by dividing the electric power Pe (is equal to the mechanical power) by the motor shaft angular speed wm.In order to respect the constraints of the machine, the result is compared to the maximum torque C max admitted by the motor and the minimum value between them is considered as the required mechanical torque C. Also the mechanical angular velocity is calculated in the same way, but its value is obtained by the comparison between the motor maximum rotation w max and the derivative of the shaft angle (the derivative of flange a.phi).
Thereafter, the electric pulsation of the inverter we is calculated by dividing the shaft angular speed by the number of pole pairs.All the last mentioned relations are represented in Figure 10.

Transmission system
In the preliminary design level, the transmission system could be simplified to be represented with three mechanical components in Modelica libraries, which are inserted on the global model and connected to the output of the motor.As indicated in Figure 11, these components are: The Gear-Box, the wheel and the mass of the vehicle.
For each vehicle model, there are distinct values of the parameters related to those components.Thereby, the de- signer should specify all the characteristics of the transmission system before launching the simulation.In that case, the three main parameters required to design the transmission system are: the gear ratio R g , the wheel radius r w and the vehicle mass M v .

Resistive forces
This part is made up of two blocks, as shown in Figure 12.The first block consists of a mathematical expression that calculates the resistive force according to the instantaneous speed of the vehicle and the second block gets the generated result and transform it into a response force, which is applied to the last part of the transmission system.

Control system
The Control System is composed of two inputs (reference speed and calculated speed) and one control parameter (inverter voltage control coefficient), as shown in Figure 13.
The PID Voltage is responsible for calculating the difference between the input reference speed and the calculated speed in order to give the most appropriate value for the output parameter a.
To verify the analysis model that will be used later in the optimization process, we will compare the velocity at the output of the electric vehicle with a standard driving cycle provided as input.

Simulation results
In the framework of this study, a driving cycle expresses the speed evolution of the vehicle according to time.It allows evaluating the parameters variations of the vehicle (state-of-charge of the battery, the electric power required by the motor, torque and rotational speed of the motor, etc.).
For the sake of simulation and to reproduce a road path with different driving conditions, we will be using the New European Driving Cycle NEDC [12].In this study, the parameters used in the electric vehicle model are given in Table 1.The objective is to simulate the proposed model.The default values of the N s , N p , Emf and R g are respectively 80, 5, 1 and 6.
The simulation parameters of the vehicle according to the NEDC cycle are given by Figures 14-17.
Figure 14 shows the input signal NEDC and the vehicle speed measured at the output of the component to km/h.This figure confirms that the measured velocity (red curve) follows the profile of the road (blue curve) with an error <2%.
The knowledge of the state-of-charge SoC of the battery is a key element in relation with the behaviour of the complete system.This quantity actually specifies the level of the energy store that constitutes the battery.The quantity mentioned above needs to be evaluated in order to verify if the vehicle can carry out its mission or not Figure 15 shows the variation of the SoC during the NEDC cycle.The first SoC was 80%.The operating range is between 80% and 67%, i.e., the battery has lost 16.25% of its capacity during the NEDC cycle.With a minimum state-of-charge SoC min = 0.2 and the same values of N s , N p , Emf and R g the electric vehicle can repeat 4.6 times the NEDC cycle.
Figures 16 and 17 show the variation of the torque and the electric power during the performance test of NEDC.In the decelerating phases, the electric motor stops providing torque to the transmission.The electric machine therefore receives resistive torques that helps in braking the vehicle (regenerative braking).This energy could be used to recharge the battery, since the electric machine is working as a generator in this phase.
By modifying the input to constant speed, we can simulate different other performance test cases, such as the maximum vehicle velocity, the velocity at 10 s and the velocity in a grade road.For instance, the pick power given by simulation for a test of maximum velocity equal to 120 km.h −1 during 250 s is 64 kW and the maximum state-of-charge is equal to 0.73, the mass of the battery   is equal to 198.4 kg.These results need to be optimized to reduce the power consumed by the electric motor and the battery mass and to maximize the state-of-charge of the battery at the end of the driving cycle.

A case study for the optimization of electric vehicle
We consider the optimization of an electric vehicle with four objective functions and three design constraints: -Objective f 1 : minimizing the mass of the energy storage system in order to choose the optimal battery.-Objective f 2 : maximizing the state-of-charge of the battery at the end of a driving cycle.-Objective f 3 : minimizing the electric power required by the propulsion and the transmission systems in order to choose the optimal electric motor.For the design variables, we will limit our study to the number of series connected cells N s , the number of parallel strings N p , the constant of the electromotive force Emf of the electric motor and the gear ratio R g .In this study, we have combined Modelica modeling language with ModelCenter for the optimization of an electric vehicle.The optimization is carried out using algorithms available in ModelCenter libraries, especially a Non-dominated Sorting Genetic Algorithm NSGA II [13].NSGA II algorithm is adapted for multi-objective nonlinear optimizing problems.Instead of finding the best design, NSGA tries to find a set of best designs (e.g., Pareto set).A design is said to be dominated if there is another design that is superior to the design in all objectives.
The input design vector X for ModelCenter is defined as:  The output variables are defined by Y = [M bat , SoC P, R g , V 10 , V max ] which is determined by the Modelica simulations at every input design point.
Since the optimization is multi-objective, these problems do not have a unique solution, but a set of solutions (Pareto Fronts), as shown in Figure 18.
Each point of the Pareto front is characterized by an input vector X (design variables to optimize) and an output vector Y (objective functions to be achieved and constraints to be respected).After the generation of the Pareto fronts, the best design solutions are summarized in Table 2.
For instance, Figure 18 shows that the maximum power required by the motor P ranges between 151.1 kW and 178.4 kW, a variation on ΔP is about 15.3%.The gear ratio of the gearbox R g varies between 4.92 and 7.36, which has a ΔR g variation of about 33.15%.The two criteria therefore vary strongly along the optimal front, which means that there is a compromise between them.
If we find that one of the criteria is showing a significant variation with respect to the other, e.g., negligible ΔP to ΔR g , this would mean that it is possible to improve the criterion of the maximum power required by the motor P without having a significant impact on the criterion of gear ratio R g .The compromise is likely to exist in this case.The choice of a solution on the fronts is difficult.Therefore, it is very necessary to define rules allowing making decisions in such cases of conflict.For example if the priority is given to minimizing the mass of  the battery, there is only one solution whose characteristics are: (N s = 76, N p = 4, Emf = 0.264 and R g = 6.91).However, if the priority is given to minimizing the volume of the gear-box, the best solution in this case is: (N s = 79, N p = 5, Emf = 0.309 and R g = 4.92).
In our case, an optimal design is chosen for N s = 80, N p = 4, Emf = 0.251 and R g = 6.1, for which we have V max = 119.6 km.h −1 and V 10 = 60.04 km.h −1 (Fig. 19).
Figures 20 and 21 show the variation of the electric power and the state-of-charge for the optimal configuration during 250 s.The maximum pick of the required electric power is 49 kW, the battery mass is equal to 158.72 kg and the maximum state-of-charge is 0.728.Comparing these results to those obtained before optimization, we can deduce an important reduction of 20% of the battery mass and 23.43% of the electrical power consumed, however the gearbox ratio and the state-of-charge are almost the same.This model has allowed us to estimate the parameters related to the state-of-charge of the battery in order to improve the capacity of the electric car and get a more reliable vehicle that can properly fulfill its mission.

Fig. 7 .
Fig. 7. Declaration of the performance parameters and the characteristics of the internal components.

Fig. 13 .
Fig. 13.Control system of the electric vehicle.

Fig. 19 .
Fig. 19.The vehicle velocity for the optimal configuration.

5 Conclusion
To be able to estimate the performances of an electric vehicle, it is very important to have an appropriate model of the system.The objective of this paper is to propose a model for the preliminary design of an electric vehicle.The proposed model is based on the combination of Modelica with ModelCenter.Modelica has been used to model and simulate the model.ModelCenter has been used to optimize the design variables of the different components of the proposed model to meet the performance requirements.

Table 2 .
Optimization results of the electric vehicle.