chapter 3 data transmission. 2 introduction data communication system –data transmission –to...
TRANSCRIPT
Chapter 3
Data Transmission
2
Introduction
• Data communication system– data transmission– to detect and correct loss or corruption of
information– control of the data transfer rate– format of the data being transmitted
3
Data transmission basics
• Encode– the electronics within the keyboard into an
equivalent binary-coded pattern
• Standard coding scheme– EBCDIC
• 8bit code
• a proprietary code by IBM
4
Data transmission basics (cont.)
– ASCII• 7bit code
• the same as that defined by the ITU-T
• Character– printable character– non-printable character (control character)
• Octet– as a byte for communication purposes
5
Bit-serial transmission
• Parallel transfer mode– there are multiple wires connecting each subunit and da
ta
– minimal delays in tranferring each word
– high cost
• Bit-serial transmission– to use a single pair of lines
– each octet making up the data is transmitted a single bit at a time using a fixed interval for each bit
6
Transmission mode
7
Communication modes
• Three analogous modes of operation– Simplex
• when data is to be transmitted in one direction only
– Half-duplex• when the two interconnected devices wish to exchan
ge information alternately
– Duplex• when data is to be exchanged between the two conn
ected devices in both directions simutaneously
8
Transmission mode
• For the receiving device to decode and interpret bit pattern correctly– bit or clock synchronization
• the start of each bit cell period
– character or byte synchronization• the start and end of each element
– block or frame synchronization• the start and end of each complete message block
9
Transmission mode (cont.)
• Whether the transmitter and receive clocks are independent or synchronized– asynchronous transmission
• each character is treated independently for clock and character synchronization purpose and the receiver resynchronizes at the start of each character received
– synchronous transmission• the complete frame of characters is transmitted as a contiguous
string of bits and the receiver endeavors to keep in synchronism with the incoming bit stream for the duration of the complete frame
10
Asynchronous transmission
• Primarily when the data to be transmitted is generated at random intervals– the user keys in each character at an indeterminate rate
– with possibly long random time intervals between each successive typed character
• start bit and one or more stop bits– each transmitted character or byte is encapsulated
11
Asynchronous transmission (cont.)
• Baud– when defining the transmission rate of a line– the number of line signal transitions per second
• signaling rate– to define the number of line signal transitions per second
12
Synchronous transmission
• Normally use– when the rate at which characters are generated is
indeterminate
– for the transmission of blocks of characters at relatively low data rates
• to enable the receiving device to achieve the various levels of synchronization– the transmitted bit stream is suitably encoded so that
the receiver can be kept in bit synchronism
13
Synchronous transmission (cont.)
– All frames are preceded by one or more reserved bytes or characters to ensure the receiver reliably interprets the received bit stream on the correct character or byte boundaries
– The contents of each frame are encapsulated between a pair of reserved characters or bytes for frame synchronization
14
Error control
• Parity bit– when we use asynchronous transmission
– since each character is treated as a separate entity
– normally embed an additional binary digit within each transmitted character
• Error check sequence– when we use synchronous transmission
– usually determine possible transmission errors on the complete frame
15
Flow control
• Flow control– to control the flow of data transfer to ensure
that the receiver does not lose any of the transmitted data because the receiving device has insufficient storage
16
Data link protocol
• Error control
• Flow control
• the format of the data being exchanged
• the type and order of messages that are to be exchanged in order to achieve reliable information transfer between the two communicating parties
17
Asynchronous transmission
• Functions of DTE– Parallel-to-serial conversion of each character or byte
in preparation for its transmission on the data link– Serial-to-parallel conversion of each received character
or byte in preparation for its storage and processing in the device
– A means for the receiver to achieve bit, character, and frame synchronization
– The generation of suitable error check digits for error detection and the detection of such errors at the receiver should they occur
18
Bit synchronization
• The local receiver clock samples the incoming signal as near to the center of the bit cell as possible– a local receiver
clock of N times the transmitted bit rate is used
19
Character synchronization
• The receiving transmission control circuit is programmed to operate with the same number of bits per character and the same number of stop bits as the transmitter
• After the start bit has been detected and received, the receiver achieves character synchronization simply by counting the programmed number of bits
20
Frame synchronization
• Information frames– messages comprising blocks of characters
• frame synchronization– when information frames are being transmitted,
the receiver must be able to determine the start and end of each frame
21
Frame synchronization (cont.)
• Transmitting blocks of printable characters– encapsulate the complete block between two
special transmission control characters• STX, ETX
• In the case of binary data– STX and ETX are each preceded by a third
transmission control character known as DLE
22
Frame synchronization (cont.)
23
Synchronous transmission
• As with asynchronous transmission– we must adopt a suitable method to enable the
receiver to achieve bit, character and frame synchronization
24
Bit synchronization
• Digital phase-lock-loop(DPLL)– it exploits the 10 or
01 bit transitions in the received signal to maintain bit synchronism over an acceptably long period
25
Clock encoding and extraction
• Embedding timing information into a transmitted bit stream
26
Clock encoding and extraction
• Bipolar encoding– a binary 1 is represented by a positive pulse and binary
0 by a negative pulse
• return-to-zero(RZ) signal– the encoded signal returns to the zero level after each
encoded bit (positive or negative)
• non-return-to-zero(NRZ) signal(Manchester encoding)– a binary 1 is encoded as a low-high signal and a binary
0 as a high-low signal
27
Clock encoding and extraction
• Differential Manchester encoding– a transition at the start of the bit cell occurs
only if the next bit to be encoded is a 0
28
Digital phase-lock-loop
• DPLL– the circuit used
to maintain bit synchronism
29
Hybrid schemes
• As the bit rate increases– it becomes increasingly difficult to obtain and
maintain clock synchronization
• hybrid scheme = Manchester encoding + DPLL
• DPLL– it keeps the local clock in synchronism with the
incoming received signal
30
Hybrid schemes (cont.)
• Manchester encoding– there is at least one signal transition every bit
cell rather than one per five bits with an NRZI signal
• disadvantage– the price to pay is the increased bandwidth
required
31
Hybrid schemes (cont.)
32
Character-oriented synchronous transmission
• Character-oriented transmission– for the transmission of blocks of characters– adds two or more transmission control
characters, SYN characters before each block of characters
– once the receiver has obtained bit synchronization it enters what is known as the hunt mode
33
Character-oriented synchronous transmission
– Terminates the process hen it detects the ETX character
34
Bit-oriented synchronous transmission
• A character-oriented transmission control scheme is relatively inefficient for the transmission of binary data
• bit-oriented transmission– it can be used for the transmission of frames
comprising either printable characters or binary data
35
Bit-oriented synchronous transmission
• Bit-oriented transmission – flag byte (flag pattern)
• primarily on point-to-point links
• the start and end of a frame are both signaled by the same unique 8-bit pattern 01111110 (flag byte)
• bit-oriented– the received bit stream is searched by the receiver on a bit-by-bit
basis for both the start-of-frame flag
• idle bytes– to enable the receiver to obtain and maintain bit synchronism
36
Bit-oriented synchronous transmission
• Zero bit insertion (bit stuffing)– the circuit detects whenever it has transmitted a sequence
of five contiguous binary 1 digits
– start-of-frame delimiter• used with some LANs
• preamble– to enable all the other stations to obtain bit
synchronization
– the sending station precedes the frame contents with a bit pattern
37
Bit-oriented synchronous transmission
– Once in bit synchronism, the receiver searches the received bit stream on a bit-by-bit basis until it detects the known start of frame byte 10101011
– bit-encoding violations• also used with LANs
• the start and end of a frame are both signaled by the use of nonstandard bit encoding patterns
• data transparency– since the J and K symbols are nonstandard bit encoding,
the frame contents will not contain
38
Bit-oriented synchronous transmission
39
Error detection methods
• Two approach– forward error control
• each transmitted character or frame contains additional information
• the receiver can not only detect when errors are present but also determine where in the received bit stream the errors are
– Feedback error control• each character or frame includes only sufficient additional
information to enable the receiver to detect when errors are present but not their location
40
Error detection methods (cont.)
• Feedback error control – the techniques that are used to achieve reliable error
detection– the control algorithms that are available to perform the
associated retransmission control schemes
• two factors that determine the type of error detection techniques– BER(bit error rate)
• whether the errors occur as random single-bit errors or as groups of contiguous strings of bit errors
– Burst error
41
Parity
• For detecting bit errors with asynchronous and character-oriented synchronous transmission
• two type– even parity
• the total number of 1 bits is even
– odd parity
42
Parity (cont.)
• It comprises a set of exclusive-OR(XOR) gates
• It detects only single bit errors
43
Block sum check
• When blocks of characters are being transmitted– there is an increased probability that a character
will contain a bit error
• block sum check– traverse(row) parity + longitudinal(column)
parity
44
Block sum check (cont.)
45
Cyclic redundancy check• When bursts of errors are present• error burst
– the number of bits between two successive erroneous bits including the incorrect two bits
• Parity, or its derivative block sum check– does not provide a reliable detection scheme against
error bursts
46
Data compression
• Public transmission facilities– charges are based on time
• we can employ a range of compression algorithms– each suited to a particular type of data– intelligent modems
• now offer an adaptive compression
47
Packed decimal
• When frames comprising just numeric characters are being transmitted
48
Relative encoding
• When transmitting numeric data that has only small differences between successive values
49
Character suppression
• The control device at the transmitter scans the frame contents prior to transmission– if a contiguous string of three or more
characters is located– replaces these with the three-character sequence
50
Huffman coding
• Not all symbols in a transmitted frame occur with the same frequency– the most common characters are encoded using
fewer bits than less frequent characters– a form of statistical encoding– bit-oriented transmission
51
Example 3.4
52
Huffman coding (cont.)
• 보내는 쪽에서는 미리 데이터를 한 번 scan 해서 huffman tree 를 만들어 이를 미리 수신하는 쪽으로 전송– 수신측에서는 이를 보고 각 문자에 대한 hu
ffman codeword 를 알 수 있다 .
• Prefix property– 한 codeword 는 다른 codeword 의 prefix 가
될 수 없다
53
Huffman coding (cont.)
• 각 문자 집합마다 huffman tree 가 다르다– adaptive compression
• 각 data 집합에 대해 huffman codeword 를 전송• 각 경우마다 codeword 와 그에 대응되는 문자를
전송해야 하는 overhead
– sender 와 receiver 가 미리 여러 codeword set 을 갖고 있다가 전송 직전에 다음에는 어떤 codeword set 를 쓰겠다고 알린다
54
Dynamic Huffman coding
• Transmitter 와 receiver 가 문자를 전송하면서 동시에 huffman tree 를 구성– 현재 보내려는 문자의 codeword 가 huffman
tree 에 있는 문자면 codeword 를 전송– 그러나 처음 나타나는 문자인 경우에는
압축되지 않은 상태로 전송– sender 와 transmitter 는 각 문자에 대해 매번
huffman tree 를 고쳐나감
55
Dynamic Huffman coding (cont.)
• Root node, empty node (0-branch)
• first character: 1-branch of the root node
• for each subsequent character– 기존에 있는 문자 : codeword 를 전송– 처음 나오는 문자 :
• 현재 empty node 의 codeword 를 전송• 이 문자의 압축되지 않은 code 를 보낸다
56
Dynamic Huffman coding (cont.)
• 매번 문자를 전송할 때마다 huffman tree를 갱신– 기존에 있는 문자
• 빈도 수를 고치고 weight order 가 틀려지면 다시 교정
– 처음 나오는 문자• empty node 를 2 개의 branch node 로 고쳐서 0-b
ranch 를 empty node, 1-branch 를 새 문자의 노드로 할당
57
Dynamic Huffman coding (cont.)
• Weight order 의 순서– 모든 노드의 빈도수를 bottom-to-up, left-to-
right 로 배열
58
59
60
61
Facsimile compression
• Digitized image– vertical resolution
• 3.85 or 7.7 lines per mm
– horizontal resolution• 8.05 pels per mm
– pel(picture element)• 0 for white, 1 for black
– 2 million binary digit for typical page
62
Facsimile compression (cont.)
• As part of the standardization process– extensive analyses of typical scanned document pages
were made
• Tables of codewords– were produced based on the relative frequency of occur
rence of the number of contiguous white and black pels found in a scanned line
• two separate tables– termination-codes table– make-up codes table
63
Transmission control circuits
• Transmission control circuits– programmable
• the user can define the precise mode of operation of the device
– universal communication interface circuits• a single circuit provides one, two or even four
separate transmission line interface circuits
64
Transmission control circuits
• The names and functions of the most common devices– Universal asynchronous receiver transmitter
– Universal synchronous receiver transmitter
– Universal synchronous/asynchronous receiver transmitter
– Bit-oriented protocol circuits
– Universal communications control circuits
65
Communications control devices
• Facility– can operate a central
electronic mail service for an enterprise, or house a central database to which the distributed community of terminals requires access
66
Time-division multiplexer
• The terminals located in each establishment associated with an enterprise all require access to the central computer
67
Statistical multiplexer
• TDM– each terminal is allocated a fixed character slot
in each frame– if the terminals or computer has no character
ready to transmit– the microprocessor must insert a NUL character
in this slot– thus leading to inefficiencies in the use of the
available transmission bandwidth
68
Statistical multiplexer (cont.)
• Principle– the mean data rate of
characters entered at a terminal keyboard is often much lower than the available transmission capacity of the line
69
Block-mode devices
• In block mode– as each character is keyed in it is echoed to the
display screen directly by the terminal’s local processor
– the data is then passed to the central computing complex where it is processed when a complete lock of data has been assembled
70
Block-mode devices (cont.)
71
Block-mode devices (cont.)
• Multidrop lines– a common method of reducing transmission lin
e costs in block-mode terminal networks– with only one line for each community of termi
nals, only one message block can be sent at a time, either by a terminal or by the central computer
• controlled by poll-select
72
Block-mode devices (cont.)
• Poll-select– To ensure that only one message is transmitted
at any instant on each shared communication line, the central computer, or its agent, either polls or selects each terminal connected to the line in a particular sequence