1 Introduction

With the increase in electrical demand and harmful environmental effects of conventional sources of energy, the future of energy generation is moving towards grid integration of renewable energy sources (RESs). The renewable energy resources (RESs) are emergent as a result of the benefits provided in terms of harvested energy being clean and pollution-free. Furthermore, various RESs (PV, wind, biomass, etc.) are abundant in nature and contribute to sustainable development, and the use of RES for power generation is user-friendly. Among the various RESs, solar energy (PV) is being widely used in distribution networks, due to low installation and maintenance cost, static design, no fuel cost, emerging technologies, and market penetration [1]. Recently the increase in the price of fossil fuels and decrease in the cost of solar PV (Photovoltaic) panels have also resulted in shift towards solar energy (PV) generation [1, 2]. The PV system provides electrical power at the distribution end to the load and grid. Therefore, transmission losses are minimized and also reduced the burden on the existing distribution, as well as transmission system [3,4,5]. However, the power generation from grid-connected PV system suffers from numerous load-side and grid-side power quality (PQ) issues, and the system faces challenges in maintaining the overall efficient performance of the system under nonideal grid environments characterized by a wide variety of load fluctuations, distortion, and unbalance condition [6]. Furthermore, increasing intermittent penetration level of RES in the grid leads to voltage regulation and power quality issues. These PQ problems can be found on the grid and the load side both, viz. load harmonics, load unbalancing, and disturbances are all caused by loads in the distribution network [6]. Power quality refers to fluctuations, distortions, unbalances and harmonics in the grid current at the point of interconnection (PCC). In the literature [7], issues related to poor PQ can be mitigated through efficient VSC control in a grid-integrated PV system [8, 9]. At PCC, THD in grid current and voltage variations is allowed within 5%, according to IEEE-519 [10,11,12].

In this study, an adaptive robust least mean logarithmic square (RLMLS) filter-based voltage source converter (VSC) control technique for grid-integrated PV system has been proposed. The proposed grid integrated PV system is a two-stage power conversion topology; it implies that the power conversion takes place in two stages; a DC–DC converter is utilized in the first stage, which is responsible for MPPT functioning. The MPPT algorithm is used to control the DC–DC converter, forcing the PV power generation system to run at MPP (maximum power point). In the second stage, a voltage source converter (VSC), also known as a DC–AC converter, is utilized to convert power from DC to AC. The proposed control approach is utilized to manage the VSC in such a way that it meets the active load requirement and then feeds the remaining power to the grid and vice versa. The reactive power requirement is fulfilled by the VSC alone, and hence, the system works at unity power factor under all loading conditions. It satisfies the grid code, which is the most important criteria, when power is sent into the grid.

Solar PV array exhibits nonlinear characteristics between current and voltage, which are irradiance and temperature dependence and hence very challenging to find the maximum of a PV array’s efficiency. To get maximum power from PV array, various maximum power point tracking algorithms (MPPTs) have been discussed precisely [13,14,15]. In the literature, several MPPT techniques, namely simple and efficient P&O algorithm [16], incremental conductance (InC) [7], particle swarm optimization (PSO) [17], Gray wolf optimization (GWO) [18], have been discussed. The MPPT problem has been discussed in the literature in various ways, but P&O is the usually used technique due to low cost and ease of implementation [16]. The simplicity and general character of the P&O approach, which includes trade-offs between response rate and steady-state oscillations, is one of its advantages [16]. Further research is being carried out to improve the existing MPPT algorithm to handle temperature and irradiance variations.

In the literature, many control algorithms for fundamental extraction and harmonics elimination have been developed such as synchronous reference frame (SRF) [19], second-order generalized integrator-PLL [20], quadrature PLL (QPLL), enhanced PLL (EPLL) [21] and synchronous PLL (SRF-PLL) [22]. The increased complexity, existence of a low-pass filter in SRF-PLL, which degrades the dynamic response, and increased computational burden are the primary disadvantages of PLL-based methods. Furthermore, it has been observed that sometimes implementation of PLL exhibits computational delay and must be tuned before use. Deo et al. [23] implemented an adaptive PLL-less scheme, which shows that functioning of a system using a PLL-less method is less suitable for real-time applications since it has a higher sensitivity to parameter variations. Agarwal et al. [24] developed the least mean fourth (LMF), which suffers from the poor steady-state response because of the fourth-order optimization and lacks in accuracy in terms of fundamental extraction capabilities. In the [25, 26], authors have discussed MS and LMF, respectively, whereas the adaptive LMS control is a distinguished one, which is widely used due to its simplicity. LMS and LMF are the subject to oscillations and have lower accuracy in estimating mean square error (MSE). However, LMF offers better performance than LMS, in terms of trade-off point between steady state and transient, but performance has stability issues. The performance of conventional adaptive LMS controls is frequently inadequate due to poor dynamic performance; as a result, there is a trade-off between tracking capabilities and accuracy related to fixed step size. As a result, an optimal control approach is required to provide good transient, dynamic and steady-state performance, which can be overcome the raised issues.

In this paper, a novel VSC control technique based on a robust least mean logarithmic square (RLMLS) adaptive filter is proposed, which provides better performance in terms of transient, steady-state, dynamic response and faster convergence speed. It also significantly improves the accuracy of the algorithm during the dynamic load condition and offers less oscillations in the estimation of active component. The proposed control scheme does not require a complicated block for synchronization, such as a phase lock loop (PLL). Hence, the proposed control eliminates the additional computational burden, with the added benefits of reduced complexity, ease of implementation, and adaptability.

The prime contribution of the paper is given below:

  1. 1.

    The proposed system transfers active power effectively from PV system to the local loads and the grid.

  2. 2.

    The proposed RLMLS method extracts the fundamental components at a faster convergence speed, resulting in improved performance under dynamic and steady-state condition of load.

  3. 3.

    By correcting reactive power, the grid’s power factor has improved.

  4. 4.

    Compensates unbalance and nonlinearity of the loads, even under ideal and weak grid scenarios.

  5. 5.

    The control scheme is efficient in the event of an unbalanced or distorted grid voltage.

In MATLAB/Simulink environment, Simscape toolbox is used to model the proposed control-based grid-integrated PV system. Furthermore, a prototype hardware setup of DSTATCOM is developed in laboratory to validate the proposed control’s satisfying performance under weak grid scenarios, viz. unbalancing and distortion.

2 System description

The proposed SPV-based microgrid is depicted in Fig. 1, which includes solar PV array, MPPT, boost converter, interface inductors, VSC, and other loads. The proposed VSC control algorithm is used to integrate PV systems into the grid. The proposed approach is tested in the laboratory using MATLAB/Simulink and prototype hardware.

Fig.1
figure 1

Proposed grid-integrated PV system

3 PV Inverter control scheme

Figure 2 depicts the proposed RLMLS control, and various input signals such as load current and grid voltages at PCC along with DC link voltages are sensed. In-phase, quadrature unit templates of voltage, and fundamental active and reactive weight components are estimated using mathematical equations. Furthermore, total active and reactive weights are estimated by adding compensated current from DC- and AC-side PI controller, respectively. In the next stage, active and reactive components of reference current are estimated by multiplying in-phase and quadrature unit template, respectively. In the final stage, active and reactive reference components of respective phases are added to get reference current. Furthermore, hysteresis current control is used for generation of controlled switching pulses of VSC. The proposed control is described step by step as follows:

Fig. 2
figure 2

Proposed RLMLS adaptive control for reference generation

3.1 VSC switching pulse generation

The in-phase unit template (\({\mathcal{U}}_{pa}\),\( {\mathcal{U}}_{pb}\), \({\mathcal{U}}_{pc}\)):

$$ {\mathcal{U}}_{pa} = \frac{{{\mathcal{V}}_{sa} }}{{{\mathcal{V}}_{t} }} , {\mathcal{U}}_{pb} = \frac{{{\mathcal{V}}_{sb} }}{{{\mathcal{V}}_{t} }}, {\mathcal{U}}_{pc} = \frac{{{\mathcal{V}}_{sc} }}{{{\mathcal{V}}_{t} }};{\text{where}}\left( {{\mathcal{V}}_{sa } ,{\mathcal{V}}_{sb } ,{\mathcal{V}}_{sc} } \right)\;{\text{are}}\;{\text{phase}}\;{\text{voltages}}. $$
(1)

Quadrature unit templates (\({\mathcal{U}}_{qa}\)\(, {\mathcal{U}}_{qb} ,{\mathcal{U}}_{qc}\)):

$$ u_{qa} = - \frac{{u_{pb} }}{\sqrt 3 } + \frac{{u_{pc} }}{\sqrt 3 } , u_{qb} = \frac{{\sqrt 3 u_{pa} }}{2} + \frac{{\left( {u_{pb} - u_{pc} } \right)}}{2\sqrt 3 }, u_{qc} = - \frac{{\sqrt 3 u_{pa} }}{2} + \frac{{\left( {u_{pb} - u_{pc} } \right)}}{2\sqrt 3 } $$
(2)

3.1.1 Weight extraction by proposed control

Using the load current (\(i_{L} )\) and in-phase unit template (\({\mathcal{U}}_{pa}\),\( {\mathcal{U}}_{pb}\), \({\mathcal{U}}_{pc}\)) at the nth instant, the estimation error (\(e_{p}\)) of distinct phases \(e_{pa} ,e_{pb} ,e_{pc} \) is calculated as follows:

$$ e_{pa} \left( n \right) = i_{La} \left( n \right) - u_{pa} \left( n \right)*w_{pa} \left( n \right) $$
(3)
$$ e_{pb} \left( n \right) = i_{Lb} \left( n \right) - u_{pb } \left( n \right)*w_{pb} \left( n \right) $$
(4)
$$ e_{pc} \left( n \right) = i_{Lc} \left( n \right) - u_{pc} \left( n \right)*w_{pc} \left( n \right) $$
(5)

Fundamental active weights \(w_{pa} ,w_{pb} ,w_{pc}\) at (n + 1)th instant for different phases are computed by Eqs. 7, 8, and 9, where \(e_{pa} \left( n \right)\), \(e_{pb} \left( n \right)\), \(e_{pc} \left( n \right)\) are the priori estimation errors. Step size \(\mu \) and scaling factor α are positive scalar constants and taken as 0.1 and 0.0035, respectively, for minimum error.

For the overall error reduction, updated weight \(w_{pm } \left( {n + 1} \right)\) is computed from weight \( w_{pm} \left( n \right)\). The following is an updated weight vector for various phases:

$$ w_{pa} \left( {n + 1} \right) = w_{pa} \left( n \right) + \mu \left( n \right)\frac{{\alpha *{ }e_{pa} \left( n \right)}}{{1 + \alpha *{ }e_{pa}^{2} \left( n \right)}}*e_{pa} \left( n \right) $$
(6)
$$ w_{pb} \left( {n + 1} \right) = w_{pb} \left( n \right) + \mu \left( n \right)\frac{{\alpha *{ }e_{pb} \left( n \right)}}{{1 + \alpha *{ }e_{pb}^{2} \left( n \right)}}*e_{pb} \left( n \right) $$
(7)
$$ w_{pc} \left( {n + 1} \right) = w_{pc} \left( n \right) + \mu \left( n \right)\frac{{\alpha *{ }e_{pc} \left( n \right)}}{{1 + \alpha *{ }e_{pc}^{2} \left( n \right)}}*e_{pc} \left( n \right) $$
(8)

By averaging, the active component of load (\(w_{lp}\)) is calculated.

$$ w_{lp} = \frac{{\left( {w_{pa} + w_{pb} + w_{pc} } \right) }}{3} $$
(9)

Using the load current (\(i_{L} )\) and quadrature unit template (\({\mathcal{U}}_{qa}\),\( {\mathcal{U}}_{qb}\), \({\mathcal{U}}_{qc}\)) at the nth instant, the estimation error (\(e_{q}\)) of distinct phases \(e_{qa} ,e_{qb} ,e_{qc} \) is calculated as follows:

$$ e_{qa} \left( n \right) = i_{La} \left( n \right) - u_{qa} \left( n \right)*w_{qa} \left( n \right) $$
(10)
$$ e_{qb} \left( n \right) = i_{Lb} \left( n \right) - u_{qb } \left( n \right)*w_{qb} \left( n \right) $$
(11)
$$ e_{qc} \left( n \right) = i_{Lc} \left( n \right) - u_{qc} \left( n \right)*w_{qc} \left( n \right) $$

For overall error reduction, updated weight \(w_{qm } \left( {n + 1} \right)\) is computed from weight \( w_{qm} \left( n \right)\). The following is an updated weight vector for various phases:

