Distributed generation in autonomous and nonautonomous micro grids | Synapse