Content uploaded by Alexander Jung
Author content
All content in this area was uploaded by Alexander Jung on Jul 29, 2019
Content may be subject to copyright.
PREDICTIVE MAINTENANCE OF PHOTOVOLTAIC PANELS VIA DEEP LEARNING
Timo Huuhtanen, Alexander Jung
Department of Computer Science,
Aalto University, Espoo, Finland
firstname.lastname@aalto.fi
ABSTRACT
We apply convolutional neural networks (CNN) for monitoring the
operation of photovoltaic panels. In particular, we predict the daily
electrical power curve of a photovoltaic panel based on the power
curves of neighboring panels. An exceptionally large deviation be-
tween predicted and actual (observed) power curve can be used to
indicate a malfunctioning panel. The problem is quite challenging
because the power curve depends on many factors such as weather
conditions and the surrounding objects (causing shadows with a reg-
ular time pattern). We demonstrate, by means of numerical exper-
iments, that the proposed method is able to predict accurately the
power curve of a functioning panel. Moreover, the proposed ap-
proach outperforms the existing approaches that are based on simple
interpolation filters.
Index Terms—machine learning, convolutional neural net-
works, photovoltaic panels, wireless sensor networks, predictive
maintenance
1. INTRODUCTION
The deployment of photovoltaic (PV) power plants has increased
significantly in recent years. The growth of number and size of PV
power plants also raises the importance of predictive maintenance.
Optimal power production requires monitoring of each individual
PV panel. A typical monitoring system consists of sensors connected
to each PV panels measuring the electrical power production of each
panel as function of time, i.e. the power curve. The power mea-
surements are collected by a wireless sensor network (WSN) and
then analyzed using data mining tools. PV monitoring systems have
been studied during the past decade [1], [2], [3] and also commercial
systems exist [4], [5], [6]. The ultimate goal of predictive mainte-
nance is to identify malfunctioning PV panels. However, the cur-
rent monitoring systems focus merely on collecting and visualizing
operational data. We introduce an algorithm which detects a mal-
functioning PV panel based on the power measurement history data
(time-series of the power measurements) of the target panel and the
neighboring panels.
The problem is challenging because of the large dynamic varia-
tion in the power measurements of functioning panels. These varia-
tions throughout ”normal” or functioning operations are due to sev-
eral factors, e.g.
F1 The power generated at a certain time is proportional to the
solar irradiance received by the panel. The irradiance varies
due to seasons and daytime depending on the geographical
location and precise position (orientation) of the panel. How-
ever, these variations can in principle be calculated explicitly.
Moreover, these factors are strongly correlated for panels of
the same type and which are located close to each other.
Fig. 1. Samples of measured solar panel power curves of the target
panel and two neighboring panels.
F2 The local weather (e.g., cloud intensity) has a strong influ-
ence on the amount of power generated by the panel. The
maximum power on a sunny day can be close to the maxi-
mum nominal power of the panel while the maximum power
on cloudy day may be less than 20% of the nominal power.
Weather predictions are not accurate enough to predict the
output power of a single PV panel in each moment of time
[7]. This causes large and somewhat unpredictable variations
especially in geographical areas where partly cloudy days are
common [8].
F3 Normally the power curves of close-by panels are very close
to each other in a fully cloudy weather, or in sunshine with-
out shadows. However, nearby objects (trees, buildings, etc.)
may cause shadows to fall on the panels individually. This
causes large differences between adjacent panels and it oc-
curs regularly at certain daytimes (due to the position of the
sun).
F4 Malfunctioning panels may cause gradual or fast drops for the
amount of generated power.
In Fig. 1, we illustrate the power curves obtained for three simi-
lar adjacent panels where factors F1-F3 are present. During the first
part of the curve (until time index t≈265) the weather has been
cloudy and the measurements of the three panels follow each other
very closely. For times t > 265, the weather has become sunny and
shadows of nearby objects falling individually on each panel cause
the power curves to differ from each other significantly. Our main
interest is in accurate differentiation between changes due to factors
F1-F3 or factor F4, i.e. identification of malfunctioning panels.
Anomaly detection using WSN has been studied extensively [9],
[10], [11], [12], [13]. Artificial neural networks (ANN) have also
been used in processing the data from WSNs [14]. However, pre-
dictive maintenance of PV based power plants sets some special re-
quirements for these methods and this application area has received
little attention so far. ANNs have been used in the context of PV but
the aim has been to create forecasts for produced PV power - for the
purpose of power grid balancing [7], [15], [16], [17]. In this paper,
we study whether deep neural networks can be applied in predictive
maintenance of PV panels. To the best of our knowledge, the prob-
lem of predictive maintenance for PV systems has not been earlier
tackled using deep learning methods.
2. PROBLEM SETUP
We consider predictive maintenance as a classification problem, i.e.,
we classify each panel as ’functioning’ or ’malfunctioning’. The
classification is based on the measured power curves. What hinders
a naive application of standard classifiers (e.g., naive Bayes or lo-
gistic regression) is the lack of large amounts of training data from
malfunctioning panels since panel faults are rare. Instead, we follow
the approach described in [10], [11], [12] and do anomaly detection
by comparing the actual power curve measured at a particular panel
with the predicted power curve based on the neighboring panels. A
large deviation between actual and predicted power curves indicates
a malfunctioning panel. Our problem then becomes to find the best
predictor for the power of the target panel using the power values of
the neighboring panels. In this study, all our data is from fully func-
tional panels and we aim at constructing a reliable predictor. The
actual measurements of the target panel are known and can be used
as training and test data for the predictor. In this paper we focus on
neural network based estimators [18].
The power measurements of one panel form a time series
P(t, d, s), where tis time of the day (in minutes), dcorresponds to
the date and sis the spatial location of the panel. Such sequential
data is usually processed with Recurrent Neural Networks (RNN)
or Long Short-Term Memory (LSTM) Networks [18]. However,
those methods have challenges with long-term dependencies [18]:
the gradient values tend to disappear or explode. This is relevant
also in our case, because we have long time-dependencies (due to
the regular daily pattern of the power curves). Additionally, these
methods do not consider absolute time but only treat time relative to
the current instance of time. In our application, however, the signal
is very much dependent on absolute time: the daily power curve
has a quite regular daily shape - from sunrise to sunset - as referred
in factor F1 mentioned in Section 1. Thus, instead of single power
measurements, we take the daily power curve as our input. The input
data can be considered as 2-dimensional signal, one dimension rep-
resenting the time of the day tand a second dimension representing
the spatial location of the panel s.
Our task in this paper is then to find a predictor ˆ
Pfor the power
curve of the target panel in location starget based on the panels in
its spatial neighborhood s∈ V,
ˆ
P(t, d, starget ) = f(P(t, d, s)); s∈ V (1)
which minimizes the mean square error
E=1
T·D
T−1
X
t=0
D−1
X
d=0
(ˆ
P(t, d, starget )−P(t, d, starget ))2(2)
In the spatial domain, we limit the input to our interpolation to
power measurements of the neighboring panels of our target panel.
On one hand we want to keep the algorithm simple, on the other hand
physical reasons suggest that this small neighborhood is sufficient
- the closest neighbors yield all the relevant information about the
illumination of our target panel.
3. CNN BASED PREDICTIVE MAINTENANCE
Convolutional Neural Networks (CNN) have been successful in find-
ing patterns in 2-dimensional signals. Since our input data (cf. (1))
is actually 2-dimensional, we focus in this paper in the derivatives of
CNNs in solving our target problem.
The next step is to select the architecture to be used, i.e. the num-
ber and type of the layers to be used in the CNN. Because we only
have a limited amount of available real-life data, we try to keep the
amount of model parameters reasonable to avoid overfitting. On the
other hand, we need to have an architecture which has enough power
to model the complexity of the function to be estimated. As a com-
promise between these requirements, we limit our considerations in
this paper to two-layer CNN architectures. The design choice for the
types of layers can be split into two parts:
1. How to calculate the local interpolators (based on the input
values in the close time-space neighborhood) for the target
panel? The problem suggests the use of convolutional layer
for the first layer as also used in [19] and [20].
2. How to combine the local interpolators in the second layer?
A standard method is to use convolutional layer with parame-
ter sharing, which means that the combining is done the same
way at all times of the day - i.e. our system is time-invariant.
However, in this application we have phenomena depending
on absolute time of the day; e.g. regular shadows falling on
a panel e.g. every day between 10 am and 12 am. A con-
volutional layer without parameter sharing can learn to take
this into account; i.e. to do the combination differently on
different time of the day. This approach is sometimes called
unshared convolution [21].
In what follows we consider two options for the overall archi-
tecture are
•Two fully convolutional layers (CC)
•Fully convolutional first layer, unshared convolution for the
second layer (CUC)
The equation for fully convolutional layer is
y(t, s;l) = σ(
I−1
X
i=0
J−1
X
j=0
K−1
X
k=0
x(t−i, s −j, k)·h(i, j, k;l)) (3)
Where xis the input, yis the output, his the convolution kernel
and σis the activation function. Index k∈[0, K −1] represents
the different feature maps (inputs) from the previous layer, index
l∈[0, L −1] represents the different feature maps (outputs) in this
layer. The size of the convolution kernel is I·J·Kand there are L
different kernels. The equation for unshared convolutional layer is
y(t, s;l) = σ(
I−1
X
i=0
J−1
X
j=0
K−1
X
k=0
x(t−i, s −j, k)·h(i, j, k;l, t)) (4)
In contrast to (3), here the kernel his also a function of t.
The used hyperparameters for our methods are learning rate,
sizes of convolution kernels, batch size and number of epochs used
in the training.
As a benchmark to our methods we use a simple predictor con-
structed by calculating the average of the two adjacent panels, s0and
s1, for each time instance according to
ˆ
P(t, d, starget ) = P(t, d, s0) + P(t, d, s1)
2(5)
In what follows, we refer to the algorithm (5) as AVE. Even
though AVE is very simple, it is a reasonable interpolator when all
the panels are illuminated similarly (e.g. a fully cloudy day or a
fully sunny day with no shadows). In contrast to the simple AVE
method, the proposed CC and CUC methods are be able to model
the dynamics of the regular shadows to some extent.
(a) CC
(b) CUC
Fig. 2. The neural network architectures used in this paper.
4. NUMERICAL EXPERIMENTS
As a proof of concept, we applied the proposed method to a synthetic
dataset and to a dataset containing actual measurements collected by
sensors. Both the datasets included daily power curves of the target
panel and the two neighboring panels. The number of parameters for
CUC algorithm is proportional to the length of the daily power curve,
T- so, the length of the curve was limited to T= 400 samples at 1
minute sample interval to keep the complexity reasonable. Around
80% of the data was used as training data and the rest as test data.
The synthetic dataset has data for 1000 days where power curves
for the target panel for odd days, do, are generated with (6) and for
even days, de, with (7).
P(t, do, starget ) = 0.5·P(t, do, s0) + 0.5·P(t, do, s1)(6)
P(t, de, starget ) = 0.9·P(t, de, s0) + 0.1·P(t, de, s1)(7)
The real-life dataset consists of measurements from three adja-
cent panels during 157 days from a solar monitoring pilot system
provided by SOLA Sense Ltd.
The two variants of the algorithm (CC, CUC) were implemented
and simulated with the two datasets. The algorithm architectures are
illustrated in Figure 2 and their key hyperparameters are summarized
in Table 1.
Table 1. Key hyperparameters for CC and CUC algorithms
I J K L Calculation
1st layer 3 2 1 9 Eq. (3)
2nd layer (CC) 3 1 9 1 Eq. (3)
2nd layer (CUC) 1 1 9 1 Eq. (4)
The mean square errors of the test data set for the two algo-
rithms as well as the simple average interpolator (5) are summarized
in Table 2. Examples of power curves of one day for real data are
illustrated in Figure 3 and for synthetic data in Figure 4. Here solid
line (’target’) is the true measurement of our target panel; i.e. we aim
at getting as close to that curve as possible. Dotted line represents
the proposed algorithm (’CC’ or ’CUC’) and the ’+’ signs represent
our benchmark (’AVE’).
Table 2. Mean Square Error of different algorithms and test sets
Method CC CUC AVE
Synthetic test set 0.000037 0.000010 0.000421
Real test set 0.002589 0.002346 0.003561
Both the proposed algorithms, CC and CUC, outperformed the
benchmark significantly with the synthetic data. For real data the
difference was also clear but no longer that significant. Unshared
convolutional algorithm got the smallest test error with real data as
well as with the synthetic data. The example curve from the real
data in Figure 3 also reveals the different nature of the algorithms.
There are notches around time 180...250 where the power of the tar-
get panel drops to zero (probably caused by a shadow falling on the
target panel). The unshared convolutional algorithm could follow
this better compared to the fully convolutional algorithm and got
better result with the synthetic test set for the same reason.
The amount of real training data was relatively small for this
study. However, even with the available data we could do some inter-
esting findings regarding the behavior and performance of different
(a) CC
(b) CUC
Fig. 3. Performance of the proposed algorithms on a sample day of
the real-life test set.
algorithms. A larger training dataset would probably help to confirm
our findings. A more extensive study of different hyperparameter
values and algorithm options would probably also resulted perfor-
mance improvements.
5. CONCLUSION
According to our results, the application of CNN based methods has
potential for predictive maintenance for PV systems. Our results also
open several possibilities for further study; e.g. considering larger
(a) CC
(b) CUC
Fig. 4. Performance of the proposed algorithms on synthetic test set.
real-life datasets. Probably the performance of both the algorithms
can be improved by fine-tuning the hyperparameter values. CUC al-
gorithm can clearly predict the regular shadows and get performance
gain from that. It was also the overall winner with the real-life data.
On the other hand also CC algorithm seemed to be able to learn some
patterns of the training data with a smaller amount of parameters.
More research would be needed to understand, where this perfor-
mance gain comes from; i.e. what are the features of the data it can
learn and utilize in the prediction. An interesting option would also
be to try to combine CC and CUC algorithms into a hybrid model
having best properties of both approaches.
6. REFERENCES
[1] C. Ranhotigamage and S. C. Mukhopadhyay, “Field Trials and
Performance Monitoring of Distributed Solar Panels Using a
Low-Cost Wireless Sensors Network for Domestic Applica-
tions,” IEEE Sensors Journal, vol. 11, no. 10, pp. 2583–2590,
Oct. 2011.
[2] P. Papageorgas, D. Piromalis, K. Antonakoglou, G. Vokas,
D. Tseles, and K. G. Arvanitis, “Smart Solar Panels: In-situ
Monitoring of Photovoltaic Panels based on Wired and Wire-
less Sensor Networks,” Energy Procedia, vol. 36, pp. 535–545,
Jan. 2013.
[3] P. Guerriero, F. Di Napoli, G. Vallone, V. d’Alessandro, and
S. Daliento, “Monitoring and diagnostics of PV plants by
a wireless self-powered sensor for individual panels,” IEEE
Journal of Photovoltaics, vol. 6, no. 1, pp. 286–294, 2016.
[4] “http://www.solaredge.com/,” .
[5] “http://www.tigoenergy.com/,” .
[6] “http://www.solasense.fi/,” .
[7] J. Antonanzas, N. Osorio, R. Escobar, R. Urraca, F. J.
Martinez-de Pison, and F. Antonanzas-Torres, “Review of pho-
tovoltaic power forecasting,” Solar Energy, vol. 136, pp. 78–
111, Oct. 2016.
[8] K. Lappalainen and S. Valkealahti, “Photovoltaic mismatch
losses caused by moving clouds,” Solar Energy, vol. 158, pp.
455–461, 2017.
[9] M. A. Alsheikh, S. Lin, D. Niyato, and H. P. Tan, “Machine
Learning in Wireless Sensor Networks: Algorithms, Strategies,
and Applications,” IEEE Communications Surveys Tutorials,
vol. 16, no. 4, pp. 1996–2018, 2014.
[10] Y. Zhang, N. Meratnia, and P. Havinga, “Outlier Detection
Techniques for Wireless Sensor Networks: A Survey,” IEEE
Communications Surveys Tutorials, vol. 12, no. 2, pp. 159–
170, 2010.
[11] M. Markou and S. Singh, “Novelty detection: a reviewpart 1:
statistical approaches,” Signal Processing, vol. 83, no. 12, pp.
2481–2497, Dec. 2003.
[12] M. Markou and S. Singh, “Novelty detection: a reviewpart 2:
neural network based approaches,” Signal Processing, vol. 83,
no. 12, pp. 2499–2521, Dec. 2003.
[13] H.H.W.J. Bosman, G. Iacca, A. Tejada, H. J. Wrtche, and
A. Liotta, “Spatial anomaly detection in sensor networks using
neighborhood information,” Information Fusion, vol. 33, pp.
41–56, Jan. 2017.
[14] F. Oldewurtel and P. Mahonen, “Neural Wireless Sensor Net-
works,” in International Conference on Systems and Networks
Communications, 2006. ICSNC ’06, Oct. 2006, pp. 28–28.
[15] J. Shi, W. J. Lee, Y. Liu, Y. Yang, and P. Wang, “Forecast-
ing Power Output of Photovoltaic Systems Based on Weather
Classification and Support Vector Machines,” IEEE Transac-
tions on Industry Applications, vol. 48, no. 3, pp. 1064–1069,
May 2012.
[16] Muhammad Qamar Raza, Mithulananthan Nadarajah, and
Chandima Ekanayake, “On recent advances in PV output
power forecast,” Solar Energy, vol. 136, pp. 125–144, Oct.
2016.
[17] Florian Barbieri, Sumedha Rajakaruna, and Arindam Ghosh,
“Very short-term photovoltaic power forecasting with cloud
modeling: A review,” Renewable and Sustainable Energy Re-
views, vol. 75, pp. 242–263, Aug. 2017.
[18] I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning,
MIT Press, 2016.
[19] J. Yang, M. N. Nguyen, P. P. San, X. Li, and S. Krishnaswamy,
“Deep Convolutional Neural Networks on Multichannel Time
Series for Human Activity Recognition.,” in IJCAI, 2015, pp.
3995–4001.
[20] F. J. Ordez and D. Roggen, “Deep Convolutional and LSTM
Recurrent Neural Networks for Multimodal Wearable Activity
Recognition,” Sensors, vol. 16, no. 1, pp. 115, Jan. 2016.
[21] Yann LeCun, “Generalization and network design strategies,”
Connectionism in perspective, pp. 143–155, 1989.