Modeling of hybrid active power filter using artificial intelligence controller: hardware and software prospective

Received May 1, 2021 Revised Sep 27, 2021 Accepted Oct 4, 2021 The power factor is a significant concern in power systems. The significant power loss occurred due to electronic and electrical equipment damages affected by the deviation of physical characteristics, including voltage, current, and frequency parameters. The power loss and quality issues were resolved by introducing filtering techniques in electronic and electrical equipment. Most of the available filtering methods use proper compensation controlling approaches and failed to minimize the total harmonic distortion (THD), and harmonic mitigation in power systems has its best. In this article, an efficient hybrid-APF using an artificial-neuro fuzzy interface system (ANFIS) for software and hardware perspective is designed. The proposed approach uses hybrid controlling strategies which include PI with artificial intelligence (ANFIS) controller, to control the power losses for H-APF. Additionally, current compensation is achieved by power quality (PQtheory), followed by hysteresis-current-controller (HCC). The hardware architecture of ANFIS with HCC is designed to improve the chip-area for real-time power applications. The present work analyzed by simulating the voltage and current waveform. The proposed-H-APF using ANFIS controller, both software and hardware approaches, is compared with other control techniques like H-APF with PI and Fuzzy logic controller by concerning THD, reactive power, and different harmonics and loads improvements.


INTRODUCTION
With the recent advancement in technology, smart grid technology, and industrial reforming, the power system's demand for power requirements is high. Using more electronic and electrical devices in power systems makes it difficult to achieve the power quality goal. The power failures affect the power systems due to malfunctioning electronic or electrical equipment. The business environments need smart and compact computers; smart relays, uninterruptible power supply (UPS), and programmable logic controllers (PLCs) are significant power consumption equipment. The business and home applications power supplies are compulsory and invest more amounts in preventing power loss. The power quality degradation is happening due to frequency mismatch, swell, sag, voltage regulation, phase deviation, flickers, and harmonics. An extensive power system's monitoring and operation analysis is expensive to improve the PQ [1], [2]. The harmonics are mitigated using filtering techniques passive, active, and hybrid approaches in power systems for larger industrial and control applications with advantages, THD reduction with <5% as per IEEE 519 standards, and reactive  [3]. These harmonics are mitigated using different methods based on interference avoidance, proper supply of current/voltages, and various mitigations techniques like reactorsbased, transformer-based, and filtering-based approaches [4]. There are many works already carried out on H-APF by many researchers.
The hybrid approach of APF with PF is connected in series is classified based on filter, supply system, and converter based. The controlling strategies [5]- [9] are designed based on signaling conditioning, reference signal generation, firing signal generation, and DC-link control strategy. The reference signal generation is classified based on the time and frequency domain. The most commonly used reference signal generation technology is based on time-domain [10], including PQ method, DQ method, indirect current control mechanism, and notch filter-based approach, predictive and iterative approaches. The DC-link control mechanism includes PI, fuzzy logic controller (FLC), Slide mode approach, adaptive controlling, and neural network approaches.
In this article, The H-APF modeled using a hybrid control strategy approach. The artificial intelligence approach like ANFIC controller with PI controller is introduced in shunt-APF. In addition to that, the reference current compensation using PQ method and HCC for firing signal generation is also used to model the hybrid active power filter. The H-APF is modeled both on software and hardware approaches with THD and power quality improvements.
Section 1 explains the background of the H-APF with different current and voltage control mechanisms for a power system. Section 2 describes the detailed architecture of hybrid-APF with hybrid controlling strategies like the combination of PI with FLC/ANFIS controller both in software and hardware approaches. Section 3 discusses the simulation results and comparative analysis of different design controllers for THD and reactive power improvements. Section 4 concludes the overall work with THD and power improvements and future work.

REVIEW ON RELATED RESEARCH
This section elaborates the existing approaches of H-APF using different controlling techniques and different compensation methods for different loads for power quality improvements. Belaidi et al. [11] present the 3-phase shunt-APF using FLC for compensating the unbalanced source voltage. The phase-locked loop is used to control the S-APF for source voltage. The PQ-theory-based phase lock loop (PLL) is used for current reference generation with a fuzzy logic controller (FLC) and HCC is used to generate gate pulses for the V-I inverter. Thuyen [12] explains a new design for H-APF using the social spider algorithm (SSA). Artificial spiders achieve the measured current for an inverter, and the reference current is calculated using PQ-theory followed by PWM. Behera et al. [13] present a 3-phase hybrid filter using fuzzy-based PI controller to reduce the harmonics mitigations for the power distribution system. The controllers are used vector-based PI (VPI), which improves the system's robustness and transient performance.
Similarly, FLC with VPI improves the THD for the mains current of the power systems. The H-APF with an adaptive current controller is designed by Chau [14], which improves the dynamic response, better online control for harmonic cancellations. The neuro fuzzy-based control system has a prediction and identification mechanism with a cost function to mitigate harmonics of the main H-APF.
Kumar and Bhat [15] present a hybrid filter using FLC, which includes seven fuzzy rules set for controlling the error inputs to generate the reference current, followed by a Pulse generator for an inverter. The direct current (DC) voltage settling time has improved than the PI controller approach. A very few researchrelated works are happening on artificial neural network (ANN) based controlling mechanisms for power quality improvements for the extensive power system. Choudhary et al. [16] present a controlling strategy of artificial intelligence-based single-phase S-APF is designed, which includes predictive and adaptive controllerbased ANN with Adaline with 25 rule sets. The THD has improved for ANN-based controller than the predictive controller. The indirect current controller mechanism is incorporated using fuzzy based single vector PWM for H-APF by Somlal et al. [17]. The SVPWM generates the gate pulses for voltage-source-converter to improve the power quality for distribution systems. Balasubramanian et al. [18] present fuzzy logic-based-H-APF with a non-linear controlling mechanism using DQ theory. The current loop uses 5 rules set and 7-set for voltage control loop in FLC based H-APF. The series H-APF with fuzzy sliding mode (FSM) controlling technique is incorporated by Das et al. [19], compared with HCC with THD improvements.
Shahalami and Hosseini [20] present ANN controller H-APF for wind turbine applications, improving the processing time by reference current cancellation at the transient and steady-state conditions. Pedepenki et al. [21], [22] present a neuro fuzzy-based controlling mechanism for H-APF, which is compared with the conventional PI-based controller with THD improvements. Sandhya and Nagaraj [23] discuss the contribution to the study of power quality enhancement and various aspects of power quality and current trends. Sahu and Mahapatra [24] present all-on-chip-based distribution static synchronous compensator (DSTATCOM) control-based power quality improvement using virtex-5 field-programmable gate array (FPGA). The all-on-chip acts as a digital controller, including a conventional PI controller, low-Int J Pow Elec & Dri Syst ISSN: 2088-8694  pass filters, HCC, instantaneous power calculator, and sequence detector. This digital controller is used to compensate for the reactive power and also mitigate the current harmonics. The complete model is developed on the Xilinx system generator tool and convert to HDL for implementation on the chip. Balasubramanian et al. [25] describe the shunt hybrid compensator using the control method on the hardware platform. The compensator mainly contains passive filters, an insulated gate bipolar transistor (IGBT) inverter as an active filter, and a DC-link capacitor. The control method like synchronous rotating reference frame (SRRF) is used in the shunt hybrid compensator. The simulation results of the compensator are represented as 3-phase VI current/voltage waveforms for rectifier fed RC load and non-linear load conditions. The THD of 4.3% and 4.7% for balanced and unbalanced load is achieved respectively for shunt hybrid compensator with 26V DC link voltage. Sychev et al. [26] present the shunt-active filter to analyze the efficiency parameter by varying the source and load parameters. The shunt active filter is modeled in five different ways. Its power quality indicator values like THD, current, and voltage degree of corrections, voltage dips, and deviations, and current consumption are analyzed. Thentral et al. [27] describe the hybrid active power filter using PQ-theory and space-vector pulse width modulation (SVPWM) method. The design uses a 7 th tuned harmonic passive filter connected series with an active filter to mitigate the THD. The design obtains THD of 8.32%, 3.35%, and 3.15% without using hybrid active power filter (HAPF), HAPF using PQ-theory and HAPF using SVPWM.
The review of the existing approaches for H-APF is software approaches with modeling and very less on hardware approaches with more chip area. The existing controlling strategies are conventional and induvial approaches for H-APF, which cannot improve the power quality and THD improvements to a great extent. The proposed system overcomes these problems with hybrid controlling strategies.

PROPOSED WORK
The hybrid-active power filter (H-APF) is designed to improve the reactive power and harmonic mitigations by using different current controlling techniques. The H-APF is designed using different design controllers like PI, FLC, and ANFIS controller and analyzes the performance analysis in terms of THD and reactive power. The H-APF detailed architecture is represented in Figure 1. The H-APF is a combination of passive-filters and shunt-APF connected in series, which includes mains alternating current (AC) source, RL components connected with non-linear load, and passive filter shunt-APF. The H-APF detailed architecture includes 3-phase AC main connected to nonlinear load, passive filter, and shunt-APF. The non-linear has 3-phase RL with six diodes united in parallel along within unbalanced load connection. The passive filter is connected in a series with universal bridge-based shunt-APF to reduce the harmonics, and the bridge ends with DC-linked capacitors C1 and C2. The controlling compensation techniques are introduced to improve the current and voltages using PQ method. Different controllers like PI, FLC, and ANFIS controller are explained in detail in the below sections.

PQ method
The PQ method commonly used and popular technique used to improve the power in central power systems. The voltage and current waveform values are expressed by three-phase instantaneous space vectors (αβ0). This 3-phase current (I) and voltage (V) values are transformed to αβ0 values with each phase difference of 2π/3. The mathematical equation for the voltage and current conversion using Clark's transformation is expressed in (1) and (2), respectively.
The abc to αβ0 transformation is achieved for 3-phase source voltage and load current. The zero sequences are not continued for further transformation in the 3-phase system. The instantaneous p-q power is analyzed with voltage and current αβ transformation using the as shown in (3).
The p and q are compensated using oscillatory values (pac, qac) and average values (pdc and qdc). The low pass filter eliminates the average values. The Compensating current reference generator (CCRG) receives the compensated values from the controller. The CCRG of αβvalues are transformed into ABC values using inverse Clark's transformation and are expressed in (4).
The transformed ABC values are used as reference current (Icabc) values and used in hysteresis current control (HCC). The PQ method for current compensation along with PI and FLC/ANFIS controller is represented in Figure 2. The three phases Vs and Iload are inputs to abc to αβ0 transformation using (1), (2) followed by PQ calculation using (3), (4). The final reference current generation is achieved using inverse Clark's transformation on (4). The shunt-APF performance is improved and enhanced by DC-Link voltage.

PI controller
The proportional-integral (PI) is widely used in the control system for industrial applications. The PI finds the loss of the DC voltage and DC-reference voltage in H-APF's. The block diagram of the picontroller is represented in Figure 3.   = . + ∫ .
The integrator accumulates the error signal concerning sample time. The discrete form of PI controller output controls the DC-link voltage and plays an essential role in the compensation stage.

Fuzzy logic controller (FLC)
The FLC is used to process the data by allowing partial set membership than crisp membership. Fuzzy logic is a logical system and controlled by fuzzy control. The FLC is a better choice for many industrial control system applications and is used in most sectors like science, power systems, technology, and other industries. The current and power are easily compensated using FLC.FLC achieves the source current harmonic distortion reduction and performance improvement of H-APF. The architecture of FLC is represented in Figure 4. It is having mainly fuzzification, rule base, control rule evaluation, and defuzzification. The inputs to the FLC are an error (E), or variation of error or change in error (CE), and one output (OP). Fuzzification is a process that converts the real (crisp) number (numeric variable) to a fuzzy number (linguistic variable). The fuzzification receives the error (E) and its variation (CE) signals as crisp values into fuzzy systems. The Fuzzy systems (or variables) are addressed by linguistic values: fuzzy sets or subsets. These fuzzy sets or subsets are addressed by membership function concerning low, high, medium, big, and small.
The rule evaluator makes decision logic to control the linguistic rules which are stored by the rule base. The ruleset plays a crucial in system performance improvements. The basic fuzzy set with AND (intersection), OR (union), and NOT (complement) are applied for the evaluation of fuzzy rules. Defuzzification is the reverse process of fuzzification, which converts the linguistic variable to a crisp variable. Theses linguistic variable generates the output crisp (real) variables as per real-time requirements. The database stores the fuzzifier and defuzzifier membership functions.
The fuzzy rule set has 9 rules tabulated in Table 1. The Error (E) and change in error (CE) are allocated as negative big (NB), zero (CZ), and positive big (PB). For the FLC design module, the mamdani FIS type is selected, the fuzzification of two inputs (E and CE) is set by generalized bell-shaped membership function (gbellmf), and the output membership function is triangular shaped (trimf). The defuzzification is done by the centroid method.

Artificial neuro-fuzzy interface system (ANFIS) controller
The extension of FLC is ANFIS, which realizes the fuzzy interface system (FIS) by neural networks automatically. It provides permission to access the combination of numeric and linguistic variables. It is capable of generating a linguistic variable to a numeric variable. The prime objective of the ANFIS is to use a neural network (NN) to optimize the FIS. The FIS can interpret from one variable to others and integrates the meaningful data, whereas an artificial neural network (ANN) provides a strong learning potential skillset. The FIS system used in the FLC is similar to ANFIS. The FIS has two inputs E and CE and output (OP). The error input is obtained from the PI controller output, and CE is derived from the same PI controller output, which includes constant DC voltage and capacitor DC voltage.
The dataset is generated from the DC voltages and save in data file format. First, design the FIS with a new membership function for the ANFIS controller, then load the data set from the saved location to train the data. The generated ANFIS system is used for training using a hybrid optimization method with error tolerance. Finally, test the FIS system to generate the final neural network output and is represented in Figure 5. For the ANFIS designer module, The Sugeno FIS type is selected, the fuzzification of two inputs like E, CE, and the output membership function is set by triangular shape (trimf). The defuzzification is done by the weight averaging (wtaver) method. The same ruleset from Table 1 is retained for the ANFIS controller. The error and change in error have three membership functions includes negative big (NB), zero (CZ), and positive big (PB), is represented by (6) and (7), respectively.
Similarly, the output of the ANFIS has three linguistic variables and is represented as shown in (8).
The neural network (NN) is the heart of the ANFIS controller. The ANFIS is trained with the initial dataset produced by the previous FIS. The neural network generates new FIS, and the same ANFIS is placed in an overall system for the next interaction.

Hysteresis current controller (HCC)
The HCC generates the Pulses or gate signals for H-APF; it works based on the feedback mechanism. The switching gate signals are given when the error limitation crosses the given tolerance value in H-APF. The hardware architecture of HCC using a system generator is represented in Figure 6.
The PQ method generates the compensated reference three-phase current (Irabc), and the measured current (Imabc) from the source input to the HCC model. The switch or relation operator (>=) receives two inputs and compares them. The switch generates three gates g1, g2, and g3. The inversion of g1, g2, and g3 areg4, g5, and g6. Totally six gates are generated based on a multiplexor; any of the gates is input to the IGBT inverter (Universal Bridge).
If (Ira>= Ima), then g1 will be activated (switch ON); otherwise, g4will be activated. Similarly, if (Irb>= Imb) then g2else g5 gate pulses, and If (Irc>= Imc), g3 else g6 gate pulse is generated. The switching control of the hybrid-APF using HCC is achieved to generates the gate pulses and input to the Universal Bridge (IGBT Inverter).  Figure 6. Hardware architecture of HCC using system generator

RESULTS AND DISCUSSION
The hybrid-APF (H-APF) modeling is designed using MATLAB-Simulink tool for software approach, and Xilinx system generator for hardware approaches. For simulation, configure the tool by selecting the simulation type-discrete, Solver-Tustin, and sample period of 5µsec. The H-APF is compared with other different design controller techniques concerning THD, real power (KW), and reactive power (KVAR) of source voltage and current. The Modelling parameters considered as a specification for different design controller techniques are represented in Table 2. The 3Ф-AC source voltage 400V with a frequency of 50Hz is selected for different design controller techniques to mitigates the harmonics and improve the reactive power. The experimental setup is conducted for non-linear load, load with PF, harmonic filter, S-APF, and H-APF, H-APF fuzzy logic controller (FLC), H-APF artificial neuro-fuzzy interface system (ANFIS) controller with software approach to generate the THD and reactive power results. The H-APF using ANFIS controller with hardware approach also included. The hybrid-APF using ANFIS controller-based software and hardware approaches generate the three-phase Vs, Is, Vload, and Iload waveforms. The PQ method and HCC compensation technique are included in software-based approaches. Only the HCC compensation technique is used in hardware-based approaches, and both are represented in Figure 7 (a) and Figure 7 (b).
The FFT analysis of percentage THD results is obtained after simulating the different controller technique models with load is represented in Figure 8. The Three-Ф source with proposed hybrid-APF using PI controller obtains 2.29% THD, hybrid-APF using FLC obtains 1.85 % THD, hybrid-APF using ANFLC obtains 1.73% THD, and hybrid-APF using ANFIS controller (hardware approach) obtains 1.95 % THD, for source current, are represented in Figure 8  The THD calculation is generated at 0.3 sec simulation time. The hardware-based H-APF with ANFIS controller is designed by Xilinx system generator (Sysgen) by selecting artix-7 FPGA. The HCC and PI with ANFIS controller blocks are designed using the Sysgen tool. The rest of the blocks is retained from the Simulink models. The resources are estimated as per Artix-7 FPGA configurations and tabulated in Table  3. The overall design utilizes 138 slices, 54 flip-flops, and 204 LUT's. The resources are utilized < 1% on Artix-7 chip.  The 3-phase source current's THD is calculated concerning different design controllers at a constant simulation time of 0.3 seconds, represented in Figure 9. The THD of source current phase-a 'Isa,' and phase-c 'Isc' are almost similar after shunt-APF. The THD calculation concerning time for different design controllers is represented in Figure 10 by selecting phase 'a' source current. The ANFIS controller (hardware) place significant growth from 0.1 sec with a more considerable margin than other techniques.
The THD is a central part of the Electrical modules to reduce the harmonics in main power systems as per IEEE 519 standards. The THD calculation concerning harmonics and loads for different design controllers is represented in Figure 11 and Figure 12 by selecting phase 'a' source current, respectively. The ANFIS controller (hardware) places better THD than other techniques for both different harmonics and loads.
The THD calculation (%) of Is for load and different design controller techniques is tabulated in Table 4. The non-linear load achieves 10.33 % THD without filtering techniques. By using a shunt passive filter achieves a 10.55 % THD reduction over the non-linear load model. The harmonic filter achieves a 7.17 % THD reduction over the passive filter only. The shunt-APF filter achieves a 71.66%THD reduction over the harmonic filter. The hybrid-APF using PI controller achieves 6.11 % THD reduction over shunt-APF filter for source current. Similarly, The H-APF using FLC achieves 19.21 % THD reduction over hybrid-APF using PI Controller. The H-APF using ANFIS controller achieves 6.48% THD reduction over hybrid-APF using FLC. The H-APF using ANFIS controller (hardware) achieves 16.51 % THD reduction over hybrid-APF using PI controller.   The percentage of reactive power is calculated for load, and different controller techniques are tabulated in Table 5. The reactive power for a non-linear load is 12.06%, the H-APF using ANFLC uses 5.05 % KVAR and the H-APF using ANFIS controller (hardware) uses 4.238 % KVAR. The reactive power for H-APF using ANFIS controller (hardware) utilizes 15.32 % less than H-APF using the ANFIS controller (software) approach.
The HAPF using ANFIS controller achieves the THD of 1.73 and 1.92 for software and hardware approaches, which is relatively better than the other controlling approaches. The hardware-based HAPF module using ANFIS uses 4.238 KVAR of reactive power, which is relatively less than other controlling approaches. The proposed HAPF using ANFIS controller provides better harmonic mitigation and improves reactive power than other controlling approaches. The proposed work reduces the switching losses and filters the higher-order harmonics, which offers a low cost for the implementation of HAPF in real-time. The proposed work is suitable to use in most of the power electronic applications for power quality improvements.