210 likes | 479 Views
Network coding. A.J. Han Vinck updated Jan. 10, 2013. Network coding. Coding for lost packets or packets in error based on error correcting codes Famous example network coding for better routing. Recall binary linear code property. n. 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1 0 1 1.
E N D
Network coding A.J. Han Vinck updated Jan. 10, 2013
Network coding • Coding for lost packets or packets in error based on error correcting codes • Famous example network coding for better routing
Recall binary linear code property n 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1 0 1 1 • rank k matrix 3 • corrects dmin -1 erasures 2 k Consequence: any submatrix with dimensions k x (n – (dmin -1)) 3 x 4 must have rank k and thus an inverse can be constructed
Transmission scheme: P1 P2 Pk C1 C2 Cn ··· ··· G k packets n packets (P1, P2, …, Pk ) G => C1, C2, ..., Cn • then after receiving n – (dmin - 1) correct packets, we can decode C1 C2 Cn P1 P2 Pk ··· G-1 ··· n packets k packets
Example dmin = 3 1 0 0 0 1 1 0 1 0 1 0 1 = 0 0 1 1 1 0 P1 P2 P3 C1 C2 C6 • Packets 3 and 4 are lost. Note that C5 = P1 P3 Take packet 1, 2 and 5 and multiply with G-1 C1 C2 C5 1 0 1 = 0 1 0 0 0 1 P1 P2 P3 Since P1 P3 P1 =P3
Example with Reed Solomon Codes (RS1, RS2, RS3) G = = (c1, c2 , ··· , c7). - Example: c5 =(RS1 RS3) By linearity, c5 is also a code word and can thus be treated as a word from the RS code. Packets in error or lost are treated as erased The RS property can be used to detect errors, or even to correct errors - The minimum distance of the code is 4. => The maximum number of erasures that still allows correct decoding is thus 3. => Hence, after receiving 4 correct RS code words, we can start decoding. - Check that 1 symbol error can be corrected using the binary code
coding • Use error correcting property of k RS-code words n-coded correct correct Lost packet PERFORMANCE: # erased packets < dmin In the example: dmin = 2
Example: Use Reed-Solomon Codes directly • Property: • Length n = 2m-1; • symbols of size m, • minimum distance dmin = n-k+1 • Idea: Consider packets, of length m as symbols for the RS code • Consequence: Any k correct packets can be used to reconstruct the transmitted message
Interleaving + coding • Use error correcting property of RS codes: assume n packets with n symbols 3 RS code words Lost packet Packet 1 PERFORMANCE: all words can be reconstructed if # erased packets < dmin
Aloha (one simple version) • U users transmit a packet with probability P in a time slot • More than one packet is detected as collision • Receivers sends Ack or Nack to all U transmitters • After NACK, the old packet is repeated with probability P • After ACK, a new packet is generated with probability P • Hence, the probability of successful transmission is Prob(1 packet generated in a slot) = pU x (1-p)U-1 for P = 1/U, the Throughput R => e-1 • Note: consider the assumptions that are necessary to have a correct derivation of this result!
Aloha (one simple version) Users send packet with probability P • The probability that no collision occurs is pU(1-p)U-1. • Throughput R for P = 1/U R => e-1 Multi Access channel collision U users 1 >1 idle 1 >1 Ack or Nack to all U transmitters
Multi-user without feedback n • Idea: use long (n,k) RS codes; - U active users; matrix Z x n - Z-ary signature of length n, • Users transmit in slots indicated by signature („random“) • Collision if more than one symbol in a slot • We assume that from a large population, a fraction U is active Z
performance We assume that nPe collisions are detected. For large U and Z, we then have correct decoding for the number of collisions (erasures):
efficiency The maximum is e-1 for G = U/Z => 1, attained in ALOHA with feedback. Here we do not use feedback!
Application for synchronous packet transmission • Example N = 10; T = 1; Pi packet for user i 1 P1 P1 0 0 0 2 P2 0 P2 0 0 3 P3 0 0 P30 4 P4 0 0 0 P4 5 0 P5 P5 0 0 6 0 P6 0 P60 7 0 P7 0 0 P7 8 0 0 P8 0 P8 9 0 0 P9 P9 0 10 0 0 0 P10 P10 • The OR of any two vectors transmitted collision free!! • Example: (0 P7 0 0 P7) OR (0 0 P8 0 P8) = (0 P7 P8 0 collision)
Problem: superimposed codes for MAC protocols the OR of T binary signatures should not „cover“ a valid signature not included in the OR The OR of T signatures ones at all the positions of another user N n Answers the question: is X transmitting? Example: 1 0 0 1 0 1 1 covers 1 0 0 1 0 0 1
Example: for Random Access: T 2; n = 9; N = 12 User signature 1 001 001 010 2 001 010 100 3 001 100 001 4 010 001 100 5 010 010 001 6 010 100 010 7 100 001 001 8 100 010 010 9 100 100 100 10 000 000 111 11 000 111 000 12 111 000 000 R = 3/9 TDMA gives R = 3/12 Example: 011 101 101 = x OR y ?
Another type of protocol sequences(asynchronous) Conflict Avoiding Codes (CAC) These are Optical Orthogonal Codes (OOCs) without autocorrelation constraint and interference 1 weight (w +1) sequence i sequence j sequence k for T ≤ w users, ≥ 1 successful packet for user i Bound on performance: n > 2T N (i.s.o. n > Tlog2N) Nice problem for a thesis!