Text this: Study of smart grids framed in the concept of microgrids : Application in minimizing energy losses