scs Module 5 Sas

  • Upload
    robinpt

  • View
    221

  • Download
    0

Embed Size (px)

DESCRIPTION

signals and communications module 5

Citation preview

Types of coding system in telecom.

Error detection and correction

Error detection means to decide whether the received data is correct or not without having a copy of the original message.

Error detection uses the concept of redundancy, which means adding extra bits for detecting errors at the destination. Error correction is the detection of errors and reconstruction of the original, error-free dataMake sense of message. Make sense of message.

Suppose we have data words of length m = 8. Then: (8 + r + 1) 2 r implies that r must be greater than or equal to 4.This means to build a code with 8-bit data words that will correct single-bit errors, we must add 4 check bits, creating code words of length 12.2.8 Error Detection and Correction8The minimum Hamming distance for a code, D(min), determines its error detecting and error correcting capability. For any code word, X, to be interpreted as a different valid code word, Y, at least D(min) single-bit errors must occur in X.Thus, to detect k (or fewer) single-bit errors, the code must have a Hamming distance of D(min) = k + 1.2.8 Error Detection and Correction3Hamming codes can detect D(min) - 1 errors and correct errorsThus, a Hamming distance of 2k + 1 is required to be able to correct k errors in any data word.Hamming distance is provided by adding a suitable number of parity bits to a data word.2.8 Error Detection and Correction

4Suppose we have a set of n-bit code words consisting of m data bits and r (redundant) parity bits. An error could occur in any of the n bits, so each code word can be associated with n erroneous words at a Hamming distance of 1.Therefore,we have n + 1 bit patterns for each code word: one valid code word, and n erroneous words.2.8 Error Detection and Correction5With n-bit code words, we have 2 n possible code words consisting of 2 m data bits (where n = m + r).This gives us the inequality: (n + 1) 2 m 2 n Because n = m + r, we can rewrite the inequality as: (m + r + 1) 2 m 2 m + r or (m + r + 1) 2 r .2.8 Error Detection and Correction6Suppose we have data words of length m = 4. Then: (4 + r + 1) 2 r implies that r must be greater than or equal to 3.This means to build a code with 4-bit data words that will correct single-bit errors, we must add 3 check bits.Finding the number of check bits is the hard part. The rest is easy.2.8 Error Detection and Correction7With code words of length 12, each of the digits, 1 -12, can be expressed in powers of 2. Thus: 1 = 2 05 = 2 2 + 2 0 9 = 2 3 + 2 0 2 = 2 16 = 2 2 + 2 110 = 2 3 + 2 1 3 = 2 1 + 2 07 = 2 2 + 2 1 + 2 011 = 2 3 + 2 1 + 2 0 4 = 2 28 = 2 312 = 2 3 + 2 21 (= 20) contributes to all of the odd-numbered digits.2 (= 21) contributes to the digits, 2, 3, 6, 7, 10, and 11.. . . And so forth . . .2.8 Error Detection and Correction9Using our code words of length 12, number each bit position starting with 1 in the low-order bit.Each bit position corresponding to an even power of 2 will be occupied by a check bit.These check bits contain the parity of each bit position for which it participates in the sum.2.8 Error Detection and Correction

10Since 2 (= 21) contributes to the digits, 2, 3, 6, 7, 10, and 11. Position 2 will contain the parity for bits 3, 6, 7, 10, and 11.When we use even parity, this is the modulo 2 sum of the participating bit values.For the bit values shown, we have a parity value of 0 in the second bit position.2.8 Error Detection and Correction

What are the values for the other parity bits?11

The completed code word is shown above.Bit 1checks the digits, 3, 5, 7, 9, and 11, so its value is 1.Bit 4 checks the digits, 5, 6, 7, and 12, so its value is 1.Bit 8 checks the digits, 9, 10, 11, and 12, so its value is also 1.Using the Hamming algorithm, we can not only detect single bit errors in this code word, but also correct them!2.8 Error Detection and Correction12

Suppose an error occurs in bit 5, as shown above. Our parity bit values are:Bit 1 checks digits, 3, 5, 7, 9, and 11. Its value is 1, but should be zero.Bit 2 checks digits 2, 3, 6, 7, 10, and 11. The zero is correct. Bit 4 checks digits, 5, 6, 7, and 12. Its value is 1, but should be zero.Bit 8 checks digits, 9, 10, 11, and 12. This bit is correct.

