15
Line Coding chapter 4 digital communication Page 1 ©® A.Sarkar ECE, JGEC Line Coding Introduction Line coding involves converting a sequence of 1s and 0s to a time-domain signal (a sequence of pulses) suitable for transmission over a channel. The following primary factors should be considered when choosing or designing a line code. 1. Self-synchronization. Timing information should be built into the time-domain signal so that the timing information can be extracted for clock synchronization. A long string of consecutive 1s and 0s should not cause a problem in clock recovery. 2. Transmission power and bandwidth efficiency. The transmitted power should be as small as possible, and the transmission bandwidth needs to be sufficiently small compared to the channel bandwidth so that inter-symbol interference will not be a problem. 3. Favorable Power Spectral Density. The spectrum of the time-domain signal should be suitable for the transmission channel. For example, if a channel is ac coupled, it is desirable to have zero power spectral density near dc to avoid dc wandering in the pulse stream. 4. Low probability of error. When the received signal is corrupted by noise, the receiver can easily recover the un-coded signal with low error probability. 5. Error detection and correction capability. The line code should have error detection capability, and preferably have error correction capability. 6. Transparency. It should be possible to transmit every signal sequence correctly regardless of the patterns of 1s and 0s. If the data are coded so that the coded signal is received faithfully, the code is transparent. Given a sequence of pulses, there are two possible waveform formats that we can use to send a pulse of duration Tb seconds over a channel. The duty cycle of the pulse can be used to define these two waveform formats. If the transmitted pulse waveform is maintained for the entire duration of the pulse, this is called non-return-to-zero (NRZ) format. If the transmitted pulse waveform only occupies a fraction of the pulse duration, this is called return-to-zero (RZ) format. Classification of Line Waveforms [1] There are many types of line codes and we shall only discuss a few of them here. The waveforms for the line code may be further classified according to the rule that is used to assign voltage levels to represent the binary data. 1. Polar Signal In positive logic, a 1 is represented by +A volts and a 0 is represented by -A volts. Figure 20.1 (a) and Figure 20.1 (b) show polar NRZ and RZ signals, respectively. A polar NRZ signal is also called a NRZ-L (L for level) signal because a high voltage level corresponds to a positive logic level [3]. Alternatively, we could have used negative logic, where a 1 is represented by -A volts and a 0 is represented by +A volts.

Chapter4

Embed Size (px)

Citation preview

Page 1: Chapter4

Line Coding chapter 4 digital communication

Page 1 ©® A.Sarkar ECE, JGEC

Line Coding Introduction Line coding involves converting a sequence of 1s and 0s to a time-domain signal (a sequence of pulses) suitable for transmission over a channel. The following primary factors should be considered when choosing or designing a line code. 1. Self-synchronization. Timing information should be built into the time-domain signal so that the timing information can be extracted for clock synchronization. A long string of consecutive 1s and 0s should not cause a problem in clock recovery. 2. Transmission power and bandwidth efficiency. The transmitted power should be as small as possible, and the transmission bandwidth needs to be sufficiently small compared to the channel bandwidth so that inter-symbol interference will not be a problem. 3. Favorable Power Spectral Density. The spectrum of the time-domain signal should be suitable for the transmission channel. For example, if a channel is ac coupled, it is desirable to have zero power spectral density near dc to avoid dc wandering in the pulse stream. 4. Low probability of error. When the received signal is corrupted by noise, the receiver can easily recover the un-coded signal with low error probability. 5. Error detection and correction capability. The line code should have error detection capability, and preferably have error correction capability. 6. Transparency. It should be possible to transmit every signal sequence correctly regardless of the patterns of 1s and 0s. If the data are coded so that the coded signal is received faithfully, the code is transparent. Given a sequence of pulses, there are two possible waveform formats that we can use to send a pulse of duration Tb seconds over a channel. The duty cycle of the pulse can be used to define these two waveform formats. If the transmitted pulse waveform is maintained for the entire duration of the pulse, this is called non-return-to-zero (NRZ) format. If the transmitted pulse waveform only occupies a fraction of the pulse duration, this is called return-to-zero (RZ) format. Classification of Line Waveforms [1] There are many types of line codes and we shall only discuss a few of them here. The waveforms for the line code may be further classified according to the rule that is used to assign voltage levels to represent the binary data. 1. Polar Signal In positive logic, a 1 is represented by +A volts and a 0 is represented by -A volts. Figure 20.1 (a) and Figure 20.1 (b) show polar NRZ and RZ signals, respectively. A polar NRZ signal is also called a NRZ-L (L for level) signal because a high voltage level corresponds to a positive logic level [3]. Alternatively, we could have used negative logic, where a 1 is represented by -A volts and a 0 is represented by +A volts.

