1. Introduction
The issues related to global energy security are multiple and complex. They include the constant increase in energy demand, the prices of fossil fuels, disturbances in supply chains, and the impacts of global warming and environmental degradation. The global electricity demand is expected to continue growing at a rate of around 4% annually through 2027. This trend is attributed to the acceleration of electrification across various sectors [
1]. To achieve climatic objectives, it is essential to considerably increase the share of renewable energies from approximately 15% of the primary energy supply in 2015 to almost two-thirds by 2050 [
2]. Faced with these challenges, the use of renewable energies is essential. This makes it possible to diversify energy sources, reduce dependence on fossil fuels, improve energy security, promote sustainability, and protect the environment. Renewable energies appear to be a key option to reduce energy dependence, limit environmental pollution, and reduce the effects of climate change. Morocco has abundant resources in renewable energies, including solar, wind, and hydraulics [
3]. In 2020, Morocco inaugurated the Noor I to V solar project, recognized as one of the largest solar energy projects in the world. This complex combines photovoltaic (PV) and concentrated solar (CSP) technologies to achieve an installed capacity of 2000 MW. Its main objective is to enable the export of renewable energy to other African countries. However, despite this ambition, Morocco has not yet achieved its initial goals, with current production representing less than 50% of the planned capacity [
4].
Solar photovoltaic (PV) energy is one of the renewable energy technologies attracting the most global interest. This technology allows electricity to be generated directly from the sun. Solar photovoltaic offers several advantages; for example, it helps reduce energy conflicts and losses during electricity transmission and distribution [
5]. This dynamic explains why solar photovoltaic capacities are forecasted to double by 2028 compared to the value in 2022 [
6]. The photovoltaic solar module is one of the key elements utilized in converting solar energy into electricity. These modules can directly convert sunlight into electricity. The photovoltaic modules are installed at a fixed angle designed to maximize exposure to sunlight. However, this angle, as well as the optimal orientation, varies between locations due to the rotation of the Earth. Therefore, it is crucial to determine the ideal tilt angle and position for each area to optimize electricity production [
7].
Soft computing techniques and various photovoltaic modeling approaches, covering multiple applications, are used to estimate and validate electrical energy production. These approaches fall into three broad categories: physical calculations, statistical methods, and software tools [
8,
9]. Physical methods rely on analytical models and mainly use meteorological parameters for their calculations [
10]. In contrast, statistical approaches exploit historical data to determine the electrical parameters of photovoltaic systems while seeking to minimize errors in the estimations [
11]. The soft computing method is based on numerical simulations applied to a specific dataset. Among the available artificial intelligence (AI) tools, artificial neural network (ANN) algorithms are recognized as an effective approach to predict and validate the electrical energy production of photovoltaic modules [
12]. Backpropagation (BP) algorithms (ANN) include several methods, but the most commonly used and recognized for their efficiency are Levenberg–Marquardt optimization (LM), Bayesian regularization (BR), resilient propagation (RP), and scaled conjugate gradient (SCG) [
13].
Furthermore, many studies in the literature have explored the application of artificial neural networks (ANN) to evaluate the electrical performance of different photovoltaic modules. For example, the prediction of the energy production of a monocrystalline photovoltaic module, using an artificial neural network (ANN) and a time series analysis, has highlighted that weather conditions significantly influence the performance and quality of the final production [
14]. To predict solar energy yield in the Ha’il region of Saudi Arabia, Lioua Kolsi et al. [
15] conducted a study to examine various artificial intelligence (AI) models. These models were compared with several benchmark models for intuitive predictions found in the literature. Also, Jarimi et al. [
16] developed and tested an artificial neural network model (RNA) to predict the performance of a double-fluid photovoltaic/thermal sensor using water and air as work fluids.
Bifacial solar modules, as a complement to traditional monofacial photovoltaic technology, occupy an important place in sustainable development initiatives. They are distinguished by their increased efficiency and their ability to provide higher energy yield [
17]. Bifacial solar panels can capture sunlight on both their front and back sides, exploiting the light reflected by the ground and surrounding surfaces. By installing them at a height of about 1 m above the ground and increasing the surface reflectivity (albedo) to 0.5, their energy efficiency is higher than that of monofacial photovoltaic modules. Under these conditions, energy production can be improved by up to 30% compared to monofacial panels [
18].
The literature includes studies that examine the use of bifacial modules in the field of photovoltaics. Thus, Emad M. Ahmed et al. [
19] propose a new model for bifacial photovoltaic (BPV) modules based on monofacial module (MPV) modeling, adding a parameter to adjust the series resistance. The LSHADE method, an improved version of the adaptive differential evolution algorithm, is applied to determine the BPV model parameters, thus providing accurate modeling over the entire operating range. Polo et al. 2024 [
20] also proposed a simple method to create an irradiance sensor from a bifacial module by analyzing the performance and variability of the backside irradiance of a bifacial PV system, the results highlight the effectiveness of bifacial reference modules for monitoring irradiance in advanced PV configurations. Ganesan et al. 2024 [
21] presented an upside-down installation method proposed to compensate for power losses of bifacial photovoltaic modules (BPVM), since the latter undergo defects such as rupture of glass or dust accumulation, reducing their performance and reliability. Hariharasudhan et al. [
22] conducted a study comparing the performance of bifacial photovoltaic modules (BPVM) and polycrystalline modules (PPVM) under various partial shading conditions and experiments with 320 W (PPVM) and 395 W (BPVM) modules. The results showed that BPVMs suffer an average of 26% lower losses compared to PPVM due to frontal partial shading, highlighting their advantages in these situations.
Artificial neural networks can also be used in research studies on bifacial solar PV systems. For example, Ghenai et al. [
23] used artificial neural networks to evaluate the performance of bifacial solar photovoltaic (BPV) systems installed on flat roofs with controlled albedo and developed predictive models to anticipate energy production. Singh, Mistry, & Patel [
24] in their study explore the integration of bifacial photovoltaic modules in meshed distribution networks, combined with the use of artificial neural networks and other machine learning techniques to optimize energy efficiency. Neural networks are used to predict global horizontal irradiance (GHI) and maximize module efficiency. Rodrigo et al. [
25] proposed an analytical model for multi-row bifacial PV plants, validated against bifacial radiance and DUET version 3 ray tracing software. The results of these simulations were used to train artificial neural networks, allowing a fast and simplified execution of the model with a slight loss of accuracy. This combination of bifacial and neural networks offers powerful tools to optimize the configurations of large bifacial plants, improving their energy and economic efficiency.
In this paper, artificial intelligence (ANN) approaches are used to develop two distinct artificial neural network (ANN) models with variations in the tilt angles of the bifacial panels used. MATLAB toolbox is used to predict the average daily photovoltaic power output generated by the bifacial modules using Levenberg Marquardt optimization (LM). The study uses the latitude of Ouarzazate and Oujda cities, in Morocco, to assess the performance of artificial neural networks (ANN) in the prediction of photovoltaic power.
The novel originality of this study is based on the use of ANN models to optimize photovoltaic energy forecast. These models effectively provide more accurate predictions of solar power generation, outperforming traditional methods in accuracy. The integration of variable tilt angles into prediction models aims to optimize the orientation of solar panels to maximize energy production, even under changing environmental conditions. This study analyzes the impact of these angle variations on photovoltaic production, providing valuable insights for improving the efficiency of solar systems. Furthermore, the comparison of the predictions with the latitude of two cities in Morocco, Ouarzazate and Oujda, allows us to evaluate the performance and accuracy of the ANN algorithm. This study evaluates the ability of ANN models to adapt to various input conditions through the analysis of multiple datasets. It highlights the interaction between bifacial modules, tilt angles, geographical location, and neural network modeling, contributing to more accurate photovoltaic energy predictions.
The study proposes an integrated framework to analyze the feasibility, operation, and sustainability of artificial neural networks for forecasting bifacial photovoltaic systems, thereby improving the efficiency of solar systems in various climatic conditions.
2. Methodology
This study consists of two parts. The first is based on the calculation of the annual average daily photovoltaic power of a 20 kWac solar photovoltaic power plant using the SAM software [
26] of the National Renewable Energy Laboratory (NREL), version 2023.12.17, for the two Moroccan cities of Ouarzazate and Oujda, varying the tilt angle from 0° to 90°. SAM (System Advisor Model) is a powerful software package used to design and analyze renewable energy systems, such as solar power plants. It offers users the possibility of simulating the energy generation of a photovoltaic plant, taking into account various elements such as location, system size, and weather conditions. SAM software is widely recognized in the literature for diverse applications. The typical meteorological data for the simulation were obtained from the Photovoltaic Geographical Information System (PVGIS) database [
27]. Several studies have demonstrated the performance of PVGIS to produce meteorological information in several domains and for different regions, and it has been widely used in the literature [
28,
29,
30].
PVsyst is an excellent tool for simulating the performance of solar energy systems, providing free access to global databases of meteorological data to calculate the expected energy production of a solar system for different locations and periods.
The second part of the work exploits artificial neural networks, implemented via MATLAB software using photovoltaic power values calculated with SAM software, to predict the average daily annual photovoltaic power of a 20 kWac solar photovoltaic power plant based on different tilt angles in the two Moroccan cities of Ouarzazate and Oujda, which have good solar energy potential.
2.1. Site Selection and Metrological Data
Ouarzazate and Oujda are the two cities selected for this study. In Ouarzazate, there is a site with four large-scale solar power plant, the Noor Ouarzazate Solar Complex.
In Ouarzazate and Oujda, sunshine plays a crucial role in the development of photovoltaic production in Morocco, and they also have good solar energy potential.
Table 1 shows the selected geographic locations, along with their latitude, longitude, and altitude.
Meteorological data from the two cities were utilized to analyze the influence of environmental conditions on solar photovoltaic energy production. The SAM software uses this data to forecast the system’s annual electricity production over time. To calculate the average daily photovoltaic power for the two cities, typical meteorological year (TMY) data from 2005 to 2020 were used. For analysis purposes, a solar photovoltaic power plant of 20 kWac and 26 kWp (DC input of 1.3) was defined. Bifacial photovoltaic modules were selected with a peak power of 550 W, an efficiency of 21.85%, and a bifaciality factor of 0.7. They are positioned at angles of inclination ranging from 0° to 90°. This system design uses inverters with a capacity of 3.6 kW each, and
Table 2 shows the main technical parameters used in the meteorological model.
2.2. ANN for Predicting PV Output for This Study
The artificial neural network is capable, like a learning human, of acquiring knowledge from examples, models, and functional relationships between data, which makes it suitable for making predictions in various fields [
31].
In this research, MLP artificial neural networks are used to process and analyze large datasets for predictive purposes. MLP ANNs feature an architecture with one or more hidden layers between the input and output layers [
32].
This section briefly introduces the research site and locality, PV system design, installation and configuration, and the system variables noted.
This study employs artificial neural networks (ANNs) by designing and implementing two ANN models using MATLAB toolbox software to predict the average daily power output produced by bifacial photovoltaic modules.
The architectures of the artificial neural network (ANN) models utilized in this study for the two cities are outlined as follows:
Each model consists of three types of layers: the input layer, the hidden layers, and the output layer. In this study, the input layer consists of seven categories of training data, including days, latitude (L), longitude (l), plant power (P), module power (Pm), inverter power (Po), and tilt angle (β) as inputs [
33].
Consequently, the first model comprises four hidden layers, while the second model consists of five hidden layers. Each hidden layer in both ANN models contains 13 neurons, and the output layer features a single neuron that represents the predicted daily photovoltaic power (Pp).
In this study, a dataset comprising 3340 entries was employed to train two artificial neural network (ANN) models. The data were divided into three sets, according to specific proportions, to enable the training, validation, and testing of these two models. The breakdown was as follows:
Training set: 70% of the data, amounting to 2338 samples, was utilized to train the ANN models, enabling the model to learn and adjust its parameters to enhance its predictive performance.
Validation set: 15% of the data, or 501 samples, were used to validate both models during training. These data are essential for assessing model performance.
Test set: the remaining 15%, which consists of 501 data samples, has been designated for testing the model following the training process. This data is employed to assess the model’s final performance, particularly its ability to generalize to new, unseen data that was not part of the training set.
This approach ensures that the model not only performs well on training data, but is also capable of making accurate predictions on new data.
2.3. Statistical Indicators
Three statistical indicators were employed in this study to assess the performance of the proposed forecasting models, which can be expressed mathematically as follows:
The first metric is the mean absolute error (MAE) [
31]:
The second metric is the root mean squared error (RMSE) [
34]:
The third indicator is the coefficient of determination (R
2) [
31]:
where
and
are the ith calculated and predicted power of PV module, while n is the number of observations, and
is the average of
.
3. Results and Discussion
3.1. Average Daily Photovoltaic Production
Electricity productivity is strongly impacted and disrupted on difficult days. On the other hand, during favorable days, electricity production remains stable, with a slight increase observed in winter during the midday hours. In summer, production, on the other hand, extends over sunnier periods.
Figure 1,
Figure 2 and
Figure 3 show the average daily photovoltaic power of Ouarzazate city, and
Figure 4,
Figure 5 and
Figure 6 show the average daily photovoltaic power of the town of Oujda for different tilt angles with bifacial panels for the PV power plant of this study during the year. According to these graphs, photovoltaic energy production is mainly influenced by the variations in tilt angles.
Figure 1 and
Figure 4 illustrate the average daily photovoltaic powers calculated (Pc) by the SAM software, while
Figure 2 and
Figure 5 present the average daily photovoltaic powers predicted (Pp) by an artificial neural network (ANN) with four hidden layers, with 13 neurons in each. Additionally,
Figure 3 and
Figure 6 show the average daily photovoltaic power predicted by a neural network with five hidden layers with 13 neurons in each layer.
The curves in
Figure 1,
Figure 2 and
Figure 3 are almost identical. This indicates that the average daily photovoltaic power Pc, Pp for ANN with four hidden layers and Pp for ANN with five hidden layers values for each day are similar when the tilt angle is the same. Similarly, the curves in
Figure 4,
Figure 5 and
Figure 6 show a high similarity, suggesting that the values of average daily photovoltaic power Pc, Pp for ANN with four hidden layers, and Pp for ANN with five hidden layers are comparable from day to day when the tilt angle remains constant.
According to the curves in
Figure 2 and
Figure 3, the average daily photovoltaic power for Ouarzazate reaches a minimum value at a tilt angle of 90° for days 57, 264, and 327, while it is maximum at a tilt angle of 0° for days 159, 160, and 169. Moreover, the curves in
Figure 2 and
Figure 3, representing the Pp predicted by the two artificial neural network models, are consistent with those in
Figure 1, which shows the Pc calculated with SAM.
For Oujda, according to the curves in
Figure 5 and
Figure 6, the average daily photovoltaic power reaches a minimum value at a tilt angle of 90° for days 1, 25, and 327, while it reaches its maximum value at a tilt angle of 0° for days 160, 163 and 166. In addition, the curves in
Figure 5 and
Figure 6, which illustrate the photovoltaic power predicted by the two artificial neural network models align with those in
Figure 4, representing the calculated power Pc with SAM.
3.2. Comparison of the Results Calculated by SAM with the Predictions of the Two ANN Models
A comparison of the average daily photovoltaic power calculated by SAM software and that predicted by two artificial neural network (ANN) models, one with four hidden layers and the other with five hidden layers, was made over one year. This study was conducted in May, and the following two tilt angles were chosen for this analysis: 30° and 80°.
Figure 7a,b for the city of Ouarzazate and
Figure 8a,b for the town of Oujda illustrate that, for both 30° and 80° tilt angles, the Pc curve calculated by SAM and the Pp curve predicted by the five-hidden-layer neural network are almost symmetrical. Therefore, the values of Pc and Pp for the five-hidden-layer models are very close.
However,
Figure 7a,b or
Figure 8a,b reveal that the Pp curve predicted by the four hidden-layer-network is not symmetrical concerning the Pc curve calculated by SAM software. According to
Figure 7a, for a tilt angle of 30°, the difference between Pc and Pp is particularly conspicuous on 4, 11 and 19 May for Ouarzazate, with a power Pc of 3548.33 kWh, 6945.50 kWh, and 6442.36 kWh, while the Pp power is 3994.078 kWh, 6324.84 kWh, and 6967.73 kWh for these days. Conversely, according to
Figure 8a for the city of Oujda, this difference is particularly marked on 7, 15, and 28 May. Indeed, Pc power reaches 6131.71 kWh, 6819.14 kWh, and 5952.97 kWh, respectively, while the corresponding Pp power amounts to 5834.20 kWh, 6519.68 kWh, and 5657.76 kWh.
For tilt angle 80°, the difference between Pc and Pp is remarkable for Ouarzazate on days 6, 10, and 27 May, with a Pc power of 2894.53 kWh, 2398.41 kWh, and 2386.26 kWh, while the Pp power is 2505.14 kWh, 2819.61 kWh, and 2771.74 kWh for these days. For the city of Oujda, the difference between Pc and Pp is remarkable on 15, 16, and 18 May, with Pc of 3000.027 kWh, 2967.16 kWh, and 2434.12 kWh and Pp of 2827.39 kWh, 2771.16 kWh and 2579.67 kWh, respectively.
3.3. Tilt Angle for Which Pc and Pp Are Highest
3.3.1. Tilt Angles Associated with the Maximum Powers Obtained by the Four-Hidden-Layer ANN Model
The optimal tilt angles β for which the average calculated (Pc) and predicted (Pp) daily photovoltaic powers reached their maximum levels are shown in
Figure 9 for the city of Ouarzazate and in
Figure 10 for the town of Oujda for the month of March using artificial neural network prediction with four hidden layers. The values of the calculated (Pc, max), and predicted (Pp, max) maximum average daily photovoltaic powers are shown in
Table 3 for the two cities. Each value of Pc, max, and Pp, max represents the maximum value for a specific tilt angle.
Figure 9 and
Table 3 indicate that the Pc, max reaches its peak values on 3, 26, 29, and 30 March, for different tilt angles for Ouarzazate.
On 3 March, the Pc, max reaches 6858.98 kWh at a tilt angle of 40°, and on 26 March, the value of Pc, max reached 6954.89 kWh at a tilt angle of 30°, while on 29 March, the Pc, max reaches 6964.32 kWh for 30° tilt angle, and finally, on 30 March, the maximum value of Pc is 6932.69 for a tilt angle of 20°.
In Ouarzazate, the maximum predicted power values (Pp, max) were recorded at various dates and tilt angles during March. On 3 March, a 50° tilt angle yielded a power Pp, max of 6750.25 kWh. On 26 and 29 March, with a 30° tilt angle, the maximum power outputs Pp, max were 6871.21 kWh and 6869.65 kWh, respectively. Finally, on 30 March, a 20° tilt angle resulted in the highest recorded Pp, max value, 6891.86 kWh.
According to
Figure 10 and
Table 3 for the city of Oujda, the days of 11, 14, 15, and 16 March present the highest values of the maximum average daily photovoltaic power obtained at the same tilt angle of 40° for these 4 days, with Pc, max reaching 6710.01 kWh on 11 March. On 14 March, the maximum value of Pc amounts to 6688.38 kWh. On the 15 March, the maximum power of Pc reaches 6773.42 kWh at 40°, and finally, on 16 March, the maximum value of Pc is 6747.50 kWh for a tilt angle of 40°.
The maximum values of the predicted daily average photovoltaic power were recorded with a tilt angle of 40° on 11 and 16 March, reaching 6632.63 kWh, and 6656.70 kWh, respectively. Furthermore, on 14 March, with a tilt angle of 30° allowed a maximum power of 6592.34 kWh to be obtained.
3.3.2. Tilt Angles Associated with the Maximum Powers Obtained by the Five-Hidden-Layer ANN Model
Figure 11 and
Figure 12 present the calculated and predicted daily average photovoltaic power, which reached their maximum values on 3, 26, 29, and 30 March for Ouarzazate, and on 11, 14, 15, and 16 March for Oujda, respectively.
Table 4 presents the highest values of the maximum average daily photovoltaic power calculated Pc, max and predicted Pp, max obtained at different tilt angles with five hidden layers for Ouarzazate and Oujda.
According to
Table 4, in Ouarzazate, Pc, max reaches 6858.98 kWh, and Pp, max reached 6862.71 on 3 March at a tilt angle 40°. On the 26 March, Pc, max amounts to 6954.89 kWh and Pp, max amounts to 6958.46 for a tilt angle of 30°. On 29 March, Pc, max reached 6964.32 kWh, and Pp, max reaches 6967.28, also at 30° tilt angle, and finally, on 30 March, the maximum power Pc, max is 6932.69 kWh, and the maximum power Pp, max is 6937.76 for a tilt angle of 20°.
According to
Table 4, in Oujda, the calculated (Pc) and predicted (Pp) average daily photovoltaic powers reached their maximum values with a tilt angle of 40°. On 11 March, the Pc, max was 6710.01 kWh, while the Pp, max was 6715.94 kWh. On 14 March, the maximum powers reached 6688.38 kWh for Pc and 6694.93 kWh for Pp, respectively. On 15 March, Pc, max stood at 6773.42 kWh and Pp, max at 6780.63 kWh. Finally, on 16 March, the maximum values were 6747.50 kWh for Pc and 6753.52 kWh for Pp.
According to
Figure 2,
Figure 3,
Figure 4,
Figure 5,
Figure 6,
Figure 7,
Figure 8,
Figure 9,
Figure 10,
Figure 11,
Figure 12 and
Figure 13, for the two cities Ouarzazate and Oujda, the results of the ANN model, which has five hidden layers, show that the predicted values of the average daily photovoltaic power are very close to the maximum values calculated by SAM software, unlike the results obtained by the ANN model with four hidden layers. The president’s curves confirm these results.
Table 5 and
Table 6 present the results of the different performance indicators for the two neural network models. These indicators allow us to identify the best-performing model. In both models, values of R
2 greater than 0.98 indicate an excellent correspondence between the values calculated and those predicted. According to
Table 5 and
Table 6, the first ANN model, which has four hidden layers, has a value of R
2 equal to 0.98741 for Ouarzazate and equal to 0.99680 kWh for Oujda, an RMSE of 36.56 kWh for Ouarzazate and 87,01 kWh for Oujda, and an MAE value of 6.28 kWh for Ouarzazate and 0.71 kWh for Oujda.
On the other hand, the second ANN model, with five hidden layers, displays an R2 of 0.99989, an RMSE of 3.49 kWh, and an MAE of 3.43 kWh for Ouarzazate and an R2 equal to 0.99997 kWh, an RMSE of 8.07 kWh, and an MAE of 7,13 kWh for Oujda.
The five-hidden-layer ANN model (13;13;13;13;13) is considered more efficient than the four layer model for several reasons:
It exhibits R2 values very close to 1, indicating a near-perfect ability to predict photovoltaic power data in both cities.
It displays very low errors in terms of RMSE and MAE, especially for Ouarzazate.
The scientific argument behind this observation is that increasing model complexity, which is to say adding hidden layers to a neural network, improves prediction accuracy in the context of modeling average daily photovoltaic power generation. And in theory, a model with more hidden layers is better able to capture complex relationships in the data. Thus, the five-layer model, with its deeper architecture, is more accurate and efficient than the four-layer model.
3.4. Prediction of Daily Photovoltaic Power for the Latitude of Ouarzazate and Oujda
Once the configuration of the ANN architectures is established, we proceed to evaluate the performance of these models in order to identify the one that offers the best prediction. This analysis is based on the comparison between the data calculated by SAM software and those predicted by the two ANN models.
This assessment should be conducted using new data that the models has not encountered or utilized previously. Specifically, this refers to the data calculated for December for the two cities of Ouarzazate and Oujda and for a new tilt angle of 30.93° for Ouarzazate and 34.69° for Oujda, these two tilt angles corresponding to the latitudes of these two cities.
The month of December and the tilt angles are new variables different from those used as input variables during the training phase.
To evaluate the optimal ANN model identified during validation, we used the average daily PV power calculated (Pc) for the tilt angle of 30.93° for Ouarzazate and 34.69° for Oujda using the SAM software. Afterwards, the predicted average daily photovoltaic power (Pp) was estimated from the ANN models using MATLAB software, in order to identify the best-performing artificial neural network (ANN) model, i.e., the one whose Pp values are closest to the Pc values calculated by the SAM software.
Figure 13,
Figure 14,
Figure 15 and
Figure 16 compare the average photovoltaic power curves predicted by the four- and five-hidden-layer artificial neural network models (13;13;13;13), developed using MATLAB software, with the average photovoltaic power curves calculated using SAM software for December, at the tilt angles of 30.93° for Ouarzazate and 34.69° for Oujda.
For the city of Ouarzazate:
Figure 13 highlights a significant difference between the power values for Pc and Pp observed on 3, 8, 9, 12, 13, and 23 December, revealing a notable gap between the two curves on these dates. According to
Table 7 and for the four-hidden-layer neural network model, the power values are as follows: on 3 December, Pc is 3922.026 kWh, Pp is 3297.002 kWh, on 8 December, Pc is 5924.097 kWh, Pp is 5485.949 kWh, on 9 December, Pc is 5874.153 kWh, Pp is 5643.023 kWh, on 12 December, Pc is 5998.049 kWh, Pp is 6003.103 kWh, on 13 December, Pc is 5883.187 kWh, Pp is 5929.474 kWh and on 23 December, Pc is equal to 5830.172 kWh and Pp is equal to 5629.418 kWh. As shown in
Figure 13 and
Table 7, there is a significant discrepancy between the Pc values calculated by the SAM software and the Pp predictions provided by the four-hidden-layer neural network model (13;13;13;13). For the case of a neural network model with five hidden layers (13;13;13;13;13),
Figure 14 presents a comparison of the predicted daily photovoltaic power curve for December and the tilt angle of 30.93°, with the daily photovoltaic power curve calculated by SAM.
Figure 14 highlights symmetry between the average daily photovoltaic power curve predicted by the ANN model and that calculated by the SAM software. Furthermore, as shown in
Table 7, the Pc values obtained by SAM and those of Pp predicted by the five-hidden-layer ANN model (13;13;13;13;13) are very close for all days in December, with minimal differences between the values.
Figure 13.
Comparison between the Pc and Pp values for the latitude of the city of Ouarzazate 30.93° for the neuron network model with four hidden layers (13;13;13;13).
Figure 13.
Comparison between the Pc and Pp values for the latitude of the city of Ouarzazate 30.93° for the neuron network model with four hidden layers (13;13;13;13).
Figure 14.
Comparison between the Pc and Pp values for the latitude of the city of Ouarzazate 30.93° for the neuron network model with five hidden layers (13;13;13;13;13).
Figure 14.
Comparison between the Pc and Pp values for the latitude of the city of Ouarzazate 30.93° for the neuron network model with five hidden layers (13;13;13;13;13).
Table 7.
Average daily photovoltaic power calculated and predicted for the latitude of 30.93° in Ouarzazate and 34.69° in Oujda.
Table 7.
Average daily photovoltaic power calculated and predicted for the latitude of 30.93° in Ouarzazate and 34.69° in Oujda.
Day | Pc (kWh) | Pp (kWh) with 4 Hidden Layers | Pp (kWh) with 5 Hidden Layers |
---|
Ouarzazate | | | |
3 December | 3922.026 | 3297.002 | 3797.624 |
8 December | 5924.097 | 5485.949 | 5885.148 |
9 December | 5874.153 | 5643.023 | 5763.130 |
12 December 13 December | 5998.049 5883.187 | 6003.103 5929.474 | 5893.947 5769.713 |
23 December | 5830.172 | 5629.418 | 5729.754 |
Oujda | | | |
4 December | 5669.099 | 5593.316 | 5625.316 |
5 December | 5654.236 | 5543.354 | 5598.354 |
6 December | 5767.942 | 5571.130 | 5701.130 |
16 December | 1934.259 | 1597.884 | 2037.884 |
21 December | 2656.067 | 2917.462 | 2547.462 |
27 December | 5638.514 | 5954.561 | 5554.561 |
For the city of Oujda:
In
Figure 15, discrepancies in the power values Pc and Pp are noted during the days 4, 5, 6, 16, 21, and 27 December between these two curves. According to
Table 7 for the four-hidden-layer neural network model, the calculated (Pc) and predicted (Pp) power for December are as follows: on 4 December, Pc is 5669.099 kWh, while Pp reaches 5293.316 kWh. On 5 December, Pc was 5654.236 kWh and Pp 5543.354 kWh. On 6 December, Pc reached 5767.942 kWh, compared to 5571.130 kWh for Pp. On 16 December, Pc was 1934.259 kWh and Pp 1597.884 kWh. On December 21, Pc reached 2656.067 kWh and Pp 2917.462 kWh. Finally, on December 27, Pc was 5638.514 kWh and Pp 5954.561 kWh.
As shown in
Figure 15 and explained in
Table 7, there is a significant difference between the results of Pc calculated by SAM software and the Pp predictions made by the artificial neural network model with four hidden layers (13;13;13;13) using MATLAB software.
Figure 16 shows a comparison between the daily photovoltaic power curve predicted by the five-hidden-layer neural network model for December at a tilt angle of 34.69° and the curve calculated by the SAM software.
Figure 16 highlights a strong symmetry between the average daily photovoltaic power curve predicted by the neuron network with five hidden layers and the average daily photovoltaic power curve calculated by SAM software, as
Table 7 shows that the values of photovoltaic Pc obtained by SAM software and the production values Pp predicted by the neural network model with five hidden layers (13;13;13;13;13) using MATLAB software are almost identical for the same days of December.
Figure 15.
Comparison between the Pc and Pp values for the latitude of the city of Oujda 34.69° for the neuron network model with four hidden layers (13;13;13;13).
Figure 15.
Comparison between the Pc and Pp values for the latitude of the city of Oujda 34.69° for the neuron network model with four hidden layers (13;13;13;13).
Figure 16.
Comparison between the Pc and Pp values for the latitude of the city of Oujda 34.69° for the neuron network model with five hidden layers (13;13;13;13;13).
Figure 16.
Comparison between the Pc and Pp values for the latitude of the city of Oujda 34.69° for the neuron network model with five hidden layers (13;13;13;13;13).
Table 8 and
Table 9 present the results of different statistical indicators values for the four-hidden-layer neural network model and the five-hidden-layer model, which predict the average daily photovoltaic power at the tilt angles of 30.93° for the city of Ouarzazate and 34.69° in the town of Oujda. The most effective model is determined by utilizing the optimal results from the statistical indicators.
As shown in
Table 8 and
Table 9, the first ANN model, which has four hidden layers, achieves an R
2 value of 0.92450, an RMSE of 329.27 kWh, and an MAE of 64.37 kWh for Ouarzazate, and for Oujda, R
2 is equal to 0.97854, RMSE is equal to 267.59 kWh, and MAE is equal to 24.43 kWh. In contrast, the second ANN model with five hidden layers demonstrates significantly improved performance, with an R
2 of 0.99354, an RMSE of 96.28 kWh, and an MAE of 74.55 kWh for Ouarzazate, and R
2 values equal to 0.99836, RMSE equal to 74.08 kWh and MAE equal to 18.85 kWh for Oujda.
Thus, based on the results presented in
Figure 14 and
Figure 16, as well as in
Table 8 and
Table 9, we can conclude that the five-hidden-layer neural network model (13;13;13;13;13) is more accurate than the four-hidden-layer model (13;13;13;13). Indeed, the five-hidden-layer model provided better performance for predicting average photovoltaic power at tilt angles of 30.93° for Ouarzazate and 34.69° for Oujda, making it the most effective model for estimating this power.
3.5. Comparison with the Relevant Models
To validate the models’ results,
Table 10 presents examples of neural network techniques applied in different studies for modeling or forecasting photovoltaic energy and solar radiation during the 2014–2025 period.
The results of the articles presented in
Table 10 indicate that, in general, the MLP (multilayer perceptron) technique is the most frequently used.
Table 10 allows the comparison of forecasting accuracy using indicators such as MAE, RMSE, and the coefficient of determination (R
2), allowing for the evaluation of the proposed models’ performance.
According to the studies presented in
Table 10, the highest reported performance of R
2, which equals 1.00, was observed for the year 2024 in reference [
35]. In our research, we identified R
2 values ranging from 0.9245 to 0.9999. All these R
2 values are notably close to 1, as highlighted in the scientific literature. A coefficient of determination (R
2) equal to 1 is often considered an indicator of excellent performance for forecasting models that use neural networks, meaning there is no difference between the values predicted by the model and the actual values.
Table 10.
Comparison of production precision results from various research articles to the current study.
Table 10.
Comparison of production precision results from various research articles to the current study.
Authors/Reference | Year | Location | Network Type | Model |
---|
Ma et al. [36] | 2014 | China | MLP-Max | R2: 0.998 |
MLP-Min. | R2: 0.992 |
Graditi et al. [37] | 2016 | Italy | MLP | R2: 0.978 |
Pamain et al. [38] | 2022 | Tanzania | MLP-LM: a-Si | R2: 0.9922 |
MLP-LM: CIGS | R2: 0.9943 |
Abdullah et al. [39] | 2024 | India | MLP-1 | R2: 0.9377 |
MLP-2 | R2: 0.962 |
Iheanetu et al. [35] | 2024 | Afrique du Sud | MLPNN-Max | R2: 0.92 |
MLPNN-Min | R2: 1.00 |
Current study | 2025 | Morocco | MLP-Max | R2: 0.9245 |
MLP-Min | R2: 0.9999 |
4. Conclusions
In this study, artificial intelligence was used to develop two artificial neural network (ANN) models to predict the average daily photovoltaic production of a 20 kW solar power plant located in the Moroccan cities of Ouarzazate (latitude: 30.93°) and Oujda (latitude: 34.69°). The photovoltaic power predictions generated by the MATLAB toolbox were then compared with the outputs calculated by the SAM software, which calculated the production of 550 W bifacial modules while considering variations in tilt angles. Both artificial neural network (ANN) models utilize the Levenberg–Marquardt backpropagation algorithm for training. The first model contains four hidden layers, and the second has five hidden layers, each consisting of 13 neurons.
The performance of the neural network models was evaluated using the following three statistical indicators: coefficient of determination (R2), root mean square error (RMSE), and mean absolute error (MAE). For the city of Ouarzazate, the four-hidden-layer model achieved an R2 of 0.92450, an RMSE of 329.27 kWh, and an MAE of 64.37 kWh, while the five-hidden-layer model achieved an R2 of 0.99354, an RMSE of 96.28 kWh, and an MAE of 74.55 kWh. For the city of Oujda, the four-layer model achieved an R2 of 0.97854, an RMSE of 267.59 kWh, and an MAE of 24.43 kWh. As for the five-hidden-layer model, it achieved an R2 of 0.99836, an RMSE of 74.08 kWh, and an MAE of 18.85 kWh.
These results demonstrate that the five-hidden-layer model offers more accurate prediction capabilities, particularly for the city of Oujda, with R2 values very close to 1, reflecting an excellent correlation between the predicted and actual values. Results in the scientific literature support this assertion: an R2 value of 1 is typically regarded as evidence that a neural-network-based predicting model achieves a flawless correlation between its predicted values and the actual outcomes.
In conclusion, the five-hidden-layer artificial neural network model developed in this study exhibited performance and accuracy on par with similar models reported in the literature. It also showed strong capability in accurately predicting the average daily photovoltaic power output. Consequently, this study offers a dependable approach for forecasting daily energy production from bifacial photovoltaic systems using neural networks. This contribution aids in enhancing the integration of renewable energy sources and promotes greater sustainability in energy management.
Future work will focus on evaluating prediction models developed in several Moroccan cities, aiming to estimate photovoltaic energy production on an hourly and minute scale using two types of photovoltaic panels: monofacial modules and bifacial modules. In addition, the analysis will incorporate various meteorological variables, thus allowing for the refinement of forecasts and improving the accuracy of the results.