The transition to renewable energy sources and distributed energy generation (DG) has spurred the global evolution of energy production methods. However, virtual power plants (VPPs) face challenges due to fluctuations in renewable energy sources (RES) production, such as those from photovoltaics and wind turbines. Factors like temperature, solar radiation, wind speed, and high-frequency interference contribute to unstable output power, potentially affecting power supply quality with voltage fluctuations and frequency changes. To address these challenges, it is crucial to smooth alternating current before grid transmission.This paper proposes a solution involving a smart grid with decentralized generators and controllable loads forming a VPP. The approach introduces a Hybrid Energy Storage System (HESS) comprising batteries, supercapacitors, and fuel cells. Equipped with proportional-integral (PI) and model predictive control (MPC) regulators, the HESS aims to regulate inverter voltage for renewable energy. By converting fluctuating electricity into high-quality power, the system enables seamless integration into the VPP, thereby preventing disruptions in generation processes and reducing potential costs associated with damage caused by power fluctuations to grid-connected devices.In the context of the HESS, a photovoltaic system and a wind turbine have been developed, with the proposed system connected to an RLC series load through an IGBT inverter. To evaluate the effectiveness of the HESS within the proposed VPP, two different scenarios were examined by varying the location of these systems in a 14-bus microgrid.