T 305 DIGITAL COMMUNICATIONS T 305 Digital Communications

  • Slides: 38
Download presentation
T 305: DIGITAL COMMUNICATIONS T 305: Digital Communications Block III – Message coding Arab

T 305: DIGITAL COMMUNICATIONS T 305: Digital Communications Block III – Message coding Arab Open University-Lebanon Tutorial 11 1

T 305: DIGITAL COMMUNICATIONS Topic 1: Introduction (cont. ) Arab Open University-Lebanon Tutorial 11

T 305: DIGITAL COMMUNICATIONS Topic 1: Introduction (cont. ) Arab Open University-Lebanon Tutorial 11 Elements of the originating terminal. 2

T 305: DIGITAL COMMUNICATIONS Introduction: n basic aim is to discuss Block 3: Message

T 305: DIGITAL COMMUNICATIONS Introduction: n basic aim is to discuss Block 3: Message Coding The various topics covered: Topic 1: Introduction n. Revision: bandwidth, signalling rate n. Topic 2: Pulse Code Modulation And Delta Modulation n. Topic 3: Facsimile n Arab Open University-Lebanon Tutorial 11 3

T 305: DIGITAL COMMUNICATIONS Topic 1: Introduction There are three main types of coding:

T 305: DIGITAL COMMUNICATIONS Topic 1: Introduction There are three main types of coding: message, channel, and line coding. n Elements of a telecommunications link Arab Open University-Lebanon Tutorial 11 4

T 305: DIGITAL COMMUNICATIONS Topic 1: Introduction (cont. ) For a message source producing

T 305: DIGITAL COMMUNICATIONS Topic 1: Introduction (cont. ) For a message source producing an analogue output, the first step has to be conversion to digital form. This is done by sampling and digitizing. n. The next stage is compression. This involves squeezing out redundancy so as to reduce the number of bits which have to be transmitted. n. Channel coding may involve the addition of redundant bits to allow for error control. n Arab Open University-Lebanon Tutorial 11 5

T 305: DIGITAL COMMUNICATIONS Topic 1: Introduction (cont. ) Finally, line coding and modulation

T 305: DIGITAL COMMUNICATIONS Topic 1: Introduction (cont. ) Finally, line coding and modulation adapt the message for transmission over the particular medium that is used, for instance conversion to radio waves of appropriate frequency for radio links ……. . n. There are many different forms of message coding. Pulse code modulation (PCM), used in telephone systems n Arab Open University-Lebanon Tutorial 11 6

T 305: DIGITAL COMMUNICATIONS Topic 1: Introduction (cont. ) Next comes delta modulation, which

T 305: DIGITAL COMMUNICATIONS Topic 1: Introduction (cont. ) Next comes delta modulation, which is closely related to PCM. Fax, (example of the use of compression techniques) n This is followed by the digital coding of images and, in particular, digital broadcast television, which includes the coding of sound, using the techniques that are being adopted for the digital broadcast radio systems. n Finally, the message coding used for the European digital mobile telephony system, GSM. n Arab Open University-Lebanon Tutorial 11 7

T 305: DIGITAL COMMUNICATIONS Bandwidth n Analogue bandwidth An analogue signal has a frequency

T 305: DIGITAL COMMUNICATIONS Bandwidth n Analogue bandwidth An analogue signal has a frequency spectrum that covers a range of frequencies. nbandwidth =f 1 – f 2. n Analogue bandwidth Idealized frequency spectrum of an analogue signal with cut-off frequencies f 1 and f 2 Arab Open University-Lebanon Tutorial 11 8

T 305: DIGITAL COMMUNICATIONS Analogue bandwidth A signal has a certain bandwidth n. The

T 305: DIGITAL COMMUNICATIONS Analogue bandwidth A signal has a certain bandwidth n. The conducting channel through which the signal passes has also a bandwidth n. The channel acts as a filter n f low < f sig< f max n Filtering prior to transmission n Arab Open University-Lebanon Tutorial 11 9

T 305: DIGITAL COMMUNICATIONS Digital bandwidth n n Digital bandwidth : n. Is the

T 305: DIGITAL COMMUNICATIONS Digital bandwidth n n Digital bandwidth : n. Is the maximum signalling rate over a communication channel signalling rate (baud): the number of symbols transmitted per unit time over a digital transmission link. n. One baud is one symbol per second. n Theoretically: signalling rate S (baud) over a channel of bandwidth B (Hz) is : S = 2 × B n. In practice: B<=S <2 x B n Arab Open University-Lebanon Tutorial 11 10

T 305: DIGITAL COMMUNICATIONS Digital bandwidth The maximum bit rate of a digital communication

T 305: DIGITAL COMMUNICATIONS Digital bandwidth The maximum bit rate of a digital communication system is often referred to the ‘bandwidth’. n n n For a binary system: n the signalling rate (baud)= the bit rate (bits per second). C (bit/s)=n*S (baud) n is the number of bits per unit time Also C (bit/s)=S *log 2 m= 2*B*log 2 m where m is the number of states in coded signals n Arab Open University-Lebanon Tutorial 11 11

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation The minimum

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation The minimum sampling rate, which according to the sampling theorem is twice the bandwidth, is known as the Nyquist rate. n. PCM was designed for speech telephone systems. n The bandwidth of speech signals originating from good quality microphones can exceed 20 k. Hz, and this would be appropriate for hi-fi systems, n for telephony, a frequency band covering 300 Hz to 3. 4 k. Hz is adequate, and this is the bandwidth used in telephone systems. n Arab Open University-Lebanon Tutorial 11 12

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. )

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. ) It is not practicable to design a filter that would let through all the required frequency components up to 3. 4 k. Hz and that would completely cut off everything above this. n. However, it is possible to design filters that pass components up to 3. 4 k. Hz and that attenuate higher frequency components more and more as their frequency increases above this value, in such a way that components above 4 k. Hz have a negligible effect. n. These are the filters that are used, but this requires a minimum sampling rate of 2 × 4000 = 8000 samples per second, which has been adopted as the standard rate. n Arab Open University-Lebanon Tutorial 11 13

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. )

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. ) Encoding and decoding nthe signal is then PCM encoded, which involves quantization – converting each analogue sample into an n-bit digital binary code word using an analogue-todigital converter. n Once quantized, the samples are limited to a finite, discrete set of 2 n different possible values. n. The number of bits per second that has to be transmitted for PCM signals is proportional to n. Arab Open University-Lebanon Tutorial 11 14

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. )

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. ) Quantization using 16 discrete levels; (b) errors introduced by the quantization process. Encoding and decoding (cont. ) n. The quantization process is illustrated in Figure (a) for a system using 4 - bit code words and hence 16 different quantization levels. Each of these levels is allocated a 4 bit code, although more complex codes are used in practice. Arab Open University-Lebanon Tutorial 11 15

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. )

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. ) Encoding and decoding (cont. ) n. If adjacent levels are separated by q volts, then the maximum error introduced by the quantization process is q/2, and the average is zero. This is illustrated in part (b) of the figure, which is obtained by subtracting the quantized signal from the original message signal. Arab Open University-Lebanon Tutorial 11 16

T 305: DIGITAL COMMUNICATIONS The errors represented by the difference between the original and

T 305: DIGITAL COMMUNICATIONS The errors represented by the difference between the original and quantized signals set a fundamental limitation to the performance of PCM systems, because even a signal reconstructed to coincide exactly with the transmitted digital codes will suffer from these errors. The effect is usually known as quantization noise. n Arab Open University-Lebanon Tutorial 11 17

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. )

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. ) Encoding and decoding (cont. ) n. The amplitude of a typical speech signal can vary enormously both from one speaker to another and over the normal speaking range of a single individual. n. In fact, the range of variation from the ‘whisper of a quiet speaker to the bellowing tones of a powerful speaker can be as great as 50 to 60 d. B. This is known as the dynamic range of the signal. n A dynamic range of 60 d. B means that the ratio between the amplitude of the loudest signal, Vl, and the softest, Vs, is given by the expression: that is, Vl /Vs, = 1000. If we assume that Vs is of the order of one quantization interval, then to cover the whole range of positive and negative signals with equal spacing we need at least 2000 distinct levels. Arab Open University-Lebanon Tutorial 11 18

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. )

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. ) Non-uniform encoding of a sinusoid. Smaller quantization intervals are used for small values of the signal than for large values. Arab Open University-Lebanon Tutorial 11 19

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. )

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. ) Encoding and decoding (cont. ) n. Voice telephony uses 8 -bit non-uniform coding to cover a range which would need 12 bits per sample with uniform quantization. Such encoding – and the subsequent decoding of the received signal – is carried out electronically using a device known as a codec (coder/decoder). Arab Open University-Lebanon Tutorial 11 20

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. )

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation (cont. ) Encoding and decoding (cont. ) n Analogue speech covers a band from approximately 300 Hz to 3. 4 k. Hz, that is 3. 1 k. Hz, about one-tenth of the minimum bandwidth required for PCM speech (32 k. Hz, half the signaling rate). However, the advantages of digital signals over analogue – relative immunity to noise and considerably increased processing flexibility – are the main reasons why digital coding has been adopted for most telephone networks. n Arab Open University-Lebanon Tutorial 11 21

