Hybrid Reference Current Generation Theory for Solar Fed UPFC System

The extensive usage of power electronic components creates harmonics in the voltage and current, because of which, the quality of delivered power gets affected. Therefore, it is essential to improve the quality of power, as we reveal in this paper. The problems of load voltage, source current, and power factors are mitigated by utilizing the unified power flow controller (UPFC), in which a combination of series and shunt converters are combined through a DC-link capacitor. To retain the link voltage and to maximize the delivered power, a PV module is introduced with a high gain converter, named the switched clamped diode boost (SCDB) converter, in which the grey wolf optimization (GWO) algorithm is instigated for tracking the maximum power. To retain the link-voltage of the capacitor, the artificial neural network (ANN) is implemented. A proper control of UPFC is highly essential, which is achieved by the reference current generation with the aid of a hybrid algorithm. A genetic algorithm, hybridized with the radial basis function neural network (RBFNN), is utilized for the generation of a switching sequence, and the generated pulse has been given to both the series and shunt converters through the PWM generator. Thus, the source current and load voltage harmonics are mitigated with reactive power compensation, which results in attaining a unity power factor. The projected methodology is simulated by MATLAB and it is perceived that the total harmonic distortion (THD) of 0.84% is attained, with almost a unity power factor, and this is validated with FPGA Spartan 6E hardware.


Introduction
In commercial and domestic sectors, the usage of power electronic components have increased, which has led to end-users facing problems regarding the quality of power delivered; hence, there arises a need to solve the power quality (PQ) problems. Some of the common PQ problems, which have emerged in the distribution side and the grid side, are voltage sag/swell, harmonics, flickers, outage, etc., and all these disturbances have to be mitigated [1][2][3]. One key solution for these disturbances is the application of flexible AC transmission system (FACTS) devices, through which the quality of power has been enriched and the survey reveals the usage of various FACTS devices. Static VAR compensators (SVCs) are applied to enhance transient stability, through which the system losses are minimized. The operation of a thyristor controlled series capacitor (TCSC) is to enrich the power flow, as well as the transient and dynamic stability in the system [4], which is also applicable for subsynchronous oscillations [5]. Comparatively the static synchronous compensator (STATCOM) offers more enhanced damping characteristics than SVC, and it aids in minimizing the current harmonics. In most practical applications, When a three-phase AC supply is given towards a load, the AC-DC conversion occurs by means of the series converter and the energy is stored in a DC capacitor. Moreover, the power delivered to the load is reduced; hence, to overcome this, a PV system is utilized. To retain a constant PV output voltage, an SCDB converter is introduced. The linkvoltage is retained by instigating proportional integral (PI)-GWO algorithm and, thus, the required gating sequence of the SCDB converter is generated. Meanwhile the output of the series converter has to be retained. The actual and reference values of Vdc are compared and fed to ANN for the reference current generation. To estimate the harmonics, which have been injected in the source current genetic assisted RBFNN, a hybrid reference current generation method is proposed. After estimating the current harmonics, the switching sequence of the shunt and the series converter are generated and, thus, an enhanced quality of power is delivered.
The modeling of the PV module, SCDB converter, GWO algorithm, UPFC, and the genetic assisted RBFNN are elaborately discussed in the upcoming sections.

PV Module
The illustration of the PV panel is given in Figure 2. It comprises of a current source with an anti-parallel diode and two resistors, which are connected in series and in parallel, denoted as Rs and Rp, respectively.  When a three-phase AC supply is given towards a load, the AC-DC conversion occurs by means of the series converter and the energy is stored in a DC capacitor. Moreover, the power delivered to the load is reduced; hence, to overcome this, a PV system is utilized. To retain a constant PV output voltage, an SCDB converter is introduced. The link-voltage is retained by instigating proportional integral (PI)-GWO algorithm and, thus, the required gating sequence of the SCDB converter is generated. Meanwhile the output of the series converter has to be retained. The actual and reference values of Vdc are compared and fed to ANN for the reference current generation. To estimate the harmonics, which have been injected in the source current genetic assisted RBFNN, a hybrid reference current generation method is proposed. After estimating the current harmonics, the switching sequence of the shunt and the series converter are generated and, thus, an enhanced quality of power is delivered.
The modeling of the PV module, SCDB converter, GWO algorithm, UPFC, and the genetic assisted RBFNN are elaborately discussed in the upcoming sections.

PV Module
The illustration of the PV panel is given in Figure 2. It comprises of a current source with an anti-parallel diode and two resistors, which are connected in series and in parallel, denoted as Rs and Rp, respectively. When a three-phase AC supply is given towards a load, the curs by means of the series converter and the energy is stored in a the power delivered to the load is reduced; hence, to overcome lized. To retain a constant PV output voltage, an SCDB converter voltage is retained by instigating proportional integral (PI)-GWO required gating sequence of the SCDB converter is generated. M the series converter has to be retained. The actual and reference pared and fed to ANN for the reference current generation. To which have been injected in the source current genetic assisted RB current generation method is proposed. After estimating the switching sequence of the shunt and the series converter are gen hanced quality of power is delivered.
The modeling of the PV module, SCDB converter, GWO al genetic assisted RBFNN are elaborately discussed in the upcomin

PV Module
The illustration of the PV panel is given in Figure 2. It comp with an anti-parallel diode and two resistors, which are connected denoted as Rs and Rp, respectively.   The expression for the output current of the PV panel (for the ideal case and the real case) is given as, where the photovoltaic current is denoted by I PV , overload current is denoted by Io, ideality factor is denoted by α, V k → kT q , and charge of the electron is denoted by q; k represents the Boltzmann constant, T represents the temperature coefficient. As there is variation in the solar irradiance, there exists variation in the current. Equation (2) can be rewritten as, Here, the number of the series for the PV cell is represented as N s .

Switched Clamped Diode Boost Converter
An SCDB converter incorporated with PV is implemented because of its high gain property. The input current of this converter is continuous and the problem of the voltage spike is eliminated by this converter, which results in a constant boosted voltage. The schematic representation of the SCDB converter is shown in Figure 3. The projected converter is analyzed by its modes of operation. The simplified circuits are as illustrated in Figure 4. The expression for the output current of the PV panel (for the ideal case and the real case) is given as, where the photovoltaic current is denoted by IPV, overload current is denoted by Io, ideality factor is denoted by α, → , and charge of the electron is denoted by q; k represents the Boltzmann constant, T represents the temperature coefficient. As there is variation in the solar irradiance, there exists variation in the current. Equation (2) can be rewritten as, Here, the number of the series for the PV cell is represented as Ns.

Switched Clamped Diode Boost Converter
An SCDB converter incorporated with PV is implemented because of its high gain property. The input current of this converter is continuous and the problem of the voltage spike is eliminated by this converter, which results in a constant boosted voltage. The schematic representation of the SCDB converter is shown in Figure 3. The projected converter is analyzed by its modes of operation. The simplified circuits are as illustrated in Figure 4.   The expression for the output current of the PV panel (for the ideal case and the real case) is given as, where the photovoltaic current is denoted by IPV, overload current is denoted by Io, ideality factor is denoted by α, → , and charge of the electron is denoted by q; k represents the Boltzmann constant, T represents the temperature coefficient. As there is variation in the solar irradiance, there exists variation in the current. Equation (2) can be rewritten as, Here, the number of the series for the PV cell is represented as Ns.

Switched Clamped Diode Boost Converter
An SCDB converter incorporated with PV is implemented because of its high gain property. The input current of this converter is continuous and the problem of the voltage spike is eliminated by this converter, which results in a constant boosted voltage. The schematic representation of the SCDB converter is shown in Figure 3. The projected converter is analyzed by its modes of operation. The simplified circuits are as illustrated in Figure 4.    This mode is referred to as the shoot-through mode, where the switch S is turned ON; at this instant, the circuit is short circuit. When D 1 and D 2 are OFF, L 1 and L 2 are charged by means of C 1 .

Mode 2
This mode is referred as the non-shoot-through mode, where D 1 and D 2 are ON, and the energy stored in L 1 and L 2 are discharged to the circuit. As a result, C 1 and C 2 are charged through D 2 , by which voltage spikes are eliminated.
The boost factor of the SCDB converter is given as the ratio of the link voltage to input voltage, which is estimated by means of relating Kirchhoff's law for both modes of operation.
Applying Kirchhoff's voltage law for first (shoot-through) mode, Applying Kirchhoff's voltage law for second (non-shoot-through) mode, The following equations are obtained after flux-balance condition through L 1 and L 2 , Substituting values from (iv), Equation (i) becomes Moreover, across L 3 , the voltage second condition is obtained as, Substituting values from (vi), Equation (v) becomes Here, the turn's ratio of the transformer is denoted by n, the input voltage of the converter is denoted by Vin, and the shoot-through duty cycle is denoted by D. The link voltage obtained from Equations (ii) and (iii) is as follows, Thus, the boost factor of the proposed SCDB converter is obtained as With this boost factor, the voltage from the PV is improved. To excerpt the extreme power from PV, MPPT techniques are needed. Here, grey wolf optimization (GWO) is instigated to attain the maximum power.

GWO Algorithm
GWO algorithm is created on the leadership and chasing character of grey wolves. The wolves are categorized into four groups. Alpha (α) is the decision making wolf, which is the fittest, beta (β) is the advisor wolf for alpha, which is ranked as second, delta (δ) is considered as the third best, and omega (ω) is the lower-ranking wolf. The mathematical representation of the wolves' hunting and encircling characters are given as, D represents the coefficient vectors, t represents the present iteration, W p and W represents the position vector of the prey and the wolf, respectively, and the expression for the coefficient vectors are given as, where the random vectors are denoted by → rand 1 and → rand 2 , the value of a falls from 2 to 0 linearly. The number of duty ratios, V dc(act) and V dc(re f ) are estimated by means of the controller and, thus, the output power is computed. During a partial-shading condition, there exists several local peaks, and when the wolves catch the maximum point, their coefficient vectors reach nearly zero at that instant. By this tracking algorithm, the better tracking of maximum point is attained with minimized oscillations. Here, the duty ratio (D) is characterized as the grey wolf, and so Equation (13) can be rewritten as, The fitness function for GWO is given as where power is denoted by P, duty cycle is denoted by d, existing number of grey wolves is denoted by i and the number of iterations is denoted by k.
The steps involved in GWO algorithm is given as, Step 1: Set the vectors a, A and C; Step 2: Set the number of iterations to zero (k = 0); Step 3: Set the pack size of grey wolf as one (i = 1); Step 4: Measure V dc ( act ) by the controller; Step 5: Compare V dc ( act ) and V dc ( ref ); Step 6: If V(i) > V(i − 1), then update V max for i = V(i). Else update V max for i = V(i − 1); Step 7: Compare W max and V max . If W max > V max , update W max . Or else check whether all agents are evaluated; if yes, update W max , A, and C by Equations (12)- (15). If not, move to (i = i + 1) and go to Step 4 until all the duty cycles are computed.
Step 8: Repeat Step 3 until convergence is met. Thus, by GWO algorithm, the maximum power is attained and the required gating sequence for the SCDB converter is generated by means of the PWM generator-driver circuit. Thus, the DC-link voltage of the UPFC is retained.

Unified Power Flow Controller
To lessen the disturbances in the power systems, the UPFC is implemented in this work, a combination of series and shunt converters coupled through a DC-link capacitor.
Here, the harmonics that exist in the voltage and current are minimized by utilizing UPFC. By means of UPFC, the series, shunt, and phase angle compensation are achieved. The illustration of UPFC is shown in Figure 5. Step 1: Set the vectors a, A and C; Step 2: Set the number of iterations to zero (k = 0); Step 3: Set the pack size of grey wolf as one (i = 1); Step 4: Measure Vdc(act) by the controller; Step 5: Compare Vdc(act) and Vdc(ref); Step 6: If V(i) > V(i-1), then update Vmax for i = V(i). Else update Vmax for i = V(i-1); Step 7: Compare Wmax and Vmax. If Wmax>Vmax, update Wmax. Or else check whether all agents are evaluated; if yes, update Wmax, A, and C by Equations (12)- (15). If not, move to (i = i + 1) and go to Step 4 until all the duty cycles are computed.
Step 8: Repeat Step 3 until convergence is met. Thus, by GWO algorithm, the maximum power is attained and the required gating sequence for the SCDB converter is generated by means of the PWM generator-driver circuit. Thus, the DC-link voltage of the UPFC is retained.

