Develop Vehicle-to-Grid (V2G) Systems with Modeling and Simulation - MATLAB & Simulink

White Paper

Develop Vehicle-to-Grid (V2G) Systems with Modeling and Simulation

Introduction

The primary environmental benefit of electric vehicles (EVs) is the reduction of tailpipe emissions, which helps lower overall greenhouse gas emissions in transportation. An emerging secondary benefit is the use of EV batteries as an energy storage asset to improve building energy management and grid demand response, referred to as vehicle-to-building (V2B) and vehicle-to-grid (V1G and V2G) respectively.

The specific benefit of using EV batteries for V2B and V2G is to reduce the need for more emission-producing power plants for system supply and to provide more flexible and efficient operation. For V2B, the reliance on grid power can be reduced through the increase of energy consumption produced by local distributed energy resources (DERs) like photovoltaic systems (PVs). Furthermore, there is the opportunity to provide autonomous operation from a main grid connection—so-called islanded operation—improving supply security in the event of grid blackouts.

In this white paper, you will learn the benefits and importance of optimizing electric vehicle charging to enhance grid efficiency. The report will explain how smart charging methods can benefit overall power system response, review optimization best practices, discuss how modeling and simulation can improve the development of charging infrastructure, and more.

section

Bidirectional Charging

For EV batteries to act as dispatchable assets within larger systems, they must be connected through bidirectional chargers, which permit both the charging and discharging of the battery into a building power system or the grid. These bidirectional chargers are power converters operated through digital controllers. The design of these controllers can be conducted using modeling and simulation. This approach allows for the verification of not only the detailed operation of the power converter controller but also the response of the overall system in terms of operational constraints, such as voltage and current limits, and fault conditions, such as power electronic switch failure.

Bidirectional charging is enabled through a bidirectional power converter that contains controllable power electronic switches such IGBTs or MOSFETs. Digital control is used to generate a duty cycle for pulse-width modulation (PWM), which commands the power electronic switches to turn on and off. While there are different power converter topologies used for EV charging, a popular choice is the dual active bridge (DAB) due to its operational flexibility and efficiency. Figure 1 shows the topology of a DAB modeled using Simscape Electrical™.

Diagram showing a dual active bridge converter circuit.

Figure 1. DAB topology.

A DAB consists of two H-bridges connected through an isolating transformer. Each H-bridge is controlled separately to achieve the desired overall operational profile.

Figure 2 below shows MATLAB® graphics being driven from a Simscape Electrical simulation. The figure shows a DAB operating using phase-shifting control, where the phases of the primary and secondary H-bridge voltages are shifted relative to each other to achieve a given magnitude and direction of power flow. The visualization shows power flowing from the primary side to the secondary side, as primary AC voltage (VACp) is leading secondary AC voltage (VACs). For power flow reversal, VACp would lag VACs. Simulation is used not only to design the control system but also to choose appropriate electrical components with appropriate ratings to meet the operational requirements.

Figure 2. Diagram illustrating the electrical circuit pathways with labeled components and voltage waveforms.

section

Smart Charging

When a number of EVs are connected to V2B or V1G/V2G systems, then there is an opportunity to apply smart charging. V1G refers to unidirectional charging and V2G refers to bidirectional charging. Smart charging is where optimization techniques can be used to adjust the individual charging profiles of the individual batteries, achieving some system-level benefit.

For example, the visualization below (Figure 3) shows a V2G system where four EVs are connected to a grid. You can assume the four EVs connect and disconnect at different times and at the end of the connection time, each EV is to be fully charged. You can also assume that you know the connect and disconnect times in advance—this is a simplifying assumption purely for illustrative purposes. If you charge the EVs at some constant rate (non-smart), then you might expect the charging patterns shown in red, where you will see that each EV is fully charged at the end of the charging cycle. Note, however, that the grid power shows a sizeable peak for this scenario. If instead you apply optimization methods and impose a constraint to minimize peak grid power while still ensuring that each EV is fully charged at the end of its connection period, then you might expect the charging patterns shown in green. Notice that during the connection periods, the batteries can charge and discharge to shift energy in time, reducing the peak grid power. A potential drawback of smart charging is that the EV batteries can be cycled more than they would with constant charging—reducing remaining useful life. The optimization framework can be enhanced to consider other technical constraints, such as minimizing the cycling of each battery.

Figure 3. Simplified illustration of a V2G system.

section

Charging Station Techno-Economic Optimization

