An Alternative Internet-of-Things Solution Based on LoRa for PV Power Plants: Data Monitoring and Management

: This paper proposes a wireless low-cost solution based on long-range (LoRa) technology able to communicate with remote PV power plants, covering long distances with minimum power consumption and maintenance. This solution includes a low-cost open-source technology at the sensor layer and a low-power wireless area network (LPWAN) at the communication layer, combining the advantages of long-range coverage and low power demand. Moreover, it offers an extensive monitoring system to exchange data in an Internet-of-Things (IoT) environment. A detailed description of the proposed system at the PV module level of integration is also included in the paper, as well as detailed information regarding LPWAN application to the PV power plant monitoring problem. In order to assess the suitability of the proposed solution, results collected in real PV installations connected to the grid are also included and discussed.


Introduction
In most countries, fossil fuel consumption has been drastically increasing along with enhancements in the quality of life and industrialization, and a growing world population [1].This relevant fossil fuel consumption not only leads to an increase in the rate of diminishing fossil fuel reserves, but also has a significant adverse influence on the environment and the threat of global climate change.Actually, renewable integration issues have drawn attention in the scientific literature lately, and recent contributions have been focused on the institutional challenges [2].Within the electricity sector, renewable and clean power generation alternatives will play a relevant role in future power supply (i) to attain global public awareness and sensibility of the need for environmental protection, and (ii) to achieve less dependence on fossil fuels for energy production [3].Indeed, Mancarella et al. affirm that power systems are among the most critical infrastructures of modern societies, being crucially important to boost their resilience under severe weather conditions and any future challenges focused on climate change concerns [4].As a result, most road maps and scenarios forecast a relevant resurgence of low-carbon generator units in the electricity supply side mix [5].From the different renewable resources, wind and PV solar solutions are considered as relatively mature technologies, with a significant impact on current power systems [6].However, certain technical problems have been discussed in the literature about high penetration of renewables, mainly focused on reliability, power quality, and stability [7].In this way, the intermittent nature of such sources may increase the stress of the grid, mainly due to undesirable oscillations on the supply side [8], which may negatively affect the transmission system regulation [9].Regarding PV power plants, their power generation is highly dependent on solar irradiance, ambient temperature, and other atmospheric parameters [10].Consequently, fluctuations from grid-connected PV installations might lead to decreased grid reliability, compromising the demand-supply balance control [11].Indeed, PV systems extensively integrated into low-voltage (LV) distribution grids may cause significant changes in feeder voltage profiles [12].Consequently, it is very important to determine and monitor such weather parameters that can provide a more precise prediction of the PV power generated [13].Therefore, the PV power plant integration into power systems must imply monitoring solutions.Moreover, Beránek et al. affirms that monitoring of PV system plants is an urgent and imperative activity for practical implementation of new ecologically clean solar plants [14].
Different solutions can be found in the specific literature to monitor PV power plants.Ramakrishna et al. affirm that the PV monitoring systems can be broadly classified as ground-based or space-based monitoring systems [15].More specifically, some of these contributions are focused on monitoring locally PV data.In this way, Fuentes et al. describes a portable data logger based on standalone instruments [16].LabVIEW has shown relevant characteristics for monitoring and communicating several devices simultaneously [17].Bayrak et al. use a Labview data acquisition (DAQ) card for monitoring electrical measurement of a PV system [18].Chouder et al. also present a detailed characterization of the performance and dynamic behavior of PV installations through LabVIEW real-time interface system [19].Recently, a novel power line communication (PLC) method for a DC-DC power optimizer solution is proposed by Zhu et al. [20].The data are modulated and then transmitted through the series-connected DC-power line to other DC-DC power optimizers.The parallel resonant coupling unit is used in [21] to monitor PV data into a high-frequency form to carry out the carrier communication.Wireless solutions to monitor PV installations at panel level have been also proposed by other authors.As an example, Ando et al. describes a complete wireless solution at panel level to estimate efficiency losses and anomalous aging of PV installations [22].Similar contributions for individual monitoring of panels based on wireless technology can be found in [23].An in-situ monitoring solutions for PV panels is proposed and evaluated by Papageorgas et al. in [24].Moreno-García et al. presents an architecture of acquisition devices, including distributed wireless sensors, to monitor and supervise all the distributed devices in the plant [25].An extension of this solution by detecting any failures or deviations in PV production can be found in [26].A low-cost acquisition system to record data in micro SD card is presented by Fanourakis et al. in [27].Regarding remote PV monitoring proposals, different contributions can be found in the specific literature.In this way, Zigbee technology has been proposed by different authors during recent years [28][29][30][31].Li et al. also propose an on-line monitoring system based on Zigbee technology for Internet of Things purposes [32].However, and according to [33], Zigbee technology is proven inefficient in large scale since it is not able to face up huge distances.A low cost IOT-based embedded system is described in [34].This solution uses a GPRS module and a low cost microcontroller to send the power generated by a PV power plant.GSM voice channel for the communication of data has been also proposed, since the GSM network is readily available in rural areas [35].As drawbacks, Pereira et al. affirm that this solution requires a SIM card with data transfer charging and can be installed only in places under phone coverage [36].At residential level, an IoT solution based on Arduino with 3G connectivity technology is described and assessed in [37].A comparison of different technologies-Ethernet, WiFi and ZigBee-for smart-house applications including RES is proposed in [38].A user-friendly PV monitoring system based on a low-cost PLC is proposed by Han et al in [39].A review focused on solutions for PV performance monitoring is discussed in [40].
From the Transmission and Distribution Network Operator point of view, a mass energy production coming from PV systems without the corresponding energy storage units and/or sufficient innovative electricity network architectures-such as micro-grids, smart-grids and web of cells-can cause severe disturbances [41].In Europe, Mateo et al. contribute to overcome the barriers that hamper a large-scale integration of PV installations in the electricity distribution grids, being necessary the integration of advanced monitoring and operation systems [42].As an additional example, in Germany, 90% of renewable system capacity is connected to distribution grids, and smart grid investments should be promoted by German DSOs [43].Current power systems thus require modernization in terms of sensing, communication technologies, measurements, and automation technologies, and subsequently, smart power grids arise as a suitable solution [44,45].
Considering previous approaches, this work provides a step forward: a wireless low-cost open-source monitoring solution based on long-range (LoRa) technology able to communicate with remote PV power plants.The aim is thus to monitor in real time wide zones under study, covering long distances with minimum power consumption and maintenance.This study is in line with previous works of the authors focused on PV monitoring [46,47]; as well as in line with recent contributions where PLC and wireless are considered the best candidates for communication purposes [48], and wireless is poised to play a significant role in shaping the capabilities of future measurement systems [49].Besides, the cost of open-source solutions is usually considerably lower than commercially available devices, with little loss of accuracy and precision [16].Moreover, commercial solutions present some drawbacks, as can be found in recent PV monitoring system reviews [50].The main contributions are summarized as follows:

•
Wide areas, referred to remote PV installations, are controlled via and communicated through a low-cost open-source solution based on LoRa technology.

•
Data are gathered from the PV installations in accordance with the current IEC-61724 standards and industrial, scientific, and medical (ISM) band use regulations.

•
The proposed solution is flexible to exchange data in real time among PV power plants in terms of power generation and weather parameters.
The rest of the paper is structured as follows: Section 2 describes wireless sensor network technology and particularly the LoRa approach.Section 3 gives detailed information regarding our proposed solution.Section 4 offers extensive results, evaluating the performance of our solution.To this end, different testing processes are conducted by the authors.Finally, conclusions are discussed in Section 5.

Wireless Sensor Network: LoRa Solution
Wireless sensor network (WSN) is a mature field in technology to sense physical parameters and transmit them wirelessly out of the coverage range of the measurement in situ.This is a potential area of interest for the scientific community, reinforcing some beliefs about the necessity for further research initiatives in a new wireless-network paradigm.In this context, the low-power wide-area network (LPWAN) is a recent WSN-based technology that emerged as an alternative wireless monitoring solution [51].Different applications and contributions can be found, mainly focused on the industrial environment.In particular, this technology is currently drawing much attention for managing assets over wide areas, such as the monitoring and control of PV power plants and the operation of distributed energy systems.The main characteristics are its excellent long-range, low-power consumption and reduced computation capacity (like a long-range WSN).In fact, the operation of a distributed energy system usually requires flexible and reliable communication systems.However, cable-based communications are, in many cases, an infeasible solution due to their complex installation and maintenance.In distributed energy systems with high penetration of renewables and small generation units connected at different voltage levels, this wireless technology can help to overcome the lack of information in the performance and generation of these installations [52].
LPWAN is a generic term that encompasses a group of technologies, allowing wide area communications at lower cost points and reduced power consumption.LPWAN technologies have arisen in both licensed and unlicensed markets, such as LTE-M, Sigfox, long range (LoRa), and narrow band (NB)-IoT.Among them, LoRa and NB-IoT are the most prominent, though they clearly present technical differences [53].Presently, LoRa is an LPWAN approach receiving relevant consideration in the literature, because it can operate efficiently in unlicensed bands.Unlike LoRa, an NB-IoT network must be set up within an existing cellular network.This makes LoRa a more flexible solution than NB-IoT to meet the requirements of outlying districts [54].It is worth noting that LoRa is inarguably the main actor in the current LPWAN scene, used in an unlicensed spectrum below 1 GHz and supported by many worldwide technology leaders (Cisco, Microchip, IBM, HP, etc.) [55].From a technological point of view, LoRa provides a proprietary chirp spread spectrum (CSS) modulation to achieve communication distances greater than 700 km [56].What makes LoRa stand out from other modulation methods is its unique spread spectrum technique, which provides robustness against interference and a very low minimum signal-to-noise ratio (SNR) for the receiver to be able to demodulate the signal.LoRa is thus a suitable solution for applications that require a very long battery lifetime and reduced cost.Moreover, as it strengthens, LoRa allows tuning of several physical transmission properties: the bandwidth and central frequency of the communication, the coding rate (CR, the ratio between the length of the packet and the length of the error-correction code), the transmission power, and the spreading factor (SF, defined as the ratio between the symbol rate and chip rate).Higher SF values enhance the sensitivity and range of communication at the expense of increasing the over-the-air time of the packets, thus consuming more transmission duty cycles (TDCs).
In the past few years, the interest of monitoring smart industries has increasingly become LoRa [57] as one technology solution demanded by many researchers [58,59].Most of the contributions have been focused on analyzing the advantages, disadvantages, capabilities, and limits of current developments/deployments in several scenarios: industrial environments [60], civil infrastructures such as bridges [61] and public transport [62], line-of-sight and obstructed communications [63], and surveillance tasks to combat poachers in wildlife reserves in Africa [64].In addition, LoRa performance has been compared to other LPWAN solutions such as Sigfox [65] and Weightless [66], as well as licensed options such as NB-IoT [67].Other studies have dealt with the real scalability of current LoRa networks [68,69], the performance of their different configurations [70] or the download traffic analysis of these types of networks [71].LoRa defines the physical level and LoRaWAN encompasses the link layer of the protocol stack and the system architecture [72].LoRaWAN uses long-range star architecture in which gateways are used to relay messages between the end nodes and a central core network (see Figure 1).In a LoRaWAN scenario, nodes are not associated with a specific gateway.Instead, data transmitted by a node are typically received by multiple gateways.Furthermore, LoRaWAN uses the adaptive data rate (ADR) algorithm to estimate the CR and SF parameters under specific channel conditions.Subsequently, each gateway forwards the received packet from the end node to the cloud-based network server via standard IP connections.Different disadvantages can be identified when LoRaWAN solutions are implemented, intrinsic to operating in any ISM band.In particular, current international laws require a stringent duty cycle of 1%.This means the radio channel cannot be occupied more than 36 s per hour.In fact, this value is denoted as the maximum TDC allowed by the nodes to operate in ISM channels.This is an important concern for nodes managing critical assets (such as those found in the proposed solution), where LoRa and LoRaWAN must be able to report critical events within seconds.Therefore, node duty cycles should be set with the goal of reporting critical events under the entire conditions.It is precisely this type of situation that drew our attention and a question arose: 'Is it possible to obtain communications using LoRa technology, considering its stringent duty cycle under critical conditions (i.e., given the criticality of the reported event)?'Moreover, the end-node configuration is a crucial aspect for packet transmission purposes, since LoRa networks allow us to adjust not only frequency and power values, but also other parameters such as SF and CR, promoting robustness in the communications at the expense of increasing the packet over-the-air time.To the best of the authors knowledge, contributions such as [73][74][75] use LoRa technology as the way of transmitting data collected by sensors in a PV Power Plant.In these contributions, authors installed a Lora communication module to dispatch packets to a Gateway including physical parameters such as current or temperature, without going into details about communication concerns.Unlike these works, we contribute with a solution which tackles these concerns more intensively than [73][74][75], ensuring the best performance for transmitting information from the PV installation to the Gateway and, consequently, increasing the system reliability.In this sense, and as will be discussed in Section 4, the transmission rate-bits per second-has been thoroughly tuned to achieve a suitable and acceptable RSSI (Received Signal Strength Indicator) and SNR figures in the proposed solution.
For testing purposes, it has been considered the maximum SF allowed by the LoRa technology (SF12), with a CR value of 4/5 and below the maximum TDC.

General Overview: Topology
The proposed network architecture integrates LoRa-IoT infrastructure in a similar way to Figure 1.Therefore, by allowing for typical LoRa network topologies [76], a star topology including end devices, gateways, and a central network server is considered in the proposed solution.All selected sensors in charge of monitoring PV installations have to fulfill the IEC-61724 requirements.PV electrical data and weather parameters are gathered to estimate PV operating conditions and exchange meteorological and electrical data information.These data packets are sent to the LoRa gateway from the corresponding PV power plants.Subsequently, the received data are then forwarded to the network application via LAN connection.The design of the proposed system involves (i) end-node hardware selection, (ii) software-node configuration, and (iii) LoRa network server.These items are discussed in detail in the following.

End-Node Hardware: Sensors and Communication
The end node is in charge of gathering PV electrical data and weather conditions.Data packets are subsequently sent to the gateway.The main requirements accomplished by the end node are the following:

•
Information from the PV module installed in the PV power plant is collected according to the current IEC-61724 standard requirements.These data provide relevant information for predictive maintenance purposes.

•
Flexible, low-cost, and open-source solutions are required to carry out a suitable integration of the proposed system into real PV power plants.
• Nodes are able to run software, including a complete LoRa Class A. As mentioned, the end nodes operate under the license-exempt industrial, scientific, and medical (ISM) bands (EU 868 MHz/US 915 MHz) [77].
First, a hardware development platform was selected under the parameters of low cost and open-source software solutions.To this end, and taking into account previous experience, the Arduino platform [78], which offers a free development software environment to develop a prominent number of applications [79], was chosen.Other studies affirm the efficient reconfigurable security approach for WSN with Arduino-based systems [80].Following these parameters, the Arduino One and Arduino Nano were considered as printed board platforms [81].Both hardware solutions are based on ATmega328P with similar performance.As its main features, Arduino Uno comprises a 32 kB flash memory, 2 kB SRAM and 1 kB EEPROM, with 5 V operating voltage level and 14 digital I/O pins.The Arduino Nano is considered as a bridge between sensors and, for instance, a Raspberry Pi, which becomes it in a base station [82].LoRa transceiver is also integrated in the device under the Arduino requirements [83].
Concerning the selected group of sensors, they have to be in line with the following requirements: they must (i) gather electrical PV parameters and weather conditions, and (ii) fulfill the IEC-61724 requirements.Moreover, the sensors are in accordance with previous works by the authors, where the same requirements were considered [16,84].Local data collected by our proposed solution are thus able to estimate the PV module behavior and, in general, the PV installation performance.In terms of electrical data, AC and DC voltage and current variables are considered as parameters to be measured and collected for monitoring purposes.AC voltage measurement (V AC ) is implemented by an AC-AC power adaptor.An isolation transformer gives a physical separation and a quasi-sinusoidal waveform as an output signal.This signal is adapted by a voltage divider and sent to the Arduino board as an analog input.In a similar way, DC voltage (V DC ) is collected and adapted as an Arduino board analog input as well.For AC data (I AC ), a noninvasive Hall-effect sensor is provided for the proposed solution [85].An accurate, low-offset, linear Hall sensor is selected and implemented by the authors to measure the DC current (I DC ) [86].Both AC and DC sensors offer low-voltage output signals compatible with the Arduino input voltage range.With regard to weather parameters, the following variables are considered for monitoring purposes: solar irradiance, ambient temperature, and PV module temperature.To measure and gather solar irradiance, and assuming that the short-circuit current (ISC) is nearly proportional to the irradiance [87], it is measured in W/m 2 by a 5 Wp short-circuit encapsulated polycrystalline silicon module.A shunt resistance is chosen and implemented to adapt the voltage output within a suitable voltage range according to the Arduino analog input requirements.Calibration of this module was carried out by the authors through the CETENMA Solar TestBed, based on the global sunlight method available in [88].Ambient temperature was measured near PV modules as an attempt to more accurately estimate the real environment of PV module conditions.A DHT22 temperature/humidity sensor with digital output was selected with this objective.The DHT22 sensor is directly supported by the Arduino IDE technology and, according to [89], it furnishes very accurate results with a fast refresh time.Other applications using the DHT22 sensor can be found in [90,91].Most correlations in the scientific literature for PV electrical power as a function of the cell/module operating temperature and basic environmental variables are based on linear approaches [92].Indeed, [93,94] affirm that PV module power output values depend linearly, but rather strongly, on the operating temperature.The authors note that the PV module temperature should be collected at the center of the back surface of the module and in the center of the array field location on the module, as pointed out by IEC-61829 method A [95].In our proposed system, a low-cost solution employing the DS18S20 digital sensor is used with this goal.This digital thermometer achieves 9-bit Celsius temperature measurements, transferring them on a 1-wire bus [96].A general diagram of the sensors and their connections with the Arduino board is depicted in Figure 2. The communication system is in charge of dispatching data packets thanks to a transceiver integrated into the Arduino board and operating in the EU-868 band [72].The selected transceiver is the RFM95W module, fabricated by HOPE RF and configured as a LoRa TM modem [97].In fact, the RFM95W configured for LoRa communication via 4-wire SPI bus was successfully tested in [98].The main characteristics of this LoRa TM module are high efficiency and significant sensitivity (around −148 dBm).To achieve these advantages, this module is composed of a 6-GPIO interface configurable by software and with different interruptions usually linked to the operation of the RFM95W [99], and is able to support different modulations such as FSK/OOK, GFSK, MSK, or GMSK.Due to the small size of the RFM95W module, an adapter is required to provide breakout pins and the antenna plug-ins (Figure 3).Finally, the RFM95W works at 3.3 V and thus it cannot be directly connected to the Arduino Uno or Nano (both operating at 5 V).A voltage adapter is thus required to give the operating voltage range.

End-Node Software Configuration
The end-node software configuration was subsequently conducted after selecting the end-node hardware solution along with the sensors.First, Arduino firmware was implemented and tested in order to obtain the PV power plant parameters and values under the IEC-61724 standard [100] and the ISM band-use regulations.The selected firmware was the nano-lmic-v1.51-F.ino,which was downloaded from the LoRa LMIC library [101].The Arduino code follows activation-by-personalization (ABP) rules, available in the LMIC library [83].SScripts to read the data format were also developed and the payload adjusted to contain full information gathered by the different sensors, following the format recommended by the IEC standard resolution.Please note that the payload has a length of 38 bytes, which has a relevant impact on the over-air time of the packets, as will be discussed in Section 4. The sampling period is another aspect to be considered in detail.In this sense, the IEC standard establishes that the sampling period of the different parameters under study varies proportionally to the solar irradiance.Under our operating conditions, parameters had to be sampled in intervals of 1 minute or less.On the other hand, in Europe, the duty cycle is regulated by the ETSI EN300.220standard-Section 7.2.3-[102], which, as noted in Section 2, sets a duty cycle of 1%.Furthermore, from the spreadsheet developed and proposed by Matthijs Kooijman [103], the over-air time of the packets can be determined for different SFs.The over-air time corresponding to the worst case was then used to define our sampling rate.By considering our scenario, the duty cycle, and the over-air-time issue, data packets were sampled every 30 s.The parameters were then averaged and sent in time periods of 3 min.These values will be modified in a subsequent version to enforce the so-called 'Fair Access Policy', which limits the uplink airtime to 30 s per day and per node [104].The downlink messages were set to 10 messages per day and per node.

LoRa Gateway/LoRa Network Server
A single-channel LoRa gateway was designed and implemented with a Raspberry Pi board.The LoRa radio communication module we selected is the Dragino Arduino shield from a Semtech SX1276 chip [105].The Dragino shield can be directly connected to the Raspberry Pi.SPI connectors belonging to Dragino (MISO, MOSI, CLK, and NSSEL), VCC and GND are attached to the corresponding pins on the Raspberry Pi (CE0 on the RPI for SPI, _nSSEL and 3v3 for VCC).The operating system (OS) installed on the Raspberry Pi was Raspbian [106].This single channel gateway software as well as its OS are supported by Thomas Telkamp at GitHub, and further information can be found in [107].The single-channel LoRa gateway assembly and the coverage range are depicted in Figure 4.As described in Section 3.1, a LoRa network server is required to test the proposed application.With this aim, The Things Network (TTN) backend is used [108].TTN is a community-driven project offering a free server to users; our proposed solution must connect the gateway to this free server.To this end, we created an account and registered the developed gateway.The gateway is located in Europe, selecting the European ISM band (868 MHz).After this setting process, the gateway is ready to be plugged in to the server.At this point, users can visualize the data packet transmission from the end nodes associated with this gateway, with a status of 'connected at web'.In our case, two applications were developed: monitoring system testing and coverage range testing.Furthermore, the Arduino firmware implemented a different device address, 'DEVADDR', the network session key 'NWSKEY', and the application session key 'APPSKEY', which were developed and implemented before carrying out the corresponding validation tests discussed in detail in the following section.

