[image] [image] Ressource protégée - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu

[image] [image]

* Documentation

* FR
  Français (FR)

* Anglais (EN)
  Se connecter

* Portail HAL Inria

* Recherche
  Loading...

## Recherche avancée

Information de documents

Titres

○ Titres

○ Sous-titre

○ Titre de l'ouvrage

○ Titre du volume (Série)

○ Champ de recherche par défaut (multicritères) + texte intégral des PDF

○ Résumé

○ Texte intégral indexé des documents PDF

○ Mots-clés

○ Type de document

○ Sous-type de document

○ Tous les identifiants du document

○ Identifiant HAL du dépôt

○ Langue du document (texte)

○ Pays (Texte)

○ Ville

○ À paraître (true ou false)

Ajouter
# sFarm: A Distributed Ledger Based Remote Crop Monitoring System for Smart Farming

Anand K. Bapatla, Saraju P. Mohanty, Elias Kougianos

► To cite this version:

Anand K. Bapatla, Saraju P. Mohanty, Elias Kougianos. sFarm: A Distributed Ledger Based Remote Crop Monitoring System for Smart Farming. 4th IFIP International Internet of Things Conference (IFIIoT), Nov 2021, Virtual, Netherlands. pp.13-31, 10.1007/978-3-030-96466-5_2 . hal-04471509

HAL Id: hal-04471509

https://inria.hal.science/hal-04471509v1

Submitted on 21 Feb 2024

**HAL** is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire **HAL**, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
## Auteur

### Auteur (multicritères)

○ Auteur (multicritères)

○ Auteur : Nom complet

○ Auteur : Nom de famille

○ Auteur : Prénom

○ Auteur : Complément de nom, deuxième prénom

○ Auteur : Organisme payeur

○ Auteur : IdHal (chaîne de caractères)

○ Auteur : Fonction

○ Auteur : personID (entier)

○ Auteur : Identifiant de l'organisme payeur

○ Auteur : Identifiant de la structure

○ Directeur de thèse

○ Éditeur

○ Éditeur scientifique

○ Éditeur de la série

## Ajouter

### Structure

### Structure (multicritères)

○ Structure (multicritères)

○ Structure : Acronyme

○ Structure : Nom

○ Structure : Code

○ Structure : Pays

○ Structure : Type

○ Structure : État dans le référentiel

○ Structure : Identifiant HAL de la structure

○ Structure/équipe de recherche : Pays

○ Structure/regroupement d'équipes : Pays

○ Structure/laboratoire : Pays

○ Structure/regroupement de laboratoires : Pays

○ Structure/institution : Pays

○ Structure/regroupement d'institutions : Pays

## Ajouter
<figure><img src="image_2.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
Autres

Champ de recherche par défaut (multicritères)

○ <u>Champ de recherche par défaut (multicritères)</u>

○

○ <u>Revues (multicritères)</u>

○ <u>Revue : Éditeur</u>

○ <u>Revue : Titre abrégé</u>

○ <u>Revue : Titre</u>

○ <u>Revue : Identifiant interne</u>

○ <u>Revue : Date de début de publication</u>

○ <u>Revue : ISSN électronique</u>

○ <u>Revue : ISSN</u>

○ <u>Revue : Éditeur</u>

○ <u>Revue : Couleur dans SHERPA/RoMEO</u>

○ <u>Revue : État dans le référentiel</u>

○

○ <u>Colloque (multicritères)</u>

○ <u>Colloque : Titre</u>

○ <u>Colloque : Organisateur</u>

○ <u>Colloque : date de début (Année)</u>

○ <u>Colloque : date de fin (Année)</u>

○ <u>Conférence invitée (oui/non)</u>

○

○ <u>Projets ANR (multicritères)</u>

○ <u>Projet ANR : Acronyme</u>

○ <u>Projet ANR : Acronyme du programme</u>

○ <u>Projet ANR : Code décision (référence)</u>

○ <u>Projet ANR : Nom</u>

○ <u>Projet ANR : Identifiant interne</u>

○ <u>Projet ANR : État dans le référentiel</u>

○

○ <u>Projets européens (multicritères)</u>

○ <u>Projet européen : Acronyme</u>

○ <u>Projet européen : Identifiant de l'appel à projet</u>

○ <u>Projet européen : Référence</u>

○ <u>Projet européen : Nom</u>

○ <u>Projet européen : Date de fin</u>

○ <u>Projet européen : Financement</u>

○ <u>Projet européen : Date de début</u>
sFarm: A Distributed Ledger
based Remote Crop Monitoring System for Smart Farming

Anand K. Bapatla¹[0000-0003-4567-7827],
Saraju P. Mohanty¹[0000-0003-2959-6541], and Elias Kougianos²[0000-0002-1616-7628]

¹ Department of Computer Science and Engineering, University of North Texas, USA.
anandkumarbapatla@my.unt.edu, saraju.mohanty@unt.edu

² Department of Electrical Engineering, University of North Texas, USA.
elias.kougianos@unt.edu

**Abstract.** Crop monitoring systems are one of the important aspects of Smart Agriculture. Due to explosive growth of population there is an increase in demand for food products while urbanization is causing shortage in manual labor. As the yield of a crop is greatly affected by many climatic and environmental parameters, there is an urgent need for efficient crop monitoring. Rapidly advancing IoT (Internet of Things) technologies have shown very promising results and have automated most of the traditional processes in farming. An efficient Crop Monitoring System (CMS) is proposed which automates the monitoring by using the IoT and real-time data is shared securely using private IOTA Tangle Distributed Ledger Technology. The proposed application equips farmers with required information which will help them make decisions promptly based on the real-time environmental parameters of the crop and reduces human labor. Data privacy and security are other important aspects addressed in the proposed system by setting up a private IOTA Tangle. Unlike public distributed ledgers, private distributed ledgers provide data privacy and security by allowing only known participants to join the network, thereby limiting the adversaries trying to tamper with the data. Practical implementation of the proposed system is done and analyzed for scalability and reliability.

**Keywords:** Internet-of-Agro-Things (IoAT) · Smart Agriculture · Crop Monitoring Systems · Farm Monitoring Systems · Distributed Ledger · Blockchain · IOTA · Tangle Distributed Ledger · Real-time data sharing

# 1 Introduction

Agriculture is one of the sectors which has been highly influenced and benefited from the advancements in technology. From using human labor and indigenous tools which is referred as Agriculture 1.0, processes used in farming have been modified significantly by introducing the latest technological aspects for achieving better yield and making them climate-smart [17]. Different milestones in the history which have paved new ways for farming are shown in Figure 1. Main driving forces for these revolutions are population, urbanization and demand for food products. According to Our World in Data [20], the global population is currently at 7.7 billion and is estimated 9 billion by the end of 2050 which clearly shows rapid increase in demand for food products. Urbanization has led to reduction in availability of manual labor
○ Projet européen : État dans le référentiel

○ Projet européen : Identifiant interne

○

○ Date de production : année

○ Date de mise en ligne : année

○ Date de publication : année

○ Date d'écriture : année

○ Date de modification du dépôt : année

○ Date de dépôt : année

○ Date de publication électronique : année

○

○ Collection HAL (multicritères)

○ Collection HAL : catégorie

○ Collection HAL : Code

○ Collection HAL : Nom

○ Collection HAL : Identifiant interne

○

○ Identifiant interne du contributeur/déposant

○ Nom complet du contributeur/déposant

○

○ Domaines

○ Domaine primaire

○ Domaine racine

○ Sous-domaine niveau 1

○ Sous-domaine niveau 2

○ Sous-domaine niveau 3

○

○ Statut du document

○ Version du document

○ Type de dépôt

○ Type de document

○ ISBN

○ Numéro - référence

○ Identifiant DOI

○

○ Classification

○ Audience

○ Vulgarisation

○ Comité de lecture - texte (oui ou non)

○ Actes de colloque
for farming tasks which has also been a limiting factor for reaching the demand. Another
important factor affecting the food product yield is the availability of arable land and natural
resources.

<figure><img src="image_3.png" /><figcaption>Fig. 1. Agricultural Revolutions.</figcaption></figure>

The Internet of Agro-Things (IoAT), Big Data (BD), Artificial Intelligence (AI), Machine
Learning(ML), and Distributed Ledgers are some of the latest technologies which are driving
the agricultural revolution 4.0 [24, 32]. The IoAT is agricultural things with capability of
connecting and sharing data with each other using different Information and Communication
Technologies (ICT's). Smart agriculture is a new agricultural trend which integrates different
latest technologies to assist farming by providing real-time decision making capability along
with intelligent control and minimal usage of resources, while making the yield high and
predictable. One of the most important aspects of smart agriculture is real-time crop monitoring
systems as yield is impacted by many external interactions like weather patterns, water scarcity,
energy costs, etc. [10]. Such systems can help reduce the amount of human labor needed to
monitor the farms throughout the time of crop and enable farmers to take prompt decisions.
Multiple farm monitoring systems are already in place, both at the regional and national
level, such as the Global Information and Early Warning System (GIEWS), Famine Early
Warning System Network (FEWS NET), and Monitoring Agriculture with Remote sensing
(MARS) [9]. These systems have shown how important is to have an efficient crop monitoring
system in place but there is need for making these systems more robust and secure. A cyber-
attack on such systems which are targeted at farms, food supply-chain and automated control
mechanisms can cause catastrophic loss and also pose threat to the lives of consumers
[11]. Along with this, integrating and maintaining such Collaborative Control Systems
(CCS) is difficult and needs some conflict resolution among the components to improve the
○ Référence interne

○ Financement

○ Collaborations

Ajouter

Lancer la recherche

Recherche experte (SolR)

Recherche experte (SolR)

Lancer la recherche
Vers la recherche avancée

• Déposer

Portail INRIA.HAL.SCIENCE
Les publications, logiciels... des scientifiques Inria

• Accueil

• Publications Inria

○ Consulter les derniers dépôts

○ Par équipe de recherche

○ Par auteur

○ Rapports de recherche et techniques

○ Livres blancs

○ Rapports d'activité des équipes

○ Statistiques

• Boite à Outils

○ X2Hal : importer par lot

○ Logiciels : créer le Codemeta.json

○ Créer mon IDHal

○ Créer mon CVHal

○ Haltools : créer ma page de publications

○ Haltools : extraire des données (réservé Inria)

○ Les bonnes pratiques

■ Comment bien s'affilier ?
performance and prevent errors. The importance of such conflict resolution systems and two
novel Collaboration Detection and Prevention of Errors and Conflicts (CDPEC) algorithms
are developed and analyzed in [2] which has significantly reduced the potential faults in such
collaborative environments. A typical IoT architecture is shown in Figure 2.

<figure><img src="image_4.png" /><figcaption>Fig. 2. Smart Agriculture Layered Architecture.</figcaption></figure>

IoT devices are resource constrained and introducing complex encryption and decryption
mechanisms cannot be a feasible solution. The cloud layer in a typical IoT architecture is
capable of processing and storing large amounts of data and are generally a third party service
which is a central entity. Access times from the cloud mainly depends on the network traffic
and quality of network connection, which can be a problem in real-time systems like crop
monitoring systems. Without proper security mechanisms in place, an adversary can perform
a Distributed Denial of Service Attack (DDOS) and false data injection attacks. Apart from
these there is always a chance of Single Point Of Failure (SPOF) as the whole system data
are stored and processed at a central cloud server.

Distributed ledger Technology (DLT) is a novel approach of recording, sharing and synchronizing data across multiple data stores participating in the network which is analogous to network formed by the edge devices in IoT. Main components of DLT include nodes, transaction, consensus mechanism, shared ledger and cryptography. A participant in this peer-to-peer network who is responsible for generating the transaction and perform network operations is called a node. Each node in the network will have its own copy of the distributed ledger in order to make it tamper proof and has all the historical transaction data which can be traversed through to verify. Consensus mechanism is a set of rules which are accepted over the network and followed by all nodes to process an incoming transaction. DLT can help to solve these problems and eliminate the central authority. It also provides security and
■ Quelle version puis-je déposer ?

■ Choisir le bon « type de document »

■ Mettre en valeur ses publications

○ Les tutos IES Inria

■ Lier les notices dans HAL

■ Umbrhal Inria pour l'accessibilité

■ Personnaliser son CVHAL

■ Créer et Personnaliser sa collection

• Documentation

○ Aide en ligne HAL

○ Aide en ligne Haltools

○ Aide en ligne X2hal

○ Tutoriels video HAL

○ Documentation API HAL

○ Ajouter des vignettes

○ Identifiant auteur IdHAL et CV

○ Compléter son dossier ORCID avec ses dépôts HAL

○ Inria et la Science Ouverte

X

X

X

Loading...

X

Le document que vous demandez est en access restreint
jusqu'au 2025-01-01 !

Revenir a la notice

Retourner à l'accueil

Contact

•

Ressources
prevents tampering of the data, False data injections and spamming. The proposed sFarm system makes use of such a private DLT based on the Tangle Data structure for eliminating the need for central authority which will remove the latency and provide a real-time data sharing platform. Along with these attacks it also acts as a solution to provide data privacy and security while providing a resource friendly and cost-efficient architecture.

The paper is organized in the following sections: Section 2 gives an overview of prior related research work. Section 3 talks about the novel features of the proposed system. Section 4 will discuss how Distributed Ledger Technology is a viable solution for Crop Monitoring Systems and the type of distributed ledger to be used in Smart Agriculture. Section 5 provides the overview and working of the proposed system. Section 6 discusses the algorithm behind the proposed sFarm. Section 7 provides the implementation and analysis details and section 8 provides the conclusion along with future research aspects.

## 2 Related Research Overview

The Blockchain and Distributed Ledger Technologies have been showing very promising applications in a variety of fields like Smart Healthcare [27, 29], Smart Transportation [5, 21] along with Smart Agriculture since the time financial solution Bitcoin [22]. Bitcoin was solely designed for keeping track of digital assets and it is very difficult to adapt it in other fields, hence different platforms like Ethereum, EOS, NEO, and IOTA have been designed. Different studies have been conducted to check the feasibility of the blockchain in Smart Agriculture applications.

A use case of precision agriculture was proposed in [16], an extensive analysis of combining DLT technologies with IOT devices as a data marketplace. DLT was also analyzed as a solution for cattle farms in [8] where poultry farm data has been stored on a public DLT and accessed using the Masked Authentication Messaging (MAM) data communication protocol. The current paper uses private DLT, and performance analysis of the proposed architecture is done to determine the throughput and reliability of the system. Recently, a secure data sharing platform was developed for Smart Agriculture in [30]. Smart contracts were used by different entities to determine the access policy. Smart Contracts on EOS platform are used in this to define the access policies. Managing IoT devices using the blockchain is presented in [13], one of the initial papers which has shown the potential usage of smart contracts in managing different IoT devices. An Ethereum smart contract based control was used. This work helped in understanding the potential usage of smart contracts in IoT device control but there will be large number of IoT devices while monitoring a farm and the Ethereum blockchain is not scalable and is not a feasible solution in crop monitoring systems. The main bottleneck in using blockchain technology is resource intensive consensus mechanisms like PoW which cannot be adapted into resource constrained environments like IoT. Research has been conducted in proposing new IoT friendly consensus mechanisms [25, 33] which helps in successfully adapting blockchain technology into applications like Smart Agriculture. Apart from crop monitoring systems, the blockchain shows potential applications in other important aspects of Smart Agriculture like efficient supply chain tracking. Supply chain is too complex and involves many parties in the process. Even with Enterprise Resource Planning (ERP) applications in place, there is
* Documentation

* FAQ

* API

* OAI-PMH

* AuréHAL

## Informations

* À propos

* Données personnelles

* Mentions légales

* Accessibilité

* Conformité RGAA

## Questions juridiques

* Je publie, quels sont mes droits ?

* Loi pour une République numérique

* Stratégie de non-cession des droits

* SHERPA/RoMEO

## Portails

* Portails institutionnels

* HAL

* HAL SHS

* HAL Thèses

* MédiHAL

## CCSD

* CCSD

* Episciences

* Sciencesconf
still many transactions happening with blinded parties resulting in significant loss of crop and money. Many such farm-to-fork applications are also analyzed and implemented in [18,19,23].

As promising as DLT technology is for providing efficient solutions to scalability and providing a secured environment for IOT Applications, it is still being improved and is constantly evolving. Constant work is being done to remove the need for coordinator nodes and making it fully decentralized. Other works for curbing address reuse [31] and increasing scalability [3] for such tangle data structure based DLT's is also being analyzed to make it a feasible solution for IoT environments. A summary of related research is shown in Table 1.

<table><caption>**Table 1. Related Research and their Importance**</caption><thead><tr><td>Related Research</td><td>Contributions</td></tr></thead><tbody><tr><td>Lamtzidis et al. [16]</td><td>Data Marketplace application using DLT and IoT technologies was designed and analyzed.</td></tr><tr><td>Elham et al. [8]</td><td>Proposed a poultry farm monitoring system using public DLT and accessed using MAM data protocol.</td></tr><tr><td>Rahman et al. [30]</td><td>Proposed a secure data sharing model for smart agriculture. Proposed model was implemented in EOS environment and analyzed.</td></tr><tr><td>Huh et al. [13]</td><td>One of the initial papers which has shown the potential use of smart contracts in IoT environment. Different smart contracts were defined to control actuators like AC, Lights and Electric meters.</td></tr><tr><td>Puthal et al. [25]</td><td>A light weight IoT-friendly consensus mechanism called Proof-of-Authentication (PoAh) is proposed replacing the resource consuming PoW and improved the transaction confirmation times.</td></tr><tr><td>Malik et al. [19]</td><td>These authors have proposed a blockchain based solution for supply chain in smart agriculture. They made use of Access Control Lists (ACL) and Smart contracts to build a three-layered architecture.</td></tr><tr><td>Madumidha et al. [18]</td><td>Authors had discussed about different entities participating in the supply chain of agricultural products and use-case analysis was done for using RFID and IoT systems.</td></tr></tbody></table>

# 3 Novel Contributions

Below are the problems addressed and novel solutions proposed in current proposed sFarm application.

## 3.1 Problems Addressed in the Current Paper

The problems of current Crop Monitoring Systems addressed in the current paper are:

- Single point of failure by having a centralized data sharing platform.
- Centralized authorities controlling the shared data and monetizing without realizing benefits to farmers.

- Data security and privacy issues as IoT is a resource constrained environment.

- False data injection by adversary nodes present in the network.

- Network congestion bottleneck and delay in processing requests hindering real-time application performance.

- Delay in data sharing as the central server can be flooded.

- Denial-of-Service attacks can be performed by sending spam messages to central server.

- Cost of infrastructure usage and maintenance is usually high.

## 3.2 Novel Solutions Proposed

The novel contributions of the proposed sFarm are:

- Decentralized data sharing platform with real time data sharing.

- Providing a secure crop monitoring system to eliminate different security threats.

- Avoiding data tampering by providing a single source of truth using a distributed ledger.

- Continuous monitoring of different farm parameters and reporting to the farmer.

- Provide data privacy and security by implementing a private DL.

- Cost-efficient infrastructure for building and maintaining Real-Time Crop Monitoring Systems.

# 4 Is the Distributed Ledger a Feasible Solution?

Each application should be analyzed to determine if DL is an apt solution. A path to analyzing the feasibility of blockchain technology has been given in [26]. A similar analysis is performed for proposed sFarm to check the feasibility of DLT technology in Smart Agriculture.

Multiple untrusted participants in data sharing and the need to dissolve a central entity is one of the important characteristics for adapting a DLT solution [7]. Since there are multiple sensor nodes and many actuator nodes along with the farmers to monitor and take decisions in this smart agriculture architecture, DLT is a good choice. The data being monitored is used for real-time monitoring and analysis of the climatic and environmental cycles, there is no need for modifying the past stored data. As the transactions in DLT cannot be modified once approved, it is apt solution in the proposed sFarm.

DLT is a solution when the main concern in the data sharing is with data privacy and security [12]. IoT networks are prone for data leakage and data security issues because of lack of security measures in such constrained environments. Private DL implemented in sFarm will limit and control the entities participating in the network operations thereby providing data privacy and security. Private DL will also prevent spamming of the network by filtering transactions coming from outside of network. The main characteristic of DL is providing a tamper-proof single source of truth which makes it a very good technology to be used in such crop monitoring systems like sFarm.

Most of the above discussed aspects are satisfied by the blockchain but the IOTA Tangle data structure is chosen because of its scalability and cost of infrastructure. Choosing IOTA Tangle enables the transactions to be processed in real-time and data is available readily to the
farmers for making decisions. Each node in the network is responsible for performing required Proof-of-Work (PoW). The PoW used in IOTA is not complex as it is used only for preventing spamming whereas in blockchain PoW is used to provide immutability. Differences between the blockchain and IOTA Tangle are given in Table 2.

<table><caption>Table 2. Comparison of Blockchain and IOTA Tangle data structures</caption><thead><tr><td>Feature</td><td>Blockchain</td><td>IOTA Tangle</td></tr></thead><tbody><tr><td>Structure</td><td>Special type of DAG where each block is connected to previous block using hash pointer.</td><td>Data blocks flow in one direction and each block is connected to two other blocks using hash pointers.</td></tr><tr><td>Security</td><td>Provides high security by using complex consensus</td><td>Provides less security compared to blockchain and is apt solution for not much critical applications needing scalability.</td></tr><tr><td>Decentralization</td><td>Decentralized and no need for coordinator node.</td><td>Less decentralization as there is a coordinator node.</td></tr><tr><td>Cost of transaction</td><td>Certain transaction fee will be levied for each transaction and it may increase based on the traffic congestion.</td><td>There are no miners in Tangle making it fee-less for sending transactions.</td></tr><tr><td>Transaction time</td><td>Increases with increase in network traffic</td><td>Decreases with increase in network traffic.</td></tr><tr><td>Scalability</td><td>Predetermined block sizes and block generation times will make the transactions to stall and limit the scalability.</td><td>Each transaction node performs PoW for two tip nodes in tangle for its transaction to be attached, hence making tangle highly scalable with large number of participants.</td></tr><tr><td>Applications</td><td>Designed specifically for digital asset control and ownership.</td><td>Designed for IoT Applications to reach the scalability and provide security.</td></tr></tbody></table>

By taking all these factors into account, sFarm makes use of private IOTA Tangle for implementing the crop monitoring system.

# 5 Architectural Overview of sFarm

An architectural overview of the system is shown in Fig. 3. The main components of the proposed architecture are sensing nodes, edge nodes, private DLT network based on Tangle data structure, and users.

## 5.1 Sensing Nodes

Sensing nodes are placed at different locations of the field. The main responsibility of the sensing node is sensing the environmental parameters and sending the data to the edge devices. Sensing nodes are not capable of storing large data or perform high level computations. They should also be power efficient as the replacing and maintenance costs should be low as there will be potentially thousands of such devices in a large farm. The proposed monitoring makes
<figure><img src="image_5.png" /><figcaption>Fig. 3. Architectural Overview of sFarm,</figcaption></figure>

use an MCU for connecting all sensors and to send the information to the edge devices for further processing. A simple sensing node is proposed in sFarm with a sensor to monitor air temperature, humidity and GPS sensor to track its location to map the spatial data. A block diagram of sFarm is shown in Fig. 4.

## 5.2 Edge Node

The edge node is responsible for collecting data from the sensing nodes. A single board computer is used as the edge device in the proposed sFarm application. Data from the MCU is sent to the edge device using a lightweight publish-subscribe network protocol. Unlike sensing nodes, edge nodes have both computational and data storage capabilities to manage large amounts of data. The data being sent from different sensing nodes will be collected and processed by using DLT client libraries and made into a transaction which is sent to the private DLTs using API calls.

The temperature and humidity sensor used can monitor the temperature ranges from 0-50°C with an accuracy of ±2°C and humidity in the range of 20-90% RH with an accuracy of ±5% RH. The GPS module used is able to track 22 satellites on 66 channels to provide a location accuracy of 1.8 meters. It has inbuilt internal patch antenna and also a u.FL connector is available to connect an external antenna. Power usage is very low and draws only 25mA during tracking and 20mA during navigation.

# 6 Proposed Algorithm for sFarm

Environmental data from the field is collected by sensing nodes and is transferred to the edge node by using a lightweight pubsub network protocol. A sensing node publishes the data to a
<figure><img src="image_6.png" /><figcaption>Fig. 4. Block Diagram of sFarm.</figcaption></figure>

topic and each edge node is subscribed to multiple topics to receive data from multiple sensing nodes. The received data is pre-processed using client libraries and a transaction is formatted and generated. The edge node is also responsible for executing Proof-of-Work (PoW) for the tips selected in the tangle data structure. Once a valid nonce is computed, the transaction is sent to one of the nodes in the private DLT implemented. Transaction generation is shown in Algorithm 1. Once the transactions are added to the DL, a streams framework based data

**Algorithm 1 Proposed Data Upload Algorithm for sFarm**

**Input:** Temperature, Humidity and GPS Position data from sensing node

**Output:** Transaction Hash from Private Distributed Ledger

1. A topic $\tau_S$ is created for each sensing node S

2. Each edge node E can subscribe to topics from multiple sensing nodes

3. E.subscribe($\tau_S$)

4. **for** Every time interval $t_i$ **do**

5. Prepare a message $\mu$ with Temperature (temp), Humidity(hum) and GPS data

6. S.publish($\tau$, $\mu$(temp, Hum, GPS))

7. **end for**

8. **while** Message $\in$ topic $\tau$ **do**

9. E ← Receive($\tau$, $\mu$)

10. E runs Tip selection algorithm and get two tips $T1, T2$ from DLT

11. Proof-of-Work(PoW) executed by edge node and Nonce $\eta$ is computed

12. Payload $\rho \leftarrow$ Client.preparePayload($\mu$(temp, Hum, GPS), $\eta$)

13. Prepare Transaction $\Gamma \leftarrow$ Client.prepareTransaction($\rho$, $\eta$)

14. **if** Client Connected **then**

15. result $\rho \leftarrow$ Connection.sendTransaction($\Gamma$)

16. **else**

17. Connection $\leftarrow$ Client.connect(Provider URL, Port)

18. result $\rho \leftarrow$ Connection.sendTransaction($\Gamma$)

19. **end if**

20. return $\rho$.hash

21. **end while**

protocol is used for structuring and navigating through the data in the ledger securely. Within a private network the data being sent to the ledger may not be required to be encrypted as
all the participants in network are trusted parties. If an access policy needs to be enforced on
the data, public key encryption can be used to encrypt the data before sending it to the ledger
and only authorized parties with private keys will be able to access the data. The data access
algorithm is shown in Algorithm 2.

<caption>**Algorithm 2 Proposed Data Access Algorithm for sFarm**</caption>

**Input:** Root Node, Client Node, Port and Minimum Weight Magnitude (MWM)
**Output:** Organized data from tangle
1: A channel $\tau$ is created using streams framework
2: Publisher $\mathcal{Y}$ has public key information $K_{pub}$ of the intended recipient $\rho$ and can encrypt data before sending to ledger
3: Recipient $\rho$ subscribes to the channel of interest to receive messaged from Publisher $\mathcal{Y}$ in real-time
4: $\rho$.subscribe($\tau$)
5: **while** Message $\in$ stream $\tau$ **do**
6: &nbsp;&nbsp;&nbsp;&nbsp;Recipient $\rho$ receives encrypted message $\psi$
7: &nbsp;&nbsp;&nbsp;&nbsp; $\rho \leftarrow$ Receive($\tau$)
8: &nbsp;&nbsp;&nbsp;&nbsp;Received encrypted data $\psi$ is decrypted using private key $K_{prv}$ of recipient $\rho$
9: &nbsp;&nbsp;&nbsp;&nbsp;Decrypted message $\mu \leftarrow$ decrypt($\psi$, $K_{prv}$)
10: Decrypted messages can be displayed on web pages using Application Programming Interfaces (API)
11: &nbsp;&nbsp;&nbsp;&nbsp;if Node Not Connected **then**
12: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Connection $\leftarrow$ Client.connect(Client Node URL, Port)
13: &nbsp;&nbsp;&nbsp;&nbsp;end if
14: end while

# 7 Implementation and Validation

## 7.1 Implementation

The sensing node which is placed at different locations of the field for sensing is shown in Fig. 5. In the implemented design both location and environmental parameter data is combined together and sent to the edge device which is responsible for preparing the IOTA transaction and send it to the IOTA Tangle DLT. Communication between the edge node and edge device is achieved in the implementation by using a message broker. A topic is defined, and the edge node makes use of this topic to publish the data updates from time to time. The edge device receives all these updates by subscribing to that topic. Once data is received by the edge device it acts as a client and uses client libraries for modifying the received data into a transaction and send it to the IOTA private tangle network. Data being sent from the sensing node is shown in Fig. 6.

## 7.2 Agriculture Datasets and Community Data Sharing using the Proposed sFarm

The proposed sFarm architecture can also be used for community data sharing applications.
Community data sharing platforms can help in educating farmers about the type of crop to
<figure><img src="image_7.png" /><figcaption>Fig. 5. Implemented sensing Node along with Edge Device.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>Fig. 6. Continued Readings from the Sensing Node.</figcaption></figure>

be grown based on weather conditions, prevailing crop infections and many other important information that can be part of decision support tools. Three different datasets for crop recommendation, production, and yield are taken with different sizes of data and analyzed for the transaction times taken for each data to be uploaded to the distributed ledger. A Crop Recommendation Dataset [14] helps farmers in formulating a strategy based on different field parameters like Nitrogen, Phosphorous, Potassium, Temperature, Humidity, pH of soil and rainfall to determine the type of crop to be grown. Another dataset [15] with medium
size focuses on the prediction of crop price yield by using different regional attributes. Along with these, a large dataset [1] provide information about the cop production in India over several years, is also used in this application. Average data upload times are computed in the implemented sFarm application for these three different datasets and the results are presented in Table 3.

<table><caption>**Table 3.** Average Transaction Times and Estimated Upload Times For Community Data Sharing using sFarm</caption><thead><tr><th>Dataset</th><th>Size of Dataset (in KB)</th><th>Number of Records</th><th>Average Transaction Time (in sec)</th><th>Estimated Upload Times(in hr)</th></tr></thead><tbody><tr><td>Crop Recommendation Dataset [14]</td><td>146.52</td><td>2200</td><td>1.01</td><td>0.31</td></tr><tr><td>Corn Yield [15]</td><td>2781</td><td>23475</td><td>2.29</td><td>14.96</td></tr><tr><td>Crop Production Dataset [1]</td><td>14958</td><td>246091</td><td>1.24</td><td>85.04</td></tr></tbody></table>

The estimated time for uploading larger datasets increases rapidly when the size of data increases. This is due to the Proof-of-Work needed to be performed by the uploading client. PoW difficulty increases as the number of transactions sent by the same node increases within a short span of time to reduce spamming of the network. To avoid this, off-chain storage can be a solution or the data can be segmented and uploaded using different clients to reduce the upload times. In addition, remote PoW can also be implemented using more powerful hardware other than clients dedicated specifically for performing PoW required for transactions of client. If the data consists of images, uploading image data directly as the JSON input is not a feasible solution. A possible alternative approach is to upload these files on off-chain storage like AWS S3 bucket and store the Uniform Resource Locator (URL) information to DLT. This is analyzed in the proposed sFarm by storing the images from datasets [4, 6, 28]. Sample images of apple, grape and tomato leafs from the dataset are shown in Fig. 7. Different grades of pomegranate are shown in Fig. 8, and cabbage disease classification data are shown in Fig. 9.

## 7.3 sFarm Validation

Near real-time data availability is one of the main aspects of crop monitoring systems like the proposed sFarm for prompt actions to be taken by the farmer. For evaluating real-time operations, transaction confirmation times are evaluated. An edge node with a quad-core ARM A72 CPU with 4 GB RAM is considered and 50 test runs are performed. Transaction confirmation times are noted for each test run and an average transaction time is computed. Fig. 10 shows the transaction times and the average time. The average transaction times for the implemented sFarm application is 1401ms. A 1.4 second delay is acceptable as the climatic and environmental changes are gradual and do not change within seconds significantly. As the farm size increases, the number of sensing nodes to cover the entire field increases in
<figure><img src="image_9.png" /><figcaption>**Fig. 7.** Plant Disease Dataset [6] (a),(b) Shows Healthy and Black Rot Infected Apple Leaves respectively (c),(d) Shows Healthy and Bacterial Infected Tomato Leaves respectively (e),(f) Shows Images of Healthy and Black Measles Infected Grape Leaves respectively</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>**Fig. 8.** Pomegranate Fruit Quality Dataset [28] Pomegranate Classified into 3 Grades - G1,G2,G3 and each grade subdivided into 4 Quality labels Q1, Q2, Q3, Q4. (a) Shows the Image of Highest Grade Highest Quality Pomegranate (b) Shows the Highest Quality of Grade 2 Pomegranate with slight Defects (c) Shows not Ripe Pomegranate and comes under Grade 3 (d) Shows Pomegranate With least Quality and Grade</figcaption></figure>
<figure><img src="image_11.png" /><figcaption>**Fig. 9.** Cabbage Disease Dataset [4] (a) Image shows Fresh Un-infected Cabbage Leaves (b) Shows Image of Cabbage Infected by Back Moth (c) Shows Image of Infected Cabbage Plant by Leaf Miner (d) Shows a Cabbage Plant Infected by Mildew</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>**Fig. 10.** Average Transaction Time for Private IOTA Tangle Node Implemented in sFarm.</figcaption></figure>
proportion to the farm area. Hence, the power consumption of each node should be minimal. Maximum current use for the implemented end node including both temperature sensor and GPS module is 33.95mA. Assuming all electronic devices in the sensing node are consuming maximum current, the amount of power consumed is estimated to be 0.169 W. Assuming 1000 such sensing nodes are running in the field continuously for 24 hours, they will consume only 4.056 units of electricity which is very small. Considering the fact that usage of solar energy in fields is common, the cost of operating the proposed sensing nodes in large numbers is efficient and affordable.

The IOTA private tangle implemented for the proposed sFarm consists of two peer nodes along with a coordinator node. Transactions from the edge nodes will be sent to the peer nodes. As the number of edge nodes increases, the number of transactions reaching each peer node in the IOTA Tangle network increases. The throughput of the IOTA Tangle node helps in determining the scalability of the proposed model. Each peer node in the private Tangle of sFarm is designed with a Quad-core CPU with 4GB of RAM. To determine the throughput of the node, 1000 sample messages are sent within a span of one minute to the same Hornet node. Response times and the error rates are measured to determine the scalability. Statistics of the test are given in Table 4.

<table><caption>**Table 4.** Statistics of Load Testing Performed on Private Tangle implemented for sFarm</caption><thead><tr><td>Parameter</td><td>Value</td></tr></thead><tbody><tr><td>Number of Samples Data Transactions sent</td><td>1000</td></tr><tr><td>Load Duration</td><td>1 Minute</td></tr><tr><td>Failed Transactions</td><td>10</td></tr><tr><td>Percentage of Error</td><td>1 %</td></tr><tr><td>Average Response Time(ms)</td><td>7566.76</td></tr><tr><td>Minimum Response Time(ms)</td><td>1883</td></tr><tr><td>Maximum Response Time(ms)</td><td>25760</td></tr><tr><td>Median Response Time(ms)</td><td>7314.00</td></tr><tr><td>Throughput (Transactions/Second)</td><td>38.03</td></tr></tbody></table>

Response time distribution for all 1000 sample data transactions sent is shown in Fig. 11. Average response time for these 1000 samples is 7566.6ms. Even with such a large number of nodes sending transactions at the same time to a single node has resulted in only 1% failure and average response time of approximately 7.5 Sec. Hence, the throughput of each peer node is high enough to handle a large number of edge nodes at the same time. Latency from the peer node is another factor which needs analyzing to determine if it can support near real-time applications like sFarm. The request load is increased gradually over the time span of 1 minute, and the number of success and failure responses are measured along with the median latency in receiving responses from the peer node and results are shown in Fig. 12. A comparative analysis with respect to transaction times and throughput is performed between [16] and the current paper implementation to analyze the benefits of using Private Tangle Data Structure based DLT over Public Tangle based DLT and is presented in Table 5.
<figure><img src="image_13.png" /><figcaption>Fig. 11. Response Time Distribution for Private IOTA Tangle Node implemented in sFarm.</figcaption></figure>

<figure><img src="image_14.png" /><figcaption>Fig. 12. Latency of Peer Node with Increasing Number of Requests per Second,</figcaption></figure>

<table><caption>Table 5. Comparative Analysis of Results</caption><thead><tr><td>Feature</td><td>Lamtzidis et al. [16]</td><td>Current Paper</td></tr></thead><tbody><tr><td>DLT Platform</td><td>IOTA</td><td>IOTA</td></tr><tr><td>Type of DLT</td><td>Public</td><td>Private</td></tr><tr><td>PoW</td><td>Local</td><td>Local</td></tr><tr><td>Transaction Time (in Sec)</td><td>60</td><td>1.8</td></tr><tr><td>Throughput (Tx/Sec)</td><td>5</td><td>38.03</td></tr></tbody></table>

## 8 Conclusions and Future Research

In this work we have proposed a novel idea of distributed ledger based Remote Crop Monitoring System which solves the problem of data privacy and security and provides an efficient and affordable Remote Crop Monitoring solution. It makes use of DLT along with the IoT to leverage a system which can solve the discussed problems with centralized data sharing platforms. Proof of concept is implemented for the proposed sFarm and is analyzed for scalability and reliability. Results from the analysis have shown that the proposed system
can handle a large number (1000) of sensing nodes with an average latency of 7566.6 ms and 1% error rate making it an acceptable solution for small to large farms.

In future work, we will develop a full level prototype and deploy it in a real-time environment. Along with that, different techniques to reduce the latency further and provide a user-friendly GUI option for better accessibility to farmers will be analyzed. Our focus is on providing an efficient, affordable and robust solution for a Crop Monitoring System while maintaining data security and privacy. In addition, future work will be able to use AI/ML techniques to monitor the anomalies in environmental parameters and alert the user to take prompt decision.

## Acknowledgment

This material is based upon work supported by the National Science Foundation under Grant number OAC-1924112. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.

## References

1. Abhinand: Crop production in india (2019), https://www.kaggle.com/abhinand05/crop-production-in-india, last Accessed: 2021-07-10

2. AJIDARMA, P., NOF, S.Y.: Collaborative detection and prevention of errors and conflicts in an agricultural robotic system. Studies in Informatics and Control **30**(1), 19–28 (apr 2021). https://doi.org/10.24846/v30i1y202102

3. Alkhodair, A., Mohanty, S., Kougianos, E., Puthal, D.: McPoRA: A multi-chain proof of rapid authentication for post-blockchain based security in large scale complex cyber-physical systems. In: Proc. IEEE Computer Society Annual Symposium on VLSI (ISVLSI) (2020). https://doi.org/10.1109/isvlsi49217.2020.00-16

4. Apuada, G.: Chinese cabbage disease dataset (2020), https://www.kaggle.com/giane901/chinese-cabbage-disease-detection, last Accessed: 2021-07-10

5. Bao, S., Cao, Y., Lei, A., Asuquo, P., Cruickshank, H., Sun, Z., Huth, M.: Pseudonym management through blockchain: Cost-efficient privacy preservation on intelligent transportation systems. IEEE Access **7**, 80390–80403 (2019). https://doi.org/10.1109/access.2019.2921605

6. Bhattarai, S.: New plant diseases dataset (2019), https://www.kaggle.com/vipoooool/new-plant-diseases-dataset, last Accessed: 2021-07-10

7. Doku, R., Rawat, D.: Pledge: A private ledger based decentralized data sharing framework. In: Proc. Spring Simulation Conference (SpringSim) (2019). https://doi.org/10.23919/springsim.2019.8732913

8. Elham, M.N., Sabeghi, M.S., Al-Rasbi, F.S., Daud, S.M., Noor, N.Q., Sahak, R., Mazlan, A.A.: A preliminary study on poultry farm environmental monitoring using internet of things and blockchain technology. In: Proc. 10th Symposium on Computer Applications & Industrial Electronics (ISCAIE) (2020). https://doi.org/10.1109/iscaie47305.2020.9108820

9. Fritz, S., See, L., Bayas, J.C.L., Waldner, F., Jacques, D., Becker-Reshef, I., Whitcraft, A., Baruth, B., Bonifacio, R., Crutchfield, J., Rembold, F., Rojas, O., Schucknecht, A., der Velde, M.V., Verdin, J., Wu, B., Yan, N., You, L., Gilliams, S., Mücher, S., Tetrault, R., Moorthy, I., McCallum, I.: A comparison of global agricultural monitoring systems and current gaps. Agricultural Systems **168**, 258–272 (jan 2019). https://doi.org/10.1016/j.agsy.2018.05.010
10. Godfray, H.C.J., Beddington, J.R., Crute, I.R., Haddad, L., Lawrence, D., Muir, J.F., Pretty, J., Robinson, S., Thomas, S.M., Toulmin, C.: Food security: The challenge of feeding 9 billion people. *Science* **327**(5967), 812–818 (jan 2010). https://doi.org/10.1126/science.1185383

11. Gupta, M., Abdelsalam, M., Khorsandroo, S., Mittal, S.: Security and privacy in smart farming: Challenges and opportunities. *IEEE Access* **8**, 34564–34584 (2020). https://doi.org/10.1109/access.2020.2975142

12. Henry, R., Herzberg, A., Kate, A.: Blockchain access privacy: Challenges and directions. *IEEE Security & Privacy* **16**(4), 38–45 (jul 2018). https://doi.org/10.1109/msp.2018.3111245

13. Huh, S., Cho, S., Kim, S.: Managing IoT devices using blockchain platform. In: Proc. 19th International Conference on Advanced Communication Technology (ICACT) (2017). https://doi.org/10.23919/icact.2017.7890132

14. Ingle, A.: Crop recommendation dataset (2020), https://www.kaggle.com/atharvaingle/crop-recommendation-dataset, last Accessed: 2021-07-10

15. kumar, S.: Crop price prediction (2019), https://www.kaggle.com/abhinand05/crop-production-in-india, last Accessed: 2021-07-10

16. Lamtzidis, O., Pettas, D., Gialelis, J.: A novel combination of distributed ledger technologies on internet of things: Use case on precision agriculture. *Applied System Innovation* **2**(3), 30 (sep 2019). https://doi.org/10.3390/asi2030030

17. Liu, Y., Ma, X., Shu, L., Hancke, G.P., Abu-Mahfouz, A.M.: From industry 4.0 to agriculture 4.0: Current status, enabling technologies, and research challenges. *IEEE Transactions on Industrial Informatics* **17**(6), 4322–4334 (jun 2021). https://doi.org/10.1109/tii.2020.3003910

18. Madumidha, S., Ranjani, P.S., Varsinee, S.S., Sundari, P.: Transparency and traceability: In food supply chain system using blockchain technology with internet of things. In: Proc. 3rd International Conference on Trends in Electronics and Informatics (ICOEI) (2019). https://doi.org/10.1109/icoei.2019.8862726

19. Malik, S., Dedeoglu, V., Kanhere, S.S., Jurdak, R.: TrustChain: Trust management in blockchain and IoT supported supply chains. In: Proc. IEEE International Conference on Blockchain (Blockchain) (2019). https://doi.org/10.1109/blockchain.2019.00032

20. Max Roser, H.R., Ortiz-Ospina, E.: World population growth. Our World in Data (2013), https://ourworldindata.org/world-population-growth

21. Mollah, M.B., Zhao, J., Niyato, D., Guan, Y.L., Yuen, C., Sun, S., Lam, K.Y., Koh, L.H.: Blockchain for the internet of vehicles towards intelligent transportation systems: A survey. *IEEE Internet of Things Journal* **8**(6), 4157–4185 (mar 2021). https://doi.org/10.1109/jiot.2020.3028368

22. Nakamoto, S.: Bitcoin: A peer-to-peer electronic cash system. Cryptography Mailing list at https://metzdowd.com (03 2009)

23. Niya, S.R., Dordevic, D., Nabi, A.G., Mann, T., Stiller, B.: A platform-independent, generic-purpose, and blockchain-based supply chain tracking. In: Proc. IEEE International Conference on Blockchain and Cryptocurrency (ICBC) (2019). https://doi.org/10.1109/bloc.2019.8751415

24. Pallagani, V., Khandelwal, V., Chandra, B., Udutalapally, V., Das, D., Mohanty, S.P.: dCrop: A deep-learning based framework for accurate prediction of diseases of crops in smart agriculture. In: Proc. IEEE International Symposium on Smart Electronic Systems (iSES) (Formerly iNiS) (2019). https://doi.org/10.1109/ises47678.2019.00020

25. Puthal, D., Mohanty, S.P.: Proof of authentication: IoT-friendly blockchains. *IEEE Potentials* **38**(1), 26–29 (jan 2019). https://doi.org/10.1109/mpot.2018.2850541

26. Puthal, D., Mohanty, S.P., Kougianos, E., Das, G.: When do we need the blockchain? *IEEE Consumer Electronics Magazine* **10**(2), 53–56 (mar 2021). https://doi.org/10.1109/mce.2020.3015606

27. Qiu, J., Liang, X., Shetty, S., Bowden, D.: Towards secure and smart healthcare in smart cities using blockchain. In: Proc. IEEE International Smart Cities Conference (ISC2) (2018). https://doi.org/10.1109/isc2.2018.8656914
28. R, A.K.: Pomegranate fruit dataset (2020), https://www.kaggle.com/kumararun37/pomegranate-fruit-dataset, last Accessed: 2021-07-10

29. Rachakonda, L., Bapatla, A.K., Mohanty, S.P., Kougianos, E.: SaYoPillow: Blockchain-integrated privacy-assured IoMT framework for stress management considering sleeping habits. IEEE Transactions on Consumer Electronics 67(1), 20–29 (feb 2021). https://doi.org/10.1109/tce.2020.3043683

30. Rahman, M.U., Baiardi, F., Ricci, L.: Blockchain smart contract for scalable data sharing in IoT: A case study of smart agriculture. In: Proc. IEEE Global Conference on Artificial Intelligence and Internet of Things (GCAIoT) (2020). https://doi.org/10.1109/gcaiot51063.2020.9345874

31. Shafeeq, S., Zeadally, S., Alam, M., Khan, A.: Curbing address reuse in the IOTA distributed ledger: A cuckoo-filter-based approach. IEEE Transactions on Engineering Management 67(4), 1244–1255 (nov 2020). https://doi.org/10.1109/tem.2019.2922710

32. Udutalapally, V., Mohanty, S.P., Pallagani, V., Khandelwal, V.: sCrop: A novel device for sustainable automatic disease prediction, crop selection, and irrigation in internet-of-agro-things for smart agriculture. IEEE Sensors Journal pp. 1–1 (2020). https://doi.org/10.1109/jsen.2020.3032438

33. Yazdinejad, A., Srivastava, G., Parizi, R.M., Dehghantanha, A., Karimipour, H., Karizno, S.R.: SLPoW: Secure and low latency proof of work protocol for blockchain in green IoT networks. In: Proc. IEEE 91st Vehicular Technology Conference (VTC2020-Spring) (2020). https://doi.org/10.1109/vtc2020-spring48590.2020.9129462