Harmonic detection accuracy and real-time directly affect the performance of the APF compensation.This paper carried out improvement based on traditional d-q harmonic current detection algorithm,used the d-q method based on positive sequence fundamental extractor for the problem of the phase-locked loop(PLL);used the d-q method based on the DC component for the low-pass filter(LPF) problem.Thus combining these two methods’ advantages,it proposed d-q method without PLL and LPF.Simulation and experimentation show that the improved d-q method can precise detect the compensation current signal.