Design of a Flexible and Modular Test Bed for Studies on Islanded Microgrids