1 Introduction

The global rate of increase in primary energy consumption decelerated to 1.3% in the previous year, representing only half of the growth rate observed in 2018, which stood at 2.8%. The rise in energy consumption is primarily attributed to the utilization of renewable energy sources (RESs), leading to a 0.5% expansion in carbon emissions. This growth rate is less than half of the average annual growth rate of 1.1% observed over the past decade, as reported by the BP statistical review of world energy and others in 2020 (BP statistical review of world energy 2020). This provides a definitive indication that the energy roadmap has shifted its focus towards the utilization of renewable energy sources. In order to meet the growing energy demand with a high level of reliability, it is necessary to further develop and advance renewable energy technologies.

Solar photovoltaic and wind power generation are widely adopted as renewable energy sources for electricity production due to their abundance, cost-effectiveness, and numerous environmental benefits (Xu et al. 2019) (Xiaofeng et al. 2019). The user's text is already technical and does not require any rewriting. The possibility of combining multiple renewable sources with an energy storage system has become feasible due to advancements in power electronics technology. This has led to the development of the microgrid model, as discussed in studies by (Zhao et al. 2010); (Praiselin et al. 2017); (Iqbal and Xin 2020). The predominant renewable energy sources in MG, as documented by (Dhara et al. 2023), are PV and wind power. Nevertheless, due to the inherent intermittency of renewable energy sources, it is recommended to augment them with suitable storage systems and seamlessly integrate them into the microgrid network. In order to optimize the utilization of battery storage (BS) systems in MGs, numerous investigations were conducted to improve the effectiveness of energy generation and storage devices within the MG. Consequently, a plethora of sophisticated optimization algorithms have been devised. Multi-target integral linear programming is a mathematical optimization technique employed to address a complex problem related to the integration of multiple energy sources, including a hybrid energy supply and a battery source. This approach was proposed by (Zhao et al. 2010). Fuzzy logic control regulates the charging and discharging operations of the battery. Capital and maintenance expenditures, fuel prices, energy expenditures, and carbon penalties are some of the objective functions that need to be minimized.

Renewable energy sources exhibit promising prospects. However, their reliance on weather conditions, such as solar irradiation and wind speed, introduces intermittency. This poses significant challenges for chemical and manufacturing industries, as they are highly susceptible to power fluctuations (Jowder et al. 2009) (F.A.L. Jowder 2009); (Kim et al. 2013) (Kim et al. 2013); (Ullah et al. 2020) (Jan et al. 2020). The majority of power quality issues, accounting for 80% of cases, are caused by harmonics, flickers, and voltage sag and swell. The inclusion of a voltage source inverter within the microgrid results in the production of harmonics (Dhara et al. 2022), which subsequently degrades the power quality of the system. The initiation of high-capacity motors, the act of switching loads, the activation of transformers, and the sporadic behaviour of RESs are the primary factors contributing to voltage sag occurrences (Lii et al. 2004). The SFCL is a highly efficient solution for mitigating issues related to voltage sag, swell, flickers, and harmonic distortion. Previous studies have investigated sag mitigation techniques without the use of energy storage components (Lii et al. 2004); (Ibrahim et al. Sept. 2011); (Kanjiya et al. 2013); (Li et al. Feb. 2018). Additionally, research has been conducted on sag mitigation methods that involve the utilization of battery and super magnetic storage systems (Gee et al., 2017) (Gee et al. March 2017); (Zheng et al. 2018). The BESS is considered a highly effective solution for mitigating disturbances caused by fluctuations in load or generation. This has been supported by studies conducted by (Gil-Antonio et al. 1843); (Dam et al. 2020) (Hannan et al. 2019). The SFCL is utilized for the purpose of enhancing power quality in hybrid photovoltaic-wind energy conversion systems (PV-WECS) as described by Mosaad et al. (2019a); (Muhammad et al. 2020) (Aurangzeb et al. 2020). The authors of (Mosaad et al. 2019b) introduced the SFCL with space vector pulse width modulation (SVPWM) as a solution to address the issues of harmonic distortion and voltage sag reduction. If the SFCL is powered by the primary supply source, it may exhibit suboptimal performance when subjected to significant voltage sags. The SFCL’s performance can be enhanced through the integration of battery energy storage system. PV inverted power is a research paper authored by (Hannan et al. 2019), which discusses various technical aspects related to photovoltaic (PV) systems. These aspects include PV output characteristics, voltage control mechanisms, harmonic mitigation techniques, and overall system performance. Multiple methodologies were explored to mitigate the impact of photovoltaic (PV) deficit, such as the implementation of advanced inverter control systems as discussed by (Gee et al. March 2017). In the realm of advanced research and product development, the paramount requirements for an inverter's control system are high quality and exceptional flexibility. Nevertheless, the commercially available inverters do not produce clean waveforms. Based on the author's understanding, the implementation of the new control strategy remains necessary in order to mitigate harmonic distortion and effectively compensate for voltage flickers, sag, and swell within a hybrid microgrid. This study employs a voltage source inverter (VSI) and a SFCL that are based on fuzzy logic control to address power quality concerns. The voltage source inverter-based FLC demonstrates the ability to mitigate harmonics (Dhara et al. 2022) and prevent their ingress into the load/grid interface. The SFCL system mitigates power fluctuations caused by the unstable output of renewable energy sources and during fault conditions.