T 305: DIGITAL COMMUNICATIONS The huge number of telephone cables that have been laid

T 305: DIGITAL COMMUNICATIONS The huge number of telephone cables that have been laid between switching centres and the homes or offices were designed for analogue telephony and are inappropriate for PCM, mainly because the higher frequencies present in PCM signals tend to radiate and couple into adjacent wire pairs in the cables, leading to a form of interference known as crosstalk. n Arab Open University-Lebanon Tutorial 11 22

T 305: DIGITAL COMMUNICATIONS Encoding schemes Analog data, Analog signal voice Telephone analog Digital

T 305: DIGITAL COMMUNICATIONS Encoding schemes Analog data, Analog signal voice Telephone analog Digital data, Analog signal digital Modem analog Analog data, Digital signal digital CODEC Digital data, Digital signal digital Arab Open University-Lebanon Tutorial 11 Digital transmitter digital 23

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation Codecs n.

T 305: DIGITAL COMMUNICATIONS Topic 2: Pulse Code Modulation And Delta Modulation Codecs n. A codec can take the form of a single integrated circuit which carries out sampling, quantization and coding of a transmitted signal, as well as decoding and recovery of a received signal. Arab Open University-Lebanon Tutorial 11 24

T 305: DIGITAL COMMUNICATIONS PCM n Sampling signal based on nyquist theorem Original signal

T 305: DIGITAL COMMUNICATIONS PCM n Sampling signal based on nyquist theorem Original signal PAM pulse 3. 2 (before quantization) 3. 9 3 PCM pulse with quantized error 4 011 PCM output 2. 8 3. 4 3 3 4. 2 1. 2 4 1 100 011 001 100 01110001101100 Arab Open University-Lebanon Tutorial 11 25

T 305: DIGITAL COMMUNICATIONS Nonlinear Encoding n n n PCM refined method Quantization levels

T 305: DIGITAL COMMUNICATIONS Nonlinear Encoding n n n PCM refined method Quantization levels are not necessarily equally spaced. The problem with equal spacing is that the mean absolute error for each sample is the same, regardless the signal level. Lower amplitude values are relatively more distorted. Nonlinear encoding reduces overall signal distortion Arab Open University-Lebanon Tutorial 11 26

T 305: DIGITAL COMMUNICATIONS Quantization Noise Arab Open University-Lebanon Tutorial 11 27

T 305: DIGITAL COMMUNICATIONS Quantization Noise Arab Open University-Lebanon Tutorial 11 27

T 305: DIGITAL COMMUNICATIONS Nonlinear encoding 15 14 13 12 11 10 9 8

T 305: DIGITAL COMMUNICATIONS Nonlinear encoding 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Quantizing level 15 14 13 12 11 10 Strong signal Weak signal 9 8 76 5 4 3 2 1 0 Without nonlinear encoding With nonlinear encoding Arab Open University-Lebanon Tutorial 11 28

T 305: DIGITAL COMMUNICATIONS Delta Modulation n Analog input is approximated by a staircase

T 305: DIGITAL COMMUNICATIONS Delta Modulation n Analog input is approximated by a staircase function Move up or down one level ( ) at each sample interval Binary behavior n Function moves up or down at each sample interval Arab Open University-Lebanon Tutorial 11 29

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile In facsimile, usually abbreviated to fax, the

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile In facsimile, usually abbreviated to fax, the message source is a document each page of which is transmitted in turn and reproduced at the receiving end. This allows both text and pictures or diagrams to be sent. n. A small sharply focused spot of light is scanned across the original document in a series of closely spaced parallel lines. White areas reflect more light than dark ones and an optical detector is used to convert the reflected light into a voltage which is sampled so as to represent the intensity of the light reflected from small closely spaced areas along each line. n. Each sample is quantized as a 0 or a 1 depending on how much light is reflected. The usual convention is that a 0 corresponds to a ‘white’ area and a 1 to a ‘black’ area. At the receiving end, a printing head scanning across a sheet of paper prints a black dot for a 1 and a space for a 0. n Arab Open University-Lebanon Tutorial 11 30

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) n. Facsimile using telephone links

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) n. Facsimile using telephone links to transmit the coded bitstreams has been around for a long time, but its widespread use in most offices and many homes happened relatively recently. This is because of the considerable reduction in cost of the electronic components. n. The individual dots are known as picture elements or ‘pels’. The quality of reproduction of transmitted documents depends on how close contiguous pels are to each other. This is often expressed as the picture resolution in pels per unit length. Typical values are 8. 04 pels per millimetre (about 200 pels per inch) horizontally, with 3. 85 or 7. 7 lines per millimetre vertically (about 100 or 200 lines per inch). These are called standard resolution and higher. Arabresolution Open University-Lebanon , Tutorial 11 31

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) If you have used a

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) If you have used a fax machine, you will probably know that it works faster than that, even though time seems to go very slowly when standing by the machine. The fax may appear to use a higher bit-rate, mainly because some form of data compression is used. n. The main elements of a fax terminal are shown in the next slide. The terminal can both transmit and receive documents. When transmitting a document, the output of the scanner is a one-bit-per-pel stream which is compressed in the image coder. The compressed stream is sent on to the telephone line after suitable modulation. n Arab Open University-Lebanon Tutorial 11 32

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) Run-length encoding n. In most

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) Run-length encoding n. In most cases lines would consist of alternate groups of several white pels followed by several black ones. For instance, in a page of text, the margins, spaces between letters, and spaces between words would consist entirely of white pels, as would complete scan lines between lines of text. n. Figure below shows a portion of a scanned line. Instead of sending one bit corresponding to each pel, run-length encoding is used. The idea is to send numbers which indicate the lengths of runs of pels of the same type. Thus for the section of line shown, the sequence would be: 3 black, 5 white, 8 black, 6 white, 5 black, 9 white, 9 black, and so on. Portion of a scanned line. Black picture elements are represented by the dark grey squares. Arab Open University-Lebanon Tutorial 11 33

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) Run-length encoding (cont. ) n.

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) Run-length encoding (cont. ) n. In order to avoid having to specify black or white in each case, every line starts with a white pel run. If a line actually starts with a black pel run, the first run in the coded line has zero length. Thus a line starting with 4 black pels followed by 5 white ones would be coded 0, 4, 5, …, whereas a line starting with 4 white pels followed by 5 black ones would be coded 4, 5, …. The use of the zero length white pel run is known as overscanning. Arab Open University-Lebanon Tutorial 11 34

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) Modified Huffman coding n. Huffman

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) Modified Huffman coding n. Huffman coding requires estimates for the probabilities of the possible run lengths. These could be obtained for each document by pre-processing before transmission. The message could be scanned and the resulting run lengths stored. The run-length frequencies, and, hence, probabilities, could be evaluated and used to obtain a Huffman code table for the document. n. In the case of fax, different codes are used for white and black runs, because the probabilities of white and black runs of a given length are different in general. The first run of each line is assumed to be white, so a white run-length code is used at the start of each line. The next coded run must be black, so a black run-length code is used. Thus white and Arab Open University-Lebanon black codes are used alternately until the end of the line. 35 Tutorial 11

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) Modified Huffman coding (cont. )

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) Modified Huffman coding (cont. ) n. Codes are specified for each possible run length from 0 to 63. These are known as terminating codes. For run lengths greater than 63, a set of codes, known as make-up codes is used. There is a code for each integral multiple of 64. Thus a white run length of 133 pels would be treated as 128 + 5 and encoded as 10010 for the 128 followed by 1100 for the 5, giving a combined code of 100101100. Arab Open University-Lebanon Tutorial 11 36

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) Modified READ coding n. The

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) Modified READ coding n. The use of the modified Huffman coding on documents consisting of text or of line drawings which contain long runs of white pels can provide compression ratios of the order of 10 to 1 compared with the direct transmission of one bit per pel. The code is known as one-dimensional code, because it deals with one line at a time. In the case of documents containing photographs, or other types of pictures with various shades of grey which require varying densities of black and white pels, there are far fewer long runs of pels of either type. Using modified Huffman coding can then require, on average, more than one bit per pel, leading to expansion rather than the Arab Open University-Lebanon Tutorial 11 37 required compression. n

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) Modified READ coding (cont. )

T 305: DIGITAL COMMUNICATIONS Topic 3: Facsimile (cont. ) Modified READ coding (cont. ) n. A code which, in effect, only transmits the differences between one line and the next can then prove to be very efficient. It is known as the modified READ code; n. Because it involves dealing with two lines at a time, it is referred to as a two-dimensional code. In the case, an extra bit is added to the EOL code at the end of each line with the value 1 when the modified Huffman code has been used for the next line and 0 when the modified READ code has been used. Arab Open University-Lebanon Tutorial 11 38