Distributed Energy and Smart Grids