• 沒有找到結果。

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

We can see that the average latency in S-MAC with adaptive active still linearly increases with the number of hops. Now the slope of the line is Tf /2. Compared with that of no adaptive active (11), it is reduced by half. However, it is still much larger than the transmission latency of LAMAC

Figure 4-2 shows the simulation results of transmission latency with different hop length. Besides LAMAC and S-MAC, we also evaluate the full active MAC protocol, 802.11 CSMA, to show the least transmission latency. As the analyzed delay equation,

the latency of each MAC protocol increases with the number of hop counts. S-MAC without adaptive active has the largest latency. S-MAC with adaptive active also has much higher latency than LAMAC and 802.11 CSMA. This is because S-MAC suffers sleeping latency in each hop. By using adaptive active, S-MAC can transmit a packet two hops in a frame. However, the packet stops at the third hop. The result is the same with Equation (12). LAMAC has a slight higher latency than 802.11 CSMA.

As mentioned earlier, this extra latency is caused by the random generating time of packet at the source nodes and its mean value is half of a frame length. Although LAMAC will suffer sleeping latency at the source node, the transmission efficiency is much better than S-MAC.

0 1 2 3 4 5 6 7

1 2 3 4 5 6 7 8 9 10

Path Length (Hop Count)

Average Transmission Latency (second) LAMAC

S-MAC without Adaptive Active S-MAC with Adaptive Acitve 802.11 CSMA

Figure 4-2: Average transmission latency with different path length

Figure 4-3 shows the transmission latency with different duty cycle. Duty cycle

refers to the ratio of active period within a frame. If duty cycle is 1/12, it means a frame is 12 times the length of active period. In our simulation, the duty cycle is from 1/6 to 1/33. As Figure 4-3 shows, S-MAC without adaptive active has the largest latency. The result shows that the lower the duty cycle, the larger the difference between LAMAC and S-MAC. 802.11 CSMA also has slight lower latency than LAMAC.

0 2 4 6 8 10 12 14 16 18

1/6 1/9 1/12 1/15 1/18 1/21 1/24 1/27 1/30 1/33 Duty Cycle

Average Transmission Latency (Second) LAMAC

S-MAC without Adaptive Active S-MAC with Adaptive Acitve 802.11 CSMA

Figure 4-3: Average transmission latency with different duty cycle

相關文件