This repository contains a complete workflow that demonstrates how to design, simulate, and analyze complex microgrid architectures using MATLAB® and Simscape™. Presents microgrid methodologies in modeling, stability, and control, supported by real-time simulations and experimental studies Microgrids: Dynamic Modeling, Stability and Control, provides comprehensive coverage of microgrid modeling, stability, and control, alongside new relevant perspectives. Presents microgrid methodologies in modeling, stability, and control, supported by real-time simulations and experimental studies Microgrids: Dynamic Modeling, Stability and Control, provides comprehensive coverage of microgrid modeling, stability, and control, alongside new relevant perspectives. This repository shows how to develop, evaluate, and operate different types of microgrids. 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. Hence, the focus of this work is to develop a high-fidelity model for small three-phase diesel generators (SDG), incorporating adaptations to the traditional IEEE Exciter and the Woodward Diesel Engine-Governor Model, with the goal of enhancing the accuracy of dynamic frequency and voltage. ems that can function independently or alongside the main grid. They consist of interconnected ge erators, energy storage, and loads that can be managed locally.