in

Integrating wind farms with electricity transmission networks presents several problems, and power quality plays a vital role among these. This study proposed a novel fuzzy logic controller to reduce the effect of power quality issues in such applications and investigated two different FACTS (Flexible AC Transmission System) devices, the Static Var Compensator (SVC) and the Static Synchronous Compensator (STATCOM). The fuzzy logic controller was designed as a voltage controller to improve power quality. Detailed analysis was carried out to investigate the successful mitigation of voltage sag/swell, active and reactive power improvement, and voltage flickers control by two controllers in a Multi-Terminal Load (MTL) system consisting of wind generators. The results were verified in MATLAB simulations, and a comparison was performed between the proposed shunt controllers. Furthermore, the design of a fuzzy interference system based on Vref (reference voltage) and the voltage measured at STATCOM location signals was investigated and compared with the SVC in terms of voltage sag, voltage swell, voltage flickers, and Total Harmonic Distortions (THD). The proposed fuzzy system was compared with a PI-based STATCOM and SVC. The power quality issues were exacerbated when using Multi-Terminal Load (MTL) in the transmission network.


INTRODUCTION
Wind power's contribution to power generation is rapidly increasing these days.However, the inherent problem of wind power generation is its low quality due to the intermittent power generation that influences the connected grid.Power quality problems, such as harmonic distortions, voltage instability due to voltage sag, voltage swell, and reliability, are concerns that must be addressed [1][2].Wind Energy Generation Systems (WEGS) with double-fed IG are used in power generation due to their low cost and variable speed constant frequency operation [3].However, since wind power is typically located far from consumers, it is necessary to provide shunt compensation at Points of Common Coupling (PCC) [4], while Multi Terminal Load (MTL) connected to the wind farm at PCC produces power quality issues such as frequency variations and voltage sags/swells [5].Voltage flickers are abrupt frequency changes for short durations due to load switching and integration of compensatory devices [6].As a result, voltage stability suffers from reactive power demand in PCC [7].If the voltage sag persists for longer durations, it may lead to voltage collapse and longer-lasting voltage swells or flickers can introduce harmonics into the system [8].The current produced due to sags/swells or flickers affects the switchgears and the protection system of the PCC.Therefore, various compensators with filters have been adopted to mitigate these power quality problems [9][10][11][12].Many power quality conditioners have been implemented to address power quality issues in distribution networks, such as UPQC, DVR, and DSTATCOM [4,9,13,14].Among the different FACTS controllers, SVC and STATCOM play an important role in reactive power compensation [12,16].In [8], two types of FACTS controllers, SVC and STATCOM, were considered to mitigate power quality issues.However, when selecting a FACTS device, the performance of different types of shunt compensators should be examined based on fast response, reactive power compensator range, switching losses, resonance problems, energy source requirements, and DC link capacitor value [13].Various control techniques have been proposed for the operating performance of various shunt compensators, such as nonlinear control, Lyapunov function-based control [17], instantaneous p-q theory [18], negative and zero sequence control [6,[19][20], instantaneous d-q theory [13], backpropagation control [4], and the instantaneous id-iq method [7,16].Hybrid structures were introduced in [7,21] to improve STATCOM operation with lower current rating APFs and PPFs.A hybrid structure fails during capacitive load and gives better performance only during inductive loading [13].
To improve the compensation range with lower current characteristics of the APF, one more hybrid device with SVC in parallel with an active power filter in the phase distribution system was evaluated.The APF was used primarily to eliminate harmonics and compensate for reactive power on the load bus left by SVC [8].However, it does not work on highvoltage transmission lines because the cost of APF is higher with multilevel structures.Some studies investigated the use of PI controllers [12].Furthermore, controllers such as PI and PID require an intensive mathematical model of the system, making them more sensitive to changes in the system parameters [20].As a result, they failed to meet the requirements of robust system performance.
Many studies investigated the reactive power compensation for the stability of a power system, however, very few tested power quality issues.Shunt FACTS devices such as SVC and STATCOM are popular for voltage regulation and voltage stability improvements.PI-based SVC and STATCOM are mainly used in industry.The PI gains kp and ki are fixed and unchanged under changing system operating conditions, therefore STATCOM and SVC performance suffers.Fuzzybased SVC and STATCOM are more suitable to replace PI.Very few studies addressed fuzzy-based FACTS shunt FACTS devices for power quality issues.

II. PROPOSED TEST SYSTEM
The test system consists of two generator systems of 500kV, 3000MVA, and 500kV, 2500MVA, connected with buses B1, B2, and B3, as shown in Figure 1.The multiterminal load system of 6000MW load with a wind generator of 9MW was connected to bus B3.Power quality issues were considered while the wind farm was connected to PCC or at load bus B3.Power quality analysis was performed while B3 was connected to the MTL load with the wind generator.The proposed model was simulated in MATLAB/Simulink to investigate the performance of the shunt compensator with SVC, STATCOM, and STATCOM with FLC3.Proposed system model.

A. Proposed System with SVC
As shown in Figure 2, SVC dynamically generates static reactive power to adjust the characteristics of a transmission line by altering the reactive impedance in its network.SVC is mostly used to maintain reactive power using different static power electronics controllers, such as a Thyristor Controlled Reactor (TCR) and a Thyristor Switched Capacitor (TSC).The transmission line requires reactive power, which is supplied and absorbed by the SVC.The SVC keeps the system voltage constant at its endpoints.When the system voltage is low, it produces capacitive reactive power.When the system voltage is high, inductive reactive power can be produced by simply changing the impedance using a thyristor switching circuit.Due to their ability to quickly compensate for power loss with minimal maintenance, shunt compensators are increasingly widely used in power systems.Test system with SVC.

B. Proposed System with STATCOM
As illustrated in Figure 3, the converter output is changed to achieve reactive power transfer between the AC transmission network and the converter.If the output voltage exceeds the system bus voltage, the converter supplies capacitive reactive power and the converter's reactive current will go to the utility.The converter absorbs inductive reactive power from the utility when the output voltage is lower than the system voltage.As a result, there is no reactive current between the utility and STATCOM, as it serves as a floating element in the system when the utility and the converter output voltages are equal.Test system with STATCOM.

C. Implementation of the Proposed FLC
The hybrid fuzzy controller was designed using the FIS GUI editor tools in the fuzzy logic toolbox.The suggested fuzzy controller was modeled on Mamdani's controller, which employs an "if-then" logic as part of its inference engine.Each controller input is taken into account as a fuzzy variable using

D. Hybrid FLC for STATCOM
Figure 5 shows the FLC scheme and the hybrid controller being the hybridization of a PI controller with a fuzzy logic controller.To obtain precise output from the proposed controller, the initial error signal generated by computing Vref and measured values from the PI Controller is then tuned, and an Iqref value is obtained to compensate for the reactive current.The error signal is once again sent to the FLC in the proposed hybrid controller, along with the error and change in error as a second variable to obtain the accurate estimation of Iqref.Table I shows a list of the proposed FLC governing rules.The error and the change in error are provided for the fuzzy sets.To eliminate inaccuracy and improve the dynamic response of the controller, conditions for 9 sets of rules were applied.

III. POWER QUALITY CASE STUDIES
This section investigates the performance of the proposed hybrid fuzzy controller in a system with SVC, STATCOM, and STATCOM with FLC, under various power quality issues, when connected with an MTL and a 9MW wind farm.

A. Voltage Sag Analysis
Voltage sag is a frequent and severe issue caused by system faults, rapid increases in load, or the start of powerful motors.Figure 6 shows a line-to-line ground fault that occurred between 0.2 and 0.3s with an 80Ω fault resistance and a 0.001Ω ground resistance close to bus 1.The voltage sag was developed in the given system and computed with SVC and STATCOM.Fig. 6.
Proposed system with Voltage sag.
At PCC, a STATCOM and an SVC are placed independently.Four parameters were used to investigate the dynamic behavior of the system.The first step was to investigate the effect of voltage sag on transient voltage stability by measuring the Vrms voltage at the PCC with and without a compensator.Similarly, active, reactive power, and harmonics were measured during fault, pre-fault, and post-fault phases.When the reactive power absorbed by the load bus increases, the voltage decreases, requiring FACTS controllers to compensate for the reactive power consumed in the system.A short-circuit line-to-line fault was simulated at generator bus B1 to investigate the effects of voltage sag. Figure 7 shows the system's condition during a short circuit without a compensator.The Vrms voltage drops to 0.64pu after a defect, is maintained at 0.77pu with the SVC and PI controller, becomes 0.84pu with the STATCOM PI controller, and increases to 0.85pu with the suggested fuzzy controller.Similarly, STATCOM with the fuzzy controller effectively maintains active power during faults compared to other compensators.Reactive power during faults demands approximately 35VAR power without a compensator, whereas with SVC it delivers 312VAR reactive power, -470 VAR with STATCOM and PI controller, and with fuzzy-based STATCOM it delivers approximately 485VAR reactive power.Figures 7-9 show how STATCOM executes superior compensation to restore the system voltage to normal.In this instance, voltage recovery cannot be achieved with the installed capacity of the SVC.

B. Analysis of Voltage Swell
The MTL load system consisted of a parallel load with 500MW active power, 100VAR inductive reactive power, and 100VAR capacitive reactive power to produce voltage swell.Figure 10 shows the three-phase circuit breaker to produce the Voltage swell condition.Table III shows the proposed system including FLC-based STATCOM, STATCOM, and SVC with PI controller.Figures 11-13 show the analysis of the test system with and without compensation.The impact of various compensators was examined taking into account a momentary voltage swell lasting 0.2-0.3s.Table III shows that when there is a sudden loss of load at load bus B3, the electrical mode's stability drops and becomes unstable in the absence of STATCOM.Furthermore, the RMS voltage under fault conditions without a compensator is 0.708pu and improves with SVC to 0.785, whereas it is 0.945 with STATCOM and reaches 0.95 with the suggested STATCOM with fuzzy, as it gradually increases towards the rated value.The active and reactive power during the same period without a compensator is 826W and 325VAR, but with SVC and STATCOM, the compensator delivers approximately 1039W and -171VAR, and 1106W and -297VAR, respectively.Using fuzzy-based STATCOM produced around -230VAR of reactive power and 1050W of active power.Similar results for the THD percentage demonstrated improved results compared to the results with and without compensation.

C. Analysis of Capacitor Bank Switching at Load Bus
Load voltage distortion and voltage flickers are the most frequent problems in a power system.Capacitor banks were connected to B3 through a switch to imitate voltage distortion or flickers, as shown in Figure 14.Capacitor banks were used as shunt compensators with the load bus to compensate for reactive var power on the load bus.Load voltage distortion occurs at the load bus whenever capacitor banks are switched on or off.The simulations in this section ran in transient mode, with the capacitor switched at load bus B3.When a capacitor is turned on during steady-state operation or when load compensation is required, sudden voltage flickers or voltage distortion are introduced at the bus, which is analyzed at PCC with and without a compensator, as well as with the proposed fuzzy-based STATCOM.IV.DISCUSSION This study investigated a novel hybrid fuzzy controller for AC voltage control of STATCOM.Many studies used either PI controllers or replaced PI with fuzzy controllers.This study used both PI and fuzzy controllers, introducing a novel hybrid fuzzy controller.Other studies showed that the proposed hybrid controller can be easily implemented with simple fuzzy rules and improve system voltage stability and power flow.Similarly, other studies presented techniques based on a SMIB system with an ideal nonlinear load.This study used two dynamic sources connected on either side with a multiterminal load considering the connected wind farm.Different power quality issues were presented, showing that the proposed hybrid controller improves RMS voltages in every power quality issue near the rated values.Furthermore, there is a 10% to 15% improvement in active and reactive power.On other hand, results in Tables II, III, and IV showed 10% to 20 % improvements in THD.

V. CONCLUSION
This study investigated the modeling of a system with and without a compensator in several transient situations, revealing power quality concerns in MATLAB Simulink.Simulation results showed that STATCOM and SVC with a PI controller both efficiently alleviated voltage sag/swell, but their efficacy varied.The results obtained by simulating the system with a fuzzy-based hybrid controller with STATCOM were superior.In comparison to SVC, STATCOM with PI, and the system without a compensator, the Vrms during voltage sag, swell, and capacitor bank switching in the suggested STATCOM was substantially more stable.Moreover, the suggested STATCOM enhanced the system voltage at the point of common coupling.STATCOM quickly restores the system voltage, which is
www.etasr.comAdware& Chandrakar: Power Quality Enhancement in a Wind Farm Connected Grid with a Fuzzy … membership functions.A triangular membership function is used for input and output variables.Figure4shows the function of the fuzzy controller, which consists of three functional blocks: fuzzification, rule inference, and defuzzification.Error e and the change in error de are the input variables in the proposed system, and the FLC output is a reactive current.

Fig. 14 .
Fig. 14.Proposed system with capacitor switching.TableIVshows the performance of various compensators under different transient conditions for all transmission line performance parameters.show that the Vrms voltage at the PCC increased up to 0.975, closer to the rated value, using the proposed fuzzy-based hybrid STATCOM.Similarly, simulations of other performance metrics, such as active and reactive power, demonstrated that the proposed fuzzy-based STATCOM was capable of producing better active and reactive power than the PI-based SVC and STATCOM.The results reveal that the proposed controller improved THD by 10 to 15%.

www.etasr.com Adware & Chandrakar: Power Quality Enhancement in a Wind Farm Connected Grid with a Fuzzy … disrupted
during voltage sag and swell.Moreover, harmonics are produced as a result of resonance, needing a longer compensation time than in the case of STATCOM.When a quick change occurs, such as the loss of a high load or the switching of capacitor banks, the proposed STATCOM produced a remarkably stable voltage profile with minimum transient overshoots.Furthermore, the recommended STATCOM exhibited lower distortions in terms of load voltage, line active power, and reactive power than earlier compensators.