$$ w_{qa} \left( {n + 1} \right) = w_{qa} \left( n \right) + \mu \left( n \right)\frac{{\alpha *{ }e_{qa} \left( n \right)}}{{1 + \alpha *{ }e_{pa}^{2} \left( n \right)}}*e_{qa} \left( n \right) $$
(12)
$$ w_{qb} \left( {n + 1} \right) = w_{qb} \left( n \right) + \mu \left( n \right)\frac{{\alpha *{ }e_{qa} \left( n \right)}}{{1 + \alpha *{ }e_{pa}^{2} \left( n \right)}}*e_{qb} \left( n \right) $$
(13)
$$ w_{qc} \left( {n + 1} \right) = w_{qc} \left( n \right) + \mu \left( n \right)\frac{{\alpha *{ }e_{qa} \left( n \right)}}{{1 + \alpha *{ }e_{qa}^{2} \left( n \right)}}*e_{qc} \left( n \right) $$
(14)

The proposed control technique's aim is to reduce error. The average fundamental reactive components of load (\(w_{lq}\)) can be calculated in the same way:

$$ w_{lq} = \frac{{\left( {w_{qa} + w_{qb} + w_{qc} } \right)}}{3} $$
(15)

The error \(v_{dc\left( e \right)} \left( n \right) \) in sensed actual DC-link voltage ( \(V_{dc}\)) with respect to reference voltage (\(V_{dc}^{*}\)) is given as at nth sampling,

$$ v_{dc\left( e \right)} \left( n \right) = V_{dc}^{*} \left( n \right) - V_{dc} \left( n \right) $$
(16)

PI controller output is DC loss weight (\(w_{dc}\)), which regulates the DC-link voltage. DC loss weight (\(w_{dc} ) \) is estimated by \(v_{dc\left( e \right)}\), and gains of PI controller gains (\(K_{pd} , K_{id}\)) are given as:

$$ w_{dc} \left( {n + 1} \right) = w_{dc} \left( n \right) + K_{pd} \left\{ {v_{dc\left( e \right)} \left( {n + 1} \right) - v_{dc\left( e \right)} \left( n \right)} \right\} + K_{id} v_{dc\left( e \right)} \left( {n + 1} \right) $$
(17)

where \(K_{pd} , K_{id}\) are gains of PI controller of DC link. Error in the DC link voltage at (n + 1)th sampling time with respect to \(V_{dc}^{*}\) is represented by \(v_{dc\left( e \right)} \left( {n + 1} \right)\).

Where \(K_{pd} , K_{id}\) are PI controller’s gain of the DC link. The \(v_{dc\left( e \right)} \left( {n + 1} \right)\) represents the error in the DC link voltage at (n + 1)th sampling time with respect to \(V_{dc}^{*}\).

The transfer function of the proposed control \((G_{c} \left( S \right)\)) of grid-integrated PV system is evaluated as:

$$ G_{c} \left( S \right) = K_{pd} + \frac{{K_{id} }}{S} $$
(18)

The Bode diagram is depicted in Fig. 3 for the system parameter given in Appendix. It can be seen from the Bode diagram that control of grid-integrated PV system is stable.

Fig. 3
figure 3

Stability analysis of proposed control using Bode diagram

Total active weight (\(w_{ps}\)) component can be evaluated as:

$$ w_{ps} = w_{lp} + w_{dc} $$
(19)

Active reference current can be evaluated below:

$$ i_{pa}^{*} = w_{ps} {*}{\mathcal{U}}_{pa} ; i_{pb}^{*} = w_{ps} {*}{\mathcal{U}}_{pb} ;i_{pc}^{*} = w_{ps} *{\mathcal{U}}_{pc} $$
(20)

Error in the supply voltage is with respect to set reference voltage compensated by PI controller. AC loss weight (\(w_{ac}\)) output of PI controller is given as:

$$ w_{ac} \left( {n + 1} \right) = w_{ac} \left( n \right) + K_{pa} \left\{ {v_{te} \left( {n + 1} \right) - v_{te} \left( n \right)} \right\} + K_{ia} v_{te} \left( {n + 1} \right) $$
(21)

where \(K_{pa} , K_{ia}\) PI controller’s gain and error at (n + 1) th sampling time with respect to set reference AC voltage is presented by \(v_{te} \left( {n + 1} \right)\).

The reference current’s total reactive weight component (\(w_{qs}\)) is illustrated below:

$$ w_{qs} = w_{ac} - w_{lq} $$
(22)

Reactive reference components can be estimated as:

$$ i_{qa}^{*} = w_{qs} * {\mathcal{U}}_{qa} ,i_{qb}^{*} = w_{qs} {*}{\mathcal{U}}_{qb} ,i_{qc}^{*} = w_{qs} *{\mathcal{U}}_{qc} $$
(23)

3.1.2 Switching pulse generation

The addition of \(\left( {i_{pa}^{*} , i_{pb}^{*} ,i_{pc}^{*} } \right)\) and \( (i_{qa}^{*} , i_{qb}^{*} ,i_{qc}^{*} )\) is utilized to estimate reference current (\(i_{sa}^{*} , i_{sb}^{*} ,i_{sc}^{*}\)) which is given by:

$$ i_{sa}^{*} = i_{pa}^{*} + i_{qa}^{*} ,i_{sb}^{*} = i_{pb}^{*} + i_{qb}^{*} , i_{sc}^{*} = i_{pc}^{*} + i_{qc}^{*} $$
(24)

Furthermore, reference current is compared in hysteresis block with sensed actual Igrid for the generation of switching pulses.

4 Simulation results

The performance of a proposed adaptive RLMLS filter-based control is analyzed under PFC mode of operation and compared to both SRF and LMS. System parameters are given in Appendix. The proposed control approach is tested under various scenarios, viz. reactive, nonlinear, and unbalanced load condition, at STC and varying insolation. Furthermore, it is also tested under nonideal grid environments characterized by a wide variety of load fluctuations, distortion, and unbalanced voltage of grid condition, as demonstrated in this section. The system’s performance has been tested against an IEEE-519 standard, indicating that it is capable of maintaining the power quality within the limit.

4.1 Performance of system using proposed control

4.1.1 4.1.1. Steady state and dynamic performance at STC input

Figures 4 and 5 show the performance of control under linear and nonlinear loads, respectively. Vgrid, Igrid, Iload, Iinv, Vdc, and power sharing between VSC, grid and load are among the system’s parameters that are examined.

Fig. 4
figure 4

Performance at STC under linear (balance/unbalance) and variable load

Fig. 5
figure 5

Performance at STC input under nonlinear (balance/unbalance) and load varying

VSC supplies 4 kW and 3.0 kVAR demand of the load until 0.15 s, Igrid and Vgrid are 180° out of phase (as grid is receiving reserve 6.25 kW power), and Vdc is maintained at its reference (V*dc). VSC alone meets reactive power requirement of load, resulting in a 0% reactive power delivered from the grid, proving that control scheme is efficient under the UPF mode.

Furthermore, performance under linear unbalanced conditions is evaluated by disconnecting one phase ‘b' for 0.15 to 0.25 s and investigating several system parameters such as Vgrid, Igrid, Iload, Iinv, Pgrid, Qgrid, Pinv, Qinv, Pload, Qload, and Vdc as shown in Fig. 4.

During the unbalance moment, the VSC compensates for the effect of the load unbalance and keeps the Igrid balanced. It also meets the reactive demand, keeping the grid at UPF while balancing the Igrid. A 10-kVA linear load with 0.8 pf lagging was connected to PCC at 0.3 to 0.4 s to examine the load variation performance. At 0.3 s, demand is 15kVA, 0.8 pf lagging (12 kW and 9 kVAR). VSC is insufficient to meet the load requirement; an additional 1.75 kW is drawn from the grid to meet the load requirement.

It has been observed that Igrid is sinusoidal and Vdc is maintained at V*dc during single phasing and load variation. THD in Igrid is 2.85 percent, as depicted in Fig 8a, it lies inside the bounds of IEEE standard 519–2014.

It has been observed that the proposed control approach compensates the effect of reactive power and unbalance of the load hence improves the power factor and maintains sinusoidal grid current under different loading conditions under STC.

Further, under nonlinear load the proposed control has been validated, and the results are given in Fig. 5.

The VSC supplies 3.1 kW, until 0.15 s, Igrid, Vgrid are 180° out of phase (as grid is receiving reserve 6.25 kW power), and Vdc is maintained at its reference (V*dc). VSC alone meets the load requirement, resulting in a 0% reactive power delivered from the grid, proving that the suggested control is effective under UPF mode by keeping the grid at UPF.

Furthermore, the performance under nonlinear unbalanced load conditions is evaluated by disconnecting one phase ‘b’ for 0.15 to 0.25 s and investigating various system parameters such as Vgrid, Igrid, Iload, Iinv, Vdc, Pgrid, Qgrid, Pinv, Qinv, Pload, Qload, and Vdc as shown in Fig. 5.

During the unbalance moment, the VSC compensates for the effect of the load unbalance and keeps the Igrid balanced. It also meets the reactive load demand, keeping the grid at UPF while balancing the Igrid. A 5-kVA, 0.8 pf lag is connected at PCC from 0.3 to 0.4 s to examine the load variation performance. At 0.3 s, load requirement is (7.1 kW and 3 kVAR), because the power produced by the PV inverter is sufficient to meet the load requirement, and the remaining 3.15 kW is delivered to the grid.

It can be seen that VSC compensates the harmonics and maintains Igrid sinusoidal, Vdc is maintained at V*dc, during single phasing and load variation. THD in Igrid is 2.49 percent; as depicted in Fig 8b, it lies inside the bounds of IEEE standard 519–2014, whereas THD in Iload is 29.38%.

It has been observed that even under nonlinear load conditions, the proposed control approach compensates the effect of reactive power, unbalance and nonlinearity of the load and hence improves the power factor and maintains sinusoidal and balanced grid current. Further, harmonics in the Igrid is 2.49 percent, which satisfies the IEEE standards.

4.1.2 Steady-state and dynamic behaviour at varying insolation

Furthermore, control is validated under variable insolation. Solar irradiance is lowered from 1000 W/m2 to 700 W/m2 at 0.15 s, resulting in a fall in solar PV current as a result, a reduction in PV output power.

The simulated results under 20 kVA, 0.8 pf lag linear load and associated different parameters such as Vgrid, Igrid, Iload, Iinv, Vdc, Pgrid, Qgrid, Pinv, Qinv, Pload, Qload, and Vdc, are presented in Fig. 6.

Fig. 6
figure 6

Performance at varying irradiance under linear load

It can be shown in Fig. 6 until 0.25 s that both Igrid and Vgrid are in phase, Vdc is maintained at V*dc, VSC delivers its developed 10.25 kW, which is insufficient to meet the load requirement of 20 kVA, 0.8pf lag (16 kW and 12 kVAR), so balanced power of 5.75 kW is drawn from the grid to meet the load demand, while 12 kVAR of reactive demand is fed by VSC alone, proving that the control is effective under UPF mode. The proposed technique has also been evaluated on a linear load with insolation ranging from 0.25 s to 0.4 s.

After 0.25 s, due to reduction in solar irradiance, Pinv is reduced to 7 kW at 0.25 s, causing additional 3.25 kW that has been supplied by grid to the load as shown in Fig. 6. Whereas the complete reactive power is still met by the VSC alone, the grid remains at UPF during periods of low solar irradiance.

The sharing of power between load (Pload, Qload), VSC (Pinv, Qinv) and grid (Pgrid, Qgrid) is maintained throughout solar insolation variation, Igrid is sinusoidal, Vdc is sustained at V*dc. THD in Igrid is 1.95% under varying insolation, as depicted in Fig. 8c, it lies inside the bounds of IEEE standard 519–2014. %.

It has been observed that the proposed control approach compensates the effect of reactive power, hence improving the power factor, under varying insolation.

Further, under nonlinear load and varying irradiances, it has been validated that corresponding different parameters such as Vgrid, Igrid, Iload, Iinv, Pgrid, Qgrid, Pinv, Qinv, Pload, Qload, and Vdc of the VSC are depicted in Fig. 7.

Fig. 7
figure 7

Performance at varying insolation under nonlinear load

Until 0.25 s, Igrid and Vgrid are out of phase by 1800 (as grid is receiving power), Vdc is maintained at V*dc, VSC supplies 10.25 kW. After meeting the 3.1 kW load demand, the excess 7.15 kW is supplied to the grid, the VSC delivers the load’s reactive demand, showing that the control is effective under UPF mode.

After 0.25 s, due to reduction in solar irradiance, Pinv is reduced to 7 kW at 0.25 s, causing decrease in the power fed to the grid and load as depicted in Fig. 7.

The sharing of active and reactive power between load (Pload, Qload), grid (Pgrid, Qgrid) and inverter (Pinv, Qinv) is maintained throughout solar insolation variation, Igrid is sinusoidal, Vdc is maintained at V*dc. THD in Igrid is 3.95% under varying insolation, as depicted in Fig. 8d, it lies inside the bounds of IEEE standard 519–2014, while THD in Iload is 29.39% as depicted in Fig. 8e.

Fig. 8
figure 8

Igrid and THD (%) at STC: a linear; b nonlinear load; Igrid and THD (%) at varying irradiances: c linear, d nonlinear load; e Iload THD (%) and waveform under nonlinear load

It has been observed that the proposed control approach compensates the effect of harmonics in load current, hence improving the Igrid, under varying insolation.

4.1.3 Response under distorted and unbalanced grid voltage

To test the robustness of the system, control scheme is validated under unbalanced and distorted voltage of grid. Figure 9 depicts the system’s response when the grid voltage is unbalanced and distorted. Various parameters, such as Vgrid, Igrid, Iload, Iinv, Vdc, and THDs, are evaluated and shown.

Fig. 9
figure 9

a Performance under distorted and unbalance voltage of grid; b zoomed area of Vgrid under unbalance and distortion; c THD in Vgrid under distortion; d THD in Igrid under distorted grid voltage and load

Grid voltage is unbalanced between 0.15 s and 0.25 s and suffers from distortion between 0.25 s and 0.35 s, as seen in Fig. 9. When the grid is unbalanced, the voltage of phases "a" and "c" drops by 20% and 6%, respectively. Furthermore, irrespective of unbalance voltage of grid and load harmonics, it compensates the effect of unbalance voltage of grid and keeps Igrid balanced and distortion less irrespective of unbalance voltage of grid and load harmonics. As can be observed in Fig. 9a, d it also keeps the grid at UPF as well as the balanced and sinusoidal grid current.

Further, from 0.25 s and 0.35 s when grid voltage is distorted up to 17.5 percent, as shown in Fig. 9c, distortion level in Igrid is 2.5 percent, which is within the IEEE standard, as shown in Fig. 9d. As shown in Fig. 9a and d, control scheme is efficient in keeping sinusoidal Igrid that is distortion less and balanced, regardless of voltage and load harmonics. It has been observed that under nonideal grid environments also characterized by distortion and unbalance voltage condition, the control is efficient, in maintaining balanced and harmonics-free grid current as depicted in Fig. 9.

4.2 Comparison of proposed algorithm with SRF and LMS

Figure 10 depicts performance comparison of proposed RLMLS, SRF and LMS algorithms under transient and dynamic performance. Nonlinear load is considered to study both transient and dynamic responses. Further, from 0.15 to 0.25 s, one phase of load is eliminated for dynamic response. As can be observed from Fig. 10 and Table 1, the proposed control provides the best initial transient response in terms of overshoot and undershoot. Further during load perturbation, from 0.15 to 0.25 s, it can be seen that the proposed control scheme has lower ripples than LMS and SRF control, in the active component estimation, during single phasing that refers faster convergence. Furthermore, the control scheme does not require a complicated block for synchronization, such as a phase lock loop (PLL), which eliminates the additional computational burden, with the added benefit of reduced complexity, ease of implementation, and adaptability.

Fig. 10
figure 10

Comparative performance of proposed RLMLS and conventional SRF and LMS

Table 1 Comparison

5 Experimental results

Due to laboratory constraints, the established prototype is configured to function as a DSTATCOM using a 200-V reference DC link. VSC as a DSTATCOM is tested using the proposed control. The prototype hardware configuration developed in the laboratory is shown in Fig. 11. The hardware that has been developed includes the following features: 1. grid, 2. inductors for interfacing, 3. load, 4. Fluke power analyzer, 5. VSC, 6. DC power supply, 7. DSO, 8. MicroLabBox, 9. voltage (LV 25-P) and current sensors (LA 55-P) based on the Hall effect. System parameters for hardware development are given in Appendix.

Fig.11
figure 11

Prototype Hardware set-up

5.1 Performance using proposed control

5.1.1 Linear load

In Fig. 12, several experimental results are presented, including Vgrid, Igrid, Iload, and current provided by inverter (Iinv). Performance, under load of 0.43 kVA, 0.91 pf lag, has been analyzed. Before compensation, reactive power and power factor at the grid side are 0.19 kVAR and 0.91 pf lagging, respectively, as shown in Fig. 12b. After compensation, reactive power and power factor at the grid side are 0.01 kVAR and 0.99 pf lagging, respectively, as shown in Fig. 12c. After compensation, the grid's reactive power is practically zero, and the grid is maintained at UPF, as illustrated in Fig. 12c, which shows UPF operation with the proposed control. The VSC meets the load reactive demand after compensation, which was supplied by grid before compensation. Figure 12b, c depicts the grid’s power and power factor before and after correction. As observed in Fig. 12c, the grid's power factor is kept close to UPF after compensation. By correcting the reactive power, the grid power factor is considerably enhanced and kept around UPF (0.99 lagging) using the proposed control.

Fig.12
figure 12

Experimental result: a waveform; b, c: power and power factor: before and after compensation, respectively

5.1.2 Nonlinear load

The performance under nonlinear load, Vgrid, Igrid, Iload, and current supplied by inverter (Iinv) is shown in Fig. 12b, and Fig. 13a illustrates the load fluctuation from 65 to 40. By correcting the harmonics of local loads, the inverter acts as a harmonic compensator. As indicated in Fig. 13c and d, THD in Igrid is 2.8%, which are under the limit of IEEE standard 519–2014, while THD in nonlinear load current is 27.7%. Igrid is considerably improved in terms of THD using the proposed scheme by eliminating the harmonics.

Fig.13
figure 13

System parameter: a waveform under nonlinear load; b waveform: load increment; c THD (%) of Iload; d THD (%) of Igrid

5.1.3 Unbalance load

Control scheme is also evaluated and tested with a nonlinear unbalance load (R = 65Ω). Unbalance is achieved by disconnecting one phase for a few cycles and then reconnecting it, as seen in Fig. 14 by the circled area. Various experimental parameters of the system, viz. Iload, fundamental active component (Wps), Vdc and Iinv, are shown in Fig. 14. The proposed control’s performance is found to be efficiently even when the load is unbalanced.

Fig. 14
figure 14

Hardware result under unbalance nonlinear load

5.1.4 Performance in the presence of an unbalanced grid voltage

The proposed control’s performance is also analyzed for nonlinear and unbalanced loads under unbalanced grid voltage. Figure 15a shows that the control scheme is efficient in keeping, Igrid free of harmonics, while the grid voltage is unbalanced by 21% (increased) in phase ‘a’. Furthermore, distinct phases of load current are represented in Fig. 15b, during the unbalance of the load by removing one phase ‘b’. It was found that the performance of the proposed control is also efficient under nonideal grid.

Fig. 15
figure 15

System response under unbalanced grid voltage at: a balance load; b unbalanced load

5.1.5 Comparison of proposed algorithm, conventional LMS and SRF

Figure 16 depicts the performance comparison of proposed RLMLS, SRF and LMS algorithms under steady-state and dynamic performance. Further, one phase of load has been removed and reconnected, for dynamic response. As can be observed from Fig. 16 and Table 2, the proposed control has low oscillations during dynamic condition, viz. unbalanced load, and shows faster convergence speed while estimating the fundamental active component; hence, dynamic performance gets improved. Furthermore, the proposed control algorithm is less complex due to the absence of PLL as in case of SRF; therefore, sampling time gets reduced and thus accuracy is better with the added benefits of faster convergence speed, less complexity and thus less sampling time, ease of implementation, and adaptability.

Fig. 16
figure 16

Performance comparison: proposed control with conventional LMS and SRF under dynamic load

Table 2 Performance comparison

6 Conclusion

This article proposes an adaptive RLMLS filter-based control method for PV-interfaced grid system. The proposed control has been validated under nonlinear/linear load, decreased solar insolation, load removal/increment, voltage distortion, and unbalance conditions for PV-interfaced grid system. It has been observed that using the proposed control, system operates optimally by transferring active power effectively from PV system to the loads and the grid and maintaining unity power factor (UPF) at the grid side and ensuring that the grid current is to be free from harmonics and thus improving PQ, under all the above-mentioned conditions. Furthermore, the proposed control has better transient, steady-state, dynamic performance, and less complexity, thus reduces the sampling time and provides better accuracy, lesser dynamic oscillations/ripples in active component as compared to conventional SRF and LMS control with added benefits of ease of implementation and adaptability. The adaptive RLMLS control is fast in operation, reduces system complexity, and is simple to incorporate in the system. The THD in the grid current is observed to be less than 5%, which is within the limit of IEEE-519 standard. Further, the Simulink results are validated using hardware prototype working as DSTATCOM. Based on the experimental validation, the proposed scheme has been found to be satisfactory performance for a wide range of results obtained in steady-state and dynamic conditions.