Unified Power Flow Controller
To lessen the disturbances in the power systems, the UPFC is implemented in this work, a combination of series and shunt converters coupled through a DC-link capacitor.
Here, the harmonics that exist in the voltage and current are minimized by utilizing UPFC. By means of UPFC, the series, shunt, and phase angle compensation are achieved. The illustration of UPFC is shown in Figure 5. Shunt and series converters are the chief parts of UPFC. The series converter is coupled in a series-by-series transformer by which it assists in retaining the load voltage without distortions, while the shunt converter assists in retaining the current without harmonics. The capacitor that couples the series-shunt converters helps with the proper working of both converters.

DC-Link Voltage Regulation by ANN
To develop the quality of the delivered power, the link voltage of the capacitor ( ) has to be retained and these variations in the link voltage are mainly associated with the capacitor losses. Hence, a proper control is necessary, achieved by the artificial neural network (ANN). ANN works on the basis of human neural networks, which comprises three layers-input, hidden, and output layers-as illustrated in Figure 6. When an input is given to the input layer, the inputs are stored and directed to the hidden layer. The link that connects the input and the hidden layer is termed as weights. The calculations are done based on the bias given to the hidden layers and the outcome is stored in the output layer. Shunt and series converters are the chief parts of UPFC. The series converter is coupled in a series-by-series transformer by which it assists in retaining the load voltage without distortions, while the shunt converter assists in retaining the current without harmonics. The capacitor that couples the series-shunt converters helps with the proper working of both converters.

DC-Link Voltage Regulation by ANN
To develop the quality of the delivered power, the link voltage of the capacitor (V dc ) has to be retained and these variations in the link voltage are mainly associated with the capacitor losses. Hence, a proper control is necessary, achieved by the artificial neural network (ANN). ANN works on the basis of human neural networks, which comprises three layers-input, hidden, and output layers-as illustrated in Figure 6. When an input is given to the input layer, the inputs are stored and directed to the hidden layer. The link that connects the input and the hidden layer is termed as weights. The calculations are done based on the bias given to the hidden layers and the outcome is stored in the output layer. Here, the reference and actual values of the link voltage a berg-Marquardt back propagation (LMBP), instigated for genera signal. Most of the power electronics-based problems have been desired criterion is not met, the error has to be computed, and updated to attain the desired output.
For a multi-layer perceptron, the relation of the input and o

= . ( ) −
Here, the input is represented as Xi, the weighting factor is d old value is denoted as θ, N and f represent the number of layers tion, respectively.
Based on the delta rule, the weighting factor is given as, Here, n denotes the learning rate, the pth target output for j by tpj, pth real output for jth component is denoted by Opj, pth inp is denoted by ipi, and the error between the target and real value Thus, the reference d-axis current (Ids) corresponding to the erated, which is fed to the reference current generator with gene

Reference Current Generation by Genetic Assisted RBFNN
The control of UPFC plays a vital role in this work, which in Here, the reference and actual values of the link voltage are given as input Levenberg-Marquardt back propagation (LMBP), instigated for generating the reference current signal. Most of the power electronics-based problems have been mitigated by ANN. If the desired criterion is not met, the error has to be computed, and the weights have to be updated to attain the desired output.
For a multi-layer perceptron, the relation of the input and output is given as Here, the input is represented as X i , the weighting factor is denoted as W i , the threshold value is denoted as θ, N and f represent the number of layers and the non-linear function, respectively.
Based on the delta rule, the weighting factor is given as, Here, n denotes the learning rate, the pth target output for jth component is denoted by t pj , pth real output for jth component is denoted by O pj , pth input for the ith component is denoted by i pi , and the error between the target and real value is denoted by δ pj .
Thus, the reference d-axis current (I ds ) corresponding to the DC-link voltage is generated, which is fed to the reference current generator with genetic assisted RBFNN.

Reference Current Generation by Genetic Assisted RBFNN
The control of UPFC plays a vital role in this work, which includes the control of the series converter as well as the shunt converter. A proper gating sequence is essential for the control; this is estimated by considering the load voltage, source voltage-source current, as well as the DC-link voltage. The harmonics presented in the above factors are extracted and an appropriate reference current signal is generated by means of genetic assisted RBFNN. By the genetic algorithm (GA), the solution is attained within a short time span, but the solution obtained is not optimal. Hence, hybridization of GA with RBFNN is adopted, which enhances the working of the system.

Genetic Algorithm
GA is an evolutionary algorithm that mimics natural genetics, in which survival of the fittest is the key point. A new population is created by selecting the chromosomes randomly through the process of mutation; the selected chromosomes are combined to form a fresh generation called strings. This newly formed generation is considered as fit as the older one. The fitness function is liable for getting the optimal solution in GA, by which the fitness values are calculated. Some of the fundamental genetic operators are crossover, reproduction, and mutation. The fitness function for GA based on RBFNN is given as, where C refers to a constant, E refers the training error, the number of hidden layers is denoted by s and the maximum limit for the hidden layers is denoted by s max . From Equation (20), it is observed that the fitness of the chromosome is more only if the training error and the network size are least. Two-point crossover with 0.8 probability and a mutation probability is take on here.
3.6.2. RBFNN Figure 7 represents the design of the radial basis function neural network (RBFNN) which is comprised of input layer with N number of neurons, hidden layer with K quantity of neurons, and an output layer. The input and hidden layers are coupled by means of centers, whereas the hidden and output layers are coupled by means of weights. The Gaussian basis function is given as, where the data samples are represented by x, the input vector is given as (I 1 , I 2 , . . . I N ), the center vector is denoted by C i , σ i refers the normalization factor.
Energies 2021, 14, x FOR PEER REVIEW 9 of 19 crossover, reproduction, and mutation. The fitness function for GA based on RBFNN is given as, where refers to a constant, refers the training error, the number of hidden layers is denoted by and the maximum limit for the hidden layers is denoted by . From Equation (20), it is observed that the fitness of the chromosome is more only if the training error and the network size are least. Two-point crossover with 0.8 probability and a mutation probability is take on here. Figure 7 represents the design of the radial basis function neural network (RBFNN) which is comprised of input layer with N number of neurons, hidden layer with K quantity of neurons, and an output layer. The input and hidden layers are coupled by means of centers, whereas the hidden and output layers are coupled by means of weights. The Gaussian basis function is given as,

RBFNN
where the data samples are represented by , the input vector is given as ( , , … ), the center vector is denoted by , refers the normalization factor. The output is given as, = ( ), = 1,2, … , where represents the output node's weighted vector. The weight matrix is given as = The desired output for training samples is represented as, The output Y i is given as, where w i represents the output node's weighted vector. The weight matrix W is given as The desired output D for l training samples is represented as, where output vector for j training samples is represented by d x j . For l training samples, the matrix φ is given as, The expression for variance matrix is given as, The network structure of RBFNN comprises of an input signal with one neuron, a hidden layer with 500 neurons, the magnitude of the harmonics present in the source and load waveforms are minimized by the k-means clustering algorithm.

Genetic Assisted RBFNN
When compared to the other neural network models, RBFNN is chosen for its simplicity as it requires only one hidden layer, and the learning rate and the activation function can be varied. The main part of this is to eliminate the harmonic content and to generate the reference signal. Figure 8 shows the working of genetic assisted RBFNN. where output vector for training samples is represented by . For training samples, the matrix is given as, The expression for variance matrix is given as, The network structure of RBFNN comprises of an input signal with one neuron, a hidden layer with 500 neurons, the magnitude of the harmonics present in the source and load waveforms are minimized by the k-means clustering algorithm.

