Functions of a local controller to coordinate distributed resources in a smart grid | Synapse