Network Coding for Wireless Networks
Wireless Communication Project by Group 2
1
Shang Shang Ma RongYang Yang Wang Chen
Network Coding for Wireless Networks
INTRODUCTION1
COPE DESCRIPTION2
COPE IMPLEMENTATION 3
ANALOG NETWORK CODING4
2
Network CodingWhat?
Why?
Definitions
Introduction
3
1
Max-flow
Min-cut Theory
2
Unicast, Multicast
3
Through-put
Definitions
4
Max-Flow Min-Cut Theorem
• (From Wiki) The max-flow min-cut theorem is a statement in optimization theory about maximal flows in flow networks
• The maximal amount of flow is equal to the capacity of a minimal cut.
• The maximum flow in a network is dictated by its bottleneck.
5[1] S.-Y. R. Li, R. W. Yeung, and N. Cai, “Linear network Coding”, IEEE Trans.
Graph
• Graph G(V,E): consists of a set and a set – V consists of sources, sinks, and other nodes– A member e(u,v) of E has a to
send information from u to v A
D
S
B
C
T
V of verticesE of edges.
S
A B
D C
T
3 3
3 3
2
2
2
4
capacity c(u,v)
6
Min-Cuts and Max-Flows
• Cuts: Partition of vertices into two sets• Size of a Cut = Total Capacity Crossing the Cut• Min-Cut: Minimum size of Cuts = 5• Max-Flows from S to T• Min-Cut = Max-Flow
S
A B
D C
T
3 3
3 3
2
2
2
4S
A
D
3 3
3
2
2
B
C
T
3
3
2
2
43
2
3
2
3
21
7
Unicast | Multicast | Broadcast
Multicast
Broadcast
Unicast
Unicast communication is one-to-one.
Multicast communication is one-to-many.
Broadcast communication is one-to-all.
8
Throughput
• The amount of data transferred from one place to another or processed in a specified amount of time.
• Data transfer rates for disk drives and networks are measured in terms of throughput. Typically, throughputs are measured in kbps, Mbps and Gbps.
9
Wire vs Wireless
An edge between two nodes means that the two nodes are physically connected.
Multicast communication is studied while network coding
of multiple unicast flows remains a largely unknown territory.
The traffic rate (or distribution) is predetermined and
do not change.
Wirevs
Wireless
The channel of one particular edge is actually shared by other neighboring edge.
Unicast communication is the dominate traffic pattern.
Traffic rates are varies over time rather than constant.
Network Modeling
Traffic Pattern
Traffic Rate
WIRE WIRELESS
10
Network CodingWhy?
Definitions
What?
Introduction
11
What is NETWORK CODING
Network Coding is a field of information theory and coding theory and is a method of attaining maximum information flow in a network.
Network Coding Theory points out that it is necessary to consider encoding/decoding data on nodes in network in order to achieve optimal throughput.
12
Multicast Problem
• Butterfly Networks: Each edge’s capacity is 1.
• Max-Flow from A to D = 2
• Max-Flow from A to E = 2
• Multicast Max-Flow from A to D and E = 1.5
• Max-Flow for each individual connection is not achieved.
A
B C
F
G
D E
1
1
1
1
1 1
1
1
10.5 0.5
0.5 0.5
13
• Ahlswede et al. (2000)– With network
coding, every sink obtains the maximum flow.
A
B C
F
G
D E
b1 b2
b1
b1
b2
b2b1+b2
b1+b2 b1+b2
[2] Rudolf Ahlswede, Ning Cai, Shuo-Yen Robert Li, and Raymond W. Yeung. Network information flow. 14
COPE
COPE is an opportunistic approach to network coding to increase the throughput of wireless mesh networks.
COPE inserts a coding layer between the IP and MAC layers, which identifies coding opportunities and benefits from them by forwarding multiple packets in a single transmission.
15[3] S. Katti, D. Katabi, W. Hu, and R. Hariharan, “The importance of being opportunistic: Practical network coding for wireless environments
An information exchange scenario
BobAlice
Relay
Alice’s packetBob’s packet
Bob’s packetAlice’s packet
• Multi-hop unicast requires 4 transmissions• Can we do better?
16
Can Network Coding help - An idea
BobAlice
Relay
Alice’s packet Bob’s packet
Bob’s packet Alice’s packet
3 transmissions instead of 4 Saves bandwidth & power 33% throughput increase
XOR =
17
Analog Network Coding
Analog network coding mixes signals instead of bits.
Wireless routers forward signals instead of packets. It achieves significantly higher throughput than both traditional wireless routing and prior work on wireless network coding(COPE).
18
Network CodingWhat?
Definitions
Why?
Introduction
19
1Improve network throughput
2Superior performance in reducing the number of retransmissions in lossy networks
3Is able to smoothly handle extreme situations where the server and nodes leave the system
Why is NETWORK CODING
20
COPEWireless Communication Project
by Group 2
Contents
General idea1
Opportunistic listening2
Opportunistic coding3
Opportunistic routing4
General idea of cope
Cope is an opportunistic approach to network coding to increase throughput of wireless mesh networks.
The main characteristic of COPE is opportunism.
What is cope?
What is opportunism
?
General idea of cope
Opportunistic listening
Opportunistic coding
Opportunistic routing
A
B C E
D
General idea of cope
Opportunistic Listening
1.Nodes have opportunities to hear packets even when they are not the intended receiver.
2.Nodes store all the packets they hear within a limited time slot T.
3.Nodes send reception reports to their neighbors, helping to create more coding opportunities.
A
B C E
D
Output E1 E2 E3
Output A1 A2 A3
pool
pool
Que
A
B
E
D
E1:B to EA1:D to A
A
B C E
D
Output E2 E3
Output A1 A2 A3
pool
pool
E1
E1
E1
Que
A
B
E
D
E1:B to EA1:D to A
A
B C E
D
Output E2 E3
Output A1 A2 A3
Que
A
B
E
D
pool
pool
E1
E1
E1 E1:B to EA1:D to A
A
B C E
D
Output E2 E3
Output A1 A2 A3
Que E1
A
B
E
D
pool E1
pool
I have E1
E1:B to EA1:D to A
A
B C E
D
Output E2 E3
Output A1 A2 A3
Que E1
A E1
B
E
D
pool E1
pool
E1:B to EA1:D to A
A
B C E
D
Output E2 E3
Output A2 A3
Que E1
A E1
B
E
D
pool E1
pool
A1A1
A1E1:B to EA1:D to A
A
B C E
D
Output E2 E3
Output A2 A3
Que E1
A E1
B
E
D
pool E1
pool
A1 A1 A1
E1:B to EA1:D to A
A
B C E
D
Output E2 E3
Output A2 A3
Que E1 A1
A E1
B
E
D
pool E1
pool A1
I have A1
E1:B to EA1:D to A
A
B C E
D
Output E2 E3
Output A2 A3
Que E1 A1
A E1
B
E A1
D
pool E1
pool A1
Node A have packet E1Node A want packet A1So I can give Node A
E1+A1
Node E have packet A1Node E want packet E1So I can give Node E
E1+A1
Coding opportunity
E1:B to EA1:D to A
A
B C E
D
Output E2 E3
Output A2 A3
Que E1 A1
A E1
B
E A1
D
pool E1
pool A1
Coding opportunity
E1 A1E1+A1
E1:B to EA1:D to A
A
B C E
D
Output E2 E3
Output A2 A3
Que
A E1
B
E A1
D
pool E1
pool A1
Coding opportunity
E1+A1
E1:B to EA1:D to A
A
B C E
D
Output E2 E3
Output A2 A3
Que
A E1
B
E A1
D
pool E1
pool A1
E1+A1E1+A1
E1:B to EA1:D to A
A
B C E
D
Output E2 E3
Output A2 A3
Que
A E1
B
E A1
D
pool E1
pool A1
E1+A1
E1+A1
E1+(E1+A1)=A1 A1 received!
A1+(E1+A1)=E1 E1 received!
E1:B to EA1:D to A
Opportunistic Coding
Each node should answer this question based on local information and without consulting with other nodes.
Each node has several options to decide which packets to XOR together to gain the maximum throughput.
How can the node decide which packets needed to XOR together?
Opportunistic Coding
A B
C
D
Opportunistic Coding
P1
P2
P4
P3
Packets Next Hops
P1P2P3P4
Node
B’s queue
B
A
B
C
D
Opportunistic Coding
P1P2P3P4
P3P4
P1P4
P1P3
= P1 P2+
=P1 P2+
A B
C
D
Bad coding decision
Packet nodeP1-----AP2-----BP3-----CP4-----D
Opportunistic Coding
P1P2P3P4
P3P4
P1P4
P1P3
= P1 P3+
=P1 P3+
=P3 P1+
A B
C
D
Better coding decision
Packet nodeP1-----AP2-----BP3-----CP4-----D
Opportunistic Coding
P1P2P3P4
P3P4
P1P4
P1P3
= P1 P3+
=P1 P3+
=P3 P1+P4+
P4 +
P4 +
=P3 P4+P1 +A B
C
D
Best coding decision
Packet nodeP1-----AP2-----BP3-----CP4-----D
Opportunistic Coding
Theory:To transmit n packets, p1,…,pn, to n receivers, r1,…,rn, a node can XOR the n packets together only if each intended receiver ri has all n-1 packets pj for j not equals to i.
Opportunistic Coding
rn-2
r1 rn
rn-1r2
r3
riri-1
P1…Pi-1,Pi+1…PnP1…Pi-2,Pi…Pn
:XOR P1 to Pn
PiPi-1
P3
P2
P1
Pn-2
Pn-1
Pn
Opportunistic Coding
Whenever a node has a chance to transmit a packet, it tries to find the largest n that satisfies the above rule.
The node tries to maximize the number of packets delivered in a single transmission.
Opportunistic Routing
1.The path is stored in the packet itself.
2.Check the path, find the opportunities to routing.
Can we further reduce the number of transmissions?
Opportunistic Routing
A S B D
Path: SABD
source Destination
Receptionreport
Conclusion
• Main idea of cope:1.Overhear on the medium.2.Learn the status of its neighbors.3.Detect coding opportunities.4.Code as long as the receivers can
decode.
COPE IMPLEMENTATION
&PERFORMANCE
52
Agenda
Data Structure for each node
Pseudo broadcast mechanism
COPE layer
COPE header
Gain
53
DATA STRUCTURE
54
A SCENARIO
AB
C
D
E
F
G
RR
Reception report
P
IP packet
Ack
IP acknowledge
P
P
P
PPP
P
P
P
Packet Delivery
55
A SCENARIO(II)
AB
C
D
E
F
G
RR
Reception report
P
IP packet
Ack
IP acknowledge
Ack
Ack
Ack
Ack
Packet acknowledge
56
A SCENARIO(III)
AB
C
D
E
F
G
RR
Reception report
P
IP packet
Ack
IP acknowledge RRRR
RRRR
RRRRRR
RRRR
RR
RRRRRRRR
RR
Reception Report
57
DATA STRUCTURE
AB
C
D
E
F
G
RR
Reception report
P
IP packet
Ack
IP acknowledge
58
DATA STRUCTURE
P1
CIn Node C
Output Queue:P2P3P4
Retransmission pool:
Upper Layer
P5P6 P1
Packet Transmitted
59
DATA STRUCTUREC
In Node C
Output Queue:P2P3P4
Retransmission pool:
Upper Layer
P5P6
P1Ack ReceivedP1 can be deleted
If ack is not received after a long time
P1
P1 returns to Output Queue to waitanother transmission opportunity
60
DATA STRUCTURE
RR: a,b,c,d,x
P1
CIn Node C
Output Queue:P2P3P4
Retransmission pool:
Upper Layer
P5P6
Opportunity Listening Queue:If node C receive a neighbor’s packet whose destination is not C, Node C just put the packet into the above queue.
Px is head for node DNot C.
Pa Pb Pc Pd
Periodical,Each node inform its neighbor about what they’ve got in its Opportunity Listenning Queue. That is , Reception Report
61
DATA STRUCTURE
P1
CIn Node C
Output Queue:P2P3P4
Retransmission pool:
Upper Layer
P5P6
Neighbors’ virtual Queue:A queue
B queue
D queue…… …………………………
Opportunity Listening Queue:Pa Pb Pc Pd Px
62
DATA STRUCTURE
P1
CIn Node C
Output Queue:P2P3P4
Retransmission pool:
Upper Layer
P5P6
Neighbors’ virtual Queue:A queue
B queue
D queue…… …………………………
Opportunity Listening Queue:
RR from A
Pa Pb Pc Pd Px
RR from B
RR from D
Used for decoding
Used for Coding
63
• Packet headed to the same destination can never be coded together
• It is not necessary to code a packet in opportunity listening queue
• It is not necessary to transmit a packet when it is received again from its destination
• A node can decode a packet which is coded with one of the packet he once send
DATA STRUCTURELOGIC
64
DATA STRUCTURE
Output Queue:
Retransmission pool:
Upper Layer
Opportunity Listening Queue:
P1P2P3P4P5P6 P1P1
65
DATA STRUCTURE
4 PARTS:
Output Queue
Retransmission Pool
Opportunity Listening Queue
Neighbor’s Virtual Queue
66
PSEUDO BROADCASTMECHANISM
Laptop1
Laptop2
Laptop3
Both laptop2 and laptop3 are the intendedReceiver of packet from laptop1
[4] Katti S, Rahul H, Hu WJ, Katabi D, Muriel M, Crowcroft J. XORs in the air: Practical wireless networking. 67
PSEUDO BROADCAST
802.11 MAC:Current WLAN medium access mechanism
1. DCF CSMA/CA(mandatory) -Distributed Foundation Wireless MAC
-Collision avoidance via randomized back-off-ACK packet for acknowledgement(not for broad cast)
2. DCF RTS/CTS(optional)-avoids hidden terminal and exposed terminal
3. Point Coordination Function(infrastructure mode)
How to apply COPE? Opportunistic Listenning?Multiple intended receiver?All neighbors can receive?
BROADCAST
68
PSEUDO BROADCAST
802.11 MAC:802.11 Broadcast mode:
1. DCF CSMA/CA? Yes
2. Back off? No
3. DCF RTS/CTS? No
4. ACK? No
POOR RELIABILITY69
PSEUDO BROADCAST
802.11 MAC:
SOLUTION?
1. Develop a brand-new MAC access protocol which is suitable for COPE broadcast
2. Add a new layer on top the current 802.11 MAC layer to make link-to-link broadcast
reliable.
Hard to implement…..Unrealistic….802.11 WLAN MAC already pervasive
Feasible!
2. PSEUDO BROADCAST
70
PSEUDO BROADCASTReliability
1. ACK2. Retransmission(ACK timeout)3. Multiple Intended Receiver
Packet
SIFS
Packet
ACK
DIFS& backoff
SIFS
ACK
One receiverMulti receiver
ACK ACK
ACK ACK
Collision!
Synchronous Acknowledgement does not work!Receiver can send ACK packet asynchronously
1. We can treat Ack packet as a normal packet, ACK packets from different Receivers also go through the DIFS and back off procedure to avoid collision
2. Or we can piggy back on packet travelling in the reverse direction
71
PSEUDO BROADCASTWhat should be contained in COPE
packet?
1. XORed(coded) packet with multiple receivers2. uncoded packet with multiple receivers(all neighbors)3. Reception Report with multiple receivers (all neighbors)4. Packet Acknowledge with certain receiver
Later on we will give a detailed description about the COPE packet format
72
COPE LAYERWhere does cope layer lies in?
Network Layer
COPE layer
MAC layer
It is the COPE layer where the four data structure: Output Queue, Retransmission pool, Opportunistic listening pool And neighbors’ virtual queue lies in.
COPE layer is a very slim layer lies between Network layer and MAC layer.
COPE layer process the network layer packets before they are send to MAC layerCOPE layer process the MAC layer frames before theyAre send to Network layer
73
COPE LAYER
Network Layer
COPE layer
MAC layer
Sender side
Get a packet from network layer
Add the packet into Output Queue
Encode if possible
74
COPE LAYER
Network Layer
COPE layer
MAC layer
Sender side
Get a packet from network layer
Add the packet into Output Queue
Encode if possible
Encoded?
Add packet to Retransmission
poolPiggy back Reception Report
Piggy back asynchronous acknowledge
Yes
No
To MAC layer 75
COPE LAYER
Network Layer
COPE layer
MAC layer
receiver side
Get a packet from MAC
Extract acks for me
Delete correponding
packets in retransmission pool
If there is any
Extract Reception ReportRecord RR in
neighbors’ virtual queueIf there is any
Am I the next hop? Add to opportunity listening poolNo
Yes
76
COPE LAYER
Network Layer
COPE layer
MAC layer
receiver side
I am the next hop
This packet is encoded? Decodable?
Decode and schedule Ack
Am I destination?
Deliver to Network layer
Send into Output Queue
Yes
No
YesNo
Yes
77
COPE HEADER
COPE header
IP header
MAC header
Data Frame
Encoded Packet ID
ReceptionReport(Packet ID)
Asynchronous ACK
1. Encoded packet numberEnocded packet IDsIntended receiver s
2. Number of packets receivedPackets ID
3. Received packets’ IDACK receiver
78
Coding Gain
79[3] S. Katti, D. Katabi, W. Hu, and R. Hariharan, “The importance of being opportunistic: Practical network coding for wireless environments
Coding Gain
80[4] Katti S, Rahul H, Hu WJ, Katabi D, Muriel M, Crowcroft J. XORs in the air: Practical wireless networking.
Coding Gain
81[4] Katti S, Rahul H, Hu WJ, Katabi D, Muriel M, Crowcroft J. XORs in the air: Practical wireless networking.
ANALOGNETWORK
CODING
82
Alice-Bob topology
83[5] Katti S, Gollakota S, Katabi D: Embracing Wireless Interference: Analog Network Coding
Traditional Approach
Alice
Router
Bob
Alice transmits
Router forwards
Bob transmits
Router forwards
Time slot 1 Time slot 2 Time slot 3 Time slot 484
Digital Network Coding
Alice
Router
Bob
Alice transmits Bob transmits Router forwards
Time slot 1 Time slot 2 Time slot 385
Analog Network Coding
Alice
Router
Bob
Alice & Bobtransmits Router forwards
Time slot 1 Time slot 286
How can we do it?
Alice
Bob87
How can we do it?(Cont.)
AliceREC
AliceSND
88
How can we do it?(Cont.)
• What will Alice do?Demodulate and do some signal
processingNote the starting bit for interferenced
signalDo XOR for interferenced signal
89
How can we do it?(Cont.)
• Smart Alice!• She must learn the characters of the
wireless channel• She must store the packets which already
sent by herself
• She may do the XOR job effectively
90
Easier?
• Choose the right modulation method
•MSK• Some experiments are already done by
using Software Defined Radios (SDR).• Successful results showed that we got
significant throughput gains compared to COPE and traditional ways.
91
Drawbacks
• Vulnerable to noises• Difficult to use in more complex topology
networks
Future investigation is still needed ! ! !
92
WHAT WE MAY LEARN FROM ANC?
• Think differently• Electrical engineer & computer
scientist• PHY layer & MAC layer &
Network layer93
Wireless Communication Project by Group 2
94
Wireless Communication Project by Group 2
95