Error Correcting/Control Codes (ECC)
About CourseLearn Channel Coding in a simple way
Error Correcting/Control Codes (ECC)
Channel Coding is a method to replace ‘original data bits’ with ‘some other bits (normally longer than the original bits)’. For example, the simplest coding would be as follows :
0 –> 0000 : replace all ‘1’ in original data into ‘0000’
1 –> 1111 : replace all ‘1’ in original data into ‘1111’
Another example of coding would be the addition of parity bits as in RS 232 communication
original seven-bit data –> original seven-bit data + one parity bit
In the communication system, we usually call ‘the original data’ as a ‘message’ and call the encoded data as ‘Codeword’. In all encoding process, the length of Codeword is greater than the length of ‘message’, it means that in coding process some additional bits are added to the original data(message) and these additional bits are called ‘redundancy bits’.
Why do we need this kind of Coding?
Most of the experts in this area would come out with something like ‘Shannon’s theorem’.. but let’s just intuitively look at this rather than bringing up such a scary word.
Let’s look at the simple wireless communication process that we went through in the previous section. In this process, what do you think is the biggest problem?
Just give yourself a moment to think before you go on.
The answer is the ‘noise’ which is added by ‘Channel’. As you can guess, this noise would make a lot of errors while the receiver is demodulated the received signal into the bitstream.
What would be the solution to this problem?
We can think about two possible options.
- Make the channel noise-free. (Construct the channel in such a way there is no noise)
- Use some method to detect and correct the error
Which option do you prefer? You would know that the first option would be almost impossible especially in wireless communication. If it is wired communication, at least you can make some try to reduce the noise in the channel but in wireless, it is almost impossible to remove the noise directly from the channel.
It means the only option is to develop some method (algorithm) to detect and correct the error caused by the noisy channel. This is the main motivation for ‘Coding’.
The main idea of Coding is to add some additional bits (we call these redundancy bits) to original data in a very special way (not in a random/arbitrary way) so that they can be used to detect the exact location of the error and correct it.
In the communication chain, the following two blocks are added for this purpose. ‘Encoding’ is the process of adding redundancy bits and ‘Decoding’ is the process of extracting the error corrected bits from the received data.
Usually, Encoding/Decoding blocks locate as shown below. Encoding takes in the bits stream and produces a coded bitstream.
Getting into further detail, this encoding often happens in two steps called Source Coding and Channel Coding, but in this post, I will just describe this process as a single step.
In the previous section, I said, “Encoding/Decoding is mainly for detecting/correcting errors generated in the communication process”. It is a very good and important step. But once you gain something, you would lose some other things. It is almost the nature of everything including our life.
What is the gain for Encoding/Decoding? It is the received data with less or almost no error.
What is the loss? What is the downside of this process? Following are the major issues caused by the Encoding/Decoding process.
- Data Transmission Overhead (Due to redundancy bits)
- Complicate the data transmission and reception process (due to encoding/decoding algorithm)