4F5: Advanced Communications and Coding

Similar documents
The BCH Bound. Background. Parity Check Matrix for BCH Code. Minimum Distance of Cyclic Codes

Berlekamp-Massey decoding of RS code

Lecture 12: November 6, 2017

Solutions of Exam Coding Theory (2MMC30), 23 June (1.a) Consider the 4 4 matrices as words in F 16

Chapter 6 Reed-Solomon Codes. 6.1 Finite Field Algebra 6.2 Reed-Solomon Codes 6.3 Syndrome Based Decoding 6.4 Curve-Fitting Based Decoding

EE 229B ERROR CONTROL CODING Spring 2005

Cyclic Redundancy Check Codes

Communications II Lecture 9: Error Correction Coding. Professor Kin K. Leung EEE and Computing Departments Imperial College London Copyright reserved

5.0 BCH and Reed-Solomon Codes 5.1 Introduction

Lecture 3: Error Correcting Codes

Information redundancy

x n k m(x) ) Codewords can be characterized by (and errors detected by): c(x) mod g(x) = 0 c(x)h(x) = 0 mod (x n 1)

New algebraic decoding method for the (41, 21,9) quadratic residue code

Lecture 12. Block Diagram

Cryptography Lecture 3. Pseudorandom generators LFSRs

Reed-Solomon codes. Chapter Linear codes over finite fields

Coding Theory and Applications. Solved Exercises and Problems of Cyclic Codes. Enes Pasalic University of Primorska Koper, 2013

Error Detection, Correction and Erasure Codes for Implementation in a Cluster File-system

Error Detection & Correction

Chapter 6 Lagrange Codes

Lecture Introduction. 2 Linear codes. CS CTT Current Topics in Theoretical CS Oct 4, 2012

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Discussion 6A Solution

Decoding of the Five-Error-Correcting Binary Quadratic Residue Codes

Error Correction Review

1 Vandermonde matrices

G Solution (10 points) Using elementary row operations, we transform the original generator matrix as follows.

Cyclic codes: overview

ELEC-E7240 Coding Methods L (5 cr)

Optical Storage Technology. Error Correction

Correcting Codes in Cryptography

Outline. MSRI-UP 2009 Coding Theory Seminar, Week 2. The definition. Link to polynomials

REED-SOLOMON CODE SYMBOL AVOIDANCE

16.36 Communication Systems Engineering

Error Correction Methods

Section 3 Error Correcting Codes (ECC): Fundamentals

MATH 433 Applied Algebra Lecture 21: Linear codes (continued). Classification of groups.

Algebraic Codes for Error Control

: Error Correcting Codes. October 2017 Lecture 1

Error-Correcting Codes

Chapter 7. Error Control Coding. 7.1 Historical background. Mikael Olofsson 2005

The number of message symbols encoded into a

MATH 291T CODING THEORY

Physical Layer and Coding

ELEC3227/4247 Mid term Quiz2 Solution with explanation

Lecture 10-11: General attacks on LFSR based stream ciphers

Arrangements, matroids and codes

Binary Primitive BCH Codes. Decoding of the BCH Codes. Implementation of Galois Field Arithmetic. Implementation of Error Correction

3F1 Information Theory, Lecture 3

Chapter 3 Linear Block Codes

Error Correction and Trellis Coding

Chapter 6. BCH Codes

New Algebraic Decoding of (17,9,5) Quadratic Residue Code by using Inverse Free Berlekamp-Massey Algorithm (IFBM)

MATH32031: Coding Theory Part 15: Summary

ECE8771 Information Theory & Coding for Digital Communications Villanova University ECE Department Prof. Kevin M. Buckley Lecture Set 2 Block Codes

Reverse Berlekamp-Massey Decoding

Vector spaces. EE 387, Notes 8, Handout #12

Optimum Soft Decision Decoding of Linear Block Codes

Reed-Solomon Error-correcting Codes

Sparse Polynomial Interpolation and Berlekamp/Massey algorithms that correct Outlier Errors in Input Values

ELEC 519A Selected Topics in Digital Communications: Information Theory. Hamming Codes and Bounds on Codes

Sequences, DFT and Resistance against Fast Algebraic Attacks

MATH3302 Coding Theory Problem Set The following ISBN was received with a smudge. What is the missing digit? x9139 9

Channel Coding I. Exercises SS 2017

An Enhanced (31,11,5) Binary BCH Encoder and Decoder for Data Transmission

MATH Examination for the Module MATH-3152 (May 2009) Coding Theory. Time allowed: 2 hours. S = q

Lecture notes on coding theory


Cryptographic Engineering

3F1 Information Theory, Lecture 3

CYCLIC SIEVING FOR CYCLIC CODES

Topic 3. Design of Sequences with Low Correlation

Coding Theory: Linear-Error Correcting Codes Anna Dovzhik Math 420: Advanced Linear Algebra Spring 2014

Math 512 Syllabus Spring 2017, LIU Post

Making Error Correcting Codes Work for Flash Memory

for some error exponent E( R) as a function R,

Algebra for error control codes

Sector-Disk Codes and Partial MDS Codes with up to Three Global Parities

Coding Theory. Ruud Pellikaan MasterMath 2MMC30. Lecture 11.1 May

6.895 PCP and Hardness of Approximation MIT, Fall Lecture 3: Coding Theory

MATH/MTHE 406 Homework Assignment 2 due date: October 17, 2016

Lecture 4: Codes based on Concatenation

Solutions to problems from Chapter 3

Pseudo-Random Number Generators

Decoding linear codes via systems solving: complexity issues and generalized Newton identities

Adaptive decoding for dense and sparse evaluation/interpolation codes

B. Cyclic Codes. Primitive polynomials are the generator polynomials of cyclic codes.

And for polynomials with coefficients in F 2 = Z/2 Euclidean algorithm for gcd s Concept of equality mod M(x) Extended Euclid for inverses mod M(x)

MATH 291T CODING THEORY

IBM Research Report. Construction of PMDS and SD Codes Extending RAID 5

Lecture 4: Linear Codes. Copyright G. Caire 88

MATH3302. Coding and Cryptography. Coding Theory

MT361/461/5461 Error Correcting Codes: Preliminary Sheet

Dr. Cathy Liu Dr. Michael Steinberger. A Brief Tour of FEC for Serial Link Systems

ERROR CORRECTING CODES

Introduction to Wireless & Mobile Systems. Chapter 4. Channel Coding and Error Control Cengage Learning Engineering. All Rights Reserved.

Ma/CS 6b Class 25: Error Correcting Codes 2

Great Theoretical Ideas in Computer Science

Error Detection and Correction: Hamming Code; Reed-Muller Code

Channel Coding I. Exercises SS 2017

Error Correcting Codes Questions Pool

Transcription:

4F5: Advanced Communications and Coding Coding Handout 4: Reed Solomon Codes Jossy Sayir Signal Processing and Communications Lab Department of Engineering University of Cambridge jossy.sayir@eng.cam.ac.uk Michaelmas 2014 c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 1 / 1

t error correcting coding Problem Statement Design a linear code over a field F that can correct any pattern of up to and including t errors in a codeword of length N. Source, code and observation alphabet (channel/demodulator output) assumed to be identical and of cardinality #(F). An error is defined as any occurrence where a received symbol is not equal to the corresponding transmitted symbol. c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 2 / 1

Compressed Sensing This signal processing problem is related to the t error correcting coding problem on the previous slide. Problem Statement Given a signal vector x that is known to have only up to t non-zero components, design a minimal set of sensors in the form of linear combinations of elements of x from which x can be recovered in full. c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 3 / 1

Hamming Weight (reminder) Definition The Hamming Weight of a vector x, denoted w(x), is the number of non-zero components of x. Rephrasing the compressed sensing problem: how many linear combinations of all components of x do I need in order to recover x in full given that w(x) t? Rephrasing the t error correction problem: let x be the transmitted codeword and r = x + e be the received word. Design a code such that all errors will be corrected if w(e) t. c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 4 / 1

