0% found this document useful (0 votes)
42 views22 pages

Applsci 11 10517

Uploaded by

Edson Bortoni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views22 pages

Applsci 11 10517

Uploaded by

Edson Bortoni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

applied

sciences
Article
Grid-Based Routing Model for Energy Efficient and Secure Data
Transmission in WSN for Smart Building Applications
V. Sivasankarareddy 1, * , G. Sundari 1 , Ch. Rami Reddy 2 , Flah Aymen 3 and Edson C. Bortoni 4

1 Electronics and Communication Engineering, Sathyabama Institute of Science and Technology,


Chennai 600119, India; dean.studentaffairs@sathyabama.ac.in
2 Electrical and Electronics Engineering, Malla Reddy Engineering College (A), Maisammaguda,
Secunderabad 600119, India; crreddy229@mrec.ac.in
3 Processes, Energy, Environment and Electrical Systems, National Engineering School of Gabès,
University of Gabès, Gabès 6072, Tunisia; flahaymening@yahoo.fr
4 Electric and Energy Systems Institute, Itajubá Federal University, Itajubá 37500-903, Brazil;
bortoni@unifei.edu.br
* Correspondence: tejapav05@gmail.com

Abstract: Presently, due to the establishment of a sensor network, residual buildings in urban areas
are being converted into smart buildings. Many sensors are deployed in various buildings to perform
different functions, such as water quality monitoring and temperature monitoring. However, the
major concern faced in smart building Wireless Sensor Networks (WSNs) is energy depletion and
security threats. Many researchers have attempted to solve these issues by various authors in different
applications of WSNs. However, limited research has been conducted on smart buildings. Thus,
 the present research is focused on designing an energy-efficient and secure routing protocol for

smart building WSNs. The process in the proposed framework is carried out in two stages. The
Citation: Sivasankarareddy, V.; first stage is the design of the optimal routing protocol based on the grid-clustering approach. In
Sundari, G.; Rami Reddy, C.; Aymen,
the grid-based model, a grid organizer was selected based on the sailfish optimization algorithm.
F.; Bortoni, E.C. Grid-Based Routing
Subsequently, a fuzzy expert system is used to select the relay node to reach the shortest path for data
Model for Energy Efficient and Secure
transmission. The second stage involves designing a trust model for secure data transmission using
Data Transmission in WSN for Smart
the two-fish algorithm. A simulation study of the proposed framework was conducted to evaluate
Building Applications. Appl. Sci. 2021,
11, 10517. https://doi.org/10.3390/
its performance. Some metrics, such as the packet delivery ratio, end-end delay, and average residual
app112210517 energy, were calculated for the proposed model. The average residual energy for the proposed
framework was 96%, which demonstrates the effectiveness of the proposed routing design.
Academic Editor: Muhyiddine Jradi
Keywords: grid clustering; smart building; sailfish optimization; fuzzy expert system and two-fish
Received: 10 October 2021 encryption algorithm
Accepted: 4 November 2021
Published: 9 November 2021

Publisher’s Note: MDPI stays neutral 1. Introduction


with regard to jurisdictional claims in
Advancements in the field of information communication technology have paved the
published maps and institutional affil-
way for the establishment of WSNs [1,2]. Generally, WSNs consist of tiny and low-cost
iations.
sensors whose major function is to sense information from a particular environment and
transmit it through a wireless network to the monitoring zone. WSNs have a wide range of
applications in various fields such as defense, agriculture, healthcare, smart cities, smart
building emergency rescue, and vehicular applications. The main processing unit in the
Copyright: © 2021 by the authors. sensors is a battery [3,4] for the effective functionality of sensor node. The batteries are
Licensee MDPI, Basel, Switzerland.
powered with minimum energy owing to the minor nature of the sensor nodes. At the
This article is an open access article
same time, it is very complex to replace the sensors once they are deployed. Therefore,
distributed under the terms and
energy efficiency is a major concern in WSNs [5]. Previous research on WSNs has shown
conditions of the Creative Commons
that significant energy is consumed during data transmission. This transmission process
Attribution (CC BY) license (https://
relies mainly on routing protocols. Thus, it is essential to design an energy-efficient routing
creativecommons.org/licenses/by/
4.0/).
strategy to reduce energy consumption, thereby improving the network lifetime [6,7].

Appl. Sci. 2021, 11, 10517. https://doi.org/10.3390/app112210517 https://www.mdpi.com/journal/applsci


Appl. Sci. 2021, 11, 10517 2 of 22

Following energy depletion, another major issue faced in wireless networks is security
because wireless signals are subjected to various attacks. The increase in the usage of
WSNs in various applications has resulted in considerable vulnerabilities to malicious
attacks [8,9]. Therefore, to secure information from malicious attackers, efficient security
protocols must be designed for WSNs applications. The third significant challenge faced in
WSNs is providing a better Quality of Service (QoS) [10]. To offer better QoS, to calculate
metrics such as increased packet delivery ratios, throughput, latency, decreased time delay,
packet loss, and energy consumption, are needed.
By satisfying this requirement, a better QoS in the WSNs can be attained [11]. Several
scholars have performed various studies to design energy-efficient and secure routing
protocols for WSNs. Most existing WSN protocols are designed based on optimization
algorithms and artificial intelligence systems. Some of the existing routing protocols related
to WSNs are the hybrid hierarchical secure routing protocol (HHSRP) [12], QoS-aware
Energy Balancing Secure Routing (QEBSR) [13], energy-efficient clustered gravitational
and fuzzy-based routing algorithms [14], and energy-balanced zone-based routing proto-
cols [15]. However, these existing routing approaches lack efficient energy conservation
and data privacy preservation. Therefore, an energy-aware and secure routing protocol
for WSNs must be developed for smart building applications. The main motive of the
proposed framework is as follows:
• To design a grid-based network structure for attaining energy conservation and secur-
ing data transmission in smart building WSNs.
• An optimal routing path selection based on a fuzzy interference system attains an
enhanced packet delivery ratio.
• To select the best grid organizer, a meta-heuristic algorithm, namely the sailfish
optimizer, was utilized.
• For the optimal selection of the grid organizer, the residual energy and distance were
considered as objective functions.
• A two-fish encryption algorithm is used to achieve trust-based routing.
The remainder of the manuscript is organized as follows: Section 2 reviews articles
related to various routing approaches in WSNs. Section 3 discusses the background of the
proposed methodology. A detailed explanation of the proposed framework is provided
in Section 4. Section 5 presents the results obtained through the implementation. Finally,
Section 6 concludes the study.

2. Literature Review
In recent years, many researchers have developed various routing protocols to mini-
mize energy consumption and to improve the network lifetime. Some of the articles related
to various routing approaches in WSNs are reviewed below.
Sinde et al. [16] designed Energy-Efficient Scheduling using the Deep Reinforcement
Learning (DRL) (E2 S-DRL) algorithm in WSNs. E2 S-DRL contributes three phases to
prolong network lifetime and to reduce network delay: clustering, duty-cycling, and
routing phases. E2 S-DRL’s clustering phase reduces the energy consumption incurred
during data aggregation. This was achieved through a Zone-based Clustering (ZbC)
scheme. In the ZbC scheme, hybrid Particle Swarm Optimization (PSO) and Affinity
Propagation (AP) algorithms were utilized.
Sonam Lata et al. [17] designed the LEACH-Fuzzy Clustering (LEACH-FC) protocol
and implemented a fuzzy logic-based cluster head selection and cluster formation to
maximize the network’s lifetime. For the selection of cluster head and cluster formation, a
centralized approach was used instead of distributed ones, and fuzzy logic was employed
to select the vice cluster head.
Ramprakash et al. [18] designed an efficient routing mechanism called power-aware
energy-efficient routing (PAEER) to meet the network lifetime. The maximization and
energy efficiency in WSNs and the different contributions of the PAEER approach are:
(a) the multi-sink node approach which can lead to an increase in the node network lifetime
Appl. Sci. 2021, 11, 10517 3 of 22

