This paper discusses a method for minimizing lower order harmonics in an 11-level cascaded inverter that utilizes solar panels as power sources, employing a genetic algorithm (GA) to calculate real-time switching angles. The study highlights the importance of accounting for varying input voltages from the solar panels and presents simulation results demonstrating effective harmonic reduction, specifically focusing on the 5th, 7th, 11th, and 13th harmonics. The results indicate a low total harmonic distortion (THD) and suggest avenues for future research in practical implementation and performance evaluation.