File Exchange

image thumbnail

Microgrid Energy Management System (EMS) using Optimization

version 19.1.0 (1.17 MB) by Jonathan LeSage
Online optimization of energy storage actions in a microgrid given system constraints and pricing


Updated 17 Apr 2020

GitHub view license on GitHub

Energy management systems (EMS) help to optimize the usages of distributed energy resources (DERs) in microgrids, particularly when variable pricing and generation are involved. This example walks through the process of developing an optimization routine that uses forecast pricing and loading conditions to optimally store/sell energy from a grid-scale battery system. Two approaches are demonstrated: a heuristic state machine strategy and the linear program-based optimization approach.

The main example uses a full microgrid simulation for validation of the EMS optimization algorithm. However, there is a purely MATLAB/Optimization Toolbox example that shows the formulation of the optimization without the validation study.

Cite As

Jonathan LeSage (2020). Microgrid Energy Management System (EMS) using Optimization (, GitHub. Retrieved .

Comments and Ratings (6)

Ziyao Wang

Can you provide the simulation file in Matlab 2019a, please?


Thank you for sharing

sajid ali

Mr LeSage, can you provide the simulink file in ver 2019a?

Dear sir, thank you for the amazing stuffs and references. However the pv irradiance combo box, slider switch block and the call back button block was unrecognized when loading the simulink model.



See release notes for this release on GitHub:

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux