Fuzzy and PSO tuned PI controller based SAPF for Harmonic Mitigation

░ ABSTRACT - The development of a reliable power filter is essential for meeting the need for high-quality power. Current and voltage harmonics are a major contributor to poor power quality and must be eliminated. Shunt active power filters (SAPFs) can be installed to reduce the negative effects of harmonics. Fuzzy logic and proportional integral (PI) controllers excel at regulating DC link voltage in shunt active power filters (SAPFs). This research assessed how well Particle Swarm Optimization controls the DC link voltage in a Shunt Active Power Filter (SAPF), thereby mitigating harmonics. The appropriate PI control parameters are first determined using the Particle Swarm Optimization technique. The PSO-tuned PI parameters are combined with a fuzzy logic controller for the SAPF simulation. It has been demonstrated in simulations that a Shunt Active Power Filter (SAPF) with reference currents are generated in accordance with the instantaneous real and reactive power (p-q) theory, employing fuzzy and PSO -PI controller for diode rectifier type non-linear load. It is extremely effective for harmonic correction in distribution networks. The simulation work is carried out using MATLAB-SIMULINK.

Waveforms in the energy supply system have changed in recent years [1] due to the growing prevalence of power electronics and additional non-linear electric loads, because of the harmonics they produce. The generation of harmonics by nonlinear loads is the root cause of inefficiency. Power loss, and interference with surrounding communication networks. The total harmonic distortion (THD) of the source current exceeds the 5% limit defined by IEEE -519 [2]. In 1983, the instantaneous power theory (p-q theory) was developed by Akagi, Kanazawa, and Nabae as a means of restricting harmonics (Akagi et al (1983)), [3].Large component sizes, constant compensation, and the tendency to resonate with supply impedance are some of the drawbacks of using passive filters to reduce harmonic distortion [4], [5]. To reduce the harmful effects of harmonics brought on by nonlinear loads, the optimal shunt active power filter system was designed. In accordance with the instantaneous power theory, it emphasises the importance of the device used for harmonics selecting from observed values. It is responsible for generating the compensation currents. A number of researches have looked into the use of an active filter in conjunction with a diode rectifier in a non-linear load [6] design. Combining the best features of passive and active filters, hybrids are a relatively recent development [7]. Several studies employing Fuzzy logic HCC controller [8], optimization methods to determine the optimal values for Kp and have been reported in the scientific literature [9], [10]. By optimising the filter to achieve the lowest feasible THD value, more non-linearity may be tolerated by the supply system. From the literature the impact of changing Kp and on the THD and try to determine the best setting for this PI controller. In 1995, Dr. Kennedy and Ebehart [11] created a method called particle swarm optimization (PSO) to find a value with the lowest total harmonic distortion (THD).
In several other research [12], [13], the PSO methodology was proved to be an excellent tool for optimising active filters. A harmonic filter can either be a Shunt Active Filter or a Series Active Filter. The filter's layout and how it is wired are the main distinguishing features. [14]. When used in conjunction with other methods, a Shunt Active Power Filter (SAPF) may enhance voltage quality and decrease current harmonics in a power grid [15]. In this research, development of a SAPF coupled to a diode rectifier driving a nonlinear load to mitigate current harmonics, in this work combination of fuzzy and PSO tuned pi controller can be used as controller for SAPF. In order to lower harmonics in the system, SAPF monitors load current and generates compensatory current. [16].

░ 2. SAPF OPERATION
An example of the primary SAPF compensation concept is presented in figure 1. Without SAPF, harmonics in the source and load currents are proportional to one another (i.e., their

Fuzzy and PSO tuned PI controller based SAPF for Harmonic Mitigation
Venkata Anjani Kumar G 1 and M. Damodar Reddy 2 1 signatures are same). After being connected into the PCC, the SAPF injects a compensating current that is precisely regulated to cancel out any harmonics in the supply current. From eq. (1), the grid voltage [17] can calculated: The instantaneous value of grid current from eqn (2) The load current which is having fundamental and harmonic component from Eqn(3) The power at load side which is multiplication of source voltage and load current from eq. (4).
( ) = 1 sin 2 * cos 1 = ( ) * ( ) Also, the grid current provided from eq. (5) after correction is given in eq. (6) Where = 1 cos 1 The Active power loss must be taken into consideration because the inverter has high-frequency switches. Finally, SAPF will inject compensation current at PCC given in eq. (7).

░ 3. P-Q THEORY
This is an example of a well-defined SAPF control method for generating reference compensation currents [18]. Figure 2 below depicts the estimated reference current based on instantaneous active and reactive power.
H. Akagi and colleagues first proposed this theory, which use the Clarke transformation to translate a-, b-, and c-coordinate three-phase current and voltages into -coordinates. [19].
(10) The instantaneous power is given in eq. (9) The total power consists of ac component and dc component as given in eq. (10) p =¯+~ (12) In which the dc value and the ac value ~ are respectively used. Reference current may be determined using the following equation.
Where loss is the active power loss component in the filter

International Journal of Electrical and Electronics Research (IJEER)
Open Access | Rapid and quality publishing Research Article | Volume 11 Issue 1 | Pages 119-125 | e-ISSN: 2347-470X Use the above formulas [20] to compare these currents to the actual filter current inside the hysteresis controller. This will give you signals for the compensating current.

░ 4. PARTICLE SWARM OPTIMIZATION
PSO is based on the premise that the issue may be modelled as the search for the shortest route across a network, and it uses an evolutionary meta-heuristic strategy to do so. In figure 3 we can see a computational flow diagram of the PSO approach. PSO is an optimization technique that was inspired by a flock of birds that operate in a complex, multifunctional environment. Numerous objective functions have been optimised using the method developed by Dr. Kennedy and Ebehart. [21].
In PSO, the search space's solution can be a bird or a particle. Position, velocity, and a fitness rating are all assigned to each particle. The fitness function optimizes fitness values while the particles flying direction is controlled by the velocity. The following statement is used to refine the location of each particle.

Figure 3: Flow chart of PSO
 Particle's best distance from its current positions .  isdistance from where a particle is right now to wherever that is.  is a particle's best estimate of its true value, based on its own past experiences.  The optimum value is .
Each particle's velocity and location are updated using these two optimal values in the following equations.  figure 4. and the error voltage ( ), which is the difference between the reference dc voltage level and the supplied dc voltage, are both used to suggest gain settings for the PI controller. When this occurs, the filter reference current is set by the PI controller input. In the Hysteresis band, a comparison is made between the reference signal and the actual current, which results in pulse generation for the Thyristor or IGBTs found within the Power Converter.

░ 5. PROPOSED IMPLEMENTATION
The optimal gain settings for the PI controller that was utilized to control DC voltage in this investigation were found using the Particle Swarm Optimization technique. The DC voltage may be managed by reducing the value of a goal or cost function. Setting an appropriate number of iterations to retrieve the values is discussed in further depth below. Figure 5 depicts the proposed PSO-PI controller. Connectivity between the PSO-PI controller and the Fuzzy logic controller is represented in figure 6. A total of seven fuzzy sets were used to define the inputs and outputs of the scenario.( 1, 2, 3, , 1, 2, 3 ) ( 1, 2, 3, , 1, 2, 3 ). For defuzzification, we employ the centroid method via the triangle membership function. Table 1 displays the foundational principles upon which the fuzzy controller is built.

░ 6. OPTIMIZATION PARAMETERS
This research seeks to provide the ideal values for the integral gain K i and proportional gain K p to stabilise the voltage across the dc link. Here, we use PSO to get the best possible values for K p and K i . In this essay, the issue is stated as follows: P loss = K p (ΔV dc ) + K i ∫ t 0 (ΔV dc )dt P loss is the out put of PI controller (19) Where P loss = Power Loss ΔV dc = V dc reference − V dc actual K p = Praportional constant K i = Integral constant

Integral Absolute Error (IAE)is the Objective Function to minimize
The Integral Absolute Error (IAE) approach equally considers positive and negative errors. The limitations of the improvements are further discussed here.
p 1 < K p < p 2 & i 1 < K i < i 2 p 1 and i 1 =Smaller values for K p and K i p 2 and i 2 = Higher values for K p and K i

░ 7. RESULT AND ANALYSIS
A three-phase Diode rectifier load linked directly to a distribution system constitutes the nonlinear load. A common connection point, also known as a PCC, was used in to connect the SAPF. In this article, we look at how SAPF may be used in a distribution network to fix one of the main issues with power quality called harmonics.
In this study distribution system consists of source, nonlinear load and SAPF which is connected at PCC, without SAPF grid current is distorted due to nonlinear load. This report describes discussion of five different case examples. The first case involves computing the THD without SAPF and then doing the FFT analysis. In the second example, a PI-controller is utilized to determine the THD, but in the third, a FUZZY Controller is used instead. Fuzzy PSO-PI and SAPF are both investigated in detail in the fourth and fifth cases. Figure 7 depicts the suggested SIMULINK model, which includes a three-phase nonlinear load but no shunt active power filter. For grid current, we determine its Total Harmonic Distortion (THD). Our lack of a rebate in this instance indicates that there is no filter linked to the grid to supply the necessary reactive power. A high degree of grid current distortion will have an effect on all loads connected to the PCC. For reference, figure 8 displays a THD value of 18.42% for the grid current. circuit, the current from the source is not sinusoidal, and the current needed to compensate it is zero. Figure 9: Without SAPF, the wave shapes of the source voltage, source current, compensating current, and load current

Case (2): Shunt Active Power Filter with Pi Controller
The recommended SAPF Simulink model is shown in figure 10.
A power source, a nonlinear load, and a shunt active power filter make up the model.  table given bellow in  table 2. THD value is calculated for grid current and is reduced from 18.2% to 3.76% is as shown in figure 11. ░

Case (3): Shunt Active Power Filter with Fuzzy Controller
The Dc bus voltage in this system could be controlled by a fuzzy logic controller. An output membership function and an input similarity measure are the building blocks of a fuzzy logic controller with one input Error and other input change in error.
There are 49 guidelines to follow for the best outcomes. Figure  12 shows that after calculating the THD value for grid current, it was reduced from 3.76 percent to 1.52 percent

Case (4): Shunt Active Power Filter with PSO-Pi Controller
In this application, the voltage across the SAPF DC connection is regulated by a PSO-tuned proportional and integral (PI) controller (see figure 13). The PI controller's Kp and gains will be adjusted to minimize the error voltage (IAE) using a Particle Swarm Optimization strategy that takes controller inputs into consideration. The source voltage, source current, compensation current, and the load current produced by a SAPF with a PSO-PI controller are graphically represented in figure 14. While a diode rectifier load is connected to the grid, SAPF injects compensating current at the PCC to keep the grid current sinusoidal. Alternative parameters for PSO are listed in table 3. Figure 15 demonstrates that the estimated THD for the grid current decreases from 1.52% to 0.93%. Lower limit of , 0

Case (5): Shunt Active Power Filter with Fuzzy and PSO-Pi Controller
In this scenario, the SAPF DC link voltage is regulated using a Fuzzy and PSO-PI controller. When an error occurs, the PSO will communicate the error voltage to the fuzzy controller, which will use it to calculate the and gains for the PI controller. Figure 17 displays a reduction from 0.93 percent to 0.87 percent in the THD value calculated for the grid current.  table 4 and table 5 shows the proposed SAPF inverter injects just the reactive power necessary to meet the load's requirements, while the active power comes directly from the grid. The performance of a shunt active power filter (SAPF) was studied in this work, to reduce harmonics in a distribution system model's grid current caused by nonlinear loads, The SAPF efficiency under various scenarios is analysed and compared. Five different scenarios are simulated with the help of MATLAB/SIMULINK for the model shown in figure 7. The results are outlined. The PSO-PI based SAPF, the standard FUZZY based SAPF, and the conventional PI based SAPF all perform poorly in terms of minimizing overall harmonic distortion, according to simulation data (THD). The Fuzzy with PSO-PI based SAPF is found to be more effective in simulation to achieve lower THD. It has been determined that this enhanced performance is acceptable (within 5% of the IEEE standard).