Adaptive Control of DC Voltage in Three-Phase Three-Wire Shunt Active Power Filters Systems

: This paper is focused on an adaptive controller for the direct current (DC) voltage in three-phase three-wire shunt active power ﬁlters systems. Although the controller structure of the proportional-integral (PI) type is determined o ﬀ -line and does not change, the prescribed DC voltage and the controller parameters are calculated in an adaptation block, depending on the non-active power to be compensated. The adaptive control is based on the design expressions for the DC circuit of the shunt active power ﬁlter found by the authors, based on the detailed analysis of its operation, during the active ﬁltering. The performances of the proposed adaptive control and its advantages compared to the classical control (where the prescribed DC voltage and the controller parameters are constant) were ﬁrst determined on the virtual model of a laboratory setup. Then, the adaptive control was implemented on the dSPACE 1103 control board, which allowed the experimental determinations that prove and support the results obtained on the virtual model.


Introduction
Active power filters (APF) are bidirectional static converters in both current and voltage type inverters, which are controlled in such a way as to absorb from the power supply the harmonics to be compensated, being provided with an energy storage circuit on the direct current (DC) side [1,2]. The most commonly used active power filter configuration is the shunt one (SAPF), in which the voltage source inverter behaves, in relation to the power supply, as a current source, compensating the harmonic currents of the load, but also its reactive power and unbalance. The connection of SAPF to the power supply is always done through an interface filter, which, in the simplest form, is an inductance, but can also have more complex structures [3,4].
SAPFs are offered frequently in a range of voltages of 200 V up to 690 V. There are on the market SAPFs for higher voltages, up to 1000 V, connected directly from the power line. For high voltage (over 1 kV), the SAPFs must be connected using a suitable step-up transformer [5].
In these conditions, the increase of the compensation-filtering performance, as well as the efficiency of the SAPF, are considered to be taken into account, both in the design of each hardware component and in the synthesis of the control system.
Generally, two types of power circuits are applicable to APFs: a voltage source inverter (VSI) with a DC capacitor on the DC side, and a current source inverter (CSI) with a DC inductor on the DC side. In practical applications, the VSI-based structure is the most common due to the higher efficiency, lower cost and smaller physical size [1]. The control system of an SAPF contains an external control loop for the DC-capacitor voltage and an internal control loop for the compensating current [1,12,14,15]. A way to increase the performance of the active filtering system is the synthesis and implementation of new control algorithms, which are simple to implement and allow for high sampling frequencies. The literature illustrates the implementation of adaptive controllers [11,14,16], sliding mode [17][18][19][20][21][22][23], fuzzy [24], or combining these techniques with each other, or with neural techniques [25][26][27][28][29], both in regulating the DC-capacitor voltage and compensation current.
Most topologies of SAPF operate at a fixed DC voltage level [7,8,10,12,30], which results in impaired performance when the load changes. To ensure harmonic compensation performance, Mannen et al. [31] proposed a new DC voltage control strategy for active power filters equipped with a small DC capacitor allowing the use a high feedback gain for suppressing the capacitor voltage fluctuations. Satisfactory compensation performance is ensured by sufficient DC voltage level, but higher values lead to high switching losses and noise [32]. In [33], the minimum value of the DC voltage and the associated control strategies were discussed, in order to obtain good compensation performance with lower switching losses and noise. An adaptive low-DC-link-voltage controlled LC coupling hybrid active power filter, which can compensate both dynamic reactive power and current harmonics was proposed in [34]. However, the calculation process is complex and complicated analysis is performed. Wang et al. [35] proposed a simplified minimum DC voltage control strategy for APF, where the DC voltage value is only determined by the grid voltage and modulation ratio. A new adaptive control of the reference DC voltage for SAPF when the harmonic current and grid voltage level fluctuate, by maintaining an ideal compensation performance with reduced power consumption and switching losses compared with the traditional fixed DC-link voltage control was proposed in [36]. Through the adaptive DC voltage control proposed in [11] for a hybrid active power The control system of an SAPF contains an external control loop for the DC-capacitor voltage and an internal control loop for the compensating current [1,12,14,15]. A way to increase the performance of the active filtering system is the synthesis and implementation of new control algorithms, which are simple to implement and allow for high sampling frequencies. The literature illustrates the implementation of adaptive controllers [11,14,16], sliding mode [17][18][19][20][21][22][23], fuzzy [24], or combining these techniques with each other, or with neural techniques [25][26][27][28][29], both in regulating the DC-capacitor voltage and compensation current.
Most topologies of SAPF operate at a fixed DC voltage level [7,8,10,12,30], which results in impaired performance when the load changes. To ensure harmonic compensation performance, Mannen et al. [31] proposed a new DC voltage control strategy for active power filters equipped with a small DC capacitor allowing the use a high feedback gain for suppressing the capacitor voltage fluctuations. Satisfactory compensation performance is ensured by sufficient DC voltage level, but higher values lead to high switching losses and noise [32]. In [33], the minimum value of the DC voltage and the associated control strategies were discussed, in order to obtain good compensation performance with lower switching losses and noise. An adaptive low-DC-link-voltage controlled LC coupling hybrid active power filter, which can compensate both dynamic reactive power and current harmonics was proposed in [34]. However, the calculation process is complex and complicated analysis is performed. Wang et al. [35] proposed a simplified minimum DC voltage control strategy for APF, where the DC voltage value is only determined by the grid voltage and modulation ratio. A new adaptive control of the reference DC voltage for SAPF when the harmonic current and grid voltage level fluctuate, by maintaining an ideal compensation performance with reduced power consumption and switching losses compared with the traditional fixed DC-link voltage control was proposed in [36]. Through the adaptive DC voltage control proposed in [11] for a hybrid active power filter, the required Energies 2020, 13, 3147 3 of 24 minimum DC voltage is ensured with respect to different loading reactive power, so that the switching losses and switching noise are reduced. However, the adaptation of the DC voltage according to the apparent power to be compensated is not performed.
Two current control methods are well known and adopted for SAPF: the direct current control (DCC) and the indirect current control (ICC) [37][38][39][40][41]. In DCC, the desired compensating current at the inverter output is regulated using a specific control algorithm. Thus, the current i F is measured and compared with its prescribed value, which is a non-sinusoidal reference current. In addition, in DCC, the measurement of the load current in necessary in order to generate the prescribed compensating current.
In ICC, the desired compensating current at the inverter output is regulated in indirect mode, by controlling the supply current. Thus, the current i g is measured and compared with its prescribed value, which is a sinusoidal reference current with the characteristic of fundamental desired current. At the same time, the non-sinusoidal desired compensating current will be formed while the supply current is being regulated.
In the implementation of SAPF, ICC has become preferable. Indeed, in comparison with the DCC scheme, the ICC scheme has a simpler control structure, which involves lower number of calculations, requires less hardware and offers better performance [37][38][39][40][41]. Moreover, compared with DCC, the ICC scheme solves the switching ripples problems in the supply current, as it operates based on the actual supply current containing exact information on its characteristics. Therefore, the supply current obtained after compensation is less distorted than in the case of DCC [37,40].
The authors consider that, in the indirect current control method, the hysteresis current controller is an adequate solution because it leads to a very fast response, which is essential in the accurate tracking of the imposed current [42]. Other advantages of the hysteresis control method are related to the simple implementation, versatility, robustness under load parameters variation and enhanced system stability. Therefore, this control method is widely used in practical applications [42][43][44]. On the other hand, the hysteresis control method leads to variable switching frequency that causes injection of high-frequency harmonics into the system current, extra switching losses and even audio noises. However, a proper hysteresis band and correlation between the inductivities in the circuit and the hysteresis band may limit the switching frequency of the transistors below their capability [42][43][44].
This paper presents an adaptive control for the DC-capacitor voltage in three-phase three-wire SAPF systems. Although the structure of the controller is determined offline and does not change, the prescribed DC-voltage and the parameters of the controller are quantities adapted according to the non-active power that is compensated The adaptive control is based on a relationship found by the authors, between the capacitance of the DC capacitor (C DC ), the voltage across it (V DC ) and the non-active power that is compensated (S F ), based on the detailed analysis of SAPF operation.
The rest of the paper is organized as follows. In Section 2, the influence of the DC-capacitor voltage is presented and the adaptive control of the DC-capacitor voltage is grounded. Next, in Section 3, the SAPF structure with adaptive DC voltage control is synthesized and a brief description is made. The performances of the adaptive control and its advantages compared to the classical control, determined on the virtual model of a laboratory system, are presented in Section 4. Section 5 is dedicated to the adaptive control implementation on the dSPACE 1103 control board for rapid prototyping. The experimental results that prove and support the results obtained on the virtual model are presented in Section 6. In the last section, some concluding remarks are given.

