Text this: Advanced energy management strategy for microgrids with integrated battery storage and renewable generation