Line coding

16,320 views

Published on

RAvi RAthore

Published in: Engineering
2 Comments
15 Likes
Statistics
Notes
No Downloads
Views
Total views
16,320
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
610
Comments
2
Likes
15
Embeds 0
No embeds

No notes for slide

Line coding

  1. 1. Line Coding EC-353 Digital Communication www.spsu.ac.in santosh.bharti@spsu.ac.in SIR PADAMPAT SINGHANIA UNIVERSITY Santosh Kumar Bharti
  2. 2. Line Coding Acknowledgments: I would like to thank Wg Cdr (retd) Ramzan for his time and guidance which were very helpful in planning and preparing this lecture. I would also like to thank Dr. Ali Khayam and Mr. Saadat Iqbal for their help and support. Most of the material for this lecture has been taken from “Digital Communications” 2nd Edition by P. M. Grant and Ian A. Glover.
  3. 3. What is Line Coding? • Binary 1’s and 0’s, such as in PCM signaling, may be represented in various serial–bit signaling formats called line codes. • The simplest is to represent ‘1’ by a square pulse and ‘0’ by 0 volt. But the simplest is not always good enough. Also, a long sequence of ‘0’ may appear as a loss of transmission. • In order to take care of these and many other requirements, the symbols are transformed in to various different wave shapes, a process named line coding. • Different wave shapes result in different spectrum suiting different needs. Hence in a way, line codes are also spectrum shaping codes. • Mapping of binary information sequence into the digital signal that enters the channel – Ex. “1” maps to +A square pulse; “0” to –A pulse
  4. 4. Cont’d • Line code selected to meet system requirements: – Transmitted power: Power consumption = $ – Bit timing: Transitions in signal help timing recovery – Bandwidth efficiency: Excessive transitions wastes BW – Low frequency content: Some channels block low frequencies • long periods of +A or of –A causes signal to “droop” • Waveform should not have low-frequency content – Error detection: Ability to detect errors helps – Complexity/cost: Is code implementable in chip at high speed? • There are 2 major categories: return–to–zero (RZ) and non return–to–zero (NRZ). – With RZ coding, the waveform returns to a zero–volt level for a portion (usually one–half) of the bit interval.
  5. 5. Why Line Coding? • There are many reasons for using line coding. Each of the line codes you will be examining offers one or more of the following advantages:  Spectrum Shaping and Relocation without modulation or filtering. This is important in telephone line applications, for example, where the transfer characteristic has heavy attenuation below 300 Hz.  Bit clock recovery can be simplified.  DC component can be eliminated; this allows AC (capacitor or transformer) coupling between stages (as in telephone lines). Can control baseline wander (baseline wander shifts the position of the signal waveform relative to the detector threshold and leads to severe erosion of noise margin).  Error detection capabilities.  Bandwidth usage; the possibility of transmitting at a higher rate than other schemes over the same bandwidth. • At the very least the LINE-CODE ENCODER serves as an interface between the TTL level signals of the transmitter and those of the analog channel. Likewise, the LINE- CODE DECODER serves as an interface between the analog signals of the channel and the TTL level signals required by the digital receiver.
  6. 6. Necessary properties of line code: • 1. Self synchronization – It should be possible to recover the clock pulse from the received data. Clock should not be lost even in case of a long sequence of ‘0’. Self-synchronization, where the timing information is extracted from the received signal itself • 2. Low probability of bit error – It should be convenient to design a receiver, which receives the specific line code and results a low probability of bit error. • 3. PSD – Spectrum of the line code should suit the physical medium. • 4. Band width – Band width of the line coded signal should be low. • 5. No DC – DC power content should be ideally zero to enable AC coupling. • 6. Low frequency power – Power at very low frequency should as low as possible. • 7. To suit channel coding – Line code should be such that subsequent coding for error detection/correction is easy. • 8. Power efficiency – Required transmission power should be small. • 9. Transparency – Line code should be such that any sequence of ‘1’ & ‘0’ must have only one inference.
  7. 7. Line Coding Introduction: Binary data can be transmitted using a number of different types of pulses. The choice of a particular pair of pulses to represent the symbols 1 and 0 is called Line Coding and the choice is generally made on the grounds of one or more of the following considerations: – Presence or absence of a DC level. – Power Spectral Density- particularly its value at 0 Hz. – Bandwidth. – BER performance (this particular aspect is not covered in this lecture). – Transparency (i.e. the property that any arbitrary symbol, or bit, pattern can be transmitted and received). – Ease of clock signal recovery for symbol synchronisation. – Presence or absence of inherent error detection properties. After line coding pulses may be filtered or otherwise shaped to further improve their properties: for example, their spectral efficiency and/ or immunity to intersymbol interference.
  8. 8. Different Types of Line Coding
  9. 9. Classification of 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. Some examples include: – Unipolar Signalling: In positive–logic unipolar signalling, the binary 1 is represented by a high level (+A volts) and a binary 0 by a zero level. This type of signalling is also called on–off keying (OOK). – Polar Signalling: Binary 1’s and 0’s are represented by equal positive and negative levels – Bipolar (Pseudo ternary) Signaling: Binary 1’s are represented by alternating positive or negative values. The binary 0 is represented by a zero level. The term pseudo ternary refers to the use of 3 encoded signal levels to represent two–level (binary) data. This is also called alternate mark inversion (AMI) signaling. – Manchester Signaling: Each binary 1 is represented by a positive half–bit period pulse followed by a negative half–bit period pulse. Similarly, a binary 0 is represented by a negative half–bit period pulse followed by a positive half–bit period pulse. This type of signaling is also called split–phase encoding.
  10. 10. Cont’d  Polar NRZ: Also called NRZ–L where L denotes the normal logic level assignment. – The NRZ-L is similar to Unipolar, in that the voltage directly depends on the bit it represents. – A positive voltage generally represents a ‘1’, and a negative voltage represents a ‘0’ (or vice versa). – Unlike the unipolar scheme, NRZ-L alleviates the problem of the DC component.  Bipolar RZ: Also called RZ–AMI, where AMI denotes alternate mark (binary 1) inversion.  Bipolar NRZ: Also called NRZ–M, where M de-notes inversion on mark (binary 1)
  11. 11. Unipolar Signalling Unipolar signalling (also called on-off keying, OOK) is the type of line coding in which one binary symbol (representing a 0 for example) is represented by the absence of a pulse (i.e. a SPACE) and the other binary symbol (denoting a 1) is represented by the presence of a pulse (i.e. a MARK). There are two common variations of unipolar signalling: Non-Return to Zero (NRZ) and Return to Zero (RZ).
  12. 12. Unipolar Signalling Unipolar Non-Return to Zero (NRZ): In unipolar NRZ the duration of the MARK pulse (Ƭ ) is equal to the duration (To) of the symbol slot. 1 0 1 0 1 1 1 1 1 0 V 0
  13. 13. Unipolar Signalling Unipolar Non-Return to Zero (NRZ): In unipolar NRZ the duration of the MARK pulse (Ƭ ) is equal to the duration (To) of the symbol slot. (put figure here). Advantages: – Simplicity in implementation. – Doesn’t require a lot of bandwidth for transmission. Disadvantages: – Presence of DC level (indicated by spectral line at 0 Hz). – Contains low frequency components. Causes “Signal Droop” (explained later). – Does not have any error correction capability. – Does not posses any clocking component for ease of synchronisation. – Is not Transparent. Long string of zeros causes loss of synchronisation.
  14. 14. Unipolar Signalling Unipolar Non-Return to Zero (NRZ): Figure. PSD of Unipolar NRZ
  15. 15. Unipolar Signalling Unipolar Non-Return to Zero (NRZ): When Unipolar NRZ signals are transmitted over links with either transformer or capacitor coupled (AC) repeaters, the DC level is removed converting them into a polar format. The continuous part of the PSD is also non-zero at 0 Hz (i.e. contains low frequency components). This means that AC coupling will result in distortion of the transmitted pulse shapes. AC coupled transmission lines typically behave like high-pass RC filters and the distortion takes the form of an exponential decay of the signal amplitude after each transition. This effect is referred to as “Signal Droop” and is illustrated in figure below.
  16. 16. Unipolar Signalling -V/2 V/2 1 0 1 0 1 1 1 1 1 0 V 0 -V/2 V/2 0 1 0 1 0 1 1 1 1 1 0 V 0 -V/2 V/2 0 Figure Distortion (Signal Droop) due to AC coupling of unipolar NRZ signal
  17. 17. Unipolar Signalling Return to Zero (RZ): In unipolar RZ the duration of the MARK pulse (Ƭ ) is less than the duration (To) of the symbol slot. Typically RZ pulses fill only the first half of the time slot, returning to zero for the second half. 1 0 1 0 1 1 1 0 0 0 V 0 To Ƭ
  18. 18. Unipolar Signalling Return to Zero (RZ): In unipolar RZ the duration of the MARK pulse (Ƭ ) is less than the duration (To) of the symbol slot. Typically RZ pulses fill only the first half of the time slot, returning to zero for the second half. 1 0 1 0 1 1 1 0 0 0 V 0 To Ƭ
  19. 19. Unipolar Signalling Unipolar Return to Zero (RZ): Advantages: – Simplicity in implementation. – Presence of a spectral line at symbol rate which can be used as symbol timing clock signal. Disadvantages: – Presence of DC level (indicated by spectral line at 0 Hz). – Continuous part is non-zero at 0 Hz. Causes “Signal Droop”. – Does not have any error correction capability. – Occupies twice as much bandwidth as Unipolar NRZ. – Is not Transparent
  20. 20. Unipolar Signalling Unipolar Return to Zero (RZ): Figure. PSD of Unipolar RZ
  21. 21. Unipolar Signalling In conclusion it can be said that neither variety of unipolar signals is suitable for transmission over AC coupled lines.
  22. 22. Polar Signalling In polar signalling a binary 1 is represented by a pulse g1(t) and a binary 0 by the opposite (or antipodal) pulse g0(t) = -g1(t). Polar signalling also has NRZ and RZ forms. 1 0 1 0 1 1 1 1 1 0 +V -V 0 Figure. Polar NRZ
  23. 23. Polar Signalling In polar signalling a binary 1 is represented by a pulse g1(t) and a binary 0 by the opposite (or antipodal) pulse g0(t) = -g1(t). Polar signalling also has NRZ and RZ forms. +V -V 0 Figure. Polar RZ 1 0 1 0 1 1 1 0 0 0
  24. 24. Polar Signalling PSD of Polar Signalling: Polar NRZ and RZ have almost identical spectra to the Unipolar NRZ and RZ. However, due to the opposite polarity of the 1 and 0 symbols, neither contain any spectral lines. Figure. PSD of Polar NRZ
  25. 25. Polar Signalling PSD of Polar Signalling: Polar NRZ and RZ have almost identical spectra to the Unipolar NRZ and RZ. However, due to the opposite polarity of the 1 and 0 symbols, neither contain any spectral lines. Figure. PSD of Polar RZ
  26. 26. Polar Signalling Polar Non-Return to Zero (NRZ): Advantages: – Simplicity in implementation. – No DC component. Disadvantages: – Continuous part is non-zero at 0 Hz. Causes “Signal Droop”. – Does not have any error correction capability. – Does not posses any clocking component for ease of synchronisation. – Is not transparent.
  27. 27. Polar Signalling Polar Return to Zero (RZ): Advantages: – Simplicity in implementation. – No DC component. Disadvantages: – Continuous part is non-zero at 0 Hz. Causes “Signal Droop”. – Does not have any error correction capability. – Does not posses any clocking component for easy synchronisation. However, clock can be extracted by rectifying the received signal. – Occupies twice as much bandwidth as Polar NRZ.
  28. 28. BiPolar Signalling Bipolar Signalling is also called “alternate mark inversion” (AMI) uses three voltage levels (+V, 0, -V) to represent two binary symbols. Zeros, as in unipolar, are represented by the absence of a pulse and ones (or marks) are represented by alternating voltage levels of +V and –V. Alternating the mark level voltage ensures that the bipolar spectrum has a null at DC And that signal droop on AC coupled lines is avoided. The alternating mark voltage also gives bipolar signalling a single error detection capability. Like the Unipolar and Polar cases, Bipolar also has NRZ and RZ variations.
  29. 29. BiPolar Signalling Figure. BiPolar NRZ 1 0 1 0 1 1 1 1 1 0 +V -V 0
  30. 30. Polar Signalling PSD of BiPolar/ AMI NRZ Signalling: Figure. PSD of BiPolar NRZ
  31. 31. BiPolar Signalling BiPolar / AMI NRZ: Advantages: – No DC component. – Occupies less bandwidth than unipolar and polar NRZ schemes. – Does not suffer from signal droop (suitable for transmission over AC coupled lines). – Possesses single error detection capability. Disadvantages: – Does not posses any clocking component for ease of synchronisation. – Is not Transparent.
  32. 32. BiPolar Signalling Figure. BiPolar RZ 1 0 1 0 1 1 1 1 1 0 +V -V 0
  33. 33. BiPolar Signalling PSD of BiPolar/ AMI RZ Signalling: Figure. PSD of BiPolar RZ
  34. 34. BiPolar Signalling BiPolar / AMI RZ: Advantages: – No DC component. – Occupies less bandwidth than unipolar and polar RZ schemes. – Does not suffer from signal droop (suitable for transmission over AC coupled lines). – Possesses single error detection capability. – Clock can be extracted by rectifying (a copy of) the received signal. Disadvantages: –Is not Transparent.
  35. 35. Manchester Signalling In Manchester encoding , the duration of the bit is divided into two halves. The voltage remains at one level during the first half and moves to the other level during the second half. A ‘One’ is +ve in 1st half and -ve in 2nd half. A ‘Zero’ is -ve in 1st half and +ve in 2nd half. Note: Some books use different conventions. 1 0 0 -ve -ve +ve +ve 0
  36. 36. Manchester Signalling Figure. Manchester Encoding. 1 0 1 0 1 1 1 1 1 0 +V -V 0 Note: There is always a transition at the centre of bit duration.
  37. 37. Manchester Signalling PSD of Manchester Signalling: Figure. PSD of Manchester
  38. 38. Manchester Signalling The transition at the centre of every bit interval is used for synchronization at the receiver. Manchester encoding is called self-synchronizing. Synchronization at the receiving end can be achieved by locking on to the the transitions, which indicate the middle of the bits. It is worth highlighting that the traditional synchronization technique used for unipolar, polar and bipolar schemes, which employs a narrow BPF to extract the clock signal cannot be used for synchronization in Manchester encoding. This is because the PSD of Manchester encoding does not include a spectral line/ impulse at symbol rate (1/To). Even rectification does not help.
  39. 39. Manchester Signalling Manchester Signalling: Advantages: – No DC component. – Does not suffer from signal droop (suitable for transmission over AC coupled lines). – Easy to synchronise with. – Is Transparent. Disadvantages: – Because of the greater number of transitions it occupies a significantly large bandwidth. – Does not have error detection capability. These characteristic make this scheme unsuitable for use in Wide Area Networks. However, it is widely used in Local Area Networks such as Ethernet and Token Ring.
  40. 40. Differential Coding • Errors in some systems cause transposition in polarity, +A become – A and vice versa – All subsequent bits in Polar NRZ coding would be in error • Differential line coding provides robustness to this type of error • “1” mapped into transition in signal level • “0” mapped into no transition in signal level • Same spectrum as NRZ • Errors occur in pairs • Also used with Manchester coding NRZ-inverted (differential encoding) 1 0 1 0 1 1 0 01 Differential Manchester encoding LAN codes –Manchester, differential Manchester. mB/nB
  41. 41. Differential Manchester coding Each digit in an differential encoded sequence is obtained by comparing the present input bit with the past encoded bit. A binary 1 is encoded if the present input bit and past encoded bit are of opposite state. A binary 0 is encoded if the states are the same. d(k)=m(k)⊕d(k-1)
  42. 42. Line coding examples NRZ-inverted (differential encoding) 1 0 1 0 1 1 0 01 Unipolar NRZ Bipolar encoding Manchester encoding Differential Manchester encoding Polar NRZ
  43. 43. Comparative study of line codes: • 1. UPNRZ and UPRZ are unipolar codes and need only single sided power supply to generate them. Whereas PNRZ, PRZ, AMI and Manchester need double sided power supply. • 2. AMI receiver needs to detect 3 levels. All other codes need to detect only 2 levels. • 3. PNRZ, PRZ and Manchester carries a pulse in every bit. Hence, loss of pulse will warn about a failure. Whereas, UPNRZ, UPRZ and AMI do not have this benefit. A long sequence of ‘0’ may be mistaken as failure of transmission. • 4. AMI has a built in error detecting capability since any ‘0’ being converted to ‘1’ or vice versa will violate the code.
  44. 44. PSD of line codes:
  45. 45. Comparative study of line codes: • 1. First null BW for UPNRZ, PNRZ and AMI is Rb. – Whereas for UPRZ, PRZ and Manchester it is 2Rb , i.e. double. • 2. PNRZ has maximum DC power content. – UPNRZ and PRZ also have high DC power content. – UPNRZ has an additional power spike at DC. – Hence UPNRZ, PNRZ and PRZ are not at all suitable for AC coupling. – DC power of UPRZ is much smaller – DC power of UPRZ is much smaller than in UPNRZ, PNRZ and PRZ. But due to it’s DC power spike, not advised for AC coupling. – Both AMI and Manchester are suitable for AC coupling. • 3. UPRZ has a distinct power spike at Rb. Hence suitable to extract the synchronizing clock signal. • 4. PRZ, AMI and Manchester do not have power spike at Rb. But if rectified, these codes resemble UPRZ and hence the synchronizing signal can be extracted.
  46. 46. Reference Text Books 1. “Digital Communications” 2nd Edition by Ian A. Glover and Peter M. Grant. 2. “Modern Digital & Analog Communications” 3rd Edition by B. P. Lathi. 3. “Digital & Analog Communication Systems” 6th Edition by Leon W. Couch, II. 4. “Communication Systems” 4th Edition by Simon Haykin. 5. “Analog & Digital Communication Systems” by Martin S. Roden. 6. “Data Communication & Networking” 4th Edition by Behrouz A. Forouzan. 46

×