Nyström Minimum Kernel Risk-Sensitive Loss Based Seamless Control of Grid-Tied PV-Hybrid Energy Storage System

: This paper presents Nyström minimum kernel risk-sensitive loss (NysMKRSL) based control of a three-phase four-wire grid-tied dual-stage PV-hybrid energy storage system, under varying conditions such as irradiation variation, unbalanced load, and abnormal grid voltage. The Voltage Source Converter (VSC) control enables the system to perform multifunctional operations such as reactive power compensation, load balancing, power balancing, and harmonics elimination while maintaining Unity Power Factor (UPF). The proposed VSC control delivers more accurate weights with fewer oscillations, hence reducing overall losses and providing better stability to the system. The seamless control with the Hybrid Energy Storage System (HESS) facilitates the system’s grid-tied and isolated operation. The HESS includes the battery, fuel cell, and ultra-capacitor to accomplish the peak shaving, managing the disturbances of sudden and prolonged nature occurring due to load unbalancing and abnormal grid voltage. The DC link voltage is regulated by tuning the PI controller gains utilizing the Salp Swarm Optimization (SSO) algorithm to stabilize the system with minimum deviation from the reference voltage, during various simulated dynamic conditions. The optimized DC bus control generates the accurate loss component of current, which further enhances the performance of the proposed VSC control. The presented system was simulated in the MATLAB 2016a environment and performed satisfactorily as per IEEE 519 standards.


