# Adaptive Neural Network for a Stabilizing Shunt Active Power Filter in Distorted Weak Grids
###### Abstract  
Harmonics destructively impact the performance and stability of power systems. This paper proposes the development of a stable shunt active power filter (SAPF) for harmonics mitigation. The proper and stable operation of the SAPF control system requires the determination of the current reference, phase angle synchronization, and DC-link voltage regulation. This paper uses an artificial neural network (ANN) and one of its sub-methods, the adaptive linear neuron (ADALINE), to determine the current reference. However, determining the current reference requires providing a stable phase angle, which is a fundamental challenge in distorted grids because harmonics created in the grid cause phase angle synchronization problems, due to malfunction of the conventional phase-locked loop (PLL). These things considered, the weak grid connection imposes an instability issue due to the poor performance of the conventional PLL when the grid impedance is high. In this paper, a robust synchronous filter (RSF) is adopted, which separates the harmonic from the main component to provide harmonics-free signals for the PLL. Using RSF, a robust synchronizer quasi-static filter (RSQSF) PLL model is designed, which is effective in dealing with harmonics in weak-grid conditions. MATLAB Simulink was used to check the validation and effectiveness of the proposed control structure. The results show a reduction in harmonics generated in the grid by 86.7% for nonlinear load with a balanced source, 84% for nonlinear load with an unbalanced source under grid impedance, and 80.46% for the nonlinear load with an unbalanced source under weak-grid conditions. artificial neural network; adaptive linear neural network; DC link voltage; phase-locked loop; shunt active power filter; synchronization Article  
Adaptive Neural Network for a Stabilizing Shunt Active Power Filter in Distorted Weak Grids  
[PERSON], [PERSON], [PERSON], M.  
[PERSON]) [5], and Fourier transform [6]. The artificial neural network (ANN) is a promising technique to extract harmonics and obtain the current reference for SAPFs. ANN is becoming an attractive estimation and regression technique in many control applications due to its parallel computing nature and high learning capability [7]. There are several methods of the neural network to identify the harmonic and fundamental parts of nonlinear currents, such as an adaptive neuro-fuzzy interference system (ANFIS) [8], adaptive linear neuron (ADALINE) [9], the recurrent neural network (RNN) [10], and the radial-basis-function neural network (RBFNN) [11]. Among these methods, ADALINE is an early single-layer ANN and the most commonly used ANN technique to identify fundamental or harmonic components present in nonlinear currents and voltages. The ADALINE network makes the extraction of harmonics faster, increases the speed of convergence and adaptability, and is very flexible against nonlinear load changes. In the ADALINE network, the weights are updated using the Least Mean Square (LMS) method [12]. The use of the LMS algorithm in the control circuit, in addition to improving the filter performance when injecting sinusoidal current, also reduces the total harmonic distortion, which ensures the improvement of the power quality and the correction of the power factor. (2) Synchronization: The active filter needs a synchronization unit, commonly the phase-locked loop (PLL), because matching the phase angle of the generated current reference signal with the phase angle of the operating grid is the main issue. Yet, the use of PLL, in addition to its advantage in frequency detection, comes with disadvantages, such as: permeability to grid disturbances due to noise, nonlinear loads, unbalance, harmonics, and weak-grid (with high inductive impedance) connection [13]. In recent studies, pre-filtering and/or in-loop filtering have been used to improve distorted waveforms, which affect the dynamic stability of the PLL and limit its stability margin [14]. In [15], PLL and a zero-crossing detector (ZCD) were used to synchronize.