Active Power Filter Control With Vibrating Coordinates Transformation

This paper presents a control system of an active power filter (APF) based on vibrating reference frame transformation. The proposed vibrating reference frame provides a representation of non-sinusoidal quantities (here the active filter current vector) in the form of sinusoidal signals in a stationary frame, and thanks to that, DC signals are achieved in a dq synchronously rotating frame. The article presents theoretical analysis as well as simulation and experimental tests.


Active Power Filter Control With Vibrating Coordinates Transformation Sebastian Wodyk and Grzegorz Iwanski , Senior Member, IEEE
Abstract-This paper presents a control system of an active power filter (APF) based on vibrating reference frame transformation. The proposed vibrating reference frame provides a representation of non-sinusoidal quantities (here the active filter current vector) in the form of sinusoidal signals in a stationary frame, and thanks to that, DC signals are achieved in a dq synchronously rotating frame. The article presents theoretical analysis as well as simulation and experimental tests.
Index Terms-Active power filter, vibrating reference frame, power quality.

NOMENCLATURE i F
Active power filter current. i F ABC Three-phase active power filter current. i F αβ Active power filter current αβ components in a stationary reference frame. i * F , i * q F Reference active power filter current and its delay by π/2 vector. i * F αβ , i * q

F αβ
Reference active power filter current αβ components in a stationary reference frame and their delayed by π/2 components.

I. INTRODUCTION
A MONG many devices connected to the power grid, the non-linear load is especially unfavorable because it strongly affects power quality, due to generation of current harmonics. A significant share in power quality degradation lies with three-phase diode and thyristor rectifiers, which are widely used in industry due to low cost and high reliability. Moreover, some share of the harmonics proliferation belongs to residential areas [1]. In order to reduce their impact on the power system, many methods have been proposed, which in general can be divided into passive and active.
Active methods, based on power electronic converters, have many advantages over passive methods, e.g., smaller weight and volume, wider application flexibility, reduced resonance issues, better filtering performance [2], [3]. In the case of compensation harmonics in a three-phase system, active filtering may be performed with a three-phase voltage source converter connected to the grid near the source of harmonics. Such a configuration is known as a shunt active power filter (APF) and is presented in Fig. 1. Proper operation of APF requires high accuracy, which depends on current reference determination, and on the other hand, on the accuracy of the inner current control loop.
Current harmonics may be extracted from instantaneous power components pq [4], using high-pass filtering. A similar approach is high-pass filtering of synchronous reference frame dq currents [5]- [7], where the grid voltage phase angle is used for transformation. For both pq power based and dq current based harmonics detection, reference signals consist mainly of harmonics the frequencies of which are 6n times fundamental frequency, where n is a positive integer, and some DC part responsible for maintaining voltage in the converter DC-bus. Another approach is stationary frame current harmonics detection [8]; then the reference current contains harmonics of frequency 6n±1, and some part of fundamental harmonic. This solution is useful especially in single phase systems, however with consideration of different frequencies [9].
Current harmonics detection, independently of the chosen method, is a challenging issue in digital control systems, due to delays caused by signal processing [5], [10], [11]. Therefore, switching frequency (as well as sampling frequency), should be as high as possible in order to reduce the impact of these delays on filter performance.
As the reference signals are not DC or sinusoidal, it is not trivial to achieve accurate tracking. One of the methods is utilization of classic proportional-integral (PI) controllers [4], [11], [12], though it is known that they cannot achieve zero steady state error for non-DC reference. Another approach is to use hysteresis controllers [13]- [15], which introduces some drawbacks like variable switching frequency.
Constant switching frequency may be obtained using a variable hysteresis band, which was proposed for a predictive control system [16], but such systems require precise knowledge on converter parameters and are computationally expensive. PI controllers may be applied also in a multiple reference frame, which rotates synchronously with each harmonic. The authors of [17] applied such a system in a series APF. In case of shunt filters, similar systems were used for reference generation [18]- [20], but not in an inner current control loop. Although a solution like that provides zero steady state error for selected harmonics, it implies controllers limitation problems, because realization of anti-windup in a structure of several parallel-connected terms is not trivial.
Another solution for selected harmonics control are oscillatory terms in controllers [6]- [8], [20], which may be applied both in a stationary frame and in a synchronously rotating frame. Then, output of each oscillatory term should be sinusoidal, which induces further issues associated with controllers limitation. Moreover, tuning of control systems containing parallelconnected resonant terms cannot be done in a simple way, and requires often heuristic methods like particle swarm optimization [21].
Recently a new stationary frame transformation, called vibrating coordinates transformation, has been proposed [22]. It allows to represent a distorted vector (containing harmonics and negative sequence component) in the form of a new vector which creates a circular hodograph. Then the control system can be built basing on PI controllers, because vector components representation in a synchronous frame are the DC signals, as presented in the cited reference. APF reference current is clearly an example of a distorted vector.
This paper presents a novel approach to shunt APF control, which applies vibrating coordinates transformation. The main assumption of a control system is utilization of PI controllers, in such a way that the proportional term is applied in the stationary reference frame and the integral term is applied in the synchronous reference frame. Another contribution is the current limitation method, which is consequently omitted by authors. The paper presents theoretical analysis as well as simulation and experimental studies.

