-To better understand how channel coding works, we will take the example of a repetition code with the following binary sequence: 00101. To make it easier, we will use a 3-repetition code. So the first information bit 0 goes through our channel coding to produce the following codeword: 000. The second information bit 0 produces the codeword 000. The third information bit 1 produces the codeword 111. The fourth information bit 0 produces the codeword 000. And the fifth information bit 1 produces the codeword 111. This new sequence is then modulated, transmitted via the channel and demodulated. Because of channel noise, let us assume that we receive one error in the first codeword, no error in the second codeword, two errors in the third codeword, three errors in the fourth codeword, and finally one error in the last codeword. Before explaining what channel decoding is, let us introduce a few notions. We saw that we had two possible types of information bits, 0 or 1. Each information bit is then encoded via our channel coding, here a 3-repetition code, in order to produce the corresponding codeword. So the information bit 0 produces the codeword 000 and the information bit 1 produces the codeword 111. We can observe here that we have only two possible codewords, 000 or 111, whereas after demodulation and because of the noise, we can have eight possible codewords. Thanks to this property, we can already detect some errors. Let us have a closer look at the received sequence. The first received codeword 010 is not a valid codeword and an error is thus detected. The second received codeword 000 is a valid codeword so no error is detected. The third received codeword 010 is not a valid codeword, and an error is detected. The fourth received codeword 111 is a valid codeword, so no error is detected even though this specific codeword is erroneous. Finally, the last received codeword 011 is not a valid codeword and an error is detected. We can thus define an interesting property for channel coding called the error detection capability. The error detection capability is the maximal number of errors which can be detected in a codeword. In our example, our detection capability is 2. Let us assume that one codeword has three errors. We sent the information 000, but received 111. Since 111 is a valid codeword, the error cannot be detected. Similarly, for the codeword 111, let us assume that we received the codeword 000, the error cannot be detected either as 000 is also a valid codeword. At this stage, the decoder can already work in detection mode. This way, when it detects an error, the receptor can notify the transmitter so they can transmit the corresponding codewords again or mark these codewords as erroneous for additional processing in the upper layers. We have seen so far how to detect errors or erroneous codewords at the receptor level. Now, let us wonder if we can go further and correct these errors upon reception. To do so, we will consider the decoding algorithm called majority voting. Majority voting consists in determining whether a received codeword should be a 0 bit or 1 bit by counting the occurrences of 0s and 1s. To illustrate this, let us go back to our received sequence. We have here in red erroneous bits and circled in blue are the codewords where an error was detected. For the first codeword 010, we count two 0s and one 1, so we decide that this codeword equals the information bit 0. This is true, we are not mistaken and we can correct the codeword. For the second codeword 000, we decide that the corresponding information bit is 0. For the third codeword, 010, we have two 0s and one 1, so we decide that the corresponding information bit is 0. Here, we are mistaken since a bit 1 was transmitted. For the fourth codeword 111, we have three 1s, so we decide that the information bit sent was 1, which is a mistake, since we sent an information bit 0. Finally, for the last codeword 011, we have two 1s and one 0, so we decide that the corresponding bit is 1, which is true and this codeword was properly corrected. By analogy with the detection capability, we can now introduce the correcting capability, or Cc. The correcting capability is the maximal number of erroneous bits which can be corrected in a codeword. In our example of a 3-repetition code, our correcting capability is 1. Why? Because if we have two errors... Let us assume that the transmitter transmitted 1, which is encoded through channel coding in the codeword 111. After going through the channel and the demodulator, we end up with the erroneous codeword 010. Since we have two errors here and with the majority voting algorithm, we will decide that this erroneous codeword actually matches the information bit 0. This is of course false, since we transmitted 1. We have been learning how to improve our bit error rate by introducing the notion of channel coding. In fact, thanks to the detection and correcting capabilities, we can reduce the bit error rate. Let us have a look at the impact of channel coding on occupied bandwidth. But first, just a reminder of what you learnt in week 3. You learnt that the baud rate was the bit rate divided by the number of bits per symbol. You also learnt that the occupied bandwidth was proportional to the baud rate. From these two relations, we can conclude that the occupied bandwidth is proportional to the bit rate. Let us go back to our 3-repetition code. We introduce three encoded bits for every information bit and thus our bit rate has tripled. This means that our occupied bandwidth has also tripled. This is not a good thing, since we have a larger occupied bandwidth, and thus use more frequency to transmit the same amount of information bits. Let us go even further and consider a 5-repetition code. In this case, for both information bits 0 and 1, we will have the following codewords: 00000 and 11111. As practice, you can show that this will improve our detection and correcting capabilities and give us a Cc which equals 2 and a Cd which equals 4. On the other hand, given the relation which we showed earlier, we will use five times more occupied bandwidth. This leads us to compromise between the occupied bandwidth and the detection and correcting capabilities.