Research on Harmonic Detection System Based on Wavelet Packet Transform

This paper introduces the basic concepts of harmonics in power system, and expounds the basic principles of harmonic detection algorithms such as Fourier transform, short wavelet transform and wavelet packet transform. The effectiveness of the proposed algorithm is verified by simulation, which shows that the improved wavelet packet algorithm can achieve the uniform division of the harmonic signal frequency band, and improve the detection accuracy of the harmonic signal. Wavelet packet transform could detect the fundamental and harmonic components of the original signal, which is most suitable for the detection of harmonic signals.


Introduction
Harmonic problem has become a global power quality problem, which has attracted the attention of all countries in the world. Voltage sag has become the most important power quality problem affecting industrial equipment. The domestic harmonic pollution is quite serious. It is necessary to take strong supervision measures for harmonics. At the same time, the industrial equipment manufactured by equipment manufacturing companies must satisfy the state's restrictions on harmonics. When the harmonic content of industrial production equipment in normal operation exceeds the national standards, it must be prohibited to use in the power system. Harmonic problems in power system involve a wide range of aspects, and harmonic detection is an important aspect of harmonic problems, is the premise and foundation of harmonic compensation and harmonic control, and plays a milestone role in the governance of power quality problems.

Theoretical basis of Wavelet Transform
Fourier transform is the most basic mathematical analysis method in the field of spectrum analysis and data processing. After continuous development and improvement, Fourier transform has made great breakthroughs, but only the overall characteristics of harmonic signal can be detected by Fourier transform, and the resolution in time and frequency domain remains constant. With the extensive use of non-linear electronic components, a large number of fluctuating and time-varying harmonic currents are injected into the power system, resulting in the distortion of current and voltage signals. Therefore, it is particularly important to analyze the local characteristics of harmonic signals for harmonic detection. Wavelet transform is an important breakthrough in signal processing algorithm. It combines many mathematical methods such as Fourier transform, short-time Fourier transform and numerical analysis. Through wavelet transform, the information of harmonic signal in time domain and frequency domain can be detected.

Fourier Transform
The Fourier transform of the signal f(t) is defined as the following formula 1.
The sufficient condition of Fourier transform of signal f(t) is that f(t) is absolutely integrable in infinite interval, that is, f(t) must be satisfied： After introducing the concept of singular function, some f (t) which does not satisfy absolute integrability can also be used for Fourier transform: Due to Fourier transform can omit the information of time-varying part of signal when analyzing and processing non-stationary signal and abrupt signal, it cannot analyze how the internal harmonic signal changes, therefore, Fourier transform is not suitable for analyzing and processing non-stationary signal.

Wavelet Transform
Wave transform uses a variable time window, which can adjust the size of the window according to the frequency of the analysis signal. Long time window can accurately detect the low frequency information of harmonic signal, and short time window can accurately detect the high frequency information of harmonic signal.

Wavelet Packet Transform
Wavelet Packet Transform is evolved on the basis of wavelet transform and on the basis of actual demand. Therefore, the wavelet packet transform can make up for the disadvantage that the wavelet transform only decomposes the low frequency part of the signal. It can provide a more accurate analysis method than the wavelet transform. It can also adaptively select the frequency band matching the signal spectrum according to the characteristics of the detected harmonic signal. So as the time-frequency resolution is improved.

The design of harmonic detection hardware
Harmonic detection system should have strong measurement function, high anti-interference and reliability, its hardware structure is shown in Figure 1 below. The system transforms the collected current and voltage signals into AC signals with amplitude attenuation through Hall sensor, then realizes the hardware filtering of the signals through anti-aliasing filter and signal conditioning unit respectively, and then converts the signals into digital signals through A/D conversion unit. Then, through the analysis and processing of D S P, the content of each harmonic is calculated. D S P is also responsible for data display, keyboard control and communication with PC.

Voltage signal detection circuit
In the hardware circuit, the micro-precision AC transformer of milliampere level is used to collect the voltage signal. The working principle of voltage transformer is that the number of turns of primary side is the same as that of secondary side. After transformer coupling, the output current of secondary side will be equal to the rated input value, and the output current will produce voltage drop on the output resistance, thus completing the voltage conversion.

Analog-to-digital conversion
Analog-to-digital conversion converts continuous analog to discrete digital by sampling. It divides analog-to-digital conversion into four processes: sampling, holding, quantizing and coding. First, the analog signal is sampled through a low pass anti-aliasing filter, and then the signal is sampled by a sample-and-hold circuit to eliminate the interference of signal aliasing. Sampling circuit will quickly acquire the signal value at each sampling point, and keep it to the next sampling point, while quantizing and coding each sampling value of the signal.

Analysis of simulation and experimental
Through fast Fourier transform of stationary harmonic signal, the amplitude-frequency characteristic curves of fundamental wave and each harmonic signal are obtained, which shows that the ratio of the amplitude of each harmonic component is consistent with the ratio of the amplitude of the harmonic component of the original signal. Wavelet transform is used to decompose the stationary harmonic signal. According to the different time-frequency resolution characteristics of wavelet transform in different scales, the signal components contained in different frequency intervals are separated, so as to achieve the purpose of harmonic detection. By setting the sampling frequency fS = 5000Hz, the analysis results of the low frequency coefficients and high frequency coefficients obtained by the wavelet transform are shown in Figure 2.
The simulation results show that the wavelet packet transform can effectively detect the fundamental and sub-harmonic components of complex harmonic signals, reconstruct the noise signal, extract the noise signal, and has good anti-noise performance.
Figure2. Frequency coefficients decomposed from stationary signals

Conclusions
A real-time harmonic detection system is designed, and high integration and reliability devices are selected. The DSP is applied to harmonic detection and analysis, giving full play to its advantages of fast processing speed. Based on the MATLAB simulation software, by reconstructing the coefficients of the wavelet packet, the fundamental wave and the amplitude of each harmonic in the harmonic signal are detected, the harmonic detection algorithms are analyzed and compared, and the steady-state harmonic signals are simulated respectively. The results show that the wavelet packet transform can effectively detect the time and duration of unstable signals.