In this paper power quality of 3-bus solar-based hybrid system has been presented (where one or more than one distribution generator unit is connected to the grid). The injection of solar power into grid-connected systems creates power quality problems such as current consistency, electrical fluctuations, and inefficient power demand. A power quality control strategy based on a real-time self-regulation method for autonomous microgrid operation has been presented. In this paper solar farm design and satisfactory performance tests such as PV-static synchronous compensator (STATCOM) to improve the power quality of grid-based systems have been presented using the MATLAB/Simulink environment. Pulse width modulator (PWM) with proportional-integral derivative (PID) controller used for frequency control, reactive var compensation is used to control voltage profile. Multi-objective genetic algorithm (MOGA) for reactive power planning (RPP) with the objective of reactive power minimization is introduced. The optimization variables are generator voltage, transformer tap changer, and various operational constraints.