Use of Optimised LSTM Neural Networks Pre-Trained With Synthetic Data to Estimate PV Generation

Optimising the use of the photovoltaic (PV) energy is essential to reduce fossil fuel emissions by increasing the use of solar power generation. In recent years, research has focused on physical simulations or artifical intelligence models attempting to increase the accuracy of PV generation predictions. The use of simulated data as pre-training for deep learning models has increased in different fields. The reasons are the higher efficiency in the subsequent training with real data and the possibility of not having real data available. This work presents a methodology, based on an deep learning model optimised with specific techniques and pre-trained with synthetic data, to estimate the generation of a PV system. A case study of a photovoltaic installation with 296 PV panels located in northwest Spain is presented. The results show that the model with proper pre-training trains six to seven times faster than a model without pre-training and three to four times faster than a model pre-trained with non-accurate simulated data. In terms of accuracy and considering a homogeneous training process, all models obtained average relative errors around 12%, except the model with incorrect pre-training which performs worse.


I. Introduction
N owadays, the demand for electric power is growing significantly and the mayor issue is to reduce fossil fuel emissions and thus control global warning [1].Transport and electricity generation have accounted for 60% of all energy produced in the last few years [2].In this way, the European Commission has defined new targets for 2030 which include reducing the CO 2 emissions by 40% with respect to 1990 levels [3].Meeting this target requires reducing the electricity demands and/or increasing the use of renewable energies [4].
Among the renewable energies, solar power generation has proven to be a serious option as a result of its great availability and low production cost [5].This type of renewable energy generation has two main sources: thermal and photovoltaic (PV).In recent years, solar PV production has expanded considerably, becoming the fastest growing resource for electric power generation with the highest power density among all renewable energy resources [6]- [8].This resource also has two important barriers: the low efficiency of the PV modules (directly related to meteorological conditions) and the large investment cost [5], [9].Nevertheless, its potential to feed energy into the grid along with the reduction of transmission losses it provides makes this renewable resource very attractive [10].
Recently, artificial intelligence techniques, more specifically deep learning models, has become widespread as a novel data-driven approach that can be applied to numerous scientific fields such as PV energy analysis or related areas [11], [12].Deep learning models are famous because they are able to learn complex patterns without requiring in-depth knowledge of the subject under analysis and are characterised for their high performance and easy implementation.In addition, these models have become increasingly more popular due to their ability to better optimise and replicate learning patterns than the more classical machine learning techniques [11].Some concrete examples of that, in similar studies of the one proposed, are Nabipour et al. [13] show the higher accuracy of DL models prediction stock market trends and Mert.[14] show the better performance of DL models in solar-powered systems production estimations.
Long Short-Term Memory (LSTM) neural networks are a deep learning model, within the group of Recurrent Neural Networks (RNN) [15], which contain a specific hidden layer that considers the existence of connections with past values [16], [17].In this way, they are suitable for mapping long-term dependencies.These neural networks have been implemented in similar fields such as environment [18], energy efficiency in buildings [16], image processing [17] and PV generation [19], [20].In particular, they have shown better performance in photovoltaic generation estimations thanks to being able to use the information learned from previous steps [21], [22].Moreover, most deep learning models leave room for optimisation based on the hyperparameters that defined them.These improvements, which can be achieved in model performance reaching the optimal values for the hyperparameters is demonstrated in several previous studies [23], [24].In the literature can be found different techniques to efficiently perform this search: univariate dynamic encoding algorithms [25], combination between grid and random searches [26], particle swarm optimisation [27] or genetic algorithms [28].In particular, Genetic Algorithms (GA) have increased their use in this type of optimisations mainly due to their easy of implementation and the reduction in the number of evaluations and time needed to reach an optimum [24], [29], [30].Furthermore, multiobjective genetic algorithms such as Non-dominant Sorting Genetic Algorithm (NSGA-II) make it possible to optimise the values of the selected hyperparameters considering more than one objective function [1], [31], [32].
In recent years, feeding machine and deep learning models with simulated data, prior to real data, has been shown to improve their performance.The spread of this technique is due to the fact that several studies have shown that pre-training the model with synthetic data enables subsequent training with real data to be faster and/or more accurate, on the one hand, and that in certain situations collecting real data is very costly or not possible, on the other hand [33], [34].This methodology has been applied in several fields such as signal denoising [35], pattern recognition [36] and robot perception [37].The aim of this research is to introduce a methodology to optimise deep learning models architecture and improve their performance using synthetic data.In particular, this study focuses on estimating PV generation and comparing the accuracy of the built models depending on their pre-training.The analysed installation is located on the roof of the School of Mining Engineering in northwest Spain.The available data consist of hourly frequency observations of PV generation together with outdoor temperature and global solar irradiance of the area.Additionally, three temporal variables (month of the year, day of the month and hour of the day) are also considered as model inputs.In this way, taking into account the aforementioned inputs and the variable of interest (PV generation), the optimisation process and the improvement provided by a proper pre-training were analysed.Specifically, both the epochs required to reach a certain error limit and the coefficient of variation of the root mean squared error (CV(RMSE)) and normalised mean bias error (NMBE) are the model evaluation metrics selected.
The novelty of this paper lies in the application of deep learning models, optimised with the NSGA-II algorithm and pre-trained with simulated data, to perform PV generation predictions of an installation consisting of 296 PV modules.Furthermore, the introduced methodology shows the significant improvement of the model behaviour with a correct pre-training process based on synthetic data.Thus, this work contributes with a method that efficiently optimises the deep learning model and improves its training speed in comparison with a model without pre-training or with an incorrect pre-training.In the field of renewable energies, this improvement allows better control and utilisation of photovoltaic energy, optimising, for example, the connection between a house with photovoltaic panels and an electric vehicle.In addition, the presented use of synthetic data allows the implementation of deep learning models in situations where the monitored data is limited or the PV systems have just been installed and there is very few data available to feed the model.

