Experimental Harmonics Analysis of UPS (Uninterrupted Power Supply) System and Mitigation Using Single-Phase Half-Bridge HAPF (Hybrid Active Power Filter) Based on Novel Fuzzy Logic Current Controller (FLCC) for Reference Current Extraction (RCE)

In addition to the growing use of electronic power devices in industrial and residential systems, such as UPS, controlled rectifiers, SMPS (Switch Mode Power Supplies), and DC Converters, there is a serious problem caused by harmonics in AC mains, which lowers the power quality. Harmonics can cause a variety of problems, including sensitive equipment failure, resonance issues, heated wires, power loss, and inefficient distribution systems. A passive or active power filter could be used to reduce harmonics. However, passive filters are more difficult to design and are bulkier. With the advancement of power electronics, active power filters were developed, and the best combination of both was supplied in the form of hybrid active power filters (HAPF). This study shows an approach to minimizing the harmonics contained in the output of a UPS connected to a nonlinear load. Experiments with several UPS types have been conducted under various nonlinear loads, as well as charging and discharging of batteries, and the proposed technique significantly reduces harmonics in a system with a HAPFs (hybrid active power filter) based on a unique FLCC (fuzzy logic current controller). In this paper, we use a fuzzy logic controller to generate pulse width modulation (PWM) switching signals in a single-phase half-bridge HAPF. The operation of the proposed PWM-FLCC will be studied in a steady and transient state. Based on a connection between the uninterrupted power supply (UPS) supplying a single-phase power to a nonlinear load, different power filter topologies and a brief review of reference current extraction (RCE) methods used in this study were also included and the most common configurations have been compared with their advantages and disadvantages to ensure the right selection of the power filter for UPS connected with the nonlinear load. The results of the investigation demonstrate that the HAPF with the fuzzy logic current controller has reasonable performance, with a significant reduction in current THD down to 1.09%, as per IEEE-519 standard.


