A Real-Time Harmonic Detection Method for Single-Phase Active Power Filters

Harmonics, due to the increasing use of nonlinear loads, such as converters and solid state switching devices, has become a serious problem in power systems. Active power filters (APFs) have been used effectively to eliminate harmonic components. Precision of harmonic detection is one of the most important factors of APFs. This paper describes a novel circuit is proposed for real-time harmonic detection as an alternative to conventional approaches. This circuit is based on a switched capacitor band-pass filter and a Phase Locked Loop (PLL) which has low distortion sine wave output. This PLL follows not only phase of reference signal but also its amplitude. Harmonic components have been obtained by subtracting produced fundamental component with PLL from distorted signal. Fundamental and harmonic components of distorted line voltage and current have been successfully separated during experiments.


Introduction
The increasing application of power electronic devices has led to serious concerns about harmonic pollution. The compensation for harmonics and reactive currents becomes increasingly important both for power utilities and the sensitive equipment they feed with quality power, thereby avoiding fault and power loss. The current method for harmonic cancelling by APF has been proposed at the beginning of the 1970s [1][2][3]. APFs basically operate by detecting the harmonics and injecting these harmonics with the same magnitude but the opposite phase into the power system. The performance of an APF depends on the inverter characteristics, control strategy, and the accuracy of the reference signal. Obviously, fast and precise harmonic detection is one of the key factors to design APFs. Having proposed the APF technique, a number of papers have been published to introduce different methods for obtaining the APF reference current. These methods operate effectively in the frequency or time domain . Such classification is given in Table I. Harmonic detection by using Fourier transformation needs more than one cycle of input signal and also needs time for determination in the coming cycles. Therefore, the harmonic cancellation is delayed. Instantaneous p-q theory can only determine the harmonic current components for three phase systems and requires balanced load conditions. All harmonic detection methods mentioned above have their own advantages and drawbacks. They are effective solutions, but all methods need a lot of time for the required determination, which usually is implemented with digital signal processor, hence the cost of the control system is too high. This paper presents a new method to improve the performance of harmonic detection. The proposed circuit is implemented by using a switched capacitor band-pass filter and a PLL which has low distortion sine wave output to obtain harmonic components from a distorted waveform. As the experimental results show, this circuit enables the harmonic detection with high precision and speed. Therefore the harmonic detection by using PLL is suitable to improve the compensation performance of APFs

Harmonic Detection by Using PLL
The proposed method basically works by producing fundamental component and subtracting this fundamental component from distorted wave. A PLL with low distortion sine wave output has been designed for producing fundamental component of distorted signal. This PLL follows not only phase but also amplitude of input signal. Figure-1 depicts the block diagram of circuit where 1 and ℎ are effective value of fundamental and total harmonics. and can be unequal.
A voltage controlled digital oscillator (VCDO) has been designed by using direct look-up table method for low distortion output PLL. The direct look-up table method is based on reading the stored samples of the sine waveform from a table [29,30]. The frequency of generated sine wave depends on the sampling interval t(s), the step size ∆ and the table length N. It can be determined by where means clock frequency. For producing low distortion sine wave, step size ∆ should be chosen ∆= 1 [31][32][33][34][35][36]. The generated sampled waveform is only an approximation to sine wave. Because of the approximations made in the sine wave generation, a certain amount of the energy of signals falls into other frequencies. This spurious energy is called harmonic distortion [37]. It is defined as below.
1 is effective value of n. order harmonic and is effective value of total signals. In this study, harmonic distortion is measured by using Hameg HM 8027 distortion meter [38]. The designed VCDO is shown in Figure-2 and was performed by using a microcontroller 16F84A [39]. The length of the look-up table is N = 256. Analog signal was generated by using a digital to analog converter DAC0808 [40]. The required clock is produced by using a voltage controlled oscillator. So we can adjust the frequency of sine wave by a control voltage. Figure-3 shows the transfer function of VCDO.  From Figure-5 it can be seen that the damping factor = 0.8 that will produce an overshoot of less than 20% and settle to within 5% at = 4.5. The required settling time is 1s. Then, time constants can be calculated.
A circuit shown in Figure-6 is designed for PLL which follows the amplitude of the reference signal. The reference signal is taken from the power net by a voltage divider. the divider ratio for fundamental and is for the harmonics which has not to be equal to . Reference voltage of digital to analog converter is chosen 15V for producing a sine wave that has constant amplitude. Input signal is filtered by a 8 th order low pass filter to obtain fundamental component. Then, this fundamental component is rectified. So, we obtain a dc voltage proportional to the amplitude of the fundamental component. This dc voltage and sine wave are applied to the analog multiplier. Output of the amplifier is set to 1 and therefore this PLL is able to follow the amplitude of the reference signal. Owing to this feature the fundamental is eliminated totally at the output of summing amplifier. Distortion factor of sine wave remains at the same level, d = % 0.03. The time constant of RC low pass filer is crucial. As it has a strong influence on the PLL system it must be optimized.

Effects Of Harmonics Phase and Solution
Due to the fact that harmonics are not in same phase, fundamental component of distorted wave and produced sine wave by PLL have different phases. Phase detector is a logic circuit. Therefore, it senses the zero-cross of distorted signal. As a result, we can't produce fundamental component of distorted signal in phase. A new circuit is proposed for solving this problem. Block diagram of the circuit is shown in Figure-  A switched-capacitor filter is used as band-pass. Its cutoff frequencies are set to a typical accuracy of ±0.2% by an external clock frequency. The center frequency of band pass filter equals to the line frequency and gain is 1 in the filter's pass band. So the fundamental is passed without changing phase and magnitude, but the harmonics are suppressed. Another potential problem in the power systems is the drift of the line frequency. When its frequency is changed, the switchedcapacitor filter's center frequency must also be tracked. The center frequency of a switched-capacitor filter is a certain fraction of the frequency of a square-wave clock. This allows filter designs whose cutoff frequencies are variable over a wide range simply by changing the clock frequency [43]. In order to solve unstable line frequency problem, a new clock generator circuit was developed by using this feature. The suggested clock generator circuit is shown in Figure- Figure-7 shows the experimental set-up for testing the proposed method. The filter, a MAX267, is a commercially available switched-capacitor, consisting of two second-order filters. It needs ±5 V power supplies. An input clock and 5-bit programming input precisely set the filter clock/center frequency ratio. Quality factor Q is also programmable from 0.5 to 64. The MAX267 operates with center frequency up to 57 kHz by employing lower 0 ratios.

Experimental Results
Waveform and spectral measurements were made with Data Acquisition Hardware and LabVIEW software [44]. Figure-8 shows the waveform of a computer power supply current and its harmonics derived from designed circuit. Distortion factor, as measured with an HM 8027 distortion meter, is = %0.03.

CONCLUSION
In this study, a real-time harmonic detection method for single phase active power filters has been presented. The proposed method basically works by producing fundamental component of distorted wave and subtracting this fundamental component from distorted wave. This method uses a PLL and a switched capacitor bandpass filter. The switched capacitor band-pass filter is used for sensing correct the phase of the fundamental component. Its center frequency is set at the line frequency, and gain is 1 in pass band. A clock generator circuit is designed for tracking the line frequency. So, the harmonics are suppressed but the fundamental is passed without changing phase and magnitude. The PLL is used for producing fundamental component of distorted wave. The fundamental component of a distorted signal with 0.03% total harmonic distortion was generated by using direct look-up table method. As the experimental results shown in Figure-8, this circuit enables the harmonic detection with high precision and speed.