This paper mainly introduces a composite controller which is based on d-q rotating frame, and the controller is a combination between PI controllerSandSrepetitiveScontroller. Repetitive controller can not only improve the defects of PI control, such as the poor track effect and poor suitability in external excitation signal system with periodic, but also own excellent control ability of tracking and suppress the excitation signal in the feedback system. This composite controller combines advantages of PI control and repetitive controller, which can eliminate the steady-state error,have better robustness and good dynamic current response. A detailed design of composite controller is researched, and then proved in the system of three-phase shunt APF, which indicates effectiveness and excellent of this new method.