Introduction

The utility grid stability concern and continuity of electricity to dedicated loads need utility interfaced microgrids. The adverse environmental impact and high cost of conventional microgrids lead to the rapid growth of renewable-based microgrids [1]. The integration issues of DES (distributed energy sources) such as synchronization and desynchronization of DES to/from utility grid, and the challenges such as voltage regulation, electromagnetic interference, voltage and current surges, voltage sag and swell, interconnection system response to abnormal voltages, clearing time, DC current injection, harmonics current injection, and flickering are reported in [2]. The diesel generator set is used as AC source to provide the reference voltage for maintaining the DC link voltage in [3]. The diesel generator set is expensive and environment unfriendly; thus, the utility grid is used to provide reference voltage for DC link and diesel generator is used to maintain the power balance and to increase the reliability of supply to dedicated load in [4]. The BES is utilized to avoid the PV (photovoltaic) power fluctuations and to enhance the reliability and to ensure continuity of electricity to a dedicated load [5]. A DES involving the PV panel, the battery energy storage (BES), and the utility grid with synchronization capability is optimized to minimize the energy generation charges in [6]. A stability blind area free control design method is investigated to ensure the smooth transfer of modes in [7], and thus to mitigate the disturbances across the dedicated loads. The seamless transfer from standalone mode to the utility network integrated mode in [8], from the grid interfaced mode to islanded mode in [9], and from distribution network integrated mode to standalone mode and vice versa in [10, 11], are reported in the literature. The double-stage topology offers numerous benefits over a single-stage topology. The droop characteristic of VSG is adaptively adjusted according to the DC link voltage utilizing a double stage configuration in [12], and a state of charge (SOC) estimation utilizing extended Kalman filter of the batteries is reported in [13].

The efficient energy extraction from the PV array requires maximum power point tracking (MPPT) control algorithms. The neural network-based MPPT algorithm is reported in [14], and simulated performance is compared with perturb and observe MPPT algorithm. The neural network-based MPPT algorithm requires training of the neurons for operating climate conditions. Moreover, the perturb and observe MPPT algorithm performance at varying climate is not robust. The incremental conductance MPPT algorithm performance is investigated at varying climates in [15]. An incremental conductance (IC) MPPT algorithm is utilized in present work for harnessing peak power from the PV panel.

The increasing concentration of DES in the utility network is a matter of concern. The power quality control of an electrical grid is reported in [16]. The distorted point of common coupling (PCC) voltage due to the interaction of nonlinear load at the PCC injects harmonics current in the utility grid current, which causes interference to nearby communication network and heats the transformers and induction motors connected to the line. The interference with communication lines results in mal-operation of protective devices. The DSTATCOM is widely adopted for active filtering and load compensation. The performance of the active filters depends upon the current control algorithms. Various topology and control techniques for harmonics mitigation are presented in [17]. The LQR-tuned CC–CVF control algorithm is utilized to estimate the fundamental frequency orthogonal components in [18].

This paper proposes a grid interfaced PV–BES microgrid, which ensures an uninterrupted supply to dedicated loads besides enhancing distribution grid stability, power quality (PQ) at distorted PCC voltage. The achievements of this work are summarized here.

  • This PV–BES microgrid enhances the distribution grid stability, ensures reliable and continuous electricity to dedicated loads with improved power quality features at distorted PCC voltage.

  • This PV–BES system feeds the pre-specified power to the grid at increased demand from the grid, and it stores energy in BES at light loads during day time. The VSC performs as a DSTATCOM during the night thus, benefits the consumer besides enhancing the distribution grid stability, power quality, and decreasing the VSC payback period.

  • This grid supported PV–BES system injects power to the utility besides feeding the loads and does load harmonics compensation in the absence of BES during day hours.

  • The BES overcharging and deep discharging are prevented utilizing a bidirectional current converter; thus, the battery life is enhanced. The low weight, low voltage rating, and a compact battery are required.

  • The PV–BES system ensures good power quality and compliance with requirement of the IEEE 519-2014 standard.

  • The electricity to loads is uninterrupted at fault in the grid. The transfer between modes takes place seamlessly.

PV–BES Microgrid Structure

