This article presents a control approach for a photovoltaic system connected to an AC load, aiming to optimize the use of energy generated by solar panels to directly power the load, independent of the electricity grid. The studied system is an autonomous photovoltaic energy conversion system without storage. A new topology of multilevel inverter is utilized to take advantage of its simplicity of control and high efficiency. Additionally, to convert DC to AC with reduced harmonic distortion, the inverter employs a 7-level pulse width modulation (LS-PWM) technique, minimizing harmonic distortion and demonstrating reliability. A sliding mode control strategy is applied to the boost converter to achieve stable voltage and frequency, improve the total harmonic distortion (THD), and minimize losses in the power converter. By efficiently managing power flow and maintaining voltage stability, the control system ensures optimal performance of the photovoltaic system connected to the variable load. The proposed approach and the performance of the controlled system are validated through Matlab Simulink simulations.