20. Line Coding
Total Page:16
File Type:pdf, Size:1020Kb
Line Coding on Mac 20. 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, 2]. 1. Self-synchronisation. Timing information should be built into the time-domain signal so that the timing information can be extracted for clock synchronisation. 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 intersymbol 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 uncoded 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. 20.1 Line Coding on Mac Classification of Line Waveforms [1] There are many types of line codes and we shall only discuss a few of them here. Figure 20.1 Waveforms for various line codes. 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. 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 [4]. 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 biphase-level (Bi-φ-L) [4]. 20.2 Line Coding on Mac A Manchester signal can be generated by multiplying a polar NRZ signal by a synchronised square-wave clock having a period Tb [4]. It can also be generated by exclusive-ORing a polar NRZ signal with a synchronised but inverted square-wave clock having a period Tb [3]. 5. Miller (delay modulation) Coding [5] 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 Spectra of Line Codes Figure 20.2 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 [1] 2 sin π fT b 2 (20.1) P(f) = A Tb π fT b Figure 20.2 (a) shows the power spectral density of the polar NRZ signal where A is set to 1 so that the normalised average power of the signal is unity. Advantages: Relatively easy to generate the signal but requires dual supply voltages. Bit error probability performance is superior to other line encoding schemes. Disadvantages : 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. 20.3 Line Coding on Mac 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 a pulse duration of Tb is [1] 2 2 A T sin π fT b b 1 P(f) = [1 + δ(f)] (20.2) 4 π fT T b b Figure 20.2 (b) shows the power spectral density of the unipolar NRZ signal where A is set to 2 so that the normalised average power of the signal is unity. Advantage: Relatively easy to generate the signal (TTL/CMOS) from a single power supply. Disadvantages: 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 signalling. 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 [1] 2 2 A T sin (π fT /2 ) ∞ b b 1 P(f) = [1 + ∑ δ(f - n )] (20.3) 16 π fT /2 T =−∞ T b b n b 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 : Good clock recovery - periodic impulses at f = n/Tb can be used for clock recovery. Disadvantages: 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. 20.4 Line Coding on Mac 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 [1] 2 2 A T sin (π fT /2 ) b b sin2(π P(f) = 4 π fT /2 fTb) (20.4) b Figure 20.2 (d) shows the power spectral density of the bipolar RZ signal where A is set to 2 so that the normalised average power of the signal is unity. Advantages: 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: 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 a pulse duration of Tb/2 is [1] 2 sin (π fT /2) b P(f) = A2T sin2(π b π fT /2 fTb/2) (20.5) b Figure 20.2 (e) shows the power spectral density of the Manchester signal where A is set to 1 so that the normalised average power of the signal is unity. Advantages: There is always a zero dc level regardless of the data sequence.