A performance analysis is conducted to evaluate the system’ss behaviour under different load and fault conditions. A comparative analysis of THD is presented, considering the presence and absence of SFCL, specifically focusing on load voltage. Furthermore, the obtained results have undergone a thorough comparison and validation process in accordance with the guidelines set forth by the Institute of Electrical and Electronics Engineers (IEEE) 519 standards. The details pertaining to a prospective microgrid are elaborated upon in Sect. 2. The topic of system modelling is elaborated upon in Sect. 3. Section 4 of the document encompasses the calculation of battery energy loss and provides instructions for power frequency management. The subsequent simulation results and discussions are presented in Sect. 5, while Sect. 4 provides a concise conclusion of the study.

2 Description of hybrid system

The proposed microgrid comprises a hybrid photovoltaic (PV) and wind system that is integrated with a battery storage system. This integrated setup is designed to provide power to an off-grid community. Figure 1 depicts the schematic representation of the proposed microgrid system. The system consists of a photovoltaic (PV) system connected to a boost converter as well as a permanent magnet synchronous generator with a wind energy conversion system connected to a boost converter. The PMSG-WECS utilizes an optimum torque (OT) based MPPT technique, as described by (Wang et al. 2018). The system consists of a bi-directional (DC-DC) converter that is connected to the BS system. The converter is controlled by a fuzzy-based controller. These three converters are connected to the shared direct current (DC) link with a voltage of 640 V. The fuzzy logic-based voltage source converter (VSC)-controlled inverter is employed for supplying power to the alternating current (AC) loads. Two transformers are employed, with one serving as a step-up transformer to increase the voltage to 11 kV. This elevated voltage is then utilized to provide power to industrial consumers, such as those found in the manufacturing sector. The second transformer is a step-down transformer that provides AC power to the consumer at a voltage of 11/0.380 kV and a frequency of 50 Hz. The SFCL is installed at the point of common coupling (PCC) in order to mitigate unbalanced conditions, voltage fluctuations (sags and swells), and enhance the overall power quality of the system. The discrepancy between the supply side feeder \({F}_{1}\) and the load side feeder \({F}_{2}\) is rectified through the implementation of appropriate voltage injection by a voltage source inverter using an injecting transformer. The transformer operates to maintain the pulsating DC to fixed DC in the circuit. The LC filter circuit is employed to attenuate the undesirable harmonic components. The specifications pertaining to the PV-Wind hybrid microgrid can be found in Table 1 and the proposed microgrid system Simulink diagram is represented in Fig. 2 by selecting all values as per IEEE standard data table.

Fig. 1
figure 1

The proposed microgrid block diagram

Table 1 Specifications of the PV-Wind hybrid microgrid
Fig. 2
figure 2

The proposed microgrid system Simulink diagram

3 Modelling of the system

3.1 Modelling of the PV system

Figure 3 depicts the PV cell's comparable circuit. The PV cell modeling (Mosaad et al., 2019b) (Mosaad et al 2019b) can be described by the following equations:

Fig. 3
figure 3

The PV cell's equivalent circuit

$$I={I}_{L}-{I}_{D}\left\{{e}^{\frac{q\left(v+I{R}_{s}\right)}{nkT} }-1\right\},$$
(1)

and PV power at time t is calculated by Prakash et al. (2014).

$${P}_{pv}\left(t\right)={S}_{r}\left(t\right)*a*\eta .$$
(2)

The total PV system power was calculated by (Rehman et al. 2021).

$${P}_{t}\left(t\right)={N}_{pv}*{P}_{pv}\left(t\right).$$
(3)

The PV model includes the following parameters:

\({I}_{L}\)= Light generated current (A).

\({I}_{D}\) = Reverse saturation current of diode (A).

\(v\) = Operating voltage of array (V).

\(k\) = Boltzmann constant (J/°K).

\(n\) = No. of the series connected cell.

\(T\) = Temperature (°K).

\({R}_{s}\)= Equivalent series resistance (Ω).

