Math for Microgrids: Easing PHEV, DER Grid Integration
Researchers have developed an algorithm to optimize costs, emissions, and energy distribution for microgrids with plug-in hybrid electric vehicles or renewable energy sources.
Microgrids integrating distributed energy resources (DER), such as wind, solar, and batteries, provide generation and distribution flexibility for the main power grid. Microgrids can function either by themselves or in tandem with the main grid to store excess energy for use in times of need. Microgrid development has created a more stable power grid because energy can be distributed under peak loads and outages.
Electric vehicles have become a way of storing energy in vehicle-to-grid applications. While combining plug-in hybrid electric vehicles (PHEV) and DERs has been growing, efficient energy management algorithms are needed to manage this microgrid dynamic.
Differences between EVs and PHEVs. Video used courtesy of Consumer Reports
Managing PHEVs in the Grid
When integrated into microgrids, PHEVs can assist the grid, function as an alternative power source, and participate in demand response programs. Advanced algorithms are required to coordinate different DERs and PHEVs to address multiple objectives within microgrid environments.
EV with smart charger. Image used courtesy of Adobe Stock
While PHEVs are mobile energy storage systems that can aid in grid resilience, managing their energy flow requires meeting each PHEV owner’s needs. This includes reducing energy costs, lowering carbon emissions, and guaranteeing a dependable power supply. Combining these differing energy management objectives is why advanced algorithms are required.
Energy Management Models for Optimizing PHEV and Renewables in Microgrids
Energy management algorithms come in many forms, and many models for optimization scenarios have been developed over the years to optimize the interplay between the grid, DERs, and EVs. Some of these models include:
- Annealing particle swarm optimization algorithm (ASAPSO)
- Multi-objective economic dispatch model
- Grey wolf algorithm
- Oppositional gradient-based grey wolf optimizer (OGGWO)
- Stochastic management approach
- Stochastic chance constraint model predictive control (MPC)
- Crystal Structure Algorithm (CryStAl)
Of all the algorithms to date, the CryStAl algorithm has gained the most popularity because it is simple and adaptable. However, some issues exist, such as not being sensitive to local extremes, so researchers have been looking at new ways to adapt these algorithms to manage microgrids better.
CryStAl Adaptation for Reducing Emissions and Costs
Researchers have now developed a CryStAl algorithm adaptation called the Self-Adaptive Crystal Structure Algorithm (SaCryStAl). The algorithm is an energy management technique that examines how a microgrid’s costs and emissions can be optimized when integrated with renewable energy sources (RES) and PHEVs. The study was published in the journal Scientific Reports.
The researchers’ model evaluates factors affecting PHEVs’ charging rate, including:
- The PHEV’s battery state of charge
- Charger size
- Charging duration
- Vehicle volume
The microgrid system optimized by the models contained various distributed generators, including:
- Photovoltaic panels
- Wind turbines
- Microturbines
- Fuel cells
- Batteries
The model aggregates the microgrid’s total cost by considering power generation, unit starts and shutdowns, and the net emissions. The algorithm also factors in the real-time energy prices in the market on a specified day. Optimizing the different physical resources attached to the grid was handled dynamically by assigning “on” and “off” states to the microturbines, PVs, and wind turbines to ensure that the energy distribution and storage could be managed flexibly.
Three Energy Management Scenarios Trials
The researchers conducted trials using the SaCryStAl algorithm on three energy management scenarios: cost, improved distribution, and reduced emissions.
The first scenario tested how the distributed generators and the grid could be cost-optimized within pre-defined constraints. This scenario only examined a single objective, as opposed to multi-objective optimization. The algorithms in this scenario achieved an optimal cost of 124.15 euro cents (€ct) and emission values of 419.14 kg.
The second scenario was a multi-objective framework assessing how SaCryStAl could distribute the load to the microgrid using PVs, microturbines, fuel cells, batteries, and wind turbines—rated powers—with any excess electricity sold back to the grid. In this scenario, the optimization algorithm achieved an optimal cost of 53.92 €ct and an emission value of 135.186 kg.
The final scenario considered integrating PHEVs into the microgrid, focusing on cost, not emissions. The unpredictable charging demands of PHEVs prompted the researchers to utilize the algorithm for three different charging scenarios—coordinated, uncoordinated, and smart charging—while using standard RES and RES-rated power.
SaCryStAl vs. CryStAl in assessing tradeoffs between costs and emissions. Image used courtesy of Rajagopalan, et al.
Coordinated charging enables PHEVs to be charged at any time, but owners must perform it during off-peak hours to avoid peak times and high prices. Smart-charging PHEVs were connected to the grid when energy prices were at their lowest. This scenario yielded optimal operation costs of 319.9301 €ct for coordinated, 160.9827 €ct for uncoordinated, and 128.2815 €ct for smart charging modes. A flexible and holistic approach using this new algorithm enabled the researchers to optimize microgrid operations schedules while considering real-world uncertainties.
Future Additions Could Improve Results
Currently, the model enables optimization of various costs and emissions for grid-integrated microgrids with PHEVs or DERs. There’s potential to expand into other renewable energy sources—such as hydrothermal—and integrate real-time data analytics and machine learning, which will provide more adaptive energy management strategies.