and event detection mechanism that meets the reliability requirement of the WSNs; and
(b) using the PAEER mechanism, the data are sent to the sink node by covering multipath
routes to aggregate the node data.
Dowlatshahi et al. [19] designed an energy-optimized algorithm. Owing to the het-
erogeneity of the sensor nodes in the WSNbased Internet of Things(IoT) for smart cities,
one approach for scheduling the sensing activity is to cluster the sensors intoKmutually
different subsets in such a way that every subset of sensors alone can cover all targets of
the network. In this case, finding the maximum number of sensor subsets, or equivalently,
the sensor covers the problem by converting it to the SET K-COVER problem. To solve the
SET K-COVER problem, the proposed Grouping Memetic Algorithm (GMA) is proposed.
Ifzame et al. [20], aimingto reduce communication costs and resilience against differ-
ent WSNs security attacks, used a Paillier Cryptosystem and Compressive Sensing-based
Routing (PC2 SR) to design three mechanisms: a pallier cryptosystem-based vital for distri-
bution and management, intra-cluster data gathering, and secure data transmission. The
PC2 SR provided a pallier security key to each device for data authentication.
Neelam Sharma et al. [21], aimed to develop a protocol architecture that can extend
network lifetimes, balance, and reduce the energy consumption of networks, reduce
redundancy, and increase information validity and integrity.
P Maheshwari et al. [22] discussed minimizing the overall energy consumption and
maximizing the network lifetime. In this study, the Butterfly Optimization Algorithm (BOA)
is employed to choose an optimal cluster head from a group of nodes. The performance
measures of the proposed methodology are analyzed in terms of alive nodes, dead nodes,
energy consumption, and data packets received by the BS. The disadvantage is the latency.
Alghamdi et al. [23] attempted to develop a new clustering model with optimal cluster
head selection by considering four major criteria: energy, delay, distance, and security.
Furthermore, to select the optimal CHs, this paper proposes a new hybrid algorithm
that hybridizes the concept of dragon fly and firefly algorithms, termed fire fly re-placed
position update in dragonflies.
AAH Hassan et al. [24] proposed an improved energy-efficient clustering protocol
(IEECP) to prolong the lifetime of a WSN-based IoT.
P Rawat et al. [25] proposed a clustering protocol named Energy Efficient Cluster-
head Selection Scheme (ECSS). The proposed protocol is designed for a heterogeneous
environment and aims to minimize energy usage in the network, thereby improving the
lifespan of the network.
Joonyoung Lee et al. [26] presented a secure and efficient authentication protocol
based on a three-factor authentication by taking advantage of biometrics and used a honey-
list technique to protect against brute force and stolen smartcard attacks. By using the
honey-list technique and three factors, the proposed protocol can provide security even if
two of the three factors werecompromised.
Q Shi et al. [27] proposed a new secure routing protocol for WSNs in the presence of
malicious nodes. For each relay node in the route, associated information, such as its trust
value and status, areconsidered in the protocol.
V Sivasankarareddy et al. [28] describes surveying extraordinary different optimiza-
tion techniques below the multi-objective facet that takes the region in tradeoffs. Informa-
tion extracting in sensing unit networks is the technique of obtaining software-enabled
plans in addition to patterns with gratifying accuracy from a constant, speedy, perspective
in addition to a probable non-ended flow of facts streams from sensor networks.
V Sivasankarareddy et al. [29] proposes that Vitality safety is the primary concern in
many of the implementations in remote sensor hubs.This is criticalas the improvement
in the life time of the device depends primarily on restricting the usage of vitality in
sensor hubs.
The review papers [16–29] are not up to the mark. The proposed method in this paper
addresses more about the security issues and solved energy consumption, latency and
packet delivery ratio problems.
Appl. Sci. 2021, 11, 10517 4 of 22

3. Background of Proposed Methodology


A Wireless Sensor Network (WSN) is an emerging communication technology that
impressed its footprint in almost every field of application. Recently, this sensor network
has been utilized in urban areas to monitor living environments. The inclusion of wireless
communication in these urban areas has transferred it to smart cities. The present research
focuses on the deployment of WSNs with better security and energy efficiency in smart
building applications. The crucial constraints faced in any type of sensor network are
security and efficient energy. Many scholars have designed an enormous routing protocol
to achieve efficient energy and security. The clustering method is the most commonly used
approach for framing routing protocols in WSNs. However, this traditional clustering
has limitations, such as complexity, time consumption, and difficulty in achieving an
improved packet delivery ratio. The proposed architecture is designed based on grid
clustering to attain energy-organized and trust-based routing for achieving enhanced data
transmission in WSNs for smart building applicationsto overcome these limitations. The
basic architecture of the proposed WSN framework for smart city applications is shown
in Figure 1. TheWSN framework designed specifically for smart building applications is
illustrated in the previous diagram. The proposed routing model was processed in two
phases. An energy-efficient routing protocol is designed in the first phase, and in the
second phase, a trust-based algorithm is included to enhance data security. The process
carried out in the first phase is explained as follows: The initial step considered in any
type of WSN is node deployment. Approximately eight sensor nodes that perform various
functions, including temperature and air monitoring, were deployed in each building. The
nodes deployed in each building were considered to be static. The primary purpose of each
deployed node is to transmit the sensed information to the base station and from the base
station to the server via the gateway for monitoring. Data transmission in the proposed
Appl. Sci. 2021, 11, x FOR PEER REVIEW 5 of 23
study was performed using a grid-based clustering approach.

Grid formation based Two fish


on communication encryption
range algorithm
Trust model for
secure transmission
Election of grid
organizer based on
sailfish optimizer
Sensor node
deployment in building
Fuzzy rule based
relay node selection

Energy efficient optimal routing


protocol design
server
Figure 1.
Figure 1.Magnetization
Magnetization as
as aa function
function of
of an
an applied
applied field.
field.

In
In this
this approach,
approach, the
the formation
formation of
of grids
grids with
with the
the help of the deployed nodes was
initially
initially achieved.
achieved. The
The grid
grid organizer
organizer is
is elected
elected using
using the
the sailfish optimizer in the second
step,
step, and
and the
the best
best relay
relay node
node is selected
selected using a fuzzy
fuzzy expert
expert system to design the optimal
routing protocol in the third step. In the second phase, a two-fish encryption algorithm is
introduced to enhance the security of the transmitted data. The stepwise process in-
volved in the proposed framework is briefly described in the following section.

4. Stepwise Process Enclosed in Proposed Research


Appl. Sci. 2021, 11, 10517 5 of 22

routing protocol in the third step. In the second phase, a two-fish encryption algorithm is
introduced to enhance the security of the transmitted data. The stepwise process involved
in the proposed framework is briefly described in the following section.

4. Stepwise Process Enclosed in Proposed Research


The proposed framework is designed mainly to improve sensor networks’ energy
efficiency and security in smart building applications. As explained previously, the perfor-
mance of WSNs is hampered mainly by energy depletion and various malicious attacks.
Therefore, the proposed framework is developed in two stages to improve the performance
of WSNs in residential buildings. In the first stage, an optimal routing protocol is designed
to overcome the issue of energy depletion, and in the second stage, a trust-based model
is introduced to overcome the security threat during data transmission. The two stages
enclosed in the proposed architecture are described in the next section. Initially, the design
of the network model is explained as follows.
Appl. Sci. 2021, 11, x FOR PEER REVIEW 6 of 23
4.1. System Model
Initially, for experimental purposes, a building located within 1000 × 1000 m2 is
considered. The and
The weights major sensorswere
energies considered within
100 g and 10 J,a smart building
respectively, arewere
and contact, electric
similar for
current monitoring, temperature, motion, air quality, water quality, humidity, and smoke
every deployed node.
sensors. The design of the network structure is illustrated in Figure 2. Based on this
 The nodes in one grid can communicate with the nodes in the neighboring grid in
network structure, some assumptions were made, which are explained as follows.
only a single hop.

Indication of symbols

Grid

Server

sink

Grid member

a
Figure 2. Design of network model.
Figure 2.Design of network model.
• Every sensor node is deployed randomly, and there is no significant pattern for
4.2. First
nodeStage: Design of Optimal Routing Protocol
deployment.
• The Theoptimal
deployed routing
nodes protocol is designed
were assumed usingand
to be static a grid-based clustering and fuzzy
not in motion.
expert
• system
The baseto address
station the limitations
is located of energy
within any one ofdepletion
the grids. in smart building WSNs. The
sequence
• of steps
A battery starting
powers eachfrom gridand
node, formation
once theuntil relay
battery node selection
is depleted, is described
the specified nodeinis
this section.
left over.
• The weights and energies were 100 g and 10 J, respectively, and were similar for every
4.2.1. Node Deployment
deployed node. in Building
• The Thefirst
nodes in one grid can communicate
and most significant withWSN
process in any the nodes in deployment.
is node the neighboring grid
Eight in
dif-
only a single hop.
ferent sensors were deployed in a building to sense various types of information. The
eight sensors deployed in a building include contact, electric current monitoring, tem-
perature, motion, air quality, water quality, humidity, and smoke sensors. Generally, the
node that is referred to as the source node initiates communication by broadcasting a
Route Request (RREQ) packet to every node [30]. This RREQ packet contains specific
details such as ID, source IP address, destination IP address, and location. The nodes
within the communication limit will receive this RREQ packet and reply with the Route
Reply (RREP) packet, which contains ID, location, and lifetime information. The ultimate
Appl. Sci. 2021, 11, 10517 6 of 22

4.2. First Stage: Design of Optimal Routing Protocol


The optimal routing protocol is designed using a grid-based clustering and fuzzy
expert system to address the limitations of energy depletion in smart building WSNs. The
sequence of steps starting from grid formation until relay node selection is described in
this section.

4.2.1. Node Deployment in Building


The first and most significant process in any WSN is node deployment. Eight different
sensors were deployed in a building to sense various types of information. The eight
sensors deployed in a building include contact, electric current monitoring, temperature,
motion, air quality, water quality, humidity, and smoke sensors. Generally, the node
that is referred to as the source node initiates communication by broadcasting a Route
Request (RREQ) packet to every node [30]. This RREQ packet contains specific details
such as ID, source IP address, destination IP address, and location. The nodes within the
communication limit will receive this RREQ packet and reply with the Route Reply (RREP)
packet, which contains ID, location, and lifetime information. The ultimate objective of
these deployed nodes is to transmit sensed information to the base station.

4.2.2. Formation of a Grid


The entire region considered for the experiment was partitioned into a square-shaped
grid of equal size. The size of a single grid is calculated based on the communication range
of the node. The mathematical formula used for calculating the size of a single grid is given
by Equation (1):
R
a= √ (1)
2
Equation (1), a denotes the size of the grid and R signifies the communication range
of the node. Each grid is indicated with a different grid identifier number, and this number
for each node is known using a GPS tracking system. In addition to the grid identifier
number, each node has a different identification number.

4.2.3. Election of Grid Organizer Based on Sailfish Optimization


Generally, in the case of a grid structure, every node is deployed randomly, and each
node has a unique identification number. The nodes within the specified grid are referred
to as grid associates. A grid organizer is selected to equalize the load in every grid. The
elected node functions as a grid organizer for a particular period. Once the period of
time for that particular node is terminated, the old grid organization selects the new grid
organizer based on the selection process criteria. The old grid organizer broadcasts the new
grid organizer to its grid associates. The two significant criteria considered for choosing
the grid organizer are distance and leftover energy.
The distance between a particular node and the sink is calculated based on the Eu-
clidean distance formula. The locations of the deployed nodes are tracked using a GPS
tracking system. The Euclidean distance formula used for calculating the distance between
a particular node and the sink is given in (2).
q
d= (A2 − A1 )2 + (B2 − B1 )2 (2)

In Equation (2), points (A1 , A2 ) are referred to as location coordinates for a specified
node, and point (B1 , B2 ) is termed as the location coordinate for the sink node or base
station. Another crucial criterion considered for the election of the grid organizer is the
excess energy in the node. The mathematical expression used for calculating the excess
energy in the battery of the sensor is given in Equations (3) and (4). Re is the Residual
energy. Te is the Totaled energy and Eu is the energy utilized

Re = Te − Eu (3)
Appl. Sci. 2021, 11, 10517 7 of 22

c (a, b) = c 1 + c 2 d(a, b) β (4)


Equation (4) represents the mathematical expression used to calculate the energy
utilized by the node during data transmission. C1 and C2 denote the constant value
that keeps changing based on the wireless network application, and β represents the
path loss constant. c(a, b) signifies the estimation of the energy utilized by the sensor
and d(a, b) represents the distance between the sensor nodes. These two criteria are
considered objective functions in the sailfish optimizer. The natural behavior of sailfish
and its optimization characteristics are discussed in the following section.
• Natural Behavior of Sailfish
The prey for these sailfish is smaller fish, such as sardines, attacking groups such
as grey wolves. Certain behaviors of sardines, such as acceleration and maneuverability,
are considered quite challenging for sailfish while hunting these sardines [31]. Attacking
sardines, sailfish attempt a slashing motion by injuring many sardines or else hits a single
sardine and makes it inactive. The injured sardines are detached from the driving school
and are easily captured by the sailfish. The sailfish keep their bodies stable by keeping
their pelvic and dorsal fins more erect. Additionally, they change color to communicate
with other sailfish. The behavior of both sailfish and sardines was modeled and used to
frame an optimization algorithm.
• Advantages of sailfish optimizer over other methods.
1. Determiningthe distance between sensor nodes is faster.
2. Grid organizer selection is easier.
3. By grid selection criteria and shortest path establishment, energy consumption is
less, thereby increasing the lifetime of the network.
The steps enclosed in the sailfish optimizer are described as follows.
• Steps Enclosed in Sailfish Optimization
The sequence of steps included in sailfish optimization starting from initialization
until hunting prey is given below.
• Step 1: Initialization
The sailfish were considered as candidate solutions, and the variable related to the
problem was considered the sailfish’s position in the search space. The mathematical
expression used to represent the sailfish population, and their position is given by (5).

SF = {sf1 , sf2 , sf3 , . . . sfn } (5)

Based on this initialized population, the fitness function of each sailfish is computed
using the following expression given in (6):

fitness funtion = f(sf1, sf2, sf3, . . . sfn ) (6)

Subsequently, the population of sardines, along with their fitness function, was eluci-
dated similarly.
• Step 2: Elitism
In this algorithm, the best solution of sailfish is saved in each iteration, and is referred
to as the elite. This elite sailfish is taken as the fittest sailfish and can defend the acceleration
and maneuverability of the sardine during capture. Furthermore, the position of the
injured sardines in every iteration is also saved to select it as the best goal for an attack.
The positions of the injured sardines and elite sailfish are denoted as Ziinjure S and Zielite SF
respectively.
• Step 3: Attack-alteration approach
Appl. Sci. 2021, 11, 10517 8 of 22

The sailfish can attack in every direction as a shrinking circle, and they keep updating
their position according to the position of the prey. The new position of the sailfish can be
represented as follows:

Zielite SF + Ziinjure S
Zinew SF = Zielite SF − δi (rand(0, 1) ( ) − Ziold SF ) (7)
2

Equation (7), Zielite SF represents the position of elite sailfish at the ith iteration, rand(0,1)
is the random number, Ziinjure S represents the position of the injured sardine at the ith
iteration, Ziold SF denotes the current position of the sailfish, and δi represents the coefficient,
which can be calculated as follows:

δi = 2 rand (0, 1) PD − PD (8)


PD is the density of the prey, which means the number of prey present at every
iteration, and the PD can be calculated as follows:

NSF
PD = 1 + ( ) (9)
NSF + NS
Appl. Sci. 2021, 11, x FOR PEER REVIEW 9 of 23
In Equation (9), NSF is the number of sailfish and NS represents the number of sardines
in each iteration.
• Step 4: Attacking Prey
Subsequently,
Subsequently,ininthis
thisstep,
step,the
thecurrent
currentposition
positionofofthe
thesardine
sardinegets
getsupdated.
updated.The
Thenew
new
position of the sardine can be obtained using
position of the sardine can be obtained using (10).(10).

i S  r ( ZeliteSF
ZZinew  ZioldS  AP)
i
= r (Zi − Zi + AP) (10)
(10)
new S elite SF old S

where i i the best position of elite sailfish, Ziold Sidenotes the current position of
Zelitedenotes
whereZeliteSF SF denotes the best position of elite sailfish, Zold S denotes the current position
sardine, r is ar israndom
of sardine, a random number
number in the
in the range
range 0 and
0 and 1, and
1, and APAP denotes
denotes thethe attack
attack powerofof
power
the sailfish. The updating process continues until convergence is achieved.
the sailfish. The updating process continues until convergence is achieved. A flow chart A flow chart
explaining the sequences of the sailfish optimization algorithm is shown
explaining the sequences of the sailfish optimization algorithm is shown in Figure 3. in Figure 3.

Start

Initialize sailfish and sardine in a


random manner

Update the position of


sailfish using equation(7)
Evaluate the fitness function

Update the position of


No sardine using equation (8)
Is max criteria
satisfied

Yes
Best position of sailfish
To determine elite sailfish and
injured sardine

End

Figure 3. 3.
Figure Flow chart
Flow ofof
chart sailfish optimization.
sailfish optimization.

 Sailfish Optimizer for Choosing Grid Organizers


The grid organizer among the grid members was selected using the sailfish optimi-
zation algorithm. As explained previously, the elected grid organizer is the head of the
Appl. Sci. 2021, 11, 10517 9 of 22

• Sailfish Optimizer for Choosing Grid Organizers


The grid organizer among the grid members was selected using the sailfish optimiza-
tion algorithm. As explained previously, the elected grid organizer is the head of the
grid cluster for a particular period. After a certain period, the election process of the grid
organizer commences once again. The steps followed in the sailfish optimization for the
election of the grid organizer are described below.
• Step 1: Initialization
The population considered for the analysis was initialized at this stage. Generally,
the variables related to the problem are termed population or candidate solutions. The
variables considered for our research problem are the residual energy of the sensors and
the distance between the nodes and sink. The mathematical expression used to represent
the population initialization is given by Equation (11).

D = {d1 , d2 , d3 . . . dn }
(11)
RS = {rs1 , rs2 , rs3 . . . rsn }

Equation (9), dn represents the population of the distance between nodes and rsn
represents the population of residual energy in nodes.
• Step 2: Fitness Function
Based on the initialized population, the fitness function can be represented as follows:
 
maximize(RS)
fitness = (12)
minimize(D)

According to this equation, the fitness function for this optimization problem is
to maximize the residual energy in the sensors and minimize the distance between the
sensor nodes.
• Step 3: Updating
The values of distance and residual energy related to nodes get updated in each
iteration to find the best solution within the search space.
• Step 4: Termination
The search process was terminated once the required criteria were satisfied. A grid
organizer is selected for each grid by performing the optimization protocol. The grid
members in each grid transmit the sensed data to the grid organizer. From the grid
organizer, the data must be forwarded to the sink. Therefore, a relay node is selected
to achieve optimal routing. A fuzzy expert system is used to select a relay node. The
relay-node selection process is briefly discussed in the next section.

4.2.4. Relay Node Election Based on Fuzzy Expert System


The process of relay node selection is carried out to forward the data from the grid
organizer to the sink. In this study, the work grid organizer is referred to as a relay node.
The grid organizer (source node) selects its neighbor grid organizer for data transmission.
This selection process was performed based on fuzzy rules. The procedure followed in the
relay node selection using the fuzzy rule is as follows:
The other membership function for the choice of grid organized and the residual
energy in joules have been obtained with the same triangular function, and the limitation
of each zone is described in Table 1.

Fuzzification
The initial process carried out in a fuzzy expert system is fuzzification. The trans-
formation of our system input to the fuzzy set is referred to as the fuzzification process.
Then, with the assistance of this crisp value, a membership function was drawn [32]. The
The
TheThe search
search
search process
process
process was
waswas terminated
terminated
terminated once
once
once the
thethe required
required
required criteria
criteria
criteria were
were
were satisfied.
satisfied.
satisfied. AAgrid
Agrid
grid
organizer
organizer
organizer is isis selected
selected
selected for
forfor each
eacheach grid
grid byby
grid by performing
performing
performing thethe
the optimization
optimization
optimization protocol.
protocol.
protocol. The
TheThe grid
grid
grid
members
members
members ininin each
eacheach grid
grid
grid transmit
transmit
transmit the
thethe sensed
sensed
sensed datatoto
data
data to
the the
the grid
grid
grid organizer.
organizer.
organizer. From
From
From the the
the grid
grid
grid or-
or- or-
ganizer,
ganizer,
ganizer, thethe
the data
data data must
must
must bebebe forwarded
forwarded
forwarded toto
to
thethe
the sink.
sink.
sink. Therefore,
Therefore,
Therefore, a arelay
a relay
relay node
nodenodeis isis selectedtoto
selected
selected to
achieve
achieve
achieve optimal
optimal
optimal routing.
routing.
routing. AAA fuzzy
fuzzy
fuzzy expert
expert
expert system
system
system is isis used
used toto
used to select
select
select a arelay
a relay
relay node.
node.
node. The
The re-re-
The re-
Appl. Sci. 2021, 11, 10517 10 of 22
lay-node
lay-node
lay-node selection
selection
selection process
process
process is is
isbriefly
briefly
briefly discussed
discussed
discussed inin
in
thethe
the next
nextnextsection.
section.
section.

4.2.4.
4.2.4.
4.2.4. Relay
Relay
Relay Node
Node
Node Election
Election
Election Basedonon
Based
Based onFuzzy
Fuzzy
Fuzzy Expert
Expert
Expert System
System
System
The
TheThe process
process
process
membership ofof
of relay
relay
relay
function node
node
can node selection
selection
beselection
drawn iscarried
iscarried
iniseither carried outout
outtoto
a triangular to forward
forward
forward thethe
the data
data
or trapezoidal data from
from
form.from the
Thethe
the grid
grid
grid
system
organizer
organizer
organizer
input for tototo
thethe
thisthe sink.
sink.
study InIn
sink. In this
this
was this study,
study,
study,
the thethe
residualthe
workwork
work
energy, grid
gridgrid organizer
organizer
organizer
distance, is is
and referred
isdegree
referred
referred ofto
to to
asas
theas aarelay
a grid
relayrelay node.
node.
node.
organizer.
The
TheThe grid
Thesegrid
grid organizer
organizer
three
organizer (source
(source
input(source
parameters node)
node)
node) are selects
selects itsits
converted
selects its neighbor
neighbor
into a fuzzy
neighbor grid
grid
grid organizer
setorganizer
between
organizer for
for0for data
anddata
data transmis-
transmis-
1transmis-
and framed
into
sion.
sion.
sion. a triangular
This
This
This selection
selection
selection membership
process
process
process waswas
was function.based
performed
performed
performed The
based
based triangular
onon
on fuzzy
fuzzy
fuzzy membership
rules.
rules.
rules. The
TheThe function
procedure
procedure
procedure is drawn
followed
followed
followed
ininfor
inthe
thethethese
relay
relay
relay three
node
nodenode parameters
selection
selection
selection based
using
using
using thethe
theon
fuzzytherule
fuzzy
fuzzy crisp
ruleis is
rule value
is
asas
as shown in Figure 4 The membership
follows:
follows:
follows:
function
The
TheThe graphed
other
other
other for the input
membership
membership
membership variable
function
function
function forforusing
for
the the
the linguistic
choice
choice
choice ofofof values
grid
gridgrid is illustrated
organized
organized
organized andand
and inthe
the the
the previous
residual
residual
residual
figure.
energy
energy
energy inin
inIn thehave
joules
joules
joules case
have
haveofbeen
distance,
been
been obtainedit is
obtained
obtained withdrawn
with
withthethe
theinsame
same meters.
same The distance
triangular
triangular
triangular function,value
function,
function, and
and and(0–600)
thethe
the was low,
limitation
limitation
limitation
ofof(300–900)
ofeach
each
each zone
zonezone medium,
is is
isdescribedand
described
described (600–1000)
ininin Table
Table
Table 1.1.1. high.

Table
Table
Table
Table Membership
1.1.Membership
1. 1. Membership
Membership function
function
function
function for
forfor
for residual
residual
residual
residual energy
energy
energy
energy and and
and
and grid
grid
grid
grid organized
organized
organized
organized choice.
choice.
choice.
choice.

Membership
Membership
Membership
Membershipfunction
function
function
Function Low
Low
LowLow Medium
Medium
Medium
Medium High
High
High
High

Residual
Residual
Residual
Appl. Sci. 2021, 11, x FOR PEER REVIEW Energy
Energy
Residual inin
Energy inJoules
Joules
Joules
Energy in Joules 0, 0,
3,
0, 3,
63,666
0,3, 3,
3,3,3,6,6,
6, 96,999 6, 6,
6,9,
6,
9, 9,10
9,
10 10
10 11 of 23
Choice
ofof
Choice
Choice ofGrid
Grid
Grid organized
organized
organized 0, 0,
0,3,
3, 63,66 3, 3,
3,6,
6, 96,99 6, 6,
6,9,
9, 9,10
10 10
Choice of Grid organized 0, 3, 6 3, 6, 9 6, 9, 10

Fuzzification
Fuzzification
Fuzzification
TheThe
The initial
initial
initial process
process
process carried
carried
carried out
outoutinin a afuzzy
in afuzzy
fuzzy expert
expert
expert system
system
system is isis fuzzification.
fuzzification.
fuzzification. The
TheThe trans-
trans-
trans-
formation
formation
formation ofofof
ourour
our system
system
system input
input
input toto
to
thethe
the fuzzy
fuzzyfuzzy setset
setis isreferred
isreferred
referredtotoasas
to as
the the
the fuzzification
fuzzification
fuzzification process.
process.
process.
Then,
Then,
Then, with
withwiththethe
the assistance
assistance
assistance ofofofthis
this
this crisp
crisp
crisp value,
value,value,a amembership
amembership
membership function
function
function was
waswas drawn
drawn
drawn [32].
[32].
[32]. TheThe
The
membership
membership
membership function
function
function
low can
can bebe
can be drawn
drawn
drawn inin in medium
either
either
either aatriangular
triangular
a triangular ororor trapezoidal
trapezoidal
trapezoidal form.
form.
form.High The
TheThe system
system
system
input
input
input1 for for
for this
this
this study
study
study was
waswas the
thethe residual
residual
residual energy,
energy,
energy, distance,
distance,
distance, and
andand degree
degree
degree of of
of
thethe
the grid
gridgrid organizer.
organizer.
organizer.
These
These
These three
three
three input
input
input parameters
parameters
parameters areare
are converted
converted
converted into
into a afuzzy
into afuzzy
fuzzysetset
set between
between
between 0 0and
0and
and1 1and
1and
and framed
framed
framed
into
into
into aatriangular
triangular
a triangular membership
membership
membership function.
function.
function. TheThe
The triangular
triangular
triangular membership
membership
membership function
function
function is is
isdrawn
drawn
drawn for
forfor
these
these
these three
threethree parameters
parameters
parameters based
based
based onon
onthethe
the crisp
crisp
crisp value
valuevalue shown
shown
shown ininin Figure
Figure
Figure 4 4The
4 The
The membership
membership
membership
function
function
function graphed
graphed
graphed for
forfor the
thethe input
input
input variable
variable
variable using
using
using linguistic
linguistic
linguistic values
values
values is isillustrated
isillustrated
illustrated inin
in the
thethe pre-
pre-pre-
vious
vious
vious figure.
figure.
figure. InInInthe
thethe case
case ofof
case of distance,
distance,
distance, it itis
itis
isdrawn
drawn
drawn inin in meters.
meters.
meters. TheThe
The distance
distance
distance value
value
value (0–600)
(0–600)
(0–600) waswas
was
low,
low,
low, (300–900)
(300–900)
(300–900) medium,
medium,
medium, andand
and (600–1000)
(600–1000)
(600–1000) high.
high.
high.
0 300 600 1000
900
Distance in metre
Figure
Figure 4.
4. Membership function
Membership function drawn
drawn for for distance
distance choice.
choice.

Similarly, ininthethe
Similarly, case of residual
case energy,
of residual it is sketched
energy, in joules. in
it is sketched Thejoules.
valuesThe
of residual
values of re-
energy are between (0–6) low, (3–9) medium, and (6–10) high. In the case of a grid
sidual energy are between (0–6) low, (3–9) medium, and (6–10) high. In the case of a grid organizer
degree (0–6) low, (30–9) medium and high (6–10). Fuzzy rules are generated using these
organizer degree (0–6) low, (30–9) medium and high (6–10). Fuzzy rules are generated
linguistic variables in the next section.
using these linguistic variables in the next section.
Knowledge Base
Knowledge Base fuzzy rules are generated using the membership function drawn from
In this phase,
the previous phase. The
In this phase, fuzzy ability
rulesto are
obtain a resolution
generated for the
using a problem from a set
membership of statistics
function drawnis from
essential for an expert approach. Initially, the collected data are converted into
the previous phase. The ability to obtain a resolution for a problem from a set of statistics a conditional
isstatement,
essentialwhich
for ansignifies
expert evidence.
approach.With the assistance
Initially, of this evidence,
the collected reasoning rules
data are converted into a con-
were generated. Two types of facts are included in the generated rule. Of these, one premise
ditional statement, which signifies evidence. With the assistance of this evidence, rea-
and the other are related consequences. Furthermore, in the event explaining uncertainty,
soning rules were generated. Two types of facts are included in the generated rule. Of
the confidence factor is enclosed in each rule. The relay node choice by input metrics:
these, one
residual premise
energy, and the
distance, andother are related
grid organizer are consequences.
listed in Table 2.Furthermore, in the event ex-
plaining uncertainty, the confidence factor
The membership function of the output variable is enclosed in each
is shown rule.5.The
in Figure The relay node choice
generation
byof input
fuzzy metrics: residual
rules based on inputenergy, distance,
variables and grid
is displayed in organizer
tabular formatare listed
in the in Table 2.
previous
section. From the above table, it is found that if the residual energy for the grid organizer is
high and
Table the distance
2. Fuzzy is selection
rules for low, then ofthegrid
specified grid as
organizer organizer is elected as the relay node. If
relay node.
the residual energy and distance are medium, then the degree of the grid organizer is also
considered in that situation. If the degree of the grid Degree of Grid
organizer is low, then that particular
Residual Energy Distance Relay Node Choice
grid organizer is elected as a relay node or not taken as Organizer
a relay node. If the residual energy
High Low Low Very high
High Low Medium Very high
High low High Very high
High Medium Low high
Appl. Sci. 2021, 11, 10517 11 of 22

is low and the distance is high, the specified grid organizer is not elected as a relay in the
third situation.

Table 2. Fuzzy rules for selection of grid organizer as relay node.

Degree of Grid
Residual Energy Distance Relay Node Choice
Organizer
Appl. Sci. 2021, 11, x FOR PEER REVIEW High Low Low Very high 12 of 23
High Low Medium Very high
High low High Very high
High Medium Low high
High Medium Medium high
Low Low Medium Low
High Medium High high
LowHigh Low
High High
Low high low
LowHigh High
Medium Medium
Low highLow
High high High high
Low
Medium
Medium
Low
Medium
Low Medium
Low
Low
Medium medium
Low High
Medium Medium Low
Medium
Low Low
High High
Low Medium
Very low
Medium Medium Low Medium
Low
Medium
High
Medium
Medium
Medium
Very low
Medium
Low
Medium high
Medium High
High Very low
Medium
Medium High Low Medium
Medium High Medium Medium
The Medium
membership functionHighof the output variable
High
is shown in Figure
Medium
5. The genera-
tion of fuzzy
Lowrules based on input
Low variables is displayed
Low in tabular format
Low the previous
in
section. From
Lowthe above table, itLow
is found that if the residual energy for the
Medium Lowgrid organizer
is high andLowthe distance is low,Low
then the specified High
grid organizer is elected
low as the relay
Low Medium Low Low
node. If the residual energy and distance are medium, then the degree of the grid or-
Low Medium Medium Low
ganizer is also
Low
considered in that situation. If the degree
medium High
of the grid organizer
Low
is low, then
that particular
Low grid organizer isHigh
elected as a relay node
Low or not taken asVery
a relay
low node. If the
residual energy
Low is low and the High
distance is high, the specified grid organizer
Medium is not elected
Very low
Low
as a relay in the third situation.high High Very low

Very low low medium Very High


High
1

0 0.5 0.75 1
0.25
Selection of relay node
Figure 5. 5.
Figure Membership
Membershipfunction createdfor
function created forselection
selectionof of relay
relay node.
node.

Defuzzification
Defuzzification
Generally,
Generally,defuzzification is the
defuzzification is theinverse
inverseprocess
process of of a fuzzy
a fuzzy set, set,
and and it refers
it refers to theto the
process of converting fuzzy output into crisp results.It can also be defined as the conversion
process of converting fuzzy output into crisp results.It can also be defined as the conver-
sion of qualitative data into a quantitative one. The output gathered from the fuzzy set
was represented as 0 and 1. The value 0 denotes that the grid organizer is not selected as a
relay node, and a value of 1 signifies that the grid organizer is selected as the relay node.
Finally, based on this fuzzy expert system, the grid organizers that act as relay nodes
Appl. Sci. 2021, 11, 10517 12 of 22

of qualitative data into a quantitative one. The output gathered from the fuzzy set was
represented as 0 and 1. The value 0 denotes that the grid organizer is not selected as a relay
node, and a value of 1 signifies that the grid organizer is selected as the relay node.
Finally, based on this fuzzy expert system, the grid organizers that act as relay nodes
for data transmission are selected. The data are transmitted from the grid organizer to the
sink using a relay node selection process. Based on the present research, the optimal routing
protocol is framed for data transmission in smart building WSNs. From the sink, the data
are aggregated and forwarded to the server to monitor and render alterations in case of any
emergency. Before data transmission from the sink, the data are encrypted using a two-fish
encryption algorithm to secure data from various malicious attacks. The encryption process
found in the two-fish encryption algorithm is discussed in the next section.

4.3. Second Stage: Trust-Based Model for Secure Data Transmission


In this stage, to protect the data from various security threats, a trust-based model
is used. The transmitted data are encrypted using an encryption algorithm and then
decrypted at the receiver end using this trust model. The algorithm used to encrypt the
data in the proposed method is two-fish encryption. The outline of the two-fish algorithm
is as follows:

Two-Fish Algorithm
The two-fish algorithm is a cipher algorithm with a block size of 128bits and can admit
a variable length of key [33]. This cipher algorithm is composed of a bijective F function and
is a sixteen-round network. The F-function performed three functions: pseudo-Hadamard
transform (PHT), distance separable matrices (MDS), and key-dependent S-boxes. These
three F-functions are briefly discussed in the following steps.
• Initially, the input data consisting of 128 bits are segmented into four parts, each
containing 32 bits, based on the little-endian convention.
• Out of the four parts, two parts of the bits are correct, and the rest of the bit is left.
• Then, these four input parts are XOR with four keys, and this process is referred to as
whitening. The expression for describing whitening is given by Equation (13).

C0 = P ⊕ Ki , where Ki = 0, 1, 2, 3 . . . (13)
• In Equation (13), C0 represents the converted bit, P signifies the input bit, and Ki is
used for encryption.
• The resultant bit obtained by performing the XOR operation is rotated either left or
right by one bit, and again, it is swapped to produce a new result. This rotation in the
initial argument is based on the second argument. This process is repeated 16 times;
therefore, it is termed a two-fish round.
• S-box: This S-box is a substitution operation that is based on a table. Normally, four
types of S-boxes are used in the two-fish algorithm. These four S-boxes are merged
with the MDS to generate the h-function. Using this S-box, the input and output sizes
can be randomly altered. Rather, the S-box contains an 8-bit permutation with an XOR
with two sub-keys.
• MDS matrix: The MDS matrix is termed as a building block to the cipher because it
guarantees a certain degree of diffusion. This MDS matrix is coupled with an S-box
and acts as the main diffusion mechanism. If one of the input elements is changed,
then every output element must be altered.
• Pseudo-Hadamard Transform (PHT): This PHT is a mixing operation that is necessary
for software. This is a simple reverse diffusion mechanism. The expression used to
represent this transform is given by Equation (14).

A0 = A + B (14)
Appl. Sci. 2021, 11, 10517 13 of 22

• Finally, after performing this transform, the final encrypted data, which is referred
to as ciphertext, will be obtained. Based on this two-fish algorithm, the aggregated
data in the sink are encrypted. The encrypted data are sent to the server via a gateway
for monitoring.
Based on this proposed architecture, energy-efficient and secure data transmission in
smart building applications can be achieved. An experimental investigation is carried out
using MATLAB software to evaluate the functionality of the proposed framework, and the
results gathered through implementation are briefly discussed in the following section.

5. Results and Discussion


The proposed grid-based routing model for smart building applications was tested
using MATLAB software with the following system configurations:
• Processor: Intel (R) Core ™ i5-3330s CPU @ 2.70 GHz
• Memory (RAM): 8.00 Gb (7.88 Gb usable)
• System type: 64-bit operating system, x64 based processor
The experimental analysis was carried out with the help of sensor nodes deployed
within 1000 × 1000 m2 dimensions, and the total energy of the deployed node was fixed at
10 J. In addition, some of the simulation setups considered for analysis is listed in Table 3.

Table 3. Simulation parameters considered for analysis.

Simulation Parameter Values


Type of channel Wireless
Simulator MATLAB R2020b
MAC type 802.11
Number of sensor nodes 300
Simulation time 50 s
X&Y dimension 1000 m&1000 m
Packet size 100 bytes
Packet rate 100 packets/s
Energy 10 joule

Initially, the nodes are deployed in the specified region of the building to sense various
types of information. Approximately 20 sensor nodes were deployed in each building. The
location coordinate for the sink is (4, 4), and the location coordinate for the server is (4, 1).
These deployed nodes are then formed into grids based on the intercommunication range.
The formation of the grid using the intercommunication range is shown in Figure 6. The
nodes that are present within the grid are referred to as grid members.
From each grid, one node was selected as the grid organizer. The elected grid organizer
functions as the head for a specified period of time. Using the sailfish optimization
algorithm, the grid organizer is selected based on two significant parameters: distance and
residual energy. The election of the grid organizer is represented in a pictorial format in
Figure 7. The selection of the grid organizer in each grid is displayed in the previous figure.
In each grid, the node highlighted in green is referred to as the grid organizer. The sensed
information from every grid member is transmitted to the grid organizer. Then, from the
grid organizer, the data must be transmitted to the sink.
The source grid organizer selects its neighbor grid organizer based on the relay-node
selection technique to perform this function. In this study, the grid organizer is referred
to as a relay node. The relay node is selected using a fuzzy expert system. The input for
creating the fuzzy rule is the grid organizer’s distance, residual energy, and choice. Based
on this parameter, the relay node is selected to transmit data from the grid organizer to
the sink. The grid organizer selected as the relay node is displayed in pictorial format in
Figure 8.
Appl. Sci. 2021, 11, 10517
Breadth in meters 14 of 22
Breadth in meters

Length in meters

Length in meters
Figure 6. Formation of Grid Using the Deployed Nodes.
Figure 6. Formation of grid using the deployed nodes.
Figure 6. Formation of Grid Using the Deployed Nodes.
Breadth in meters
Breadth in meters

Length in meters
Figure 7. Election of grid organizer in each grid.
Length
Figure 7. Election of Grid Organizer in Each Grid.in meters

Figure 7. Election of Grid Organizer in Each Grid.


Appl. Sci.
Appl. Sci. 2021,
2021, 11,
11, 10517
x FOR PEER REVIEW 16 of
15 of 22
23

Figure 8. Selection
Figure 8. Selection of
of grid
grid organizer
organizer as
as aa relay
relay node.
node.

In the above figure, the grid organizers selected as relay nodes are illustrated. The
In the above figure, the grid organizers selected as relay nodes are illustrated. The
grid organizers selected as relay nodes are highlighted in red. Using these relay nodes,
grid organizers selected as relay nodes are highlighted in red. Using these relay nodes,
the grid organizer transmits the acquired data to the sink using the shortest path. Then,
the grid organizer transmits the acquired data to the sink using the shortest path. Then,
from the sink, the data are transmitted to the server for further monitoring. Prior to the
from the sink, the data are transmitted to the server for further monitoring. Prior to the
transmission of data to the server, the data were encrypted using a two-fish algorithm.
transmission of data to the server, the data were encrypted using a two-fish algorithm.
The encrypted data were then transmitted to the server. At the server end, the encrypted
The encrypted data were then transmitted to the server. At the server end, the encrypted
data are decrypted again for visualization. Finally, based on this routing protocol, smart
data are decrypted
building applicationsagain for visualization.
can attain Finally,
energy-efficient based data
and secure on this routing protocol,
transmission. smart
Performance
building applications can attain energy-efficient and secure data transmission.
metrics were evaluated to perform an experimental study of the proposed framework. The Perfor-
mance metrics
evaluation were performance
of various evaluated to metrics
perform an experimental
related studyisof
to the experiment the proposed
described in the
framework.
next section.The evaluation of various performance metrics related to the experiment is
described in the next section.
Experimental Investigation
Experimental Investigation
An experimental study on the proposed energy-efficient and secure routing protocol
An experimental
was carried out usingstudy on parameters.
specific the proposedThe energy-efficient and secure routing
parameters considered protocol
for analysis are
was
averagecarried out energy,
residual using specific parameters.
packet loss, The packet
throughput, parameters considered
delivery for analysis
ratio, end–end are
delay, the
average
amount of residual
packetenergy, packet
received, loss, throughput,
decryption packet delivery
time, and encryption ratio, end–end
time. These parameters delay,
are
the amount
evaluated forofthe
packet received,
proposed decryption
framework time, and encryption
and conventional approachestime.
to These parameters
prove the optimal
are evaluated
functioning of for
the the proposed
proposed framework
routing approach and conventionalwith
in comparison approaches to prove
conventional the
routing
optimal
techniques.functioning of the proposed
The conventional routingrouting approach
approaches in comparison
considered with conventional
for comparison studies are
the energy-efficient
routing techniques. region source routing
The conventional protocol
routing (ER-SRP)considered
approaches [13], energy-efficient load-
for comparison
balancing
studies areant-based routing algorithm
the energy-efficient region(EBAR)
source[14], improved
routing LEACH
protocol protocol
(ER-SRP) [16],ener-
[13], and
energy-efficient
gy-efficient grid-based ant-based
load-balancing routing approach (EEGRA) [30].
routing algorithm (EBAR)Table 4 lists
[14], the estimated
improved LEACH
metric values
protocol [16], for
andthe proposed andgrid-based
energy-efficient conventional routing
routing approaches.
approach (EEGRA) A comparison
[30]. Tableof4
the average
lists residualmetric
the estimated energy metricfor
values between the proposed
the proposed and existingrouting
and conventional routingapproaches.
protocols is
shown
A in Figure
comparison of 9.
theThe graphresidual
average shows aenergy
comparison
metricbetween
betweenseveral techniques
the proposed and the
and existing
average protocols
routing value of the residual
is shown in energy
Figure 9.as The
a percentage.
graph shows Thea average
comparisonresidual energy
between was
several
found to be more significant for the proposed method.
techniques and the average value of the residual energy as a percentage. The average re-
sidual energy was found to be more significant for the proposed method.
Appl. Sci. 2021, 11, x FOR PEER REVIEW 17 of 23
Appl. Sci. 2021, 11, 10517 16 of 22

Table 4.Metrics evaluated for the proposed and existing routing protocol.
Table 4. Metrics evaluated for the proposed and existing routing protocol.
Performance Metric EEGRA I-LEACH EBAR ER-SRP Proposed
Performance Metric
Average residual energy (%) EEGRA 0.75 I-LEACH 0.79 EBAR 0.85 ER-SRP 0.92 Proposed
0.96
Average of
Amount residual
packetenergy (%) (× 104 ) 0.75
received 2.48 0.79 2.53 0.85 2.55 0.92 2.58 0.96 2.63
Amount of packet received ×104 ) 2.48
Packet loss (%) 0.24 2.53 0.21 2.55 0.15 2.58
0.13 2.63
0.1
Packet loss (%) 0.24 0.21 0.15 0.13 0.1
Throughput (mbps) 1.14 1.43 1.45 1.46 1.49
Throughput (mbps) 1.14 1.43 1.45 1.46 1.49
Packet delivery ratio (%) 0.75 0.79 0.84 0.88 0.9
Packet delivery ratio (%) 0.75 0.79 0.84 0.88 0.9
Encryption time (ms) 22 22 21 19 18
Encryption time (ms) 22 22 21 19 18
Decryption time (ms) 0.49 0.48 0.47 0.44 0.4
Decryption time (ms) 0.49 0.48 0.47 0.44 0.4
End-end delay (ms) 317 315 312.2 309.6 309.3
End-end delay (ms) 317 315 312.2 309.6 309.3

Figure
Figure 9.
9. Comparison ofaverage
Comparison of averageresidual
residualenergy.
energy.

The average
averageresidual
residualenergy for for
energy the the
proposed method
proposed is 21.87%,
method 18.75%,18.75%,
is 21.87%, 11.45%, and
11.45%,
and 4.16% higher than those of EEGRA, I-LEACH, EBAR, and ER-SRP, Figure
4.16% higher than those of EEGRA, I-LEACH, EBAR, and ER-SRP, respectively. 10
respectively.
shows a comparison study performed using the end–end delay parameter
Figure 10 shows a comparison study performed using the end–end delay parameter for for the existing
andexisting
the conventional
and routing protocols.
conventional In thisprotocols.
routing graph, theIn
graph
this isgraph,
plottedthe
between
graphthe is number
plotted be-
of sensor nodes and end–end delay in milliseconds on the X- and Y-labels. The end-to-end
tween the number of sensor nodes and end–end delay in milliseconds on the X- and
delay value obtained in the proposed method is 2.42% less than EEGRA, 1.80% less than
Y-labels. The end-to-end delay value obtained in the proposed method is 2.42% less than
I-LEACH, and 0.864% less than EBAR. A comparison study performed using these two
EEGRA, 1.80% less than I-LEACH, and 0.864% less than EBAR. A comparison study
parameters revealed better functioning of the proposed routing framework in comparison
performed using approaches.
to existing routing these two parameters revealed better functioning of the proposed
routing framework
Figure 11 showsin comparisonstudy
a comparison to existing routing
conducted approaches.
using the packet delivery ratio metric.
The graph for this metric is plotted between various techniques and packet delivery ratio
(PDR) in percentage on both axes. The value of PDR for the proposed routing technique is
16.66% more than EEGRA, 12.22% greater than I-LEACH, 6.66% greater than EBAR, and
2.22% greater than ER-SRP. A comparison study conducted using the throughput parameter
is shown in Figure 12. The graph shows the number of iterations and throughput values
in the X- and Y-axes, respectively. The throughput of the proposed method was 23.48%,
4.02%, 2.68%, and 2.01% higher than those of EEGRA, I-LEACH, EBAR, and ER-SRP,
respectively. These two comparison studies demonstrate the effectiveness of the proposed
routing approach in comparison with existing routing techniques.
Appl. Sci. 2021, 11, 10517 17 of 22
Appl. Sci. 2021, 11, x FOR PEER REVIEW 18 of 23

Figure 10. Comparison of end–end delay.

Figure 11 shows a comparison study conducted using the packet delivery ratio
metric. The graph for this metric is plotted between various techniques and packet de-
livery ratio (PDR) in percentage on both axes. The value of PDR for the proposed routing
technique is 16.66% more than EEGRA, 12.22% greater than I-LEACH, 6.66% greater than
EBAR, and 2.22% greater than ER-SRP. A comparison study conducted using the
throughput parameter is shown in Figure 12. The graph shows the number of iterations
and throughput values in the X- and Y-axes, respectively. The throughput of the pro-
posed method was 23.48%, 4.02%, 2.68%, and 2.01% higher than those of EEGRA,
I-LEACH, EBAR, and ER-SRP, respectively. These two comparison studies demonstrate
the effectiveness of the proposed routing approach in comparison with existing routing
techniques.
Figure 10. Comparison
Figure 10. Comparisonofofend–end
end–enddelay.
delay.

Figure 11 shows a comparison study conducted using the packet delivery ratio
metric. The graph for this metric is plotted between various techniques and packet de-
livery ratio (PDR) in percentage on both axes. The value of PDR for the proposed routing
technique is 16.66% more than EEGRA, 12.22% greater than I-LEACH, 6.66% greater than
EBAR, and 2.22% greater than ER-SRP. A comparison study conducted using the
throughput parameter is shown in Figure 12. The graph shows the number of iterations
and throughput values in the X- and Y-axes, respectively. The throughput of the pro-
posed method was 23.48%, 4.02%, 2.68%, and 2.01% higher than those of EEGRA,
I-LEACH, EBAR, and ER-SRP, respectively. These two comparison studies demonstrate
the effectiveness of the proposed routing approach in comparison with existing routing
techniques.

Appl. Sci. 2021, 11, x FOR PEER REVIEW 19 of 23

FigureFigure 11. Comparison


11. Comparison of packet
of packet delivery
delivery ratio.
ratio.

Figure 11. Comparison of packet delivery ratio.

Figure
Figure12.
12. Comparison
Comparisonof
ofthroughput.
throughput.

The comparison analysis performed based on packet loss for the proposed and ex-
isting routing protocols is shown in Figure 13. The graph is sketched between various
techniques and packet loss in percentage on both the X- and Y-axes. The packet loss for
the proposed routing approach is 58.3% less than EEGRA, 45.83% less than I-LEACH,
Appl. Sci. 2021, 11, 10517 18 of 22

The comparison analysis performed based on packet loss for the proposed and existing
routing protocols is shown in Figure 13. The graph is sketched between various techniques
and packet loss in percentage on both the X- and Y-axes. The packet loss for the proposed
routing approach is 58.3% less than EEGRA, 45.83% less than I-LEACH, 33.3% less than
EBAR, and 23.02% less than ER-SRP. Figure 14 illustrates the comparison study carried
out using the number of received packets in the existing and proposed routing protocols.
The number of received packets for the proposed method is 5.70% greater than EEGRA,
3.80% greater than I-LEACH, 3.04% greater than EBAR, and 1.90% greater than ER-SRP.
Based on this comparison study, it is proved that the performance of the proposed method
is better than that of the existing routing methods. The comparison study carried out based
on encryption and decryption times for the proposed and existing routing approaches
is displayed in Figures 15 and 16. The encryption time for the proposed approach is
18 ms, and for the existing techniques such as EEGRA, I-LEACH, EBAR, ER-SRP, the
encryption time is determined to be 22 ms, 22 ms, 21 ms, and 19 ms, respectively. Similarly,
the decryption time for the proposed methodology is 0.4 ms and for the technique such
as EEGRA, I-LEACH, EBAR, ER-SRP the decryption time is determined to be0.49 ms,
0.48 ms, 0.47 ms, and 0.44 ms respectively. Finally, based on this comparison study, it
is revealed that the performance of the proposed architectural framework is superior to
Appl. Sci. 2021, 11, x FOR PEER REVIEW that of the conventional approach. By utilizing the optimal routing design and encryption
20 of 23
algorithm, less energy utilization and improved security can be achieved in a better way.
The analysis also revealed that a grid-based routing design is more suitable for smart
building applications.

FigureFigure 13. Comparison


13. Comparison of packet
of packet loss.loss.
Appl. Sci. 2021, 11, 10517 19 of 22
Figure 13. Comparison of packet loss.

ppl. Sci. 2021, 11, x FOR PEER REVIEW 21 of 23

Figure 14. Comparison on the amount of packet received.


Figure 14. Comparison on the amount of packet received.

FigureFigure
15. Comparison on on
15. Comparison thethe
encryption
encryption time.
time.
Appl. Sci. 2021, 11, 10517 20 of 22
Figure 15. Comparison on the encryption time.

Figure 16. Comparison


Figure on theon
16. Comparison decryption time.time.
the decryption

6. Conclusions
6. Conclusions
This study focuses on designing an optimal routing protocol for smart building WSNs
This study focuses
to minimize on designing
energy utilization an optimal
and improve routing Recently,
data security. protocoldue fortosmart building
the widespread
WSNs of toinnovations
minimize energy utilization and improve data security. Recently,
in information technology, urban areas have been modernized by includ- due to the
widespread of innovations
ing wireless in information
sensor technology technology,
to achieve automaticurban areas have
monitoring. been modern-
The significant issue
ized byaddressed
including wireless sensor technology to achieve automatic monitoring.
in the WSNs over the past years is energy depletion and security threats. These The sig-
nificanttwo parameters
issue addressed influence
in the network
WSNs overperformance. To improve
the past years the performance
is energy depletion and of WSNs,
securityan
threats.ideal network
These model was designed
two parameters influenceinnetwork
this studyperformance.
using a grid-based clustering
To improve theapproach.
perfor-
mance The electionan
of WSNs, of ideal
the grid organizer
network was considered
model was designed significant,
in this and it was
study usingperformed using
a grid-based
the sailfish optimization algorithm. The sensed information from the
clustering approach. The election of the grid organizer was considered significant, and grid members is trans-
it
mitted to the grid organizer. Further, relay node selection is performed based on fuzzy rules
was performed using the sailfish optimization algorithm. The sensed information from
to transmit the data from the grid organizer to the sink with minimal energy consumption.
the grid members is transmitted to the grid organizer. Further, relay node selection is
Then, to secure the transmitted data from attacks, a two-fish algorithm was introduced. An
performed based oninvestigation
experimental fuzzy rules was to transmit
conducted thetodata fromthe
estimate theperformance
grid organizer toproposed
of the the sink
with minimal energy consumption. Then, to secure the transmitted data
scheme. The performance metrics were calculated and compared with traditional routing from attacks, a
approaches to demonstrate the excellent performance of the proposed framework.

Author Contributions: This paper was a result of a contribution from this list of authors as follows:
Conceptualization, V.S. and G.S.; methodology, V.S. and G.S.; software, V.S.; validation, G.S., V.S. and
C.R.R.; formal analysis, V.S.; investigation, V.S., F.A., C.R.R. and E.C.B.; resources, V.S.; data curation,
V.S.; writing—original draft preparation, all authors.; writing—review and editing, all authors.;
visualization, all authors.; supervision, G.S.; project administration, G.S.; funding acquisition, E.C.B.
All authors have read and agreed to the published version of the manuscript.
Funding: This research received no external funding.
Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.
Data Availability Statement: No data available.
Conflicts of Interest: Authors declare no conflict of interest.
Appl. Sci. 2021, 11, 10517 21 of 22

References
1. Yarinezhad, R. Reducing delay and prolonging the lifetime of wireless sensor network using efficient routing protocol based on
mobile sink and virtual infrastructure. Ad Hoc Netw. 2019, 84, 42–55. [CrossRef]
2. Wang, J.; Cao, J.; Sherratt, R.S.; Park, J.H. An improved ant colony optimization-based approach with mobile sink for wireless
sensor networks. J. Supercomput. 2018, 74, 6633–6645. [CrossRef]
3. Rajaram, V.; Kumaratharan, N. Multi-hop optimized routing algorithm and load balanced fuzzy clustering in wireless sensor
networks. J. Ambient. Intell. Humaniz. Comput. 2021, 12, 4281–4289. [CrossRef]
4. Vaiyapuri, T.; Parvathy, V.S.; Manikandan, V.; Krishnaraj, N.; Gupta, D.; Shankar, K. A Novel Hybrid Optimization for Cluster-
Based Routing Protocol in Information-Centric Wireless Sensor Networks for IoT Based Mobile Edge Computing. Wirel. Pers.
Commun. 2021, 1–24.
5. Kaur, N.; Singh, S. Optimized cost effective and energy efficient routing protocol for wireless body area networks. Ad Hoc Netw.
2017, 61, 65–84. [CrossRef]
6. Khan, A.R.; Mohammadani, K.H.; Soomro, A.A.; Hussain, J.; Khan, S.; Arain, T.H.; Zafar, H. An energy efficient routing protocol
for wireless body area sensor networks. Wirel. Pers. Commun. 2018, 99, 1443–1454. [CrossRef]
7. Xu, C.; Xiong, Z.; Zhao, G.; Yu, S. An energy-efficient region source routing protocol for lifetime maximization in WSN. IEEE
Access 2019, 7, 135277–135289. [CrossRef]
8. Zhang, D.-g.; Zhang, T.; Dong, Y.; Liu, X.; Cui, Y.; Zhao, D. Novel optimized link state routing protocol based on quantum genetic
strategy for mobile learning. J. Netw. Comput. Appl. 2018, 122, 37–49. [CrossRef]
9. Li, X.; Keegan, B.; Mtenzi, F.; Weise, T.; Tan, M. Energy-efficient load balancing ant based routing algorithm for wireless sensor
networks. IEEE Access 2019, 7, 113182–113196. [CrossRef]
10. Kong, L.; Pan, J.; Snášel, V.; Tsai, P.; Sung, T. An energy-aware routing protocol for wireless sensor network based on genetic
algorithm. Telecommun. Syst. 2018, 67, 451–463. [CrossRef]
11. Gupta Govind, P.; Jha, S. Integrated clustering and routing protocol for wireless sensor networks using Cuckoo and Harmony
Search based metaheuristic techniques. Eng. Appl. Artif. Intell. 2018, 68, 101–109. [CrossRef]
12. Deepa, C.; Latha, B. HHSRP: A cluster based hybrid hierarchical secure routing protocol for wireless sensor networks. Cluster
Comput. 2019, 22, 10449–10465. [CrossRef]
13. Kim, D.; Yun, J.; Kim, D. An Energy-Efficient Secure Forwarding Scheme for QoS Guarantee in Wireless Sensor Networks.
Electronics 2020, 9, 1418. [CrossRef]
14. Selvi, M.; Kumar, S.V.N.S.; Ganapathy, S.; Ayyanar, A.; Nehemiah, H.K.; Kannan, A. An energy efficient clustered gravitational
and fuzzy based routing algorithm in WSNs. Wirel. Pers. Commun. 2021, 116, 61–90. [CrossRef]
15. Sunitha, G.P.; Kumar, S.M.D.; Kumar, B.P.V. Energy balanced zone based routing protocol to mitigate congestion in wireless
sensor networks. Wirel. Pers. Commun. 2017, 97, 2683–2711. [CrossRef]
16. Sinde, R.; Begum, F.; Njau, K.; Kaijage, S. Refining network lifetime of wireless sensor network using energy-efficient clustering
and DRL-based sleep scheduling. Sensors 2020, 20, 1540. [CrossRef]
17. Lata, S.; Mehfuz, S.; Urooj, S.; Alrowais, F. Fuzzy clustering algorithm for enhancing reliability and network lifetime of wireless
sensor networks. IEEE Access 2020, 8, 66013–66024. [CrossRef]
18. Hemanth, D.J. Minimizing Delay and Maximizing Network Lifetime by Power-Aware Energy Efficient Routing [PAEER]
Mechanism in Wireless Sensor Networks. Intell. Syst. Comput. Technol. 2020, 37, 416.
19. Dowlatshahi, B.M.; Rafsanjani, M.K.; Gupta, B.B. An energy aware grouping memetic algorithm to schedule the sensing activity
in WSNs-based IoT for smart cities. Appl. Soft Comput. 2021, 108, 107473. [CrossRef]
20. Ifzarne, S.; Hafidi, I.; Idrissi, N. Compressive sensing and paillier cryptosystem based secure data collection in WSN. J. Ambient
Intell. Humaniz. Comput. 2021, 1–8.
21. Sharma, N.; Singh, B.M.; Singh, K. QoS-based energy-efficient protocols for wireless sensor network. Sustain. Comput. Inform.
Syst. 2021, 30, 100425. [CrossRef]
22. Maheshwari, P.; Sharma, A.K.; Verma, K. Energy efficient cluster based routing protocol for WSN using butterfly optimization
algorithm and ant colony optimization. Ad Hoc Netw. 2021, 110, 102317. [CrossRef]
23. Hassan, A.-H.A.; Shah, W.M.; Habeb, A.H.; Othman, M.F.I.; Al-Mhiqani, M.N. An improved energy-efficient clustering protocol
to prolong the lifetime of the WSN-based IoT. IEEE Access 2020, 8, 200500–200517. [CrossRef]
24. Rawat, P.; Chauhan, S.; Priyadarshi, R. Energy-efficient clusterhead selection scheme in heterogeneous wireless sensor network.
J. Circuits Syst. Comput. 2020, 29, 2050204. [CrossRef]
25. Khot, S.P.; Naik, U. Particle-Water Wave Optimization for Secure Routing in Wireless Sensor Network Using Cluster Head
Selection. Wirel. Pers. Commun. 2021, 1–25.
26. Lee, J.; Yu, S.; Kim, M.; Park, Y.; Das, A.K. On the design of secure and efficient three-factor authentication protocol using honey
list for wireless sensor networks. IEEE Access 2020, 8, 107046–107062. [CrossRef]
27. Shi, Q.; Qin, L.; Ding, Y.; Xie, B.; Zheng, J.; Song, L. Information-aware secure routing in wireless sensor networks. Sensors
2020, 20, 165. [CrossRef]
28. Sivasankarareddy, V.; Sundari, G. Survey on wireless sensor networks: Energy efficient optimization routing algorithms. Indones.
J. Electr. Eng. Comput. Sci. 2020, 19, 756–765. [CrossRef]
Appl. Sci. 2021, 11, 10517 22 of 22

29. Reddy, S.V.; Sundari, G. Fuzzy Logic Based WSN with High Packet Success Rate and Security. Int. Trans. Electr. Eng. Comput. Sci.
2020, 1, 26–32.
30. Shadravan, S.; Naji, H.R.; Bardsiri, V.K. The Sailfish Optimizer: A novel nature-inspired metaheuristic algorithm for solving
constrained engineering optimization problems. Eng. Appl. Artif. Intell. 2019, 80, 20–34. [CrossRef]
31. Feng, S.; Chen, C.L.P. Fuzzy broad learning system: A novel neuro-fuzzy model for regression and classification. IEEE Trans.
Cybern. 2018, 50, 414–424. [CrossRef] [PubMed]
32. Haq Ul, T.; Shah, T.; Siddiqui, G.F.; Iqbal, M.Z.; Hameed, I.A.; Jamil, H. Improved Twofish Algorithm: A Digital Image Enciphering
Application. IEEE Access 2021, 9, 76518–76530. [CrossRef]
33. Logambigai, R.; Ganapathy, S.; Kannan, A. Energy–efficient grid–based routing algorithm using intelligent fuzzy rules for
wireless sensor networks. Comput. Electr. Eng. 2018, 68, 62–75. [CrossRef]

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy