An energy management platform for smart microgrids