Introduction
In today's world, improving power quality (PQ) is a major challenge in the eld of power distribution. In general, the devices used in the power system such as Switched-mode power supplies (SMPS), arc furnaces, uninterruptible power supplies (UPS), variable speed drives (VSDs), and other power electronic devices are nonlinear in nature. e increase in nonlinear load has exponentially caused power quality problems such as high harmonics of current and voltage and low power factor, especially when connected to the grid in a distributed generation system. ese loads generate a variety of PQ issues, including harmonics in source/load voltages and currents, which have a negative impact on system security, efficiency, and dependability [1]. As a result, many studies have been conducted employing various custom power devices (CPD) to improve the system's PQ.
Decentralized grids in modern times have also made complex electricity networks. In such a system, power interruption can be a serious problem for sensitive equipment. In 2005, conventional uninterruptible power supply (UPS) systems were summarized [1]. In the case of an input power failure from the national grid, the UPS is employed as a backup power supply for the load (usually mains). ese conventional UPS systems are still available commercially with reasonable performance capabilities. However, many problems have remained unsolved as yet. In [2], a hybrid energy storage system (ESS) integrated with UPS was proposed for online operation. e authors insisted that the system cost is minimized and that the battery usage factor is improved by using the system for demand management as well as emergency power supply. In [3], a new solution for adopting line-interactive UPS as a shunt active power filter (SAPF) was designed and investigated. e exponential development in nonlinear loads in the previous decade worsened power quality problems such as excessive current and voltage harmonics, as well as low power factor, especially when connected to the power grid with distributed generation systems [4,5]. Hence, as an effort to improve the power quality conventionally, passive filters were used, leading to emerging new topologies [5]. However, these traditional filter topologies did not live up to the expectations of modern diversity of the types of loads. APFs (active power filters) have been studied for decades and have been improved to suit the modern load requirements. In [6], APF topologies have been summarized and were available around 1999. Two decades have passed since this research was published and many improvements have been observed in APF topologies. In the last few years, HAPFs (hybrid active power filters) have been developed for specific types of loads mentioned in the respective research [7][8][9][10][11][12][13][14][15]. In this paper, the UPS system experimental harmonics analysis has been performed with harmonics mitigation by hysteresis-based HAPF. A fundamental 50-Hz sinusoidal waveform, 3rd harmonic, 5th harmonic, and the deformed waveform are shown in Figure 1. e Fourier series can be used to decompose this distorted waveform into its fundamental and harmonic components. Total harmonic distortion (THD) in voltage or current can be determined using the following formula.
where h max is the highest order harmonic in the calculation, M h is the effective value of h th harmonic, and M 1 is the effective value of the fundamental component. Nonlinear loads such as electric traction systems, PE Devices, VFD/ VSD, SMPS, CVCF, UPS, power converters, and domestic appliances of all types cause harmonics in power distribution systems. ese harmonics, in turn, will cause many power utilization problems.
(i) Higher harmonic frequencies cause voltage flickers, which is harmful to human eyes. (ii) Increase inaudible sound as higher harmonics start vibrations (iii) Magnetic losses increased due to higher harmonics, leading to raised temperatures, eventually decreasing the life and efficiency of the electrical machines and transformers. (iv) Created Resonant, which can shorten the life of capacitors and cause metering and instrumentation systems to malfunction. e fifth and seventh harmonics generate torque ripple in the electrical machines.
(v) Magnetic and electric fields are also produced by harmonics, which affect telephone wires and other communication systems near the transmission system.
To address the aforementioned problems associated with harmonics, harmonic filters can be used. In [16], harmonic suppression technologies in power distribution that have been used in the past have been classified. In a conventional context, passive power filters (PPFs) are the simplest solution for mitigating harmonic distortion [17,18]. Recent investigation on different applications of passive power filters has shown the potential advantages of their use [19][20][21][22]. Figure 2 depicts some of the most common passive filter types and configurations, which are essentially inductors, capacitors, and resistors configured in a way to control harmonics.
Even though it is affordable, the most widely used passive filter is a simple LC series single tuned filter. is filter is adjusted to offer low impedance to a specific harmonic frequency and is coupled in shunt with the main distribution system. Hence, that particular frequency current is provided an alternative flow path that passes through the filter. A high-pass filter (HPF) eliminates the harmonic frequencies above a certain frequency value. Typically, HPF is formed into three types of configurations as shown in Figure 2. Due to the relatively higher losses created at the fundamental frequency, the 1st-order HPF is still not widely used. Unlike the 1st-order HPF, the 2nd-order HPF creates fewer power losses and its harmonic frequency filtration ability is adequate. Comparatively, the 3rd-order HPF's filtering capabilities are superior to 2nd-order HPF. However, due to its stability and expense, it is rarely employed in low-and medium-voltage applications [17,18]. In general, PPFs mitigate harmonics and provide the necessary reactive power for converters in distribution systems with pre-defined standards as a conventional inexpensive solution. However, as the performance of these filters depends on the constantly shifting source impedance, under low load conditions, they cannot be used to control reactive power. Additionally, they cause resonance and hence potentially destabilize the power distribution systems. Moreover, component value changes due to frequency variation or prolonged use of the filter can determine it. ese problems are addressed by using active power filters (APFs) [3,6]. In [3], UPS is used as an active filter and the design and analysis is presented in detail. In [23], to reduce the magnitude of external disturbances and modelling uncertainties, an APF current controller is presented that uses non-singular terminal sliding mode control based on an adaptive fuzzy neural network. In [24], to improve power quality, based on a self-regulated double hidden layer output feedback neural network, an APF current controller has been investigated. In [25], for digitally controlled LCL-type SAPFs, a dual-loop current control approach is explored. e principle of APF is injecting equal magnitude current or voltage 180°phase-shifted to the harmonics in the system. Figure 3 depicts the fundamental block diagram of a typical APF constituent. e reference signal estimator gathers data on all system variables, including harmonic currents, and generates reference current and voltage signals. ese signals are processed by the PWM control unit to send switching pulse sequences to the voltage source converter to produce the compensating current. Comparatively, APFs are more beneficial than passive filters, and are unique in that they suppress both supply and reactive current harmonics.
Additionally, since they do not create resonance with the distribution system, their performance does not depend on system properties. However, APFs have some disadvantages, such as the fast switching devices implemented for control which create high-frequency noise. Consequently, it creates electromagnetic interference (EMI). Figure 4 shows how APF can be classified with reference to the power circuit configuration. In general, the following are the categories of APFs [26]. For the SAPFs, either a current or voltage source converter can be connected to an APF circuit. However, voltage source converters (VSC) are commonly selected for their distinguished topology and simple installation method [27]. A VSC-based general configuration of SAPF has been shown in Figure 5.
It is fundamentally a current source that has a primary function to correct for harmonic current caused by nonlinear loads. e principle of APF is injecting an equal magnitude current 180°phase-shifted to the harmonics generated by load, eventually canceling out the original distortion of the supply current.
A common configuration of the SAPF is using a rectifier and a dc link inductor that effectively dampens the harmonic resonance between the passive filter and the system impedance.

