Renewable energy sources are experiencing significant development and growth as their immense potential in combating climate change and transitioning towards a sustainable future. However, the characteristics of renewable energy sources are intermittent and inertia-less, causing system frequency instability in power systems. In traditional power systems, synchronous generators provide inertia, which helps stabilize the grid against disturbance. Therefore, the system of many renewable energy sources requires additional inertia which can dampen oscillations and reduce frequency deviation. Virtual inertia controller (VIC) is a potential method that could mimic the inertia characteristics of synchronous generator. VIC ensures that the grid remains stable and can respond effectively to sudden power demand or supply changes. This paper provides the analysis of VIC implementation in IEEE 9 bus system considering generator control equipment using DIgSILENT PowerFactory 2018. Moreover, the research aims to find the effect of adding VIC based on battery energy storage systems (BESS) on frequency stability. The simulation results show that VIC's active power compensation based on BESS can reduce the frequency deviation by 20 percent and the rate of change of frequency (RoCoF) by 70 percent when integrated with the photovoltaic and additional load on the system. In addition, the active power response of the generator decreased by 12.6 percent and the rotor angle of each generator decreased by 1.9 percent. Meanwhile, the response of the bus voltage did not change significantly, by only 0.15 percent. These improvements can avoid system instability, cascading outages, and power blackouts.