Introduction
Grid integrated photovoltaic (PV) systems are gaining substantial significance in the modern grid scenario. The PV power generation rose 22% (+131 TWh) in 2019, to 720 TWh as the second-highest absolute generation, slightly behind wind and ahead of hydropower plants [1]. Despite the global slowdown of 2020, PV is expected to grow 15% annually from 720 TWh to almost 3300 TWh in 2030 [2]. Moreover, the world is expecting CO 2 emission reductions from 33.5 Gt to 20 Gt by the year 2030 [3,4].
The voltage source converter (VSC) controls based on conventional, adaptive, predictive, and artificial intelligence (AI) techniques have been implemented on a grid-tied PV system. The synchronous reference frame (SRF) and power balance theory [5] controls have been extensively used for grid-tied PV systems. Researchers have implemented various adaptive VSC controls, such as least mean square (LMS) [6], which uses a fixed step-size for adaptation to find the balance between the convergence equation and maladjustment error results at low-convergence speed and larger steady-state oscillations. The least mean fourth (LMF) algorithm [7] acts as a higher-order adaptive filter for better mean square error (MSE) reduction with fixed step-size. The power normalized KLMS (PNKLMS) [8] utilizes the power kernel for fundamental current component extraction with reduced computational burden. The analysis of variance (ANOVA) kernel Kalman algorithm (AKK) [9] is the hybridization of the Kalman filter and kernel trick, which significantly reduces the algorithm delay and complexity. The normalized Laplacian kernel adaptive Kalman algorithm (NLKAK) [10] is a Laplacian kernel that is combined with an estimator process for pattern reorganization. The KAF methods utilize the MSE as a cost function, which provides adequate accuracy, stability, and convergence rates with Gaussian noises. More robust adaptive algorithms, such as maximum correntropy criteria (MCC) [11], which is a biased estimator, utilizes the Gaussian kernel for better mean square stability. The reweighted zero-attracting MCC (RZA-MCC) [12] enhances the performance of MCC with a zero-attracting algorithm resulting in a better convergence rate and reduced harmonics level. The variable parameter zero-attracting LMS (VPZALMS) [13] uses an adaptive coefficient to smooth out the transients, which results in better performance. The kernel risk-sensitive loss (KRSL) [14] is where the cost function is made insensitive towards heavytailed Gaussian noises. The proposed control based on the Nyström minimum kernel risk-sensitive loss (NysMKRSL) [15] algorithm with a linear growth network can manage both Gaussian and non-Gaussian noises with high filtering accuracy and robustness, as compared to other adaptive control algorithms. In the model predictive controls (MPC), the cost function parameter selection is vital for system performance. The finite control set MPC (FCSMPC) [16] is the optimization based control of the inverter. The weighting factor design based MPC (WFDMPC) [17] utilizes automated weights of cost functions for better performance, which have been utilized for VSC control. AI techniques such as an artificial neural network (ANN) [18] and adaptive network-based fuzzy interface system (ANFIS) [19] have been utilized in micro-grids.
The VSC control enables it to perform multifunctional operations, including reactive power compensation, power quality enhancement, load, and power balancing while maintaining unity power factor (UPF). The VSC performs multifunctional operations during steady-state and various dynamic states, i.e., irradiation variation, load unbalancing [20,21], grid voltage sag and swell, and fixed power mode.
The grid-tied PV system may face an islanding problem during very low solar irradiation levels (low PV power yield), under and over-grid voltages, or frequency fluctuations, curbing the effect of grid faults and system maintenance [22,23]. The grid islanding condition should be quickly detected and eliminated by seamlessly re-synchronizing the grid. Several VSC controlling strategies and topologies have been proposed by researchers for seamless control, such as in [24] where the same control loop is utilized in grid-tied and islanded mode. In [25], indirect control strategies involve a current control loop that regulates grid current by providing a reference voltage to the voltage control loop. In [26], the grid-tied mode is controlled by droop control or integral control, whereas in islanded mode, nominal voltage and frequency values are regulated. In [27], VSC and current source converter (CSC) are utilized to achieve seamless control. In [28], a quasi proportional and multi-resonant grid synchronization scheme is presented. In [29], a voltage control strategy is used in both grid-tied and islanded mode with a D-module filter to extract the positive sequence voltage component. In [30], a current controller regulates the grid current, and a voltage controller handles the filter capacitance in the grid-tied mode. Whereas, during grid-islanded mode, the voltage controller regulates the output voltage.
The hybrid energy storage system (HESS) consisting of energy storage elements of contrasting characteristics provides the ability to manage disturbances of sudden, intermediate, and prolonged nature, i.e., faults, voltage sag, and swell. The ultracapacitor (UC) and lead-acid battery with ultra-high and high-power density, respectively, can provide a high amount of power in a short span for a small duration [31,32]. In comparison, the proton exchange membrane fuel cell (PEMFC) has high energy density, which can provide power for a longer duration without considerable change in load profile [33,34]. For better PV power utilization, a dual battery storage system is presented in [35]. The PV-HESS system can operate in both grid-tied and islanded mode while maintaining the system's stability and power quality.
The DC bus voltage V DC , on the DC side of the inverter, significantly influences the system stability. The dynamics of PLL, reactive power control of the inverter, and impedance of the grid collectively influence the V DC [36]. Variations in V DC may occur due to the transfer of control from grid-tied mode to isolated mode, solar insolation variation (PV power variation) [37], load unbalancing, and power unbalancing. Several conventional and intelligent controls have been utilized for V DC regulation [38,39]. An optimized energy management system for better efficiency is presented in [40], and battery voltage optimization is presented in [41]. The system performance can further be enhanced by optimizing the PI controller gains by various evolutionary optimization and swarm intelligence techniques, such as genetic algorithm (GA) [42], which have versatile applications and require less information about the problem, although the rate of mutation and crossover as well as the selection criteria affect the outcome. The parallel evolutionary algorithm (PEO) [43] speeds up the convergence rate as compared to other sequential evolutionary algorithms, but it requires a large population size as it produces a large number of results before finding the best solution. Particle swarm optimization (PSO) [44] is simple to understand and implement and delivers better computational efficiency, but it suffers from getting trapped in local minima. Salp swarm optimization (SSO) [45] uses an adaptive mechanism to balance convergence and divergence, hence preventing the stagnation on local minima, and many more [46].
The proposed system is a three-phase four-wire grid-tied dual-stage PV-HESS system. The DC link voltage is regulated by the SSO-tuned PI controller, which generates a more accurate loss component of current (I d1 ) and delivers better stability. The better I d1 further elevates the performance of the proposed VSC control. The stable DC link voltage helps VSC control to generate more accurate weight signals and reduces overall losses of the system. The VSC control is provided by the NysMKRSL algorithm to facilitate multifaced operation during steady-state and various dynamic states. Seamless control is provided by the grid current control (GCC) during grid-tied mode and voltage control in islanded mode. The HESS consisting of a battery, UC, and PEMFC can handle any disturbance occurring on the proposed system's PV, load, and grid side. The main contributions of the paper are outlined below. a.
V DC regulation: The DC link voltage is regulated with the gain optimized PI controller based on the SSO algorithm that generates an accurate loss component of current and enhances the stability of the system. b.
Adaptive control of VSC: The NysMKRSL-based VSC control uses excess mean square error (EMSE) as the cost function to speed up the convergence and enhance precision. The optimized DC bus further improves the performance of the proposed control by better extraction of the weight signal and fundamental component of currents. c.
Seamless control: The system facilitates the transition from grid-tied mode to islanding mode to re-synchronization mode without any major transients and disturbances to the system stability. d.
Multifunctional operation of VSC: The VSC will perform the multifunction operations, including reactive power compensation, load and power balancing while maintaining UPF throughout the operation. e.
Dynamic operating conditions: Various dynamic conditions have been induced, such as irradiation variation, load unbalancing, fixed power mode, and grid voltage variation (sag and swell) to analyze the system. f.
HESS: The HESS consisting of lead-acid battery, UC, and PEMFC can manage the system irregularities occurring on the grid, load, and PV side.
The rest of the paper is organized as follows. Section 2 describes the proposed topology. Section 3 presents the implemented control strategies, i.e., VSC control, seamless control, DC-DC bi-directional converter control and SSO optimized DC link voltage control. Section 4 describes the results and discussions of the presented system during various induced dynamic conditions. Section 5 concludes the work.

Proposed Topology
The proposed system is a three-phase four-wire grid-tied dual-stage PV-HESS system, as shown in Figure 1. The PV system of 32 kW, with an incremental conductance (InC) method of maximum power extraction [20,21], is utilized. The PV system is connected to the DC bus via boost converter. The HESS consisting of the battery and UC is also attached to the DC bus via a buck-boost bi-directional converter, whereas PEMFC is directly connected at the 700 V DC bus with a unidirectional diode to avoid the reverse power flow. The battery, UC, and PEMFC provide 5.6 kW, 4 kW, and 7 kW backup for 12 h, respectively. The VSC with eight switches in four legs converts the DC power available across the DC-link capacitor to the AC power and makes it available at the point of common coupling (PCC) via interfacing inductor. The interfacing inductor and RC filters are utilized to lessen the excess current ripples. The non-linear load of 17 kW and grid power supply of 415 V (RMS) AC, through the master control switch (MCS), is also connected to the system at PCC. MCS allows the bi-directional flow of current with a unidirectional voltage blocking capability that facilitates intentional islanding.

Controlling Strategies
Several controlling strategies have been involved in the presented work, such as InCbased maximum power point tracking (MPPT) control, NysMKRSL-based VSC control, seamless control for islanding and re-synchronization, bi-directional converter control for battery and UC charge control, and V DC control by conventional PI and PI gains optimization by the SSO algorithm. The research methodology utilized in the presented work is shown in Figure 2a, where PV voltage, current (V PV , I PV ), DC bus voltage (V DC ), battery, and UC current (I BAT , I UC ) are sensed for controlling the SSO-based V DC , optimization boost converter, and battery and UC current. The grid voltage, current (v Sabc , i Sabc ), load current (i Labc ), voltage magnitude (V d ), frequency f, and phase angle θ are sensed for proper AC side operation. Three steps to check the mechanisms for islanding detection, grid re-synchronization detection, and grid re-synchronization confirmation are provided for effortless and seamless transition of VSC controls.

VSC Control
The VSC control is provided by the NysMKRSL algorithm for achieving a higher filtering accuracy and robustness against non-Gaussian noise, as shown in Figure 2b. The minimum kernel risk-sensitive loss (MKRSL) algorithm has a linear growth of network size with each iteration, resulting in a huge computational burden and memory requirement.
The network matrix approximation can be performed by sparsification, vector quantization (VQ), random Fourier feature (RFF), the Nyström method, and many more. The sparsification method reduces the computational accuracy, whereas VQ methods use redundancy data for weight updates. Both methods cannot fix the network size beforehand. The RFF method is based on the random selection of data, so it generates a larger dimension of network structure. The Nyström method generates the fixed network structure with a uniform sampling method that improves accuracy, convergence rate, and reduces the computational burden. The weights of NysMKRSL are generated by a gradient descent method to minimize [15].
In the proposed control, µ px (x = a,b,c) are the direct phase components of the sensed source voltage v sabc and its voltage magnitude V d as per (1) [28]. e nx (x = a,b,c) are error signals of each phase and are calculated as a function of load current i Labc and extracted weight component of each phase W px (x = a,b,c) as per (2). The weight components of each phase W px (x = a,b,c) are calculated as per (3), (4), and (5), where β = 1/2σ 2 is the kernel function, σ is the width of the Kernel, µ > 0 is the step size, and λ > 0 is the risk-sensitive parameter. The average of each phase component W p is negated with the feed-forward term W PV to generate the overall weight component W sp as per (6) and (7). W sp is utilized to generate the reference currents i * sx (x = a,b,c). This is further compared with the sensed source currents i Sabc and provided to the hysteresis current controller (HCC) to generate the switching sequence for the GCC mode of operation as per (8). During the fixed power mode, each phase weight component will be taken over by W sp f ix and i * (9) and (10).

Seamless Control for Islanding and Re-Synchronization
The islanding and re-synchronization controls are shown in Figure 2. The grid can be isolated from the rest of the system by MCS, which is a three-phase switch and allows the bi-directional flow of current during GCC mode [30,31]. The islanding of the system is confirmed by comparing the V d and frequency f of v sabc with pre-decided standard values. If the islanding condition is confirmed, then the VSC control shifts from GCC mode to islanded control mode. During islanded operation, the product of V d and the generated reference voltage v * abc is compared with load voltage v Labc and provided to the PI controller. The reference current signal generated from the PI controller is compared with load current i Labcn and provided to the HCC for VSC control.
Re-synchronization of the grid is initiated when MCS reconnects the grid to the rest of the system. The grid is intentionally isolated for a few cycles until the magnitude, frequency, and phase angle ω s of the grid voltage matches the magnitude, frequency, and phase angle ω L of the load voltage. The phase angle of source and load voltages are compared to produce a change in phase angle ∆ω. ∆ω is provided to the PI controller to generate the f frequency signal, which is utilized to generate the re-synchronization reference voltage v abc . The v abc voltage is utilized to generate the i ReSyn re f for VSC control. ∆ω plays a pivotal role in grid re-synchronization, without causing major source voltage transients that result in safety and security problems. The frequency matching of load and source voltages requires two to four cycles, and once the re-synchronization is confirmed, the VSC control is seamlessly shifted to the GCC mode [29].

Bi-Directional Converter Control
The buck-boost bi-directional converters each for battery and UC charging and discharging current control have been employed as shown in Figure 3. The loss component of current (I d1 ) will be compared with battery current I Bat and UC current I UC individually. The batteries are vulnerable against high charging and discharging currents, so the battery over-current protection is also incorporated in control. Comparisons of the I UC and I Bat with I d1 as e UC and e Bat are provided to the PI controllers with gains K pUC , K iUC , K pBat , and K iBat to generate the duty cycles D 1 and D 2 as per (11) and (12) [23]. The duty cycle will be further compared with the triangular signal of 10 kHz for generating the switching sequence for bidirectional converters.

DC-Link Voltage Control
The DC voltage regulation is presented by PI gains optimized by SSO algorithms [45]. The sensed V DC from the DC-link coupling capacitor is lessened from the reference V DC , i.e., V re f DC = 695 V. The voltage error V err is provided to the PI controller to generate the I d1 as per (13). The I d1 is further utilized as the reference current for battery and UC control, as shown in Figure 3.
The PI controller gains can be optimized for better control of the system. The PI gains K p and K i are tuned by GA and SSO algorithms separately to reduce the V DC variations during various dynamic conditions [42,45]. The performance of the PI controller may be assessed by considering how large the error from the setpoint is. The integral square error (ISE) is calculated as per (14).
The ISE serves as the single objective function, which needs to be minimized by implementing GA and SSO for PI gains optimization. GA is one of the most well-known and widely accepted optimization algorithms. The SSO is a bio-inspired algorithm based on the food searching behavior of salps (family of salpidae) in the form of a salps chain, having a transparent barrel-shaped body. The SSO algorithm is initiated with the random population of salps, differentiated as leader and follower salps. The leader salp position is the best solution obtained depending on the food source and further assigned to the follower salps. The leader salp position is updated as per (15) and (16) during the exploration and exploitation phase. Where x 1 j is the position of leader, F j is the position of the food source in dimension j, and ub j , lb j are the maximum and minimum limits in dimension j. The coefficient c 1 balances the convergence and divergence as per (17), and c 2 and c 3 are the uniformly generated random numbers, where l and L represent the current and maximum number of epochs. The followers' salp position is updated as per (18), where x i j is the follower salp position in dimension j, which gets updated as per leader salp position depending on food position [45]. With Equations (15), (16), and (18) the salp chain can be formed. x x i j are the tuned gains of the PI controller, ub j and lb j are the lower and upper bounds of PI gains, and the problem is two-dimensional as only proportional and integral gains need tuning.
The SSO algorithm is adaptive with high exploration and exploitation using converging and diverging parameters, minimum feature selection, which results in less computational time and better accuracy. The SSO algorithm is utilized with search agent numbers (N = 30) and the maximum number of iterations (t = 50) to find the gains of the PI controller.

Results and Discussion
The proposed system is a NysMKRSL-based VSC control for 32 kW grid-tied dualstage PV system with HESS. The InC algorithm is used for MPPT and boost converter control, and the SSO algorithm is used for V DC control. The HESS current control is done by the PI controller. The PV, HESS, and fuel cell are attached to the DC bus. The presented system is analyzed under steady-state and various dynamic states such as irradiation variation, load unbalancing, fixed power mode, grid voltage unbalancing (sag and swell), and seamless transition of islanding and re-synchronization in the MATLAB simulation environment.

Steady-State Performance
The steady-state is simulated with irradiation level fixed at 1000 W/m 2 and ambient temperature 25 • C from 0.2 s to 0.26 s simulation time. During steady-state operation the system harmonics level is maintained within the desired limits. The total harmonics distortion (THD) of the v Sa , i Sa , v La and i La are also shown in Figure 4a-d, which are below the permissible limit of 5% and satisfactory as per IEEE519 standards. The V DC is controlled with the help of a PI controller during various induced dynamic conditions. The DC bus stability with the first-order controller is analyzed as non-linear using the bode plot, as shown in Figure 5. The magnitude and frequency plot of the closed-loop DC bus shows the attenuation of DC components and low-frequency components passing through the PI controller.

Irradiation Variation Mode Performance
The irradiation variation is simulated by reducing the PV insolation level from 1000 W/m 2 to 600 W/m 2 during the simulation time from 0.45 s to 0.55 s. The source voltage v Sabc will remain the same as the voltage at PCC in grid-tied operation. The source current i Sabc matches with the reference currents i * Sa , i * Sb , i * Sc generated by the proposed VSC control during grid-tied current control mode. The VSC current compensates the load current, verified by phase 'a' of load i La and compensator current i Ca as shown in Figure 6. The voltage magnitude V d is maintained at the desired level during irradiation variation. The load neutral current i Ln and compensator neutral current i Cn are in phase opposition with each other and revolves at thrice of the fundamental frequency, resulting in the source neutral current i Sn being maintained around zero, which is its reference value. With the reduced solar irradiation at 0.45 s, the power delivered to the grid P g also reduces as with i Sabc , which is in phase opposition with v Sabc . P g is following exactly its reference value P re f g . Likewise, Q g is the reactive power exchange from the grid, maintained around zero, which is its reference value Q re f g . The VSC satisfies the system's reactive power requirement and solid-state switches so that the Q g is maintained around zero during the whole operation. On the DC side, the PV voltage V PV is maintained around the V ref PV , which is 600 V, by utilizing the boost converter. The PV current I PV and power P PV decreases accordingly with the changing solar irradiation level and matching with the reference PV power P ref PV and reference PV current I ref PV . The battery current I BAT and UC current I UC are negative, as both are charging due to excess availability of power, and battery voltage V BAT and V UC both are increasing gradually. I BAT and I UC both follow their reference signal, which is depicted as I d1 in Figure 3. The PEMFC is directly connected to the DC bus with voltage V FC and current I FC , as shown in Figure 7. The DC bus voltage V DC is preserved around its reference value V ref DC , which is 700 V with a variation of a few volts only.

Load Unbalancing Mode Performance
The load unbalancing is simulated by disconnecting the phase 'a' of the load from 0.7 s to 0.8 s of simulation time. During load unbalancing i La reduces to zero, and power delivered to the grid P g increases while following the P re f g , with the reduced load requirements. The i Sabc matches with the reference source currents i * Sa , i * Sb , i * Sc during the unbalancing load too. The i Ca also becomes more sinusoidal with the reduction of non-linear load. The V d is also kept at the desired level. The i Cn and i Ln are compensating each other with twice the fundamental frequency during load unbalancing, and i Sn is preserved around its zero reference value. Q g exchange with the grid is maintained near zero as Q re f g because VSC provides the necessary reactive power, as shown in Figure 8. The V PV , I PV , and P PV remain at the same level as a fixed irradiation level as their respective reference values. The battery and UC charging rate increases as the I BAT and I UC follow their reference signal and become more negative. The PEMFC is directly connected to the DC bus at 700 V. The V DC voltage is also maintained around 700 V with the variation of merely a few volts from V ref DC during the unbalancing load, as shown in Figure 9.

Fixed Power Mode Performance
The fixed power mode is implemented to provide the peak power during the peak demand condition, in which PV, along with HESS, has to satisfy the excess amount of power required by the grid. The fixed power mode is induced by forcing the GCC control of VSC to provide a pre-decided amount of power. The fixed power mode is simulated from 1 s to 1.1 s of simulation time. P g shows an increased amount of power delivered to the grid, and likewise, a slight increase in i Sabc is also visible. i Sabc and P g both are following their respective reference signals. i La remains the same, but i Ca also increases with i Sabc . i Sn and Q g are maintained at zero as their reference signals, as depicted in Figure 10. On the other hand, V PV , I PV , and P PV remain the same and match their respective references with a fixed irradiation level. I BAT and I UC both have reduced and become less negative. Though the battery and UC are still charging, their charging rate is reduced considerably. The excess power delivered to the grid reduces the charging rate of the battery and UC. The V FC and I FC show no major changes in fixed power mode due to their slow dynamics. The V DC is maintained at 700 V while matching with V ref DC during fixed power mode, as shown in Figure 11.

Source Voltage Sag and Swell Performance
The source voltage sag and swell of 0.8 p.u. and 1.2 p.u. are simulated from 0.2 s to 0.25 s and 0.25 s to 0.3 s of simulation time. The abnormal grid voltage affects i Sabc , which also changes accordingly to maintain power balancing. With the variation of i Sabc , the compensator current also varies to satisfy the reactive power requirements of the system. i Sabc increases with voltage sag and decreases with the voltage swell, and P g varies vice versa while matching exactly with their reference signals. V d changes with the change in v Sabc during voltage sag and swell. i Sn is kept at zero as the load and compensator neutral currents are in exact phase opposition with three times the fundamental frequency, as shown in Figure 12. V PV , I PV , and P PV remain and follow their respective reference values with a fixed irradiation level. I BAT and I UC vary with the variation of i Sabc and P g , and with that, V BAT and V UC vary, hence the charging rate. V DC is maintained around V ref DC at 700 V during abnormal grid voltage, as shown in Figure 13.

