Title: Synchronization and distributed integral control in microgrids Abstract: Motivated by the recent interest in smart grid technology, we study the operation of DC/AC inverters in a lossless micro grid. We show that an interconnection of DC/AC inverters equipped with power-frequency droop controllers can be cast as a Kuramoto model of coupled phase oscillators. This novel description, together with results from the theory of coupled oscillators, allows us to characterize the behavior of the network of inverters. Specifically, we provide a necessary and sufficient condition for the existence of a synchronized solution that is unique and locally exponentially stable. We propose a distributed integral controller based on averaging algorithms which dynamically regulates the system frequency to a nominal value in the presence of a time-varying load. This distributed controller has the additional property that it maintains the power sharing properties of the primary droop controller. Our results hold without assumptions on identical line characteristics or voltage magnitudes.