1 Introduction

Recent years, power system networks have been involvements different issues like as the utilisation of fossil fuels and the thermal generation that generates the power with critical factor emissions that are depleted fuel, expensive and pollution [1]. Renewable energy resources (RES) can overcome limitations of conventional resources such as global warming and pollution etc. [2]. The worldwide take consideration about power safety, global warming and environmental problems is an essential part of enabling the flexibility and stability in the power system. When using RES in a power system which produces a high increase rate of stability and flexibility conditions. The distribution systems and transmission systems also affect the stability condition due to the penetration of RES [3]. Because the transmission systems and distribution systems experience continuous evolution from RES, it is required to coordination and monitoring of the system to enable the safe operation, stability maintenance, consistent and effective operation. The continuous monitoring of the system with RES that will improve the competence of the system.

The RES system efficiency can be increased by the controlling of power electronic devices in the power system. These controlling methods are increasing the quality of consumers in a distributed system with RES [4]. RES operation surely affects the usage of hybrid research. The hybrid system can be described as the grouping of one or additional renewable resources connected in the system. The HRES can be coupled with a distributed system to meet load requirements. From the RES, PV and WECS are the furthermost progressive renewable resources. The HRES is connected in distribution systems creates the problem of instability condition [5]. Especially PQ problems will be increased in the system such as swell, sag, disturbances, interruption, and harmonics and so on. Owing to PQ problems, the voltage level of the distribution system will be oscillating and creates a tripping problem. The reliability of the system affected due to occurrence of continuous tripping behaviour [6]. Tripping problem con is recovering by operating grid standards.

In the power system, PQ problems of voltage swell and voltage sag are considered as the main problem. The voltage sag and swell create the power in the consumer side by providing low power from HRES which will affect the power electronic devices and loads. This power quality issues can be overcome by flexible AC transmission systems (FACT) devices and filters in the power system [7]. Numerous devices are available and divided based on series devices and shunt devices. The series devices (DVR and SSSC) that recompense the voltage in REG based power systems. Similarly, shunt devices (STATCOM, DSTATCOM and TCR) recompense the voltage in a power system [8]. The FACT device compensates the power quality issues by injecting the required voltage level and maintain a stable voltage level. DSTATCOM has two control modes, adjust the load voltage inside of control of voltage and another one is injecting reactive and harmonic components in current mode [9, 10]. The FACT device also controlled with essential control technique to manage stability condition in distribution systems. The proper control must be required to avoid power quality issues and maintain stable condition with HRES based distribution systems. The main organisation and contribution of the paper is presented as follows.

This paper mainly concentrated to mitigate the PQ issues in HRES system with grid connected load system. The proper control structure and FACT device surely selected to the mitigation of PQ issues in the system. The main contribution of the paper is presented as follows; The HRES system is designed with PV, WT and BESS. Based on wind speed and irradiance level conditions, the PV and WT have generated the power. The BESS is used to store the excess power and provide essential power to meet load demand when PV and WT struggle to provide the power to required load demand conditions under partial shading and environmental conditions. The HRES system is connected with the grid system which connects towards the linear load, non-linear load, unbalance the load and critical load conditions. The interconnected system may be introduced PQ issues of sag, swell, disturbance and harmonics in both current and voltage signals. The PQ issues affect the stability and reliability of the system which mitigated with the help of UPQC device. A FOPID controller with ASO based control strategy is designed in the UPQC device which enables the HRES to mitigate PQ faults and compensate load demand. The controller is continuously supplied electricity to compensate load demand and absorb excess energy from the HRES system which used to inject the required power to meet the load demand requirements and mitigate PQ issues. This controller is designed in the UPQC device which worked with two different controllers such as series active power filter controller and shunt active power filter controller. The proposed control strategy is designed and validated by connecting non-linear load, critical load and unbalanced load conditions in the grid side. Three different PQ issues are used to analyse such as sag, swell and disturbances which created by applying non-linear load. Additionally, harmonics are analysed with two scenarios such as before connected with UPQC and after connected with UPQC device. The performance of the proposed methodology is compared with existing methods are PI controller, GSA, BBO, GA, GWO, ESA and RFA.

