Enhanced DVR Control System Based on the Harris Hawks Optimization Algorithm

The dynamic voltage restorer’s (DVR) transient, steady-state, and dynamic responses are essential requirements for protecting sensitive loads against upstream voltage disturbances via the DVR’s ride-through capabilities. DVRs also look after transient oscillation at the instant of entering, and /or exiting by the DVR. This paper presents an enhanced, optimized, and less complex DVR control system structure, which is capable of improving the transient, steady-state, and dynamic responses as well as eliminating inherent transient oscillations. The control system comprises a closed-loop feedback control signal and feedforward upstream disturbance detection signal. Incorporating the feedforward term helps, dramatically, in improving the system response and eliminating the transient oscillations in the load voltage. The error signals are adapted using a PI controller to make the load voltage faithfully track its predefined reference waveform. The controller is implemented in the dq synchronous rotating reference frame. The parameters of the PI controller are selected using modern population-based optimization called the Harris Hawks Optimization (HHO) technique. The results obtained using the HHO technique are compared with two other optimization algorithms, namely Particle Swarm Optimization (PSO) and Whale Optimization Algorithm (WOA). The results show that the HHO gives the best system response. The system is simulated using MATLAB/Simulink and the validation via Typhoon HIL402 real-time emulator. Both HIL402 validation and simulation results show that the proposed control scheme recovers normal operation against voltage disturbance within approximately 1.2 milliseconds without overshoot with steady-state error near zero and significantly dampens the inherent voltage oscillation that occurs at the instant of DVR entrance and/or exit.


I. INTRODUCTION
Power quality (PQ) attracted much attention especially in industrial and commercial consumers due to the huge economic losses caused by poor PQ. With the expanding use of sensitive electronic equipment in the industrial, residential, and commercial sectors, voltage disturbances such as voltage sag (dip), voltage swell, flickers, interruptions, and voltage harmonics, have surfaced among the most significant PQ problems [1], [2]. According to some statistical studies, voltage sag has been identified as the most frequent and repeated voltage disturbance issue with a negative impact on production costs [3], [4]. Investigation of equipment sensitivity and The associate editor coordinating the review of this manuscript and approving it for publication was Hao Luo . malfunction occurring due to voltage dip has been reported in the literature [5]. Various examples of problems associated with different voltage sags have been discussed in [6], [7]. The causes of voltage sag/swell may be due to the starting of large motors or transformers energizing, switching operations, faults (short circuit), and sudden load changes [8]. Such causes are impossible to prevent but can be dealt with in a way to mitigate their negative impact on equipment.
Dynamic voltage restorer (DVR) is considered one of the most effective solutions for voltage sag and swell mitigation which is widely used in the industrial sector [7]. According to the IEEE 1346-1998 and IEEE 519-2014 standards [9], [10] a voltage sag/swell is defined as a decrease/increase in the RMS ac voltage (10-90% of the nominal voltage 110-190% of the nominal voltage), respectively, at the power frequency of VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ duration from 10.0 milliseconds to 1.0 minute. From the definition, one of the most essential requirements in the voltage sag/swell compensation device is to detect and compensate the sag/swell within a time less than 10 milliseconds. Hence, the transient response and good overall performance of the DVR system are essential for providing good quality of the power system. Several previous studies investigated the improvement of the DVR control system and the inherent problem of transient oscillation at the instant of DVR entrance and/or exit. Open-loop control was the most reported control strategy because of the fast voltage compensation requirement, but it was shown to have poor performance such as large steadystate error and long delay time in its response [11], [12]. Single-feedback closed-loop [13] and multi-feedback control loops [14] methods were applied to DVR in different studies aimed to improve the control system response. All of those studies succeeded in voltage compensation without indication of the transient response.
An integrated higher-order controller was implemented, based on ultra-capacitor (UCAP) DVR to improve the dynamic response of the DVR [15]. This technique was successful in voltage-sag compensation within 33 milliseconds. A proportional resonant controller for the current and voltage control loops was proposed to improve the transient response of the DVR in [16]. It has been reported that this proposed DVR control can compensate for the voltage sags within 20 milliseconds. In [17], a closed-loop state-variable control strategy in a multi-loop control structure was presented. The derivative of the output current was used to increase the dynamic response of the control system. That study compared the system behavior with open feed-forward and multi-loop structure counterparts and showed that the system achieved a better response in both transient and steadystate conditions. However, it required a current observer which complicated the control system. In [18], a repetitive control scheme for a series three-phase compensator was introduced. The controller response was delayed one PWM switching cycle. That response verified a very fast dynamic behavior, but the repetitive control scheme had an inherent drawback. Its performance could only be guaranteed when voltage disturbance followed certain repetitive scenarios.
This work proposes a less complicated system structure with reduced number of sensors while achieving enhanced dynamic, transient, and steady-state responses compared with other techniques in [15]- [18]. The proposed control incorporates one feedback control loop and one feedforward control loop. The feedforward control term determines the difference between the actual voltage at the point of common coupling (PCC) and its reference value. Incorporation of the feedforward term significantly improves the transient response of the DVR control system. Theeffectiveness of the feedforward term has been gradually introduced into the control loop to counteract overshoot at the instant of correction as well as undesirable oscillations in the system response. The feedback control loop compensates the difference between the actual load voltage and its reference waveform as well as the voltage drop caused by the DVR circuit itself.
Optimal tuning of the PI controllers' parameters has significantly enhanced the transient, dynamic, and steady-state response of the DVR. Three candidate optimization techniques, namely Harris Hawks Optimizer (HHO) [20], Particle Swarm Optimization (PSO) [19], and Whale Optimization Algorithm (WOA) [21], have been applied to the proposed controller in order to compare their performance. While the three techniques have yielded close results as far as steady-state performance is concerned, HHO, which has been selected for the proposed system, has offered superior performance in terms of transient response.
The system is simulated using MATLAB/Simulink and the simulation results show excellent response in transient, steady-state, and dynamic operation at different operating conditions. Verification of the proposed DVR control system is carried out using the Typhoon HIL 402 control centre in the virtual HIL SCADA system and via the hardware device in the laboratory.
The paper is organized as follows. The DVR power circuit, system modeling, and the control circuit structure are introduced in section 2. The PI controller tuning and performance index are illustrated in section 3. The problem formulation is presented in section 4. The simulation results and the system validation via typhoon HIL402 are introduced in section 5 and 6, respectively. Section 7 presents the conclusions of this paper.

