1 Introduction

To solve the problem of electricity demand and the difficulty of the electricity transportation in isolated areas, like desert, mountain and isolated island, new renewable energy resources such as wind and solar energy should be installed. These projects are considered as the first steps leading to the development of the microgrid, nano-grid and standalone inverters connected to renewable energy sources for AC and DC load supply. The AC load requires the use of the standalone inverter for sinusoidal current. The power demand of AC load connected to DC and AC nano-grid [1] and microgrid [2, 3] in general cases should be satisfied by the decentralized power sources and local renewable energy sources like solar, wind, etc. [4].

To avoid interruptible power supply and ensure the power balance between demand and supply in the power system, the converters should be controlled to ensure the system robustness and improvement of the power quality of the inverter-connected AC loads in terms of harmonic reduction [2, 5] and power management [6]. In recent years, this increasing use of standalone inverters and other power electronic devices is the main reason for the greater concern about harmonics due to waveform distortion. The most effects of harmonics are [7, 8]: (i) increase in the line current, within power system, (ii) increase in power losses and reduce the system efficiency, (iii) overheating of electrical equipment (transformers, motors, generators, capacitors, cables), (iv) mal-operation of circuit breakers, relay and other protector devices (relies on the zero voltage crossing detection or is sensitive to wave shape), (v) incorrect reading on meters and (vi) malfunction in instruments, including medical instruments, and electronic equipment. These harmonic effects increase power costs, which demand for the power converter and its control system to play an important role in future microgrid systems, to reduce losses and to improve power quality to end users.

Many works are oriented toward the design of the controllers for DC/AC power converters to reduce the switching losses and the overall cost for standalone inverter connected to solar system [9,10,11]. The intelligent control systems are widely applied in renewable energy systems [12]. It is developed in many applications to minimize the effect of many variables such as voltage and frequency variations and also to improve the power quality in renewable power source connected to a realistic microgrid structure [13]. These intelligent controllers are also reduce the switching losses and the overall cost for standalone inverter within microgrid system. The microgrids can offer significant benefits in environmental, operation, investment, power quality and market depending in its configuration [14, 15] and harmonic compensation algorithm [16]. These benefits can be increased by providing an advanced devices, flexible structure and adequate control algorithm.

The nonlinear voltage control for standalone inverter-based distributed generation unit is adopted in many works to ensure the system robustness [17] and reduce the harmonics of system-connected nonlinear load [18, 19]. In [19], the voltage direct control for a standalone single-phase inverter is developed without using the voltage sensor at the filter capacitor output. This technique achieves a reduced cost and lower THD (total harmonic distortion). For demonstrating the system robustness, reference [20] proposed an experimental validation of a three-phase standalone inverter under the system uncertainties. Therefore, the advanced control system should be adapted for three-phase standalone inverter control.

The intelligent and nonlinear control system has a big influence on system robustness and power quality improvement [21,22,23,24,25,26,27]. One such control technique is the sliding mode control which is proposed in many works to participate in the microgrid control [27,28,29]. SMC is adopted in [27] for direct voltage converter control with a LC filter, and it has also been applied to control the AC voltages and currents of distributed energy resources to improve the robustness with respect to load perturbations and modeling errors. It is also reducing the response time to large load transients. The other versions of SMC using an integral surface are proposed in [30] for a PV converter of a microgrid. But, the main drawback of these versions of SMC are the chartering effect which generate the harmonics at the converter output. To overcome this problem, the nonlinear SMC controllers can be combined with fuzzy logic to obtain the better performances [31, 32]. Reference [31] combines the fuzzy logic, adaptive control technique and SMC, to improve the performances of an islanded PV microgrid with energy storage system. The adopted controller ensures a higher power quality compared with PI controller. The author [5] shows the advantages of combination between the nonlinear controller and fuzzy logic to obtain a robust control system and even reduce the harmonics due to the chattering effect. From these analyses, it can be seen that the combination of the fuzzy logic and nonlinear controllers improved the power quality in a microgrid-connected three-phase standalone inverter.

The other technique to reduce the harmonics is the filter. The use of the L and RL filter can increase the power loss and system cost without a better attenuation of the current ripples due to converter switching. To solve this problem, a LCL filter should be designed with reduced size of inductances, low cost and good harmonic attenuation compared to the other filters [33]. But the LCL needs resonance damping solution for stabilization [34]. The active damping method proposed in reference [35] is ensured by adding an extra term to the control strategy, which offers a reduced power loss. But it increases the complexity of the control system, demands the use of additional sensors and has a smaller bandwidth, which give a poor dynamic response performance. The passive damping method is widely used because of simple control algorithm [5, 36]. It offers better dynamic performance with a high bandwidth. But its disadvantage is the power loss due to the damping resistance. This power loss can be reduced considerably leading to an almost identical loss as the active method and preserving the previous cited advantages of passive damping method [5].

Motivated by the above literature and test bench in our laboratory, this paper proposes an intelligent fuzzy sliding mode control (FSMC) method for a three-phase standalone inverter connected to AC load in a microgrid. The system uses an LCL filter to reduce the negative harmonic effect. The proposed control scheme used the Lyapunov theory to prove its stability. The proposed control method provides some advantages, including harmonic attenuation and good tracking performance. In order to validate the control method proposed in this work, a real-time designed test bench is investigated. The results are presented including all parts of the existing microgrid to verify the effectiveness of the suggested control strategy and its performance is compared to other nonlinear controller. These obtained experimental results demonstrate that the proposed LCL filter and nonlinear intelligent control offer a high performance in terms of the minimal power distortion and high-power quality improvement. The main contributions of the present paper are highlighted by the following points.

  • Two scenarios are considered based on using/not using of LCL filter and using/not using of proposed intelligent controller and comparing of them in terms of power distortion and total cost.

  • An intelligent control method and a LCL filter are proposed for power quality improvement of a three-phase standalone inverter in a microgrid.

  • Experimental validation of all proposed concept for a standalone inverter system application, using a designed 1.6-KVA laboratory test bench.

  • Assessment of power quality of AC load connected to three-phase standalone inverter in a microgrid.

  • The developed experimental results show that the proposed control with LCL filter reduces the harmonic effect considerably and increase the power factor.

The rest part of this paper is organized as follows: In Sect. 2, system description and modeling of the proposed system are developed. In Sect. 3, a fuzzy SMC design for a standalone inverter control is given. The Sect. 4 aims to validate and discuss the proposed techniques. Finally, the conclusion is presented in the last section.

2 System description and modeling

The proposed system consists of microgrid including renewable energy resources, standalone three-phase inverter splaying loads and LCL filter.

2.1 System architecture

In this paper, a microgrid-connected distributed generation units and standalone inverter is designed as shown in Fig. 1. The balance between power demand and supply is ensured in microgrid since the utility grid is no longer available to absorb surplus power. The control strategy is adopted for the load supply and improvement of the power quality. The system architecture of the standalone three-phase inverter employed to connect a hybrid renewable power system. The proposed configuration of the voltage source inverter (VSI), depicted in Fig. 1, employs an LCL filter with passive damping, whereas the conventional systems use RL filter.

Fig. 1
figure 1

Block diagram of a standalone three-phase inverter with LCL in microgrid based on renewable energy resources

2.2 LCL filter modeling

In the LCL filter model, the reference (d,q) is expressed as [5]:

$$\begin{aligned} \left\{ \begin{gathered} \frac{{{\text{d}}i_{L\_d} }}{{{\text{d}}t}} = \frac{1}{{\left( {L_{I} + L_{L} } \right)}}v_{I\_d} + E_{d} \hfill \\ \frac{{{\text{d}}i_{L\_q} }}{{{\text{d}}t}} = \frac{1}{{\left( {L_{I} + L_{L} } \right)s}}v_{I\_q} + E_{q} \hfill \\ \end{gathered} \right.\end{aligned} $$
(1)

where

$$ \begin{gathered} E_{d} = \frac{{L_{I} }}{{\left( {L_{I} + L_{L} } \right)}}\left( {\omega \,\left( {1 + \frac{{\,L_{L} }}{{L_{I} }}} \right)\,i_{L\_q} + \omega \,i_{C\_q} - \frac{1}{{L_{I} }}v_{L\_d} } \right) \hfill \\ - \frac{{L_{I} }}{{\left( {L_{I} + L_{L} } \right)\frac{{{\text{d}}i_{C\_d} }}{{{\text{d}}t}}}} \hfill \\ \end{gathered} $$
(2)
$$ \begin{gathered} E_{q} = \frac{{L_{I} }}{{\left( {L_{I} + L_{L} } \right)}}\left( { - \omega \,\left( {1 + \frac{{\,L_{L} }}{{L_{I} }}} \right)i_{L\_d} - \omega \,i_{C\_d} \, - \frac{1}{{L_{I} }}v_{L\_q} } \right) \hfill \\ - \frac{{L_{I} }}{{\left( {L_{I} + L_{L} } \right)}}\frac{{{\text{d}}i_{C\_q} }}{{{\text{d}}t}} \hfill \\ \end{gathered} $$
(3)

where the index d and q indicate the d-axis and q-axis components, respectively. vI_d and vI_q are the inverter voltage, and iL_d and iL_q are the load currents. vL_d and vL_q are the load voltage. LI and LL: are the inverter side and load side inductances. ic_d and ic_q are the RC branch current. ω = 2πf, where f is the frequency.

3 Fuzzy SMC design for a standalone inverter control

In this section, a fuzzy logic SMC is designed for three-phase inverter supplying loads. The main control objectives are: (i) ensuring the load voltage regulation and (ii) ensuring the current regulation and minimum current ripples. The following subsection will present the proposed controller for the grid-side current of the LCL filter and the stability analysis using Lyapunov theory.

3.1 Fuzzy SMC of grid-side current of the LCL filter

The SMC is a robust control method applied to nonlinear systems. The design steps of this technique can be found in [37]. Firstly, the tracking error of current subsystem can be written as:

$$ e_{L\_d} = i_{L\_d\_ref} - i_{L\_d} $$
(4)
$$ e_{L\_q} = i_{L\_q\_ref} - i_{L\_q} $$
(5)

where iL_d-ref and iL_q-ref are the current references of the components iL_d and iL_q. The current reference iL_d-ref is generated from the voltage control loop. For reactive power Qg = 0 and unity power factor, the reference iL_q-ref = 0.

Let us introduce a linear sliding mode surface for the current subsystem as:

$$ \sigma_{L\_d} = i_{L\_d\_ref} - i_{L\_d} $$
(6)
$$ \sigma_{L\_q} = i_{L\_q\_ref} - i_{L\_q} $$
(7)

To obtain the equivalent laws for the current loop setting, the time derivative of sliding surface (σ) is equal to zero.

$$ \frac{{{\text{d}}\sigma_{L\_d} }}{{{\text{d}}t}} = \frac{{{\text{d}}i_{L\_d\_ref} }}{{{\text{d}}t}} - \frac{{{\text{d}}i_{L\_d} }}{{{\text{d}}t}} $$
(8)
$$ \frac{{{\text{d}}\sigma_{L\_q} }}{{{\text{d}}t}} = \frac{{{\text{d}}i_{L\_q\_ref} }}{{{\text{d}}t}} - \frac{{{\text{d}}i_{L\_q} }}{{{\text{d}}t}} $$
(9)

In order to augment the control tracking, fuzzy switching control laws are added to the equivalent control laws. In order to satisfy the existence law of SMC, the law control structure should be defined as

$$ v_{I\_ref} = U_{equ} + U_{sw} $$
(10)

where vI_ref is the control law, Uequ is the equivalent control law, which determines the system’s behavior on the sliding surface, and USW is the discontinuous control variable, which is a nonlinear switching input.

For FSMC, the discontinuous control (USW) is generated using fuzzy logic to obtain \(U_{SW} = - k_{G\_d} .v_{I\_d - Fuzzy}\), where \(v_{I\_d - Fuzzy}\) is fuzzy smooth function (at the logic bloc output) and \(k_{L\_d}\) is a reel constant parameter.

The equivalent control laws are defined as follows:

$$ U_{d\_equ} = (L_{I} + L_{L} )\left( {\frac{{di_{L\_d\_ref} }}{dt} - E_{d} } \right) $$
(11)
$$ U_{q\_equ} = (L_{I} + L_{L} )\left( {\frac{{di_{L\_q\_ref} }}{dt} - E_{q} } \right) $$
(12)

Thus, the ultimate control laws (vI_d_ref and vI_q_ref) can be expressed as:

$$ \begin{gathered} v_{I\_d\_ref} = (L_{I} + L_{L} )\left( {\frac{{di_{L\_d\_ref} }}{dt} - E_{d} } \right) \hfill \\ - k_{L\_d} .v_{I\_d - Fuzzy} \hfill \\ \end{gathered} $$
(13)
$$ \begin{gathered} v_{I\_q\_ref} = (L_{I} + L_{L} )\left( {\frac{{di_{L\_q\_ref} }}{dt} - E_{q} } \right) \hfill \\ - k_{L\_q} .v_{I\_q - Fuzzy} \hfill \\ \end{gathered} $$
(14)

vI_d_Fuzzy and vI_q_Fuzzy are the fuzzy control laws used in fuzzy SMC to replace the switching control. kL_d and kL_q are the output parameters of the fuzzy controller.

Remark 1:

The switching control of the SMC is expressed using the smooth function (SF) given in (15).

$$ U_{sw} = \frac{{K_{\max } \,\sigma }}{\left| \sigma \right| + \alpha } $$
(15)

where α is a real positive number.

3.2 Fuzzy smooth function

The fuzzy SMC method combines merits of both SMC and fuzzy logic control in one control scheme. The SF employed in switching control is developed using the fuzzy logic control algorithm.

The input and output are the error e and the switching control Usw. The fuzzification aims to associate with the real value of each input, at time t, its membership function, and thus transform the real input into a fuzzy set of linguistic values using the following notations: Big-Negative (BN), Small-Negative (SN), Close-to-Zero (CZ), Small-Positive (SP) and Big-Positive (BP) [5]. The membership function for input and output is given in Fig. 2. The control output is generated using center of gravity method [38] and a set of rules, which must be in the form "If condition, then conclusion," according to the expert knowledge of variable error σ (linear sliding mode surface defined in (6) and (7)) as follows:

  • If σ is [BN], then Usw is [BP].

  • If σ is [SN], then Usw is [SP].

  • If σ is [CZ], then Usw is [CZ].

  • If σ is [SP], then Usw is [SN].

  • If σ is [BP], then Usw is [BN].

Fig. 2
figure 2

Gaussian membership functions for the input and the output

The surface of output versus input in Fig. 3, using the adopted rules and Gaussian membership functions, is investigated for the system stability.

Fig. 3
figure 3

Surface for output versus the input

3.3 Stability analysis of FSMC

Theorem 1:

Considering the control system developed based on the system model (1), it is designed to control the internal loop of current of d-axis and q-axis. The control law is designed as (10) and (11) based on fuzzy logic; then, the sliding mode is asymptotically stable.

The condition for the existence of sliding mode is ensured, using the surface of output versus input in Fig. 3, with the following fuzzy rules:

If \(\sigma > \,\,0\), then Usw must be negative

If \(\sigma < \,\,0\), then Usw must be positive

Whatever σ and Usw are, then \(\sigma .\,U_{sw} < \,\,0\) and Usw must be replaced by \(v_{I\_d - Fuzzy}\) or \(v_{I\_d - Fuzzy}\).

For the control of the load current, the siding surface and fuzzy control laws are designed using the fuzzy rules to satisfy the following conditions:

\(\sigma {}_{L\_d}.\,v_{I\_d - Fuzzy} < \,\,0\) and \(\sigma {}_{L\_q}.\,v_{I\_q - Fuzzy} < \,\,0\).

Proof:

The stability of the overall system is guaranteed through the stability of the d-axis component of load current iL_d and q-axis component of load currents iL_q.

Theorem 1 for system stability is proved using the candidate Lyapunov function defined by:

$$ \gamma = \frac{1}{2}\sigma_{L\_d}^{2} + \frac{1}{2}\sigma_{L\_q}^{2} $$
(16)

The stability of this system is obtained when the time derivative of Lyapunov function is negative (\(\dot{\gamma } = \frac{d\gamma }{{dt}} \le 0\)).

The time derivative of Lyapunov function positive definite γ is expressed as:

$$ \dot{\gamma } = \dot{\gamma }_{d} + \dot{\gamma }_{q} = \sigma_{L\_d} .\,\dot{\sigma }_{L\_d} + \sigma_{L\_q} .\,\dot{\sigma }_{L\_q} $$
(17)

Substitution of the control laws in (17) allows to obtain:

$$ \left\{ \begin{gathered} \dot{\gamma }_{d} = \sigma_{L\_d} \cdot \left( {\frac{{{\text{d}}i_{L\_d - ref} }}{{{\text{d}}t}} - \frac{{{\text{d}}i_{L\_d} }}{{{\text{d}}t}}} \right) \hfill \\ = \sigma_{L\_d} \cdot \left( {\frac{{{\text{d}}i_{L\_d\_-ref}}}{{{\text{d}}t}} - \left[ {\frac{1}{{\left( {L_{I} + L_{L} } \right)}}v_{I\_d} + E_{d} } \right]} \right) \hfill \\ \dot{\gamma }_{q} = \sigma_{L\_q} \cdot \,\left( {\frac{{{\text{d}}i_{L\_q\_-ref} }}{{{\text{d}}t}} - \frac{{{\text{d}}i_{L\_q} }}{{{\text{d}}t}}} \right) \hfill \\ = \sigma_{L\_q} \cdot \left( {\frac{{{\text{d}}i_{L\_q\_-ref} }}{{{\text{d}}t}} - \left[ {\frac{1}{{\left( {L_{I} + L_{L} } \right)}}v_{I\_q} + E_{q} } \right]} \right) \hfill \\ \end{gathered} \right. $$
(18)

Substituting vI_d and vI_q the control laws (vI_d_ref and vI_q_ref) (13) (14) gives:

$$ \left\{ \begin{gathered} \dot{\gamma }_{d} = \sigma {}_{L\_d}.\frac{{{\text{d}}i_{L\_d - ref} }}{{{\text{d}}t}} - \sigma {}_{L\_d}.E_{d} - \frac{{\sigma_{L\_d} }}{{\left( {L_{I} + L_{G} } \right)}} \hfill \\ \left( {(L_{I} + L_{L} )(\frac{{{\text{d}}i_{L\_d\_ref} }}{{{\text{d}}t}} - E_{d} ) + k_{L\_d} .v_{I\_d - Fuzzy} } \right) \hfill \\ \dot{\gamma }_{q} = \sigma {}_{L\_q}.\frac{{{\text{d}}i_{L\_q - ref} }}{{{\text{d}}t}} - \sigma {}_{L\_q}.E_{q} - \frac{{\sigma_{L\_q} }}{{\left( {L_{I} + L_{G} } \right)}} \hfill \\ \left( {(L_{I} + L_{L} )(\frac{{{\text{d}}i_{L\_q\_ref} }}{{{\text{d}}t}} - E_{q} ) + k_{L\_q} .v_{I\_q - Fuzzy} } \right) \hfill \\ \end{gathered} \right. $$
(19)

Then, after simplification

$$ \left\{ \begin{gathered} \dot{\gamma }_{d} = \frac{{k_{L\_d} }}{{\left( {L_{I} + L_{L} } \right)}}.\sigma {}_{L\_d}.v_{I\_d - Fuzzy} \hfill \\ \dot{\gamma }_{q} = \frac{{k_{L\_q} }}{{\left( {L_{I} + L_{L} } \right)}}.\sigma {}_{L\_q}.v_{I\_q - Fuzzy} \hfill \\ \end{gathered} \right. $$
(20)

Using the fuzzy smooth function, we obtain the two following cases:

$$ \dot{\gamma }_{d} = - \frac{{k_{L\_d} }}{{\left( {L_{I} + L_{L} } \right)}}.\left| {\sigma {}_{d}.v_{I\_d - Fuzzy} } \right| \le 0 $$
(21)
$$ \dot{\gamma }_{q} = - \frac{{k_{G\_q} }}{{\left( {L_{I} + L_{L} } \right)}}.\left| {\sigma {}_{q}.v_{I\_q - Fuzzy} } \right| \le 0 $$
(22)

where | | indicates the absolute value

Then,

$$ \dot{\gamma }_{d} + \dot{\gamma }_{q} \le \,0 $$
(23)

Finally, the precedent analysis proves that \(\dot{\gamma }\) is negative and the stability condition of the FSMC is guaranteed.

Remark 2:

The main objective of proposed control is to reduce current ripples, which demand a sophisticated controller for the internal loop. The external loop of the voltage control is ensured using the PI controller as shown in Fig. 4.

Fig. 4
figure 4

Global control scheme of internal and external loops

4 Validation and discussion

The performances of the proposed control method are validated experimentally using a test bench. The experimental results are obtained using power quality analyzer and carried out to demonstrate the effectiveness of the proposed system in terms of harmonic attenuation and minimal power distortion.

4.1 Power distortion

The harmonic study of the AC load connected to the standalone inverter system shows that the lower harmonic is obtained using the proposed control, which reduce the power loss due to the deforming power of the waveform distortion. The other advantage of the proposed fuzzy SMC is simpler to be implemented experimentally and can be easily tuned.

In this section, the analyses of power distortion are given to for an overview about the power loss due to the deforming power of the waveform distortion and illustrate the main types of distortion in the power system versus the total harmonic distortion (THD). The separation of the RMS (root mean square) current (I) and voltage (V) into fundamental (V1, I1) and harmonic terms (distortion voltage VH and distortion current IH) allow to define the apparent power as follows [39,40,41]:

$$ \begin{gathered} S^{2} = (V.I)^{2} = (V_{1}^{2} + V_{H}^{2} )\,(I_{1}^{2} + I_{H}^{2} ) \hfill \\ = (V_{1} .I_{1} )^{2} + (V_{1} .I_{H} )^{2} + (V_{H} .I_{1} )^{2} + (V_{H} .I_{H} )^{2} \hfill \\ = S_{1}^{2} + D_{I}^{2} + D_{V}^{2} + S_{H}^{2} = S_{1}^{2} + S_{N}^{2} \hfill \\ \end{gathered} $$
(24)

The terms DI, DV, SH can be defined using the is the total harmonic distortion. THD is given as follows:

  • Current distortion power (var): DI = V1.IH = S1.(THDI).

  • Voltage distortion power (var): DV = VH.I1 = S1.(THDV).

Harmonic apparent power (VA): SH=VH.IH=S1.(THDV) (THDI).

SN is the nonfundamental apparent power and can be defined:

$$ S_{N}^{2} = D_{I}^{2} + D_{V}^{2} + S_{H}^{2} $$
(25)

Using the fundamental active power (P1) and reactive power (Q1), the fundamental apparent power S1 can be expressed as \(S_{1}^{2} = P_{1}^{2} + Q_{1}^{2}\).

The effective apparent power is separated in five basic components

$$ S^{2} = (V.I)^{2} = P_{1}^{2} + Q_{1}^{2} + D_{I}^{2} + D_{V}^{2} + S_{H}^{2} $$
(26)

For a resistive load, Q1 = 0VAR and the nonfundamental apparent power is the non-50 Hz apparent power and is expressed as:

$$ S_{N}^{2} = S_{1}^{2} ({\text{THD}}_{I}^{2} + {\text{THD}}_{V}^{2} + {\text{THD}}_{I}^{2} {\text{THD}}_{V}^{2} ) $$
(27)

Then,

$$ S_{N} = S_{1} \sqrt {({\text{THD}}_{I}^{2} + {\text{THD}}_{V}^{2} + {\text{THD}}_{I}^{2} {\text{THD}}_{V}^{2} )} /100 $$
(28)

The existence of SN and harmonics decreases the power factor PF. In this case, the power factor is composed of two factors: displacement power factor (PFdisp) and distortion power factor (PFdist).

$$ \begin{gathered} {\text{PF}} = \frac{P}{S} = \frac{P}{{\sqrt {S_{1}^{2} + S_{N}^{2} } }} = \frac{P}{{S_{1} }}.\frac{1}{{\sqrt {1 + {\raise0.7ex\hbox{${S_{N}^{2} }$} \!\mathord{\left/ {\vphantom {{S_{N}^{2} } {S_{1}^{2} }}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{${S_{1}^{2} }$}}} }} \hfill \\ = {\text{PF}}_{{{\text{disp}}}} .\,\,{\text{PF}}_{{{\text{dist}}}} \hfill \\ \end{gathered} $$
(29)

Therefore,

$$ \left\{ \begin{gathered} {\text{PF}}_{{{\text{disp}}}} = \frac{P}{{S_{1} }}\,\,\,\, \hfill \\ {\text{PF}}_{{{\text{dist}}}} = \,\frac{1}{{\sqrt {1 + {\text{THD}}_{I}^{2} + {\text{THD}}_{V}^{2} + {\text{THD}}_{I}^{2} {\text{THD}}_{V}^{2} } }} = \frac{{S_{1} }}{S}\, \hfill \\ \end{gathered} \right.\, $$
(30)

Power factor is not only affected by the phase shift displacement between voltage and current waveforms, but also by the waveform distortion.

In the presented three-phase system, and for a resistive load (Q1 = 0VAR and S1 = P1 = 1500 W), the displacement power factor PFdisp = 1 and PF = PFdist.

4.2 Experimental validation

The laboratories of the engineering electrical department are connected to distributed energy resource system and main grid. The photovoltaic system with a rated capacity (20 KW) are installed to supply the laboratory and department devices. In this section, a prototype test bench of 1.6-kVA is investigated to implement and validate experimentally the proposed control strategy. The test bench photograph is presented in Fig. 5. The inverter of the experimental test bench, connected to LCL filter, is presented in the global scheme of Fig. 6. This test bench is realized to prove the effectiveness of the proposed control approach and the designed filter. The inverter has been controlled using a DSPace DS1104 board and ControlDesc, and the implemented control technique is illustrated in Fig. 7. Environment of development mainly consists of two software: MathWorks MATLAB/Simulink 2013 and ControlDesc. This DSPace board offers high-speed real-time signal processing with a clock frequency of 200 MHz and sophisticated integrated peripherals such as the four mix 12-bit A/D converters and four 16-bit A/D converters input channels.

Fig. 5
figure 5

Photograph of the experimental test bench

Fig. 6
figure 6

Global scheme of the experimental test bench

Fig. 7
figure 7

System topology for load supply and the implemented control system on the DSPace DS1104 board

The necessary electrical quantities (voltage, current, power, etc.) required for the control system are measured and display in real time using the ADCs of the DS1104 panel connected to measurement circuit. A sampling frequency of 10 kHz and a pulse width modulation (PWM) frequency of 8 kHz are adopted. Three-phase transformer (127/380 V/1.6 KVA) is used to increase the voltage of the three-phase inverter and ensure galvanic isolation. DC power supply is configured using rectifier and autotransformer as presented in Fig. 6. The generated power, harmonics, voltage and current are measured using the C.A8331 Power Quality Analyzer with "DataView" software for data analysis. The system parameters are given in Tables 1 and 2. The control program developed using Simulink software and implemented on the DSPACE DS1104 board.

Table 1 Considered parameters for filters design
Table 2 Controller’s gain of the compared methods

One of the fundamental aspects to achieve paper objectives is comparing the performances of LCL filter and RL filter on one hand and on the other hand of PI, SMC and FSMC controllers.

Remark 3:

The PI controller is introduced in comparative study of the experimental results for the purpose of using it as a benchmark of traditionally accepted industrial practices. The focus of the present study is to make a comparison between the SMC and FSMC controllers on the one hand and on the other hand between RL and LCL filter.

4.2.1 Comparative study of filters

The comparison between the voltage and current THDs, presented in Figs. 8 and 9, shows that the harmonics are attenuated better using the LCL filter instead the RL filter. The maximum value of THDv, using the RL filter, is 2.7% relative to the fundamental, while the filter LCL gives a THDv value of 1.3%. The current THDI value, using the LCL filter (1.8% f), is lower than that of the RL filter (2.5% f).

Fig. 8
figure 8

Experimental results using PI controller with RL filter: a voltage THDv of three phases and b current THDI of three phases, c RMS distortion voltage (Vd) of the first phase and d RMS distortion current (Ad)

Fig. 9
figure 9

Experimental results using PI controller with LCL filter: a voltage THDv of three phases and b current THDI of three phases, c RMS distortion voltage (Vd) of the first phase and d RMS distortion current (Ad)

The harmonic effect led to power loss and signal distortion. The results obtained with power quality analyzer show that the RMS distortion voltage (Vd) and the RMS distortion current (Ad) are reduced from Vd = 2 V and Id = 0,04 A using RL filter (Fig. 8) to 0.9 V and 0,03 A using LCL filter (Fig. 9). The power loss is reduced with the reduction RMS distortion voltage (Vd) and the RMS distortion current (Ad). The use the proposed LCL filter increases the power of 8.376 W for a V1 = 92 V and I1 = 1.75A.

The distortion of apparent power SN and power factor due to the harmonics of the chattering and converter switching is presented in Table 3. It can be seen that the SN is reduced considerably (more than half) using the LCL filter instead of the RL filter, which can reduce the energy cost for AC load-connected microgrid system.

Table 3 Electrical components of system using the PI controller, RL filter and LCL filter

4.2.2 Comparative study of control methods

The experimental results, concerning the harmonics at the filter output given in Figs. 10 and 11, show that the harmonics are increased using the SMC to reach a maximal value of THDV = 2% f for voltage and THDI = 3.1% f for current.

Fig. 10
figure 10

Experimental results using SMC with LCL filter: a waveforms of the three-phase ac voltage with RMS values, b waveforms of three-phase current with RMS values c THDv of voltage with maximum values, d THDI of the current with maximum values, e harmonics and RMS distortion voltage Vd and f harmonics and RMS distortion current Ad

Fig. 11
figure 11

Experimental results using FSMC with LCL filter: a waveforms of the three-phase ac voltage with RMS values, b waveforms of the three-phase ac current with RMS values, c voltage THDv and maximum values, d current THDI and maximum values, e harmonics and RMS distortion voltage Vd and f harmonics and RMS distortion current Ad

Figure 10 shows that the THD obtained using SMC is higher than that given by PI controller, because of chattering effect. To solve this problem, the fuzzy SMC is adopted to reduce the voltage and current THD as shown in Fig. 11. The maximum values are THDV = 1.4% f and THDI = 2.0% f. Therefore, these experimental results show that the THD of voltage and current is smaller and prove that the adopted intelligent controller with LCL is the most efficient converter control method for harmonic attenuation. The distortion voltage and current are: For SMC, Vd = 1.4 V and Ad = 0.06A. For FSMC, Vd = 1 V and Ad = 0.03A.

The distortion of apparent power SN and power factor due to the harmonics of the chattering and converter switching is presented in Table 4. It can be seen that the SN is reduced considerably (about 50%) using FSMC filter instead of the conventional SMC, which can reduce the energy cost for AC load-connected microgrid system. The diagram of distortion power and power factor is illustrated in Fig. 12.

Table 4 Electrical components of system using the LCL filter and FSMC and SMC controllers,
Fig. 12
figure 12

Diagram of distortion power (SN) and power factor (Pfdist) for different controllers and filters

Finally, from the above discussion it is clear that the method for power quality improvement should be based on the sophisticated intelligent control and advanced LCL filter.

It is obvious from the discussed experimental results that the proposed control method increases the power quality for load supply and reduction in the power loss. It can also be seen that its performance is guaranteed regardless of the sensitive load connection.

The adoption of fuzzy sliding surface brings many benefits to the sliding mode control strategy for a standalone converter in a microgrid, as well as the LCL filter improve the system performance with reduced cost.

5 Conclusion

The present study investigated the feasibility of implementing intelligent nonlinear control in standalone inverter connected to microgrid. The traditional solution of applying a nonlinear SMC with LCL filter can suppress such current and voltage distortion, but the result is not satisfactory. To solve this problem and improve the power quality, intelligent control method with LCL filter is proposed for a three-phase standalone inverter in a microgrid.

In this work, a 1.6 kW test bench system based on the standalone three-phase inverter and DSPace DS1104 board was subjected to the harmonics arising from chattering phenomena and converter switching. Reduction in the total harmonic distortion through effective utilization of LCL filter and intelligent nonlinear control is the main objective of this work. Power quality improvement has been accounted by reduction in the overall total harmonic distortion as well as the reduction in the distortion power and increasing of the distortion power factor. Considering two scenarios based on using/not using of LCL filter and using/not using of proposed intelligent controller, the results of experimentation show that the proposed technique provides the better operation with minimal distortion and maximal power factor.