Photovoltaic Power Prediction Using Analytical Models and Homer-Pro: Investigation of Results Reliability

: This paper aims to develop an analytical model for the prediction of the electricity produced in a Photovoltaic Power Station (PVS). In this context, the developed mathematical model is implemented in a Simulink Model. The obtained simulation results are compared to the experimental data, the results obtained from the software Homer-Pro model, and the results given by the online PV calculator (Photovoltaic Geographical Information System), developed by the European commission. The comparison results show the reliability of the developed analytical model for speciﬁc months of the year. However, an error of 10% between simulations and experimental results is observed for July and August. This error is mainly due to the effects of humidity and dust that were not considered in the analytical model. Nevertheless, the monthly and yearly produced electricity values show the robustness of the proposed model to predict the PVS generated power. The developed model will be used as a powerful tool for data prediction and the optimization of electricity generation. This permits us to reduce the losses in power generation by optimizing the connected generating power stations to the power grid.


Introduction
The world is increasingly moving to renewable energy sources to reduce greenhouse gas emissions and combat climate change [1]. According to the International Energy Agency, Photovoltaics (PV) is expected to become the largest source of electricity in the world by the mid-century [2]. Technological advances, cost reductions, and favorable policies are driving the growth of PV, which is already competing with fossil fuels in many regions [3].
Standalone, hybrid, and grid-connected PV systems will play an important role in the transition to a sustainable environment in the future [4]. Grid-connected PV systems allow end-users of electricity, communities, and small factories to generate electrical energy from the sun. The excess is fed back into the grid. This approach can reduce reliance on fossil fuels and lower energy bills [5]. In addition, grid-connected PVS are a reliable source of electricity during grid outages, especially when storage systems are Installed to provide the required electricity.
The prediction of PV electricity permits us to minimize the energy production cost by controlling different generators connected to the power grid [6]. The forecasting of energy production and load variation represents a key solution for reducing the energy losses and improving the efficiency of power system networks [7]. Moreover, the prediction of PV-generated electricity allows operators to control other connected generating power stations, which ensure the stability and reliability of electricity supply to the end users [8].
Temperature, solar radiation, humidity, and wind speed determine PV power plant electricity forecasts. Thus, weather-based analytical models anticipate PV production electricity [9]. The developed analytical models are mainly based on programming linear equations [10]. To improve the results accuracy of analytical models, some other factors, such as azimuth angle and inclination angle, were included in analytical models [11].
With the development of Artificial Intelligence (AI), deep learning, and artificial neural networks (ANNs), new analytical models based on ANNs have been developed for the prediction of PV power [12]. Despite these new models providing more accurate data and information, the implementation requires huge amounts of data and high-speed processors to perform calculations in a short time. However, AI and ANNs have been used to optimize the cost and the location selection of PV power [13]. The obtained results are very interesting and models can be used to determine the optimized sizes and cost of PV power stations [14]. Recently, analytical models have been improved to obtain more accurate results for both sizing and power prediction. These sophisticated models combine analytical models and AI techniques [15]. Moreover, other parameters, such as reflective solar radiation, moisture, dust, and humidity, have been considered to predict the losses and the PV power output [16].
Machine Learning (ML) has proven its ability for forecasting weather and solar radiation data for short and medium time. However, more improvements are required to connect the ML models to real time sensors for predicting PV power output [17].
In the last decennia, many pieces of professional software, e.g., Homer-Pro, PV case, and Solargis, have been developed to assist with the design, optimization, and prediction of PV power output. These tools permit us to analyze renewable energy potential by providing all information related to global solar radiation, temperature, clearness index and many other factors. To optimize renewable energy systems, including PV power stations, Homer-Pro has been used to determine the optimal cost and the minimum levelized cost of energy production. Homer-Pro has been used to design wind, solar, and hybrid energy systems [18]. When using Homer, the user must first enter information such as the location of the PV power station, the different components of the power station, the orientation of the solar panels, and the anticipated weather conditions in order to predict the PV power output and the cost of the project [19]. The software then simulates the behavior of the system under various situations, such as temperature, shade, and solar irradiance changes, using a variety of algorithms and mathematical models. The Homer-Pro model also takes into account extra elements such as battery storage capacity and grid connectivity potential. The system can then be designed and operated to the best of its ability. The design of PV systems and the forecast of electricity output have both been achieved using HOMER-Pro software. It enables the modelling of hybrid energy systems that combine several renewable energy sources, including biomass, hydropower, and wind, with more traditional sources, including diesel generators [20,21]. This feature makes it easier to develop more dependable and economical systems that can function under a variety of diverse circumstances. The system performance analysis and optimization tools included in HOMER-Pro also contain sensitivity analysis and optimization algorithms, which can be used to find the most economical and effective system configurations. HOMER-Pro represents a potential tool for estimating PV power output and improving the efficiency of hybrid renewable energy systems [22].
Numerous other software tools have been created to forecast solar PV energy in addition to Homer-Pro. For instance, the Solargis software offers information and services on solar resources for researchers and engineers working in the field of solar energy [23]. Based on local temperature and solar radiation, Solargis can precisely anticipate the PV power output of solar systems. Advanced modelling approaches and the availability of high-quality data on solar resource availability enable this capability [24]. The user must first enter the location and details of the solar installation in order to anticipate the PV power output using Solargis. The behavior of the system is then simulated by Solaris using sophisticated algorithms and models, including variations in temperature, sun irradiation, and shading. A network of ground-based measurement stations and satellite imaging are used to provide the tool with historical and real-time data on solar irradiance as well as precise information about the solar resource at the installation site [25]. The precision of Solargis' data on solar resources is one of the main advantages of utilizing it to forecast PV power output. For precise projections of power output, the program uses a variety of data sources to deliver highly accurate solar irradiance and meteorological data.
This paper aims to develop and simulate an analytical model for the prediction of PVS output power. The paper's Section 2 presents the three methods proposed to predict and measure the PVS output power. The Section 3 presents the different simulation results. These results are analyzed in the Section 4. Finally, the conclusion and recommendations are shown in the Section 5 of the paper.

Materials and Methods
An analytical model was developed and implemented in Matlab-Simulink (R2012b, MathWorks Limited, London, UK) to calculate and display the produced electrical energy to predict the PV power output. In addition, the model requires temperature and solar radiation variation. To validate the model and determine its reliability, the Homer software and experimental results were compared to the obtained analytical model results. This section describes the different models developed in this paper. I is the current generated by the PV module (A). I ph is the photocurrent generated by the PV cells in the module (A). I 0 is the saturation current of the diode in the module (A). V is the voltage output of the PV module in volts (V). R s is the series resistance of the module in ohms (Ω). a is the diode ideality factor. V T represents the thermal voltage (V), which is equal to the product of the Boltzmann constant (k) and the absolute temperature (T) divided by the electron charge (q).

Analytical Model
The maximum power point (MPP) of the PV module occurs at a given voltage where the product of current and voltage is at its maximum. The MPP can be calculated using the derivative of the above equation with respect to voltage and setting it as equal to zero. The resulting equation for V mpp is given by [27]: V mpp = (aV T /qs) × ln((I ph − I mpp )/I 0 + 1) − R s × I mpp (2) where: I mpp represents the current at the MPP (A). V mpp represents the voltage at the MPP (V). Therefore, the output power of a PV power station is expressed using the following equation [28]: P = V mpp × I mpp (3) To calculate the output power of a PV panel, the following equation can be easily implemented [29]: where: P represents the output power of the PV panel in watts (W). P 0 represents the nominal output power of the PV panel at reference temperature T 0 and solar radiation G 0 , which represent the standard test conditions (STC).
α represents the temperature coefficient of the PV panel, expressed in percent per degrees Celsius (%/ • C).
T represents the temperature of the PV panel in degrees Celsius ( • C). T 0 represents the reference temperature, usually taken as 25 • C. G represents the solar radiation incident on the PV panel in watts per square meter (W/m 2 ). G 0 represents the reference solar radiation, usually taken as 1000 W/m 2 .
The parameters used to simulate the PV power station are summarized in Table 1. Temperature coefficient α 0.5%/ • C These equations were implemented in the Matlab-Simulink Model to simulate the output power of a 250 kWp PV power station. The real data of solar radiation and temperature at the site were used as input in the model. The Matlab model was refined and improved according to the steps presented in the flowchart of Figure 1. The developed model used the real data of temperature and solar radiation to calculate the output power. The obtained results were compared with the data recorded and provided by the monitoring system in the power station. The model parameters were updated to reduce the error between experimental and simulation results. The convergence characteristic was mainly based on error calculation. The convergence criterion was set to be less than 10%.

Homer-Pro Model
The Homer-Pro (3.14.2 version) software was developed to facilitate the design and the optimization of renewable energy systems [30]. Homer-Pro is a sophisticated software application for modelling and analyzing power systems. It is intended for modelling and analyzing complicated power systems such as micro grids. It has a graphical user interface that makes it simple to design and run power system models, and it includes a comprehensive variety of analysis and optimization capabilities. One of Homer-Pro's primary features is its ability to simulate both AC and DC power systems, making it especially helpful for analyzing hybrid systems that incorporate both sources of power.
This software calculates the optimal size and costs of different components used in a power system. The Homer-Pro software requires the location data, the electric load, and the initial costs and maintenance costs of the different components. In this paper, the software was used to calculate the energy generated by a 250 kWp PV station. This PV power station is located in the Dhofar region in the south of Oman. This area is characterized by its high PV potential. An arbitrary electric load was defined, and the PV power station was connected to the power grid. The model depicted in Figure 2a allowed us to calculate Sustainability 2023, 15, 8904 5 of 13 the electrical energy produced at every instant of the year. It displays the results and the variation of produced electrical energy over a complete year. Thereafter, the electrical energy produced daily, monthly, or yearly can be calculated. The simulation model requires the location of the power station, Figure 2b, the temperature, Figure 2c, and the solar radiation, Figure 2d.

Homer-Pro Model
The Homer-Pro (3.14.2 version) software was developed to facilitate the design and the optimization of renewable energy systems [30]. Homer-Pro is a sophisticated software application for modelling and analyzing power systems. It is intended for modelling and analyzing complicated power systems such as micro grids. It has a graphical user interface that makes it simple to design and run power system models, and it includes a comprehensive variety of analysis and optimization capabilities. One of Homer-Pro's primary features is its ability to simulate both AC and DC power systems, making it especially helpful for analyzing hybrid systems that incorporate both sources of power.
This software calculates the optimal size and costs of different components used in a power system. The Homer-Pro software requires the location data, the electric load, and the initial costs and maintenance costs of the different components. In this paper, the software was used to calculate the energy generated by a 250 kWp PV station. This PV power station is located in the Dhofar region in the south of Oman. This area is characterized by its high PV potential. An arbitrary electric load was defined, and the PV power station was connected to the power grid. The model depicted in Figure 2a allowed us to calculate the electrical energy produced at every instant of the year. It displays the results and the variation of produced electrical energy over a complete year. Thereafter, the electrical energy produced daily, monthly, or yearly can be calculated. The simulation model requires the location of the power station, Figure 2b, the temperature, Figure 2c, and the solar ra- To calculate the produced power using the Homer-Pro software, the following objective function was defined inside the model itself: where NPC represents the total net present cost of the project. The constraints of the optimization problem are defined by Equations (6) and (7):

Experiments
To validate the developed analytical model (Section 2.1), the obtained results were compared with the Homer-Pro results and the measured results provided by the Al-Mazyona PV power station. The PV power station is a 25 MW photovoltaic power plant that was commissioned in 2019. It is located in the Wilayat of Thumrait, which is about 700 km south of Muscat, the capital city of Oman. The power station spans an area of approximately  4.5 hectares and uses over 70,000 solar panels to generate electricity. Only the output power of a total capacity of 250 kWp was recorded and used in this paper. The PV power station includes a data storage and analysis component, which collects and stores data from various sensors and devices within the PV power station. These data can be analyzed to improve the performance of the power station and identify any issues that need to be addressed. A real diagram of the grid-connected PV power station is depicted in Figure 3. To calculate the produced power using the Homer-Pro software, the following objective function was defined inside the model itself: where NPC represents the total net present cost of the project. The constraints of the optimization problem are defined by Equations (6) and (7): P_pv ≤ P_pv_max (7)

