{'fraction_non_alphanumeric': 0.018090839107005388, 'fraction_numerical': 0.005388760585065435, 'mean_word_length': 5.08034321372855, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Mathematical Tools for Optimization of Energy Consumption in Wireless Sensor Networks

In the design and development of Wireless Sensor Networks (WSNs), one of the main challenges is to achieve maximal battery life-time, because of the constrained energy resources. The application of WSNs for real time monitoring contributes to minimization of potential production risks, emerging mainly from environmental influences and human actions. In the paper mathematical tools for optimization of the energy consumption of wireless sensor nodes while collecting distributed data in environmental parameters monitoring will be presented. In this contribution the stochastic optimization method-genetic algorithm is used to minimize the energy consumption of the wireless sensor nodes depending on the frequency of the transmitted data and the period of the transmission process. The optimization is conducted in cases of different scenarios: while the frequency of the transmitted data as well as the period of transmission of all the active components in a sensor node is increasing.


Introduction
Wireless sensor networks (WSNs) comprise a lot of sensor nodes spread in an environment monitoring specific physical phenomena. Their advantages include easy installation, small size and low power consumption [1]. The sensors are small, with limited processing and computing resources, and are low-cost compared to traditional sensors. They can sense, measure, and gather information from the environment and, based on some local decision process, transmit the sensed data to the user. Smart sensor nodes are low power devices equipped with one or more sensors, a processor, memory, a power supply, a radio transceiver [2]. A variety of mechanical, thermal, biological, chemical, optical, and magnetic sensors may be attached to the node. Since the sensor nodes have limited memory and are typically deployed in difficult-to-access locations, a radio is implemented for wireless communication to transfer the data to a base station, [3]. One of the most important node components is the power unit. Since the sensor nodes are often inaccessible, the lifetime of a sensor network depends on the lifetime of the power resources of the nodes. Power is also a scarce resource due to the size limitations. While traditional networks aim to achieve high quality of service (QoS) provisions, sensor network protocols must focus primarily on power conservation [4]. They must have inbuilt mechanisms of prolonging network lifetime at the cost of lower throughput or higher transmission delay. The possibilities for minimizing power node battery consumption are investigated for the purposes of lower power operation which extends the battery lifetime of the nodes [5]. In this contribution the stochastic optimization method-genetic algorithm is used to minimize the energy consumption of the wireless sensor nodes depending on the frequency of the transmitted data and the period of the transmission process.

Genetic Algorithm (GA) for WSN Energy Consumption Minimization-Description
The concept of a genetic algorithm is displayed in figure 1. It is a very powerful and robust and universal computational tool. The GA implemented in the original computer program developed at the Ss. Cyril and Methodius University in Skopje [6] starts with the initial units (chromosomes) stochastic generation. Each chromosome is composed of the same number of genes. It is the initial population (generation). The size of the population is between 20 and 100. Iteration in the GA is the cycle of estimation, selection and reproduction of the population. Each unit represents the possible optimal solution. A possible solution for each unit is estimated according to the following criterion: the value of the goal function and each solution is assigned an adequacy measure. According to the comparison of all adequate measures of the units, a decision is made which one of them will be allowed to form the next generation and with which probability in the step of selection. Figure 1: Genetic algorithm flow-chart

Mathematical Model of the Energy Consumption in WSN
The WSNs energy consumption has a significant impact on the lifetime of the nodes. The communication part is the most significant energy consumer. Power consumption in sensor nodes is result of the node status in four modes: 1) sleeping mode, where the processor and the radio are idle, waiting to be awaken up by an external event, 2) processing mode, 3) transmitting, the most power demanding state and 4) receiving mode, where sensor increases about 50% of the power consumption relative to the processing state. So, a good choice is to maintain sensors in maximum efficiency operational modes, switching between active and sleep modes in a low duty cycles. Communications tasks usually take much more time to complete then the data processing and are responsible for most of the devices energy consumption. For the communication of two sensor nodes the energy consumption needed for data transmission can be defined with: The total energy consumed for transmission A of one complete information package is a sum of energy consumption of each component in the sensor nodes: sensor . The optimization goal function is defined according to the following equation of the total energy A consumed for transmission of one complete information package: Since each of the sensors in the network is energy constrained and each component in a sensor node consumes a certain amount of energy, power supply becomes important to ensure proper operation of the entire system as the number of sensors deployed in a network grows. The dissipated energy for operating of the sensor nodes is calculated as: is the power supply voltage, Tx I denotes the current for transmission and t t is the time necessary for the data transmission. In table 1 are summarized the specifications of the most significant contributors to power consumption in sensor nodes of this case study.
is the power consumption of the sensor module.
The main input variables in the GA optimisation process are given in Table 2. The optimal solution is derived by the following genetic parameters: cross-over probability 0.65, mutation probability 0.03, population size 16 and maximal number of generations 30000.

GA Optimization Results
The goal during the optimal design process of the energy consumption is the minimisation of the parameters  The optimal value for the energy consumption of the sensor node 780,09  A μJ is obtained as presented in figure 2. In table 3 some of the optimal results are shown. The purpose of the optimization process is to achieve minimum consumed energy of the sensor nodes per information package. It can be concluded that to obtain minimal energy consumption the total information package length of the data should be bigger and the frequency of the transmitted package information should be sent in long time intervals. Figure 2. Total energy consumption per information package of the transmitter

Conclusion
In the contribution the minimal energy consumption of the wireless sensor nodes depending on the frequency of the transmitted data and the period of the transmission process of the sensor nodes is derived by the stochastic optimization method-genetic algorithm. From the results of the optimization process the optimal input parameters for minimal energy consumption of the sensor node are derived. It can be concluded that the frequency of the transmitted data packets should be sent in time intervals with bigger information packages in order to obtain minimal energy consumption. For further investigation the number of optimization input variables could be increased. The methodology is universal and can be applied on other measurement systems.