Next Article in Journal
Safety Issues of a Hydrogen Refueling Station and a Prediction for an Overpressure Reduction by a Barrier Using OpenFOAM Software for an SRI Explosion Test in an Open Space
Next Article in Special Issue
Deep Neural Network for Predicting Changing Market Demands in the Energy Sector for a Sustainable Economy
Previous Article in Journal
Energy Consumption in a Smart City
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Application of Deep Learning Gated Recurrent Unit in Hybrid Shunt Active Power Filter for Power Quality Enhancement

1
Department of Electrical Engineering, University of Management and Technology, Lahore 54000, Pakistan
2
Faculty of Engineering, Uni de Moncton, Moncton, NB E1A3E9, Canada
3
Department of Computer Science, College of Computer and Information Sciences, King Saud University, Riyadh 11633, Saudi Arabia
4
Faculty of Engineering and Technology, Future University in Egypt, New Cairo 11835, Egypt
*
Authors to whom correspondence should be addressed.
Energies 2022, 15(20), 7553; https://doi.org/10.3390/en15207553
Submission received: 30 August 2022 / Revised: 5 October 2022 / Accepted: 11 October 2022 / Published: 13 October 2022

Abstract

:
This research work aims at providing power quality improvement for the nonlinear load to improve the system performance indices by eliminating maximum total harmonic distortion (THD) and reducing neutral wire current. The idea is to integrate a shunt hybrid active power filter (SHAPF) with the system using machine learning control techniques. The system proposed has been evaluated under an artificial neural network (ANN), gated recurrent unit, and long short-term memory for the optimization of the SHAPF. The method is based on the detection of harmonic presence in the power system by testing and comparison of traditional pq0 theory and deep learning neural networks. The results obtained through the proposed methodology meet all the suggested international standards of THD. The results also satisfy the current removal from the neutral wire and deal efficiently with minor DC voltage variations occurring in the voltage-regulating current. The proposed algorithms have been evaluated on the performance indices of accuracy and computational complexities, which show effective results in terms of 99% accuracy and computational complexities. deep learning-based findings are compared based on their root-mean-square error (RMSE) and loss function. The proposed system can be applied for domestic and industrial load conditions in a four-wire three-phase power distribution system for harmonic mitigation.

1. Introduction

