Distribution system power quality compensation using a HSeAPF based on SRF and SMC features

The purpose of this paper is to describe the design of a Hybrid Series Active Power Filter (HSeAPF) system to improve the quality of power on three-phase power distribution grids. The system controls are comprise of Pulse Width Modulation (PWM) based on the Synchronous Reference Frame (SRF) theory, and supported by Phase Locked Loop (PLL) for generating the switching pulses to control a Voltage Source Converter (VSC). The DC link voltage is controlled by Non-Linear Sliding Mode Control (SMC) for faster response and to ensure that it is maintained at a constant value. When this voltage is compared with Proportional Integral (PI), then the improvements made can be shown. The function of HSeAPF control is to eliminate voltage fluctuations, voltage swell/sag, and prevent voltage/current harmonics are produced by both non-linear loads and small inverters connected to the distribution network. A digital Phase Locked Loop that generates frequencies and an oscillating phase-locked output signal controls the voltage. The results from the simulation indicate that the HSeAPF can effectively suppress the dynamic and harmonic reactive power compensation system. Also, the distribution network has a low Total Harmonic Distortion (< 5%), demonstrating that the designed system is efficient, which is an essential requirement when it comes to the IEEE-519 and IEC 61,000–3-6 standards.


Introduction
As more power technology is implemented globally, there is an increasing number of power system quality issues. Current and voltage harmonics have a negative impact on power production efficiency, transmission, and utilization. An Active Power Filter (APF) is a power electronic device that produces and injects a compensation current and/or voltage into the power grid to help mitigate power quality issues. Improving the quality of power will help reduce the cost of distributing power to the supplier, and therefore, the consumer, it will help reduce the cost of operations. Improving power quality can be achieved by either an active or passive power filter (Altawil et al. 2012). Active Power Filters (APFs) inject controlled amounts of currents or voltages using power electronic converters to counter the effects of electric network harmonics (Narayan and Lakshminarayana 2018;Altawil et al. 2012;Golestan et al. 2020).
With the advancement in the development of APFs, the application of these devices in compensation applications has increased. APFs can also be utilized in compensating harmonic dumping or supply voltages between different networks of power distribution. APF provides advanced custom solutions for issues related to power quality, particularly voltage and current disturbances. In previous studies (Altawil et al. 2012;Al-Masri et al. 2019;Narayan and Lakshminarayana 2018), this power condition has been used for compensation of either current harmonics with Shunt APF (ShAPF)/ DSTATCOM, voltage swell/sag with Dynamic Voltage Restorer (DVR) or improve power quality (both current and voltage) by use of a Unified Power Quality Conditioner (UPQC). Other studies (Altawil et al. 2012;Smadi et al. 2019;Emin et al. 2013) have also reported the use of ShAPF to alleviate current quality problems. ShAPF is limited to only solving the issue of quality with the current, whereas and the latter controller can solve all problems related to power quality, it has several drawbacks due to its size and complexity of control. In the current work, a solution has been proposed to overcome power quality issues related to both current and voltage, where a series active power filter has been used to mitigate harmonics and voltage swell/sag. In contrast, harmonic currents are improved by using a passive filter.

Literature review
Previous research works there are some the researchers in this field are summarized as follows: The problem is an intuitive fractional-order fuzzy controller for a three-phase (APF) is constructed that utilizes a backstepping and variable structure controller to correct active power and normalize the DC voltage. To address the solution of a variable fuzzy controller is proposed to better estimate the unidentified period in the controller, and in order to compensate for a proportional sliding mode surface. You can make changes to the parameters of this problem while live. Also, a variable fuzzy controller is proposed, and the system that utilizes a fractional-order sliding mode surface for addressing the problem of THD is also contrasted. The methodology will be applied in the study for it will direct the investigation in contrast to conventional integer-order sliding surface control strategies, a dynamic sliding-mode fuzzy logic controller, along with a backstepping control strategy, which utilizes conventional integer-order sliding surface control strategies that have been extended for use in the APF design. And the last one is: This system identifies and configures the parameters using an intuitive control strategy and a fuzzy controller while concurrently tracking the unidentified nonlinear period. The study used the proposed algorithm use the In SimPower Toolbox / MATLAB, a virtual controller fractional backstepping sliding mode control (FBSMC) is used to achieve the results. The final results for the THD values are 24.71%, 1.5%, 1.39%, and 1.83% between the proposed fractional back stepping sliding mode adaptive fuzzy controller, and 24.71%, 2.33%, 2.30%, and 2.37% for the said controller with integer-order (Fei et al. 2019).
The problem is UPQC dc link voltage controlled with non-linear sliding (NLS) for sag/swell, current harmonics, and voltage unbalance compensation. To address the solution of the variable damping ratio is more desirable for eliminating the nonlinear term's problem on the closedloop system, as the output moves closer to the desired reference position. Improved dc link voltage control from a faster response and lower overshoot thanks to UPQC. The study used the proposed algorithm use the Real-time performance analysis was conducted at Opal-RT Lab's laboratory using Opal-RT Lab's systems. To gain more insight into the methodology, the study will implement a nonlinear sliding surface, which is reliant on varying the DC link power flow. The final results at the end of the day, the results showed that the NLS controller's results were closer to reality than those of the controllers proposed by other groups. THD and PI of the NLS Controller is 4.28% and 3.37%. The NLS-Controller is rated at 9.89 kW, and the PI-Controller is rated at 9.25 kW. Reactive power is utilized in the NLS-Controller 16VAR, and PI-Controller 44VAR (Patjoshi and Mahapatra 2014).
The problem is assessing the using a power conditioner combined with non-linear power quality control helped overcome the problem of linear (UPQC). This controller is built with a sliding mode control, with both active and reactive power theories, and interactive use in mind. A UPQC a APF in shunt and one in series together as part of a common dc link capacitor that was connected to all the systems in the facility. To address the solution of the (1) deliver a fast response time, (2) plus full compensation for voltage sags and swells, (3) outstanding performance in a power system that is prone to voltage fluctuations (4) Optimal performance in the face of inconsistent networks. The study used the proposed algorithm use the UPQC simulation was performed in MATLAB software, and the sliding mode controller was used SMC. The methodology will be applied in the study for to connect Combination of instantaneous active and reactive power and SMC theories. A non-linear controller's capability was proven through simulation in the MATLAB toolbox, and the results from the conventional PI controller were used to compare the controller's performance. The final results compensated PI controllers make the system 25.96 percent compensated; SMC controllers, however, only add up to 2.44 percent. A comparative study looks at the voltage and current THD of the network and the uncompensated (UN) network, where the PI controller is applied, and the uncompensated UN network, where the sliding controller is used. A THD of 11.38% is associated with uncompensated voltage and current, while a THD of 29.12% is attributed to compensated voltage and current. 3.73% with the sliding controller, as opposed to 3.73% with the fixed controller, has a combined deviation of 3.68%, whereas 3.53% overall deviation. The product has been developed to withstand unbalance operating systems. About 11% of the uncompensated network's unbalances are out of balance, while 9% of the compensated network's unbalances are out of balance (Mojtaba et al. 2018).
The problem is assessing the lack of a balanced current and the power system causes a high-performance optimization technique to be needed for a Multifunctional grid-tied inverter (MFGTI). To address the solution of the harmonic, reactive, and negative sequence current element in the Positive Fundamental Components Estimator (PFCE) estimator can be used to estimate those three components. This is an open-loop algorithm with little computational power required PFCE. Thus, appropriate robustness is obtained while keeping computational overhead at a minimum. The study used the proposed algorithm use the MFGTI control system is designed using the instantaneous power theory concept. Redesigned bus controller built on variable mode concept as a methodology PFCE the SMC is useful because of its good dynamic productivity and tolerance to fluctuation in input variables. The PFCE's implementation of the system is capable of delivering active power, canceling harmonics, generating reactive power, and ensuring the overall system is balanced under non-ideal main voltage conditions. The final results will illustrate that (1)-the (MFGTI) results in correction for current and spectra in the normal operating conditions THD. Prior to adjustment, they were 19.7% for the primary current and spectrum, as well as 18.4% for the THD. Before compensating the THD, the results were: 19.7% for the primary current and spectrum, as well as 18.4% for the spectrum and primary current THD. Before compensation, experimental results show a primary current and spectrum value of 18.2% THD, which are consistent with measurements using a passive filter, an SMC, and a THD of 8.4%. PFCE, PI, and a THD of 3.6% were additionally measured using the same techniques. The preliminary results obtained under an unstable main voltage: unstable primary current: It is found that the primary current and spectrum both use the LSCN, LPF, and SMC when under unstable main voltage is applied. Under unstable main voltage (the condition found in experiments conducted under that condition) the experimental results demonstrate that the primary current and spectrum both use LSCN, LPF, and SMC. (Safa et al. 2018).
The problem is assessing the document introduces an innovative method based on diffusion slip pulse width modulation (FSMPWM) and (SEHAPF) to generate control signals for THD reduction. To address the solution of the reactive power is adjusted by using hybrid filters on the transmission line to curtail harmonic distortion and reduce their variance when the load or power source fluctuates. To accomplish this, the methodology study has developed a power factor and a power factor neutral system. FSMPWM is implemented using a Mamdani fuzzy rule that triggers fixed pulses, the proposed method reduces the noise vibration response by controlling the narrow insulating coat between the sliding surface. The research employed the proposed algorithm for FSMPWM Control of SEHAPF. The final results the conclusion states that the THD % assessment of the primary current used in SEHAPF compared to HCC or FSMPWM produced better results. We have three sections to measure the THD for load voltages: between FSMPWM and HCC. This implementation of SEHAPF the THD without SEHAPF the THD has a THD of 35.06 percent, HCC the THD has a THD of 4.60 percent, and FSMPWM the THD has a THD of 2.36 percent. Without SEHAPF, the THD is 35.08%, HCC is 4.83%, and FSMPWM is 2.46%. Third, the THD without SEHAPF is 35.11%, HCC is 4.56%, and FSMPWM is 2.39% (Das et al. 2018).
The problem is assessing the output lag pulse frequency fluctuation in a hybridized an inductor-capacitor (LC)coupling (HAPF). The LC Oscillator's increase in resistance, which represents the series current ratio, affects the current non-linearity of the inverter, and produces unpredictable short duration pulse to switchable power semiconductor drivers. To address the solution of the leads to reduced system efficiency. The first step will be to conduct an analysis of the output lag control of the HAPF to see it is contrast to a linearized one. The study used the proposed algorithm use the HAPF into three regions of operation: linearized, quasi-linear and non-linearized. These operations were performed using PSCAD/EMTDC. The methodology will be applied in the study for to make sure the HAPF's inverter current slope can be linearized using output lag control, the methodology will focus on defining the corresponding requirements for process lag bandwidth and sampling time. If unexpected trigger signals are generated, triggering devices and HAPF compensating performances could be adversely affected. Finally, In the experiment and in the simulation, the results are compared of a three-phase and single-phase power supply systems with the output lag controller results for HAPF to find out how the data compares. The final results the findings conclude that, there were three things to test for: linearized voltage under load quasi-linear and non-linearized to assess THD of the voltage under load and THD of the system current: (1) For non-linearized: current THD was 5.6% and voltage under load THD was 27.3%.
The HSeAPF employs a control strategy where a pre-set value of reactive voltage is delivered to the power network to balance the voltage, eliminate harmonics, and keep the DC link voltage at the pre-set value. In summary, the current work contributes the following:  , 2014), and therefore, needs to be satisfied in a power distribution system. This paper is organized in subsequent sections as follows: Section II: This section highlights system configuration, including the calculation of important parameters. Section III: The system's schematic diagrams and control strategies have been presented and discussed in this section. Section IV: In this section, the results from MATLAB / SIMULINK are presented and analysed. Section V: Research conclusions.

Configuration of the System
In this section, the HSeAPF system modelling has been presented and analysed. Figure 1 comprises an AC Thevenin equivalent of a three-phase source, shunt passive filter, series active filter, and non-linear load. The series active filter (SeAPF) and the Passive Filter (PF) together form the HSeAPF, which is in turn connected to the Point of Common Coupling (PCC) via an interface transformer in each of the phases. The quality of voltage is improved by the SeAPF, while the current harmonics are eliminated by the PF. The reference voltage for the PWM simulated gate triggering pulses is generated by the SRF operated on PLL. An ideal source can replace the battery to feed the capacitor of the DC link, whose voltage can be controlled using the SMC to maintain it at an appropriate level.

Parameter's selection of system
In order to compensate for voltage swell/sags and fluctuations, and harmonics from either the load or supply side, the HSeAPF normally functions as a voltage regulator. The problems mentioned above are eliminated by injecting an appropriate amount of voltage or harmonic components into the PCC through the coupling transformer. The passive filter will reduce the effect of 5th, 7th and 11th current harmonics. Thus, the current passing through the series Voltage Current Control (VSC) is the as the current in the grid (Safa et al. 2018).
The importance of the DC link is that it helps to stabilize the ripples which are produced by the high frequency switching circuits. Furthermore, it helps in balancing the fluctuating instantaneous power that is injected into the power network. The ripple current is simply the total rootmean-square value of the amount of current that can pass through a capacitor without causing it to fail. The DC link capacitor stabilizes and smoothens the injected currents or voltages. The DC link voltage ðV dc Þ is influenced by the modulation depth ðmÞ -which is taken as 1, and the peak phase voltage ðV phÀpeak Þ. The magnitude of the DC link voltage should be ! 2 Ã V phÀpeak (Singh et al. 2015), and is calculated using the equation: Based on the above equation, an RMS voltage of 230 V gives a peak phase voltage of 325.27 V, considering that the minimum required value of DC link voltage = 650.5 V. Here, the selected value of DC link voltage could about 700 V. The sizing of the DC link capacitor is dependent on the power requirements and the magnitude of DC link voltage. The following energy balance equation is applicable for the DC link capacitor: In Eq. 2 above V dcÀmin represents the minimum DC bus voltage required, k represents the energy variation factor throughout dynamics, I Se represents the series phase current of the compensator, t is the minimum time that can be taken to achieve steady value after disturbance.
It is considered that the SeAPF handles 0.5 of the system's kVA rating, and twice the KVA handling capability for n cycles under transient conditions. The following equation gives the instantaneous reactive power: For i ¼ a; b; c:Where, k reperesents the phase rotations, and V se represents the compensation voltage. Given that the filter does not generate active power, the sum of reactive power gives zero, i.e.
The compensation for a swell/sag according to the design of the SeAPF is 0.25 pu, that is, V Se ¼ 81.3 V. Therefore, the minimum voltage to be injected at a DC link voltage of 700 V leads to a low modulation index for the series compensator. Operating the SeAPF with minimum harmonics requires the use of a series transformer, whose turn ratio is given by: The transformer rating is given by: The ratio of the transformer turns obtained from Eq. 5 is N Se ¼ 4:001 ' 4, and the transformer rating from Eq. 6 is S Se = 8.5 kVA when the grid is under swell/sag. The interfacing conductor of the series compensator is rated depending on the ripple current are either swell, sag or fluctuation, DC link voltage and switching frequency. The rating value is given by: In the above equation, f sw represents the switching frequency -12 kHz (Devassy and Singh 2017), while I ripple represents the inductor current ripple, taken as 20% of the grid current. Hence, the value of L se ¼ 2:405 mH.
The shunt passive filter is a second-order damped filter comprising L-C components in a parallel arrangement. The PF accommodates the flow of low impedance sink for harmonic frequencies towards the grid. For all harmonic frequencies, the PF offers low impedance, but at fundamental frequency, it offers large impedance. The impedance of the passive filter can be obtained using the equation: At frequencies lower than the fundamental frequency, one of the impedances of the filter is inductive capacitive for all higher harmonics. Therefore, L pf and C pf are selected such that at the fundamental frequency, they give a maximum Z pf The resonant frequency desired is 60 Hz, and is given by: Fig. 1 Schematic Diagram of the HSeAPF based on SMC and PLL-SRF

Control OF HSeAPF
The control of the HSeAPF is connected to the utility system in series is through a matching transformer to prevent harmonic currents from reaching the supply system or to recompense for load voltage distortion. It is programmed to provide zero impedance to the fundamental frequency at the PCC and high impedance to harmonic frequencies to prevent harmonic currents from entering the system. It injects the necessary voltage for compensation of voltage harmonics, voltage sags /swells in dynamic voltage restoration, voltage flicker, and other voltage disturbances at the PCC. With line impedance and shunt passive filters, it can also be utilized to dampen harmonic propagation induced by resonance. For recompensing voltage-source nonlinear loads, the series active filter works well. The series active filter's role is to isolate current harmonics between the load and the source, not to directly compensation for the load's current harmonics. The disability of the series active compensator to directly compensation for current harmonics, balance the load current, suppress neutral currents, and recompense for reactive power is a disadvantage. It also carries full load current and must be able to tolerate high power ratings. If the filter's transformer fails, the load will be cut off from the power supply. Series active filters are either voltage or current sources that can be controlled. In addition, the PF compensates for harmonics created by the load current. fThe quality and performance of the APF depends partially on the modulation and control method used to implement the recompence schema. Several control strategies can be used to regulate the current produced by the filter: variable switching frequency, such as hysteresis and SMC allow direct control of the current but make the design of the output filter quite difficult as well as the reduction of the noise level. PWM control removes these problems, but the dynamic reply of the current feedback loop reduces the ability of the filter to recompense for fast current transitions. Several algorithms in time and frequency domains are proposed to extract or estimation recompensing harmonic references for controlling the APFs. The most prevalent are the time-domain methods such as the notch filter, the instantaneous reactive power theory (IRPT), (SRF) theory, high-pass filter method, lowpass filter method, unity PF method, SMC, passivity-based control, (PI) controller, flux-based controller, and sine multiplication method. The chief advantage of these timedomain control methods compared to the frequency-domain methods based on the fast Fourier transformation (FFT) is the fast response obtained. On the other side, frequency domain methods provide accurate individual and multiple harmonic load-current detection (Altawil et al. 2012;Al-Masri et al. 2019;Narayan and Lakshminarayana 2018;Altawil et al. 2012;Golestan et al. 2020). The most important of the available methods is the SRF-based PLL for the inverter and the SMC used for the DC link. The latter has been used in this current.

