Smart grids can link renewable energy sources and battery storage systems to provide a secure and stable power supply to…