Advancement in the field of power electronics has significantly improved electrical equipment performance in recent times, but this improvement comes with a price. The nonlinear behavior of loads affects the power quality of the electrical systems. Nonlinear loads do not draw current smoothly. As a result, harmonics are developed in the system. The power quality is majorly degraded because of harmonics in the power systems. The power quality is compromised not only for domestic consumption, but also has a drastic effect on industrial consumption. This compromise on power quality results in heating and damage to the systems and also increases the cost of electricity. The harmonics result in damage to the insulation of the conductors, the heating effect on mechanical parts of the motor, and electromagnetic interference in the communication wire lines. Due to the presence of harmonic distortion, there is an unusual and unexpected behavior of the protection relays of the power system. Both industrial and domestic consumers use devices such as fridges, computers, LED lights, and uninterrupted power supplies. The distributed alternative resources utilized to meet the energy demands also affect the power system in a nonlinear manner. The transformer employed in the distribution network also produces immense harmonics in the state of saturation. It is also heated up due to the presence of a circulation current inside a delta topology. For four-wire systems, high neutral wire currents are another power quality loss. Ideally, zero current should flow through the neutral wire. Triplen harmonics cause a zero sequence in the current that is the main source of high neutral wire current.
Mitigating the effect of harmonics follows the standards given by IEEE-519 and IEC-61000 [1]. The standards are suggestions that help to minimize the effects of voltage and current fluctuations within the allowed range.
Passive power filters (PPF) and active power filters (APF), separately or in combination as hybrid active power filters (HAPF), are used for harmonic mitigation and enhancement of power quality.
Although the PPFs have the benefits of being straightforward, inexpensive, and very reliable, their performance is heavily dependent on the grid and load circumstances. The passive filters also fail in high-voltage systems due to the presence of an unwanted resonance effect. The advantages of the APFs are flexibility, accurate harmonic compensation, and the absence of any resonances. The disadvantage is that they are less reliable because of their active components (power semiconductors), more expensive due to power ratings, and have lower ratings because of semiconductors’ restrictions. A conventional HAPF is connected in parallel to the power system, and the PPF and APF are connected in series with each other. For medium-voltage and high-power applications, a HAPF is suggested. These systems experience a fundamental grid voltage drop across the PPF capacitor, which results in a considerable drop in APF power ratings [2].
A widely used and popular method employed in the industry for harmonic reduction is the use of a passive power filter (PPF) that is tuned to filter a single frequency or a band of frequencies [3]. Parameters of a single-tuned passive power filter are optimized using ant colony mixed integer optimization [4]. The values of the inductor and capacitor are derived for minimum power losses and maximum power factor. A PPF offers the system power factor correction, reactive power compensation, and harmonic mitigation. However, it has poor dynamic performance, a large size, and resonance issues.
Active filters, as opposed to passive filters, also reduce harmonics and the resonance effect [5]. An APF also gives a fast corrective response, even with dynamically changing load conditions. The solution is expensive due to the power requirements of active components of APF, so a hybrid technique is implemented for the exclusion of harmonics from the power system [6]. Combining passive and active power filters enables a decrease in APF rating and increases filtering efficiency. The hybrid technique brings a compromise between the cheap passive filters for low-order harmonics with higher power ratings and active power filters for high-order harmonics. with low power ratings.
Figure 1 represents the proposed system overview for the connections of the shunt hybrid active power filter (SHAPF). The HAPF is connected in shunt with a three-phase four-wire power system with nonlinear loads. The HAPF comprises a series combination of active and passive filter. The filtering efficiency has been improved using multiple control techniques. The controllers are optimized using machine learning techniques, which include the gated recurrent unit (GRU), LSTM, recurrent neural network (RNN), and artificial neural network (ANN).
These algorithms are used to tune the SHAPF for the removal of harmonics. This work suggests
Implementation of SHAPF topology for a four-wire three-phase system for harmonic removal and DC voltage regulation;
The controller implemented for the SHAPF has been optimized using machine learning algorithms such as RNN, ANN, and GRU. Deep learning algorithms outperformed the feedforward neural networks;
The evaluations have been performed on three different nonlinear load scenarios;
There is also a comparative analysis of the ANN-based controller and GRU-based approach for dealing with the time-series data.
The research work has been organized in the following parts. The introduction and literature review of the subject are covered in Section 1. The long short-term memory (LSTM) and gated recurrent unit (GRU) deep neural networks are introduced theoretically in Section 2. A subsection in Section 2 is about the Simulink model and datasets under study and discusses the forecasting methodology. Section 3 of the study discusses the findings. The harmonics due to nonlinear loads have an impact on the robustness and reliability of the devices included in the power system, such as transformers and protection relays [7]. The elimination of the harmonics improves the sinusoidal waveform in transmission, distribution, and the overall power system.
In the existing literature, harmonics mitigation techniques such as passive power filters (PPF) are presented in [4,8,9]; active power filters (APF) are in [5,6,7,10,11,12,13,14,15,16,17,18,19,20,21]; and hybrid active power filters (HAPF) are depicted in [22,23,24,25,26,27,28,29,30]. The research so far conducted on harmonic elimination is illustrated in the architectural overview shown in Figure 2.
The simplest single-tuned PPF (STPPF) topology is widely used for minimizing energy losses and eliminating harmonics from the power system, both at industrial and domestic scales [3]. Reconfiguration of a distribution network for the implementation of various STPPFs results in great improvement in THD removal but increases the system time response and complexity [8].
The improvement of the system can be ensured through the parameter design of the filters. The grasshopper algorithm for the optimization of two STPPFs’ parameters is implemented using the optimization techniques and is expected to produce zero errors [9]. Major constraints in the implementation and usage of PPFs are inflexibility in resizing and resonance, and insufficient accuracy in variable loads.
Due to these facts, active power filters are recommended in the power system since they can detect the harmonics, remove THD, and correct the power factors. They also resolve the issue of resonance that occurs in PPFs. The APF provides low copper losses if they are employed in parallel connection with the system, which is why a shunt active power filter is recommended [5].
Five differently structured shunt APFs are discussed, and their application is compared in two different cases having different zero sequence currents [10]. The research recommends the use of different topologies and control strategies that can help to bring improvement in harmonic removal using a shunt APF (SAPF) and reduce the system complexity. The system configuration that considers the zero-sequence current is more related to practical scenarios. This method is effective and less expensive and can be implemented on the industrial and small laboratory levels.
SAPFs comprise three controlling parts, which include designing the voltage regulator, designing the current controller, and harmonic detection. Numerous control procedures have been deployed and recommended for these three measures. The researchers have used modified control techniques for harmonic detection. The basic techniques are the p-q theory [6] and the d-q theory [11]. P-q theory is the theory representing active and reactive power, while d-q is the synchronous reference frame theory. The literature recommends a PI controller for voltage regulation [6,11,12,13,14,15,16,17,18,19,22,23,24], and hysteresis-based control is recommended for current control [5,6,7,11,12,13,14,15,16,17,18,19,20,22,23].
Reactive power (d-q) theory and Fourier transform are combined for the harmonic current reference generation in [11]. An adaptive fuzzy-neural controller is proposed to enhance the performance of the shunt active power filter. The fuzzy-neural scheme applies a radial bias function (RBF) to approximate the nonlinear behavior of an APF [12]. A sequential neural network to detect individual order harmonics and THD has been applied in large transmission networks [13]. A sequential neural network is applied for the detection of current harmonics [14]. The sequential network has two hidden layers to estimate the unknown function for detection. The output feedback enhances the adaptive nature of the neural structure for the sequential network.
A phase-locked loop (PLL) and low pass filter (LPF) are used as control techniques for SAPFs. SAPFs is implemented for a three-phase power system based on d-q theory and a new PLL system for the extraction of phase [15]. Another method proposed was based on a neural network with instantaneous power (PQ) technique [16]. The behavioral response of the SAPF is estimated when deployed in three phased balanced systems using p-q theory and adaptive linear neural networks. It proposed the use of the Kalman Filter for the removal of current harmonics. The method has computational complexity, and the reference current calculations consume more time due to this computational complexity.
An optimized current controller of an SAPF is presented to determine the optimal value of the reference signal [17]. The Karush–Kuhn–Tucker algorithm is applied and compared with a conventional PI controller. A PLL-based sinusoidal integrator is utilized to tune the integrator for the third-order prefiltering, by which fundamental and quadrature components of current can be achieved [18]. The proposed method implements the strategy adaptively.
There is another parameter that is equally important for the improvement of the SAPF, and that is the reduction in fluctuations occurring in the DC link and the elimination of steady-state errors. These things can be achieved by employing suitable and robust control methods. The author in [19] utilized the fuzzy controller with a neural network in place of the traditional PI controller and employed a sliding mode controller for the approximation of network error. Another method suggested that the DC voltage regulation for APFs can be achieved using the fuzzy controller that has been tuned using particle swarm optimization [20].
An approach to present and simulate an APF in the frequency domain is presented using the developed software [21]. Customized APF models can be created and implemented using the software suggested.
The major drawback of APF is the cost of implementation, and the other is the presence of electromagnetic interference that occurs due to the fast switching of currents inside the filters. As compared to APF and PPF, hybrid active power filters (HAPF) have qualities of both PPFs and APFs. The scenario of a star topology power system having four wires is discussed for harmonic elimination where the HAPF failed in the harmonic elimination using a synchronous reference frame [22]. One method is to use a modified and improved filter using a transformerless APF [23]. The filter with a PI controller and instantaneous power control results in an improved power factor. A harmonic filter is proposed using an LC filter, which is unable to remove the 23rd and 25th harmonic from the system, so the author proposes to add an extra block that can serve to extract these harmonics [24]. The method is expensive for transformer transformation. Based on the studies in the literature, it is inferred that the system involving the Fourier transform takes the most time, and the d-q theory cannot detect the individual harmonic in an affected power system.
Considering all of the drawbacks of the existing methods, this study provides a shunt HAPF that is optimized using a novel deep neural network GRU controller. The system architecture is based on the three-wire power system having a split capacitor in series with the PPF and APF. The shunt construction of the PPF and APF is inserted in the power system. Machine learning control algorithms are suggested to reduce response time by avoiding computational complexities and to avoid the rigidity of design for reference current generation and DC link regulation. Neural network-based optimization of the HAPF is implemented in [25]. Source voltage, load current, and power loss in the APF DC link are treated as input variables for reference current generation. The employed filter is capable of removing the current and switching losses, mitigating harmonics, and eliminating current in the neutral wire as well. Minimization of THD is also efficiently obtained. Artificial neural networks (ANN) and deep learning recurrent neural networks (RNN) are applied and compared. It has been suggested that RNNs perform better under variable load conditions. Using a digital controller hardware-in-the-loop (HIL) simulator, a three-phase voltage source inverter has been modeled to assess the efficacy of the hybrid shunt power filter and the efficacy of control algorithms [26]. Additionally, the reference current generation in the filter uses instantaneous power theory (Pq0) with active + reactive component and instantaneous active and reactive current theory (Id-Iq) management algorithms, which increase the power factor and reduce harmonic distortions for a balanced nonlinear load. Arduino MEGA is used to implement the control algorithms as a cost-effective microcontroller. To evaluate the efficiency of the ANN controller for the HAPF, a hardware-in-the-loop (HIL) setup has been implemented and the network has been trained on the pq0 theory model [27]. The HIL configuration is used to interface the processor with the intended filter. In this design, reference current signals for the HAPF are provided by an external microprocessor (Raspberry PI 3B+) acting as the main data server for the ANN-based algorithm. Based on seven received input three-phase source voltages, three-phase load currents, and the DC-link capacitors voltage of the proposed filter, the ANN model predicts output using backpropagation and gradient descent.
The adaptive control technique for the hybrid active power filter is applied and compared with a PI and fuzzy control technique [28]. It has been demonstrated experimentally that the suggested SAPF with a split capacitor and an efficient control algorithm is suitable for resolving the power quality issues such as reactive power and power distortion in three-phase systems [29]. It suggests applying an indirect current control technique.
The DC capacitor voltage is maintained and the reference current is estimated using a fuzzy controller or proportional-integral (PI) controller [30]. An innovative adaptive fuzzy hysteresis current controller (A-F-HCC) is used to produce the switching pulse for the SAPF’s voltage source inverter. The suggested adaptive-HSAPF is monitored using MATLAB/Simulink and real-time scenarios under steady-state and transient conditions. A fuzzy logic controller is applied for a single-phase half-bridge for PWM generation [31]. The performance is tested in transient and steady-state conditions. Multiple topologies for HAPF have also been tried.
For voltage harmonic compression, a modified derivation controller is created with fixed and unfixed frequencies [32]. This work overcomes the limitation of the previous approaches that only can eliminate harmonics with preknown frequency.
The LSTM and GRU deep learning models outclassed other deep learning algorithms for time-series datasets [33]. It is suggested that dynamic time series for nonlinear relationships in RNN-LSTM and RNN-GRU models should be developed. This work is an extension of work in [25]. In this work, RNN results are improved using LSTM and GRU algorithms. This work used trained datasets as time series and predicted the output using trained data. The models are compared based on RMSE or mean-square error (MSE). For a photovoltaic (PV) array failure diagnostic, a fusion model utilizing a convolutional neural network and the residual-gated recurrent unit is recommended in [34]. The applied control techniques result in converging performance with balanced power supply, but when the sine wave is distorted, different control algorithms result in diverting behaviors [35]. A fuzzy back-to-back structure is used to control an electric spring and active power filter for an islanded microgrid [36]. The study suggested that transfer learning can extend this application to different domains. The load behavior is forecasted using a deep learning model and is deployed in MATLAB/Simulink with the “predict” blocks [37]. This method demonstrated improvement in accuracy and training time. This work takes the RNN application in [25] as a base work to optimize it with GRU. The approach is based on the three-wire power system having a split capacitor in series with the PPF and APF. The PPF and APF are connected in parallel to the power source.
Optimization of forecasting of reference current generation has been carried out using the LSTM and GRU algorithms for better harmonic elimination and DC voltage regulation. This work used trained datasets as time-series sequences and predicted the output using trained data. The models are compared based on minimum RMSE or MSE.

