Smart grids for renewable energies and energy efficiency