Microgrids consist of multiple distributed generators, which are normally integrated via power inverters and can employ various sustainable energy resources. Therefore, the microgrid is a new promising concept for future power systems with improved energy security, reliability, quality of power, and energy efficiency. To this end, microgrids should survive during severe power system abnormalities so that the sub-areas in the microgrids can be protected all the time. This paper focuses on a robust controller design scheme for inverter-interfaced distributed generators considering various operating modes and loading conditions of microgrids. Especially, during the island mode, the voltage and system frequency can easily change due to instant power mismatch between distributed generators and loads in the microgrid. This paper presents the design procedure of a robust optimal controller against exogenous disturbances such as voltage and frequency variation in microgrids. L1 robust control theory is applied to optimize the robust controller and a particle swarm optimization algorithm is used to solve the optimal problems.