A generalized battery model of a collection of Thermostatically Controlled Loads for providing ancillary service | Synapse