Review of Fundamental Active Current Extraction Techniques for SAPF

The field of advanced digital signal processing methods is one of the fastest developing scientific and technical disciplines, and is important in the field of Shunt Active Power Filter control methods. Shunt active power filters are highly desirable to minimize losses due to the increase in the number of nonlinear loads (deformed power). Currently, there is rapid development in new adaptive, non-adaptive, and especially hybrid methods of digital signal processing. Nowadays, modern methods of digital signal processing maintain a key role in research and industrial applications. Many of the best practices that have been used to control shunt active power in industrial practice for decades are now being surpassed in favor of new progressive approaches. This systematic research review classifies the importance of using advanced signal processing methods in the field of shunt active power filter control methods and summarizes the extant harmonic extraction methods, from the conventional approach to new progressive methods using genetic algorithms, artificial intelligence, and machine learning. Synchronization techniques are described and compared as well.


Introduction
The development of semiconductor technology has led to the massive expansion of electronics. These electronic devices are directly connected to the electrical grid, where they can cause problems because of their nonlinear load characteristic. This nonlinearity causes harmonic distortion of voltage or current, which leads primarily to economic losses and secondarily to excessive electrical network overloads [1,2].
These problems with higher harmonic components can be solved in two ways, via passive or active filtration. Passive filtration methods can be a suitable choice for isolating transformer connections (e.g., Delta-Star with lead out neutral conductor (Dyn) connection suppresses the third harmonic [3,4]), as can connecting a resonant filter [5,6]. Passive filters have been widely used due to their low cost and significant efficiency in suppressing harmonics. Unfortunately, these filters have multiple disadvantages. For example, if the load is a controlled rectifier, it is necessary to compensate only the significant odd harmonic components (third and fifth). In this case, the filter is optimized. However, if the load dynamically changes its harmonic spectrum, the filter becomes inefficient. Another disadvantage is that filtering characteristics are significantly influenced by the impedance of the electrical network. With an unsuitable design, it is possible to cause a serial or parallel resonance on the distribution network side. Another negative aspect of passive filtration is that due to high-power flows it is necessary to design the components appropriately. This is reflected in their size, as such filters take up a lot of physical space in substations. The task of the Harmonic Extraction Algorithm (often called the Reference Current Generation Algorithm in the literature) is to generate a reference current that corresponds to the distortion contained in a harmonically polluted distribution network. It separates the fundamental i(n) and higher ∑ i h (n) harmonic components contained in the current taken by the load i L (n). The desired reference current i re f (n) is then equal to the negation of higher harmonic components; thus, the label is consequently changed to i inj (n). The sum of i re f (n) and i L (n) is used for compensation, and only the fundamental component i(n) remains in the source current signal. The procedure described above can be seen in the following Equations (1)-(3): i L (n) = i(n) + ∑ i h (n) (1) i inj (n) = − ∑ i h (n) (2) i re f (n) = i(n) − i L (n).
The main requirements of filter methods are accuracy and speed of current generation, where the generated reference current must be generated as accurately as possible within the shortest possible period. Other requirements are the speed of convergence, stability, minimal mean square error rate, and number of floating point operations in one iteration. Algorithms can be divided into three basic groups: time domain control [13][14][15][16][18][19][20]22], frequency domain control [21,51], and adaptive methods [23][24][25]. These methods are described in greater detail in Section 2.
Another important element of SAPF control is the synchronization algorithm, which has the task of supplying information about the current phase θ(t) of the source voltage in order for the reference compensation current to be generated correctly in phase. As mentioned earlier, compensation is performed using the sum of two current signals. In order for the sum to be correct, the current signals must be in exactly the same phase. As seen above, obtaining information on the current phase and accuracy demands very low latency. Most methods are based on Phase-Locked Loop (PLL) synchronizers, although unconventional methods can be encountered; see Section 3 on synchronization methods.
Other algorithms required for SAPF address DC-link Capacitor Voltage Regulation and Current Control. DC-link voltage control algorithms are necessary for the inverter to function properly; when the DC-link voltage is low, the inverter is unable to generate an injection current to compensate for higher harmonics. On the contrary, a higher value can cause the inverter to switch to pulse rectifier mode, which leads to an increase in DC-link voltage. This voltage increase can damage the capacitor or other electronic components of the inverter. Current control algorithms are used to generate an injection current that combines the requirements of a DC-link and a reference current at the same time. These methods can be divided into two basic groups, Direct Current Control (DCC) and Indirect Current Control (ICC), according to chosen type of feedback current. The control of power inverters is mainly realized using Pulse-Width Modulation (PWM), a comparative method, or polar Space Vector PWM (SVPWM). As these algorithms are de facto related to the hardware of the inverter instead of to computing software, they are not covered in this article. Relevant information about these methods can be found in [52][53][54][55][56][57].
In this publication, we introduce and discuss methods used at various stages of SAPF control for compensation of undesirable harmonic components. The following two sections deal with the individual SAPF control blocks, and every section presents the methods that are used for each. The sections pertaining to each method contain a brief description necessary to understand its principle along with several publications in which the method has been described, simulated, or implemented in real experiments. Every sections ends with a summary table where different methods are compared.
Here, it is important to mention that the comparison of individual methods is rather subjective, as the methods are necessarily implemented under varying conditions. Performing this "objective" comparison under identical conditions and quantifying "quality" (i.e., the dynamic response of different methods, their Total Harmonic Distortion (THD), and the ability to work under non-ideal conditions) of various methods is the future intention of the authors. The comparisons in this review are therefore intended to present the mentioned methods to the reader, and the tables are intended to provide a basic awareness of the advantages and disadvantages of various methods.
This publication ends with a thorough discussion of SAPF development and concludes with a brief summary of all the results herein.

Harmonic Extraction Algorithms
Basic control algorithms were originally designed for ideal voltage sources in which balanced and sinusoidal voltages can be assumed. However, this assumption is not met in real conditions; therefore, these methods have been either modified or newly developed to be able to work properly even under unbalanced and non-sinusoidal voltages. At present, harmonic extraction methods can be divided into three basic groups: control in the time domain [13][14][15][16][18][19][20]22], control in the frequency domain [21,51], and adaptive filtering [23][24][25]. This section describes methods from all three groups; in Table 1, a summary of the properties of these methods is provided.

Instantaneous Reactive Power Theory
This method (abbreviated as iPQ) works with instantaneous values in a three-phase system. This method is based on the Clark transform for converting a three-phase system abc into stationary αβ coordinates. In total, it is necessary to have three voltage sensors and three current sensors. Instantaneous active power p(t) and reactive power q(t) are calculated as follows: Necessary to measure three voltages and currents. The power factor does not take the value of 1.

SRF x 2
It is not necessary to measure voltage. This method is simple to implement and often used.
Cannot be used for single-phase system.
Works effectively in both balanced and unbalanced systems. Eliminates neutral current in all cases.
Significantly slower than iPQ. It is necessary to measure three voltages and currents.

CCT x 2
Method does not require any transformation, and all calculations are performed in a-b-c coordinate system.
Necessary to measure three voltages and currents. Method assumes that the system and observation models are linear, which does not correspond to real systems.

EKF
x 3 Easy to implement and computationally undemanding. Can be used in nonlinear systems.
Filter parameters dependent on measured input data. The results of filtration are independent of external conditions and the method manages to filter even dynamically changing types of distortion.
High computational complexity. Sensitive to bad settings. Strongly heuristic.

ANFIS
x 5 The results of filtration are independent of external conditions and the method manages to filter even dynamically changing types of distortion.
High computational complexity. Sensitive to bad settings. Strongly heuristic.

LMS
x 3 Easy to implement.
Necessary to choose correct settings of the adaptive filter. Time of convergence is longer than RLS.

RLS x 4
Easier setup of the adaptive algorithm than LMS. Time of convergence is shorter than LMS.
More complex implementation than LMS.
Notch LMS x x 4 The filter is used only as second order, so the delay is one sample. Suitable for FPGA implementation.
Strongly dependent on the setting of the µ parameter.
Notch RLS x x 4 The filter is used only as second order, so the delay is one sample. Suitable for FPGA implementation.
More complex implementation than Notch LMS.
The instantaneous active power p(t) is then divided into the fundamental active power part p(t) and the harmonic part p(t). After this splitting, the fundamental part is neglected and the p(t) part is used. Reference currents in the α and β coordinates are then back-calculated from p(t) and q(t) and compensation currents are obtained by performing inverse Clark transformation. The whole procedure can be seen in Figure 2. This method was originally proposed in 1984 by Akagi et al. [58] and has been gradually modified over many years [59][60][61][62][63][64][65]. Its advantages include easy implementation and, if the system is supplied with ideal voltage, excellent results under static conditions. Disadvantages include the need to measure three voltages and currents, and if the system is not supplied with ideal voltage, the results are highly distorted. This method is very sensitive to imbalances and high harmonic distortion in the voltage signals.

Cross-Vector Theory
A simple modification of the above method creates a new method called Cross-Vector Theory (CVT). Unlike iPQ, this method considers all components gained after Clark Transformation, extending the system to αβ0. This extension takes the the form of better suppression of higher harmonic components in the neutral conductor. For this reason, it is necessary to extend the overall system from a Three-Leg to a Four-Leg inverter. The block diagram of this method is shown in Figure 3.
Calculation of p, q α , q β and q L0 In [18], the authors presented a comparison of the iPQ, PQR, and CVT theories. Their experiments were performed only in the MATLAB simulation environment on RC and RL loads. The results and conclusion show that while all methods are able to reduce the THD I value to a low one, it does not fall below the 5% limit. Cross-Vector Theory appears to be the best in terms of having the smallest value of current flowing through the neutral wire. Furthermore, a modification of the Cross-Vector Theory method using PLL is mentioned which led to better results (about 3% THD I ).

Rotating PQR Theory
The PQR method was designed to completely eliminate the zero-sequence current. This method uses two transformation processes. The first is the transformation of voltages and currents from abc coordinates to αβ0 coordinates [15,66,67]. The second transformation is the transformation of currents from αβ0 coordinates to pqr coordinates, which are rotated relative to the original fixed system by an φ angle. The method uses the following equation: where v αβ0 = v α 2 + v β 2 + v 0 2 and v αβ = v α 2 + v β 2 are the voltage vector magnitudes. From these currents in pqr coordinates, the independent variables p, q q , and q r are calculated. The last step is double inverse transformation from pqr to abc coordinates. See Figure 4 for a block diagram of Rotating PQR Theory. Revuelta et al. [19] described various methods that were simulated and applied in three cases: sinusoidal balanced, sinusoidal unbalanced, and non-sinusoidal balanced source voltage. The PQR method was applied for a sinusoidal balanced source voltage, achieving zero THD U value; for a sinusoidal unbalanced source voltage, the THD U value was approximately 10%; and for a non-sinusoidal balanced source voltage the THD U value was approximately 6%. Neutral current was eliminated in all three cases.

Unity Power Vector
This method aims to consider the load in combination with the active power filter as a linear load along with the source. If this requirement is fulfilled, the source current after compensation can be described as where k is the conductivity of the nonlinear load and the power active filter. After compensation, the source current is sinusoidal, has the same shape as the source voltage, and is in phase. In addition, higher harmonics are suppressed, and the power factor is equal to one [16,68,69]. The reference current can be described as follows:  In a study by Montero et al. [16], the UPF theory was tested and compared with the iPQ theory, Synchronous Reference Frame (SRF), and PHC methods. A total of five scenarios were compared, and the methods were tested under different operating conditions (ideal voltage source, distorted and asymmetrical voltage source, different types of load distortion, etcetera). In the evaluation of these results, the current waveforms were identical to those of the voltage, and therefore did not correspond to the limits in IEEE 519, or were asymmetrical if the voltage was asymmetrical in nature. The immediate reactive power consumed by the load was eliminated. In conclusion, the authors stated that, unlike other methods, the limit values specified in IEEE 1459 were not met.

Perfect Harmonic Cancellation
This method can be considered as a combination of the iPQ, SRF, and UPF methods. The source current is therefore in phase with the basic component of the source voltage at the Point of Common Coupling (PCC) [16,68,70].
For a block diagram of the Perfect Harmonic Cancellation method, see Figure 5.
The PHC method was tested by Montero et al. [16] in a study similar to the abovementioned UPF method. Compared to the other tested methods, it provided the best results in all conditions (i.e., ideal or distorted conditions). The authors mentioned that this control method is designed to provide sinusoidal and symmetrical currents in phases with positive harmonic voltages. However, higher harmonic components or asymmetries nonetheless appear in PCC and the power factor does not achieve a value of 1. In conclusion, it they stated that if it is necessary to meet all standards regarding harmonics, asymmetry elimination, and reactive power compensation, PHC is the only control method (from iPQ, SRF and UPF) that meets the requirements for any conditions of use. This finding was verified experimentally by generating the worst-case scenario conditions (i.e., unbalanced distorted main voltage and unbalanced distorted current).

Synchronous Reference Frame
This method uses transformation from abc → dq coordinates, which causes the frames to rotate synchronously with the phase angle φ = ωt, where ω is the frequency of the source voltage. This is a widely used method [71][72][73][74][75][76][77][78][79][80][81][82][83][84]. This transformation is carried out by the following equation: The components d and q represent the active and reactive components of the current. These currents can be therefore divided into where i d and i q are the fundamental harmonic components of the active and reactive components and i d and i q are the active and reactive components of the higher harmonic components. A low-pass filter is used to extract the fundamental harmonic component. In the d-q frames, the fundamental component appears as the DC component of the signal, while the higher harmonic components appear here as ripples or peaks. Subsequently, a reverse transformation is performed, and the result is waveforms of compensation currents (see Figure 6). As with iPQ theory, this method is very sensitive to the quality of the source voltage, and it is necessary to measure three currents and the actual phase value.
In [85], Oliveira introduces a modified SRF method. Here, it is assumed that even harmonic components are not part of the load current. Filters are replaced by blocks that calculate the floating average. In the d-q coordinates, the odd harmonic components are manifested as multiples of the number 6. More in [85]. Block diagram of this method can be seen in Figure 7. The advantage over the classic SRF method is the absence of filters, subsequently generating delays. The delay takes a maximum of 1 6 T, where T is the period of the source signal. The method is immune to harmonic distortion in the supply voltage, and does not need to be adjusted in any way.
This method was not used in real implementation. In conclusion, it was only verified that the mathematical apparatus used in the modification of the SRF method is valid and functional. The method was designed primarily for a single-phase application, although it can of course be extended to a three-phase implementation.