A. Direct and Inverse Transformation
According to [22], APF current i F can be represented in vibrating coordinates using the following transformation matrix: where: u g -grid voltage, i * F -reference APF current, i * q Freference APF current delayed by π/2, i base -rms value of i * F scaled by √ 2 (base vector length in a vibrating reference frame). In order to achieve appropriate control signals, which for grid connected converters represent voltage drop across inductor reactance, an inverse transformation matrix is used: where di * F , di * q F -signal corresponding to derivative of reference current and its delayed vector, di base -rms value of di * F , scaled by √ 2. In order to provide correct delays between i * F and i * q F , as well as to determine di * F and di * q F , decomposition of the reference filter current, taking into account the order of harmonic which should be filtered is necessary. Considering compensation of 5 th , Description of αβ current and its derivatives, forming the basis of the calculation, is presented in the Appendix.
Determination of the reference current harmonics may be done by filtration of load current i L , as shown in Fig. 2. The presented filtration structure ensures low coupling between respective harmonic, which allows to achieve high attenuation of unwanted frequencies, maintaining satisfactory dynamics. Fig. 3. presents the Bode plot of the proposed current harmonics detection structure, for parameters presented in Table I. Magnitude gain for each path is 0 dB for its frequency, and the phase shift is zero.
Fundamental harmonic of the reference APF current is the result of DC-bus voltage regulation, like in classical voltage oriented control systems. When all components of a reference current are determined, i base and di base can be calculated in the following manner: Such an assignment of i base causes that current vector length in a vibrating reference frame will be proportional to √ 2I F RMS . It should be noted that any vector in a stationary αβ frame, if it contains no harmonics and negative sequence, meets this assumption. As the content of the respective harmonic in the control signal is higher by its order, because it is proportional to the voltage drop through an APF inductor, di base is selected in a similar manner, taking into account the number of each harmonic. Then the APF current in a vibrating reference frame i F is expressed as: where ωt stands for the grid voltage phase angle. Further transformation to the rotating reference frame gives the following result: Basing on (10) the reference current in the dq frame is equal to i base in the d axis and to 0 in the q axis.

B. Current Limitation
The important feature of APF is maximal apparent power, which strictly depends on the converter rms current. Since current is the result of the control system operation, its rms value limitation needs to be taken into consideration. It should be noted that this issue is consistently omitted by the authors. In general, calculation of the rms value of a signal requires integration. However, in case of the proposed system the instantaneous value of each harmonic is known, thus the rms value of the reference current can be simply assigned with (7). On the one hand, current limitation is applied in the DC-bus voltage controller, for fundamental harmonic, and on the other hand, compensating current also needs to be limited. It has been assumed that the fundamental harmonic current i F1 should have the highest priority, because it is responsible for maintaining the voltage in the DC-bus. Further, the maximal rms value of the harmonic current I Fhrms can be expressed as: where I rmsMAX is the maximal converter current rms value.
When the reference harmonic current tends to exceed this value, each harmonic should be recalculated using the scaling factor that ensures the overall current is kept within the limit. The scaling factor is I Fhrms to the actual reference harmonic current ratio. The proposed current limitation structure is presented in Fig. 5. In order to simplify calculation, rms values scaled by √ 2 of all signals are used, which gives the same results. The scaling factor is limited from zero to one. If harmonic current is below the limitation, the scaling factor is equal to one, otherwise it decreases.
The results of the proposed current limitation method are presented in Figs. 5 and 6. Two situations were taken into account, the first one, when the load harmonic current rms value causes reaching the limit, and the second one, when fundamental harmonic current reaches the limit. As it can be observed, fundamental harmonic has the highest priority, as i * F1d rises, the rms value of harmonic current decreases in order to match the limit.

C. Transformation Constraints
Seeing that calculation of coefficients for both direct and inverse transformation requires division by varying terms, related to the reference current, some constraints need to be imposed in order to avoid division by zero, and in consequence, instability of the system. For this purpose, switching between two modes, from which the first is classical dq control, and the second one is the use of the vibrating reference frame transformation. Mode selection depends on the instantaneous value of the term i * F α i * q F β − i * q F α i * F β , as well as the rms value of the reference current, expressed as i base . In general it can be described as (12) shown at the bottom of the next page, which consists of DC component and oscillating parts. It crosses zero when the reference current is equal to zero, or when the oscillating part  magnitude is greater than the DC part, which may occur in transient states, when reference current is changing.
The proposed solution to this problem is the mode selection scheme, dependent on the reference current, which is presented in Fig. 7. Mode switching from the vibrating reference frame (mode = 1) to classical dq (mode = 0) occurs when one of the two conditions is not met. First, when i base is lower than I min . Second, when the instantaneous value of |i * F α i * q F β − i * q F α i * F β | is too low. It is checked by comparison of this term with margin, that is its average value scaled by factor k margin , which is equal to 0.01 in this case. If i base is greater than I min and |i * F α i * q F β − i * q F α i * F β | is above the margin longer than the assumed time τ m, the system returns to operation in the vibrating reference frame (mode = 1). It has been assumed that τ m is equal to 10 ms. The values of I min , k margin and τ m were established by trial and error. An example of mode selection operation is presented in Fig. 8.

D. Control System With DC-Bus Voltage Regulation
The proposed control system of APF is presented in Fig. 9. The measured DC-bus voltage passes through low-pass filtration in order to reduce the influence of harmonics to regulation performance. The cut-off frequency is 150 Hz. The output of the DC-bus voltage controller is the reference d component of the fundamental current harmonic, limited to √ 2I rmsMAX , which is transformed to the αβ frame using the grid voltage angle. Band-pass filtration of the grid voltage reduces the impact of voltage harmonics on angle calculation. Harmonics of the APF reference current are found using load current decomposition (Fig. 2).  Further total reference current goes through the limitation block (Fig. 4). Limited current is used to calculate transformations coefficients and reference current. Current is regulated both in stationary and synchronous reference frames, such that in the stationary frame a proportional term is used, and in a synchronous frame an integral term is used. Thanks to that, the system is less sensitive to possible inaccuracies that may affect the vibrating reference frame transformation. It should be noted that in ideal conditions, the described current controller is equivalent to the classical PI controller applied in the dq frame. If mode = 1, the vibrating reference frame transformation is used, otherwise classical dq control is applied, which is described in Section II-C. Finally, the control signal is a sum of controllers output signals and grid voltage feedforward.

