System and method for harmonic detection and control of APF (active power filter) based on windowed all-phase FFT (fast Fourier transform)

The invention relates to a system for harmonic detection and control of an APF (active power filter) based on windowed all-phase FFT (fast Fourier transform), which comprises an alternating-current power grid with a nonlinear load and an active current filter, and is characterized by also comprising a control module and a detection module. A working method comprises: signal detection, command triggering, pulse uttering and generation of compensating current. The system and the method have the advantages that (1), the system is simple and the cost is medium; (2) the frequency, the amplitude and the phase of the harmonic current can be detected in an accurate and real-time way, and the compensating performance of the APF can be guaranteed; (3) the accuracy and the real-time performance of calculation can be improved; and (4) the current tracking control effects of the APF can be improved.