network coding: applications and implementations on mobile ...kom.aau.dk › ~ff › documents ›...

5
Network Coding: Applications and Implementations on Mobile Devices Frank H. P. Fitzek Aalborg University Aalborg, Denmark [email protected] Morten V. Pedersen Aalborg University Aalborg, Denmark [email protected] Janus Heide Aalborg University Aalborg, Denmark [email protected] Muriel Médard MIT Boston, USA [email protected] ABSTRACT Network coding has attracted a lot of attention lately. The goal of this paper is to demonstrate that the implementation of network coding is feasible on mobile platforms. The paper will guide the reader through some examples and demon- strate uses for network coding. Furthermore the paper will also show that the implementation of network coding is fea- sible today on commercial mobile platforms. 1. INTRODUCTION AND MOTIVATION Originally mobile communication systems were purely ana- log. With the introduction of digital mobile communication systems, coding of the information that has to be carried over the wireless medium was used to improve efficiency. Nowadays coding is an essential part of any communica- tion system. Source coding is used to compress information at the sender in order to reduce the channel bandwidth used, on successful reception the receiver can decompress the re- ceived data and retrieve the original information. Source coding is referred to as end-to-end as encoding is only per- formed at the source and decoding is only performed at the sink. Channel coding, on the other side, adds redundancy to make the transmission over any medium more robust against transmission errors. Even channel coding is referred to be end to end as it is applied on a single communication hop between to communication nodes, e.g. mobile device and base station. Lately the coding family got a new member referred to as network coding by Ahlswede[1]. From a system point-of- view it is not limited to a specific layer, but could be used 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 made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. ACM MSWiM 2010 Bodrum, Turkey Copyright 20XX ACM X-XXXXX-XX-X/XX/XX ...$10.00. Figure 1: Difference between Kirchhoff and network coding. at the application, network, or physical layer. In contrast to source and channel coding, network coding is breaking with the end-to-end paradigm and enables coding on the fly at each individual node in the communication network. In network coding the packets are no longer treated as atomic entities as the number of incoming and outgoing packets per node, is not necessarily equal and individual packets may be combined and re-combined at any point in the network, see Figure 1. This new feature provides advantages over tradi- tional routing in meshed networks and allows the application of network coding in different fields. On the other hand, network coding requires a new view on communication networks. Engineers are familiar with networks that are described e.g. by Kirchhoff’s laws, what goes in goes out. Thus we will have to change our views on networks to fully understand and appreciate networks coding. As given in Figure 1 the difference between the view on a network node according to Kirchhoff’s laws and network coding is given. Kirchhoff states that all incoming flows into a node will also leave the node. With network coding the node has the possibility to create a new output from the incoming flows. In the given example the output could be I1, I2 or a combination of both given by f(I1,I2). It is important to note that the capacity of the output using network coding can be less than the sum of the capacities of the incoming flows I1 and I2. That is the major difference

Upload: others

Post on 09-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Network Coding: Applications and Implementations on Mobile ...kom.aau.dk › ~ff › documents › ACMmswim10nc.pdf · Figure 3: Introduction to Network Coding. Figure 4: PictureViewer

Network Coding: Applications and Implementations onMobile Devices

Frank H. P. FitzekAalborg UniversityAalborg, [email protected]

Morten V. PedersenAalborg UniversityAalborg, [email protected]

Janus HeideAalborg UniversityAalborg, [email protected]

Muriel MédardMIT

Boston, [email protected]

ABSTRACTNetwork coding has attracted a lot of attention lately. Thegoal of this paper is to demonstrate that the implementationof network coding is feasible on mobile platforms. The paperwill guide the reader through some examples and demon-strate uses for network coding. Furthermore the paper willalso show that the implementation of network coding is fea-sible today on commercial mobile platforms.

1. INTRODUCTION AND MOTIVATIONOriginally mobile communication systems were purely ana-

log. With the introduction of digital mobile communicationsystems, coding of the information that has to be carriedover the wireless medium was used to improve efficiency.

Nowadays coding is an essential part of any communica-tion system. Source coding is used to compress informationat the sender in order to reduce the channel bandwidth used,on successful reception the receiver can decompress the re-ceived data and retrieve the original information. Sourcecoding is referred to as end-to-end as encoding is only per-formed at the source and decoding is only performed at thesink.

Channel coding, on the other side, adds redundancy tomake the transmission over any medium more robust againsttransmission errors. Even channel coding is referred to beend to end as it is applied on a single communication hopbetween to communication nodes, e.g. mobile device andbase station.

Lately the coding family got a new member referred toas network coding by Ahlswede[1]. From a system point-of-view it is not limited to a specific layer, but could be used

Permission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copies arenot made or distributed for profit or commercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, torepublish, to post on servers or to redistribute to lists, requires prior specificpermission and/or a fee.ACM MSWiM 2010 Bodrum, TurkeyCopyright 20XX ACM X-XXXXX-XX-X/XX/XX ...$10.00.

Figure 1: Difference between Kirchhoff and networkcoding.

at the application, network, or physical layer. In contrastto source and channel coding, network coding is breakingwith the end-to-end paradigm and enables coding on the flyat each individual node in the communication network. Innetwork coding the packets are no longer treated as atomicentities as the number of incoming and outgoing packets pernode, is not necessarily equal and individual packets may becombined and re-combined at any point in the network, seeFigure 1. This new feature provides advantages over tradi-tional routing in meshed networks and allows the applicationof network coding in different fields.

On the other hand, network coding requires a new viewon communication networks. Engineers are familiar withnetworks that are described e.g. by Kirchhoff’s laws, whatgoes in goes out. Thus we will have to change our viewson networks to fully understand and appreciate networkscoding. As given in Figure 1 the difference between theview on a network node according to Kirchhoff’s laws andnetwork coding is given. Kirchhoff states that all incomingflows into a node will also leave the node. With networkcoding the node has the possibility to create a new outputfrom the incoming flows. In the given example the outputcould be I1, I2 or a combination of both given by f(I1,I2).It is important to note that the capacity of the output usingnetwork coding can be less than the sum of the capacities ofthe incoming flows I1 and I2. That is the major difference

Page 2: Network Coding: Applications and Implementations on Mobile ...kom.aau.dk › ~ff › documents › ACMmswim10nc.pdf · Figure 3: Introduction to Network Coding. Figure 4: PictureViewer

Figure 2: Channel, source and network coding.

to standard network nodes such as Kirchhoff’s nodes.Figure 2 shows the difference between channel, source, and

network coding. We assume that two communication pairsare exchanging information. Both pairs {A,B} and {C,D}are using some source coding according to the service thatis being provided. The end nodes are connected with eachother via a meshed network. The meshed network is formedby the five relaying nodes in the middle and they are com-municating via IEEE802.11a using channel coding B. Let usassume each user node is using IEEE802.11b to connect tothe closest relay node of the given meshed network. Thelink between user node and relaying node is using channelcoding A.

The outer nodes of the mesh are always connected withtwo neighbors as well as with the center node, so three intotal. As we will show later, the network coding takes placeat all five nodes. More precisely the center node will encodepackets and the outer nodes are decoding packets. Notethat each meshed node is receiving four packets, is sendingonly one and is performing one coding operation. In a state-of-the-art relaying scenario the center node would send fourpackets, the same number as it has received beforehand fromthe outer meshed nodes.

2. NETWORK CODING BACKGROUNDIn this section we provide the reader with some basic infor-

mation to understand network coding. Network coding canbe applied to many different scenarios, but here we considerexamples with wireless communication.

In Figure 3(a) a multicast scenario is given. One basestation is conveying a number of packets to multiple mo-bile devices. In order to keep the spectral efficiency high,each packet is broadcasted. As erasures occur on the wire-less link not all mobile devices will receive a sent packet.In order to have a fully reliable multicast service, erasurerecovery mechanisms need to be applied. Instead of repeat-ing each packet until all devices have received it, networkcoding can be applied. Figure 3(a) shows the example ofthree packets that are conveyed from the base station to themobile device. In the given scenario we assume that eachmobile device is loosing one packet. Without network cod-ing, the error pattern over the devices would have an impacton the number of retransmitted packets. In case all devices

lost the same packet, the base station only needs to trans-mit one packet. In the worst case where each device loses adifferent packet, three retransmissions is needed. For eachretransmission only one device would benefit, for the othertwo the retransmission is redundant, this problem is knownas the collector’s problem.