Figure 1 depicts a topology of a PV–BES microgrid system. This system incorporates a PV array, a step up DC–DC converter, a battery energy storage (BES), a bidirectional DC–DC converter, a VSC, nonlinear domestic loads, STS (solid-state transfer switch) switch to connect and disconnect the PV–BES to/from utility network, the ripple filter to mitigating high frequency switching ripples. The synchronizing control enables the connection and disconnection of PV–BES to the utility grid via the STS switch. The VSC harnesses the peak available power from the PV panel utilizing the IC MPPT algorithm. In grid integrated mode, the extracted power from PV panel aggregates to the grid power, load power, and BES power. In an islanded mode, the PV array extracted power, BES power, and load power are governed by algebraic equations. The BES maintains the power balance equilibrium in both modes. The LQR-based CC–CVF control algorithm mitigates harmonics to maintain the grid current sinusoidal even under distorted PCC voltage condition.

Fig. 1
figure 1

Proposed microgrid system configuration

Design of PV–BES Microgrid

The PV panel is developed for a power rating of 5 kWp. The components are designed and selected as in [17]. The two strings of 13 series-connected modules with open circuit voltage 32.9 V and short circuit current 8.21 A are connected in parallel to realize a PV panel. Considering second-order harmonic due to nonlinear load, a 3100 μF capacitor at DC link is used. The distorted PCC voltage is realized utilizing 0.9 mH inductance at the grid side. A 2.5 mH inductance is connected at the VSC side to mitigate the switching ripples in the utility grid current. The ripple filter, which mitigates the switching ripples from the PCC voltage, includes a 7.5 μF capacitor and a 10 Ω resistor.

The BES ensures supply to dedicated loads on an occurrence of a fault in the distribution network and non-availability of generation from the PV panel. Besides this, the BES capacity is sufficient enough to match load demand and a pre-specified power to the distribution grid at peak load hours with minimum generation from the PV panel.

Considering 6 h average PV array generation per day, the total energy generation (Wpv) from the PV array of power capacity 5kWp is as,

$$W_{pv} = P_{pv} \times h = 5000 \times 6 = 30 ,000Wh.$$
(1)

The selected load consumption is 1307 W. The load is fed from the PV–BES system during the day time at the presence of generation from the PV panel, and the fault at the utility grid side. Considering the PV–BES system feeds power to a load for 12 h on a yearly average basis including 2 h grid outage. The energy consumed by the load is as,

$$W_{L} = P_{L} \times h = 1307 \times 12 = 15 ,684Wh.$$
(2)

Considering that the PV–BES system feeds 1.75 kW pre-specified power for 12 h on a yearly average basis. Thus, the energy fed to the utility network is estimated as,

$$W_{c} = P_{c} \times h = 1750 \times 12 = 21000Wh.$$
(3)

The energy injected to the load and the distribution network from BES is estimated as,

$$W_{b} = W_{c} + W_{L} - W_{pv} = 6684Wh.$$
(4)

The selected battery voltage is 240 V. Thus, the battery ampere hour capacity is calculated as,

$${\text{AH}}\;{\text{capacity}} = {{W_{b} } \mathord{\left/ {\vphantom {{W_{b} } {V_{b} }}} \right. \kern-0pt} {V_{b} }} = 6684/240 = 27.85AH.$$
(5)

The BES of 42AH, 240 V, is selected.

Control Strategy

Figure 2 illustrates the PV–BES microgrid control strategy. The PV–BES microgrid is controlled to ensure smooth and continuous electricity to dedicated load at the availability and non-availability of generation from a PV array, the grid integration, and an islanded condition with improved power quality features. This system operates in the current control mode at the utility network integrated mode and in voltage control mode at the islanded condition. In the grid tied mode, the PV–BES system is controlled to feed a pre-specified power to the utility network besides feeding the load, improving the PQ and stability of the utility grid, and exchange of energy from the BES when both the BES and generation from a PV array are available. The VSC is controlled utilizing LQR-based CC–CVF control algorithm in the absence of either BES or solar irradiance or both. The PV–BES microgrid feeds the load, injects the remaining power to the grid, and mitigates utility current harmonics to minimize utility network losses at disconnected BES during day time. The VSC operates as a DSTATCOM at the non-availability of energy from PV panel in the presence of BES, the distribution network feeds the load, and the load harmonics current is fed by VSC. When the BES is disconnected during night hours, the utility grid feeds the load and VSC does harmonics compensation. The exchange of power from BES is regulated through a bidirectional converter. The VSC is controlled in an islanded mode to maintain the PCC voltage. The mode transition control connects or disconnects the PV–BES system to the grid via the STS switch. The IC-MPPT algorithm is utilized to harness the peak available power from the PV panel.

