Power quality in smart distribution grids