III. SIMULATION AND EXPERIMENTAL RESULTS
Simulation and experimental tests were carried out with the use of a laboratory rig configured according to the scheme presented in Fig. 1. Simulated grid voltage contains 3 V of 5 th harmonic and 3 V of 7 th harmonic, which results in 2.5% voltage total harmonic distortion (THD). For the sake of a non-linear load, a three-phase diode rectifier with an inductive input filter was used, but the proposed control system is feasible for any type of non-linear three-wire load, e.g., frequency converters of AC drives or large AC motors soft-starters, because they are a source of harmonics of frequency 6n±1. It should be noted that filtration of harmonics that are introduced by switched-mode power supplies, e.g., in computer centers, demands a different approach due to a significant share of zero sequence harmonics and single-phase character of a load. APF was realized with a three-phase two-level voltage source converter, built with IGBT transistors. In the experiment, the control system was implemented in a TMS320F28335 microcontroller. The parameters of the examined circuit are presented in Table II.
The results of the simulation are presented in Figs. 10 and 11. The operation of APF may be divided into three stages, as can be seen in Fig. 10. They are: 1) turning on of the converter and DC-bus voltage creation (20 ms), 2) switch on of the harmonic filtration (100 ms) 3) change of load (150 ms). Filtering of current harmonics is enabled when reference voltage in the DC-bus is provided. The simulated load equals 3.3 kVA initially, and 6.3 kVA after step change. As can be noticed, the control system operates omitting the vibrating reference frame (mode = 0) for some time after the start of the filtering, which is caused by the issues described in Section II-C. Further, when mode = 1, the vibrating reference frame is applied, and converter current in a new d q takes the form of DC signals. The control system reacts quickly to the load change, in time about half of a fundamental harmonic period, which is considered a satisfactory result. Current filtration performance is presented in Fig. 11, APF produces desirable harmonics. As can be noticed, Fig. 9. Scheme of the proposed control system. turn on of the vibrating reference frame transformation visibly corrects the grid current i g shape. Fig. 12 presents comparison of different APF control methods utilizing PI controllers. One of them is control of each harmonic in a synchronous frame rotating with its pulsation (multiple reference frame) [17]. The second one is control in a classical dq reference frame, with high-pass filters (HPF) used to determine load harmonic current [10], [11]. Both methods were simulated with the same load and supply parameters as the vibrating reference frame control. As can be seen, the vibrating reference frame features the best dynamic response and the lowest overshoot (in terms of filtered grid current), among the others. This is due to the lack of dynamic terms in the control loop which are needed in multiple reference frame. Decomposition of the measured APF current was done with the filtration structure presented in Fig. 3. On the other hand, the greatest overshoot occurs in classical dq control, which is caused by harmonic current detection with second order high-pass filters with 50 Hz cut-off frequency. It should be noted that dynamic performance of such a system may be improved by the use of the higher cut-off frequency, but the cost is the accuracy of the harmonic extraction, especially 5 th and 7 th .
The steady-state performance of the simulated methods is compared in Table III. The presented current THD contains swathing ripples. The vibrating reference frame reveals slightly better performance than the multiple reference frame, although both methods can theoretically achieve zero steady-state error. However, in the case of the multiple reference frame, band-pass filtration is applied in measurement of load current, as well as filter current, making the system more sensitive to mutual influence of the current harmonics. Multiple reference frame approach demands two control paths for each harmonic, which might lead to issues with multiple controllers tuning as well as with limitation of multiple integrators, whereas in a vibrating reference frame there are only two integration terms. The highest current THD was achieved for a classical dq system, which is caused mainly by utilizing PI controllers for tracking strongly oscillating reference, and by attenuation intruded by  high-pass filtration to a lesser degree. This method introduces some drawbacks like non-intuitive limitation of the reference APF current, which demands calculation of non-sinusoidal signals rms values, or share of measuring noise in the reference current. Such issues do not concern the vibrating reference frame control and multiple reference frame control, due to access   to the each harmonic separately, which allows also selective filtration.
The experiment was carried out in conditions close to simulation; the difference is load power which equals 4.3 kVA, with no step changes, which is caused by limitations of the experimental setup. The laboratory rig was connected to the grid via an 8 kVA 400/230 transformer, which resulted in a much higher grid impedance, approximately equal to transformer impedance (see   Table II), and as a consequence, smaller current ripple in the experiment. Results were recorded with a DL850E Scopecorder in the form of data files, oscillograms were prepared using MATLAB for adding appropriate scales. Three-phase load and filter current measurement for the registration purpose was realized with an A622 probe with 100-kHz bandwidth, whereas grid current was achieved as their sum. Synchronous reference current components are visualized from the control unit using a digital-to-analogue converter built in the controller board. Laboratory setup is presented in Fig. 13. Fig. 14 presents the beginning of the APF operation during experimental tests. Like in simulation results from Fig. 11, DCbus voltage creation can be noticed at the first and further start of harmonic filtration. It should be noted that the experimental d q current contains more distortion than the simulated one. This is caused by several factors neglected in the simulation, like discrete realization of the control and sampling delay (100 μs), measuring noise, dead-time (2.5 μs) applied in the laboratory converter, or grid filter inductor resistance (see Table II).
Steady-state operation of APF is presented in Fig. 15. Moreover, comparison of a classical synchronous reference frame current i dq and a new synchronous reference derived from the vibrating reference frame current i' dq is presented. Despite the distortion, the i' dq current contains a significant share of the DC component in contrast to classical i dq . A negligible share of the fundamental harmonic makes the character of i dq strongly AC. In such a condition the integral controller cannot be accurate due to the finite gain for AC signals. Zero steady-state error requires additional resonant terms. Infinite gain for DC signals ensures accuracy of regulation with the use of the vibrating frame transformation, because all demanded harmonics transform into the DC signal.
The results of current filtration during experimental tests are presented in Figs. 16-18. Although the transformation enables a certain time after load appears, the system filtrates harmonics immediately, which can be seen in Fig. 16, nevertheless further transformation turn on improves APF performance. Fig. 17 presents tests in which APF initially operated only with a proportional controller in the stationary frame and the integration in the vibrating frame was turned on manually.
Integrator outputs I out keeps the DC shape despite the current i' dq distortion. In order to compare operation with a P controller and a full PI controller, fast Fourier transform (FFT) of the load current (the same for both cases) and grid current (separately for each case) is provided in Fig. 18. As can be seen, the transformation gives considerably better results in the filtration of 5 th and 7 th harmonics, but does not influence 11 th and 13 th in comparison to proportional control. Nevertheless, it causes significantly better results in the current THD, as presented in Table IV.

IV. CONCLUSION
The paper presents an innovative approach to an active power filter control system, using the vibrating reference frame transformation. Thanks to that, APF current which consists mainly of high harmonics may be represented as DC signals in a new d'q' reference frame. Therefore PI controllers may be successfully applied in order to achieve zero steady state APF current error for selected harmonics. Some additional issues were discussed such as load current decomposition necessary for APF reference current assignment and converter current limitation method, which provides apparent power limitation.
Operation of the presented control system was verified in both simulation and experimental tests, which brought satisfactory results. The proposed control system is suitable for implementation in a digital signal processor such as TMS320F28335 used in the experiment and very popular in industry.

APPENDIX
In general, reference APF current components for the selected harmonics and their derivatives, can be described as: