<<

electronics

Article Evaluation of a LoRa Mesh Network for Smart Metering in Rural Locations

Anup Marahatta 1,*, Yaju Rajbhandari 1, Ashish Shrestha 2, Ajay Singh 3, Anup Thapa 1, Francisco Gonzalez-Longatt 2 , Petr Korba 4 and Seokjoo Shin 5

1 Department of Electrical and Electronics Engineering, Kathmandu University, Dhulikhel 45200, Nepal; [email protected] (Y.R.); [email protected] (A.T.) 2 Department of Electrical Engineering, Information Technology and Cybernetics, University of South-Eastern Norway, N-3918 Porsgrunn, Norway; [email protected] (A.S.); [email protected] (F.G.-L.) 3 Khowpa College of Engineering, Tribhuvan University, Bhaktapur 44800, Nepal; [email protected] 4 School of Engineering, Zurich University of Applied Science, DH-8401 Winterthur, Switzerland; [email protected] 5 Department of Computer Engineering, Chosun University, Gwangju 61452, Korea; [email protected] * Correspondence: [email protected]

Abstract: Accompanying the advancement on the (IoT), the concept of remote monitoring and control using IoT devices is becoming popular. Digital smart meters hold many advantages over traditional analog meters, and smart metering is one of application of IoT technology. It supports the conventional power system in adopting modern concepts like smart grids, block-   chains, automation, etc. due to their remote load monitoring and control capabilities. However, in many applications, the traditional analog meters still are preferred over digital smart meters Citation: Marahatta, A.; Rajbhandari, due to the high deployment and operating costs, and the unreliability of the smart meters. The Y.; Shrestha, A.; Singh, A.; Thapa, A.; Gonzalez-Longatt, F.; Korba, P.; Shin, primary reasons behind these issues are a lack of a reliable and affordable communication system, S. Evaluation of a LoRa Mesh which can be addressed by the deployment of a dedicated network formed with a Low Power Wide Network for Smart Metering in Rural Area (LPWA) platform like wireless radio standards (i.e., LoRa devices). This paper discusses LoRa Locations. Electronics 2021, 10, 751. technology and its implementation to solve the problems associated with smart metering, especially https://doi.org/10.3390/ considering the rural energy system. A simulation-based study has been done to analyse the LoRa electronics10060751 technology’s applicability in different architecture for smart metering purposes and to identify a cost-effective and reliable way to implement smart metering, especially in a rural microgrid (MG). Academic Editors: Chang Wook Ahn and Daniele Riboni Keywords: smart metering; rural electrification; wireless communication

Received: 10 January 2021 Accepted: 2 March 2021 Published: 22 March 2021 1. Introduction

Publisher’s Note: MDPI stays neutral The traditional electro-mechanical energy meters have to be read manually by visiting with regard to jurisdictional claims in the individual meters, which require separate time and labour to collect data from each published maps and institutional affil- consumer. Accompanying the advancement of digital technologies, digital energy meters iations. are taking over the traditional electro-mechanical ones and provide significant advantages over traditional meters. They enable remote, real-time monitoring, for example, and also assist in more accurate reading than in traditional meters [1]. However, there are not any global standards defined yet for smart meter functionality. According to the European Smart Meters Industry Group (ESMIG), the modern digital meters should have remote Copyright: © 2021 by the authors. Licensee MDPI, Basel, Switzerland. metering, bidirectional communication, support of advanced tariff and billing applications, This article is an open access article and remote energy supply control [2]. Smartly enabling the concept of the smart grid by distributed under the terms and implementing real-time monitoring is one of the best examples and applications in the conditions of the Creative Commons current scenario. The main advantage of a smart grid is that it enables the bidirectional Attribution (CC BY) license (https:// flow of energy between the customer and the grid utility [3]. It also enables the consumers creativecommons.org/licenses/by/ to track and/or control their energy usage more effectively [4]. To enable the concept 4.0/). of the smart grid in rural microgrids there is a need for a robust communication system

Electronics 2021, 10, 751. https://doi.org/10.3390/electronics10060751 https://www.mdpi.com/journal/electronics Electronics 2021, 10, 751 2 of 16

between the grid and the consumer, for which the smart energy meters are essential on the consumer side. A smart metering architecture consists of four major parts: (a) smart meter, (b) data concentrator, (c) communication system, and (d) centralized management and control system. The function of a smart meter is to read the load consumption data and send it to the data concentrator. The data concentrator collects data from all of the meters connected to it. The data gathered by the data concentrator is sent to the central controller with the communication system’s help. The function of the central management and control unit is to manage and store the received data and coordinate between the data concentrator and smart meters [2]. Smart meters suffer from many issues in different areas, from installation to operation. The main problem related to smart meter reading is the communication system [5]. The communication methods used in smart metering in the past can be divided into different categories like Local Area Network (LAN) and Wireless LAN (WLAN) -based smart metering. Technologies like Bluetooth and ZigBee are some of the examples of WLAN. The ZigBee is a Radio Frequency (RF) communications standard based on IEEE 802.15.4, and it is the new wireless communication technology, representing a wireless sensor network. It is highly reliable and secure, having a low data rate, low power consumption, low cost, and fast reaction. However, its application area is limited due to its small range [1]. Ethernet LAN and Wi-Fi also suffer from limited range problems, limiting their application area [6]. The Global System for Mobiles (GSM) based on smart metering is a second-generation digital cellular system, which has a long-range and reliable data transmission capabilities. It has been used widely for smart metering purposes, but the GSM-based hardware is expensive to deploy and has high running costs [1,6]. The GSM has better speed than Long Range (LoRa) and is more reliable. However, the GSM is more expensive than LoRa to deploy and cannot be used in the places where the infrastructure is not previously available. The GSM has a continuous operation cost whereas LoRa does not. Here, the authors choose LoRa due to its non-licensed operating frequency, long-range, and low power consumption capability. The Low Power Wide Area Networks (LPWAN)-based smart metering are a new form of wireless communication networks that have emerged, which are promising and reliable long-range communication systems at low cost with only the expense of data throughput. It has a communication range greater than one kilometer, and its gateway could communicate with thousands of end-devices. This category includes Long Range Wide Area Network (LoRaWAN), Sigfox, NB-IoT, etc. [7]. This study focuses on smart metering and communication modes, where conventional communication systems are not accessible. Taking the current context, most rural com- munities are forced to adopt the isolated energy system as the source of energy, due to the complex geographical structure and the unfeasibility of extending the national electric grid [8,9]. However, the adopted concept has numerous challenges like system reliability, stability, high-cost, and a lack of proper monitoring and supervision for smooth operation and maintenance [10,11]. The major reasons behind these issues are the poor architecture of the current energy system and its operational mechanism [4]. Most of the energy systems in rural areas are operating in manual mode, which needs to be changed by introducing smart concepts for their sustainable operation. Taking an example of a real site, developing countries like Nepal have initiated the concept of smart metering in microgrids (MGs). The first remote monitoring system was initiated in Nepal by the Alternative Energy Promotion Center (AEPC) [12]. The remote metering system was locally developed to monitor the voltage, frequency, and energy use of micro-hydropower plants, where the GSM-based com- munication systems were usually used to transmit the data [13,14]. These systems, however, are not in operational condition due to their unreasonable operation costs. Similarly, Gham Power, a solar company, also implemented a prepaid net metering system for a 35 kW solar MG, installed in the small community of Harkapur at Okhaldhunga District. This system was locally designed and then fabricated in China [12,15]. This metering system also uses a GSM-based communication system for data transmission. Similarly, Renewable World, an international non-governmental organization (INGO) working in Nepal, also is using Electronics 2021, 10, 751 3 of 16

the prepaid net metering system for monitoring water consumption. The smart meters face many challenges in their deployment and operation due to high hardware deployment and running costs as they use GSM-based technology to communicate, which needs to be continuously recharged. Regarding Nepal, Internet Service Provider (ISPs) mainly provide services in city areas whereas, in rural areas, internet service is rarely available. Although GSM services are available in most areas, due to their high deployment and operating costs, GSM-based smart meters are not economically feasible [16,17]. Regarding this case, LoRa technology can be a suitable solution to be implemented in a rural area like in Nepal. Here, the authors aim to solve the discussed challenges by using LoRa mesh technol- ogy. To extend the range of the communication network in remote areas for smart metering, the LoRa mesh network is proposed and studied. The authors propose algorithms that can be implemented in node and gateway hardware for efficient communication within the remote MGs. The LoRa devices in a mesh network are then simulated and verified, which meets the required specifications for smart metering purposes. This article is organized as follows: Introduction and practices in use for smart metering are discussed in the first section. LoRa Technology, its current applications in smart metering, and its limitations are discussed in the second section. How LoRa mesh technology can be implemented in smart metering, and its advantages over current practices are discussed in the third section. Outcomes of the study are discussed in the fourth section, and the conclusions are discussed in the fifth section. Though described in detail, the following are the main contributions of this paper: (a) This paper discusses the implementation of the LoRa mesh concept in smart meter- ing for efficient communication in the rural energy system (i.e., rural MGs), where traditional communication techniques have numerous drawbacks. This study finds that the LoRa mesh concept can address the issues efficiently, faced with existing communication mechanisms. (b) Efficient approaches are proposed to work with LoRa devices and technologies. This study finds that the proposed approaches can be implemented in the smart meters and in gateway hardware for network formulation and operation. The proposed approaches have been verified via simulation and are presented in the results section.

2. LoRa Technology LoRa is a wireless communication technology that uses frequency-shift-based- modulation called LoRa modulation to transmit signals. It is designed to provide long- range communication with low power and a slow data rate. It uses the free ISM band (the Industrial, Scientific, and Medical radio band) to communicate, and uses the sub-gigahertz radio frequency bands like 433 MHz, 868 MHz, and 915 MHz. The communication range of LoRa can reach up to 10 km in line of sight, depending upon the Spreading Factor (SF) used. Due to its unique modulation technique, it allows users to negotiate between data rate and range by varying the SF. The relation between data rate and SF is given by Equation (1) [18]. BW × SF R = (1) b 2SF

where, BW is the bandwidth, Rb is the data rate, and SF is the Spreading Factor. When the range increases, then the data rate has to be decreased and vice versa. The LoRa devices also can be changed to gaussian frequency shift keying (GFSK) mode to get a higher data rate. However, GFSK cannot provide the long-range capabilities of LoRa modulation. Accompanying the change in SF, the time on-air (TOA) also changes. Considering differ- ent SFs with LoRa modulation and GFSK modulation, the TOA can be calculated using Equations (4) and (5) Where NP number of permeable symbols, SW is length of synchro- nization word, CR is coding rate, DE is data rate optimization, CRC is cyclic redundancy check, IH is operation mode and PL is length of the physical layer payload [19]. The Electronics 2021, 10, x FOR PEER REVIEW 4 of 16

SFs with LoRa modulation and GFSK modulation, the TOA can be calculated using Equa- tions (4) and (5) Where NP number of permeable symbols, SW is length of synchronization word, CR is coding rate, DE is data rate optimization, CRC is cyclic redundancy check, IH is operation mode and PL is length of the physical layer payload [19]. The performance of LoRa devices for different modulation techniques, SFs, and bandwidth are tabulated in Table 1.

TOA = T T (2) Electronics 2021, 10, 751 4 of 16

TOA = T L L L L L (3)

2 performance of LoRa devices for different8PL modulation 4SF 28 techniques, 16CRC SFs, 20IH and bandwidth are TOA = NPtabulated 4.25 inSWmaxceil Table1. CR 4,0 (4) BW 4SF 2DE TOA = Tpreamble + TPacket (2)   Regarding= GFSK: + + + + TOA Tsymb Lpreamble LPHDR LPHDRCRC L PHYpayload LPHYCRC (3)

2SF     8PL − 4SF + 288+ 16CRC − 20IH   TOA = (NP + 4.25) + SW + max ceil TOA = NP SW PL(CR + 2CRC4), 0 (4) (5) BW 4(SFDR− 2DE)

Table 1. The capacity of LoRaWAN [19]. Table 1. The capacity of LoRaWAN [19]. Modulation Spreading Factor Bandwidth (kHz) Throughput (bps) Modulation Spreading Factor Bandwidth (kHz) Throughput (bps) LoRa 7 125 5469 LoRaLoRa 7 8 125 125 3125 5469 LoRaLoRa 8 9 125 125 1758 3125 LoRa 10 125 977 LoRaLoRa 9 11 125 125 537 1758 LoRaLoRa 10 12 125 125 293 977 GFSK - 150 45,660.4 LoRa 11 125 537 LoRaRegarding GFSK: 12 125 293 GFSK - 150 45,660.4 8 TOA = (NP + SW + PL + 2CRC) (5) Concerning the LoRa modulationDR technique, changing the SF changes the data rate capacityConcerning as well the as LoRathe range modulation of the technique, network. changing The data the SFrate changes and the the datarange rate of the network arecapacity inversely as well proportional as the range of to the each network. other, The whic datah ratecan andbe seen the range in Figure of the 1. network The maximum size ofare a inverselypacket that proportional can be successfully to each other, transm which canitted be seenby a innode Figure to1 .another The maximum node depends upon size of a packet that can be successfully transmitted by a node to another node depends the distance between the two nodes. The distance that a user is going to put between two upon the distance between the two nodes. The distance that a user is going to put between nodestwo nodes depends depends upon upon the the range range supportedsupported by by them. them. Therefore, Therefore, for different for different SFs, the SFs, the max- imummaximum supported supported packet packet sizes are are also also different; differe thent; maximum the maximum packet size packet supported size supported by differentby different SFs SFs can can be be s seeneen inin Figure Figure2[20 2]. [20].

Figure 1. Range versus data-rate in different Spreading Factors (SFs) [21]. Figure 1. Range versus data-rate in different Spreading Factors (SFs) [21].

Electronics 2021, 10, x FOR PEER REVIEW 5 of 16

Electronics 2021, 10, x FOR PEER REVIEW 5 of 16 Electronics 2021, 10, 751 5 of 16

Figure 2. Spreading Factor (SF) versus maximum packet size in LoRa.

The smart meters require a long-range and low communication rate, making LoRa a perfect choice for this application. There are some communication modules, like Libelium SX1272,Figure which 2. Spreading uses FactorLoRa (SF) modulation versus maximum and packet provides size in LoRa. optional frequency bands, coding Figure 2. Spreading Factor (SF) versus maximum packet size in LoRa. rates, andThe transmission smart meters requirerates [19,22]. a long-range Nowadays, and low communication LoRa technology rate, making is widely LoRa used a for In- ternet of Things (IoT) purposes [23]. The IoT devices represent a network of intercon- perfectThe choice smart for thismeters application. require There a long-range are some communication and low communication modules, like Libelium rate, making LoRa a nectedSX1272, devices. which It uses is estimated LoRa modulation that, andby the provides next optionaldecade, frequency the number bands, of coding these rates, devices will perfect choice for this application. There are some communication modules, like Libelium reachand about transmission 125 billion. rates Currently, [19,22]. Nowadays, IoT devices LoRa technologyuse LoRa istechnology widely used widely, for Internet especially in SX1272,of Things which (IoT) purposes uses LoRa [23]. Themodulation IoT devices and represent provides a network optional of interconnected frequency bands, coding sectors like electricity and agriculture, and in automation purposes, due to their long- rates,devices. and Itis transmission estimated that, rates by the [19,22]. next decade, Nowadays, the number LoRa of these technology devices will is widely reach used for In- range communication capabilities [1,24]. Due to its numerous features like low power- ternetabout 125 of billion.Things Currently, (IoT) purposes IoT devices [23]. use LoRa Thetechnology IoT devices widely, represent especially a in network sectors of intercon- usage,like long-range, electricity and and agriculture, adaptive anddata in rate automation capability, purposes, LoRa due has to a their wide long-range range of applica- nected devices. It is estimated that, by the next decade, the number of these devices will tions.communication Figure 3 shows capabilities the different [1,24]. Dueareas to of its a numerouspplication features of LoRa like with low power-usage, specific applications reachlong-range, about and 125 adaptive billion. data Currently, rate capability, IoT devices LoRa has use a LoRa wide rangetechnology of applications. widely, especially in [25,26]sectorsFigure. 3 showslike electricity the different and areas agriculture, of application ofand LoRa in withautomation specific applications purposes, [ 25 due,26]. to their long- range communication capabilities [1,24]. Due to its numerous features like low power- usage, long-range, and adaptive data rate capability, LoRa has a wide range of applica- tions. Figure 3 shows the different areas of application of LoRa with specific applications [25,26].

FigureFigure 3. 3.ApplicationApplication ofof LoRaWAN. LoRaWAN. Regarding these applications, a LoRa end device directly communicates with the Regardinggateway to transfer these theapplications, data to the cloud. a LoRa Each en endd device should directly be placedcommunicates within the with the gateway to transfer the data to the cloud. Each end device should be placed within the range of the gateway for a successful transfer of data. Taking a higher layer perspective, Figure 3. Application of LoRaWAN. the current application of LoRa uses stars-of-stars topology that permits the end nodes to connect to the gateways through direct links, as shown in Figure 4 [27,28]. The most com- Regarding these applications, a LoRa end device directly communicates with the mon architecture of the LoRaWAN used nowadays can be seen in Figure 4. gateway to transfer the data to the cloud. Each end device should be placed within the range of the gateway for a successful transfer of data. Taking a higher layer perspective, the current application of LoRa uses stars-of-stars topology that permits the end nodes to connect to the gateways through direct links, as shown in Figure 4 [27,28]. The most com- mon architecture of the LoRaWAN used nowadays can be seen in Figure 4.

Electronics 2021, 10, 751 6 of 16

range of the gateway for a successful transfer of data. Taking a higher layer perspective, the current application of LoRa uses stars-of-stars topology that permits the end nodes Electronics 2021, 10, x FOR PEER REVIEW 6 of 16 to connect to the gateways through direct links, as shown in Figure4[ 27,28]. The most common architecture of the LoRaWAN used nowadays can be seen in Figure4.

Figure 4. Stars-of-stars topology. Figure 4. Stars-of-stars topology. A LoRa network is typically setup in a stars-of-stars topology where gateways pick up A LoRa network is typically setup in a stars-of-stars topology where gateways pick the message broadcasted by the end-devices or nodes and forward them over an internet protocol-basedup the message networkbroadcasted to a by network the end-devices server. A networkor nodes serverand forward is a software them over application an inter- runningnet protocol-based over one or network more servers. to a network The network server. servers A network have theserver knowledge is a software of nodes applica- and theirtion running owners. over The messagesone or more are servers. encrypted The andnetwork can only servers be decryptedhave the knowledge by the destination of nodes nodeand their or the owners. network The server messages [7]. are LoRaWAN encrypted devices and can are only mainly be decrypted used in three by the operation destina- modestion node depending or the network upon the server energy [7]. consumption LoRaWAN devices and download are mainly speed. used The in Classthree Aoperation devices offermodes greater depending energy upon saving, the since energy they consumpt stay in sleepion modeand download most of the speed. time andThe areClass just A able de- tovices receive offer transmissions greater energy after saving each, uplinksince they connection stay in bysleep opening mode a most listening of the window. time and Class are Bjust devices able to have receive default transmissions reception windows after each within uplink the connection gateway, andby opening the Class a listening C devices win- are continuouslydow. Class B listeningdevices have to the default channel reception so they windows can receive within a downlink the gateway, connection and the at Class any timeC devices [25,27 ,are28]. continuously listening to the channel so they can receive a downlink con- nectionLoRaWAN at any time is one [25,27,28]. of the examples of a Low Power Wide Area Network (LPWAN) technologyLoRaWAN that appears is one of to the be veryexamples suitable of fora Low smart Power metering Wide thus, Area the Network LoRaWAN (LPWAN) can be usedtechnology to create that a mesh appears network to be forvery smart suitable metering. for smart It is ametering novel modulation thus, the LoRaWAN technique that can enablesbe used it to to create communicate a mesh network over long for distances smart metering. and it has It over is a novel 50 communication modulation technique channels. Thethat LoRaenables architecture it to communicate consists of over LoRa long devices, distances gateways, and it and hasan over application 50 communication server, as shownchannels. in FigureThe LoRa5[ 29architecture]. The function consists of aof LoRaLoRa devicedevices, is gateways, to read the and sensor an application data and transmitserver, as it shown to the gatewayin Figure for 5 [29]. further The operation.function of The a LoRa LoRa device device is alsoto read is able the tosensor read data the commandsand transmit from it to the the gateway gateway and for respond further accordingly.operation. The A gateway LoRa device is connected also is able to multiple to read devices,the commands whose functionfrom the is gateway to establish and the respond communication accordingly. between A gateway the LoRa is connected devices and to themultiple application devices, server. whose The function application is to esta serverblish the manages communication the collected between data fromthe LoRa all thede- devicesvices and [13 the,29 ].application Figure6 shows server. the The star applicat topologyion of server the LoRaWAN, manages the in which collected each data node from is connectedall the devices to the [13,29]. network Figure with 6 the shows help ofthe gateways. star topology A gateway of the isLoRaWAN, placed at an in appropriatewhich each locationnode is whereconnected all of to the the required network nodes with canthe connecthelp of gateways. to it. All the A nodesgateway send is theirplaced data at toan appropriate location where all of the required nodes can connect to it. All the nodes send their data to the gateway, and the gateway uploads the data to the cloud [7]. The star topology is useful when it is feasible to place multiple gateways at required locations. Concerning the case of rural areas where the internet is not available, the proposed sys- tems may fail to operate successfully. Hence, to solve this problem, the LoRa-based mesh

Electronics 2021, 10, 751 7 of 16

the gateway, and the gateway uploads the data to the cloud [7]. The star topology is useful ElectronicsElectronics 2021 2021, 10, ,x 10 FOR, x FOR PEER PEER REVIEW REVIEWwhen it is feasible to place multiple gateways at required locations. Concerning the case7 of 716 of 16

rural areas where the internet is not available, the proposed systems may fail to operate successfully. Hence, to solve this problem, the LoRa-based mesh network is suitable for the case of remote areas. Regarding a mesh network, each node can act as a repeater to networknetwork is suitable is suitable for forthe thecase case of remoteof remote areas. areas. Regarding Regarding a mesh a mesh network, network, each each node node relay information to the neighboring node, so in the case of the meters where gateway cancan act actas aas repeater a repeater to relayto relay information information to theto theneighboring neighboring node, node, so inso thein thecase case of theof the signals cannot reach, the meters in between them act as a bridge to fill the communication meters where gateway signals cannot reach, the meters in between them act as a bridge to gapmeters [5,24 ].where gateway signals cannot reach, the meters in between them act as a bridge to fill thefill thecommunication communication gap gap [5,24]. [5,24].

Figure 5. Architecture of LoRa technology. FigureFigure 5. Architecture 5. Architecture of LoRa of LoRa technology. technology.

Figure 6. LoRaWAN star topology. FigureFigure 6. LoRaWAN 6. LoRaWAN star startopology. topology. 3. Method 3. Method 3. MethodLoRaWAN has been purposed in many previous research works to be implemented forLoRaWAN smartLoRaWAN metering has has been in whichbeen purposed purposed a stars-of-stars in many in many previous topology previous research was research used works [works24, 30to, 31be to]. implementedbe Stars-of-stars implemented fortopology forsmart smart metering can metering be implemented in whichin which a stars-of-stars in a urbanstars-of-stars areas topology where topology gateways was was used canused [24,30,31]. be [24,30,31]. placed Stars-of-stars in Stars-of-stars convenient topologyplaces.topology However,can can be implemented be implemented in rural areas in urban in where urban areas gateways areas wh erewh cannoteregateways gateways be can placed can be placed be at placed required in convenient in locationsconvenient places.dueplaces. to However, the However, unavailability in ruralin rural ofareas aareas reliable where where communicationgateways gateways cannot cannot infrastructure be placedbe placed at using requiredat required mesh locations topology locations dueindue suchto the to situations theunavailability unavailability allows of fora of reliable flexiblea reliable communication placement communication locations infrastructure infrastructure for gateways, using using mesh and mesh also topology topology allows infor suchina such largersituations situations coverage allows allows area. for flexiblefor Mesh flexible placemen architecture placement locationst helps locations to for increase forgateways, gateways, the and range and also also of allows the allows LoRa for for a network.largera larger coverage coverage LoRa basedarea. area. Mesh infrastructure Mesh architecture architecture can helps be helps deployed to increase to increase and the operated therange range of atthe of a theLoRa lower LoRa network. cost network. than LoRapreviouslyLoRa based based infrastructure discussed infrastructure technologies, can can be deployedbe which deployed addresses and an operatedd operated the limitation at a at lower a lower of cost previously cost than than previously discussed previously discussedcommunicationdiscussed technologies, technologies, methods which regarding which addresses addresses smart the metering. thelimitation limitation Using of previously meshof previously configuration, discussed discussed rather commu- commu- than nicationinstallingnication methods additionalmethods regarding regarding nodes forsmart hard-to-reachsmart metering. metering. places,Using Using mesh allows mesh configuration, intermediate configuration, nodesrather rather tothan be than usedin- in- stallingtostalling relay additional information additional nodes tonodes the for gateway. forhard-to-reach hard-to-reach A LoRa places, mesh-based places, allows allows smartintermediate intermediate metering nodes system nodes to willbeto usedbe form used toan relayto interconnected relay information information mesh to the to of thegateway. smart gateway. meters. A LoRa A WhenLoRa mesh-based mesh-based there is a smart connection smart metering metering between system system a smart will will form meter form anand interconnectedan ainterconnected gateway, it mesh directly mesh of smart of sends smart meters. the meters. data When to When the there gateway, there is a isconnection a otherwiseconnection between it between uses a intermediate smart a smart me- me- ternodes andter and a to gateway, connecta gateway, it to directly the it directly gateway. sends sends the thedata data to the to thegateway, gateway, otherwise otherwise it uses it uses intermediate intermediate nodesnodes to connect to connect to the to thegateway. gateway. First,First, during during the thesimulation, simulation, smart smart meters meters were were installed installed in the in therespective respective locations locations and,and, if any if any smart smart meter meter was was not notable able to connect to connect itself itself to the to thenetwork network after after the theinstallation, installation, a relaya relay node node was was installed installed by manuallyby manually selecting selecting a suitable a suitable location. location. Regarding Regarding hard-to- hard-to-

Electronics 2021, 10, 751 8 of 16

Electronics 2021, 10, x FOR PEER REVIEW 8 of 16

First, during the simulation, smart meters were installed in the respective locations and, if any smart meter was not able to connect itself to the network after the installation, a relayreach node meters, was the installed intermediate by manually nodes selecting were placed a suitable to connect location. the gateways. Regarding Figure hard-to-reach 7 shows meters,the purposed the intermediate architecture nodes for smart were placedmetering, to connect Figure the8 shows gateways. how the Figure networks7 shows can the be purposedformed depending architecture upon for smart the node metering, density Figure to reduce8 shows interference how the networks between the can neighboring be formed dependingnetworks, uponand Figure the node 9 shows density the to reducesimulated interference sample betweennetwork theof 20 neighboring nodes. To networks, verify the and Figure9 shows the simulated sample network of 20 nodes. To verify the required required specifications of the LoRa mesh network for smart metering purposes, the sim- specifications of the LoRa mesh network for smart metering purposes, the simulation- ulation-based analysis of LoRa mesh topology was performed in the network simulation based analysis of LoRa mesh topology was performed in the network simulation 2 (NS2) 2 (NS2) simulator. A simulation to determine the response of the network regarding the simulator. A simulation to determine the response of the network regarding the packet packet delivery ratio (PDR) and the end–end delay with an increase in the number of delivery ratio (PDR) and the end–end delay with an increase in the number of nodes was nodes was performed, and how the PDR was affected by the packet size was determined. performed, and how the PDR was affected by the packet size was determined. The area The area of the simulation environment was considered to be 20 × 20 km2. The LoRa has a of the simulation environment was considered to be 20 × 20 km2. The LoRa has a data data transfer speed from 146.1 bps to 45,660 bps, depending upon the spreading factor transfer speed from 146.1 bps to 45,660 bps, depending upon the spreading factor (SF) and (SF) and modulation technique [18]. According to a study, it was found that an average modulation technique [18]. According to a study, it was found that an average smart meter smart meter generates and receives traffic of 3185 and 272 bytes per day [32], respectively. generates and receives traffic of 3185 and 272 bytes per day [32], respectively. Simulations Simulations were done to determine whether the network could satisfy these conditions. were done to determine whether the network could satisfy these conditions. Figures 10–13 showFigures the 10–13 flowcharts show of the the flowcharts programs of that the were programs implemented that were in theimplemented nodes and in gateways. the nodes and gateways.

Electronics 2021, 10, x FOR PEER REVIEW 9 of 16 Figure 7. LoRaWAN mesh architecture. Figure 7. LoRaWAN mesh architecture.

Depending upon the location of the application, the node density and number of nodes in the network are going to be different. When the application area is rural, the density of houses is going to be low, so the distance between nodes will be large and a higher SF needs to be used. Similarly, for an urban area, a lower SF needs to be used. When a network size becomes too large, the network will not be able to meet the number of data packets to be extracted per day. Considering such a case, the network either has to decrease the SF to increase the network speed or split the network in two. When a network needs to be split in two, the two neighboring networks will have to use different channels and SFs, depending upon the size and density of the network, to avoid interference, as shown in Figure 8. Regarding Figure 8, three networks with a different number of nodes are shown where A1, A2, and A3 are the areas of the nodes and D1, D2 and D3 are the average distance between the nodes in respective networks. (A1 < A2 < A3 and D1 < D1 < D3). It shows that the network in which nodes were closely packed could support a large number of nodes because they used a low SF, which allowed them to use a higher speed. Concerning a network in which nodes were far apart, they had to use a higher SF, which could support fewer nodes.

Figure 8. Network management in large scale. Figure 8. Network management in large scale.

The simulation was done for an area of 20 × 20 km2 for different SFs in different node density conditions. The geographic nature of the application area was considered flat while performing the simulation. Environmental conditions like clouds, mist, and humid- ity were not taken into account due to their everchanging nature. The range and data rate of each node in the simulation were defined according to the data in Figure 1. Figure 9 shows the instance of simulation of 20 nodes in a mesh configuration in the NS2 network simulator.

Figure 9. Network simulation 2 NS2 simulation.

The mesh network considered for the simulation contained a central gateway and nodes. The function of the central gateway was to generate invitation beacons to register new nodes to the network. The gateway used an algorithm to generate the beacon signals periodically, as shown in Figure 10. Once it generated an invitation beacon, it waited and listened to join the requests from the nodes. When it received join requests, it added the node to the network and sent the confirmation signal to the corresponding node. It also sent query requests to nodes for data packets.

Electronics 2021, 10, x FOR PEER REVIEW 9 of 16

Figure 8. Network management in large scale.

The simulation was done for an area of 20 × 20 km2 for different SFs in different node density conditions. The geographic nature of the application area was considered flat while performing the simulation. Environmental conditions like clouds, mist, and humid- ity were not taken into account due to their everchanging nature. The range and data rate Electronics 2021, 10, 751 of each node in the simulation were defined according to the data in Figure 1. Figure 9 9 of 16 shows the instance of simulation of 20 nodes in a mesh configuration in the NS2 network simulator.

Electronics 2021, 10, x FOR PEER REVIEW 10 of 16

Electronics 2021, 10, x FOR PEER REVIEW 10 of 16

FigureFigure 9. Network simulation simulation 2 NS2 2 NS2 simulation. simulation.

The mesh network considered for the simulation contained a central gateway and nodes. The function of the central gateway was to generate invitation beacons to register new nodes to the network. The gateway used an algorithm to generate the beacon signals periodically, as shown in Figure 10. Once it generated an invitation beacon, it waited and listened to join the requests from the nodes. When it received join requests, it added the node to the network and sent the confirmation signal to the corresponding node. It also sent query requests to nodes for data packets.

Figure 10. Operation of a Gateway.

Then, the gateway was used to connect the network to the internet. Shown in Figure 10, the function of the gateway was to periodically broadcast invitation beacons that reg- istered the new nodes to the network and execute the data query function to extract data from the respective nodes as required. Similarly, the query function sent query requests to the target nodes turn-by-turn to extract data from the respective nodes, as shown in Figure 11. When the target node did not respond to the query request within a time limit, then the target node was considered offline and the algorithm moved on to the other nodesFigure for data 10. Operation extraction. of a Gateway. Figure 10. Operation of a Gateway.

Then, the gateway was used to connect the network to the internet. Shown in Figure 10, the function of the gateway was to periodically broadcast invitation beacons that reg- istered the new nodes to the network and execute the data query function to extract data from the respective nodes as required. Similarly, the query function sent query requests to the target nodes turn-by-turn to extract data from the respective nodes, as shown in Figure 11. When the target node did not respond to the query request within a time limit, then the target node was considered offline and the algorithm moved on to the other nodes for data extraction.

Figure 11. Query function. Figure 11. Query function.

Figure 11. Query function.

Electronics 2021,, 10,, 751x FOR PEER REVIEW 1110 of 16

Electronics 2021, 10, x FOR PEER REVIEW 12 of 16

Figure 12. Operation of a Node. Figure 12. Operation of a Node.

Conversely, the nodes were always listening to the beacons, data packets, and/or join requests, as shown in Figure 12. When a node received a beacon: (a) if it was already con- nected to the network, it executed the packet processing function; (b) if not, it connected itself to the network by sending join requests to the gateway. The nodes were pro- grammed in such a way that, while retransmitting a beacon, they updated and included the path through which the beacon arrived at that particular node. Therefore, when send- ing the join request, it used the path included in the beacon to define the path of the join request signal. Then it waited for the confirmation from the gateway, got the confirmation that it was registered to the network and retransmitted the invitation beacon signal. While retransmitting the beacon, it also included the path from which the beacon was received so the receiving nodes knew the path through which to respond to the gateway. When the node was already registered to the network, it executed the packet process function. Shown in Figure 13, the task of the packet process function was to determine what type of data packet was the received signal. When it was a beacon, it waited for the random delay, included the updated path of the arrival of the beacon, waited for a random time, and retransmitted the signal along with the updated path. When it was a join request from a node then it read the path to the gateway from the received signal and relayed the signal according to the path. Similarly, if it was a data request signal from the gateway then it determined the target node; if it was the target node then it sent the requested data packet to the gateway. When it was not the target node, then it retransmitted the signal accord-

ingly.Figure 13. Packet process function. Figure 13. Packet process function. Depending upon the location of the application, the node density and number of 4. Resultsnodes and in Discussion the network are going to be different. When the application area is rural, the Here,density a mesh of houses network is going of LoRa to bedevices low, sowas the simulated distance using between an NS2 nodes network will be simula- large and a tor, andhigher the LoRa SF needs frequency to be used. used Similarly, was 912 forMHz an at urban a 125 area, kHz a bandwidth. lower SF needs Theto capacity be used. of When the networka network was size analyzed becomes for toodifferent large, theSpreadin networkg Factors will not (SFs). be able The to analysis meet the was number done to of data determinepackets whether to be extracted the network per day. could Considering be used for such smart a case, metering the network with eitherstandard has smart to decrease the SF to increase the network speed or split the network in two. When a network needs to metering requirements. A network was simulated for different speeds from 146 bps to be split in two, the two neighboring networks will have to use different channels and SFs, 5469 bps for an area of 20 × 20 km2 and a buffer size of 512 bytes for each node, where data depending upon the size and density of the network, to avoid interference, as shown in extraction was done periodically. The range and speed of each node were defined accord- Figure8. Regarding Figure8, three networks with a different number of nodes are shown ing to Table 1, and the nodes were positioned randomly in the simulated area. where A1, A2, and A3 are the areas of the nodes and D1, D2 and D3 are the average distance Figure 14 presents the end-to-end delay of the transmitted signal for different SFs between the nodes in respective networks. (A1 < A2 < A3 and D1 < D1 < D3). It shows with a different number of nodes. It shows how the average end-to-end delay of signal transmission increased with an increase in several nodes in a network, and how the end- to-end delay also varied with the different SFs. Each data in Figure 14 is an average of 25 transmissions while collecting data at a 20-s interval. Figure 15 shows how the package delivery ratio (PDR) changed and Figure 14 shows how the end-to-end delay changed with the change in SF and the number of nodes. Considering Figure 15, it can be seen that, although at a lower SF and a low number of nodes, the PDR was high but, with the in- crease in SF and the number of nodes, the PDR decreased rapidly. Due to the decrease in the PDR with respect to the increase in SF and nodes in the network, the gateway had to send multiple data requests to the respective node to get a single packet extracted success- fully. Even with the decrease in the PDR, regarding Figure 16 it can be seen that the min- imum successful data extraction period for a SF of 12 and a network of 250 nodes was 750 s, which is more than enough for smart metering purposes [21,24]. Figure 16 shows how the minimum possible data extraction period varied for a node if the master node ex- tracted the data from each node turn-by-turn. It can be seen in Figure 16 that, with the increase in the number of nodes and SF, the minimum successful data extraction period increased accordingly. Regarding a network consisting of 250 nodes and operating at a SF of seven, the minimum successful data extraction period will be 230 s.

Electronics 2021, 10, 751 11 of 16

that the network in which nodes were closely packed could support a large number of nodes because they used a low SF, which allowed them to use a higher speed. Concerning a network in which nodes were far apart, they had to use a higher SF, which could support fewer nodes. The simulation was done for an area of 20 × 20 km2 for different SFs in different node density conditions. The geographic nature of the application area was considered flat while performing the simulation. Environmental conditions like clouds, mist, and humidity were not taken into account due to their everchanging nature. The range and data rate of each node in the simulation were defined according to the data in Figure1. Figure9 shows the instance of simulation of 20 nodes in a mesh configuration in the NS2 network simulator. The mesh network considered for the simulation contained a central gateway and nodes. The function of the central gateway was to generate invitation beacons to register new nodes to the network. The gateway used an algorithm to generate the beacon signals periodically, as shown in Figure 10. Once it generated an invitation beacon, it waited and listened to join the requests from the nodes. When it received join requests, it added the node to the network and sent the confirmation signal to the corresponding node. It also sent query requests to nodes for data packets. Then, the gateway was used to connect the network to the internet. Shown in Figure 10, the function of the gateway was to periodically broadcast invitation beacons that registered the new nodes to the network and execute the data query function to extract data from the respective nodes as required. Similarly, the query function sent query requests to the target nodes turn-by-turn to extract data from the respective nodes, as shown in Figure 11. When the target node did not respond to the query request within a time limit, then the target node was considered offline and the algorithm moved on to the other nodes for data extraction. Conversely, the nodes were always listening to the beacons, data packets, and/or join requests, as shown in Figure 12. When a node received a beacon: (a) if it was already connected to the network, it executed the packet processing function; (b) if not, it connected itself to the network by sending join requests to the gateway. The nodes were programmed in such a way that, while retransmitting a beacon, they updated and included the path through which the beacon arrived at that particular node. Therefore, when sending the join request, it used the path included in the beacon to define the path of the join request signal. Then it waited for the confirmation from the gateway, got the confirmation that it was registered to the network and retransmitted the invitation beacon signal. While retransmitting the beacon, it also included the path from which the beacon was received so the receiving nodes knew the path through which to respond to the gateway. When the node was already registered to the network, it executed the packet process function. Shown in Figure 13, the task of the packet process function was to determine what type of data packet was the received signal. When it was a beacon, it waited for the random delay, included the updated path of the arrival of the beacon, waited for a random time, and retransmitted the signal along with the updated path. When it was a join request from a node then it read the path to the gateway from the received signal and relayed the signal according to the path. Similarly, if it was a data request signal from the gateway then it determined the target node; if it was the target node then it sent the requested data packet to the gateway. When it was not the target node, then it retransmitted the signal accordingly.

4. Results and Discussion Here, a mesh network of LoRa devices was simulated using an NS2 network simulator, and the LoRa frequency used was 912 MHz at a 125 kHz bandwidth. The capacity of the network was analyzed for different Spreading Factors (SFs). The analysis was done to determine whether the network could be used for smart metering with standard smart metering requirements. A network was simulated for different speeds from 146 bps to 5469 bps for an area of 20 × 20 km2 and a buffer size of 512 bytes for each node, where Electronics 2021, 10, 751 12 of 16

data extraction was done periodically. The range and speed of each node were defined according to Table1, and the nodes were positioned randomly in the simulated area. Figure 14 presents the end-to-end delay of the transmitted signal for different SFs with a different number of nodes. It shows how the average end-to-end delay of signal transmission increased with an increase in several nodes in a network, and how the end- Electronics 2021, 10, x FOR PEER REVIEWto-end delay also varied with the different SFs. Each data in Figure 14 is an average of 25 13 of 16

Electronics 2021, 10, x FOR PEER REVIEWtransmissions while collecting data at a 20-s interval. Figure 15 shows how the package 13 of 16 delivery ratio (PDR) changed and Figure 14 shows how the end-to-end delay changed with the change in SF and the number of nodes. Considering Figure 15, it can be seen that, althoughSimilarly, at a lower for SF a and SF a of low 11, number the data of nodes, extracti the PDRon period was high will but, withbe 435 the increases. When a network is in SF and the number of nodes, the PDR decreased rapidly. Due to the decrease in the not meetingSimilarly, the for minimum a SF of 11,data the extraction data extracti periodon requirement,period will be then 435 wes. When either a need network to de- is PDR with respect to the increase in SF and nodes in the network, the gateway had to send creasemultiplenot meeting the data SF requests the or splitminimum to the respectivenetwork data extraction nodeinto totwo get period aseparate single requirement, packet networks. extracted Whenthen successfully. we there either is a need condition to de- whereEvencrease with thethe the networkSF decrease or split needs in the the PDR,networkto be regarding split into into Figuretwo two, separate 16 then it can it benetworks.needs seen thatto be theWhen done minimum there in such is aa conditionway that thesuccessfulwhere signals the data networkdo extractionnot interfere needs period to with be for split aeach SF ofinto other. 12 andtwo, Regarding a then network it needs of signal 250 to nodes interferencebe done was 750 in s,such reductions a way thatbe- tweenwhichthe signals is neighboring more do than not enough interfere networks, for smart with they metering each can other. purposesbe assign Regarding [21ed,24 different]. Figure signal 16 SFs,shows interference or how they the can reductions be divided be- minimum possible data extraction period varied for a node if the master node extracted inthetween terms data neighboring from of geographical each node networks, turn-by-turn. terrain they for It can canminimu be be seen assignm in signal Figureed different 16interference. that, with SFs, the Consideringor increase they can be the divided simu- lation,in theterms number a minimumof geographical of nodes time and SF, intervalterrain the minimum forat whichminimu successful nodesm signal data can extraction interference.communicate period increasedConsidering with the gateway the simu- is calculatedaccordingly.lation, a minimum and Regarding presented atime network intervalin Figure consisting at 16. which of 250 nodesnodes and can operating communicate at a SF of with seven, the gateway is thecalculated minimum and successful presented data extraction in Figure period 16. will be 230 s.

FigureFigure 14. 14.Number Number of nodesof nodes versus versus end–end end–end delay. delay. Figure 14. Number of nodes versus end–end delay.

Figure 15. SF versus PDR for a different number of nodes. Figure 15. SF versus PDR for a different number of nodes. Figure 15. SF versus PDR for a different number of nodes.

Figure 16. Minimum data extraction period for a different number of nodes at different Spreading FactorsFigure 16.(SFs). Minimum data extraction period for a different number of nodes at different Spreading Factors (SFs). An average meter generates traffic of 3185 bytes per day and receives 227 bytes per day [21].An averageAccording meter to the generates studies traffic[21,24], of an 3185 average bytes meterper day can and generate receives 3.185 227 Kbytes bytes per of dataday [21].per day.According It will totake the a studies different [21,24], number an averageof transmissions meter can to generate satisfy 3.185 3.185 KbytesKbytes ofof data per day. It will take a different number of transmissions to satisfy 3.185 Kbytes of

Electronics 2021, 10, x FOR PEER REVIEW 13 of 16

Similarly, for a SF of 11, the data extraction period will be 435 s. When a network is not meeting the minimum data extraction period requirement, then we either need to de- crease the SF or split the network into two separate networks. When there is a condition where the network needs to be split into two, then it needs to be done in such a way that the signals do not interfere with each other. Regarding signal interference reductions be- tween neighboring networks, they can be assigned different SFs, or they can be divided in terms of geographical terrain for minimum signal interference. Considering the simu- lation, a minimum time interval at which nodes can communicate with the gateway is calculated and presented in Figure 16.

Figure 14. Number of nodes versus end–end delay.

Electronics 2021, 10, 751 13 of 16 Figure 15. SF versus PDR for a different number of nodes.

Figure 16. Minimum data extraction period for a different number of nodes at different Spreading FigureFactors (SFs).16. Minimum data extraction period for a different number of nodes at different Spreading Factors (SFs). Similarly, for a SF of 11, the data extraction period will be 435 s. When a network is not meeting the minimum data extraction period requirement, then we either need to decrease the SFAn or average split the network meter intogenerates two separate traffic networks. of 3185 Whenbytes there per isday a condition and receives where 227 bytes per daythe network[21]. According needs to be to split the intostudies two, then[21,24], it needs an average to be done meter in such can a waygenerate that the 3.185 Kbytes of datasignals per do day. not interfere It will with take each a different other. Regarding number signal of interferencetransmissions reductions to satisfy between 3.185 Kbytes of neighboring networks, they can be assigned different SFs, or they can be divided in terms of geographical terrain for minimum signal interference. Considering the simulation, a Electronics 2021, 10, x FOR PEER REVIEW 14 of 16 minimum time interval at which nodes can communicate with the gateway is calculated and presented in Figure 16. An average meter generates traffic of 3185 bytes per day and receives 227 bytes per day [21]. According to the studies [21,24], an average meter can generate 3.185 Kbytes data per day per node based upon the SF of the node due to different packet size capacities of data per day. It will take a different number of transmissions to satisfy 3.185 Kbytes atof different data per day SFs, per as nodeshown based in Figure upon the 17. SF Taki of theng these node due factors to different into consideration, packet size a minimum numbercapacities of at differenttransmissions SFs, as shown required in Figure per 17 day. Taking for networks these factors consisting into consideration, of different a SFs is ob- tainedminimum and number shown of transmissionsin Figure 18. required It can perbe dayobserved for networks that consistingthe maximum of different number of packet transmissionsSFs is obtained and required shown inat Figurethe lowest 18. It can data be observedrate was that 62 bps. the maximum This condition number ofis met even by a packet transmissions required at the lowest data rate was 62 bps. This condition is met networkeven by a consisting network consisting of the lowest of the lowest data datarate. rate. Regarding Regarding the the simulated simulated networknetwork size, the net- worksize, the easily network meets easily the meets required the required conditions conditions for for smart smart metering.metering. The The above above data data suggests thatsuggests the thatmesh the network mesh network of LoRa of LoRa devices devices ca cann be be used for for smart smart metering metering purposes. purposes.

Figure 17. Packet per day versus number of nodes in different SF. Figure 17. Packet per day versus number of nodes in different SF.

Figure 18. Minimum number of transmissions required per node for networks consisting of differ- ent Spreading Factors (SFs).

5. Conclusions This paper discussed how LoRa devices can be used for smart metering. The study proposed a mesh configuration of LoRa devices be implemented in a smart metering sys- tem. The study evaluated the algorithm to be used by gateways and nodes to rout and manage data packets based on a simulation. The simulation results verified how the sys- tem will perform when implemented for smart metering purposes under various condi- tions like different Spreading Factors (SFs) and nodes. Based on the results, we found that the LoRaWAN in a mesh configuration achieves the required specifications to be imple- mented for smart metering in rural microgrids (MGs). The simulation does not consider conditions like non-uniform geographical terrain and external noise, however, so the system may behave a little differently in real imple- mentation. During this analysis, the maximum number of devices simulated in a mesh were 250, for which the purposed system meets the required specifications from the sim- ulation. Once the system reaches a critical number of smart meters in a network, the sys- tem will not be able to maintain the required specifications due to the limited bandwidth of LoRa devices. Further studies need to be conducted to address these issues. However,

Electronics 2021, 10, x FOR PEER REVIEW 14 of 16

data per day per node based upon the SF of the node due to different packet size capacities at different SFs, as shown in Figure 17. Taking these factors into consideration, a minimum number of transmissions required per day for networks consisting of different SFs is ob- tained and shown in Figure 18. It can be observed that the maximum number of packet transmissions required at the lowest data rate was 62 bps. This condition is met even by a network consisting of the lowest data rate. Regarding the simulated network size, the net- work easily meets the required conditions for smart metering. The above data suggests that the mesh network of LoRa devices can be used for smart metering purposes.

Electronics 2021, 10, 751 14 of 16 Figure 17. Packet per day versus number of nodes in different SF.

Figure 18. Minimum number of transmissions required per node for networks consisting of different FigureSpreading 18. Factors Minimum (SFs). number of transmissions required per node for networks consisting of differ- ent Spreading Factors (SFs). 5. Conclusions 5. ConclusionsThis paper discussed how LoRa devices can be used for smart metering. The study proposed a mesh configuration of LoRa devices be implemented in a smart metering system.This The paper study evaluateddiscussed the how algorithm LoRa to devices be used bycan gateways be used and for nodes smart to rout metering. and The study proposedmanage data a packetsmesh configuration based on a simulation. of LoRa The simulationdevices be results implemented verified how in the a systemsmart metering sys- tem.will perform The study when evaluated implemented the for algorithm smart metering to be purposes used by under gateways various conditionsand nodes to rout and managelike different data Spreading packets Factors based (SFs) on a and simulation. nodes. Based The on simulation the results, we results found verified that the how the sys- LoRaWAN in a mesh configuration achieves the required specifications to be implemented temfor smart will meteringperform in when rural microgrids implemented (MGs). for smart metering purposes under various condi- tionsThe like simulation different does Spreading not consider Factors conditions (SFs) like an non-uniformd nodes. Based geographical on the terrain results, and we found that theexternal LoRaWAN noise, however, in a mesh so the systemconfiguration may behave achieves a little differently the required in real implementation. specifications to be imple- mentedDuring this for analysis, smart metering the maximum in rural number microgrids of devices simulated (MGs). in a mesh were 250, for which the purposed system meets the required specifications from the simulation. Once the systemThe simulation reaches a critical does number not consider of smart meters conditio in ans network, like non-uniform the system will geographical not be terrain andable toexternal maintain noise, the required however, specifications so the duesystem to the may limited behave bandwidth a little of LoRadifferently devices. in real imple- mentation.Further studies During need tothis be conductedanalysis, tothe address maximu thesem issues.number However, of devices the proposed simulated in a mesh weremethod 250, can for be implementedwhich the purposed even in areas system where no meet commercials the required communications specifications systems from the sim- ulation.are available. Once It the requires system less deploymentreaches a critical cost as itnumber minimizes of thesmart number meters of gateways in a network, the sys- by using mesh topology. Furthermore, the operational cost of the proposed concept is temsignificantly will not less be comparedable to maintain to the traditional the required approaches specifications as the traditional due to approaches the limited bandwidth ofinvolve LoRa external devices. communication Further studies service need providers. to be conducted to address these issues. However,

Author Contributions: Conceptualization, A.M., Y.R. and A.S. (Ashish Shrestha); methodology, A.M., Y.R. and A.S. (Ajay Singh); software, A.M. and Y.R.; validation, A.T., P.K. and S.S.; formal analysis, A.M. and Y.R.; investigation, A.M. and Y.R.; resources, A.S. (Ashish Shrestha) and A.T.; writing— original draft preparation, A.M., Y.R., A.S. (Ashish Shrestha) and A.S. (Ajay Singh); writing—review and editing, A.M., Y.R., A.S. (Ashish Shrestha), A.S. (Ajay Singh), A.T., F.G.-L., P.K., S.S. All authors have read and agreed to the published version of the manuscript. Funding: This research was funded by EnergizeNepal Project Office, Kathmandu University, grant number ENEP-RENP-II-19-03, and the APC was provided by Seokjoo Shin. Data Availability Statement: Data related to this research is available on [33]. Acknowledgments: The authors are thankful to the Department of Electrical and Electronics Engi- neering and Center for Electric Power Engineering (CEPE), Kathmandu University to provide the requested information, laboratory supports, and kind cooperation during this research work. Conflicts of Interest: There are no conflict of interest. Electronics 2021, 10, 751 15 of 16

References 1. Rahman, M.M.; Islam, M.O.; Salakin, M.S. Arduino and GSM based smart energy meter for advanced metering and billing system. In Proceedings of the 2015 International Conference on Electrical Engineering and Information Communication Technology (ICEEICT), Savar, Bangladesh, 21–23 May 2015; pp. 1–6. 2. Uribe-Pérez, N.; Hernández, L.; De la Vega, D.; Angulo, I. State of the art and trends review of smart metering in electricity grids. Appl. Sci. 2016, 6, 68. [CrossRef] 3. Depuru, S.S.S.R.; Wang, L.; Devabhaktuni, V.; Gudi, N. Smart meters for power grid—Challenges, issues, advantages and status. In Proceedings of the 2011 IEEE/PES Power Systems Conference and Exposition, Phoenix, AZ, USA, 20–23 March 2011; pp. 1–7. 4. Shrestha, A.; Bishwokarma, R.; Chapagain, A.; Banjara, S.; Aryal, S.; Mali, B.; Thapa, R.; Bista, D.; Hayes, B.P.; Papadakis, A. Peer-to-Peer Energy Trading in Micro/Mini-Grids for Local Energy Communities: A Review and Case Study of Nepal. IEEE Access 2019, 7, 131911–131928. [CrossRef] 5. Wibisono, G.; Saktiaji, G.P.; Ibrahim, I. Techno economic analysis of smart meter reading implementation in PLN Bali using LoRa technology. In Proceedings of the 2017 International Conference on Broadband Communication, Wireless Sensors and Powering (BCWSP), Jakarta, Indonesia, 21–23 November 2017; pp. 1–6. 6. Das, H.; Saikia, L. GSM enabled smart energy meter and automation of home appliances. In Proceedings of the 2015 International Conference on Energy, Power and Environment: Towards Sustainable Growth (ICEPE), Shillong, , 12–13 June 2015; pp. 1–5. 7. Laveyne, J.; Van Eetvelde, G.; Vandevelde, L. Application of LoRaWAN for smart metering: An experimental verification. Int. J. Contemp. Energy 2018, 4, 61–67. 8. Shrestha, A.; Rana, L.B.; Singh, A.; Phuyal, S.; Ghimire, A.; Giri, R.; Kattel, R.; Karki, K.; Jha, S.K. Assessment of electricity excess in an isolated hybrid energy system: A case study of a Dangiwada village in rural Nepal. Energy Procedia 2019, 160, 76–83. [CrossRef] 9. Shrestha, A.; Singh, A.; Khanal, K.; Maskey, R. Potentiality of off-grid hybrid systems for sustainable power supply at Kathmandu University campus. In Proceedings of the 2016 IEEE 6th International Conference on Power Systems (ICPS), New Delhi, India, 4–6 March 2016; pp. 1–6. 10. Shrestha, P.; Shrestha, A.; Adhikary, B. Comparative analysis of grid integration on distributed energy system. In Proceedings of the 5th International Conference on Developments in Renewable Energy Technology, Kathmandu, Nepal, 29 March 2018; pp. 29–31. 11. Sah, S.; Shrestha, A.; Papadakis, A. Cost-effective and reliable energy system for Kathmandu University complex. In Proceedings of the 11th International Conference on Deregulated Engineering Market Issues, Nicosia, Cyprus, 20–21 September 2018; pp. 20–21. 12. AEPC. A Year in Review. Available online: https://www.aepc.gov.np/uploads/docs/2018-06-20_Annual%20Report%20FY%20 2069-070%20(2012-2013).pdf (accessed on 10 August 2020). 13. Shrestha, A.; Rajbhandari, Y.; Khadka, N. Status of Micro/Mini-Grid Systems in a Himalayan Nation: A Comprehensive. IEEE Access 2020, 8, 120983–120998. [CrossRef] 14. Shrestha, P.; Shrestha, A.; Shrestha, N.T.; Papadakis, A.; Maskey, R.K. Assessment on Scaling-Up of Mini-Grid Initiative: Case Study of Mini-Grid in Rural Nepal. Int. J. Precis. Eng. Manuf. Green Technol. 2021, 8, 217–231. [CrossRef] 15. Badran, O.; Mekhilef, S.; Mokhlis, H.; Dahalan, W. Optimal reconfiguration of distribution system connected with distributed generations: A review of different methodologies. Renew. Sustain. Energy Rev. 2017, 73, 854–867. [CrossRef] 16. Georgilakis, P.S.; Hatziargyriou, N.D. A review of power distribution planning in the modern power systems era: Models, methods and future research. Electr. Power Syst. Res. 2015, 121, 89–100. [CrossRef] 17. Marahatta, A.; Rajbhandari, Y.; Shrestha, A.; Singh, A.; Gachhadar, A.; Thapa, A. Priority-based low voltage DC microgrid system for rural electrification. Energy Rep. 2021, 7, 43–51. [CrossRef] 18. Reynders, B.; Meert, W.; Pollin, S. Power and spreading factor control in low power wide area networks. In Proceedings of the 2017 IEEE International Conference on Communications (ICC), Paris, France, 21–25 May 2017; pp. 1–6. 19. Petäjäjärvi, J.; Mikhaylov, K.; Pettissalo, M.; Janhunen, J.; Iinatti, J. Performance of a low-power wide-area network based on LoRa technology: Doppler robustness, scalability, and coverage. Int. J. Distrib. Sens. Netw. 2017, 13, 1550147717699412. [CrossRef] 20. Semtech. Tech Papers and Guides. Available online: https://lora-developers.semtech.com/library/tech-papers-and-guides/ lora-and-lorawan/ (accessed on 10 January 2021). 21. Alliance, L. A Technical Overview of LoRaWAN. Available online: https://www.tuv.com/media/corporate/products_1/ electronic_components_and_lasers/TUeV_Rheinland_Overview_LoRa_and_LoRaWANtmp.pdf (accessed on 10 November 2015). 22. Libelium. Waspmote—LoRa 868MHz 915MHz—SX1272 Networking Guide. Available online: https://usermanual.wiki/ Document/waspmotelora868mhz915mhzsx1272networkingguide.548782060/html (accessed on 10 February 2017). 23. Sarker, V.K.; Queralta, J.P.; Gia, T.N.; Tenhunen, H.; Westerlund, T. A survey on LoRa for IoT: Integrating edge computing. In Pro- ceedings of the 2019 Fourth International Conference on Fog and Mobile Edge Computing (FMEC), Rome, Italy, 10–13 June 2019; pp. 295–300. 24. Cheng, Y.; Saputra, H.; Goh, L.M.; Wu, Y. Secure smart metering based on LoRa technology. In Proceedings of the 2018 IEEE 4th International Conference on Identity, Security, and Behavior Analysis (ISBA), Singapore, 11–12 January 2018; pp. 1–8. Electronics 2021, 10, 751 16 of 16

25. Andrade, R.O.; Yoo, S.G. A comprehensive study of the use of LoRa in the development of smart cities. Appl. Sci. 2019, 9, 4753. [CrossRef] 26. Cattani, M.; Boano, C.A.; Römer, K. An experimental evaluation of the reliability of lora long-range low-power wireless communication. J. Sens. Actuator Netw. 2017, 6, 7. [CrossRef] 27. Sanchez-Iborra, R.; Sanchez-Gomez, J.; Ballesta-Viñas, J.; Cano, M.-D.; Skarmeta, A.F. Performance evaluation of LoRa considering scenario conditions. Sensors 2018, 18, 772. [CrossRef] 28. Pasolini, G.; Buratti, C.; Feltrin, L.; Zabini, F.; De Castro, C.; Verdone, R.; Andrisano, O. Smart city pilot projects using LoRa and IEEE802. 15.4 technologies. Sensors 2018, 18, 1118. [CrossRef][PubMed] 29. TTN LoRa Architecture. Available online: https://things4u.github.io/Projects/SingleChannelGateway/DeveloperGuide/1_ LoRa_Architecture/architecture.html (accessed on 1 June 2016). 30. Varsier, N.; Schwoerer, J. Capacity limits of LoRaWAN technology for smart metering applications. In Proceedings of the 2017 IEEE International Conference on Communications (ICC), Paris, France, 21–25 May 2017; pp. 1–6. 31. Helder, F.; Dester, P.S.; Stancanelli, E.M.G.; Cardieri, P. Feasibility of Alarm Events upon Smart Metering in LoRa Networks. In Proceedings of the 2019 16th International Symposium on Wireless Communication Systems (ISWCS), Oulu, Finland, 27–30 August 2019; pp. 480–484. 32. Luan, W.; Sharp, D.; LaRoy, S. Data traffic analysis of utility smart metering network. In Proceedings of the 2013 IEEE Power & Energy Society General Meeting, Vancouver, BC, Canada, 21–25 July 2013; pp. 1–4. 33. Marahatta, A. LoRa Data. 2021. Available online: https://github.com/anpmht/Lora_data (accessed on 10 January 2021).