A Wireless Sensor Network Model considering Energy Consumption Balance

In order to solve the contradiction between service quality and survival time ofwireless sensor networks, a new energy consumption balance model is proposed by shuffled frog leaping algorithm (SFLA). In this model, the mathematical expression of energy consumption in the physical layer is given with transmit power at first, received power, and signal bandwidth, and the objective optimization function of energy consumption balance is built by the total sending energy consumption and transmission power of WSN. Secondly, the long-range dependent characteristic of signal is reduced with wavelet neural network, and the objective optimization function above is solved by shuffled frog leaping algorithm. Finally, the performances between this algorithm and others are studied in simulation experiment, and the results show that this algorithm has greater advantages such as the error frame, the number of survival nodes, and the network lifetime.


Introduction
The service life of each node of WSN serving as a new selforganizing network is relevant to the life cycle of topology and the entire network because of resource limit, battery power, and other factors, so the energy consumption of the network is the crux of WSN research [1][2][3][4][5].The characteristics of WSN determine that its primary design objectives are to use the limited energy efficiently and meet a certain quality requirement for service like reliability, real time, and so forth.However, the high reliability and the low delay might consume the network energy significantly, thus reducing the service life of WSN [6][7][8][9].Therefore, the high efficiency and reliability of WSN depend on how to better adjust and optimize the communications protocol to a large extent so as to meet the constraints on service quality under limited energy conditions.
Meanwhile, the main factors causing conflicts in WSN, error code, and other resource consumption are mainly in communication module.The dominant factors affecting the performance of the channel access are the sending probability and the backoff time, and the transfer process is mainly affected by the state of the channel, and the error induced by the channel noise may result in packet loss at the receiving end [10][11][12].These factors will increase the energy consumed in the node.To this end, the foreign and domestic scholars carried out a great deal of studies.As to the limited energy of WSN and the sparsity of the measurement process, [13] improves the particle filter algorithms with the radial basis function neural networks (RBFNN) and selects the network measurement node based on the Mahalanobis distance and proposes an energy-efficient self-adaptive sparse measurement method based on the sound signals, so as to enhance the accuracy of target positioning and the stability of tracking process, which can effectively save network power consumption.Reference [14] constructs the evaluation method for the energy efficiency model based on the constraint on service quality by introducing the feedback control and the analytical hierarchy process for the balance of WSN energy efficiency controlled in real time by the industry, and it proposes a quantitative evaluation and optimization design program of the energy-efficient model, gives out the optimization model based on the utility function, and designs a multimetric target optimization algorithm, and the experimental results show that this method can adjust and optimize the service quality constraints under limited energy conditions, and it prolongs the survival time of network.Reference [15] combines the congestion-aware routing mechanisms and the networksencoded data transfer method and proposes a regional congestion detection method based on the magnetooptical media and on the basis of the congestion of the neighboring node.Reference [16] studies the algorithms and the strategies of the energy consumption of the entire network from the global perspective of the network based on three basic network data transfer modes and three basic network energy consumption mechanisms, and they construct the optimized model of the network energy consumption system, and its network data package routing algorithm can reduce the energy consumption of network effectively from the perspective of the network routing.Reference [17] takes the maximization of total residual energy of network nodes and the minimization of variance of the residual energy as the goal, combined with limited energy as the target, and constructs the energyefficient optimization model in combination of the characteristics of WSN in terms of limitation on node energy, solves the model through the weight evaluation function, and optimizes the energy efficiency of network by allocating the flow of multiple paths properly, thus attaining the objectives of maintaining the balanced energy consumption distribution while reducing the energy consumption of network.Bernard et al. [18] presented a distributed and adaptive gossiping technique able to guarantee communications over all sensors and to save a large amount of energy.Bennis et al. [19] proposed a novel multipath routing protocol called Carrier Sense Aware Multipath Geographic Routing protocol, and it could create multiple paths while avoiding any shared carrier sense range by using a distributed and dynamic process.
At present, it is required to quantize the service quality and energy effectiveness of WSN further, and no theoretical approaches are formed as many studies only evaluate a certain parameter of the network.For this purpose, this paper establishes a balanced energy consumption optimization model according to the total sending energy consumption and the sending power of WSN and gives out the solution algorithm on the basis of the Shuffled Frog Leaping Algorithm (SFLA) and the wavelet neural network, and it validates the effectiveness of such algorithm by means of simulation experiment finally.
The rational deployment of wireless sensor network nodes can effectively improve network coverage, reduce network energy consumption, and prolong the network life cycle, which is the core issue for wireless sensor network optimization.SFLA is a group intelligence optimization algorithm based on global collaborative search.This paper solves the "premature convergence" problem of traditional shuffled frog leaping algorithm by introducing adaptive values under different transmission powers during the frog individual's state update process.The node transmit power is optimized so that a rational layout of the wireless sensor network can be achieved and the coverage rate of the wireless sensor network can be effectively improved.

Energy Consumption Equilibrium Model
WSN is composed of a great deal of nodes, and these nodes are characterized by miniature, low data transmission rate, and cheap price, and these nodes complete the perception or control some physical phenomenon through intercommunication.The nodes in WSN are powered by battery, which limits the energy seriously, and the sending power of the nodes is limited accordingly, making the data sent by the source node reach the sink node through multiple hops, and a great deal of node energy consumed during the data transmission will result in time delay so that the message cannot be delivered in a timely manner.In this paper, we will study the ways of reducing communication energy consumption of the wireless sensor, improving the network performance significantly, prolonging the life cycle of the network, and enhancing the equilibrium of the network energy consumption.
In order to minimize the energy consumption to the maximum extent, this paper will make optimization from different aspects.For the sake of minimizing the energy consumption to the largest extent, we will optimize from different aspects in this paper.At first, it will make analysis from the physical layer, and the energy consumption E phy of the WSN physical layer can be indicated as whereas Psend indicates the sending power, which is determined by the signal-to-noise ratio  and the error rate send at the receiving end, and the signal-to-noise ratio  = (Paccept/2BN0), among which Paccept refers to the receiving power, B refers to the signal bandwidth, N0 refers to the power spectral density of additive white Gaussian noise, and the relationship between the signal-to-noise ratio and the frame error rate is different under different coding schemes.We perform researches with BPSK encoding mechanism in this paper; therefore, the relationship between the frame error rate and the signal-to-noise rate can be indicated as send=Q((2)1/2), among which  refers to the amplification efficiency of the signal amplifier at the sending end, Pamp refers to the energy consumption of the power amplifier, Pamp=Psend, PSC refers to the power consumption of the circuit at the transmitting end, PAC refers to the power consumption of the circuit at the receiving end in transmitting the data, consumed by the circuit at the receiving end when sending the data, and Tall refers to the time required for completing data transmission, the completion of data transmission, which equals the time required by sending each datum.
As to any sending node, it is assumed that there is fixed frame error rate send, and then the sending power of WSN can be expressed as whereas f(send) is the function of send, send=exp-Psend,  refers to the attenuation coefficient of data transmission channel, PN refers to the noise power at the receiving end, and  refers to the receiving noise factor; the larger the sending power, the smaller the frame error rate send; therefore, the sending power can be reduced by improving the frame error rate simply, thus reducing the sending energy loss.The sending power can be defined according to the definition of the signal-to-noise ratio: whereas the power gain factor G=G1dkMl, where G1 indicates the antenna gain, k indicates the attenuation factor of path, and Ml indicates the changes, noise, and disturbance of the data link allowance step length hardware.Thus, the energy consumption Pc of the inheritance circuits of the transmitter and the receiver can be expressed as whereas Pmixer refers to the energy consumption of mixer, Psyn refers to the energy consumption of the frequency synthesizer, Pfilter refers to the energy consumption of the filter, PDAC refers to the energy consumption of the digital-to-analog converter (DAC), PLNA refers to the energy consumption of the noise amplifier, PADC refers to the energy consumption of the analog-to-digital converter ADC, and Pdec refers to the energy consumption of decoder.To sum up, the total energy consumption E for transmitting a single data package of L bit is shown as follows: The data are transferred in the unit of frame during actual data transmission; therefore, the frame error rate will affect the network energy consumption inevitably.The higher the misdiagnosis rate, the higher the probability of resending the transmission data package under the error-controlling mode of waiting for resending ARQ, which may cause one data package to be transmitted for several times, thus resulting in energy loss of network; however, if the frame error rate is low, it might reduce the time for resending; it requires having large signal sending power, which will also increase the energy consumption; therefore, the frame error rate must be proper to minimize the energy consumption for signal transmission.It is assumed to be under the control mode of stopping for resending; in case of sending the data of n frames each time, the frame error rate of send, 0< send<1, there would be (n⋅send) frames needing to be transmitted again when transmitting n frames of data each time, and so forth; the total frames required to be transmitted for transmission of one time of data would be where k indicates the amount of resending.If the energy per bit at the input end of the demodulator is E, then l indicates the length of each frame of data, and the total energy consumption Eall of sending n frames of data is shown as follows: According to the total energy consumption and the sending power sent by the wireless sensor network, the following target optimization function z is established as shown below: whereas  and  are weighting coefficient, respectively, by seeking resolution of target optimized functions, in the hope of getting the best balanced energy consumption by resolving the target optimization function.