The left-over section of the paper is prearranged as follows, the related works towards PQ mitigation are revised in Sect. 2. The projected system architecture with descriptions is presented in Sect. 3. This section contains the mathematical modelling of RES components in the proposed design and detail description of the UPQC also presented. The proposed design with control structure is described with detail in Sect. 4. The description of FOPID controller and usage of the optimisation algorithm is presented in Sect. 5. Section 6 contains the detail description of ASO and updating functions also presented. The results and discussions of the proposed method are analysed and validated in Sect. 6. At las, Sect. 7 concludes the paper.

2 Literature Review

Many different methods to mitigate the PQ problems with integrated FACT devices by researchers. Some of the works related to PQ problem mitigation are reviewed in this section.

Hamdan et al. [11] developed fault ride through (FRT) capability with static synchronous compensator (STATCOM) for reactive power compensation to improve stability of grid connected PV/Wind hybrid power system under the grid disturbance condition. The hybrid system consists of a 1 MW PV system and 9 MW doubly fed induction generator (DFIG) based wind farm. The hybrid system was connected with 100 MVAR STATCOM at the Point of coupling (PCC) bus. Under the voltage sag condition, the dynamic performance of the hybrid system was analysed with STATCOM controller. The developed STATCOM controller was analysed with the 50% of sag condition. Pavan Kumar Naidu et al. [12] developed coordinated PQ theory and functional order proportional integral derivative (FOPID) with distributed power flow controller (DPFC) to reduce the PQ problems. The DPFC device was used to the mitigation of current harmonics, swell and sag which operated in series and shunt controller. The PV/Wind was considered as input sources of distribution systems. Lakshmi Kanthan Bharathi et al. [13] introduced unified power quality conditioner (UPQC) with WECS to reduce the voltage variations and harmonics. Inappropriate current and voltage can be reduced with the assistance of FACT device like UPQC. The UPQC was modelled with series and shunt active power filter (APF) in a continuous manner which has a conventional DC capacitor. The DC capacitor was a significant component to achieve a preferred performance in UPQC. Additionally, modified grey wolf optimization (MGWO) was introduced with a PI controller in WECS for reducing voltage and current variations and reduction of harmonic elimination. Krishna Sarker et al. [14] presented improved FACTS such as UPQC topology, static Compensator and dynamic voltage restorer (DVR). The FACT device is connected with a custom power controller. The developed system was designed with wind, solar, distributed generations (DGs) and proton exchange membrane fuel cell stack which are connected towards the microgrid. The PQ problems were compensated with the help of UPQC, STATCOM and DVR. The control process was enabled with the help of space vector pulse width modulation-based hybrid bottom leg multilevel inverter. Senthilkumar et al. [15] introduced heuristic-based adaptive control technique (ACT) in the UPQC for compensating PQ problems in power systems. Different types of PQ issues are available, from that voltage sag can be a severe problem that destroys of DC voltage regulation. The PI controller with the conventional technique was fixed the gain values based on error among actual dc-link voltage and reference dc-link voltage at sag scenario. The adjustment of gain values of series and shunt filter which compensate sag and swell values of distribution systems. The conventional controller is not capable to reduce the voltage disturbances by changing the gain values. The model reference adaptive system (MRAS) has been utilised to online self-tuning of the PI controller, similarly, the ANFIS has been used to offline self-tuning of the PI controller.

The techniques for the mitigation of PQ problems with integrated FACT devices have performed well but these techniques are not completely solved the problem. In [11] FRT with STATCOM was introduced to compensate for power quality issues. But this method has a threat that it may cause damage or disconnect the inverter at the fault condition in the grid. Authors of Ref. [12] introduced coordinated PQ theory with DPFC for compensating power quality issues. But in this method the voltage and current grades of the VSI was high, so it improved cost. In Ref. [13] a UPQC with WECS was introduced to compensate power quality issues. Nevertheless, in the UPQC device, dc-link voltage maintenance was difficult. An improved UPQC was used in Ref. [14] for compensating power quality issues but in this technique no active power injection. In Ref. [15] a heuristic-based ACT and UPQC was used to mitigate power quality issues. This design required linear functional expressions that fail to compensate for the PQ problems at nonlinear conditions and parameter variation. A proper PQ issue mitigation technique should overcome most of the problems noticed in the above literature. So, a novel control technique with FACT device will be developed and designed with HRES for the compensation of PQ problems like voltage sag, swell and disturbances etc.

3 Proposed System Model with a Description

The urbanisation and industrialisation process enhance the usage of utilities thus it increases the load demand in the system. The conventional generation source not able to compensate required power demand in recent power system due to its security and power reliability issues. To mitigate these problems, distributed energy sources and renewable energy sources have been used. The HRES system is considered as the most advanced system which can increase efficiency and reliability of the system. The HRES can be coupled with the distribution system to meet required load demand from the consumer side which creates the stability and flexibility problem of power quality issues. Due to the adaption of HRES in grid-connected system, the power quality issues arise which must be avoided to enable stable operation and flexibility of the system. The FACT device is considered as one of the main solutions to solve PQ problems like voltage sag, sell, disturbance, and interruption. Hence, in this paper, UPQC is introduced in the HRES to compensate for these power quality issues. The proposed HRES consists of PV, Wind system that connected with the grid. The HRES is connected with a grid which develops the power quality issues because of nonlinear load, critical load and sudden loads [16]. This creates the problem of reactive power mismatch and raises voltage instability. The UPQC can be the best selection of the device to enhance the voltage regulation in grid connected HRES by mitigating power quality issues. The proper regulation of UPQC is enhanced with the development of FOPID controller. The controlling parameter of FOPID is optimally achieved with the assistance of ASO. The block diagram of the projected technique is illustrated in Fig. 1.

Fig. 1
figure 1

System model description of the proposed method

In Fig. 1 the system model is given, in which PV, WT and battery are connected with a grid system. The renewable energy sources are used to compensate consumer load requirement. The battery is utilised to store excess power from PV and WT system and provide essential power at critical conditions. The power quality issues of grid connected HRES system are considered as the main problem to maintain stability and reliability conditions. A UPQC is designed with a grid connected HRES system to compensate for PQ problems like sag, swell, and interruption. The UPQC is used to compensate PQ problems by control techniques in series as well as shunt filer. The FOPID controller is used to provide best gain parameters to filters for injecting essential power to compensate sag and swell conditions. The FOPID control parameters are optimised with the help of ASO. PV system is the best solution to produce electricity from solar energy without avoiding greenhouse gas emission, stability with un-rotating units, long lifetime, high reliability and low maintenance. The PV system consists of cells connected with series to attain required voltage; the PV modelled is referred from Ref. [17]. The wind turbine generated the output power based on wind speed under a specified hub height, the WT model is taken from Ref. [18].

Battery supplies to load demand when the power generated from the HRES is insufficient. The battery capacity is computed and designed based on the reference autonomy day (AD) which presented below Eq. (1) in the condition of the required power demand of the system.

$$B^{capacity} = \frac{{Autonomy\; day \times P^{L} }}{{\eta^{I} \times \eta^{B} \times DOD}}$$
(1)

where, \(DOD\) is the depth of discharge rate of the battery, \({\eta }^{B}\) is the efficiency of the battery, \({\eta }^{I}\) is inverter efficiency and \({P}^{L}\) is demand power. AD is defined as the total number of days in which battery able to provide power to compensate load demand [19]. In the HRES system, when extra power generated from RES which used to charge the battery. The battery power is computed based on the below equation,

$${B}^{P}={P}_{PV}\left(t\right)+{P}_{wT}\left(t\right)-\frac{{P}_{L}\left(t\right)}{{\eta }^{I}}$$
(2)

where, \({P}_{L}\left(t\right)\) is load demand of system and \({B}^{P}\) battery power. In the battery, state of charge (SOC) is an important parameter that related on the extra generation of energy and deficiency of energy in HRES which presented below, Where, \(\mu\) is a battery self-discharge rate. In the proposed design system, it may affect by power quality issues such as sag, swell, voltage interruption and so on. The power quality issues must be solved in the system to enhance the stability of the system which attained with the use of UPQC device in the HRES system. The UPQC model used in this work is referred from Ref. [20].