PLL Algorithm
A PLL is employed to help in phase-detecting grid voltages and extracting the fundamental voltage signals from the system based on their phase difference.
The design of the PLL technique is such that it functions properly in varying conditions of voltage distortion. There are three-phase grid voltages in Fig. 2 that have been detected, measured and applied as input signals to PLL. The angle of transformation is evaluated as output of the PLL. Upon evaluation, a product of the line voltages and auxiliary feedback currents alongside three-phase auxiliary instantaneous active power signals and unity amplitude is obtained. The frequency of the loop is controlled by the error between the signals (M. Allehyani, H. Samkari and B. K. Johnson2016). When the two signals have a phase difference, the signals will have a varying frequency. A phase detector compares the frequencies of the oscillator output and the input signal (Dash and Ray 2018). This enables it to generate an error signal corresponding to the phase difference created by the two signals. Based on how precise the PI gains are tuned, The PLL technique can operate effectively under distorted grid voltages. In this research work, the PLL circuit and SRF control scheme have been used in system design.

Synchronous reference frame
The reference compensating voltages which the series transformers need to inject are calculated using the SRF control algorithm. The signal generation algorithm for reference voltage depends on the PLL scheme and SRF algorithm (see Fig. 1).
The three-phase voltage supplied is detected by the interface transformer in the reference frame abc, before conversion to a d-q-0 component to evaluate the reference load voltages according to Eq. 11 below: The d-axis v d and q-axis v q components that are obtained comprise average component and oscillating component: The components shown in Eqs. (13) and (14) above are as a result of the unbalanced grid voltage with harmonics. Oscillating components show that there exists harmonics as well as negative sequence components of the grid voltages, which are caused by conditions created by distorted load. Conversely, the average components show that the voltages have positive sequence components. The presence of zero sequence components v 0 show that there are unbalanced grid voltages. Both zero and negative components are fixed to zero in order to cancel the unbalanced voltage, harmonics, and distortions in voltage signals. On the other hand, the positive sequence component passes through the LPF to achieve the average value.
To obtain the voltage amplitude for compensating source voltages (V sa , V sb , V sc ), the value of AC voltage at the source (V Source ) is calculated using the equation below: is the output of the inverse transformation in Eq. (12), which is compared with the actual load voltages (v La ; v Lb ; v Lc Þ in sinusoidal PWM controller, producing the switching signals for the Insulated Gate Bipolar Transistor (IGBTs) in SeAPF.

The DC bus controller
The operation of a HSeAPF is greatly influenced by DC bus dynamic performances. The distribution system is very dynamic, which makes the regulator to be insensitive to load condition, main voltage and system parameters. Thus, a fast response is required to match the rapid changes in grid fluctuations, making it an alternative of the PI controller used in Altawil et al. (2012) The derivative of x 1 is the second state variable x 2 : The control term in SMC, y = sgn (r) is defined as follows: The switching functions y 1 and y 2 are defined as follows: In Eq. (21) above, z is the switching function, while c 1 and c 2 are positive constants. The SMC output is calculated using the equation: A low-pass filter with a frequency of 30 Hz is added to minimize the oscillations in the SMC output.

Results and discussion
The efficiency of the proposed HSeAPF-based Phase Locked Loop-Synchronous Reference Frame (PLL-SRF) and SMC controllers control system was tested on MATLAB/SIMULINK using the parameters presented in Table 1. The SMC controller is used in a three-phase HSeAPF system to control the voltage across DC link capacitor and compared with a conventional PI controller. A diode-rectifier bridge (three-phase) that feeds RL load functions as load that produces harmonic current. Some scenarios have been considered in the simulation analysis. These include a step change in load for transient performance, adding a fifth and seventh harmonics to the source voltage to create up to 20% of nominal source voltage harmonics, and creation of 0.2 pu of swell/sag for several cycles. Two different cases were considered in this research for analysis of HSeAPF performance.

Case study 1
Ability of HSeAPF to compensate load currents and source voltages under sag and harmonic conditions as follows: The simulation results for the proposed HSeAPF approach, voltage swell, and harmonics conditions are given in Fig. 4. In this case, a Nonlinear load has been used in the load side with a Total Harmonic Distortion (THD) of 32.3%, 5th and 7th voltage harmonics with a 20% magnitude from the source side between the time (0-0.2) sec and a voltage swell with a magnitude of 20% is between the time (0.2-0.35) sec. Figures 1(a), (b) show the source voltages, and it is harmonic spectrum with a THD % = 12.3. The load current and the correspondence are depicted in Figs. 4 (c), (d). We can see that the 5th 7th and 11th are the highest harmonics magnitudes.
As illustrated by enlarged results, Fig. 5(a), (b) and Fig. 6(a), (b) show the load voltage profile (using PI with a 320.6 V and 321.7 V using SMC controllers) is maintained at a desired level irrespective of voltage swell and/or voltage harmonics in the source voltage magnitudes, However, the SMC control shows better performance with (THD = 3.75%) over the PI controller with (THD = 5.0%). During the swell compensation, as viewed from Figs. 5(a) -(c), and Figs. 6(a) and (c).
On the other hand, Fig. 5(c), (d) and Fig. 6(c), (d), show the source currents profile after compensation using 3 sets of PFs and using PI and SMC controllers for controlling the DC-link respectively. It could be noticed that the load currents have been compensated successfully to have source current magnitudes with (I s = 32.08 A and THD = 4.88%) in case of using PI controller and (I s = 32.98 A and THD = 4.08%) while using SMC controllers for the DC-link.
Both controllers maintain self-supporting dc link voltage and kept the voltage at a pre-set level, However SMC shows faster response time and less oscillation than PI controller.

Case study 2
Ability of HSeAPF to compensate dynamic nonlinear load and voltage sag and harmonics: In this case, the performance for controlling the DC link voltage of HSeAPF using SMC and PI controllers is considered. The comparison criteria is constructed based on the stabilization time of DC link voltage during transient load and disturbance on the supply voltage conditions. Fig. 7 The performance of the HSeAPF for controlling the DC link voltage with SMC and PI controllers for load transient, voltage harmonics and voltage sag conditions are analyzed in the following figures. The distinct features of the proposed HSeAPF approach are outlined as follows.
(1) As illustrated by enlarged results, Fig. 9(a), (b) and Fig. 10(a), (b) show the load voltage profile in the case of using PI and SMC controllers in the DC-Link voltage control. This load voltage has maintained at the desired level irrespective of voltage sag and/or voltage harmonics in the source voltage magnitudes.
However, the SMC control shows better performance (with a magnitude of 322.6 V And THD% = 3.85) On the other hand, Fig. 9(c), (d) and Fig. 10(c), (d), show the source currents profile after compensation using PI and SMC controllers in the DC-Link voltage control, respectively. It could be noticed that the load currents have been compensated successfully to have source currents magnitude and harmonic spectra after compensation with (Is = 32.38 A and THD% = 4.78) using PI and (Is = 33.08 A and THD% = 3.02) using SMC controllers for the DC link voltage. Here we can notice that the THD has farther decreased using SMC, which is due to the better compensation of the voltage harmonics by the SMC which in turn reflects on the reduction of the current harmonics. Fig. 11.

Conclusion and future work
The primary objective of this paper was to examine and evaluate how HSeAPF can influence the distribution of disturbances and current harmonics such as voltage swell/ sag and non-linear load in grid voltages. The simulation performed using MATLAB/ SIMULINK software show how effective the HSeAPF is under different scenarios. The performance of the proposed system was verified under two simulation study scenarios of current harmonics and voltage swell/sag. Based on the simulation results, the proposed system can effectively compensate for swelling/ sagging voltage at the grid side, voltage harmonics and current harmonics on the load side. The SMC and PI controllers all maintain self-supporting DC link voltage so that the system voltage is maintained at an appropriate level. Contrary to the PI controller, the SMC shows a quicker response time and less oscillation. In addition to a fast response, SMC is very robust in comparison to the conventional PI controller. In Future work, this study can be to build the hardware in some scale to prove your simulations are accurate, if we cannot build the whole  Source voltage, and its harmonic spectrum c and d load current, and its harmonic spectrum respectively under dynamic nonlinear load, voltage harmonics and sag conditions Fig. 9 a, b Compensated load voltage, and its harmonic spectrum c and d Compensated source current and its harmonic spectrum respectively using PI controller under dynamic nonlinear load, voltage harmonics and sag conditions Fig. 10 a, b Compensated load voltage, and its harmonic spectrum c and d Compensated source current and its harmonic spectrum respectively using SMC controller. Under dynamic nonlinear load, voltage harmonics and sag conditions system may be a part of it that can be tested in the lab. The obtained harmonic spectra %THD for load voltages and source currents falls within the 5% limit, which is acceptable by IEEE-519 and IEC 61,000-3-6 standards.
Acknowledgements The authors thank the anonymous reviewers forgiving their valuable comments and helping us to improve the quality of the paper.

Data Availability
No data were used to support this study.

Declarations
Conflicts of Interest The authors declare that they have no conflicts of interest.
Ethical approval All procedures performed in studies involving human participants were in accordance with the ethical standards of the institutional and/or national research committee and with the 1964 Helsinki declaration and its later amendments or comparable ethical standards. All applicable international, national, and/or institutional guidelines for the care and use of animals were followed.
Informed consent Informed consent was obtained from all individual participants included in the study.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.