# Development of a Hybrid Electric Vehicle Simulation Tool with a Rule-Based Topology
## 2 Materials and Methods
### Overview of the Simulation Tool
The purpose of the gearbox is to keep the ICE operating within its optimal operating range for all speeds of the vehicle, from zero to the maximum speed of the vehicle. In the simulation tool, the boundaries of ICE operation are checked to avoid the ICE operating outside of its limits. The initial gearbox used a lookup table, which returned a gear ratio as a function of speed. Hence, it did not account for any maximal torque necessary when accelerating. To solve this issue, a supervisory control was added to the transmission. The supervisor looks at the gear used by the speed lookup table and checks the resulting torque for this gear. Theoretical values for simulation purposes with the objective of optimizing the gearbox:  
\[\sum T=J*\dot{\omega} \tag{6}\]  
\[\omega=\int\frac{T_{ICE}+T_{Generator}}{J_{ICE}+J_{Generator}}dt \tag{7}\]  
\[m_{f}=\frac{T_{ICE}*\omega_{ICE}}{\eta_{ICE}*LHV} \tag{8}\]  
\[\int_{0}^{T}\frac{Power*Distance_{Cycle}}{LHV*1000}dt \tag{9}\]  
where \(T\) is the torque [Nm], \(\dot{\omega}\) is the angular speed [rad/s], \(LHV\) is lower heating value [M]/kg], \(m_{f}\) is fuel mass flow [g/s], \(\eta_{ICE}\) is break efficiency of ICE, \(T_{ICE}\) is the torque of the ICE [Nm], \(\omega_{ICE}\) is the angular speed of the ICE [rad/s]. Figure 1: Overview of the HEV simulation tool. Efficiency maps for various sizes of EMs are used from the software advisor in the MATLAB(r) and Simulink(r) library, and the closest range size of the EM is selected from the list. Upon picking this from the list, and with the coast down test results, EM models are created. The torque and speed of the vehicle along with the voltage and efficiency map are used to calculate the current required from the EM model. The generator is a device that converts mechanical energy into electrical energy for use in an external circuit. In this HEV simulation tool, it is more specific that the input to the generator is the ICE, which delivers energy, due to the fact being both ICE and generator are coupled on the same shaft with the help of a reduction gear, and both are operating in their most optimal areas. The torque and speed of the ICE, along with the voltage and the efficiency map, are used to calculate the current produced by the generator. \[\text{F}_{\text{Aerodynamic}}=0.5\rho C_{D}V^{2}A \tag{2}\]0  
\[\text{F}_{\text{Aerodynamic}}=0.5\rho C_{D}V^{2}A \tag{2}\]1  
where \(T_{Vch}\) is the torque of the vehicle [Nm], \(\omega_{Vch}\) is the angular speed of the vehicle [rad/s], \(V\) is the voltage of the EM or the generator [V], \(I\) is the current required from the EM or the generator [A], \(T_{ICE}\) is the torque of the ICE [Nm], \(\omega_{ICE}\) is the angular speed of the ICE [rad/s]. Regarding the battery model, a generic battery model is used in the HEV simulation tool from the MATLAB(r) and Simulink(r) library [15; 16]. Battery models based on equivalent circuits are preferred for system-level development and control applications due to their relative simplicity. The battery block implements a generic dynamic model that represents most popular types of rechargeable batteries. The model parameters are derived from the discharge characteristics. The discharging and charging characteristics are assumed to be the same. The transfer function represents the hysteresis phenomenon for the lead-acid, nickel-cadmium (Ni-CD), nickel-metal hydride (NiMH) and the lithium-ion (Li-ion) batteries during the charge and discharge cycles. The Li-ion battery model is mainly used in the simulation tool. To represent the temperature effects of the lithium-ion (Li-ion) battery type, an additional discharge curve at ambient temperature, which is different from the nominal temperature, and the thermal response parameters are required. A battery pack model which contains an equivalent circuit cell model, a lumped capacitance battery thermal model, and battery management system (BMS) controls is implemented in the simulation. A lithium-ion battery cell is modeled by using a two time constant equivalent circuit cell mode.