An Islanding Detection Method for Micro-Grids With Grid-Connected and Islanded Capability