A microgrid system was simulated using the powerful RTDS simulator, the modelling was done on the RSCAD software, and the microgrid comprised of a diesel generator, a photovoltaic (PV) system and a Doubly-Fed Induction Generator (DFIG) wind turbine system as DERs. The paper comprises the study on stability analysis of the microgrid in grid-connected and islanded modes of operation, along with a successful load shedding scheme which was implemented based on the loads distinguished as low priority and high priority loads in order to keep the system balanced during faults.