Voltage Regulation Using Recurrent Wavelet Fuzzy Neural Network-Based Dynamic Voltage Restorer

Dynamic voltage restorers (DVRs) are one of the effective solutions to regulate the voltage of power systems and protect sensitive loads against voltage disturbances, such as voltage sags, voltage fluctuations, et cetera. The performance of voltage compensation with DVRs relies on the robustness to the power quality disturbances and rapid detection of voltage disturbances. In this paper, the recurrent wavelet fuzzy neural network (RWFNN)-based controller for the DVR is developed. With positive-sequence voltage analysis, the reference signal for the DVR compensation can be accurately obtained. In order to enhance the response time for the DVR controller, the RWFNN is introduced due to the merits of rapid convergence and superior dynamic modeling behavior. From the experimental results with the OPAL-RT real-time simulator (OP4510, OPAL-RT Technologies Inc., Montreal, Quebec, Canada), the effectiveness of proposed controller can be verified.


Introduction
With the widespread use of electronics devices and renewable energy in the power system, the requirement for power quality has become one of the important issues in the development of the smart grid. Poor power quality may result in power loss, heating problems for the power equipment, malfunction or damage of devices, tripping of renewable energy, blackout, and corresponding economic loss [1,2]. Among the numerous power quality phenomena, the voltage disturbances, such as sag, swell, voltage fluctuation, and interruption, would directly cause severe damage to sensitive electronic equipment in the industrial, residential, and commercial sectors [3,4]. Therefore, the voltage regulation to stabilize the grid voltage at the point of common coupling (PCC) becomes one of the most effective solutions to protect sensitive loads.
In general, voltage compensation can be performed with a passive filter or active filter. The passive filter combines the passive components such as resistors, inductors, and capacitors to tune the suitable frequency band and filters the voltage disturbances. In this way, the values of the inductor and the capacitor are chosen to present low impedance to the corresponding frequency that is to be filtered out. On the other hand, the active filter regulates the grid voltage by sampling the distorted voltage, calculating the compensation component, generating the regulated voltage with the compensated magnitude, frequency composition, and phase shift from a power source, and then regulating the voltage at PCC through the power electronic switching device [5]. The main advantage of active filters over passive filters is that active filters can respond to the changing load and power quality conditions, whereas the passive filters are fixed to the designed frequency response. As a result, active filters have been widely used for voltage regulation in recent years.
The dynamic voltage restorer (DVR) injected voltage in series with the power system is considered as one of the most effective active filters for the mitigation of voltage disturbances, which is widely used in the industrial sector [6,7]. According to the definitions in IEEE Std. 1346 and IEEE Std. 519, the essential requirement of the voltage compensation device to perform the disturbance detection and voltage regulation shall be within 10 milliseconds to prevent the tripping of protective relays [8,9]. Hence, rapid response and good compensation performance are significant for the design of DVR.
Many advanced techniques have been proposed in the literature for the enhancement of compensation performance. The DVR system proposed in [1] minimizes the voltage compensation error based on the proportional-integral (PI) controller, where the Harris Hawks optimization technique is applied to tune the parameters of the PI controller. In [4], the battery and super magnetic energy storage based DVR is adopted to regulate the voltage fluctuation of the grid connected hybrid photovoltaic-wind power system, where the phase-locked loop (PLL) and traditional PI controller are utilized. The sliding mode observer with optimized PI controller gains is proposed in [6] to improve the compensation response and performance of DVR. The detection method based on root-mean-squared (RMS) value is applied in [7] to perform the voltage regulation for the distorted power grid. To reduce the necessary injection voltage of DVR and concurrently to mitigate the transient distortions at the load side, the optimized control strategy based on PI controller and PLL is proposed in [10,11]. Particle swarm optimization is applied in [12] to tune the parameters of the artificial neural network-based controller for the rapid response of DVR with minimum total harmonic distortion. A generalized compensation method is proposed to perform the phase adjustment in the injected voltage and restore the magnitude of the positive-sequence component of the compensated load voltage [13]. A discrete Fourier transform based algorithm is used to calculate the RMS value of the fundamental component and then perform the voltage compensation [14]. Two nested regulators based on the synchronous reference frame (SRF) are proposed in [15] to provide fast transient response and a zero steady-state error for DVR. From the above-mentioned control strategies, it is found that the compensation response and regulation error are the main considerations for the design of DVR in those researches. However, the fundamental frequency deviation, which would lead to inaccurate compensation, is hardly taken into account.
To achieve rapid compensation response and accuracy of voltage regulation, the recurrent wavelet fuzzy neural network (RWFNN)-based controller for the DVR is developed in this paper. The main features of this research work can be summarized in the following.

•
Based on the positive-sequence voltage analysis, the reference signal for the DVR compensation can be accurately obtained without the interference of power quality disturbances.

