Modeling and Simulation of Grid-Tied Three-Phase PV System in Lahore, Pakistan

This research examines the implementation of grid-tied solar inverters in Lahore’s energy infrastructure, considering the city’s growing energy demands. Utilizing MATLAB/Simulink for modeling solar photovoltaic systems in Lahore’s arid climate, our study focuses on a house in Askari X housing society, Lahore, Pakistan, with a 5.1 kW load. The results demonstrate the expected system variation of a Grid-Tied PV System during grid disruptions, and the model’s consistent performance across varying irradiance conditions suggests potential economic advantages through net metering. These findings offer practical insights into the economic feasibility and dependability of grid-tied solar inverters in Lahore, highlighting their potential to contribute to the city’s energy needs.


Introduction
The use of renewable resources is a crucial step towards sustainable development in the rapidly changing energy landscape [1].Grid-tied solar inverters, which are essential for integrating renewable energy into urban power infrastructures [2], play a significant role in cities like Lahore.The city's escalating energy demands make the role of gridtied solar inverters increasingly important.To understand the current state of solar energy adoption in Lahore, it is crucial to examine the city's energy consumption patterns, existing infrastructure, and climatic conditions that determine the feasibility and practicality of solar photovoltaic systems.The city's geographical location and climate have a significant impact on the efficiency of solar installations.Lahore's predominantly arid climate provides an ideal setting for solar energy harnessing, with copious amounts of intense sunlight available throughout the year.Nevertheless, the complexities of temperature variations, dust levels, and other local factors necessitate a customized approach to designing grid-tied systems in this context.The utilization of grid-tied solar inverters presents a significant opportunity to transform the energy landscape.By flawlessly integrating solar power into the existing electrical grid, these systems offer a practical solution for Lahore, paving the way for environmentally friendly and sustainable energy management.Our examination of Lahore's context extends beyond mere academic inquiry, as it represents a deliberate attempt to emphasize the practical applications of grid-tied systems in real-world urban situations.By addressing peak load demands and reducing dependence on conventional power sources, the influence of these systems goes beyond theoretical boundaries, making them essential contributors to Lahore's energy security and stability.