2. Materials and Methods

2.1. System Model

Various geometrical topologies exist for the implementation of passive and active components in an HAPF. The series connection between PPF and APF optimize the capability of PPF by changing the impedance. The proposed system uses this topology to reduce switching losses and lowers the voltage rating of the active power filter. The mathematical representation of SHAPF, which is used to remove the resonance, is shown in [27]. As compared to APF and PPF, the SHAPF does not face any issue of circulating current. Besides, any fault that occurs in either APF or PPF is easily bypassed and rectified. The behavior of SHAPF is just like an open circuit in response to nonlinear loads. This is the motivation for the use of SHAPF in this research work. Figure 3 represents the scheme for shunt harmonic current compensation. A PPF is tuned for the 5th harmonic as the 5th harmonic consume more reactive power. From the Figure, the current relationship is given in (1).
Is = IL + Ic
Source current (Is) is the summation of load (IL) and filter currents (Ic). Nonlinear load is using three single-phase rectifiers that add harmonics to the power system. Harmonic damping is added in SHAPF via a power line to compensate for the harmonic propagation caused by the resonance in PPF. The power circuit in APF comprises MOSFET and a freewheel diode-based inverter which works on the split voltage source principle.
The center point of the DC link capacitor is connected with a neutral wire and is taken as a ground reference denoted by g. The voltage source inverter (VSI) works in the same way as the current controlled source. The controller of SHAPF shown in Figure 3 comprises three main parts, namely (1) voltage regulation unit; (2) reference current computing; (3) pulse generation for inverter switches. The circuit for voltage regulation generates a signal called Ploss based on the error between the reference voltage (Vref) and DC link voltage (Vdc). Vref for the voltage regulator is given in (2) [27].
V r e f   = 2 2 V L L r m S 3 m
Here, m = 1 is called the index of modulation and VL−Lrms is the AC voltage.
The reference current is computed through control architectures. The conventional control schemes are based on active and reactive power (pq0) theory. The last part of the control mechanism is to produce the estimated pulse switching to the APF. This work uses a hysteresis control unit to produce a pulse width modulation (PWM) signal.

Instantaneous Power (PQ) Theory

Equation (3) represents current and voltage transformation to the pq0 frame. The average power is calculated from this transformation and Ploss from voltage regulation. The inverse of the obtained matrix is then calculated to obtain reference currents. Equation (3) gives the matrix for p-q frame calculation [25].
( P Q P o ) = ( 0 V a V β 0 V β V α Vo 0 0 ) ( i a i b i γ )
PI controller applied with this pq0 reference current generation model uses Kp = 25 and Ki = 17. Table 1 contains the power system specifications that have been used to validate the results of the system implemented in Figure 3. System parameters are taken out from real textile industry circuits. RLC parameters with a rectifier circuit are modeled from an industrial load and this model is connected to a 220 V, 10 KVA, 3-phase power supply for this work.
A 3-phase, 4-wire system with nonlinear load is injected with compensation currents for power quality improvement for the source signal considering the harmonics and high neutral wire currents on the source and load side. The compensatory signal is approximated or calculated using an efficient control strategy for the SHAPF. Three load currents, three source voltages, and the adjusted voltage across the DC link capacitor of the active power filter are recorded and sent to the controller for the approximation of the reference signal to be given to the shunt hybrid power filter for the compensation of harmonics.

2.2. Predictive Control Mechanisms Using Recurrent Neural Networks

In traditional approaches and research works, the reference current is computed using the pq0 theory, and voltage is regulated using a PI controller. This paper presents an approach to computing current and regulating voltage using machine learning-based schemes such as RNN and GRU. The problem with the pq0 theory is that it works well only if the voltage is in the ideal limit which is not the case all the time [27]. On the other hand, the PI controller works with a predefined mathematical model, which is computationally complex and may not produce optimum results under load variations [35]. Contemplating the literature review of the previous work on SHAPF, the neural network is the preferred approach since it provides fast and accurate results keeping all the nonlinearities and uncertainties of the system in check. The neural network scheme proposed for this work has been described in the following section.

Artificial Neural Networks (ANN)

ANN is a complex network that is used to establish the relationship of the input with the output. Here, it is being employed for voltage regulation and harmonic compensation. ANN contains several layers, including hidden, input, and output layers. The feedforward path of the network helps to compute the voltage regulation and harmonic detection. Based on supervised learning, previous history, and error computation, it uses a backward propagation path to reevaluate the weighted sum and adjusts the system accordingly to give an improved and accurate response. Figure 4 reflects the ANN architecture of the proposed work for SHAPF. It comprises two hidden layers connecting the input and output layers. The gradient descent optimizer has been employed for computation and optimization in the training process. The model has been trained using Levenberg Marquardt’s function. It helps to compute the weighted sum and bias. The activation function used here is tan sigmoid. Target output Yt is the reference current signal for which the neural network has been trained. The error computed is the difference between actual or predicted Yp and reference or target output and is given as (4) [25].
e = Y p Y t
The input layer has 7 nodes for 7 different inputs, which include three phase voltages, three load currents, and a Ploss signal. The output of the ANN scheme is the three harmonic currents. The hidden layers both have 20 neurons.

2.3. Implementation of Recurrent Neural Network

A recurrent neural network, or RNN, is an efficient algorithm for time-series scenarios. An RNN architecture consists of neural networks with feedback. RNN has the capability of reaching the history value using the present scenario, but there exist gradient issues that vanish and explode [37]. The weight computation and updating in the training process are performed in proportion to the gradient of the error concerning the weight. For the case of vanishing and exploding gradient scenarios, the gradient of error and weight results in a very minimal number, which causes a loss of information. To avoid such a scenario, RNN uses LSTM units to solve the time-series problems.

2.3.1. Long Short-Term Memory (LSTM)

LSTM is capable of holding long-term dependencies for a short duration [37]. The main working ideas of the LSTM are the ability of the delay cells to hold the data and the ability of the information flow gate to permits the information flow to and from the memory units. The structure of the LSTM cell is shown in Figure 5. The proposed SHAPF scheme uses RNN-LSTM for the detection of harmonics and voltage regulations. The LSTM network is designed using MATLAB Deep Network Designer and trained for 200 epochs.
Weights, biases, and activations are different for each branch. Weights, biases, and activations are donated as W, b, and A, respectively, for each branch.
Each cell of LSTM contains N number of hidden units, and the input vector has F features. NxF and NxN are two matrices that define the dimension of weight matrix ‘W’ and recurrent weight matrix ‘A’. Biases ‘b’ are also vectors with dimension N.
Gate 1 is the forget gate layer. This layer is responsible for detecting and removing unwanted data. This is performed using the sigmoid function. The mathematical relationship between gate outputs is given in Equations (5)–(10) [37].
F = (W1 * X + A1 Hp + b1) σg
Here, the current input X and the past value Hp are passed through sigmoid relation. This results in values between 0 and 1 for the forget layer.
Gate 2 is the update gate that updates the memory units. This gate comprises two parts of the neural network i-e input gate I and candidate cell G given by Equations (6) and (7):
I = (W2 * X + A2 * Hp + b2) σg
G = (W3 * X + A3 * Hp + b3) tanh
The output equation is given in (8). The values of Ct and H are given by (9) and (10), respectively. Ct is the new cell state and σg represents sigmoid functions. H is the hidden state. These networks are trained in MATLAB, so the parameter names are stated, as these are used in the software.
O = (W4 X + A4 Hp + b4) σg
Ct = F * Ct−1 + I * G
H = tanh′ * tanh (Ct)
‘*’ is a pointwise or elementwise product operation.

LSTM Network Analysis

An LSTM layer for 3 sequence inputs is applied for a regression output, and the LSTM model comprises 100 hidden units. Table 2 provides the complete details of network layers with activations. To make the system more robust, 100 hidden units have been used, and the system has been trained using the Adam algorithm that gives RMSE and loss functions as the evaluating parameters. The training progress of the LSTM network is evaluated on the basis of RMSE and loss function.

2.3.2. Gated Recurrent Unit (GRU)

The proposed RNN-based GRU is illustrated using the architecture in Figure 6. GRU architecture provides a simpler form of RNN and was introduced by Kyunghyun Cho et al. [38]. The model comprises two gates, i.e., reset gate R and update gate Z. The cell has one candidate state, H.
The reset gate reduces the amount of information that can be forgotten. The update gate, which determines how much information to retain or discard, takes the place of the input and forget gates of the LSTM. Unlike LSTM, a GRU cell does not include the cell state. Previous hidden state Hp is taken as cell state. GRU network takes less training time as compared to LSTM to become trained for the nonlinear relationships of sequential data due to lesser network parameters [37].
The equations of dependencies within the cells are given in Equations (11)–(14) [38].
Weights, biases, and activations are donated as W, b, and A, respectively, for each branch.
R = (W1 X + A1 Hp + b1) σg
Equation (11) represents the reset gate and is equivalent to LSTM forget gate. ‘σg’ represents the sigmoid function.
Z = (W2 X + A2 Hp + b2) σg
The update gate is determined by Z with a sigmoid function. Candidate state (H′) is written as (13).
H′ = (W3′ X + A2 R Hp + b3) tanh
H = (1 − Z) * H′ + Z * Hp
Equation (14) provides us with the value of the hidden state to be parceled to the next cell.

GRU Network Analysis

A GRU layer with 100 hidden units is trained for a regression output. The hidden units make the system more robust. Three sequence inputs are applied to the network. Table 3 provides the complete details of network layers with activations. The system is trained using the Adam algorithm that gives RMSE and loss functions as the evaluating parameters. Figure 7 shows the training progress for the GRU network.
Deep learning recurrent networks are recommended for time-series data with multiple input sequences [39,40].

2.4. Implementation of MATLAB/Simulink Model

The deep network designer of MATLAB is used to train the GRU and LSTM models. The proposed model uses a five-layer network. Table 2 shows the network analysis for the designed LSTM model. The sequence input layer is connected to the LSTM layer through a ReLU layer. ReLU, being an activation function, provides a piecewise output. The LSTM layer is created with 100 hidden units, and 3 sequence inputs are applied to it. A regression output layer is created and linked with the LSTM layer through a fully connected layer. The regression layer is the output function for dependencies in input and output sequences. RMSE and Loss are the training output functions.
Table 3 provides the analysis of five-layered proposed GRU model. The architecture starts with a sequence input layer. The dataset columns are registered as sequence vectors. A 3-sequence vector contributes to the sequence input layer. A sequence layer is created for input sequences. A ReLU layer is created which is a default deep learning networks activation function and provides a piecewise output. A GRU layer with 100 hidden units and 3 sequence inputs is used. The GRU layer is linked to the output layer through a fully connected layer and its output is observed through a regression layer. The regression layer is the output function for dependencies in input and output sequences. RMSE and Loss are the training output functions. The training progress of the network is shown in Figure 7.

Training and Prediction

The system is trained using the Adam algorithms. To make the system more robust, 100 hidden layers are added and trained for 200 iterations.
The source voltage, load current, and Ploss independent variables’ time-series data are used to forecast reference current for the switching of the active power filter. Ploss is estimated using Vref and DC link voltage values. The predictors’ data are divided into two datasets, XTrain and XTest, as training and testing data, respectively. The training data for response are Ytrain and the test data for the dependent variable are Ytest. The correlation of the predictors and response is already established through conventional pq0 theory for reference current generation.
In the Simulink model of the complete system, the trained data are to be applied for the prediction of the reference current of APF. Deep learning networks in SIMULINK have “predict” blocks to forecast the response values. The “predict” block uses a trained network to forecast the output variable of the block.
A comprehensive methodology for switching sequence estimation for APF of SHAPF is given in Figure 8. The controller is deployed with a trained LSTM/GRU network. Voltages and currents of the power system are recorded, and power loss in DC link of APF is estimated simultaneously. The values are directed for pointwise prediction and the predicted values decide the switching sequence for the inverter.

3. Results

All the proposed controllers were used for the system shown in Figure 3 to study the power quality maintenance of the power system. This section contains the various simulation results that were performed using the controllers for the SHAPF. It is worth mentioning that each proposed structure for deep neural networks was trained for multiple datasets with at least 200 epochs. The results of the neural network-based controllers are compared with the conventional PI-pq0 control technique. Table 4 enlists the three cases showing composite load combinations and scenarios that were used to check the characterization of the proposed techniques. The condition applied to check this was the balanced supply. Table 1 contains the specifications of the power system that were used to validate the Table 4 cases. With a balanced supply that is purely sinusoidal and is connected with the nonlinear load directly, the proposed SHAPF intends to filter the harmonic affected source current and voltage.

3.1. THD Reduction Case 1

The system without a filter has distorted three-phase currents and voltages for the RLC, with the rectifier load shown in Table 1. Phases a, b, and c each include 58.7%, 67.4%, and 50.8% THD, respectively. The voltage harmonics in phases a, b, and c are, respectively, 13.05%, 14.45%, and 12.0%. When the system is connected with the traditional pq0-PI controller-based SHAPF, phase a THD is reduced to 3.08% and phase b and c THD is reduced to 5.03%, and 3.79%, respectively. Due to the nonlinear load and its disturbances, the current in the neutral wire is 12A. In conventional pq0 theory compensation, the PI controller employed here tries to maintain the DC link voltage with the required set value in 0.08 s response time with voltage fluctuations of an average of 6 V. Due to the detection of harmonics in the system, the compensation current is also produced by the SHAPF. The SHAPF causes a reduction in this current to 0.9 A. The harmonic mitigation in the system is merely dependent on the control strategy that tends to detect the harmonics in the system and compensator current generation.
Scenario 1 with 100% load was tested using the SHAPF with controllers based on ANN, LSTM, and GRU. With an ANN controller-based SHAPF, THD in phase a was reduced to 4.64%, in phase b to 4.20%, and in phase c to 3.73%. THD was reduced to 2.94% for phase a, 5.01% for phase b, and 2.97% for phase c when the SHAPF was applied with the LSTM controller. Figure 9 represents the current and voltage waveforms for the LSTM-based simulated system. The same THD using the GRU controller dropped to 3.35% for phase a, 3.34% for phase b, and 3.20% for phase c. Voltage harmonic distortion was reduced to 0.24% with LSTM and 0.18% with the GRU controller. Figure 10 represents the voltage and current waveforms for the GRU-based simulated system.
The power factor of the system was also improved using the SHAPF. The SHAPF with the LSTM controller produced the lowest neutral wire current of 0.45A and minimal voltage fluctuation and minimum DC link settling time of 0.4 s with the GRU network in contrast to the LSTM, ANN, and pq0 theory-based PI controller. A detailed comparison is given in Table 5.

3.2. Case 2 and Case 3 Results

In Case 2, the nonlinear load is varied to 50% and 25%, using the same RLC circuit with a single-phase rectifier as a reference, as in Case 1. The level of nonlinearity of the load affects the current peak and degree of distortion in the system. The system without a filter in case 2(a) has 15.27% THD in phase a for a 25% RLC load. Phases b and c had distortions of 17.89% and 17.59%, respectively, when no filter was applied. The THD for phase a was 3.62%, for phase b was 7.22%, and for phase c was 2.35% when the system was implemented with the pq0 theory and PI controller. The neutral wire average current was 12.952 A, and it was identical on both the load and source sides. This current was reduced to 0.179 with a DC voltage fluctuation of an average of 9 V with pq0 theory-based control. Upon changing the load to 50%, the system originally contained a THD of 37.29% for phase a, 38.37% for phase b, and 37.98% for phase c, with a neutral wire current of 22.149. The THD improved to 2.49% in phase a, 3.16% in phase b, and 4.0% in phase c. The neutral wire current reduced to 0.179 A from 22.149 A. For the case of 100% RLC load, Table 5 reflects the reduction in THD as per IEEE standards, and Table 6 reflects the minimization of neutral wire currents and DC link establishment time.
A nonlinear load with a DC motor is applied as a composite load to the system in Case 3 and results in voltage and current harmonics. The voltage is regulated at 0.035 s with the ANN controller. The power factor is corrected to 1 using the ANN, GRU, or LSTM controller. At the source, the power factor is computed after the harmonics are removed.
In the case of 25% RLC load, the stability fails at 0.85 s when the ANN controller is implemented, and it is observed that THD and neural wire currents are less minimized. However, this condition does not rise when the load goes beyond 25%. The overall scenario considering the responses given by the ANN-based approach is not as efficient as the pq0 theory and PI controller. However, the THD in case 2 using the ANN technique is quite according to standard. Table 5 and Table 6 compare the performance of the filter with different control strategies.
For all four given cases of nonlinear load variations, the SHAPF design works effectively for all proposed control strategies. The most effective formation for the SHAPF was found to be a series connection between the PPF and APF with a machine learning-based controller. THD was lowest under the LSTM technique as compared to others, and the neutral wire current, current and voltage fluctuations, voltage THD, and DC link establishment are most effectively performed under GRU. The training progress is shown in Figure 7. It shows the performance indices of the LSTM and GRU deep learning algorithms based on the error and loss function of the neural network training and deploying process. The RMSE of GRU with 100 epochs is less than 0.8 and the loss function is approximately 0. The LSTM training loss is approximately 0.3 and the RMSE is around 1.3 after 100 iterations. Table 5 shows the complete analysis and comparison of all the methods applied. The results mentioned in Table 3 are based on the performance indices such as load current THD, source current THD, and improvement in power factor.

3.3. DC Voltage Regulation and Neutral Wire Current

Table 6 represents the comparison of all the techniques for DC voltage regulation and neutral wire current. Table 8 represents the comparison of the performance of LSTM and GRU. These results illustrate that deep learning algorithms outperform the conventional methods and ANN in terms of computational complexity, application flexibility, and cost of the system as it reduces the fluctuation ranges in peak current, voltage, and DC link voltage.
Figure 11 compiles the result of Figure 9 and Figure 10 in bar graphs. Figure 11a shows the voltage THD level in blue and the source current THD level in brown. The scale on the y-axis is in percentage for THD. It depicts that the voltage and current THDs after applying the suggested control strategies in the SHAPF are within the prescribed limits of THD as per IEEE standards. IEEE 519 standard suggests that voltage THD should be less than 5% and current THD should be within 7% for a power system [1].
Figure 11b gives the DC link regulation time for APF, and Figure 11c represents the value of neutral current in the case of the proposed control algorithms.
Apart from the comparative analysis of the methods mentioned, a complete analysis of the resonance removal for both series and parallel cases was carried out. Table 7 shows the results of the comparison, which reflect the values of the system response with PPF before applying SHAPF and after applying SHAPF. The results shown in Table 7 are based on the consideration of load case 3, given in Table 1 because it has the most complexity.

3.4. Resonance Elimination

The performance indices taken for comparison in Table 7 include the THD of the system’s current, the system’s neutral current, and the displacement power factor. From the table, it is evident that the SHAPF can eliminate the resonance effect both in series and parallel, keeping in view the variations in the source. Table 7 also shows that the THD of the system current increases to 40% in parallel and 51.09% in series when PPF is applied. The reason is that PPF cannot suppress the third harmonic. In contrast, the SHAPF performed well by improving the power factor and reducing the system current THD and neutral current.

3.5. Algorithms Performance Comparison

Table 8 represents the comparative performance of LSTM and GRU recurrent networks. The GRU unit with minimum data loss after training at 200 epochs gives an RMSE of 0.2, which is an indication that the model can predict the values more accurately as compared to the RMSE of LSTM, which is more than 0.5. LSTM and GRU are both trained for 200 iterations and trained networks are used for accurate prediction.

4. Discussion

The purpose of the research work undertaken is to study the power system quality that is compromised due to the presence of harmonics in the system. This improvement is achieved by implementing and comparing the performance of the conventional pq0 theory with a PI controller and RNN for SHAPF control. The RNN-GRU-based controller for SHAPFs proved to be the best among all the techniques applied, and it showed the best capability to reduce the compensation current, DC voltage fluctuations, and improvements in power factor with better accuracy. The proposed system was tested under three different nonlinear load scenarios. The significance shown by the various simulations under different load variations are: (a) proposed methods are applied to reduce the voltage fluctuations and current infusion; (b) the gated recurrent unit proved to be the best by improving the power factor and minimizing the neutral wire current; (c) all the proposed techniques work well in reducing the neutral wire current and improving the power factor as per IEEE standard.
The system considered was a nonsinusoidal power system. The proposed three-phase filter is designed to mitigate the neutral wire current and harmonics. The results are satisfactory as the application of RNN-based deep learning algorithms avoids the computational complexity and adds to the flexibility of controller application. An optimized establishment of the DC link and catering up to 25th harmonics through an APF reduce the cost of the filter. The proposed SHAPF also eliminates the resonance effect both in series and parallel with varying source signals. A minimum RMSE of 0.2 of GRU also implies the accurate prediction of reference current for the SHAPF.
As an enhancement, the same work shall be tested in the textile industry and hardware in-loop configuration. In addition, it is recommended that complex techniques such as multituned PPF can be applied to improve the system response of the SHAPF. A universal power quality conditioner can be provided by a hybrid of two active filters if the price is not a concern for the system solution, as the future of multiple deep learning layers for multiple data sequences are suggested to be applied for time-series data.

5. Conclusions

The paper proposed a SHAPF with unified filtering capability for power quality improvement in a three-phase, four-wire system. The presence of harmonics due to the nonsinusoidal system and high neutral wire currents cause compromised power quality and result in high losses. The idea is to implement efficient control strategies for HAPF connected in parallel to the system for the mitigation of harmonics. Implementing deep learning techniques for the estimation of reference signals for the compensation of nonsinusoidal signals improves the SHAPF’s capabilities. The LSTM and GRU deep learning algorithms were used to optimize the proposed filter. For time-series and sequence-based datasets, GRU is a cutting-edge method in terms of accuracy, predicting performance, and training speed. For the regression output of the system, GRU outperforms other neural network forecasting algorithms with a 0.2% prediction error and minimal data loss. Multiple deep learning layer-based GRU and other deep learning algorithm applications can be a future direction. Moreover, the implementation of these architectures as HIL in industrial systems is recommended for future work.

Author Contributions

Conceptualization, A.A. (Ayesha Ali), A.U.R., A.A. (Ahmad Almogren), E.T.E. and M.K.; methodology, A.A. (Ayesha Ali); software, A.A. (Ayesha Ali) and M.K.; validation, M.K.; formal analysis, A.A. (Ayesha Ali) and A.U.R.; investigation, A.A. (Ahmad Almogren) and E.T.E.; resources, A.A. (Ahmad Almogren) and E.T.E.; data curation, A.U.R. and M.K.; writing—original draft preparation, A.A. (Ayesha Ali), A.U.R., A.A. (Ahmad Almogren), E.T.E. and M.K.; writing—review and editing, A.A. (Ayesha Ali), A.U.R., A.A. (Ahmad Almogren), E.T.E. and M.K.; visualization, A.A. (Ayesha Ali) and M.K.; supervision, M.K.; project administration, A.A. (Ahmad Almogren) and E.T.E.; funding acquisition, E.T.E. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by Future University Researchers Supporting Project Number FUESP-2020/48 at Future University in Egypt, New Cairo 11845, Egypt. Furthermore, this work was supported by King Saud University, Riyadh, Saudi Arabia, through Researchers Supporting Project number RSP-2022/184.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

This research was supported by Future University Researchers Supporting Project Number FUESP-2020/48 at Future University in Egypt, New Cairo 11845, Egypt. Furthermore, this work was supported by King Saud University, Riyadh, Saudi Arabia, through Researchers Supporting Project number RSP-2022/184.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Gunther, E. Harmonic and inter harmonic measurement according to IEEE 519 and IEC 61000-4-7. In Proceedings of the IEEE/PES Transmission and Distribution Conference and Exhibition, Dallas, TX, USA, 21–24 May 2006; pp. 223–225. [Google Scholar]
  2. Karbasforooshan, M.-S.; Monfared, M. Adaptive Self-Tuned Current Controller Design for an LCL-Filtered LC-Tuned Single-Phase Shunt Hybrid Active Power Filter. IEEE Trans. Power Deliv. 2022, 37, 2747–2756. [Google Scholar] [CrossRef]
  3. Jannesar, M.R.; Sedighi, A.; Savaghebi, M.; Anvari-Moghaddam, A.; Guerrero, J.M. Optimal probabilistic planning of passive harmonic filters in distribution networks with high penetration of photovoltaic generation. Int. J. Electr. Power Energy Syst. 2019, 110, 332–348. [Google Scholar] [CrossRef]
  4. Abdul Kahar, N.H.B.; Zobaa, A.F. Application of mixed integer distributed ant colony optimization to the design of undamped single-tuned passive filters based harmonics mitigation. Swarm Evol. Comput. 2019, 44, 187–199. [Google Scholar] [CrossRef] [Green Version]
  5. Yeetum, W.; Kinnares, V. Parallel active power filter based on source current detection for antiparallel resonance with robustness to parameter variations in power systems. IEEE Trans. Ind. Electron. 2019, 66, 876–886. [Google Scholar] [CrossRef]
  6. Omran, M.; Ibrahim, I.; Ahmad, A.; Salem, M.; Almelian, M.; Jusoh, A.; Sutikno, T. Comparisons of PI and ANN controllers for shunt HPF based on STF-PQ algorithm under distorted grid voltage. Int. J. Power Electron. Drive Syst. 2019, 10, 1339–1346. [Google Scholar] [CrossRef]
  7. Abdeslam, D.O.; Wira, P.; Merckle, J.; Flieller, D.; Chapuis, Y.-A. Unified artificial neural network architecture for active power filters. IEEE Trans. Ind. Electron. 2007, 54, 61–76. [Google Scholar] [CrossRef]
  8. Kazemi-Robati, E.; Sepasian, M.S. Passive harmonic Filter planning considering daily load variations and distribution system reconfiguration. Electr. Power Syst. Res. 2019, 166, 125–135. [Google Scholar] [CrossRef]
  9. Elkholy, M.M.; El-Hameed, M.A.; El-Fergany, A.A. Harmonic analysis of hybrid renewable microgrids comprising optimal design of passive filters and uncertainties. Electr. Power Syst. Res. 2018, 163, 491–501. [Google Scholar] [CrossRef]
  10. Fabricio, E.L.L.; Junior, S.C.S.; Jacobina, C.B.; de Rossiter Correa, M.B. Analysis of main topologies of shunt active power filters applied to four-wire systems. IEEE Trans. Power Electron. 2018, 33, 2100–2112. [Google Scholar] [CrossRef]
  11. Santiprapan, P.; Areerak, K.L.; Areerak, K.N. Mathematical model and control strategy on DQ frame for shunt active power filters. Int. J. Electr. Comput. Eng. 2011, 5, 1669–1677. [Google Scholar]
  12. Fei, J.; Wang, T. Adaptive fuzzy-neural-network based on RBFNN control for active power filter. Int. J. Mach. Learn. Cybern. 2019, 10, 1139–1150. [Google Scholar] [CrossRef]
  13. Zhao, Y.; Milanović, J.V. Probabilistic Harmonic Estimation in Uncertain Transmission Networks Using Sequential ANNs. In Proceedings of the 2022 20th International Conference on Harmonics & Quality of Power (ICHQP), Naples, Italy, 29 May–1 June 2022. [Google Scholar] [CrossRef]
  14. Fei, J.; Chu, Y. Double hidden layer output feedback neural adaptive global sliding mode control of active power filter. IEEE Trans. Power Electron. 2020, 35, 3069–3084. [Google Scholar] [CrossRef]
  15. Qasim, M.; Kanjiya, P.; Khadkikar, V. Artificial-neural-network-based phase-locking scheme for active power filters. IEEE Trans. Ind. Electron. 2014, 61, 3857–3866. [Google Scholar] [CrossRef]
  16. Hamiche, L.; Saad, S.; Merabet, L.; Zaamouche, F. Adaline neural network and real-imaginary instantaneous powers method for harmonic identification. Synth. Rev. Sci. Technol. 2018, 36, 129–140. [Google Scholar]
  17. Kołek, K.; Firlit, A. A New Optimal Current Controller for a Three-Phase Shunt Active Power Filter Based on Karush–Kuhn–Tucker Conditions. Energies 2021, 14, 6381. [Google Scholar] [CrossRef]
  18. Chilipi, R.; Al Sayari, N.; Al Hosani, K.; Fasil, M.; Beig, A.R. Third order sinusoidal integrator (TOSSI)-based control algorithm for shunt active power filter under distorted and unbalanced voltage conditions. Int. J. Electr. Power Energy Syst. 2018, 96, 152–162. [Google Scholar] [CrossRef]
  19. Fei, J.; Fang, Y.; Wang, T. Adaptive Fuzzy-Neural-Network Control of Active Power Filter Using Fuzzy Backstepping Approach. In Proceedings of the 2019 First International Symposium on Instrumentation, Control, Artificial Intelligence, and Robotics (ICA-SYMP), Bangkok, Thailand, 16–18 January 2019. [Google Scholar] [CrossRef]
  20. Elgammal, A.A.A.; El-Naggar, M.F. MOPSO-based optimal control of shunt active power filter using a variable structure fuzzy logic sliding mode controller for hybrid (FC-PV-wind-battery) energy utilization scheme. IET Renew. Power Gener. 2017, 11, 1148–1156. [Google Scholar] [CrossRef] [Green Version]
  21. Buła, D.; Grabowski, D.; Lewandowski, M.; Maciążek, M.; Piwowar, A. Software Solution for Modeling, Sizing, and Allocation of Active Power Filters in Distribution Networks. Energies 2021, 14, 133. [Google Scholar] [CrossRef]
  22. Dey, P.; Mekhilef, S. Current harmonics compensation three-phase has four-wire shunt hybrid active power filter based modified D–Q theory. IET Power Electron. 2015, 8, 2265–2280. [Google Scholar] [CrossRef] [Green Version]
  23. Rashmi, M.N.; Meenakshi, A.; Namratha, M.; Nayana, S.V.; Archana, K. Power quality improvement using hybrid filters. In Proceedings of the 3rd IEEE International Conference on Recent Trends in Electronics, Information & Communication Technology (RTEICT), Bangalore, India, 18–19 May 2018; pp. 804–808. [Google Scholar]
  24. Durna, E. Adaptive fuzzy hysteresis band current control for reducing switching losses of hybrid active power filter. IET Power Electron. 2018, 11, 937–944. [Google Scholar] [CrossRef]
  25. Iqbal, M.; Jawad, M.; Jaffery, M.H.; Akhtar, S.; Rafiq, M.N.; Qureshi, M.B.; Ansari, A.R.; Nawaz, R. Neural Networks Based Shunt Hybrid Active Power Filter for Harmonic Elimination. IEEE Access 2021, 9, 69913–69925. [Google Scholar] [CrossRef]
  26. Khan, A.; Jaffery, M.; Javed, Y.; Arshad, J.; Rehman, A.; Khan, R.; Bajaj, M.; Kaabar, M. Hardware-in-the-Loop Implementation and Performance Evaluation of Three-Phase Hybrid Shunt Active Power Filter for Power Quality Improvement. Math. Probl. Eng. 2021, 2021, 8032793. [Google Scholar] [CrossRef]
  27. Rizwan, R.; Arshad, J.; Almogren, A.; Jaffery, M.H.; Yousaf, A.; Khan, A.; Ur Rehman, A.; Shafiq, M. Implementation of ANN-Based Embedded Hybrid Power Filter Using HIL-Topology with Real-Time Data Visualization through Node-RED. Energies 2021, 14, 7127. [Google Scholar] [CrossRef]
  28. Daou, N.; Montoya, F.G.; Ababssi, N.; Djeghader, Y. A Hybrid Active Filter Using the Backstepping Controller for Harmonic Current Compensation. Symmetry 2019, 11, 1161. [Google Scholar] [CrossRef] [Green Version]
  29. Popescu, M.; Bitoleanu, A.; Linca, M.; Suru, C.V. Improving Power Quality by a Four-Wire Shunt Active Power Filter: A Case Study. Energies 2021, 14, 1951. [Google Scholar] [CrossRef]
  30. Mishra, A.K.; Ray, P.K.; Mallick, R.K.; Mohanty, A.; Das, S.R. Adaptive fuzzy controlled hybrid shunt active power filter for power quality enhancement. Neural Comput. Appl. 2021, 33, 1435–1452. [Google Scholar] [CrossRef]
  31. Kumar, M.; Uqaili, M.A.; Memon, Z.A.; Das, B. Experimental Harmonics Analysis of UPS (Uninterrupted Power Supply) System and Mitigation Using Single-Phase Half-Bridge HAPF (Hybrid Active Power Filter) Based on Novel Fuzzy Logic Current Controller (FLCC) for Reference Current Extraction (RCE). Adv. Fuzzy Syst. 2022, 2022, 5466268. [Google Scholar] [CrossRef]
  32. Liao, K.; Pang, B.; Yang, J.; He, Z. Compensation Strategy of Wideband Voltage Harmonics for Doubly-Fed Induction Generator. IEEE Trans. Energy Convers. 2022. [Google Scholar] [CrossRef]
  33. ArunKumar, K.E.; Kalaga, D.V.; Kumar, C.M.S.; Kawaji, M.; Brenza, T.M. Comparative analysis of Gated Recurrent Units (GRU), long Short-Term memory (LSTM) cells, autoregressive Integrated moving average (ARIMA), seasonal autoregressive Integrated moving average (SARIMA) for forecasting COVID-19 trends. Alex. Eng. J. 2022, 61, 7585–7603. [Google Scholar] [CrossRef]
  34. Gao, W.; Wai, R.-J. A Novel Fault Identification Method for Photovoltaic Array via Convolutional Neural Network and Residual Gated Recurrent Unit. IEEE Access 2020, 8, 159493–159510. [Google Scholar] [CrossRef]
  35. Mikkili, S.; Panda, A.K. Instantaneous active and reactive power and current strategies for current harmonics cancellation in 3-ph 4wire SHAF with both PI and fuzzy controllers. Energy Power Eng. 2011, 3, 285–298. [Google Scholar] [CrossRef] [Green Version]
  36. Sadeghi, H.; Mohammadi, H.R. An improved fuzzy controlled back-to-back electric spring using hybrid structure of ES-1 and shunt-APF to improve power quality in microgrids. Int. J. Ind. Electron. Control. Optim. 2022, 5, 89–98. [Google Scholar]
  37. Hamad, Z.; Abdulrahman, I. Deep learning-based load forecasting considering data reshaping using MATLAB\Simulink. Int. J. Energy Environ. Eng. 2022, 13, 853–869. [Google Scholar] [CrossRef]
  38. Chung, J.; Gulcehre, C.; Cho, K.H.; Bengio, Y. Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling. arXiv 2014, arXiv:1412.3555. [Google Scholar]
  39. Yunus, R.; Arif, O.; Afzal, H.; Amjad, M.F.; Abbas, H.; Bokhari, H.N.; Haider, S.T.; Zafar, N.; Nawaz, R. A framework to estimate the nutritional value of food real-time time using deep learning techniques. IEEE Access 2019, 7, 2643–2652. [Google Scholar] [CrossRef]
  40. Hassan, S.-U.; Imran, M.; Iqbal, S.; Aljohani, N.R.; Nawaz, R. Deep context of citations using machine-learning models in scholarly full-text articles. Scientometrics 2018, 117, 1645–1662. [Google Scholar] [CrossRef]
Figure 1. Proposed system overview.
Figure 1. Proposed system overview.
Energies 15 07553 g001
Figure 2. Literature overview of harmonic power filters [4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30].
Figure 2. Literature overview of harmonic power filters [4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30].
Energies 15 07553 g002
Figure 3. Hybrid filter scheme for nonlinear load.
Figure 3. Hybrid filter scheme for nonlinear load.
Energies 15 07553 g003
Figure 4. Architecture of artificial neural network.
Figure 4. Architecture of artificial neural network.
Energies 15 07553 g004
Figure 5. Internal architecture of LSTM cell.
Figure 5. Internal architecture of LSTM cell.
Energies 15 07553 g005
Figure 6. Internal architecture of GRU cell.
Figure 6. Internal architecture of GRU cell.
Energies 15 07553 g006
Figure 7. (a) RMSE and Loss graphs for LSTM training; (b) RMSE and Loss graphs for GRU training.
Figure 7. (a) RMSE and Loss graphs for LSTM training; (b) RMSE and Loss graphs for GRU training.
Energies 15 07553 g007
Figure 8. Methodology flowchart for control block for HAPF.
Figure 8. Methodology flowchart for control block for HAPF.
Energies 15 07553 g008
Figure 9. Case 1 LSTM-based system signals. (a) Source current (A); (b) source voltage (V); (c) DC voltage (V); (d) neutral wire current (A).
Figure 9. Case 1 LSTM-based system signals. (a) Source current (A); (b) source voltage (V); (c) DC voltage (V); (d) neutral wire current (A).
Energies 15 07553 g009
Figure 10. Case 1 GRU-based system signals. (a) Source current; (b) source voltage; (c) DC voltage; (d) neutral wire current.
Figure 10. Case 1 GRU-based system signals. (a) Source current; (b) source voltage; (c) DC voltage; (d) neutral wire current.
Energies 15 07553 g010
Figure 11. Case 1 (a) voltage and source current THD (%); (b) DC link establishment time (s); (c) neutral wire current (A).
Figure 11. Case 1 (a) voltage and source current THD (%); (b) DC link establishment time (s); (c) neutral wire current (A).
Energies 15 07553 g011
Table 1. Power system specifications for the research.
Table 1. Power system specifications for the research.
System ParametersPhysical Values
Ⴔ-voltage (RMS)220 V
Frequency50 Hz
Composite Load3-single-phase rectifier
R = 43.2 Ω L = 34.5 mH C = 292 µF
(720 VAR)
Power Rating10 kVA
Passive Filter (5th Harmonic Tuned)Rf = 1 mΩ Lf = 3 mH
DC Link for VSIC = 470 µF Vref = 622 V
Table 2. Network analysis for proposed LSTM model.
Table 2. Network analysis for proposed LSTM model.
NameTypeActivationsLearnables
1Sequence input
Sequence input with 3 dimensions
Sequence input3-
2ReLU
ReLU
ReLU3
3LSTM
LSTM with 100 hidden units
LSTM100Inputweights 400 × 3
Recurrent weights
Bias 400 × 1
4FC
1 fully connected layer
Fully connected1Weights 1 × 100
Bias 1 × 1
5Regression output
Mean-squared error
Regression output1-
Table 3. Network analysis for proposed GRU model.
Table 3. Network analysis for proposed GRU model.
NameTypeActivationsLearnables
1Sequence input
Sequence input with 3 dimensions
Sequence input3-
2ReLU
ReLU
ReLU3
3GRU
GRU with 100 hidden units
GRU100Inputweights 300 × 3
Recurrent weights
Bias 300 × 1
4FC
1 fully connected layer
Fully connected1Weights 1 × 100
Bias 1 × 1
5Regression output
Mean-squared error
Regression output1-
Table 4. Nonlinear load scenarios.
Table 4. Nonlinear load scenarios.
Test Case
Case 1Fixed RLC with 3-phase rectifier
Case 2Variable RLC with 3-phase rectifier
Case 3Fixed RLC with DC motor
Table 5. Comparative analysis of the total harmonic distortion (THD).
Table 5. Comparative analysis of the total harmonic distortion (THD).
Test CaseTechniqueVoltage THD
(%)
Source Current THD (%)Load Current THD (%)Power Factor
Phase (a)Phase (b)Phase (c)Phase (a)Phase (b)Phase (c)Phase (a)Phase (b)Phase (c)Phase (a)Phase (b)Phase (c)
Case 1Without
Filter
13.0514.2512.0158.0767.450.858.0767.450.80.830.780.80
Pq0 +PI0.791.020.873.085.033.7958.0767.450.8111
ANN0.640.960.564.644.203.7358.0767.450.80.9980.990.99
LSTM0.240.260.192.945.012.9458.0767.450.8111
GRU0.180.170.183.353.343.2058.0767.450.8111
Case 2(a)No Filter9.7910.258.8715.2717.8917.5915.2717.8917.590.960.990.99
Pq0 +PI0.240.240.243.627.222.3515.2717.8917.59111
ANN0.740.900.536.295.8812.9815.2717.8917.590.990.991
LSTM0.210.290.111.92.12.7715.2717.8917.59111
GRU0.090.110.112.492.022.2715.2717.8917.59111
Case 2(b)No Filter13.0514.212.037.8938.7037.2937.8938.7037.290.960.910.91
Pq0 +PI0.340.440.542.493.164.037.8938.7037.29111
ANN0.640.960.563.253.163.3037.8938.7037.290.960.930.98
LSTM
GRU
0.240.290.192.052.001.9037.8938.7037.29111
0.180.170.182.492.022.0537.8938.7037.29111
Case 3No Filter13.114.312.357.1461.1748.1257.1461.1748.120.820.780.80
Pq0 +PI0.791.020.873.174.023.2557.1461.1748.12111
ANN0.640.960.563.354.693.7357.1461.1748.12111
LSTM0.240.260.192.703.353.0157.1461.1748.12111
GRU0.180.180.182.662.942.0557.1461.1748.12111
Table 6. Algorithms’ performance for neutral wire current and DC voltage regulation.
Table 6. Algorithms’ performance for neutral wire current and DC voltage regulation.
Test CaseTechniqueNeutral Wire Current
(A)
DC Voltage Regulation Time(s)DC Voltage Fluctuation
(V)
Case 1Without
Filter
12
Pq0 +PI0.900.86
ANN0.650.351.79
LSTM0.450.61.62
GRU0.450.401.5
Case 2(a)Without
Filter
12.59
Pq0 +PI0.1790.858.133
ANN1.720.559.544
LSTM0.1700.456.133
GRU0.1720.405.409
Case 2(b)Without
Filter
22.19
Pq0 +PI0.1790.76.124
ANN2.220.858.476
LSTM0.1720.64.912
GRU0.1020.403.188
Case 3Without
Filter
9.785
Pq0 +PI0.5150.83.623
ANN0.4340.351.709
LSTM0.4140.62.877
GRU0.3540.402.056
Table 7. Comparative analysis before and after applying SHAPF and PPF.
Table 7. Comparative analysis before and after applying SHAPF and PPF.
Before CompensationAfter Compensation
CapabilitiesTopologyTHDIS(%)Isn(A)DPFTHDIS(%)Isn(A)DPF
Parallel Resonance PreventionPPF35.77120.7840.0011.490.97
SHAPF35.77120.783.170.5190.99
Series Resonance PreventionPPF35.77120.7851.0913.10.98
SHAPF35.77120.784.380.611
Table 8. Comparative analysis of RNN algorithms.
Table 8. Comparative analysis of RNN algorithms.
RNN AlgorithmTrainingPredictionLossRMSE
Long Short-Term Memory(LSTM)YesYes0.30.6
Gated Recurrent Unit(GRU)YesYes0.00.2
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ali, A.; Rehman, A.U.; Almogren, A.; Eldin, E.T.; Kaleem, M. Application of Deep Learning Gated Recurrent Unit in Hybrid Shunt Active Power Filter for Power Quality Enhancement. Energies 2022, 15, 7553. https://doi.org/10.3390/en15207553

AMA Style

Ali A, Rehman AU, Almogren A, Eldin ET, Kaleem M. Application of Deep Learning Gated Recurrent Unit in Hybrid Shunt Active Power Filter for Power Quality Enhancement. Energies. 2022; 15(20):7553. https://doi.org/10.3390/en15207553

Chicago/Turabian Style

Ali, Ayesha, Ateeq Ur Rehman, Ahmad Almogren, Elsayed Tag Eldin, and Muhammad Kaleem. 2022. "Application of Deep Learning Gated Recurrent Unit in Hybrid Shunt Active Power Filter for Power Quality Enhancement" Energies 15, no. 20: 7553. https://doi.org/10.3390/en15207553

APA Style

Ali, A., Rehman, A. U., Almogren, A., Eldin, E. T., & Kaleem, M. (2022). Application of Deep Learning Gated Recurrent Unit in Hybrid Shunt Active Power Filter for Power Quality Enhancement. Energies, 15(20), 7553. https://doi.org/10.3390/en15207553

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop