This article presents the modeling and simulation of a PV pumping system operating over the sun which has been developed under PSIM environment. The main objective is to optimize the PV pumping system through the introduction of two stages. The first one concerns the insertion of a DC-DC converter working with an MPPT in order to get the maximum power from the PV array. The second concerns the optimization of the DC-AC inverter which is controlled through a PWM controlin order to get good voltage and current outputs spectrum with reduced losses and harmonics rate.The improvements brought by the MPPT and the PWM on the PV pumping system are shown through the example treated under real climatic conditions.