image thumbnail

DC Microgrid Demo

version 1.0.0 (960 KB) by Chunpeng LI
This will show the fundamentals of DC microgrid control integrating distributed generators and converters.


Updated 26 Oct 2018

View License

The model includes: local slack bus, PV system, batteries, and DC loads.
Local slack bus uses a simplified VSC converter connected with the AC grid.
(A detailed VSC+AC grid model decreases the running speed, if you want a detail model, please contact me.)
PV system uses a standard PV model + a boost converter.
Battery uses a standard Li-ion battery model + a dual-active-bridge converter.
Demands are connected through buck converters.
The voltage on the DC bus is controlled by the grid-interconnected VSC, "Local slack bus".

You can play with the swiches on the bus, and the control in the components to see the power flow.

Cite As

Chunpeng LI (2021). DC Microgrid Demo (, MATLAB Central File Exchange. Retrieved .

Li, Chunpeng, et al. “Metrology Requirements of State-of-the-Art Protection Schemes for DC Microgrids.” The Journal of Engineering, vol. 2018, no. 15, Institution of Engineering and Technology (IET), Oct. 2018, pp. 987–92, doi:10.1049/joe.2018.0254.

View more styles
MATLAB Release Compatibility
Created with R2016b
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!