Experimental Validation of an Advanced Load-Shift System Operating as Shunt Active Power Filter

This paper presents a load-shift system with advanced functionalities for the power grid. When compared with the conventional approach, an advanced load-shift system allows the compensation of power quality problems on the power grid side, namely problems related to current harmonics, current imbalances, and low power factor. The advanced load-shift system is composed by a bidirectional ac-dc converter to interface the power grid and by a bidirectional dc-dc converter to interface an energy storage system. Since the main innovation is related with the power grid interface, the focus of this work is on the analysis of the ac-dc converter, which is based on a three-phase four-leg voltage source converter. A theoretical study and the details concerning the control algorithm are presented and discussed along the paper. A laboratory prototype of the advanced load-shift system was developed, and the main details of implementation are described in the paper. Experimental results obtained with the developed prototype prove that the advanced load-shift system contributes for the technology progress in this area, validating a new operation concept concerning the power quality on the power grid side. For all the operation modes, the system operates with high power factor and the currents on the power grid side are balanced with a low total harmonic distortion and in phase with the respective power grid voltages.


Introduction
Nowadays, due to climate change and global warming, there is a growing use of renewable energy sources (RES). However, most of them have as main disadvantage the intermittence in the generation of electric energy [1,2]. In this context, the concept of demand-side management (DSM) using load-shift systems (LSS) comes up. This concept began to be studied some years ago and consists in storing energy in periods of less demand and, posteriorly, use the stored energy in periods of higher demand [1].
The DSM is an important concept in smart grids and smart homes, since it allows the generation and storage of energy in the same installation, allowing to take advantage of the energy price difference throughout the day, contributing to establishing a dynamic model of energy management [3].
Therefore, from the consumer perspective, a LSS allows reducing energy costs, since the consumption from the power grid is minimized. Furthermore, it enables to reduce the contracted power to a lower grade by reducing the requirements of the power from the power grid [4][5][6].Nevertheless, despite the benefits of the introduction of a LSS, the initial investment is high [7,8].

2
As aforementioned, from the power grid point of view, the LSS is seen as a system capable of consuming or producing energy [5]. Therefore, it is extremely important to operate with high levels of power quality, i.e., with sinusoidal currents and high power factor (in three-phase systems, also with balanced currents), as demonstrated in [9][10][11][12]. Nevertheless, when it is not necessary to exchange energy with the power grid, the LSS is inactive, representing an opportunity to add new functionalities to the power converters. Moreover, such functionalities can be added also during the operation as LSS (i.e., when exchanging energy with the power grid).
Therefore, this paper focuses on the validation of the ac-dc converter of the advanced LSS (aLSS) as a shunt active power filter (SAPF), which is the key differentiating factor when compared with the conventional approaches. With this functionality, besides exchanging active power with the grid, the aLSS also allows to reduce the power quality degradation on the power grid side (harmonic distortion of the currents, current imbalances, and low power factor) [13][14][15]. In this way, the ac-dc converter of the aLSS operates with the key characteristics of a SAPF [16][17][18][19].
It is important to note that the power quality problems must be solved, since, in the long term, they can cause malfunctions in sensitive equipment, causing a reduction in their lifetime and high monetary costs to the consumer. Several publications can be found in the literature that present the three-phase four-leg voltage source converters for interface of renewable energy sources with the power grid and for SAPF applications [20][21][22].
This paper is an extension of the work developed in [23], presenting as newest contributions the validation of the aLSS in different operation modes through computer simulations. In this context, this work is organized as follows: Section 2 presents the aLSS; Section 3 presents the control algorithm; Section 4 presents the validation of the aLSS through computer simulations; Section 5 presents the experimental validation; Section 6 presents a discussion about the results and Section 7 resumes main conclusions of the work. Figure 1 shows the structure of the aLSS, which is composed by a bidirectional ac-dc converter to interface the power grid with the dc-link, and by a bidirectional dc-dc converter to interface the dc-link and the energy storage system (ESS) batteries. As mentioned in the introduction, the focus of this paper is the ac-dc converter, which is responsible for controlling the power consumption from the grid (active rectifier operation) or for controlling the power injection (inverter operation), in both cases with high power factor, and sinusoidal and balanced currents in the power grid side.

Advanced Load-Shift System
The topology of the three-phase ac-dc converter used in the aLSS is presented in Figure 2. As shown, the topology uses a three-phase four-leg voltage source ac-dc converter (with a total of eight switching devices, IGBTs in this case), and a dc-link formed by a capacitor (in fact, in the experimental validation, a set of capacitors connected in series were used). In the connection of the ac-dc converter with the power grid, inductive coupling filters are used. Depending on the switching states assumed by the IGBTs, the converter can produce three voltage levels (-Vdc, 0, and +Vdc), either phase-to-neutral or phase-to-phase voltages due to the four-leg structure.

Control Algorithm
The control algorithm of the ac-dc converter of the aLSS is responsible for controlling the power grid currents, compensating the harmonic currents and power factor, as well as for controlling the dc-link voltage. The control algorithm is mainly divided in three operation modes: (a) Operation as an active rectifier, absorbing power from the power grid; (b) Operation as an inverter, injecting power into the power grid; (c) Operation as SAPF in both cases, i.e., in active rectifier or inverter mode. For all of these three operation modes it is necessary to calculate the reference currents for the aLSS ac-dc converter, as shown in Figure 3. For such purpose, it is fundamental to use a phase-locked loop (PLL) to avoid the propagation of the harmonic distortion of the power grid voltages to the reference currents [24]. Therefore, this strategy uses the power grid voltages (vSA, vSB, vSC) and generates unitary sinusoidal signals synchronized with the fundamental component of the power grid voltages (vpllA, vpllB, vpllC). Moreover, it is necessary to regulate the dc-link voltage (Vdc) to its established reference value (Vdc * ). For this purpose, a proportional-integral (PI) controller is used to obtain the regulation power (preg). This variable is multiplied by the PLL signals and the regulation currents are obtained (iregA * , iregB * , iregC * ), according to equation (1) On the other hand, when the ac-dc converter operates as SAPF, it is fundamental to calculate the compensation currents. For such purpose is used the p-q theory, in which, initially, the load currents (iLA, iLB, iLC) and the signals in phase with the fundamental component of the power grid voltages (vpllA, vpllB, vpllC) are transformed to the coordinate system α-β-0 throughout the Clarke transformation. Thereafter, the powers of the p-q theory are calculated using a sliding window average algorithm, and the α-β-0 compensation reference currents are generated. Therefore, the α-β-0 compensation reference currents are converted to the coordinate system A-B-C using an inverse Clarke transformation, and the compensation reference currents (iCA * , iCB * , iCC * ) are obtained.
In order to control the produced currents (iFA, iFB, iFC, iFN) according to their references (iA * , iB * , iC * , iN * ), a predictive current control algorithm is used. The output of the current control results in four reference voltages (vCA * , vCB * , vCC * , vCN * ) that are compared with a triangular carrier, using a pulse-width modulation (PWM) technique, to obtain the  Figure 2. Topology of the three-phase ac-dc converter used in the aLSS.  PWM signals to be applied to the gate of the IGBTs that forms the ac-dc converter.

Simulation Results
This section presents the simulation results of the aLSS and its control algorithm, obtained through computer simulations using the software PSIM 9.1. The simulation results obtained validate the aLSS operating as: (a) Active rectifier (controlling the power consumption); (b) Inverter (controlling the power injection); (c) SAPF (compensating power quality problems related with the power grid currents); (d) SAPF combined with the operation as active rectifier; (e) SAPF combined with the operation as inverter. Table 1 presents a summary of the main nominal characteristics of the ac-dc converter used in the aLSS.

