• 沒有找到結果。

3. Proposed Scheme

3.2 Basic Scheme

3.2.5 Overhearing Avoidance

In most wireless networks, wireless devices always keep radio on to listen to all data transmissions. In 802.11 CSMA, this overhearing is used to perform effective virtual carrier sense. As a result, each node overhears many packets which are not assigned to it. This causes a significant energy waste, especially in dense and heavy traffic networks.

Figure 3-8 shows a multi-hop network which is formed by seven sensor nodes and a base station. The data flow in this network is from node A to base station. Each node can only hear the transmission from its immediate neighbors. For example, node D can hear the transmission form node C and E. But node D can not hear the transmission from node F to E or B to C. The dotted lines denote the interference areas of each sensor nodes. Suppose node D is currently transmitting a data packet to

E. The CTS packet from node E would be heard by node F and the RTS packet from node D would be heard by node C. Thus node F should go to sleep since its transmission interferes with E’s reception. Node C should also go to sleep because its reception would be interfered by node D’s transmission. This means node B can not transmit any packet to node C. In the network, only node A and node G can still work now. This illustrates a conclusion that if a node is in transmission, the nearest nodes able to transmit must be at least three hops away. The sensor nodes which are one or two hops away should go to sleep to save energy. This is a quite important conclusion that affects the design of LAMAC.

Figure 3-8: A multi-hop network and interference range of each node

3.2 Adaptive Sleeping

The scheme of periodically listen and sleep is able to reduce the energy and time spent greatly on idle listening. However, when a sensed packet generated, it is desirable that the sensed data can be transmitted through the network without too much delay. When each node strictly follows its active-sleep schedule, there is a potential delay on each hop. And the average value is proportional to the length of the

frame. We therefore introduce a technique called adaptive sleeping to reduce transmission latency and use active-sleep cycle more flexible and efficiently.

3.3.1The latency of multiple data forwarding

As long as MAC protocol use sleep-active cycle schedule, the sleeping latency will happen. For example, the most critical latency in S-MAC is the sleeping latency.

Sleeping latency is the most serious delay among all kinds of transmission latency.

And it also exists in LAMAC. We use an example to illustrate the sleeping latency in our proposed protocol. Figure 3-9(a) shows a multi-hop chain network. In this network, data flow is from node A to node D. Figure 3-9(b) and 3-9(c) show the time relationship and packet forwarding condition among all sensor nodes. As shown in Figure 3-9(b), only one packet is transmitted through the network. Because of the stair-like schedule, this packet goes through the network without sleeping latency.

The transmission duration of this packet is shown in below of Figure 3-9(b). This is an ideal case and only happens in networks whose traffic is very light. Figure 3-9(c) shows a network with average traffic. Node A gets two packets to transmit. The first packet is transmitted without sleep latency. But node A is not able to transmit the second packet until next sending slot. This is because one sending slot is only long enough to transmit one packet. The whole transmission duration is shown in Figure 3-9(c) below. This duration is much longer than that of Figure 3-9(b) because of the sleep period. As long as a node has more than one packet to transmit, it needs many sending slots to handle all packets. Once a node waits for another sending slot, sleeping latency happens. The sleeping latency will significantly reduce throughput and increase the overall transmission latency. We therefore introduce a mechanism to

switch the nodes from the low-active-cycle mode to a more active mode in this case.

Figure 3-9: An example of sleeping latency

3.3.2 Adaptive Sleeping Scheme

We propose an important technique, called adaptive sleeping, to reduce the transmission latency caused by the periodic sleep of each node in a multi-hop network.

The basic idea is to let receiver know that there are some packets for it but remaining Figure 3-9(a):A

multi-hop chain network

Figure 3-9 (b):Forwarding condition with one packet to

Figure 3-9 (c):Forwarding condition with two packet to

active time is not long enough to transmit these packets. It works as follows: if a node gets more than one packet to transmit, it will set the future-request-to-send

(FRTS) flag of these packets except the last packet. The receiver will hold another extra active period during sleep period for these packets. We call the extra active period ”adaptive active period”. Figure 3-10 shows an example of adaptive sleeping.

Node A has two packets to transmit to node B. In the original active period, node A transmits the first packet to node B. The FRTS flag of the first packet is set. Node B knows node A has more packets for itself by the FRTS flag. Thus node B holds an adaptive active period which is indicated by dotted line. Node A will use the adaptive active period to transmit the second packet. Having no other packets to send, node A clears the FRTS flag in the second packet. After transmitting the second packet, node A and B both go to sleep until next original active period. If there are more packets to send, node A can set the FRTS flag again. And node B will hold another adaptive active period for these packets. The advantage of using adaptive sleeping technique is that the active-sleep cycle can be used more flexible and be adaptive to different traffic load. Without using adaptive sleeping, sensor nodes need to wait until the beginning of next fame to transmit the second packet. This sleeping latency greatly increases the overall transmission latency and decreases throughput of the whole system. However, by using adaptive sleeping, sensor nodes can switch the low-duty-cycle mode to a more active mode if necessary. This capability can not only reduce transmission latency but also make LAMAC more adaptive to different traffic load.

