ELECTRIC VEHICLE MODELLING AND SIMULATION OF A LIGHT COMMERCIAL VEHICLE USING PMSM PROPULSION

Even though the Internal Combustion Engine (ICE) used in conventional vehicles is one of the major causes of global warming and air pollution, the emission of toxic gases is also harmful to living organisms. Electric propulsion has been developed in modern electric vehicles to replace the ICE. The aim of this research is to use both the Simulink and Simscape toolboxes in MATLAB to model the dynamics of a light commercial vehicle powered by electric propulsion. This research focuses on a Volkswagen Crafter with a diesel propulsion engine manufactured in 2020. A rear-wheel driven electric powertrain based on a Permanent Magnet Synchronous Motor was designed to replace its front-wheel driven diesel engine in an urban environment at low average speeds. In this research, a Nissan Leaf battery with a nominal voltage of 360 V and a capacity of 24 kWh was modelled to serve as the energy source of the electric drivetrain. The New European Driving Cycle was used in this research to evaluate the electric propulsion. Another test input such as a speed ramp was also used to test the vehicle under different road conditions. A Proportional Integral controller was applied to control the speed of both the vehicle and synchronous motor. Different driving cycles were used to test the vehicle. The vehicle demonstrated a good tracking capability in each type of test. In addition, this research determined that the fuel economy of electric vehicles is approximately 19 % better than that of conventional vehicles.


Introduction
Environmental effects such as air pollution and global warming which are harmful to our health are primarily caused by internal combustion engines (ICE) in conventional vehicles. "In recent decades, the research and development activities related to transportation have emphasized the development of high-efficiency, clean and safe transportation." [1] Nowadays, electric vehicles are being developed to reduce these toxic effects and achieve safer transportation networks. In Ref. [2], Un-Noor et al. stated that the development of electric vehicles is immensely beneficial to our environment since this will lead to a reduction in the adverse effects of greenhouse gas emissions. After reviewing the literature on Electric Vehicles (EV), they drew up different design and development processes in terms of vehicle modelling, EV configurations, battery management and electrical machine drives. In EVs, ICE propulsion has been replaced by electric propulsion, consisting of electric motor drives, energy sources and other auxiliaries. Therefore, a reasonable amount of effort has been made in the field of industrial automation to make the transition from vehicles powered by traditional ICEs to those driven by EVs [3]. However, Shariff et al. [4] stated that 'Greenhouse gas * Correspondence: aminubabangida24@gmail.com emission and the increased cost of petroleum products are the major factors that need a shift from internal combustion engines to Electric Vehicles." Electric vehicles are solutions to this problem [5]. In this paper, a Volkswagen Crafter with a 2.0 diesel TDI CR engine manufactured in 2020 is examined by focusing on the replacement of its ICE with rear-wheel-driven electric motor propulsion.
According to our literature review, numerous papers have focused on electric vehicles, e.g., Wahono et al. [6] who compared three forms of range extender engines for electric cars based on simulations to overcome some disadvantages (such as the weight) of EVs over conventional vehicles driven by ICEs. A further study by Marmaras et al. [7] simulated the driver behaviour of EVs in road transport networks and electrical grids. The EV studied was modelled to investigate its integration in both the electrical grid and road transport networks. Although a multi-agent platform was used to model driver behaviour, a fleet of 1000 EVs were used as a case study where known and unknown profiles were chosen to explore the results. The cars were considered to be typical smart mechatronics systems. New trends in smart systems are summarised in Ref. [8]. Since it is difficult to formulate the exact dynamic equations of a car, Aracil et al. [9] proposed the Hardware-In-the-Loop simulation as an opti- They discovered that electric vehicles have direct and indirect implications on road transport networks and electrical grids. Another study [10] presented a "ride comfort performance evaluation on EV conversion via simulations." This study aimed to investigate the ride comfort of a vehicle before being converted into an electric vehicle. The study considered a full car model with 7 degrees of freedom (DOF). The two results were validated by evaluating the performance of the vehicle before and after replacing its conventional ICE with an electric motor.

Electric powertrain
The electric powertrain of a Battery Electric Vehicle (BEV) consists of two components, namely the electrical and mechanical parts. A schematic diagram of the general layout of the electric powertrain of a BEV is depicted in Fig. 1 where M denotes the electric motor, while the thin and thick lines represent the electrical and mechanical parts, respectively.

Electrical parts
The electrical parts consist of the battery, DC-DC converter, inverter and the controller of the electrical machine, which all depend on the electrical machine applied as the EV.

Mechanical parts
The mechanical parts of the electric powertrain consist of the transmission system, axles, wheels and chassis. In this paper, a three-phase Permanent Magnet Synchronous Motor (PMSM) was applied in a simplified energy-equivalent PMSM model that makes use of the losses resulting from the detailed PMSM model.

