Smart Energy Control Internet of Things based Agriculture Clustered Scheme for Smart Farming

The era of smart farming has already begun, and its consequences for society and environment are expected to be massive. In this situation, Internet of Things (IoT) technologies have become a key route towards new agricultural practices. IoT nodes detect and track physical or environmental conditions and transmit data through multihop routing to their base station. However, these IoT nodes have come up with energy constraints and complex routing processes due to limited capacities. Hence, lead to data transmission failure and delay in the fields of IoTbased farming. Because of these limitations, the IoT nodes distant from the base station are dependent on their cluster heads (CHs), causing additional load on CHs leading to high energy consumption and shortening their lifetime. To address these issues, this research proposes a smart energy control IoT based agriculture clustered scheme to reduce load on CHs by introducing a novel clustering scheme. Simulations are conducted for validation and comparison is made with LEACH protocol in Agriculture and results show that proposed scheme has much lower energy consumption and longer network life as compared to its counterparts. Keywords—Agriculture; IoT; network; energy; scheme


I. INTRODUCTION
The arrival of the Internet of Things (IoT) is one of the most dynamic and thrilling advances in the information and communication technologies. Though with the passage of time networking technologies have become more universal but they were largely restricted to connecting traditional end-user devices such as mainframes, desktops and laptops and, more recently, smartphones and tablets. Industry analysts estimate that more than eight billion such devices are currently connected to the network and project that this number will grow to over 25 billion by 2020. Some experts are projecting that the IoT could generate revenue of as much as US$ 13 trillion by 2025.Therefore IoT is being applied in every field of life such as smart home, health care, traffic control and smart farming [1].
Smart farming is a management philosophy that seeks to provide the agricultural industry with the infrastructure to use advanced technology for tracking, monitoring, automating and analyzing operations such as big data, the cloud and IoT. Smart farming is also known smart agriculture. Smart agriculture is becoming increasingly important due to rise in world population and increase in food demand. Consequently, it is important to make effective use of natural resources and to increase the use of information and communication technologies to cope with the challenges posed by climate change [2].
The Internet of Things (IoT) is a universal network that enables the monitoring and control of the farm environment through the collection, processing and analysis of the data produced by smart devices to make agriculture smart. IoT smart agriculture helps in decision making cycle which include seed selection, crop select, crop rotation, weeding, watering, harvesting, post-harvesting and pest and disease management [3]. Therefore IoT system can minimize the wastage of crops, efficient use of resources such as water and fertilizers and improve the crop yield and reduce operational expenses [4]. IoT networks for monitoring of farm environment should be of low-cost, making it affordable for farmers and should use low energy for prolong life of the network [5]. There are many sensor nodes in a typical monitoring network, a few sink nodes and a gateway www.ijacsa.thesai.org depending on the topology of the network and farm clustering. The sink gathers and uploads data from the sensor nodes onto the server [6]. The sink is always in an active state in most wireless networks, and thus consumes a lot of power [7]. Clustering can help here it is a promising solution which can help alleviate many IoT problems in terms of energy consumption, scalability, usability, etc. due to its similarity to IoT; such as different smart homes can be grouped into different clusters within a standard IoT context, and clustering can also be used by smart devices in a smart home as shown in Fig. 1 [8].
In agriculture for any IoT-based application, the data must be collected by sensing devices and processed by various algorithms and later on the information being processed can be accessed anywhere and at any time via the Internet. The combination of sensing devices is famous as clustering. Clustering provides assistance to efficiently obtain the information with a least number of communications in the network and further transfer information for processing and also supports prolong the lifespan of the network and extend the lifetime of system that is deployed for a particular task.
We also address the clustering of IoT nodes in this research for efficient use of energy and prolong network life to reduce the cost burdon on farmers in the form of system or device replacement. This research presented the IoT network design for the automated collection of soil data from a farm and proposed IoT-based Agriculture scheme, which consumes low energy and has longer life.
In this research we propose a smart energy control Agriculture Scheme based on IoT that uses low energy and has longer network life. The rest of the paper is structured as follows: Section II discusses the Agriculture related work and its current energy-based routing protocols. Section III provides the inspiration for the study. The proposed work design and all measures including clustering process and flow chart are discussed in Section IV. Section V discusses the findings of the simulation and the discussion. The last segment ends the research with conclusion and guidance for the future work. II. RELATED WORK An e-Agriculture framework proposed by researchers to measures the processes involved with farmers looking for information about agricultural practices to be used and for making decisions throughout the season. It attempted to achieve the information increased amounts that was required to complete and to help growers to accomplish their operations in efficient and effective manner. Initially a framework suggested by decision making theory was that the decision process was a sequence of serial steps that evaluate, identify problems, generate substitute solutions, select and implement them. In addition, these concepts were replaced by a novel and more difficult cycle-based decision-making process [9].
The architecture of the MAC network layer has been developed with periodic data collection, where sensor nodes periodically collect data from fixed locations in the agricultural field [10]. Low-power Wireless communication technology Zigbee was proposed for monitoring agriculture. WSN nodes collect real time data and transmit it to base station using Zigbee. This is a low-cost system where the recorded information is transmitted over an SMS via a GSM network to remote location. The limitation of this setup is its reliance on the GSM network [11]. Authors applied LEACH protocol of wireless sensor network in agriculture to improve the irrigation system. In their research LEACH protocol simulated with three parameters (throughput, end to end delay and total energy consumption of sensor nodes. The draw back within this system that the energy consumption of sensor nodes is high due to which the network life is short [12]. The authors expand the lifespan of the network by splitting the whole area of the network into tiers. In this protocol, sensor nodes of high energy and the nearest distance to the sink are selected as CHs. With the help of an opportunistic multi-path routing system with the goal of minimizing the energy consumed by the selection process of the forwarding nodes to prolong the life of the network [13]. Authors proposed an algorithm based on Distributed Learning Automation (DLA) to boost network life by taking into account various routing constraints such as end-to-end delay and reliability in the selection process of data transmission routes to the base station [14].Researches proposed a diagnostic data collection protocol that considers the clustering and multi-path routing to extend the network's lifetime in IoT network [15] The LoRa Alliance presents the protocol stack for low-power and wide-area Internet of Things (IoT) networking technologies compatible with indoor transmission [16]. Researchers proposed a protocol named as dynamic distributed framework protocol. For the purpose of routing among sensor nodes a mobile agent migration is used for aggregation of data based on energy and trust metric assessment. The drawback of proposed framework supports only small route mobile agent and response time is also low [17]. www.ijacsa.thesai.org Authors developed as system for smart agriculture. Farm area, sensor node communicates with R-Pi via Wi-Fi, Zig Bee and RF module to provide specific position sensor data on the R-pi. The data can be transmitted via internet cloud to web server. Functional diagram of Base station is shown in Fig. 2 [18].
Researchers proposed Particle Swarm Optimization energy efficient protocol that enhanced the life of the network, the Cluster head is chosen by capability functions based which consider the distance between nodes and base station [19]. A cluster aided Multipath Routing protocol is proposed by the researchers which distributed the area of interest into zones and allocate one cluster head for every cluster. And noncluster nodes have assumed the tradeoff method for residual energy assessment between itself and nearest nodes and make decision. The authors argued that the proposed protocol reduce energy consumption because of random selection of Cluster head based on residual energies. Additionally, this protocol also corrects the tuning factors to the sink node, including remaining energy, node degree, and distance. Nonetheless, with many advantages, due to its energy measurement and random selection of CH in the network this protocol has a substantial delay [20].
Authors proposed the base technique of the Distributed Unequal Size Optimize Cluster to solve the CH load balancing problem. The BS elects the CH node based on an energy point, as well as the distance from BS, according to the protocol. The CH close the BS selects the least number of sensor nodes compared to the CH which is distant from the BS during the formation of cluster [21].

III. MOTIVATION
Most of the research mainly focused on energy efficient routing that explores the gaps that motivate for the creation the creation of research problem. On the basis on literature study. It is found that CH is heavily responsible for directly transmitting cluster data to the BS. The CH that sends out data directly to the base station uses extra energy. Cluster head (CH) that is far away from the base station need more energy to transmit cluster data in a single hop to the base station. As a result, these problems contribute to the early depletion of cluster heads that are far-away from the bases station (BS). In majority of the protocol such LEACH in Agriculture [12]. Cluster head transfer data directly to the base station Consequently, irregular load distribution among cluster heads opted to quickly exhaust their energy which leads to disturbance of the process of data dissemination and as well shorten the network life.

IV. IOT BASED AGRICULTURE
IoT nodes with limited processing power, memory, battery life and small in size are distributed in cluster farm. Due to the limited battery power IoT network needs to extend the lifetime of the system because it consumes low energy than WSN. A scheme based on clustering adapts energy use by equilibrating all nodes into a cluster head. In this research we have taken basic idea from LEACH protocol to improve the system performance, reduce energy consumption and increase the lifetime of IoT network and propose a new scheme named as IoT based Agriculture. The aims of this design are to collect and process information from different IoT nodes deployed in cluster farm and transfer data to base station (BS) for further analysis and decision making to improve crop yield. Schematic diagram is shown in Fig. 3 and assumption for mathematical model is presented in Section A.

A. Assumption for Simulation
Mathematical model assumptions are demonstrated below.
 In the selection farm IoT nodes are distributed randomly to ensure equal distribution.
 All the IoT nodes send hello messages with their local information to BS.
 By taking optimum values the initial number of clusters is fixed and continues to vary with node density once the node begins to die; the smaller clusters transform into larger ones.
 The BS is aggregation destination with very less power constraints and improved computation capabilities.
To obtain a satisfactory signal to noise ratio (SNR) a first order radio energy dissipation model from (LEACH) [22] is utilized to transfer a bit message over a distance d.

B. Initilization Phase
For purpose of research a farm having an area of 500 × 500 m 2 is selected and further divided into clusters and IoT nodes are randomly deployed in different clusters using random topology. Based on their deployment and scale this research use a variety of IoT nodes that perform several jobs such as monitoring of soil moisture, fertilizers, pests / diseases and the effects of climate change. All IoT nodes deployed in the field are distributed into clusters so that all three IoT nodes are contained in each cluster. One cluster node does not interact with another cluster node but they interact with their head node only. Cluster head nodes of each cluster share data with the sink and sink with the BS.

C. First Order Radio Model
This research work takes on a first order radio model in which the radio dissipate E elec = 50 nl/bit to run the transmitter or receiver circuit system and ϵ amp = 100 pJ/bit/m for the transmit amplifier to achieve an satisfactory E b N 0 as shown in Fig. 4 and Table I. Another assumption was also made that an e 2 energy loss due to channel transmission. Therefore, to communicate a 3-bit message a distance d using radio models the radio expends.
( , ) = * +∈ * * 2 And to receive this message the radio expands: Receiving a message is not a low-cost operation for these parameter values, so the protocols will try to minimize not only the transmission distances, but also the number of transmission and receiving operations for each message.

D. Clustering Mechanism
After the deployment of IoT nodes in a farm they divided into a group these groups are denoted to as clusters. A cluster can have the same types of IoT nodes or different types of nodes depending on the requirements. There is a head node in each cluster and all the IoT nodes of a specific cluster report to the similar head node and G will represent each cluster. A cluster intercluster and intracluster have two forms of interaction. The node must be told after selecting which cluster it belongs to the cluster-head node that it will be a cluster member.
 Selection of Cluster Head (CH) CH selection considers two aspects first the ideal percentage of nodes in the network and second the history of nodes that acted as CH. Bases on the generation of random number (between 0 and 1) each n node makes the decision. In case of generated random number is less than the threshold value (Tn) the corresponding node will be CH for that round.
As p is the suitable percentage of CH the number of rounds is r and the set of nodes is G, which in the last 1/p rounds was not CH. Unable to become cluster heads again for p rounds nodes that were cluster heads. That node then has a 1/P chance in every round to become a cluster head. In the advertising phase the Cluster heads intimate their neighbors with an advertising package that they have chosen as Cluster heads. Non cluster head nodes choose the advertising packet with the strongest signal strength received and each non cluster head node decides to join cluster upon receiving the CH broadcast. The decision can be based among other factors on the strength of signal CH broadcast message to start data transmission schedule.

 Data Transmission
Data transmission schedule start when the clusters are created and fixed. The nodes that were assumed always have data to transfer during their allocated transmission time to the cluster head. The minimum amount of energy is required for this transmission. To reduce energy dissipation in these nodes the radio member node can be switched off up to allocation of transmission time. In order to receive complete data, the cluster head node must hold its receiver on and when complete information is received then cluster head node performs function of signal processing to compress all information into a one signal. Suppose if the information is audio or seismic to produce a composite signal then CH will radiate the separate signals if it transmits composite signal to the BS then this transmission will be of high-energy because the BS is placed far away from the farm. The next round start after definite date and each node decide if it should be a CH for this round and broadcast this information.

E. Routing phase
IoT-based agricultural network consists of various types of long-range and short-range communications networks. Many IoT network technologies contribute to the design of sensors www.ijacsa.thesai.org and tools for crop or field monitoring. Communication protocols are the foundation and implementations of the IoT agricultural network system and used throughout the network to exchange all agricultural data or information.
This research work proposes a new three phases IoT clustering protocol (IoT based Agriculture) for efficient usage of energy for data routing in IoT nodes which have lengthier network lifetime. In first phase IoT nodes collet data and send to their respective cluster head nodes while in second phase selected CHs receive information from their nominated nodes and send to sink while in 3 rd phase received filtered information send to BS by sink as shown in Fig. 5. Routing mechanism is presented in "equation (4) Wherever E residual is node level remaining energy and where E initial the initial is level energy assigned. Therefore, the optimal number of clusters m opt could be written as In this equation the diameter of network is represented by X whereas E 0 is the initial source of energy for each node. For the current round when cluster heads are chosen, they communicate their CH selection message to other nodes in the same clusters then non cluster head nodes examine the message signal strength and decide the cluster heads to enter. After that the cluster head broadcasts timetables (Schedule) for its member nodes to transmit data in different time slots to prevent data collision. Then the process goes on for the rest of the rounds until all the nodes in the network consume all their energy.
We may adopt the following model for transmission and reception purposes as an extension of the first order radio model given in "equation (6)" that is utilized to calculate the energy consumed by each IoT node deployed in the network to transmit (ETX) and receive (ERX) packet size 1 bits over distance d. The distance threshold is the normal transmission range of IoT node.
And Є are energy dissipation to route the radio and free space model of transmitter amplifier having values 50 nJ/bit and 10 pJ/bit/ 2 accordingly, m is the data packet size and Є is the multi path model of transmitter amplifier and having its value is 0.0013 pJ/bit/m4. Therefore receiving energy can be calculated as = * As mentioned earlier all IoT nodes are deployed in the cluster farm randomly. The IoT nodes deployed in the cluster farm are similar having same function and same initial energy with limited power supply that cannot be re-energized or changed. Let's assume the sink node is deployed outside the cluster farm with no energy constraints. IoT nodes which are deployed in the cluster farm are well aware about the location of the sink node and similarly about their own location and are unable to change their location. Based on the received signal strength IoT nodes make decision about the distance between one another. Depending on signal strength IoT nodes convey the information about their location and energy hop by hop to sink in the initial round. IoT nodes are attached to the grid in the same way. Those nodes which are chosen as grid head perform their allotted role while pausing sensing role. In the cluster farm other IoT nodes begin the exchange of control packets for CH or selection of first head after joining the second phase.
All IoT nodes share through the control packet their residual energy and location information. The procedure of fuzzification of shared parameters by IoT nodes starts distribution. A CH is chosen to be the node with higher residual energy and lower Euclidean distance to sink and GH. We find the Euclidean distance between any two nodes a and b from the next two dimensions of the Euclidean distance as: Euclidean distance formula where x 1 and x 2 are the width dimensions, y 1 and y 2 are length dimensions of IoT nodes a and b correspondingly. Those IoT nodes which have cluster head (CH) functions capture, compress, and transmit data from nodes to GH which is turn forward them towards sink. Whereas the other nodes in the cluster farm feel the climate, collect data and move it on to their CH. There is no need to repeat process of selecting cluster head and exchanging control packets after every round. The main aim of the method proposed is to reduce unnecessary operations in each round and to save energy to nodes. "Equation (9)" shows the Objective feature of the proposed mechanism.
WE consumed is calculated using "equation (5)" The quantity of energy consumed per round within the interchange of control packets between all deployed IoT nodes n for CHs selection is considered as WE consumed and the maximal distance between two adjacent nodes is d o . The energy consumption in transmitting and receiving control www.ijacsa.thesai.org packets is assumed as E TX ControlPacket and E RX ControlPacket. Their values can be determined using "equations (1) and (2)" as m is equal to the size of the control packet.
In order to achieve the objective function defined in "equation (4)" we divide the total node energy into diverse equal portions and named as energy levels (EL) which can be calculated from "equation (6) Eo is denoted as initial static node energy and TL is represented as total energy level and depends on the level of energy consumed by IoT node. The value of TL depends on the frequency of energy consumption by a node, density of the network, and data packet size and it is inversely proportional to EL. When the value of TL is low then the value of EL will be high. The value of TL cannot be selected as very low due to trade-off among all IoT nodes. IoT node chosen as CH remains as CH if the value of EL does not reduce the residual energy and there is no CH reselection phase but when the residual energy of CH reduced by EL then a control packet announcement broadcasts the end of its selection as CH. Thus, the new process of selecting CH begins a transmission of data to CHs takes place. For energy efficiency only the transmitting node remains active and all other nodes in the cluster switch off. The function of CH starts when all IoT nodes in the cluster farm have completed data transmission. The CH received data and starts aggregation to eliminate any duplication and then wrapped data for equal usage of bandwidth as much as possible.
The CH collects and then aggregates the data to eliminate any duplication and wrapping for bandwidth equal usage as much as possible. Then the CHs forward the data in singlehop to the sink and then to the BS. The whole cycle is presented in steady state phase in the form of flow chart.

 Steady State phase
Flow Chart for the Presented Scheme is shown in Fig. 6.

V. SIMULATION RESULTS AND DISCUSSION
IoT is bigger than that the Wireless Sensor Network. WSN is an innovation that is frequently used within an IoT system. A costly collection of sensors as in a mesh network can be used to collect information individually and send information in an IoT system via switch to the web. In an IoT network most of the nodes directly send data to the web. Such as a node might be used for the measurement of the soil temperature. In this scenario the data will be frequently or infrequently send to the web directly. Where the information can be handled by a server and needs to be interpreted on a front-end interface.  Network stability period From network start up to the death of the first node is called network stability period. It is shown in Fig. 7 and Table III that stability period for IoT based Agriculture is much greater than that of LEACH in Agriculture. The reason of improvement is transmission of non-continuous data. In IoT-based agriculture data will only be transmitted if there is a difference between the current sensed value and the previously sensed value. The first node of LEACH in Agriculture dies at 168 arounds whereas IoT based Agriculture first node dies after 463 rounds hence IoT based Agriculture shows 23% improvement in network stability.

 Energy consumption
Energy consumption is a heart of any network. It is the net energy consumed by nodes during network operation. If network uses low energy, it will have longer life and if it uses high energy, it will have limited life time so that energy consumption has an effect on the life of the network. WSN is an ad hoc network and cannot send data directly to the internet due to which it consumed high energy whereas IoT is a one hop transmission and send data directly to the internet therefore IoT network consumed less energy than that of WSN network. In IoT based Agriculture initial energy is equivalent to 0.9 J and simulation results are shown in Fig. 8 and Table IV the energy consumption of IoT based Agriculture is 68% less than that of LEACH in Agriculture which may prolong the life of network.
 Network life It is the time till the first node energy runs out it is an important performance metric. In IoT network all of the nodes without delay send their records to the internet such as a node might also be used to monitor the temperature of the soil. In this setup the information will be straight away or periodically dispatched at once to the web. Whereas in Wireless sensor network setup there is no direct communication to the internet. In its place the several sensors linked to router which further transfers data to the internet. Therefore, the IoT network has longer life than that of WSN network. For each round, LEACH in Agriculture assumes that CHs dissipates the same energy that results in inefficient CH selection and affects the lifespan of the network. IoT based agriculture selects CHs considering the residual energy of nodes and the optimal number of clusters together, thereby increasing the lifetime of the network to more rounds and showing an improvement of 112 percent as shown Fig. 9 and Table V.  In the agricultural sector, the Internet of Things IoT is one of the emerging technologies. IoT nodes senses soil and crop physical and environmental conditions and sends the data to towards the sink BS which reduces load between the CH. We performed the simulation to evaluate the efficiency of the proposed IoT-based Agriculture scheme for various criteria including network stability, energy consumption and network life. The results showed that our scheme is better network reliability, energy consumption and network life efficiency than LEACH protocol in agriculture. For a feasible routing route, most routing protocols don't allow load balancing. This work particularly on the cluster head (CH) improves the load between the IoT nodes. The scheme proposed selects and rotates the CH close to the cluster's energy centroid position. Therefore, each CH selects the gateway node for multihopping itself and other CH data towards the sink and BS which reduces load between the CH. In our future research, we will integrate blockchain with IoT and will compare the performance results with IoT based Agriculture scheme and will develop a smart model for agricultural environment monitoring.