File Exchange

image thumbnail

Microgrid Energy Management System (EMS) using Optimization

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

158 Downloads

Updated 17 Apr 2020

From GitHub

View Version History

View license on GitHub

Optimal Energy Management with Microgrid Example

This example shows how optimization can be combined with forecast data to operate an Energy Management System (EMS) for a microgrid.

Two styles of EMS are demonstrated in the "microgrid_WithESSOpt.slx" model:

  • Heuristic approach using State Machine Logic (Stateflow)
  • Optimization-based approach to minimize cost subject to operational constraints

View Microgrid Energy Management System (EMS) using Optimization on File Exchange

Getting Started

The slides, "EMS_Optimization_Formulation.pdf", walk through the formulation of the optimization problem and the assumptions that were made. Additionally, a video walkthrough of this example can be found here: https://www.mathworks.com/support/search.html/videos/energy-storage-optimization-1572452905678.html

To run this demo:

  1. Extract the files to a directory and navigate to that folder in MATLAB
  2. Open the "microgrid_WithESSOpt.slx" model. This model should automatically add the "Resources" folder to the path
  3. Run the model in either Heuristic or Optimization mode using the slider
  4. The MATLAB only folder shows the optimization routine with just MATLAB code (no physical model for verification)

Toolbox Requirements

  • MATLAB
  • Optimization Toolbox
  • Simulink
  • Simscape
  • Simscape Electrical
  • Stateflow

Cite As

Jonathan LeSage (2021). Microgrid Energy Management System (EMS) using Optimization (https://github.com/jonlesage/Microgrid-EMS-Optimization/releases/tag/v19.1.0), GitHub. Retrieved .

Comments and Ratings (25)

Can you provide the simulation file in Matlab 2019a, please?
Would you please send me to luariomanjate8@gmail.com

Khaled Chehab

Such great work. Would you please send me the file or the report that you have made for this work to m.k.chehab@student.tue.nl

I need to see some equations of the battery, since I am working on developing a smart algorithm

I hopet o hear from you. Thanks in advance
Khaled

静茹 侯

Muhammad Kashif

Good work, Can you please share the paper you worked on, kashifktk@seu.edu.cn

Huang titan

Good design!! But if possible could you share the Simulink files. MATLAB 2015a. titankawa@gmail.com.

Much more appreciated. Thanks for your help!!

Ananta nafis afifandi

Great work. If possible could you share the Simulink files. MATLAB 2018b. ananta.nafis@gmail.com.

Much appreciated. Thank you.

Jack Zhang

Robert Bate

Robert Bate

Great work. If possible could you share the Simulink files. MATLAB 2017a. batespoint@gmail.com.

Much appreciated. Thank you.

Omar Alvarez

Excellent work sir, could you send me the file in the Matab2019a version,
Thanks in advance.
oafelectrico@gmail.com

RUPESH SURWADE

Can you provide the simulation file in Matlab 2013b, please? email:- rupeshsurwade@gmail.com

Ferahtia Sidali

Great work sir, can you send me in a previous version (2016a)
sidali.ferahtia@gmail.com

L. Ortiz

LO

NN

anyone help me to understand the code ..

Jigar Sarda

NN

how can i know codes written in detail ?

Jigar Sarda

Respected sir,

Sir can you provide the model in lower version?

mira daher

Thank you for sharing this .. Can you please attach the paper you worked on ?

Ziyao Wang

ali al-khayyat

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

shimaa

Thank you for sharing

sajid ali

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

Tan Yong Shen

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.

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!