Literature Review
Several studies have explored the modelling of grid tied solar system in various software.For instance, Benaissa et al. [3] conducted a thorough examination of a solar photovoltaic (PV) system that is connected to the utility grid using MATLAB/Simulink.This system features a DC-DC boost converter and a DC/AC inverter (VSC) that facilitate the transfer of electrical power to the grid.The model consists of two 100 kW solar arrays, a boost converter, and a three-level grid-side inverter.The authors have included several notable features, such as an accurate PV cell model that considers external temperature and solar radiation, as well as a maximum power point tracking (MPPT) algorithm.The simulation results demonstrate the influence of changes in solar radiation on the power output and showcase the effective control performance of the grid-connected PV system.Similarly, Kumar et al. [4] conducted a study on the mathematical modeling and simulation of a residential grid-connected solar photovoltaic (PV) system using a 170 W Mitsubishi solar module.They utilized a one-diode equivalent circuit to analyze the current-voltage (I-V), power-voltage (P-V), Modeling and Simulation of Grid-Tied Three-Phase PV System in Lahore, Pakistan Akhtar and Iqbal and power-current (P-I) characteristics of the system.The simulation incorporated a Perturb and Observe Maximum Power Point Tracking (MPPT) algorithm and a singlephase grid-tied inverter, which were implemented using MATLAB/Simulink.The objective of their research was to improve the understanding of the dynamic behavior and performance characteristics of the system.In their study, Raut et al. [5] performed a performance analysis on a grid-connected solar PV system.They mathematically modeled a 1 kWp grid-connected system and calculated the power profile using historical environmental data.The researchers identified potential operational issues in gridconnected PV systems and suggested various strategies to address these challenges.Furthermore, the paper assessed the overall performance of the system under different scenarios.Tina et al. [6] presented a thorough description of a single-phase grid-connected system in their paper.The model encompasses an inverter, unipolar SPWM, inverter control strategy, Phase Locked Loop, and filter.The implemented inverter control strategy allows for the regulation of active and reactive power flow separately, enabling voltage regulation at the point of common coupling (PCC).The model is rigorously tested both numerically and experimentally, showcasing its effectiveness in regulating power flow and voltage stability.In their paper [7], Molina et al. provided a thorough analysis of the performance and dynamic behavior of grid-connected photovoltaic (PV) energy conversion systems.They introduced PVSET 1.0, a versatile and precise simulation and evaluation tool for PV systems developed using MAT-LAB/Simulink.This tool enables the assessment of the effect of PV generation on electricity grids, offering valuable information on the behavior of grid-connected PV systems under different operating scenarios.AbdelHady [8] designed a MATLAB/Simulink model of a solar PV system connected to a microgrid.The model was based on a 91 kW PV system located at the National Water Research Center in Egypt.The study's objective was to assess the system's performance in relation to both the local low-voltage grid and the national high-voltage grid, and to compare economic savings under various scenarios, providing valuable insight into the economic feasibility of micro grid-connected solar PV systems.
Iqbal et al. [9] investigated the modeling of a conventional rural house in Pakistan using BEopt to identify the hourly load profile.They subsequently designed a standalone photovoltaic (PV) system using HOMER Pro, which included a 5.8 kW PV array and eight batteries, as well as a 1.4 kW inverter.The simulation results in MATLAB-Simulink demonstrated the system's ability to power lighting and appliance loads in a rural setting, highlighting the versatility of such systems for various regions around the world.The study by Xie et al. [10] examines the difficulties of managing voltage in gridconnected photovoltaic systems.The researchers propose a non-linear controller design that utilizes Lyapunov-based finite-time control to regulate reactive power and DC link voltage.This innovative approach outperforms conventional proportional-integral controllers, particularly in situations involving disturbances such as alterations in solar insolation levels and bus faults.The simulation results confirm the superiority of the proposed algorithm in maintaining system stability and robustness.Gulzar et al. [11] have developed an innovative converter less control strategy for a hybrid grid-connected system that integrates PV, wind, fuel cell, and battery energy storage.This system eliminates the need for a PV converter, resulting in increased cost efficiency.The design features controllers for grid-connected hybrid systems, which optimize the power flow from renewable sources to the grid.The simulation results in MATLAB Simulink demonstrate the efficiency of the proposed hybrid system, highlighting its potential advantages over conventional configurations.Ali et al. [12] explored on the design and simulation of a power electronic controller for a grid-connected photovoltaic array with maximum power point tracking (MPPT).The project involves the use of a DC boost converter in conjunction with an MPPT controller to enhance the extraction of power from the solar array.The study, conducted in MATLAB/Simulink, compares the performance of open-loop and closed-loop systems, demonstrating the effectiveness of the proposed controller in maintaining a stable power output to the grid.Gulzar et al. [13] aims to enhance the control capabilities of a gridconnected photovoltaic (PV) system in rapidly changing atmospheric conditions.By utilizing artificial intelligence optimization, the researchers determine optimal sliding mode controller gains, resulting in improved stability and reduced voltage overshoots.Their proposed finite-time sliding mode maximum power point controller exhibits superior performance, particularly in terms of transient, steady-state, and dynamic responses.Mahmood et al. [14] tackle the obstacles of voltage stability, regulation, and fault exposure in grid-connected Photovoltaic/Fuel Cell Hybrid Energy Systems.By proposing a multi-input multioutput (MIMO) controller, they aim to monitor, control, and track the maximum power point of both the fuel cell and PV power sources.A simulation conducted in MAT-LAB/Simulink showcases the efficiency of the developed controllers in maintaining a stable output to the grid while minimizing Total Harmonic Distortion (THD).Zeb et al. [15] have developed a Fuzzy-PI controller to effectively regulate the DC-link voltage in a 3 kW single-phase gridtied PV system.This research tackles the issues of voltage ripples and fluctuations in input DC voltage, as well as the reduction of DC-link capacitors.The proposed controller, implemented in MATLAB/Simulink, demonstrates fast, robust, and reliable performance, and improves the power quality in grid-tied PV systems.Habib et al. [16] investigates the design optimization and model predictive control for a hybrid renewable energy system that consists of wind, diesel, battery, and converter.This research was applied to a real case study in a remote rural area in Pakistan, and it involves the optimization of component sizes, power management strategies based on battery state of charge, and model predictive control to improve the output voltage profile and reduce total harmonic distortion.The proposed design and control strategy for the hybrid renewable energy system are cost-effective and environmentally friendly, which enhances the reliability and power quality of standalone renewable energy systems.

