Control strategies for voltage and frequency in microgrid coordinating different demand response programs and battery energy storage