SciELO - Scientific Electronic Library Online

vol.38 issue3Competencies and Performance of Engineering Professors: Evidence from a Brazilian Public UniversityCalculation of Call Unpairing Probability in GSM Cell Using VAMOS Technics author indexsubject indexarticles search
Home Pagealphabetic serial listing  

Services on Demand



Related links

  • On index processCited by Google
  • Have no similar articlesSimilars in SciELO
  • On index processSimilars in Google


Ingeniería e Investigación

Print version ISSN 0120-5609

Ing. Investig. vol.38 no.3 Bogotá Sep./Dec. 2018 

Artículos originales

Power quality improvement in an AC network using artificial neural network and hysteresis band current controller

Mejora de la calidad de la alimentación en una red de CA usando red neuronal artificial y controlador de corriente de banda de histéresis

Abdul Mutai Sulehri1  , Nadeem Jeelani2  , Ataul Aziz Ikram3 

1 Electrical Engineer, National University of Computer and Emerging Sciences (FAST), Pakistan. E-mail:

2 Electrical Engineer, National University of Computer and Emerging Sciences (FAST), Pakistan. Affiliation: Assistant Professor, National University of Computer and Emerging Sciences (FAST), Pakistan. E-mail:

3 Electrical Engineer, National University of Computer and Emerging Sciences (FAST), Pakistan. Affiliation: Associate Professor, National University of Computer and Emerging Sciences (FAST), Pakistan. E-mail:


This paper demonstrates a study to improve the total harmonic distortion (THD) originated due to excessive use of power electronic (PE) equipment and non-linear loads. Shunt active power filter (SAPF) is used to mitigate the harmonics from the system because it has the capability of minimizing the harmonic problems initiated by non-linear loads. The instantaneous reactive power (IRP) p-q theory is used for the generation of reference signal and for the extraction of compensating components of the current. The proportional integral (PI) controller and artificial neural network (ANN) have been employed in the DC-link controller and for current errors adjustments. In this paper, both conventional hysteresis and adaptive hysteresis band current controller (HBCC) have been used for the generation of gate pulses for the SAPF, which reduces THD in the source current to a value within IEEE specified standards, without any phase error over the extensive range of adaptive HBCC strategy. Simulation results confirm that the SAPF with HBCC and ANN performs the harmonic mitigation efficiently and maintains power factor (PF) close to unity.

Key words: Artificial neural networks; total harmonic distortion; power filters; pulse width modulation; pi control


Este trabajo presenta un estudio para mejorar la distorsión armónica total (THD) originada por el uso excesivo del equipo de potencia electrónica (PE) y cargas no lineales. Se usa un filtro activo de potencia en derivación (SAPF) para mitigar los armónicos del sistema porque este tiene la capacidad de minimizar los problemas de armónicos iniciado por cargas no lineales. La teoría p-q de potencia reactiva instantánea (IRP) se utiliza para la generación de la señal de referencia y la extracción de componentes compensadores de la corriente. La proporcional integral (PI) y el controlador de red neuronal artificial (ANN) se emplearon en el controlador DC-link y para ajustes de errores de corriente. En este artículo, tanto la histéresis convencional como el controlador de corriente de banda de histéresis adaptativa (HBCC) han sido utilizados para la generación de pulsos de compuerta para el SAPF, lo que reduce la THD en la fuente de corriente a un valor dentro de las normas IEEE establecidas, sin ningún tipo de error sobre la amplia gama de la estrategia adaptativa de HBCC. Los resultados de la simulación confirman que el SAPF con HBCC y ANN realiza una eficiente mitigación de armónicos y mantiene un factor de potencia (PF) cercano a la unidad.

Palabras-clave: Redes neuronales artificiales; Distorsión armónica total; Filtros de alimentación; Modulación de ancho de pulso


The excessive use of PE-based devices at the distribution as well as transmission level has seriously resulted in the deterioration of power quality. Low and medium power loads, such as variable speed drives (VSDs), uninterruptible power supplies (UPS), cell phone and computer chargers etc., draw non-sinusoidal and distorted current from the utility (Khadkikar, Chandra, & Singh, 2009). These current harmonics generate unwanted disturbances in the power system and compromise efficiency and stability of the network (Akagi, Watanabe, & Aredes, 2017). The simpler and cheaper technique for the removal of such harmonics is the use of passive filter, though it removes selective harmonics and requires retuning for the mitigation of others (Blanco et al., 2015). The problem is due to the resonance compensation characteristics for the fixed value of capacitance, inductance and their immense size (Ko, Swe, & Zeya, 2011). DSP programmable-gate-array-based systems were also introduced for the purpose (Thirumoorthi et al., 2012). Hybrid filters, the combination of both passive and active filters were also used, but these are too expensive to be implemented for harmonic elimination (Gupta et al., 2011). Thus, to overcome these problems, shunt active power filters (SAPF) were developed.

