## 2 Case Study
### Used Data Set  
PV production data are collected via a Linky smart meter and are stored on a server in the cloud. These data started to be registered in April 2021 and are recorded every 30 min, i.e., 48 data sets per day. Figure 2 shows the PV production for 15 days in June. The production pattern is as expected, a null generation at night and a bell-shaped production during the day, where the maximum generation occurs at noon. Figure 2 shows two types of days; sunny days, where the production is more constant, as seen in the characteristic bell shape, and more cloudy days, where the production is more irregular and saw-toothed. July PV production data have been forecasted for all four models.  
Some meteorological data related to PV production have also been used in the development of the four models: irradiation, temperature, wind speed, and wind direction. These data have been obtained from the Meteo France weather station. The closest station to the PV installation is the one located at Birritz airport, approximately 3 km from the ESTIA1 building. The downloaded historical measured data have been recorded every hour, i.e., 24 data sets per day.  
That one of the most important matters when developing data-based models is data quality, and thus, data pre-processing, all the data have been analyzed, and various filters have been applied to the collected database. Firstly, all data--PV production and meteorological data--have been analyzed to detect and repair possible outliers by interpolation. In case of duplicate data, these have been removed, and missing point data have been repaired by interpolation. Concerning solar irradiance, as mentioned above, the station that collects these data is located at an airport, so powerful light sources that are used near the station can alter the measured values of solar irradiance, especially at night when the lights are in operation. In order to remedy this potential problem, the sunrise and sunset times have been checked to determine a night time slot in which all solar irradiance values are replaced by zero. This range for the month of July has been set between 22:00 PM and 06:30 AM. Moreover, it is worth mentioning that once the prediction is made, in the post-processing of the data, the same filter is applied.  
Figure 2: ESTIA1 PV generation for two weeks in June.  
Furthermore, since wind speed reduces the temperature of the PV cell, it has been proposed to use two different vectors representing the wind. On the one hand, the wind coming from all directions will be used. On the other hand, it has been proposed to consider only the wind that directly hits the PV panels. Figure 3 shows how the panels are oriented to the southeast, at 145\({}^{\circ}\) with respect to the north. As mentioned above, the roof on which the panels are located is slanted, so the wind coming from the back of the panels does not affect it. Therefore, by means of a weighting system, the wind coming from between 55\({}^{\circ}\) and 235\({}^{\circ}\) has been multiplied by 1, and the wind coming from the rest of the angles has been multiplied by 0. The direction-weighted wind speed has been used in the AI models.  
Finally, all data have been set with the same sampling time. It has been decided to make the predictions every 30 min. Therefore, the hourly recorded meteorological data have been interpolated to obtain data every 30 min. Furthermore, all data have been normalized between the range 0 and 1. Normalization helps in the training period of the models. Indeed, if the range of values to be used was very different, a small learning rate value would be used, increasing the training time. On the other hand, if the range of all values is the same, the model can use an appropriate learning rate for all data and therefore reduce the training time.