Integrating RESs into the distribution system threatens the reliability and security of the existing power grid. The reliability and consistency of the electricity provided by the system are significantly impacted by the unpredictability of renewable energy sources and fluctuations in demand. Microgrid power and energy storage devices are quite space intensive. Using grid connectivity and energy storage technologies like hybrid batteries and supercapacitors, this initiative aims to provide a solid foundation for solar energy management. The integration of a supercapacitor and a battery storage system allows for the rapid handling of both short-term and long-term power fluctuations, resulting in a more stable system and an easier time navigating fluctuations in PV output. How the grid and the battery are typically divided up in terms of average power is revealed by the battery's state of charge (SOC). Also provided is a method for controlling energy that is both practical and beneficial. Another benefit of using a supercapacitor is that it reduces stress on the battery system in the event of a sudden disparity between produced and required power. Simulations validate the efficacy and viability of the proposed energy management strategy.