Figure 3-10: An example of adaptive sleeping

As mentioned earlier, a node which is currently transmitting packets, the nearest nodes which are able to work must be at least three hops away. This is because the transmissions of packets that are one or two hops away interfere with the current transmission. In Figure 3-11, if node B decides to hold an adaptive active period, it must wait S interval for the current packet to transmit to nodes D which is three hops away from node A. The timing diagram is shown in Figure 3-11. In order to simplify the diagram, only sending slots remain in the figure. There is time slot axis in Figure 3-11 below. We use a sending slot to be one unit of time. In time slot 2, node A transmits a packet to node B. According to our stair-like active schedule, this packet is transmitted to node C in time slot 3 and to node D in time slot 4. Node D is three hops away from node A, the transmission between node D and E will not interfere with the transmission between node A and B. Thus node B can hold an adaptive active period in time slot 5 and receive the second packet from node A. It means if a node wants to hold an adaptive active period, it must wait an S interval of two sending slots to avoid the collision. We let nodes go to sleep to save energy between original active period end and adaptive active period start.

Figure 3-11: Time relationship between two active periods

Once the FRTS flag is set, this flag will not be clear by any nodes. This means every node which receives this packet will hold an adaptive active period. Figure 3-11 shows the mechanism. Node A set the FRTS flag of the first packet. And then this packet will be transmitted through the chain network. Every node will hold an adaptive active period after two sending slot. This makes the second packet transmitted through the path without sleeping latency.

But even we use the adaptive sleeping technique, sleeping latency still happens in some special cases. Figure 3-12 shows an example. Both node B and node C have packet to transmit to node A at the same time. Node B wins the communication medium and transmits its packet to node A. Because of having only one packet to transmit, node B doesn’t set the FRTS flag of its packet. Thus node A will not hold an adaptive active period for further packets. Node C must wait until next send slot to transmit its packet and suffer sleep latency. It is impossible for node B to set the FRTS flag for other sensor nodes because node B never knows whether or not other

nodes have packets to send. Therefore, we introduce a mechanism to enhance the adaptive sleeping technique for this case.

Figure 3-12: Sleeping Latency caused by contention mechanism

We propose a mechanism, called future request-to-send packet (FRP), to reduce the latency caused by contention mechanism. The basic idea is to let receiver know that we still have packets for it, but are ourselves prohibited from using the medium. In this way, if a node loses the communication medium in contention, it will immediately send a future-request-to-send (FRP) packet to its receiver. The FRP packet is very small and only contains the receiver’s ID. Sender’s ID is unnecessary because this packet is used for receiver to hold an adaptive active period. Figure 3-13 shows a similar example to Figure 3-12. Node B and node C contend for the medium and node B wins the contention. As long as node C knows itself loses the medium, it immediately sends a FRP packet to node A. After receiving this FRP packet, node A knows that there are other packets for it. Thus node A will hold an adaptive active period after S interval. The adaptive active period is indicated by dotted line in Figure 3-13. Then node C can use the extra active period to transmit its packet. This mechanism is similar to the function of FRTS flag. By using this mechanism, the

sleep latency will significantly be reduced.

Figure 3-13: An example of FRP mechanism

Once a node receives the FRP packet, it must pass this packet to next hop node. By this way, the extra active period will propagate along the forwarding path. In addition to reducing sleep latency, the throughput of the network will increase.

For the FRP solution to work, the length of active period must be increased slightly.

Since the FRP packet is quite small, the increasing value is also small. Compared with the improvement of the throughput and latency, we believe it is worthwhile to use this mechanism.

4. Latency Analysis

When a packet transmits through a multi-hop chain network, it will suffer many difference kinds of delay. The total delay which a packet encounters is called the transmission latency. We will analyze the transmission latency in the following section. The latency in both LAMAC and S-MAC will be analyzed together. And the performance will be compared in the section.

When a packet transmits through a multi-hop network, it will encounter the following delays:

Contention Delay:Contention delay happens when the sender performs carrier

sense. After carrier sensing, the interval for sender and receiver to exchange control packet such as RTS, CTS is included in the contention delay. In some MAC protocols, sender will stay in idle mode when senses some other transmission. This is named back-off delay and is also included in the contention delay. Basically, the contention delay is determined by the contention window size and control packet exchanging interval.

Transmission Delay: The transmission delay is the time between the start and the

end of a transmission. The transmission delay is determined by the channel bandwidth and packet length. When the packet length increases, the transmission delay also increases.

Propagation Delay: The propagation delay is determined by the distance between

the sender and receiver. When the distance between the two nodes is quite long, the propagation delay will be a serious problem. However, node distance is normally very small in wireless sensor networks. Thus the propagation delay is often be neglected.

Processing Delay: Processing delay refers to the time a node needs to process the

packet before forwarding it to the next hop. This delay mainly depends on the computing power of the node. In wireless sensor networks, the sensor nodes often do not need to process packets but forward packets to its next hop. Hence the processing delay is quite short.

Queuing Delay: Queuing delays happens when the traffic load is heavy. When the

traffic becomes heavy, the queuing delay is often the dominant factor of transmission.

Sleeping Delay: In order to get good energy efficiency, some MAC protocols

introduce the active-sleep schedule to the radio. When a sender gets a packet to transmit, it must wait until its receiver wakes up. The delay is also called sleeping latency and is often determined by the frame length of its active-sleep schedule.

We analyze the transmission latency of different MAC protocols in a simple case which the traffic is very light, e.g., only one packet is moving through the network, so that there is no queuing delay. We further assume that the propagation delay and the processing delay can be ignored. We only take contention delay, transmission delay, and sleeping latency into account.

Supposed a packet will be transmitted through N hops from source node to base station. By observing the transmission mechanism, we can know that the contention mechanism is immediately followed by the packet transmission. Thus we combine the contention delay and transmission delay to be the CT delay in our analysis and denote its value at hop n by tct,n. Its actual value is determined by different MAC protocol. In LAMAC, its value is equal to the length of sending or receiving period. And in S-MAC, its value is equal to the length of listen slot plus the transmission time of one packet. The value is fixed in both LAMAC and S-MAC because of the fixed length of packets and contention interval.

We first look at the MAC protocol without sleeping such as 802.11 CSMA. When a node gets a packet, it immediately starts contention mechanism and tries to forward it

to the next hop. The average delay at hop is tct,n. . The entire latency over N hops is:

Because the length of CT delay is the same at each hop, by change tct,n to the fixed values Tct, we can summarize the value to:

NTCT

N

Delay( ) = (2)

Equation (2) shows the transmission latency will increase linearly with the length of hops in the MAC protocol without sleeping.

Now we look at LAMAC, which introduces a sleeping latency at each hop. The sleeping latency is denoted by ts,n for the nth hop. In order to reflect a very low duty cycle, we set the sending period to <= 10% length of a frame. And a frame length

However, if the node is not the source node which generates the packet, it does not have sleeping latency in LANAC. This is because the sending slot follows immediately the receiving slot in LAMAC. Once an intermediate node gets a packet, it can forward this packet to next hop immediately without sleeping latency. Thus if a node is not the source node, its delay equation must change to:

n ct

n t

D = , (4)

The delay of source node is denoted by D1 and its equation is:

1

Because a packet can be generated on the source node at any time within a frame, the sleeping latency on the first hop, ts,1, is a random value which lies in (0, Tf). And its mean value is Tf/2.

Combining the delay on the first hop node and other nodes, we can get the overall delay of a packet over N hops network as:

CT

Equation (7) shows that the multi-hop transmission latency linearly increases with the number of hops in LAMAC. The slope of the line is the Tf /k. Compared with (2),

although we introduce the sleeping schedule into LAMAC, the transmission latency only increase Tf /2

Now we look at the transmission latency in S-MAC. S-MAC can only forward packet one hop in one frame. The delay at hop n is the same as(3)

In S-MAC, contention mechanism only starts at the beginning of each frame. After a node gets a packet in a frame, it has to wait until the next-hop node to wake up. This means it must wait to the beginning of the next frame. This indicates:

n

Substituting ts,n into equation (3), we obtain:

1

There is an exception on the first hop. As mentioned earlier, a packet can be generated at any time. Thus the delay on the first hop is the same as (5)

Combining the equation (5) and (9), we can derive the overall transmission latency in S-MAC as:

Because that the ts,1 is equal to Tf /2, Tf = k Tct, and tct,N = Tct. Equation (10)

Equation (11) shows the transmission latency in S-MAC. The slope of the line is the frame length Tf . Because we introduce a very low duty cycle, the value of k is at least 10. Compared the overall latency equation of S-MAC with ours, S-MAC gets much transmission delay according to the sleeping latency.

In order to reduce latency,S-MAC uses a technique called adaptive active. The basic idea is to let the node who overhears its neighbor’s transmissions (RTS or CTS) wake up for a short period of time at the end of the transmission. If the node is the next-hop node, its previous hop node is able to pass the data to it immediately instead of waiting for the next frame. If the node does not receive anything during the adaptive listening, it will go back to sleep until its next scheduled listen time. An example is shown in Figure 4-1. In Figure 4-1, node A is currently transmitting a packet to node B. Every node in the transmission range of node A and node B will wake up in the end of the current transmission. The transmission range of node A and B is denoted by the two blue circles in this figure. Node C is in the transmission range of node B and will wake up for the adaptive active. Thus node B is able to transmission the packet to node C when it receives the whole packet from node A.

However, the next hop of node C, which is node D, is out of the transmission range of node A and node B. Node D will not perform adaptive active. Hence node C has to wait until the beginning of next hop to transmit this packet to node D. This causes a

sleeping latency.

Figure 4-1: Adaptive active scheme of S-MAC

The transmission latency of S-MAC with adaptive active is also be analyzed. The latency equation is

The transmission latency of S-MAC with adaptive active is also be analyzed. The latency equation is

相關文件