The modeling accuracy of an AGV (Automated Guided Vehicle) mathematical model is a crucial factor affecting the control accuracy of the AGV. Traditional AGVs are usually controlled by PID control algorithms when the system structures are unknown. The parameter configuration of the controllers mainly rely on manual trial and error-method. Therefore, the task volume is large, the performance of the controller is difficult to be guaranteed. In order to solve this problem, this paper uses ARX model and parameter identification method to model the controlled object according to the actual engineering requirements of the magnetic navigation AGV. Based on the identified model, a hybrid particle swarm optimization (HPSO, Hybrid Particle Swarm Optimization) is used to optimize the parameters of the PID controller of the magnetic navigation AGV. Using the integrated error criterion (ITAE) as the error performance index, the control effects of the optimal parameters found by the trial and error method, standard PSO, and HPSO on the magnetic navigation AGV were compared. The results show that the PID controller designed with the HPSO method has better control performance indicators and can improve the adaptability and robustness of the control system.