摘要:With the development of society, the demand for energy keeps increasing. Solar energy has received widespread concern for its renewable and environmentally friendly advantages. As one of the most efficient solar energy devices, the output power of photovoltaic (PV) cells is easily affected by the external environment. In order to solve the problem of the maximum power output of PV cells, this paper proposed a maximum power point tracking (MPPT) method. Based on the online particle swarm optimization (PSO) variable step length algorithm, the pulse width modulation (PWM) control module parameters are set according to the parameters of the PV cells’ output voltage. By dynamically adjusting the output voltage step of the PV cells online, the output of the PV cells is stabilized near the maximum power point (MPP). The simulation results concluded that the method and model could accurately adjust the output voltage according to the external environment changes in real time and reduce the voltage fluctuation at the MPP, providing a new idea to solve the problem of MPPT of PV cells.