Linear Feedback Shift Register (LFSR) s 0, s 1, s 2,... s k L+2 D D... D D D s k L s k L+1 s k 3 s k 2 s k 1... c L c L 1...... c 3 c 2 c 1 +... + + + s k s 0, s 1,..., s L 1 can be chosen at will and constitute the initial state of the LFSR for k = L, L + 1, L + 2,..., the following relation holds L s k + c i s k i = 0. i=1 c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 5 / 1

LFSR and the z-transform (also called D-transform) for a sequence s = s 0, s 1, s 2,... defined over any field F, the z transform is S(z) = s i z i i=0 in the coding literature, the D-transform is often used, where D = z 1. The advantage of using D is that one can talk about degree of a polynomial in the usual way. We will stick to the z-transform in the interest of consistency with 3F1, but when we speak of degree we will mean the degree of a polynomial in the variable z 1, or the negative power of largest magnitude. the LFSR relation s k + transforms in the z-domain as L c i s k i = 0 for k L i=1 C(z)S(z) = P(z) where C(z) = 1 + c 1 z 1 +... + c L z L, S(z) is the z-transform of the LFSR output sequence, and P(z) is a polynomial in z 1 of degree at most L 1, i.e., zero coefficients for entries corresponding to times L, L + 1, L + 2,... c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 6 / 1

Linear Complexity Definition The linear complexity L(s) of any sequence s = s 0, s 1, s 2,... is the length of the shortest LFSR that can reproduce the sequence. z-transform interpretation: let S(z) = i=0 s iz i, then if C(z) is the polynomial of smallest degree such that then L(s) = deg(c(z)). S(z) = P(z), with deg(p(z)) < deg(c(z)), C(z) for finite length sequences, the linear complexity is defined as that of the shortest LFSR that can reproduce the finite length sequence irrespective of what follows c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 7 / 1

Discrete Fourier Transform (DFT) Definition Let α be a primitive N-th root of unity in F, i.e., α 0, α 1, α 2,..., α N 1 are all distinct and α N = α 0 = 1, then the discrete Fourier transform X = (X 0,..., X N 1 ) of a vector x = (x 0,..., x N 1 ) F N is defined by and the inverse transform is defined by N 1 X k = x i α ik i=0 x i = 1 N 1 X N k α ik k=0 where N = N for F = C or R or for prime finite fields GF(p), and N = N modulo p for extension finite fields GF(p m ). c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 8 / 1

Discrete Fourier Transform (DFT) if F = C then we obtain the familiar discrete Fourier transform with α = e 2jπ/N, which can be defined for any desired length N > 1. if F = R there exists only one discrete Fourier transform of length 2 for α = 1. for finite fields, discrete Fourier transforms can only exist for N divides the order p 1 of the multiplicative group (or p m 1 for extension fields) due to Lagrange s theorem. Any group element except 1 can be used as the α to define a discrete Fourier transform whose length will be the order of that element. c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 9 / 1

The Theorem that Massey attributed to Blahut Jim Massey This theorem was never stated as such by Blahut but was coined Blahut s theorem by Jim Massey in a book review and in his lecture notes. Dick Blahut Theorem Let s be a vector over F and S be its N point discrete Fourier transform, then, provided w(s) < N/2, w(s) = L(S), i.e., the Hamming weight of a time-domain vector is equal to the linear complexity of its discrete Fourier transform. c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 10 / 1

Proof Let S be the periodic repetition of S, then S i z i = S i%n z i i=0 i=0 N 1 N 1 = s k α k(i%n) z i = s k α ki z i i=0 k=0 N 1 = = k=0 N 1 k=0 s k i=0 (α k z 1 ) i i=0 k=0 s k 1 α k z 1 (1) where we used the notation i%n for i modulo N. The final expression is a proper partial fraction expansion of a rational function with w(s) distinct roots, and hence can be re-written as quotient of polyomials P(z)/C(z) where P(z) has degree at most w(s) 1 and C(z) has degree w(s). c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 11 / 1