2.8 Error Detection and Correction13

We have erroneous bits in positions 1 and 4.Error can be found out by adding the bit positions of the erroneous bits.Simply, 1 + 4 = 5. This tells us that the error is in bit 5. If we change bit 5 to a 1, all parity bits check and our data is restored.2.8 Error Detection and Correction1415Parity CheckingA simple form of error detection can be accomplished by appending an extra bit called a parity bit to the code On the sending side, an encoder adds an extra bit, called a parity bit, to each byte before transmissionA receiver uses parity bit to check whether bits in the byte are correctBefore parity can be used, the sender and receiver must be configured for either even parity or odd parity

Even parity is when the parity bit is set so that the total number of 1s in the word is even11 11 0 Parity bit10 10 1 Parity bitOdd parity is when the parity bit is set so that the total number of 1s in the word is odd11 11 1 Parity bit10 10 0 Parity bit

Figure 4.1 Line coding

18

Types of each applicationFour combinations(to p9)19Table 2-1 Four combinations of data and signals

(to p2)Figure 4.2 Signal level versus data level

Figure 4.3 DC component

Figure 4.5 Line coding schemes

Unipolar encoding uses only one voltage level.

Note:Figure 4.6 Unipolar encoding

Polar encoding uses two voltage levels (positive and negative).

Note:Figure 4.7 Types of polar encoding

In NRZ-L the level of the signal is dependent upon the state of the bit.

Note:In NRZ-I the signal is inverted if a 1 is encountered.

Note:Figure 4.8 NRZ-L and NRZ-I encoding

4.30Polar - RZThe Return to Zero (RZ) scheme uses three voltage values. +, 0, -. Each symbol has a transition in the middle. Either from high to zero or from low to zero.This scheme has more signal transitions (two per symbol) and therefore requires a wider bandwidth.30Figure 4.9 RZ encoding

A good encoded digital signal must contain a provision for synchronization.

Note:Figure 4.10 Manchester encoding

In Manchester encoding, the transition at the middle of the bit is used for both synchronization and bit representation.

Note:Figure 4.11 Differential Manchester encoding

In differential Manchester encoding, the transition at the middle of the bit is used only for synchronization. The bit representation is defined by the inversion or noninversion at the beginning of the bit.

Note:In bipolar encoding, we use three levels: positive, zero, and negative.

Note:Figure 4.12 Bipolar AMI encoding

10.3910-2 BLOCK CODINGIn block coding, we divide our message into blocks, each of k bits, called datawords. We add r redundant bits to each block to make the length n = k + r. The resulting n-bit blocks are called codewords.3910.40Figure 10.6 Process of error detection in block coding

4010.41Figure 10.7 Structure of encoder and decoder in error correction

4110.42The Hamming distance between two words is the number of differences between corresponding bits.

Note4210.43Let us find the Hamming distance between two pairs of words.

1. The Hamming distance d(000, 011) is 2 because Example 10.42. The Hamming distance d(10101, 11110) is 3 because

4310.44The minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words.

Note4410.4510-3 LINEAR BLOCK CODESAlmost all block codes used today belong to a subset called linear block codes. A linear block code is a code in which the XOR (addition modulo-2) of two valid codewords creates another valid codeword.:4510.46In a linear block code, the exclusive OR (XOR) of any two valid codewords creates another valid codeword.

Note464.47SamplingAnalog signal is sampled every TS secs.Ts is referred to as the sampling interval. fs = 1/Ts is called the sampling rate or sampling frequency.There are 3 sampling methods:Ideal - an impulse at each sampling instantNatural - a pulse of short width with varying amplitudeFlattop - sample and hold, like natural but with single amplitude valueThe process is referred to as pulse amplitude modulation PAM and the outcome is a signal with analog (non integer) values4.48Figure 4.22 Three different sampling methods for PCM

484.49According to the Nyquist theorem, the sampling rate must beat least 2 times the highest frequency contained in the signal.

Note49BLOCK DIAGRAM OF TDM TXR

BLOCK DIAGRAM OF TDM TXR