Nomenclature
AbbreviationExpansionBias (threshold) value for hidden neuron j | |
Parallel capacitance which models the junction capacitance and the diffusion capacitance of the PV panel | |
Error vector containing the output errors for each input vector used on training the network | |
Total number of inputs of neuron | |
Non-normalized training input value | |
Output current of PV array (A) | |
Output current of solar cell (A) | |
Photocurrent (A) | |
Diode saturation current (A) | |
Identity matrix | |
Maximum value for the input vector I | |
Minimum value for the input vector I | |
Normalized training input value | |
Photovoltaic current (A) | |
Actual sensed PV panel current (A) | |
Jacobian matrix | |
KB | Boltzmann’s constant (J/K) |
Number of cells in parallel | |
Number of cells in series | |
Non-normalized training output value | |
Maximum value for the output vector O | |
Minimum value for the output vector O | |
Normalized training output value | |
Photovoltaic power (W) | |
Maximum power (W) | |
Actual sensed PV panel power (W) | |
Reference HPV output power (W) | |
Simulink neural network predicted power (W) | |
Electron charge (Coulombs) | |
Parallel resistance ( | |
Series resistance ( | |
Parallel resistance which models the photocurrent and diode dynamics | |
Cell’s absolute temperature (K) | |
Output voltage of PV array (V) | |
Output voltage of solar cell (V) | |
Actual sensed PV panel voltage (V) | |
Diode thermal voltage (V) | |
Cell’s open circuit voltage (V) | |
Weight connection between neuron i in the input layer and neuron j in the hidden layer | |
The value of neuron i in the input layer | |
Net weighted input for hidden neuron j | |
Actual output for hidden neuron j | |
Vector of the | |
Vector of | |
Diode ideality factors | |
Learning rate | |
ANN | Artificial Neural Network |
BP | Back Propagation |
FFNN | Feedforward Neural Network |
GRNN | General Regression Neural Network |
HPV | Heterogeneous Photovoltaic |
IoT | Internet of Things |
IP | Internet Protocol |
I2C | Inter-Integrated Circuit |
MLP | Multi-layer Perceptron |
MSE | Mean Square Error |
PV | Photovoltaic |
RTC | Real-Time Clock |
STC | Standard Test Conditions |
SPI | Serial Peripheral Interface |
TCP | Transmission Control Protocol |
Introduction
The fast-ever-growing energy demands and the global environmental issues necessitate the use of renewable resources. Among renewable energy yielding technologies, photovoltaic (PV) panels are of the greatest future projection. PV panels show many promising advantages such as high reliability, low maintenance cost, simple installation, and zero fuel cost [1].
Since few years ago, the contribution of solar PV energy increased remarkably compared to the previous four decades. Nowadays, PV energy represents the third-largest source of renewable energy after wind and hydro [2].
To produce an acceptable amount of power, one must install many PV panels in arrays. Due to the different environmental conditions, the output of a PV panel degrades overtime. The degradation does not necessarily mean a faulty PV panel but may sometime mean a dust-covered PV panel. In either case, PV array must be maintained to ensure maximum power production. Hence, the opportunities for improvement in this sector depend not only on the level of installed capacity, but also on the need to address the challenges of technological progress that allow producers to improve production in order to reduce generation costs. Moreover, consumer requirements have increased the demands on the quality and the reliability of the generated power. This could be achieved by optimizing the PV system performance and by eliminate any degradation at early stage. As a result, one should immediately repair any detected failure, or yield degradation in any PV panel regardless of which system they operate.
In order to carry out these objectives, a smart monitoring system is required. This monitoring system has to monitor the input and the output of each PV panel in real time. Using the monitored data, the monitoring system has to decide whether there is a degradation in a PV panel output performance. This is not a trivial task, especially when the normal behavior and the output power of a PV panel depend on the environmental conditions. Therefore, in order for a monitoring system to decide if maintenance is required for a PV panel, it has to be smart enough to predict the normal behavior and the output power of that PV panel under the current set of environmental conditions. In the case of a PV panel output degradation, the monitoring system should identify the source of degradation and make an automated notification so that maintenance can be carried out.
To build an effective PV monitoring system, one should understand the challenges of the system. First, the output of a PV panel varies according to the state of the weather. That is, the output of a PV panel varies from a clear sunny day to that on a cloudy day. Second, the actual output of a PV panel, as with any other system, does not always match the specifications of the manufacturer. Third, other weather conditions, such as humidity, PV panel body temperature, and mounting angle may affect PV panel output to some extent. In other words, some variations to a PV panel output may appear to be a degradation, which requires maintenance, but in fact it is a normal behavior of that PV panel. An intelligent PV panel monitoring system should know the difference between normal variations in the output of a PV panel from that of a PV panel which needs maintenance. Moreover, the monitoring system should exactly identify the PV panel in need of maintenance.
In this paper, we introduce a novel low-cost intelligent PV monitoring embedded system that has a promising potential in addressing the above challenges. The introduced monitoring system uses a small but efficient artificial neural network. This artificial neural network enables the monitoring system to predict the normal operation of a PV panel under a set of environmental conditions. The control process is carried out by the real time monitoring of each individual PV panel output. In addition, the monitoring system collects input data about the current environmental conditions. The monitoring system uses the input data to predict the normal output of a PV panel using an intelligent reference model build based on artificial neural networks. Comparing both the predicted output and the real output of a PV panel, the monitoring system can decide if maintenance is required for that PV panel. The monitoring system is designed to automate the process of maintenance request by sending a notification over the internet to a predefined administrator or maintenance company. The process of monitoring needs not to have any PV panel isolation or removal from the whole PV panels system.
As the term Internet of things (IoT) is spreading, there is a huge increase in applications such as intelligent city, smart home, and so on [3]. The IoT reduces the effort of human by introducing machine to machine interaction, which are applied to facilitate the management of various system modules [4], [5]. Hence in this study, to ensure the reliability and continuity of the proposed system, the discussed monitoring system uses the internet to connect to remote services that include a cloud database for data logging. This allows for online real-time logging and monitoring of the PV panel’s environmental conditions and data. Moreover, this will also facilitate for any future configuration update.
This paper consists from the following sections: section II discusses the related work done over the last few years on similar proposed systems and points out the strengths and weaknesses of these systems in comparison to our monitoring system. Section III, Introduces our intelligent monitoring system design and implementation. In section IV, the mathematical module behind the artificial neural network PV reference model is discussed. Section V, shows how the reference model is implemented on low cost microcontroller. Finally, section VI presents the results and conclude the paper work.
Related Work
Over the last years, much research has been carried out related to PV panels monitoring system [6]–[10]. For example, Allafi and Iqbal [11], implemented a low-cost web server using ESP32 for real-time photovoltaic data collection with manual monitoring from user. The proposed system did not support any intelligent decision or notification with a total cost of $121.14 that supports three PV panels. Haba [12], presented a system for collecting data from the photovoltaic parks. The data was collected from the PV park devices, measurement systems in the region of the park (weather stations) and from data sources accessible on the Internet. Ayesh et al. [13] designed a wireless sensor network for measuring the performance of photovoltaic panels. Bikrat et al. [14], proposed an electronic system for PV power station to gather the information from the inverters via Bluetooth protocol. The data then transferred to a control machine through the network using Wi-Fi. Suryono and Khuriati [15], designed a system that acquires data from sensors. Results of these measurements are sent to the database computer with the help of the TCP/IP protocol using an Ethernet board and via a Wi-Fi radio. Despite the different techniques proposed in the previous studies to monitor the efficiency of the PV system, there has been no evidence of any used analytical process on the collected data. Analytical model is important in order to extract relevant information that can improve operation conditions of the PV system.
Hence, over the recent years, researchers have developed different techniques to help analyze the collected PV data for early fault detection. Han et al. [16], developed a monitoring system to monitor four PV panels simultaneously. For the fault detection they use the mean voltage of PV panels and voltage drop threshold. Poon et al. [17], designed a mathematical method for photovoltaic condition monitoring and hot-spot detection. They track the parameters (
This paper introduces an intelligent reference analytical module for real-time individual photovoltaic panel monitoring based on the artificial neural network. In the following sections, we discuss the system overall implementation, the mathematical module behind its intelligent reference model, and its hardware implementation.
Intelligent Monitoring System Design
To harness enough energy, many PV panels should be installed in arrays. The output of a PV panel depends mainly on irradiance and temperature. However, PV panels differ from one another by manufacturing properties characterized by their open circuit voltage (
An illustration showing the complete PV panel system with sensors, data logging, and monitoring system.
A current sensor; namely ACS712, and a voltage sensor; namely a voltage divider, are used for each PV panel (see Fig. 2 (b)). The inputs to PV panels are collected in real-time using a Pyranometer sensor; namely apogee SP-212-SS, for measuring irradiance and a temperature sensor; namely Analog Devices® ADT7420. The simplified hardware block diagram of the data logging and monitoring system is shown in Fig. 2 (a). The detailed schematics for the blocks are shown in Figs. 2 (b), (c), and (d).
(a). Simplified block diagram showing the main hardware components in the monitoring system. (b). A detailed schematic diagram for block number 1 in (a). (c). A detailed schematic diagram for block numbers 6, 7, and 8 in (a). (d). A detailed schematic diagram for block numbers 2, 3, and 5 in (a).
The simplified hardware block diagram, Fig. 2 (a), can be divided into eight main blocks numbered from 1 to 8 in the below diagram. Block number 1, detailed in Fig. 2 (b), shows how a PV panel is connected to the current sensor; ACS712, and to the voltage sensor. A typical PV panel has a maximum output current of 8A – 12A and a maximum output voltage between 30V and 45V. The used current sensor can measure current up to 30A. The voltage sensor uses a voltage divider that allows the measurement of 0V–50V to be mapped to the desired ADC input of 0V–5V with a leakage current of only
The Atmega2560 microcontroller (block number 5 in the diagram, detailed schematic is shown in Fig. 2 (d)), has free additional pins that are not shown in the schematic. These free pins allow the design to support the monitoring of up to ninety-six PV panels. This is made possible by using the 16-channel analog multiplexer; CD74HC4067 (block number 1 in the diagram, detailed schematic is shown in Fig. 2 (d)). The analog multiplexer allows the mapping of sixteen analog sensors to one analog input at the microcontroller.
The Atmega2560 microcontroller offers 16 analog input pins. Four of these analog inputs are used for interfacing other components. The remaining twelve analog inputs can be used for interfacing the multiplexers. Two multiplexers are needed to connect sixteen PV panel monitoring sensors; one for the current sensors and one for the voltage sensors, diagram blocks number 2 and 3 respectively. In total, the used microcontroller allows the system to monitor up to
The inputs to PV panels; namely the irradiance and temperature, are collected using the Pyranometer sensor and the temperature sensor, diagram blocks 6 and 7 respectively (detailed schematic shown in Fig. 2 (c)). The Pyranometer sensor is connected to the microcontroller using one analog input while the temperature sensor is connected through the I2C bus (see Fig. 2 (d)). Both of these sensors provide real time accurate measurements to the predictive PV reference module, discussed in section IV, which is implemented on the microcontroller as discussed in section V.
The monitoring system is equipped with an SD card and a real-time clock (RTC) to perform as data-logger, block number 8 (detailed schematic in Fig. 2 (c)). The SD card and the RTC are connected to the microcontroller using the SPI bus and the I2C bus respectively (shown in Fig. 2 (d)). The data-logger enables the monitoring system to save the inputs and outputs of the PV panels on an SD card. The RTC enables the stored data to be logged with an accurate data/time record. The format of a record is shown in Fig. 3.
The monitoring system collects data continuously, however, it only log data if there is a change between a previous stored record and a new collected record.
The monitoring system implements a reference model inside the microcontroller based on artificial neural networks, discussed in section IV. The reference model is used to predict the actual output of a PV panel based on the sensed inputs, irradiance and temperature, and the PV panel manufacturer’s characteristics. Because the reference model is able to predict the output of heterogeneous PV panels, the installed PV panels need not to be all of the same type.
For each PV panel sensed output values, the monitoring system predicts output values using the reference model based on the sensed inputs and the PV panel manufacture characteristics. The monitoring system compares both the sensed and the predicted values. If the difference between these values is less than 10%, the PV panel is considered in good operation mode, see section VI. Otherwise, a notification is sent through the Wi-Fi module, diagram block number 4, so maintenance is performed for that specific PV panel.
The Wi-Fi module is not only used for notification, it is also used to send the data-logger records to a remote database. These records are used for further data analysis, also for updating the training dataset. Moreover, they will facilitate the continuous improvement of the ANN reference model accuracy and adaptation. In other words, they will ensure the validity of the reference model in case of PV panel changes or future environmental change. This process is discussed in section IV.
PV Reference Module
The efficient conversion of photovoltaic energy and its early fault detection is related to the optimal modeling and design of PV system. Additionally, it is important to develop a model that is suitable for different PV panels; in order to analyze the PV panel behavior. Hence, in this section, a simple, accurate, low-cost, and fast evolutionary model is discussed, which allows the monitoring system to predict the power output of a heterogeneous PV (HPV) panel.
A. HPV Mathematical Model
The mathematical model for the HPV panel used in this work is based on the dynamic PV model developed and validated in our previous study [22], [23], The circuit of the solar cell model is shown in Fig. 4.
According to Kirchhoff’s circuit laws and to the PV cell circuit that is shown in Fig. 4, the photovoltaic current can be presented as in (1).\begin{equation*} I_{c} =I_{ph} -I_{o} \left [{ {\exp \,\,\left ({{\frac {V_{c} +I_{c} \,R_{s} }{V_{t}}} }\right)-1} }\right]-\frac {V_{c} +I_{c} \,R_{s}}{R_{p}}\tag{1}\end{equation*}
\begin{equation*} V_{t} =\frac {\alpha \;KB\;T_{c}}{q}\tag{2}\end{equation*}
The PV module consists of many PV cells connected in parallel order to increase the current and on series order to produce higher voltage. The equation for the photovoltaic current of the array becomes as in (3).\begin{align*} I_{a}=&N_{p} I_{ph} -N_{p} I_{o} \left [{ {\exp \;\left ({{\frac {1}{V_{t} }\left ({{\frac {V_{a}}{N_{s}}+\frac {I_{a} \,R_{s}}{N_{p}}} }\right)} }\right)-1} }\right] \\&\qquad \qquad \qquad \qquad \qquad \qquad -\,\frac {N_{p}}{R_{p}}\left ({{\frac {V_{p}}{R_{p}}+\frac {I_{a} \,R_{s} }{N_{p}}} }\right)\tag{3}\end{align*}
B. The HPV ANN Reference Module
A neural network is an adaptive system with many structures. Choosing a specific network structure depends on the information intended to flow through that network. Among the various structures of ANN, feedforward back propagation method was emphasized as an effective method of related modeling and prediction by previous researchers. Corani [24], applied a feedforward neural network (FFNN) for air prediction in Milan. Khatib et al. [25] developed a feedforward multilayer perception model for solar prediction in Malaysia. The authors in [26], [27] mentioned that FFNN is the best model of neural network for real-time forecasting due to the least training time and fast response. Kumari et al. [28], developed an artificial neural network for temperature prediction in India. Mellit and Pavan [29], proposed a multilayer perceptron (MLP) model with a back-propagation training algorithm for forecasting solar radiance in Italy. Saberian et al. [30] presented two types of neural networks for prediction of PV power output. Their research was based on FFNN, and general regression neural network (GRNN). Based on their research, the FFNN has shown a better performance comparing with GRNN.
A feedforward neural network is defined as a type of MLP network in which the information flow is in the forward direction. It consists of many interconnected processing nodes known as neurons. Fig. 5 shows the structure of the proposed FFNN. The neural network is used to model a heterogeneous PV panel output power and approximate the generated power.
As illustrated in Fig. 5, it consists of three layers: input, hidden, and output. The input layer is composed of three nodes; which are the cell temperature (
With a multi-layer network, where the hidden layer is sigmoid and the output layer is linear, almost any function (with a finite number of discontinuities) can be trained arbitrarily. However, if the output layer has sigmoid neurons, then the network outputs are limited to a small range.
Once the FFNN model design is constructed, the input data are gathered and fed to the model. The network is then trained to recognize the relationships between the input and output parameters.
However, before the training process, all the data must be normalized. Different normalization techniques are used for neural networks to increase the reliability of the trained network [31]. In this study, as shown in (4), the Min-Max normalization method is used:\begin{equation*} I_{N} =(I-I_{\min })\left [{ {\frac {N_{\max } -N_{\min }}{I_{\max } -I_{\min }}} }\right]+N_{\min }\tag{4}\end{equation*}
\begin{equation*} O=(O_{N} -N_{\min })\left [{ {\frac {O_{\max } -O_{\min }}{N_{\max } -N_{\min }}} }\right]+O_{\min }\tag{5}\end{equation*}
Back propagation (BP) training algorithm is widely used techniques in FFNN and is also very popular optimization task in finding an optimal weight sets during the training process. However, traditional back propagation algorithms do not function well in the biological work [32], [33]. Moreover, its calculation is extensive and, as a result, training is slow. Hence, in this work, Levenberg Marquardt based back propagation algorithm is presented. In this algorithm, the interlayer connection weight and the processing element’s thresholds and are first initialized at small random values. Then a set of 1960 training patterns were presented repeatedly to the FFNN model and weight adjustment was performed after each iteration whenever the desired output is different from the network output. This training data set covers the different temperature and solar radiation conditions that could possibly take. The data were obtained from two different PV panels, namely: Sharp’s-NUS0E3E, and Astronergy-CHSM6610P. Typical examples of the training patterns used as part of the training set are shown in Table 1.
As shown in Table 1, each set is composed of one output; the PV power, and three inputs; the solar irradiance, the temperature, and the cells
The targeted output (
During the training process we started with a learning rate of 0.001. Then, to accelerate the convergence and yet avoid the danger of instability, the learning rate was updated by applying two heuristics [32]:
If the MSE at the current epoch exceeds the previous value, then the learning rate parameter is multiplied be 10.
If the MSE is less than the previous one, then the learning rate parameter is multiplied be 0.1.
Implementation on Low Cost Microcontroller
The monitoring system is implemented on the ATmega2560 microcontroller. Many companies offer this microcontroller on a variety of kits. One particular kit, is the Robotdyn® MEGA + WiFi R3 kit. This is a low-cost kit that has onboard ESP8266 WiFi module, 32 MB flash memory, and the Atmega2650 microcontroller.
The Atmega2560 has 16 analog inputs, 54 digital I/O pins, 256KB of flash memory, and 8KB of SRAM. The monitoring system program flow diagram is shown in Fig. 7.
The monitoring system starts by reading configuration from an SD card, see section II. The configuration contains all the information about the connected PV panels. This include the index of each PV panel, the manufacturing characteristics, the WiFi connection information, the reference module parameters, and other initialization parameters. The monitoring system then tries to connect to a remote server through the WiFi module. In case of a successful connection, the monitory system synchronizes any existing data with the remote database and updates any existing configuration parameters, if required.
After configuration and initialization, the monitoring system reads the irradiance and the temperature values form the Pyranometer and the temperature sensors. These values along with the PV panels manufacture characteristics will be used by the implemented intelligent reference module.
To check each PV panel, the monitoring system reads the output of every PV panel in the system according to what is specified in the configuration. For each PV panel, the monitoring system reads the output current and the output voltage from the current and voltage sensors respectively. Then the sensed power for the PV panel is calculated as
In case there is a difference between the current and the previous reading of a PV panel, the sensed data are recorded offline on the SD card according to the format discussed in section III. When there is an active network connection these values are transferred to a remote database.
To check if a PV panel is operating normally, the monitoring system uses the PV panel characteristics (open circuit voltage) and the PV panel inputs (irradiance and temperature) to predict the reference output power
For the PV panel under test, the actual sensed PV panel power
The artificial neural network heterogeneous PV (HPV-ANN) reference module, discussed in section IV, is implemented using three layers, each of which consist of nodes called neurons. Among these neurons, the ones in the middle layer are the most time and resource consuming part of the monitoring system. These neurons, in the hidden layer, perform the calculations defined by the sigmoid function given in (6) and (7). First, it computes the net weighted input as in (7). Next, this input value is passed through the activation function as in (6).\begin{align*} Y_{j}=&\frac {2}{1+e^{-2X_{j}}}-1,\quad where~j=1,\,2,\,3,\,4,\,5.\tag{6}\\ X_{j}=&\left [{ {\sum \limits _{i=1}^{3} {x_{i} w_{ij}}} }\right]-b_{j},\quad where~j=1,\,2,\,3,\,4,\,5.\tag{7}\end{align*}
The values of
For the HPV-ANN to be implemented on a low-cost microcontroller, equations (6) and (7) are optimized for efficiency and fast response on low cost microcontrollers.
To evaluate the sigmoid function on a low-cost microcontroller with fast, efficient, and accurate response, the sigmoid function is implemented using memory mapped or look up table approach.
This approach requires the storage of the function output for each possible input. However, the inputs are examined and storage optimized for only the domain of possible inputs. The required memory size needed to store the outputs of the function for each of the possible inputs is 48KB. Fig. 8 shows the memory mapped algorithm for the sigmoid function on low cost microcontroller.
The memory mapped implementation of the sigmoid function on low cost microcontroller.
The last layer in the HPV-ANN uses the values Y1 to Y5 calculated by the middle layer to find Pr using the equations given by (8) and (9), and the constants given in Table 3.\begin{align*} Z=&\left [{ {\sum \limits _{j=1}^{5} {Y_{j} \,V_{j}}} }\right]+C_{1}\tag{8}\\ P_{r}=&C_{2} \left ({{\frac {Z}{2}} }\right)+C_{3}\tag{9}\end{align*}
The constants in Table 2 and 3 are found using the training phase of the artificial neural network reference module, see section IV. These are stored in the configuration part of the monitoring system and are updated when new training is performed using the recorded input and output data of the system. This is to ensure the learning and adaptation phase of the reference module, discussed in section IV, based on the existing PV system environment and/or the possible change in some PV panel characteristics due to a PV panel replacement or the addition of a new PV panel.
Results and Conclusion
To build an efficient neural network, one must first decide how many neurons are to be used and how the neurons are to be connected to form a network. Therefore, a trial for finding the number of nodes in the hidden layer is evaluated to find the MSE of the FFNN. Fig. 9 represents the regression value and training MSE for different numbers of hidden neurons. As illustrated the best validation performance is when the hidden layer has five nodes.
The next step is to test the network to judge its performance. To do that, 420 training cases has been entered consecutively to the network and a prediction for the PV power was obtained. Fig. 10 shows a brief comparison between the predicted results of the FFNN and the real data under different condition.
As shown in Fig. 10, the differences are very low and thus a high level of accuracy has been achieved.
The ANN PV panel reference model is then optimized for implementation on the atmega2560 microcontroller. The implementation is then tested against time and the results obtained in the neural network simulation. Fig. 11 shows that the optimized implementation gives nearly the same results as the ones obtained by simulation with accuracy of no lower than 98%. The optimized implementation is able to produce a result in an average time of 1ms using the microcontroller running at frequency of 16MHz.
Comparison between the Simulink NN model and the implemented microcontroller HPV reference model.
For further investigation, a comparison between the implemented FFNN reference model results and the real data for the power of the Astronergy solar panel in 2018 is provided in Figs. 12 (a) and (b). These figures illustrate these comparisons for February and May of 2018.
Daily average power between the real and the proposed HPV reference model during (a) February (b) May.
Solar radiation and temperature data were collected by the proposed data-logger. Data was gathered from two different PV panels. The manufacturer specifications for the PV panels under standard testing condition is shown in Table 4.
The results for these two months demonstrate the system has a good performance since the residual difference between the model prediction and the actual power is less than 0.02. Moreover, considering all error percentage sources from the sensors, obtained from each sensor datasheet, and from the model calculation error, see Table 5, the system degradation will be indicated when the residual difference is above 10%; this could be due to dust, shading, panel fault, or any other reasons that may reduce the efficiency of the PV panels.
Conclusion
In conclusion an intelligent heterogeneous PV panels monitoring system is presented with high prediction accuracy. The hardware design and implementation of the monitoring system on low cost microcontroller was discussed. The monitoring system has the ability of identifying any individual PV panel that requires maintenance with an addition cost of $5 to $35 per PV panel; the more PV panels are connected to the monitoring system, the lower is the additional cost per PV panel. The monitoring system will flag a PV panel for maintenance if the predicted output power for that PV panel, obtained from artificial neural network model, and the actual output power of that PV panel, obtained from sensors, has a percentage difference more than 10%.