Network coding can be used to solve the coupon collectorproblem. For the given example, network coding requirestransmission of only a single coded packet. In this casethe coded packet is a bitwise XOR combination of all pack-ets. After receiving the coded packet each mobile devicecould recreate its missing packet by combining the codedpacket with the uncoded received packets. Other error re-covery mechanisms such as Hybrid ARQ Type II or RAP-TOR codes would also perform better than the broadcastwith retransmissions.We note that network coding, if prop-erly implemented, performs better or as well as any of thesetechniques in any given scenario.

In Figure 3(b) and 3(c) the advantage of network codingfor meshed networks is given. We consider a simple meshednetwork with three mobile devices which are partially con-nected. Two mobile devices are out of range of each otherand require the help of the third mobile phone, referred to asrelaying device, to exchange packets with each other. Fig-ure 3(b) illustrates the exchange of two packets of the outerdevices using simple relaying mechanisms. Each packet issent to the relay and then forwarded, thus four transmis-sion slots are required, when one packet can be transmittedin one time slot. Network coding can help in this situationas the two packets at the relay can be coded together Thecoded packets then broadcast to both outer mobile devicesin one time slot.

The simple meshed network example shows that networkcoding is reducing the number of needed time slots to per-form the exchange. Furthermore this simple example givessome more valuable insights:

1. In IEEE802.11 the MAC protocol assures that the ca-pacity of the wireless medium is fairly shared amongall mobile devices. If we assume that the outer deviceswould send a large amount of packets, the relay nodewould not get enough capacity to support the relayingas it needs to send twice as much as the outer devices.But with network coding all devices are sending thesame amount of packets.

2. With network coding the order in which the nodes aresending is important. If the relay node transmits areceived packet right away after reception, there is nocoding possibility. To exploit network coding, the re-lay needs to accumulate at least two packets, before itstarts to send. As we will show in Section 5 the detec-tion/creation of coding potential is the key to successusing network coding.

3. FIELD OF APPLICATIONNetwork coding has a large field of application. In the

following we give a list of the most interesting fields withthe largest potential for commercial mobile platforms.

3.1 Car CommunicationMario Gerla and his team showed in [9] that network cod-

ing is suitable for meshed networks with dynamic topology

Page 3: Network Coding: Applications and Implementations on Mobile ...kom.aau.dk › ~ff › documents › ACMmswim10nc.pdf · Figure 3: Introduction to Network Coding. Figure 4: PictureViewer

(a) Network Coding in a Multicast Scenario. (b) Meshed Network without NetworkCoding using 4 time slots.

(c) Meshed Network with NetworkCoding using 3 time slots.

Figure 3: Introduction to Network Coding.

Figure 4: PictureViewer.

and intermittent connectivity. E.g. a car that passes multi-ple access points on the highway is only within range of anaccess point for a short time. As the time in which the car iscovered by the access point is small, it is difficult to detectwhich packets the car has not received. Here network codingcan be useful as packets can be generated and transmitteduntil the car has enough information to decode.

3.2 User Cooperation in the Cellular WorldIn [3] and [2] it is advocated to extend cellular links, in

mobile phone and base stations, with short range links toconnect to neighboring devices. By connecting to neigh-boring devices so called cooperative clusters can be createdwhich enables reduce energy costs, increased bandwidth andhigher level of robustness. In such a scenario network cod-ing can be used to send multicast information to the mo-bile phones and the mobile phones will then exchange thoseinformation among each other to speed up the download.Even more important is that the mobile phones will not justforward the received coded packets, but recode in order tomake the packet more interesting for the cluster, by creat-ingterms to coded packets that are less likely to be lineardependet among each other, than simple forwarded packet.

3.3 Viral Mobile P2P CommunicationIn [12] the mobile application coined PictureViewer was

introduced. The main idea is to spread information in a de-vice to device fashion among mobile phones. This is referredto as viral P2P communication. The application was devel-oped for S60 mobile devices and can convey pictures fromone source device to many neighboring devices using WiFi.

The advantage of network coding in this context is that thesource devices only need a minimal amount of knowledgeabout the targets received packets and therefore only a min-imal amount of feedback is needed to ensure reliable datadelivery. In Figure 4 the progress of the transmitted infor-mation and the actual coding is shown until the full pictureof Lena has been received.

4. IMPLEMENTATION AND DESIGN RULESIn this section we summarize the implementation process

of network coding at Aalborg University in cooperation withMIT over the last three years. We could list the current stateof art and what was achieved, but to go through the develop-ment process step by step will show some of the findings thatare important for the implementation of network coding.