LFSR Synthesis Given a sequence s, how do we synthesise a minimal LFSR that generates s? Problem can be seen as solving linear equations in unknowns c 1, c 2,..., c L where L = L(s), i.e., s L+1 +c 1 s L +... + c L s 1 = 0 s L+2 +c 1 s L+1 +... + c L s 2 = 0.. s 2L +c 1 s 2L 1 +... + c L s L = 0. If the observation window for s has length at least 2L(s), then there are at least L(s) equations for the L(s) unknowns and the desired LFSR can be syntesised through matrix inversion Berlekamp-Massey algorithm synthesises an LFSR of length L(s) efficiently after observing at least 2L(s) elements of s 2L(s) observations of s are sufficient to generate the whole sequence s c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 12 / 1

Compressed Sensing Question (reminder) How many measurements (linear combinations) of x do I need in order to recover x in full given that w(x) t? Answer Take 2t linear combinations corresponding to any 2t consecutive rows of the DFT matrix, thereby obtaining 2t Fourier coefficients of x. Synthesise the LFSR of length L(X) = t that recovers X. Take the inverse DFT to recover x. Warning in theory, this works for any field including C in practice, an LFSR is not a stable system over continuous fields and hence this method will not work over C Compressed Sensing is a major topic of ongoing research for the signal processing community. Best recovery results are obtained using L1 minimisation and typically require at least 5t measurements (linear combinations) c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 13 / 1

Reed Solomon (RS) Codes Parity-Check matrix, for any even M < N, H = α 0 α 0 α 0... α 0 α 0 α 1 α 2... α N 1 α 0 α 2 α 4... α 2(N 1)......... α 0 α M α 2M... α M(N 1) H consists of the first M rows of the DFT matrix = [α ij ] for i = 0,..., M 1 and j = 0,..., N xh T = 0 implies that the first M coefficients the discrete Fourier transform of any codeword are zero, i.e., a codeword is any sequence over F whose spectrum vanishes over a band of frequencies It can be shown that H has full rank and hence an RS code has rate R = (N M)/N with F N M codewords of length N For example, one possible RS code for ISO 18004:2006 (QR codes) over GF(2 8 ) with N = 255 and M = 12 has length 255 bytes or, equivalently, 2040 bits, and encodes 243 bytes or, equivalently, 1944 bits, for a rate of R = 0.953 c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 14 / 1

Decoding RS Codes The received word r = x + e is the codeword plus the error sequence Since the DFT is linear, this relation holds in the frequency domain, i.e., R = X + E. We know that the DFT of the codeword has M zero coefficients. Hence, the corresponding M coefficients of R are the coefficients of the error vector E Assuming that the error sequence contains at most t errors, the linear complexity of E is at most t and hence observing 2t = M entries of E suffices to reconstruct E and, by inverse DFT, reconstruct e Algorithm: 1 compute rh T = (x + e)h T = eh T = (E 0,..., E M 1 ) 2 synthesise the LFSR that generates E = (E 0,..., E N ) using matrix inversion or the Berlekamp-Massey algorithm 3 take the inverse DFT of E to obtain e 4 compute x = r e if the error sequence has t or less errors, the decoder is guaranteed to correct them irrespective of their position in the received word for example, the (255,243) RS code over GF(2 8 ) can correct any pattern of 6 errors as the DFT of its codewords vanishes over 12 coefficients c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 15 / 1

RS Code example RS code over GF(11). Multiplicative group has order 10, so DFT can have length 2, 5 or 10. We want a code of length 10, so pick an element of order 10. 2 0 = 1, 2 1 = 2, 2 2 = 4, 2 3 = 8, 2 4 = 5, 2 5 = 10, 2 6 = 9, 2 7 = 7, 2 8 = 3, 2 9 = 6, so we can use α = 2 Say we want to correct up to 2 errors, so M = 4, and H = = α 0 α 0 α 0 α 0 α 0 α 0 α 0 α 0 α 0 α 0 α 0 α 1 α 2 α 3 α 4 α 5 α 6 α 7 α 8 α 9 α 0 α 2 α 4 α 6 α 8 α 10 α 12 α 14 α 16 α 18 α 0 α 3 α 6 α 9 α 12 α 15 α 18 α 21 α 24 α 27 1 1 1 1 1 1 1 1 1 1 1 2 4 8 5 10 9 7 3 6 1 4 5 9 3 1 4 5 9 3 1 8 9 6 4 10 3 2 5 7 c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 16 / 1