Experiments
To validate the developed analytical model (Section 2.1), the obtained results were compared with the Homer-Pro results and the measured results provided by the Al-Mazyona PV power station. The PV power station is a 25 MW photovoltaic power plant that was commissioned in 2019. It is located in the Wilayat of Thumrait, which is about 700 km south of Muscat, the capital city of Oman. The power station spans an area of approximately 4.5 hectares and uses over 70,000 solar panels to generate electricity. Only the output power of a total capacity of 250 kWp was recorded and used in this paper. The PV power station includes a data storage and analysis component, which collects and stores data from various sensors and devices within the PV power station. These data can be analyzed to improve the performance of the power station and identify any issues that need to be addressed. A real diagram of the grid-connected PV power station is depicted When utilizing the Matlab model to estimate the output of a PV power plant in Dhofar, Oman, a dataset is critical in assessing the model's performance. The prediction dataset is made up of historical measurements of important variables such as solar irradiance, ambient temperature, and PV power output. The primary input for predicting PV power production is solar irradiation. This information, which is commonly measured in watts per square meter (W/m 2 ), is gathered from weather sensors located in the Power PV power plant. The dataset contains historical measurements of real PV power production as a function of solar irradiation and ambient temperature. These readings are derived ambient temperature, and PV power output. The primary input for predicting PV power production is solar irradiation. This information, which is commonly measured in watts per square meter (W/m 2 ), is gathered from weather sensors located in the Power PV power plant. The dataset contains historical measurements of real PV power production as a function of solar irradiation and ambient temperature. These readings are derived from on-site monitoring equipment linked to the PV power facility.

Results
The different models discussed in the previous section were implemented in Matlab-Simulink and Homer-Pro software. The obtained results are presented in this section.

Analytical Model Results
The output power of the PV power station simulated using the Matlab Model is presented in Figure 4. For the clarity of the results, only the month of January is considered in the simulation model. The PV power varied from day to day and the maximum power was reached at approximately 12.00 p.m. every day. For cloudy days, the output power decreased due to the reduced solar radiation received by the PV panels.

Homer-Pro Model Results
The Homer-Pro model permits us to simulate the PV power output for the complete year based on the variations of solar radiation, temperature, and clearness index. The obtained results using the Homer-Pro model are presented in Figures 5-7. Figure 5 shows that the maximum produced power is 250 kW.  As shown in Figure 4, the PV power varied throughout the year due to changes in solar radiation and the temperature of the solar panels. The output power of the PV power station was highest during the month of November when there are longer periods of daylight and the sun is more intense, and lowest during the summer months when there are more cloudy days and the sun is less intense. Moreover, the solar radiation used as input in the model shows reduced values during the summer months due to cloud cover and rain. The yearly produced electricity in the PV power station was around 430,100 kWh. The analytical model permits us to predict the PV power at every hour for a complete year. The PV power output presented in Figure 4 shows the that power station produced its maximum power during the month of November. The power produced during December, January, and February was higher than the power produced during the other months of the year. This can be explained by the higher solar radiation values during these months of the year.

Homer-Pro Model Results
The Homer-Pro model permits us to simulate the PV power output for the complete year based on the variations of solar radiation, temperature, and clearness index. The obtained results using the Homer-Pro model are presented in Figures 5-7. Figure 5 shows that the maximum produced power is 250 kW.

Homer-Pro Model Results
The Homer-Pro model permits us to simulate the PV power output for the complete year based on the variations of solar radiation, temperature, and clearness index. The obtained results using the Homer-Pro model are presented in Figures 5-7. Figure 5 shows that the maximum produced power is 250 kW. The monthly average variation of the PV power output is presented in Figure 6. It shows that the maximum energy was produced during the months of February, March, October, and November. During these months, the daily average production was 65 kWh, which is equivalent to 1154 kWh of produced energy daily. The annual max value of generated power was around 240 kW, whereas the daily average max of power was 200 kW during these months. The minimum produced power was found in June, July, and August. The yearly generated energy, calculated using Homer-Pro, was 444,320 kWh. Despite this, the power variation profile was similar to the developed analytical model, as shown in Figure 7. However, a difference between the calculated total energies was observed. This can be explained by the different models used by Homer and Matlab to calculate the output power. Indeed, Homer-Pro contains prepared PV panel parameters and the user cannot change them. The analytical model allows us to adjust the parameters of the PV array according to the PV panel characteristics used. Moreover, Homer-Pro uses the average solar radiation and the temperature average to predict the PV power. For the analytical model, the real data of the solar radiation variation and temperature were used as inputs for the model. The monthly average variation of the PV power output is presented in Figure 6. It shows that the maximum energy was produced during the months of February, March, October, and November. During these months, the daily average production was 65 kWh, which is equivalent to 1154 kWh of produced energy daily. The annual max value of generated power was around 240 kW, whereas the daily average max of power was 200 kW during these months. The minimum produced power was found in June, July, and August.
The yearly generated energy, calculated using Homer-Pro, was 444,320 kWh. Despite this, the power variation profile was similar to the developed analytical model, as shown in Figure 7. However, a difference between the calculated total energies was observed. This can be explained by the different models used by Homer and Matlab to calculate the output power. Indeed, Homer-Pro contains prepared PV panel parameters and the user cannot change them. The analytical model allows us to adjust the parameters of the PV array according to the PV panel characteristics used. Moreover, Homer-Pro uses the average solar radiation and the temperature average to predict the PV power. For the analytical model, the real data of the solar radiation variation and temperature were used as inputs for the model. This can be explained by the different models used by Homer and Matlab to calculate the output power. Indeed, Homer-Pro contains prepared PV panel parameters and the user cannot change them. The analytical model allows us to adjust the parameters of the PV array according to the PV panel characteristics used. Moreover, Homer-Pro uses the average solar radiation and the temperature average to predict the PV power. For the analytical model, the real data of the solar radiation variation and temperature were used as inputs for the model.

Experimental and Recorded Real Data
The data provided by the power station control center for one year is plotted as shown in Figure 7. The variation of the power shows that that minimum power was obtained for the months of February and December due to the low solar radiation received by the PV panels.

Discussion
The 250 kWp PV power was simulated using Matlab-Simulink and Homer-Pro. These two methods are based on mathematical models and simulation hypothesizes. In both methods, many factors that can affect the PV power output were neglected. Despite these approximations, the developed analytical model results are identical to the Homer-Pro results. Indeed, the Homer and Matlab models calculate the output power according to the solar radiation and temperature at the site. Table 2 presents the values of the temperature at the PV surface, the solar radiation, and the output power measured using the three different methods, for around 17 h. As the PV power station is located in an area characterized by long days which have around 10 sunny hours, the station starts producing electricity at 6.00 a.m. The produced electricity increases to reach 269 kW in the afternoon, according to Homer model results. At the same time, the maximum produced power calculated using the Matlab model is 250 W. However, the real power measured in the PV power station is only 219.18 kW. The generated power is 10.46 kW at 6.00 p.m, according to the Matlab model results. The Homer model shows a produced power of 15.22 kW, and the real generated power measured in the PV power station is 2.2 kW.
The presented results show differences in power calculation using simulation models. However, the analytical model implemented in Matlab led to accurate results when compared to the Homer Model. Indeed, the analytical model is based on the real data of solar radiation and temperature at the site. However, the Homer model calculates the PV power based on the average of solar radiation and temperature values. Table 3 summarizes the daily, monthly, and yearly calculated and measured power using the three methods. The differences observed in Table 3 are confirmed by the average and total values of generated electricity through a full year. According to the Homer model, the hourly average produced power is 49. 26 kWh. The analytical model shows an average of 48.6 kWh, whereas the real average power is 46 kWh. The total produced electricity in the complete year shows a difference of around 33 MWh between the Homer and the measured results. The difference between the analytical model and experimental results is around 20 MWh for a full year of generated power, as shown in Table 3. The percentage error between the developed models and experimental results show the reliability of the data presented by the analytical model.  To highlight the differences between the experimental and simulation results using the Homer and Matlab methods, the variation of produced power for a full week is depicted in Figure 8. It shows that the generated power using the Homer and analytical models is higher than the real produced power. For the second day, the error of calculation increases, which is attributed to some variation in solar radiation or temperature, or partial shading, which is not considered in the simulation models. Figure 9 shows the variation of power for a single day. The results prove that the analytical model presents an error less than the error obtained in the Homer model. Therefore, the developed analytical model implemented in Matlab can be used for the prediction and the sizing of PV power stations. The analytical model can be improved to obtain more accurate results. The black, red, and blue lines represent the real data, the analytical model results, and the Homer simulation results, respectively.
To highlight the differences between the experimental and simulation results using the Homer and Matlab methods, the variation of produced power for a full week is depicted in Figure 8. It shows that the generated power using the Homer and analytical models is higher than the real produced power. For the second day, the error of calculation increases, which is attributed to some variation in solar radiation or temperature, or partial shading, which is not considered in the simulation models.  Figure 9 shows the variation of power for a single day. The results prove that the analytical model presents an error less than the error obtained in the Homer model. Therefore, the developed analytical model implemented in Matlab can be used for the prediction and the sizing of PV power stations. The analytical model can be improved to obtain more accurate results. The black, red, and blue lines represent the real data, the analytical model results, and the Homer simulation results, respectively.