Akhtar and Iqbal
Modeling and Simulation of Grid-Tied Three-Phase PV System in Lahore, Pakistan

Methodology
The platform of MATLAB/SIMULINK is a versatile and powerful tool in the field of system modeling, providing a comprehensive environment for dynamic simulation and modeling.It has been selected for the modeling of the Grid-Tied PV System due to its ability to seamlessly integrate mathematical modeling with simulation, making it particularly well-suited for complex systems such as solar inverters.With this platform, it is possible to construct a holistic model that accurately reflects the real-world dynamics of the chosen system.

Site Description
The site selected for this research is a house in Lahore.Lahore is considered the second densely populated city and most populated division of Pakistan with a total population of around 22 million.The location of this site is long as 31.5481,Lat 74.3916.The house is located in Askari X housing society, Lahore and the total rooftop area of this house is 1680 ft2.This house is made of bricks with a flat rooftop.
Table I shows the major electric appliances installed in this house and their load.Temperature rises to 45 °C during summers in Pakistan, so air conditioning units are used to maintain indoor temperature.The historical energy trend of the house shows that the average monthly energy consumption of this house is around 400 kWh with peak consumption in summer.The total in Table I shows that the full load of this house is around 5.1 kW.All the appliances in this house are rated at 220 VAC.Air conditioners are used only for a few hours a day.

Model Description
The focus of our investigation is a comprehensive model of the Grid-Tied PV System.In this section, we shall explore the system's architecture and constituent parts, which have been carefully crafted to accurately capture the interaction between a solar inverter and the grid.The model encompasses the photovoltaic array, power electronics, control mechanisms, and the complex interplay of these elements to provide a detailed representation of realworld operations.Our approach involves breaking down the system into smaller subcomponents, each represented by mathematical equations and algorithms.This modular design enhances the model's adaptability and allows for a detailed examination of each element's influence on the overall performance.Throughout the modeling process, we carefully consider the unique aspects of Lahore's climate, incorporating specific parameters that reflect the city's environmental conditions.Fig. 1 shows the overall structure of the simulated system modelled in Simulink.The model consists of a PV array block, a DC-DC converter, an MPPT controlled Three-Phase Inverter, and Three-Phase Grid.

PV Array
The PV array is simulated based on the model installed on site.A total of 14 Monocrystalline solar panels manufactured by JA Solar are installed on site.The model number of the solar panel is JAM72S30, and the total rated power of each solar panel is 545 watts.JA Solar used halfcut configuration of the modules which offers advantages of higher power output, better temperature-dependent performance, reduced shading effect on the energy generation, lower risk of hot spot, as well as enhanced tolerance for mechanical loading.The company offers 12 years of product warranty and 25 years of linear power output warranty with 0.55% annual degradation over 25 years.14 panels produce a total of 7630 W. Fig. 2 illustrates the I-V and P-V curves of the PV array.

