Today, more than half the global population lives in cities, and two thirds are expected to do so by 2050. Cities need technologies to reduce greenhouse gas emissions from energy, transport and heating, which requires distributed renewable electricity, from rooftop solar, small wind and other sources, in order to cleanly generate enough electricity to meet cities' needs. However, most urban electricity grids were not designed to manage distributed...