Application of Microgrids and Distributed Generation