Computing Method
The SFLA [20][21][22] unites the advantages of the genetic algorithms (GA) and particle swarm optimization (PSO) algorithm, with characteristics of simple concept, fewer parameters, fast computing speed, powerful capability of global optimization, and ease of implementation, which is swarm-based collaborative search method; therefore, this paper uses SFLA to solve the energy consumption problem of WSN.This paper solves the "premature convergence" problem of the traditional shuffled frog leaping algorithm by introducing the adaptive values under different transmission powers during the renewal process of individual frogs, and it optimizes the transmission power of each node.The updating mode of swarm is only applicable to solution continuity in SFLA, with its basic principle as follows: a generated swarm consists of N frogs; as to the D dimension problem, the ith frog in the swarm can be expressed as X i = (x i 1 , x i 2 , . . ., x i D ), and the fitness value of each frog is solved according to the fitness function and then sorted out based on such fitness of all frogs, which then are divided into M swarms, with each consisting of m frogs, meeting the condition of N=M×m; the first frog is classified into the first swarm, the second is classified into the second swarm, . .., the mth frog is classified into the mth swarm, the (m+1)th frog is classified into the first swarm, and so forth, until N frogs are allocated completely.Assume R k is the set for the frogs of the kth swarm, with its allocation process described in the following: Each swarm is conducted with t times of local search, with the purpose of improving the position of the worst frog within specified number of iterations, and it updates the worst solution X worst in each swarm, with the updating formula as follows: where Q t indicates the displacement of the worst position of frog in the tth iteration, and ]; X best is the best solution to the swarm; X worst is the worst solution to the swarm; Q mac is the maximum distance allowing the frogs to move, X good is the best solution to the swarm, and X  worst refers to the updating solution to the worst solution in the swarm.When updating the worst solution, the new position is calculated for X worst by formula (11) and formula (12) according to X best , with adoption of elimination principle, supposing that the new solution is more superior than its precedent, and X worst k+1 = X  worst ; otherwise, it will generate a new position randomly as the updated position.Repeat such updating operation until it reaches the maximum allowable number of iterations; the first round of local search for swarm is completed, and then all the updated frog swarms are mixed and sorted out again and divided into swarms, and then a new round of local search starts; repeat such operation until it meets the end conditions.The global exchange of information and the local depth search make the information between the frogs well exchange, so such algorithm is not prone to get local optimum, but to get the global optimum value.
According to the algorithms above, the worst possible new position is limited between the present value and the best position, which limits the trend of search and lowers down the rate of convergence, thus resulting in premature convergence easily; therefore, the updating formula for the new position is proposed: W = [r 1 ⋅ w 1 , max, r 2 ⋅ w 2 , max, . . ., r s ⋅ w s , max] ( 14) where r is a random number from 0 to 1, s is the dimensions of searching space, c is a constant from 1 to 2, r i ∈ [−1, 1], 1≤i≤s, w i , and max is the uncertainty factor for the largest perception and movement in the searching space of the ith dimension.Making B worst the optimum location of the worst frogs after improvement, the leapfrog rule can be got as follows: When WSN energy consumption balance is the extra energy consumption generated due to the resending of data for frame error when the nodes send data, a certain optimization algorithm is adopted for optimizing the frame error rate of the nodes, and the frame error rate is taken as the optimization target and finds the most appropriate frame error rate by improving the accuracy of data sending and reducing the sending power P send , thereby seeking the appropriate point for balanced energy consumption.First, establish an individual location for the frog and the mapping of the network node location X i = (x i1 , y i1 , x i2 , y i2 , . . ., x ik , y ik , . . ., x in , y in ).The element in X i represents the horizontal and vertical coordinates of [1,n] node at one time, and each frog corresponds to 2n variables, and the dimension of the search space D=2×n, and then the fitness value corresponding to each frog is the frame error rate solved.
The specific algorithm process is as shown below.
Step 1. Initialize the parameters, initialize the position of the network nodes randomly, generate the individual frog in accordance with the mapping relation between the individual position of the frog and the node position, and initialize the parameters of each node; the number of the frog swarms is N; namely, the number of nodes in WSN is N, and then N={X 1 , X 2 , . . ., X N }; the number of swarms is M, and then the number of frogs within the swarm is m; namely, there are m sink nodes in WSN; the times of iteration within the swarm are t, with the time of mixed iteration of T.
Step 2. Select different sending power, and calculate the frame error rate indicator corresponding to individual frog under different powers.
Step 3. Calculate the self-adaptation value f of each node in WSN under different sending power: Step 4. Look up the routing list to determine if the data package passes through this node; if yes, calculate the energy consumed by passing through this node according to formulas ( 7) and ( 8).
Step 5.The objective function value shall be sorted out from the largest to the smallest and divided into different swarms.The first frog is classified into the first swarm, the second one is classified into the second swarm,..., the mth frog is classified into the Mth swarm, and the (m+1)th frog is classified into the(m+1)th swarm; repeat in this way until all N frogs are allocated while recording the best individual and the worst individual in each swarm in the meantime, namely, the nodes that consume the most energy and the nodes that consume the least energy.
Step 6.The local depth search is carried out for the swarm and upgrades the worst individual value according to formulas ( 13), (14), and ( 15) until it reaches the set total number of iterations t, and it mixes the updated network nodes to replace the original ones; if it is unable to get a better node, a randomly generated one will be used for replacement.
Step 7. If the current number of iterations reaches the set maximum times T, the best fitness value related information will be output, and then turn to Step 8; otherwise turn to Step 3.
Step 8.The algorithm finishes.
However, as it is featured with large abruptness and longrange dependence when WSN sends a signal, it is considered to improve the algorithms above and obtain the optimized transmit power of each node and the best balance of energy consumption through reducing the large abruptness and long-range dependence of the signal.In this paper, we apply the wavelet transform (WT) to reduce the long-range dependence of the signal and divide it into wavelet coefficient with high frequency and scale coefficient with low frequency and then train the wavelet coefficient and the scale coefficient in combination with the neural network [23,24] to reach the optimum status by wavelet reconstruction and synthesis.The paper enhances the processing procedure of signal between Step 1 and Step 2.
(1) Decompose the wavelet coefficient and the scale coefficient of the actual signal obtained in accordance with formula ( 18) and obtain its scale coefficient a (k) and wavelet coefficient d (k), making k indicate the wavelet decomposition level, with the wavelet basis of db2: (2) Utilize the neural network and train the wavelet coefficient and the scale coefficient obtained by decomposition as the sample set: (a) create nerve cells, classify the wavelet coefficient and the scale coefficient, respectively, according to the evolution rules of the neural network, and determine the types of nerve cell and the type of output nerve cell; (b) train the sample set of the neural network, and form the applicable data; (c) calculate the trained sample data, and obtain the new wavelet coefficient and the scale coefficient.
(3) Make wavelet reconstruction and synthesis for the trained wavelet coefficient and the scale coefficient in accordance with formula (18), and obtain the status value with better performance.

Simulation Experiment
In response to the above-mentioned algorithms, this paper adopts NS2 and MATLAB simulation tool to validate its effectiveness and compare with BP algorithm.Figure 1 illustrates the schematic diagram on WSN simulation and makes the original energy E e = 0.2KJ, with a total of 100 nodes, the system antenna gain factor of G 1 = 1, the path attenuation factor of k=0.3, the initial sending power of P =200mW, the noise power at the receive side of P N = 150mW, the signal bandwidth of B=532KB/s, the power spectral density of additive Gaussian white noise N 0 = 0.5, the amplification efficiency of the signal amplifier at the sending end of  = 0.7mm, the number of the frogs of N=200, the local mixed time of iterations of T=200, the initial frame error rate of P send = 0.9, the number of frog swarms M=20, the number of frogs within each swarm of m=10, the diameter of frog of 0.3, and the time of local search of t=20.
When transmitting data in multiple hops, as the data need to be forwarded and resent for many times, it will result in the waste of network energy, and the frame error rate is one of the important indicators to embody the energy waste.In order to reflect the performance of such algorithm, Figure 2 illustrates the changes in frame error rate obtained by such algorithm and BP algorithm along with the number of iterations under fixed sending power.As can be seen from Figure 2, the frame error rate obtained by the algorithm proposed by this paper is lower than that by BP algorithm, which indicates that the algorithms proposed by this paper improve the accuracy of data transmission to a large extent, thus reducing the frame error rate, and it can be the energy waste resulting from the retransmission of data.
As it is mentioned above, the network energy is relevant with both the frame error rate and the sending power of data transmission; the larger the sending power is, the lower the frame error rate will be; the lower the frame error rate, the more energy will be saved; therefore, from the perspective of their relationship, the frame error rate and the sending power restrict each other, and the network energy consumption can be better balanced under a certain balance of both.Figure 3 illustrates the changes in sending power under different frame error rates with the changes in number of iterations.As it can be seen from Figure 3, the optimum sending power decreases constantly with the constant increase in the number of iterations under fixed frame error rate, so it seems that the optimized performance of the algorithm is in line with the requirements; the optimum sending power is different if the frame error rate is different.
The network node has its own life cycle; when it stops, the node will fail, but the life cycle of a node is closely associated with the energy consumption of the network.Figure 4 illustrates the relation of the number of nodes that survived in BP algorithms and the algorithms proposed by this paper with changing of time.As it can be seen from the figure, the surviving number of nodes in BP algorithm is less than that from the algorithms proposed by this paper at the same point in time, and the survival number of nodes from BP algorithm decreases to 0 within the simulation time; by this token, the algorithm proposed by this paper can better save the energy and prolong the life cycle of the nodes.In addition, Figure 5 illustrates the relationship between the initial energy of the node and the life cycle of the network.As it can be seen from the figure, the higher the initial energy of the node, the longer the life cycle of the network.With the initial energy of the node in both algorithms, the network life cycle of SFLA is longer than BP algorithm obviously, which indicates that the energy consumption of SFLA is smaller than that of BP algorithm and verifies the feasibility of such algorithm laterally.Finally, Figure 6 illustrates the changes of SFLA algorithm and BP algorithm with changing of time, and the waiting of node, data forwarding, and others will consume the energy in the network.In order to decrease energy consumption, all kinds of algorithms will be used to decrease the consumption of energy in different period.It can be seen from Figure 6 that the total energy consumption of the network nodes from both algorithms increases constantly, but the total energy from BP algorithm increases faster than that from the algorithm proposed by this paper; what is more, the energy of the network node consumed at 1500s in the simulation reaches the total energy we set initially, while the energy of the battery is used up at 2500s in the simulation for the algorithm proposed by this paper; therefore, the algorithm put forward in this paper can better save energy of the network node and extend the service life of the network.In order to compare the performance of the wavelet neural network before and after improving the SFLA algorithm, Figure 7 shows the relationship between the remaining energy and the transmitted power Psend.It can be seen from Figure 7 that as the transmission power Psend increases, the remaining energy shows a decreasing trend.And the improved wavelet neural network algorithm has a faster decay rate, which means that the improved algorithm has a longer life cycle and better performance.

Conclusion
In this paper, we put forward a new energy consumption equilibrium model on the basis of SFLA in order to improve the service quality of WSN and the survival time.The model gives the mathematical expression for energy consumption of the physical layer based on the transmission power, receiving power, and signal bandwidth and establishes the objective optimization function for energy consumption balance in conjunction with the total energy consumption for transmission and the transmission power of WSN.Secondly, in this paper, we adopt the wavelet neural network to reduce the long-range dependence of the signal and solve the abovementioned objective optimization function based on the SFLA.Finally, in this paper, we have made an in-depth study of the performance between this algorithm and other algorithms through simulation experiments and found that this algorithm has better adaptability.The energy efficiency and the delay of WSN network are important indicators for evaluating the performance of the network, and it can be considered to quantify the service quality and the energy effectiveness in the follow-up study and then form a systematic evaluation method, thus meeting the needs of WSN performance and energy saving.

Figure 2 :
Figure 2: Changes of frame error rate with the number of iterations.

Figure 3 :
Figure 3: Influence of frame error rate on optimum sending power.

Figure 4 :
Figure 4: Relationship between the number of node survival and the simulation time.

Figure 5 :
Figure 5: Relationship between the life cycle of network and the initial energy of node.

Figure 6 :
Figure 6: Relationship on changes in total energy consumption of network node.

Figure 7 :
Figure 7: Comparison of the improved and unimproved algorithm performance.