Flexible active compensation based on load conformity factors applied to non-sinusoidal and asymmetrical voltage conditions

: This study proposes a flexible active power filter (APF) controller operating selectively to satisfy a set of desired load performance indices defined at the source side. The definition of such indices, and of the corresponding current references, is based on the orthogonal instantaneous current decomposition and conformity factors provided by the conservative power theory. This flexible approach can be applied to single-or three-phase APFs or other grid-tied converters, as those interfacing distributed generators in smart grids. The current controller is based on a modified hybrid P-type iterative learning controller which has shown good steady-state and dynamic performances. To validate the proposed approach, a three-phase four-wire APF connected to a non-linear and unbalanced load has been considered. Experimental results have been generated under ideal and non-ideal voltage sources, showing the effectiveness of the proposed flexible compensation scheme, even for weak grid scenarios.


Introduction
The research on control techniques for active power filters (APFs) applicable to smart distribution grids and microgrids under non-sinusoidal and/or asymmetrical operations is motivated by the increasing percentage of power generated from primary energy sources interfaced through power electronics converters.Distributed generation increases the availability and reliability of the power delivery, enables an increase in power capacity without infrastructural investments but reduces the stiffness of the power system.As a consequence, the equivalent voltage source seen at the point of common coupling (PCC) of a microgridor in general of a distribution feedertends to deviate from ideality, presenting harmonic content and unbalanced fundamental voltages.
From a general perspective, APFs compensating unwanted load current components have been subject of extensive studies during the past 30 years.The contributions to this literature range from type of filters [1], filter topologies [2,3] design of passive and active elements [4,5], controller schemes [6][7][8], control strategies [9][10][11], power theories applied to active compensation [12][13][14], selective and flexible compensation objectives [15][16][17][18][19] and non-ideal voltage operation [20,21]; these last two are the focus of this paper.The development of an APF controller highly depends on the adopted power theory, which directly impacts on the control strategy, filter design and compensation results.In particular, time-domain methods such as the pq-theory [13] and the modified pq-theory [11] have been the most applied strategies.There are other options, such as the i d −i q method [22], and many others that can be found in [6,10,12,23].However, p−q and i d −i q control strategies are sensitive to voltage non-idealities and their results are difficult to be analysed under distorted and asymmetric voltage conditions [9,15,24].
On the other hand, in a smart grid scenario with pervasive use of distributed generators (DGs), the power available from primary side of renewable DGs, such as photovoltaic or wind energy sources are often lower than the power rating of their switching power interfaces (SPIs), due mainly to their intermittent characteristics.This enables the use of the SPI in other operating modes, providing ancillary services such as unwanted current compensation in smart gird scenario.In this context, a selective compensation strategy should be considered, since it allows to design the active compensator components (switches, inductors, capacitors etc.) based on a minimum amount of particular disturbing effects (harmonics, unbalances and phase-shift) [16][17][18][19] or selected harmonics [6] and also to enhance the operation of DGs, when operating close to their power/current ratings, considering that priority is always given to active power generation from the DG.
Hence, the main goal of this paper is to use the set of load conformity factors defined in [25], as a flexible approach to define the current references for shunt APFs operating on a weak grid with unbalanced and/or distorted voltages.Such factors are based on the orthogonal (decoupled) currents decomposition described by the conservative power theory (CPT) [14].Thus, the CPT conformity factors can be defined as load performance indices and applied as in [18,19].
Furthermore, the proposed control strategy can generate accurate current references to reach a desired set of performance indices at the PCC by using proper scaling coefficients.As these can be adjusted independently, thanks to the decoupled nature of the CPT decomposition, the reference generator is very flexible and allows selective reduction of load disturbing effects, in any percentage, to meet whichever consumer or utility criteria.
The proposed current reference generator is defined in the time-domain, differently from [16] that proposed a flexible frequency-domain methodology, by means of recursive discrete Fourier transform.As anticipated, differently from the most traditional schemes, the proposed approach guarantees a good compensation performance even under distorted and/or asymmetrical voltage conditions that are of great relevance to the smart grid scenario.This enhancement occurs because the CPT terms are average power quantities over a line period and they are related just to the load undesired characteristic, inherently reducing the impact of non-idealities from the voltage source.It also does not need any kind of reference-frame transformation [15,18] as traditional p−q and d−q methods.& The Institution of Engineering and Technology 2016 Experimental results are provided to evaluate the steady-state and dynamic response of the proposed compensation scheme and also to validate the feasibility and flexibility of the proposed approach.

Basic concepts and definitions about CPT and the load conformity factors
The CPT [14] is a time-domain-based power theory, valid for single-phase and three-phase systems, with three or four-wire circuits, independent from the purity of voltage and current waveforms, as required by other power theories, which are more sensitive to voltage distortion and asymmetry [9].
In the following description, lowercase and uppercase variables are, respectively, instantaneous and root-mean-square (RMS) values.Boldface variables refer to vector quantities (collective values) and the subscript 'm' indicates phase variables.Such theory is valid for generic poly-phase circuits under periodic operation.

Instantaneous orthogonal currents decomposition
The CPT is based on the orthogonal decomposition of instantaneous phase currents, which can be split into different components such that i b a is the balanced active current; i b r is the balanced reactive current; i u is the unbalance current; i v is the void current and i na is the non-active current.
The balanced active currents have been determined as the minimum currents needed to convey total active power (P = M m=1 P m ) absorbed at the PCC.They are given by where 〈v, i〉 represents internal product, which can be calculated by the result from the dot product of voltage (v) and current (i) vectors through a moving average filter V is the collective RMS value (Euclidean norm) of the voltages and G b is the equivalent balanced conductance.
Similarly, the balanced reactive currents have been defined as the minimum currents needed to convey total reactive energy (W = M m=1 W m ) drained at the PCC.They are given by where vm is the phase voltage integral without average value (named unbiased time integral) and B b is the equivalent balanced reactivity.
The balanced active and reactive currents always have the same waveforms of the phase voltages (v m ) and the phase voltage integrals (v m ), respectively.Note that the 'balanced' term is related to load symmetry and not to current symmetry.
In a case of balanced load, the PCC only absorbs balanced active and reactive currents; otherwise it also drains unbalance currents, which have been defined as such that G m and B m are the phase equivalent conductance and reactivity.Note that if the load is balanced the phase equivalent conductance is equal to the equivalent balanced conductance (G m = G b ).Similarly, the reactivity parameters are equal (B m = B b ).
The void currents are defined as the remaining phase currents.They do not convey active power or reactive energy and represent all the load non-linearity currents (harmonics).However, they cause power loss and/or electromagnetic interference in the utility lines All the previous current components are orthogonal to each other.Thus, the collective RMS current can be calculated by Accordingly, multiplying the collective RMS current and voltage, the apparent power (A) can be also split into where P is the active power; Q is the reactive power; N is the unbalance power and D is the distortion power.

Load conformity factors
By means of the CPT, a set of performance indices can be defined to characterise different aspects of load operation.They are based on the orthogonal current/power decomposition and have been proposed in [25].
The general conformity factor is the power factor (l), which is affected by reactive current circulation, load unbalance and current non-linearities.Unit power factor represents current waveforms proportional to voltage waveforms (as in case of balanced resistive loads) Of course, under sinusoidal and symmetrical (or single-phase) voltage and current conditions, l is equal to the traditional fundamental displacement factor (cos f 1 ), where f 1 is the phase angle between fundamental phase voltage and current.However, this relation is not correct if the grid voltages and/or currents are distorted and/or unbalanced.The reactivity factor (l Q ) has been defined as and it reveals the presence of reactive energy in linear inductors and capacitors, or even fundamental phase shifting caused by non-linear loads (e.g.thyristor rectifiers).For single-phase or balanced three-phase circuits, with sinusoidal supply voltages, l Q could be calculated as l Q = sin (f 1 ).The unbalance factor (l N ) has been defined as which indicates possible unbalances on the load equivalent phase impedances (conductances and reactivities).Such factor results zero only if the load is balanced, independently of voltage symmetry or distortion.
In case of sinusoidal and symmetrical supply voltages, the unbalance factor can also be related to the traditional positive, negative and zero sequence unbalance factors, calculated by means of Fortescue's transformation on the fundamental current waveforms.
& The Institution of Engineering and Technology 2016 Finally, the distortion factor (l D ) has been defined as which reveals the presence of load non-linearities (distortion currents).Considering single-phase or balanced three-phase loads, supplied by ideal voltages, such conformity factor may be associated to the conventional current total harmonic distortion (THD I ).l D = 0 means that the load is linear and G m and B m are constant over time.
On the basis of the previous definitions, the relationship among the initial global power factor and the other factors can be expressed by which allows us to independently assess the influence of each conformity factor on the global power factor.Under ideal operation, the reactivity, unbalance and distortion factors are equal to zero, since they express the non-idealities of the power circuits, whereas the l results unitary, since it expresses the circuit efficiency.

Proposed flexible compensation strategies
Following, the proposed current reference generator will be described, as well as the overall control scheme adopted for a three-phase four-wire APF.

Basic concepts behind selective compensation strategies
On the basis of the decoupled nature of the CPT current terms, the APF must generate the accurate amount of unwanted load current to vanish with the related disturbing effect at a port of interest (e.g.PCC).Then, assuming full compensation of a particular component x, the APF should simply inject/absorb the opposite unwanted load phase currents (i xm ), as follows: such that the subscript 'x' assumes any of the previous CPT current terms (i b rm , i u m , i vm and i nam ), consequently defining the selective compensation strategy.

Flexible load conformity factors compensation
The flexible conformity factor compensation is based on the idea of driving the APF to provide the minimum amount of current/power required to reach, at the PCC, a particular result.At this stage, let us assume that the current loop controller has enough bandwidth to accurately track the current references, then, we can write such that the i s xm is the source phase currents correlated to the 'x' CPT term.It is possible to rewrite the wanted source phase currents as a function of the load phase currents and a scaling coefficient, as following: where k x represents the scaling coefficient associated to each CTP current component, corresponding to a specific amount of unwanted current term x that is tolerated at the PCC.Finally, replacing ( 16) in (15) we found Note that (k x = 1) means no compensation, since i * f xm is zero and (k x = 0) means full compensation, since i * f xm is equal to the opposite unwanted load currents.From ( 16), the collective RMS value of the wanted source currents is Thus, considering all possible compensation schemes, the desired conformity factors at PCC and the scaling coefficients are calculated as follows: ( 2 0 ) ) As shown in Fig. 1, the desired conformity factors are set by the priority resolver block, such as in [18].It receives the measured quantities (PCC voltage, v PCC ; load, i L ; and filter, i f ; currents) and processes the references based on the filter nominal capacity and desired compensation objective.† Power factor compensation From ( 9) and ( 19) the collective RMS value of load non-active current (I na ) and wanted non-active current (I * na ) can be rewritten as follows: Then, substituting (23) in (18) we can find the non-active scaling coefficient as a function of load power factor and desired power factor (power factor reference) From ( 24) and ( 17), the flexible non-active current references are generated as When l* is unitary, the non-active scaling coefficient (24) becomes zero, making the current references equal to the opposite of non-active currents (25), leading to grid currents free of undesired load disturbing effects.Note that the conformity factors refer to load characteristics, thus the current waveforms expected from this case should have the same waveforms of the PCC voltages.† Reactivity conformity factor compensation In a similar way, substituting (10) and (20) in (18) the reactive scaling coefficient is calculated as It is important to recall that the compensation of the reactivity conformity factor can be performed for a three-phase system, in steady state, without energy storage components such as capacitors or reactors, as proposed in [13].For single-phase systems the storage element is required.† Unbalance conformity factor compensation As before, from ( 11) and ( 21) in ( 18) the unbalance scaling coefficient is Also here, when the unbalance conformity factor reference assumes its ideal value (l * N = 0), the scaling coefficient becomes zero, generating current references equal to the unbalanced load currents.
To perform this compensation strategy, even in steady state, an energy storage element is needed, because the unbalance currents can be split into unbalanced active and reactive currents [14].† Distortion conformity factor compensation Finally, from ( 12) and ( 22) in (18) the distortion scaling coefficient is The effectiveness of this compensation strategy is straightly related to the bandwidth of the current control loop.Its performance is as good as the current controller capacity to track high harmonic contents.
As the void currents do not convey active power [14], the DC-link power balance is not affected by distortion compensation in steady state.

