Local And Central Controllers For Microgrids