\({R}_{sh}\)= Equivalent shunt resistance (Ω).

\(q\) = Charge on electrons.

\(a\) = Ideality factor.

\(\eta\) = System efficiency.

\({S}_{r}\) = Solar irradiation during time \(\left(t\right)\).

\({N}_{pv}\)= Total no. of the solar module.

\({P}_{pv}\) = Total power of the solar module.

3.2 Wind turbine modelling

The wind energy system harnesses the mechanical energy derived from the kinetic energy of the wind, which is then employed to power the generator. Various generator configurations are employed in wind energy conversion system. The utilization of the doubly fed induction generator (DFIG) for the purpose of managing active and reactive power through the implementation of direct power control method is demonstrated in the works of (Jou et al. 2009); (Lan et al. 2018). The self-excited induction (Mosaad and Salem 2014) and the doubly excited induction generator (Mosaad et al. 2019); (Mosaad et al. 2020) have been utilized in various applications of WECS. The permanent magnet synchronous generator demonstrates satisfactory performance under varying wind speeds and operates without the need for gears. This characteristic of the PMSG makes it well-suited for numerous applications.

The PMSG based WECS implemented for off grid hybrid system in Osama abed et al. (2018). In the proposed WECS system, optimal torque \({(k}_{opt})\) based MPPT technique is used, to optimize the wind energy efficiency by keeping machine wind generation \(\left({\omega }_{g}\right)\) at predefined optimal value. The model diagram of \({k}_{opt}\) based controller is presented in Fig. 4. This controller is having the ability to adjust the PMSG torque at optimal torque value at given speed.

Fig. 4
figure 4

Block diagram of optimal torque based MPPT controller

To ensure a particular voltage input data or set point, the controller utilizes appropriate control techniques. The harmonic content of the output voltage can be reduced by designing a good control strategy Rehman et al. (2021). The duty cycle of power devices is one of the control factors in power converters. The inverter response voltage can track the reference input voltage signal for controlling the activity cycle Gil-Antonio et al. (1843). The following accuracy is generally determined by the capacity of the control network.

3.3 Illustration of a solar module using a boost chopper