Flexible current reference generator
The ideal goal of an APF is to remove all the unwanted current components.Nevertheless, this might require significant power rating for the power converter and, consequently, higher costs.In addition, flexibility is of major importance, considering that desired requirements might change over time, especially to a smart grid scenario.
Fig. 1 shows the block diagram of the proposed current reference generator applied to a current controlled three-phase APF.Basically, it measures instantaneous voltages and currents and then it provides the CPT decomposed current terms and conformity factors.On the basis of the last three equations ( 26)-( 28), the scaling coefficients are set and the current references for the APF are generated as Equation ( 29) is the general equation for the disturbing current compensation and indicates that the balanced active current (active power) transfer from the APF to the PCC is zero.The balanced reactive, unbalanced and harmonic current compensation can be controlled by varying the scaling coefficients.From (29), it is also found that the APF can compensate all current disturbances if k Q = k N = k D = 0.The filter output current, in each phase, can be calculated as (30) Thus, the estimated output filter current (maximum capacity of the APF) should be Even if it is not addressed in this paper, under saturation condition, the scaling coefficient must adapt to deal with the filter capacity constraints and desired performance.An optimal algorithm might be applied to select a set of conformity factors for that condition, as in [18,19].However, even without an optimal priority resolver the proposed system is applicable, as it will always track the pre-set desired conformity factor reference, even under external perturbation.

APF control loop scheme
The proposed control is shown in Fig. 2. The 4-leg 2-level inverter is modulated with sine-triangle pulse-width modulation, and the fourth leg is modulated with duty cycle equal to 50%, that is, zero average voltage with respect to the centre of the DC link.This choice is due to the fact that the operating condition does not require the exploitation of the additional degree of freedom given by the neutral leg voltage.To ensure constant voltage at the DC link (V DC ), a proportional-integral (PI)-based controller has been used & The Institution of Engineering and Technology 2016 as DC-link voltage regulator.The PI gains were designed by the classical phase margincross-over frequency design method and are shown in Table 1.The output of the voltage controller is multiplied by a normalised PCC voltage (v PCC ), to generate the active current component required to balance the converter losses, and corresponds to resistive load synthesis [10].
Then, the output of the multiplication is added to the current references (i * f ), delivered by the flexible current reference generator (from Fig. 1).Finally, it leads to the reference of the current control loop (i * * f ).Thus, the APF acts as a high-power factor controlled rectifier during load transient conditions and as an active current compensator under steady state.
Observe that there is no use of any reference-frame transformations or synchronisation algorithms to generate the filter current references or to control the APF.The absence of synchronisation algorithms is valid for a certain range of frequency variation (≃0.5−1% of nominal frequency), due to the moving average filters used in CPT decompositions, tuned at the fundamental frequency.The absence of a synchronisation algorithm or reference transformation in normal operation, improves the filter performance under non-ideal voltage source.
The three-phase APF has to be able to track harmonic current references.Therefore, the proposed current controller in the abc frame must have large bandwidth and high gain at the relevant harmonic frequencies.This can be achieved using resonant controllers or repetitive controllers, since a PI controller would not be able to provide the same gain at high frequencies, while maintain a stable closed loop.In the implementation of the flexible active compensator, an iterative learning control (P-type ILC) structure has been used [7].A P-type ILC controller is a different formulation of a repetitive controller, with the advantage of simplifying the design process.The dynamic response of an ILC scheme is inherently slow, due to the one fundamental period delay on which the repetitive control action relies.Even if the steady-state performance is satisfactory, this can degrade the effectiveness of the compensation during load variations.To enhance the dynamic response, a PI-based controller is added in parallel to the ILC, as shown in Fig. 3.In a qualitative description, the PI regulator compensates for the fast part of the transients but cannot guarantee small tracking errors in steady state, whereas the ILC responds slowly but compensates for the tracking errors left by the PI.
The adopted design procedure follows the one proposed in [7].It is based on a two-step procedure: (i) the PI regulator is designed to guarantee stability of the closed loop, neglecting the presence of the parallel ILC controller and considering the converter as the design plant.(ii) The ILC controller is designed considering as design plant of both the converter and the pre-designed PI regulator.In this way, a stable design of the overall system can be achieved.According to (i) the PI controller is first designed neglecting the ILC controller and, for this paper, the design targets were 75°of phase margin and 700 Hz of cross-over frequency.K P and K I in Table 1 are the PI gains resulting from this design (before discretisation).The Bode plot is shown in Fig. 4.
If the preliminary design of the PI regulator is straightforward, and can be done in the Laplace domain followed by discretisation, the design of the ILC in Fig. 3 requires a more careful design in Zeta domain.Referring to [7] and to Fig. 3, N is the total number of samples at the fundamental period of the signal in which we want To limit the degrees of freedom in the design, F(z) has been set as a moving average filter over two samples, with the goal of reducing the amplitude of the repetitive peaks.In conclusion, the design of the ILC controller depends on the choice of m and K L .
To maximise the gain, K L has been set to 0.8, and m has been derived by simulation to guarantee that the Nyquist diagram of the loop gain (including converter, PI and ILC) remains within the unit circle, guaranteeing stability.Note that the design procedure is iterative, and the choice of specific constraints (as F(z) and K L in this design) not always leads to a stable solution and might require the exploitation of all the degrees of freedom.
5 Experimental results

Setup description
The power circuit applied to the experimental validation is a non-linear and unbalanced three-phase four-wire network, as in Fig. 5.The active filter prototype was based on a three-phase four-leg voltage source converter using insulated gate bipolar transistors (IGBTs -SKM 100GB128D, driven by an SKPC 22/2 both from Semikron).The digital controllers were implemented in a fixed-point digital signal processor (TMSF2812) from Texas Instruments.Details of the source voltages (v s ) and loads are shown in Table 2.The APF and its control parameters are in Table 1.

Operation under sinusoidal voltage source
To evaluate the proposed flexible strategies and the designed voltage and current controllers, the system of Fig. 5 has been implemented and tested under sinusoidal voltage source.The results are depicted in Fig. 6.Fig. 6a.shows the instantaneous three-phase PCC voltages and load currents, including neutral wire current, without compensation (k Q = k N = k D = 1).Note that the PCC voltages are slightly distorted and asymmetric due to the effect of the non-linear and unbalance currents flowing through the line impedances.The RMS and THD values of the load phase currents are: 20.9 A, 10.98% (phase a); 17.4 A, 13.33% (phase b); and 16.1 A, 14.73% (phase c).See Table 3 for more details regarding to the RMS and THD voltage and current values.Moreover, the load unbalance effect can be observed by the neutral current.In Fig. 6b the scaling coefficients are set to zero (k Q = k N = k D = 0), which means full power factor compensation.This strategy leads to ideal source currents: waveforms are practically sinusoidal (see THD in Table 3), in phase with PCC voltages and free of unbalanced components, even the neutral wire current is close to zero.However, this full compensation needs a significant amount of current/power rating of the inverter, increasing its cost.See Table 3 for a quantitative analysis of RMS current values in each compensation strategy.To evaluate the dynamic behaviour of the DC-link voltage controller, a 30% step down on the PCC voltage was applied to evaluate the system response under external disturbances.The results are shown in Figs.6e and 7f.The corresponding DC voltage varies about ±10 V and follows the load time constant.From Fig. 6f, it is possible to observe that the source current becomes sinusoidal after three cycles.
Moreover, in order to evaluate the flexible selective compensation capability and its practical feasibility, we decided to set two scaling coefficients and then vary the third one.Tables 4-6 . From these set of conformity factors and (13), it is possible to calculate the expected power factor.

Operation under distorted and asymmetrical voltage source
To evaluate the selective compensation under non-ideal voltage conditions, the load was supplied by distorted and asymmetrical voltages, as shown in Table 2. Fig. 7 and Table 8 report the corresponding results.
Fig. 7a shows the instantaneous three-phase PCC voltages and load currents, including neutral wire current, without compensation (k Q = k N = k D = 1).In this case, a portion of neutral wire current is caused by the unbalanced load and other portion is caused by the distorted and asymmetrical voltages.
Fig. 7b shows the full power factor compensation (k Q = k N = k D = 0) under non-ideal voltage source operation.As expected, the source current waveforms assume the same waveforms of the PCC voltages, and the neutral wire current is reduced to the contribution from the grid voltage non-ideality.
Fig. 7c shows the unbalance (k N = 0 and k Q = k D = 1) conformity factor compensation under distorted and asymmetrical voltages.Note that the unbalance power is minimised; however, the neutral current is not eliminated due to the asymmetry existing in the voltages.
Following, Fig. 7d shows the distortion (k D = 0 and k Q = k N = 1) factor compensation under these non-ideal voltages.In this case, one can note that even reducing the distortion power (void currents), the resulting currents are still distorted due to the influence of the distorted source voltages, which affects the other three current components (active, reactive and unbalanced).See Table 8 for a detailed analysis.
Finally, to validate the selective compensation and its feasibility under non-ideal conditions, we have applied the global power factor compensation (l*) using ( 25) and the unbalance conformity factor compensation (l * N and k Q = k D = 0).These results are reported in Tables 9 and 10, where the effectiveness of these strategies has been confirmed even under operation with non-sinusoidal mains.

Discussion of computational complexity
The CPT current decompositions and load conformity factors calculation require high computational efforts [26].However, for most applications they do not need to be processed in real time.Thus, the CPT calculation could run into a low-frequency loop or in case of a three-phase APF, the phase equivalent conductance and reactivity [G m and B m from (2) to ( 5)] of each phase could be updated within a period of fundamental cycle.Thus, each phase quantity would be processed into a period of three fundamental cycles.
This strategy may be used when facing computational limitations and it may cause a delayed transient response resulting under or over compensation until the next update.However, such strategy was applied to generate all the paper's results, and as it was observed, it led to an acceptable dynamic performance taking only few line periods to convergence, as reported in Figs.7e and f.

Discussion about the dynamic response under load steps
To evaluate the reference generator and designed current controller under load variations, the DC link was imposed by a DC power source, aiming to observe the dynamic response of the currents without the effect of the link voltage regulator.A step up of 20% of the nominal load power was applied, and the result is shown in Figs.7e and f.
The transient lasts few line periods and it is not related to the current controller dynamic, which is faster (refers to Section 4).Indeed, as mentioned previously, the dynamics is dominated by the current reference generator.The applied moving average filters inherently have one cycle response.Then, the observed response is due to the computational strategy used to update the G m and B m , as explained in Section 5.4.

Conclusions
This paper presented a three-phase APF controlled in stationary (abc) coordinates using a flexible current reference generator, which is based on orthogonal instantaneous current decomposition from CPT and a defined set of conformity factors related to specific load disturbing effects.The conformity factors can be set to any references between their ideal value (full compensation) and the non-compensation case, through the definition of

Fig. 1
Fig. 1 Block diagram of the flexible current reference generator

Fig. 6
Fig. 6 Selective load current compensation under sinusoidal voltage source operation a Load (k Q= k N = k D = 1) b i na (k Q = k N = k D = 0) c i b r (k Q = 0 and k N = k D = 1) d i u (k N = 0 and k Q = k D = 1) eStep-down voltage variation f Step-down voltage variation (zoom) 1) e Step-down voltage variation f Step-down voltage variation (zoom) & The Institution of Engineering and Technology 2016 Figs. 6c and d show the reactivity (k Q = 0 and k N = k D = 1) and unbalance (k N = 0 and k Q = k D = 1) conformity factor compensations, respectively.In the first, only the reactive power is compensated, whereas in the second only the unbalance power is minimised.
show the following configurations: (l * Q and k N = k D = 0); (l * N and k Q = k D = 0); and (l * D and k Q = k N = 0).Finally, in Table 7 it is shown a result where all the load conformity factors have been selectively driven by the set of

Fig. 7
Fig. 7 Selective load current compensation under distorted and asymmetrical voltage source operation and load step variation a Load (k Q= k N = k D = 1) b i na (k Q = k N = k D = 0) c i u (k N = 0 and k Q = k D = 1) d i v (k D = 0 and k Q = k N = 1) eStep-up load variation f Step-up load variation (zoom)

Table 3
PCC voltages, currents and power and filter currents of selective compensation under sinusoidal voltage source operation

Table 4
Flexible reactivity conformity factor compensation (l *

Table 5
Flexible unbalance conformity factor compensation (l *

Table 6
Flexible distortion conformity factor compensation (l *

Table 7
Flexible current reference generator (l *

Table 10
Flexible unbalance conformity factor compensation (l *

Table 8
PCC voltages, currents and power and filter currents for selective compensation under distorted and asymmetrical voltage source

Table 9
Flexible power factor compensation