Data Logging and Control of a Remote Inverter Using LoRa and Power Line Communication

For decades, the power system was highly centralized. With the growing integration of distributed generations into the system, there is a necessity for bi-directional communication methods to monitor and control the remote assets. The primary objective of this paper is to develop a communication link for monitoring and controlling a grid-connected inverter in a remote location. Furthermore, the paper presents developments that have been incorporated to improve the communication link. The literature survey indicates that LoRa is superior compared to other technologies, but has some security and reliability issues. This paper also presents an encryption algorithm to improve the security of the LoRa link. Local data storage added to the system before transmitting data increases the system reliability. A display at the transmission end is added to improve the user-friendliness of the communication link. A Powerline Communication link is parallelly added to the LoRa link to improve the reliability. Finally, tests are conducted with an actual inverter and the results are presented. The tests show that the developed communication link has improved security and reliability, while its open nature makes it highly scalable and adaptable for employment in other smart grid applications.


Introduction
The recent development of renewable power generation and energy storage systems has increased the distributed nature of the power system.Only a few decades ago, the power system was centrally controlled with no small power generations.The power system requires integrated automated management with reliable real-time information that smoothly matches demand and supply.Even small distributed generators (DG) require control for unhindered operation.Therefore, given the increasingly distributed nature of the power system, a central Supervisory Control and Data Acquisition (SCADA) system is essential for the remote monitoring and controlling of a grid-connected inverter.Figure 1 provides a schematic for the master SCADA station and the remote SCADA stations connected to the distributed resources.
In typical configurations of SCADA systems, both wired and wireless communication technologies have been employed to serve the monitoring and control objectives.Wired technologies such as Powerline Communication (PLC), Optical-fiber communication, and Digital Subscriber Lines (DSL) are employed, as well as wireless technologies such as Cellular Network Communication, Bluetooth, and Wi-Fi.While each of these techniques has its inherent pros and cons, opportunities exist for improved approaches for communication between the master and remote SCADA stations.
Therefore, this paper addresses the gap that exists for a secure, reliable, and low-cost communication method by demonstrating a novel communication method for remote monitoring and control with extended range, and increased levels of protection, and high reliability based on state-of-the-art technology through the use of LoRa in combination with PLC.
The paper is organized as follows.Section 2 explains the methodology fol-  According to the literature survey, both wired and wireless communication methods are utilized in SCADA communications.[11] present a dual-key scheme for increasing LoRa security.The suggested scheme is good but its computing requirements would necessitate significantly more power and increase system costs.To satisfy the demand for low-power, long-range, high-data transmission which arises with the commercialization of IoT, D. Kim et al. [12] have introduced a method which combines LoRa and Wi-Fi services.Though LoRa can provide low-power, long-range communication, its data transmission rate is small.Therefore, to address the requirement to send large amounts of data, the authors have chosen Wi-Fi service to satisfy the high-data rate problem.

Wired Technologies
Using these two technologies, they have introduced a multi-interface communication module which can achieve long-range and low-power requirements using LoRa and a large amount of data using wireless LAN (wi-fi).
To study the coverage of LoRaWAN technology, J. Petajajarvi et al. [13] have experimented using commercially available equipment, particularly for two cases in the city of Oulu, Finland.They collected measurements by connecting a node on the ground and a node on the water, both reporting data to a base station.
Using this information, they have estimated the communication range of Lo-RaWAN as 15 km on ground and 30km on water.Furthermore, a channel attenuation model derived using the collected data from the experiment is also presented.

Methodology
The body of research literature on the application of LoRa is small, and the sur- slows the process when used in an Arduino.Therefore, this paper develops a device that can be utilized for monitoring and controlling of an inverter using LoRa.The method also facilitates use of a local storage system to improve reliability.
The following section explains the methodology used to improve the LoRa communication link.Since the primary objective of the research is to develop a communication link for monitoring and controlling of an inverter, the two sides of the communication link are designated as the inverter side and the server side.
Figure 2 illustrates the two sides of the system as described.

Inverter Side
The inverter side is principally responsible for the following essential tasks, around which the Arduino MEGA based system has been designed and tested: 1) Communicating with the inverter through RS232 port, 2) Storing and displaying data using a SD card and a local LCD display, and 3) Securely and efficiently communicating with the server side.

Physical Arrangement
Figure 3 shows the physical arrangement of the circuit where Arduino MEGA is acting as the master.To save and display received data, the Master MEGA board sends data to another Arduino MEGA connected to the circuit using UART protocol.The above said slave board then transmit data to the TFT display for displaying purposes and data logging purposes using SPI protocol.Figure 4 illustrates the stacked circuits, and this method allows the user to save space.

Main algorithm for the Inverter Side
A. Silva et al. [17] discuss power management in a communication network.
Power management could be achieved by putting the Arduino and LoRa module in sleep mode when it is not transmitting or receiving.However, this can add an additional burden to the Arduino.In their paper Z. Jiang et al. [18] talk about an innovative scheduling scheme for IoT communication.Although the proposed scheme shows advantages, the necessity for additional computing resources and thereby increased power consumption was not a desirable research outcome.Therefore, the main algorithm is developed to perform the three main tasks The data communications are encrypted for security purposes.The received inverter data is then transmitted to the server using LoRa after this encryption.As the next step, the master MEGA will wait a maximum of 5 seconds to receive data from the server side.If it receives data, the decrypted data will be sent to the inverter.

Encryption and Decryption Algorithms
The primary objective of these algorithms is to improve the security of the communication link by encrypting data using two encryption methods.The first method uses a shift cipher.The second method uses Vigenere Cipher with a key word and shifting each letter in the plain text by a different number per each letter in the key word.Since in most SCADA applications, plain text has a constant length, the key word is selected such that it would be longer than the plain text.
Therefore, each letter is shifted differently.The algorithm for the encryption is shown in Algorithm 2. For decryption, the encrypted message is deciphered as per the algorithm shown in Algorithm 3.

Data Processing Algorithm
Data coming from the inverter are sent to the slave MEGA for displaying and data logging purposes.At the beginning of the program, it reads data stored in the EEPROM for time setting goals and self-sets the date and time.Also, it allows the user to set date and time, whereby if the user does not adjust the time within 5 seconds, the system will automatically take the saved date/time on the EEPROM as the present date and time.Then the algorithm sets up the SD card.
After the setup, the main loop runs which starts with taking serial input from the Algorithm 1. LoRa MEGA algorithm.

Server Side
On the server side, the LoRa SX1272 module is connected to an Arduino UNO and that component will communicate with the server computer through a USB port.Algorithm 6 outlines the algorithm used on the server-side Arduino UNO.

Results
The proposed system has been prototyped and tested in the field environment.It successfully communicated up to 4.5 km range at the medium power level, and after decoding, values are displayed on the display and stored in the SD card.

LoRa and Power Line Carrier Communication Based Redundant Model
Wireless networks are inherently vulnerable since interferences by a third party are simple.LoRa uses the free ISM band and anyone can use the same band, leaving data transmissions open to higher interferences and signal noise.Methods such as slow frequency hopping will be helpful to overcome this issue.
However, in cases where the entire band is interfered, then frequency hopping will not be helpful.To overcome temporary data losses a SD card based local storage is added to the system.But this does not solve the communication loss between the server and the inverter which is more critical than the data loss.Therefore, to improve the reliability of a LoRa communication link this section proposes a solution by combining a PLC based solution with an added LoRa solution, in cases where use of PLC is possible.To achieve the objective of improved reliability, the inverter side of the developed LoRa link is connected to a Raspberry PI using the USB port of the Arduino Mega through the serial interface.The same data string received by the Arduino Mega through the Serial2 interface is written on the Serial0 interface.Raspberry PI is connected to a one end of the PLC module.As Figure 8 emphasizes, data flows in two communication channels, where one set of data flows through the power lines and the same data set flows through the LoRa as wireless.This redundant system will improve the reliability of the communication model.

Discussion
This section critically reviews the developed channel regarding security, reliability, scalability and the quality of service.

Security
Security of the developed channel has been achieved through an embedded encryption which ensures the confidentiality of data by preventing disclosure of DOI: 10.4236/epe.2018.108022Overall, the developed system has an improved security compared to a LoRa link without encryption.

System Reliability, Robustness and Availability
Reliability of the system is critical in smart grid applications.LoRa itself has inherent robustness.The addition of local storage has improved the data redundancy.The proposed two channel model is more reliable than the time division multiplexing model.

Scalability
For the aspect of scalability, the developed system has many advantages compared to available technologies due to the open source nature.Developers can comfortably adopt this system to their specific smart grid applications while ensuring strong security and reliability attributes for the system.The second part proposes and implements methodology to develop the LoRa

Conclusion and Future Works
lowed and the development of the SCADA, while Section 3 proposes a solution to improve reliability and overcome temporary data losses through a LoRa and PLC based redundancy system within the proposed communication model.Section 4 critically reviews the developed communication channel on several fronts including security, reliability, scalability, quality of service, etc. Section 5 provides conclusions for the paper and discusses the direction for future work.

Figure 1 .
Figure 1.A typical arrangement of a SCADA system.
vey did not identify any developments or publications regarding the usage of LoRa for SCADA systems or monitoring and controlling of an inverter.For such DOI: 10.4236/epe.2018.108022evolving IoT power system communication, security and safety are vital concerns.As per the literature, an AES encryption algorithm improves the security of a LoRaWAN network.Researchers have not addressed the safety of a LoRa link used outside a LoRaWAN for private communication.AES encryption

Figure 2 .
Figure 2. Server and Inverter side electronics.
This paper is part of a larger research project being funded by the NSERC Energy Storage Network fund.The objective of this portion of the research being conducted at Memorial University of Newfoundland (MUN) is to develop low cost SCADA system for power converters.Upon completion, the developed Lo-Ra system has been tested with the inverter developed in the University of New Brunswick (UNB) Sustainable Power Research Lab. Figure 5 show the inverter developed by UNB.They are using a DSP2407A board for communication purposes with the inverter, and as shown in Figure 6 that board has a RS232 port for UART communication.The inverter side of the developed communication channel has been connected to the serial port.Data strings are sent by the inverter according to the protocol shown below.The data strings have been successfully decoded by the system and communicated to the other side through the LoRa link.Figure 7 shows data available on the display on the developed system as well as the inverter itself.Decoding: Sample data string, 55AA0200000064BF07001B4A76001B3E1E00A6009C02400FF71C643B1231 In the data string, the first two bytes represent the synchronous word and the next four bytes represent the status, where the next twelve bytes represent data as current, voltage and power respectively in four bytes.Then number of samples, maximum voltage and the maximum current value and the version number sent in two bytes each respectively.The following equations are implemented in the Arduino Mega.Equation (1) shows the decoding of current and Equation (2) Algorithm 6. LoRa UNO algorithm.

Figure 5 .
Figure 5. Wind and Solar Inverter Developed by UNB.

Figure 6 .
Figure 6.DSP board used for communication.

Figure 7 .
Figure 7. Displaying decoded data on the system and the inverter.

Figure 8 .
Figure 8. Block Diagram for LoRa and PLC Setup.
Monitoring and controlling of energy storage has become highly important for dispatching purposes.This paper mainly discusses selection and development of an open source communication channel for monitoring and controlling of a remote inverter.In the first part of the article, three open source communication methods are tested in terms of power consumption, the range of communication, and the data rate.At the end of the first portion of the paper, a LoRa based communication link is selected as the best communication method.

1.2. Wireless Technologies
There are a handful of wired technologies that are in use in SCADA applications.
[10] LoRa can be recognized as the best available technology from the three highlighted options.LoRa communication technology is one of the promising wide-area IoT technologies which was introduced by Semtech and the Long Range Wide Area Network (LoRaWAN) protocol specification for the technology was developed and is further promoted by the LoRa Alliance[9].J.So et al.[10]have discussed the execution of the LoRa network server on DOI: 10.4236/epe.2018.108022

Table 1 .
Comparison of available wireless technologies.
OpenStack.By taking advantage of the system services provided by OpenStack, they have been able to update the operations of the LoRa network server to achieve flexible and scalable service.They developed an experimental set up using commercially available hardware related to LoRa and available open sources for LoRa terminal, LoRa gateway and OpenStack software to validate their LoRa network server on the OpenStack platform.J. Kim et al.
stated above.As per Algorithm 1, the master MEGA acquires data from the inverter and sends it to the slave MEGA for displaying and data logging purposes.