\There are many factors that affect the performance of active power filter, which is a key factor for command current tracking control. Aiming at the deficiency of traditional PR controller, this paper puts forward an improved PR controller-vector resonant controller. The controller has the advantages of stronger anti-interference ability and greater gain at the resonance point, and it can improve the accuracy of harmonic compensation in the current compensation control. In this paper, the digital controller in the digital control system has been given a detailed design. Finally, the experimental results show that the control strategy can further reduce the harmonic content and improve the compensation accuracy.