Smart grids, prosumers and energy management within a smart city integrated system