Economic Evaluation: Cost-Effectiveness
Finally, and in terms of cost-effectiveness, the proposed monitoring system is in line with other contributions discussed in Sections 1 and 2 based on non-commercial solutions.Our system is flexible to be configured in different locations and PV installations.With the aim of offering a low cost system, the different hardware components are based on open-source projects with a high cost effectiveness threshold.Table 1 gives the monitoring node cost, which is lower than other commercial solutions as was previously discussed.Moreover, these commercial solutions usually provide less information and a reduced number of parameters.

Results
This section summarizes the test bed conducted to evaluate the proposed system.System assembly, coverage range, and performance evaluation of the PV power plant are described with the goal of adding value to our proposal in terms of a sensing, monitoring, and data packet transmission solution in an IoT scenario.

System Assembly
First, the selected hardware components and sensors (end nodes) were tested in a laboratory environment to evaluate their performance under controlled conditions.After this initial testing, components and sensors were connected and assembled to provide a feasible solution able to operate under real conditions.To facilitate the integration of the proposed monitoring system into real PV power plants, components and sensors corresponding to the end nodes were divided into two subnodes, including most connectors commonly used in real PV installations connected to the grid: (i) a principal subnode involving a main controller, a transceiver with the corresponding voltage level converter, and a set of batteries for power supply requirements (see Figure 5); (ii) a secondary subnode in charge of measuring and collecting PV module variables.To test the appropriateness of the global solution, these nodes were first deployed in the solar laboratory of CETENMA, located in the Industrial Park of Cartagena (southeast Spain).This facility includes measurement equipment to check the performance of PV power plants and modules.For testing purposes, a single 250 Wp monocrystalline PV module connected to an SF 250 W Soltec SolarFighter microinverter was used (see Figure 6).

Coverage Range Characterization
A relevant objective of this work was to evaluate the suitability of the proposed solution to measure, collect, and send data from PV installations to a remote gateway.The coverage range of the initial gateway, discussed in Section 3.3, was not enough to achieve the objectives searched in the test bed.Indeed, the location and low performance of the antenna used for this gateway were likely the biggest drawbacks of the initial poor coverage range.To overcome this limitation, another gateway was implemented and installed at the Universidad Politecnica de Cartagena (Cartagena, Spain).This additional Gateway is called the TM RG186 Series LoRa-enabled gateway [109].It is located on the roof of a researching building on the university campus (see Figure 7).The gateway was registered with TTN as well.
To ensure the communication of the proposed system, we conducted a test of the signal power and coverage range.To this end, a Global Positioning System (GPS) module was integrated into the end node to transmit the location coordinates.To visualize the position of each end node, the TTN Mapper software tool [110] was installed in the network server.This additional tool provides further information, such as RSSI and SNR.Furthermore, each end node was configured with a transmission power of 14 dBm and SF12 to carry out the set of tests.During these tests, a new gateway was identified 15 km from our installation in the solar laboratory of CETENMA. Figure 8 illustrates these results corresponding to the coverage testing process.

PV Power Plant Performance Evaluation
Considering the different coverage testing processes we previously carried out, discussed in Section 4.2, a 5 kW PV installation connected to the grid and located on the university campus was deployed to assess the PV monitoring properties of the proposed solution (see Figure 9).Electrical and environmental data were gathered from the PV power plant and sent to the gateway to be evaluated and discussed in subsequent analysis.Additional parameters such as encrypted payload, received signal strength indicator (RSSI), air time, signal-to-noise ratio (SNR), number of packets, and channel included in the LoRa packet are also available and can be downloaded from the TTN website.A packet size of 38 bytes is considered enough to cover all the parameters for PV power plant monitoring purposes.The transmission power is 14 dBm and the SF metric is tuned from 10 to 12, which influences the data packet over-air time.Figure 10 shows the theoretical time on-air (ms) for each SF configuration depending on the payload length.These results allowed us to configure the sampling period for each SF: 60, 120, and 180 s for SF10, SF11, and SF12, respectively.Our test bed was conducted for 24 h.This time interval was enough to evaluate each SF configuration.It is relevant to point out that SF10 involves no reception of packets in the gateway, as a consequence of different concerns, such as (i) the limited over-air time due to the distance between the device and the gateway, around 4 km; (ii) the locations of end nodes; and (iii) the conditions of the signal propagation.2 shows additional metrics also discussed in this work: packet delivery ratio and time intervals between different data packets (inter-arrival time).The packet delivery ratio is defined as the ratio between the packets successfully received and the total data packets sent by the end nodes.
The inter-arrival time is determined by the time interval value corresponding to each packet received by the TTN web application.For SF11, our study reveals low RSSI and SNR values.As an example, the minimum signal strength in WiFi technology provides basic connectivity with reliable packet delivery around −80/−90 dBm.Concerning SF12, the RSSI and SNR metrics improved around 10%.However, the time interval between packets increased to 115 s, which is reasonable due to greater over-air time of the packets.In terms of the packet delivery ratio, SF11 showed poor performance, with most of the packets corrupted or completely lost.To overcome this drawback, it is necessary to increase the spreading factor (SF), which allows us to improve the metric sharply.It is remarkable that these outcomes are in line with recent contributions [111][112][113], which corroborates one of main advantages of using LoRa: its sensibility.In this respect, weak signals can stimulate the electronic communication of the LoRa device, resulting in successful packet delivery to the gateway.Finally, to verify that the payload is being decrypted correctly, data received by the TTN application are compared to the same data collected by a data logger of the test stand (see Figure 12).These results validate the feasibility and reliability of our proposal, as well as the accuracy of the implemented monitoring and communication solution.

Conclusions
A low-cost, open-source solution to monitor PV power plants was designed and evaluated.Our alternative system provides a powerful and straightforward solution, facilitating the integration of this renewable energy source into current power systems.As a novelty, long-range communication technology denoted as LoRa enables data transmission to a remote gateway, which allows us to evaluate the PV installation performance in real time.Extensive electrical and meteorological information is also available from the monitoring system.These data can be applied for predictive maintenance purposes.Moreover, these data have a remarkable impact on grid reliability and PV forecast accuracy.
A PV power plant connected to the grid (5 kW rate power) and located on the university campus (southeast Spain) was used to evaluate the monitoring system.Different field-test campaigns were conducted by the authors.From the results, it can be affirmed that aspects such as the distance between source and destination, the line-of-sight between source and destination, and propagation issues have a clear influence on the appropriate data reception process.Our study demonstrates that scenarios with a high spreading factor value (SF11 and SF12) satisfy an accurate reception of data packets.However, the corresponding over-air time considerably limits the number of transmissions.To overcome this drawback, the sampling time was adjusted in line with the packet air-time and according to the SF value.One of the main limitations of the LoRa solution is its restricted duty cycle (1%), which was taken into account for the testing process.Received data were also compared to data-logger equipment connected in situ in the PV installation.This comparison validates the electrical and meteorological variables gathered by different sensors, resulting in errors lower than 0.5%.Our proposed solution thus offers an alternative system to be implemented in remote PV power plants with the goal of monitoring and dispatching electrical and meteorological data.

Figure 2 .
Figure 2. General diagram of sensors and Arduino connections.

Figure 8 .
Figure 8. Coverage testing analysis.(a) Gateway identification map.(b) Coverage testing results on The Things Network (TTN) Mapper website.

Figure 10 .
Figure 10.Theoretical time-on-air (ms) for different tested SF configurations.

Figure 11
Figure 11 illustrates the RSSI and SNR results obtained in November 2018 for SF11 and SF12.Table2shows additional metrics also discussed in this work: packet delivery ratio and time intervals between different data packets (inter-arrival time).The packet delivery ratio is defined as the ratio between the packets successfully received and the total data packets sent by the end nodes.

Table 1 .
PV monitoring node cost.

Table 2 .
Packet delivery rate and inter-arrival time metrics.SF, spreading factor.