Influence of the DC-Capacitor Voltage
Following a detailed analysis of the DC-circuit operation during the active filtering, interesting aspects were highlighted, that may be the basis for finding a suitable relationship between the DC capacitance (C DC ), the DC voltage (V DC ) and the non-active power that is compensated (S F ). For this purpose, the evolution of the powers and some indicators that characterize the operation and the performance of the SAPF have been analyzed in detail. The case study of a compensating capacitor of 400 µF which corresponds to V DCN = 260 V and the per unit amplitude of the voltage ripple (δV DCimp = ∆V DC /V DCN = 0.05) was considered in this analysis. The analysis consisted in determining, according to the prescribed DC voltage V DCp , of the following quantities: the total harmonic distortion factor of the supply current after compensation (THDI g ); the per unit amplitude of the DC-capacitor voltage ripple (δV DC = ∆V DC /V DCp ); the apparent power associated to the storage energy into the compensating capacitor, on one period of its voltage (S DC ); the rms supply current (I g ); the efficiency of the whole system (ratio of active power of the load and active power at the power supply side) and the average switching frequency of the inverter in a quasi-stationary regime. The prescribed DC voltage was modified in eight steps, between 1.05 The model-based analysis considered the small-scale model of a filtering and regeneration system for active DC-traction substations [42] when it operates in active filtering regime. Its main power component is a three phase VSI with IGBTs. The balanced load of the traction uncontrolled rectifier is of R-L type. The control part implements the indirect control of the compensating current and consists of two cascaded control loops: an inner loop with hysteresis controller for regulating the supply current; an external loop for regulating the DC-capacitor voltage, with proportional-integral (PI) controller, designed by the module criterion in Kesller variant [45].
As regards the analyzed quantities, the following are specified.

1.
The apparent (non-active) power associated to the storage energy into the compensating capacitor corresponds to the period of the DC-capacitor voltage (T C ), which is six times smaller than the voltage supply period (T = 1/f ), 2.
The per unit apparent power was obtained by referring to the nominal value of the apparent power that will be compensated (S FN = 2.5 kVA).

3.
The supply current is referred to its nominal value (I gN = 15 A).
When changing the prescribed DC-capacitor voltage, the evolution of some quantities highlights useful aspects on the connections between them ( Figure 2). For this purpose, the evolution of the powers and some indicators that characterize the operation and the performance of the SAPF have been analyzed in detail. The case study of a compensating capacitor of 400 μF which corresponds to VDCN = 260 V and the per unit amplitude of the voltage ripple (δVDCimp = ∆VDC/VDCN = 0.05) was considered in this analysis. The analysis consisted in determining, according to the prescribed DC voltage VDCp, of the following quantities: the total harmonic distortion factor of the supply current after compensation (THDIg); the per unit amplitude of the DC-capacitor voltage ripple (δVDC = ΔVDC/VDCp); the apparent power associated to the storage energy into the compensating capacitor, on one period of its voltage (SDC); the rms supply current (Ig); the efficiency of the whole system (ratio of active power of the load and active power at the power supply side) and the average switching frequency of the inverter in a quasi-stationary regime. The prescribed DC voltage was modified in eight steps, between The model-based analysis considered the small-scale model of a filtering and regeneration system for active DC-traction substations [42] when it operates in active filtering regime. Its main power component is a three phase VSI with IGBTs. The balanced load of the traction uncontrolled rectifier is of R-L type. The control part implements the indirect control of the compensating current and consists of two cascaded control loops: an inner loop with hysteresis controller for regulating the supply current; an external loop for regulating the DC-capacitor voltage, with proportional-integral (PI) controller, designed by the module criterion in Kesller variant [45].
As regards the analyzed quantities, the following are specified.
1. The apparent (non-active) power associated to the storage energy into the compensating capacitor corresponds to the period of the DC-capacitor voltage (TC), which is six times smaller than the voltage supply period (T = 1/f), 2. The per unit apparent power was obtained by referring to the nominal value of the apparent power that will be compensated (SFN = 2.5 kVA). 3. The supply current is referred to its nominal value (IgN = 15 A).
When changing the prescribed DC-capacitor voltage, the evolution of some quantities highlights useful aspects on the connections between them ( Figure 2).   The total harmonic distortion factor of the supply current has values above the allowable limit of 5% at low voltage values, then decreases rapidly so that, at relative voltage values over 1.13, it falls below 4%. It has a minimum (3.7%) when the relative value of the DC voltage is V DCo ≈ 1.2 pu. Furthermore, its increase is slower, but it is obvious, so that the final value approaches 5%.
The apparent power associated to the storage energy into the DC-capacitor increases almost parabolic with the DC voltage. It can be seen that the phase rms supply current increases very little (by about 10%), whereas the relative DC-capacitor voltage ripple decreases rapidly with increasing DC voltage.
The average switching frequency increases with an exponential pace, from 2.75 kHz to 7.5 kHz.
The efficiency decreases linearly, by about 10%, mainly due to the increase of switching losses in the inverter.
It is noticed that, when THDIg has its minimum value, S DC ≈ 1.21S FN . On this basis, it is considered that, a variant of calculation the nominal DC-capacitor voltage may be the imposition of the nominal apparent power associated to the storage energy into the compensating capacitor (S DCN ) at the nominal value of the SAPF power (S FN ), increased with the overload coefficient for fast dynamic regimes, k sd ∈ [1.2, 1.5], respectively: in which, Thus, Similarly, when the apparent power that will be compensated is S F, its relationship with the DC-capacitor voltage is given by the condition:

Foundation of the Adaptive Control
As the non-active power that is compensated is variable depending on the load, maintaining the DC-capacitor voltage at the nominal value when the power that is compensated is reduced determines the deterioration of some energy indicators of the system, respectively ( Figure 2): THDI g increases; the inverter average switching frequency increases; the efficiency of the whole system decreases.
Under these conditions, the adaptive regulation of the voltage prescribed to the voltage controller becomes attractive and may be a solution for improving the SAPF performance.
The parabolic dependence of the apparent power as a function of the DC-capacitor voltage ( Figure 2) obtained by the model based analysis is also supported analytically by expression (5). It shows that the DC-capacitor voltage is dependent only on the compensated apparent power (S F ), because the capacitance and frequency are constant, respectively: From (4) and (6), the DC-voltage can be expressed only according to the power to be compensated, Moreover, considering that, at constant capacitance, there is an optimal value of the DC-capacitor voltage V DCo that minimizes THDI g (Figure 2), expression (7) can be used to implement an adaptive and optimal control. For this, the nominal optimum value of the DC-capacitor voltage (V DCoN ), which minimizes THDI g , is determined based on model or experimentally.
The apparent power to be compensated is calculated as [46]: where S and P are the apparent and active powers of the non-linear load.
As the minimum value of the DC-capacitor voltage is equal to the magnitude of the line-to-line voltage, the prescribed DC-capacitor voltage can be calculated as: The implementation of this relationship is simple and does not affect the computation time because, except for the non-active power that is compensated, the intervening parameters are constant.
Next, it is taken into account that the voltage controller of type PI is designed by the modulus criterion and imposing the bandwidth of (10-20) Hz of the closed-loop unity feedback system [14]. As a result, both the proportionality constant and the integration time constant are dependent on the average value of the DC-capacitor voltage, as follows: where the constants K 1 and K 2 depends on the parameters of the control system (the DC-capacitance, the supply voltage, the constant of the voltage transducer and the passband frequency of the unity feedback system) [14].
The algorithm also performs their adaptation according to the prescribed voltage, based on the following relationships:

Structure of the Active Filtering System with the Adaptive Control of the DC Voltage
The SAPF on which the adaptive control was implemented is connected at the point of common coupling (PCC) with a non-linear three-phase load. The associated structure highlights the power part (PP-SAPF) and the control part (CP-SAPF) ( Figure 3). PP-SAPF contains the coupling transformer, the interface coupling filter of type LCL, the IGBTs based voltage source inverter with the associated gate drivers and the DC-capacitor. The control part contains all the blocks needed to implement the adaptive DC-voltage control and the current controller and provides the control signals for the inverter IGBTs. A sensors system measures all the necessary quantities, respectively the supply voltages and currents, the load currents and the DC-capacitor voltage. It must be noted that, in the three-phase three-wire system, it is sufficient to measure only two phase quantities. The adaptive voltage controller provides the magnitude of the prescribed supply currents (I vgp ), which is multiplied with the voltage template signals of unity magnitude which are in phase with the fundamentals of phase voltages (1 v1 ), in order to calculate the prescribed supply currents (i gp ) upstream of the PCC. The Voltage template block implements a phase-locked loop (PLL) circuit [14].
The non-active power identification block identifies the value of the non-active power to be compensated, by implementing the expression (8). The load apparent power is calculated with Buchholtz's expression [47], Energies 2020, 13, 3147 7 of 24 The active and reactive powers are calculated at each time point based on the p-q theory of the instantaneous reactive power [48][49][50][51].
where p and q are the instantaneous active and reactive powers. The distortion power (D), highlighted as the component of the compensating power, is calculated with the expression introduced by C. Budeanu, which is recommended by the current regulations [46], respectively: The active and reactive powers are calculated at each time point based on the p-q theory of the instantaneous reactive power [48][49][50][51].
where p and q are the instantaneous active and reactive powers. The distortion power (D), highlighted as the component of the compensating power, is calculated with the expression introduced by C. Budeanu, which is recommended by the current regulations [46], respectively: (144 ) The rms values of the phase voltages and currents are calculated at each time point, as follows: The block PI controller parameters calculation implements the relationship (11).

Performance of the Proposed Algorithm
To evaluate the system performance, the Simulink model of the adaptive controller was developed, which was then integrated into the experimental platform. In order to test the active filtering performance, under the simultaneous presence of the distortion and reactive powers, the load consisted of a three-phase transformer followed be an uncontrolled rectifier with resistive load.
The three-phase transformer has a D/y connection, rated voltages of 380 V/180 V and rated apparent power of 13 kVA. The load resistor RL consists of two sections that can operate independently or simultaneously: RL1 = 7.8 Ω (nominal load); RL2 = 11 Ω.
The tests consisted of determining the performance of the adaptive control system under the following conditions: - The load operates in quasi-stationary mode at nominal parameters (RL = 7.8 Ω); -SAPF is initialized by charging the DC capacitor at the value corresponding to the current load; the validation of the controllers operation for the active charging is done when the DC-capacitor The rms values of the phase voltages and currents are calculated at each time point, as follows: The block PI controller parameters calculation implements the relationship (11).

Performance of the Proposed Algorithm
To evaluate the system performance, the Simulink model of the adaptive controller was developed, which was then integrated into the experimental platform. In order to test the active filtering performance, under the simultaneous presence of the distortion and reactive powers, the load consisted of a three-phase transformer followed be an uncontrolled rectifier with resistive load.
The three-phase transformer has a D/y connection, rated voltages of 380 V/180 V and rated apparent power of 13 kVA. The load resistor R L consists of two sections that can operate independently or simultaneously: R L1 = 7.8 Ω (nominal load); R L2 = 11 Ω.
The tests consisted of determining the performance of the adaptive control system under the following conditions: - The load operates in quasi-stationary mode at nominal parameters (R L = 7.8 Ω); -SAPF is initialized by charging the DC capacitor at the value corresponding to the current load; the validation of the controllers operation for the active charging is done when the DC-capacitor voltage reaches 0.85% from the peak value of the line-to-line voltage, after the prior short-circuiting of the resistances for limiting the charging current [52]; -At t = 0.3 s, the supply current feedback is validated and the compensation starts; -At t = 0.45 s, the second section of the load resistance is also introduced (R L = 18.8 Ω).
The performances shown in numerical form correspond to the stationary active filtering regime and the following quantities are taken into consideration: the ratio between the prescribed DC-capacitor voltage and the peak value of the line-to-line voltage on the AC side of the inverter (V DCp /V DCmin ); the compensating non-active power (S cp ); the compensating reactive power (Q cp ); the compensating distortion power (D cp ); the total harmonic distortion factor of the load current (THDI L ); the total harmonic distortion factor of the supply current (THDI g ); the active filtering efficiency (Ef_AF) calculated as the ratio of the current harmonic distortion factors before and after compensation; the weight of SAPF losses in the load power (δP AF /P TT ); the average switching frequency of the inverter (f sw ).
The performance indicators shown in the graphical form correspond to the stationary active filtering regime, as well as to some dynamic regimes and refer to the waveforms of: the DC-capacitor voltage (prescribed and real); the error and the output of the voltage controller; load currents; the harmonic spectrum of the load current; phase voltage and current on the supply side after compensation; the harmonic spectrum of the supply current; the supply current harmonic distortion; the geometric locus of the supply current.
The total harmonic distortion factor of the current was calculated according to the total rms value (I) and the rms value of the fundamental component (I 1 ), according to the expression [53]: The numerical results shown in Table 1 highlight some significant aspects. The compensating non-active power consists of reactive and distortion power, in close weights. The supply current distortion is close to the theoretical value (about 26.7%), while the supply current distortion after compensation is of about 3.55%, which is within the limits recommended by the IEEE 519 standard [53]. The losses in SAPF represent almost 2.2% of the active power absorbed by the load. The waveforms of the quantities that characterize the operation of the SAPF and the load (Figures 4-12) support the numerical values in Table 1 and complete the information about the good performance of the adaptive control algorithm.
After the free charging of the DC capacitor, the voltage across it follows the prescribed value very well ( Figure 4). The average steady-state error is null and the overshoot is insignificant. The validation of the compensation (t = 0.3 s) leads to the appearance of a transient regime that causes a voltage drop of about 10% and ends after about 50 ms. The aforementioned aspects are also supported by the evolution of the error and the output of the voltage controller ( Figure 5). The oscillation at t = 35 ms (beginning of the active charging) is determined by the imperfect synchronization with the real value of the voltage. When the compensation is validated (t = 0.3 s), the amplitude of the prescribed supply active current reaches the steady state value after about 50 ms, with an overshoot of about 8% ( Figure 5).                         The waveforms in Figure 8 illustrate the good energetic performance obtained after compensation, in terms of the power factor and current THD. Thus, the supply voltage and fundamental component of the current are in phase, meaning unity value of the fundamental power factor. At the same time, the waveform of the supply current illustrates the component due to the inverter switching.
The harmonic spectrum in Figure 9 shows the significant reduction of the low order harmonics in the supply current after compensation.
Energies 2020, 13, x FOR PEER REVIEW 10 of 24 The waveforms in Figure 8 illustrate the good energetic performance obtained after compensation, in terms of the power factor and current THD. Thus, the supply voltage and fundamental component of the current are in phase, meaning unity value of the fundamental power factor. At the same time, the waveform of the supply current illustrates the component due to the inverter switching.
The harmonic spectrum in Figure 9 shows the significant reduction of the low order harmonics in the supply current after compensation.  The geometric locus of the phase supply current [48], Reference [49] corresponds to the three main stages, respectively the free charging of the capacitor, the active charging and the compensation ( Figure 10). Thus, referring to the mean values, the initial point is placed at the origin, then it moves according to a hexagonal pattern. When validating the compensation, the peak of the phasor returns to the origin and moves along the elliptical curve towards the circle corresponding to the stationary compensation regime. The time when the phasor peak is outside the final circle corresponds to the voltage controller overshoot. As instantaneous positions, over the average curves, the oscillations due to the inverter switching are superimposed. The waveforms in Figure 8 illustrate the good energetic performance obtained after compensation, in terms of the power factor and current THD. Thus, the supply voltage and fundamental component of the current are in phase, meaning unity value of the fundamental power factor. At the same time, the waveform of the supply current illustrates the component due to the inverter switching.
The harmonic spectrum in Figure 9 shows the significant reduction of the low order harmonics in the supply current after compensation.  The geometric locus of the phase supply current [48], Reference [49] corresponds to the three main stages, respectively the free charging of the capacitor, the active charging and the compensation ( Figure 10). Thus, referring to the mean values, the initial point is placed at the origin, then it moves according to a hexagonal pattern. When validating the compensation, the peak of the phasor returns to the origin and moves along the elliptical curve towards the circle corresponding to the stationary compensation regime. The time when the phasor peak is outside the final circle corresponds to the voltage controller overshoot. As instantaneous positions, over the average curves, the oscillations due to the inverter switching are superimposed. The geometric locus of the phase supply current [48], Reference [49] corresponds to the three main stages, respectively the free charging of the capacitor, the active charging and the compensation ( Figure 10). Thus, referring to the mean values, the initial point is placed at the origin, then it moves according to a hexagonal pattern. When validating the compensation, the peak of the phasor returns to the origin and moves along the elliptical curve towards the circle corresponding to the stationary compensation regime. The time when the phasor peak is outside the final circle corresponds to the voltage controller overshoot. As instantaneous positions, over the average curves, the oscillations due to the inverter switching are superimposed. The good dynamic performance is illustrated in Figure 11, which captures the moment of the compensation validation. The supply current becomes sinusoidal after 6 milliseconds (ms).

With Adaptation, for Reduced Compensating Power (RL = 18.8 Ω)
In the case of reduced load of SAPF to about 40% of the nominal value, the numerical data in Table 2 show the following. The prescribed value of the DC-capacitor voltage is adapted to the new value of the compensated power. The weight of the reactive power in the compensated non-active power decreases. The total harmonic distortion factor of the supply current increases due to the reduction of the rms value of the fundamental. The weight of SAPF losses in the load power decreases to about 1%, mainly due to the reduction of the APF current and the load active power.  The waveforms of the load current and supply voltage and current are similar to those corresponding to the nominal load, but the ripples due to the inverter switching are more visible (Figure 12). The good dynamic performance is illustrated in Figure 11, which captures the moment of the compensation validation. The supply current becomes sinusoidal after 6 milliseconds (ms). The good dynamic performance is illustrated in Figure 11, which captures the moment of the compensation validation. The supply current becomes sinusoidal after 6 milliseconds (ms).

With Adaptation, for Reduced Compensating Power (RL = 18.8 Ω)
In the case of reduced load of SAPF to about 40% of the nominal value, the numerical data in Table 2 show the following. The prescribed value of the DC-capacitor voltage is adapted to the new value of the compensated power. The weight of the reactive power in the compensated non-active power decreases. The total harmonic distortion factor of the supply current increases due to the reduction of the rms value of the fundamental. The weight of SAPF losses in the load power decreases to about 1%, mainly due to the reduction of the APF current and the load active power.  The waveforms of the load current and supply voltage and current are similar to those corresponding to the nominal load, but the ripples due to the inverter switching are more visible (Figure 12). In the case of reduced load of SAPF to about 40% of the nominal value, the numerical data in Table 2 show the following. The prescribed value of the DC-capacitor voltage is adapted to the new value of the compensated power. The weight of the reactive power in the compensated non-active power decreases. The total harmonic distortion factor of the supply current increases due to the reduction of the rms value of the fundamental. The weight of SAPF losses in the load power decreases to about 1%, mainly due to the reduction of the APF current and the load active power. The waveforms of the load current and supply voltage and current are similar to those corresponding to the nominal load, but the ripples due to the inverter switching are more visible (Figure 12).

Step Variation of the Load
When the compensating power has a step variation from the nominal value to 40% of the nominal value, the results illustrate well the correct operation of the adaptive control algorithm and the dynamic performance of the entire system. Thus, when reducing the load (t = 0.45 s), the DCcapacitor voltage increases by about 6%, and then reaches the new value after about 25 ms, with an insignificant overshoot ( Figure 13). The output of the voltage controller shows that the adaptation to the new value of the compensated power causes four fast oscillations that disappear after about 25 ms ( Figure 14). The oscillations of the voltage controller output influence the supply current, which also has oscillations that are attenuated in less than two periods ( Figure 15).

Step Variation of the Load
When the compensating power has a step variation from the nominal value to 40% of the nominal value, the results illustrate well the correct operation of the adaptive control algorithm and the dynamic performance of the entire system. Thus, when reducing the load (t = 0.45 s), the DC-capacitor voltage increases by about 6%, and then reaches the new value after about 25 ms, with an insignificant overshoot ( Figure 13).

Step Variation of the Load
When the compensating power has a step variation from the nominal value to 40% of the nominal value, the results illustrate well the correct operation of the adaptive control algorithm and the dynamic performance of the entire system. Thus, when reducing the load (t = 0.45 s), the DCcapacitor voltage increases by about 6%, and then reaches the new value after about 25 ms, with an insignificant overshoot ( Figure 13). The output of the voltage controller shows that the adaptation to the new value of the compensated power causes four fast oscillations that disappear after about 25 ms ( Figure 14). The oscillations of the voltage controller output influence the supply current, which also has oscillations that are attenuated in less than two periods ( Figure 15).  The output of the voltage controller shows that the adaptation to the new value of the compensated power causes four fast oscillations that disappear after about 25 ms ( Figure 14). The oscillations of the voltage controller output influence the supply current, which also has oscillations that are attenuated in less than two periods ( Figure 15).

Step Variation of the Load
When the compensating power has a step variation from the nominal value to 40% of the nominal value, the results illustrate well the correct operation of the adaptive control algorithm and the dynamic performance of the entire system. Thus, when reducing the load (t = 0.45 s), the DCcapacitor voltage increases by about 6%, and then reaches the new value after about 25 ms, with an insignificant overshoot ( Figure 13). The output of the voltage controller shows that the adaptation to the new value of the compensated power causes four fast oscillations that disappear after about 25 ms ( Figure 14). The oscillations of the voltage controller output influence the supply current, which also has oscillations that are attenuated in less than two periods ( Figure 15).

Comparison with the Non-Adaptive Control, for Reduced Compensating Power (RL = 18.8 Ω)
The advantages of the proposed adaptive control are highlighted by the numerical values of some energetic indicators obtained under the same load conditions as in the Section 4.2, but with constant prescribed DC voltage and constant parameters of the voltage controller (Table 3). Thus, the total harmonic distortion of the supply current increases by more than 1% and the weight of SAPF losses in the active power absorbed by the load increases by almost 3.5%. Table 3. The main energetic performances of the non-adaptive control, at reduced load.

Implementation of the Proposed Control Algorithm
The proposed control algorithm has been implemented first in the Matlab Simulink environment, to be used in the dSPACE DS1103 prototyping board. The connection of the transducers needed is illustrated in the block diagram of the experimental setup ( Figure 16). Also, the three-phase three-wire system allows the use of only two transducers at each point (two line-to-line voltages and two phase currents).    (Table 3). Thus, the total harmonic distortion of the supply current increases by more than 1% and the weight of SAPF losses in the active power absorbed by the load increases by almost 3.5%.

Implementation of the Proposed Control Algorithm
The proposed control algorithm has been implemented first in the Matlab Simulink environment, to be used in the dSPACE DS1103 prototyping board. The connection of the transducers needed is illustrated in the block diagram of the experimental setup ( Figure 16). Also, the three-phase three-wire system allows the use of only two transducers at each point (two line-to-line voltages and two phase currents).

Comparison with the Non-Adaptive Control, for Reduced Compensating Power (RL = 18.8 Ω)
The advantages of the proposed adaptive control are highlighted by the numerical values of some energetic indicators obtained under the same load conditions as in the Section 4.2, but with constant prescribed DC voltage and constant parameters of the voltage controller (Table 3). Thus, the total harmonic distortion of the supply current increases by more than 1% and the weight of SAPF losses in the active power absorbed by the load increases by almost 3.5%. Table 3. The main energetic performances of the non-adaptive control, at reduced load.

Implementation of the Proposed Control Algorithm
The proposed control algorithm has been implemented first in the Matlab Simulink environment, to be used in the dSPACE DS1103 prototyping board. The connection of the transducers needed is illustrated in the block diagram of the experimental setup ( Figure 16). Also, the three-phase three-wire system allows the use of only two transducers at each point (two line-to-line voltages and two phase currents).   A picture of the experimental bench is shown in Figure 17. For the real time control of the SAPF system, a dedicated control desk interface was created and linked to the Simulink model signals and blocks ( Figure 18).
The conceived control desk interface contains control tools (e.g., push-buttons, checkboxes), voltage and current meters and virtual oscilloscopes linked to the signals to be monitored (load current, together with the compensating current, error of voltage controller, load and supply phase currents together with the supply voltage, supply currents after compensation, supply phase voltages together with the voltage template signals of unity magnitude, the prescribed and actual DCcapacitor voltages).  For the real time control of the SAPF system, a dedicated control desk interface was created and linked to the Simulink model signals and blocks ( Figure 18).
The conceived control desk interface contains control tools (e.g., push-buttons, checkboxes), voltage and current meters and virtual oscilloscopes linked to the signals to be monitored (load current, together with the compensating current, error of voltage controller, load and supply phase currents together with the supply voltage, supply currents after compensation, supply phase voltages together with the voltage template signals of unity magnitude, the prescribed and actual DC-capacitor voltages). A picture of the experimental bench is shown in Figure 17. For the real time control of the SAPF system, a dedicated control desk interface was created and linked to the Simulink model signals and blocks ( Figure 18).
The conceived control desk interface contains control tools (e.g., push-buttons, checkboxes), voltage and current meters and virtual oscilloscopes linked to the signals to be monitored (load current, together with the compensating current, error of voltage controller, load and supply phase currents together with the supply voltage, supply currents after compensation, supply phase voltages together with the voltage template signals of unity magnitude, the prescribed and actual DCcapacitor voltages).  The main parameters of the system are shown in Table 4.

Experimental Performance of the Proposed Control Algorithm
The experimental evaluation of the proposed control algorithm was performed on the dSPACE DS1103-based experimental setup of the SAPF system described above. For recording the needed waveforms, relevant quantities and indicators, several methods have been used, as follows. Waveforms in steady state regime were recorded with the Metrix OX 7041 oscilloscope, whereas the transient waveforms were recorded using a Tektronix oscilloscope. A Fluke 41B single-phase power quality analyzer was used to measure the powers (apparent, active and reactive), harmonic spectra of the currents and current distortion factor. Through the graphical control desk interface, the numerical recording of the data was undertaken and they were saved in dedicated files. The SAPF losses were determined as the difference between the active power at the supply side and the active power at the load side, corresponding to the PCC.

Results and Performance for Operation with Adaptive Control at Nominal Load
Both the numerical results (Table 5) and the graphical results (Figures 19 and 20) support the correctness of the analysis on the virtual model, with natural differences determined by the estimation of the parameters in the virtual model. Thus, the load current is asymmetrical due to the asymmetry of the rectifier transformer (Figure 19a). Compared to the results obtained by simulation, the harmonic distortion of the load current is by 3.7% lower (Figure 19b) and the active filtering result is better, as the supply current THD is by about 0.55% lower (Figure 20b). Moreover, unity power factor is achieved (Figure 20d), as the phase voltage and current in the PCC are in phase (Figure 21b). The weight of SAPF losses is lower by about 0.86% and the average switching frequency is by 2 kHz lower (Table 5).
Energies 2020, 13, x FOR PEER REVIEW 15 of 24 The main parameters of the system are shown in Table 4.

Experimental Performance of the Proposed Control Algorithm
The experimental evaluation of the proposed control algorithm was performed on the dSPACE DS1103-based experimental setup of the SAPF system described above. For recording the needed waveforms, relevant quantities and indicators, several methods have been used, as follows. Waveforms in steady state regime were recorded with the Metrix OX 7041 oscilloscope, whereas the transient waveforms were recorded using a Tektronix oscilloscope. A Fluke 41B single-phase power quality analyzer was used to measure the powers (apparent, active and reactive), harmonic spectra of the currents and current distortion factor. Through the graphical control desk interface, the numerical recording of the data was undertaken and they were saved in dedicated files. The SAPF losses were determined as the difference between the active power at the supply side and the active power at the load side, corresponding to the PCC.

Results and Performance for Operation with Adaptive Control at Nominal Load
Both the numerical results (Table 5) and the graphical results (Figures 19 and 20) support the correctness of the analysis on the virtual model, with natural differences determined by the estimation of the parameters in the virtual model. Thus, the load current is asymmetrical due to the asymmetry of the rectifier transformer (Figure 19a). Compared to the results obtained by simulation, the harmonic distortion of the load current is by 3.7% lower (Figure 19b) and the active filtering result is better, as the supply current THD is by about 0.55% lower (Figure 20b). Moreover, unity power factor is achieved (Figure 20d), as the phase voltage and current in the PCC are in phase (Figure 21b). The weight of SAPF losses is lower by about 0.86% and the average switching frequency is by 2 kHz lower (Table 5).   Besides the qualitative aspects specified in the previous case and highlighted in Table 6 and Figures 22-24, a good response of the adaptive system to the load variation is illustrated (Figure 25). It can be seen that, due to the resolution of the Fluke 41B analyzer (about 10 W), it indicates the same active power at the supply and load sides (Figures 22d and 23d). Actually, the SAPF losses calculated on the basis of the recorded data are 8.5 W, which are respectively 2.83 W per phase.

Results and Performance for Operation with Adaptive Control at Reduced Load
Besides the qualitative aspects specified in the previous case and highlighted in Table 6 and Figures 22-24, a good response of the adaptive system to the load variation is illustrated (Figure 25). It can be seen that, due to the resolution of the Fluke 41B analyzer (about 10 W), it indicates the same active power at the supply and load sides (Figure 22d and Figure 23d). Actually, the SAPF losses calculated on the basis of the recorded data are 8.5 W, which are respectively 2.83 W per phase.

Results and Performance for Operation with Adaptive Control at Reduced Load
Besides the qualitative aspects specified in the previous case and highlighted in Table 6 and Figures 22-24, a good response of the adaptive system to the load variation is illustrated (Figure 25). It can be seen that, due to the resolution of the Fluke 41B analyzer (about 10 W), it indicates the same active power at the supply and load sides (Figure 22d and Figure 23d). Actually, the SAPF losses calculated on the basis of the recorded data are 8.5 W, which are respectively 2.83 W per phase.           As illustrated in Figure 25a, during the whole process, the voltage error is insignificant, meaning that the DC-capacitor voltage follows the prescribed values very well. During the capacitor charging and until the compensation starts, the output of the voltage controller has very small values, corresponding to the SAPF losses without compensation (Figure 25a).

VDCp/VDCmin Scp(kVA) Qcp(kVAR) Dcp(kVAD) THDIL(%) THDIg(%) Ef AF δPAF(kW) δPAF/PTT(%) fsw(kHz)
It is shown that when the compensation starts, the DC-capacitor voltage has a very rapid decrease of about 30 V (≈10%), then it returns to the initial value after about 20 ms (Figure 25b). The output of the voltage controller increases very fast to compensate for the voltage drop, it has an overshoot of about 20% and remains at the value corresponding to the nominal load after about 20 ms (Figure 25a). When reducing the load, DC-capacitor voltage has a very rapid increase of about 25 V (≈8%), then reaches the new value after about 25 ms (Figure 25b). The output of the voltage controller decreases very rapidly to near zero, then it increases rapidly and remains at the value corresponding to the reduced load, after about 25 ms (Figure 25a). Figure 26a,b confirm the good dynamic behavior of the active filtering system at the beginning of the compensation and when the load decreases, respectively increases. It is shown that the DC-capacitor voltage adapts to the new value of the apparent power to be compensated and that the supply current is almost sinusoidal, except for the transient regime. Figure 26a illustrates the evolution of the DC-capacitor voltage and supply current in the dynamic regimes of the start-up compensation at nominal load (S N ) and when the load decreases from S N to 0.5S N . It shows that there is an overshoot of the voltage and that the new value of DC voltage is obtained in accordance with the adaptive algorithm. After the start-up of the compensation, the supply current becomes sinusoidal after about 5 ms, and its magnitude becomes constant after about 50 ms. When the load decreases, the transient regime of the supply current ends after about 50 ms. In the case of load increase, the voltage overshoot is smaller and the duration of transient regime is smaller too, of about 40 ms (Figure 26b). After the transient regime is completed, the value of DC voltage corresponds to the nominal load.
Energies 2020, 13, x FOR PEER REVIEW 19 of 24 As illustrated in Figure 25a, during the whole process, the voltage error is insignificant, meaning that the DC-capacitor voltage follows the prescribed values very well. During the capacitor charging and until the compensation starts, the output of the voltage controller has very small values, corresponding to the SAPF losses without compensation (Figure 25a).
It is shown that when the compensation starts, the DC-capacitor voltage has a very rapid decrease of about 30 V (≈10%), then it returns to the initial value after about 20 ms (Figure 25b). The output of the voltage controller increases very fast to compensate for the voltage drop, it has an overshoot of about 20% and remains at the value corresponding to the nominal load after about 20 ms (Figure 25a). When reducing the load, DC-capacitor voltage has a very rapid increase of about 25 V (≈8%), then reaches the new value after about 25 ms (Figure 25b). The output of the voltage controller decreases very rapidly to near zero, then it increases rapidly and remains at the value corresponding to the reduced load, after about 25 ms (Figure 25a). Figure 26a,b confirm the good dynamic behavior of the active filtering system at the beginning of the compensation and when the load decreases, respectively increases. It is shown that the DCcapacitor voltage adapts to the new value of the apparent power to be compensated and that the supply current is almost sinusoidal, except for the transient regime. Figure 26a illustrates the evolution of the DC-capacitor voltage and supply current in the dynamic regimes of the start-up compensation at nominal load (SN) and when the load decreases from SN to 0.5SN. It shows that there is an overshoot of the voltage and that the new value of DC voltage is obtained in accordance with the adaptive algorithm. After the start-up of the compensation, the supply current becomes sinusoidal after about 5 ms, and its magnitude becomes constant after about 50 ms. When the load decreases, the transient regime of the supply current ends after about 50 ms. In the case of load increase, the voltage overshoot is smaller and the duration of transient regime is smaller too, of about 40 ms (Figure 26b). After the transient regime is completed, the value of DC voltage corresponds to the nominal load.

