Digital controller for active power filter based on P-Q theory under non-ideal main voltages

Received Dec 2, 2020 Revised Apr 18, 2021 Accepted Jul 13, 2021 This paper proposes a control strategy active power filter under non-ideal main voltages. The P-Q Theory is used to generate three-phase active power filter reference currents, but the P-Q Theory has a weakness when implemented under non ideal main voltages. This paper proposes a reference current generation method using modified P-Q Theory under non-ideal main voltages conditions. Before calculating the P-Q Theory, the non-ideal voltage at the source is normalized by using PLL to determine the phase angle which is then carried out by generating an ideal three-phase signal. The proposed method is simulated and implemented in a three-phase active power filter controller. The test results show the improvement in the performance of the P-Q Theory under non ideal main voltages with THD 7.21% to THD 3.29%.


INTRODUCTION
The growth in the use of non-linear electricity loads on domestic consumers and industries is the main source of harmonics. These harmonics cause the form of voltage and/or current to periodically distort. These harmonics cause various problems in the power system, such as transformer losses, overheating of the equipment, the emergence of excessive neutral currents to reduce the life time of the equipment [1]- [3]. These harmonics occur when the fundamental waveform is distorted by another waveform that has a different frequency order. So, to remove harmonics from the electrical system is to separate the fundamental waveform from the waveforms that distorted it [4]- [6].
Passive filters are one of the most widely used methods of harmonic mitigation in previous decades, but now they are starting to be abandoned mainly because they are inflexible, heavy in weight, and can only remove harmonics at certain frequencies [7], [8]. The active power filter is a solution to the weakness of the passive filter which can reach almost all harmonic orders hitching a ride at the fundamental frequency. This active power filter topology is an inverter that can inject anti-harmonic currents into the grid via the Point of common coupling. In addition, active power filters are also able to compensate for the reactive power of the load so as to improve the quality of electrical power [9], [10].
The P-Q theory is a method that can be used to switch an inverter of active power filter so that it can inject anti-harmonic currents into the electrical system. The P-Q theory simplifies the calculation of active and reactive of three-phase power so that the calculation time needed to generate an anti-harmonic current is relatively faster [11]- [14]. The three-phase currents and voltages on the source side are transformed using the clark transformation into αβ coordinates. However, the P-Q theory has a weakness if it is implemented in non-ideal source voltage conditions. The accuracy of P-Q theory decreases in determining the anti-harmonic reference current if it is implemented at a non-ideal source voltage so that the active power filter performance decreases in mitigating harmonics in the electrical system [15]- [17]. In this paper, we propose a method to improve the accuracy of the P-Q theory tested under non-ideal source voltage conditions. These non-ideal voltage conditions include distorted source voltages and unbalanced source voltages. Through this proposed method, the accuracy of this P-Q theory does not decrease even though it is applied to non-ideal source voltage conditions.

RESEARCH METHOD
The switching pattern of the active power filter to inject anti-harmonic currents is determined by the reference current. The reference current is compared with the injected anti-harmonic current using the hysteresis current control. Then we will get the switching pattern to adjust the active power filter. The reference current in this paper is calculated using the P-Q theory. The magnitude of the three-phase voltage and current measured in abc coordinates will be transformed into aß coordinates using the clarke transformation. The (1) and (2) are respectively the voltage and current transformation matrices from the abc coordinates to the aß coordinates [18], [19].
The instantaneous active power and reactive power based on the P-Q theory can be expressed by the components of the voltage and current at the αβ coordinate as in (3) [20].
The instantaneous power of p and q ini (3) consist of AC (p~ dan q~) and DC (P dan Q) components, so that: The current on the source side as a function of power p and q can be expressed as in (5): From (4) and (5) it can be seen that to eliminate reactive power from the source side is to make the q value negative in (5). To separate the harmonic components of the source current, power p uses only the AC component p~. The power loss at voltege source inverter is represented as Ploss [21]- [23]. so that the generated reference current is: The reference current in (6) is transformed from the αβ coordinate to become the abc coordinate with (7) as follows: The voltage in the electrical system may not always be in ideal conditions due to various abnormal conditions so that in real conditions, the grid voltage is not always in a pure sinusoidal condition [24], [25]. In the calculation of the reference current based on the conventional P-Q theory, the voltage waveform is assumed to be in a pure sinusoidal condition.
The (7) shows the calculation for generating the reference current. The value of the voltage in (1) will be constant under ideal voltage conditions. However, in a distorted voltage condition, the voltage value will not be constant so that the reference current generated is not the actual current waveform needed to compensate for the harmonic waveform [26], [27]. Therefore, it can be concluded that the performance of the P-Q theory will decrease if applied to under non-ideal main voltage.
To overcome the weaknesses of the P-Q theory under non-ideal main voltage, in this research, the source voltage that is not ideal is normalized by using a Phase Lock Loop (PLL) to detect the phase, then generated a three-phase waveform signal based on (8). Figure 1 shows a block diagram of the P-Q theory of active power filters under non-ideal main voltage.  Table 1 shows the parameters used in simulating active power filters under non-ideal main voltages.