II. SYSTEM DESCRIPTION
A. POWER CIRCUIT STRUCTURE FIGURE 1. shows one of the most common configurations of the DVR power circuit [22]. The DVR is a series compensation device connected between the PCC and the sensitive load. The DVR power circuit consists of a controlled DC source, three-phase inverter, LC filter, and the injection transformer. In this study, the DVR is separately excited through a controlled DC link. The LC filter is an essential part to attenuate the high order harmonics caused by high-frequency pulse width modulation in the inverter. The injection transformer in the DVR systems guarantees galvanic isolation and filtration for the pulsating inverter output voltage. Careful design of the injection transformer is a very essential element in DVR as the transformer may reach saturation, overrating, and overheating issues [23].
In this study, it is assumed that the load is R-L with rated power 15.0 kVA at 0.95 lagging power factor and the DVR is designed to compensate the voltage dip/swell within ± 40% of the total kVA, i.e. the DVR is designed to compensate within ±6.0 kVA. Considering that the primary side of the transformer is the inverter side, the transformer is a step-down transformer with turns' ratio 3:1 to decrease the current stress on the inverter switching devices. TABLE 1 illustrates the per phase system parameters.

B. SYSTEM MODELING IN THE SYNCHRONOUS REFERENCE FRAME (SRF)
The equivalent circuit of the system model is shown in FIGURE 2. The DVR model is considered as an inverter with LCL filter as the inductance of the injection transformer is taken into consideration. Neglecting higher-order harmonics, the voltage source inverter (VSI) can be represented by an ideal AC (V inv,a , V inv,b , and V inv,c ) as depicted in FIGURE 2. Applying KVL yields where − → V PCC(a, b, c) are the voltages of phase ''a'', ''b'', and ''c'' at the PCC, respectively, − → I a,b,c × Z eq are the voltage drops over the DVR internal impedance (including the LC filter series inductance and the injection transformer impedance) for phases ''a'', ''b'', and ''c'', respectively, − → V inv (a, b, c) are the controlled output voltage for phases ''a'', ''b'', and ''c'' of the VSI, respectively.
Equation (1) shows that the load voltage is dependent on the value of the voltage at the PCC (V pcc ) and the controlled DVR voltage (V DVR ). Equation (2) indicates that the compensation process should include compensation for the voltage drop over DVR internal impedance.