Techno-economic analysis (TEA) is an important part of overall system sizing and operation, which is typically conducted using optimization methods applied to simple energy balance models. The aim of TEA is to determine optimized operation against some criteria, such as minimization of charging cycles of individual EV batteries and/or provision of sufficient storage to meet grid demand response, and to ensure operational limits are not violated. Once TEA is conducted, detailed modeling that captures the more technical aspects of energy management system development can be added and referenced to the TEA to check that the detailed design is meeting intended operational requirements.

In Figure 4 below, consider a microgrid system structure that includes renewable energy and grid-level storage, in addition to a utility grid connection that supplies an EV charging station and some industrial load. The scenario under consideration is where the EV charging station can use only renewable energy, but the industrial load can use both renewable energy and the utility grid. In this case, a technical constraint is that the grid-level storage can only be charged when renewable energy is available, and the EV charging station can only take energy from renewable energy and grid-level storage.

Figure 4. Diagram of an integrated energy system supplying power from the utility grid, renewable sources, and storage to a factory and electric vehicle fleet.

In addition to the technical constraint associated with energy flow, a techno-economic optimization also aims to size the system components to minimize capital cost and operational cost over the anticipated lifetime of the system. Techno-economic analysis and optimization commonly consider one-year periods at one-hour time intervals: so-called 8760 simulation (there are 8,760 hours in a standard year). The visualization below, Figure 5, shows the output of a techno-economic optimization, the power of each component at each hour, ensuring energy balance between supply and demand.

Figure 5. Energy sources and consumption over time.

section

Grid Integration Studies

While the simplified energy balance equations used in the previous analyses are valuable for applying optimization techniques, they offer limited engineering insights. Assessing the impact of EV charging on grid response requires more detailed power system simulation studies to be performed. Power system simulations are broadly classified into two types: phasor and electromagnetic transient (EMT). Figure 6 shows the main difference between EMT and phasor simulation. EMT simulates the detailed waveforms, whereas phasor simplifies the simulation by using RMS values, which means that simulation step times can be increased. Note that phasor simulation does not capture waveform transients but does capture steady-state operating conditions.

Two simulations: EMT shows three-phase sinusoidal waveforms. Phasor displays the RMS representation of the three-phase waveforms.

Figure 6. Power system simulation methods.

Phasor simulations are better suited for long-duration grid impact studies of EV charging, as they enable quasistatic simulations to be conducted over larger time steps and longer time periods. A quasistatic simulation does not require detailed dynamic responses to be simulated. Instead, it focuses on moving through a large number of operating points, where time steps can range from a few minutes to an hour and time periods under study can range from a few hours to a year or longer.

Figure 7 shows node voltages of a representative distribution system model that is shown at 10-minute time steps over a 24-hour period using quasistatic phasor simulation. The left side shows the voltage magnitudes at each time period, and the right side shows a histogram of the voltage magnitudes over the full 24-hour period. Statistical analysis is a valuable complement to time-domain analysis for gaining additional insight into operational patterns over multiple scenarios.

A visual comparison of node voltages over time and their statistical distribution. The left plot is a time-series graph showing voltage across multiple nodes over a 24-hour period. The right plot is a histogram showing the distribution of voltage points. The arrow between the graphs suggests the transformation of time-series data into a statistical representation for analysis.

Figure 7. Visualization of node voltage variations over time and their distribution profile.

Grid impact studies typically require consideration of many operational scenarios, potentially numbering in the thousands. For efficient simulation of large numbers of operational scenarios, parallel computing can be used to distribute the scenarios across multiple cores. In the example below, four cores are being used to distribute multiple scenarios, resulting in a 3.5x speedup. The more cores that are available, the higher the speedup will be.

Figure 8. Evaluating charging profiles at 906 locations with a 3.5x speedup across four cores.

EMT studies are necessary when more detailed information on the operation of specific technology is required, like when assessing the impact of power electronic switching harmonics on the power system. EV charging stations are typically connected to the grid through inverter-based resources (IBRs), which are power converters operated through digital control. Simulation of IBRs requires small time steps in the order of microseconds or nanoseconds to capture the effect of power electronic switching and also requires the detailed power converter topology and control system to be modeled. The dynamic visualization below shows the response of a three-phase inverter controlled using pulse-width modulation (PWM). Note the higher frequency harmonics caused by the power electronic switching.

Figure 9. Diagram illustrating the switching sequence and output waveforms of a three-phase inverter circuit.

section

Conclusion

Modeling and simulation, coupled with other computational tools such as optimization, can provide information to system designers at an early stage of technological development. This should aid in mitigating design errors and instill confidence that the system being developed will perform in a resilient and efficient manner over its intended operational range.