Resolving challenges of monitoring PV systems: a case study for three 1.5 kW generators in Lima, Peru

This paper addresses challenges from monitoring three grid-connected PV systems with different module technologies in Lima, Peru, following the International Electrotechnical Commission (IEC) standards. Missing and erroneous data due to sensor malfunction or partial shadowing can negatively impact the measured data quality. We developed a program to automatically detect erroneous measurements, enhance the data quality, and calculate PV performance parameters following the IEC-61724 standard to resolve these challenges. The program includes mathematical methods to replace faulty or missing measurements. Finally, we present the impact of the algorithms for erroneous data detection, deletion, and correction on performance calculations.


Introduction
According to the Renewable Energy Country Attractiveness Index [1], Peru is among the five countries in Latin America with the highest potential for transitions towards renewable energy sources. Regarding solar energy [2], Peru receives one of the highest irradiation levels in the coastal region. Even in the regions with lower irradiances, the yearly solar energy received is higher than the world average. However, solar PV energy represents less than 1.5% of the electric energy fed to the national electric grid [3]. Apart from the lack of regulations for the photovoltaic (PV) energy market, Peru has another challenge for popularizing this energy source: the vast number of different climates in the national territory and the lack of knowledge of their impact on the PV energy performance. According to the Warren Thornthwaite climate classification [4], Peru has eight different natural regions. Different weather conditions substantially affect PV systems' performance, as studied in [5] and [6]. To better comprehend the effects of the Peruvian capital's coastal climate on PV technologies, three different PV systems were installed at the beginning of the year 2020 in the city of Lima, Peru. The objective is to study and evaluate the performance of PV systems with passivated emitter and rear cell (PERC), heterojunction with intrinsic thin layer (HIT) and copper indium gallium selenide (CIGS) modules. The evaluation is based on the standards proposed by the International Electrotechnical Commission (IEC) [7]- [8]. For at least one year of monitoring, more than 2 million data points need to be correctly read, filtered, replaced if needed, and finally processed for the proper evaluation to comply with the mentioned standards. Over the years, low-cost software implementations for PV analysis like the one in [9] have been presented. However, the lack of open-source software that integrates the specific requirements from the standard makes the PV system analysis and evaluation challenging. To properly implement the standard, we developed a PYTHON-based program. During the ongoing monitoring, several irregularities in the measured data were detected. These irregularities came from occasional malfunctions or failure of one of the PV systems monitoring sensors. Another source of irregularities was the presence of objects close to the installations, which caused partial shadowing. Therefore, the PYTHON-based program contains mathematical methods to detect and correct the measured points and avoid data loss.

The IEC 61724-3 standard
The IEC-61724 standards specify the equipment, measurement methods, and calculations required to evaluate PV systems properly. The standard contains three sections focused on different aspects and procedures. The third section focuses on evaluating a system based on the amount of energy produced during an extensive period. The methods presented in the IEC-61724-3 [8] were applied to study the behavior of the different PV technologies. The most important measurements required for a basic evaluation are the irradiance at the plane of array ( ) and electric power measurements like AC power and DC power. The standard defines calculations that involve each of the mentioned variables.
Equation (1) shows the performance ratio (PR) as suggested by the IEC-61724-3. This parameter is calculated by dividing the final yield of the installation ( ) by the reference yield ( ). is the AC Energy, which is obtained by integrating the AC power fed to the grid.
is the irradiation in the plane of the array, which is obtained by integrating . is the nominal power of the PV system under standard test conditions (STC), and is the irradiance under STC (1000 W/m 2 ). A system can be evaluated with the PR for different time periods (day, month, year). The IEC standard also suggests implementing filtering algorithms to detect and eliminate or replace (when possible) erroneous data, such as:  Data recorded during moments when the is lower than 20 W/m 2 .  Unreasonable values originating from failures in the measurement system.  Data with abrupt changes in both power and irradiance values. Such abrupt changes may be associated with rapid changes in irradiance, commonly under partially cloudy skies. Temporal partial shadowing on the array from surrounding objects can also cause abrupt changes and inconsistencies between power and irradiance data.  Finally, the standards suggest detecting and reviewing "dead values", i.e. consecutive measurements with identical values. Given that continuous measurement values should generally change, the latter may indicate faulty data transmission or recording. Figure 1 shows the three PV systems, HIT, PERC and CIGS, installed at the Outdoor-PV Laboratory at the Pontificia Universidad Católica del Perú (PUCP) in Lima, Peru. Table 1 describes the characteristics of each system. The electrical parameters are obtained directly from the inverter by a monitoring computer. We simultaneously measure the plane of array irradiance using an EKO MS-80 pyranometer [10]. The measurements of DC power, AC power and are recorded in 1-minute intervals and saved in a cloud.  Figure 2 shows the implemented software interface for the data reading, filtering, replacing (when needed), and performance parameter calculations. The user can define several characteristics of the calculations. The first one is the time range to evaluate, with the option to calculate the performance parameters daily, monthly, or yearly. Next, the user selects the PV systems and technologies to evaluate. The program presents the available data for visualization, such as irradiance and power, and calculations of the performance parameters, such as PR and yields, for the chosen PV systems.