Simulation result
Non-Ideal main voltages could be unbalance and or dirtorted voltage. On this paper, the unbalanced voltage is formulated on the simulation as shown in (9). 1559 Figure 2 shows the simulation results in unbalanced voltage conditions. the voltage value of each phase is not the same. Calculation of the reference current by P-Q theory at unbalanced voltage conditions will cause the THD is relatively larger. Figure 3 show the THD at unbalanced voltage conditions. To improve the P-Q theory, unbalanced voltage is normalized using PLL and (8). Figure 4 shows the simulation results at distorted voltage with voltage normalization. THD of current source at distorted main voltage as shown in Figure 5.

Experimental result
Tests are carried out to determine the performance of the active power filter reference current generator on a laboratory scale. Figure 6 shows the reference current generator of active power filter, Figure  7 shows Programming STM32F4 The harmonic spectrum and the THD value in the implementation results were analyzed using the FFT Analysis found in MATLAB/Simulink. This analysis method is like what has been done in the analysis process of simulation results. The current signal data in the time domain obtained from the implementation results are then imported into MATLAB/Simulink for analysis. Figure 8 (a) shows an unbalanced three-phase voltage. This unbalanced three-phase waveform will be used as an input signal in the calculation of the P-Q theory. Figure 8 (b) shows the current of source side after compesated under unbalance voltage. The THD value of the source current implemented under unbalanced voltage conditions is 30.68% as shown in Figure  9. This THD value is big enough because the reference current generated by the P-Q theory is not accurate in compensating for harmonic currents under unbalanced voltage conditions.  The test is also carried out under distorted voltage conditions. Figure 10 (a) shows a distorted three-phase voltage waveform. This distorted waveform is obtained by adding an inductor to each of the load phases of the 6-pulse rectifier. This inductor will affect the 6-pulse rectifier switching process so that it will cause the source voltage to be distorted. This distorted voltage waveform will be used as input in the P-Q theory calculation to generate a reference current waveform. The current waveform compensation results in distorted voltage conditions as shown in Figure 10 (b). In this distorted condition, the compensated source current is not pure sinusoidal. The THD value of the source current is compensated for in a distorted voltage condition of 7.42% as shown in Figure 11. The reference current generated by the P-Q theory under distorted voltage conditions does not accurately compensate for the harmonic current waves so that the compensated current is not pure sinusoidal. Normalize the voltage by applying PLL and (8). Figure 12 (a) shows the voltage condition after normalization. Figure 12

CONCLUSION
Based on the simulation results and analysis of the data obtained from simulation and implementation, several conclusions can be drawn as follows: a) The active power filter control method using the P-Q theory can reduce the harmonic. b) The accuracy of the P-Q theory in eliminating decreased harmonics under non-ideal voltage simulation conditions. c)The method of normalizing the voltage signal using PLL which is used in non-ideal voltage conditions can eliminate harmonics with the THD results close to the simulation at ideal voltage conditions.