The PV sections that produce the photovoltaic module are linked in a specific order. Each PV section is originated by several PV modules are connected sequentially (Mohomad et al. 2017) (Mohomad et al. 2017). The photovoltaic cell, which is made up of the power supply \({I}_{ph}\), a diode \({D}_{j}\), a parallel resistance \({R}_{p}\), and a string resistance \({R}_{s}\), makes up the circuit of the standalone diode depicted in Fig. 5. The resultant current (in Ampere) of the examined photovoltaic range is represented in Eq. (24) by raising the unit of a PV cell to characterize a PV range as illustrated inside (Mosaad et al. (2019a), (Mosaad et al. (2019b). Therefore,

Fig. 5
figure 5

PV cell circuit for stand-alone use

$${I}_{pv}={N}_{gf}{I}_{p}-{N}_{gf}{I}_{0}\left\{{exp}\left[\frac{q({V}_{pv}+{R}_{qw}{I}_{pv})}{kAT{N}_{p}{N}_{js}}\right]-1\right\}-({V}_{pv}+{R}_{qw}{I}_{pv})/{R}_{qa.}$$
(4)

Here \({V}_{pv}\) is the voltage range of photovoltaic module; the corresponding figures of PV units that are normally connected in lines and in parallel, separately, are \({N}_{js}\) and \({N}_{gf}\), the number of successively connected cells in a photovoltaic module is \({N}_{p}\); the parallel resistances are \({R}_{qw}\) and \({R}_{qa}\), correspondingly; and \({I}_{ph}\) and \({I}_{0}\) are the particular phase current and no-load currents (in A), correspondingly. The representation of specific currents \({I}_{ph}\) and \({I}_{0}\) are as follows (Mosaad et al. (2019a), Mosaad et al. (2019b):

$${I}_{ph}=\left[{I}_{T,n}+{k}_{i}\left({T}_{p}-{T}_{pn}\right)\right]\left(\frac{G}{{G}_{n}}\right),$$
(5)
$${I}_{0}={I}_{T,n}(\frac{{T}_{p}}{{T}_{pn}{)}^{3}}.$$
(6)

In which.

$${I}_{0,k}=\frac{{I}_{sc,k}}{\left\{{exp}\left[\frac{q{V}_{oc,k}}{kA{T}_{k}{N}_{j}}\right]-1\right\}}.$$
(7)

In the usual investigated condition of \({G}_{n}=2000 W/{m}^{2}\) and \({T}_{n}=308.14 K\)(35 0C), where T and G stands for photovoltaic radiation (in \(W/{m}^{2}\)) and operating reversion (in \(K\)), respectively; \({I}_{sc}\) and \({V}_{oc,k}\) will be the short circuit current (A) and open circuit voltage (V); the reverse saturation power at \({T}_{n}\) is denoted by \({I}_{O,k}\). For illustration, \(q,k,\) and also \(A\) would be the electron charge (within \(C\)), the Boltzmann constant (within \(J/K\)), and along with the diode ideality element. The specific space energy associated with the semiconductor would be within \({e}_{V}\). When connecting the photovoltaic range to the DC connection, the specific simplified plan via the analyzed DC-DC boost converter is shown in Fig. 5(a). By pretending that the switch \(S\) and diode \(D\) exhibit the precise transforming behaviour as shown in Fig. 6(a). The specific upgraded DC-DC converter can be seen in Fig. 6(b). Therefore, the following dynamic computation may be obtained to simulate the specific DC-DC improved converter (Jan et al. 2021); Rehman et al. (2021):

Fig. 6
figure 6

a PV cell equivalent circuit diagram. b Dynamic logic diagram of PV cell

$$({F}_{c}){P}_{w}({V}_{pv})={i}_{pv}-{i}_{LP,}$$
(8)
$$({F}_{L}){P}_{w}({i}_{LP})=-{R}_{P}{i}_{LP}+{V}_{pv}-(1-{K}_{P}){V}_{DC}$$
(9)
$${i}_{pv\_DC}=\left(1-{K}_{p}\right){i}_{LP}$$
(10)

where \({F}_{c}\) is typically the filter capacitor; \({i}_{pv\_DC}\) is the current of DC-link; \({L}_{P}\) and \({R}_{P}\) are the particular certain inductance and resistance of the converter, correspondingly; the DC-link voltage is \({V}_{DC}\); the inductor current is \({i}_{LP}\); the accountable proportion from the DC-DC boost converter current is \({K}_{P}\).

3.4 Supercapacitor and AC-DC converter

The model circuit of the supercapacitor has shown in Fig. 6. In addition to taking into account the supercapacitor's self-applied-release phenomenon and Joule reduction, which are indicated by the aversion to \({R}_{pSC}\) and \({R}_{qSC}\), respectively, the following depiction also takes these factors into account about the capacitor \({C}_{SC}\). As per Fig. 7, the associated dynamic computations of the supercapacitor employed were represented as:

$$\left(S{C}_{c}\right){P}_{w}={C}_{SC} {V}_{CSC}$$
(11)
$${V}_{SC}={V}_{CSC}+{I}_{SC}{R}_{{s}_{SC}}$$
(12)

where \({V}_{CSC}\) is the voltage across \({C}_{SC}\) and \({V}_{SC}\) and \({I}_{SC}\) are the voltage and current of the supercapacitor, respectively.

Fig. 7
figure 7

A supercapacitor's equivalent circuit

The streamlined design of the employed schemes is shown in Fig. 8(a). The converter consists of a power-storing inductor \({L}_{S}\) and two switches, \({S}_{1}\) and \({S}_{2}\), that are regulated in a subsidiary method. This specific configuration allows the converter's feature of two-way current flowing. In the buck setting method, the current travels to the supercapacitor through the DC connection, where switch \({S}_{1}\) acting as a switch and \({S}_{2}\) as a diode (Hannan et al. 2019). However, in the procedure's boost setting, \({S}_{2}\) functions as a switch and \({S}_{1}\) as a diode, with the supercapacitor providing the energy to the DC connection. For instance, the full transitional processes are sometimes disregarded when the DC-DC converter is built in a supercharging condition. The dynamic average -value of the bidirectional DC-DC improved topology with exceptional function and the step-down setting approach are displayed in Figs. 8(b) and (c), respectively. The topology's mathematical expression is provided below:

Fig. 8
figure 8

a, b, c Back-to-back DC-DC converter basic diagrams

4 (a) Boost mode:

$$({L}_{s})p({i}_{sc})=-{R}_{s}{i}_{sc}+{V}_{sc}-(1-{D}_{s}){V}_{DC}$$
(13)
$${i}_{SC-DC}=(1-{D}_{s}){i}_{sc}$$
(14)

5 (b) Buck mode:

$$({L}_{s})p({i}_{sc})=-{R}_{s}{i}_{sc}+{V}_{sc}-{D}_{s}{V}_{DC}$$
(15)
$${i}_{SC-DC}={D}_{s}{i}_{sc}$$
(16)

In this case, \({i}_{SC-DC}\) represents the specific power in the DC-link portion, and \({L}_{s}\) and \({R}_{s}\) would be the inductance and resistance of the power-storing inductor respectively.

5.1 Modelling of FLC-controlled PWM inverter

The proposed system utilizes a fuzzy logic-controlled PWM inverter to provide balanced power supply. The Fuzzy logic-controlled inverter is connected to the PV-wind-battery storage system (Jan et al. 2021) and is employed to regulate the output voltage to a specified level. This is achieved by utilizing two fuzzy inputs, namely errors (E) and change of error (COE). The fuzzy rule matrix, based on the "if and then rule," is presented in Table 2 according to the study conducted by (Lii et al. 2004). The proposed control strategy involves the utilization of fuzzy control to generate the desired gate pulse for the PWM inverter. The MAMDANI fuzzy interface is utilized for the development of 49 rule bases. These rule bases are then applied to a PWM inverter in order to generate the desired gate pulse.

Table 2 Rule base FLC

Where Large Positive (LP), Medium Positive (MP), Small Positive (SP), Negligible Error (NE), Small Negative (SN), Large Negative (LN), Medium Negative (MN).

The fuzzy controller regulates the 4 kHz gate pulse and provides six gate signals to PWM inverter to generate the desired output.

5.2 Arrangement of voltage source inverter

Figure 1 shows a voltage source inverter with an LC filter, a net-worked line, and a boost transformer for grid power computation (Jan et al. 2021). All these kinds of elements' specific dynamic units can be stated as follows (Hannan et al. 2019; Mosaad et al. 2019b):

$$({L}_{I})p({i}_{dI})=-{R}_{I}{i}_{dI}+{\omega }_{e}{L}_{I}{i}_{qI}+{\upsilon }_{dI}-{\upsilon }_{dPCC}$$
(17)
$$({L}_{I})p({i}_{qI})=-{R}_{I}{i}_{qI}-{\omega }_{e}{L}_{I}{i}_{dI}+{\upsilon }_{qI}-{\upsilon }_{qPCC}$$
(18)
$$({C}_{I})p({\upsilon }_{dPCC})={i}_{dI}-{i}_{dTL}+{\omega }_{e}{C}_{I}{\upsilon }_{qPCC}$$
(19)
$$({C}_{I})p({\upsilon }_{qPCC})={i}_{qI}-{i}_{qTL}-{\omega }_{e}{C}_{I}{\upsilon }_{dPCC}$$
(20)
$$({L}_{TL})p({i}_{dTL})=-{R}_{TL}{i}_{dTL}+{\omega }_{e}{L}_{TL}{i}_{qTL}+{\upsilon }_{dPCC}-{\upsilon }_{dinf}$$
(21)
$$({L}_{TL})p({i}_{qTL})=-{R}_{TL}{i}_{qTL}-{\omega }_{e}{L}_{TL}{i}_{dTL}+{\upsilon }_{qPCC}-{\upsilon }_{qinf}$$
(22)

where the voltage and currents of the VSI are (\({\upsilon }_{dI}\) and \({\upsilon }_{qI}\)) and (\({i}_{dI}\) and \({i}_{qI}\)); the voltages (\({\upsilon }_{dPCC}\) along with \({\upsilon }_{qPCC}\)) and (\({\upsilon }_{dinf}\) along with \({\upsilon }_{qinf}\)) are measured at the same level of the PCC; and the energies of the interlinking range are typically indicated as (\({i}_{dTL}\) and \({i}_{qTL}\)).

5.3 Superconducting fault current limiter

The SFCL system, as proposed by (Dhara et al. 2019a), can effectively alleviate system disturbances caused by faults through the introduction of regulated voltage across an injecting transformer. The proposed system is tested during different types of disturbances like single line-to-ground fault (L-G), double line-to-ground fault (L-L-G), triple line-to-ground fault (L-L-L-G) fault and voltage sag/swell conditions. The process of SFCL via a flow chart is given in Fig. 10.

5.4 Battery storage energy system

The BS controller’s primary function is to regulate the power mode of traditional load based on the grid and battery’s operational state. The BS will be able to perform various operations independently along with fulfilling the demand side load power Laha et al. (2018). in this section, to focus on the power frequency management (PFM) function, which will be discussed in depth later (Mosaad et al. 2019f).

In battery mode, the battery’s power can be characterized as follows:

$${G}_{P}={L}_{P}+{B}_{P.}$$
(23)

Where \({G}_{P}\) the grid is power, \({L}_{P} is\) the load power and \({B}_{P}\) is the BS controller's battery power consumption. As a result, grid power may be stated in the following way,

$${G}_{p}={L}_{P}+{B}_{P}+{C}_{P.}$$
(24)

Hence \({C}_{P}\) is the BS controller power consumption. During charging, discharging, and energy storage, the battery will lose power and energy. The type of battery used and how it is utilized have an impact on the total loss.

6 Power frequency management (PFM) modeling

6.1 Power frequency management with battery power control

The primary purpose of battery power control in this paper is to implement at load-side PFM. While doing so, we want to maintain a specific state of charge (SOC) for the battery, for example, 75% of its original capacity. As a result, the battery power \({B}_{P}\) is divided into two elements Mosaad et al. (2019f) for SOC compensation, reliant element on line frequency \({B}_{Pf}\left(\Delta f\right)\) and battery SOC compensation offset element \({P}_{Bs}\left(SOC\right)\) as,

$${B}_{P}={B}_{Pf}\left(\Delta f\right)+{B}_{PS}\left(SOC\right).$$
(25)

Therefore, the grid power in (2) becomes,

$${G}_{P}={L}_{P}+\left[{B}_{Pf}\left(\Delta f\right)+{B}_{PS}\left(SOC\right)\right]+{C}_{P.}$$
(26)

It is also important to note that the battery can only transfer energy to the connected load and not return to the grid.

The response among standard battery systematic lifecycle loss and depth of discharge (DOD), including lifecycle loss growing with lifecycle depth are represented in Fig. 9.

Fig. 9
figure 9

Lithium-ion battery cycle life vs. DOD

6.2 Assessment of battery energy loss

The method for estimating the amount of battery energy loss during PFM operation is proposed in this section. If the SOC is preserved this energy dissipation may be calculated, that is, if the SOC values at the start and end of a particular running period are the same as each other. To put it another way, SOC set is set to the value of SOC. The consequence will be a reversal of any fluctuation in SOC induced by power factor correction (PFC) regulation, with offset power matching the regulation direction, returning the SOC to its starting value. Because of the way that based on the path of the frequency deviation the regulating power \(\Delta {B}_{f}\) can be either + ve or –ve and according to the SOC variation \(\Delta {B}_{s}\) can be either + ve or –ve. In this way, the connected battery energy exchange, denoted by the symbol \(\Delta {B}_{E}\), might be computed as

$$\Delta {B}_{E}={\Delta {B}_{f}+\Delta B}_{s}.$$
(27)

Where \(\Delta {B}_{f}\) and \(\Delta {B}_{s}\) are the exchange energy, the main frequency regulation and SOC compensation must be implemented.

A simulation of the state of charge of the battery being used is performed using one-day realistic frequency data. To simulate the SOC, the coulomb counting approach is utilized. Hence, during operation 0.017 Hz is adjusted for PFC's dead-band frequency, whereas 0.04 Hz is adjusted for droop frequency. SOC is started with a value of 50%. The frequency deviation for reality and the simulated SOC are exhibited in Figs. 10 and 11 respectively.

Fig. 10
figure 10

Simulation response of SOC

Fig. 11
figure 11

Simulation response for frequency deviation

The energy loss is modeled using a battery energy efficiency model from previous research Pinzon et al. (2019). The model uses a current-dependent nonlinear resistance to represent the entire energy generated by activation, awareness and ohmic polarization as illustrated by the equation below.

$${V}_{OC}(SOC)={[R}_{P}(i)+{R}_{e}]{i}_{b}.$$
(27)

where \({R}_{P}(i)\) and \({R}_{e}\) are experimentally determined model parameters. The analogous circuit prototype of the battery is depicted in Fig. 12. The battery open circuit voltage is represented by \({V}_{OC}\) in the circuit model.

Fig. 12
figure 12

Simulation circuit model of battery loss assessment

6.3 Renewable energy generation limitations

To maintain the PV and wind generator (WG) outputs at their respective "\(t\)" time intervals under the following minimum and maximum power restrictions (Zhao et al. (2010), they must be kept at their respective "\(t\)" time intervals within the following minimum and maximum power limits.

$${P}_{PV,min}\le {P}_{PV}\left(t\right)\le {P}_{PV,max},$$
(29)
$${P}_{WG,min}\le {P}_{WG}\left(t\right)\le {P}_{WG,max.}$$
(30)

Where \({P}_{PV,min}\) and \({P}_{PV,max}\) are the minimum and maximum power constraints imposed by each PV module. \({P}_{WG,min}\) and \({P}_{WG,max}\) are the power constraints imposed by each WG at the lowest and highest levels (Praiselin et al. 2017; Zho 2010).

6.4 Limitations of battery powers

The battery voltage still has to be below the specified power limit, which can be expressed as (Kim et al. 2013; Li et al. 2018):

$${P}_{BSch,top}<{P}_{BS}\left(t\right)<{P}_{BSdch,bottom.}$$
(31)

Where \({P}_{BSch,top}\) and \({P}_{BSdch,bottom}\) are the maximum charging and discharging powers of the battery, respectively. Always ensure that the battery's energy storage capacity is between the minimum and maximum limits:

$${E}_{BS,lowest}<{E}_{BS}\left(t\right)<{E}_{BS,highest.}$$
(32)

Where \({E}_{BS,lowest}\) and \({E}_{BS,highest}\) are respectively, the lowest and maximum energy limitations for batteries. Battery SOC levels should be kept as low as possible as a result of this consideration:

$${SOC}_{lowest}<SOC\left(t\right)<{SOC}_{highest}.$$
(33)

7 Results and discussion

The mentioned system performance is tested under different faults and voltage sag/swell conditions. During test conditions I and II, different faults are applied at the PCC of the bus for 100 ms. In test condition III variable, wind velocity and solar irradiation is applied to the system. Test condition IV presents the harmonic distortion under non-linear load conditions. The asymmetrical and symmetrical conditions produce voltage sag/swell in the system voltage.

7.1 Test condition I: single line to ground fault (L-G) at point of common coupling (PCC) bus \({\mathbf{F}}_{1}\)

The L-G fault is introduced to the F1 feeder at intervals of 1.4 to 1.6 s throughout this test. This defect affects the output of many producing sources; phase A of a three-phase supply is connected to the ground, therefore the voltage of phase A becomes zero, while the voltage of phases B and C increases in this interval, as illustrated in Fig. 13 flow diagram.

Fig. 13
figure 13

Flow diagram operation of SFCL

The SFCL inject voltage for Phase A during fault (Katarzyński and Olesz 2020) and FLC restrict the voltage within the desired magnitude to make the load voltage constant as shown in Fig. 14 and 15 correspondingly. Also, throughout the L-G fault, the constant load voltage is displayed in Fig. 16.

Fig. 14
figure 14

Source voltage behaviour at an L-G fault instant

Fig. 15
figure 15

SFCL injected voltage at phase A during L-G fault

Fig. 16
figure 16

Load voltage response throughout L-G fault

The voltage profile during L-G fault is illustrated in Fig. 17, which shows the transient states during a short circuit. The transient is occurred for the time span between (0–0.2) sec, (0.45–0.7) sec and (0.74–0.78) sec. Specifically, the transient states are shown by zooming the first few cycles of the entire time span during L-G fault.

Fig. 17
figure 17

Voltage profile during L-G fault

7.2 Test condition II: three-phase faults at PCC bus \({\mathbf{F}}_{2}\)

The PV, wind, and battery systems' power, voltage, and current are unaffected during this fault occurrence. The behaviors of BESS during three-phase faults with and without SFCL are shown in Fig. 18: a, b and c respectively. The voltage of the battery drops as the current of the battery grows. The battery might be disconnected from the hybrid system if its current rises at a rapid rate (Osama abed et al. (2018).

Fig. 18
figure 18

a Behavior of battery system voltage during 3-phase fault with and without SFCL. b Behavior of battery system current during 3-phase fault with and without SFCL. c Behavior of battery system power during 3-phase fault with and without SFCL

Figures 19 and 20 a, b, c are depicts the behavior of WECS and PV systems, respectively Rehman et al. (2021). As seen in Fig. 13 the fault causes an enhancement in the WECS current. During the fault period the performance of output voltage is superior with SFCL as compared to without SFCL, as shown in Fig. 19 a, b and c respectively. SFCL injected voltage at bus PCC with minimum harmonics and was also able to maintain the constant load voltage.

Fig. 19
figure 19

a WECS voltage during 3-phase fault with and without SFCL. b WECS current during 3-phase fault with and without SFCL. c WECS power during 3-phase fault with and without SFCL

Fig. 20
figure 20

a PV system power with and without SFCL. b PV system current with and without SFCL. c PV system voltage with and without SFCL

In the three-phase failures, as seen in Fig. 21, all phase voltages drop to zero. Figure 22 shows that the SFCL introduced the proper voltage magnitude between fault timespan of 1.4 to 1.5 s. Figure 23 shows that the load voltage remained steady throughout the three-phase fault.

Fig. 21
figure 21

Source behavior between three-phase faults

Fig. 22
figure 22

Injected voltage during three-phase faults

Fig. 23
figure 23

Load voltage during three-phase faults

7.3 Test condition III: wind velocity variation with constant solar irradiation: -

During this test wind velocity varies from 12 m/s (at t = 0 to t = 1.5 s) to 6 m/s (at t = 1.5 s to t = 2.5 s) and then backwards to 12 m/s (at t ≈ 2.5 s), the solar irradiation is kept constant at 1000w/m2 during this operation. The wind power during the operation is shown in Fig. 24. The PV power and battery power are shown in Figs. 25, 26, respectively.

Fig. 24
figure 24

Wind power under fluctuating wind velocity

Fig. 25
figure 25

Constant PV power under fluctuating wind velocity

Fig. 26
figure 26

Battery power under fluctuating wind velocity

According to Fig. 26 the present battery power balance is achieved by varying the wind speed. As seen in Fig. 27, the battery system compensated for the shortfall in power and maintained a constant load voltage throughout this brief period when solar alone was insufficient to provide the load requirement.

Fig. 27
figure 27

Load voltage under fluctuating wind velocity

7.4 Test condition IV: solar irradiation varying with constant wind velocity

During this test irradiation varies from 1000 w/m2 (at \(t=\) 0 to \(t=\) 1.0 s) to 500 w/m2 (at \(t=\) 1.0 s to \(t=\) 1.5 s) and 0 w/m2 (at \(t=\) 1.5 s to \(t=\) 2.5 s) and then 800 w/m2(at \(t=\) 2.5 s to \(t=\) 3.0 s), the wind velocity is kept constant at 12 m/s during this operation.

The output of the photovoltaic system during operation is seen in Fig. 28. Additionally, Figs. 29 and 30 are depicting wind energy and battery energy, respectively.

Fig. 28
figure 28

PV power under fluctuating solar irradiation

Fig. 29
figure 29

Constant wind power fluctuating solar irradiation

Fig. 30
figure 30

Battery power under fluctuating solar irradiation

7.5 Test condition V: power electronics loads

Switching power supply, variable speed drives, solid-state controllers, and other sensitive electronic equipment create significant harmonics and nonlinear loads. Voltage distortion, a poor power factor (PF), and stress on supply power system equipment are all caused by harmonics in these non-linear loads. Harmonics from no sinusoidal loads has an impact on the electrical microgrids impedance. Figure 31 shows that an FLC inverter-SFCL-BS combo may meet IEEE 519 standards for eliminating harmonic distortion and voltage sag (Shrivastav et al. (2019).

Fig. 31
figure 31

Load voltage under fluctuating solar irradiation

Figures 32 a, b) are shows the THD analysis for the system without and with SFCL. The THD of the proposed system is lesser with SFCL at 0.87% in comparison to 1.43% without using SFCL. Table 2 shows a comparison of different existing techniques. The modulation was generally done using two or three-level inverters. In terms of harmonic reduction, power factor, switching mechanisms, and hardware requirements, Table 3 compares the performance of the proposed developed inverter controller to that of other existing systems.

Fig. 32
figure 32

a THD for the system without SFCL. b THD for the system with SFCL

Table 3 Comparative analysis of converters

8 Conclusions

The fuzzy controlled inverter and SFCL in photovoltaic (PV)/wind hybrid microgrid systems have the ability to mitigate the negative impact caused by fault events such as phase faults at the PCC, unbalanced operation, and voltage swell/sag. The battery system functions as a supplementary power source for the load in situations where the hybrid system's power generation is unable to meet the load's power requirements. The rate of battery energy depletion is primarily influenced by the point at which the battery reaches its end of life and starts to experience degradation. Based on the results of the simulation, it is observed that the utilization of a dead band instead of a dead band loss results in a lower energy consumption in the battery. For example, when the dead-band is increased to 0.036 Hz, there is a reduction in energy loss due to the switching of small charge-release energy with the battery. Furthermore, according to modelling studies, increasing the regulation charge-release current leads to a decrease in the droop constant, resulting in additional energy loss. Among other factors, the results could contribute to the evaluation of the battery's benefits in frequency management and the energy losses incurred during the load-release exchange in the power factor correction process. This evaluation would be done by comparing these factors with those of the converters. The implemented control strategy effectively maintained the microgrid's continuous operation in the presence of abnormal conditions such as three-phase faults, higher power electronic load, and challenging scenarios of low insolation and wind speeds. The implemented control strategy effectively maintained the microgrid's uninterrupted operation in the presence of abnormal conditions such as three-phase faults, higher power electronics loads, and challenging scenarios with limited solar radiation and low wind speeds. The proposed SFCL offers several benefits. It allows for voltage adjustment during faults, enables the variation of wind and photovoltaic (PV) generation, increases electronic load capacity, and ensures a uniform load voltage profile at the point of common coupling. The intelligent fuzzy logic controller based voltage source inverter regulates the voltage output to a specified level and minimizes the distortion of harmonics within the range specified in the IEEE 519 standard.