Genetic Assisted RBFNN
When compared to the other neural network models, RBFNN is chosen for its simplicity as it requires only one hidden layer, and the learning rate and the activation function can be varied. The main part of this is to eliminate the harmonic content and to generate the reference signal. Figure 8 shows the working of genetic assisted RBFNN. The following are the steps involved in genetic assisted RBFNN: 1. Based on the quantity of neurons at the hidden layer, the RBFNN is initialized. The center of the bias function is attained from k-means clustering and the center width is estimated by = √2 (27) where the width of the Gaussian function is represented by , center is denoted by , the alteration among actual and reference values is termed as spacing and is denoted by . 2. Set the population size, process of selection, operators of crossover and mutation, and number of repetitions. 3. Initialize the population as P with size N. 4. RBFNN is constructed by means of the training samples; the output error of the network is computed by, The following are the steps involved in genetic assisted RBFNN: 1.
Based on the quantity of neurons at the hidden layer, the RBFNN is initialized. The center of the bias function is attained from k-means clustering and the center width is estimated by where the width of the Gaussian function is represented by σ, center is denoted by s, the alteration among actual and reference values is termed as spacing and is denoted by d.

2.
Set the population size, process of selection, operators of crossover and mutation, and number of repetitions.
The fitness of the chromosome is calculated by Equation (20). 6.
Based on the fitness evaluated, the chromosomes are arranged, and the ideal population fitness (F P ) is computed. If e < e min or generation G ≥ G max , go to Step 9 or go to next step. 7.
For the next generation, some optimum individuals are selected and reserved. 8.
Select a pair of chromosomes to perform crossover operation, through which a new generation is formed with four individuals. Repeat this process until the population reaches the maximum. 9.
Change the population number in the new generation and, thus, a new population is created. Now, set population as new population and G = G + 1. Go to Step 4. 10. Get the perfect neural network layout. The final working of GA ends, which shows that the optimization is finished.
Thus, the genetic assisted RBFNN is employed for the generation of reference current, by which the reference current signal is created and the required switching sequence of UPFC is generated by means of the PWM generator-driver circuit setup. Through this, the existed variations in the load voltage and source voltage-current are minimized and the quality of power delivered is enhanced.

