Next Article in Journal
Work-Family Interface in the Context of Social Responsibility: A Systematic Literature Review
Next Article in Special Issue
A Sensorized Toy Car for Autism Screening Using Multi-Modal Features
Previous Article in Journal
Evaluation of the Varietal Impact of Two Citrus Species on Fluctuations of Tetranychus urticae (Acari: Tetranychidae) and Beneficial Phytoseiid Mites
Previous Article in Special Issue
The Application of a Pavement Distress Detection Method Based on FS-Net
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Evaluation of Transfer Learning and Fine-Tuning to Nowcast Energy Generation of Photovoltaic Systems in Different Climates

by
Guillermo Almonacid-Olleros
1,*,
Gabino Almonacid
2,
David Gil
3 and
Javier Medina-Quero
1
1
Department of Computer Science, University of Jaén, 23071 Jaén, Spain
2
Department of Electronic Engineering, University of Jaén, 23071 Jaén, Spain
3
Department of Computer Science Technology and Computation, University of Alicante, 03690 Alicante, Spain
*
Author to whom correspondence should be addressed.
Sustainability 2022, 14(5), 3092; https://doi.org/10.3390/su14053092
Submission received: 25 January 2022 / Revised: 27 February 2022 / Accepted: 2 March 2022 / Published: 7 March 2022

Abstract

:
New trends of Machine learning models are able to nowcast power generation overtaking the formulation-based standards. In this work, the capabilities of deep learning to predict energy generation over three different areas and deployments in the world are discussed. To this end, transfer learning from deep learning models to nowcast output power generation in photovoltaic systems is analyzed. First, data from three photovoltaic systems in different regions of Spain, Italy and India are unified under a common segmentation stage. Next, pretrained and non-pretrained models are evaluated in the same and different regions to analyze the transfer of knowledge between different deployments and areas. The use of pretrained models provides encouraging results which can be optimized with rearward learning of local data, providing more accurate models.

1. Introduction

