An Active Power Filter with Energy Storage and Double DC Conversion for Power Surge Compensation

This paper presents a single-phase power filter with an energy storage bidirectional DC/DC converter, both of which are equipped with separate capacitor-based DC links that provides good transient response and reduce energy storage capacity. The device is dedicated to the compensation of active power surges generated by nonlinear loads characterized by intermittent operation, where the operating time of a device in relation to the idle time is relatively short. As a compensated and filtered object, the single-phase spot welding machine with a thyristor current controller was assumed. In the case of such devices, the feeder has to be dimensioned for the peak loads, which increase the cost of installation—due to the fact that the used components have to be oversized. The proposed solution can produce measurable economic benefits by reducing the rated power necessary to energize periodically operating loads and improve the indicators of electrical energy quality. An elaborated control algorithm based on a switchable control structure provides a fast and good transient response. The work contains a comprehensive analysis of storage sizing, confirmed by simulation results performed in the Matlab and Simulink environment. Based on the analyses carried out, the laboratory model of the device was implemented and experimental verification performed.


Introduction
The crucial problems of a modern distribution system are limitation in power transfer and the quality of delivery. In some cases, the solution to the issue is the employment of power electronic devices [1][2][3]. It is performed by reactive power compensators and active power filters, compensating the reactive current component according to S. Fryze's or H. Akagi's definition [4,5].
Nowadays, asymmetric and non-linear loads (consumers) running continuously or in cycles are fitted with reactive power compensators or active filters [6] which allow for the reduction of the voltage drop of the feeder line when surge currents flow and the current harmonics content increases. However, this solution does not reduce the peak current values of the feeder line and the transformer caused by surges of active power, due to the need to store a large amount of energy and need to inject it into the grid immediately [7,8].
Alternatively, passive filtration can be used, however, it has many drawbacks, e.g., high inductance value for low frequencies, which cannot be miniaturized. Moreover, such filters are expensive and designed only for a selected frequency. In addition, the aging processes observed in passive components have a significant impact on the quality of filter operation. Regardless of their disadvantages, systems link capacitors [22]. The presence of this component may cause distortion of the generated line current by the 3rd harmonic.
The time scale, as well as the nature of the compensated phenomenon, enable the use of electrolytic capacitors as an energy storage system in comparison to systems where battery energy storage systems are used [23,24].
Experiments are conducted in which supercapacitors are used as energy stores in compensators of the active power [25][26][27], however, the scale of the problem is different and relates to wind or solar power fluctuations.
The use of flywheel energy storage remains an alternative [28][29][30][31] in that solution. However, even due to the highest rate of current increase di/dt, the cost of installation is not justified in the analyzed case.
The high effectiveness of the solution presented in this article has been confirmed by simulations and laboratory experiments in which the current of a spot welder was compensated.

Principle of Operation
The idea of the system operation is presented in Figure 1. The system connected to the feeder line is composed of an active power filter, an energy store and a load switched on at irregular time intervals. In Figure 1, the nature of the feeder line current (I line ) and the load current (I load ) is also marked. A thicker connection to the load symbolizes the requirements for the distribution equipment to handle such peak values of the load current.
Electronics 2020, 9, x FOR PEER REVIEW 3 of 17 extremely important in single-phase circuits due to the limitation of double-line frequency components on DC link capacitors [22]. The presence of this component may cause distortion of the generated line current by the 3rd harmonic. The time scale, as well as the nature of the compensated phenomenon, enable the use of electrolytic capacitors as an energy storage system in comparison to systems where battery energy storage systems are used [23,24].
Experiments are conducted in which supercapacitors are used as energy stores in compensators of the active power [25][26][27], however, the scale of the problem is different and relates to wind or solar power fluctuations.
The use of flywheel energy storage remains an alternative [28][29][30][31] in that solution. However, even due to the highest rate of current increase di/dt, the cost of installation is not justified in the analyzed case.
The high effectiveness of the solution presented in this article has been confirmed by simulations and laboratory experiments in which the current of a spot welder was compensated.

Principle of Operation
The idea of the system operation is presented in Figure 1. The system connected to the feeder line is composed of an active power filter, an energy store and a load switched on at irregular time intervals. In Figure 1, the nature of the feeder line current (Iline) and the load current (Iload) is also marked. A thicker connection to the load symbolizes the requirements for the distribution equipment to handle such peak values of the load current. A typical APF is not capable of supplying and absorbing the active component of the current (in accordance with S. Fryze's power theory). Forcing an excessive or an insufficient flow causes an increase or a drop in the voltage in the filter capacitor CF, which must be constant over time for the correct operation of the filter. Due to that, in the proposed solution, an ES system is connected to the filter capacitor, whose function is to stabilize the voltage of the filter capacitor.
The system is composed of an APF with ES and naturally supports the compensation of the active and non-active components of the current injected by the load. In this case, the flow of the active component will not cause a change in the voltage VF, since the resulting fluctuations will be stored in the ES capacitor CS.
The system aim is to continuously draw energy from the feeder line with a continuous flow of current Iline. Hence, the root mean square (RMS) value of this current is many times smaller than the RMS of the load current (Iload). A typical APF is not capable of supplying and absorbing the active component of the current (in accordance with S. Fryze's power theory). Forcing an excessive or an insufficient flow causes an increase or a drop in the voltage in the filter capacitor C F , which must be constant over time for the correct operation of the filter. Due to that, in the proposed solution, an ES system is connected to the filter capacitor, whose function is to stabilize the voltage of the filter capacitor.
The system is composed of an APF with ES and naturally supports the compensation of the active and non-active components of the current injected by the load. In this case, the flow of the active component will not cause a change in the voltage V F , since the resulting fluctuations will be stored in the ES capacitor C S .
The system aim is to continuously draw energy from the feeder line with a continuous flow of current Iline. Hence, the root mean square (RMS) value of this current is many times smaller than the RMS of the load current (I load ). Electronics 2020, 9, 1489 4 of 17 Under these conditions, the energy is not supplied to the load only from the line, but also through the APF with ES. Such an approach reduces the maximum power on the side of the feeder line, thus the feeder line can be designed for smaller rated currents.
Ensuring the continuous drawing of energy from the feeder line while the consumer runs intermittently means that the system must store energy during pauses in the operation of the load and return it when this intermittent load is turned on. Hence, the operation of the load is supported by an APF with ES and at the peak value the feeder line current is reduced by drawing the previously stored energy.
Assuming that the load operating time is many times shorter than its idle time, a properly selected sinusoidal current value, continuous and almost constant in time, can compensate an intermittent load that is many times greater.
Another advantage of the system is the mitigation of the welder negative impact on the feeder line by eliminating high-order current harmonics. This is achieved by the use of parallel active filter topology.
The turning on of the load, connected to the power line with the RMS voltage V causes the flow of the active current component I load , as illustrated in Figure 2a. However, the load current can also contain harmonics and reactive power (a non-active component according to S. Fryze), hence, the APF has to be used as an interface between the ES system and the voltage source (power line). Under these conditions, the energy is not supplied to the load only from the line, but also through the APF with ES. Such an approach reduces the maximum power on the side of the feeder line, thus the feeder line can be designed for smaller rated currents.
Ensuring the continuous drawing of energy from the feeder line while the consumer runs intermittently means that the system must store energy during pauses in the operation of the load and return it when this intermittent load is turned on. Hence, the operation of the load is supported by an APF with ES and at the peak value the feeder line current is reduced by drawing the previously stored energy.
Assuming that the load operating time is many times shorter than its idle time, a properly selected sinusoidal current value, continuous and almost constant in time, can compensate an intermittent load that is many times greater.
Another advantage of the system is the mitigation of the welder negative impact on the feeder line by eliminating high-order current harmonics. This is achieved by the use of parallel active filter topology.
The turning on of the load, connected to the power line with the RMS voltage V causes the flow of the active current component Iload, as illustrated in Figure 2a. However, the load current can also contain harmonics and reactive power (a non-active component according to S. Fryze), hence, the APF has to be used as an interface between the ES system and the voltage source (power line).
The product of the fundamental voltage harmonic RMS value V and the active current component corresponds to the active power of the load Pload-the average value of the instantaneous power ( Figure 2a). The area limited by the power curve is equal to the energy Eload delivered by the source.

Single load pulse
Averaging energy distribution over time The essential function of the system is the compensation of active power surges/fluctuations generated during the turning on of the load. The idea of load pulse averaging is illustrated in Figure  2b.

Series of load pulses
The amount of energy Eload delivered from the source to the load, during its single activation (pulse), lasting for time ti, is described by the dependence (1): The product of the fundamental voltage harmonic RMS value V and the active current component corresponds to the active power of the load P load -the average value of the instantaneous power ( Figure 2a). The area limited by the power curve is equal to the energy E load delivered by the source.
The essential function of the system is the compensation of active power surges/fluctuations generated during the turning on of the load. The idea of load pulse averaging is illustrated in Figure 2b.
The amount of energy E load delivered from the source to the load, during its single activation (pulse), lasting for time t i , is described by the dependence (1): Electronics 2020, 9, 1489 5 of 17 The reduction of P load , within a period t i to the power level of P AV (Figure 2b), requires a proportional increase in time, during which the energy is transferred from the source (t AV ). Keeping the energy balance through the system means that the surface areas (energies)-E load and E AV -should be equal. The pulse averaging process is illustrated in Formula (2): where P AV ·t AV = E AV is equivalent to E load energy consumed by the load operating with P AV power during the period t AV . General assumptions are: The interval between successive load turning on (t GAP ), as well as the duration of a single turn-on pulse (t i ) and its power (P load ), are predefined by the technological process. The sum of t i + t GAP determines the "quasi-period" (T load )-during which load activation may occur. Selected by the system according to (2), the value of P AV during time interval t AV (t AV < T load ) should ensure the correct distribution of the P load pulse before the next one occurs, without increasing the power value of the source during the period T load , as illustrated in Figure 2c.
The analysis of the technological process allows us to determine the time interval's characteristic for a given technological line: minimum and maximum duration of the T load period, within which load activation should occur, as well as the limit values of a single load pulse duration t i -which is a multiple of the full number of voltage source periods.
The system must ensure correct operation with the longest t i_max pulses (load turned on for the maximum time) which are repetitive within the shortest period between successive load turning on T load_min (maximum energy and power of the source), as well as in the opposite case-the shortest t i_min and T load_max (important in the context of control system dynamics). Both cases are depicted in Figure 3. be equal. The pulse averaging process is illustrated in Formula (2): where PAV⸱tAV = EAV is equivalent to Eload energy consumed by the load operating with PAV power during the period tAV. General assumptions are: The interval between successive load turning on (tGAP), as well as the duration of a single turnon pulse (ti) and its power (Pload), are predefined by the technological process. The sum of ti + tGAP determines the "quasi-period" (Tload)-during which load activation may occur. Selected by the system according to (2), the value of PAV during time interval tAV (tAV < Tload) should ensure the correct distribution of the Pload pulse before the next one occurs, without increasing the power value of the source during the period Tload, as illustrated in Figure 2c.
The analysis of the technological process allows us to determine the time interval's characteristic for a given technological line: minimum and maximum duration of the Tload period, within which load activation should occur, as well as the limit values of a single load pulse duration ti-which is a multiple of the full number of voltage source periods.
The system must ensure correct operation with the longest ti_max pulses (load turned on for the maximum time) which are repetitive within the shortest period between successive load turning on Tload_min (maximum energy and power of the source), as well as in the opposite case-the shortest ti_min and Tload_max (important in the context of control system dynamics). Both cases are depicted in Figure  3.
The determination of the maximum load power (Pload_max) and the maximum duration of a single load pulse (ti_max) leads to the calculation of the maximum value of the reduced source power PAV_max (according to Formula (2)), obtainable for the assumed type of load in the assumed shortest time between impulses Tload_min (4): where Pload_max is the maximum value of the load power; PAV_max is the maximum value of the source power; ti_max is the maximum duration of the load turnon pulse and Tload_min is the minimum interval between the successive load pulses. Formula (4) describes the most critical case when the system is exposed to boundary conditions and has the shortest time (tGAP min) to recover energy before the load is turned on again, as illustrated in Figure 3a. The determination of the maximum load power (P load_max ) and the maximum duration of a single load pulse (t i_max ) leads to the calculation of the maximum value of the reduced source power P AV_max Electronics 2020, 9, 1489 6 of 17 (according to Formula (2)), obtainable for the assumed type of load in the assumed shortest time between impulses T load_min (4): where P load_max is the maximum value of the load power; P AV_max is the maximum value of the source power; t i_max is the maximum duration of the load turnon pulse and T load_min is the minimum interval between the successive load pulses. Formula (4) describes the most critical case when the system is exposed to boundary conditions and has the shortest time (t GAP min ) to recover energy before the load is turned on again, as illustrated in Figure 3a.
The operation of the system requires the storage of the ∆E 1 portion of the energy in the structure of the ES system ( Figure 2c). The ∆E 1 energy is released from the system when the load is turned on. It results in the intended effect of source power reduction. After the load is turned off, the energy loss ∆E 1 is supplemented by the value ∆E 2 with constant power (the system maintains the constant value of the current I AV ), thus the energy balance of the system is satisfied (5): The assumed value of P AV ensures that when t AV < T load the energy ∆E 1 will be supplemented before the load is turned on again, hence the system will be fully prepared for the next switching on of the load.
According to dependence (5), the minimum amount of stored energy E S_min should be greater than ∆E 1 for the assumed maximum power of the receiver (P load_max ), operated with the maximum duration of a single pulse (t i_max ) and the minimum interval between successive pulses (t GAP_min ). The minimum value of the energy stored in the system E S_min , including losses ∆E, was determined by the dependence (6): The implementation of the presented assumptions requires an APF connection with the ES system. The operation of the proposed system does not affect the current (power) of the load, however, it significantly reduces the current of the source.
The function of the APF is to eliminate the harmonics and the reactive current component, while the role of the ES system is to limit the active power fluctuations when the load is turned on. This is done by limiting the active current component as a result of energy transfer from or to the ES system.
The value of filter capacity C F was determined, as a result of the transformation of the dependence describing the energy stored by the capacitor. The voltage across the capacitor during operation with a maximum assumed power P load_max within one period of source voltage should not fall below the level which provides the correct operation (7): where: Electronics 2020, 9, 1489 7 of 17 where E F_max is the maximum energy level stored in the capacitor C F ; E F_min is the minimum energy level stored in the capacitor C F ; E load_max(1) is the maximum level of energy consumed by the load operating at maximum power P load_max (1 kW) during one period of source voltage; T = 1/f i , f i (50 Hz) is the frequency of the source fundamental harmonic; V F_max (500 V) is the maximum (reference) value of the voltage on C F ; V F_min is the minimum value of the voltage on C F ; ∆V (100 V) is the assumed voltage drop across the capacitor C F . As a result of substituting (8)-(11) into (7), the expression (12) was obtained to determine the minimum value of the capacitance of the filter: The key issue in the presented system is the selection of the energy storage capacitance value C S . Increasing the amount of stored energy (e.g., through the use of a larger capacitor) allows for the use of a slower voltage controller, thus a better averaging over time of the generated source reference current.
The energy accumulated in the storage capacitor C S should compensate the energy losses in the C F during the load operation as well as the losses in the ∆E elements, without changing the value of the generated (compensated) source current. Too small a value of C S forces an operation with a higher source current (or larger fluctuations of its RMS value).
In the case of a C S capacitor, the maximum operating voltage V S_max cannot exceed the value of the filter maximum voltage V F_max . The acceptable minimum of ES operating voltage V S is equal to 1/2 of the nominal value. This means that the capacitor is charged by 25%. Discharging the capacitor below this value further reduces the operation of the system (the transfer of energy from the ES system to the filter capacitor is ineffective).
The selected value of the C S guarantees the energy reserve for the compensation of the assumed number of load impulses before the C S is discharged to the minimum level.
The value of the C S was determined in a similar way to C F . During the load compensation, the amount of stored energy should not fall below the level guaranteeing the correct operation of the ES system. The value was calculated for the boundary conditions of the load, operating with a maximum power P load_max and turned on for the longest t i_max (which is a multiple of the total number of source voltage periods t i_max = n max ·T): where where E S_max is the maximum energy stored in the ES capacitor C S ; E S_min is the minimum energy level stored in the capacitor C S ; E load_max (n) is the maximum energy consumed by the load during "n" periods of source voltage; V S_max is the maximum (reference) value of the voltage in C S ; V S_min is the minimum value of the voltage in C S . The energy transferred from the source to the load during a single turn on for n periods of the source voltage can be calculated by (16): where n max is the maximum number of load operation periods with maximum power P load_max during one switch-on cycle; E load_max(1) is the maximum energy consumed by the load during "1" period of source voltage. The substitution of (14) and (15) into (13) leads to dependence (17) which enables the calculation of the minimum C S capacity. The selected value guarantees that during a single turn on of the load for maximum time t i_max (6 × 20 ms), operated with maximum power P load_max (1 kW), voltage across a capacitor will not fall below the minimum level V S_min = 1/2 V S_max = 200 V.

Simulation Results
The system preliminary test was carried out in a Matlab and Simulink environment (SimPowerSystems library). A block diagram of the circuit is illustrated in Figure 4.   In Figure 5, the block diagram of the used series PI controller topology is depicted, based on [32,33]. Detailed controller parameter specifications can be found in Appendix A, Table A1. The initial values are determined using PID Tuner [34], which were then tuned during the experiment.   The analyzed APF is a voltage inverter in the H-bridge topology with current waveforms shaped by pulse width modulation (PWM). The energy storage DC/DC converter is composed of Q1 and Q2 switches as well as a C S capacitor.
The tested device is connected in parallel between the load (spot welder modeled as a series connection of RL elements, where R << X L and a thyristor current controller) and the feeder line, modeled as an AC source with an inductance (100 µH) and resistance (3 mΩ) connected in series. The values are determined using the data sheet of a 15/0.4 kV three-phase distribution transformer.
The switching frequency is equal to 10 kHz, while the entire model is executed at a step of 2 µs (500 kHz). The operation of the device is controlled by two cascade control loops, depicted in Figure 4 (PI controllers are used). The structure of a single control loop consists of an internal, fast current controller, CC, and two external voltage controllers, VC, one of which is used during the startup procedure and the other during the normal mode of operation. Current controllers are common for both phases of the system operation.
Different dynamics (sizes) of controlled storages C F << C S require quick controller parameter changes as well as input signal (feedback) in order to avoid the transient phenomenon in controlled signals. It is implemented by Loop_SW when appropriate conditions are fulfilled.
During startup, the filter control loop stabilizes voltage across filter capacitor C F , however, in normal operation mode, the dynamics of this control loop should be low in order to ensure proper compensation of the load current. Similarly, once the DC/DC converter control loop is stabilizing voltage across C S , then in normal operation mode it is responsible for the control of voltage across the considerably smaller filter capacitor C F .
The current controllers are characterized by a large (in comparison to voltage controllers) proportional gain K p (50 ÷ 130), which is necessary to ensure proper dynamics, while the integration time is selected from the interval 1 ÷ 5 ms.
In the case of the voltage controllers, the values of the proportional gain do not exceed one (0.03 ÷ 0.22) and the integration times are selected from the interval 10 ÷ 20 ms. The small value of the proportional gain (K p < 1) in the structure of the first filter control loop ensures adequate attenuation of the third harmonic during the startup in the generated waveform of the source current.
Due to the load power pulse averaging, the settings of the voltage controller (VC_filter) used during normal operation are the most important. The controller is characterized by a negligible small proportional gain (K p = 0.03), which guarantees the stabilization of the V S voltage within the assumed range, without the possibility of exceeding the acceptable safety levels.
The integration time of the voltage controller (equal to 40 s), is adopted on the basis of the assumed multiple interval between successive load turn ons (t GAP_max = 20 s).
Selected in such a way, the value ensures an appropriate distribution (averaging) of the load pulse over time. The use of a slow controller is possible only due to a sufficiently large energy store (a C S capacitor). The capacity of the storage must provide an energy supply equal to at least one load pulse t i_max , with the assumed power.
In Figure 5, the block diagram of the used series PI controller topology is depicted, based on [32,33]. Detailed controller parameter specifications can be found in Appendix A, Table A1. The initial values are determined using PID Tuner [34], which were then tuned during the experiment.  In Figure 5, the block diagram of the used series PI controller topology is depicted, based on [32,33]. Detailed controller parameter specifications can be found in Appendix A, Table A1. The initial values are determined using PID Tuner [34], which were then tuned during the experiment.  The first startup stage-"StartUp 1/2"-consists of the preliminary charging of the capacity CF. The capacitor is charged by the diodes included in the insulated gate bipolar transistor (IGBT) structure. The value of the charging current is limited by a resistor RB (50 Ω) installed on the input of the filter.
After the voltage VF reaches a steady value, the RB resistor is bypassed by the TB switch (relay). If the voltage of the feeder line is not distorted, the voltage on the capacitor will amount to approximately 325 V. The TB relay is activated when VS > 310 V (VS > 0.95 Vline (MAX)).   During the second stage of "StartUp 2/2" (Figure 6), the impulses controlling the transistors in the filter and the DC/DC converter are unblocked and the control structure is activated.
The purpose of the first control structure (comprising the VC_filter_start and the CC_filter, Figure 4) is to stabilize the voltage on the filter capacitor CF at the reference level of 500 V. This is achieved by developing the appropriate reference of the feeder line current. During this phase, the filter acts as a sinusoidal current rectifier.
Simultaneously with the operation of the filter control, the DC/DC converter control system (which consists of VC_conv_start and CC_conv, Figure 4) is activated. Its function is to stabilize the output voltage of the converter capacitor VS at the reference level 400 V. The capacitor CS is charged by the converter using the energy stored in the filter capacitor CF (the buck mode of operation). This causes a drop in the voltage VF, which is compensated by the filter control circuit. The value of the feeder line reference current has to be increased correspondingly.
In the analyzed case, the current IS, which charges the capacitor CS, is limited to 2 A (the value selected only for the startup 0 ÷ 2 A). The maximum value of the feeder current during the startup is limited to ±7 A. This is achieved by selecting the appropriate saturation value of the voltage controllers.
The startup process ends when the voltage of the energy store exceeds 380 V (VS > 380 V). Then, the final control system is launched (by means of the Loop_SW switches triggered by the Loop_Select signal).
The waveforms of the currents and voltages of the feeder line are recorded when the system is compensating an actuated load within a wide time horizon (30 s). They are shown in Figure 7a (enlarged in Figure 7b). The line current is sinusoidal in and in phase with the line voltage, while the actuation of the load no longer impacts on the line current value.
The effective operation of the system is confirmed by the RMS waveforms of the load (Iload) and line (Iline) currents when the filter with the energy storage is working, as shown in Figure 7c (enlarged in Figure 7d).
The system operation limits the sudden increases of line current RMS value caused by the actuation of the load, as is clearly visible in the enlarged fragment shown in Figure 7d. The RMS value of the current forced by the load is approximately 14 A. The elaborated solution significantly reduced it to the level of 2 A. The first startup stage-"StartUp 1/2"-consists of the preliminary charging of the capacity C F . The capacitor is charged by the diodes included in the insulated gate bipolar transistor (IGBT) structure. The value of the charging current is limited by a resistor RB (50 Ω) installed on the input of the filter.
After the voltage V F reaches a steady value, the R B resistor is bypassed by the T B switch (relay). If the voltage of the feeder line is not distorted, the voltage on the capacitor will amount to approximately 325 V. The TB relay is activated when V S > 310 V (V S > 0.95 V line (MAX) ).
During the second stage of "StartUp 2/2" (Figure 6), the impulses controlling the transistors in the filter and the DC/DC converter are unblocked and the control structure is activated.
The purpose of the first control structure (comprising the VC_filter_start and the CC_filter, Figure 4) is to stabilize the voltage on the filter capacitor C F at the reference level of 500 V. This is achieved by developing the appropriate reference of the feeder line current. During this phase, the filter acts as a sinusoidal current rectifier.
Simultaneously with the operation of the filter control, the DC/DC converter control system (which consists of VC_conv_start and CC_conv, Figure 4) is activated. Its function is to stabilize the output voltage of the converter capacitor V S at the reference level 400 V. The capacitor C S is charged by the converter using the energy stored in the filter capacitor C F (the buck mode of operation). This causes a drop in the voltage V F , which is compensated by the filter control circuit. The value of the feeder line reference current has to be increased correspondingly.
In the analyzed case, the current I S , which charges the capacitor C S , is limited to 2 A (the value selected only for the startup 0 ÷ 2 A). The maximum value of the feeder current during the startup is limited to ±7 A. This is achieved by selecting the appropriate saturation value of the voltage controllers.
The startup process ends when the voltage of the energy store exceeds 380 V (V S > 380 V). Then, the final control system is launched (by means of the Loop_SW switches triggered by the Loop_Select signal).
The waveforms of the currents and voltages of the feeder line are recorded when the system is compensating an actuated load within a wide time horizon (30 s). They are shown in Figure 7a (enlarged in Figure 7b). The line current is sinusoidal in and in phase with the line voltage, while the actuation of the load no longer impacts on the line current value.

Experimental Results
The designed and constructed spot welder, as well as active power filter with an additional energy storage DC/DC converter, are depicted in Figure 8. Both of them are based on electrolytic capacitors. Detailed system specifications can be found in Appendix A, Table A2.
Construction of the welder requires a step-down transformer and two thyristors connected antiparallel on the primary transformer side. In the analyzed case, the welding current was about 600 A and galvanized steel plates (0.25 mm thickness) were welded.
The welder current controller enables smooth adjustment of the thyristor firing angle, moreover, the welding time (ti) can also be adjusted.
During the laboratory tests, an analysis of the steady and dynamic states was performed. The elaborated algorithms of the control concepts were verified in the full range of the load.
The system startup process was the same as that presented in the simulation results in Figure 6. The recorded oscillogram with marked startup phases is presented in Figure 9. After approx. 1.5 s, the device was ready to work.  The effective operation of the system is confirmed by the RMS waveforms of the load (I load ) and line (I line ) currents when the filter with the energy storage is working, as shown in Figure 7c (enlarged in Figure 7d).
The system operation limits the sudden increases of line current RMS value caused by the actuation of the load, as is clearly visible in the enlarged fragment shown in Figure 7d. The RMS value of the current forced by the load is approximately 14 A. The elaborated solution significantly reduced it to the level of 2 A.

Experimental Results
The designed and constructed spot welder, as well as active power filter with an additional energy storage DC/DC converter, are depicted in Figure 8. Both of them are based on electrolytic capacitors. Detailed system specifications can be found in Appendix A, Table A2.

Experimental Results
The designed and constructed spot welder, as well as active power filter with an additional energy storage DC/DC converter, are depicted in Figure 8. Both of them are based on electrolytic capacitors. Detailed system specifications can be found in Appendix A, Table A2.
Construction of the welder requires a step-down transformer and two thyristors connected antiparallel on the primary transformer side. In the analyzed case, the welding current was about 600 A and galvanized steel plates (0.25 mm thickness) were welded.
The welder current controller enables smooth adjustment of the thyristor firing angle, moreover, the welding time (ti) can also be adjusted.
During the laboratory tests, an analysis of the steady and dynamic states was performed. The elaborated algorithms of the control concepts were verified in the full range of the load.
The system startup process was the same as that presented in the simulation results in Figure 6. The recorded oscillogram with marked startup phases is presented in Figure 9. After approx. 1.5 s, the device was ready to work.  Construction of the welder requires a step-down transformer and two thyristors connected antiparallel on the primary transformer side. In the analyzed case, the welding current was about 600 A and galvanized steel plates (0.25 mm thickness) were welded.
The welder current controller enables smooth adjustment of the thyristor firing angle, moreover, the welding time (t i ) can also be adjusted.
During the laboratory tests, an analysis of the steady and dynamic states was performed. The elaborated algorithms of the control concepts were verified in the full range of the load.
The system startup process was the same as that presented in the simulation results in Figure 6. The recorded oscillogram with marked startup phases is presented in Figure 9. After approx. 1.5 s, the device was ready to work.
The working conditions for which this system was designed are shown in Figure 10a. The drawing shows the waveforms of the feeder line and load currents as well as the voltage in the DC/DC converter circuit. The waveform recording duration was limited to 100 s. A compensated spot welder was incidentally actuated with a constant welding duration time (ti = 6 × 20 ms) and a constant thyristor firing angle α = 70°, as illustrated in Figure 11 (load operated with a maximum power Pload_max and turned on for the longest assumed time ti_max).
As a result of the system operation, the maximum value of the feeder line current did not exceed 4 A, while the peak value of the current forced by the load was equal to approx. 22 A.
This means that the peak current of the line, and hence the requirements for the components supplying energy to the compensated load (e.g., the conductor cross section), was reduced by over 80%.
The non-repeatability of the shape of the recorded welding currents (e.g., the differences between the maximum values regardless of maintaining a constant welding angle) are due to phenomena occurring between electrodes (the burning out of oxides and contamination, uneven contact pressure, etc.) [16]. Figure 10b is a detail of Figure 10a. It shows two subsequent actuations of the load occurring at different time intervals. In the presented case, the load is actuated at an interval shorter than 5 s, but the system is still able to restore the voltage VS within approx. 1 s and retain its compensation ability. This proves that the assumed time interval (Tload_min = 5 s) between subsequent actuations of the load ensures the appropriate safety margin for restoring the voltage VS even when the welding time is increased.
Based on the waveforms of the feeder line current and load current shown in Figure 10a,b, the RMS values of these signals were determined in accordance with a true RMS algorithm [35]. A graph of the waveforms produced in the analyzed time horizon is presented in Figure 10c (zoomed-in Figure 10d).
The RMS value of the load current fluctuates within the range of 10 ÷ 12 A, even if the thyristor firing angle is kept constant by the welder control system (due to different welding conditions). The operation of the developed system limits the RMS value of the line current to approx. 2.5 A (an almost five-fold reduction of the RMS feeder line current). This confirms that the aims set for the apparatus were achieved. The working conditions for which this system was designed are shown in Figure 10a. The drawing shows the waveforms of the feeder line and load currents as well as the voltage in the DC/DC converter circuit. The waveform recording duration was limited to 100 s. A compensated spot welder was incidentally actuated with a constant welding duration time (t i = 6 × 20 ms) and a constant thyristor firing angle α = 70 • , as illustrated in Figure 11 (load operated with a maximum power P load_max and turned on for the longest assumed time t i_max ).
As a result of the system operation, the maximum value of the feeder line current did not exceed 4 A, while the peak value of the current forced by the load was equal to approx. 22 A.
This means that the peak current of the line, and hence the requirements for the components supplying energy to the compensated load (e.g., the conductor cross section), was reduced by over 80%.
The non-repeatability of the shape of the recorded welding currents (e.g., the differences between the maximum values regardless of maintaining a constant welding angle) are due to phenomena occurring between electrodes (the burning out of oxides and contamination, uneven contact pressure, etc.) [16]. Figure 10b is a detail of Figure 10a. It shows two subsequent actuations of the load occurring at different time intervals. In the presented case, the load is actuated at an interval shorter than 5 s, but the system is still able to restore the voltage V S within approx. 1 s and retain its compensation ability. This proves that the assumed time interval (T load_min = 5 s) between subsequent actuations of the load ensures the appropriate safety margin for restoring the voltage V S even when the welding time is increased.
Based on the waveforms of the feeder line current and load current shown in Figure 10a,b, the RMS values of these signals were determined in accordance with a true RMS algorithm [35]. A graph of the waveforms produced in the analyzed time horizon is presented in Figure 10c (zoomed-in Figure 10d). Due to the step-down transformer in the structure of the used welding machine, currents are distorted by odd harmonics (especially 3, 5, 7-core saturation effect) [16]. The operation of the filter also limits their content in the line current. The operation with a small value of the firing angle of the thyristor of α < 70° was omitted due to the fact that the shape of the current was similar to currents occurring during a short circuit, in which an aperiodic DC component could be observed.
The final test of the device is illustrated in Figure 12. The load was turned on for 12 periods of line voltage (twice as long as assumed). During compensation of this load pulse ES capacitance CS Due to the step-down transformer in the structure of the used welding machine, currents are distorted by odd harmonics (especially 3, 5, 7-core saturation effect) [16]. The operation of the filter also limits their content in the line current. The operation with a small value of the firing angle of the thyristor of α < 70° was omitted due to the fact that the shape of the current was similar to currents occurring during a short circuit, in which an aperiodic DC component could be observed.
The final test of the device is illustrated in Figure 12. The load was turned on for 12 periods of line voltage (twice as long as assumed). During compensation of this load pulse ES capacitance CS The RMS value of the load current fluctuates within the range of 10 ÷ 12 A, even if the thyristor firing angle is kept constant by the welder control system (due to different welding conditions). The operation of the developed system limits the RMS value of the line current to approx. 2.5 A (an almost five-fold reduction of the RMS feeder line current). This confirms that the aims set for the apparatus were achieved.
The operation of the device also reduced rated power, which is required at the point of connection where such loads are used.
Due to the step-down transformer in the structure of the used welding machine, currents are distorted by odd harmonics (especially 3, 5, 7-core saturation effect) [16]. The operation of the filter also limits their content in the line current. The operation with a small value of the firing angle of the thyristor of α < 70 • was omitted due to the fact that the shape of the current was similar to currents occurring during a short circuit, in which an aperiodic DC component could be observed.
The final test of the device is illustrated in Figure 12. The load was turned on for 12 periods of line voltage (twice as long as assumed). During compensation of this load pulse ES capacitance CS was discharged to 35% (236 V), however, it is still above the assumed minimum level of V S_min = 1/2 V S_max = 200 V. The obtained results confirm the correct selection of the ES capacity and proper operation of the device.
Electronics 2020, 9, x FOR PEER REVIEW 14 of 17 was discharged to 35% (236 V), however, it is still above the assumed minimum level of VS_min = 1/2 VS_max = 200 V. The obtained results confirm the correct selection of the ES capacity and proper operation of the device. The comparison of simulation and experimental results can be found in Appendix A, Table A3. In both cases, similar results were obtained, hence the high accuracy of the developed model was confirmed. It should be noted that the control part of the developed model was used directly for digital signal processor (DSP) controller programming and tested in a real-time simulator [36].

Conclusions
The operating concept of the single-phase active filter with additional energy storage was presented in this paper. Both of them are based on electrolytic capacitors, and have separate DC links. Such a solution provides a good compensation dynamic and allows for the size reduction of filter storage.
The developed device is dedicated to compensation of single-phase loads as, for example, used in the experimental spot welder. Electric spot welders are perfect representatives of nonlinear loads and characterized by intermittent operation. However, this issue also concerns other objects, due to their cyclic operation mode, e.g., crane and lift drives.
The theoretical analyses were used to develop a simulation model of the system in a Matlab and Simulink environment. In the final step, a laboratory model was developed and fully tested.
The simulation and experimental results confirm that the proposed thesis was fully achieved. Its general assumptions included: • Limitation of the RMS value of the feeder current-the operation of the system reduced it well below the value of the current of the consumer itself, which resulted from load rated active power (a fourfold reduction); • The feeder current remaining in a sinusoidal shape (with a dominant 1st harmonic) and in phase with the feeder line voltage.
The proposed solution can produce measurable economic benefits by reducing the rated power necessary to energize periodically operating loads and improving the indicators of electrical energy quality. Moreover, the cross-section areas of power cables can be reduced.
Future work on the issue requires the development of predictive or AI control algorithms dedicated to line current control in a wide time horizon, as well as the optimization of energy storage capacity. In future experiments, the use of other types of energy storage systems, e.g., flying wheels, The comparison of simulation and experimental results can be found in Appendix A, Table A3. In both cases, similar results were obtained, hence the high accuracy of the developed model was confirmed. It should be noted that the control part of the developed model was used directly for digital signal processor (DSP) controller programming and tested in a real-time simulator [36].

Conclusions
The operating concept of the single-phase active filter with additional energy storage was presented in this paper. Both of them are based on electrolytic capacitors, and have separate DC links. Such a solution provides a good compensation dynamic and allows for the size reduction of filter storage.
The developed device is dedicated to compensation of single-phase loads as, for example, used in the experimental spot welder. Electric spot welders are perfect representatives of nonlinear loads and characterized by intermittent operation. However, this issue also concerns other objects, due to their cyclic operation mode, e.g., crane and lift drives.
The theoretical analyses were used to develop a simulation model of the system in a Matlab and Simulink environment. In the final step, a laboratory model was developed and fully tested.
The simulation and experimental results confirm that the proposed thesis was fully achieved. Its general assumptions included:

•
Limitation of the RMS value of the feeder current-the operation of the system reduced it well below the value of the current of the consumer itself, which resulted from load rated active power (a fourfold reduction); • The feeder current remaining in a sinusoidal shape (with a dominant 1st harmonic) and in phase with the feeder line voltage.
The proposed solution can produce measurable economic benefits by reducing the rated power necessary to energize periodically operating loads and improving the indicators of electrical energy quality. Moreover, the cross-section areas of power cables can be reduced.
Future work on the issue requires the development of predictive or AI control algorithms dedicated to line current control in a wide time horizon, as well as the optimization of energy storage capacity.
In future experiments, the use of other types of energy storage systems, e.g., flying wheels, is also planned. Additionally, the device will be dedicated to three-phase systems and asymmetrical loads.

Conflicts of Interest:
The authors declare no conflict of interest.