Battery energy storage for frequency control in renewable energy systems