Solar photovoltaics or PV have continued to experience remarkable growth in 2020 and the first half of 2021 despite the overall negative impact of the COVID-19 pandemic and several price increases affecting the processes and materials involved in the production of PV modules. Thus, cumulative solar capacity surpassed three quarters of a terawatt (TW) globally in 2020. Furthermore, during this year, solar was again the power generation technology with the largest net installed capacity.
However, the most likely scenario is that we shall enter the solar terawatt age in 2022. Finally, the Global Market Outlook for solar power 2021–2025 anticipates that total solar capacity will reach almost 2 TW by the end of 2025 [1].
Nowadays PV technology has become a solid choice for electricity generation, not only because of the advantages provided by green electricity, but even by producing electricity more cheaply than conventional sources in many cases. A record low generation cost of 1.32 US cents per kWh was reached in the second Portuguese auction in 2020 [1].
All these features, among others, are leading to a very significant growth in the global solar market, particularly in an aspect that is especially relevant to this work: distributed power generation. Data engineering and deep-learning are key techniques to find open and low-cost solutions, as powerful tools that are able to manage the smart grids that enable distributed generation [2,3].
Predictive maintenance and efficient operation of PV plants is necessary [4]. To this end, as a first step, accurate estimation of the available energy is required, especially in the coming hours [5]. Thus, having a reliable tool available to nowcast the energy generated by PV installations is the first essential step to achieving smart grids that allow distributed energy generation. Furthermore, this will allow customers -the so-called prosumers-, to be active agents in energy generation and grid management.
Additionally, transfer learning is the improvement of learning in a new task through the transfer of knowledge from a related task that has already been learned [6]. Under data-driven approaches, supervised learning provides models where the training and testing data are collected under the same conditions to compute feature representation and data segmentation [7]. In many real contexts, learning conditions change between domains, which is an obstacle for the use of standard machine learning models [8]. Transfer learning responds to the challenge of evaluating the capabilities of pretrained models in different contexts.
The use of deep learning in temporal series has become a prolific research field [9], involving temporal or sequence networks, such as Long Short-Term Memory (LSTM) [10] and spatial features in time series by means of Convolutional Neural Networks (CNNs) [11,12]. These deep learning models provide straightforward transfer capabilities due to neural network plasticity [13] which can weight artificial synapses from previous learning stages to other domains [8]. In this way, pretraining CNN and LSTM models is effective in knowledge initialization, providing encouraging results and reducing the required learning time [14].
Furthermore, developing methods for estimating the output power generation in photovoltaic systems [15] is key to obtain models that predict energy generation in unseen previously learned areas. It will enable computing standard models to evaluate the power generation of photovoltaic systems from scratch [16].
The work presented here has consisted in the following steps:
  • Data collected in Jaen (Spain) using the IoT module to gather ambient sensor information and output power generated from the photovoltaic system deployed under the Opera Project [15].
  • Data from the SolarTech Lab at the Polytechnic University of Milan proposed to compare the prediction in a different context.
  • Data from the Kaggle database from India region, to compare the prediction in a different weather region of the world (Dataset on PV system in India. Retrieved 1 March 2022, from https://www.kaggle.com/anikannal/solar-power-generation-data).
  • A homogeneous segmentation of data proposed to aggregate solar irradiance and temperature of sensor data streams from different contexts.
  • Two deep learning models based on CNN and LSTM proposed to nowcast the generated power. Energy estimation transfer capabilities between Spain and Italy evaluated with different configurations for learning, comparing training from scratch and pretrained models.
In the remainder of this article, we provide further detailed descriptions of the proposed approach. Section 1.1 reviews related works and the state of the art. Section 2 presents the proposed methodology for homogenizing source streams and translating the knowledge from different PV system contexts. Section 3 introduces the evaluation of the methodology analyzed in three real-world datasets. Finally, in Section 4, conclusions, ongoing and future works are discussed.
The completion of this work has resulted into three major contributions in the field: (a) a configuration of a deep learning model which provides good performance when reused across different contexts with no reconfiguration, (b) a methodology to follow in order to reuse deep learning models across different domains, and (c) a baseline for pretrained models error and time metrics.

1.1. Related Works

Over the last twenty years, PV systems have been integrated as efficient sources of energy generation and this technology has reached a significant maturity level in several regions, such as America [17,18], Australia [19], Asia [20] and Europe [21]. The role of Machine Learning has enabled a relevant number of applications in PV installations [22].
Moreover, the great growth in the contribution of energy from renewable sources, in general, to the electricity grid has led to new challenges for distribution networks, such as distributed generation and smart grids. In particular, as already mentioned, PV energy—with a 39% share of all new installations—had the greatest growth in new installed capacity over the past year [1]. Data engineering and artificial intelligence are therefore essential to manage these resources and meet these challenges. Solar energy is contributing greatly to achieving distributed generation [23,24,25]. But it will only be possible with new management tools in the electricity grid—in other words: Smart Grids [26,27,28]. Furthermore, new applications that are geared towards individual customers are being developed, enhancing trends such as self-consumption, off-grid generation taking account of new advances in electricity storage, etc. [29,30,31,32,33,34,35]. In addition, the considerable increase in the number of customers that, not only consume, but generate energy (prosumers) also highlights the need for powerful but simple tools to enable these individual customers to operate, control and maintain their installations [36,37,38].
New approaches are exploring Internet of Things architectures [15] together with new information technologies such as big data or business intelligence [39]. Prior to data-driven models, the common method to estimate the energy generated by the cells and by the PV system was based on the physical process of the solar cell in order to define the analytical equation to obtain its electrical parameter [40]. These models followed different approaches with notable results [16,41]. However, the use of machine learning models developed from supervised data under data-driven approaches have overtaken previous models’ performance in nowcasting output energy generation [42,43,44].
First, Deep learning (DL) has become a prolific research field on the basis of temporal series [9]. Long Short-Term Memory (LSTM) [10] is a type of recurrent neural network that includes a memory and is designed to learn from sequence data, such as sequences of observations over time. The use of LSTM is suitable for predictions from sensor data [45] obtaining encouraging results in several fields, such as activity recognition [46] or estimating building energy consumption [47]. In PV forecasting, LSTM has shown encouraging results in the state of art in terms of performance [48]. Additionally, Convolutional Neural Networks (CNNs) have been combined to extract spatial features in time series achieving promising results together with LSTMs models [49], particularly in nowcasting the output energy generation of PV systems [42]. The DL models for nowcasting PV output have provided highly accurate learning that includes recognition of the threshold of solar irradiance which overcomes the non-zero energy generation in different weather circumstances.
Second, in a general sense, transfer learning is a methodology used to translate learning models from previous patterns recognized in a given domain to another domain. In this broad definition, homogeneous transfer learning refers to predictive modelling where the domain and input feature space is the same [50]. On the other hand, heterogeneous transfer learning aims to align the input data between different source and target domains which are represented in different feature spaces [50]. This work falls in the middle of these two approaches: it is homogeneous to the extent that the input feature space of signals to estimate output energy generation is the same; however, the collection rate and representation of data between PV systems differ. To address this, a common segmentation method to process the sensor stream is proposed.
Third, the outcomes of transfer learning are broad. For example, instance-based approaches separate samples from target and source domain samples in order to be used in the target domain to improve training performance [51]. Parameter-based approaches are focused on transferring knowledge by means of sharing structures from a latent space from the source domain [52]. This kind of transfer learning is strongly related to DL approaches, since the weights which configure the learned kernels from network layers describe hypothetically common patterns from the target domain. So, in spite of using initialized to zero or random weights, the learned network is used as a starting point for learning, proceeding with fine-tuned learning of the target domain [53]. These approaches have provided encouraging results in reduction of learning time and increased performance, above all, in computer vision problems [54].
Finally, in time-series forecasting, the use of DL and transfer learning [55] has been applied successfully in different scenarios, such as indoor temperature forecasting [56]. In the context of PV systems, transfer learning capabilities have been newly evaluated [57] with promising results. LSTM has been proposed to reduce prediction errors with pretrained initialization of weights in a case study limited to the same region (China), with deployment of the same plant and using the same data segmentation on different days for evaluation. In other areas of photovoltaics, machine learning has been proposed to diagnose: (i) the fault detection of PV systems [58], (ii) the grid connection of PV architectures [59] or (iii) the module defects [60], for example, using aerial images [61], infrared images [62].
Based on the previous works described, in this work we aim to analyze the capabilities of transfer learning to nowcast energy generation so as to reach general prediction models which estimate the performance of PV systems. Our goal is to transfer knowledge from different PV plants, in different areas and with different collection rates of sensors in two dataset domains.

2. Methodology

In this section, we describe the proposed methodology for evaluating the capabilities of transfer learning for the purpose of nowcasting the energy generation of photovoltaic systems in three different datasets, from the Univer Project at the University of Jaen, from SolarTech Lab at the Polytechnic University of Milan and from the India region at the Kaggle database. Our approach is based on the following key points: (i) evaluating two different datasets from different regions of the world using a segmentation method to homogenize the input from both domains, (ii) proposing CNN and LSTM models to nowcast the energy generation of the PV systems when learning from scratch versus pretrained networks with fine-tuned learning from other domains.

2.1. Data Collection of PV Systems from Heterogeneous Sources

The data for this work has been collected from two different sources. The first one is the Univer project of the University of Jaen. This dataset has been generated capturing the signals below with a frequency of 30 s, from June to November 2019. The data collected from Univer are:
  • Time recordings expressed in Central European Time (CET).
  • Global irradiance in plane of array (W/m 2 ) measured by an IoT device installed on the PV system.
  • Ambient temperature (°C) measured by an IoT device installed on the PV system.
  • Module temperature (°C) measured by an IoT device installed on the PV system.
  • Output Power (W) from the PV module, measured at the inverter of the system.
A sample row of the Univer data file is shown in Figure 1.
The second dataset includes PV power production measured in the SolarTech Lab, Polytechnic University of Milan, Italy. The dataset spans a whole year, from January to December 2017, and is composed of the following variables and specifics, with a time resolution of 1 min (“NaN” is reported when a value is missing in the original measurement recording):
  • Time recordings expressed in Central European Time (CET).
  • Output Power recordings from the PV module (W); module tilt: 30°.
  • Ambient temperature (°C) measured by the weather station described on the SolarTech Lab website (SolarTech Lab, Polytechnic University of Milan, Italy. Retrieved 1 March 2022, from http://www.solartech.polimi.it/instrumentation/).
  • Measured global horizontal irradiance (W/m 2 ).
  • Global irradiance measured on the plane of array (30°).
  • Measured wind speed (m/s).
  • Measured wind direction (°), assuming 0° east, positive south.
A sample row of the SolarTech data file is shown in Figure 2.
The datasets from both systems present some commonalities that enable us to carry out the experiment by using the same signals in the deep learning model. However, to make sure we can extract significant conclusions from the results, the datasets need to be homogeneous. The following actions have been taken to achieve this:
  • Selecting the same signals as input to the model: Ambient Temperature and Global Irradiance in the datasets.
  • Nowcasting the same signal: Output Generated Power.
  • Selecting the same period of the year to avoid seasonality issues, in this case the overlap is from June to November 2019 in the Univer dataset and June to November 2017 in the SolarTech dataset.
  • Aggregating the data to a 10 min average and defining a segmentation as described in Section 2.2.

2.2. Segmentation to Nowcast Power Generation

Following a formal definition, a sensor s collects data in real time in the form of a pair s i ¯ = { s i , t i } , where s i represents a given measurement and t i the timestamp. Thus, the data stream of the sensor source s is defined by S s ¯ = { s 0 ¯ , , s i ¯ } and a given value in a timestamp t i by S s ( t i ) = s i . In this work, irradiance on the PV surface G I , ambient temperature T a m and PV output power generation P A provide three data streams which describe the behavior and energy production of the PV system.
In order to homogenize the data collected by the different sensors, we define several simetric temporal sliding windows. They are defined by the window size of a time interval W w = [ W w , W w + ] , segment the samples of a given sensor stream S s ¯ and aggregate the values s i ¯ by means of an aggregation function T t ( S s , W w , t ) :
T t ( S s , W w , t ) = s i s i ¯ s i , t i [ t W w , t W w + ]
So, the aggregation s i from the sensor data s i applied over a short time interval W w = [ W w , W w + ] represents the relevant value in a given point of time t .
Using the aggregation of data, the signal segmentation is defined by several sliding temporal windows of short size, which are defined by the temporal granularity Δ . The data in the temporal window are aggregated by the aggregation function. In concrete, the data within each temporal window are averaged = μ for each short-term temporal window within the segment defined in the time interval. The average provides a strong aggregation function in order to homogenize heterogeneous raw sensor sources in case they are provided by different collection rates.
So, we obtain a sequence of data for each sensor source, whose sequence size is the same for all sources S s :
S ( t ) { S 1 ( t ) = T t ( S 1 , [ 0 , Δ ] , t ) T t ( S 1 , [ Δ , 2 Δ ] , t ) , , T t ( S 1 , [ Δ | W | Δ , Δ | W | ] , t ) S | S | ( t ) = T t ( S | S | , [ 0 , Δ ] , t ) T t ( S | S | , [ Δ , 2 Δ ] , t ) , , T t ( S | S | , [ Δ | W 1 | , Δ | W | ] , t )
We note the different sensor streams S 1 , , S | S | , are: (i) aligned in the same point of time t , (ii) segmented in homogeneous sliding temporal windows W w = [ W w , W w + ] = { [ 0 , Δ ] , , [ Δ , 2 Δ ] } , and (iii) represented by a feature vector of unique size which aggregates previous values for each sensor stream S 1 ( t ) .
In Figure 3, we describe a visual representation of the segmentation of a sensor stream defined by sliding temporal windows to homogenize different frequencies of data collection from heterogeneous sources.
In this work, the segmentation of input and output signals from the PV system is developed for: Ambient Temperature and Global Irradiance as the input signals and Output Power as the output. This process of aggregating and segmenting the data is key in the transfer learning approach, since the sample rates are generally different between the domains. In the two contexts of this work, the input data is configured as follows:
  • Univer Dataset. The signals are aggregated from the original 30 s sample to a 10 min average and then segmented in a 90 min sliding window.
  • SolarTech Dataset. The signals are aggregated from the original 1 min sample to a 10 min average and then segmented in a 90 min sliding window.
At the end of this stage, the heterogeneous data from both domains have a homogeneous representation of input and output signals.

2.3. Transferring Knowledge by Weight Initialization and Fine-Tuned Learning between Domains

As we detailed previously, the aim of this work is to evaluate the capabilities of transfer learning for the purpose of nowcasting the energy consumption of PV systems between domains. This leads to the following questions:
  • How accurate are the learning models which are trained in their own domain (climate) in estimating the energy generation of PV systems?
  • What is the difference in performance when nowcasting energy generation with an unseen domain which has been trained in another plant, climate or deployment?
  • Is the structure of DL models (CNN and LSTM) effective for transferring and optimizing the weights in estimating the energy generation of PV systems from one climate to another?
In order to address these questions, after providing the unified representation of data from the previous section, we have evaluated three learning combinations for models, consisting of:
  • (A) Bare learning between domains, where isolated learning and evaluation is performed between domains. This standard learning provides baseline performance data from the same domain.
  • (B) External learning between domains, where the learning occurs in one given domain but the evaluation is carried out in a different one. The performance of this complex learning describes the transferability of DL structures when dealing with different unknown domains.
  • (C) Fine-tuned learning in the target domain from a pretrained network from another climate. Under this learning configuration, performance can improve or deteriorate with regards to the baseline (bare learning). If there is improvement, the patterns and kernels computed in DL layers provide general information on energy generation which can be optimized with local data to generate a sturdier model.
In Figure 4, we detail the configuration of data and model training in the bare, external and fine-tuned learning scenarios.
In Table 1, we describe the configuration of the learning model. Three layers of CNN are firstly integrated as spatial feature extractors. Next, two layers of LSTM model the temporal dependencies from the CNN. This combination of CNN-LSTM hybrid networks has been selected as it has provided encouraging results in modeling output power generation as described in [15].

3. Results

In this section, we describe the results from the implementation of transfer learning capabilities of DL models for the purpose of nowcasting and fine-tuning the energy generation of PV systems in different contexts.
The transfer learning capabilities were studied first in the SolarTech Lab context following the different domain combinations defined in the previous Section 2.3. The CNN+LSTM model also described in Section 2.3 was first trained and validated on the SolarTech dataset in a bare learning scenario. Then, it was trained on the Univer dataset and validated on the SolarTech dataset, to evaluate the performance of the external learning scenario. Finally, the model trained on the Univer dataset was optimised by training again on the SolarTech dataset and later validated on SolarTech. The results of these three scenarios were compared using the NMSE (Normalised Mean Square Error) and NMAE (Normalised Mean Absolute Error) error metrics. These results are shown in Table 2.
Afterwards, the same model and scenarios were tested in the Univer context. The bare learning model was implemented with training and validation on the Univer dataset. For the external learning scenario, the model was trained on SolarTech and validated on Univer. And finally, for the fine-tuned scenario, the model previously trained on SolarTech was optimised and validated on the Univer dataset. Table 3 shows the results of the experiment in this context using the same error metrics as in the previous context (NMSE and NMAE).
To have a sense of the performance of the model in the different scenarios when trying to nowcast the output power generation for each of the systems, the denormalized RMSE (Root Mean Square Error) and MAE (Mean Average Error) error metrics are shown in Table 4 together with the maximum value of the Output Power seen in the datasets for each domain.
Along with the error metrics described so far in this section, time metrics were captured as well for all the combinations to assess the performance of the model in a transfer learning from a time complexity perspective. First, in order to evaluate the improvement in the learning rate of a fine-tuned model, we have used the loss function during the training and validation of the model to compare the number of epochs needed to achieve the same performance in different scenarios. The comparison has been done for the bare learning and fine-tuned scenarios on SolarTech, setting two thresholds of different orders of magnitude of the loss function NMSE < 1% and NMSE < 0.1%, and comparing the learning time in number of epochs (number of passes of the model over the data) for the two scenarios. In Table 5 we present the results of this experiment.
In order to provide a visual representation of the differences in learning rates, Figure 5 shows the improvement of the error metric NMSE over the number of epochs, during training and validation of the model for both bare learning and fine-tuned learning combinations in the SolarTech context.
Also from a time complexity perspective, the decrease in the learning time of the model was measured, comparing the total training time in seconds for the bare learning and fine-tuned learning scenarios in the SolarTech context. Table 6 shows the results of this comparison.
Finally, to broaden the understanding of the transfer learning capability of the deep learning model, and in order to assess to what extent the knowledge can be transferred to more disparate contexts, a third dataset was also evaluated as part of this work, which presented very different conditions to the two homogeneous datasets used for the previous experiments:
  • It is a dataset generated by a PV plant in India, a different climate region from the two previous PV systems (Spain and Italy).
  • The dataset spans 31 days across May and June, as opposed to the six month length of the Univer and SolarTech datasets.
  • The data collection for the PV input and output signals has a frequency of 15 min, so the segmentation 135 min window
The results of the experiment in this third context are presented in Table 7, which shows the normalised error metrics, and Table 8, which shows the denormalized RMSE (Root Mean Square Error) and MAE (Mean Average Error) error metrics together with the maximum value of the Output Power.

3.1. Discussion

In this work we describe the reuse of deep learning models through transfer learning. In order to evaluate the nowcasting capabilities of a neural network model in unseen domains, we have tested the model on a combination of datasets from two different power plants (Univer PV System in the University of Jaen, Spain, and SolarTech Lab PV system in the Polytechnic University of Milan).
It is relevant to highlight that the deep learning model was reused across domains without having to change any configuration or parameters of the model itself specific for each of the domains. This can be considered one of the main advantages of this approach compared to the traditional monitoring models, which typically rely on the configuration of the model with the physical parameters of the PV system.
The results of the experiment show that the CNN+LSTM model performs well in the external learning scenario, with the ability to nowcast the output power generation of the SolarTech Lab system with a small margin of error after being trained on the Univer dataset. This margin of error was only 0.25 percentage points larger than the baseline error calculated with the model trained on the SolarTech system. The best results were obtained when applying the fine-tuned learning. The model was pretrained on the Univer dataset and then optimized on local data, resulting in nowcasting the output power generation of the SolarTech system with the smallest margin of error of all the combinations included in the experiment. This margin of error was 0.03 percentage points smaller than the baseline error.
In the Univer context, we obtained a larger margin of error for the model in the external learning scenario (model trained on the SolarTech dataset and validated on Univer), with a 5.66 percentage point increase in normalised mean square error. In the fine-tuned learning scenario, the margin of error was smaller than the margin calculated in the bare learning scenario, with a normalised mean square error 0.05 percentage points smaller than the baseline error.
We observed an improvement in the learning rate and learning time as well in this fine-tuned learning scenario. It required only one epoch with the pretrained model but 7 epochs with the bare model to achieve the same performance of NMAE < 1%. To get to a smaller error metric NMAE < 0.1%, the fine-tuned model only needed 7 epochs compared to the 39 in the bare learning scenario. In terms of total learning time, it took only 40.43 s to train the model in the fine-tuned learning scenario compared to 81.82 s in the bare learning scenario.

3.2. Limitations of the Work

The results described in this work have shown an improvement in the use of transfer learning in nowcasting output energy generation of PV systems. However, some limitations, which could be faced in ongoing works, are noted:
  • The potential optimization between extreme different climates could worsen by transfer learning. Learning from the Mediterranean (Spain) and optimizing with India has provided an improvement of the performance, but deeper data and evaluation is required to evaluate the impact of regions.
  • Aggregating and segmenting the raw data in 10 min granularity is key to homogenizing the data. Datasets with a higher collection rate could not be evaluated.
  • Sensoring of ambient PV plants in three datasets have been developed with high quality architectures and devices, so the results and patterns seems stable between them. Differences in precision from data collected by low resolution devices are hard to be optimized by transfer learning.

4. Conclusions and Future Works

In this work we have evaluated the transfer learning of a deep learning model, built with convolutional and long short-term memory layers, for the purpose of nowcasting photovoltaic power generation in two different domains: the Univer PV system in the University of Jaen and the SolarTech Lab in the Polytechnic University of Milan. The results highlight the strength of this approach when working with heterogeneous sources. Using the bare learning scenario from each of the domains as the baseline, a larger error margin is measured in the external learning scenario, i.e., training the model on one domain and validating the model on the other one. However, the model showed better performance in the fine-tuned learning scenario than the baseline, obtaining a smaller error margin when a pretrained model from a different context is used to run the training and validation in the local context. Finally, an improvement is also observed when measuring the learning time of the fine-tuned learning model compared to the bare learning model.
In ongoing works, we will create a new architecture to include transfer learning in real time systems on demand [63]. To this end, we will include a clustering method to estimate seasonality for long time periods and select clusters of patterns, where the nowcasting models are uploaded based on the the weather context for each day.
Modern information and communication technologies, such as deep learning, are playing a key role in policy design, decision-making, implementation and final productive services, i.e., policy aimed at boosting self-consumption, smart cities, cybersecurity, etc. This may be another task for future work.

Author Contributions

Conceptualization, G.A.-O., G.A. and J.M.-Q.; machine learning model, G.A.-O. and J.M.-Q.; validation, formal analysis, investigation, supervision, all authors. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The dataset of Univer and SolarTech, with the samples collected, segmentation and models developed in this work are available in the following repository https://github.com/galmonacid/opera-tl (last accessed on 20 December 2021), which includes the implementation of the proposed methods with Python and Keras.

Acknowledgments

This contribution has been supported by the Cátedra ELAND for Renewable Energies of the University of Jaén, by the Spanish government by means of the project RTI2018-098979-A-I00. This work has been partially funded by “La Conselleria de Innovacién, Universidades, Ciencia y Sociedad Digital”, under the project “Development of an architecture based on machine learning and data mining techniques for the prediction of indicators in the diagnosis and intervention of autism spectrum disorder. AICO/2020/117”.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
PVPhotovoltaic
CNNConvolutional Neural Network
LSTMLong Short-Term Memory
DLDeep Learning
NMSENormalised Mean Square Error
NMAENormalised Mean Absolute Error

References

  1. Europe, S.P. Global Market Outlook For Solar Power/2021–2025; Technology Report; SolarPower Europe: Brussels, Belgium, 2021. [Google Scholar]
  2. Feng, C.; Liu, Y.; Zhang, J. A taxonomical review on recent artificial intelligence applications to PV integration into power grids. Int. J. Electr. Power Energy Syst. 2021, 132, 107176. [Google Scholar] [CrossRef]
  3. Sundararajan, A.; Hernandez, A.S.; Sarwat, A.I. Adapting big data standards, maturity models to smart grid distributed generation: Critical review. IET Smart Grid 2020, 3, 508–519. [Google Scholar] [CrossRef]
  4. Mansouri, M.; Trabelsi, M.; Nounou, H.; Nounou, M. Deep learning based fault diagnosis of photovoltaic systems: A comprehensive review and enhancement prospects. IEEE Access 2021. [Google Scholar] [CrossRef]
  5. Mellit, A.; Massi Pavan, A.; Ogliari, E.; Leva, S.; Lughi, V. Advanced methods for photovoltaic output power forecasting: A review. Appl. Sci. 2020, 10, 487. [Google Scholar] [CrossRef] [Green Version]
  6. Torrey, L.; Shavlik, J. Transfer learning. In Handbook of Research on Machine Learning Applications and Trends: Algorithms, Methods, and Techniques; IGI Global: Pennsylvania, PA, USA, 2010; pp. 242–264. [Google Scholar]
  7. Pan, S.J. Transfer learning. Learning 2020, 21, 1–2. [Google Scholar]
  8. Polo-Rodriguez, A.; Cruciani, F.; Nugent, C.D.; Medina, J. Domain Adaptation of Binary Sensors in Smart Environments Through Activity Alignment. IEEE Access 2020, 8, 228804–228817. [Google Scholar] [CrossRef]
  9. Gamboa, J.C.B. Deep learning for time-series analysis. arXiv 2017, arXiv:1701.01887. [Google Scholar]
  10. Hochreiter, S.; Schmidhuber, J. LSTM can solve hard long time lag problems. Adv. Neural Inf. Process. Syst. 1997, 9, 473–479. [Google Scholar]
  11. Wang, J.; Chen, Y.; Hao, S.; Peng, X.; Hu, L. Deep learning for sensor-based activity recognition: A survey. Pattern Recognit. Lett. 2019, 119, 3–11. [Google Scholar] [CrossRef] [Green Version]
  12. Qiu, Z.; Yao, T.; Mei, T. Learning spatio-temporal representation with pseudo-3d residual networks. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 5533–5541. [Google Scholar]
  13. Andina, D.; Alvarez-Vellisco, A.; Aleksandar, J.; Fombellida, J. Artificial metaplasticity can improve artificial neural networks learning. Intell. Autom. Soft Comput. 2009, 15, 683–696. [Google Scholar]
  14. Erhan, D.; Courville, A.; Bengio, Y.; Vincent, P. Why does unsupervised pre-training help deep learning? In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics—JMLR Workshop and Conference Proceedings, Sardinia, Italy, 13–15 May 2010; pp. 201–208. [Google Scholar]
  15. Almonacid-Olleros, G.; Almonacid, G.; Fernandez-Carrasco, J.I.; Espinilla Estevez, M.; Medina Quero, J. A new architecture based on IoT and machine learning paradigms in photovoltaic systems to nowcast output energy. Sensors 2020, 20, 4224. [Google Scholar] [CrossRef] [PubMed]
  16. Fuentes, M.; Nofuentes, G.; Aguilera, J.; Talavera, D.; Castro, M. Application and validation of algebraic methods to predict the behaviour of crystalline silicon PV modules in Mediterranean climates. Sol. Energy 2007, 81, 1396–1408. [Google Scholar] [CrossRef]
  17. Rosas-Flores, J.A.; Zenón-Olvera, E.; Gálvez, D.M. Potential energy saving in urban and rural households of Mexico with solar photovoltaic systems using geographical information system. Renew. Sustain. Energy Rev. 2019, 116, 109412. [Google Scholar] [CrossRef]
  18. Pearce, J.M.; Sommerfeldt, N. Economics of Grid-Tied Solar Photovoltaic Systems Coupled to Heat Pumps: The Case of Northern Climates of the US and Canada. Energies 2021, 14, 834. [Google Scholar] [CrossRef]
  19. Ellabban, O.; Alassi, A. Integrated Economic Adoption Model for residential grid-connected photovoltaic systems: An Australian case study. Energy Rep. 2019, 5, 310–326. [Google Scholar] [CrossRef]
  20. Ahmad Ludin, N.; Ahmad Affandi, N.A.; Purvis-Roberts, K.; Ahmad, A.; Ibrahim, M.A.; Sopian, K.; Jusoh, S. Environmental impact and levelised cost of energy analysis of solar photovoltaic systems in selected Asia Pacific region: A cradle-to-grave approach. Sustainability 2021, 13, 396. [Google Scholar] [CrossRef]
  21. Thebault, M.; Gaillard, L. Optimization of the integration of photovoltaic systems on buildings for self-consumption—Case study in France. City Environ. Interact. 2021, 10, 100057. [Google Scholar] [CrossRef]
  22. Mellit, A.; Kalogirou, S.A. A survey on the application of artificial intelligence techniques for photovoltaic systems. In McEvoy’s Handbook of Photovoltaics; Elsevier: Amsterdam, The Netherlands, 2018; pp. 735–761. [Google Scholar]
  23. Da Silva, P.P.; Dantas, G.; Pereira, G.I.; Câmara, L.; De Castro, N.J. Photovoltaic distributed generation–An international review on diffusion, support policies, and electricity sector regulatory adaptation. Renew. Sustain. Energy Rev. 2019, 103, 30–39. [Google Scholar] [CrossRef]
  24. Obi, M.; Bass, R. Trends and challenges of grid-connected photovoltaic systems–A review. Renew. Sustain. Energy Rev. 2016, 58, 1082–1094. [Google Scholar] [CrossRef]
  25. Arfeen, Z.A.; Khairuddin, A.B.; Larik, R.M.; Saeed, M.S. Control of distributed generation systems for microgrid applications: A technological review. Int. Trans. Electr. Energy Syst. 2019, 29, e12072. [Google Scholar] [CrossRef] [Green Version]
  26. Emmanuel, M.; Rayudu, R. Evolution of dispatchable photovoltaic system integration with the electric power network for smart grid applications: A review. Renew. Sustain. Energy Rev. 2017, 67, 207–224. [Google Scholar] [CrossRef]
  27. Aleem, S.A.; Hussain, S.; Ustun, T.S. A review of strategies to increase PV penetration level in smart grids. Energies 2020, 13, 636. [Google Scholar] [CrossRef] [Green Version]
  28. Koohi-Kamali, S.; Rahim, N.A.; Mokhlis, H.; Tyagi, V.V. Photovoltaic electricity generator dynamic modeling methods for smart grid applications: A review. Renew. Sustain. Energy Rev. 2016, 57, 131–172. [Google Scholar] [CrossRef]
  29. Luthander, R.; Widén, J.; Nilsson, D.; Palm, J. Photovoltaic self-consumption in buildings: A review. Appl. Energy 2015, 142, 80–94. [Google Scholar] [CrossRef] [Green Version]
  30. Castillo-Cagigal, M.; Caamaño-Martín, E.; Matallanas, E.; Masa-Bote, D.; Gutiérrez, Á.; Monasterio-Huelin, F.; Jiménez-Leube, J. PV self-consumption optimization with storage and Active DSM for the residential sector. Sol. Energy 2011, 85, 2338–2348. [Google Scholar] [CrossRef] [Green Version]
  31. Fernández, J.M.R.; Payán, M.B.; Santos, J.M.R. Profitability of household photovoltaic self-consumption in Spain. J. Clean. Prod. 2021, 279, 123439. [Google Scholar] [CrossRef]
  32. Hassan, Q. Evaluate the adequacy of self-consumption for sizing photovoltaic system. Energy Rep. 2022, 8, 239–254. [Google Scholar] [CrossRef]
  33. Fernandez-Fuentes, M.H.; Eras-Almeida, A.A.; Egido-Aguilera, M.A. Characterization of technological innovations in photovoltaic rural electrification, based on the experiences of Bolivia, Peru, and Argentina: Third generation solar home systems. Sustainability 2021, 13, 3032. [Google Scholar] [CrossRef]
  34. Ridha, H.M.; Gomes, C.; Hizam, H.; Ahmadipour, M.; Heidari, A.A.; Chen, H. Multi-objective optimization and multi-criteria decision-making methods for optimal design of standalone photovoltaic system: A comprehensive review. Renew. Sustain. Energy Rev. 2021, 135, 110202. [Google Scholar] [CrossRef]
  35. Linssen, J.; Stenzel, P.; Fleer, J. Techno-economic analysis of photovoltaic battery systems and the influence of different consumer load profiles. Appl. Energy 2017, 185, 2019–2025. [Google Scholar] [CrossRef]
  36. Li, Y.; Zhang, X.; Gao, W.; Xu, W.; Wang, Z. Operational performance and grid-support assessment of distributed flexibility practices among residential prosumers under high PV penetration. Energy 2022, 238, 121824. [Google Scholar] [CrossRef]
  37. Kästel, P.; Gilroy-Scott, B. Economics of pooling small local electricity prosumers—LCOE & self-consumption. Renew. Sustain. Energy Rev. 2015, 51, 718–729. [Google Scholar]
  38. Seo, H.; Suh, J. A review of smartphone applications for solar photovoltaic use: Current status, limitations, and future perspectives. Appl. Sci. 2021, 11, 2178. [Google Scholar] [CrossRef]
  39. Bermejo, J.F.; Fernández, J.F.G.; Polo, F.O.; Márquez, A.C. A Review of the Use of Artificial Neural Networks Models for Energy and Reliability Prediction. A Study for the Solar PV, Hydraulic and Wind Energy Sources. Appl. Sci. 2019, 9, 1844. [Google Scholar] [CrossRef] [Green Version]
  40. Luque, A.; Hegedus, S. Handbook of Photovoltaic Science and Engineering; John Wiley & Sons: Hoboken, NJ, USA, 2011. [Google Scholar]
  41. De la Parra, I.; Muñoz, M.; Lorenzo, E.; García, M.; Marcos, J.; Martínez-Moreno, F. PV performance modelling: A review in the light of quality assurance for large PV plants. Renew. Sustain. Energy Rev. 2017, 78, 780–797. [Google Scholar] [CrossRef] [Green Version]
  42. Almonacid-Olleros, G.; Almonacid, G.; Fernández-Carrasco, J.; Quero, J.M. Opera. DL: Deep Learning Modelling for Photovoltaic System Monitoring. In Proceedings of the Multidisciplinary Digital Publishing Institute Proceedings, Toledo, Spain, 2–5 December 2019; Volume 31, p. 50. [Google Scholar]
  43. Rajagukguk, R.A.; Ramadhan, R.A.; Lee, H.J. A review on deep learning models for forecasting time series data of solar irradiance and photovoltaic power. Energies 2020, 13, 6623. [Google Scholar] [CrossRef]
  44. Massaoudi, M.; Chihi, I.; Abu-Rub, H.; Refaat, S.S.; Oueslati, F.S. Convergence of photovoltaic power forecasting and deep learning: State-of-art review. IEEE Access 2021, 9, 136593–136615. [Google Scholar] [CrossRef]
  45. Medina-Quero, J.M.; Medina, M.Á.L.; Hidalgo, A.S.; Espinilla, M. Predicting the urgency demand of copd patients from environmental sensors within smart cities with high-environmental sensitivity. IEEE Access 2018, 6, 25081–25089. [Google Scholar] [CrossRef]
  46. Medina-Quero, J.; Zhang, S.; Nugent, C.; Espinilla, M. Ensemble classifier of long short-term memory with fuzzy temporal windows on binary sensors for activity recognition. Expert Syst. Appl. 2018, 114, 441–453. [Google Scholar] [CrossRef]
  47. Mocanu, E.; Nguyen, P.H.; Gibescu, M.; Kling, W.L. Deep learning for estimating building energy consumption. Sustain. Energy Grids Netw. 2016, 6, 91–99. [Google Scholar] [CrossRef]
  48. Wang, Y.; Chen, Y.; Liu, H.; Ma, X.; Su, X.; Liu, Q. Day-Ahead Photovoltaic Power Forcasting Using Convolutional-LSTM Networks. In Proceedings of the 2021 3rd Asia Energy and Electrical Engineering Symposium (AEEES), Chengdu, China, 26–29 March 2021; pp. 917–921. [Google Scholar]
  49. Huang, C.J.; Kuo, P.H. A deep cnn-lstm model for particulate matter (PM2. 5) forecasting in smart cities. Sensors 2018, 18, 2220. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  50. Pan, S.J.; Yang, Q. A survey on transfer learning. IEEE Trans. Knowl. Data Eng. 2009, 22, 1345–1359. [Google Scholar] [CrossRef]
  51. Asgarian, A.; Sobhani, P.; Zhang, J.C.; Mihailescu, M.; Sibilia, A.; Ashraf, A.B.; Taati, B. A hybrid instance-based transfer learning method. arXiv 2018, arXiv:1812.01063. [Google Scholar]
  52. Yao, Y.; Doretto, G. Boosting for transfer learning with multiple sources. In Proceedings of the 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, San Francisco, CA, USA, 13–18 June 2010; pp. 1855–1862. [Google Scholar]
  53. Meir, B.E.; Michaeli, T. Joint auto-encoders: A flexible multi-task learning framework. arXiv 2017, arXiv:1705.10494. [Google Scholar]
  54. Kieffer, B.; Babaie, M.; Kalra, S.; Tizhoosh, H.R. Convolutional neural networks for histopathology image classification: Training vs. using pre-trained networks. In Proceedings of the 2017 Seventh International Conference on Image Processing Theory, Tools and Applications (IPTA), Montreal, QC, Canada, 28 November–1 December 2017; pp. 1–6. [Google Scholar]
  55. Fawaz, H.I.; Forestier, G.; Weber, J.; Idoumghar, L.; Muller, P.A. Transfer learning for time series classification. In Proceedings of the 2018 IEEE International Conference on Big Data (Big Data), Seattle, WA, USA, 10–13 December 2018; pp. 1367–1376. [Google Scholar]
  56. Romeu, P.; Zamora-Martínez, F.; Botella-Rocamora, P.; Pardo, J. Time-series forecasting of indoor temperature using pre-trained deep neural networks. In International Conference on Artificial Neural Networks; Springer: Berlin/Heidelberg, Germany, 2013; pp. 451–458. [Google Scholar]
  57. Zhou, S.; Zhou, L.; Mao, M.; Xi, X. Transfer learning for photovoltaic power forecasting with long short-term memory neural network. In Proceedings of the 2020 IEEE International Conference on Big Data and Smart Computing (BigComp), Busan, Korea, 19–22 February 2020; pp. 125–132. [Google Scholar]
  58. Mellit, A.; Tina, G.M.; Kalogirou, S.A. Fault detection and diagnosis methods for photovoltaic systems: A review. Renew. Sustain. Energy Rev. 2018, 91, 1–17. [Google Scholar] [CrossRef]
  59. Kazem, H.A.; Yousif, J.; Chaichan, M.T.; Al-Waeli, A.H. Experimental and deep learning artificial neural network approach for evaluating grid-connected photovoltaic systems. Int. J. Energy Res. 2019, 43, 8572–8591. [Google Scholar] [CrossRef]
  60. Mellit, A.; Kalogirou, S. Artificial intelligence and internet of things to improve efficacy of diagnosis and remote sensing of solar photovoltaic systems: Challenges, recommendations and future directions. Renew. Sustain. Energy Rev. 2021, 143, 110889. [Google Scholar] [CrossRef]
  61. Ding, S.; Yang, Q.; Li, X.; Yan, W.; Ruan, W. Transfer learning based photovoltaic module defect diagnosis using aerial images. In Proceedings of the 2018 International Conference on Power System Technology (POWERCON), Guangzhou, China, 6–8 November 2018; pp. 4245–4250. [Google Scholar]
  62. Akram, M.W.; Li, G.; Jin, Y.; Chen, X.; Zhu, C.; Ahmad, A. Automatic detection of photovoltaic module defects in infrared images with isolated and develop-model transfer deep learning. Sol. Energy 2020, 198, 175–186. [Google Scholar] [CrossRef]
  63. Peirelinck, T.; Kazmi, H.; Mbuwir, B.V.; Hermans, C.; Spiessens, F.; Suykens, J.; Deconinck, G. Transfer learning in demand response: A review of algorithms for data-efficient modelling and control. Energy AI 2022, 7, 100126. [Google Scholar] [CrossRef]
Figure 1. Sample row from the Univer data file: time (timestamp), Global irradiance (G_I), Ambient temperature (Tamb), Module temperature (Tmod), Output Power (PA).
Figure 1. Sample row from the Univer data file: time (timestamp), Global irradiance (G_I), Ambient temperature (Tamb), Module temperature (Tmod), Output Power (PA).
Sustainability 14 03092 g001
Figure 2. Sample row from the SolarTech data file: time, Output Power (PV_Power), Ambient temperature (T_air), global horizontal irradiance (G_h), Global irradiance measured (G_tilt), wind speed (W_s), wind direction (W_d).
Figure 2. Sample row from the SolarTech data file: time, Output Power (PV_Power), Ambient temperature (T_air), global horizontal irradiance (G_h), Global irradiance measured (G_tilt), wind speed (W_s), wind direction (W_d).
Sustainability 14 03092 g002
Figure 3. Segmentation of a sensor stream defined by sliding temporal windows.
Figure 3. Segmentation of a sensor stream defined by sliding temporal windows.
Sustainability 14 03092 g003
Figure 4. (A) Bare learning, (B) external learning and (C) fine-tuned learning approaches.
Figure 4. (A) Bare learning, (B) external learning and (C) fine-tuned learning approaches.
Sustainability 14 03092 g004
Figure 5. Model training and validation history showing the loss function (MSE) for bare learning and fine-tuned scenarios in the SolarTech context.
Figure 5. Model training and validation history showing the loss function (MSE) for bare learning and fine-tuned scenarios in the SolarTech context.
Sustainability 14 03092 g005
Table 1. Configurations of Convolutional Neural Networks.
Table 1. Configurations of Convolutional Neural Networks.
3CNN + 2LSTM
2 kernels × 16 filters
Re-Lu
2 kernels × 32 filters
Re-Lu
2 kernels × 64 filters
Re-Lu
dropout (0.25)
LSTM (32 units)
dropout (0.25)
LSTM (32 units)
dropout (0.25)
connected (1 unit)
activation function: Re-Lu
loss function: MSE
Table 2. Domain combinations and error metrics in the SolarTech context.
Table 2. Domain combinations and error metrics in the SolarTech context.
ContextDomain CombinationPre-TrainingTrainingValidationNMSE (%)NMAE (%)
SolarTech(A1) Bare learningN/ASolarTechSolarTech0.091.50
(B1) External learningN/AUniverSolarTech0.343.22
(C1) Fine-tuned learningUniverSolarTechSolarTech0.060.94
Table 3. Domain combinations and error metrics in the Univer context.
Table 3. Domain combinations and error metrics in the Univer context.
ContextDomain CombinationPre-TrainingTrainingValidationNMSE (%)NMAE (%)
Univer(A2) Bare learningN/AUniverUniver0.151.93
(B2) External learningN/ASolarTechUniver5.813.56
(C2) Fine-tuned learningSolarTechUniverUniver0.101.63
Table 4. Domain combinations and total error.
Table 4. Domain combinations and total error.
ContextDomain CombinationPre-TrainingTrainingValidationP Max (W)RMSE (W)MAE (W)
SolarTech(A1) Bare learningN/ASolarTechSolarTech242.68 7.28 3.64
(B1) External learningN/AUniverSolarTech 14.15 7.81
(C1) Fine-tuned learningUniverSolarTechSolarTech 5.94 2.28
Univer(A2) Bare learningN/AUniverUniver28,472.30 1102.73 549.52
(B2) External learningN/ASolarTechUniver 6862.95 1013.61
(C2) Fine-tuned learningSolarTechUniverUniver 900.37 464.10
Table 5. Domain combinations and learning rate in the SolarTech context.
Table 5. Domain combinations and learning rate in the SolarTech context.
ContextDomain CombinationPre-TrainingTrainingValidationNMSE < 1 (Epoch)NMSE < 0.1 (Epoch)
SolarTech(A1) Bare learningN/ASolarTechSolarTech739
(C1) Fine-tuned learningUniverSolarTechSolarTech17
Table 6. Domain combinations and learning time in the SolarTech context.
Table 6. Domain combinations and learning time in the SolarTech context.
ContextDomain CombinationPre-TrainingTrainingValidationTraining Time (s)
SolarTech(A1) Bare learningN/ASolarTechSolarTech81.82
(C1) Fine-tuned learningUniverSolarTechSolarTech40.43
Table 7. Domain combinations and error metrics in the India context.
Table 7. Domain combinations and error metrics in the India context.
ContextDomain CombinationPre-TrainingTrainingValidationNMSE (%)NMAE (%)
India(A3) Bare learningN/AIndiaIndia0.343.08
(B3) External learningN/AUniverIndia0.453.67
(C3) Fine-tuned learningUniverIndiaIndia0.111.68
Table 8. Error metrics for different contexts.
Table 8. Error metrics for different contexts.
ContextDomain CombinationPre-TrainingTrainingValidationP Max (W)RMSE (W)MAE (W)
India(A3) Bare learningN/AIndiaIndia14,312.71843.50440.41
(B3) External learningN/AUniverIndia910.23483.28
(C3) Fine-tuned learningUniverIndiaIndia484.06241.00
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Almonacid-Olleros, G.; Almonacid, G.; Gil, D.; Medina-Quero, J. Evaluation of Transfer Learning and Fine-Tuning to Nowcast Energy Generation of Photovoltaic Systems in Different Climates. Sustainability 2022, 14, 3092. https://doi.org/10.3390/su14053092

AMA Style

Almonacid-Olleros G, Almonacid G, Gil D, Medina-Quero J. Evaluation of Transfer Learning and Fine-Tuning to Nowcast Energy Generation of Photovoltaic Systems in Different Climates. Sustainability. 2022; 14(5):3092. https://doi.org/10.3390/su14053092

Chicago/Turabian Style

Almonacid-Olleros, Guillermo, Gabino Almonacid, David Gil, and Javier Medina-Quero. 2022. "Evaluation of Transfer Learning and Fine-Tuning to Nowcast Energy Generation of Photovoltaic Systems in Different Climates" Sustainability 14, no. 5: 3092. https://doi.org/10.3390/su14053092

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop