The proposed scheme is based on the modified perturb and observe (P&O) algorithm combined with the sliding mode technique. A modified P&O algorithm based sliding mode controller is developed to study the effects of partial shade, temperature, and insolation on the performance of maximum power point tracking (MPPT) used in photovoltaic (PV) systems. Under partially shaded conditions and temperature, the energy conversion efficiency of a PV array is very low, leading to significant power losses. Consequently, increasing efficiency by means of MPPT is particularly important. Conventional techniques are easy to implement but produce oscillations at MPP. The proposed method is applied to a model to simulate the performance of the PV system for solar energy usage, which is compared to the conventional methods under non-uniform insolation improving the PV system utilization efficiency and allowing optimization of the system performance. The modified perturb and observe sliding mode controller successfully overcomes the issues presented by non-uniform conditions and tracks the global MPP. Compared to MPPT techniques, the proposed technique is more efficient; it produces less oscillation at MPP in the steady state, and provides more precise tracking.