In recent years the significant improvementin micro grid technology has led to the utilization of thelocal distributed sources. The microgrids also have agreater role in the minimization of transmission losses. During power blackouts they serve as a main source ofpower for few emergency loads. It is common that usuallythe AC grids are preferred over DC grids to transmitpower over long distances in spite of various issuesassociated with AC grids such as frequency dip, voltagedrop due to reactance, charging currents, leakagecurrents, low power factor problems, skin effect andFerranti effect. One of the major reasons for suchpreference is that voltage can be easily stepped up orstepped down using transformers. Whereas in a DC gridsystem voltage conversion accounts for switching lossesand equipment costs. But at the micro grid level the supplyvoltages are low, and most of them are DC sources. Theenormous growth in the power semiconductor technologymakes it possible to convert voltages in DC with low costand reduced power losses. The AC and DC microgridmodels were developed in MATLAB/SIMULINKenvironment. The stability and transient analysis areperformed during faults and sudden load variations onboth the AC and DC microgrids in real time using OPALRTreal time digital simulator. The effects of stability on aweak grid scenario have been analyzed for both AC andDC microgrids.