# Performance Analysis of Solar PV-UPQC for Enhanced Power Quality

<figure><img src="image_1.png" /></figure>

Check for
updates

Kumar Saliganti<fnref n="1" />* ID, Venkata Prasad Papana<fnref n="2" /> ID, Vidyasagar Erukula<fnref n="1" /> ID

Corresponding Author Email: skjntum@gmail.com

Copyright: ©2025 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license
(http://creativecommons.org/licenses/by/4.0/).

https://doi.org/10.18280/jesa.580117

**Received:** 18 December 2024

**Revised:** 8 January 2025

**Accepted:** 17 January 2025

**Available online:** 31 January 2025

**Keywords:**

solar PV, UPQC, shunt compensator, series compensator, power quality, bacterial foraging optimization, multilayer neural network, PID controller

## ABSTRACT

The development and assessment of a single, integrated power quality conditioner for three-phase, single-stage solar PV power growth is the goal of this study. In the PV-UPQC, a shared DC-link connects series and shunt voltage compensators that are arranged back-to-back. Shunt compensators reduce source-side harmonics in load current and make it easier to harvest power from PV arrays. To reduce voltage dips and spikes, the series compensator injects the necessary voltage either in phase with or out of phase with the grid voltage. The grid and load variables that are considered for assessing the effectiveness of the control strategy include Total Harmonic Distortion, voltage sag/swell, power factor, and irradiance conditions. This control technique employs a multi-layer neural network to predict the error value of the proportional-integral-derivative controller. Furthermore, the three-phase UPQC model's maximum power point tracking is optimized using the Bacterial Foraging Optimization method. MATLAB-Simulink simulations under varied source and load voltage situations are used to verify the system's performance.

## 1. INTRODUCTION

The solar energy strategy was created by the Indian national government and consists of various principles and other features, due to the vast potential for solar energy generation in this country [1]. Solar energy is sporadic by nature. If a solar PV system is directly connected to the power grid without power grid control, power quality problems like voltage sag and swell could occur [2].

India's solar PV generation management needs to necessitate an upgrade to the electrical grid codes for the power system to function satisfactorily [3]. A solar PV system consists of a maximum power point tracker, power conditioner/PWM inverter, and solar PV panel among other subsystems. There are several varieties of this inverter, including String and Micro inverters [4].

With its combination of shunt and series compensators, a unified power quality conditioner (UPQC) is superior to shunt and series active power filters because it can simultaneously adjust load voltage and maintain sinusoidal grid current at unity power factor [5]. The creation of reference signals is a key component of PVUPQC control [6]. Because time-domain approaches demand less computing power when implemented in real-time, they are frequently utilized [7, 8]. This work uses a moving average filter (MAF) to filter the d-axis current in order to determine the fundamental load active current. This maximizes attenuation without reducing the bandwidth of the controller [9]. The primary drawback of synchronous reference frame theory-based methods is that, in the presence of an unbalanced load, they result in the production of double harmonic components in the d-axis current [10]. Integration of

renewable energy sources with power management in a microgrid for maximum power point tracking was studied [11]. The control loop of the DC bus uses the voltage reference that is established by the MPPT approach to control the amplitudes of sinusoidal currents that are supplied to the network through the series inverter. Additionally, being investigated is the complex behavior of PV-UPQC when the irradiance changes. The design and performance analysis of a three-phase PV-UPQC are presented in the study [12].

The following are the suggested system's primary benefits.

* The combination of improving power quality and producing renewable energy.

* Improvements in both voltage and current quality at the same time.

* Better load current adjustment as a result of PV-UPQC's d-q control.

* Stable in a range of dynamic situations, including variations in irradiation, load imbalance, and voltage sags and swells.

A series injection transformer is used by a series compensator to add voltage to the grid. To eliminate generated harmonics, filters are utilized by converters. A bridge rectifier coupled with a voltage-fed load makes up the nonlinear load that is being used [13]. The PV system is configured with a PID-MLNN and BFO-MPPT. A tuned PID controller is selected as the DC-bus voltage controller because of its enhanced ability to manage non-linear operating circumstances [14]. It is challenging work to model the iterative control method for both linear and nonlinear systems. The iterative control approach performs better when the ideal control strategy is based on optimization. The speed of

<footnote n="1">¹Department of Electrical Engineering, University College of Engineering, Osmania University, Hyderabad 500007, India</footnote>

<footnote n="2">²Department of Electrical and Electronics Engineering, Chaithanya Bharathi Institute of Technology, Hyderabad 500075, India</footnote>
convergence is increased by using an ideal control strategy of the iterative control technique, which is crucial for system optimization [15, 16]. Therefore, this research gap in the power quality assessment can be filled by the hybrid control integration of optimization and neural network model within the context of UPQC applications [17].

This study examines the formulation and evaluation of an ideal three-phase PV-UPQC. Our study examined the harmonic distortion of the shunt compensator, load balancing, and fluctuations in voltage within the series compensator before analysing the UPQC system stability. In PV-UPQC, considerable gains are seen in the reduction of voltage fluctuations and THD, which in turn improves the voltage stability. After determining the UPQC gain parameters, this proposed analytical PID controller analyses the error value between the reference and real voltage using an MLNN model. The efficiency of the proposed system is thoroughly examined in both dynamic and steady-state scenarios using MATLAB-Simulink software.

## 2. REVIEW OF LITERATURE

An enhanced load active current component is extracted in the study [18] using synchronous reference frame control based on a moving average filter to enhance PV-UPQC performance. The system's dynamic and steady-state performance is assessed by simulating it under a nonlinear load in MATLAB-Simulink. The DC link of the UPQC receives power from a solar photovoltaic system, as suggested by Shahapure and Hasabe [19]. The suggested system is created and put into use in the Simulink environment of MATLAB. The suggested system's performance is investigated under various conditions of unbalanced load and source voltage variation.

Das et al. [20] handled both PAF and SAF in UPQC devices by utilizing four distinct control techniques: dq, PQ, Artificial Neural Network (ANN), and Adaptive Neuro-Fuzzy Inference System (ANFIS) in hybrid combinations. In order to assess the effectiveness of different control strategies, four distinct hybrid scenarios are created to handle the three power quality issues of harmonic distortion, voltage sag, and swell.

The Total Harmonic Distortion (THD) was significantly reduced by the hybrid ANFIS-ANN control method compared to other systems. After adjustment, the THD values were 4.26% for load voltage and 0.08% for source current [20]. The Integrator Second-Order with Frequency method uses a locked-loop control based on zero-crossing detection to enhance the output of the hybrid energy system UPQC by eliminating the load's active current component. Grid voltage sags and swells are common issues affecting grid power quality [21]. In this research, an improved ideal sizing approach for UPQC-DG is proposed using the Power Angle Control (PAC) technique, which distributes the reactive power burden between series and shunt converters. The study of Patel et al. [22] incorporates Volt-Ampere (VA) constraints in the PAC approach, along with optimal sizing, to ensure that the converters operate within their designed ratings under all conditions.

A novel control technique provided that is based on artificial neural networks (ANNs) to regulate power quality in compliance with IEEE/IEC standards to reduce the impact of these variables. The suggested approach operates quickly, smoothly, and steadily. Kaushal and Basak [23] used

MATLAB-Simulink software in 2020 to verify the method's performance in contrast to the fuzzy-PI and proportional-integral (PI) controllers. Problems with the distribution system's power quality are caused by the growing number of electrical users. According to Nkado et al. [24], the integrated unified power quality conditioner for solar photovoltaics (FUPQC-PV) is a frequently used device that may enhance the voltage and current quality of a distribution system. Shunt and series compensators make up the UPQC-PV. The shunt compensator recovers the active power provided by the solar PV array and removes harmonic currents caused by nonlinear loads. Additionally, the series compensator corrects grid-side power quality issues such voltage sags and swells.

Muqeet et al. [25] modified the PID controller to attain the highest performance by employing a Sand Cat optimization approach based on Q-learning in terms of surface finish quality and cutting depth accuracy. The outcomes show how well the suggested system can adapt to changes in cutting circumstances and wear and strain on tools. The suggested framework has demonstrated enhanced resilience and stability in experimental findings when in contrast to very efficient conventional PID control. With an inaccuracy of less than 10%, it is observed that the surface finish value and the sustained minimum amplitude of vibration are comparable to standard models. Additionally, the use of advanced control and optimization techniques like MLNN and BFO can lead to more effective and adaptive power quality solutions, making this research highly relevant in the context of modern power systems [26, 27]. The various control quality (power quality) problems are addressed by using computer processes to ensure that photovoltaic (PV) and control quality conditioner (UPQC) are operated correctly and sustainably. This method involves reworking the weights in order to obtain reference signals for voltage source converters (VSC) of series and shunt compensators [28]. To enable active management of power flow over transmission lines, a number of power electronics-based devices have been proposed, including the unified power flow controller and the thyristor-controlled series capacitor. With the use of pulse width modulation, the suggested compensator integrates an AC-AC power converter and offers precise power flow control via the gearbox line [29]. In discrete time, the fuzzy PID controller is a variation on the standard PID controller that uses a constant coefficient and self-tuned control gains while keeping the proportional, integral, and derivative components linearly structured [30]. The literature review underscores significant progress in integrating solar PV systems into power grids, focusing on power quality challenges. Strategies like UPQCs, advanced control algorithms, and AI show promise, though further research is needed for adaptive control and optimization, crucial for enhancing the efficiency and stability of these systems.

Create and model a three-phase, single-stage solar PV integrated UPQC with control based on d-q theory. Additionally, MAF is used to enhance dynamic performance when extracting active current loads. This system's ability to simultaneously control voltage and current quality enhancement is one of its key advantages. It is also reliable in a variety of dynamic situations, including unbalanced loads, voltage sags or swells, and more. The primary problem with using synchronous reference frame theory is that the d-axis current has a twofold harmonic component when the load is imbalanced. Modern distribution systems have significant challenges with power quality, both load-side and grid-side,
because of the strict power quality requirements and the need for sustainable energy. Multifunctional systems that can combine renewable energy generation and power quality enhancement are required due to the demand for complex electronic loads.

## 3. METHODOLOGY

The purpose of this research is to improve the power quality of distributed generating systems by suggesting a three-phase, one-stage PV-UPQC in Figure 1. This study aims to enhance the power quality of distributed producing systems. System

design and setup, control strategies, modelling and simulation, and optimization approaches make up the methodology's framework.

### 3.1 System design and configuration

In the PV-UPQC system, shunt and series compensators are positioned back-to-back and linked by a common DC link. Using shunt compensators, photovoltaic array electricity is harnessed to lower load current harmonics; to compensate for voltage dips and spikes, the series compensator connects to the grid and injects the necessary voltage in series [28].

<figure><img src="image_2.png" /><figcaption>Figure 1. Block schematic for the PV-UPQC system</figcaption></figure>

#### 3.1.1 Voltage magnitude of Dc-link and Dc-bus capacitor rating

The DC-link voltage is calculated using Eq. (1), which approximates 677.69 V. Under Standard Test Conditions (STC), the PV array must run at its MPPT voltage of 700 V. The DC-bus capacitor value, derived from Eq. (2), is 9.8 mF with a constant "K" of 0.1 and an overloading factor "a" of 1.2. Under dynamic circumstances, these characteristics guarantee the DC-link voltage's stability [18, 19].

$$V_{dc} = \frac{2\sqrt{2}V_{LL}}{\sqrt{3}m} \qquad (1)$$

where, m is the depth of modulation (considered equal to 1). V<sub>LL</sub> is the grid line voltage (415 V).

$$C_{dc} = \frac{3kaV_{ph}I_{sh}t}{0.5 * (V_{dc}^2 - V_{dc1}^2)} \qquad (2)$$

#### 3.1.2 Shunt compensation inductor interface inductor (L<sub>f</sub>)

The interfacing inductor value for the shunt compensator is calculated using Eq. (3), yielding approximately 723.3 µH, rounded to 1 mH for practical purposes. The DC-link voltage is roughly 700 V, and the selected switching frequency is 10

kHz [19].

$$L_f = \frac{\sqrt{3}mV_{dc}}{12af_{sh}I_{cr,pp}} \qquad (3)$$

#### 3.1.3 Series injection transformer

The series injection transformer's ratings are determined by the PV-UPQC's total capacity. The turn ratio, calculated with Eq. (4) and Eq. (5), is approximately 3.33, rounded to 3. Grid current and the current flowing via series VSC are equal [18]. With a sag condition of 0.3 pu, the supply current is 29.414A, resulting in an accomplished 6.5 kVA rating for the injection transformer.

$$K_{SE} = V_{VSC}/V_{SE} \qquad (4)$$

$$S_{SE} = 3V_{SE}I_{SEsag} \qquad (5)$$

#### 3.1.4 Interfacing inductor of series compensator (L<sub>r</sub>)

Eq. (6) is used to rate the series compensator's interface inductor, yielding a value of 4.3 mH. Under varied load circumstances, this inductor keeps the series compensator stable and effective [29].
$$L_r = \frac{\sqrt{3} * mV_{dc}K_{SE}}{12af_{se}I_r} \quad (6)$$

where, $I_r$ is the inductor current ripple, which is assumed to be 20% of grid current (i.e., 5.88), $f_{se}$ is the switching frequency, ‘m’ is the depth of modulation, and a is the pu value of maximal overload. In this case, 4.3 mH is the chosen value, with $m=1$, $a=1.2$, $f_{se}=10$ kHz, $V_{dc}=700$ V, and 20% ripple current.

## 3.2 Control strategy

A PID controller, fine-tuned with the help of an MLNN, is at the heart of the control approach. MLNN is particularly well-suited for improving PID controllers in Solar PV-UPQC systems due to its ability to handle complex nonlinear

dynamics and adapt to changing operating conditions. Because of its adaptive learning capabilities, it can modify PID parameters in real-time, ensuring consistent performance even in the presence of load variations, harmonics, and voltage fluctuations. Unlike other AI techniques like fuzzy logic, which lacks generality, or evolutionary algorithms, which are computationally intensive for real-time applications, MLNN provides a balance between accuracy and efficiency. Furthermore, it offers excellent forecast accuracy for error dynamics, enabling faster convergence and better control outcomes. Because of its widespread use and proven efficacy in similar control applications, it is likewise a reliable and validated solution for this circumstance. Figure 2 shows the shunt compensator control structure, which maximizes power output by operating the PV array at its highest power point [18].

<figure><img src="image_3.png" /><figcaption>Figure 2. Control diagram of the shunt compensator</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>Figure 3. Control diagram of the series compensator</figcaption></figure>
The DC component is removed by means of a moving average filter. in order to avoid compromising dynamic performance. Eq. (7) provides the transfer function for the moving average filter.

$$MAF(s) = \frac{1-e^{-Tws}}{Tws} \qquad (7)$$

The moving average filter's $T_w$ window length is given in Eq. (7). The d-axis current $T_w$ is maintained at half of the fundamental time interval since its lowest harmonic is a double-harmonic component [15]. The filter has integer multiples of window length for zero gain and unity DC gain. The PV array's corresponding current component Eq. (8) is provided as

$$I_{pvg} = \frac{2 P_{pv}}{3 V_s} \qquad (8)$$

The PV array power is shown here [16], and the PCC voltage's magnitude is indicated by $V_s$. The Eq. (9) reflects the grid current in the d-axis.

$$I_{sd}^* = I_{Ldf} + I_{loss} - I_{pvg} \qquad (9)$$

The DC component $I_{Ldf}$, or the important reference component, is produced by filtering the d-component of the load current, $I_{sd}^*$, as shown in Eq. (9). Figure 3 depicts the series compensator's control structure. The output power of the solar PV system is expressed as

$$P = VI \qquad (10)$$

Eq. (10) provides the improved power when the voltage and current change, and when the small terms are ignored, the corresponding Eq. (11) is provided.

$$P + \Delta P = (I + \Delta I) \cdot (V + \Delta V) \qquad (11)$$

$$\Delta P = \Delta I * V + \Delta V * I \qquad (12)$$

Since $\Delta P$ has to be zero at the peak in Eq. (12), the source's dynamic impedance Eq. (13) is given as

$$\Delta I / \Delta V = -I / V \qquad (13)$$

### 3.2.1 Bacterial Foraging Optimization (BFO) with MPPT

Figure 4 illustrates the BFO algorithm, involving chemotaxis, swarming, reproduction, and elimination processes. The movement of bacteria, described by Eq. (14), and their repulsion mechanism, outlined in Eq. (15), and the fitness of every bacterium is determined and arranged following the chemotaxis and swarming processes in Eq. (16), contribute to the optimization of voltage and power parameters in the MPPT system [27].

$$H_i(j + 1, k, l) = H_i(j, k, l) + \frac{\Delta(i)}{\sqrt{\Delta^T(i) \Delta(i)}} Y(i)n \qquad (14)$$

$$U_i(j + 1, k, l) = U_i(j, k, l) + U_{cc}(H_i(j, k, l)) \qquad (15)$$

$$U_{ihealth} = \sum_{j=1}^{Nc} U_i(j, k, l) \qquad (16)$$

<figure><img src="image_5.png" /><figcaption>Figure 4. Flow chart of BFO</figcaption></figure>

### 3.2.2 PID controller optimization

The PID controller's transfer function is represented by Eq. (17), here $k_p$, $k_i$, and $k_d$ are the proportional, derivative, and integral gains, respectively. Eq. (18) details the error function used to assess the controller's performance [30]. The PID gains are optimized using MLNN to ensure robust and stable control, as shown in Figure 5.

$$C_{PID} = k_p + k_i/v + k_d v \qquad (17)$$

$$e_b(t) = K_p \frac{d\alpha(t)}{dt} = K_b \omega(t) \qquad (18)$$

<figure><img src="image_6.png" /><figcaption>Figure 5. MLNN-based PID tuning system</figcaption></figure>

The summing function's objective is to total the product of the inputs, weights, and bias. On the other hand, the following formula applies if there is a bias in the neurons of the network. This is explained by Eq. (19), Eq. (20), and Eq. (21).
$$Q_a = \sum_{i=1}^{n} [\alpha_{ij} * p_i(k)] + bias_{ij} \quad (19)$$

where, $p_i(k)$ is the total number of neuron inputs, $\alpha_{ij}$ connection weight linking to the neuron.

$$f(p) = 1/1 + \exp^{-Q} \quad (20)$$

As such, the data from the training phase should not be used in the MLNN-PID validation and/or testing phases.

$$Y_i(t) = 1/1 + \exp^{-[Q_a]} \quad (21)$$

The Eq. (22) is used to assess Mean square error (MSE) and the representation of $A_P$ is the expected output, $A_P^*$ is the actual output, and n is the total number of occurrences.

$$MSE = \frac{1}{n} \sum (A_p - A_p^*)^2 \quad (22)$$

The suggested work trains a single-layer feed-forward back propagation MLNN for DC-Link balancing [26].

### 3.3 Simulation and modeling

MATLAB-Simulink is used to create the PV-UPQC model, which incorporates the suggested control schemes and optimization methodologies. The model simulates various grid and load conditions, including different irradiance levels (200 to 1000 W/m²), linear irradiance (1000 W/m²), and unbalanced load scenarios.

#### 3.3.1 Simulation of grid and load conditions

The model accounts for varying irradiance levels and load unbalances to assess the effectiveness of the PV-UPQC's ability to sustain power quality.

#### 3.3.2 Performance evaluation

The simulation results are compared against standard performance metrics to validate the effectiveness of the proposed PV-UPQC design [19].

### 4. RESULTS AND DISCUSSION

Using several simulations and comparisons, the following section provides an in-depth evaluation of the suggested PV-UPQC system's performance. Figure 6 shows the setting and operating setup of the PV-UPQC system using the MATLAB-Simulink model.

In comparison to current models, Table 1 displays the PID controller gain values that were achieved using the suggested optimization techniques.

<table><caption>**Table 1.** PID controller gain values</caption><thead><tr><th>Sr. No.</th><th>Gain Parameter</th><th>K<sub>p</sub></th><th>K<sub>i</sub></th><th>K<sub>d</sub></th></tr></thead><tbody><tr><td>1</td><td>Proposed</td><td>0.89</td><td>0.92</td><td>0.93</td></tr><tr><td>2</td><td>PID+MLNN+BFO+MPPT</td><td>1.32</td><td>2.74</td><td>1.56</td></tr><tr><td>3</td><td>Existing (PID+MLNN)</td><td>2.5</td><td>1.1</td><td>-</td></tr></tbody></table>

The proposed method, combining PID with MLNN, BFO, and MPPT, shows improved gain values: $K_p = 0.89$, $K_i = 0.92$, and $K_d = 0.93$. This constitutes a noteworthy decrease in comparison to the current model (PID+MLNN), where $K_p$, $K_i$, and $K_d$ are 1.32, 2.74, and 1.56, respectively. The base model's gains, with only PI and MPPT, are notably higher.

<figure><img src="image_7.png" /><figcaption>**Figure 6.** MATLAB-Simulink model of PV-UPQC</figcaption></figure>
<figure><img src="image_8.png" /><figcaption>(a) Different irradiance (200 to 1000W/m²)</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>(b) Linear irradiance (1000W/m²)</figcaption></figure>

**Figure 7.** Voltage sag & swell of the proposed model
## 4.1 Variation of voltage for the proposed model under different irradiance

The Voltage sag and swell are successfully compensated for by the system. In Figure 7(a), a voltage sag of 220 V is observed between 0.7 and 0.75 seconds, and a voltage swell of 400 V between 0.8 and 0.85 seconds.

For linear irradiance in Figure 7(b), the compensator injects 180 V during sag and 50 V during swell, maintaining the load voltage despite fluctuations in grid voltage.

## 4.2 Performance of optimal PV-UPQC at load unbalanced circumstance

When phase 'b' is severed at $t = 0.8s$ in an unbalanced load scenario, the shunt compensator keeps the DC bus voltage at about 500 V with little variation. The injected voltage ranges from 0 to 500 V between 0.8 and 0.95 seconds, while the grid current stays sinusoidal and has a power factor of unity. Despite the 100 Hz harmonic component in the d-axis current caused by load unbalance in Figure 8, the load current and harmonics are balanced.

<figure><img src="image_10.png" /><figcaption>Figure 8. PV-UPQC performance in the presence of load imbalance</figcaption></figure>
## 4.3 Varying irradiation level of PV-UPQC

The system effectively tracks varying irradiation levels, with the PV array output increasing with irradiance. In Figure 9, irradiation fluctuates between 500 W/m² at 0.2 seconds and 1000 W/m² at 0.8 seconds. The grid current and PV array output rise with increasing irradiance. Under different irradiation conditions, the MPPT efficiency and PV array power improve, leading to higher current fed into the grid. The system maintains an efficiency of over 99.2% in MPPT tracking.

<figure><img src="image_11.png" /><figcaption>**Figure 9.** Performance of PV-UPQC across varying irradiation levels</figcaption></figure>

## 4.4 Performance by Total Harmonic Distortion (THD)

Figure 10 shows the analysis of the PV-UPQC system's Total Harmonic Distortion (THD) under various conditions. The THD levels of 1.14% for linear irradiance, 2.82% for variable irradiance, and 2.81% for load imbalance fall well within the IEEE 519-2014 suggested limit of 5% for voltage THD at the point of common coupling (PCC) and 20% for current harmonics, depending on the system's voltage and short-circuit capacity. The total reliability of the system can be improved by integrating solar PV with UPQC, which can drastically lower THD levels and frequently achieve values well within the recommended limits. The system effectively compensates for reactive power and harmonics, demonstrating low harmonic distortion across all conditions.

<figure><img src="image_12.png" /><figcaption>**Figure 10.** Analysis of harmonic distortion</figcaption></figure>

## 4.5 Analysis of stability of the proposed system

The stability of the DC link voltage can be examined using the Lyapunov-based stability approach, which offers a theoretical assurance by showing that the system maintains a stable voltage range in the face of external disturbances and changing operating conditions.

The voltage of the DC-link is maintained within the specified range of 700 to 720V regardless of the circumstances shown in Figure 11.
<figure><img src="image_13.png" /><figcaption>(a) Varying irradiance</figcaption></figure>

<figure><img src="image_14.png" /><figcaption>(b) Linear irradiance</figcaption></figure>

<figure><img src="image_15.png" /><figcaption>(c) Unbalanced condition</figcaption></figure>

<caption>**Figure 11.** Stability of system by DC link voltage</caption>

## 5. CONCLUSIONS

The implementation of the MPPT-BFO combined with MLNN-PID techniques has proven to be highly effective in managing voltage fluctuations and load unbalances. The optimized PID controller, augmented with Multilayer Neural Network (MLNN), Bacterial Foraging Optimization (BFO), and Maximum Power Point Tracking (MPPT), delivers exceptional control with gain values of ($K_p$ = 0.89), ($K_i$ = 0.92), and ($K_d$ = 0.93). This optimization enhances system stability and performance when compared to traditional models. The PV-UPQC system adeptly compensates for voltage sag and swell across a range of irradiance levels, maintaining a stable load voltage and managing grid voltage variations efficiently. The system's MPPT efficiency exceeds 99.2%, demonstrating effective adaptation to varying irradiation levels, which in turn boosts PV array output and grid current. Furthermore, the system minimizes Total Harmonic Distortion (THD) across different conditions, keeping it within acceptable limits. The DC-link voltage remains consistently stable within the desired range of 700 to

720V, underscoring the system's reliability and effectiveness. In summary, the PV-UPQC system, through its advanced control and compensation mechanisms, offers a robust solution for enhancing photovoltaic applications' power quality and stability, making it an important component of contemporary renewable energy systems. The study's limitations include its dependence on simulations, sensitivity to environmental factors, high implementation costs, difficulties with scalability, and a lack of attention to dynamic grid disruptions and real-world deployment scenarios. Future research could focus on integrating hybrid renewable energy sources, such as wind and fuel cells, with the existing PV system to create a more robust hybrid energy model. Additionally, real-time implementation of the proposed scheme in a larger-scale microgrid with multiple distributed energy resources and varying load profiles can provide valuable insights into its scalability and practical feasibility. By using adaptive control strategies and strong compensating approaches, the suggested control's scalability and stability under weak grid conditions and high grid impedance may be addressed, ensuring reliable performance and resilience in such difficult situations.

## REFERENCES

[1] Sharma, N.K., Tiwari, P.K., Sood, Y.R. (2012). Solar energy in India: Strategies, policies, perspectives and future potential. Renewable and Sustainable Energy Reviews, 16(1): 933-941. https://doi.org/10.1016/j.rser.2011.09.014

[2] Sharma, A. (2011). A comprehensive study of solar power in India and world. Renewable and Sustainable Energy Reviews, 15(4): 1767-1776. https://doi.org/10.1016/j.rser.2010.12.017

[3] Kishore, D.R., Muni, T.V., Raja, B.S., Pushkarna, M., Goud, B.S., AboRas, K.M., Alphonse, S. (2023). Grid-connected solar PV system with maximum power point tracking and battery energy storage integrated with sophisticated three-level NPC inverter. International Transactions on Electrical Energy Systems, 2023(1): 3209485. https://doi.org/10.1155/2023/3209485

[4] Kolantla, D., Mikkili, S., Pendem, S.R., Desai, A.A. (2020). Critical review on various inverter topologies for PV system architectures. IET Renewable Power Generation, 14(17): 3418-3438. https://doi.org/10.1049/iet-rpg.2020.0317

[5] Mishra, S. (2016). Power quality improvement using unified power quality conditioner. Doctoral dissertation, National Institute of Technology.

[6] Dash, S.K., Ray, P.K. (2020). A new PV-open-UPQC configuration for voltage sensitive loads utilizing novel adaptive controllers. IEEE Transactions on Industrial Informatics, 17(1): 421-429. https://doi.org/10.1109/TII.2020.2986308

[7] Yang, D., Ma, Z., Gao, X., Ma, Z., Cui, E. (2019). Control strategy of integrated photovoltaic-UPQC system for DC-bus voltage stability and voltage sags compensation. Energies, 12(20): 4009. https://doi.org/10.3390/en12204009

[8] Chandrakala Devi, S., Singh, B., Devassy, S. (2020). Modified generalized integrator-based control strategy for solar PV fed UPQC enabling power quality improvement. IET Generation, Transmission &
Distribution, 14(16): 3127-3138.
https://doi.org/10.1049/iet-gtd.2019.1939

[9] Wang, J., Liang, J., Gao, F., Zhang, L., Wang, Z. (2014). A method to improve the dynamic performance of moving average filter-based PLL. IEEE Transactions on Power Electronics, 30(10): 5978-5990.
https://doi.org/10.1109/TPEL.2014.2381673

[10] Kale, M., Ozdemir, E. (2005). An adaptive hysteresis band current controller for shunt active power filter. Electric Power Systems Research, 73(2): 113-119.
https://doi.org/10.1016/j.epsr.2004.06.006

[11] Siddhartha, P., Sujeeth, T., Shiva, B., Ramprabhakar, J. (2023). Integration of renewable energy sources with power management strategy for effective bidirectional vehicle to grid power transfer. Procedia Computer Science, 218: 9-23.
https://doi.org/10.1016/j.procs.2022.12.397

[12] Hadpe, N.V., Tapre, P.C., Solanki, A.M. (2019). Design and performance analysis of three-phase solar PV integrated UPQC. International Research Journal of Engineering and Technology, 6(5): 6426-6430.

[13] de Almeida Carlos, G.A., Jacobina, C.B. (2016). Series compensator based on cascaded transformers coupled with three-phase bridge converters. IEEE Transactions on Industry Applications, 53(2): 1271-1279.
https://doi.org/10.1109/TIA.2016.2638799

[14] Pathak, D., Sagar, G., Gaur, P. (2020). An application of intelligent non-linear discrete-PID controller for MPPT of PV system. Procedia Computer Science, 167: 1574-1583.
https://doi.org/10.1016/j.procs.2020.03.368

[15] Hussain, K.M., Zepherin, R.A.R., Shantha, M. (2014). Comparison of PID controller tuning methods with genetic algorithm for FOPTD system. International Journal of Engineering Research and Applications, 4(2): 308-314.

[16] Xiang, Z., Ji, D., Zhang, H., Wu, H., Li, Y. (2019). A simple PID-based strategy for particle swarm optimization algorithm. Information Sciences, 502: 558-574.
https://doi.org/10.1016/j.ins.2019.06.042

[17] Ratnakaran, R., Rajagopalan, G.B., Fathima, A. (2023). Artificial ecosystem optimized neural network controlled unified power quality conditioner for microgrid application. Energy Informatics, 6(1): 45.
https://doi.org/10.1186/s42162-023-00301-3

[18] Devassy, S., Singh, B. (2017). Design and performance analysis of three-phase solar PV integrated UPQC. IEEE Transactions on Industry Applications, 54(1): 73-81.
https://doi.org/10.1109/TIA.2017.2754983

[19] Shahapure, S.B., Hasabe, R.P. (2019). Power quality improvement using unified power quality conditioner with distribution generation. In 2019 International Conference on Communication and Electronics Systems (ICCES), Coimbatore, India, pp. 1834-1840.
https://doi.org/10.1109/ICCES45898.2019.9002413

[20] Das, S., Ishrak, H.M., Hasan, M.M., Kabir, M.A. (2023). Empirical analysis of power quality using UPQC with hybrid control techniques. Results in Engineering, 20: 101527.
https://doi.org/10.1016/j.rineng.2023.101527

[21] Yadav, S.K., Yadav, K.B. (2022). Implementation of three-phase hybrid energy system integrated with UPQC. In Recent Advances in Power Electronics and Drives: Select Proceedings of EPREC 2021, Jamshedpur, India, pp. 305-316.
https://doi.org/10.1007/978-981-16-9239-0_23

[22] Patel, A., Yadav, S.K., Mathur, H.D., Bhanot, S., Bansal, R.C. (2020). Optimum sizing of PV based UPQC-DG with improved power angle control. Electric Power Systems Research, 182: 106259.
https://doi.org/10.1016/j.epsr.2020.106259

[23] Kaushal, J., Basak, P. (2020). Power quality control based on voltage sag/swell, unbalancing, frequency, THD and power factor using artificial neural network in PV integrated AC microgrid. Sustainable Energy, Grids and Networks, 23: 100365.
https://doi.org/10.1016/j.segan.2020.100365

[24] Nkado, F., Nkado, F., Oladeji, I., Zamora, R. (2021). Optimal design and performance analysis of solar PV integrated UPQC for distribution network. European Journal of Electrical Engineering and Computer Science, 5(5): 39-46.
https://doi.org/10.24018/ejece.2021.5.5.361

[25] Muqeet, A., Israr, A., Zafar, M.H., Mansoor, M., Akhtar, N. (2023). A novel optimization algorithm based PID controller design for real-time optimization of cutting depth and surface roughness in finish hard turning processes. Results in Engineering, 18: 101142.
https://doi.org/10.1016/j.rineng.2023.101142

[26] Popescu, M.C., Balas, V.E., Perescu-Popescu, L., Mastorakis, N. (2009). Multilayer perceptron and neural networks. WSEAS Transactions on Circuits and Systems, 8(7): 579-588.

[27] Das, S., Biswas, A., Dasgupta, S., Abraham, A. (2009). Bacterial foraging optimization algorithm: Theoretical foundations, analysis, and applications. In Foundations of Computational Intelligence, Springer, pp. 23-55.
https://doi.org/10.1007/978-3-642-01085-9_2

[28] Konathala, D.A.S., Meghana, P., Priyanka, G., Deepika, G. (2024). Design and control of PV fed UPQC using neural network for power quality enhancement. SSRN.
https://doi.org/10.2139/ssrn.4821240

[29] Venkataramanan, G., Johnson, B.K. (2002). Pulse width modulated series compensator. IEE Proceedings-Generation, Transmission and Distribution, 149(1): 71-75.
https://doi.org/10.1049/ip-gtd:20020004

[30] Tang, K.S., Man, K.F., Chen, G., Kwong, S. (2001). An optimal fuzzy PID controller. IEEE Transactions on Industrial Electronics, 48(4): 757-765.
https://doi.org/10.1109/41.937407