DC Bus Optimization Mode Performance
V DC is regulated by the PI controller, and its gains are optimized by GA and SSO algorithms. V DC variation is analyzed during the initial transients, abnormal grid voltage, irradiation variation, load unbalancing, and fixed power mode. The SSO-optimized V DC shows less fluctuations during initial transients and settles down more quickly in steadystate, compared to GA optimized and tuned with initial gains. V DC fluctuates more during abnormal grid voltage, irradiation variations, and fixed power mode. The SSO-optimized V DC shows significant improvement in terms of reduced fluctuations during all induced dynamic conditions and is kept near V ref DC = 700 V with minimum variations. Moreover, SSOoptimized V DC results in more accurate I d1 , which is crucial for maintaining system stability and further improves the VSC control performance by precise extraction of fundamental current component. V DC is compared with the initial gains of the PI controller (i.e., k p = 1, k i = 0), GA-optimized gains (i.e., k p = 0.7388, k i = 0.0311), and SSO-optimized PI gains (i.e., k p = 2.5, k i = 0.8). The DC link voltage shows maximum changes during abnormal grid voltage conditions. V DC shows the minimum variation with the SSO-optimized gains of the PI controller during induced dynamic conditions, as shown in Figure 14.

Islanding and Re-Synchronization Mode Performance
The intentional islanding and re-synchronization of the grid to the rest of the system is simulated from 0.2 s to 0.4 s of simulation time. v Sabc and i Sabc reduce to zero during islanded operation. During grid-tied operation, i Sabc follows its reference currents i * Sabc , and during isolated operation both will be insignificant. The system will operate satisfactorily in islanded mode only if the load voltage v Labc magnitude and frequency f are maintained. v Labc follows exactly its reference signal, i.e., v * Labc , during isolated operation, as shown in Figure 15. The i Ca reduces during islanded operation as power is only being supplied to the load, not to the grid, further confirmed by P g . V T is also maintained around its reference value, i.e., 340, with slight variations during the isolated mode. The i Sn becomes zero during islanded operation. i Cn and i Ln both compensate each other. Q g is also maintained at zero as the reactive power requirements are fulfilled by VSC only. On the DC side, the V PV , I PV , and P PV remain the same as steady-state and follow their respective reference signals. The I BAT and I UC become more negative, and I FC also reduces as P g becomes zero during islanded operation; hence, the charging rate of the battery and UC increases with the increase in V BAT and V UC . The V DC is maintained around the 700 V level while following the reference signal during islanding and re-synchronization, as shown in Figure 16. The re-synchronization initiates at 0.4 s of simulation time. After matching the V T , f, and phase angle ω of the grid with load, the grid is re-synchronised with the system within three to four cycles, as shown in Figure 17.

Comparison of VSC Controls
The W p with the proposed VSC control is compared with the LMS and MCC controls to show its relevancy and stability. The optimized DC bus produces precise I d1 , which helps the NysMKLMS-based VSC control generate more accurate weights resulting in better extraction of fundamental current components. The VSC control performs better with accurate I d1 , hence delivering enhanced power quality with reduced overall losses. The proposed control produces W p with fewer ripples compared to LMS-and MCCbased adaptive controls during steady-state, load unbalancing, and abnormal grid voltage conditions as shown in Figure 18. The proposed VSC control is more effective against Gaussian and non-Gaussian noises.

Conclusions
The paper demonstrates the three-phase four-wire grid-tied dual-stage PV-HESS system with the NysMKRSL algorithm based VSC control. The VSC displayed multifunctional operational capability such as reactive power compensation, load balancing, and power balancing while maintaining UPF during various induced dynamic conditions. The NysMKRSL-based VSC control delivers better performance, convergence rate, higher filtering accuracy, and less overall losses than other adaptive algorithms. The system displayed the capability of seamless transfer of control from grid islanding to grid re-synchronization without any major transients and instability in the proposed system. The energy storage elements of HESS complement each other in handling the system irregularities occurring on the grid side, load side, and the PV side. The DC link voltage is kept at the required level of 700 V during various dynamic conditions, and its deviation from the desired value is minimized by GA and SSO algorithms utilized for tuning the gains of the PI controller. The SSO algorithm's adaptive nature delivers faster execution time, better accuracy of results, and reduces the chances of getting trapped at local minima even if the whole population deteriorates. The optimized DC-link generates precise loss component of current, which is crucial for maintaining stability and further improves the performance of NysMKRSL-based VSC control by generating more accurate weight signals and reducing overall losses of the system. The THD of the source and load, voltage, and current is found to be satisfactory as per IEEE519 standards.

Acknowledgments:
The authors would like to thank the editorial board as well as the anonymous reviewers for their valuable comments that have greatly increased the quality of this document.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.