Once the requests of the mechanical part have been defined, it is necessary to consider the electrical part to take into account any limitations given by the batteries and for the calculation of the power, current, voltage and SOC (State of Charge) parameters of the battery pack.
2.2.1. Battery Limitations
To know the power that the electric motors must request from the batteries (or the power that thanks to the motors recharge the batteries) it is necessary to know the powers lost due to the Joule effect due to the resistances of the electric cables that connect the motors and batteries themselves. Obviously, the connection cables are present only in the presence of the relative motor; therefore, in the absence of the latter the related resistance is considered null. The connection cables’ resistances between batteries and front
and rear
motor are calculated as follows:
where
is the resistivity of copper (or any other material the electrical cables under consideration can be made),
and
are the total lengths of the connection cables of the front and rear motor respectively,
and
are the cross-sectional areas of the front and rear cables while
is the diameter of the front cables and
is the diameter of the rear cables.
Within the “Power Required” block, the total power required of the batteries by the electric motors (or that the motors could guarantee as input to the batteries) is calculated, instant by instant. This power is the result of an approximation as no voltage drop is considered as regards the resistance of cables and electric motors. In particular, the total power required
is equal to the sum of the power required by the front motor
and that required by the rear motor
. The calculation of the latter two quantities is represented in Equations (17) and (18).
where
and
are worth 1 if the motors require energy from the batteries, -1 if the motors act as generators by sending energy to the battery pack.
is the voltage of the battery pack and is calculated in the Simulink “Battery Pack” block of the model,
and
are the electrical efficiencies of the front and rear motor and they are obtained through a special block, which is present inside the “Power Required” block. The electrical efficiencies of the motors are calculated by the model only if the considered motor is present, otherwise the relative efficiency is set to zero. In particular, the efficiency of each motor is obtained thanks to a two-dimensional Lookup Table that receives in input the motor torque and motor speed and returns the efficiency.
To calculate the overall power input or output from the battery pack, it is also necessary to know the power supplied by the generators (if they are present). In this first version of the model, the possibility of integrating the vehicle with a number of generators that is zero or greater than zero was considered, where all the generators installed on the vehicle are identical and all have the same operation instant by instant.
Furthermore, no resistance of the connection cables between generators and batteries was considered, considered negligible. In particular, the generators have a constant rotation speed and a constant rated power output over time, unless the need to cut power due to the limitations imposed by the maximum performance of the battery pack.
In the “Generators” subassembly, the electrical efficiency of the single generator is obtained starting from the nominal power (, positive) of the single generator and its rotation speed , through a two-dimensional Lookup Table. Multiplying the efficiency by the rated power and by the number of generators gives the total maximum power value (, positive) that the generators can supply as input to the battery pack.
For the comparison of the balance of the power required, entering or leaving the battery pack, with the limitations of the pack itself, it is also necessary to consider the contribution of the power lost inside the cells due to their electrical resistance. First of all, the model, starting from the total power entering or leaving the battery pack and the voltage of the pack, calculates the theoretically required current
if there are no limitations given by the batteries, as in Equation (19).
where
is the total power consumed by the vehicle accessories, considered constant. A Lookup Table, which receives the temperature of the battery pack and the SOC at the input, returns the resistance
of the single cell to the output.
Finally, the calculation of the total power
of all cells, dissipated by Joule effect in the entire battery pack is:
where
corresponds to the number of cells arranged in series inside the battery pack, while
the number of those arranged in parallel. The power dissipated by the Joule effect thus obtained is relative to the case in the absence of limitations given by the maximum performance of the battery pack, but will be used, as an approximation, even in the cases in the presence of such limitations. In this way, in limited condition, an approximation of the power lost due to the internal resistance of the cells is made for excess. In the “Battery Limitations” block, the discharging and charging limitations of the batteries are considered. These limitations can be expressed as powers or as currents.
In particular, these limits are defined in function of the SOC of the pack and they are obtained in a dedicated subassembly which will be described later. The power balance shown below, in Equations (21) and (22), allows one to distinguish the case of discharge from that of recharging the batteries.
Discharge of the battery pack:
Charge of the battery pack:
Depending on whether the power balance mentioned above is positive (or null) or negative, one passes to considering an “if” subassembly or another in the Simulink model. In the case that the previous power balance is positive or null, the desired variables are the output from the “if” subassembly “Battery Discharge”. In this case, the generators can work by supplying the entire rated power as output, without the need for limitations.
In this block there are in turn two further “if” checks that divide the case in which there is no limitation imposed by the battery pack from that in which the power absorbed by the electric motors must be limited. The available power
, which can be taken from the battery pack, is calculated as:
which is valid in the event that the discharge limit of the battery pack is supplied as a limit current (positive,
), if it is expressed as a power (positive,
) the previous relationship must be reconstructed as follows:
where
is simply a constant power that is used to keep within the discharge and charge limits with a defined tolerance, equal to the value of this constant and
is the “real” power supplied to the batteries by the generators, which in case of discharge is equal to the maximum power
, without the need for any limitation. The power to be taken from the battery pack consists of the sum of the power absorbed by the vehicle accessories (
, considered constant) and the total power required by the electric motors
. By subtracting the contribution of these two powers from the maximum available, it is therefore possible to ascertain whether this is actually available and therefore no limitation is necessary or vice versa (i.e., if the result of this subtraction is positive or negative).
In the event that there are no limitations given by the battery pack being discharged, the required quantities will actually be the “real” ones of the vehicle, at the instant considered (remembering that the limitations of maximum drive torque have already been considered), and they will be taken as output from the first “if” block.
A binary control variable is also defined, , defined in this case equal to 0, defined instead equal to 1 in the condition of limitation of the motors during traction due to the maximum performance of the batteries. The calculations are carried out in the second “if” block if it is necessary to impose limitations during the discharge phase. In the case with limitation in the discharge phase, if the available power is not enough even to power the accessories, obviously the electric motors will be turned off and it is necessary to define the variable to keep track of the amount of power missing for the power supply of the accessories. is defined equal to the difference between available power and power that should be absorbed by the accessories. On the other hand, if after the part of available power supplied to the accessories is considered, a part of power remains available; the latter will be used to power the electric motors.
In the presence of both motors, this power will be divided between front
and rear
through the distribution constant
. Below are the calculations of the front drive torque
, in Equation (25), and rear
, in Equation (27).
For the calculation of both motors torques, it is taken into account the resistance of the cables (but the relative voltage drop is neglected), the electrical efficiency of the motors ( and , obtained by means of the Lookup Table, starting from the efficiency map of the motors) and the equality of the instantaneous rotation speed of the motor ( and ) is set as an approximation to the rotation speed relative to the previous instant of calculation ( and ) as show in the Equations (26) and (28).
The foregoing is valid in the event that the electric motors must absorb power from the battery pack, but it could fall into the limit case in which the motors act as generators (
), but the power absorbed by the accessories is still sufficient to ensure that the batteries are being discharged. In this case, no limitation is required for the motors torque and the
will be calculated as follows (29).
The
control variable is defined for both motors and the output variable to the “if” block will be equal to 1 if that relating to at least one motor is unitary (i.e., if at least one of the motors is limited by the maximum performance of the battery pack), equal to zero vice versa. If a motor (front or rear) is not present on the vehicle in question, all the relevant quantities are defined as null, including the
variable. In case that the battery pack is in a recharging condition, the desired variables are output from the “Battery Charge” “if” subassembly, contained in the “Battery Limitations” block. In the “Battery Charge” block there are in turn two further “if” blocks that divide the case in which there is no limitation imposed by the battery pack from that in which it is necessary to implement limitations. The maximum power that the battery pack can absorb
is calculated using the following equation:
Equation (30) is valid if the discharge limit of the battery pack is supplied as a limit current (negative,
), if it is expressed as a power (always negative,
) the previous relationship must be reconstructed as follows:
It is therefore possible to understand if it is necessary to make limitations or not, considering the power contributions of generators and electric motors. The outputs are obtained from the “if” subassembly relating to the absence of limitations if the inequality (32) is valid, from the “if” subassembly relating to the presence of limitations vice versa.
When no limitation is required during the battery discharge, the system variables are considered equal to those resulting from the comparison with the maximum performance of the electric motors. binary control variable is also defined, null in the absence of limitations of the electric motors when braking (and also even if the motors participate in traction), set equal to 1 in the case of motor limitation during regenerative braking, due to battery limitations. is instead a binary quantity useful for checking that the generators have been limited (when it is equal to 1) or less (equal to zero).
The “if” subassembly relating to the presence of current limitations is in turn divided into two “if” subassembly, “Without Motor Power Restrictions” and “With Regenerative Braking Restriction”. The model recovers the variables of interest from the first “if” block if the maximum
that the battery can absorb (negative) is less than or equal to the required power
(input or output to the battery pack) from the motors, vice versa from the second “if” subassembly. The logic adopted is to limit the generators first, so as to be able to guarantee the regenerative braking of the motors within the limits (so as to be able to exploit the traditional brakes of the vehicle to a minimum) and only in case of need for further limitation also limit the electric motors. If it is sufficient to implement the limitation to the generators only, the only new quantity to be calculated is precisely the “real” power that the generators supply to the battery input
, equal to the difference between the total power of the motors
and the maximum absorbable power battery
. The difference has been structured in this way to ensure that the power of the generators is positive. If it is also necessary to limit the power of the electric motors, the generators will be turned off and all the power supplied as input to the battery will be guaranteed by the electric motors
. In this case, the control variables will assume the following binary values, represented in Equations (33) and (34).
The total power supplied by the motors
is divided between the front
and the rear
by means of the distribution constant
. The new quantities of the system are obtained by means of the Equations from (35) to (38).
Again, the motors’ efficiencies are obtained by means of Lookup Tables and the voltage drops caused by the resistances of the electric cables are neglected. Furthermore, the rotation speed of the motors is approximated to that of the previous calculation instant. This part of the Simulink model, which includes the limitations of the battery pack, represents part modelling of the BMS. The logic of the BMS is strongly linked to the type of battery and the strategies adopted by the vehicle manufacturer. For this reason, these logics can vary greatly depending on the type of vehicle and its mission.