Pmac
Pmac
Pmac
Son N. Le∗ , Yibo Zhu∗ , Zheng Peng∗ , Jun-Hong Cui∗ and Zaihan Jiang
{son,yibo.zhu,zhengpeng,jcui}@engr.uconn.edu
∗
Computer Science and Engineering Department, University of Connecticut, Storrs, CT 06269
Acoustic Division, Naval Research Laboratory, Washington, DC 20375
ABSTRACT SASHA [4], UW-Aloha [5], and PMAC. PMAC, short for
In this paper we document the design, implementation and Pipelining MAC, is specifically designed to take advantage
testing of a scheduling-based MAC protocol, called PMAC, of this topology while the other two can be used in more
for a 2012’s sea trial, and experience gained from this pro- general scenarios. The string topology, although simple, has
cess. In this experiment, the topology was a straight line, its real applications, for example monitoring of oil pipes or
and PMAC is specifically design to take advantage of it: submarine cables. In our test, data are sent from one end of
network nodes take turn to send and those that are three the string to the other.
hops apart are allowed to do so simultaneously. The result PMAC is a scheduling-based MAC protocol. It optimizes
shows that although PMAC’s performance is much better network performance by parallelizing data transmissions in
compared to other protocols in the same experiment, there such a way that every two nodes that are three hops apart
is room for improvement by selecting an appropriate packet are allowed to send data simultaneously. A data transmis-
size and scheduling scheme. Besides that, the result reveals sion occurs completely within one time slot, and a node
an important factor which we will show has significant im- sends data in its designated time slot. In the subsequent
pact on protocol design, yet is usually ignored in theoretical time slot, if the node either hears this packet being for-
work: modem processing delay. The modem processing de- warded or receives an explicit acknowledgment, it proceeds
lay is in fact not negligible, and increasing with packet size. to the next packet. Otherwise, it stays with the current
The paper also presents important lessons from this field packet in the next designated time slot. Therefore, the result
test which are useful for similar future efforts. that we introduce in this paper is not specific to PMAC; it is
also applicable to slot-based protocols, for instance, Slotted
FAMA [6].
1. INTRODUCTION The main contributions of the paper are following. First,
Underwater acoustic networks (UANs) [1–3] are often re- we design and implement PMAC and test it in an open
ferred to as a set of protocols and algorithms that together sea offshore New Jersey. Second, through different metrics,
can enable a wide range of applications, such as weather we show that there are important practical factors that are
forecasting, sea exploration, and undersea surveillance. De- usually neglected in state-of-the-art protocol designs. The
spite research efforts over past decades, practical protocol most significant of these factors is the modem processing de-
design for UANs is still a challenging issue, which is in part lay, which is increasing with packet size. The difference in
due to scarcity of real-world data and experience. Real sea processing between a 800 B packet and a 20 B one can be
tests are costly, and therefore many studies are conducted about 0.8 s, which is comparable to the propagation delay.
in constrained environments such as in a lake or a pool. This phenomenon has substantial impact on PMAC’s per-
Although these small scale experiments can be used for ini- formance. Third, we summarize important experience which
tial evaluation of a protocol, they are not sufficient to study is useful for similar field tests in the future. Finally, we in-
what really happens in open areas. In this paper, we doc- troduce a method to improve PMAC’s performance through
ument the design, implementation and testing of a MAC choosing a suitable packet size.
protocol, called PMAC, in Atlantic Ocean, and experience The rest of this paper is organized as follows. In Sec. 2,
gained from this process, which can be helpful for similar we review several MAC protocols for UANs. Sec. 3 lays
efforts in the future. out the initial design of PMAC. Sec. 4 presents experiment
In our recent sea trial in 2012, we use a string topol- settings and how data are collected. Sec. 5 provides data
ogy, with different number of nodes to test three protocols: analysis, including performance metrics, time drift and mo-
dem processing delay. Sec. 6 introduces a distributed algo-
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are not
rithm which chooses the suboptimal packet length to deal
made or distributed for profit or commercial advantage and that copies bear with varying environment condition and time drift. The al-
this notice and the full citation on the first page. Copyrights for components gorithm efficiency is demonstrated using simulation. Sec. 7
of this work owned by others than ACM must be honored. Abstracting with concludes this paper.
credit is permitted. To copy otherwise, or republish, to post on servers or to
redistribute to lists, requires prior specific permission and/or a fee. Request
permissions from permissions@acm.org. 2. RELATED WORK
WUWNet November 11-13, 2013, Kaohsiung, Taiwan
Copyright 2013 ACM 978-1-4503-2584-4/13/11...$15.00. Many scheduling-based MAC protocols have been pro-
http://dx.doi.org/10.1145/2532378.2532380. posed for UANs. Due to high experiment cost, most of
these protocols are verified with simulation. ST-MAC [7]
schedules signals from different sources such that they do Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 Slot 6
not overlap at a receiver, henceforth improving performance
by avoiding collisions and parallelizing transmissions. This Node 1 • • ?• • • ?• •
d,1 a,1 d,2 a,2
protocol requires global topology information, and thus is
not scalable in practice.
T-Lohi [8] tries to reserve the channel before data trans- Node 2 • • • ?• • • ?•
mission using short tones. The fact that the tones’ dura- d,1 a,1 d,2 a,2
• A bit rate determines how fast the acoustic modems
!
(#$%) send data. Varying environmental conditions is the
main reason for the use of different bit rates.
"#$%& "'#$%& "#$%&
• A packet rate is the frequency of a new packet being
Figure 4: Test site area sent out at the sender. In this field test, packets are
generated in such a way that the inter-packet interval
is Poisson distributed.
As a side note, Ni can always know the current time slot
index using the following equation As described earlier, the string topology is used to validate
protocols. In each experiment, there is only one sender and
SI = (tnow,i − tp,i ) /τ mod 3 + 1, (4) one receiver, corresponding to the two far ends of the string.
where tnow,i is the current time in Ni ’s timeline.
As described in Sec. 3.1, a node is only allowed to transmit
4.2 Data collection
data within one slot. This mechanism is implemented with Raw data are collected in the form of protocol log files,
the notion of token mentioned earlier in this section. A where events are captured with nanosecond time resolution
node occupies a time slot only when its token matches the using POSIX’s gettimeofday(). Although it is intuitive to
slot index. As the initiator of the time alignment phase, Nn send debugging information on-the-fly back to the control
is free to choose it token, which is either 1, 2 or 3. Nn−1 station, one should pay special attention on the amount of
when receiving a TIME ALIGN packet from Nn , computes its this information and how it is transmitted.
token in an inverse circular progression. Let Tn be the token Let us consider a simplified scenario in which a protocol
of Nn , and Tn−1 be that of Nn−1 , Tn−1 is obtained from Tn logs debug messages with printf() on a regular computer
as follows and the Gumstix. On a regular computer, since standard
output is connected to the monitor, these function calls re-
Tn − 1, Tn = 2, 3 turn immediately. However, in our field test, standard out-
Tn−1 = . (5)
3, Tn = 1 put is connected to an RF modem. The fact that the mo-
dem offers certain degree of reliability can stall the calling
4. EXPERIMENT SETTINGS thread. This phenomenon happens frequently at sea where
We implemented PMAC in Aqua-Net [14], a framework RF communication is often unstable, and can falsify exper-
for underwater networking, as a MAC layer module and iment results if not handled correctly. The impact of this
tested it in a sea experiment organized by the Naval Re- phenomenon is severe in that a sending thread may accumu-
search Laboratory in early September of 2012. The test site, late scheduled packets and send them out much later than
shown in Fig. 4, is about 100 miles offshore New Jersey. the intended time.
There are at least two methods to deal with this issue:
4.1 Experiment parameters redirecting standard output to /dev/null, and running test
In this test, we have 9 network nodes, each of which is a programs in a GNU Screen∗ session. The latter is more
standalone system with the following instruments: convenient than the former because Screen handles standard
output, and provides users with latest debug messages. The
• a Gumstix Verdex Pro XM4 microcomputer running number of messages depends only on Screen’s buffer size.
Embedded Linux which hosts the protocol stack,
• a GPS receiver to track its position, 5. DATA ANALYSIS
∗
• an RF modem to monitor the node from our boat, and http://www.gnu.org/software/screen/
Table 2: Performance result Table 5: Parallel reception statistics
End-to-end Average Slot Total Short-short Short-long Long-long
goodput e2e delay length runtime S1 C2 F3 S1 C2 F3 S1 C2 F3
(bps) (s) (s) Set 1 1 1 0 1 26 25 9 0 28
Set 1 51.14 226.42 12.54 2972.14 Set 2 0 0 0 0 18 2 1 0 42
Set 2 23.63 94.77 10.91 2978.48 Set 3 0 0 1 8 45 98 15 0 80
Set 3 44.64 523.42 12.63 8601.47 Set 4 3 0 0 0 1 8 8 0 42
Set 4 11.07 184.79 12.56 2601.68 Set 5 0 0 1 21 20 48 57 0 416
Set 5 6.92 2653.43 10.96 11 090.43 1 2 3
success crossing failure
a b c 3.9
population size mean value variance
3.8
3.7
• Long-long: Both Ni and Ni+3 are sending a long
3.6
packet. The durations from the beginning of the the 0 100 200 300 400 500 600 700 800
Packet length (bytes)
slot to when Ni+1 and Ni+2 report CRC errors are
calculated and averaged.
Figure 5: Modem processing delay
Table 6 shows the statistics of . By comparing Table 5
and 6, it happens frequently in the short-long scenario that
Ni+2 reports a CRC error shortly after Ni and Ni+3 send
their packets. Since a packet is CRC checked by the mo- Due to the varying link quality both in time and space and
dem before passing to Aqua-Net, the packet must be avail- difference in time ticking, a fixed maximum length, even ini-
able in its entirety. Moreover, as we can see from the long- tially considering environmental conditions, will not deliver
long scenario, it takes much longer to transmit a long-long a good performance if the network is to operate for a long
packet; therefore, the packet that Ni+2 receives is not the time. In this section, we consider an adaptive method to
data packet sent by Ni+3 but the explicit acknowledgment select the value.
by Ni . This means that the processing delay for a short
packet is significantly less than that for a long one because 6.1 Optimal Hop-based Packet Size
Ni+3 is closer to Ni+2 than Ni .
To facilitate our discussion, let us consider a string net-
Processing delay measurement with Benthos modems is
work of n hops. Denote
conducted after the field test to confirm this hypothesis. We
measure the time between when a packet is written to the • l as the packet length,
serial port to when the modem starts to emit signal. An
example is shown in Fig. 5, which is conducted with 3 s • τ (l) as the length of the slot in which a packet of size
forwarding delay† , 300 bps acoustic bit rate. The difference l can be transferred. In this work, t(l) is estimated by
in preparation delay between a 800 bytes and 1 bytes can a linear function: t(l) = αl + β, where α, β > 0.
be 0.9 s which is comparable to the propagation delay.
The presence of preparation delay negatively affects time • pi (l) be the probability that packet of size l gets through
sensitive algorithms, such as time synchronization or schedul- the i-th link. If we let γi be the bit error rate (BER)
ing based protocols if they are designed without awareness of Li , pi (l) can be written as
of this delay. With the delay, the practical impact of small
packets is not small if they are not scheduled carefully. This pi (l) = (1 − γi )l , (6)
fact emphasizes the necessity of an efficient cross-layer ar-
chitecture which allows designers to deal with hardware con- • Li as the i-th link,
straints more effectively.
• S as the chunk of data to send, and |S| as its size.
6. IMPROVING PERFORMANCE OF PMAC We would like to minimize the time it takes to transfer S
† to from one end of the string to another. One can realize
Forwarding delay determines how long a modem accumu-
late data from the serial line before sending them out. that S will be passed through all links before it reaches the
destination. Therefore, one heuristic solution to the origi- 6.3 Simulation Results
nal problem is to minimize the average time that the chunk In this section, we use MATLAB simulation to verify the
spends on each link: efficiency of our algorithm. In the simulation scenario, we
li = arg min (|S|ti (l)/l) = arg min (ti (l)/l) , (7) assume a 10-hop network where the BER of a link is either
l l q1 = 0.00001 or q2 = 0.0002‡ . In each simulation, and 1
where ti (l) is the average time needed to send a packet of MiB of data is transmitted from one end to another. For
size l over Li . any packet size, 1000 rounds are run to measure the transfer
Let Rl be the event that a packet of size l is received delays and obtain their average value. A transfer delay is
successfully. Rl is equivalent to the event that the packet the time needed to transmit the given data completely from
reaches the next node, and its acknowledgment reaches the the one end of the string to the other.
sender. Therefore, the probability of this event is Let γ = {γ1 , γ2 , . . . , γ10 } denote the BER vector in the
network. We realize that two permutations of the same γ
Pr[Rl ] = p2i (l). (8) give us very close transmission length, especially when the
Let Xi be the number of retransmissions for a packet of number of runs increases. An example is given in Table 7. In
size l. Since the packet is retransmitted until it is success- this table, γ (1) = {q1 , q2 , q2 , q1 , q1 , q2 , q2 , q1 , q1 } and γ (2) =
fully received, Xi follows a geometric distribution with pa- {q2 , q2 , q2 , q2 , q1 , q1 , q1 , q1 , q1 }.
rameter p2i (l), meaning Based on this remark, it is sufficient to consider unordered
k−1 2 BER vectors. For a 10-hop network, there are 11 such vec-
Pr[Xi = k] = 1 − p2i (l) pi (l). (9) tors. We denote an unordered vector as γ (k,10−k) , which
indicates there are k components equal to q2 and 10 − k
Each retransmission will delay a packet for 3 time slots;
components equal to q1 . We do not consider homogeneous
thus, the average delay that a packet of size l experiences
cases, γ (0,10) and γ (10,0) , because our algorithm will give the
on Li is
optimal value. Therefore, there are 9 vectors left and we
ti (n) = E[3τ (l) X1 ] = 3 p−2
i (l) (αl + β), (10) compare the following strategies on them:
where E[X] denotes the expected value of a random variable • MIN lmin = min1≤i≤10 {li },
X. Hence, Eq. 7 becomes
• MAX lmax = max1≤i≤10 {li },
3(αl + β) α β
li = arg min = arg min + . (11)
l lp2i (n) l p2i (l) lp2i (l) • OPT lopt , the optimal packet length.
We can prove [16] that the value of li is
The actual optimal packet length is obtained by searching
1 2αβ (1 + (1 − γi )2 ) α+β for a value between lmin and lmax that minimizes the average
li = α2 + β 2 + − . (12) transmission length. From Table 8, we can see that the abso-
2α 1 − (1 − γi )2 2α
lute difference between the optimal transmission length and
6.2 PMAC with Adaptive Packet Size our sub-optimal solution decreases when the number of bad
links increase. In the case with one bad link, the transmis-
When the network is initially deployed, we assume that no sion length difference is about 5000 seconds, which is around
environmental information is available. The protocol, there- 6% the optimal value. Picking the maximum packet length
fore, initializes with a default packet size. After the network is definitely not a good choice, because it doubles the trans-
is in operation, a node Ni can collect the packet error mission length. In homogeneous cases, γ (0,10) and γ (10,0) ,
rate (PER) the link Li to the node Ni+1 . The procedure the optimal packet length is identical to that by our proto-
involves Ni keeping track of the number of retries for every col. Transmission length for γ (0,10) and γ (10,0) is 81791.66 s
data packet an Ni+1 adding the number of times it receives and 41049.22 s, respectively. The optimal packet length is
the same data packet in the acknowledgment packet. 154 B for γ (0,10) and 890 B for γ (10,0) .
Let the number of retransmissions and of successful recep- Basagni et al. consider choosing the packet size [17] in a
(k)
tions for the packet of with sequence number k be Rrt and more general case than this paper. The authors use DACAP
(k)
Rsr respectively. PER of Li is calculated as and CSMA in their study; however, the fact that they are
(k) (k) different from PMAC does not allow us to compare the re-
P ERi = Rrt / Rsr . (13) sults numerically. In our scenario, since the size of given data
k i
is fixed, maximizing the throughput is equivalent to mini-
Let l be the current packet size BER of Li is obtained by mizing the average total transfer delay. Moreover, by having
a uniform BER as in Basagni’s work, we haved proved that
γi = 1 − (1 − P ERi )1/l . (14)
there exists an optimal packet size as in Eq. 11. This means
Periodically, a new packet size is chosen so that the net- that in our special case throughput efficiency does not in-
work adapts to environmental changes. The refreshment crease monotonically with packet size even when the BER
procedure is initiated by N1 computing the best packet length is 10−6 . Nevertheless, the smaller is the BER, the greater
l1 for L1 using Eq. 12 and passes this information to N2 . the packet size becomes.
N2 , in turn, computes l2 , compares it with l1 and sends the
smaller value to N3 . As the last node, Nn has the short- 7. CONCLUSIONS
est optimal length, l = min{l1 , . . . , ln−1 }. Nn passes l to
Nn−1 , and Nn−1 passes on the value to Nn−2 and so on. ‡
With a BER equal to q1 , a 400 byte packet is sucessfully
Eventually, N1 receives l and initiates a new transmission delivered with probability 0.97. The probability drops to
pipeline. 0.53 if the BER equals q2 .
An Underwater Sensor Network Architecture: Design,
Table 7: Transmission length (in seconds) of permu- Implementation, and Initial Testing,” in Proc.
tated BER vectors IEEE/MTS OCEANS, 2009.
Packet size γ (1) γ (2) [6] M. Molins and M. Stojanovic, “Slotted FAMA: A
154 B 80 559.73 80 592.47 MAC Protocol for Underwater Acoustic Networks,” in
246 B 76 779.89 76 779.89 Proc. IEEE OCEANS, 2006.
338 B 80 322.41 80 300.01 [7] C.-C. Hsu, K.-F. Lai, C.-F. Chou, and K. C.-J. Lin,
430 B 87 303.17 87 666.13 “ST-MAC: Spatial-Temporal MAC Schedulging for
522 B 97 315.21 97 373.67 Underwater Sensor Networks,” in Proc. IEEE
614 B 109 619.79 109 857.24 INFOCOM, 2009, pp. 1827–1835.
706 B 124 570.68 124 666.21 [8] A. Syed, W. Ye, and J. Heidemann, “T-Lohi: a New
798 B 141 718.89 141 906.59 Class of MAC Protocols for Underwater Acoustic
890 B 163 056.92 162 460.06 Sensor Networks,” in Proc. INFOCOM, 2008, pp.
231–235.
[9] P. Xie and J.-H. Cui, “R-MAC: an Energy-Efficient
Table 8: Transmission length (in seconds) of differ- MAC Protocol for Underwater Sensor Networks,” in
ent approaches Proc. IEEE WASA, 2007, pp. 187–198.
BER vector MIN MAX OPT [10] J. Rice, B. Creber, C. Fletcher, P. Baxley, K. Rogers,
γ (1,9) 79 517.86 152 957.48 75 098.03 K. McDonald, D. Rees, M. Wolf, S. Merriam,
γ (2,8) 79 481.56 152 649.54 75 959.57 R. Mehio, J. Proakis, K. Scussel, D. Porta, J. Baker,
γ (3,7) 80 407.33 160 615.21 76 291.62 J. Hardiman, and D. Green, “Evolution of Seaweb
γ (4,6) 80 593.56 162 954.90 76 755.18 Underwater Acoustic Networking,” in Proc.
γ (5,5) 80 918.32 165 205.35 77 029.72 MTS/IEEE OCEANS, 2000.
γ (6,4) 81 062.06 166 750.69 77 304.81 [11] A. Caiti, V. Calabro, L. Fusini, A. Munafo,
K. Grythe, J. M. Hovem, and A. L. T. A. Reinen,
γ (7,3) 81 196.48 168 820.18 77 552.11
“Underwater Acoustic Network Performance: Results
γ (8,2) 81 399.95 170 285.96 77 758.23
from the UAN11 Sea Trial,” in Proc. MTS/IEEE
γ (9,1) 81 660.69 171 625.69 77 998.37 OCEANS, October 2012.
[12] C. Petrioli and R. Petroccia, “SUNSET: Simulation,
Emulation and Real-life Testing of Underwater
In this paper, we introduce the design, implementation Wireless Sensor Networks,” in Proc. IEEE UComms,
and experimentation of a scheduling-based MAC protocol 2012.
called PMAC. The real field test data show that PMAC’s [13] G. Toso, R. Masiero, P. Casari, O. Kebkal, M. Komar,
performance, although much better than two other protocols and M. Zorzi, “Field Experiments for Dynamic Source
in the same experiment, is far from the ideal case. There Routing: S2C EvoLogics Modems Run the SUN
are several causing factors such as varying environment con- Protocol Using the DESERT Underwater Libraries,”
dition and time drift, and we develop an algorithm which in Proc MTS/IEEE OCEANS, 2012.
determines the appropriate packet length to deal with these [14] Z. Peng, Z. Zhou, J.-H. Cui, and Z. J. Shi, “Aqua-Net:
two factors. Yet, the most influential factor is the modem An Underwater Sensor Network Architecture: Design,
processing delay, which is thought to be negligible before the Implementation, and Initial Testing,” in Proc. IEEE
test. This delay increases in packet length and magnifies the OCEANS, 2009.
impact of short packets if they are not scheduled carefully.
[15] Z. Peng, S. Le, M. Zuba, H. Mo, H. Zhou, J.-H. Cui,
This fact emphasizes the need for an efficient cross-layer de-
S. Zhou, Z. Jiang, and J. Schindall, “Field Test
sign in underwater networking.
Experience of an Underwater Wireless Network in the
Atlantic Ocean,” in Proc. MTS/IEEE OCEANS, 2013.
8. REFERENCES [16] S. Le, Y. Zhu, J.-H. Cui, and Z. Jiang, “Pipelined
[1] I. F. Akyildiz, D. Pompili, and T. Melodia, transmission mac for string underwater acoustic
“Underwater acoustic sensor networks: Research networks,” UCONN CSE, Tech. Rep.
challenges,” Ad Hoc Networks, vol. 3, no. 3, pp. UbiNet-TR13-01, 2013.
257–279, May 2005. [17] S. Basagni, C. Petrioli, R. Petroccia, and
[2] J. Cui, J. Kong, M. Gerla, and S. Zhou, “The M. Stojanovic, “Choosing the Packet Size in Multi-hop
challenges of building scalable mobile underwater Underwater Networks,” in Proc. OCEANS, 2010.
wireless sensor networks for aquatic applications,”
IEEE Network, vol. 20, no. 3, pp. 12–18, May 2006.
[3] J. Partan, J. Kurose, and B. N. Levine, “A survey of
practical issues in underwater networks,” in Proc.
ACM WUWNet, 2006, pp. 1–8.
[4] H. Mo and J.-H. Cui, “Selective ARQ and Slotted
Handshake Based Access (SASHA) for Underwater
Acoustic Networks,” UCONN CSE, Tech. Rep.
UbiNet-TR13-02, 2013.
[5] Z. Peng, Z. Zhou, J.-H. Cui, and Z. Shi, “Aqua-Net: