Improved Control Method for Voltage Regulation and Harmonic Mitigation Using Electric Spring

An electric spring (ES) with series connection to non-critical loads (NCLs) is mainly known as a smart load (SL) technology that can compensate undervoltages and overvoltages. In this paper, an improved control method is presented for the electric spring to regulate the effective value of the critical load (CL) voltage to the nominal value and to compensate the harmonics of the critical load voltage caused by the grid side. The electric spring’s performance for simultaneous voltage magnitude regulation and harmonic distortion compensation is investigated through simulation studies. The results are compared with those of a conventional control scheme. It has been demonstrated that the electric spring, using the improved control system, reduces the amplitude deviation and distortion of critical load voltage.


Introduction
Renewable energy sources (RESs) such as wind and solar are expected to replace the traditional fossil fuel sources, to create an environment with less carbon pollution [1]. The emergence of electric vehicles (EVs) is another example that can be effective in reducing pollution [2]. The use of these devices in the grid, due to their oscillating nature, and the use of power electronic devices in them, causes power quality problems such as voltage fluctuations and harmonics in the electrical network [3]. Various power electronicbased devices have been utilized for voltage amplitude compensation (e.g., static VAR compensator (SVC), static synchronous compensator, STATCOM, etc.) and harmonic compensation (e.g., active filters). However, due to the normal presence of transformers in the structure of these devices, they are bulky and expensive [4].
Recently, electric spring (ES) has been introduced as a demand-side inverter-based technology to improve the power quality of critical loads by using various control methods. ESs, by series connection to non-critical loads (e.g., electric water heaters and air conditioners), makes a smart load that provides flexibility in consumption. Such a smart load with parallel connection to critical loads (e.g., security systems and computers) changes its consumption to follow the fluctuations caused by the network to ensure critical load voltage regulation at the nominal value. It should be noted that non-critical loads have a relatively large tolerance threshold of applied voltage and can withstand a wide range of voltage fluctuations [5].
The ES was introduced in [6] as a demand-side technology to compensate voltage fluctuations caused by renewable sources in the network, but by reactive power control. In [7,8], by practically testing the ES and comparing it with the simulation results under different ratios of critical load to non-critical load, the proper performance of the ES in voltage regulation is guaranteed. The ES's operation has limitations such as power consumption of critical load, non-critical load and their ratio to each other. Reference [9] has introduced an electric elasticity limit control system to overcome these limitations to some extent by adjusting the ratio of critical load to non-critical load. In [10], the droop control method has been proposed for parallel operation of the ESs distributed along a feeder to stabilize the power network through reactive power control. The works of [11][12][13] used a second-generation ES (ES2), which uses a battery at the DC-link instead of using a capacitor as an energy source. In this type of ES, there is the ability to control reactive and active power simultaneously. It has shown that there are eight modes for compensating the voltage of common resistive, inductive, or capacitive loads. The use of batteries in the structure of the ES increases its price and size. For this reason, the third-generation of ESs (ES3) was introduced by [14,15]. In this structure, the ES, by using a back-to-back converter, controls active and reactive power simultaneously. Further, the ability of the ES3 in suppression mode was extended, compared to the ES1. In addition, reference [14] has considered the operation of multiple ES3 units within a distribution network including photovoltaic systems and electric vehicles. However, the size of the ES3 is still huge due to the use of transformers in its structure. A new form of smart load has been introduced in [16] that uses the ES in series with a critical load to make a smart critical load (SCL). It has demonstrated that a SCL can be an effective solution to improve the lifetime and reduce the size of the central battery bank. In [17,18], using radial-chordal decomposition and d-q transformation, respectively, the improvement of power factor (PF) as well as voltage regulation have been achieved by proper control of an ES. Additionally, a control method has been presented in [19] which is based on the difference between the angle of the mains voltage and the critical load voltage (δ). Using this method, the ES has been evaluated in four performance modes (pure reactive power compensation, specified PF compensation, constant real power compensation, and constant reactive power compensation). However, because mains voltage is used in its control system, this method cannot be a solution on the demand side. The application of ESs in DC microgrids to regulate voltage and improve power quality has been demonstrated in [20,21]. In [22,23], using the model predictive control in the ES control system, the distribution losses in DC and AC microgrids are reduced, respectively. The ES can solve the load imbalance issue and neutralize the zero and negative sequence of current within three-phase networks [24]. To minimize the active power output of the ES for the mentioned operation, various control methods are presented in [25,26]. Several papers have discussed using ESs for compensation of harmonics affecting critical loads. In [27], a current-source inverter has been used in the structure of the ES. A feedback from the line current is applied and then a low-pass filter separates the fundamental frequency of current to compensate the line current harmonics with a P controller. However, due to the rapid dynamic changes in the load current and the slow dynamic performance of the current-source inverter, the use of voltagesource inverters is more appropriate. Reference [28] used a voltage-source inverter, and by feedback from the line current and separating its harmonics by the fast Fourier transform (FFT) block, the P controller compensates individual harmonics selectively. In [29], using model predictive control and feedback from the mains voltage, the critical load voltage is regulated and its harmonics are reduced. This method requires a proper communication system due to the use of mains values. In [30], an ES is used in a DC microgrid to regulate voltage and compensate harmonics. According to the mentioned cases in the literature, the ES has not been explored well as a harmonic compensator and at the same time voltage regulator, and a proper control algorithm to address both issues is required.
This paper uses the second-generation ES structure and proposes an improved control system. This control system provides reactive power control to regulate critical load voltage. It also reduces the critical load voltage harmonics towards more improvement of the power quality. Unlike the methods mentioned for harmonic reduction, in this method, feedback is taken from the critical load voltage, which can ensure an improved power quality for this load. Due to the use of voltage values from the load side, no communication system is required. On the other hand, this method compensates a wide range of harmonics including low and higher orders.
The rest of the paper is organized as follows. In Section 2, the principles of ES operation for voltage regulation and harmonic compensation are illustrated. Section 3 is devoted to ES existing and improved control systems. In Section 4, ES simulation results using the proposed control system are presented and compared with those of an existing control system. Section 5 concludes the paper. Figure 1 shows an ES and its integration into a grid [18]. An ES consists of a DC link, an inverter, and a low-pass LC filter and is connected in series to a non-critical load (e.g., electric water heater) to make a smart load. In this paper, it has been assumed that non-critical loads have a wide range of tolerable voltage fluctuations and are also tolerant of harmonic distortions caused by the ES operation (loads such as with electric water heaters). This smart load, by parallel connection to a critical load, makes the grid's demand-side. On the other side of the grid/microgrid, there are RESs with fluctuating nature that feed loads through the line impedance. According to [31] and Figure 1, the main equations governing this circuit are obtained as follows:

ES Control Principles for Voltage Regulation and Harmonics Compensation
where V g is the mains voltage, V s is critical load voltage, V nc is non-critical load voltage, and V es is ES voltage. I g , I nc , and I c are line current, non-critical load (or smart load) current, and critical load current, respectively. Z g , Z nc , and Z c are line impedance, non-critical load impedance, and critical load impedance (all consisting of resistive and inductive parts), respectively. According to [32], the state-space model of the electric spring is as follows: where L f and C f are the inductance and capacitance of the low-pass filter, respectively. → I es is the current passing through the low-pass filter inductor. V dc is the DC-link voltage, which is assumed to be constant (e.g., supplied by a battery). → m is the inverter's modulation signal.
→ V a is the output voltage of the inverter, which is applied to the low-pass filter. R nc and L nc are resistance and inductance of the non-critical load, respectively.

Voltage Regulation
The presence of RESs in the network, due to their oscillating nature, can cause voltage fluctuations on the load side. When the ES's bypass switch, shown in Figure 1, is closed, the non-critical load connects directly to the mains. In this case, the load side voltage is subject to fluctuations of RESs, which is harmful to critical loads. When the bypass switch opens, the ES enters the circuit and acts as a dependent voltage source. The ES regulates the critical load voltage to the nominal value (V s−re f ) by controlling the reactive power.
In order to regulate the voltage using only reactive power, the voltage of the ES (  Figure 2b shows the overvoltage condition, in which the ES operates in the inductive mode, and by absorbing the reactive power regulates critical load voltage [35]. Therefore, the smart load voltage is divided between the non-critical load ( → V nc ) and the ES ( → V es ). As the ES is capacitive in the undervoltage condition (−jX es ) and inductive in the overvoltage condition (jX es ), the circuit's impedances are written in phasor form as below. In the steady-state condition, the root-mean-square (RMS) value of the critical load voltage is compensated to its nominal value. Therefore, assuming the critical load voltage as ( → V s = |V s |∠0), Equations (7)-(9) can be obtained: Assuming ( → V g = V g ∠δ), and writing KVL in the circuit of Figure 1, Equation (10) is obtained.
By comparing the real and imaginary parts of (9) and (10), two equations are obtained as follows: In Equations (11) and (12), the two variables X es and δ are unknown. So, there are two equations and two unknowns. In other words, for each value of V g , there is one X es , and based on that, the angle δ is obtained. By solving this equation, X es and δ are calculated as follows: Because the ES is assumed to be capacitive and its sign is taken into account, the X es with the positive sign is accepted as the answer. The parameters α, β, and γ in the above equations are obtained as follows:

Harmonics Compensation
The presence of non-linear elements in the network (e.g., power electronic devices) causes harmonics in the grid that can disturb the critical load's operation. The ES can compensate the critical load voltage harmonics (V s,h ) by producing an anti-harmonic voltage (V es,h ). As shown in Figure 3, by setting each of the critical load voltage harmonics to zero, the line current harmonics (I g,h ) become equal to non-critical load current harmonics (I nc,h ), and they close their path through the non-critical load. Thus, the harmonics of the critical load current (I c,h ) become zero. Each of the non-critical load voltage harmonics (V nc,h ) will have the same amplitude as the anti-harmonic voltage of the ES, but with a phase difference of 180 degrees. It should be noted that the harmonics imposed on the non-critical loads do not cause problems in their operation due to the nature of this type of load. The following equations show how to calculate each of the critical load voltage harmonics used for the compensation. First, the critical load voltage is decomposed into its real (V s,r ) and imaginary (V s,i ) components that are perpendicular to each other, as shown in Equations (18) and (19), respectively.
In these equations, n is the order of each harmonic, V s,n is the magnitude of the critical load voltage in each harmonic, ω is the fundamental frequency of the grid (i.e., 100π), and ϕ n is the phase angle of the critical load voltage in each harmonic. Next, V s,r and V s,i are converted to the horizontal (V s,d ) and vertical (V s,q ) components, using the synchronous reference frame d-q transformation (20), which is synchronized with V s , as shown in Equations (21) and (22).
By removing the high-frequency parts of Equations (21) and (22) by the low-pass filters, Equations (23) and (24) are obtained, which represent their fundamental frequency components.
Finally, by subtracting V s,r1 from V s , the harmonic part of the critical load voltage is extracted from it (28) and can be used in the control algorithm to compensate the harmonics.

Existing Control System
As shown in Figure 4, in the existing control system [8], the measured RMS value of the critical load voltage is compared with its nominal value, and the result is sent to a proportional-integral (PI) controller to adjust the RMS value of the critical load voltage. The output of this controller makes the amplitude of the modulation signal ( → m). In order to construct the phase angle of the modulation signal, the phase-locked loop (PLL) block has been used to extract the phase angle of the non-critical load current (or ES current) and then, depending on the conditions of undervoltage or overvoltage, it is added with −π 2 or π 2 , respectively. Thus, the voltage of the ES will be perpendicular to its current and will only regulate the RMS voltage by injecting (capacitive mode) or absorbing (inductive mode) reactive power.  Figure 5 shows the improved control system in which a harmonic compensation function has been added to the existing control system. The improved control system compensates the critical load voltage harmonics to reduce its total harmonic distortion (THD), in addition to regulating the RMS value of the critical load voltage to the nominal value. Harmonics compensation function with feedbacks from the critical load voltage and separating its real and imaginary components (V sr , V si ) transforms them into d and q components (V sd , V sq ). Their high-frequency components are removed by low-pass filters, leaving the fundamental components (V sd1 , V sq1 ) eventually. The real and imaginary parts of the fundamental components of the critical load voltage (V sr1 , V si1 ) are extracted using the inverse d-q transformation synchronized with the critical load voltage phase which is obtained by a PLL block. The harmonic voltage of the critical load is extracted (V sh ), by subtracting V sr1 from the measured critical load voltage. The result of comparing this value with the reference value of zero is fed to a P controller which is used because of its fast-dynamic response. Finally, a pulse-width modulation (PWM) block is used to convert the reference signal into the inverter's switching pulses.

Simulation Results
In this section, by simulating the circuit shown in Figure 1 and applying existing and improved control systems to the ES, their results are compared to each other. The simulation study was carried out by MATLAB/Simulink 2019 b. By polluting the mains voltage with harmonics while also applying undervoltage or overvoltage, the performance of each control method in voltage regulation and harmonic compensation was evaluated. Simulation was performed in four conditions as follow: • undervoltage with existing control method [8] • undervoltage with improved control method • overvoltage with existing control method [8] • overvoltage with improved control method. Table 1 shows the system parameters used in the simulation [18]. Table 2 shows the amplitude of each mains voltage harmonics in two modes of undervoltage (UV) and overvoltage (OV) [27]. The proportional and integral coefficients of the PI controller were set to 1 and 14, respectively. The proportional coefficient P, which was used in the harmonic controller, was set to 3. The value of the coefficient k was 0.03 ( Figure 5).

Undervoltage Condition
In this case, the first row of Table 2 was selected as the mains voltage harmonics. By creating such conditions, the effective value of the voltage on the load side was less than its nominal value (230 V). Figure 6a shows the waveform and harmonic spectrum of the mains voltage in this case. As illustrated, the THD of the mains voltage was 28.82%, which can significantly disturb the performance of critical loads if the harmonics on the load side are not compensated.  The ES voltage-regulation operation for this case using the existing and proposed control system is shown in Figure 7. In these simulations, it was assumed that the ES was activated at t = 0.1 s. These figures illustrate that the ES using both control systems could properly adjust the RMS value of the critical load voltage to the nominal value. On the other hand, the RMS value of non-critical load voltage in the existing and improved control system was less and more than the nominal value, respectively. As mentioned before, this voltage difference with the nominal value does not cause a problem for non-critical loads. The RMS values of the ES voltage, which compensated and regulated the critical load voltage in the existing and improved control method, were about 0.4 and 0.8 per-unit, respectively.  Figure 8a,b illustrates the critical load voltage waveforms and harmonic spectrums using the existing and proposed control system, respectively, in the undervoltage conditions. As shown, the THD of the critical load voltage with the existing control system was 22.26%, which was reduced to 1.65% by the proposed control system. Each harmonic value dropped below 3%, which is in compliance with the IEEE standards [35].  Figure 9a,b depicts the non-critical load voltage waveform and its harmonic spectrum using the existing and improved control system, respectively, in the undervoltage conditions. As shown, the THD value of the non-critical load voltage with the existing control system was 20.82%, which was increased to 72.59% by the proposed control system. Thus, the ES isolated the critical load from the harmonics and transferred them to the non-critical load. This power quality reduction for non-critical loads does not pose problems for them. Figure 10a,b shows the line current waveform and its harmonic spectrum using the existing and improved control system, respectively, in the undervoltage condition. As shown, the THD value of the line current with the existing control system was equal to 18.59%, which was increased to 60.23% by the proposed control system. This is the price for compensating the voltage harmonics at the critical load terminal.

Overvoltage Condition
In this case, the second row of Table 2 was selected as mains voltage harmonics. Figure  6b shows the waveform and harmonic spectrum of the mains voltage in this case. As can be seen, the THD of the mains voltage was 26.61%, which is not acceptable for a critical load; also, its RMS value was more than its nominal value, which increased the load voltage from the nominal value of 230 V. The ES voltage-regulation operation under the existing and proposed control systems is shown in Figure 11, which has assumed that the ES was activated at t = 0.   Figure 12a,b shows the critical load voltage waveform and its harmonic spectrum under the existing and proposed control systems, respectively, in the case of overvoltage. As shown, the THD value of the critical load voltage with the existing control system was 22.26%, which was reduced to 1.69% by the proposed control system. Each harmonic value also dropped below 3%, meeting the IEEE standards [35].  Figure 13a,b depicts the non-critical load voltage waveform and its harmonic spectrum using the existing and improved control systems, respectively, in the case of overvoltage. As shown, the THD value of the non-critical load voltage with the existing control system was 21.38%, which was increased to 60.83% by the proposed control system. Figure 14a,b shows the line current waveform and its harmonic spectrum using the existing and improved control systems, respectively, in the case of overvoltage. As shown, the THD value of the line current with the existing control system was equal to 16.6%, which was increased to 45.27% by the proposed control system.  To better compare the performance of the improved and existing control systems in terms of harmonic compensation, the results of the simulation performed were summarized in Table 3. It can be observed that by applying the conditions mentioned in Table 2, the mains voltage was significantly polluted with harmonics. If the ES used the existing control system, the critical load voltage was also affected by the harmonics of the grid voltage. In this case, the THD value of the critical load voltage for the undervoltage and overvoltage modes was 22.26%, which is outside the standard limits [35]. If the ES used the improved control system, these values were equal to 1.65% and 1.69% for undervoltage and overvoltage conditions, respectively, which meets the standard requirements. On the other hand, the THDs of non-critical load voltage with the existing control system in the undervoltage and overvoltage conditions were respectively 20.82% and 21.38%; these values were respectively 72.59% and 60.83% using the improved control system. As said before, these high values of THD do not cause problems in the operation of non-critical loads such as with electric water heaters. The THD values of the line current under the improved control system increased from 18.59% to 60.23% in the undervoltage condition, and from 16.6% to 45.27% in the overvoltage condition. Thus, the ES with the improved control system isolated critical loads against the grid voltage harmonics. This voltage distortion affects the non-critical load voltage and the line current THD. The grid voltage distortion presented in Table 2 is too significant for the most practical cases and it is considered to demonstrate the effectiveness of the proposed control even for such extreme cases. Thus, the simulations were repeated for more realistic conditions with reduced grid distortion as shown in Table 4 (extracted from [36]). A summary of the simulation results is shown in Table 5. As in the first case with significant grid distortion, the ES could properly compensate the harmonics, leading to reduced THD values of the critical load voltage.

Conclusions
The electric spring has been presented as a demand-side technology to regulate the voltage of critical loads, especially in networks with significant penetration of renewable energy sources. Several control systems have been proposed for this technology to regulate the voltage through reactive power compensation. In this paper, an improved control system has been presented, that in addition to the voltage regulation in the events of undervoltage or overvoltage, can compensate the harmonics of the critical load voltage caused by grid voltage distortion. As demonstrated by the simulation results comparing the proposed control method with an existing approach, the electric spring using the proposed control system effectively reduced the THD of the critical load voltage in both undervoltage and overvoltage conditions. Additionally, as with the existing control system, the RMS value of the critical load voltage could be regulated to the nominal value through reactive power control. In contrast, the non-critical load voltage amplitude changed in an increasing or decreasing direction, and its THD was increased by the proposed control strategy. This situation does not cause a problem for the operation of wisely selected non-critical loads due to their flexible nature and wide range of acceptable voltage amplitude and harmonic distortion. On the other hand, this proposed control system increased the harmonics in the line current. In some cases, it could be a concern; therefore, simultaneous consideration of the critical load's voltage quality and line current quality would be an interesting topic for future studies.