Aiming at the electric vehicle charging pile control system has the characteristics of multi-parameter, strong coupling and non-linearity, and the existing traditional PID control and fuzzy PID control methods have the problems of slow charging speed, poor control performance and anti-interference ability, as well as seriously affecting the service life of the battery, this paper designs a kind of improved particle swarm algorithm to optimize the PID controller of the charging control system for electric vehicle charging piles, and utilizes the improved particle swarm algorithm to Adaptive and precise adjustment of proportional, integral and differential parameters, so that the system quickly reaches stability, so as to improve the accuracy of the system control output current or voltage. Simulation results show that the optimized system response speed of the improved particle swarm algorithm is improved by 3.077 s, the overshooting amount is reduced by 1.01%, and there is no oscillation, which has strong adaptability and anti-interference ability, and can significantly improve the control accuracy and charging efficiency of the charging pile control system.