This paper proposes a photovoltaic (PV) dynamic maximum power point tracking algorithm based on improved PSO (particle swarm optimization) optimization in response to the problems associated with low tracking accuracy, poor immunity, and the ease of falling into local optimization, as well as the failure of the traditional MPPT algorithm (maximum power point tracking algorithm) under partial shading conditions. Firstly, three traditional MPPT algorithms are compared and analyzed, followed by simulation testing under standard and partial shading conditions. The advantages and disadvantages of three traditional algorithms are analyzed. Secondly, it is proposed that dynamic inertia weights and learning factors be applied synchronously during the optimization process in order to speed up the tracking speed of particle swarm optimization. In order to evaluate the effectiveness of different algorithms, it is best to simulate them under static and dynamic conditions. In comparison to the standard particle swarm algorithm and three other traditional algorithms, the proposed algorithm is capable of tracking the maximum power point quickly and accurately under conditions of uniform illumination and static and dynamic partial shading. There is a faster convergence speed as well as a greater degree of accuracy at steady state.