SMS dit: Control algorithms to integrate distributed generation in microgrids /