Distributed control in the smart grid