RS Code example (continued) Systematic parity-check and encoder matrix H sys = G sys = 2 8 2 7 5 6 1 0 0 0 10 9 7 4 10 2 0 1 0 0 7 5 5 4 5 9 0 0 1 0 4 1 9 8 3 6 0 0 0 1 1 0 0 0 0 0 9 1 4 7 0 1 0 0 0 0 3 2 6 10 0 0 1 0 0 0 9 4 6 2 0 0 0 1 0 0 4 7 7 3 0 0 0 0 1 0 6 1 6 8 0 0 0 0 0 1 5 9 2 5 Say we want to encode u = (7, 8, 8, 4, 7, 1), we have x = ug sys = (7, 8, 8, 4, 7, 1, 2, 0, 9, 9) and we can verify that xh T = xh T sys = 0 as expected c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 17 / 1

RS Code example (continued) Now suppose that r = (7, 8, 3, 4, 7, 1, 2, 0, 4, 9) was received Compute the syndrome, corresponding to the first 4 Fourier coefficients of r, s = rh T = (1, 9, 7, 7) find the coefficients (c 0, c 1 ) of a LFSR of length 2 that generates s by solving the equations { 7 + 9c 0 + 1c 1 = 0 yielding (c 0, c 1 ) = (4, 1) 7 + 7c 0 + 9c 1 = 0 reconstruct the complete DFT of the error sequence using the LFSR, E = (1, 9, 7, 7, 9, 1, 9, 7, 7, 9) take the inverse DFT to obtain e = (0, 0, 6, 0, 0, 0, 0, 0, 6, 0) recover the transmitted codeword x = r e = (7, 8, 3, 4, 7, 1, 2, 0, 4, 9) (0, 0, 6, 0, 0, 0, 0, 0, 6, 0) = (7, 8, 8, 4, 7, 1, 2, 0, 9, 9) cut out systematic part to recover the information symbols u = (7, 8, 8, 4, 7, 1) c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 18 / 1

Distance Properties of RS Codes A Reed-Solomon code is an (N, K ) linear code that can correct any pattern of up to t errors and hence its minimum distance, which must be strictly larger than 2t, satisfies d min 2t + 1 = M + 1 = N K + 1. By the Singleton bound, the minimum distance of any (N, K ) code must satisfy d min N K + 1 Minimum Distance The mininum distance of a Reed-Solomon code is d min = N K + 1. The code is maximum distance separable. c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 19 / 1

Interpolation and Decimation x a block of 100 samples of signal x(t) of bandwidth 5 Hz, sampled at 20 samples per second Interpolation Problem: Can we find the 200 samples we would have had if we sampled x(t) at 40 samples per second? Solution: Take DFT, insert 100 zeros, take inverse DFT. Sampling theorem tells us that resulting vector of length 200 is exactly the vector we would have had if x(t) had been sampled at 40 samples per second. Decimation Problem: Can we find the 50 samples we would have had if we sampled x(t) at 10 samples per second? Solution: Drop every second sample. Alternatively, take DFT, eliminate 50 coefficients around the middle, then take inverse DFT. Sampling theorem states that this works if the bandwidth of x(t) is less than half of the new sampling rate. RS Codes There is an interesting parallel between Reed Solomon codes and interpolation in signal processing. Reed Solomon codes can be seen as the finite field equivalent of re-sampling the information sequence at a higher sampling frequency. c Jossy Sayir (CUED) Advanced Communications and Coding Michaelmas 2014 20 / 1