C. CONTROL SYSTEM STRUCTURE 1) BASIC CIRCUIT STRUCTURE
The main objectives of the DVR control system are as follows: a) Detect the Grid angle (for grid synchronization), b) Detect the load and/or grid voltages, c) Calculate the reference voltage and the compensating voltage values, d) Generate appropriate pulses for controlling VSI switching devices.
The voltage detection is carried out by measuring the instantaneous three-phase voltages V a,b,c at the PCC and at the load. Then, the three-phase voltages are transformed from the abc system to a two-phase stationary frame (αβ) system using Clark transformation as in (3). The transformation is based on the assumption that the α-axis is aligned with the phase ''a''-axis and that the β-axis leads the α-axis with 90 degrees. The system voltages are then transformed from the stationary frame, αβ, to the rotating frame, dq, via Park transformation using (4) and as depicted in FIGURE 4. The grid angle (θ), used in (4), is obtained using the phase-locked loop, PLL, circuit shown in FIGURE 3. FIGURE 3 illustrates the control structure of αβ-PLL stationary frame implemented on Matlab/Simulink platform. Notably, the αβ-PLL technique is widely used in three-phase grid-connected power converters because of its simple implementation and accurate estimation of the phase angle of the grid [24].
where θ represents the transformation angle representing the vector position.

2) THE PROPOSED CONTROL ALGORITHM
Referring to (2), it can be seen that for good and fast dynamic responses, the voltage drop across the DVR, the voltage disturbance at the load side, as well as the disturbances in the voltage at PCC, are incorporated in the control loop. Referring to FIGURE 4, the principle of operation of the control system is as follows. The three-phase voltages V a,b,c at the PCC are transformed from the abc system to the αβ system using Clark's transformation as in (3) and then to the dq system as in (4).
to produce e PCC,d . e PCC,d is passed through a rate limiter to regulate its influence on the control system response to eliminate load voltage overshoot. At the same time, the d-component of the load voltage (V L,d ) is compared with its reference value (V * L,d ) to produce the error signal e vld . e vld is conditioned using the PI 1 controller to produce e cvld . e cvld is summed up with e PCC,d to produce e cd . Meanwhile, the q-component of the load voltage (V L,q ) is compared with its reference value (V * L,q ) to produce the error signal e vlq . e vlq is conditioned using the PI 2 controller to produce e cq . Both e cd and e cq are transformed back to the αβ system to produce V α and V β which are then employed to produce the proper space vector PWM signal. The PWM signal is used to control the switching devices of the voltage-source inverter (VSI). The output voltage of the VSI is stepped down using the series injection transformer to the power grid voltage level to produce the compensating voltage (V DVR ). V DVR is summed up with V PCC to produce the regulated load voltage.    (a) shows that, without incorporating the feedforward term, the system takes about 450 milliseconds to reach a steady state. FIGURE 5.(b) shows that, when incorporating the feedforward term, the system reaches steady-state in approximately 6 milliseconds but with damped oscillations reaching as high as 25% of the steady-state voltage.

III. TUNING OF THE PI CONTROLLER PARAMETERS
The PI is a conventional controller that is commonly used in industrial applications because of its simple structure, low cost, and high stability margin. However, PI tuning is a difficult task, especially in the nonlinear dynamic systems.
Recently, heuristic optimization techniques have been used for optimal tuning of PI controller gains [25], [26].
In the case of PI tuning via any optimization technique, some error criteria usually have to be minimized in order to reach optimal or near-optimal PI parameters. There are several performance criteria applied on different applications such as Integral Absolute Error (IAE), Integral of Square Error (ISE), Integral Time Absolute Error (ITAE), and Integral Time Square Error (ITSE) in response to a step function applied to the system input (setpoint) [27]. According to the nature of the application and the objective function, one of these criteria achieves the optimal solution [26]. The system is considered to be an optimal control system when the system parameters are adjusted in such a way that the indices reach, usually, a minimal value.
The ITAE criterion for the error signals (e vld and v vlq ), is used as a performance index. This criterion helps to reach the optimal PIs controller parameters. Equations (5) and (6) represent the direct and quadrature error signals of the load voltage (see FIGURE 4). The selection of the PI parameters is carried out using the HHO algorithm which was found to offer the most optimum parameters when compared to other optimization techniques, namely PSO and WOA. The following three sections present the application of the three optimization techniques for selecting the parameters of the PI controllers.

A. THE PARTICLE SWARM OPTIMIZATION (PSO)
The idea of the PSO was inspired by the behavior of animals such as fish schooling and birds flocking [28]. Each animal position (particle position) and velocity is updated to the best position and guided toward the best position in the search space. The PSO mathematical equations can be represented by (9)- (11).
xi(k + 1) = xi(k) + vi(k + 1) (10) where V i (k) is the velocity of particle, X i (k) is the position of particle i, P i,best is the best position of until iteration k, I is the number of particles, K number of iterations, β particle inertia; d 1 social attraction; d 2 cognitive attraction; r 1 , r 2 uniform random numbers.

1) THE WHALE OPTIMIZATION ALGORITHM (WOA)
WAO is a nature-inspired meta-heuristic algorithm presented in [21]. The method of searching consists of two stages, exploration and exploitation. In the former stage, the algorithm explores the global search space. The latter stage follows the exploration and investigates in detail the optimal values of PI controllers K p1 , K i1 , K p2 , and K i2 .
where t indicates the current iteration, − → A and − → C are coefficient vectors, − → X * is the position vector

B. THE HARRIS HAWKS OPTIMIZATION (HHO)
The HHO is a metaheuristic optimization technique that mimics the cooperative activity of an effective chasing style of Harris Hawks called ''surprise pounce'' [29], [20]. Like other metaheuristic algorithms, the HHO algorithm also contains the phases of exploration and exploitation. HHO is a population-based, gradient-free optimization technique. Therefore, it can be used with proper formulation for any optimization problem. The HHO algorithm includes two exploration phases and four exploitative steps. Moreover, the mathematical representation of this cooperative activity suggests a new stochastic approach to deal with several optimization problems [30]. The next section illustrates how the HHO technique is applied to the proposed DVR control system. VOLUME 8, 2020

1) EXPLORATION PHASE
In this stage, HHO remains in certain areas randomly hoping to find the prey based on two tactics. The position of each hawk is adjusted by an equation, (14). In our situation, the ''preys'' are the PI controller parameters K p1 , K i1 , K p2 , and K i2 and the ''hawks'' are the number of search agents that have been proposed. where: is the position vector of hawks in the next iteration, is the position of prey (K p1 , K i1 , K p2 , and K i2 ), K, c 1 , c 2 , c 3 , c 4 are random numbers inside (0,1) updated in each iteration, is the current position vector of hawks, is a randomly selected hawk from the current population, LB &UB are the lower and upper bounds of variables, representing the expected minimum and maximum values K p1 , K i1 , K p2 , and K i2 .
The hawks reach an average position via equation (15), where: Y m (t) is the average position of the hawks, Y i (t) is the location of each hawk in iteration t, N is the total number of hawks (no of search engines here, N = 10).

2) TRANSITION FROM EXPLORATION TO EXPLOITATION
Since the prey tries to escape, there is a process between exploitation and discovery called the transition from exploration to exploitation. The prey loses a lot of energy during its attempt to escape. The prey's energy equation is modeled in equation (16): where, E indicates the escaping energy of the prey, T is the maximum number of iterations, and E 0 is the initial state of its energy.

3) EXPLOITATION PHASE a: SOFT BESIEGE (R ≥ 0.5 AND | E| ≥ 0.5)
The Harris's hawks encircle the prey quietly to exhaust it before the hawks swoop on it. This action is described by equations (17) and (18) where Y (t) is the difference between the position of the prey and the current location of the hawk in iteration t. K refers to the strength of the prey randomly jumping during the escape k = 2(1-c 5 ). In each iteration, this value changes randomly to simulate the nature of prey movements. r is the prey's chance of successfully escaping. In this case, the prey becomes too exhausted to escape. As a result, the hawks effortlessly catch the prey, and then pounce on it. Using (19), each hawk upgrades its current location.

c: SOFT BESIEGE WITH PROGRESSIVE RAPID DIVES
In this approach, assume that the hawks could evaluate (decide) their next move based on the following rule In the HHO algorithm, the concept of Lévy Flight (LF) is used to design a mathematical model that illustrates the zigzag movement of the prey during its attempt to escape. The hawks are supposed to dive towards the prey based on the LF rule in (21). Equations (22) and (23) are used to calculate the LF function.
where, D is the dimension of the problem, S is a random vector by size 1×D, LF is the Lévy flight function.

d: HARD BESIEGE WITH PROGRESSIVE RAPID DIVES
The position of team members is updated by reducing the distance between their average position and the prey position. This motion is illustrated by (24) where H and G are obtained by applying new rules represented by (25) and (26): where, Y m (t) is obtained from equation (15) FIGURE 6 demonstrates a flow chart for the application of the HHO algorithm on the proposed DVR control system.

IV. PROBLEM FORMULATION
In this work, HHO is compared against two evolutionary algorithms, WOA and PSO, to select optimal parameters for the PI controllers. The problem formulation for the proposed DVR control system is based on the objective function given by (7) and (8) to minimize the time-absolute-integral of error.
The HHO delivers the best performance as far as transient response is concerned.   of the optimal solutions for three optimization methods. FIGURE 7 depicts the transient response for the DVR using the controller parameters based on the optimal solutions from the three methods. The HHO provides the best result without over-shooting, the lowest settling time ≈ 1 milliseconds, and minimal steady-state error. By contrast, PSO and WAO give settling times ≈10 milliseconds and ≈ 5 milliseconds, respectively.

V. SIMULATION RESULTS
The three-phase DVR closed-loop control scheme depicted in FIGURE 4 is simulated using Matlab/Simulink. The system parameters are given in TABLE 1. FIGURE 8 shows the system performance when tested against ±30% disturbance of the nominal voltage at the PCC. FIGURE 8.(a) shows the voltage at PCC at nominal operation from t = 0 to 0.1 seconds (peak value of V PPC = V L = 311Volts). At t=0.1 sec. to t=0.2 sec., V PCC undergoes a voltage sag of ∼ =-30% of its nominal voltage to reach a peak value of 217.7 Volts. For the same time interval, the DVR produces an aiding voltage that counteracts this voltage sag (FIGURE 8.(b)) to result in a load voltage that is almost free of disturbances (FIGURE  8.(c)). From t=0.2 to t=0.3, the system regains its nominal operating conditions. At t=0.3 seconds to t=0.4 seconds, the voltage at the PCC undergoes a voltage swell of ∼ = +30% of its nominal voltage to reach as high as 404.5 Volts. For the same time interval, the DVR produces an opposing voltage that counteracts this voltage swell and results in a load voltage that is almost disturbance-free. FIGURE 9 shows a zoomed-in view for FIGURE 8 during the sag interval and at  the commencement of the DVR corrective action (the start of the compensation process) which usually results in damped oscillation at the load [17]. FIGURE 9 (c) indicates that the load voltage was compensated with almost no oscillations. This indicates that the proposed control system succeeds in mitigating the oscillation caused at the instant of DVR entrance and /or exit. FIGURE 10 depicts the dynamic response of the load voltage during voltage sag. The inner window provides a zoomed-in view of the disturbance interval. It is shown that the proposed system takes about 1.2 milliseconds to reach steady-state and counteract the disturbance. The inner window in FIGURE 11 shows a zoomed view of the dynamic response at the start of swell disturbance. The figure shows that the system takes approximately 1.1 milliseconds to recover from the swell disturbance with near zero steady-state error. These results indicate that the controller is capable of coping with system disturbances which may occur at  the source side with excellent dynamic and steady-state responses. FIGURE 12 and FIGURE 13 show the DVR's behavior for unbalanced voltage sags. In FIGURE 12, only phase ''a'' voltage undergoes a sag of −30% from its nominal value.
In FIGURE 13, the voltage sag affected the two phases equally by -30 % from their nominal value. The figure indicates that the system is capable of effectively dealing with unbalanced sags. FIGURE 14 presents the active and reactive power before, during, and after sag and swell at the PCC. The figure shows that there is a reduction in active and reactive power delivered by the PCC during the sag and increase in the active and reactive power during the swell. FIGURE 15 indicates the DVR active and reactive power compensation during sag and swell. The figure shows that DVR injects and absorbs power during voltage sag and voltage swell, respectively.   shows that the load almost suffers no voltage disturbances in the power delivered to it throughout all upstream abnormalities. This indicates that DVR effectively mitigates sag and swell occurrences as shown in TABLE 3. FIGURE 17 and FIGURE 18 depict the RMS and the three-phase sinusoidal currents at various points in the system. FIGURE 19 shows the system behavior at other ratios of voltage sag and the corresponding compensation. As depicted, the DVR can isolate the load from any disturbance (swell/sag) that might occur at the PCC by providing the proper voltage compensation.

VI. EXPERIMENTAL VALIDATION BASED ON TYPHOON HIL402
Hardware-in-the-Loop (HIL) real-time emulators are extensively used for power electronics control system design, testing, and test automation. A real-time emulator for the VOLUME 8, 2020   proposed DVR control structure is performed via the Typhoon HIL402 kit through a breakout board [31], [32]. FIGURE 20 presents a photo of the setup system using the HIL402 kit and   a breakout board to test the proposed system. The DVR power and control circuits are modeled on the Typhoon HIL control center schematic editor. FIGURE 21 and FIGURE 22 show the system behavior during sag and swell. Channels A and B display a singlephase grid voltage and load voltage, respectively. Channels C and D display the reference load voltage and the actual load voltage, respectively. FIGURE 23 represents a zoomed-in view for the control response which is in very close agreement   with the simulation results. The figure also indicates that the proposed control structure compensates for the voltage disturbance within ≈ 1.2 milliseconds.

VII. CONCLUSIONS
This paper proposed an enhanced, optimized, and less complex control structure for the Dynamic Voltage Restorer (DVR) that achieved excellent protection against load voltage sag and/or swell. Combining the feedforward upstream disturbance detection term and the closed-loop feedback control signal helped in improving the transient response and eliminating undesirable transient oscillation at the instant of DVR compensation. Tuning the PI controller parameters was based on the Harris Hawks Optimization (HHO), which was found to offer the most optimal PI parameters for the proposed controller when compared against two other optimization algorithms, namely PSO and WAO. Simulation results using MATLAB/Simulink indicated that the proposed control scheme recovered normal operation against voltage disturbance within approximately 1.2 milliseconds without overshoot and with steady-state error near zero and significantly dampened the inherent voltage oscillation at the instant of DVR entrance or exit. Validation of the proposed DVR control structure was performed via Typhoon HIL402. The validation results were in good agreement with those of MATLAB simulation. FAHMY. M. BENDARY received the B.Sc. degree from Ain Shams University, Egypt, and the M.Sc. degree from Cairo University, Egypt, in 1966 and 1979, respectively, and the Ph.D. degree from Paris, Sud University, France, in 1983. From 1984 to 1995, he was an Associate Professor with Zagazig University. He was promoted to full professor of automatic control and its applications to power system, in 1995. He is currently a Professor of electric power systems and automatic control at the faculty of engineering, Shoubra, Benha University. He is a coauthor of more than one hundred research articles, and a reviewer for many local and international journals as well as conferences in the field of power system optimization, operation, planning, control, and renewable energy systems. VOLUME 8, 2020