Simulation of the dynamic system of the electric powertrain
A simplified closed-loop representation of the electric powertrain applied in our electric Crafter (e-Crafter) is presented in Fig. 2, which consists of a Nissan Leaf battery as well as the PMSM drives, transmission and chassis subsystems adapted from Refs. [11] and [12], where V ref denotes the speed reference and V ehspd stands for the vehicle speed.

Vehicle transmission system
A single-speed transmission system consists of various elements such as the gearbox, torque converter and the final drive. As is described in Ref. [1], the torque converter couples the gearbox to the vehicle and the gearbox contains the appropriate gear ratios, where U denotes the velocity required and V represents the actual velocity as a result of the final drive.
However, Fig. 3 shows a simplified single speed transmission used in modeling our electric vehicle. The presence of the torque converter in the transmission system of Fig. 3 clearly indicates that it is automatic transmission.

Vehicle modelling
Vehicle dynamics is the study of the motion of a vehicle and is comprised of three categories, that is, longitudinal, lateral and vertical dynamics. In this paper, the longitudinal dynamics of the car are modelled in a MATLAB/Simscape/Simulink environment. "In practical terms, a vehicle not only travels on a level road but also up and down the slope of a roadway as well as around corners." [13] A simplified model and more detailed description of dynamical behaviour can be found in Ref. [8]. To model the vehicle dynamics, it is necessary to describe the forces acting on the vehicle using a Free Body Diagram as shown in Fig. 4.
The tractive force acting on the chassis can be described by [3,14] where F ad denotes the wind resistance, which depends on the density of air ρ, surface area of the front of the vehicle A f , drag coefficient C d and its speed V , calculated from The rolling resistance F rr depends on the weight of the vehicle w (w = mg), rolling resistance coefficient C rr and the angle of inclination α:  The forces resulting from the grade resistance and resistance to acceleration are given as where m denotes the mass of the vehicle in kg, 1.04 is its inertia and a stands for its acceleration. The tractive power and energy needed to propel the vehicle are given by the following equations: where F denotes the tractive force in newtons and t represents the time in seconds. However, the vehicle dynamics system was simulated using the parameters as specified in Table 1.

Tyre Dynamics using the Magic Formula
"The Tire-Road Interaction (Magic Formula) block models the longitudinal forces at the tire-road contact patch using the Magic Formula of Pacejka." [25] In this paper, both the tyres attached to the front and rear axles of the vehicle were modelled using the Magic Formula. The tyre coefficients used were B, C, D and E. The values of these coefficients, adapted from Ref. [25], are shown in Table 2.

Speed controller
A PI controller was developed to control the speed of both the motor and vehicle. This PI controller was implemented in the energy-equivalent model of our PMSM. PID controllers are used in many industrial applications because of their simple structure and robustness [15]. Since noise is a measured parameter, the derivative part is not usually used [15]. The general representation of the PI controller is presented in Fig. 5.

Integral performance criteria
"Criteria based on disturbance rejection and system robustness are proposed to assess the performance of PID controllers." [16] "A two-block structured singular value measures the robustness, and the disturbance rejection is measured by the minimum singular value of the integral gain matrix." [16] In this paper, five criteria used in a closed-loop control system are employed to assess the performance of our PI controller. They are customarily calculated for different control setpoints such as step input and ramp input. In this research, the performance of our controller was assessed using various test inputs. "It is well-known that a well-designed control system should meet the disturbance attenuation, setpoint tracking, robust stability, and robust performance." [16] "The first two requirements are traditionally referred to as 'performance' and the third, 'robustness' of a control system." [16] The following are the criteria stated in Ref. [16]: where IAE stands for the Integral Absolute Error, ITAE the Integral Time Absolute Error, ISE the Integral Square Error, and ITSE the Integral time Squared Absolute Error [16]. These performance indexes were used to tune our PID controller.

Permanent magnet synchronous motor
A PMSM, which is widely used to overcome the disadvantages of a Brushless DC Motor (BLDC) [17], is proposed in this research. Virani [18]. This study suggests PMSM has advantages in EV applications over other types of electric motors. The general structure of the PMSM motor is presented as shown in Fig. 6. The rotor having a permanent magnet mounted on it creates a rotating magnetic field, which in turn produces a sinusoidal electromagnetic field.

PMSM Mathematical Model
The modelling of a PMSM was carried out based on the following assumptions [17,26]: 1. There is distribution of the sinusoidal Magnetomotive Force (MMF) in the air gap.
2. Restriction in the saliency according to the rotor position.
3. Ignoring the hysteresis and saturation.

5.
Assuming that the back EMF (electromotive force) is sinusoidal.
The 3-phase supply voltage is given by [17] where I A , I B and I C denote the phase currents, V A , V B , and V C represent the phase voltages, Ψ A , Ψ B and Ψ C stand for the flux linkages, and R S and P are the phase resistance and "derivative operator," respectively [17]. However, using the reference frame d q , the model of the PMSM can be represented in the rotating reference frame d q as Therefore, the torque developed by the PMSM is given by where P denotes the number of poles of the machine [17]: the electric torque derived in Eq. 20 is divided into two components, namely the "mutual reactance torque" [17] and "reluctance torque", the latter results from the difference in reluctance between the qand d-axes [17]. However, for the PMSM, when L q = L d = L S , the torque generated by the PMSM is [17] T e = 3 2 The three-phase voltages of the detailed PMSM model are presented in Fig. 7. Since it can be seen that the simulation runs with a stop time of 0.2 s, which is very slow, it runs more slowly than in real time. To resolve this issue, a methodology was adapted using this detailed model of the PMSM to obtain the electrical losses of an energyequivalent model. The corresponding 3-phase currents obtained by simulating the detailed three-phase PMSM are shown in Fig.  8. In this model, the torque induced by the structure of the chassis is not included in the modelling process, namely the cogging torque [19]. Flux harmonics are also present since the magnet in the PMSM is composed of "neodymium, iron and boron". [19] Therefore, its magnetic flux density is usually affected by variations in temperature. [19] Similarly, there parametric uncertainties are present due to mechanical and electrical parameters. In terms  of mechanical ones, the inertia of the PMSM is uncertain due to its changing behaviour under different operating conditions. Regarding electrical ones, the stator resistance, which is a function of the temperature, influences the control of the current loop performance [19].
The electrical losses resulting from the simulation of the PMSM are presented in Table 3. These losses were obtained by using the corresponding torque and speed vectors, moreover, this method was adopted from Ref. [11].

Simplified PMSM model
In this paper, a three-phase model of the PMSM designed was converted into an equivalent energy model based    Table 4. From Fig. 9, the transfer function from T L to ω is given by where T L denotes the load torque, ω represents the achieved speed, ω r refers to the reference speed, J stands for the total of the moments of inertia, B is the coefficient of viscosity and α denotes the bandwidth of the speed control [20] F (s) = α s Transforming Eq. 3 into the PI form [14] yields Therefore, in the case of the simplified equivalent PMSM Model, only the outer loop was analysed, which uses a PI controller to control the speed of the motor. Generally, a three-phase PMSM, using the FOC (Field-Oriented Control) strategy, consists of two control loops with two PIs in the inner loop to control the current vectors. The PI controller can be mathematically represented as where k p and k i denote the proportional and integral coefficients, respectively and e(t) represents the error between the reference and the feedback signal [21].

Nissan Leaf Battery
In this research, a Nissan Leaf Battery manufactured in 2011 was used to design the electric vehicle. The battery has a nominal voltage of 360 V and a capacity of 24 kWh [13]. It consists of 48 modules and 4 cells (2 in parallel, 2 in series), amounting to 192 cells [14]. The total voltage of the battery pack is approximately 403.2 V. The possible arrangement of the cells in a battery pack has been studied in general by Emadi [22]. Table 5 shows the batteries available along with their chemistries. In this paper, a lithium-ion battery was used. The specific energy defines the energy stored in the battery per unit of weight. The cell voltage is 4.2 V when fully charged and 2.5 V when discharged.
While the battery specifications for a Nissan Leaf manufactured in 2011 are detailed in Table 6, this paper used a model of a built-in battery simulated using Simulink based on these specifications to simulate our traction battery.

Battery modelling
Generally, our battery was analysed using an equivalent circuit model from the literature to study its behaviour mathematically. This equivalent circuit was modelled based on a Nissan Leaf to carry out the analysis before being compared with the built-in battery simulated using MATLAB. The cell voltage of the battery as studied in Ref. [23] is given by where R denotes the ideal gas constant, T represents the temperature and Q R stands for the reaction quotient, which is a function of the concentrations of the reactants. However, since each battery is associated with an ohmic drop [23], the equation can be modified as The above equation can then be modified to include the battery capacity as where y denotes a variable that can be related to the capacity, DoD (depth of discharge), SoC (state of charge) or the cell energy, y 3 represents the value at which the exponential decay begins, and A, B, K, F and G stand for values determined by curve fitting [23]. The above equation can be expressed in terms of the DoD as In terms of the no-load, the ohmic drop can be expressed as The aforementioned equations can be modelled to represent the equivalent circuit shown in Fig. 10. Therefore, the above mathematical model of the battery can be represented by the simplified battery model presented in Fig. 10 based on the already built-in Simulink model.

Battery parameters
The design considerations of a battery ensure it functions safely and reliably. Therefore, the battery management Figure 11: Simulink model of the EV system takes into account three parameters, namely the total voltage of the battery pack, the total temperature of an individual cell in the pack and the total current, before calculating the State of Charge (SoC), State of Health (SoH), Safe Operating Envelope (SOE) and faults. The SoC, which is expressed as a percentage, determines the amount of voltage also as a percentage. In this paper, the SoC was found to be 99%, that is, almost fully charged. A friction brake was used to stop our vehicle. The battery was naturally recharged due to regenerative braking. The SoH represents the battery's capacity relative to its capacity when initially installed. Finally, the SOE shows the amount of current that can be charged or discharged at any given time.

Matlab model
The complete model of our electric vehicle simulated in a Simulink environment is depicted in Fig. 11. The model consists of the Nissan Leaf battery, the PMSM drives, the transmission systems and the vehicle subsystems.

Results
The "New European Driving Cycle (NEDC)" used in this research to test our vehicle and other driving cycles to comply with energy consumption and emissions reduction targets is presented in Fig. 12. In this paper, only three cycles of 200 seconds in duration were used in the "NEDC." Other driving cycles such as the "Urban Dynamometer Driving Schedule (UDDS)," were used to test our electric vehicle.
The NEDC, adopted from the literature, is mainly used to determine the consumption of electric vehicles, gas emissions, etc. The reference speed and the speed achieved by the vehicle over 200 seconds are both represented in Fig. 13. The power consumption of the battery in kilowatts is shown in Fig. 14. The Nissan Leaf can provide over 90 kW of power, 50 kW of which was consumed by our electric vehicle. The energy consumption of the battery in kWh is presented in Fig. 15.
Given that the SoC achieved by our battery was 99%, i.e., it was almost fully charged, the operating temperature used by our Battery Management System was ne-          glected. In a future study, a complete Battery Management System will be implemented to determine and ensure safe operating conditions for our battery system.
The battery current is represented in Fig. 16. The battery draws a maximum current of 75 A when the vehicle is accelerating and a minimum current of −55 A when decelerating. The SoC of the battery as a percentage, which is approximately maintained at 99% due to natural regenerative braking, is presented in Fig. 17: The reference speed of the motor was 4250 rpm, which accurately tracks the actual rate, and is shown in Fig. 18. The maximum torque of 280 Nm, as seen in Table  4 of the motor specifications, is shown in Fig. 19, while the power consumption of the motor, which is approximately 49 kW, is presented in Fig. 20. The losses can be analysed in terms of the energy transmitted from the storage system, namely from the battery to the wheels of the vehicle. The energy consumption of both the battery and motor are plotted in Fig. 21.
The difference between the plots in Fig. 21 is the energy lost when transmitting from the energy supply system, that is, from the battery to our PMSM. It can be seen that: if E b = 0.3305 kWh is the energy consumed by our Nissan Leaf battery and E m = 0.2599 kWh is the energy consumed by our PMSM, then the energy efficiency, η = E m /E b = 78.63 %.
Therefore, our electric vehicle is approximately 19%  [24]. The speed of the vehicle when tested by a ramp input is depicted in Fig. 22. In this case, the vehicle accelerates from rest to a final speed of 5.55 m/s (20 km/hr). The PMSM implemented as a result of a ramp test signal is presented in Fig. 23 below. The consumption of vehicles was less during this test to prove the performance of our motor and electric vehicle under these ideal conditions.

Settings of the PI controller based on the performance matrix
The settings of the PI controller based on the performance matrix obtained by conducting several experiments until optimized gains had been achieved is presented in Table   Figure 22: Speed of the vehicle due to a ramp input Figure 23: Speed of the motor due to a ramp input 7. It can be seen from this table that minimum values of these performance indices were required to obtain these optimal gains. Moreover, the system is stable and the controller somewhat reliable. However, a future study may propose intelligent tuning techniques to achieve a realistic level of performance by accurately taking into consideration the model uncertainties and parameter variations due to operating conditions, e.g., temperature and humidity amongst other considerable factors.

Conclusions
The modelling and simulation of an electric powertrain based on the PMSM Motor of a light commercial vehicle, a VW Crafter manufactured in 2020, has been presented. A PI-based classical control algorithm of the outer control loop of the PMSM was used to control the speed of the vehicle and motor. PMSM-based electrical-rear-wheel-driven traction of a VW Crafter manufactured in 2020 was modelled. This motor was chosen due to its high degree of efficiency over other electrical traction machines. This motor propelled the vehicle during its motoring action and while recharging the battery when acting as a generator.
A Nissan Leaf battery with a rating of 360 V manufactured in 2011 and an energy supply to the system of 24 kWh was used. The battery was used to supply energy to propel the vehicle. This research determined that the fuel consumption decreased by a significant percentage by replacing conventional vehicles driven by ICEs with electric vehicles.