DC-DC Converter
In the simulation framework, the integration of a DC-DC converter within the inverter system is a critical aspect that demands a nuanced approach.Although the actual inverter incorporates an embedded DC-DC converter, for the purposes of simulation in Simulink, a Boost Converter model has been employed to accurately replicate the functionality and dynamics of the real-world system.The Boost Converter serves as a pivotal component in the simulation setup, mirroring the essential role of the embedded DC-DC converter in the physical inverter.This simulation strategy not only facilitates a more granular examination of the converter's behavior but also allows for a detailed analysis of its impact on the overall system performance.
Fig. 3 provides a visual representation of the Boost Converter model within the Simulink environment.The schematic encapsulates the intricacies of the Boost Converter, illustrating the flow of DC power from the photovoltaic (PV) panel through the converter to the inverter at an output voltage of 400 V.The Boost Converter, in this simulation context, serves as an intermediary stage, optimizing the power transfer from the PV array to the inverter, ensuring compatibility and efficiency in the energy conversion process.This modeling decision aligns with the dual objectives of accuracy and flexibility in the simulation setup.While recognizing the presence of an integrated DC-DC converter in the actual inverter, the use of a Boost Converter model allows for a more detailed examination of its transient response, efficiency characteristics, and the influence on the overall system dynamics.
The implementation of Maximum Power Point Tracking (MPPT) control is a pivotal aspect in optimizing the performance of the DC-DC converter within the overall photovoltaic (PV) system.Fig. 4 provides a graphical representation of the MPPT controller specifically designed for the DC-DC converter.In this instance,  The Incremental Conductance method is renowned for its ability to dynamically track and adjust the operating point of the PV system to maximize power output.This technique involves monitoring the instantaneous changes in power and voltage and adjusting the operating point to ensure it corresponds to the maximum power point on the power-voltage characteristic curve of the solar panel.The Incremental Conductance approach is particularly effective in environments with variable irradiance and temperature conditions, as it allows for swift and adaptive adjustments.Incremental Conductance is often based on the ratio of the change in power to the change in voltage.The algorithm seeks to make this ratio equal to the negative of instantaneous conductance.The Incremental Conductance (IC) algorithm equation can be expressed as: where P is the change in power, V is the change in voltage, G is instantaneous conductance.
The goal is to adjust the operating point until IC = 0, indicating that the system is operating at the maximum power point.
Along with Incremental Conductance, the Integral Regulator adds a layer of stability and precision to the MPPT control strategy.By incorporating integral control, the regulator minimizes any steady-state errors that may arise during the tracking process.This ensures that the operating point converges to and remains at the optimal point for power extraction over a range of environmental conditions.The Integral Regulator adds a term based on the integral of the error signal.The error is the difference between the actual operating point conductance and the conductance at the maximum power point.The equation for the Integral Regulator can be written as: where I Reg is the integral term, k i is the integral gain, error is the difference between the actual conductance and the conductance at the maximum power point.

