Under partial shading conditions, the system operating sequence of photovoltaic cells does not fall on a single characteristic curve, and the traditional maximum power point tracking (MPPT) control algorithm is prone to causing the system output power to oscillate around the maximum power point. In the case of multiple peaks, the traditional MPPT algorithm is prone to being trapped in a local optimum solution. This paper proposes an MPPT control algorithm based on the WOA-RF prediction algorithm combined with a variable step disturbance observation method. By establishing a photovoltaic system simulation model, the improved algorithm is verified through simulation. The improved MPPT control algorithm can adaptively adjust the step size under different conditions to ensure that the system can quickly and accurately track the maximum power point. At the same time, by optimizing the algorithm logic and parameter settings, it can effectively avoid problems such as local optimum solutions and instability in the system, and improve the system convergence speed and tracking accuracy.