Linköping University Campus Norrköping Department of Science and Technology Erik Bergfeldt TNE066 Telecommunications Lab/Project Error Control Coding using LDPC Codes and HARQ Error control coding is an important component in modern communications systems. The aim is to protect data from acquiring errors during transmission. By adding systematically redundancy in the data, it is feasible for the receiver to detect and correct errors. The main objective of this project is to implement the sum-product algorithm which is used for iterative decoding of low density parity check (LDPC) codes. In addition, the performance of a digital communication system in terms of error probability should be analyzed, where a LDPC code is used in combination with hybrid automatic repeat request (HARQ) retransmission schemes. 1. Low Density Parity Check (LDPC) Codes Iterative decoding of LDPC codes exhibits similar characteristics as iterative decoding of turbo codes; turbo codes were invented in 1993 and the coding strategy is known as very powerful. Today, turbo codes are broadly used in e.g. mobile telephony standards. LDPC codes are a class of linear error-control codes. Linear codes use a generator matrix G to map messages m to transmitted blocks c, also known as codewords. They have an equivalent description in terms of a related parity-check matrix H. All codewords satisfy Hc = 0. As the name suggests, LDPC codes are defined in terms of a parity-check matrix H that almost entirely consists of zeros. A suitable decoding algorithm for the LDPC codes is the sum-product algorithm. The algorithm is iterative which makes decoding very practical. In practice, LDPC codes are used in e.g. DVB-S2 and WiMAX. 2. Hybrid Automatic Repeat request (HARQ) Automatic repeat request (ARQ) techniques are used in many modern communication systems for improving the reliability of the received data. The idea is that the receiver should transmit an acknowledge message to the transmitter to indicate that it has correctly received a frame of data. If the received frame is corrupted, the transmitter usually retransmits the frame until it is successfully received or the maximum number of allowed retransmissions is reached.
HARQ is more complex compared to ARQ. In ARQ, redundant bits are added to achieve error detection. In HARQ, redundant bits are used for both error detection and error correction; this yields better performance at the cost of increased complexity. In case a received frame of data consists of errors which the decoder is not able to correct, the receiver does not necessarily request an exact copy of the rejected packet in HARQ. The used HARQ scheme decides the structure of the retransmitted data. There are two different kinds of HARQ schemes, denoted type I and type II, respectively. The idea behind is to transmit an identical copy of the rejected packet as soon as the transmitter receives a retransmission request, see Figure 1. I does not send the same data in case of retransmission, it is an adaptive scheme where the concept is to only transmit redundancy when needed, see Figure 2. Figure 1. Graphical illustration of the principle behind. Figure 2. Graphical illustration of the principle behind I.
3 Assignments 3.1 Implementation of the sum-product decoding algorithm The first task is to implement the iterative sum-product algorithm for decoding of LDPC codes. For details regarding the algorithm, carefully read the document Introduction to Low Density Parity Check Codes and Hybrid Automatic Repeat Request Techniques which is available on the course website. To pass this task, the implemented algorithm should generate values that are in line with the example presented in the document Tutorial the sum-product algorithm for decoding of LDPC codes (available at the course website). That is, use the received codeword r as specified in the document and run the algorithm to verify that the calculations are performed appropriately. 3.2 Analysis of frame error rate when using LDPC codes and HARQ Based on the figures shown below (Figure A-F) and with respect to the theory of error control coding and HARQ, the task is to identify which figure is illustrating a reasonable error rate performance as the signal to noise ratio (SNR) varies (the SNR corresponds to the ratio between the signal energy per coded symbol E and the noise energy N 0 ). The correct figure is generated through simulations according to the simulation setup described in Appendix. Hence, it is feasible to make use of the implemented sum-product algorithm and details specified in Appendix to reproduce the error rate calculations (and thereby verify that a correct choice has been made regarding figures A-F). However, it is not necessary to perform this simulation study in order to pass the task. 3.3 Submission of code and report When the sum-product algorithm has been implemented appropriately (with regard to the example in the tutorial) and a reasonable choice has been made regarding the error rate curves in figures A-F, submit the implemented code and a short report in an e-mail. The code should include comments that clearly explain the implementation. The report should specify which figure is corresponding to the frame error rate when no HARQ,, and I is used for error correction. The report has to include a decent and carefully written explanation of why this choice has been made, and why the other figures show an unreasonable performance. The shape of the curves should be motivated with regard to theory.
FIGURE A: I FIGURE B: I
FIGURE C: I FIGURE D: I
FIGURE E: I FIGURE F: I
APPENDIX A.1 Simulation Setup Figure 3 depicts the digital communication system which has been considered in this frame error rate study. The first block represents the information source. Its output consists of information sequences divided into frames of k information symbols, where each symbol can take on the values {0, 1}. These frames of information, denoted m, are fed into the next block, the encoder. The encoder maps each frame m into a codeword, denoted c, by adding a given amount of redundancy to each information sequence. Every codeword c have the length of n symbols, where each coded symbol can take on the values {-1, +1}. The modulator takes each codeword and maps the coded symbols to suitable signal waveforms with desired amplitudes. Each signal waveform, denoted s i (t), has duration of length T and is used for transmission over the channel. At the receiver, the demodulator takes the received signal waveforms, denoted r(t), and obtains the statistic r. The decoder considers vector r and, with help from the redundant symbols, it tries to make the best possible reconstruction of the original information m. Figure 3. A digital communication system with retransmission possibilities. The encoder uses a LDPC code in order to map the information sequence into a codeword. More specifically it takes an information sequence of 48 symbols and maps it into a codeword of length 96 symbols. Out of these 96 coded symbols, we consider the first 48 symbols as the information part whereas the remaining part contains the redundancy. The used modulation is binary phase shift keying (BPSK). BPSK is not known as the best possible modulation approach, but it is fairly common in existing communication systems. The channel model corresponds to an additive white Gaussian noise (AWGN) channel. This well known and frequently used model is based on thermal noise which is unavoidable in all electronics. The channel affects the modulated symbols randomly by adding a Gaussian random noise process, denoted n(t), to the transmitted waveforms s(t).
The decoder applies soft decision decoding on the received vector r. That is, the reliability of each received symbol is used by the decoding process, in contrast to hard decision decoding in which reliability information is discarded. This is known to result in better performance, however, the decoder turns out to be more complex. Furthermore, the decoding procedure used in this work is the iterative sum-product decoding algorithm. For the case when decoding fails, i.e. the decoded information does not fulfill the given reliability criterion, the receiver has the option to request a retransmission. A retransmission request is sent from the decoder through a feedback channel to the encoder. For simplicity, the feedback channel is assumed to be noise free and hence Figure 3 illustrates a separate feedback channel for retransmission requests. The decoding procedure in the case of activated retransmission functionality is shown in Figure 4. Figure 4. Illustration of the decoding procedure in presence of HARQ. A frame error occurs when at least one information symbol (i.e. one single bit considering the k information bits) is incorrect after decoding. The signal-to-noise ratio (SNR) corresponds to the ratio between the signal energy per coded symbol E and the noise energy N 0. A.2 Additional Specifications and Implementation Hints The parity-check matrix H of the LDPC code that should be used in this study is available in the MATLAB file H.mat (see the course website). Write load( H.mat ) in MATLAB and the variable H corresponds to the parity-check matrix. The generator matrix G is not available and, hence, it is not straight forward to generate different codewords (especially since H is not in systematic form). However, since we know that the all-zero codeword (i.e. a codeword which only consists of zeros) is always a valid codeword for any G, you are encourage to use this as the codeword c that is transmitted over the channel; although it is not very likely that the same information is continuously sent in a communication system, this assumption does not affect the error probability performance, which is of main interest in this study. Although it is specified that the BPSK modulation technique is used, you do not have to convert sequences of -1s and 1s to analog signals at the sender. Instead, you simply apply
the function awgn_channel.m. The required input to the function is the codeword c and the amplitude that is supposed to be used by the BPSK modulation (recall: the amplitude corresponds to the square root of the used energy). The output of awgn_channel.m is the received vector r which should be forwarded to the sum-product decoding algorithm. The power spectral density of the AWGN is normalized with respect to N 0 /2 = 1 (i.e. N 0 = 2). Hence, the SNR of the channel (which is defined as E/N 0 ) is changed by adjusting the amplitude of the transmitted signals as A = (SNR N 0 ) ½ = (E/N 0 2) ½ ; note that the amplitude A is used as input to the channel model and also that the SNR cannot be in db when making the amplitude computation. To ensure a finite number of iterations in the decoding algorithm, we have to set a maximum number of allowed iterations per decoding attempt. To avoid heavy and timeconsuming simulations, the maximum number of iterations per decoding attempt should be set to 10 iterations throughout this study. The only reason to stop the decoding procedure before the maximum number of iterations has been reached is that the reliability criterion is fulfilled. In this study, the reliability criterion is fulfilled when the decoder has obtained a valid codeword (i.e. when all checks are satisfied). This is a decent stopping rule, although the algorithm can still make mistakes since it is possible to converge to wrong codewords. When HARQ is used, at most 3 retransmissions are allowed for each frame of information. For I, the sender should transmit the first 60 symbols of the frame (i.e. the information bits and 12 redundant bits) during the first transmission attempt. In case of retransmissions, the first retransmission should consists of redundant symbols located to the positions 61-72 in the codeword c, for a second retransmission the next 12 parity symbols should be sent (i.e. bits in the interval 73-84 in c), and finally if three retransmissions are needed the last one provides the receiver with the remaining parity symbols (in the interval 85-96). The sum-product algorithm consists of an inverse hyperbolic tangent (i.e. tanh -1 ) computation. Since tanh -1 (x) approaches +/- infinity as x goes to +/- 1, there is a potential risk of error in MATLAB due to limitations of the numerical precision. Hence, in order to avoid that MATLAB returns +/- infinity when making the tanh -1 computation, it is suitable to include a limitation similar to the pseudo code (note: tanh -1 (0.9999) 5): if (-0.9999 < tanh -1 (x)) & (tanh -1 (x) < 0.9999) % perform the atanh computation as specified in the % sum-product algorithm else atanh_computation = 5*sign(tanh -1 (x)); end In order to obtain a reasonably accurate estimate of the frame error rate (FER), make sure that at least 100 frame errors have occurred for each SNR that is considered; then estimate the FER as the ratio: (number of frame errors, after decoding and retransmissions) / (number of transmitted frames, excluding retransmitted frames) Perform simulations with SNRs E/N 0 from -2 db and then increase E/N 0 in steps of 0.5 db until the FER seems to be smaller than ; e.g. stop the simulation when 1 / = 1000 consecutive frames (excluding retransmissions) have been sent without receiving a frame error.