The target platform for implementation is commercial mo-bile phones, so called smart phones. At Aalborg Universitywe have a huge interest in cooperating mobile phones. Coop-eration among mobile phones involves mesh networking andnetwork coding seemed to be viable solution in order to re-duce the traffic in the mesh and to make the communicationmore robust.

4.1 XOR based Network CodingThe first network coding implementation was on three

Nokia N95 mobile phones that exchanged data among eachother as given in Figure 3(c) and presented in [11]. Each ofthe phones received an individual stream over 3G and ex-changed it with the others over WiFi. Later we increasedthe number of phones as given in Figure 5(a). Inspired by[7], our first demonstrator was using XOR network coding.This type of network coding is relatively easy to implementbut the tricky part is that all devices involved needs to keeptrack of which packets have been received at the other de-vices. On the positive side, the energy consumption doingthe actual XOR coding was extremely low. One challengewas to create coding potential and in the first trials only fewpackets were actually coded together. The interest reader isreferred to [11].

A second demonstrator was implemented on the NokiaN810 as given in Figure 5(b). The testbed allowed to dis-tribute packets to 16 mobile devices and let them exchangethe packets according to some given protocols [10]. A lot ofeffort was put into the exchange of knowledge which packetsare needed at the neighboring nodes.

Page 4: Network Coding: Applications and Implementations on Mobile ...kom.aau.dk › ~ff › documents › ACMmswim10nc.pdf · Figure 3: Introduction to Network Coding. Figure 4: PictureViewer

(a) XOR and RLNC on N95mobile phone (Symbian).

(b) XOR implementation on Nokia N810(Linux).

(c) Partial Network Coding (DSP).

Figure 5: Implementation of Network Coding on different platforms.

4.2 RLNCThe next logical step was the introduction of random lin-

ear network coding (RLNC) [5]. In RLNC the protocol nolonger decides which packets should be coded together, in-stead packets are combined randomly. This has two implica-tions; Firstly the sending device does not necessarily requirethe receiver status which packets have been received. Sec-ondly, the coded packets are less likely to be linear dependand therefore it is more likely that a coded packet is use-ful. Because computers cannot represent real numbers withinfinite precision, Galois field elements are used to repre-sent the data. The larger the field size, the more possiblecombinations, and thus the possibility of linear dependentpackets is smaller. RLNC has been implemented on N95phones, but the results were not very promising as the en-coding and decoding speeds were only around 100 kB/s asgiven in Figure 6(a). Even for WiFi oriented ad-hoc meshednetworking these coding speeds are insufficient. Thereforetwo different approaches to overcome the described problemwere undertaken. One approach was to use the graphic ac-celerator of the mobile phone to do some number crunching.This gave a remarkable speed up factor as given in [14]. Ifas special graphic card is used the performance could evenbe imporved as shown in [13]. Unfortunately not all phoneshave graphic accelerators or do not provide access to thegraphic accelerator. A second possibility is to reduce theGF size to a minimum of GF(2) [4] and introduce the use ofsystematic codes. All in all this ended up in increasing thecoding speed from 100 kB/s to 15 MB/s.

In [6] partial random linear network coding was realizedon the opensensor board. The opensensor board has a Mi-crochip dsPIC30f3013 as main operational device. Inter-ested readers are referred to the cited work.

5. CONCLUSION AND FUTURE WORKAs seen in the previous section the implementation of net-

work coding is possible, if it is done in the right way. Overthe next years researchers will likely improve the codingspeed by further simplification or standard procedure suchas parallelization or accelerating hardware. But the next bigchallenge lies in the design of protocols for network coding.

In this paper we have shown some application fields ofnetwork coding explaining the basic concept. Network cod-ing has two main application fields in mobile communication

systems, namely multicast and meshed networks.While other coding schemes are end-to-end oriented, net-

work coding allows to merge incoming streams on a per nodebasis. This is in contrast to most network engineering con-cepts we know and is important reason why network codingcan complicated to fully understand.

Over the last years it has been claimed that network cod-ing has limited benefits [15, 8] or it is hard to implement.Some of the reasons and pitfalls are explained in this pa-per. However, it is important to stress that network codingmust be applied correctly otherwise the outcome may notbe beneficial.

In this paper we have shown that the implementation ofnetwork coding is possible. Solutions have been found andfurther improvements will be done over the next years. Thenext challenge is to design network coding aware protocolsto increase the benefit created by the new coding form.

6. ACKNOWLEDGMENTSThis work was partially financed by the CONE project

(grant No. 09-066549/FTP) by the Danish Ministry of Sci-ence, Technology and Innovation and through collaborationwith NOKIA NRC, Oulu throughout the ENOC project.

7. REFERENCES[1] R. Ahlswede, N. Cai, S. Y. R. Li, and R. W. Yeung.

Network information flow. IEEE Transactions onInformation Theory, 46(4):1204–1216, 2000.

[2] F. Fitzek and M. Katz. Cooperation in WirelessNetworks – Cooperation in Nature and WirelessCommunications, chapter 1, pages 1–27. Springer,2006.

[3] F. Fitzek and M. Katz, editors. Cognitive WirelessNetworks: Concepts, Methodologies and VisionsInspiring the Age of Enlightenment of WirelessCommunications. ISBN 978-1-4020-5978-0. Springer,July 2007.

[4] J. Heide, M. Pedersen, F. Fitzek, and T. Larsen.Network coding for mobile devices - systematic binaryrandom rateless codes. In Workshop on CooperativeMobile Networks 2009 - ICC09. IEEE, June 2009.

[5] T. Ho, Medard, R. Koetter, D. Karger, M. Effros,J. Shi, and B. Leong. A random linear network coding

Page 5: Network Coding: Applications and Implementations on Mobile ...kom.aau.dk › ~ff › documents › ACMmswim10nc.pdf · Figure 3: Introduction to Network Coding. Figure 4: PictureViewer

(a) RLNC implementation on Nokia N95 over large Ga-lois fields.

(b) RLNC implementation on Nokia N95 using the bi-nary Galois field, GF(2).

Figure 6: Performance result of RLNC on Nokia N95.

approach to multicast. IEEE Transactions onInformation Theory, 52(10):4413–4430, 2006.

[6] R. Jacobsen, K. Jakobsen, P. Ingtoft, T. Madsen, andF. Fitzek. Practical Evaluation of Partial NetworkCoding in Wireless Sensor Networks. In 4thInternational Mobile Multimedia CommunicationsConference (MobiMedia 2008), Oulu, Finland, July2008. ICTS/ACM.

[7] S. Katti, H. Rahul, W. Hu, D. Katabi, M. Medard,and J. Crowcroft. Xors in the air: practical wirelessnetwork coding. In Proceedings of the 2006 conferenceon Applications, technologies, architectures, andprotocols for computer communications (SIGCOMM’06), pages 243–254. ACM Press, 2006.

[8] J. Le, J. Lui, and D. M. Chiu. How many packets canwe encode? - an analysis of practical wireless networkcoding. April 2008.

[9] U. Lee, J.-S. Park, J. Yeh, G. Pau, and M. Gerla.Code torrent: content distribution using networkcoding in vanet. In MobiShare ’06: Proceedings of the1st international workshop on Decentralized resourcesharing in mobile computing and networking, pages1–5, New York, NY, USA, 2006. ACM.

[10] K. Nielsen, T. Madsen, and F. Fitzek. Network codingopportunities for wireless grids formed by mobiledevices. In S. in the ICST Lecture Notes(LNICST) series, editor, The Second InternationalConference on Networks for Grid Applications. ICST,Oct. 2008.

[11] M. Pedersen, F. Fitzek, and T. Larsen.Implementation and Performance Evaluation ofNetwork Coding for Cooperative Mobile Devices. InIEEE International Conference on Communications(ICC 2008) - CoCoNet Workshop, May 2008.

[12] M. Pedersen, J. Heide, F.H.P.Fitzek, and T. Larsen.Pictureviewer - a mobile application using networkcoding. In European Wireless 2009, Aalborg,Denmark, may 2009.

[13] P. Vingelmann and F. Fitzek. Implementation of

random linear network coding using nvidia’s cudatoolkit. In Wireless Grids 2009, Sept. 2009.

[14] P. Vingelmann, P. Zanaty, F.H.P.Fitzek, andH. Charaf. Implementation of random linear networkcoding on opengl-enabled graphics cards. In EuropeanWireless 2009, Aalborg, Denmark, may 2009.

[15] Z. Wang, S. Karande, H. Sadjadpour, andJ. Garcia-Luna-Aceves. On the capacity improvementof multicast traffic with network coding. In MilitaryCommunications Conference, 2008. MILCOM 2008.IEEE, pages 1 –7, 16-19 2008.