PYTHON-based software for PV performance calculations, according to the IEC standards
To calculate the performance parameters, the user can choose between the different integrated data treatment algorithms, including those suggested by the IEC standard. Additionally, the user can select the minimum and maximum time of the day for the data process to discard data recorded during the night. Furthermore, the program can automatically detect and reject recorded days missing electrical or irradiance data above an adjustable percentual threshold. The user can request the program to detect impacts of partial shadowing in the PV systems and correct the power measurements when appropriate. When detecting days with missing data above the adjusted threshold, the program can search for alternative sources of information or estimated parameters. These last two features proved particularly useful for the case study. Therefore, we describe these algorithms in more detail in the following sections.

Partial shadow detection
During the first months of the experimental campaign, partial shadowing due to a near tall object impacted the power of one of the three PV systems. During the following months, this partial shadow also affected the other PV systems. Figure 3 exemplarily shows the DC power generated by the HIT PV system and the irradiance measurement for a clear-sky day. The impact of the partial shadow is observable during the morning hours, causing an underestimation of the DC energy and, thus, PR parameter for this particular day and technology. When not considered, such artifacts and underestimations can lead to false conclusions, especially when the objective is to compare the performance between PV technologies. Consequently, an algorithm based on the one in [11] was implemented to detect the presence of partial shadows. As shown in figure 4, the algorithm starts by mapping the DC power against the . The relation between these two measurements should closely resemble a straight line. However, when the PV systems are partially shadowed.    is lower than the linear fit and the relative difference between the two is higher than 25%, then the measured data affected by the partial shadow is replaced by the calculated one using linear regression. Optionally, the user can repeat this correction until no more points affected by partial shadows are detected. ) and DC power after applying the correction procedure.

Evaluation of missing data and rejected days
Another challenge detected during the experiments was missing data and, thus, rejected days when surpassing the threshold of 10% of missing data. Most of the missing data for power measurements was due to failures in the electric grid, such as power outages and activation of the anti-islanding protection of the inverter. Out of a total of 365 days recorded, 23 days presented the mentioned failures. Consequently, a total of 6.3% of the power measurements was lost or had errors surpassing the threshold, thus rejecting the respective days. A similar situation occurred for the measurements. Measurements realized during the experimental period were done with a platform still in development. As such, days of measurements were affected by testing, power loss and maintenance. Out of the 365 days, only 266 days were usable for evaluation. Consequently, a proper evaluation by calculating the PR of the PV technologies was not possible for 27% of the days with missing irradiance data. Other studies that take into account the amount of data available, as the one presented in [12] have more than 80% of the expected data available for most of the evaluation periods. In the case of irradiance measurements, the solution was based on the IEC-standard recommendation regarding the use of redundant sensors and the possibility of replacing missing data with these sensors. The laboratory has three identical irradiance sensors (EKO MS-80) at angles of 15°, 20° and 0°. The developed algorithm is based on a model for estimating irradiance on any incident angle presented in [13]. This model requires measurements of global irradiance at 0° ( 0°) and direct irradiance at the same angle, to calculate the global irradiance at different angle. For our purposes, the global irradiance at 20° ( 20°) was used instead of the direct irradiance at 0°, assuming a strong correlation between 0°, 20°, and . To verify the latter assumption, all the values where the three irradiances were properly recorded were used to calculate the correlation of with both 0° and 20° through linear regression. We obtained that has a correlation of 0.9837 with 0° and a correlation of 0.9890 with 20°, as shown in figure 6. Figure 7 shows the comparison between the three sensors for an exemplary day. The graph shows the measurements at 15° ( ), 0° ( 0°) and 20° ( 20°) . Depending on the position of the sun, the can be closer to the value of 0° or 20°. Hence, to replace the missing values, a linear regression was implemented that considers the irradiance measured at the other two angles as inputs. With this, the value was estimated. Using the estimated value, we calculated the daily irradiation and compared the estimated values with the irradiation calculated from measured values. The relative error between the two values was lower than 5% for the studied days. With this procedure, the percentage of days missing for evaluation dropped from 27% to 6%.   Figure 8 shows the results of calculating the daily performance ratios for August 2020. The calculation was performed without prior data treatment, only applying the filters suggested by the IEC 61724-3 standard (described in subsection 2.1). However, we observe a day (28.08.2020) when the daily PR reaches almost 3 for the three PV technologies, which is an unrealistic value. This overestimation is due to half of the irradiance data missing. The same is the case for day 17.08.2020, with overestimated PR values of about 1. We also observe days with no calculated daily PR values. On such days, the amount of missing data (electric or irradiance) surpassed the threshold and, thus, the entire day's data was discarded. For the day 20.08.2020, we observe for the HIT and CIGS systems lower PR values than expected. These two PV systems suffered from temporal inverter data loss; thus, underestimating the energy production and PR for this particular day. Consequently, for this month, only 20 of the 31 monitored days would allow an evaluation of the PR. Figure 9 shows the daily PR results after all the data treatment procedures implemented in the program. All the daily PR values are available for the entire month, and their values oscillate around 0.8, which is a reasonable PR. Applying the additional data correction procedures proposed in this work is crucial for a more reliable and complete evaluation of the performance parameters. Finally, and of particular importance for subsequent studies, it enables a reliable comparison of the performance parameters for the different PV module technologies on the system level.