In this paper, a photovoltaic (PV) system based on modified duty cycle sweeping (MDCS) has been proposed to achieve the maximum power point tracking (MPPT). The disadvantages of perturb and observe (P&O), such as diverging tracking directions and the inability to detect the global peak during partial shading (PS), are intended to be overcome by this method (PS). An intelligent double identification and tracking method consistently tracks the global peak under partial shading and the MPP under rapid irradiance fluctuations. Strict dynamic irradiance and partial shading tests are imposed in MATLAB/Simulink@ and simulated to validate the suggested concept. Additionally, a laboratory prototype MPPT standalone PV system supported by Texas Instruments’ Code Composer Studio is operated by a SEPIC converter in conjunction with the C2000 real-time microcontroller in order to conduct an experimental validation study. The effectiveness of the method is compared with the other well-known MPPT techniques, conventional P&O. The suggested method successfully follows the global peak under various patterns of partial shading as compared to the conventional algorithms. The algorithm’s efficiency has been preserved at around 95-100%.