A detailed overview of the energy management system with basic example followed by home energy management system