Operation as Active Rectifier
In this mode the aLSS operates as an active rectifier, transferring energy from the dc-link of the ac-dc converter to the dc-dc converter to charge the ESS batteries. During this operation mode, the ac-dc converter is responsible for the dc-link voltage regulation and for controlling the current in the power grid side. Figure 4 presents the main simulation results during this operation mode, where it can be seen the power grid voltages (vSA, vSB, vSC) and currents (iSA, iSB, iSC), the dc-link voltage (Vdc), the power grid reference current in phase A (iSA * ), the current in the power grid phase A (iSA) and the power exchanged between the power grid (PS) and the dc-link (Pdc), which were obtained from the instantaneous values followed by a low-pass filter with a cut-off frequency of 30 Hz.
Initially, the dc-link voltage (Vdc) is set to the established reference value of 800 V. Thereafter, at the instant 0.4 s, the system is operating for charging the batteries with a power of 12 kW. As it can be seen, the power grid power (PS) is given by the power requested to charge the batteries (12 kW) through the dc-link of the ac-dc converter. Moreover, the currents in the power grid (iSA, iSB, iSC) are balanced with an RMS value of 17.4 A and a THD% of 1.4%, and n phase with the respective power grid voltages (vSA vSB, vSC). As shown for phase A, the current produced by the aLSS (iSA) follows its reference (iSA * ) and the dc-link voltage decreases to 780 V, however, the response is fast, and it is re-established to the 800 V reference voltage.

Operation as Inverter
In this mode the aLSS operates as an inverter, transferring energy from the ESS batteries to the power grid through the dc-link of the ac-dc converter. During this operation mode, the ac-dc converter is responsible for the dc-link voltage regulation and for controlling the power injected into the power with sinusoidal currents, balanced and in phase opposition with the power grid voltages. Figure 5 presents the main simulation results during this operation mode, where it can be observed the power grid voltages (vSA, vSB, vSC) and currents (iSA, iSB, iSC), the dc-link voltage (Vdc), the power exchanged between the dc-link (Pdc) and the power grid (PS), the current injected into the dc-link from the batteries (idc) and the power grid reference (iSA * ) and produced current (iSA) for phase A.
This operation mode starts for the dc-link voltage (Vdc) regulation to its reference value of 800 V. Thereafter, at the instant 0.4 s, the aLSS is operating for transferring power from the ESS batteries to the dc-link, where the batteries are discharged with a constant current (idc) of 15 A.
As it can be seen, the currents injected into the power grid (iSA, iSB, iSC) are balanced with a THD% of 2.6% and in phase opposition with the respective power grid voltages (vSA, vSB, vSC). The current produced by the aLSS (iSA) follows its reference (iSA * ), increasing accordingly with the power injected, reaching an RMS value of 17.4 A. Moreover, it can be seen that, during the injection of energy into the power grid, the dc-link voltage is set to its reference value (800 V), and the power grid power (PS) is equal to the power injected into the dc-link (Pdc).

Operation as Active Rectifier and as Inverter
In this mode, the aLSS operates as an active rectifier or as an inverter, and it is responsible for the dc-link voltage regulation and for controlling the current in the power grid side, both during the process of battery charging or discharging. Figure 6 presents the main simulation results during this operation mode, where it can be observed the power grid voltages (vSA, vSB, vSC) and currents (iSA, iSB, iSC), the dc-link voltage (Vdc) and the current into the dc-link from the battery charging/discharging (idc), the power exchanged between the dc-link (Pdc) and the power grid, and the reference (iSA * ) and produced current (iSA) for phase A.  This operation mode starts with the dc-link voltage (Vdc) regulation to its reference value of 800 V. Thereafter, at the instant 0.4 s, the aLSS starts operating as an active rectifier absorbing power to charge the batteries with a constant current of 15 A. During this stage, the power grid currents (iSA, iSB, iSC) are balanced with an RMS value of 17.4 A, and in phase with the respective power grid voltages (vSA, vSB, vSC). Due to the power used to charge the batteries, the dc-link voltage (Vdc) decreases to 780 V, however, the response dc-link regulation algorithm is quick and it is restored to its reference value (800 V).
Therefore, at the instant 0.6 s, the aLSS starts operating as an inverter injecting energy into the power grid from the batteries (the batteries are discharged with a constant current of 15 A). During this operation, the power grid currents (iSA, iSB, iSC) are balanced with an RMS value of 17.4 A, and in phase opposition with the respective power grid voltages (vSA, vSB, vSC). The dc-link voltage (Vdc) is set to its reference value (800 V). During this operation mode, the current produced by the aLSS (iSA) follows its reference (iSA * ).

Operation as SAPF
In this operation mode the aLSS operates as SAPF, where the ac-dc converter is responsible for the dc-link voltage regulation and for compensating the harmonic currents and the power factor of the grid-side. In order to analyze the performance of this operation mode, a linear load (resistive-inductive load) and a non-linear load (single-phase diode rectifier with an output capacitive filter, an input inductor filter, and a resistive load) were connected in each phase of the installation, each one with different parameters. Figure 7 presents the main simulation results during this operation mode, where it can be observed the power grid voltages (vSA, vSB, vSC) and currents (iSA, iSB, iSC, iSN), the load currents (iLA, iLB, iLC, iLN), the SAPF reference current (iFA * ) and the SAPF produced current (iFA) for phase A and the dc-link voltage (Vdc).
Initially, when the SAPF is not operating, the power grid currents are unbalanced, with low power factor, presenting a high total harmonic distortion (THD%) of 40.9%, 28.7% and 24.1% for phases A, B and C, respectively. During this stage, the dc-link voltage regulation is set to its reference value (800 V).
Thereafter, at the instant 0.7 s, the SAPF starts operating and the power grid currents (iSA, iSB, iSC) become balanced, with an RMS value of 12 A and in phase with the respective power grid voltages (vSA, vSB, vSC). The THD% is reduced to 3.62% and the neutral current (iSN) in the power grid is reduced from an RMS value of 16.8 A to approximately 0 A. On the other hand, for phase A, it can be observed that the compensation current produced by the SAPF (iFA) follows its reference (iFA * ).
Concerning the dc-link voltage (Vdc), during the transient-state, the voltage decreases, but the response is

Operation as SAPF Combined with the Operation as Active Rectifier
In this mode the aLSS operates as an SAPF combined with the operation as active rectifier. During this operation mode, the aLSS is responsible for compensating the harmonic currents and the power factor in the power grid side, for controlling the necessary power to charge the ESS batteries from the power grid with sinusoidal currents and for the dc-link voltage regulation. Figure 8 presents the simulation results of the aLSS operating as SAPF combined with the operation as active rectifier.
Initially, the aLSS is not operating, whereas the power grid currents (iSA, iSB, iSC) present a high harmonic distortion with a THD% of 40.9%, 28.7% and 24.1% for phases A, B and C, respectively, and a high neutral current (RMS value of 16.8 A).
Thereafter, at the instant 0.25 s, the aLSS starts operating as SAPF, compensating the power quality problems related to the currents and the power factor. The power grid currents (iSA, iSB, iSC) are balanced with an RMS value of 11.6 A and in phase with the respective power grid voltages (vSA, vSB, vSC), with a THD% value of 3.58%.
At the instant 0.45 s, the aLSS starts charging the ESS batteries with a constant power of 5 kW (Pdc) and simultaneously operating as SAPF, therefore the currents absorbed from the power grid (iSA, iSB, iSC) increase to an RMS value of 18.8 A and are balanced with a THD% value of 2.2%. During this stage, the power grid power (PS) is given by the power to supply the loads (PLoad) and the power to charge the batteries (Pdc).
Regarding the current produced by the aLSS in phase A (iFA), it is possible to observe that also during this operation mode it follows its reference (i * FA). The dc-link voltage (Vdc) decreases when the system starts operating as SAPF, however, the response is good and the dc-link voltage is restored to its reference value (800 V).

Operation as SAPF Combined with the Operation as Inverter
In this mode the aLSS operates as SAPF combined with the operation as inverter. During this operation mode, the aLSS is responsible for compensating the harmonic currents and the power factor of the installation, for controlling the power injected into the power grid from the batteries with sinusoidal currents, and for the dc-link voltage regulation.  operating as SAPF combined with the operation as inverter, where it can be seen the power grid voltages (vSA, vSB, vSC) and currents (iSA, iSB, iSC, iSN), the dc-link voltage (Vdc) and the current injected into the dc-link from the batteries (idc), the exchanged power (the dc-link power (Pdc), the power grid power (PS) and the loads power (PLoad)), the aLSS current reference (iFA * ) and the aLSS produced current (iFA) for phase A.
Similarly to the operation described above, in this operation mode the aLSS is not operating initially, therefore the power grid supplies the loads with currents THD% of 40.9%, 28.7% and 24.1% for phases A, B and C, respectively.
Thereafter, at the instant 0.25 s the aLSS starts the operation as SAPF, the dc-link voltage (Vdc) decreases in the transient-state, however, it is re-established to the reference value. The power grid currents (iSA, iSB, iSC) are balanced with an RMS value of 11.6 A and with a THD% value of 3.58%.
Therefore, at instant 0.45 s, the system continues operating as SAPF and injects energy into the power grid from the ESS batteries. The batteries are discharged with a constant current of 5 A, which corresponds to a power of 4 kW (Pdc). The power grid power (PS) is given by the difference between the load power (PLoad) and the power injected from the batteries (Pdc). The power grid currents (iSA, iSB, iSC) are balanced with a THD% of 7.8% and in phase with the respective power grid voltages (vSA, vSB, vSC), however, since there is the injection of power into the power grid, the RMS value of the currents decreases to 5.8 A. During this operation mode, the dc-link reference voltage (Vdc * ) is set to 800 V.
This section presented the simulation results which validate the control algorithms implemented. Therefore, the following section presents the experimental validation of the aLSS.

Experimental Validation
This section presents the developed prototype and the main experimental results obtained to validate the control strategy applied to the ac-dc converter of the aLSS when operating as: (a) Active rectifier, consuming power from the power grid; (b) Inverter, injecting power to the power grid; (c) SAPF.

Developed Prototype
In this subsection, the developed prototype of the three-phase ac-dc converter of the aLSS is described in detail, which is divided in two parts: (a) Power stage circuit; (b) Control system.
The developed power stage is formed by the ac-dc converter and by four inductive coupling filters for connecting the converter in parallel with the power grid. The ac-dc converter is formed mainly by four IGBT modules (model SKM100GB176D from Semikron) with four gate protection boards, and by four IGBT gate drivers (model SKHI 22AH4R from Semikron) for actuating the IGBTs with a fixed switching frequency of 20 kHz and a configured deadtime of 3.3 µs. The dc-link is composed by three capacitors (model B43456-A5568-M from EPCOS) connected in series, forming a total capacitance of 1867 µF and a maximum voltage of 1350 V. Figure 10 shows a block diagram of the developed control system divided into the signal acquisition circuits, the signal conditioning circuits, the signal processing circuits, and actuation circuits. Initially, the variables of the system are acquired, with a sampling frequency of 40 kHz, by using voltage sensors (LV 25-P from LEM) and current sensors (LA 100-P from LEM). The acquired signals from the sensors are adapted to digital signals for being read by the digital signal processor (DSP) TMS320F28335 from Texas Instruments. This conversion is performed through an external analog-to-digital converter circuit mounted in a signal conditioning board which also integrates an error detection circuit. Therefore, after implementing the control algorithms in the DSP, the PWM output signals are sent to the IGBT gate drivers through a command circuit for adapting the voltage levels of the PWM output signals from the DSP (3.3 V) to the voltage level required by the IGBTs drivers (15 V).  Figure 10. Block diagram of the control system structure used in the aLSS. Figure 11 shows the developed prototype of the aLSS integrated in the workbench used in the experimental setup. It is important to note that, for safety reasons, during the experimental validation the ac-dc converter was connected to the power grid through a transformer, thus the line-to-line voltage from the aLSS side is 100 V RMS.

Experimental Results of the ac-dc Converter Operation as Active Rectifier
In this operation mode, a resistive load of 26 Ω was connected in parallel with the dc-link and the dc-link voltage was regulated to 200 V. Figure 12 shows the stages of the dc-link voltage regulation. In stage (1), the ac-dc converter is not connected to the power grid, thus the dc-link voltage is 0 V. In stage (2), the ac-dc converter is connected to the power grid by pre-charging resistors. During this stage, the dc-link is charged to the peak voltage of the line-to-line  (3), the ac-dc converter is connected directly to the power grid, and in stage (4) begins the dc-link voltage regulation to the reference voltage (200 V). When the dc-link voltage stabilizes, the resistive load is connected to the dc-link and, as it can be seen, after a short transient the dc-link voltage is set to 200 V (stage (5)).
a LSS ac-dc converter control system   Figure 13 presents, for phase A, the power grid voltage (vSA) and current (iSA) during stage (5). As can be seen, the power grid current is approximately sinusoidal and in phase with the power grid voltage. On the other hand, it is possible to observe that the power grid current (iSA) follows its reference current (iSA * ).