Synchronous Detection Method
This method can successfully work in both balanced and unbalanced systems, as the compensation currents are calculated according to the voltage of individual phases. It can used to calculate compensation currents while a three-phase source supplies a highly nonlinear load [13,[86][87][88][89].
The calculation of three-phase compensation currents using the method of uniform current distribution with the SDM algorithm is based on the assumptions that the voltage is not distorted and the loss in the neutral wire can be considered as negligible [13,[86][87][88][89].
Assuming that the maximum values of the source currents are symmetrical after compensation, Then, the maximum values of the active currents in each phase after compensation are where P a , P b , and P c are the active powers of each phase and V am , V bm , and V cm are the maximum values of the phase voltage of each phase. The total average power is By editing, The currents of the reference active source are then calculated as follows: where and the compensation currents are provided by The SDM method was investigated in study by Sujatha et al. [90]. The method was tested in a simulation environment and the ability of the method to filter out higher harmonics in a balanced system as well as the response to dynamic changes in load power were investigated. In both cases, the THD I improved sharply to 2.7%.
In addition, this method of control was discussed by Kabir et al. [86], who compared SDM with iPQ theory. In conclusion, they stated that compared to the iPQ theory, the SDM method is very slow. The iPQ theory takes less than one period to compensate, while the SDM method takes fourteen periods to compensate (280 ms at 50 Hz mains voltage). The comparison was performed only using simulations in the SIMULINK environment, and no practical comparison experiment was performed.

Cross-Correlation Technique
In this method, the fundamental harmonic of the current for each phase is calculated using correlation and cross-correlation coefficients. The calculation of v s and v L for each phase is as follows [91,92]: where T s is the time duration of one cycle of v s (t). The product of v s and i L provides the following equation: Finally, the fundamental harmonic current is calculated from the following equation: Figure 8 shows a block diagram of a cross-correlation technique corresponding to the above equations. . Dunge et al. [92] examined the cross-correlation technique only in a simulation environment. The method was compared with modified SRF. Their comparison was performed on a model of a three-phase system with unbalanced load formed by a rectifier with an RL load. The results of their simulations showed the CCT method to have slightly better results than the SRF method, and the resulting THD I was improved by about 20%. The results were evaluated in simulations based on FFT analysis and THD I calculation.

Sine-Multiplication Theorem
This method is based on multiplication of a non-linear current with a reference sine current and subsequent integration. This method can be used in both single-phase and three-phase systems [20,93,94]. In the case of a three-phase system, three independent single-phase systems are controlled. The nonlinear load current is defined as This can be divided into a fundamental harmonic and harmonics as follows: The reference sine signal is assumed as The amplitude of the fundamental harmonic is obtained using the Fourier transformation, which corresponds to the following equation: Subsequently, the amplitude of the fundamental harmonic is calculated by multiplying I x and i r (t): i sc (t) = I x i r (t) = I 1 cos (θ 1 ) sin (ωt).
Finally, the compensation current is calculated by the following equation: (26) Figure 9 shows a block diagram of Sine-Multiplication Theorem, where V S is the supply voltage.

M ultiplier M ultiplier
Reference Signal Generator + - i cr (t) Figure 9. Block diagram of Sine-Multiplication Theorem.
In Jou et al. [93] the SMT was tested in simulation mode. The distorted current was successfully compensated even with a distorted source voltage (in this case, THD I 12%). In conclusion, it was mentioned that the method is able to compensate for the power factor and suppress the harmonic components of symmetrical or asymmetrical loads.

Vectorial Formulation
Vector formulation does not require any transformations into other coordinate systems. An imaginary power component is calculated using power variables according to the following equation [14,17]: The equation determining the currents are then calculated as follows:  Revuelta et al. [14,17,19,95] described various methods which were simulated and applied in three cases: sinusoidal balanced, sinusoidal unbalanced, and non-sinusoidal balanced source voltage. Applying the Vectorial Formulation achieved zero THD I value in all three cases, and neutral current was eliminated in all three cases as well.

Conservative Power Theory
This theory is based on the definition of instantaneous power under non-sinusoidal conditions. It can be applied to single-phase and three-phase systems with or without a neutral wire. The advantage of this theory is that it does not require any transformation and all calculations are performed in the abc axis coordinate system [22,[96][97][98][99]. The instantaneous active power component p(t) is provided by The instantaneous reactive power component q(t) is provided by wherev is the RMS value of the unbiased voltage integral. The average value of p(t) is the active component of the power: The average value of q(t) is the reactive component of the power: Based on the above equations, the currents are divided into the following three groups for each phase, namely, active phase currents: reactive phase currents: and neutral line currents: Calculation of currents in a balanced system is as follows: Calculation of currents in an unbalanced system is as follows: Mortezaei et al. [22] performed a comparative study of three methods (iPQ, CPT, and SRF). The comparison was based on the results of simulations of several different electrical network distortion scenarios. Their results and conclusions showed that the CPT method is the most difficult of the three mentioned methods, has a better dynamic response (100 ms) than the iPQ method (140 ms), and is slow when compared to SRF method (50 ms).

Fourier Transform
Fourier transform is one of the most well known harmonic current extraction methods among the frequency-domain methods. According to [103], this method provides high accuracy in detection of harmonics and can be used in single-phase and three-phase systems. One of its advantages is that it only requires the use of current sensors. Disadvantages include the necessity of knowing at least one whole period of the current signal to estimate the reference current signal. The accuracy of this method is very sensitive to noise pollution of the signal and to the content of incomplete periods (transient) in the measured window. If the signal is symmetrical over the entire period, a half or quarter period can be used for calculations, however, these conditions are hard to achieve. Therefore, this method suffers from high computational burden and is very sensible to frequency changes [88,[104][105][106][107].
Discrete Fourier Transform (DFT) is a mathematical transformation for discrete signals which returns information about both the amplitude and phase of the selected harmonic. When the higher harmonics in the current are detected and isolated, it is simply a matter of inverse transformation back to time domain. As mentioned, the method is very computationally demanding. This issue led to the development of Fast Fourier Transformation (FFT), which dramatically lowers the number of calculations from N 2 to N × log 2 (N), hence reducing the required DSP calculation time. The algorithm benefits from a decimation operation (in the time or frequency domain) that relies on recursive decomposition of an N-point DFT into two DFT transforms of N/2 points. Decomposition is repeated until the trivial "single-point" transform is reached and calculated [106]. When the frequency spectrum has been determined, the injection current is equal to summation of all sinus functions (with known amplitude, frequency, and phase).
Asiminoael et al. [106] carried out a comparison of three methods based on Fourier Transform, DFT, FFT, and the recursive variation of DFT. Their comparison was performed in a simulation environment, and the above-mentioned statements about DFT and FFT were confirmed. In addition, a comparison was made with iPQ, SRF, and generalized integrators. The authors stated that the main benefit of Fourier-based methods is avoiding the need to measure the voltage (reducing the required number of sensors) and the need to implement a numerical filter. Furthermore, FT methods perform very well under distorted voltage conditions. On the other hand, the calculation burden of FT methods is very high.

Recursive DFT
Recursive Discrete Fourier Transform (RDFT) [21,51] works on similar principles as DFT while recalculating the signal spectrum with each new sample. The Fourier coefficients are estimated in a window of samples with size N which is then shifted by the number of samples in p, where p ∈ (1, N). As such, the estimate is calculated only from new samples in p. Therefore, RDFT is much less computationally demanding than DFT or FFT, and is much more suitable for real-time applications. The disadvantage of this method, as with DFT and FFT, is its sensitivity to noise and transitions between signal shapes. The accuracy and precision of this method depend on a sliding window.
In [21], the authors discussed the main property of RDFT, namely, that RDFT manages composite waveforms without an elaborate signal model in the frequency domain thanks to the implementation of floating-point correlation. Derivation of common industrial periodic waveforms is possible without knowledge of the physical model and its inputs. They further mentioned that with a suitable modification of the RDFT filter output (introduction of the window function), leakage of the spectrum can be reduced. In the end, the computational demands of RDFT were said to be very modest. Verification of these findings was performed in a simulation. The block diagram of this method can be seen in Figure 10.

Wavelet Transform
Wavelet Transform can be used in combination with the SRF method by replacing the LPF FIR filter by the wavelet transform to divide the signal into detailed components by a High-Pass Filter (HPF) and the approximation components by the Low-Pass Filter (LPF) [108]. The dominant approximation component is the fundamental harmonic component, and the detailed components contain harmonic components. This method is used mainly due to the fact that, unlike the FIR filter, there is no delay.
One publication where this method was used [109] compared it with the conventional window method using the window function. Furthermore, the methodology for suitably selecting the mother wavelet in terms of efficiency for transients, low overshoots, and oscillations in the frequency domain was discussed. Experiments were performed only by simulation, and the method was not verified on a real SAPF. The advantage of this method over the conventional SRF method is that the response of the filter created by WT is an order of magnitude faster compared to the conventional FIR filter and does not suffer from any overshoot. Applying the Hamming window function can further improve the results with WT. Db8 (Daubechies 8) was chosen as the parent wave in the above-mentioned study; the authors noted that the main disadvantage of this method is the need to know and use only one whole measuring window T W .
The principle of this method is shown in Figure 11. Driesen et al. [110] stated that the method is easy to implement and combines many advantages from several conventional methods. Advantages include the fact that the method can easily be used for single-phase systems and that it is applicable even under voltage-distorted conditions. In terms of dynamics, it has a very fast response to transients. However, neither experiments nor simulations were performed to verify the findings.

Hilbert Transform
The Hilbert Transform (HT) can be used to calculate the instantaneous properties of a signal. It is often used in combination with empirical mode decomposition as the Hilbert-Huang transform (HHT). It is most appropriate to apply HT to the signal after it has been processed, i.e., after noise filtering. The mathematical definition of HT is [111,112]: where P is Cauchy principal value, z(t) is the analytic signal formed from the initial signal x(t) and its HT, the parameter a(t) is the instantaneous amplitude, and φ is the instantaneous phase [111,112].
Hilbert transform can be simplified as a convolution between the signal and 1 π t. It can be implemented by an ideal filter with an amplitude response of unity and a phase response that is a constant ninety-degree delay. The Hilbert transform can be called a quadrature filter, as it shifts the phase of the spectral components by π 2 t [111,112]. The advantage of HT is that it is suitable for calculating the instantaneous frequency. The instantaneous frequency is an expression of the change in the instantaneous phase shift, and can be calculated using the analytical method. It is mathematically defined as follows [111,112]: Aghazadeh et al. in 2013 [111] used HT to create a virtual phase and to transform a single-phase system into a two-phase symmetrical system. In their study, they presented a new method for harmonics elimination using a single-phase active filter. For evaluation, they used THD. Simulations were performed and the results showed that the new method in a single-phase AC railway system was more effective than the other compared methods.
In 2021, Swarnkar et al. [112] used HT in combination with Stockwell Transform (ST) to evaluate power quality (PQ) disturbances in a distribution system with availability of high-penetration of wind power generation. Their hybrid algorithm was designed to identify PQ issues using IPI and IPL notices. According to the results, the presented solution maintained better performance than a DWT-based method. Hilbert transform was used to process voltage signals during the evaluation process.

Kalman Filter
The Kalman Filter (KF) is a prediction-estimation algorithm that estimates the useful component of the signal according to previous values. This estimated signal is compared with the real signal, and the difference serves to improve the estimation of future samples. The basic Kalman filter can be described using two equations in the form of models [113][114][115].
Process model: where x(n) is a time-varying state variable, A is a state transition matrix, and w(n) is a process noise vector. Measurement model: where z(n) is a measured signal, H is an observation matrix, and v(n) is the observation noise vector. KF is performed in two phases, prediction and correction. The prediction phase is calculated according to previous data, and correction is then carried out according to a new measurement. Figure 12 shows a simple structural diagram of KF. KFs may appear in different places in the SAPF structure. The first approach is based on the SRF method, in which a low-pass (LP) filter is used for extraction. The LP filter can be replaced by a KF to increase the robustness of the system. This is a suitable location, as the LP filter is a linear system. This strategy is used in [115]. The method was tested in both a simulated environment and a real experiment with RC load, and a comparison was made with a conventional low pass filter. The resulting THD I was 0.42%, better than the low pass filter (with a value 2.38%), and met the THD I limit values set by the IEEE 519 standard.
Another approach was described in [114]. This approach uses KFs to estimators the reference current and voltage. The current estimator with KF is based on the first ten odd current harmonics. The output of the estimator is the instantaneous value of the phase current; filtering out the fundamental harmonics produces the reference current. The voltage estimator with KF is based on the first five odd voltage harmonics. Together with DC-link voltage control, this provides a reference current which corresponds to the losses in the active filter. Combining the two reference currents produces the desired reference current. This method was tested by simulation in MATLAB, and it was found that THD I decreased from 95.6% to 12.9%.
In other studies [113,116], KF has been used for reference current estimation i * a,b,c . This solution achieves better values compared to iPQ. In [113], the system was complemented by robust control (H-infinity). This connection leads to robustness of the whole system, simplification of the control structure, and reduction of the number of sensors (as there is no need to regulate the DC-link voltage using a separate PI controller). In 2018, Prince et al. [116] used a voltage regulator for DC-link and KF for current extraction. According to the results, the THD I after compensation was 2.18%, compared to 30.56% before compensation. In 2017, Panigrahi [113] achieved a THD I of 2.2% after compensation, compared to 25.9% before compensation.

Extended Kalman Filter
Extended KF (EKF) is usually used for nonlinear systems. The nonlinear system function is approximated using linear functions at the point of estimation (Taylor's development). The basic system can be described by the process model provided in Equation (43) and the measurement model by Equation (44) [117][118][119][120]: where x(n) is a time-varying state variable, f is the nonlinear system function, u(n) is an input, and w(n) is the process noise where z(n) is the measured signal, h is the nonlinear function, and v(n) is the measurement noise. Similar to the basic KF, an EKF is divided into two phases. A simplified diagram is shown in Figure 13.  Figure 13. Simplified diagram of EKF algorithm for parameter estimation.
In [118], basic KF, EKF, and two other KF modifications (extended complex KF and robust ECKF) were described and compared. In all, cases THD I was reduced from 24.9% to a value below 5%. There were no significant differences in THD I achieved by the different KF types (THD I = 4.79% was achieved by KF and THD I = 4.92% was achieved by EKF). These results show the ordinary linear KF performing better than the EKF, while the RECKF algorithm achieved the best results (THD I 4.46%).

Unscented Kalman Filte
There are other variants of KF, for example, the Unscented Kalman filter (UKF). Its strategy is not a linearization; rather, it uses direct nonlinearity. Currently, its deployment is not common in the SAPF framework. In one study [121], UKF was used to estimate individual power and frequency components. UKF showed improved the performance, especially with respect to transient phenomena in the network.

Adaptive Linear Neuron
ADALINE is an abbreviation for Adaptive Linear Neuron, a neural network that has two layers, input and output. It can estimate functions that have linear dependence between its input and output, and retains its functionality in certain nonlinear real applications [122]. Inputs x i are multiplied by adjustable weights w i , then a sum is derived from these multiples. The estimated output y is compared with a reference value tg (target) and the resulting error e is used by the Least Mean Squares (LMS) algorithm to train the network weights. A design scheme of the algorithm is shown in Figure 14. It is assumed that the current flowing through the load i L (t) is a distorted signal [23], where f 1 is a fundamental harmonic frequency of the grid and a k and b k are the harmonic sine and cosine amplitudes, respectively. Assuming that the value of f 1 must be known, the sine and cosine components can be easily calculated. However, the amplitude values of a k and b k are unknown variables and must be estimated using the ADALINE algorithm. The sine and cosine components can be thought of as inputs to the ADALINE equation, with the individual amplitudes a k and b k as network weights. The output of the network is y, which in this case is the estimated current i L flowing through the load. The measured current flowing through the load serves as the reference value tg. The estimated current flowing through load y can be written as y n = H ∑ k=1,5,7,11... a n k sin (2πk where y n is sampled by time t n = nT s (where n is the sample index and T s is the sampling period), k is the harmonic component index, and H is the value of the highest examined harmonic component. Components that are even or multiples of three are omitted due to half-wave symmetry and three-phase connection [23]. Individual scales are trained by the LMS algorithm, which is based on the optimization of weights using Gradient Descent (GD). The GD process is applied to minimize the square of the error between the reference tg n = i n L and the estimated output y n . The criterion can be then expressed as follows: Using the gradient value ∇E with respect to the weight vector w n , the resulting expression appears as follows: The rule for weight adjustment then appears as where η is the step size or learning rate of the weight update. In 2011, Bhattacharya and Chakraborty [29] used ADALINE to estimate the compensation current in order to improve the convergence time and reduce the computational demands of the method. The THD I criterion was used to evaluate the quality of filtration. The neural network weights were adjusted so that the THD I reached its local minimum. Simulations in the SIMULINK environment were used in experiments performed under laboratory conditions. The results confirmed that the proposed solution was functional for both symmetrical and asymmetrical loads in a three-phase three-wire system. The experiment revealed that the use of two weights and two input vectors helped it to converge very quickly.
In 1996, Dash et al. [123] used ADALINE to estimate Fourier coefficients in a signal polluted with noise, higher harmonics, and DC components. The learning parameters of the neurons were set to minimize the error between the measured and desired current signals. The size of the weights was estimated using LMS and nonlinear weight settings. Using this algorithm, an adaptive search for higher harmonic components was easily achieved. Compared to the backpropagation approach, better management stability and faster convergence times were attained. The experiments were simulated in MATLAB and verified on a real platform. The ADALINE method was compared with other algorithms based on the Kalman filter and DFT, and showed significantly better quality. Thanks to its adaptability, it was stated that this method is suitable for finding higher harmonic components where both the amplitude and the phase angle often change.
In 2007, Abdeslam et al. [26] designed and tested a complex system where ADALINE was used in an SAPF application to solve three different problems, namely, extraction of voltage harmonic components to regain a symmetrical and balanced network, filtering of higher harmonic components, and control of the SAPF power circuit. Using a unified system of methods, higher efficiency was achieved and the quality of filtration was improved. The main advantage of this approach is the ability to adapt in real time to varying types of loads. The experiments were verified in both the SIMULINK simulation environment and in a real scenario. The authors highlighted the advantages arising from the use of one ADALINE method for various problems within one SAPF system.
In a 2014 study, Qasim et al. [23] compared the ADALINE method with the feed-forward Multilayer Neural Network (MNN) method, another frequently used method for SAPF control. ADALINE was trained during operation using the LMS algorithm, while the MNN was pre-trained using the Scale Conjugate Gradient (SCG) backpropagation algorithm. The task was to extract the amplitude of the fundamental harmonic component of the current flowing through the load. Both algorithms were verified in simulations as well as through experiments. Both the obtained results and the conclusion of the study showed the ADALINE method to be more suitable for SAPF management than MNN. This was especially true in scenarios where an unlearned load was controlled; the MNN method failed to extract the basic component, which resulted in overcompensation by the PI controller. In contrast, ADALINE can be used in any scenario, as it learns adaptively during its operation.

Adaptive Neuro-Fuzzy Inference System
The Adaptive Neuro-Fuzzy Inference System (ANFIS) is a method based on a fuzzy expert system implemented by a multilayer forward neural network. Functionally, it is equivalent to a fuzzy inference system of the Takagi-Sugeno [124] type. The two-input ANFIS rule basis contains two Fuzzy IF-THEN T-S rules of the following form: where x and y are inputs, A i and B i are fuzzy sets, f i are outputs of the fuzzy system, and p i , q i , and r i are setting parameters that are obtained by estimation during the learning process. The ANFIS architecture for implementing these two rules is shown in Figure 15 [125]. The squares indicate a fixed node, while the circles indicate an adaptive one. ANFIS consists of a total of five layers; the function of the nodes in a given level is of the same type. A more detailed description of the ANFIS architecture shown in Figure 15 can be found in [126]). The parameters for setting the FIS are of two types: non-linear in the first layer and linear in the fourth layer. First, it is necessary to initialize the Fuzzy Inference System (FIS) approximately, which is then set up by the ANFIS adaptive learning process. ANFIS uses the original FIS and sets it up using a hybrid learning technique combining the feedback gradient method and the least squares method. The result of each iteration of learning is an error that is gradually reduced. Learning ends when the set number of iterations is reached or the system error is within acceptable limits. The gradient method is usually used to set the input layer and the least squares method is used to optimize the parameters in the defuzzification layer. In the learning algorithm, each iteration repeats a forwards and backwards run. In the forwards run, training patterns are fed to the input (X and Y in the general case), then the outputs of the individual layers are gradually calculated, and finally the resulting parameters are identified by least squares estimation. The output vector Z of a linear function has the shape In 2013, Routh and Arun [24] compared three methods to improve power quality, suppress the reactance component of the power, and compensate for higher harmonics at nonlinear loads. The control was performed using a PI controller, a fuzzy controller, and ANFIS. The three methods were compared via simulations. The results showed ANFIS with the best results in terms of THD I , and it was able to compensate for even the largest deviations.
ANFIS was used in a 2013 study [127] to manage a three-phase SAPF as a cost-effective solution to power quality problems. The filter showed good results at both the steady state and under dynamically changing conditions. The advantages of the proposed control system were mainly the independence of the distortion and asymmetry of the input source voltage, fast and accurate extraction of the fundamental harmonic component under both symmetrical and asymmetrical conditions, and the ease and simplicity of implementing the architecture. The results showed that SAPF was able to reduce THD I to tenths of a percent, which fully complies with the IEEE-519 standard. It was compared with a fuzzy controller and ANFIS, with the results showing improvement of up to 50% compared to the other controllers.
In 2013, Martinek et al. [128] used ANFIS to control the drive to meet SAPF functionality. ANFIS was successfully implemented; its functionality in terms of suppression of higher harmonic components was verified and a comparison of various algorithm settings. A total of four ANFIS models were presented, which differed in their number of nodes , number of linear parameters , number of nonlinear parameters (12)(13)(14)(15)(16)(17)(18)(19)(20)(21)(22)(23)(24)(25)(26)(27)(28)(29)(30), and number of fuzzy rules . The investigated phases of the network reached THD I values of approximately 98%; the first model, Model A, suppressed THD I to approximately 9%, while the remaining Models B, C, and D were able to suppress THD I below approximately 1%, which fully complies with IEEE-519 and IEC-61000-3 standards. In conclusion, it was found that this method provides clearly better results than the iPQ method, is easier to implement on a microprocessor, and can cope with frequency changes due to network instability. System learning was performed offline. The authors further stated that the subject of their future research was to adjustment the system to allow it to be taught during active processes, and thus become able to cope with new network pollution conditions. Figure 16 shows a block diagram of an adaptive filter for use in an unknown or time-variant environment which is unpredicted. For this structure, Finite Impulse Response (FIR) or Infinite Impulse Response (IIR) are used with filters of adaptive coefficients which vary in time. These filters, which are controlled by adaptive algorithms, are called adaptive filters. Various adaptive algorithms [129] from the LMS and RLS families have been used in this application, and are described below. The required inputs for adaptive filters are the reference signal x(n) and input signal d(n). The outputs from adaptive filters are the desired signal y(n) and error signal e(n), where n is the number of iterations.

Least Mean Squares Algorithm
Adaptive Algorithm w Figure 16. Schematic of an adaptive algorithm.
The LMS algorithm is the main representative of a class of stochastic gradient algorithms based on the Wiener theory and the method of least squares. This method is widely used due to its simplicity, low computational complexity, and robustness. Each iteration of the LMS algorithm requires three different steps to be performed in a specified order [25,130,131].
The output of an FIR filter y(n) is calculated as follows: while the value of the estimated error e(n) is calculated as In the end, the weights of the filter vector w(n) are updated with respect to the following iteration: The parameter µ is called the convergence constant or step size of the LMS algorithm. It is a small positive constant with a value generally less than 1, and affects the adaptive properties of the algorithm. Larger step size values result in a loss of stability and inaccurate filtration. Smaller values increase computation time and demands and extend the convergence time.
There are modifications to the LMS algorithm that are worth mentioning, such as Normalized LMS [132,133] and Sparse LMS [134]. The NLMS algorithm has a variable convergence constant for each iteration, which improves the convergence rate of the adaptive filter. The SLMS algorithm involves fewer multiplication operations than the LMS, although it has a slower convergence rate and higher steady state error.
In [132], our team used simulations to examine the ability of adaptive LMS and RLS algorithms to compensate for higher harmonic components of the current. We assumed 100µs as the theoretical delay of the inverter. After applying the LMS algorithm, the THD I value was reduced from 63.27% to 12.51%. The step size µ had a great influence on the quality of compensation, making it necessary to find a compromise between the THD I value and the convergence time.

Recursive Least Squares
The Recursive Least Squares (RLS) algorithm is the main representative in a class of recursive algorithms based on Kalman filtering theory and the least squares method. Unlike the LMS algorithm, it has its own statistical concept. The RLS algorithm works with average values calculated from time developments. The structure of the filter remains the same as with the LMS algorithm; only the adaptive process is different, due to the use of averages. Each iteration of the RLS algorithm requires five different steps to be performed in a specified order [25,130,131].
The output of the FIR filter y(n) is calculated as follows: The medium-range vector gain k(n) is updated with respect to the following iteration: The value of the estimated error e(n) is calculated as The weights of the filter vector w(n) are updated with respect to the following iteration: In the end, the inverse matrix P(n) is calculated as follows: The functionality of the RLS algorithm is fundamentally influenced by the choice of the forgetting factor λ, taking the values λ ∈ (0, 1]. Assuming that λ = 1, it is possible to use an estimate without forgetting. In practical implementation, λ from λ = 0, 98 to λ = 1 is usually considered. There is a modification of the RLS algorithm called QR-RLS (or QRD RLS). This modification uses a triangulation process and has good mathematical properties thanks to robust QR decomposition.
In [132], our team examined the ability of adaptive LMS and RLS algorithms in simulations to compensate for higher harmonic components of the current. We assumed 100 µs as the theoretical delay of the inverter. After applying the RLS algorithm, the THD I value was reduced from 63.27% to 6.43%. The forgetting factor λ had a certain effect on the quality of the compensation, determining how many samples the algorithm can remember. For λ values in the range of 0.999 to 1, there was not a significant difference in THD I or SNR values; however, at a λ value of 0.99 there was a high THD I value, meaning that the system was unstable. Figure 17 shows a block diagram of a notch adaptive filter. The adaptive filter using this architecture is able to work with multiple reference input signals from difference sources. One transverse FIR filter weight for a vector coefficient w i is needed for each reference input signal [135,136].

Notch LMS Algorithm
The notch LMS is a modification of an LMS algorithm for a notch adaptive filter structure. This method is used in a three-phased system. As with the LMS algorithm, the notch LMS algorithm requires three different steps to be performed in a specified order [135,136]: The output of the FIR filter y(n) is calculated as follows: and the value of the estimated error e(n) is calculated as In the end, the weights of the filter vectors w 1 (n) and w 2 (n) are updated with respect to the following iteration: In a previous publication of our team [135], this method was implemented on an FPGA and its functionality was verified in practice through a real experiment. The THD I value was reduced from values around 25% to values around 1% at low values of the parameter µ. The results of this experiment showed that the size of µ directly affects both the quality of the resulting filtration (THD I value) and its dynamics. At higher values of µ, the adaptation time decreases (higher dynamics of the system), however, the suppression of harmonic components is not effective (up to 13% in the experiment).

Notch RLS Algorithm
The notch LMS is a modification of the RLS algorithm for a notch adaptive filter structure. This method is used in a three-phased system. As with the RLS algorithm, the notch RLS algorithm requires five different steps to be performed in a specified order [135,136]: The output of the FIR filter y(n) is calculated as follows: and the medium-range vector gains k 1 (n) and k 2 (n) are calculated as The value of estimated error e(n) is calculated as The weights of the filter vectors w 1 (n) and w 2 (n) are updated with respect to the following iteration: In the end the inverse matrices P 1 (n) and P 2 (n) are calculated as follows: In [135], our team implemented notch RLS in combination with Clarke transformation in simulations. We simulated a 100 µs delay of the inverter and examined THD I and SNR values in a scenario where the current changed in a specified order for 160 s. The relative improvement in THD I was about 20% and the improvement in SNR was about 10%.

Conclusions of Harmonic Extraction Algorithms
The choice of a Harmonic Extraction Algorithm depends mainly on the relevant voltage properties. If the voltage is ideal, i.e., undistorted and balanced, then it is possible to use simple algorithms from the time domain, such as iPQ theory, Cross-Vector Theory, PQR Theory, and others, or FFT, DFT, and RDFT from the frequency domain. These algorithms are easy to implement and computationally undemanding. However, if the voltage is distorted and unbalanced, these methods have degraded functionality.
In real conditions, where voltage is distorted and unbalanced, it is necessary to use more complex algorithms that work properly even under non-ideal conditions. These complex algorithms are divided into time domain, frequency domain, and adaptive algorithms. Time domain algorithms mostly require voltage measurement, i.e., they require more measuring probes. Frequency domain algorithms require a whole period of measured current, which causes a compensation delay. Adaptive algorithms are the most computationally demanding of the three.
Another important feature of Harmonic Extraction Algorithms is the need to set method parameters. While time domain methods do not require set parameters, other methods require optimal settings to fulfill their required functionality. A major issue is that most of methods do not have a clear methodology for setting the parameters, meaning that parameters must be set using a heuristic approach, which can be time-consuming to perform. All methods are designed mainly for a three-phase network, although several of them can be used in a single-phase network as well. A summary of the methods mentioned above can be found in Table 1.

Synchronisation Techniques
This section describes methods for obtaining a synchronization waveform, which is then used in SAPF to generate a current compensation signal. In order for the functionality to be correct, it is necessary to ensure that the phase of the current compensation signal is identical to the phase of the fundamental component of the source voltage, meaning that both signals are in phase. Only then can the current signals (compensation and original) be summed correctly, and therefore correctly compensated. A total of seven methods are discussed in detail, most of which are based on PLL.

Zero-Cross Detection
Zero-Cross Detection (ZCD) is one of the earliest and simplest synchronization algorithms [42,45,48]. When the voltage intersects the 0V value, a pulse is generated. The biggest advantage of the algorithm is a very simple implementation, while a significant disadvantage is its sensitivity to any noise and distortion by higher harmonics [30]. In this case, many zero crossings can occur, which can lead to impaired detection. Filtering may be performed before ZCD to improve the results [38]. However, this can cause phase deflection (i.e., the signal is preceded or delayed), and because the detector operates in the analogue domain, it is difficult to deal with this problem. The detector is not fast in terms of dynamics, as the zero crossing occurs only twice per period of the signal under investigation [47]. The implementation of this algorithm (in analogue form) is expensive, as for each phase a separate device must be created to monitor the zero crossing. For example, in [42], a ZCD circuit is designed to generate an initialization pulse for the SAPF control circuit when a zero crossing is detected at the PCC. This technique can be used for both one-phase [42] and three-phase [45] systems. However, due to its disadvantages, it is the least used synchronization technique among the various alternatives for SAPF applications.

Space Vector
Space vector (SV) is another synchronization method; it essentially detects the angular frequency of the space vector v = v α + jv β . It obtains the instantaneous angular frequency by the equation below, where the space vector ϕ = ϕ α + jϕ β is calculated using the transfer function ϕ(s) = 1 s+b v(s). The parameter b is the damping coefficient used for stability. The advantage of this method is that it is less sensitive and is robust to interference. On the other hand, the SV method is very sensitive to input frequency changes. The SV method has been used in several studies [137][138][139]. The block scheme of the SV method is shown in Figure 18. Figure 18. Space vector method.

Phase-Locked Loop
This is the most well known and widely used synchronization technique thanks to its ease of control and ability to respond to changes in the distribution network. It is a relatively old method, and the concept was been considered as early as 1930 [140].
Its structure consists of three basic blocks (see Figure 19): a Phase Detector (PD), Loop Filter (LF), and Voltage-Controlled Oscillator (VCO). The PD first compares two input signals, namely, a reference signal with phase θ re f and a feedback signal with phase θ, then generates the phase difference ∆θ. The resulting error is then filtered using LPF, which removes noise and other higher frequency components from the PD. This signal is processed by the VCO, which generates a new value of the phase θ, which is then fed back to the PD. The process is repeated until the phase error is zero or close to zero. When this condition is met, the phase is locked and the generated phase θ corresponds to the setpoint θ re f .

Phase Detector
Comparison of phase Low Pass Filter Suppresion of noise and higher frequencies elements

Synchronous Reference Frame PLL
The conventional PLL described above can be further extended to SRF-PLL [34,40,44], which can be applied in both single-phase [28,31,40] and three-phase [28,34,37,44] applications. The main difference compared to the conventional PLL method is the implementation of the phase detection block, as seen in Figure 20. For single-phase systems (Figure 21), the step with the Clark transformation is omitted and the β component is replaced by the α component, which is shifted by π/2. In this case, the α component refers specifically to the phase voltage signal. This is an undemanding implementation method [37], exhibiting synchronization accurate results under ideal network conditions [34,37]. For proper operation it is necessary to observe the optimum settings for the PI controller and the least possible distortion of the network sinusoid. Improvement can be achieved by inserting the LPF after the transformation block [35]. However, it is necessary to set the filter order and cut-off frequency appropriately in order to achieve suitable distortion suppression and low delay.
To suppress these shortcomings, the method has been modified and extended by a self-tuning filter on STF-PLL [40] and by decoupled double SRF-PLL, i.e., DDSRF-PLL [44]. These adjustments allow the method to be used under conditions where the network is distorted or asymmetrical.

Self-Tuning Filter PLL
Before transforming into dq, the αβ inputs are first filtered using STF, which suppresses noise and other high frequency components. The signal is therefore distortion-free and can be processed by the PLL without a detection error, as follows: where x α( f und) (s) is the extracted fundamental component of the signal in αβ coordinates, x αβ (s) is the input signal in αβ coordinates, K is the constant gain, and f c is the cut-off frequency. The value of the gain parameter has great influence on the performance of this method. Related publications [27,36] have shown that lower gain improves the accuracy of the STF, although it reduces the dynamic response, while higher gain has the opposite effect. Therefore, it is necessary to carefully choose the appropriate gain value to achieve a balance between accuracy and system dynamics. The block diagram showing the principle of this method can be seen in Figure 22. Figure 22. Self-tuning filter principle diagram.

Enhanced PLL
Enhanced PLL (EPLL) is a frequency-adaptive nonlinear synchronization approach that allows greater flexibility thanks to the introduction of the PD mechanism, which provides additional information (amplitude and phase angle) in comparison to the other PLL approaches. This method depends on the parameter K, which influences the speed of amplitude convergence, and the parameters K p K v and K i K v , which influence the frequency convergence and phase rates. EPLL allows three-phase operation. The advantage of EPLL is that it maintains good robustness and is insensitive to interference from the input signal. It is usually used to synchronize grid-interfaced converters in environments with variable frequency. It can be used in single phase systems, as it provides a 90-degree shift of the input signal. The EPLL has been used in a number of studies [141][142][143]. The single phase EPLL diagram is shown in Figure 23.

Sinusoidal Signal Integrator PLL
Sinusoidal Signal Integrator PLL (SSI-PLL) extracts the fundamental positive sequence of the SF-PLL to track the utility voltage, giving it greater robustness against voltage distortions and imbalances. The K constant controls the bandwidth and response speed of the algorithm with multiple SSIs, as can be seen in Figure 24. In comparison, there is a different design with a single SSI, which is used as a filter for the measured utility voltage to extract the positive-sequence component v + α . The v + β is then calculated by delaying v + α by 90 degrees. In this design, the K constant controls the filtering response as well as the PLL bandwidth. Among the advantages of SSI-PLL are its immunity to voltage distortion/imbalances and the possibility of adjusting the algorithm for single-phase systems (albeit with modifications). SSI-PLL has been used in a few studies [144,145].

Decoupled Double SRF PLL
In contrast to the above method, this method does not work by suppressing components with a higher frequency; instead, it divides the αβ components into positive-sequence v Sdq +1 and negative-sequence v Sdq −1 components. These components are included in the signal due to an unbalanced distorted source voltage signal. Each of the components has its own SRF loop, and the separate parts of the network are subsequently processed to extract the positive-sequence v Sdq +1 component, which contains the basic component.
Thus, the functionality is the same as for PLL (see Section 3.3). Although this method completely eliminates the problems of the basic SRF-PLL method and allows work even under significantly distorted conditions, the detection of the phase itself is a relatively complicated process due to the need for another SRF feedback loop in the control [44]. The block diagram of this method can be seen in Figure 25.

Conclusions of Synchronisation Techniques
In addition to the described and compared methods, there are other synchronization methods, such as the weighted least squares estimation method (WLSE), synchronized PLL based on the instantaneous real and imaginary power theory (PQ-PLL), double second order generalized integrator PLL (DSOGI-PLL), three-phase magnitude phase locked loop (3MPLL), quadrature PLL (QPLL), robust single-phase PLL (RPLL), predictive phase locked loop (PPLL), and multirate PLL (MR-PLL).
The information above suggests that the choice of synchronization method depends mostly on whether the examined grid voltage is distorted or asymmetrical. If the voltage is close to the ideal conditions, it is possible to simply use ZCD or SRF-PLL. However, this state is difficult to achieve in practical conditions. Therefore, it is usually more appropriate to choose other expansion alternatives for PLL.
Another measure by which the method can be assessed is the need to set its parameters. As stated above, all methods except for ZCD and UVC require their parameters to be set optimally in order to fulfill their required functionality. In addition, for most of them, the methodology for setting the parameters is not clearly provided. Therefore, the parameters must be set using a heuristic approach, which can be time-consuming to perform. While all methods are primarily intended for a three-phase network, many of them can be used for single-phase applications as well. A clear summary is provided in Table 2. Robust and not sensitive to disturbances. If configured properly, it provides highly distortion-free estimation.
Sensitivity to the input frequency variation and imbalance.
Good robustness. Insensitivity to inferences from the input signal. Used to synchronize grid-interfaced converters. Provides additional information regarding amplitude and phase angle due to introduction of PD.
Requires correct setting of the K parameter.

SSI-PLL 4
Immunity to voltage distortion and imbalance. Adaptable.
Requires correct setting of the filtering response and bandwidth parameters.

SRF-PLL x 2
Easy to implement, accurate synchronization under ideal network conditions, one of the most commonly used methods.
The PI controller must be optimally set, and it cannot work under distorted network conditions.

STF-PLL
3 Suitable for implementation under distorted or asymmetric conditions. PI controller must be optimally set, STF gain must be chosen carefully, STF integration makes control more complicated.

DDSRF-PLL x 3
Suitable for implementation under distorted or asymmetric conditions.
The PI controller must be optimally set, and the extra SRF loop increases the computational complexity of the method.

Further Research
Our team approached the present review mainly in the context of preparing for future research of a practical nature. This research will deal with the practical implementation of as many SAPF control methods as possible under the conditions of a real distribution network. However, the conditions of the distribution network will be fully under our control. Particular attention will be paid to maintaining the repeatability and uniformity of individual tests. This means that all individual methods will be subjected to the same conditions and the same tests. In this way, it will be possible to objectively compare all methods and quantify the "strength of the method" using a homogeneous criterion, such as the value of resulting THD I , relative improvement of THD I , Signal to Noise Ratio (SNR), or magnitude of the current flowing through the neutral wire.
Methods will be implemented on a real inverter of modular architecture of our own design, with the individual parts of SAPF able be changed independently of the others (so that it is not necessary to change the whole control system in order to change the type of synchronization algorithm). The system will therefore be of an open architecture, not be a closed solution supplied by the manufacturer. The "brain" of this system will be a control system equipped with an FPGA, upon which the individual methods will be gradually implemented and tested. The strength of the FPGA solution lies in its ability to calculate even complex computational tasks in a relatively very short period of time (on the order of units up to tens of µs), which is much shorter than one period of the fundamental frequency (20 ms, resp. 16.66 ms). Such short calculation time periods are difficult to achieve on either conventional PCs or microcontrollers. Errors caused by poor implementation or the computational delay of a slow control system can then degrade the quality of the resulting filtration, leading to the results concerning the quality of the control method being devalued. Therefore, the use of an FPGA seems to be the best solution from the point of view of testing and quantifying the filtration quality, as it introduces the smallest error into the control circuit. The primary disadvantage of this approach is the complexity of implementation, as FPGA programming is disproportionately more complex than "classic" programming (eg C, C , Python, etcetera).
The described algorithms can be implemented on different hardware platforms. Due to our extensive experience with National Instruments hardware, and thus with LabVIEW, we expect to be able to use multiple inhouse hardware solutions.
The first option is a combination of a PC and plug-in multifunction data acqusition board, i.e., NI PCI-6221 with 16× AI and 2× AO. The resolution of both ADC and DAC is 16 bits, and the sampling rate is up to 250 kSps. The main advantage of this platform is that the board can both generate and measure data without unnecessary buffering; this mode is called N-sample HW-timed, and allows for the shortest latency between the measured and generated values, which is equal to the reciprocal value of the sampling rate.
A second option is a combination of a PC and NI cDAQ-9185 Ethernet-connected chassis. cDAQ is a modular measurement and signal generation platform consisting of a chassis and selectable I/O modules. cDAQ-9185 is a four-slot chassis with a 2× Gb Ethernet interface. Timing and synchronization are provided by a cDAQ internal clock. cDAQ allows an N-sample method mode based on a dedicated buffer, which means that samples are read/written in blocks. The drawback of block mode is that the latency is equal to the number of samples in a block multiplied by the reciprocal value of the sampling rate. Of course, there is a certain lowest number of samples in a block.
A third option is to use a cRIO HW platform. cRIO consists of a CPU with an RT operation system, FPGA, and chassis with four or eight selectable I/O modules. The bridge between the CPU and modules is the FPGA. There are two main advantages of cRIO. First, if the code size fits into the FPGA, there is no need to calculate the samples on the CPU, as the signal processing code runs on FPGA. Code on FPGA runs natively in parallel and is extremely fast. As there is no need for buffering, the latency is the shortest of the three described methods. Second, the cRIO runs standalone, with the PC only used for parameterization or visualization.
However, the following caveat applies to all three above-mentioned methods. For continous operation, it is necessary to ensure that the computation time per sample is shorter than the inverse of the sampling rate.
The advantage of running the extraction algorithm on an FPGA lies in the near-elimination of system latency. A properly implemented harmonic extraction method on an FPGA can have the latency minimized to values as low as 4 µs. Many methods can be implemented as Sample-By-Sample processing, and therefore it is not necessary to buffer data.
A major drawback of implementing extraction algorithms on FPGAs is their very high level of difficulty from a software development perspective. The programmer cannot use floating-point data types; all functions and calculations need to be converted to a fixed-point data type.
Of course, while development can be carried out on a system that allows floating-point calculations, in which case conversion to FXP must be considered. This is the part of SW design where most problems occur, because if the conversion is not executed correctly, the data type will overflow, causing an error in the harmonic extraction method. Other problems include long compilation times and the rather complex HDL programming language.
Because this is a general synthesis of an HW circuit, it is necessary to take into account the fact that the code runs in parallel, not sequentially. This can be used, e.g., in pipelining, where several iterations of the calculation are run in parallel. However, it is necessary to program the so-called handshaking, or overhead, which decides when the calculation is valid and when it is not.
Another aim of ours is to create a database of signal voltage and current waveforms with different types of loads. Any combination of the individual waveforms will be clearly described to make it clear which scenario is to be tested (e.g., distorted line voltage THD U h3 = 5%, THD U h5 = 3%, non-symmetrical nature of load, thyristor-controlled rectifier RL load type XY, and others). Therefore, the individual methods can be tested on different models of the distribution network.
This database will then be freely available for download, and other authors will be able to implement their own new methods of SAPF management and objectively compare them with algorithms implemented by other authors. The indisputable advantage of this dataset will be, above all, the objectivity of the quantification of individual parameters of the filtration quality, not verbal expression of a subjective character. The key parameters we intend to examine are the convergence speed, algorithm stability, computational complexity in terms of the number of operations (addition, subtraction, multiplication, and division) in one iteration cycle, memory cell consumption, Minimum Mean Square Error (MMSE), value of the THD I after filtration, relative THD I improvement, and ability to function under different tested conditions. Initial testing and implementation of the aforementioned methods will be performed in laboratory conditions. The next step will be implementation on a real "controlled" distribution network consisting of the test polygon of public SMART LED lighting on the campus of VSB (the Technical University of Ostrava) [135,146,147]. This polygon is used for comprehensive testing of LED lighting in terms of Power Quality [148], consumption, and extended functionalities (e.g., visible light communication [149][150][151][152], smart parking management [153], smart energy flow management [148], etcetera). The subject of ongoing research is primarily the impact of widespread mass deployment of smart technologies on the quality of electricity within the city distribution network. The primary advantage of this approach is that the operation of the test polygon is fully under control of the research team, making it possible to perform various tests with public lighting, even during the day when it is not normally lit. The next possible step will be to deploy the system on the distribution network of the entire campus, thus contributing to the ongoing project to create a small "SMART city" on the university grounds (SMART street lighting, SMART information boards, SMART energy flow management, etcetera) or deployment to one of the industrial companies of our team's cooperating industrial partners.

Conclusions
It is quite obvious that current harmonics are one of the most important elements that fundamentally effect the power quality of electricity within a distribution grid. Great efforts are currently being made to compensate for these higher current components. One of the most effective methods of solving this problem of suppression of higher harmonic components is the deployment of SAPF. Their key feature is that their efficiency is directly reflected in the speed and accuracy of control algorithms. Due to the massive deployment of dynamically changing systems (from a higher harmonic content perspective), it is necessary to guarantee a high degree of flexibility in terms of individual operating scenarios. These scenarios are covered by modern control algorithms thanks to the use of progressive signal processing methods. The development of this area is evoked by the availability of powerful and affordable semiconductor switching elements.
This research has systematically summarized and compared existing SAPF control methods, with an emphasis on modern methods of signal processing which are beginning to be significantly applied in the field of power engineering. Thanks to the relatively easy availability of FPGAs, it is possible to implement complex control algorithms which, in combination with new semiconductor switching elements, are able to achieve high efficiency.
This publication should help to understand the basic principle of SAPF while providing a subjective classification and comparison of different control algorithms that can serve as a basis for further research in this progressing field.

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

Abbreviations
The following abbreviations are used in this manuscript: