A New Real-Time and Guaranteed Lifetime Protocol in Wireless Sensor Networks

Real-time applications are time and event critical, therefore they have strict constraint on delay, packet loss, and energy consumption in many wireless sensor networks (WSNs) scenarios, which demands the network to continue QoS operations for a preconfigured lifetime. Due to the scarce energy constraint sensor nodes in WSNs, guaranteed network lifetime is more desirable than unpredictable and uncertain prolonged lifetime. However, in spite of its importance and necessity in WSNs real-time deployment, no research work has been proposed to solve this complex problem. In this paper, we present a new centralized energy and coverage aware node scheduling scheme for WSNs to analyze energy usage as well as balancing energy consumption among nodes to survive for the preconfigured lifetime. Furthermore, the scheduling algorithm is extended to provide real-time routing by adjusting dynamic transmission range according to current energy state of a sensor node. Thus, the energy and coverage aware scheduling with dynamic range forwarding enables the unreliable WSNs to accomplish real-time routing for a guaranteed network lifetime. Simulation results show that the proposed scheme can achieve a 10% increase in real-time packets meeting their deadline and a significantly longer guaranteed network lifetime than protocols reported in the literature.


Introduction
In recent years, significant developments in wireless and electronics communication have enabled the expansion of limited-power sensor nodes.Thus, in the last decade, a significant amount of protocols have been proposed to reduce energy consumption of sensors to prolong the network lifetime, but another important issue, provision of a guaranteed lifetime, has been rarely studied.Since the lifetime of a WSN is typically determined by the battery power of the critical sensor nodes, various strategies are required to deploy such critical nodes more efficiently [1].For example, when the outdoor surveillance or target tracking systems are deployed in harsh and nonhuman operational remote environments, it is economically unfeasible to replace or recharge batteries of energy-depleted sensor nodes.Under such circumstances, due to the restriction of the environments, guaranteeing the network lifetime is mandatory to provide the WSN service.If the network lifetime is guaranteed by the predetermined time, many deployment problems can be easily solved.For example, we can avoid replacement cost by deploying whole networks and at the same time ensure all functions to continue working till the guaranteed lifetime.
In the other point of deployment, efficient utilization of network resources is required in real-time applications to effectively access and transmit sensors data in WSNs.Therefore, the awareness of energy and QoS is mainly involved in real-time protocols stack [2].One of the main challenges in real-time applications is to guarantee the data packets to meet deadline in the network.However, high complexity to find the adequate path between source and destination requires more battery on the sensor node.Eventually, it is demanded to control battery usage for guaranteeing network lifetime to support real-time applications.With this reason, the predictable guaranteed network lifetime is more important than unpredictable long network lifetime.However, the provision of a guaranteed network lifetime to provide real-time service has never been studied in previous International Journal of Distributed Sensor Networks deployment problems.For instance, the existing lifetime schemes have focused on balancing resource consumption by taking several parameters.However, the shortcoming of these schemes to manage crucial network lifetime is mainly the distributed approach which brings higher cost of network management.Furthermore it takes long time to operate and causes a lot of overhead and complexity on network to satisfy user requirements.The local information based distributed algorithms did not sketch the whole network and therefore did not provide a guaranteed solution for lifetime.Centralized systems, on the other hand, have a global view of the whole network and thus contain complete information to guarantee WSN lifetime.
To achieve these goals, we propose a new centralized protocol which intelligently amalgamates the power aware transition with energy aware scheduling to dynamically adjust node transmitting power and routing decisions to meet real-time packets deadline and guarantee network lifetime.In the proposed scheme, the maximum WSN lifetime  is divided into  + 1 rounds and designed schedules for all nodes to switch their working modes in each round.At the end of each round, every sensor node forwards a data packet containing statistics of different operations to sink node for deciding modes of operation in next round.The proposed protocol efficiently utilized all sensors to guarantee the safe communication and satisfied the demand of real-time applications in a guaranteed WSN lifetime.The guaranteed lifetime   is achieved when all sensors spend nearly 90% of their total energy and still each node has 10% energy remaining to operate towards maximum network lifetime .
First in First Out (FIFO) and immediate queues are used in a sensor node to support best effort and real-time data towards sink, respectively.Similarly, power aware extended transmission range (ETR) and normal transmission range (NTR) are used to route real-time and best effort data, respectively.To support real-time applications in WSNs, the communication protocols must adjust their routing performance based on the packet deadline.The simulation results confirm that the transmission power control is an effective mechanism for controlling communication delays in WSNs.In this paper, we used the term power aware to represent the transmission power needed by the power amplifier unit of sensor node to forward a data packet.For coverage of the target field in WSN, we extended the concept of minimum set of sensing nodes with -covering the target field [3,4].
The rest of the paper is organized as follows.Section 2 compares our mechanism to existing work in the related areas.Section 3 describes proposed algorithm in detail.Section 4 discusses and analyzes simulation experiments for evaluating proposed scheme.Finally, Section 5 concludes with a critical summary.

Related Work
Several energy efficient and sensor scheduling schemes have been proposed to prolong network lifetime.Thus, a number of researchers used centralized approach for scheduling and prolonging WSN lifetime [2,5].The network field is divided into square grids in [2] and carried out sensors operations in rounds to prolong the lifetime subject to connectivity and partial coverage constraints.The residual energy of nodes and feedback from sink node are used to periodically wake up the sensor nodes and determine their scheduling activity for the next round.
ILP based model is proposed in [3] to determine the minimum number of relay nodes as cluster heads to guarantee network lifetime and connectivity.The most relevant work for the problem addressed in this paper is presented in [6].The authors in [6] guaranteed the preconfigured network lifetime which reduces the end-to-end latency.Each sensor node adapts to its duty cycle depending on the traffic load it suffers to guarantee the network lifetime.However, their algorithm relied on traffic load to reduce end-to-end latency and did not monitor the energies among nodes to provide provable guarantees on the network lifetime.Adjustable battery packs are used in [7] to precisely determine the energy budget at each deployment point to guarantee WSN lifetime.The authors theoretically formulated and analyzed the deployment problem by considering energy models of the battery budget.However, an extra introduced lifetime variables create a lot of communication overhead.Energy efficient routing should not only focus on energy consumption in the network routing, but also account for the network performance such as queuing delay [8].Thus, [8] introduced a new cost function to balance the load over each link and reduce the queuing delay to guarantee network lifetime.A lifetime guaranteed routing scheme is proposed in [9] using directed acyclic graph.Based on the residual energies of all the nodes, their scheme determined the routing path and transmission rate so that any wireless node on the path would not exhaust its energy before a given time.Thus, the algorithms for guaranteed lifetime in [8,9] are derived based on an equivalent transformation and also required extra lifetime variables.
All the above mentioned schemes focused on guaranteed network lifetime and ignored other important parameters relevant to guaranteed lifetime, that is, coverage and connectivity.There are also some protocols that considered WSN coverage and connectivity.The scheduling scheme in [10] increases the network lifetime and decreases overall energy consumption by turning off some redundant nodes.Centralized approach is used and proposed two different schemes to solve the coverage problem of the sensor network.Similarly, in [11], coverage and connectivity parameters are used to decide the scheduling of sensor nodes.The network reconfigures and balances the energy consumption among sensor nodes each time the algorithm runs.Distributed approach is used in [12] to schedule nodes to increase the network lifetime by turning off some redundant nodes.
Along with the guaranteed WSN lifetime, our proposed scheme also provides support for real-time data packets.SPEED [13] and MMSPEED [14] are more promising QoS based routing protocols that provided soft end-to-end deadline guarantees for real-time packets in sensor networks.Both use geographic forwarding mechanism to route packets to the sink.To guarantee a real-time packet, SPEED ensures a network wide speed of packet delivery.MMSPEED is an extension of SPEED and therefore used multiple speed layers run independently from each other.MMSPEED offers multiple network wide packet delivery speeds for different traffic types according to packet deadlines.Another soft realtime power aware protocol RACE [15] effectively balances the load by using nondeterministic forwarding.RACE achieved the real-time requirements by using a prioritized MAC for global priority of packets.A multipath routing algorithm QEMPAR [16] addressed QoS in terms of timeliness and energy efficiency for real-time applications in wireless sensor networks.All the above real-time schemes did not consider energy consumption metric and guarantee WSN lifetime for real-time applications.
However, in the above literatures, the researchers target for only one direction, that is, guaranteeing network lifetime or maximizing network lifetime while meeting coverage and/or connectivity requirement or real-time communication.No particular attention was paid to the arising question of combining real-time communication in a guaranteed network lifetime while maintaining coverage requirement.Here, our goal is to find the best routes towards sink that not only provide real-time data transmission but also guarantee network lifetime through energy and coverage aware node scheduling.

Proposed Scheme
The proposed guaranteed lifetime protocol with balanced energy scheme for the provision of real-time applications is designed for multihop wireless sensor networks.The WSN lifetime is based on the network -coverage and remaining energies of sensor nodes.Our work is different from the schemes discussed in Section 2 in many aspects.Below is the summarization of the main features and contributions of the proposed work.
(i) A centralized and analytical method is proposed to efficiently utilize the energy consumption between sensors such that the lifetime of each sensor can be guaranteed to almost the same as the expected maximum lifetime of whole network.Energy aware scheduling is coupled with coverage aware scheme to define modes of sensors.The sink informs each node about its operational mode in the next round and reduces the number of control messages required to know the status of neighbors.
(ii) The maximum WSN lifetime  is equally divided in  + 1 rounds.The proposed scheme checks and balances the energy consumption of each sensor node at the end of each round to guarantee lifetime.Most of the researchers blamed energy consumption as a major concern for causing network lifetime and therefore focused on the extension of network lifetime.One of the objectives of this proposed scheme is to guarantee network lifetime for scarce battery resources to support real-time applications by allowing all nodes to survive till a preconfigured time   .(iii) Guaranteed lifetime is an ideal environment for realtime application.Therefore, the proposed scheme also considers the efficient communication of real-time data.An immediate queue and power aware routing mechanism are used to effectively utilize energy to guarantee lifetime and achieve desired support for real-time data packet.
(iv) The proposed algorithm maintains a desired coverage by considering the largest coverage contribution instead of overlapping coverage area used by many previous works.

Network Model.
We assume a sensor network deployed randomly and consistently with multiple number of sensing nodes and one sink node.We model the deployed network as a graph (, ), where  is the set of sensing nodes and  is the set of links between nodes.A link (, ) exists between node  and , if they are in the transmission range of each other.Sensor nodes are location aware and also know the location of the sink node with the help of GPS or other localization technique [17,18].Any point in the network field is covered and can be monitored by  sensor nodes.Sensor nodes in the network field are stationary and left unattended after deployment.To make it simple and convenient, active and sleep modes of a sensor node are considered in this work.Among all sensor nodes in the network field only a required set of active nodes is selected to provide coverage and routing between source and destination.The sensors radio transceiver is capable of changing its power to achieve different transmission ranges.Proposed scheme is involved in round based operations to balance the energy consumption among sensor nodes.The tasks of each round are completed in two different phases as shown in Figure 1.The decision phase uses a centralized approach to balance energy consumption among nodes and ensure -coverage of the network field.Initially the decision phase is executed at the time of deployment and then at the end of each round regularly.At the end of each round, all sensor nodes in the network field forward the information packet to sink node.The information packet contains statistics of remaining energies and coverage areas.The sink node computes and assigns the mode of operations to each sensor node for the next round.
The second phase is sensing and starts just after completion of decision phase.In sensing phase, all active sensor nodes first discover their neighbors and then start multihop communication by collecting and forwarding sensed data.The sensing phase merges energy aware scheduling with International Journal of Distributed Sensor Networks power aware transmission to efficiently route sensed data to the sink node.

Network Coverage Area.
All active sensor nodes are performing mutual tasks of sensing and routing in the network field of WSN.Such common tasks allow sensor nodes to perform operations in different rounds during the entire network lifetime.By keeping certain sensor nodes off duty, they do not affect the overall network performance as long as there are enough working nodes to guarantee network coverage area [19].The proposed scheme involves WSN to operate in rounds based on a fixed time schedule to determine and assign energy aware operative activities to sensor nodes.
The sensing areas of several nodes are coverage redundant by neighbor nodes in the network field.Thus sleep mode is assigned to a node if its sensing area is covered (fully or partially, depending on the requirements) by the sensing areas of some other active neighbor nodes.The nodes assigned sleep mode are further checked for outcomes on the network.In decision phase the sink node executes algorithms and compute sensor nodes having largest coverage contribution areas.The nodes having largest coverage areas are added to the active list and have high probability to assign active mode.The sensor nodes in the active list are further examined for their remaining energy before placing them in active mode for next round.
Proposed scheme is focusing on -coverage of WSN and therefore ensures that each location Loc at time  in the network field NF must be covered by at least  sensor nodes.The coverage area of every node  to guarantee the -coverage of network field is computed by sink node as follows: where The sink node calculates coverage and assigns modes of operation, respectively, to each node in the network field; therefore, the incidence of blind spot is near to negligible.

Energy Aware Guaranteed Lifetime.
To minimize the energy consumption and achieve guaranteed WSN lifetime, an enhanced energy aware scheduling is applied to place some nodes in sleep mode while placing others in active mode for sensing and communication tasks in defined rounds.In sleep mode, all components are shut down and only low-power timer is on to wake up sensors later.In WSN, a sensor consists of different units to perform different operations and therefore consumes different level of energies.The power amplifier (PA) unit controls the transmission power of a sensor node and therefore consumes a large unit of energy compared to other units [20].The energy model used in this paper to sense and process data bits and listen and sleep for  seconds is adapted from our previous work [4].The centralized scheduling algorithm assumes global knowledge of sensor locations and energies to determine the guaranteed and maximum network lifetime without any node failure and coverage holes.The maximum lifetime of the wireless sensor network is the time, where all sensor nodes are alive and the sensing field is covered by at least  sensor nodes.
In network field each active sensor node covers some area, and based on that coverage area an operational duty is assigned to each node.The coverage area and energy consumption are the main parameters in WSN lifetime.Therefore, to determine the maximum WSN lifetime , we considered coverage Cov and energy consumption of sensor nodes.The lifetime of an individual sensor node  is determined by dividing its total or remaining energy  energy ( current ) on the energy consumption value.The coverage area of a sensor node plays an important role in the coverage of network field to determine the lifetime.The sensor node having minimum lifetime is selected and added to the current time  current to compute the expected maximum WSN lifetime.The maximum lifetime of a sensor network is computed as energy ( current ) where Computation() in the above equation represents the energy consumption of a sensor node  per second during processing of assigned tasks.The above equation focuses on both energy consumption and coverage area of a sensor node to compute maximum WSN lifetime.
As discussed earlier, the decision phase is executed in the sink node to announce each node's operational mode.The sink node also finds out the appropriate routing structure to cover all nodes in the network.This work did not specify the kind of structure, as development of structuring algorithms is outside of the scope of this paper.We assumed breadth-first search as a routing structure, which is established over the connectivity graph of all active nodes.The sink node forwards activity modes and wake up time for next round to all nodes in the network field.Furthermore, the sink node informs all the active nodes in the network about the real-time and nonreal-time routing paths by single or multihop flooding.
To perform active operations in the next round, the sink node gives high priority to nodes that spent more time in sleep mode during current and/or previous rounds.If a node spent more time in active operations then the activity for next round is depending on its energy level.The nodes having active mode in the current and/or previous rounds have higher priority to assigned sleep mode in the next round.WSN guaranteed lifetime   is the time in network when nearly all sensor nodes spent their 90% energy.WSN lifetime ends, when there is no set of sensing nodes that satisfies the coverage condition.The algorithm ensures that all sensor nodes spend 90% of their total energy at guaranteed time   and have 10% energy remaining to reach a maximum network lifetime .

Sensed data Packet scheduler
Baseband DSP Best effort data FIFO queue

Real time data immediate queue
Transmitter PA

To adjust transmission power
Sink 3.4.Sensed Data Routing.The proposed scheme uses a dynamic forwarding technique and assumes a perfect routing functionality with a CSMA/CA based MAC layer in the WSN.The transmission scheduling is performed to avoid collision and retransmission in the proposed real-time and nonreal-time forwarding schemes.In order to execute routing tasks in the network, each active sensor node maintains a neighbor table containing information about its neighbor nodes.Each active sensor periodically broadcasts messages to its neighbors to share information and keep link active.The link quality of a node is determined by the received signal strength.
In real-time wireless sensor networks, different events can be detected and forwarded to sink node in a defined deadline to take a proper action in a timely manner.Many wireless sensor network applications heavily rely on information being transmitted in a timely manner.There are many reasons that may disturb the end-to-end delay of a packet.The data packets in real-time environment are assigned different end-to-end deadlines depending on the application and events that occurred [21].It is a challenging job to provide end-to-end real-time guarantee in wireless sensor networks, because of their multihop unfastened channel communication.Similarly, the event based traffic and limited resources of sensor nodes in WSNs may exhibit highly diverse real-time constraints [22].
To support real-time applications in WSN, a protocol must adjust its routing performance based on packet deadline.In our scheme, the selection of next hop to forward a real-time packet is based on a weighted metric, if the sink is not directly reachable.For non-real-time packets, the greedy forwarding approach is used to transmit data packets towards the sink.
As shown in Figure 2, two different types of queues are used for storing incoming data traffic in proposed protocol.The first type of queue is FIFO which is used to store best effort data (non-real-time) on first in first out basis and the second type is Immediate queue which is used to store realtime data on immediate basis.The data packets stored in the real-time and FIFO queues are forwarded to the sink through ETR and NTR mechanisms, respectively.The transmitter node knows the degree of importance of each received data packet and therefore assigns a priority level accordingly.The packet scheduler assigns the appropriate queue position to packet based on priority level.

Real-Time Communication.
Transmission power in sensor nodes can be used as a grip to reduce end-to-end delay in WSNs.The various transmission radii of sensor nodes in WSNs impact greatly on routing performance [23].
Our approach defines a sensors radio transceiver capable of changing its transmission power, which not only guarantees real-time service but also guarantees network lifetime.To address the challenge of real-time communication, the proposed routing protocol achieves the desired challenge at low energy cost by dynamically adapting transmission power of a node.Figure 3 shows that every sensor node can perform ETR and NTR routing by adjusting simply their transmission power according to the required packet demand.When a data packet arrives in real-time queue, the deadline is checked for its priority level and placed in the queue accordingly.The non-real-time, that is, best effort data packets, are forwarded to sink node with NTR technique as described in Algorithm 1 in detail.The NTR follows greedy forwarding and energy aware routing to forward data packets to sink node.The ETR mechanism not only efficiently utilizes energy consumption among active nodes to guarantee network lifetime but also guarantees real-time communication between sensors and sink by adjusting the transmission power of sensor nodes dynamically.Using ETR technique the data packets are forwarded to next relaying node with increased power or directly to sink if occurred in the transmission range.
It is quite challenging in ETR transmission to quickly discover and select suitable next hop relaying node to forward real-time data packet.This is particularly interesting because a forwarding node needs to select the best node which meets the desired requirements among a large number of forwarding candidates.In such situation to select the next hop, most of the existing schemes rely on estimated delay and energy.This type of information sometimes results in increased energy consumption and even deadline misses.
The proposed scheme dynamically discovers eligible forwarding choices and manages the routing towards destination as shown in Figure 4.The weighted metric shown in ( 5), (9), and ( 12) selects the next hop relaying node in the proposed scheme.In the selection of next hop relaying node, the priority is given to a node that covers more distance towards the sink, has high residual energy, has higher link quality, and offers a minimum delay in real-time packet queue.The ETR routing consumes more energy to transfer a real-time packet to sink node.Therefore, an energy aware scheme is required to balance energy consumption among relaying nodes in ETR routing.The metric is designed in such a way to select a sensor node that satisfies guaranteed lifetime and real-time requirements to forward data packets towards sink.Instead of storing routing paths to sink, our scheme calculates each time different path with best performance.
The real-time forwarding metric is defined as follows to select next hop relaying node NH  .
Energy of NH  at time  is computed as where The required end-to-end velocity  of a packet at each relaying node   to achieve real-time service is computed as where To ensure the end-to-end deadline of a data packet, the forwarding policy of the proposed scheme is achieved in the following steps.
Step 1. Identify the neighbor relaying nodes NH occurring in the extended transmission range of  for real-time data forwarding as follows: Set of NH  := {NH | ∀NH  :  (NH  ) <  (  )} .(11) If neighbor nodes fail to satisfy the forwarding condition of Step 1, the proposed protocol drops the packet from real-time immediate queue.
Step 2. From the set NH  , select the one having less velocity than (  ) to satisfy real-time packet delivery.Required velocity (REQ) at NH  is as follows: ( Step 3. If more than one NH i is selected in Step 2 then select the optimal forwarding choice having maximum remaining energy at time  as follows: Step 4. Forward the data packet to selected NH  using ETR routing choice.
To keep delay minimum, the proposed scheme gives high priority to tight deadline packets in the real-time queue.The RT is initially set equivalent to the end-to-end deadline at the source node.At each hop, the RT is decremented to account for queuing, contention, and transmission delays based on the estimation methods introduced in [22].The effective merging of energy aware scheduling with dynamic transmission power scheme not only improved link quality but also reduced the number of transmissions needed to deliver a packet.

Performance Evaluation
In order to evaluate the performance of the proposed algorithm, we conducted simulations in -2.34considering (1) Node generates or receives a packet to forward (2) Check the priority level of the packet and place in the queue accordingly (5) Forward packet using Extended Transmission power (6) Routing ← ETR (7) if not reach directly to sink then (8) Relay node ← Select NH forwarding choice based on metric (9) Forward packet to NH relaying node (10) end if (11)  parameter values shown in Table 1.The ZigBee 802.15.4 specification model is used as a reference to carry out efforts in the network layer and battery module [24].We examined extensive simulation scenarios of the proposed algorithm and compared its performance for guaranteed and maximum network lifetime with A-MAC protocol [6].To achieve best performance results for real-time data packets; the proposed scheme is compared with a service differentiated multi-path real-time MMSPEED protocol [14].

Guaranteed Lifetime Analysis.
To evaluate lifetime performance of the proposed and A-MAC protocols, we perform simulation under comprehensive network conditions in this section.Early studies mainly considered the energy spending in communication unit.In this work, we also considered energy consumption in sensing, processing, and sleeping unit of sensor nodes to get more realistic estimates.At start of the network, all sensor nodes have same level of energy which is reduced in each round by performing different operations.Each curve corresponds to the one in Figure 5, which shows the guaranteed lifetime   and maximum lifetime  of proposed and A-Mac protocols.The objective of the proposed scheme is achieved at time   = 500 ms to guarantee network lifetime, where each sensor node contains at least 10% energy and at time  = 600 ms to reach maximum network lifetime as shown in Figures 5  and 6.The scheme guaranteed the network to perform till   without any failure.A-MAC guaranteed the network lifetime by adapting each sensor duty cycle which depends on the traffic load it suffers.The time of duty cycle is not fixed and is changing on the increase or decrease of the traffic load.
The guaranteed network lifetime of A-MAC is greater than the proposed scheme and is equal to its maximum network lifetime  = 600 ms, where all nodes are near to drain out their energies.In our scheme, we efficiently balanced energy consumption in each round among sensor nodes and claim guaranteed lifetime at   = 500 ms where each sensor node still remains 10% energy to reach maximum lifetime at time  = 600 ms without any node failure.
Under the same condition, Figure 6 plots the ratio of alive and working nodes in the proposed and A-MAC protocols as time goes on.The proposed scheme proved guaranteed lifetime as shown in Figure 5 at time   = 500 ms, where all sensor nodes are alive and capable of participating in communication.At time , although most of the nodes still remain enough energy, some of them are at the edge to drain out their energies which brings the network lifetime to an end.The following Figure 6 shows that the first node died in A-MAC protocol between time = 510 to 560 ms, where in the proposed scheme the first node died after time = 600 ms.A-MAC guaranteed lifetime is nearly equal to maximum network lifetime as proved by first node dying time shown in Figure 6.
In Figures 5 and 6, proposed scheme always satisfies each configured network guaranteed   and maximum lifetime  through energy efficient routing.The network lifetime measures the duration between the initialization of the network to the time when the first sensor node in the network drains out its energy due to which the network field remains uncoverable.Based on this definition of WSN lifetime, this section analyzed the effect of energy consumption on the performance of WSN in detail.proposed and A-MAC protocols.Instead of traffic load used in A-MAC to decide the duty cycle of sensor nodes, the proposed scheme focused on balance energy consumption in fixed rounds to guarantee network lifetime for WSN services.Due to the unbalanced energy consumption in A-MAC, nodes start dying earlier than the preconfigured lifetime.The first node died in A-MAC before time = 560 ms, where in proposed scheme the first node died after time = 600 ms.Thus, the proposed protocol achieved its objective for guaranteed lifetime and ensured the network to perform its operation towards the maximum lifetime .protocols are discussed in this section.To forward a realtime data packet the ETR mechanism selects the next hop by considering energy, delay, and distance to sink.The proposed protocol used energy aware scheduling scheme to keep level of energies balanced among all sensor nodes.Therefore, high weightage is given to delay parameter in the selection of next hop to achieve required end-to-end realtime communication.
To evaluate the packet delivery performance of proposed and MMSPEED, we perform simulation on average successful and missed end-to-end packets towards sink.The results are shown in Figure 8.The proposed protocol used  the concept of ETR to achieve the desired ratio of realtime data packets in WSN. Figure 8 demonstrates that both proposed and MMSPEED protocols used multihop routing techniques to forward data packets towards the sink to achieve soft real-time guarantee.scheme successfully forwarded packets to the sink with steady on-time delivery rate throughout network lifetime.MMSPEED starts to experience network congestion with a significantly decreased on-time delivery rate.The proposed scheme also shows better performance for data packets that missed their deadline.The simulation results showed that 50 real-time packets were generated and forwarded to sink node in each round.Out of 50 real-time packets, less than 10 packets missed their deadline in each round.
The ratio of successful packets reached to sink node within the deadline is 10% higher than MMSPEED.Similarly, the ratio of packets that missed their deadline is 15% less than MMSPEED.
Figure 9 shows the end-to-end packet delivery ratio of guaranteed and missed packets using ETR and NTR routes for whole communication during simulation time.The simulation analysis is done for both ETR and NTR techniques separately.In ETR all data packets including realtime and non-real-time are forwarded to sink using extended transmission to compute the delivery ratio.Similarly, in NTR all data packets are forwarded to sink node using normal routes without extended transmission.The performances of both techniques are not satisfactory as the missed packets ratio is very high.In each round 50 real-time and non-real-time packets are generated and forwarded to sink node.
Figure 9 further showed that NTR routes dropped all real-time packets and the successful packet delivery ratio is very small.The missed and guaranteed packets ratios are nearly same throughout the network lifetime.Similarly, in ETR, all nodes used the same routing technique and therefore missed packet deadline.Compared with MMSPEED, the International Journal of Distributed Sensor Networks proposed protocol adopted an enhanced and more accurate mechanism to forward real-time data packets to next relaying hop using extended transmission power.MMSPEED protocol used table-based forwarding mechanism, where a neighbor table and the average transmission time were periodically exchanged between neighbor nodes.Such periodically exchanged information is used by the sender node to calculate the packet traversal speed towards the sink.To deliver a data packet from source to destination, there is a high chance to drop packets, if any relaying node cannot find a neighbor satisfying the required packet traversal speed.Such an inflexible packet-dropping policy involves precise hop-count estimation between source and destination along with the frequent neighbor information exchange.Under a dynamic WSN environment, such dropping policy may become a cause for the missed deadline of large packets as proved in Figures 8 and 9.
To support service reliability in the proposed scheme, the probabilistic multihop forwarding scheme is used to control the number of delivery paths based on the required end-toend real-time reaching probability.According to the required probability of a packet in MMSPEED, the desired level of reliability is achieved by forwarding multiple copies of packets to a group of selected neighbors in the forwarding set.The redundant path selection scheme is used for load balancing to enhance reliability in MMSPEED.It does not consider an individual nodes energy situation, but only considers energy consumption as a whole by not using unnecessary flooding.Moreover, to decide a priority path to forward a packet from source to sink, MMSPEED does not consider the number of hops hires between two ends.The number of hops is a more realistic quantity for priority assignment than the distance between source and sink to count energy.
In the proposed approach, the selection of next hop relaying node is based on the packet deadline, link quality, hops to sink, and energy.Such type of information is also instantaneously updated at the neighbor nodes.Such information better helps a sensor node to satisfy real-time requirements.In the above figures, it can be observed that most of the packets in the proposed scheme achieved the average end-to-end packet delivery deadline requirement.

Conclusion
Real-time protocol in wireless sensor networks with guaranteed lifetime is an important issue because of the expensive deployment cost to replace or recharge the energy depleted sensors.In this paper, we considered the prospects of guaranteed WSNs lifetime using energy aware scheduling and power aware transmission mechanisms.In the proposed scheme, according to current battery level, the mode of each node for next interval is determined to keep network balanced towards guaranteed lifetime.Furthermore, ETR routing not only efficiently utilized sensor energy but also achieved deadline of real-time packets.Simulation results showed that the lifetime of each sensor node in the proposed protocol can be guaranteed to almost the maximum lifetime of the whole network in real-time environment.

Figure 1 :
Figure 1: Order of the phases during the network lifetime.

Figure 2 :
Figure 2: Mechanism to store and forward real-time and non-real-time data packets in sensor nodes.

Figure 3 :
Figure 3: Routing of real-time and non-real-time packets.

Figure 7
further shows time to first node death to analyze guaranteed lifetime with respect to the routing metric in International Journal of Distributed Sensor Networks

Figure 4 :
Figure 4: Mechanism to route data packets.

4. 2 .
Real-Time Analysis.Performance comparisons for realtime data packets between the proposed and MMSPEED 200 250 300 350 400 450 500 550 600 Average energy spent by nodes (J) Time (ms) Maximum lifetime A-MAC Maximum lifetime proposed scheme Guaranteed lifetime A-MAC Guaranteed lifetime proposed scheme

Figure 9 :
Figure 9: Packet delivery by NTR and ETR.
s o rn o d e : T i m ei ns e c o n d s : N u m b e ro fr o u n d s  0 : Deployment time : S e n s i n gf r e q u e n c y : Payload

)
(, sink) is the Euclidean distance between  and sink nodes.RT is the amount of time left before the deadline expires.The delay occurring between node  and NH  is represented as (8)ay (, NH  ) = LQ (, NH  ) × ( Chan +  Tran ) .(8)Delay(,NH  ) represents the one-hop delay a packet faces in the real-time queue and LQ is the ratio of expected number of packets successfully delivered and received between source node  and NH  at ETR power.
range ,  energy : Sensor coverage range and energy  Rec ,  Tran : Receiving and transmitting energy Cov, Loc: Coverage and position of sensor node    , NH  ): Distance between node  and NH  NH (): Energy of next hop at time   NH ():