Advances in Fuzzy Systems
SeAPF and SAPF basically have the same configuration except that the matching inductor of SAPF is displaced by the matching transformer whose one winding is connected in series with a distribution bus [28]. e basic scheme of SeAPF is shown in Figure 6.
Generally, SeAPF acts as a component that provides a very high impedance path for unwanted harmonic frequencies and hence isolates them from entering the source. e SeAPF acts like a CVS, providing an offset voltage equal to the harmonics of the source voltage. A high rating isolating transformer is to be used as the system's current magnitude (50-Hz) goes higher, since the power losses scale up according to the system ratings. Eventually, SeAPF has become more expensive than the SAPF scheme. erefore, SeAPFs are generally used when the system is connected with voltage-sensitive equipment which requires the supply voltage to be precisely sinusoidal for accurate operation of the equipment. As shown in Figure 6, the SeAPF arrangement is such that it acts as a component that provides a very high impedance path for unwanted harmonic frequencies and hence isolates them from entering the source. Hence, the unwanted harmonic currents cannot flow between the source and the load.
However, pure APFs have limited capabilities. Instead, HAPFs are used to combine the advantages of PPFs and APFs in order to reduce harmonic content. In this combination, PPFs are designed to provide low impedance routes for harmonic frequency currents, and APF increases the PPFs' performance. us, HAPF gives only the advantages of APFs and PPFs while removing the disadvantages. Advancements in HAPF topologies implemented in various types of power systems have brought a range of HAPFs which are investigated for general or specific power systems [7][8][9][10][11][12][13][14][15]. However, PFFs combined with SeAPF or SAPF make two general configurations for HAPFs. HAPF as a combination of SeAPF and SPPF is shown in Figure 7(a) filter, while a combination of the SPPF (shunt passive power filter) and SAPF (shunt active power filter) is shown in Figure 7(b). [29].
SeAPF redirects high-frequency currents from the load to the low impedance route of SPPF, as shown in Figure 7(a). e SeAPF's safety, on the other hand, is essential because this topology requires the transfer of the sum of the fundamental and harmonic currents. In this case, no matching transformer is used for the daisy chain SAPF and SPPF. erefore, it is known as a transformer with less topology. SPPFs are developed to provide a path with no impedance to the current of the most dominant load frequency, but their filtering efficiency is unacceptable. In this way, SAPF helps PPF to improve filtering efficiency and avoid the risk of resonance.

Experimental Analysis Setup and Results
For reliable, uninterrupted, and fast backup power, UPS systems are employed in various sectors, including residential, commercial, industrial, healthcare, and communication. In some countries, the use of the UPS System is very common due to load shedding, as power generation is not sufficient. Experimental Analysis Setup, Design, and development of a hybrid interface use an optical USB port and a power quality meter as illustrated in Figure 8 for UPS system harmonic analysis linked to a linear and nonlinear load.
Harmonic distortion from UPS systems, inverters, and nonlinear loads has become an issue with the explosive growth of UPS systems [30][31][32]. is work proposes a generic model modified from the usual control structure scheme to evaluate the harmonized generating process. Figure 9 (a-c) shows the Power Quality (PQ) and Energy Analyzer (EA) fluke with Optical USB Interface Cable (OC4-USB) utilized for Experimental Setup to obtain THD Analysis of the UPS System linked with linear and nonlinear load results of these, and a new HAPF with novel fuzzy logic control has been proposed to reduce THD.

Advances in Fuzzy Systems
Experimental tests of various UPS Types have been performed at different nonlinear loads as well as on charging and discharging of batteries, on basis of these experimental results as given in Table.1, proposed fuzzy logic PWM technology which reduces harmonics and compensates for reactive power.
Various types of different rating UPS systems were taken for experimental analyses and tests, with the findings presented in Figure 10. UPS System THD Analysis connected with different types of loads is shown ( Figure 11).
Other experimental tests of UPS/CVCF System (Control Voltage Control Frequency) were performed with higher ratings having maximum THD and results are shown in Figure 12.
It examines the relationship between current harmonics and output power and outlines the causes of current harmonics. Both modelling and experimental evaluation support theoretical conclusions and analysis [1,2]. A general model, adapted from the classic control block diagram, was developed to investigate the harmonic production process induced by a single-phase UPS system. Table 1 shows that locally built UPS without a filter has higher THD losses and very low efficiency.   Based on these results, Single-phase half-bridge HAPF with fuzzy logic controller-based PWM has been investigated particularly for UPS-connected nonlinear loads.
During battery charging and discharging, Table 1 shows UPS efficiency and THD data for various types of loads. Furthermore, according to the results of the experiments, the average harmonic distortion of the UPS system is equal to or greater than 32.63%, and dire need to develop HAPF, to reduce the THD at large compared to other passive and APFs (active power filters) with most efficient and effective method.

Conventional HAPF Topology and Reference
Current Extraction RCE Technique e generation of compensation or reference current extraction (RCE) is one of the primary components of the HAPF. e exact measurement and estimation of the reference current for the controller are significant for the proper function of the APF. As it is illustrated in Figure 13, the APF evaluates the RCE (reference current extraction) signal by detecting the voltage/current signal along with system variable data. e supply voltage, D.C Bus voltage, and corresponding transformer voltage detected by the APF are called voltages variables while currents variables detected by APF are supply current, load current, compensation, and D.C link current. e APFs extract voltage or current as a frequency or time domain reference signal based on both variables. An important part of detection and measurement of the system variables has been widely investigated with many improvements and advancements made in the literature to estimate the reference signal for APF [33,34]. Figure 8 shows the various techniques of the estimation of the reference signal with two main techniques, namely, frequency domain, and time domain. In the frequency domain technique, when reference signal estimate is appropriate for single-or three-phase supply systems based on Fourier analysis, the Fourier transforms method (FTT) is applied.
Firstly, FTT is utilized to achieve the amplitude and phase of harmonics; then time-domain compensation reference signal is then calculated using an inverse Fourier transform (IFT). [35][36][37]. e main disadvantage of the above technique is the time delay in calculating Fourier coefficients and sampling system variables in which, eventually, the response time of the filter will be longer. Consequently, it cannot be used in fluctuating load conditions and is only utilized under fluctuating load scenarios where a quick response time is not necessary. In time-domain approaches, reference signal estimation is performed instantly from the distorted signal. Except for the synchronous-reference-frame theorem, which is only relevant to three-phase systems, these strategies apply to single-and three-phase systems [38]. Following is a brief explanation of each technique.

Instantaneous (p-q) eory.
e reference compensating currents are calculated using the αβ Clarke transformation of the recorded three-phase voltages and currents in this method. Based on these αβ transformations, the instantaneous reactive and active powers are calculated, and the     Advances in Fuzzy Systems oscillating parts, which, with the help of the HPF, really contribute to the formation of harmonics in the system. e filter is fine-tuned to provide the desired results while reducing cut-off frequencies as required by the AF. e exerted part is transformed back to three-phase quantities to achieve reference compensation signals. However, this method can only be used with three-phase sinusoidal voltage systems. Some adjustments to the original p-q theorem were proposed and executed to make it suitable for single-phase systems [39].

Extension Instantaneous (p-q)
Technique. For unsymmetrical and non-sinusoidal voltage systems, the extension of the instantaneous (p-q) theory has been used. In this technique, computation of the instantaneous reactive power is done by displacing the supply voltages by 90°. Unlike the instantaneous (p-q) technique, in this technique, DC components are exerted from LPFs, and then a reference compensating signal can be obtained using inverse transformation. is technique is relatively advantageous in that it is simpler in the calculation of the three-phase reactive and active power quantities [40] and of the fundamentals of the p-q theorem for a single-phase system [41].

Synchronous-Detection eorem (S.D.T).
It is similar to the instantaneous (p-q) method, but it is only applicable to three-phase systems. In this technique, despite the load conditions, it is necessary to assume that the APF maintains the source current and voltage as sinusoidal without phase difference. e actual power (W) of the connected load is computed, evenly distributed over the three phases, and then the calculated compensation current is obtained using simple mathematical calculations [42]. Although this technique is simple, it is generally used for supply voltage harmonics only.

Synchronous-Reference-Frame eorem (S.R.F.T).
For calculating the instantaneous active and reactive current components, reference compensating currents are calculated by converting the voltage and current variables from threephase sources into a synchronous rotating frame (DQ coordinates). In this method, an amount of DC is applied from the main component using a filtration process. It is only used for three-phase systems and its control must be able to interface with DC quantities [43].

Sine Multiplication eorem (S.M.T).
e fundamental component of the distorted load current is estimated using this method by integrating the response obtained by multiplying the distorted load current by the fundamental frequency's sine wave.
e APF drive current is the difference between this fundamental component and the instantaneous distortion in the connected load current. It can be utilized in single-phase and three-phase systems. Although LPFs and HPFs are used for reducing time delay, it is a slow technique to estimate the reference compensation currents mainly caused by integration and sampling [44].

Proposed Harmonic Reference Current Extraction (RCE) Technique Based on DQ with Fuzzy Logic Current Controller (FLCC) for Half-Bridge Single-Phase HAPF
e proposed FLCC single line diagram for single-phase half-bridge HAPF is depicted in Figure 14. e controller is made up of two primary components. e first is an RCE (reference current extraction) from a distorted line current, while the second is a PWM current controller for inverter switching. Whereas, traditional controllers, on the other hand, necessitate an accurate linear mathematical model of the system.
With parameter changes and nonlinear load disturbances, this is challenging to implement. Fuzzy logic controllers (FLCs) have recently been used in a variety of power electronics and active power filter applications [45]. Figure 15 shows a complete simulation of active and ineffective current components with proposed single-phase half-bridge HAPF based on FLCC with Reference current estimators (RCE) and PI controller. e proposed HAPF's power supply circuit is a halfbridge VSI, as depicted in Figure 16. e voltage source inverter VSI involves two MOSFETs, each linked to an antiparallel diode. Selected MOSFETs on their superior performance such as fast switching times, low forward voltage drops, and high power handling. e presented HAPF combines the benefits of dynamic and latent filters, removing the drawbacks of entirely dynamic and inactive filters.

Advances in Fuzzy Systems
FLC (Fuzzy logic controller) has an advantage over traditional controllers in that it does not necessitate an exact mathematical model. It is more reliable than typical controllers and can manage nonlinearity. e distribution system is unbalanced because the distribution lines do not move and the loads are unbalanced. As a result, a hybrid active power filter must be designed that can maintain the THD limit in compliance with the IEEE standard under varied load situations. Figure 17 single-phase half-bridge HAPF based on FLCC for UPS System control block diagram.
In this article, a single-phase synchronous reference frame in equilibrium is simulated in MATLAB to generate the harmonic current reference for the HAPF filter. To achieve the desired reference current, however, just one phase was chosen. Synchronous reference systems transform distorted current caused by a nonlinear load from a static reference system a-b-c to a dynamic reference system d-q [46,47]. e synchronization reference frame for the isolation of harmonic signals is shown in Figure 18.
Current control uses fuzzy logic because the controller does not require an exact mathematical model; the FLCC-based PWM technique is used and works effectively under imbalanced and fluctuating load conditions. It works with inaccurate inputs and could manage nonlinearity. e controller is tested for unbalanced voltage and varying load conditions. Fuzzy logic controllers have also been developed to control constant voltage capacitors. e compensation current reference signal is compared with the predefined hysteresis band around the reference compensating signal in three-phase, and single-phase HAPF/APF is widely used with the hysteresis controller [39][40][41][42][43]. ere is no switching if the compensation reference signal falls within this predefined band as shown in Figure 19.   Figure 15: Proposed single-phase half-bridge HAPF based on FLCC with Reference current estimators (RCE) and PI controller for DC Bus-Voltage. 8 Advances in Fuzzy Systems Consequently, the switching takes place if the reference signal falls out of the band. e performance of the hysteresis current controller has been proven to be exceptional [44,48]. Apart from its exceptionally dynamic performance, it is simple to apply. On the contrary, the generation of non-uniform switching frequencies is the main disadvantage of this controller, which affects the filter's ability to suppress circuit resonance. [49]. Conventionally, linear and hysteresis controllers were adopted to create and obtain the switching pulse for VSC (voltage source converter) by constructing a system model to obtain control laws with model analysis. With conventional techniques, the model needs to be linearized to handle a nonlinear system. To address these problems, new research is carried out for the application of HAPF.   Advances in Fuzzy Systems ability to manage erroneous system inputs, and the ability to handle nonlinearity, making them far more reliable than conventional controllers.

Proposed Fuzzy Logic Current
Fuzzy set theory is utilized for developing fuzzy logic, in that a variable is a member of one or more sets to some degree of membership. [46,47,49,50]. Fuzzy logic allows a machine to replicate human reasoning by quantifying inaccurate input and make inferences based on ambiguous and complete facts, but apply a "defuzzification" process, to obtain a clear response. In [51], PQ improvement using fuzzy sliding mode based PWM control control for UPQC is presented in detail as well harmonic distortion is addressed by using three-phase half-bridge HAPF with fuzzy logic control [52]. A block schematic of a fuzzy logic controller (FLC) is shown in Figure 20. e fuzzy logic controller FLC is made up of three main blocks, each of which has its own working processes and control operation, the specifics of which are listed below: (i) Fuzzification (ii) Inference (iii) Defuzzification 5.1.1. Fuzzification. FLC requires that each input/output (I/ O) variable that defines a control surface be represented in fuzzy notation using the language layer. e linguistic values of each I/O variable divide the complete system into contiguous intervals to produce a membership function. e element member values indicate the range in which the variable belongs to a given level. e process of converting I/ O variables at the language level is called "fuzzification."

Inference.
e control surface performance is directly linked and associated with the system's I/O variables, which are completely controlled by a set of rules. A complex rule of thumb is as under: If p is M then q is N; If p is M then q is N. Each rule is implemented with any degree of truth when reading a collection of input variables, assuming that the assumption is correct and that the changes contribute nearly perfectly to the development of the control surface. When all of the rules are met, the control surface is represented as a fuzzy set to represent the constraint's output. is entire procedure is called inference. e fuzzy inference system (FIS) is consisting of three editors for editing purposes and two viewers which can be termed read-only tools.
(1) FIS-Editor e FIS fuzzy inference system editor solves high-level problems in the system, with the total number of input and output variables AND their names. e MFE (Membership Function Editor) is used to specify the shape of all membership functions associated with a variable. e RE (rule editor) can be utilized to change or rewrite the set of rules that determine the system's operation.
(2) FIS-Viewer (i) Rule (ii) Surface e rule and surface viewers are both read-only options and used for the look-in to system only and opposite to FIS Editor and cannot be used for editing limited to a diagnostic to show how active rules and the shape of individual membership functions affect the results. One of the outputs is dependent on one or two inputs, as indicated by the surface display. at is, it creates and builds a plot of the output surface of the system.
Control rules designing is the definition of rules that associate the input variables with the properties of the output model and is part of the design of fuzzy control rules. Because the fuzzy logic controller is independent of the system model, the design is essentially intuitive. Table. Variables for linguistic rules are provided. Table 2 demonstrates "if-then" rules for five membership functions chosen for each of the input errors (e) and error variation (∆e) variables as defined in the language rule variables. For two inputs, only 15 possible rules are possible, based on the combination "if, then" (5 * 3) � 15. (3) Mamdani Type Inference. e most widely used fuzzy method is Mamdani's fuzzy inference method. Ebrahim Mamdani introduced the Mamdani technique in 1975, and it was one of the earliest fuzzy set theory inference methods. Mamdani Type inference assumes that the membership function in the output is a fuzzy set. After the aggregation procedure, each output variable has a fuzzy set that should be defuzzified. It is feasible to use a single burst as an output membership function instead of using a single burst, which is often much more efficient. With the linguistic concept "if-then," a Mamdani fuzzy controller was chosen and constructed. e following language variables were chosen for the rule base, increase, Very Increase, Constant, Decrease, Very Decrease and due to their simplicity, triangular, and trapezoidal membership functions are utilized. Distributed set is sometimes called the singleton inference membership function and it may be thought of as a prefuzzy collection of fuzzy sets that have been defuzzified. e Mamdani approach, which calculates the center of gravity of a two-dimensional function, is more often used and greatly simplifies the necessary calculations, making the fuzzy process more efficient. Instead of integrating the entire 2D function, use a weighted average of many data points to get the centroid. Sugeno-type system supports this type of model; in general, the system may be used to simulate an inference system with a linear or constant membership function on the output.

Defuzzification.
It is the method of transforming a fuzzy sum into a crisp sum. Defuzzification can be done in many methods. e centroid approach, which employs the formula (2), is the most commonly used method: Here, λ is the affiliation degree of the output. (λ(y)y)dx where λ � output y "degree of membership." e technique of the centroid of area (COA) was considered: For the purpose of defuzzification, HA(y) � defuzz(y, mf, type), Here defuzz (y, mf, type) is the membership function mf, a defuzzified value placed in the corresponding value of the using one of many defuzzification methods on variable y [12], depending on the type of argument. Variables can originate from any of the following categories: (i) lom: largest (absolute) value of maximum (ii) som: smallest (absolute) value of maximum    Figure 21 shows the membership function in a fuzzy inference system. e proposed FLCC generates a gate signal obtained by using fuzzy logic technology after the correct gain is applied to the PWM switching and a PI controller has also been used which maintains the DC link capacitor voltage. Figure 22 shows the fuzzy logic based (FLC) Pulse Width Modulation (PWM) for switching signals generation [30-32, 45, 50]. e five linguistic variables for the first input variable error (e) are named as very low, low, zero, high, and very high, and three subsets have been specified for the second input variable (∆e) called: small, zero, and large. Its derivative (e), which is based on a triangular membership function, the Matlab is used for simulation, in contrast to the usual fuzzy inference model that can be found. MFs for the first input (e) are shown in Figure 23

DC-Bus Voltage Control
e HAPF does not need to supply active power to compensate for the load's harmonic and reactive currents, as well as the HPF's reactive currents, under lossless conditions. As a result, the DC bus capacitor is more than capable of supplying the reactive power required by the proposed HAPFs (hybrid APF). e DC bus capacitor provides reactive energy, which is transmitted between the charge and the DC bus capacitor (DC bus capacitor charging and discharging) to keep the average DC bus voltage at a predetermined level.
Due to switching losses, capacitor leakage, and other factors, the distribution power supply must provide not only the actual power required by the load but also the additional power required by the VSI to maintain the DC bus voltage constant. e DC bus voltage will continue to decline if these losses are not addressed. e PI regulator used to control the Advances in Fuzzy Systems 13 D.C bus voltage is shown in Figure 26. It is observed that when Kp and ki are high, bus voltage regulation dominates, and the steady-state DC bus voltage error is low. e actual power imbalance has little effect on the transient reaction if Kp and Ki are minor. To satisfy the above two control features, the proper selection of Kp and Ki is required. [48].

Simulation Analysis
e simulation model is illustrated in Figure 27 of the proposed single-phase half-bridge hybrid active power filter and circuit parameters are given in Table 3. As UPS load, a parallel nonlinear load with a complete bridge rectifier is used, which is the main source of harmonic generating load.
Simulation Analysis on the proposed HAPF fuzzy logic current controller FLCC has been carried out by simulating a single-phase half-bridge inverter connected to the main ac source and another end with UPS System having nonlinear load generating unwanted harmonics in the system. Source voltage waveform is shown in Figure 29. Figure 30(a) and 30(b) shows distorted waveform and frequency spectrum of the source current, respectively. Overall, 32.63% is THD with a supply current. e source current waveform is significantly distorted, as seen in Figure 30, with a total harmonic distortion of 32.63 percent. e uncontrolled rectifier UPS type load generates a combined harmonic current with 5 th , 7 th , and 11 th order harmonics mainly with the most prevailing harmonic current from 5 th harmonic of the fundamental current. e proposed HAPF can reduce harmonic content to 5%, which is the limit set by IEEE harmonic standards. After adjustment with the use of a current controller, simulation results were produced. Figure 30 depicts the waveforms and frequency spectrum of the current drawn by the load. Figure 31 depicts the waveform and frequency spectrum of the compensating current entering the HAPF PCC.
PI Controller is used to maintaining Vdc Bus Voltage and its waveform is shown in Figure 32. e source current's 5 th , 7 th , and 11 th harmonic components are greatly reduced after compensation, resulting in a sinusoidal source as illustrated in Figure 33(a). After compensation, the frequency spectrum of the source currents is shown, respectively, in Figure 31(b). Table 4 shows the harmonics of the load current, HAPF output current, and source current when using a proposed FLC controller for HAPF. e current drawn by the load before HAPF has a THD of 32.63%; however, the source current using the HAPF based on the fuzzy logic current controller has reduced THD up to 1.09%.
us, it is evident that the filtration efficiency of a HAPF designed using a fuzzy logic current

Advances in Fuzzy Systems
controller is well below the standard 5% THD IEEE-519 standard limit.

Conclusion
In this study, an experimental harmonic analysis of a UPS system is performed and a Single-Phase Half-Bridge HAPF based on the fuzzy logic current controller (FLCC) for Reference Current Extraction (RCE) is proposed. Different power filter topologies have been studied in this research. To ensure proper power filter selection for UPS linked with single-phase nonlinear load, the most prevalent designs have been compared with their benefits and drawbacks. In MATLAB/Simulink, the HAPF with the fuzzy controller was investigated. Higher harmonic frequencies induce voltage flicker, sag, and swell as a result of harmonic vibrations, magnetic losses as a result of increased temperatures, and reduced life and efficiency of electrical devices and transformers. Furthermore, they reduce the life of capacitors and increase the probability of metering and instrumentation devices operating incorrectly. Power filters, both passive and active, can be utilized to solve such issues. Much advancement has been made in APF topologies, which have surpassed passive filters in many ways. HAPFs, on the other hand, were designed for specific types of loads and combined the benefits of passive and active filters for specific applications. is demonstrates that the proposed FLCC controller has a good response and can fix the harmonics present in the source since the THD of the system was decreased from 32.63% to 1.09% using the proposed novel approach.    Harmonics with proposed HAPF based on fuzzy logic current controller (FLCC) 1.09 16 Advances in Fuzzy Systems e system is intended to evaluate the HAPF's fuzzy logic controller's efficiency and effectiveness in terms of HAPF operation connected with UPS system and nonlinear Load.

Data Availability
ere is no dataset involved in the research.

Conflicts of Interest
e authors declare that they have no conflicts of interest.