SAPF behaves as a harmonic current source for mitigation of harmonic currents that are drawn by non-linear PE-based loads. The purpose of the shunt filter is to inject current of the same amplitude, but opposite phase that cancels the harmonic currents oscillating in network (Sadati, Rahmani, & Saif, 2015). SAPF generally provide harmonic compensation, reactive power compensation and unbalance compensation (Carastro et al., 2008).

Recently, advanced techniques such as artificial intelligence (AI) are getting popularity due to its accuracy and effectiveness. Interconnected neurons manifest the response depending upon input stimulus. The input neurons translate the stimulus into decision as the output of network (Gomez et al., 2011). To take a decision, in a segment of iterative training, samples of data are used, and weights are adjusted until the desired results are obtained (Alarcon et al., 2014). Artificial neural network (ANN) uses algorithms, such as recurrent network and Hopfield, for an optimal operation (Greivulis, Levchenkov, & Gorobetz, 2008). Adaptive ANN-based compensation has also been used when weights are adjusted and computed online (Bhattacharya & Chakraborty, 2011). ANN adaptability is more rapid compared to traditional control schemes with high pass filters (HP) and PI controllers (Narayana, Kumar, & Rambabu, 2012). ANN can deploy with different approaches based on neural network intelligence, where minimum lose control technique is applied to permanent magnet synchronous motors (PMSMs) that increase the efficiency of the motor and decrease loses (Erdogan & Ozdemir, 2017).

In this paper, a three-phase SAPF with both PI and ANN controller is presented, employing conventional hysteresis and adaptive HBCC to address the power quality. Reference signals are calculated using IRP p-q theory. ANN is used to facilitate the extraction of compensating currents and its incorporation in the control structure of SAPF makes it more robust and dynamic.

Reference signal calculation

IRP p-q approach has been used for the reference current generation considering a balanced three-wire system. In IRP p-q theory, currents are calculated using the instantaneous powers in time domain. These currents can further be transformed into three-phase space vectors and two coordinates system by Clark transformation (Rajesh et al., 2016). For the balanced three-wire system, we can define the three-phase quantities as xa, x b and xc.

Where χ represent the line current or phase voltage and T is a constant.

In the equation below, u a and u b are the instantaneous voltage, and and the current phase vectors.

Using equation 3, instantaneous currents are defined as follow

Figure 1 presents afore mentioned equations in block diagram.

Source: Authors

Figure 1 Reference current calculation using IRP p-q. 

Calculation of PWM signal

HBCC calculator varies the hysteresis band (HB) according to DC-link voltage (V dc ), slope of the current waveform and supply voltage (Vs). When the injected current tries to leave the limit of HB, an appropriate switch will work to ON and OFF states, so that the current remained in the limit of HB. Thus, HBCC self-adjusts the HB according to designed system. The performance of SAPF is enhanced by sustaining the modulation frequency to constant. HBCC is considered valuable in terms of stability, accuracy and very fast response (Rahman et al., 2017). HB is modulated to control the pattern for switching the inverter at various test points. All the three phases of band exhibit the same profile with the phase difference among them (Kale, & Ozdemir, 2005).

The appropriate working switches states are as follows:

First switch is at 1 (ON) and second switch at 0 (OFF)

First switch is at 0 (OFF) and second switch at 1 (ON)

The hysteresis band of HBCC defines the acceptable current error. Equation 5 shows that HB and switching or modulation frequency (fc) are inversely proportional and can be fixed to a constant value. The other controlling parameters are shown in their respective equation and m is the slope of current waveform.

The adaptive hysteresis calculation block is shown in Figure 2. HBCC controller generates the gating signals (g1) for the inverter, as shown in Figure 3.

Source: Authors

Figure 2 Adaptive hysteresis band calculation block 

Source: Authors

Figure 3 HBCC controller for gating signal. 

Current estimation and loss signal

In this paper, DC voltage (Vdc) is identified and compared with the reference value and error difference known as (ia). It is amplified and added to the output of a filter, which in terms maintains the pure sinusoidal source waveform by adding the loss signal (Capelini et al., 2015). A PI controller is used instead of a PID because it is not possible to know the steady response with derivative function in this controller.

The general equation of working of the PI controller is as follows:

Where Kp and Ki are the constant gains of the PI controller. In this paper, PI controller is replaced with ANN since the values of Kp and Ki are tuned again for the varying loads that makes the system unreliable (Raju, & Reddy, 2014). In addition, the PI controller does not have the capability of improving the transient response of system. In contrast, ANN controller can extract data from noise, takes less development time, is suited for real world applications and has a fast response (Beltran & Romo, 2014).

ANN is divided into three steps, i.e. architecture, training algorithm and its activation function (Kumar et al., 2008). Each neuron is connected with the other and is only activated by activation functions (Balavar, 2012). Multilayer perceptron (MLP) is used for the mitigation of harmonics and the model consists of three inputs, as shown in Figure 4. ANN has the advantage of rapid estimation of Fourier coefficients equivalent to harmonics (Fei, & Wang, 2013). The algorithm used in this paper for simulation is back-propagation (BP) and data is trained by levenberg marquardt (LM). The transfer functions are logsig for layer 1 and tansig for layer 2 or hidden layer. The number of neurons in the first layer is 3 and in the second layer is 18. The output layer depends upon the type of data to be analyzed for optimal/desired results.

Source: Authors

Figure 4 Neural network structure. 

The structure of the neural network used is as follows

Input: X = X1, X2, X3... Xi.

Output: y = y1 y2, y3 . Yn =o/p.

Weights of neurons: W= wi1, wi2,

The complete block diagram implemented for SAPF with ANN/PI controllers and adaptive HBCC with non-linear load is shown in Figure 5.

Source: Authors

Figure 5 Block diagram of the simulated model. 

Conventional hysteresis and adaptive HBCC is used for gate signals. ANN and PI controllers are used to maintain the DC link voltage to constant value. The output of controllers and calculated instantaneous powers are then used in calculation of gate signals by using both the conventional hysteresis and adaptive HBCC.

Control structure of SAPF

The control scheme and structure of the SAPF used in the paper is shown in Figure 6. SAPF compensates the selective harmonic employing the Clark and inverse transformations defined earlier. The scheme is based on the cascade of two different independent controllers. DC-link voltage is employed with PI regulators and ANN to control Vdc to a fixed value. The output of PI controller is loss signal, where i(load,a) and i(load,b) are then used by the conventional hysteresis and adaptive HBCC for the calculation of the PWM signal and thus the generation of the sinusoidal waveform. The current controller consists of two PI regulators and an ANN used separately for reactive current compensation. The outer voltage control uses PI controller to compare the actual DC voltage with the reference signal and generate the output signal (ia) that is fed to the inner current control. PWM generates the gating signal (g1) used to produce the waveform of equal and opposite amplitude thus cancel the harmful harmonics from the system. Current control strategy is used in the reference generation frame.

Source: Authors

Figure 6 Control scheme of APF. 

Simulation results

The power system model considered for this work is shown in Figure 7. A diode bridge supplying a resistive load acts as a non-linear load. The most common examples are the power supplies for computers and mobile phones. Simulations and results were carried out in Matlab with neural network toolbox and Simpower Simulink platform. The results obtained from the proposed techniques are compared and in accordance with IEEE 519 standard limits. Simulations are run for a total time of 0,2s.

Source: Authors

Figure 7 Block diagram of the simulated model. 

Table 1 presents the various parameters of the simulation model. Simulations are run for four different combinations, i.e. PI controller with conventional hysteresis controller; ANN with conventional hysteresis controller; PI controller with adaptive HBCC; and ANN controller with adaptive HBCC. The four combinations are defined in the following subsections.

Table 1 Simulation Parameters 

Source: Authors

A. PI Controller with Conventional Hysteresis Controller

First, simulations are performed without any compensation technique. At time t=0s, the load is connected to the network. Figure 8 shows the source current without load as well as its pure sinusoidal, load current and the distorted source current with nonlinear load. Figure 9 shows that THD without the use of compensation technique is 28,38%.

Source: Authors

Figure 8 (a) Source current. (b) Non-linear load current. (c) Distorted source current. 

Source: Authors

Figure 9 FFT analysis of source current. 

Then, simulations are performed with the combination of the PI controller and conventional hysteresis controller. Figure 10 shows the source current after compensation, DC-link, and the active and reactive component of load current with compensation technique. At time t=0s, load is connected to the network, where the SAPF is connected at time t=0,03s. Figure 10(a) shows that the source current has abridged to the minimum value and became sinusoidal at t=0,03s, because APF recompenses reactive power and harmonics of non-linear load. DC controller provides a very stiff control and voltage remains stationary to a definite value, as shown in Figure 10(b). The compensation current provided by the SAPF is shown in Figure 11. With this combination, THD is reduced to 2,83%, as presented in FFT Analysis in Figure 12.

Source: Authors

Figure 10 (a) Source current. (b) DC-Link. (c) Active and Reactive of non-linear load. 

Source: Authors

Figure 11 Compensated current. 

Source: Authors

Figure 12 FFT analysis of source current. 

B. ANN and Conventional Hysteresis Controller

In the second case, simulations are performed with the combination of ANN and conventional hysteresis controller. Figure 13(a) shows the simulation results obtained with this combination. At time t=0,03s, SAPF is connected to the network and source current becomes sinusoidal because APF precisely injects the current to compensate the harmonics, as shown in Figure 13(b). THD of source current is reduced to 1,78% and is presented in Figure 14.

Source: Authors

Figure 13 (a) Source current. (b) Compensation current -a. 

Source: Authors

Figure 14 FFT analysis of source current. 

C. PI with Adaptive HBCC

In the third case, simulations are performed with the combination of PI controller and adaptive HBCC. At time t=0,03s, the source draws a sinusoidal current, which indicates that the reactive component in the system becomes very low, as shown in Figure 15(b). THD in the source current is reduced from 28,38% to 2,28%, as depicted in Figure 16, which is in accordance with the acceptable range of IEEE 519 standards. However, in this case, THD is relatively high compared to the previous combination, mentioned in the earlier sections.

Source: Authors

Figure 15 (a) Source current (b) Source current phase - a (c) Compensation current. 

Source: Authors

Figure 16 FFT analysis of source current. 

Source: Authors

Figure 17 (a) Active component. (b) Reactive component. (c) DC-Link. 

Source: Authors

Figure 18 (a) Source current. (b) Compensated Current. 

D. ANN with Adaptive HBCC

In the last case, simulations are performed with ANN and adaptive HBCC. ANN provides a very fast estimation of the reference current and is also used for DC-link, voltage regulation and current error adjustment. Active and Reactive waveform of the attached non-linear load is shown in Figure 17(a) and Figure 17(b), respectively. In Figure 18(b), FFT Analysis shows the compensation current injected in the system to mitigate the harmonics. FFT Analysis in Figure 19 shows that the THD in source current with this combination is reduced from 28,38% to 0,48%.

Source: Authors

Figure 19 FFT analysis of source current. 

A comparison of simulation results is presented in Table 2. The best compensation is obtained by the combination of ANN with adaptive HBCC, which makes the source current almost perfectly sinusoidal with THD of 0,48% and power factor of 0,994, as shown below.

Table 2 Simulation Results 

Source: Authors


In this paper, SAPF control structure is modified using various controllers and with the combination of PI, ANN and hysteresis controllers. Reference signals are extracted using the IRP p-q approach. All the mentioned combinations of the controllers result in the reduction of THD down to acceptable standards. Simulation results, however, show that the combination of ANN and adaptive HBCC provides excellent compensation and is close to the perfect harmonic compensation. THD is reduced to a very low value, meaning the complete elimination of reactive power and harmonics drawn by the non-linear load.


Akagi, H., Watanabe, E. H., & Aredes, M. (2017). Instantaneous power theory and applications to power conditioning. Piscataway N.J.: IEEE Press, Wiley-Interscience. [ Links ]

Alarcon-Aquino, V., Ramirez-Cortes, J. M., Gomez-Gil, P., Starostenko, O., & Garcia-Gonzalez, Y. (2014). Network Intrusion Detection Using Self-Recurrent Wavelet Neural Network with Multidimensional Radial Wavelons. Information Technology and Control, 43(4), 347-358. DOI: ]

Balavar, M. (2012). Using Neural Network to Control STATCOM for Improving Transient Stability. Journal of Artificial Intelligence in Electrical Engineering, 1(1), 26-31. [ Links ]

Beltran, G., & Romo, M. (2014). Assessing artificial neural network performance in estimating the layer properties of pavements. Ingeniería e Investigación, 34(2), 11-16. DOI: ]

Bhattacharya, A., & Chakraborty, C. (2011). A shunt active power filter with enhanced performance using ANN-based predictive and adaptive controllers. IEEE transactions on industrial electronics, 58(2), 421-428. DOI: ]

Blanco, A., Meyer, J., Pavas, A., Garzón, C. A., Romero, M., & Schegner, P. (2015). Harmonic distortion in public low-voltage grids Comparison of the situation in Colombia and Germany. Ingeniería e Investigación, 35(Sup1 ), 50-57. DOI: ]

Capelini, R. M., Adami, J., Martinez, M., & Parentoni, M. (2015). Development of a system for detecting and locating damaged insulator strings with signals collected at substations. Ingeniería e Investigación, 35(1), 43-48. DOI: ]

Carastro, F., Sumner, M., & Zanchetta, P. (2008). An enhanced shunt active filter with energy storage for microgrids. Paper presented at the Industry Applications Society Annual Meeting, IAS'08, Edmonton, IEEE. DOI: ]

Erdogan, H., & Ozdemir, M. (2017). Neural network approach on loss minimization control of a PMSM with core resistance estimation. Turkish Journal of Electrical Engineering & Computer Sciences, 25(3), 1643-1656. DOI: ]

Fei, J., & Wang, Z. (2013). Adaptive control of active power filter using RBF neural network. Paper presented at the IEEE International Conference on Mechatronics and Automation (ICMA), Takamatsu, IEEE. DOI: ]

Gomez-Gil, P., Ramirez-Cortes, J. M., Hernandez, V., & Alarcon-Aquino (2011). A neural network scheme for long-term forecasting of chaotic time series. Neural Processing Letters, 33(3), 215- 233. DOI: ]

Greivulis, J., Levchenkov, A., & Gorobetz, M. (2008). Modelling of Artificial Neural Network Controller For Electric Drive with Linear Torque Load Function. Paper presented at the Proceedings of the 7th International Conference Engineering for Rural Development, Jelgava, Latvia University of Agriculture. [ Links ]

Gupta, R., Ghosh, A., & Joshi, A. (2011). Performance comparison of VSC-based shunt and series compensators used for load voltage control in distribution systems. IEEE transactions on power delivery, 26(1), 268-278. DOI: ]

Kale, M., & Ozdemir, E. (2005). An adaptive hysteresis band current controller for shunt active power filter. Electric power systems research, 73(2), 113-119. DOI: ]

Khadkikar, V., Chandra, A., & Singh, B. N. (2009). Generalised single-phase pq theory for active power filtering: simulation and DSP-based experimental investigation. IET Power Electronics, 2(1), 67-78. DOI: ]

Ko, A., Swe, W., & Zeya, A. (2011). Analysis of Harmonic Distortion in Non-linear Loads. International Journal of the Computer, the Internet and Management, 19(SP1), 661-666. [ Links ]

Kumar, V. S., Kavitha, D., Kalaiselvi, K., & Kannan, P. (2008). Harmonic mitigation and power factor improvement using fuzzy logic and neural network controlled active power filter. Journal of Electrical Engineering and Technology, 3(4), 520-527. DOI: ]

Narayana, G. S., Kumar, C. N., & Rambabu, C. (2012). A Comparative Analysis of PI Controller and Fuzzy Logic Controller for Hybrid Active Power Filter Using Dual Instantaneous Power Theory. International Journal of Engineering Research & Development, 4, 29-39. [ Links ]

Rahman, N. F. A., Radzi, M. A. M., Soh, A. C., Mariun, N., & Rahim, N. A. (2017). Significant insights into the operation of DC-link voltage control of a shunt active power filter using different control algorithms: a comparative study. Turkish Journal of Electrical Engineering & Computer Sciences, 25(3), 2033-2043. DOI: ]

Rajesh, T., Aravindhan, S., Sowmiya, M., Thenmozhi, S., & Scholar, U. (2016). Design of Shunt Active Filter for Reduction of Harmonics. International Journal of Engineering Science, (6) 4, 3317-3321. DOI: ]

Raju, T., & Reddy, P. R. (2014). A Novel Control Algorithm for an Adaptive Hysteresis Band Current Controlled Shunt Active Power Filter. International Refereed Journal of Engineering and Science (IRJES), 10-16. [ Links ]

Sadati, N., Rahmani, M., & Saif, M. (2015). Two-level Robust optimal control of large-scale Nonlinear systems. IEEE Systems Journal, 9(1), 242-251. DOI: ]

Thirumoorthi, P., & Yadaiah, N. (2012). Mitigation of harmonic current through hybrid power filter in single phase rectifier. ACEEE International Journal on Electrical and power engineering, 3(1), 62-68. DOI: [ Links ]

How to cite: Sulehri, A.M., Jeelani, N., and Ikram, A., (2018). Power quality improvement in an AC network using artificial neural network and hysteresis band current controller: Ingeniería e Investigación, 38 (3), 42-49. DOI: 10.15446/ing.investig.v38n3.67885

Received: September 21, 2017; Accepted: October 22, 2018

Attribution 4.0 International (CC BY 4.0) Share - Adapt

Creative Commons License This is an open-access article distributed under the terms of the Creative Commons Attribution License