Some Important Concepts Bandwidth How fast can signals
Some Important Concepts • • • Bandwidth – How fast can signals change. Or, the width of the frequency range that can pass the system. Noise – Will be added to the signal. Random, but some statistics can be known with which we make our detection rules. Data rate – How fast can we send bits, can be measured in bps. Upper bounded by the Shannon’s theorem given the bandwidth and noise. Propagation delay – How long does it take for the symbol to reach to the destination. Symbol – A point on the plane to represent one bit or multiple bits. Sample – A reading of the received signal at some time instant. Usually a corrupted version of the symbol. Filter – Some device or software that can remove certain frequency components in the received waveform. Carrier – A sine wave to be multiplied with the baseband waveform. Baseband waveform – The waveform that is a smoothed version of the square waveform after the low pass filter. To be multiplied with the carrier.
Error Control Code
Error Control Code • Widely used in many areas, like communications, DVD, data storage… • In communications, because of noise, you can never be sure that a received bit is right • In physical layer, what you do is, given k data bits, add n-k redundant bits and make it into a n-bit codeword. You send the codeword to the receiver. If some bits in the codeword is wrong, the receiver should be able to do some calculation and find out – There is something wrong – Or, these things are wrong (for binary codes, this is enough) – Or, these things should be corrected as this for non-binary codes – (this is called Block Code)
Error Control Codes • You want a code to – Use as few redundant bits as possible – Can detect or correct as many error bits as possible
Error Control Code • Repetition code is the simplest, but requires a lot of redundant bits, and the error correction power is questionable for the amount of extra bits used • Checksum does not require a lot of redundant bits, but can only tell you “something is wrong” and cannot tell you what is wrong
(7, 4) Hamming Code • The best example for introductory purpose and is also used in many applications. • (7, 4) Hamming code. Given 4 information bits, (i 0, i 1, i 2, i 3), code it into 7 bits C=(c 0, c 1, c 2, c 3, c 4, c 5, c 6). The first four bits are just copies of the information bits, e. g. , c 0=i 0. Then produce three parity checking bits c 4, c 5, and c 6 as (additions are in the binary field): – c 4=i 0+i 1+i 2 – c 5=i 1+i 2+i 3 – c 6=i 0+i 1+i 3 • For example, (1, 0, 1, 1) coded to (1, 0, 1, 1, 0, 0, 0). • Is capable of correcting one bit error.
Generator matrix • Matrix representation. C=IG where • G is called the generator matrix.
Parity check matrix • It can be verified that CH=(0, 0, 0) for all codeword C
Error Correction • Given this, suppose you receive R=C+E. You multiply R with H: S=RH=(C+E)H=CH+EH=EH. S is called the syndrome. If there is only one `1’ in E, S will be one of the rows of H. Because each row is unique, you know which bit in E is `1’. • The decoding scheme is: – Compute the syndrome – If S=(0, 0, 0), do nothing. If S!=(0, 0, 0), output one error bit.
How G is chosen • How is G chosen such that it can correct one error? • The key is – • First: • ANY linear combinations of the row vectors of G has weight at least 3 (having at least three `1’s) • ANY codeword is a linear combination of the row vectors • So a codeword has weight at least 3. • Second: • The sum of any two codeword is still a codeword • So the distance (number of bits that differ) is also at least 3. • So if one bit is wrong, won’t confuse it with other codeword. • Because if there is only one bit wrong, the received vector will have one bit difference with the original codeword C 0. If it is also only one bit away from another codeword C 1, it means that C 0 and C 1 have at most two bit difference, a contradiction.
Error Detection • What if there are 2 error bits? Can the code correct it? Can the code detect it? • What if there are 3 error bits? Can the code correct it? Can the code detect it?
The existence of H • We didn’t compare a received vector with all codewords. We used H. • The existence of H is no coincidence (need some basic linear algebra). Let Ω be the space of all 7 -bit vectors. The codeword space is a subspace of Ω spanned by the row vectors of G. There must be a subspace orthogonal to the codeword space spanned by 3 vectors. • So, we can take these 3 vectors and make them the column vectors of H. Given we have chosen a correct G (can correct 1 error), any vector with only one `1’ bit or two `1’ bits multiplied with H will result in a non-zero vector.
- Slides: 12