Fig. 2
figure 2

PV–BES microgrid control strategy

Grid Tied Mode Control

In grid integrated mode, the PV–BES microgrid operates in three modes: the pre-specified grid power mode, variable grid power mode, and the DSTATCOM mode. This system operates in pre-specified power mode when both the BES and generation from PV array are available. When either BES or the generation from PV panel is not available, this microgrid system operates in variable grid power mode, and in the absence of both the BES and PV panel output, it operates in DSTATCOM mode. The VSC operates in the current control mode utilizing the PI voltage controller and the hysteresis current controller. The utility grid voltage (vs), point of common coupling voltage (vpcc), the distribution grid current (is), load current (iL), PV panel voltage (Vpv), PV array current (Ipv), DC link voltage (VDC), BES voltage (Vb), BES current (Ib), utility grid frequency (f), PCC voltage, and grid voltage angles (θpcc, θs) are acquired. The PV panel voltage, PV array current, and the IC MPPT algorithm are used to estimate the PV panel power. The PV dynamic term (Ipvd) is evaluated utilizing the amplitude of distribution network voltage and the PV array power to reduce the burden on the PI controller and to make dynamic response fast. The amplitude (VAm) and in-phase unit template (up), and quadrature unit template (uq) of utility voltage are estimated as,

$$v_{Am} = \sqrt {v_{s\alpha }^{2} + v_{s\beta }^{2} }$$
(6)
$$u_{p} = {{v_{s\alpha } } \mathord{\left/ {\vphantom {{v_{s\alpha } } {V_{Am} }}} \right. \kern-0pt} {V_{Am} }}$$
(7)
$$u_{q} = {{v_{s\beta } } \mathord{\left/ {\vphantom {{v_{s\beta } } {V_{Am} }}} \right. \kern-0pt} {V_{Am} }}.$$
(8)

VSC Control at Pre-specified Grid Power

The active utility grid current for a pre-specified distribution grid power is estimated as,

$$I_{sp} = {{( - 2 \times P_{p} )} \mathord{\left/ {\vphantom {{( - 2 \times P_{p} )} {V_{Am} }}} \right. \kern-0pt} {V_{Am} }}.$$
(9)

The utility grid voltage unit template (up) and the estimated active grid current (Isp) are utilized to generate the reference grid current (i *s ) as,

$$i_{s}^{*} = I_{sp} \times u_{p}.$$
(10)

The reference utility grid current and the acquired grid current are utilized in the hysteresis current controller to obtain the switching pulses for the VSC.

VSC Control at Variable Power Mode/DSTATCOM Mode

The LQR-based CC–CVF control algorithm [18] depicted in Fig. 3 is used to harness the fundamental frequency load current orthogonal components (x, x). The utility voltage quadrature unit template and the load current component in phase to utility network voltage (x) are utilized in sample and hold logic to extract the amplitude of fundamental frequency component of load current (ILa) as,

$$I_{sH} = I_{A} \sin (\omega \times t - \phi )|at\cos (\omega \times t) = 0$$
(11)
$$I_{sH} = I_{A} \cos (\phi )$$
(12)
$$I_{La} = |I_{sH} |,$$
(13)

where IA is the amplitude of the in-phase fundamental frequency component of load current and φ is the angle between the PCC voltage and in-phase fundamental frequency load current component.

Fig. 3
figure 3

LQR-based CC–CVF control algorithm

The PV dynamic term is evaluated as,

$$I_{pvd} = {{(2 \times P_{pv} )} \mathord{\left/ {\vphantom {{(2 \times P_{pv} )} {V_{Am} }}} \right. \kern-0pt} {V_{Am} }}.$$
(14)

The DC link capacitor loss current component (ILoss) is estimated utilizing the proportional constant (Kp), integral constant (KI), and the VSC input error voltage (ve) as,

$$I_{Loss} (n) = I_{Loss} (n - 1) + K_{p} \{ (v_{e} (n) - v_{e} (n - 1)) + K_{I} (v_{e} (n))$$
(15)
$$v_{e} (n) = V_{DC}^{*} (n) - V_{DC}^{{}} (n).$$
(16)

The net active utility grid current is estimated as,

$$I_{sn} (n) = I_{Loss}^{{}} (n) + I_{La}^{{}} (n) - I_{pvd}^{{}} (n).$$
(17)

The reference distribution grid current in variable grid power mode/DSTATCOM mode is estimated utilizing the net active utility grid current and the estimated utility network voltage in-phase unit template as,

$$i_{s}^{*} = u_{p} \times I_{sn}.$$
(18)

This reference utility grid current (i *s ) and sensed grid current (is) are utilized in the hysteresis current controller to get the switching sequences for VSC to control the variable grid power mode and DSTATCOM mode of operations.

Islanded Mode Control

In this mode of control, the PCC voltage magnitude, phase, and frequency are regulated in the close vicinity of the grid voltage magnitude, phase, and frequency with low distortion in the PCC voltage, good transient response, and no DC offset error to ensure reliable and continuous supply to dedicated loads. The standalone mode control strategy is illustrated in Fig. 4. This PV–BES microgrid system disconnects the distribution network utilizing the STS switch when a disturbance in grid parameters or fault occurs at the utility network side. The PV–BES microgrid system is synchronized with the utility grid as the normalcy is stored in the distribution network.

Fig. 4
figure 4

PV–BES islanded mode control

The PV–BES microgrid operates in the voltage control mode in the standalone condition. The control strategy generates the switching pulses to VSC to operate in an islanded condition and maintains the load voltage magnitude, phase, and frequency in close vicinity to the utility network voltage magnitude, phase, and frequency to avoid circulating current between PCC and utility grid, and transients in grid current and PCC voltage at the synchronization.

Thus, the reference PCC voltage is generated as,

$$v_{pcc}^{*} = V_{Am} \sin (\omega_{{}} \times t),$$
(19)

where VAm is the amplitude of the PCC voltage and ω is the nominal grid frequency. The obtained reference PCC voltage and the sensed PCC voltage are compared, and the error in PCC voltage (Ve1) is utilized to generate the reference VSC current by a PI voltage controller as,

$$i_{vsc}^{*} (n) = i_{vsc}^{*} (n - 1) + k_{p1} \{ v_{e1} (n) - v_{e1} (n - 1)\} + k_{i1} v_{e1} (n).$$
(20)

This reference VSC current and sensed VSC current are utilized in a hysteresis current controller to obtain the VSC switching sequence to regulate the PCC voltage.

Mode Transition Control

The PCC voltage magnitude, frequency, and phase are compared to utility grid voltage magnitude, frequency and phase according to IEEE1547 in [2] as,

$$v_{s\hbox{min} } \le v_{s} \le v_{s\hbox{max} } ;f_{\hbox{min} } \le f \le f_{\hbox{max} } ;\theta_{\hbox{min} } \le \theta_{pcc} \le \theta_{\hbox{max} }.$$
(21)

When the synchronization criteria are met, the high signal (‘1’) is sent to the STS switch, and the PV–BES microgrid is synchronized to the distribution network. Otherwise low signal (‘0’) is sent to the STS switch, and this microgrid system operates in an islanded mode. The transition from utility network connected mode to standalone mode occurs as,

  • The mode transition algorithm recognizes fault/abnormality in distribution network parameters.

  • The mode transition algorithm sends ‘0’ to STS switch, and PV–BES microgrid is disconnected from the grid network.

  • Thus, the PV–BES microgrid is switched from the current controlled mode to the voltage control mode.

As normalcy in utility network parameters occurs, the PV–BES microgrid operation is switched to the synchronized mode from standalone mode as,

  • The mode transition algorithm compares the utility network voltage magnitude, frequency, and phase with the load voltage magnitude, frequency, and phase.

  • The load voltage magnitude, frequency, and phase angle are adjusted to tie the PV–BES microgrid with the grid.

  • The STS switch receives ‘1’ and gets ON.

The PV–BES microgrid is switched to the utility network synchronized mode from an islanded mode.

Bidirectional Current Converter Control

The bidirectional current converter control strategy is depicted in Fig. 5. The bidirectional converter maintains the power balance equilibrium in the grid synchronized mode with BES connected between the PV array, utility grid, BES, and load. The BES charges when the generation from a PV array is in excess and discharges when the generation from a PV array is not sufficient to feed the pre-specified power to the utility network besides meeting the load energy requirement. In the islanded mode, BES feeds the load via a bidirectional converter.

Fig. 5
figure 5

Bidirectional converter control

The distribution network voltage decides the reference DC link voltage (V *DC ). The reference DC link voltage and sensed DC link (VDC) are compared, and the PI voltage controller utilizes the generated error voltage (Ve2) to generate the reference BES current (I *b ), which is compared with the acquired BES current, and the error in BES current (Ibe) is fed to another PI controller which generates a control signal (Ic). The governing equations are,

$$V_{e2} (k) = V_{DC}^{*} (k) - V_{DC} (k)$$
(22)
$$I_{b}^{*} (n) = I_{b}^{*} (n - 1) + K_{vP} \{ V_{e2} (n) - V_{e2} (n - 1)\} + K_{vI} V_{e2} (n)$$
(23)
$$I_{be} (n) = I_{b}^{*} (n) - I_{b} (n)$$
(24)
$$I_{c} (n) = I_{c} (n - 1) + K_{vP} \{ I_{be} (n) - I_{be} (n - 1)\} + K_{vI} I_{be} (n).$$
(25)

This control signal and sawtooth carrier wave are utilized by PWM (Pulse Width Modulation) controller, to obtain the duty cycle for the bidirectional converter current control.

Results and Discussion

This LQR-tuned CC–CVF control with a PV–BES microgrid system is modelled and simulated in MATLAB environment. The implemented algorithm synchronizes the PV–BES microgrid to the distribution network and shapes the utility grid current sinusoidal even under distorted PCC voltage in the absence of either both the BES and generation from PV array or anyone out of two at connected nonlinear load. The response of the PV–BES microgrid at the grid integrated mode, which includes pre-specified power mode, variable grid power mode, and DSTATCOM mode under dynamic loading condition, at standalone mode, synchronization/desynchronization, and harmonics performance, are depicted in Figs. 6, 7, 8, 9, and 10.

Fig. 6
figure 6

Grid integrated mode response at rejection–injection of load: (a) LQR-tuned CC–CVF response, (b) PV–BES microgrid response under dynamic irradiance

Fig. 7
figure 7

PV–BES microgrid response at grid tied mode and steady load current: (a) at dynamic irradiance and disconnection–connection of BES, (b) voltage swell and voltage sag at dynamic irradiance

Fig. 8
figure 8

PV–BES microgrid response at islanded mode: (a) at dynamic irradiance, (b) synchronization–desynchronization

Fig. 9
figure 9

PV–BES microgrid harmonic spectrum at grid integrated mode: (a–b) utility voltage harmonic spectrum, (c–d) utility grid current harmonic spectrum

Fig. 10
figure 10

PV–BES microgrid harmonics spectra at islanded mode: (a–b) PCC voltage harmonic spectrum, (c–d) load current harmonics spectrum

PV–BES Microgrid Performance at Grid Tied Mode

Figure 6(a–b) depicts the PV–BES microgrid response in the grid integrated mode at rejection–injection of the load. Figure 6(a) illustrates the LQR-tuned CC–CVF response on connection and disconnection of the load. Various intermediate signals such as load current after mitigating the second harmonic component (x L ), the quadrature load current component before integrator (x ), the orthogonal load current components (x, x), sample and hold active load current component (ILH), and the active component of load current (ILa) are depicted. The active component of load current tracks the load current accurately.

Figure 6(b) depicts the PV–BES microgrid response at dynamic solar irradiance and at connection–disconnection of the load. Before t ≤ 0.4 s, the solar irradiance is 1000 W/m2, the load is disconnected for 0.26 s < t < 0.34 s, and the load is connected during 0.34 s < t < 0.42 s. The BES charging current is more during the disconnected load than the duration for which the load is connected. The PV–BES injects pre-specified power to the utility network. The solar irradiance is 300 W/m2 during 0.4 s < t ≤ 0.6 s. It is observed when the load is disconnected, the whole PV array power is utilized to inject the pre-specified power to the utility network and to charge the BES. The BES discharges when the load is connected. The solar irradiance is reduced to zero at t = 0.6 s, the grid current phase is changed because the utility grid feeds the load. The utility grid current becomes zero as the load is disconnected. The DSTATCOM operation of VSC is evident because the utility current is sinusoidal.

Figure 7 depicts PV–BES microgrid response in the grid tied mode and steady load current. Figure 7(a) illustrates PV–BES response at varying solar irradiance and connection–disconnection of BES. The solar irradiance is 1000 W/m2 and the BES is connected for t < 0.4 s. The PV–BES microgrid feeds the load, injects pre-specified power to the distribution network, and the BES stores surplus energy. The BES is disconnected for 0.4 s < t < 0.5 s, whereas solar irradiance is 300 W/m2. The PV–BES microgrid system operates in variable power mode, the energy fed to the distribution network is almost zero since most of the PV array power is utilized to feed the load. The battery is connected at t = 0.5 s. This brings the system in pre-specified power mode. Thus, BES releases energy to feed the load and pre-specified power to the grid. At t = 0.6 s, the solar irradiance is reduced to zero, BES is disconnected; thus, the grid feeds the load, and grid current phase changes. The battery is connected at t = 0.66 s; thus, VSC feeds harmonics current to the load. The VSC acts as DSTATCOM when the generation from the PV array is absent.

Figure 7(b) shows the PV–BES response at voltage swell and voltage sag conditions under dynamic irradiance. The voltage swell occurs (220 V to 240 V) at t = 0.26 s, and the voltage sag (240 V to 205 V) occurs at t = 0.32 s when the solar insolation is 1000 W/m2. The load current rises and the utility grid current reduces at voltage swell and vice versa at voltage sag. A similar response is seen at another irradiance also. The utility grid current phase reversal occurs at t = 0.6 s since the solar insolation is reduced to zero. The utility current is sinusoidal all the time; thus, it enhances the PQ of the grid current.

PV–BES Microgrid Performance at Standalone Mode

The PV–BES microgrid response in an islanded mode is depicted in Fig. 8. Figure 8(a) depicts PV–BES response at varying irradiance. The islanding occurs at t = 0.36 s. The STS switch enabled signal becomes zero; thus, STS switch opens and the utility network current reduces to ‘0’. The BES charging current increases at t = 0.36 s, as the PV array generation is in excess at t < 0.4 s. The BES discharges at t > 0.4 s to feed the load current because solar irradiance reduces to 300 W/m2 at t = 0.4 s, and further reduces to ‘0’ at t = 0.6 s. The increase in BES discharging current occurs at t = 0.6 s. The PCC voltage is sinusoidal although distorted load is connected at the PCC.

Figure 8(b) illustrates the synchronization and desynchronization of PV–BES microgrid to the distribution network. The grid current, grid voltage, and grid voltage angle are depicted in red colour, whereas load current, load voltage, and load voltage angle are depicted in green colour. The utility voltage is reduced to ‘0’ at t = 0.24 s and increased to the nominal value (220 V) at t = 0.3 s. There are no transients in the load voltage at synchronization and desynchronization, and load voltage angle matched to utility grid voltage angle at synchronization smoothly.

PV–BES Microgrid Harmonic Response

The PV–BES microgrid harmonics performance is depicted in Fig. 9(a–f). Figure 9(a–b) depicts the distribution network voltage harmonic spectrum, Fig. 9(c–d) illustrates the utility grid current harmonics spectrum, and load current harmonics spectrum is depicted in Fig. 9(e–f). The load current THD is 43.72%, which is reduced to 3.59% in the utility grid current even though distorted utility voltage has 5.89% THD.

Figure 10(a–d) depicts harmonic spectra of PV–BES microgrid in an islanded condition. The PCC voltage and load current harmonic spectra are depicted in Fig. 10(a–b and c–d), respectively. The PCC voltage THD is 3.6%, while the load current THD is 44.62%. Thus, the power quality of PCC voltage is enhanced.

Conclusions

The LQR-tuned CC–CVF control has been used for a PV–BES microgrid to ensure reliable and continuous electricity to dedicated load, and efficient utilization of PV array, BES, and VSC. The pre-specified grid power mode of operation, variable grid power mode of operation, and DSTATCOM mode of operation of VSC are observed in the presence of both the BES and generation from PV array, when BES is removed and in the absence of both the BES and PV panel generation, respectively. The PCC voltage magnitude and nature are controlled in an islanded mode. The seamless transfer from an islanded mode to synchronized mode and vice versa is observed with power quality concern. This system ensures compliance with the IEEE-519 PQ standard for the utility grid current power quality all the time, and the VSC payback period is decreased. An overcharge and deep discharge of BES are avoided utilizing a bidirectional current converter control.