This document presents a study on the modeling and voltage control of a solar-wind hybrid micro-grid, focusing on the integration of a static synchronous compensator (STATCOM) for reactive power compensation. The research demonstrates that optimizing gain parameters of PI controllers using genetic algorithms (GA) and bacteria foraging algorithms (BFA) can improve voltage stability and reduce fluctuations in the system. Results indicate that the optimized controllers significantly outperform conventional controllers, achieving up to a 15% reduction in voltage fluctuation at variable loads.