Abstract:A new real-time harmonic detection method for active power filters based on lifting wavelet transform was proposed. A classical Daubechies wavelet primary function was factored into lifting steps of second generation wavelet using Euclidean algorithm for harmonic analysis. The improved real-time frame operation algorithm can avoid the reconstruction of data frames by joining the current sample values with history data in succession. Period extension method was adopted in lifting wavelet process and resolving data edge influence. Real-time harmonic detection algorithm was constructed by self-writing Simulink/ Embedded Matlab. The C codes, which were generated from Simulink/RTW and dSPACE/RTI tools, were loaded into dSPACE real-time hardware system, and the analysis was completed. Experimental resuits show that the proposed method can abstract harmonic component accurately, reduce the control tran- sient adjusting time to less than one period wave, and achieve hardware implementation rapidly. It is proved that the lifting wavelet transform algorithm can save half of time compared with the first generation wavelet mallet algorithm.