Page 2: Chapter4

Line Coding chapter 4 digital communication

Page 2 ©® A.Sarkar ECE, JGEC

2. Unipolar Signal In positive logic, a 1 is represented by +A volts and a 0 is represented by 0 volts. Figure 20.1 (c) and Figure 20.1 (d) show unipolar NRZ and RZ signals, respectively. 3. Bipolar (Pseudo-Ternary or Alternate Mark Inverted) Signal In positive logic, 1s are sent as alternative positive or negative voltage values. 0s are Represented by 0 volt. The term pseudo-ternary refers to the use of 3 encoded logic levels to represent a 2-level signal. Figure 20.1 (e) and Figure 20.1 (f) show bipolar NRZ and RZ signals, respectively. A bipolar RZ signal is also called a pseudo-ternary signal or a RZ-AMI signal, where AMI denotes alternate mark inversion.

Page 3: Chapter4

Line Coding chapter 4 digital communication

Page 3 ©® A.Sarkar ECE, JGEC

4. Manchester (Split-phase, Twinned-Binary) Coding Manchester coding was developed by Manchester University. In positive logic, a 1 is represented by +A volts over a half-pulse period followed by -A volts over a half-pulse period. A 0 is represented by -A volts over a half-pulse period followed by +A volts over a half-pulse period. This is shown in Figure 20.1 (g). Other names in use for Manchester coding are split-phase and twinned-binary coding. Sometimes it is called bi-phase-level (Bi- φ-L) A Manchester signal can be generated by multiplying a polar NRZ signal by a synchronized square-wave clock having a period Tb [4]. It can also be generated by exclusive-ORing a polar NRZ signal with a synchronized but inverted square-wave clock having a period Tb. 5. Miller (delay modulation) Coding A transition occurs at the mid-point of each symbol interval for a 1. For a 1 followed by a 1, no transition occurs at the symbol interval. No transition occurs at the mid-point of each symbol interval for a 0. For a 0 followed by a 0, a transition occurs at the symbol interval. For a 0 followed by a 1 or a 1 followed by a 0, no transition occurs at the symbol interval. This is shown in Figure 20.1 (h). Miller coding is also called delay modulation. Power spectral densities of various line codes 1. Polar NRZ Signal (NRZ-L) The power spectral density for a polar NRZ signal with a pulse duration of Tb is

Figure 20.2 (a) shows the power spectral density of the polar NRZ signal where A is set to 1 so that the normalized average power of the signal is unity. Advantages of Polar NRZ Signal (NRZ-L): Relatively easy to generate the signal but requires dual supply voltages. Bit error probability performance is superior to other line encoding schemes. Disadvantages of Polar NRZ Signal (NRZ-L): It has a large power spectral density near dc. Poor clock recovery - a string of 1s or 0s will cause a loss of clock signal.

Page 4: Chapter4

Line Coding chapter 4 digital communication

Page 4 ©® A.Sarkar ECE, JGEC

2. Unipolar NRZ Signal The unipolar NRZ signal consists of a polar NRZ signal plus a dc term. The power spectral density is therefore similar to that of the polar NRZ signal but with a delta function at dc. The power spectral density for a unipolar NRZ signal with pulse duration of Tb is

Page 5: Chapter4

Line Coding chapter 4 digital communication

Page 5 ©® A.Sarkar ECE, JGEC

Figure 20.2 (b) shows the power spectral density of the unipolar NRZ signal where A is set to 2 so that the normalized average power of the signal is unity. Advantage of Unipolar NRZ Signal: Relatively easy to generate the signal (TTL/CMOS) from a single power supply. Disadvantages of Unipolar NRZ Signal: A dc component is always present corresponding to a waste of transmission power. It has a large power spectral density near dc. DC-coupled circuits are needed for this type of signaling. Poor clock recovery - a string of 1s and 0s will cause a loss of clock signal. 3. Unipolar RZ Signal The power spectral density for a unipolar RZ signal with a pulse duration of Tb/2 is

Figure 20.2 (c) shows the power spectral density of the unipolar RZ signal where A is set to 2 so that the normalised average power of the signal is unity. Advantage of Unipolar RZ Signal: Good clock recovery - periodic impulses at f = n/Tb can be used for clock recovery. Disadvantages of Unipolar RZ Signal: The first null bandwidth is twice that for the polar NRZ signal or the unipolar NRZ signal. A discrete impulse term is present at dc - waste of power. The spectrum is not negligible near dc. For the same bit error performance, this signal requires 3 dB more signal power than the polar RZ signal. 4. Bipolar RZ Signal (RZ-AMI) The power spectral density for a polar RZ signal with a pulse duration of Tb/2 is

Figure 20.2 (d) shows the power spectral density of the bipolar RZ signal where A is set to 2 so that the normalized average power of the signal is unity. Advantages of Bipolar RZ Signal (RZ-AMI): There is a null at dc so that an ac-coupled circuit may be used in the transmission path. It has single-error-detection capability since a single error will cause a violation (the reception of 2 or more consecutive 1s with the same polarity). Good clock recovery - the clock signal can be easily extracted by converting the bipolar RZ signal to a unipolar RZ signal using full-wave rectification. Disadvantages of Bipolar RZ Signal (RZ-AMI): The bipolar RZ signal is not transparent. A string of 0s will cause a loss of clock signal. The receiver has to distinguish between 3 logic levels. For the same bit error performance, this signal requires 3 dB more signal power than the polar RZ signal. 5. Manchester (Split-phase, Twined-Binary) Coding The power spectral density for a Manchester signal with pulse duration of Tb/2 is

Figure 20.2 (e) shows the power spectral density of the Manchester signal where A is set to 1 so that the normalized average power of the signal is unity. Advantages of Manchester (Split-phase, Twined-Binary) Coding: There is always a zero dc level regardless of the data sequence. Good clock recovery - a string of 0s will not cause a loss of clock signal.

Page 6: Chapter4

Line Coding chapter 4 digital communication

Page 6 ©® A.Sarkar ECE, JGEC

Disadvantage of Manchester (Split-phase, Twined-Binary) Coding: Null bandwidth is twice that of the polar NRZ (NRZ-L), unipolar NRZ, or bipolar RZ (RZ-AMI) signals. 6. Miller Coding Advantages of Miller Coding : Attractive for magnetic recording and PSK signalling includes [5]: 1. Majority of signal energy lies in frequencies less than 0.5 of the symbol rate R = 1/Tb. 2. Small spectrum at dc facilitates carrier tracking, and important in tape recording with poor dc response. 3. Small spectrum at dc, lower magnetic-tape recording speed can be used (higher packing density is possible). 4. Insensitive to 180o phase ambiguity common to NRZ-L and Manchester coding. 5. Bandwidth requirements are approximately half those needed by Manchester coding. The clock frequency is embedded in the code for all symbol sequences [6]. Disadvantage of Miller Coding: Small spectrum at dc may not be acceptable for some transmission channels In general, there is no optimum waveform choice for all digital transmission systems. Return-to-zero (RZ) waveforms may be attractive when the bandwidth is available. Because RZ waveforms always have two level transitions per symbol interval, symbol timing recovery can easily be achieved. For bandwidth-efficient systems, non-return-to- zero (NRZ) waveforms are more attractive. However, long strings of ones or zeros should be avoided to allow accurate recovery of symbol timing. Polar or unipolar signals are found in most digital circuits, but they may have a nonzero dc level. Bipolar and Manchester signals will always have a zero dc level regardless of the data sequence.

Differential Coding The differential form of encoding is actually more the result of a coding technique than it is a line waveform. When serial data are passed through many circuits along a transmission channel, the waveform is often unintentionally inverted. For example, if we employ a polar signal and reverse the two leads at a connection point of a twisted-pair transmission channel, the entire data sequence will be inverted and every symbol will be in error.

Differential coding can solve this problem. We can insert a differential encoder before the line encoder at the transmitter and a differential decoder after the line decoder at the receiver to remove these errors. The differential encoding operation can be viewed as a rotation of the previous differential encoder output signals in accordance with the current differential encoder input signals. The differential decoder is performing the reverse operation. The encoding rules are: A 1 is represented by a change in level between two consecutive symbol times. A 0 is represented by no change. This kind of differential form of encoding has been called NRZ-M (M for mark) signal, where M denotes inversion on mark . Figure 20.3 (b) shows a NRZ-M signal. If a 1 is represented by no change in level between two consecutive symbol times and a 0 is represented by a change, this differential waveform has been called NRZ-S (S for

Page 7: Chapter4

Line Coding chapter 4 digital communication

Page 7 ©® A.Sarkar ECE, JGEC

space) signal, where S denotes inversion on space . Figure 20.3 (c) shows a NRZ-S signal. Unipolar versions are also possible.

Figure 20.4 shows the differential encoder and decoder circuits. The truth table of the differential encoder and decoder is shown in Table 20.2. In Figure 20.4, we have also illustrated how differential encoding and decoding can remove these errors. It is assumed that the previous differential encoder output and the previous differential decoder input signals are

initialized to 0 and 1, respectively. The input sequence

Page 8: Chapter4

Line Coding chapter 4 digital communication

Page 8 ©® A.Sarkar ECE, JGEC

PSD of a digital signal:- we now derive a general formulae for the PSD of digital signals. A general result can be obtained in terms of autocorrelation of the data an. The polar signal may be modeled as

)()( ∑∞

−∞=

−=n

bn nTtfatx ….(1)

where f(t) is the sampling pulse or symbol pulse shape. Tb is the duration of one bit.i.e the time that it takes to send 1 bit. {an} is a set of random variables that represent the binary data. It is given that the random variables are independent. Clearly each one is discretely distributed at an =±1 and P(an=1)=P(an=-1)=1/2. The PSD for x(t) will be evaluated first by obtaining XT(f) . we can obtain XT(t) by truncating eqn (1)

)()( ∑−=

−=N

NnbnT nTtfatx

where T/2= (N+1/2)Tb then

XT(f)=F[xt(t)]= …(2) bb jwnT

N

Nnn

jwnTN

Nnn

N

Nnbn eafFefFanTtfFa −

−=

−=−=∑∑∑ ==− )()()]([

Where F(f)= F[f(t)] Now we know that PSD for a random process x(t) is given by

)])([

(lim)(2

TfX

fP T

Tx ∞>−= where ∫

−=2/

2/

2)()(T

T

ftjT dtetxfX π

when we substitute (2) into above eqn we find that PSD is

Page 9: Chapter4

Line Coding chapter 4 digital communication

Page 9 ©® A.Sarkar ECE, JGEC

)1(lim)())(1(lim)( )(22

2 ∑ ∑∑−= −=

∞>−−=

∞>−==

N

Nn

N

Nm

wTnmjmnT

N

Nn

jwnTnTx

bb eaaT

fFeafFT

fP ….(3)

we define the autocorrelation of the data by

knnaaKR +=)( ……(3a) next we make a change in the index in eq(1) letting m=n+k. Then by using (3a) and T=(2N+1)Tb equation (3) becomes

⎥⎦

⎤⎢⎣

+= ∑ ∑

−=

−=

−−=∞>−

N

Nn

nNk

nNk

jkwT

bNx

bekRTN

fFfP )()12(

1lim)()( 2

replacing the outer sum over the index n by 2N+1. we obtain the following expression.

⎥⎦

⎤⎢⎣

⎡++

= ∑−=

−−=∞>−

nNk

nNk

jkwT

bN

bx

bekRTN

NTfF

fP )()12()12(lim

)()(

2

∑∞=

−∞=

=k

k

jkwT

bx

bekRTfF

fP )()(

)(2

…….(4)

where F(f) is the Fourier transform of the pulse shape f(t) and R(k) is the autocorrelation of the data. This autocorrelation is given by

∑=

+=l

iiiknn PaakR

1

)()( where an and an+k are the voltage levels of the data pulses at the nth and (n+k)th

symbol positions. Respectively and Pi is the probability of having the ith an an+k product.

Page 10: Chapter4

Line Coding chapter 4 digital communication

Page 10 ©® A.Sarkar ECE, JGEC

Page 11: Chapter4

Line Coding chapter 4 digital communication

Page 11 ©® A.Sarkar ECE, JGEC

Page 12: Chapter4

Line Coding chapter 4 digital communication

Page 12 ©® A.Sarkar ECE, JGEC

Page 13: Chapter4

Line Coding chapter 4 digital communication

Page 13 ©® A.Sarkar ECE, JGEC

Page 14: Chapter4

Line Coding chapter 4 digital communication

Page 14 ©® A.Sarkar ECE, JGEC

Page 15: Chapter4

Line Coding chapter 4 digital communication

Page 15 ©® A.Sarkar ECE, JGEC