THE DEPENDENCE BETWEEN THE NUMBER OF ROUNDS AND IMPLEMENTED NODES IN LEACH ROUTING PROTOCOL-BASED SENSOR NETWORKS

. In the 21 st century wireless sensor networks have gained much popularity due to their flexibility. This progress has enabled the use of sensor nodes on an unprecedented scale and opened new opportunities for the so-called ubiquitous computerization. The total freedom of nodes distribution within the wireless network, where the wireless characteristic is one of the greatest advantages of the use of wireless sensor networks, implies its greatest weakness, i.e. the limitation of mobile power sources. To overcome this challenge specialized routing protocols, such as LEACH, were ushered in for making the effective use of the energy of the nodes themselves. The purpose of this article is to show how the life of a sensor network depends on the number of nodes equipped with a mobile limited power source.


Introduction
Wireless networks mostly involve a significant number of nodes built according to a simple and reliable schemeradio transmitter/receiver, memory module, microprocessor and battery or another source of power. Each node can be equipped with a different type of sensor, which is suggested by the intended use of the node. This type of network can be used to monitor changes in the weather, patient's condition, or even to observe the deformations or vibrations in the construction industry, where it may function as an early warning system. Such networks could prevent disasters and accidents, or contribute to improvements in design and technology. The algorithms applied to selforganization of a sensor network must be able to operate locally, since most often the size of the network exceeds the range of single nodes, and their arrangement, as in the case of the experiment described in this publication, is random and irregular. Hence, each node within a sensor network is a standalone device. Sensor networks are usually homogeneous. Outside the base stations, all nodes are identical and perform the same role. Network nodes are arranged within a so-called sensor field [1]. The number of such nodes depends on the intended use of the network and may vary from about a dozen to tens of thousands. The nodes can be arranged in two ways. Firstly, they can be arranged according to a specific design, which precisely determines the position of each node. This arrangement can be used in networks monitoring the statuses of machines, warehouse balances or, as already mentioned above, can function as early warning systems in the construction industry. Secondly, the nodes can be randomly arranged on hardly accessible terrain. Such random arrangement requires the use of protocols that enable building the dynamic network infrastructure and ensure data transmission from the source to the base station. The data collected by the sensor nodes is transmitted to the base station along a multi-hop path [9,15]. Each node within a sensor network operates both as a terminal station and a router. The base station is the network component that collects information from the node and transmits it to the end user via the existing links. Each node within a sensor network may have one or more sensors. These can sense, e.g., the temperature, humidity, pressure, radiation, acceleration, etc.

Wireless sensor network stack
Protocols and algorithms used in networks based on the IEEE 802.11 are not appropriate in the case of sensor networks, as in the case of a sensor network it often comes to frequent topology changes at high density of nodes. Moreover, individual nodes, because of its simplicity, have large limitations of memory resources. The purpose of the data nodes and their susceptibility to damage are also quite important [8,14].
Like the network based on TCP/IP model, in case of sensor networks a layered model is created. This stack is made up of a physical layer, data link layer, network layer, transport layer and application layer. The stack also includes power management schemes, mobility and task management that support the coordination of tasks issued by network and its functioning in a way that is energy-saving and efficient.  Application layer (session, presentation, application) Due to the complexity of the decision-making process undertaken by a network of sensors on monitored area, and also because of the variety of hardware devices used, the application layer allows for transparency of the lower layers of the network management applications [4]. This type of layer is currently the least expandable, and in the long-term development of sensor networks we can expect creation of new protocols.

 Transport layer
This layer provides the necessary solutions that enable data transfer between sensors and the parent nodes using control mechanisms resulting transmission errors. It also allows controlling the level of network traffic and the resulting congestion.
In sensor networks, main movement is gathering data from sensors in the direction of parent nodes. The reverse communication from the parent node to the sensor is used for network management, issuing queries and commands. In each case, the proper level of reliability of data delivery is different.
As for the data that sensors transmit, there is no need to implement advanced mechanisms to verify the data, because the correlation between large quantities of the data allows systems and applications to some tolerance in data loss. Implementation of solutions confirming data delivery would significantly increase the network traffic, the possibility of a congestion and affect the reduction in the level of energy efficiency of the network. The situation is different in the case of data used to generate superior nodes: in this process guarantee is required for delivery of transmitted information.
Taking into account these discrepancies in the transport layer, two different protocols ESRT and PSFQ should be implemented [4].  Network layer The main task of this layer is forwarding packets from the nodes to the base station.
In WSN, multi-hop routing protocols are mostly used for data communications. The routing techniques used in standard wireless networks typically do not meet the requirements of the sensor networks, like, for example, energy efficient routing.  The data link layer The most known protocols in data link layer are MAC protocols (medium access control). One of the tasks of MAC protocols is to create infrastructure of a sensor network [16]. In the area covered by the monitoring, there are thousands of nodes, and MAC protocol must allow proper communication.
This allows for the creation of basic infrastructure for multihop wireless connectivity and allows the network selforganization. The second task of this protocol is to assure the efficient use of radio resources between sensor nodes.  Physical layer A physical layer is responsible for the detection of a signal, the selection of the frequency modulation carrier and data encryption [5]. As a result of wireless transmission, some adverse events occur, which are the reflection and diffraction of a carrier wave or multipath signal fading. These effects can be offset in sensor networks through appropriate density sensors, so that the network might be energy-efficient and effective.

Management network methods
The existence of these methods is essential for energy efficiency throughout the network, routing data in networks of varying topology and sharing of resources needed to perform the tasks is entrusted to them. Operation of the methods is aimed at taking some actions on each layer of the communication stack [10].  Management tasks technique -The main purpose of this method is to manage the tasks entrusted to the individual nodes. Not all nodes in a given area must undertake the task of recording sensory data at the same time. This method allows for the rational use of energy resources and computing the power of nodes in a given area by assigning more tasks to nodes that have higher energy reserves.  Mobility technique -This method detects and records the change in the position of the nodes. Owing to the known mobility of scheme, there is always the route from the node to the observer. This allows for the rational use of energy resources of other nodes, as well as keeping time regimes imposed on the transmitted data  Power management technique -The task of this method is to manage the energy used by a sensory node. An example might be transmitted by a radio node after data is received from another node. This prevents inter alia receiving the same data from the various nodes. Power management scheme also allows informing other nodes that the energy resources of the node are running out and will not participate in the transmission of data (routing), but only in the collection of sensory data.

Routing protocols in mobile sensor networks
The nodes within a wireless sensor network require an autonomous source of power supply. Most often, it is a battery. Its capacity determines the life of the nodes. Depending on the energy consumption level and type of the battery, the nodes within the network can operate from a few hours to several years. The latest developments envisage a battery recharging with the energy recovered from the environment through the use of transducers that can convert kinetic, thermal or solar energy into electricity [11]. The key role in minimising energy consumption is played by a suitable hardware design, complexity of measurement algorithms, and routing algorithms.
The architecture, which the authors would like to address in this paper, is the use of mobile nodes in sensor networks. This type of network has a higher topology dynamics. The mobility of the network components entails significant complications in the functioning of routing protocols, which has a significant impact on the choice of operating parameters of the protocols and hardware. For this reason, the majority of solutions used in static sensor networks are not suitable for direct use because of the low efficiency in the case of dynamic topology changes taking place in mobile networks. Another disadvantage that is quite difficult to reconcile is the dependence of the dynamics of mobile wireless sensor networks on the quality of the service offered. The higher the dynamics among the nodes, the lower the quality of the data transmission service. Usually, in this type of networks the exchange of information between the nodes is reduced to a minimum.

The LEACH Protocol
The Low Energy Adaptive Clustering Hierarchy is a protocol that relies on hierarchical routing protocols. The protocol forms a so-called "cluster" comprising a group of sensors which communicate with one and the same cluster head node [7,13]. Cluster formation is an initial process that triggers selection of the cluster head nodes. The latter aggregate data from all the sensors within the cluster and then transmit it to the base station. The authors of the protocol allowed for random rotation upon selecting the cluster head nodes within the clusters, which helped to reduce energy consumption and evenly distribute the power load among all the nodes within the network. The LEACH uses the location coordinates to ensure scalability of sensor networks and enables data aggregation, whereby it significantly reduces the capacity of the data transmitted to the parent node. During the communication process, the TDMA and CDMA were used to reduce inter-cluster and intra-cluster collisions and interferences. The LEACH operates according to the set of rules: where T(n) is a threshold, p is the expected number of the nodes to become cluster head nodes, G is the set of the nodes involved in the selection process.
Node becomes cluster head for the current round if the random number (Fig. 1), selected within the range (0,1) is less than threshold T (n). The newly selected cluster head nodes transmit a message, that is, the announcement to all the nodes within the network [2]. These join the cluster head nodes, which receive the strongest signal, where the cluster head node calculates the schedule for all members of the cluster being formed. Having received all the information from the nodes that want to be the part of the cluster, the cluster head node allots a time slot to each node in accordance with the TDMA technique, so that the nodes can transmit data to it [3,12]. Finally, during the established phase 2 (Fig. 2), the nodes within the cluster can make their measurements and observations and then transmit the data within the allotted time slot. After the preset time, the network passes through the first phase again [6].

Simulation
The present study aims to determine how the life of a network is affected by the number of mobile sensors in the test environment. The test involved MATLAB software. The test environment has been generated in which the nodes are randomly arranged upon each new test. Each such node has its mobile source of energy and presents energy consumption level depending on its function and the number and distance of the transmitted data. The main parameters used in this experiment are shown in Tab. 1. We can see from the Fig. 3, that the number of mortality using different amounts of sensor networks in the study (50, 100, 400, 600, 800, 1000), after 1000 rounds, create a line graph. The number of sensors remaining alive after 1000 rounds is within the range 2-14.  nodes (50, 100, 400, 600,800, 1000)   Fig. 4 shows the average value of packets transmitted over the wireless sensor network to the BS after 1000 rounds. In the tested sensor network there wasn't implemented any known method of effective use of sensor battery (default LEACH). The data was processed even if it was the same as that send to BS in previous round. The lowest energy in the tested environment after 1000 rounds occurred the case of the wireless sensor network with the highest number of sensors. The highest total energy of the network after 1000 rounds was observed in the WSN that was built from a smaller number of sensors with proportionally smaller initial energy.

Conclusions
Hierarchical routing protocols are currently the best solution for sensor networks, whether these are comprised of a small or large number of nodes. The algorithms relying on the hierarchy of nodes increase the network efficiency by processing and aggregating data in clusters of sensors. These protocols usually involve two phasesin the first one clusters are formed, while in the other the recorded data is routed. However, in contrast to other protocols applied in sensor networks, hierarchical routing protocols present considerable computing power consumption and frequently excessive traffic within the network. The computing time and resources for the LEACH protocol are several times higher than in the case of direct protocols. It may be also noted that after this research we can predict how mobile sensor network with implemented LEACH will behave when we create another one in the same environment with different numbers of nodes. In Fig. 5, we can see that with increasing number of nodes the power consumption rises. Another observation we can make from Fig. 3 adding new nodes to our network at the beginning of first round does not significantly affect the viability of the network. The current research is at the stage of developing a LEACH protocol with superior performance. In the future, we want to use this gained knowledge to create a new version of Low-energy adaptive clustering hierarchy Protocol -IIS-LEACH, which will provide reliable data transfer.