Electric vehicle
Detailed overview of the model definition, components, and capabilities of the Electric Vehicle model in the Microgrid Library.
Introduction
This model consists of an electric vehicle (EV) with a 270 kW induction motor and a 250 Ah Li-ion battery. The 150 kVA battery charger is implemented using the Battery Inverter component from the Microgrid Library, which supports grid forming and following modes for vehicle-to-grid, grid-to-vehicle, and Uninterruptible Power Supply (UPS) operation. The powertrain control module (PCM) is based on a Field-Oriented Control (FOC) scheme with regenerative braking capability. The model includes a 20 kVA load for simulating the UPS mode. This is done by switching the battery inverter to grid-forming mode and disconnecting the grid.
This application example model does not implement any specific manufacturer’s topology for the drivetrain or for the battery converter. Rather, it demonstrates the use of ready-to-use power electronics and microgrid components in order to build a high-fidelity, system-level application. The Signal Processing toolbox is used to implement the powertrain controller and the mechanical load model.
Model description
The model comprises of three main subsystems:
- Grid and Residential Load
- Charging Station
- Electric Vehicle
The three-phase grid consists of a 240 V / 60 Hz voltage source and an RL-section impedance. The grid is connected to the rest of the circuit by the contactor S1, as can be seen in Figure 2. Next to the contactor is a 20 kVA load, which represents a household load that can draw power either from the grid or from the vehicle battery.
- On-board 22 kVA Battery inverter
- Lithium-ion Battery
- Three-Phase Inverter with LC filter
- Induction motor
The battery inverter (Figure 3, right from the core coupling) is a component from the Microgrid Library, and it is implemented as a full switching model with its own control both in the grid following and the grid forming mode. In order to scale-down the inverter to 22 kVA, the component model is kept intact and only the mask-level parameters are changed (Table 1).
Parameter | New values | Default values |
Nominal power | 150 kVA | 1.6 MVA |
Nominal voltage | 240 V | 480 V |
Nominal DC link voltage | 400 V | 10 kV |
The EV presented in this model is realised using a battery with the following parameters:
Type | Lithium-Ion |
Nominal voltage | 400 V |
Capacity | 250 Ah |
The Electric Vehicle subsystem consists of the EV model and the PCM. The electric vehicle model is shown in Figure 4. The internal modulator of the Three-phase Inverter component is used, and the carrier frequency is set to 20 kHz.
A full description of how the subsystems are mathematically modeled continues below, followed by a description of how the electric vehicle performs under Simulation.
The PWM reference signals ma, mb and mc are generated by the PCM, which can be seen in Figure 5. A Three-Phase Meter component is used to measure the currents and active power flow between the induction motor and the inverter. The PCM employs a simple FOC based scheme, in which the measured three-phase currents are transformed into direct (i_d) and quadrature (i_q) components, which are then controlled with PI regulators. The machine flux is related to i_d while the torque is related to i_q. The rotor flux angle ϴ_e, needed for the abc-to-dq and dq-to-αβ transforms, is calculated (Indirect FOC) from the machine electrical parameters, rotor speed, and measured currents.
Type | Induction with squirrel cage |
Nominal voltage | 400 V |
Maximum power | 270 kW |
Maximum frequency | 565 Hz |
Maximum RPM | 16950 |
Number of pole pairs | 2 |
The flux reference is generated in the flux_ref block and starts as a constant value ${\psi}_{ref}$ . As the motor speeds up, however, the armature voltage rises to maintain the flux. When the inverter voltage limit is reached, the rotor speed cannot increase further; this defines the base speed ${\omega}_{base}$ . Then, the Flux Weakening Method is employed to allow the rotor to go beyond the base speed; at this point the maximum flux reference is multiplied by the inverse of the measured rotor speed.
${(\psi}_{ref}={\psi}_{max}\frac{{\omega}_{base}}{{\omega}_{r}})$- Limits the acceleration power to 270 kW
- Limits the acceleration torque to 430 Nm
- Limits the regenerative braking power to 60 kW
- Limits he regenerative braking torque to 150 Nm
- Multiplies the resulting torque by the throttle percentage
The induction motor is loaded with variable torque. The mechanical part of the electric motor is governed by Newton's Law for Rotation:
$\frac{d{\omega}_{m}}{\mathrm{d}\mathrm{t}}=\frac{1}{{J}_{m}}\left({T}_{e}-{\mathrm{T}}_{\mathrm{l}\mathrm{o}\mathrm{a}\mathrm{d}}-{D}_{f}{\omega}_{m}\right)$where ${\omega}_{m}$ is the mechanical speed of the rotor, ${J}_{m}$ machine moment of inertia, ${T}_{e}$ machine electromagnetic torque, ${\mathrm{T}}_{\mathrm{l}\mathrm{o}\mathrm{a}\mathrm{d}}$ load mechanical torque, and ${D}_{f}$ linear friction coefficient.
The mechanical load which is calculated inside the Load block is represented by the following formula:
${\mathrm{T}}_{\mathrm{l}\mathrm{o}\mathrm{a}\mathrm{d}}={F}_{load}\frac{{d}_{wheel}}{2{i}_{g}}$where ${F}_{load}$ is the force that affects the vehicle, ${d}_{wheel}$ the diameter of the wheels, and ${i}_{g}$ is the gear ratio.
${F}_{load}={F}_{grade}+{F}_{rolling}+{F}_{wind}$where ${F}_{grade}$ is a component of the gravitational force projected to the surface, ${F}_{rolling}$ the rolling resistance force and ${F}_{wind}$ is the wind resistance force.
${F}_{grade}=Wsin\alpha $where $W$ is the weight of the vehicle and α is the slope angle.
${F}_{rolling}=V\left[\frac{km}{h}\right]{f}_{r}$where $V\left[\frac{km}{h}\right]$ is the vehicle speed in $\left[\frac{km}{h}\right]$ and ${f}_{r}$ is the rolling resistance.
${F}_{wind}={A}_{d}\frac{{\rho V}^{2}}{2}$where ${A}_{d}$ is the drag area and $\rho $ is the air density.
${A}_{d}={c}_{D}A$where ${c}_{D}$ is the drag coefficient and $A$ is the frontal area of the vehicle.
Additionally, to load torque in case of activating the brake, an additional moment will be added to the machine:
${T}_{brake}=V{C}_{b}$where ${C}_{b}$ is the adjustable braking coefficient (0-100).
No. of processing cores | 3 |
Max. matrix memory utilization | 78% |
Max. time slot utilization | 78% |
Simulation step, electrical | 1 µs |
Execution rate, signal processing | 100 µs |
- Core Coupling1 (inside Charging Station) – the red (current) side of the coupling is facing the contactor, so a fixed R-C snubber should be added with the following parameters: ${R}_{1}=1\mathrm{}\mathrm{\Omega},\mathrm{}\mathrm{}{\mathrm{C}}_{1}\mathrm{}=\mathrm{}0.4\mathrm{e}-5\mathrm{}\mathrm{F}\mathrm{}$
- Core Coupling2 (inside Electric Vehicle) – the green (voltage) side of the coupling is facing the capacitor, so it should be added a fixed R-L snubber with the following parameters: ${R}_{2}=0.1\mathrm{}\mathrm{\Omega},\mathrm{}\mathrm{}{\mathrm{C}}_{1}\mathrm{}=\mathrm{}1\mathrm{e}-3\mathrm{}\mathrm{F}$
More information about the use of snubbers and their parametrization can be found here.
Simulation
This application comes with a pre-built SCADA panel (Figure 7). The panel offers most essential user interface elements (widgets) to monitor and interact with the simulation in runtime. You can customize it freely to fit your needs.
- Capture/Scope
- Car Dashboard subpanel
- Inverter Mode Presets Group
- DC Fast Charging Station subpanel
- Status LED Group
P_ref | Grid connection | Operation Mode | |
---|---|---|---|
EV Charging | -150 kW | On | Grid following |
Grid-to-vehicle | 150 kW | On | Grid following |
UPS | 0 kW | Off | Grid forming |
From the Car Dashboard the user can start and stop the motor and adjust the throttle and brake signals with the help of sliders. EV dynamics can be monitored using:
- Two gauges for speed and active power
- A trace graph for speed history
- A bar graph for SOC
- Four digital displays for rotational speed, electrical and load torques, and total distance
- Two LEDs for motor status and regenerative braking (Typhoon ReGen) status
- The Power/Torque Graphs subpanel
Figure 10and Figure 11 illustrate a possible driving cycle of the EV. Initially, with the EV stopped, the throttle slider is set to 100%, which results in constant maximum torque reference being applied. When the maximum power is reached at 85 km/h, the torque reference is gradually reduced to maintain a constant power region. After the breakdown point at approximately 150 km/h, the maximum power cannot be maintained anymore (constant slip region).
When the vehicle reaches the maximum speed of 230 km/h, the throttle slider is set to zero. A negative torque reference is applied, which slows down the vehicle while charging the battery at the same time with the maximum regenerative power of 60 kW. As the speed is reduced, the torque magnitude increases for the same power. At 50 km/h, the 150 Nm torque limit starts acting, gradually reducing the regenerative power until the car stops.
Files | |
---|---|
Typhoon HIL files | examples\models\automotive\electric vehicle electric vehicle.tse, electric vehicle.cus |
Minimum hardware requirements | |
No. of HIL devices | 1 |
HIL device model | HIL402 |
Device configuration | 1 |