an intelligent and optimal resource allocation approach in

9
Aalborg Universitet An Intelligent and Optimal Resource Allocation Approach in Sensor Networks for Smart Agri-IoT Tyagi , Sumarga Kumar Sah ; Mukherjee, Amrit; Pokhrel, Shiva Raj; Kant Hiran, Kamal Published in: I E E E Sensors Journal DOI (link to publication from Publisher): 10.1109/JSEN.2020.3020889 Publication date: 2021 Document Version Accepted author manuscript, peer reviewed version Link to publication from Aalborg University Citation for published version (APA): Tyagi , S. K. S., Mukherjee, A., Pokhrel, S. R., & Kant Hiran, K. (2021). An Intelligent and Optimal Resource Allocation Approach in Sensor Networks for Smart Agri-IoT. I E E E Sensors Journal, 21(16), 17439-17446. [9184105]. https://doi.org/10.1109/JSEN.2020.3020889 General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. ? Users may download and print one copy of any publication from the public portal for the purpose of private study or research. ? You may not further distribute the material or use it for any profit-making activity or commercial gain ? You may freely distribute the URL identifying the publication in the public portal ? Take down policy If you believe that this document breaches copyright please contact us at [email protected] providing details, and we will remove access to the work immediately and investigate your claim.

Upload: others

Post on 10-Dec-2021

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An Intelligent and Optimal Resource Allocation Approach in

Aalborg Universitet

An Intelligent and Optimal Resource Allocation Approach in Sensor Networks forSmart Agri-IoT

Tyagi , Sumarga Kumar Sah ; Mukherjee, Amrit; Pokhrel, Shiva Raj; Kant Hiran, Kamal

Published in:I E E E Sensors Journal

DOI (link to publication from Publisher):10.1109/JSEN.2020.3020889

Publication date:2021

Document VersionAccepted author manuscript, peer reviewed version

Link to publication from Aalborg University

Citation for published version (APA):Tyagi , S. K. S., Mukherjee, A., Pokhrel, S. R., & Kant Hiran, K. (2021). An Intelligent and Optimal ResourceAllocation Approach in Sensor Networks for Smart Agri-IoT. I E E E Sensors Journal, 21(16), 17439-17446.[9184105]. https://doi.org/10.1109/JSEN.2020.3020889

General rightsCopyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright ownersand it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights.

? Users may download and print one copy of any publication from the public portal for the purpose of private study or research. ? You may not further distribute the material or use it for any profit-making activity or commercial gain ? You may freely distribute the URL identifying the publication in the public portal ?

Take down policyIf you believe that this document breaches copyright please contact us at [email protected] providing details, and we will remove access tothe work immediately and investigate your claim.

Page 2: An Intelligent and Optimal Resource Allocation Approach in

IEEE SENSORS JOURNAL 1

An Intelligent and Optimal Resource AllocationApproach in Sensor Networks for Smart Agri-IoT

Sumarga Kumar Sah Tyagi∗, Amrit Mukherjee∗, Shiva Raj Pokhrel and Kamal Kant Hiran

Abstract— A Wireless Sensor Network (WSN) is ofparamount importance in facilitating smart Agricultural In-ternet of Things (Agri-IoT). It connects numerous sensornodes or devices to develop a robust framework for effi-cient and seamless communication with improved through-put for intelligent networking. Such enhancement has tobe facilitated by an adequate and smart machine learning-based resource allocation approach. With the ensuingsurge in the volume of devices being deployed from thesmart Agri-IoT, applications such as intelligent irrigation,smart crop monitoring and smart fishery would be largelybenefited. However, the existing resource allocation tech-niques would be inefficient for such anticipated energy-efficient networking. To this end, we develop a distributedartificial intelligence approach that applies efficient multi-agent learning over the WSN scenario for intelligent re-source allocation. The approach is based on dynamic clus-tering which coupled tightly with the Back-PropagationNeural Network and empowered by the Particle SwarmOptimization (BPNN-PSO). We implement the overall frame-work using a Bayesian Neural Network, where the outputsfrom BPNN-PSO are supplied as weights to the underlyingneuron layer. We observe that the cost function and energyconsumption demonstrate a substantial improvement interms of cooperative networking and efficient resource al-location. The approach is validated with simulations underrealistic assumptions.

Index Terms— Agriculture-IoT, Bayesian Neural Net-works, Wireless Sensor Networks.

I. INTRODUCTION

THE global population is predicted to touch 9.6 billion by2050 that poses a big problem for the agriculture industry

[1]. Despite usual challenges like extreme weather conditions,undesirable climate change, and its impact on farming, theensuing demand for food has been increasingly intractable. Weare supposed to satisfy these increasing demands; therefore,researchers have started investigating smart IoT technologiesfor Agriculture (Agri-IoT) [2]. Such technologies will enablethe agriculture industry to improve productivity, starting fromoptimizing the use of fertilizer to increasing the efficiency offarming. Our objective for Agri-IoT is to develop a framework

S. K. S. Tyagi with the School of Electronic and Information Engineer-ing, Zhongyuan University of Technology, Zhengzhou, China. e-mail:([email protected]).

A. Mukherjee is with Anhui University, Anhui, China. e-mail: ([email protected]).

S. R. Pokhrel is with Deakin University, Melbourne, Australia, e-mail:([email protected]).

K. K. Hiran is with Aalborg University, Copenhagen, Denmark e-mail:([email protected]).

for monitoring the crop field with the help of sensors (for light,humidity, temperature, soil moisture, etc.) and orchestratingthe irrigation system.

Wireless Sensor Network (WSN), an essential building-block for Agri-IoT [3], formulate a robust large-scale au-tonomous monitoring and control network by randomly de-ploying a large number of small sensor devices, also known asnodes, having communication and computing capabilities. Alldevices are connected through wireless channels to completetheir tasks and learn cooperatively.

A high-level framework of a WSN-based Agri-IoT is de-picted in Fig. 1, where numerous Sensor Nodes (SNs) aredeployed for several aspects of agriculture, from cattle man-agement to machinery operation. All the data from SNs arecollected by the sink node through wireless data exchangelinks even with random spatial placements and considerablemovements. The data is often transferred to the core networkvia different gateways such as a Base Transceiver Station(BTS) for further processing, data analysis, which, therefore,could potentially automate the entire Agri-IoT system. Suchautomation mechanism is further backed up by a cooperativecommunication setup and cluster formation between the nodesbased on the application requirements. We develop such anintrinsic mechanism to implant human-level intelligence in theAgri-IoT.

Cattle mgmt. Fishery mgmt.

Irrigation Machinery

Sensor nodeSink nodeGatewayWireless link

BTS

CoreNetwork

Fig. 1. An abstract view of the WSN framework for intelligent Agri-IoT

It is challenging to configure the nodes in the Agri-IoT toachieve effective allocation of resources such as network band-width and energy of the WSN [4]. Introduction of DistributedArtificial Intelligence (DAI) for distributed intelligent process-ing has already overcome the weakness of traditional cen-tralized learning architecture. Therefore, based on Distributed

Authorized licensed use limited to: Aalborg Universitetsbibliotek. Downloaded on September 03,2020 at 09:08:21 UTC from IEEE Xplore. Restrictions apply.

Page 3: An Intelligent and Optimal Resource Allocation Approach in

1530-437X (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JSEN.2020.3020889, IEEE SensorsJournal

2 IEEE SENSORS JOURNAL

Problem Solving (DPS) approach, we propose a Multi-AgentSystem (MAS) to exploit the intelligence and flexibility. Thenew MAS, structurally alike usual WSN, approach investigatesintelligence in the behaviour coordination and collaborativeworks among multiple agents [5]. In the proposed model, themultiple sensors have acted as multi-agents, and thus the DPSfor DAI approach has been used to enhance the cooperativenetworking idea.

To solve the problem of efficient node allocation for WSNin Agri-IoT and realize optimal resource allocation with lowenergy consumption and low complexity, the WSN based onDAI is to be analyzed and studied theoretically. We firstformulate a resource allocation model of WSN based onmulti-agents. After that, we formulate an optimization problemfor the process of resource allocation; the proposed BackPropagation Neural Network (BPNN) in the neural networkhas been adopted to develop an objective function and find anoptimal resource allocation scheme.

The concept of the clustering [6]–[8] is described as similarobjects that satisfy the objective function can be groupedinto a cluster, and the objects between different clusters aresupposed to be very different. Based on it, our approachdivides the resource allocation process into two phases: inter-cluster formation followed by an intra-cluster formation. Basedon the network status of the cluster, the Cluster Head (CH) iselected among the clusters that facilitate the allocation of thecorresponding resources. The CH allocation to the resourcesshall be performed first, followed by a self-assessment, andcomparing whether the current energy is higher than the targetenergy threshold. This identifies whether it is the task to beprocessed or the next stage of resource allocation is to beperformed.

Considering limited energy as well as life cycle of thenodes in a cluster, the distance between nodes and energy con-sumption are defined using fitness functions. More specifically,two neural network-based optimization algorithms are used tooptimize resource allocation, which will finally discover theoptimal node configuration solution. For this, we establisha resource allocation model of WSN based on DAI. Theoptimized conditions are the configuration of sensor nodes andthe node coverage, which are defined as the fitness function.The novelty of the proposed model lies in the implementationof Bayesian Neural Network (BNN) in BPNN for Agri-IoT ap-plications. The existing works on IoT and WSN mainly focuson networking and computations using different optimizationtechniques.

The organization of this paper is as follows. The nextsection shows the related work of resource allocation inWSNs. Sections III and IV provide mathematical analysis ofresource allocation based on DAI and the resource allocationbetween clusters, respectively. We discuss the optimization ofresource allocation within clusters based on BPNN in SectionV. Section VI shows the simulation and analysis. The lastsection concludes the paper with future scope.

II. RELATED WORKS

There are many research results on resource allocationmethods in WSN. Introduction of clustering can effectively

reduce energy consumption of the system as well as balancethe network-load. Authors in [7] used simple artificial fishschool and ant colony algorithm for resource allocation ofWSNs, and also optimized the clustering process. Authors in[9], [10] also used clustering to improve the LEACH-CS algo-rithm and proposed a low-energy adaptive clustering resourceallocation protocol, which is based on market mechanism.The market mechanism scheme aimed at maximizing profit torealize distributed resource allocation through the negotiationand adjustment of agents.

Considering the QoS, authors have adopted a centralizedresource allocation method in [11], [12] to minimize theallocated energy consumption. In [13], a resource allocationmodel based on a queuing network was established. Thesteady-state analysis of the model was used to find an optimalresource allocation scheme. These methods mainly considerissue from the perspective of reducing network energy con-sumption. However, as the number of users grow that demandsdifferent QoS requirements of different users. Therefore, amore dynamic and efficient resource allocation mechanismneeds to be established. To maximize utilization of resources,authors scheduled the tasks reasonably according to the QoSof different users to allocate them to different nodes in [14]. Inthe face of the heterogeneity of WSN, reference [15] adopts theresource allocation method based on heterogeneous statisticalQoS to transform the target into the maximization of networkthroughput. Some researchers use intelligent algorithms tooptimize the performance of resource allocation.

In [16], Genetic Algorithm (GA) is used to optimize theconfiguration of sensor nodes, where the node coverage isdefined as fitness function. The fitness function constitutes tasktransmission time and energy consumption. A resource alloca-tion algorithm based on Binary Particle Swarm Optimization(BPSO) is adopted in [14] to optimize the node configurationand resource scheduling of WSNs. To verify the feasibilityof the scheme, different topological structures and transferfunctions are analyzed and discussed. In [17], the author usedneural network to improve BPSO to optimize the resourceallocation process of WSNs and significantly ameliorate theconvergence speed. Considering an actual WSNs workingenvironment is real-time and dynamic. Authors in [18] pro-posed an agent-based WSN resource allocation framework.Because the agent is responsible for data collection, fusion anddistribution in the network, an accurate location informationand response time of the agent will affect the delay andwork efficiency of the entire network [19]. Reference [20]adopted an agent-based Fuzzy Group Optimization algorithm(FGO) to reduce energy consumption and prolonged the lifecycle of nodes in the WSNs. In [21], authors reduce thenumber of sensors to be selected using Multiplayer Perceptron(MLP), Support Vector Machine (SVM) and Naı̈ve Bayes forextending WSN lifetime.

The literature survey briefs existing AI-driven models, andhence provides a motivation to propose an energy-efficientnetworking model using BNN in IoT applications as discussedin later sections.

Authorized licensed use limited to: Aalborg Universitetsbibliotek. Downloaded on September 03,2020 at 09:08:21 UTC from IEEE Xplore. Restrictions apply.

Page 4: An Intelligent and Optimal Resource Allocation Approach in

1530-437X (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JSEN.2020.3020889, IEEE SensorsJournal

SAH TYAGI et al.: AN INTELLIGENT AND OPTIMAL RESOURCE ALLOCATION APPROACH IN SENSOR NETWORKS FOR SMART AGRI-IOT 3

III. MATHEMATICAL ANALYSIS OF BPNN-APSO ANDBNN

For the convenience of readers, all the mathematical nota-tions used in this paper are summarized in Table I.

TABLE INOTATION TABLE

Symbol Description Symbol Descriptiont Time π Initial agentP Power consumption E Environment spaceU(t) Memory usage in time t βπa Target valueCf Cost function X Input of BPNNφi Tasks to be executed Y Output of BPNNλij Task variable L No. of layersQoSλi

jTargeted QoS value wij Weight values

AE Auto-correlation Error m No. of setsED Euclidean distance l No. of set lengthl No. of sensing channels n Cluster sizeθ Energy thresholdr̄m+l Predicted value set F Fitness functionV Space set of particles C Global fitnessε Global extremum ω′ Weighting coefficientspbi Extremum at initial r1, r2 Random functionsgbd Extremum at final c1, c2 Acceleration constants

According to the technical requirements of Agri-IoT, wemust ensure the QoS of the system is satisfied. Due to the lim-ited resources of sensor nodes and to improve the network lifecycle, two constraints should be considered simultaneously,these are, power consumption of node batteries and the use ofmemory. When the current time is t, the node battery powerconsumption of the system is expressed as:

P (t) = P (t− 1)− P(MA−DA) − PDAPN(t− 1) (1)

where, P(MA−DA) is the power consumed when ManagerAgent (MA) communicates with Deliberative Agent (DA).PDA is the power consumed when choosing an appropriate CHas DA. In t ≤ 1 time, PN is the power consumed by the nextresource allocation, which is closely related to the locationinformation of the selected CH. Similarly, the expression forthe memory usage of the system in time t is:

U(t) = U(t−1)−P(MA−DA)−PDAPN(t−1)+PDAPN(t−2)(2)

Based on the above discussion, a cost function of the systemcan be constructed as:

Cf =

j∑i=1

φiµTQoSλij[P (t)i + U(t)i] (3)

where, φi = λ11, λ12, ..., λ

ij is a task to be executed in the

system, and λij is a task variable. QoSλij

is the targeted QoSvalue to be met when executing the task.

According to reference [22], an agent is represented by afunction π, and the agent is distributed in an environmentspace E. To measure a relationship between the agents, theKolmogorov complexity is introduced to indicate the informa-tion measure, expressed as:

ψ(π) =∑a∈E

2−K(a)βπa (4)

where 2−K(a) is the complexity loss value,∑a∈E is the

sum of activities in different environment spaces, and βπa isthe target value we want to achieve.

In this paper, DAI is used to calculate the optimal resourceallocation in the interaction between MA and CoordinatorAgent (CoA) in real-time. One may use the Power SpectralDensity (PSD) of the received signal to predict the positionallocation information of all MA. The AE is auto-correlationerror and ED is Euclidean distance.

AE1T [p g

2−22 ]

∑pl=1 al(T )

=ED

2

p∑l=2

al(T ) (5)

where,

p∑l=2

al(T ) ∈p∑l=1

al(T )

To make the resource allocation scheme more reasonable,we have to calculate all possible spatial location allocationsof the MA.

a = a1(T )

p∑l=2

al(T ) = λ(π) =∑l=2

2−K(a)βπa (6)

where,

p∑l=2

al(T ) ∈p∑l=1

al(T )

At this time, all the spatial position assignments of MAwill form a real-time continuous prediction, which can beexpressed by mathematical analysis as:

AE1T [p · g2−22 ]

=ED

2

p∑l=2

al(T )

p∑l=1

al(T ) (7)

AE1T [p · g2−22 ]

=ED · a

2

∑l=2

2−K(a)βπa (8)

In the system, each node must communicate with at leasttwo nodes, so the net gain is much larger than a singlesensor network. When the number of channels is p > 2,1T [p · g

2

2 − 1] → 1. DAI use the test data of AE to obtainthe position information of the sensor node positioning, andobtain the position and distance response relationship betweenMA and CoA as:

ED =1

T

∑l=1

2−K[al(T )]βπa (9)

After accepting the resources allocated by MA, DA willconduct a self-assessment of its energy. We set a thresholdθ in advance, and the evaluation rules are as follows:{

θDA > θ, intra− cluster allocation based on NN.θDA ≤ θ, DA directly performs the task.

(10)Only when the energy of the DA exceeds the threshold, theDA will perform the task assigned by the MA, otherwise, itwill enter the second stage of resource allocation, that is, theresource allocation process in the cluster. We will use twoneural network methods to find the best resource allocationscheme.

Authorized licensed use limited to: Aalborg Universitetsbibliotek. Downloaded on September 03,2020 at 09:08:21 UTC from IEEE Xplore. Restrictions apply.

Page 5: An Intelligent and Optimal Resource Allocation Approach in

1530-437X (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JSEN.2020.3020889, IEEE SensorsJournal

4 IEEE SENSORS JOURNAL

IV. OPTIMIZED RESOURCE ALLOCATION SCHEME ININTRA-CLUSTER BASED ON PSO-BPNN

To realize the optimal resource allocation in the systemcluster and improve the life cycle of the network, we willoptimize the set objective function in this section. Neuralnetworks have been proved to be effective in approximatingthe required accuracy of measurement functions [14], however,BPNN is widely used in practice. We will use the neuralnetwork to estimate the objective function and find the bestresource allocation strategy. In our implementation, BPNNis composed of a three-layer network structure, which has afunction of error feedback, and has slow convergence issue.Therefore, we adopt Particle Swarm Optimization (PSO) al-gorithm to improve the learning speed of BPNN. The detailsof implementation process is illustrated in Fig. 2.

Fig. 2. Flow chart of resource allocation optimization based on PSO-BPNN

The flow chart depicted in Fig. 2 is described as follows:step 1- The training sample set of BPNN is initiated based onobjective functions that are sensed by the heterogeneous nodes,node number and their spatial deployment. The process startsat t = 0ms during the training of the sample data with respectto their initial movements.step 2- Based on the training sample set of BPNN, the originaldata is then normalized. The normalization process is usedfor standardizing mathematical modeling of the method alongwith other parametric conditions.step 3- The model now implements Particle Swarm initial-ization using the normalized data mapped on to training

sample data of the objective function. This serves as the pre-optimization phase, where the data are generated based ondynamic clustering and normalized accordingly.step 4- Here, the model is creating a fitness function based onthe normalized and trained objective and cost functions. Thisstep will behave as the initial optimization phase which carriesfurther the objective functions based on the BPNN outputs.step 5- In this stage, based on the previous fitness functionoutputs, the optimal fitness function is classified to updatethe particle position and velocity noted from the spatiallydistributed nodes.step 6- This is the foremost step of the proposed model, wherethe optimal number of iterations is calculated based on theBPNN-PSO approach. If the optimal number of iterations isnot reached, particle fitness is again calculated and proceedfor optimization.step 7- As soon as the optimal number of iterations is achievedduring cooperative communication among the Agri-IoT nodes,the data storage for iterative computations come into thepicture, which enables preparing the new training set for thenext time instance.step 8- As soon as the storage optimization takes place duringdynamic clustering, the BPNN cost functions are updated andcorresponding optimal fitness functions are derived. Based onthis cycle, the best resource allocation plan is continuouslyupdated and implemented with respect to time.

The training process of BPNN is divided into two parts:forward transmission and reverse feedback. The original dataof the node position and energy load obtained in the previoussection are normalized, and the obtained data set is usedas input, which is then composed with the target output setTraining set to train BPNN. The work of forward transmissionis to output the input set as the predicted target set. The inputlayer of BPNN contains several input units. In addition to theinput layer, the other layers contain several calculation units.The input value X and output value Y of each layer node areas follows:

XLi =

∑j

Y L−1j wLij + θLi (11)

Y Li =1− exp(−XL

i )

1 + exp(−XLi )

(12)

where L represents the number of layers, wij is the weightvalue of the node connection between the adjacent layers, andθi represents the threshold of the node.

If the input is m sets of length l, set to Rm =rm, rm+1, ..., rm+l−2, rm+l−1, the corresponding target outputis rm+l. The predicted value we set is r̄m+l, and the meanvariance D is:

D =(∑

d2m

)/2 (13)

dm = r̄m+l − rm+l (14)

In order to improve the accuracy of prediction, reverse feed-back is needed to reduce the mean square error. According tothe updating formulas of w and θ. Here, w of BPNN constantly

Authorized licensed use limited to: Aalborg Universitetsbibliotek. Downloaded on September 03,2020 at 09:08:21 UTC from IEEE Xplore. Restrictions apply.

Page 6: An Intelligent and Optimal Resource Allocation Approach in

1530-437X (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JSEN.2020.3020889, IEEE SensorsJournal

SAH TYAGI et al.: AN INTELLIGENT AND OPTIMAL RESOURCE ALLOCATION APPROACH IN SENSOR NETWORKS FOR SMART AGRI-IOT 5

updated by D, the updating formulas are as follows:

wm = wm+1 + ∆wt (15)

∆wm = −ζ ∂D∂wm

+ β∆wt−1 (16)

The updated formula for w is:

θm = θm−1 + ∆θt (17)

∆θm = −ζ ∂D∂θm

+ β∆θt−1 (18)

The initial weight and threshold of BPNN are optimized byusing the global search of PSO. According to reference [23],the mathematical model of PSO is as follows:

UPSO = (n, t, V,X, F,C) (19)

where, n is the cluster size. Also, V = (Vi1, Vi2, ..., ViN )represents the space set of particle flying speed, X =(Xi1, Xi2, ..., XiN ) represents the position space of particlesin the search space, F is the fitness of the mapping process,and C is the aggregation degree of the particle swarm. Duringthe iterative process, the particles will dynamically update theirpositions and velocities based on the individual extremum pbiand the extremum gbd of the entire particle swarm.

Vij(t+ 1) = ω′Vij(t) + c1 ∗ r1(t)[pbij(t)−Xij(t)]

+c2 ∗ r2(t)[gbid(t)−Xij(t)] (20)Xij(t+ 1) = Xij(t) + Vij(t+ 1) (21)

where, c1 and c2 are the acceleration constants, r1 and r2are two random functions that take value between [0, 1]. Eachvector of particles in PSO is used as the connection weight ofBPNN to continuously optimize the initial weight of BPNN.There are M different weighting coefficients ω′ in particleswarm, and this value varies with pbi and gbd.

Different weighting coefficients will form different optimalsolution spaces, and then use BPNN to continue to optimize inthe optimal solution space, and finally obtain the best resourceallocation scheme. The position vector of the particle is aninteger. Each entity of the vector represents an allocationscheme depending on the number of tasks and the numberof nodes in the Task Agent (TA). When the number of tasksis 5 and the number of TA nodes is 3, the resource allocationmatrix can be written as follows:

P =

0 1 0 1 01 1 0 1 00 0 1 0 1

(22)

Here, F is determined by the global extremum ε and theaverage of a single extreme value ∆εave, and its range is (0, 1].

εt = f(pbt) (23)

εtave,i =

(n∑i=1

εt

)/n (24)

F = o1min(εt, εt−1)

max(εt, εt−1)+ o2

min(∆εtave,i, εt−1ave,i)

max(∆εtave,i, εt−1ave,i)

(25)

We can determine the optimal solution by comparing the ε ofdifferent iterations, and use εave to obtain the changing trendof PSO.

Here, C is determined by the global fitness ∆εtave,i and∆εtd.

εtd =

(n∑i=1

f(Xti )

)/n (26)

C =min(∆εtave,i, δε

td)

max(∆εtave,i, δεtd)

(27)

In the above formula, by comparing εtave,i and εtd), we candetermine whether all particles are aggregated to the bestvalue. Then, according to F and C, dynamic update formulaof the weighted coefficient is as follows:

ω′ = ωeF + ωaC,F ∈ (0, 1], C ∈ [0, 1], (28)ωf − ωe < ω′ < ωf + ωa

The proposed BPNN traning method is briefly described asfollow:

Algorithm 1: Training of BPNN for resource alloca-tionInput : X,Y 1*l matrixOutput: X,Y 1*l matrix

1 for i = 1 to l do2 for j = 1 to l do3 C[i,j] = 1;4 end5 end

6 while C[i,j] ≤ ωli(i = 1, 2, ..., k) do7 η = ω[i, j];8 loop from 1 to k;9 for bli ≤ 1 do

10 m = m[i]+1;11 for l = 1 to m do12 ω′ = ωeF + ωaC;13 end14 end15 η = η − 1;16 end17

The simulation and results section will thoroughly discussthe energy consumption and QoS of the system. Also, the lifeof the whole system model as to a certain extent it dependson the energy consumption.

V. SIMULATIONS AND RESULTS

The proposed work is validated with two different simula-tion scenarios. One is regarded as small scale scenario, and theother one is large scale scenario. In the small scale scenario,the area coverage by the nodes = 100m X 100m, number ofnodes = 1000, whereas, for the large scale scenario, the areacoverage by the nodes = 500m X 500m; number of nodes =10000. For both scenarios, simulation time = 1000ms; nodesare distributed initially as per poisons distribution; minimumand maximum signal to noise ratio = 2 to 20 dB; hidden

Authorized licensed use limited to: Aalborg Universitetsbibliotek. Downloaded on September 03,2020 at 09:08:21 UTC from IEEE Xplore. Restrictions apply.

Page 7: An Intelligent and Optimal Resource Allocation Approach in

1530-437X (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JSEN.2020.3020889, IEEE SensorsJournal

6 IEEE SENSORS JOURNAL

BNN layers = 10 and dynamic clustering for general WSNapplications.

To assess the proposed resource allocation using BNNapproach for Agri-IoT, we have calculated the clustering rates,energy consumption profiles, simulation time, and transitionsbetween input layer and output layer, for three differentcomparing schemes DAI, HML and APSO. Moreover, thecooperative communication is validated using error rate plotto support the model. Those metrics will not only justifythe computation speed but also the energy-efficiency of theproposed method.

#Clusters

0 2000 4000 6000 8000 10000

Tim

e (

ms)

0.

0.002

0.004

0.006

0.008

0.01

0.012

0.016

0.018

With DAI and HML

With APSO

With BNN

Fig. 3. Clustering rates for different schemes (Small scale scenario).

The Fig. 3 depicts clustering rates (number of clustersformation per unit time) of all the comparing schemes forsmall scale scenario. Clustering rate signifies how fast numbersof clusters can be formed to accommodate network load in theIoT. As we increase the dynamic clustering among the Agri-iot nodes, the overall cooperative communication becomesefficient due to continuous BPNN and PSO. This will resultin decrease the energy consumption in par with the systemresponse, and hence increase the resource allocation in anefficient manner. It means the resource allocation is as efficientas the clustering rate is higher. The proposed method havehighest clustering rate that can be noticed from the Fig. 3. Theproposed method achieves 44% and 65% higher clustering ratethan APSO and DAI & HML, respectively.

#Clusters0 4000 8000 10000 14000 16000 20000

Tim

e (

ms)

0.

0.002

0.004

0.006

0.008

0.01

0.012

0.016

0.018

0.020With DAI and HML

With APSO

With BNN

Fig. 4. Clustering rates for different schemes (Large scale scenario).

Similarly, the proposed method is checked for the large scalescenario, and the corresponding graph is plotted in Fig. 4.The figure shows that our proposed method has achieved 50%and 73% higher clustering rate than APSO and DAI & HML,respectively. Therefore, with validation for both scenarios,the proposed method could most efficiently allocate networkresources in the WSN-based Agri-IoT than other comparingschemes.

It is not only paramount importance for resource allocationbut also for significantly lowers the energy consumption thatwill be discussed in the following paragraph.

Time (ms)0.05 0.1 0.3 0.4

Ener

gy C

onsu

mpti

on (

mJ)

0

510

12

1416

20

40

6080

100150

Conventional

Theoretical

Using HML

Using BNN

Fig. 5. Energy consumption profiles for small scale scenario.

Energy consumption profiles for all three schemes are plot-ted in the Fig. 5 considering small scale scenario. The simula-tion time is varied and the change of the energy consumptionis observed. Initially, the energy consumption decrease but atlater stages it slightly increases due to dynamic formationof the clusters. If the number of clusters are fixed in anynetwork, then the energy consumption will be reduced. TheFig. 5 shows that the BNN performs a substantial improvedenergy consumption as compared to the traditional methods.That means the proposed method could save 49%, 36%, and31.6% more energy than conventional, theoretical, and HMLmethods, respectively.

Time (ms)0 0.01 0.015 0.020 0.025

En

erg

y C

on

sum

pti

on

(m

J)

510

12

1416

20

40

6080

ConventionalTheoreticalUsing HMLUsing BNN

Fig. 6. Energy consumption profiles for large scale scenario.

Similarly, for a massive scale deployment deployment ofsensors, the energy consumption profiles for different schemesare depicted in Fig. 6. Where, the graph of all the schemes,except the conventional, dynamically varying energy con-sumption commensurate with the formation of number ofclusters. As we increase the number of nodes, more than1000, the proposed model shows optimum results and con-sumes less energy as compared to the other existing methodsand conventional method. This is due to feedback in BNNand continuous optimization in the Agri-IoT network duringcooperative communication networking. Most importantly, ourproposed method always consume less energy than otherschemes. Thus, in both the scenarios, the proposed methodsubstantially consume less energy comparing with the otherschemes.

This significant energy saving scheme is very importantfor any large scale IoT applications such as Agri-IoT, wherethousands of nodes are interconnected and consume energiesat different levels of stack in the network.

As shown in Fig. 7, the cost function variation in accordanceto normalized transition time from CH and I-O layer variations

Authorized licensed use limited to: Aalborg Universitetsbibliotek. Downloaded on September 03,2020 at 09:08:21 UTC from IEEE Xplore. Restrictions apply.

Page 8: An Intelligent and Optimal Resource Allocation Approach in

1530-437X (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JSEN.2020.3020889, IEEE SensorsJournal

SAH TYAGI et al.: AN INTELLIGENT AND OPTIMAL RESOURCE ALLOCATION APPROACH IN SENSOR NETWORKS FOR SMART AGRI-IOT 7

Fig. 7. Time response variation in clusters during resource allocation.

are presented. As it can be seen, initially at beginning, i.e. thefirst input layer of BNN, and the beginning of 1st CH selectionduring dynamic clustering, the cost function is maximum.While, at the middle of I-I transitions, when the dynamicclustering is ongoing and 50% of the CH are identified thecost function is minimum. This is due to BPNN based PSO iscontinuous for global search for the optimum node positions.And at the later stages, the cost function is high whichreveals a good quality of service for the proposed model aftercompletion of dynamic clustering and the model reached thefinal output stage of BNN.

Eb/N0 (dB)2 4 6 8 10 12 14 16

BE

R

10-6

10-4

10-2

Proposed BNN for LoRa applicationsProposed BNN for WSN applicationsUsing DAI and HMLUsing APSO

Fig. 8. Performance comparisons of different networks for small scale.

As illustrated in Fig. 8, the network performance is shownin terms of comparisons for Bit Error Rates (BER) duringthe overall networking using the proposed model and otherexisting models for small scale scenario. The simulations areperformed for Low Range IoT applications (LoRa) and othergeneral WSN based IoT applications, where the signal-to-noiseratio is maintained at the maximum of 20 dB.

Eb/N0 (dB)0 2 4 6 8 10 12 14

BE

R

10-5

10-4

10-3

Proposed BNN for LoRa applicationsProposed BNN for WSN applicationsUsing DAI and HMLUsing APSO

Fig. 9. Performance comparisons of different networks for large scale

Fig. 9, shows the BER performance for the large scalescenario, where the new BER is improved and the errorrate is significantly decreased in from 6-12dB SNR whichis an optimum condition for any IoT applications. Although

we are increasing the number of nodes, the BNN processesthe objective function and reduces the energy consumptionwith optimum time response, results in improved BER. Aswe know, the cooperative communication needs to be energyefficient in heterogeneous and dynamic clustering, reducingthe BER for higher number of nodes in a large area justifiesthe proposed method.

The results presented for both the scenarios in comparisonwith existing DAI, HML and APSO methods, which arebasically used for Cognitive Radio Sensor Network (CRSN)and WSN application. It can be clearly seen, as we increase theSNR, the BER is reduced in all the cases, but the BPNN provesto a better solution for Agri-iot applications which is basicallya low SNR application. The simulation results are carried outusing error function calculation for all the methods. It can beobserved, the BER for performance with the proposed modelillustrates a substantial improved performance as comparedwith DAI, HML and APSO techniques which are used forIoT dynamic clustering. This is due to BPNN based APSO andBNN theoretical model, which not only improves the energyconsumption but also the overall networking performancethat is the most essential for a smart Agri-IoT applications.A further advanced approach for security and privacy-awarecollaborative learning across multiple WSNs for future Agri-IoT requires further investigations by using new technologysuch as Blockchain and federated learning along the lines ofthat of [24], which is left for future work.

VI. CONCLUSION AND FUTURE DIRECTIONS

We proposed an energy-efficient resource allocation modelusing a neural network approach for WSN-based smart Agri-IoT framework. Initially, our model uses BPNN and APSOfor dynamic clustering and optimization of the cluster size.The BNN is implemented in each layer from input to outputbased on the selection of the cluster from the previous stages.This enhances not only the overall dynamic clustering process,but also the BNN takes care of the computation time andenergy consumption. For simulations, we have assumed thereal-time parameters and environmental conditions for twodifferent scenarios of Agri-IoT application, these are smallscale scenario and large scale scenario. The significant differ-ence between these two scenarios is considered: several nodesand the corresponding coverage areas. The simulated resultsare presented and compared with other existing methods tobenchmark the performance. The work has been extended forlarge scale deployments by assuming micro-cell zones for IoTapplications and Industrial IoT based WSN models.

REFERENCES

[1] United Nations Food and Agriculture Organizarion, ”How to Feed theWorld in 2050”. http://www.fao.org/fileadmin/templates/wsfs/docs/expert/ paper/How to Feed the World in 2050.pdf

[2] O. Elijah, T. A. Rahman, I. Orikumhi, C. Y. Leow and M. N. Hindia, ”AnOverview of Internet of Things (IoT) and Data Analytics in Agriculture:Benefits and Challenges,” in IEEE Internet of Things Journal, vol. 5, no.5, pp. 3758-3773, Oct. 2018.

[3] N. Ahmed, D. De and I. Hussain, ”Internet of Things (IoT) for SmartPrecision Agriculture and Farming in Rural Areas,” in IEEE Internet ofThings Journal, vol. 5, no. 6, pp. 4890-4899, Dec. 2018.

Authorized licensed use limited to: Aalborg Universitetsbibliotek. Downloaded on September 03,2020 at 09:08:21 UTC from IEEE Xplore. Restrictions apply.

Page 9: An Intelligent and Optimal Resource Allocation Approach in

1530-437X (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JSEN.2020.3020889, IEEE SensorsJournal

8 IEEE SENSORS JOURNAL

[4] H. P. Gupta, P. K. Tyagi and M. P. Singh, ”Regular Node Deploymentfor k -Coverage in m -Connected Wireless Networks,” in IEEE SensorsJournal, vol. 15, no. 12, pp. 7126-7134, Dec. 2015.

[5] M. G. Kibria, K. Nguyen, and G. P. Villardi, et. al, “Big Data Analytics,Machine Learning, and Artificial Intelligence in Next-Generation WirelessNetworks,” IEEE Access, vol. 6, pp. 32328-32338, 2018.

[6] H. P. Gupta, S. V. Rao, A. K. Yadav and T. Dutta, ”Geographic Routing inClustered Wireless Sensor Networks Among Obstacles,” in IEEE SensorsJournal, vol. 15, no. 5, pp. 2984-2992, May 2015.

[7] Xiao H, Zhao X, Ogai H. ”A New Clustering Routing Algorithmfor WSN based on Brief Artificial Fish-School Optimization and AntColony Optimization”, IEEJ Transactions on Electronics, Information andSystems, 2013, Volume 133, Issue 7, Pages 1339-1349.

[8] Sah Tyagi, S.K., Zhou, Y., Lin, T. et al. ”Realization of a computationalefficient BBU cluster for cloud RAN”. J Ambient Intelligence andHumanized Computing (2018).

[9] Zimmerman A T, Lynch J P, Ferrese F T. “Market-based resourceallocation for distributed data processing in wireless sensor networks,”ACM Transactions on Embedded Computing Systems, vol. 12, no.3, pp.1-28, 2013.

[10] S. R. Pokhrel, S. Verma, S. Garg, A. K. Sharma and J. Choi, ”An Effi-cient Clustering Framework for Massive Sensor Networking in IndustrialIoT,” IEEE Transactions on Industrial Informatics (2020).

[11] P. Goswami, et.al., “An Energy Efficient Clustering using Firefly andHML for Optical Wireless Sensor Network,” Optik, vol. 182, pp. 181-185, 2019.

[12] S. K. Sah Tyagi, T. Lin and Y. Zhou, ”Thermal-Aware Dynamic Comput-ing Resource Allocation for BBU Pool in Centralized Radio Access Net-works,” 2017 IEEE 85th Vehicular Technology Conference (VTC Spring),Sydney, NSW, 2017, pp. 1-5, doi: 10.1109/VTCSpring.2017.8108488.

[13] Victor Cionca , Ramona Marfievici , Roland Katona , Dirk Pesch . “Jud-iShare: Judicious resource allocation for QoS-based services in sharedwireless sensor networks,” in Proc. 2018 IEEE Wireless Communicationsand Networking Conference (WCNC), IEEE, 2018.

[14] A. Mukherjee, P. Goswami, Z. Yan, L. Yang and J. J. P. C. Rodrigues,”ADAI and Adaptive PSO-Based Resource Allocation for Wireless Sen-sor Networks,” in IEEE Access, vol. 7, pp. 131163-131171, 2019.

[15] Martins F V C , Carrano E G , Wanner E F , et al. “On a VectorSpace Representation in Genetic Algorithms for Sensor Scheduling inWireless Sensor Networks,” Evolutionary Computation, vol. 22, no. 3,pp. 361–403, 2014.

[16] Wenzhong Guo , Jie Li ; Guolong Chen , Yuzhen Niu , Chengyu Chen.“A PSO-Optimized Real-Time Fault-Tolerant Task Allocation Algorithmin Wireless Sensor Networks,” IEEE Transactions on Parallel and Dis-tributed Systems, vol. 26, no. 12, pp. 3236 - 3249, 2014.

[17] K. Anusha , G.I. Shamini . “Power and resource allocation usingmodified binary particle swarm optimization in neural network,” inProc. 2016 International Conference on Wireless Communications, SignalProcessing and Networking (WiSPNET), IEEE, 2016.

[18] Fukuda H , Leger P. “An efficient agent location management for wire-less sensor networks”, in Proc. International Conference on DistributedComputing in Sensor Systems, IEEE, 2015.

[19] Guoying C , Yan W . “Multi-mobile Agent collaborative control dataseparation method in wireless sensor network,” Journal of ComputerApplications, vol.34, no.4, pp.910-915, 2015.

[20] Amrit Mukherjee, et.al., “Distributed Artificial Intelligence based ClusterHead power allocation in Cognitive Radio Sensor Networks”, IEEESensor Letters, pp.1-4, 2019.

[21] Abdulaziz Y. B., Ismail M. K., “Energy management in wireless sensornetworks based on Naive Bayes, MLP, and SVM Classifications: Acomparative study”, Journal of Sensors, Hindawi vol. 2016, Pages: 1-12,2016.

[22] Legg S, Hutter M. “Universal Intelligence: A Definition of MachineIntelligence”, Minds & Machines, vol.17, no.4, pp.391-444, 2007.

[23] Ziwei Y, et al., “Energy-efficient node positioning in optical wirelesssensor networks”, Optik, vol.179, no.8, pp.461-466, 2019.

[24] Pokhrel S R, “Towards Efficient and Reliable Federated Learning UsingBlockchain For Autonomous Vehicles,” Computer Networks. 2020 Jul21:107431.

Sumarga Kumar Sah Tyagi (M’19) is workingas an Assistant Professor at Zhongyuan Uni-versity of Technology, Zhengzhou, China. Dr.Sah Tyagi has received MSc. degree in Com-puter Science and Ph.D. degree in WirelessCommunication from the South Asian University(established by SAARC countries), New Delhi,India, and the Institute of Computing Technology,Chinese Academy of Sciences, Beijing, respec-tively. His research interests focus on cutting-edge AI enabled Communications and Comput-

ing technology. He has published 12+ SCI papers and EI conferences.He serves as Lead Guest Editor for several top-tier journals. He isa recipient of several prestigious scholarships/awards from differentgovernments, including ”CAS-TWAS President’s Fellowship-2014” forthe duration of Ph.D. from government of China and Italy, and ”SAARCSilver-Jubilee Scholarship” (2012-2014) from Indian government for theduration of studying Master degree.

Amrit Mukherjee (M’15) obtained a Ph.D. fromKIIT University, India, in 2017. He is currentlyworking in School of Electronics and InformationEngineering, Anhui University, Hefei, PR China.He was a Post-Doc Research Fellow in Schoolof Computer Science and Communication Engi-neering, Jiangsu University, PR China from May2018-June 2020. He has published more than54 research articles and submitted 4 patentstill date. He also served special issue guesteditor for Computer Communications, Journal of

System Architecture and Computers, Materials and Continua. His areaof interests include Artificial Intelligence, Wireless Sensor Networks,Cognitive Radio, IoT and signal processing.

Shiva Raj Pokhrel received the Ph.D. degreein ICT engineering from Swinburne Universityof Technology, Melbourne,Australia, in 2017.Dr. Pokhrel was the recipient of the MarieSkłodowska Curie Grant Fellowship in 2017. Heis currently an Assistant Professor with DeakinUniversity, Geelong, Australia. From 2017 to2018, he was a Research Fellow with the Uni-versity of Melbourne, Melbourne, Australia anda Network Engineer with Nepal Telecom, Kath-mandu, Nepal, from 2007 to 2014. His current

research interests include federated learning, blockchain, and IoT.

Kamal Kant Hiran works as an Assis-tant Professor, School of Engineering at theSir Padampat Singhania University (SPSU),Udaipur, Rajasthan, India as well as a ResearchFellow at the Aalborg University, Copenhagen,Denmark. He is a Gold Medalist for M. Tech(Hons.). He has experience of 15+ years as anacademician and researcher in Asia, Africa andEurope. He is recipient of several awards andrecognition from IEEE and Elsevier. He has pub-lished 35 research papers in SCI/Scopus/Web of

Science Journals, Conferences and 7 books with International Publish-ers.

Authorized licensed use limited to: Aalborg Universitetsbibliotek. Downloaded on September 03,2020 at 09:08:21 UTC from IEEE Xplore. Restrictions apply.