Results and Performance for Operation with Non-Adaptive Control at Reduced Load
The numerical results (Table 7 and Figure 27) and the waveforms (Figures 27a and 28) show that the system performance is lower than in the case of the adaptive control. Thus, mentioning that the data corresponding to the load are those in Table 6 and Figure 22, the following can be noticed. The active filtering performance is similar in terms of power factor (Table 7 and Figure 27).

Results and Performance for Operation with Non-Adaptive Control at Reduced Load
The numerical results (Table 7 and Figure 27) and the waveforms (Figures 27a and 28) show that the system performance is lower than in the case of the adaptive control. Thus, mentioning that the data corresponding to the load are those in Table 6 and Figure 22, the following can be noticed. The active filtering performance is similar in terms of power factor (Table 7 and Figure 27).

Results and Performance for Operation with Non-Adaptive Control at Reduced Load
The numerical results (Table 7 and Figure 27) and the waveforms (Figures 27a and 28) show that the system performance is lower than in the case of the adaptive control. Thus, mentioning that the data corresponding to the load are those in Table 6 and Figure 22, the following can be noticed. The active filtering performance is similar in terms of power factor (Table 7 and Figure 27).    The active filtering efficiency is increased by about 1.85, as THDI g is by 0.7% lower (3.3% compared to 2.6% (Tables 6 and 7). Although the difference of active power between the power supply and load indicated by the Fluke 41B analyzer is of about (10-20) W, the value calculated on the basis of the recorded data is 34 W, which is respectively about 11 W per phase. The waveform of the supply current after compensation shows the increase of the amplitude of the component due to the switching harmonics ( Figure 28), due to the existence of a higher DC-capacitor voltage. The weight of SAPF losses shows that the overall efficiency by 1.27% lower. Moreover, the average switching frequency is increased by about 1.05 kHz in the case of the non-adaptive control.
Energies 2020, 13, x FOR PEER REVIEW 21 of 24 The active filtering efficiency is increased by about 1.85, as THDIg is by 0.7% lower (3.3% compared to 2.6% (Tables 6 and 7). Although the difference of active power between the power supply and load indicated by the Fluke 41B analyzer is of about (10-20) W, the value calculated on the basis of the recorded data is 34 W, which is respectively about 11 W per phase. The waveform of the supply current after compensation shows the increase of the amplitude of the component due to the switching harmonics ( Figure 28), due to the existence of a higher DC-capacitor voltage. The weight of SAPF losses shows that the overall efficiency by 1.27% lower. Moreover, the average switching frequency is increased by about 1.05 kHz in the case of the non-adaptive control.
(a) (b) Figure 28. Oscillograms for the non-adaptive control at reduced load in steady state regime: (a) load current and supply current after compensation; (b) phase voltage and current after compensation.

Conclusions
In this paper, an adaptive control algorithm of the DC voltage in three-phase three-wire SAPFs is proposed and substantiated based on a connection relationship between the apparent (non-active) power that is compensated and the energy stored in the compensation capacitor found by the authors, as a result of a detailed analysis of the virtual model of a SAPF.
The control algorithm was implemented on an adaptive PI controller that changes its prescribed value and parameters according to the non-active power that is compensated and requires reduced software and hardware resources.
The performances of the adaptive control and its advantages compared to the classical control (the prescribed voltage and the parameters of the voltage controller are constant) were determined first based on the virtual model of a laboratory system.
The proposed control algorithm, which includes the DC voltage adaptive PI controller and the hysteresis supply current controller was implemented on an experimental setup based on a DSP dSPACE 1103 control board.
The experimental results in a steady state compensation regime (of both reactive power and distortion power, in close weights), are obviously better than those obtained on the virtual model.
The main advantage of the proposed adaptive DC voltage control is the improvement of the current harmonic distortion after compensation, the significant reduction of the SAPF losses and, implicitly, the increase of the efficiency of the whole system.
Although the experiments have been performed on a low-power SAPF (2.5 kVA) and low load (1 kVA compensated apparent power), compared to the non-adaptive control, the efficiency gain was 1.27% and the supply current distortion decreased from 3.3% to 2.6%.
The experimental results in a dynamic regime, both at the validation of the compensation as well as at the step reduction or increasing of the load, show good dynamic performance and prove that the evolution of DC voltage is in accordance with the proposed adaptive algorithm.

Conclusions
In this paper, an adaptive control algorithm of the DC voltage in three-phase three-wire SAPFs is proposed and substantiated based on a connection relationship between the apparent (non-active) power that is compensated and the energy stored in the compensation capacitor found by the authors, as a result of a detailed analysis of the virtual model of a SAPF.
The control algorithm was implemented on an adaptive PI controller that changes its prescribed value and parameters according to the non-active power that is compensated and requires reduced software and hardware resources.
The performances of the adaptive control and its advantages compared to the classical control (the prescribed voltage and the parameters of the voltage controller are constant) were determined first based on the virtual model of a laboratory system.
The proposed control algorithm, which includes the DC voltage adaptive PI controller and the hysteresis supply current controller was implemented on an experimental setup based on a DSP dSPACE 1103 control board.
The experimental results in a steady state compensation regime (of both reactive power and distortion power, in close weights), are obviously better than those obtained on the virtual model.
The main advantage of the proposed adaptive DC voltage control is the improvement of the current harmonic distortion after compensation, the significant reduction of the SAPF losses and, implicitly, the increase of the efficiency of the whole system.
Although the experiments have been performed on a low-power SAPF (2.5 kVA) and low load (1 kVA compensated apparent power), compared to the non-adaptive control, the efficiency gain was 1.27% and the supply current distortion decreased from 3.3% to 2.6%.
The experimental results in a dynamic regime, both at the validation of the compensation as well as at the step reduction or increasing of the load, show good dynamic performance and prove that the evolution of DC voltage is in accordance with the proposed adaptive algorithm.
In the authors' opinion, although the quantitative results are correlated with the experimental model used, the qualitative aspects are generally valid and more significant at high powers.