MicrogridSim is a MATLAB project designed for simulating and optimizing hybrid microgrid operations, originally developed for a research report. The project, developed by an. SPS microgrid model of a Battery Energy Storage System (BESS) and a Solar Plant. Microgrid operates in grid-following or grid-forming mode. The International Council on Large Electric Systems (CIGRE) defines microgrids as 'electricity distribution systems containing loads and distributed energy resources, (such as distributed generators, storage. ems that can function independently or alongside the main grid.