Conclusions
This paper has presented a comparison of the generated power of a PV power station using three methods. The first method is Homer software, the second is the analytical model simulated using Matlab, and the last method is based on experimental results and the measurement of the real power produced in the power station.
The obtained results show that the analytical model gives perfect results when compared to Homer. Indeed, the obtained results with the analytical model show a percentage relative error of 4.62% in the total yearly produced electricity. For the same conditions, the percentage relative error obtained with Homer-Pro is around 8.02%. As a result, the analytical model is a more accurate tool for estimating the power that a PV power plant will produce. While the analytical model can be a useful tool for predicting the performance of a PV power plant before it is constructed or for making modifications to existing systems, experimental results offer the most accurate depiction of the actual power production.
The accuracy of the analytical model is affected by a number of parameters, including system part shadings, wind speed, and dust. Therefore, future work must focus on further validating the analytical model by contrasting its predictions with additional experimental findings from various sites and environments. The artificial neural networks and deep learning models will be developed and implemented to simulate and predict the PV power output. On the other hand, in order to further enhance the capabilities of the model, an investigation into the quality of the power will be included. The model will take into consideration power quality metrics such as voltage stability, harmonic distortion, and frequency changes. The improved model will be able to provide a more in-depth study of the performance of the PV system. This integration of power quality analysis will give a more robust and trustworthy prediction, which will allow better understanding and management of the overall efficiency and power output quality of the PV power station. Moreover, this integration of power quality analysis will offer a more accurate and reliable forecast.

Conclusions
This paper has presented a comparison of the generated power of a PV power station using three methods. The first method is Homer software, the second is the analytical model simulated using Matlab, and the last method is based on experimental results and the measurement of the real power produced in the power station.
The obtained results show that the analytical model gives perfect results when compared to Homer. Indeed, the obtained results with the analytical model show a percentage relative error of 4.62% in the total yearly produced electricity. For the same conditions, the percentage relative error obtained with Homer-Pro is around 8.02%. As a result, the analytical model is a more accurate tool for estimating the power that a PV power plant will produce. While the analytical model can be a useful tool for predicting the performance of a PV power plant before it is constructed or for making modifications to existing systems, experimental results offer the most accurate depiction of the actual power production.
The accuracy of the analytical model is affected by a number of parameters, including system part shadings, wind speed, and dust. Therefore, future work must focus on further validating the analytical model by contrasting its predictions with additional experimental findings from various sites and environments. The artificial neural networks and deep learning models will be developed and implemented to simulate and predict the PV power output. On the other hand, in order to further enhance the capabilities of the model, an investigation into the quality of the power will be included. The model will take into consideration power quality metrics such as voltage stability, harmonic distortion, and frequency changes. The improved model will be able to provide a more in-depth study of the performance of the PV system. This integration of power quality analysis will give a more robust and trustworthy prediction, which will allow better understanding and management of the overall efficiency and power output quality of the PV power station. Moreover, this integration of power quality analysis will offer a more accurate and reliable forecast.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.

Conflicts of Interest:
The authors declare no conflict of interest.