•
The applied detection method can resolve the instantaneous variation of fundamental frequency with short time duration, which is suitable for real-time and rapid-response applications of DVR.

•
The RWFNN-based controller can provide robust and stable real-time control performance to enhance the estimation accuracy for the reference compensation voltage.

•
The design parameters for the proposed controller can be easily and flexibly adjusted according to the requirements of standards.
The organization of this paper is as follows. In Section 2, the design of proposed RWFNN-based DVR is introduced, including the DVR architecture, compensation strategy, structure and online learning algorithm of RWFNN controller, and detection of fundamental frequency. Some comprehensive case studies are designed and analyzed with implementation on the OPAL-RT (OP4510, OPAL-RT Technologies Inc., Montreal, Quebec, Canada) real-time simulator to verify the compensation performance of proposed RWFNN-based DVR in Section 3.

Design of RWFNN-Based DVR
To perform voltage regulation through a three-phase power distribution line, the pre-sag compensation strategy is applied for the control of the voltage source converter (VSC) in this paper. The real-time magnitude and phase angle of three-phase voltages before the voltage disturbance would be locked and stored, and then used to compensate the voltage disturbance accurately based on instantaneous reactive power theory and voltage control method [10]. Compared with the in-phase compensation and minimum energy injection compensation, the transient voltage waveform distortion is lower in the pre-sag strategy [13]. In the following, the proposed RWFNN-based compensation strategy of DVR is illustrated.

Overview of DVR
The architecture of proposed RWFNN-based DVR is depicted in Figure 1, where the energy storage system (ESS) provides the compensation voltage through the VSC controlled with sinusoidal pulse width modulation (SPWM), LC filter, and the coupling transformer connected in series with the power grid. The three-phase load voltages (V l,a , V l,b , V l,c ) would be regulated with the referenced compensation components (V r,a , V r,b , V r,c ) obtained by the proposed control strategy. The solution process of the proposed controller can be divided into the positive-sequence component extraction, RWFNN controller, and detection of fundamental frequency. The referenced synchronization phase angle (θ) is estimated through the RWFNN controller and fundamental frequency of grid (ω 0 ). In this way, the compensation components can be accurately and rapidly resolved.

Proposed Compensation Strategy of DVR
In order to deal with the unbalanced voltage compensation, the positive-sequence components (V g,ap , V g,bp , V g,cp ) of grid voltages (V g,a , V g,b , V g,c ) are extracted firstly. Then, the three-phase positive-sequence voltages are converted to the equivalent two-phase quantities in the synchronous reference frame with Equation (1).
Since the direct-axis voltage component (V g,d ) is proportional to its magnitude, it is easy to obtain the required magnitude for voltage regulation by comparison with the positive-sequence reference voltage (V g,d_ref ). To compensate the unbalanced voltage disturbances, the reference quadrature-axis voltage (V g,q_ref ) would be set to be zero. However, the variation of quadrature-axis voltage and fundamental frequency of grid would influence the determination of referenced synchronization phase angle. As a result, the RWFNN with rapid response and detection method of fundamental frequency is introduced in this paper to enhance the estimation accuracy of referenced synchronization phase angle. Then, the referenced compensation components can be calculated with the inverse Park's transformation.

Design of RWFNN Controller
To enhance the estimation of parameter perturbations and perform the real-time compensation of lumped uncertainty in the control system, the RWFNN is adopted in this paper due to robust and stable real-time control performance [16,17]. The structure of proposed RWFNN controller is shown in Figure 2, which includes the input layer (layer 1), membership layer (layer 2), wavelet layer (layer 3), rule layer (layer 4), and output layer (layer 5). The signal propagation and the fundamental function for each layer of the RWFNN controller are illustrated in the following. Layer 1 (Input Layer) In layer 1, the input and output of neuron can be defined as where x 1_i (N) and y 1_i (N) are the input and output of the i th neuron, and N is the iteration index. In this paper, x 1_1 = V g,q_re f − V g,q represents the control error between the reference quadrature-axis voltage and instantaneous quadrature-axis voltage of controller and x 1_2 =x 1_1 is the derivative of x 1_1 . Layer 2 (Membership Layer) In this layer, each neuron represents a membership function, where the Gaussian function is the commonly used one in the literature [16][17][18] and utilized in this paper. Therefore, the jth neuron can be presented as where y 2_j (N) represents output of jth neuron in the membership layer and m 2_j and σ 2_ j are the mean and standard deviations of Gaussian function in the jth term associated with the input layer, respectively. Additionally, x 2_i (N) = y 1_i (N).

Layer 3 (Wavelet Layer)
The wavelet function in this layer can be expressed as where ϕ 3_ik (N) is the kth term of wavelet function output associated with the ith neuron, ψ 3_k (N) is the summation of the kth term of wavelet function output, w 3_ik is the weight of wavelet layer, and σ 3_ik and m 3_ik are the dilation and translation parameters of the wavelet function. Layer 4 (Rule Layer) The first part of this layer is to multiply the outputs of layer 2, y 2_j (N). For the neuron y 4_ jl (N), the output can be expressed as where w 4_jl is the weight between the jth neuron in the membership layer and the lth neuron in the rule layer, which is set to be 1 in this paper. Then, y 4_ jl (N) is multiplied with the outputs of layer 3 ψ 3_k (N) and recurrent layer y 4_l (N − 1) as follows, where w 4_r is the recurrent weight.
In this way, the output of the rule layer can be obtained as Layer 5 (Output Layer) In the output layer, the defuzzification is implemented with y 5_o (N) = f 5_o net 5_o (N) = net 5_o (N) (12) where w 5_lo is the weight between layer 4 and layer 5, and y 5_o (N) is the output of RWFNN.

Online Learning Algorithm of RWFNN Controller
The online backpropagation learning algorithm is based on the supervised gradient descent method to update the connected weights and the network parameters in the RWFNN adaptively. For the quadrature-axis voltage control, the objective function O(N) can be defined as where e(N) represents the tracking error in the learning process of the RWFNN controller for each discrete time N. Then, the learning algorithm is described as follows. Layer 5 (Output Layer) The error term to be propagated is given by The weight w 5_lo (N) between the rule layer and output layer can be updated by the following amount.
where η r is the learning rate. Layer 2 (Membership Layer) The error term in layer 2 to be propagated is given by Equation (20). According to the chain rule, the updating amount for the mean of Gaussian function m 2_ j is shown in Equation (21), where η m is the learning rate of m 2_ j .
The updating amounts for the standard deviation σ 2_ j are listed in Equation (22), where η σ is the learning rate.
The mean of the Gaussian function and standard deviation at the Nth discrete time can be updated with Due to the uncertainties in the control system, it is difficult to obtain the exact Jacobian calculation of ∂V g,q ∂y 5_o (N) . To solve this problem and speed up the online updating of weights, an error adaptation law is proposed in this paper to replace the Jacobian term with whereV g,q_re f (N) andV g,q (N) are the first derivatives of quadrature-axis voltage and instantaneous quadrature-axis voltage of controller, respectively.

Detection of Fundamental Frequency
Due to the power imbalance between the power grid and loads, the fundamental frequency would slowly and slightly deviate from the nominal value. This would lead to the desynchronization for the calculation of referenced compensation voltages. To track the time-varying trajectory of fundamental frequency, the linear prediction method in the time-domain is adopted in this paper. The performance and derivation details of frequency detection have been proven and listed in [19]. For the grid voltage V g , the discrete-time form V g_n of finite length N sampled with the time interval ∆t can be represented as V g_n = a cos(nω 0 ∆t + θ 0 ), n = 0, 1, . . . , N − 1 where a is the amplitude, θ is the initial phase angle, and ω 0 is the angular fundamental frequency. The model in Equation (26) can be expressed in the complex form where A = ae jθ 0 /2 is the complex amplitude, x = e jω 0 ∆t , and * represents the complex conjugate calculation. By observing three successive data samples, Equation (28) is obtained.
According to the relationship of the linear prediction in Equation (29), a parameter ζ can be introduced to maintain the estimation error in an acceptable range of Equation (30), where V g_n is the predicted data sample.
To minimize the estimation error E in Equation (30), the following relationship should hold.
Then, the parameter ζ of linear prediction would be In addition, Equation (33) can be obtained according to the relationship of three successive samples [19].
Therefore, the fundamental frequency ω 0 can be obtained by substituting ζ with Equation (32).

Experimental Results
To verify the performance of proposed RWFNN-based DVR, the experiments with OPAL-RT real-time simulator OP4510 and RT-LAB environment are performed, as displayed in Figure 3. The entire single-line diagram of Figure 1 except the DVR controller is modeled in the host and transferred to the OP4510 with internet. There are two 16-channel digital-to-analog converter modules (OP5330), one 16-channel analog-to-digital converter module (OP5340), and one 32-channel digital signal conditioning module (OP5353) in the OP4510. The RMS [7,14], SRF [1,15], and proposed RWFNN controllers are realized on the digital signal processor Texas Instruments TMS320F28335 for comparison and the observation signals are transferred to the scope. In order to realize the performance of applied RWFNN, two neural network-based controllers with the same control mechanism in Figure 1 are implemented by only replacing RWFNN with back-propagation network (BPN) in [12] and fuzzy neural network (FNN) in [16] are designed and implemented. With the consideration of implementation simplicity and computation burden for digital signal processor, three levels (low, medium, and high) of membership function are set for each input. This would lead to 3 × 3 = 9 rules with complete rule connection [16,17]. According to the structure of RWFNN in Figure 2, nine wavelet functions corresponding to the number of rules are used. Therefore, there are 2, 6, 9, 9, 1 nodes in the input layer, membership layer, wavelet layer, rule layer, and output layer, respectively. Those parameters of the compared controllers are also fine-tuned as accurately as possible. The parameters of the test system are given in Table 1.   Table 2 displays the response time of compared controllers, which is the duration from the starting time of voltage event to the time of voltage compensation reaching stable state. Due to the calculation of RMS voltage, the DVR takes a longer response time to achieve stable compensation in Figure 5. From the compensation result in Figure 6, it is realized that the SRF controller would lead to the compensation error due to the unbalanced faults. Due to the slow convergence in BPN and FNN, the compensation results in Figures 7 and 8 would lead to the time delay. On the other hand, the proposed RWFNN-based DVR can complete the voltage regulation rapidly and accurately, as displayed in Figure 9.

Case 2: Phase Jump and Fundamental Frequency Deviation of Grid Voltage
To realize the performance of DVR controllers, a 30-degree phase jump fault at phase A and 59.7 Hz fundamental frequency deviation are designed during 0-0.5 s in Figure 10 based on the definition of IEEE Std. 1409-2012 [20]. The voltage regulation results with RMS, SRF, BPN, FNN, and proposed RWFNN-based controllers for phase jump and fundamental frequency deviation of grid voltage are displayed in Figures 11-16. From Figure 16, it is shown that the fundamental frequency for RMS and SRF controllers is 60 Hz since the frequency variation is not tracked in these controllers. Even though the same proposed detection method for fundamental frequency is applied in BPN and FNN controllers, the slow convergence of these two controllers would deteriorate the calculation of referenced synchronization phase angle in Figure 1. Therefore, the voltage compensation results would be interfered, as shown in Figures 13 and 14, and Table 3. On the other hand, the fundamental frequency deviation can be accurately and rapidly detected with the proposed RWFNN-based controller. The index of voltage unbalance factor (VUF) listed in Equation (35) from IEC Std. 61000-4-27 would be applied to evaluate the compensation effectiveness of DVR, where V p and V n are the positive and negative sequence components of voltage [21]. According to the calculation of Equation (35), the values of VUF before and after the compensation with the compared controllers are listed in Table 3.        From the compensation result in Figure 11 and VUF of 17.19%, it is realized that the RMS controller could not perform the voltage regulation for the case of phase jump and fundamental frequency deviation in the grid voltage. Even though the SRF controller can mitigate the voltage imbalance, the desynchronized calculation would lead to inaccurate compensation due to the fundamental frequency deviation, as shown in Figure 12. The inaccurate compensation results are also present for BPN and FNN controllers in Figures 13 and 14 due to the slow convergence. According to the voltage regulation result in Figure 15 and VUF of 0.201%, it is found that the proposed RWFNN-based controller can perform well in the case of phase jump and fundamental frequency deviation.

Case 3: Voltage Fluctuation
To examine the compensation performance for the continuous voltage fluctuation, the sensitive load is designed to cause large variation of reactive power during 0.1-0.4 s, where the nominal value of the fundamental frequency is maintained. In this way, an approximately 10-Hz voltage fluctuation is present, as the definition of IEEE Std. 1159-2019 and IEEE Std. 1409-2012 [3,20]. The grid voltage in this case is shown in Figure 17. The voltage regulation results with RMS, SRF, BPN, FNN, and proposed RWFNN-based controllers are displayed in Figures 18-22. The equivalent calculations for the index of short-term flicker severity P st defined in IEC Std. 61000-4-15 before and after the compensation are listed in Table 4 [22]. Due to the one-cycle calculation of RMS value and slow convergence, the RMS, BPN, and FNN controllers would lead to desynchronized compensation. As a result, the voltage compensation for the time-varying voltage fluctuation could not be accurately performed. From the voltage regulation results, it is found that only the SRF and the proposed RWFNN-based controllers meet the compensation requirement (P st < 1).

Conclusions
In this paper, the RWFNN-based DVR is proposed to perform the voltage regulation for the protection of sensitive loads. Based on the theorem of positive-sequence component analysis, the reference compensation voltage can be accurately resolved and be robust towards the interference of power quality. The proposed synchronization mechanism with the RWFNN controller and detection method of fundamental frequency can effectively detect the locations of voltage disturbances and provide rapid regulation response, even for the phase jump case. Compared with the RMS, SRF, BPN, and FNN controllers based on the pre-sag strategy, the proposed controller reveals the better compensation performance for the cases of unbalanced voltage disturbances, phase jump, fundamental frequency deviation, and voltage fluctuations. With the verification of a real-time simulator, the practicality and effectiveness of proposed DVR controller can be proven to be helpful for the protection of sensitive loads and development of microgrid.

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