Challenges for a transition towards the smart grids