II. Material and Methods
The aim of this research is to analyse the usefulness of synthetic data to pre-train deep learning models and thus study whether they improve their performance in the training process with real data.In this case, the study focuses on a photovoltaic installation, and specifically, on estimating the generation of a PV system based on meteorological and temporal variables.To this end, the deep learning models used are LSTM neural networks optimised with NSGA-II multiobjective genetic algorithm.

A. Long Short-Term Memory (LSTM) Neural Network
The deep learning model used in this study is a Long Short-Term Memory (LSTM) neural network.This type of neural networks are Recurrent Neural Networks (RNN); sequenced-based models that take into account the possible correlations between past and current data [38], [39].RNN use the backpropagation through time (BPTT) method, which considers that the decision a RNN makes at time step t − 1 can influence the decision at time step t.However, due to the vanishing gradient problem [40], these models are not good learning relationships in the long run.This problem is described as the gradient norm decays exponentially to zero from long-range dependencies.In this case, LSTM neural networks, having an architecture with a memory cell and a forget gate, are capable of solving the aforementioned problem [41].
The dynamics of RNN can be established with deterministic transitions from previous to current hidden state ( ): (1) being l the layer and t the time step.In constrast, LSTM neural networks present a more sofisticated structure that enables the memorisation of information for many time steps.The long-term memory is stored in a dedicated vector of memory cells ∈ ℝ k : ( As an illustration, we assume an input vector x, where x t ∈ ℝ k is a k-dimensional vector at time step t.LSTM neural networks maintain an internal memory cell state during the entire process in order to build the temporal connections.The memory cell s t−1 interacts with the hidden state h t−1 and the specific input x t to establish the elements of the inner state vector to be deleted, updated or mantained.Furthermore, LSTM neural networks have a forget gate f t , an input gate i t , an input node n t and an output gate ot in their structure (see Fig. 1).The architecture of these models can be defined by the equations 3, 4 and 5 [38], [41]: (3) (4) (5) being W weight matrices associated to the activation functions, ⊙ an element-wise multiplication and σ the representations of the sigmoid function.
In this way, the new current cell state (n t ) can be calculated with Equation 6: (6) where φ represent the tanh activation function.Based on the forget and input gate the state st is updated through Equation 7: (7) and the current hidden output using Equation 8: (8) As shown in Fig. 1 there are three sigmoid functions in the LSTM block, which can be 0 or 1 and act as switches to manage which elements pass through the gates.In addition, the present input xt and the past state ht1 affect the decision made at the forget gate f, the input gate i and the output gate o.The forget gate determines which elements of the previous memory cell st1 are forgotten and the input gate selects which elements are kept.Thus, the inner state is updated and the elements of st that move forward as LSTM state ht are selected through the output gate.This process is replicated at every time step [39], [41].
On the one hand, the LSTM neural networks built in this analysis are optimised with a mutiobjective genetic algorithm focusing on the accuracy and the complexity of the model.The parameters adjusted are the number of LSTM layers, the number of Dense layers, the number of neurons in each of them and the number of epochs the model is allowed not to improve (stopping criterion).On the other hand, the built neural networks use the internal optimisation algorithm known as Adam, the Rectified Linear Unit (reLU) activation function and a batch size of 24.

B. Model Optimisation
The optimal architecture together with the optimal value for the parameter defining the stopping criterion (number of epochs without improvement) of the built LSTM neural network are obtained with a multiobjective genetic algorithm.Genetic Algorithms (GA) are known for trying to replicate biological evolution to solve optimisation problems.They initiate the process with a random population based on individuals.These individuals are represented by chromosomes consisting of genes which, in turn, are the values of the considered covariates.Thus, this type of algorithms conducts optimisation based on three main operators: crossover, mutation and elitism.Crossover refers to exchanging a portion of a specific chromosome with a portion of another random chromosome.Mutation increases diversity in populations to avoid stagnating at local optima by randomly modifying part of solutions.Elitism is the way in which the selection process is accomplished by choosing the best chromosomes to pass through generations [42], [43].
In this study, the specific algorithm used is the Non-Dominant Sorting Genetic Algorithm (NSGA-II).It is a robust multiobjective algorithm widely implemented in different practical fields that allows the simultaneous optimisation of several parameters.Furthermore, it is characterised by generating a Pareto front betweeen the objectives where the overall optimum is selected and for being an improved version of the original version of the NSGA.These improvements are based on the use of a crowding distance operator, the elitism and a fast nondominated ranking [31], [44].
This algorithm is based on four internal principles that defined its processing [45]: • Non-dominated sorting: The options considered, which form a population, are ordered by Pareto dominance.In this way, the elements/options with the best rank are separated and the ordering continues with the rest of the options.
• Crowding distance: Between two possible solutions, the one with a larger crowding distance is considered to be in a less crowded area.Thus, the elements in a less crowded region will be selected first.The crowding distance for an element is presented in the Equation 9: (9 where k is the number of objectives, the value of the i-th element for objective j, and ; the maximum and minimum values for objective j.
• Selection operator: The selection of elements to be transferred for next generations is based on their rank and their crowding distances.
The objective functions considered to be minimised with NSGA-II are the CV(RMSE) in PV generation predictions and a complexity function that summarises the layers and neurons of the model.This complexity function, already use in [31], [46], relies on the number of layers and neurons in the built neural network: (10) with l and L being the number of layers used and the maximum value allowed (in this analysis, 5).In addition, n j and N represent the neurons in each layer and the maximum number of neurons allowed (in this analysis, 500).In order to avoid rejecting excessive multilayer architectures, a lower weighting for the number of layers is introduced.In this case, the termination of the optimisation process is based on a specific tolerance value within the space of feasible solutions and the optimal point along the final Pareto front is selected using a decomposition function, known as penalty boundary intersection (PBI) [47].
Further information about the NSGA-II can be found in [48].

C. Validation and Error Assessment
The validation metrics considered in this analysis to evaluate the accuracy of the deep learning models are the the Coefficient of Variation of the Root Mean Square Error (CV(RMSE)), Normalised Mean Biased Error (NMBE) and Mean Absolute Error (MAE): (11) (12) (13) where  i represents the real values, the estimations and N the number of observations.These metrics are used to compare the performance of the built LSTM neural networks throught a crossvalidation process (considering an expanding window) with average results presented in the section IV.They were used in similar studies such as [24], [49], [50].Moreover, the accuracy of the models is assessed only considering the hours with positive solar irradiance (without irradiance it is known that the panels do not produce).

III. Experimental System
The studied PV system is an installation located on the roof of the School of Mining Engineering in north-western Spain at University of Vigo (see Fig. 2).This installation is composed by 296 PV modules in parallel, with an azimuth of 72.8º-112.6º,because two groups of modules are considered, and a slope of 2º.In addition, the specific coordinates of the installations are latitude of N 42º 10' 6.1'' and longitude of W 8º 41' 18.44''.The technical information about the inverters and PV modules of the analysed installation is presented in Table I.

A. Synthetic Data
In this study, the available simulated data is generated with the software TRNSYS [51], [52].The data consist of simulated photovoltaic generation based on physical laws and weather data significantly correlated with PV generation (in this case outdoor temperature and solar irradiance) along one year (see Fig. 3).The aforementioned simulation, considering the same weather conditions, is carried out for different PV installations considering different number of PV modules in parallel, different azimuths and different slopes.The number of PV modules varies between 60 and 740 (60,89,178,296,414,562,740), the azimuth between 0 and 337.5 degrees (22.5 by 22.5) and the slope between 0 and 90 degrees (15 by 15) generating data from 784 different PV instalations.Among this grid of parameters combinations there is the same configuration as the analysed installation.The purpose of these synthetic data is to provide data from different installations (to fit a wide range of possibilities) in order to subsequently pre-train deep learning models and improve their performance on real data.Thus, the deep learning model reaches the training process, with real data, knowing the relationship between the selected inputs and the specific power generation of the installed panels.

B. Weather Data
The meteorological variables considered as model inputs in this analysis are global solar irradiance and outdoor temperature.They have a significant correlation with the generation of the photovoltaic modules [53].Specifically, the data source used to obtain these data is an automatic weather station belonging to a meteorological agency known as MeteoGalicia [54].The station is located 250 m northeast of the centre of the PV installation and 35 m higher.For missing or invalid values collected by the station, the Global Forecast System (GFS flux) surface flux model is used.This model generates hourly forecasts on a 13 km resolution grid [55].

C. Data Preprocessing
This research is focused on analising the improvement, on PV generation estimations, that produces pre-training a deep learning model with simulated data (see Fig. 4).In addition to the right installation parameters, the deep learning model is also pre-trained with simulated data based on random parameters (extracted from the list of section A) to consider the case where these data are not available.As mentioned, the aim of the built LSTM neural network is to predict the generation of a PV installation.The data available in this analysis are hourly observations of the PV generation of the studied installation and simulated observations, considering the parameters of that installation and 783 variations of them (Section A), in addition to the solar irradiance and outdoor temperature of the area.The availability of the real data corresponds to the year 2021 (from March to September) and the simulated data corresponds to 2020.In this period of time there is no missing or invalid data.Three complementary variables related with the time (hour of the day, day of the month and month of the year) are also considered as model inputs to improve the accuracy of the model.In order to take into account the existing inertia in the solar irradiance, and thus in PV generation, 24 hourly lags are considered.Moreover, the data set is normalised based on the limits 0 and 1.
As mentioned, the pretaining is conducted with simulated data considering on the one hand the parameters of the studied installations (n_panels: 296, azimuth: 90º and slope: 2º) and, on the other hand, a random set of parameters n_panels: 562, azimuth: 247.5º and slope: 60º).Specifically, these parameters are the number of modules, their azimuth and their slope.The following section presents two analyses: one focused on introducing the process of selecting the optimal architecture and stopping criterion of the deep learning model and the other focused on showing the improvement in training speed and model accuracy due to pre-training (see Fig. 4).

IV. Results and Discussion
This paper presents a methodology for estimating PV generation optimised with a genetic algorithm that searches for the best LSTM neural network architecture together with the best stopping criterion for training and improved with pre-training based on simulated data.The inputs to produce the PV generation estimations of the built models are solar irradiance, outdoor temperature and three temporal variables.To validate this methodology, monitored data from a photovoltaic installation located in the northwest of Spain are available.On the one hand, section A shows the results and parameters used in the optimisation process of the LSTM neural network architecture and its stopping criterion.On the other hand, section B presents the improvements obtained by pre-training the model with synthetic data based on speed and accuracy.In this section, a comparison between two different pre-training and no pre-training is presented by analysing the number of epochs needed to reach certain error levels (directly related with time) and the accuracy they yield with similar training (same stopping criterion).In addition, the proposed optimisation and method, along with the following results, were implemented using the Python programming language [56].

A. LSTM Neural Network Optimisation
The optimal selection of the LSTM neural network architecture (considering LSTM hidden layers, dense hidden layers and the neurons within them) and the number of epochs without enhancement to stop training is obtained with NSGA-II.The average CV(RMSE), from a cross-validation experiment on the simulated sample corresponding to the studied system, and the complexity of the model (Equation 10) are the objective functions considered.The aim of the multi-objective genetic algorithm is to minimise these functions simultaneously.The optimisation is conducted with simulated data instead of real data, in order to assume the situation where real data is not yet available.The table II shows the specific hyperparameters used in the optimisation process: those that define the option space and those that configure the algorithm termination and selection process.In this case, considering the parameters presented in Table II, NSGA-II needed 2490 evaluations to find 5 optimal points on the Pareto front (7688 possible options in total).These points correspond to LSTM architectures and epoch limits to stop the model training.Then, the PBI decomposition function taking into account heterogeneous weights (0.75{0.25), respectively for the error and complexity objective functions, is used to select a point on the Pareto front.Although in this case we give more importance to error, the distribution of weights can be adapted to obtain less accurate but simpler models.
The results are an LSTM neural network architecture with an LSTM hidden layer with 80 neurons and a Dense hidden layer with 40 neurons (5 80 40 1), as well as a model patience, measured in epochs, of 20.More information and details of this selection process can be found in [31], [57], [58].

B. LSTM Neural Network Performance
Once the optimal LSTM architecture and the stopping criterion for training the model have been obtained, two different analyses are performed: one based on analysing the improvement in training speed produced by a model pre-training and the other focused on comparing the differences in accuracy between the built models considering the same training process.In this case, the comparison is carried out considering three different models: one without pre-training, one with a random pre-training and one pre-trained with the parameters of the studied installation (number of PV modules, azimuth and slope).In this specific analysis, the values of the random parameters selected are 562 PV modules with an azimuth of 247.5º and a slope of 60º.
On the one hand, Table III, in which the training speed is analysed, shows the average results (30 repetitions) of measuring the number of epochs each model requires to reach certain error limits, also taking into account the time, measured in seconds, required to reach it.Normalised data and the Mean Squared Error (MSE), for error limits, are considered.The pre-trained models use one year of simulated data and all built models are retrained and evaluated with seven months of real data (first 4 for training and the remaining for validation).In the case of the first limits (0.005, 0.004, 0.003), both pre-trained models with synthetic data only needed one epoch to reach the limit.The model without pre-trainig is the slowest, needing more than 3, 5 and 8 epochs on average to reach respectively the first mentioned limits.Considering the times spent on training, the pre-trained models reduce it to half at the first limit and to one third at the third limit.With regard to the last error limit, the differences between the three built models become more significant.The model with the correct pre-training requires on average 3.33 epochs to reach the error limit, while the model with a random pre-training requires 18 epochs.Moreover, the model without pre-training remains the slowest, taking, on average, 42.67 epochs.Observing the times the results are similar: the model with a correct pre-training spent, on average, 7.41 seconds (more than three times less than the model pre-train with random parameters (25.51) and more than six times less than the model without pre-training (46.11).In this way, it can be seen that the improvements, in terms of speed, provided by a pre-training with synthetic data are significant considering both correct and incorrect parameters.The information extracted in this pre-training generates models able to adapt faster to real situations, although considering the right pre-training is more efficient.
On the other hand, the results of the study of the accuracy of the built models following a homogeneous training process are presented in Table IV.The training process is based on a cross-validation experiment considering an expanding window; the models are evaluated on the seven months of real data available (one by one) using the remaining previous months for training.In addition, the LSTM architecture and the stopping criterion considered are those obtained in the previous section.
In terms of CV(RMSE), with which the average distance to the real curve is measured, it can be observed in Table IV that the average value of the model with a random pre-training is significantly higher than the others (21.15 % ).The standard deviation among all CV(RMSE) values is also the highest (± 5.87), showing a large variability in the results.The average CV(RMSE) yielded by the model with correct pre-training and the one without pre-training are close, with similar variability, but the former is lower (12.84 % and 14.22 % respectively).As for the NMBE results, which measure how close the estimations are on average to reality, the model with incorrect pre-training has the highest average value (0.10 %) and the highest variability in results ( 0.08) (see Table 4).In this case, the model with no pre-training presents the lowest value (0.07 % ) followed by the model pre-trained with correct parameters (0.07 %), both with controlled variances.Regarding the MAE results, a metric that measures the average distance to the real values but in absolute units, the situation is the same as in the previous errors.The model pre-trained with correct simulated data yields the lowest value (3.71 kW ±1. 18),followed by the model without pre-training (4.17 kW ± 1.03) and the model with a random pre-training (6.37 % ± 1.96).Moreover, Fig. 5 shows the performance of the three built models over an entire week (specifically, from 12 July 2022 July 2022) and considering the similar training process used for the previous accuracy analysis.It can be seen that, as presented in Table 4 and considering the CV(RMSE) results, the model with correct pre-training best replicate the real behaviour of the studied PV installation.Although the model with no pre-training exhibits an accuracy not too far from the model just mentioned, the model pre-trained with incorrect simulated data is far from the real data.
In short, it is demonstrated from a speed and accuracy approach that pre-training the deep learning model with synthetic data is an effective way to improve its performance.Furthermore, in order to efficiently get this improvement, it is important to use correct simulated data.Pre-training with appropriate synthetic data allows to reduce the number of epochs, and thus the computational time, required in the training process by more than six times compared with no pre-training (see Table III).However, the use of incorrect simulated data, although faster than the model without pre-training, increases the computational time required in training by more than three times compared with the model correctly pre-trained.With respect to the accuracy of the models based on similar trainings, the use of incorrect simulated data, again, generates a model significantly less accurate than the model with a correct pre-training, but also than the model without pre-training (see Table IV).In this case, focusing only on the final average errors, both the model with no pre-training and the model with the correct pre-training show a similar performance, although the model pre-trained with the correct synthetic data achieved lower errors.These results show that although pre-training with synthetic data can provide more speed adapting to real data, if the data used is not appropriate, the accuracy of the model can stagnate and not reach the levels that would be achieved without pre-training.
Comparing the results of the proposed research with previous similar studies, taking into account the differences between installations and the improvements shown by the pre-trainings, the built models show error values lower or in the same range [59]- [61] and complying with the ASHRAE Guidelines [61], [62].

V. Conclusions
A methodology for optimising deep learning model configurations and improving their performance by means of pre-training based on synthetic data is presented in this paper.In this way, a great time reduction can be obtained, not only considering the reduction in the model training time but also in the time devoted to the search for the optimal architecture and the optimal training stopping criterion of the deep learning model.The study was conducted with an LSTM neural network built to perform PV generation predictions and pre-trained using synthetic data acquired with TRNSYS software.
On the one hand, the results achieved demonstrate that it is possible to pre-train a deep learning model, both with data simulated using the correct parameters and using random parameters, significantly reducing the time (measured in epochs and seconds) spent in the training process.The computational time required for the model to reach specific training error values is reduced by up to six times.In addition, in relation to the optimisation of DL model configurations, the proposed method (based on a multiobjective genetic algorithm) also reduces to less than half the evaluations needed to search all possible configurations and select an optimal one.On the other hand, the impact of using synthetic data generated with erroneous parameters is also analysed.In this case, an inadequate pre-training not only does not come close to the performance of a correct pretraining, but even can worsens the situation without pre-training.With regard to the accuracy of the built models considering the same training process on real data, it is shown that an incorrect pre-training produces less accurate models when fed with real data than a correct pre-training or a model without pre-training.The former two show a similar final accuracy but the model pre-trained with data simulated considering the correct parameters yields lower average errors.Here is a key insight of the research: although a pre-training with synthetic data may provide higher speed of adaptation to reality, if the data used in this pre-trainig are far from the real situation, it will affect to the final accuracy of the model and even lead to a worse performance compared to a model without pre-training.
The main limitation of this research is the amount of data.The monitoring period could be longer to reach a full year and the availability of data from more PV installations would make this study more consistent.The main outcome of this study is the evidence that the presented methodology can contribute to improve the performance of deep learning models.First, the multiobjective genetic algorithm NSGA-II allows us to use an efficiently optimised LSTM neural network without the need to evaluate all possible hyperparameter options.Second, the use of synthetic data to pre-train the built model allows us to significantly reduce the time spent on training and even slightly improve the final accuracy of the model.In this way, these improvements can be focused on making the use and distribution of photovoltaic energy more efficient.Thus, the fulfilment of the European Commission targets, commented at the beginning of the paper, will be closer.Lastly, this research evidences the importance of selecting adequate datasets for pre-training and generating global models that, once trained with simulated data, are used in real PV installations.
As future lines of research, more installations based on different parameters and different deep learning models could be considered to develop a more complete comparison and analysis.Using more installations to pre-train the deep learning model, or plug it in with a model that estimates the correct installation parameters from monitored data, can generate a global model that can be applied to different installations instead of having to pre-train the model with data specific to the particular installation under study.

Fig. 3 .
Fig. 3. Simulation process followed by TRNSYS in order to generate PV generation data.

Fig. 4 .
Fig. 4. Research methodology in which the three parts (pre-training with synthetic data, training with real data and the subsequent evaluation) are presented in different ways depending on the pre-training.In addition, the measures selected to compare the performance of the models, which are training speed and accuracy, are shown.
TABLE II.Parameters and Functions Used in the Optimisation Through NSGA-II, Comprising the General Parameters Related to the Multiobjective Algorithm and the Specific Parameters Related to the Optimal Selection

Fig. 5 .
Fig. 5. Results of PV generation estimations in the second week of July 2022.All models built are considered for comparison.The CV(RMSE) values are 10:61 % for the model with correct pre-training, 47:63 % for the model with random pre-training and 13:31 % for the model without pre-training.

TABLE I .
PV Inverters and Modules Datasheets

TABLE III .
Average Results of 30 Repetitions of an Experiment in Which the Number of Epochs Needed by Each Model to Reach the Error Limits Shown Are Analysed.The Average Number of Epochs and Time Each Model Needed to Reach the Limits Are Presented

TABLE IV .
Average Results of a cross-validation Experiment Considering an Expanding Window and Considering the Accuracy of the Models.The Average CV(RMSE), the Average NMBE and the Average MAE Are Presented Together With their Standard Deviations (SD)