Experimental Results of the ac-dc Converter Operation as Inverter
For the inverter operation mode, the dc-link was powered by a power supply of 300 V and it was defined for the power grid currents a sinusoidal reference current with an RMS value of 5 A. As it can be seen in Figure 15, the power grid currents (iSA, iSB, iSC) are balanced with a peak value of 7 A and in phase opposition with the power grid voltages (vSA, vSB, vSC), meaning that the ac-dc converter is injecting power into the power grid. The produced currents in the power grid (iSA, iSB, iSC) present a THD% value of 2.6% ( Figure 16).

Experimental Results of the ac-dc Converter Operation as SAPF
In the SAPF operation mode, the dc-link voltage was regulated to 400 V and some loads were connected to the power grid. As can be seen in Figure 17, the currents consumed by the loads (iLA, iLB, iLC, iLN) contain a high harmonic component with a THD% value of 76.8% ( Figure 18) and a low power factor. Moreover, the load currents are imbalanced, leading to a high neutral current. In other to compensate the power quality problems caused by the loads connected to the power grid, the SAPF produces the compensation currents (iFA, iFB, iFC, iFN) presented in Figure 19. Figure 20 shows the power grid voltages (vSA, vSB, vSC) and currents (iSA, iSB, iSC, iSN) after the compensation, where it can be seen that the currents are balanced and in phase with the correspondent voltages.    On the other hand, through the power grid currents harmonic spectrum analysis, it can be observed that the THD% value is reduced from 76.4% to 6.4% ( Figure 21).

Discussion
The simulation results obtained prove that for all the operation modes the proposed advanced load shift system operates with high power factor and the power grid currents are balanced with a low THD%, validating a new operation mode of the aLSS regarding the power quality. Table 2 presents a summary of the obtained simulation results.
Regarding the experimental validation, the obtained results contribute to the validation of the aLSS in different operation modes. Although the experimental results were obtained with voltage lower than the nominal (the line-to-line power grid voltage was 100 V), the results validate the ac-dc converter control, specifically the dc-link voltage regulation and the operation with high power factor, low THD% and balanced power grid currents. Table 3 presents a summary of the obtained experimental results.
The simulation and experimental results presented throughout the paper contribute to validating the control algorithm and the developed prototype, showing that the power quality of the power grid currents is high, regardless of the system being operating as aLSS and simultaneously as SAPF.

Conclusions
This paper presents an advanced load-shift system (aLSS) with a special focus on the ac-dc converter, which is responsible for charging an energy storage system (ESS) based on batteries or injecting energy in the power grid with balanced currents and with unitary power factor. Besides, the aLSS is also capable of operating as a shunt active  power filter (SAPF), compensating the current harmonics and imbalances, and the power factor in the power grid side.
Throughout this paper, it was described the topology of the three-phase four-leg ac-dc converter, as well as its control algorithms, where are detailed the synchronization system with the power grid, the p-q theory, and the current control.
In order to validate the developed prototype operating as active rectifier, inverter and SAPF, experimental tests were carried out. The presented experimental results validate the implemented control algorithms, showing that for the operation mode as active rectifier, the absorbed currents in the power grid are balanced with a low total harmonic distortion (THD%) and in phase with the respective power grid voltages. When the ac-dc converter operates as inverter, the produced currents in power grid are balanced with low THD% and in phase opposition with correspondent voltages. In the operation as SAPF, the power grid currents are balanced with a low THD% and high power factor.

Acknowledgements.
This work has been supported by FCT -Fundação para a Ciência e Tecnologia with-in the Project Scope: UIDB/00319/2020. This