$$SOC\left( t \right) = \left\{ {\begin{array}{*{20}c} {SOC\left( {t - 1} \right)\left( {1 - \mu } \right) + \left( {P_{PV} \left( t \right) + P_{wT} \left( t \right) - \frac{{P_{L} \left( t \right)}}{{\eta^{I} }}} \right)} \\ { \times \;\eta^{B} ,P_{PV} \left( t \right) + P_{wT} \left( t \right) > P_{L} \left( t \right) } \\ {SOC\left( {t - 1} \right)\left( {1 - \mu } \right) + \left( {\frac{{P_{L} \left( t \right)}}{{\eta^{I} }} - P_{PV} \left( t \right) + P_{wT} \left( t \right)} \right)} \\ { \times \;\eta^{B} ,P_{PV} \left( t \right) + P_{wT} \left( t \right) < P_{L} \left( t \right)} \\ \end{array} } \right.$$
(3)

4 Description About Control strategy

HRES are chosen to meet energy load requirements in the distribution system and avoid pollution problems, which generate the required power without unwanted emission of gas and global warming problems. The power quality issues in HRES is mitigated with the help of UPQC. The performances of UPQC device are improved with the design of proper control strategy in the system. A FOPID controller with ASO is proposed in improve the performance of UPQC in HRES system. The control techniques of UPQC is divided into two scenarios such as series active power filter and shunt active power filter. Initially, the reference voltage is calculated with the help of phase locked loop (PLL). After calculation of the three-phase voltage which is changed into d-q axes by dq transformation process (Clarke transformation) [21,22,23]. The power filters also used in this process to control the UPQC to resolve the power quality issues in the system [24,25,26].

4.1 FOPID Controller

The proposed FOPID with ASO algorithm is used to compensate power quality issues of voltage and current disturbances in HRES system. The different controllers are available to tune the parameters such as proportional integral (PI), Proportional Integral Derivative (PID) controller and so on. Compared to conventional controllers of PI and PID, the FOPID controller provides the best freedom of degree because it has five parameters which provide the best results in the controller part. The error voltage and error currents values are reduced by providing optimal pulses to FOPID controller. The optimal pulses related to minimisation of error voltage and error current is selected with the consumption of ASO algorithm. The FOPID controller improves the control process of UPQC device with series and shunt active power filter for reducing power quality issues in HRES system. The detail description of the FOPID controller is presented in this section. The FOPID controller can be used to reduce the error signals, suppress undershoot and overshoot problems in the signal, increasing the speed of response of the controller which are main factors to attain the best performance to reduce the error voltage and error current by super controlling of HRES system. The FOPID controller can improve system performance, attain the property of iso-damping easily and less sensitive to the change of parameters. The general form of FOPID controller is defined as [27, 28],

$$G\left(s\right)=\frac{u(s)}{e(s)}={K}_{P}+\frac{{K}_{i}}{{S}^{\lambda }}+{K}_{d}{S}^{\mu }, (\lambda ,\mu \ge 0)$$
(4)

where, \(G\left(s\right)\) is described as the transfer function of FOPID controller in HRES system, \(u(s)\) is described as controller output and \(e(s)\) is described as the error signal of HRES system. The design structure of FOPID controller is illustrated in Fig. 2. The control signal of the FOPID controller is mathematically formulated as,

Fig. 2
figure 2

FOPID control structure

$$u\left(s\right)={K}_{p}+{K}_{i}{D}^{-\lambda }e\left(s\right)+{K}_{d}{D}^{\mu }e\left(s\right)$$
(5)

where, \({K}_{p}\) is described as proportional parameters, \({K}_{i}\) is described as integral parameters, \({K}_{d}\) is described as derivative parameters, \({D}^{-\lambda }\), \({D}^{\mu }\) is described as fractional order parameters and \(e\left(s\right)\) is described as an error signal which computed from the series and shunt active power filters. The error signal is computed by reference parameters with actual parameters under different load conditions. The error signal is reduced with the assistance of FOPID controller. The FOPID controller parameters are optimally selected by ASO algorithm. The PQ problems of voltage and current in the HRES system is mitigated with the assistance of projected controller. The detail description of ASO is presented in the subsequent unit.

5 Atom Search Algorithm

The ASO is designed related to basic molecular dynamics. Related on synthetic and physical structure, the particles are made and it is the littlest unit of a substance compound. The particles have comparable substance properties and it made out of iotas by covalent bonds which shift enormously regarding size and multifaceted nature. To think about the nuclear framework, all the iotas are associate with one another and moves in steady movement which present in the condition of strong or fluid [29, 30]. The molecule's structure is exceptionally mind-boggling in the conditions of minute cooperation’s. In the ASO calculation, the nuclear movement follows the old style mechanics. The ASO is working dependent on head attributes of iota framework that communication power among the molecules. The underlying is the repugnance to the pressure that repulses at short proximity of crowdedness. The second is the fascination that pulls in iotas together, for example, fluid and strong states. Based on the separation range, the atoms attract each other in ASO. The interaction of atoms is generated potential energy which called as Lennard–Jones (L–J) potential energy. The L–J potential energy among ath and bth atoms is mathematically formulated as below equation,

$$M\left({R}^{ab}\right)=4\varepsilon \left[{\left(\frac{\sigma }{{R}^{ab}}\right)}^{12}-{\left(\frac{\sigma }{{R}^{ab}}\right)}^{6}\right]$$
(6)

where, \({R}^{ab}\) is described as the position of ath atom in 3D space, \(\sigma\) is described as length scale that represents the collision diameter, \({\left(\frac{\sigma }{R}\right)}^{12}\) is described as repulsive interactions, \({\left(\frac{\sigma }{R}\right)}^{6}\) is described as attractive interactions and \(\varepsilon\) is described as the depth of the potential which also called as strength of the interaction. The Euclidean distance of ath and bth atoms is computed based on the below equation,

$$R^{ab} = X^{b} - X^{a} = \sqrt {\left( {X^{a1} - X^{b1} } \right)^{2} + \left( {X^{a2} - X^{b2} } \right)^{2} + \left( {X^{a3} - X^{b3} } \right)^{2} }$$
(7)

Based on the potential energy of atoms, the interaction force is presented as follows,

$${F}^{ab}=-\nabla M\left({R}^{ab}\right)=\frac{24\varepsilon }{{\sigma }^{2}}\left[{2\left(\frac{\sigma }{{R}^{ab}}\right)}^{14}-{\left(\frac{\sigma }{{R}^{ab}}\right)}^{8}\right]{R}^{ab}$$
(8)

The complete interaction force on the atoms is presented as follows,

$${F}^{a}=\sum_{\begin{array}{c}b=1\\ b\ne a\end{array}}^{N}{F}^{ab}$$
(9)

where N is described as a total number of atoms in the ASO algorithm. In the ASO, all particles in the populace are repulse or pull in one another dependent on separation work. Here, the light particles move towards the heavier molecules. Heavier particles have littler acceleration which used to accomplish best outcomes in nearby spaces. Thus, lighter iotas have more prominent speeding up that used to discover new encouraging districts in the total hunt space. The ASO is used to generate optimal pulses of the FOPID controller parameters. The initial population of ASO is error values and FOPID controller parameters. The optimal pulses are generated based on a fitness function. The optimisation problem of FOPID controller parameters are formulated as follows,

$$Fitness \;function = Min\left( {e\left( s \right)} \right)$$
(10)

The fitness function must follow the constraints of ASO algorithm which formulated as follows,

$$LB \le e\left( S \right) \le UB, LB = \left[ {LB^{1} , \ldots ,LB^{D} } \right],UB = \left[ {UB^{1} , \ldots ,UB^{D} } \right]$$
(11)

where \(LB\) is described as lower bound, \(UB\) is described as upper bound and D is described as a measurement of the search space. To mitigate the problem of minimisation function, the atoms are generated with N atoms. The location of atoms is presented as follows,

$${X}^{a}=\left[{X}_{a}^{1},\dots ,{X}_{a}^{D}\right], a=1,\dots ,N$$
(12)

where, \({X}_{a}^{D}\) is described as the position of ath atom in ASO. In the initial iterations of ASO, each atom interacts with other atoms through the repulsion or attraction procedure. The repulsion can be maintaining a strategic distance from the over a grouping of molecules in ASO. The untimely union conduct of the calculation is improving investigation capacity in the total pursuit space. At the point when the cycle is finished, the repulsion progressively diminished and fascination bit by bit builds that analyses to exploration diminishes and the exploitation increments. The complete process of the ASO algorithm-based steps are presented in the following sections.

Initialisation: ASA begins the streamlining by producing a lot of random arrangements. The particles update their speeds besides positions in every emphasis and the situation of the best atom find so far it likewise refreshed in every single cycle. Furthermore, the acceleration of particles goes under the two sections. The fundamental one is the collaboration force presented through L–J potential that typically is the vector total of the aversion and fascination from different particles. The subsequent one is the required power presented by the bond length potential that is every particle and the best iota weighted position distinction. All the computation of the refreshing can be performed intelligently till the stop model is fulfilled. The position and the fitness estimation of the best atom are returned as the guess to the global optimum.

Fitness evaluation: The fitness function is the optimal gain parameters are selected based on the objective functions. The fitness function is mentioned in Eq. (10).

Compute the mass and C neighbours: To compute the simplest level of the fitness function. The mass of its atom can be computed as,

$${M}^{a}\left(T\right)={e}^{-\frac{{Fit}^{a}\left(T\right)-{Fit}_{best}^{a}\left(T\right)}{{Fit}_{best}^{a}\left(T\right)} }$$
(13)
$$m^{a} \left( T \right) = \frac{{M^{a} \left( T \right)}}{{\mathop \sum \nolimits_{b = 1}^{N} M^{b} \left( T \right)}}$$
(14)

where, \({Fit}_{best}^{a}\left(T\right)\) are the minimum fitness value and \({Fit}_{worst}^{a}\left(T\right)\) can be described as the maximum fitness value at the Tth iteration. \({Fit}^{a}\left(T\right)\) Can be represented as the fitness function value of the Tth iteration of ith atom. The C neighbours can be computed based on the below equation,

$$C( T ) = N - ( {N - 2} ) \times \sqrt {\frac{T}{t}}$$
(15)

In ASA algorithm, the exploration in the initial phase of iterations, the apiece and every atom requires with as numerous atoms with best fitness parameters of the k neighbours. And improvement of exploitations of the at last phase of iterations, atoms required to interrelate through as some atoms with fitness parameters as it C neighbours. The C neighbours can be computed based on Eq. (13).

Interaction force and acceleration computation: The interaction force and acceleration of the properties of the atoms can be computed, it is a sum of the parameters with random weight replaced on the ith atom after the different atoms of force is represented as follows,

$${F}_{a}^{D}\left(T\right)=\sum_{b\varepsilon best}^{n}{random}_{b}{f}_{ab}^{D}\left(T\right)$$
(16)

where, \({random}_{b}\) can be taken as a random number in [0, 1]. The acceleration can be computed based on the below equations,

$${G}_{a}^{D}\left(T\right)=\alpha \left(T\right)\left({X}_{best}^{D}\left(T\right)-{X}_{a}^{D}\left(T\right)\right)$$
(17)

The Lagrangian multiplier can be defined as the below equation,

$$\alpha \left(T\right)=\beta {e}^{-\frac{20T}{t}}$$
(18)

where \(\beta\) can be defined as the multiplier weight.

Updating process: The simply the procedure, the velocity also position of the ith atom at the condition of (t + 1)th iteration is formulated as follows,

$${V}_{a}^{D}\left(t+1\right)={rand}_{a}^{D}{V}_{a}^{D}\left(t\right)+{A}_{a}^{D}\left(t\right)$$
(19)
$${X}_{a}^{D}\left(t+1\right)={X}_{a}^{D}\left(t\right)+{V}_{a}^{D}\left(t+1\right)$$
(20)

After the process of updating, the best solution can be selected to attain the fitness function to mitigate power quality issues. Based on the fitness functions, the gain parameters of FOPID controller can be selected. The final condition should be checked before the use the optimal solutions that are maximum iteration achieved and constraints are checked. The optimal solutions are used to achieve the optimal power flow of the HRES system. With the utilisation of the ASA algorithm, the power quality mitigation of the system can be achieved. The performance of the proposed methodology is analysed in the below section with detail.

6 Performance Evaluation

The HRES grid connected system with a proposed controller is evaluated based on voltage, current and fault conditions such as sag, swell, voltage distortion and harmonics with total harmonic distortion (THD). The parameters are analysed with and without power quality issues of the system. The proposed technique is executed using Simulink. The projected technique is contrasted with already existing techniques of PI controller-based GSA, BBO, ESA, RFA and ASO (Table 1).

Table 1 Simulation parameters

The proposed method is validated by creating PQ issues of sag, swell, voltage disturbance and harmonics in the system. The evaluation of the projected design structure with the three fault conditions such as sag, swell, voltage disturbance and harmonics levels of signals in the system. The three different cases are used to analyze the system performance, these cases are listed below,

Case 1: Voltage and current sag condition (constant source).

In this condition, the sag faults are created in the system by applying non-linear load in the HRES with grid connected system. In this case, the PV irradiance conditions are taken as 1000 W/m2. Related on the irradiance level of PV, the energy is generated in the system which is used to recompense the load demand. The WT speed is taken as 12 m/s, based on the speed the WT has generated the power. So, HRES has generated the required power to meet the load demand and compensate for PQ issues. The battery also connected in the system which is enabled only critical conditions of PV and WT energy storage systems. The PV and WT parameters with generated power are illustrated in Fig. 3. From Fig. 3, the PV is generated 30KW power in the constant irradiance condition 1000 W/m2. Similarly, the wind power is generated 80KW in the constant wind speed condition 12 m/s. The battery power and SOC are illustrated in Fig. 7, the battery power is 10KW.

Fig. 3
figure 3

Analysis of HRES system performance a PV irradiance, b PV power, c wind speed, d Wind power

The voltage sag and current sag is created in the system by applying non-linear load in the grid connected load system. When applying a non-linear load in the HRES system, the voltage sag is created. The voltage sag must be solved to enable linear and stable operation in the system. The UPQC is used to provide the essential power to meet the load demand and mitigation of PQ issues. The voltage sag, compensated voltage and injected voltage from the UPQC are presented in Fig. 4. Similarly, current sag, compensated current and injected current from the UPQC is illustrated in Fig. 5. The UPQC with the proposed controller can solve the PQ issues of sag conditions in both current and voltage is analysed. The shunt and series active power filter act as the main controller to balance the voltage also current in the HRES system. The swell conditions at voltage signals are analysed in this next case analysis.

Fig.4
figure 4

Analysis of voltage sag condition a source voltage, b load voltage, c injected voltage

Fig.5
figure 5

Analysis of current sag condition a source current, b load current, c injected current

Case 2: Voltage and current swell condition (varied source).

The performance of the proposed methodology is analysed with the swell condition. The swell conditions are created in the system by connecting the non-linear load. In this swell condition analysis, sources are varied and performances are analysed. The PV irradiance conditions and WT speed is changed and this condition, PQ issues of voltage and current swell conditions are analysed. The PV irradiance, WT speed, WT power and PV power are illustrated in Fig. 6. The PV irradiance is changed to 800–1000 W/m2, 0–0.5-time seconds, irradiance is fixed as 800 W/m2; 0.5–1.5-time seconds, irradiance is fixed as 1000 W/m2; 1.5–3.5-time seconds, irradiance is fixed as 800 W/m2; 3.5–5 time seconds, irradiance is fixed as 1000 W/m2. Based on the variation of irradiance, the generated power of PV is changed because irradiance is directly proportional to generated power. If irradiance is increased, the PV generated power is increased. Similarly, WT speed is increased, the WT generated power also increases. The PV is generated the power 20 KW at 0–0.5 s; 30 KW at 0.5–1.5 s; 20 KW at 1.5–3.5 s and 30 KW at 3.5–5 s. The WT speed is changed to 12–15 m/s, 0–0.5 time seconds, wind speed is fixed as 12 m/s; 0.5–1.5 time seconds, wind speed is fixed as 15 m/s; 1.5–3.5 time seconds, wind speed is fixed as 12 m/s; 3.5–5 time seconds, wind speed is fixed as 15 m/s. The WT is generated the power 100 KW at 0–0.5 s; 80 KW at 0.5–1.5 s; 100 KW at 1.5–3.5 s and 80 KW at 3.5–5 s. The battery conditions of SOC and battery power is illustrated in Fig. 7.

Fig. 6
figure 6

Analysis of HRES performance a PV irradiance, b PV power, c wind speed, d wind power

Fig. 7
figure 7

Analysis of battery performance

The voltage swell and current swell conditions are analysed and illustrated in Figs. 8 and 9. The voltage swell is created in the system by changing the load into the non-linear load. From Fig. 8, the voltage swell is created in the 0.75–0.85 s, the swell is compensated with the help of UPQC device. The dc-link capacitor is stored the required amount of power which is used to meet the load demand and PQ issue mitigation. The swell compensated output voltage and injected voltage also presented in Fig. 8. Similarly, swell conditions of current scenario are presented in Fig. 9. The PQ issues and load demand objectives are attained with the help of the proposed controller. The series and shunt active power filter with FOPID controller-based ASO is mainly participated to find out the error values which correct by selecting optimal parameters of the system. The voltage disturbance conditions are analysed in the below section.

Fig. 8
figure 8

Analysis of voltage swell conditions a source voltage, b load voltage, c injected voltage

Fig. 9
figure 9

Analysis of current swell conditions a source current, b load current, c injected current

Case 3: Voltage and current disturbances (constant source).

The evaluation of the projected technique is analysed with voltage and current disturbance conditions. The voltage and current disturbances are formed by applying non-linear load in the grid connected load systems. The voltage disturbances, compensated voltage and injected voltage is presented in Fig. 10 Similarly, the current disturbance, compensated current and injected current is illustrated in Fig. 11. Normally, the disturbance of the signal is occurred due to connection of non-linear load, critical load and unbalanced load conditions. When the applied non-linear load in the load side, it automatically creates the problem of voltage disturbances in the system. To enable the stable operation of the HRES system, the proposed controller is designed which used to compensate load demand and PQ issues in the system. The proposed controller is enabling the stable operation and PQ issue mitigation in HRES system under non-linear load, critical load and unbalanced load conditions. The ASO is used to provide the optimal gain values of the FOPID controller for minimising the error value of voltage and current in the signals. From the different case of analysis, the proposed controller can compensate load demand and PQ issues in the HRES system. To validate the proposed method evaluation, it is contrasted with the already designed methods. The comparison examination of the projected technique is presented in the subsequent unit.

Fig. 10
figure 10

Analysis of voltage disturbance conditions a source voltage, b load voltage, c injected voltage

Fig. 11
figure 11

Analysis of current–voltage disturbance conditions a source current, b load current, c injected current

6.1 Comparison Analysis

The evaluation of the projected methodology is examined with comparison analysis under different conditions of sag, swell, voltage disturbances and harmonics conditions. The real also reactive power of HRES system can be compared with the existing methods of PI controller, GSA, BBO, GWO, ESA, RFA and GA. The harmonics of the signals also analysed and validated with the previously designed techniques. The comparison analysis of the projected method in terms of real power, reactive power, power management and harmonics are illustrated in Figs. 12, 13 and 14. The harmonic evaluation of proposed and existing methods is presented in Table 2.

Fig. 12
figure 12

a Comparison of real power. b Comparison analysis of reactive power

Fig. 13
figure 13

a Comparison analysis of THD proposed method. b Comparison analysis of THD existing methods

Fig. 14
figure 14

Comparison analysis of grid power with the generation

Table 2 THD comparison analysis

Table 3, give the computation time of various techniques, in which the operation time of various controlling strategies is given. The PI controller is a default controlling strategy; it can execute faster comparing with other controlling strategy. The optimisation-based controllers consume more execution time than the conventional PI controller. But among the optimisation-based controller, the proposed techniques consume less time to execute. So, the computation burden of optimisation might be high but our proposed technique executes fast. So, the computation burden of the proposed technique is reasonable and closer to the conventional PI controller. Thus, the proposed technique is suitable for the PQ issue in real-time.

Table 3 Comparison of operation time

6.2 Discussion

From the analysis, the proposed controller attains the best performance in real power also reactive power. Similarly, grid side power also maintained stably with the assistance of projected controller. From the Fig. 12, the grid power is compensated with the help HRES generation system with a storage system under different environmental conditions. The proposed controller with ASO is to maintain a stable operation in the grid side power. The harmonics of the signals also reduced to a lower percentage with the assistance of the projected control design. Compared to the existing methods, the proposed controller attains the best results and maintain the stability and reliability of the system performance. In the HRES, the proposed controller is used to mitigate power quality issues of sag, swell, disturbance and harmonics and load demand also compensated. The proposed method can produce optimal control pulses of the series and shunt active power filter for decreasing current and voltage oscillations in the grid-connected HRES system. For analysis purpose, the sag, swell and disturbance conditions are enabled by connecting non-linear load, unbalanced load and critical load in the grid side. After that, power quality issues are compensated by the projected controller.

7 Conclusion

The mitigation of power quality in HRES has become a promising area of research in grid connected power system. In HRES power system due to the usage of non-linear load, unbalance the load and high frequency switching characteristics in the load side, the quality of power get affected. So, FACT devices are integrated into the system to mitigate the power quality issues. In the proposed HRES the UPQC with a proper controller is designed to solve power quality issues and compensate load demand. The proposed HRES system is designed with PV, WT and BESS system. The BESS system is used to compensate load demand under environmental conditions. The UPQC is designed with two controllers in series active power filter and shunt active power filter by incorporating FOPID controller with ASO for parameter tuning. The power quality issues in terms of voltage and current are mitigated using the proposed UPQC system. The proposed method is modelled and implemented in MATLAB/Simulink. Then the model is validated using three different cases by connecting non-linear load in the grid side. The results of the system are evaluated using voltage sag, swell, disturbance and harmonics. Ultimately proposed method is compared with existing techniques like PI controller, GSA, GWO, BBO, ESA, RFA and GA optimisation-based controllers.