Results and Discussion
In today's emerging technology, there arises a necessity to mitigate power quality problems. The problems, such as load voltage, source current, and power factor are analyzed in this study. Enhancing the quality of power is achieved by utilizing UPFC, which includes series and shunt converters that are interconnected by a DC-link capacitor; which assists in storing energy when connected to the supply. The capacitor stores energy through the grid during the nighttime, whereas in the daytime, the PV module is utilized. The high gain SCDB converter is applied to boost the voltage, through which the number of solar panels is reduced and the maximum power is attained by the GWO algorithm. When the AC supply is given through the grid for UPFC, there exists harmonics in the system parameters. Hence, a reference current generation scheme is necessary by which the harmonics that occur in the load voltage and source current are minimized. Here the genetic assisted RBFNN is implemented for generating the reference current and, thus, the required pulses of UPFC is attained with the aid of a PWM generator. Similarly, the link voltage of the capacitor is retained by ANN. Thus, the harmonics in the load voltage and source current are reduced to a greater extent with unity power factor. This proposed methodology is executed at MATLAB and simulation results are obtained. The solar panel of a 10 KW power rating is chosen, and the SCDB converter's specification is given in Table 1.  Figure 9 depicts the waveforms of the source voltage and source current. To analyze the proper functioning of UPFC with the proposed methodology, a voltage sag problem is created in the duration 0.1 to 0.14 s. A voltage sag in this time interval is mentioned through a voltage waveform in Figure 9a, whereas the variation in the current is mentioned through the current waveform in Figure 9b Figure 10 illustrates the link-voltage of the capacitor, with the utilization of a PV module being utilized, i.e., during daytime and without a controller, the link-voltage is perceived, which is highlighted in Figure 10a. Figure 10b,c demonstrates the link-voltage waveform of the PI controller and with the proposed GWO, respectively, for the SCDB converter. It is perceived that, with the PI controller, the waveform settles around 0.12 s, and after the implementation of GWO, the link voltage starts to settles earlier, at around 0.05 s. Figure 11a,b depicts the reference voltage and current, respectively.   Figure 10 illustrates the link-voltage of the capacitor, with the utilization of a PV module being utilized, i.e., during daytime and without a controller, the link-voltage is perceived, which is highlighted in Figure 10a. Figure 10b,c demonstrates the link-voltage waveform of the PI controller and with the proposed GWO, respectively, for the SCDB converter. It is perceived that, with the PI controller, the waveform settles around 0.12 s, and after the implementation of GWO, the link voltage starts to settles earlier, at around 0.05 s. Figure 11a,b depicts the reference voltage and current, respectively.  Figure 10 illustrates the link-voltage of the capacitor, with the utilization of a PV module being utilized, i.e., during daytime and without a controller, the link-voltage is perceived, which is highlighted in Figure 10a. Figure 10b,c demonstrates the link-voltage waveform of the PI controller and with the proposed GWO, respectively, for the SCDB converter. It is perceived that, with the PI controller, the waveform settles around 0.12 s, and after the implementation of GWO, the link voltage starts to settles earlier, at around 0.05 s. Figure 11a,b depicts the reference voltage and current, respectively.  (a) (b) Figure 11. Waveform for (a) reference voltage (b) reference current. Figure 12a,b depicts the waveforms of load voltage and load current. From the load voltage waveform, it is perceived that, even though there exists voltage sag problems in the source voltage, the load voltage shows no variations other than a little spike. Figure  12c demonstrates the waveforms of the source voltage and source current; it is perceived that both are in-phase. The waveforms of real power and reactive power, which are developed for a 2 KW system, are illustrated in Figure 13a,b correspondingly. The real power, which is taken   The waveforms of real power and reactive power, which are developed for a 2 KW system, are illustrated in Figure 13a,b correspondingly. The real power, which is taken  The waveforms of real power and reactive power, which are developed for a 2 KW system, are illustrated in Figure 13a,b correspondingly. The real power, which is taken from the grid, is high and retained in the initial stage, i.e., before compensation. The reactive power observed is almost zero. Figure 13c depicts the power factor waveform, which implies that the power factor of 0.999 is achieved, through which the stability of the system is enriched.
gies 2021, 14, x FOR PEER REVIEW 14 o from the grid, is high and retained in the initial stage, i.e., before compensation. The re tive power observed is almost zero. Figure 13c depicts the power factor waveform, wh implies that the power factor of 0.999 is achieved, through which the stability of the syst is enriched.
The source current THD is depicted in Figure 14. Figure 14a shows the THD with t PI controller alone. It is observed that 5.42% and 4.7% THD is attained with fuzzy, shown in Figure 14b. The source current THD is also observed with ANN before and af incorporating genetic assisted RBFNN, as depicted in Figure 14c,d, respectively, and t THD of the proposed methodology is observed as 0.84%. The source current THD is depicted in Figure 14. Figure 14a shows the THD with the PI controller alone. It is observed that 5.42% and 4.7% THD is attained with fuzzy, as shown in Figure 14b. The source current THD is also observed with ANN before and after incorporating genetic assisted RBFNN, as depicted in Figure 14c,d, respectively, and the THD of the proposed methodology is observed as 0.84%.

Hardware Implementation
The proposed control methodology is also implemented in hardware by FPGA Spartan 6E, in which the problems of load voltage, source current, and power factor are mitigated. Figure 15 shows the input voltage waveform; this shows variations in the amplitude. The PV panel's voltage waveform is depicted in Figure 16.

Hardware Implementation
The proposed control methodology is also implemented in hardware by FPGA Spartan 6E, in which the problems of load voltage, source current, and power factor are mitigated. Figure 15 shows the input voltage waveform; this shows variations in the amplitude. The PV panel's voltage waveform is depicted in Figure 16.

Hardware Implementation
The proposed control methodology is also implemented in hardware by FP tan 6E, in which the problems of load voltage, source current, and power factor gated. Figure 15 shows the input voltage waveform; this shows variations in th tude. The PV panel's voltage waveform is depicted in Figure 16.    Figure 17a,b depict the link-voltage of the capacitor with the PI controller and with the GWO algorithm, respectively. It is observed that the peak overshoot problem occurred in PI, and the response took too long to settle, but with GWO, these problems are eliminated and the link-voltage of the capacitor is retained.   Figure 17a,b depict the link-voltage of the capacitor with the PI controller and with the GWO algorithm, respectively. It is observed that the peak overshoot problem occurred in PI, and the response took too long to settle, but with GWO, these problems are eliminated and the link-voltage of the capacitor is retained.  Figure 17a,b depict the link-voltage of the capacitor with the PI controller and with the GWO algorithm, respectively. It is observed that the peak overshoot problem occurred in PI, and the response took too long to settle, but with GWO, these problems are eliminated and the link-voltage of the capacitor is retained.  The source voltage and source current representation is depicted in Figure 18, and it is perceived that the voltage and current are in-phase. The the input voltage waveform in Figure 15 shows amplitude variations, but the load voltage waveform in Figure 19 shows that the voltage is constant.   A comparison of source current THD ( Figure 20) is carried out and the methodology is compared with conventional PI and fuzzy. The THD values, w respectively, 5.42% and 4.7%. With ANN before implementation of GA-RBFNN, is found to be 3.72%, and it is observed that after implementation of genetic RBFNN along with ANN it possess a low THD value, of 0.84%.  The source voltage and source current representation is depicted in Figure 1 is perceived that the voltage and current are in-phase. The the input voltage wav Figure 15 shows amplitude variations, but the load voltage waveform in Figure  that the voltage is constant.  A comparison of source current THD ( Figure 20) is carried out and the p methodology is compared with conventional PI and fuzzy. The THD values, w respectively, 5.42% and 4.7%. With ANN before implementation of GA-RBFNN, is found to be 3.72%, and it is observed that after implementation of genetic RBFNN along with ANN it possess a low THD value, of 0.84%. A comparison of source current THD ( Figure 20) is carried out and the proposed methodology is compared with conventional PI and fuzzy. The THD values, which are, respectively, 5.42% and 4.7%. With ANN before implementation of GA-RBFNN, the THD is found to be 3.72%, and it is observed that after implementation of genetic assisted RBFNN along with ANN it possess a low THD value, of 0.84%. Energies 2021, 14, x FOR PEER REVIEW 18 of 19 Figure 20. Comparison of source current THD.

Conclusions
One of the emerging challenges a power system faces is the mitigation of power quality issues. Among which, compensation of load voltage, source current, and power factor are taken into account; the UPSC is utilized to mitigate these problems. Series and shunt converters are the major parts of UPSC, which are coupled through a DC-link capacitor. In order to attain maximum power, a PV module is implemented by a high-gain SCDB converter incorporated with GWO. Reference current generation is the vital part in which genetic assisted RBFNN is implemented, and the gating sequence of the series and the shunt converters are generated; moreover, ANN is instigated for retaining the DC-link voltage. The simulation result shows that the projected methodology is effective for compensation of load voltage and source current. Furthermore, a power factor of 0.999 and a source current THD of 0.84% have been achieved with a minimum settling time. The simulation and hardware outcomes show the control methodology proposed is more efficient.

Conclusions
One of the emerging challenges a power system faces is the mitigation of power quality issues. Among which, compensation of load voltage, source current, and power factor are taken into account; the UPSC is utilized to mitigate these problems. Series and shunt converters are the major parts of UPSC, which are coupled through a DC-link capacitor. In order to attain maximum power, a PV module is implemented by a high-gain SCDB converter incorporated with GWO. Reference current generation is the vital part in which genetic assisted RBFNN is implemented, and the gating sequence of the series and the shunt converters are generated; moreover, ANN is instigated for retaining the DC-link voltage. The simulation result shows that the projected methodology is effective for compensation of load voltage and source current. Furthermore, a power factor of 0.999 and a source current THD of 0.84% have been achieved with a minimum settling time. The simulation and hardware outcomes show the control methodology proposed is more efficient.