Three-Phase Inverter
The integration of the DC-DC converter and the subsequent provision of stable DC voltage to the Three-phase Inverter form a crucial link in the photovoltaic (PV) system.The specific inverter utilized in the system, the Crown Nova 8.2 kW pure sine wave hybrid inverter, plays a pivotal role in transforming the DC power from the solar panels into usable AC power for the electrical grid.Table II provides the specifications of the inverter.
The Crown Nova 8.2 kW inverter is designed to meet the local demand of the utility supply company, adhering to the standard specifications of 230 VAC and 50 Hz.The pure sine wave output ensures a clean and stable power supply, making it suitable for a variety of applications.The inverter has a maximum efficiency of 93%, indicating its effectiveness in converting the DC power from the PV array to AC power with minimal losses.Additionally, the capability to synchronize up to 7 units in parallel enhances the scalability and adaptability of the system, allowing for increased power output as needed.The inclusion of two     employs the abc_dq0 transformation that is commonly used to convert three-phase quantities from the stationary abc reference frame to the rotating dq0 reference frame.This transformation involves rotating the coordinates to align with the instantaneous phase angle of the AC load.
The transformation for voltage involves rotating the three-phase voltage vector [V a , V b , V c ] T in the abc frame to the dq0 frame, resulting in the vector V d , V q , V 0 T .The transformation equations are given by: where θ is the instantaneous phase angle.Similarly, the transformation for current involves rotating the three-phase current vector [I a , I b , I c ] T in the abc frame to the dq0 frame, resulting in the vector I d , I q , I 0 T .
The transformation equations are given by: In these equations, I d and I q represent the direct and quadrature components of the current, respectively, in the rotating dq frame.
The Voltage Regulator is responsible for maintaining the output voltage of the inverter within the specified limits.It adjusts the inverter's output voltage to match the grid voltage, ensuring that the power injected into the grid is at the required voltage levels.This component contributes to the stability and reliability of the inverter's interaction with the grid.The Current Regulator focuses on controlling the output current of the inverter.It ensures that the inverter injects the appropriate amount of current into the grid, aligning with the grid's requirements.This regulation is crucial for grid compatibility and prevents undesirable effects such as overcurrent or instability.The collective operation of these three components within the MPPT system enables the inverter to seamlessly synchronize with the grid.The coordinated efforts of the PLL, Voltage Regulator, and Current Regulator ensure that the inverter's output adheres to the grid specifications, including frequency, voltage, and current.
The voltage and current regulators in a Maximum Power Point Tracking (MPPT) system are essential components that control the output of the inverter to optimize the power extracted from the photovoltaic (PV) panels.These regulators adjust the inverter's output voltage and current to ensure that it operates at the maximum power point of the PV array.
The voltage regulator ensures that the inverter output voltage (V inv ) aligns with the maximum power point voltage (V mpp ) of the PV array.The basic proportional-integral (PI) control equation for the voltage regulator is: where V ref is the reference voltage for the inverter, K p is the proportional gain, K i is the integral gain, t is time.
The current regulator adjusts the inverter output current (I inv ) to match the maximum power point current (I mpp ) of the PV array.The PI control equation for the current regulator is: (10) where I ref is the reference current for the inverter, K p is the proportional gain, K i is the integral gain, t is time.
These equations represent a basic form of the PI control used in regulators.The gains (K p and K i ) are tuning parameters that need to be adjusted to achieve stable and efficient control.The voltage and current regulators work in conjunction to dynamically adjust the inverter's output to maximize power extraction from the PV array under varying environmental conditions.

Three-Phase Grid Modelling
The grid model for the three-phase grid-connected PV system in Lahore is accurately constructed to mirror the characteristics of the power distribution network in Pakistan as shown in Fig. 6.At the heart of this model lies the primary energy source, a three-phase transformer with a substantial voltage rating of 132 kV/11 kV and an impressive power rating of 2500 MVA.This transformer serves as the linchpin of the grid, facilitating the transformation and distribution of electrical power.
The energy transfer across the grid is facilitated by two transmission lines, each designed to transport power from the source to distinct loads within the system.The first transmission line spans a length of 14 km, while the second covers 5 km.To accurately capture the realworld complexities of power transmission, impedance blocks are strategically incorporated into the model.These impedance blocks play a pivotal role in replicating voltage drops and losses that occur during power transmission, ensuring comprehensive representation of the grid dynamics.
Within this grid model, various loads are strategically placed to simulate real-world scenarios.Load 1, a 30 MW and 2 MVAR load, is connected at the terminus of the 14 km feeder, representing a substantial demand on the grid.Load 2, a 2 MW load, is situated at the endpoint of the 5 km feeder, contributing to the overall load distribution.Additionally, Load 3, designed as a 5.1 kW residential load, is introduced to represent household consumption.For the purposes of this study, Load 3 remains fixed at 5.1 kW over a 24-hour period, providing a stable and consistent residential demand profile for analysis.

Results
The simulation of the model was conducted using MAT-LAB/Simulink 2023b, and the obtained results affirm the accuracy of the model's representation.The load was intentionally set at 5.1 kW to emulate the actual load conditions at the site under investigation.The simulation encompasses three distinct cases, each shedding light on different aspects of the grid-connected PV system.Fig. 7. PV array providing power to the load.Grid is not connected.

Grid Disconnected and Constant Irradiance
In the first case, the scenario involves the grid being disconnected.The PV array, with a capacity of 7.5 kW, is demonstrated to be fully capable of meeting the 5.1 kW load demand.As depicted in Fig. 7, the PV array consistently generates 7.5 kW of power.
The voltage within the system remains stable at 300 V, indicating the robustness of the PV array in handling the load independently.This scenario showcases the selfsufficiency of the PV system in generating and supplying power without relying on the external grid.The figure not only illustrates the power generation and voltage stability but also serves as a visual confirmation of the successful simulation in MATLAB/Simulink.The alignment of simulated results with the expected outcomes further validates the accuracy of the model, providing confidence in its representation of real-world conditions.

Grid Connected with Varying Irradiance.
In Case 2, the simulation explores the grid-connected scenario with varying irradiance, specifically focusing on the net metering setup installed at the site.In this configuration, the PV array is connected to the grid and continues to supply power to the load.The net metering system allows for the excess power generated by the PV array to be fed back into the grid Fig. 8 illustrates the scenario.
Fig. 9 illustrates the dynamics of power flow within the system.Three distinctive waveforms are presented: the red line represents the power generated by the PV array, the blue line signifies the power consumed by the load, and the green line depicts the power exchanged with the grid.Notably, the grid waveform (green) exhibits a negative trend, indicating that the PV array is contributing excessive power to the grid.This negative value signifies the net export of power from the PV system to the grid, a characteristic feature of net metering systems.
To further investigate the system's behavior under reduced irradiance conditions, the irradiance is intentionally reduced to 200.Therefore, the power generation by the PV array diminishes.In this scenario, the system dynamically compensates for the reduced power generation by acquiring additional power from the grid.Consequently,  the grid waveform (green) transitions to a positive value, reflecting the influx of power from the grid to meet the load demand.
This simulation scenario, characterized by varying irradiance levels, provides valuable insights into the adaptability and performance of the grid-connected PV system.The net metering mechanism allows for a dynamic interplay between power generation, load demand, and grid interaction, showcasing the system's ability to seamlessly balance energy supply and demand under changing environmental conditions.The visualization of these waveforms in the simulation output is instrumental in comprehending the intricacies of the grid-connected PV system in practical scenarios.

Grid Connected with Realistic Irradiance and Temperature
In this scenario, the simulation takes a step further by incorporating realistic irradiance values that reflect the day and night schedule of the site.The irradiance values follow a pattern corresponding to the natural variations in sunlight throughout the day, reaching a maximum of 700 W/m 2 .The temperature is kept constant at 25 °C to maintain consistency in the simulation conditions.Fig. 10 illustrates the scenario.
The simulation results, as depicted in Fig. 11, showcase the accurate modeling of the photovoltaic (PV) system installed at the site under realistic irradiance conditions.The Figure captures the dynamic response of the PV array to the varying sunlight intensity, providing a comprehensive representation of its performance throughout the day.The realism in the irradiance values allows the simulation to closely mimic the actual behavior of the PV system in response to changing environmental conditions.The accuracy of the model is evident in the waveform patterns, demonstrating how the power output from the PV array dynamically adjusts in accordance with the available sunlight.This scenario is particularly valuable for assessing the practical viability of the grid-connected PV system under realistic operating conditions.It enables a thorough examination of the system's ability to adapt to the inherent variability in solar irradiance and validates the model's representation against real-world expectations.
The fidelity of the simulation outcomes further reinforces the robustness of the MATLAB/Simulink model, providing a reliable platform for studying and optimizing the performance of the grid-connected PV system under diverse and realistic environmental scenarios.The insights gained from this scenario contribute to a more comprehensive understanding of the system's behavior in actual operational contexts.

Discussion
The simulation study of the grid-connected threephase PV system in Lahore, conducted using MATLAB/Simulink, has provided a comprehensive understanding of the system's behavior under various scenarios.This detailed discussion will delve into key aspects of the simulation results, addressing the system's performance, implications for grid integration, and the broader implications for sustainable energy solutions.

Performance Evaluation
The simulation's first case, where the grid was disconnected, demonstrated the self-sufficiency of the PV array in meeting the 5.1 kW load demand.The stability of the voltage at 300 V showcased the PV system's ability to operate autonomously, underscoring its reliability and potential for off-grid applications.The second case explored the net metering scenario with varying irradiance.The dynamic power exchange between the PV system and the grid showcased the adaptability of the system to changing environmental conditions.The negative values in the grid waveform during high irradiance periods indicated successful power export to the grid, emphasizing the potential economic benefits of net metering.In the third case, the incorporation of realistic irradiance patterns provided a nuanced understanding of the system's performance throughout the day.The accuracy of the model in capturing the fluctuating power generation under realworld conditions solidified the simulation's reliability and applicability to practical scenarios.

Grid Integration Implications
The grid-connected scenarios highlighted the dynamic interaction between the PV system and the grid.The excess power export during periods of high irradiance raises important considerations for grid stability.Future analyses should delve into the impact of such scenarios on grid parameters, including voltage and frequency stability.The net metering scenario revealed the economic implications of surplus power generation.While the PV system demonstrated its capacity to contribute excess power to the grid, future research should explore the economic viability of net metering arrangements, considering regulatory frameworks and incentives.

Limitations and Future Directions
While the model has proven its accuracy under simulated conditions, real-world validation with on-site data acquisition remains a crucial next step.Integration with actual PV system data will enhance the model's credibility and provide insights into its real-world applicability.The current simulation assumed constant temperature conditions, and future studies should explore the impact of temperature variations on PV system performance.

Conclusion
The simulation study of the grid-connected threephase PV system in Lahore using MATLAB/Simulink has yielded valuable insights into its performance under different scenarios.The accuracy of the model was verified through three distinct cases, showcasing the system's behavior when operating independently, during net metering with varying irradiance, and with realistic irradiance patterns.In the first case, where the grid was disconnected, the PV array demonstrated self-sufficiency in meeting the 5.1 kW load demand.This scenario underscored the system's capability to operate independently, showcasing its resilience and reliability.In the second case, the grid-connected scenario with varying irradiance and net metering was explored.The model effectively illustrated power dynamics, with the PV array contributing excess power to the grid during periods of high irradiance and acquiring power from the grid under reduced irradiance.This demonstrated the adaptability of the system to varying environmental conditions and the effectiveness of net metering in optimizing energy utilization.The third case incorporated realistic irradiance values, closely mimicking the day and night schedule of the site.The model accurately captured the dynamic response of the PV system under these conditions, providing a realistic representation of its performance throughout the day.

Fig. 1 .
Fig. 1.Overall structure of the installed system modelled in Simulink.

Fig. 2 .
Fig. 2. I-V and P-V curves of the PV array.
accommodate the variability in solar irradiance and ensure that the inverter operates at the maximum power point of the PV array.The specified MPPT voltage range of 90 Vdc to 450 VDC provides flexibility in supporting a diverse range of PV panel configurations.Fig.5illustrates the MPPT controller for Three-Phase Inverter.The MPPT encompasses three essential components: Phase-Locked Loop (PLL), Voltage Regulator, and Current Regulator.Together, these elements facilitate the synchronization of the inverter with the grid when connected.The PLL component plays a pivotal role in synchronizing the inverter's output with the grid frequency.It continuously monitors the grid voltage and adjusts the inverter's output phase to align with the grid.By maintaining a precise phase relationship, the PLL ensures seamless integration of the PV-generated power into the grid.PLL
Fig. 11.Power generation of PV and Grid along with Power utilized by the load during Day and Night scenario.

TABLE I :
Appliances and Their Load at Site

TABLE II :
Specifications of the Inverter solar Maximum Power Point Tracking (MPPT) controllers further optimizes the system's performance.These MPPTs