Chap14-Communic - ETRO-VUB Department of Electronics and

advertisement
Telecommunications
Concepts
Chapter 1.4
Communications
Theory
1
09-07-K.Steenhaut & J.Tiberghien - VUB
Contents
• Data transmission fundamentals
– Parallel vs. serial transmission
– Synchronous vs. asynchronous communications
– Analog vs. digital communications
– Shannon’s theorem
– Eye diagrams
• Transmission error correction
– Redundant encoding
– Sliding window error correction
• Encoding and modulation
2
09-07-K.Steenhaut & J.Tiberghien - VUB
Contents
• Data transmission fundamentals
– Parallel vs. serial transmission
– Synchronous vs. asynchronous communications
– Analog vs. digital communications
– Shannon’s theorem
– Eye diagrams
• Transmission error correction
– Redundant encoding
– Sliding window error correction
• Encoding and modulation
3
09-07-K.Steenhaut & J.Tiberghien - VUB
Parallel Transmission
Clock
Disadvantages :
Differences in propagation delay
Cost of multiple communication channels
4
09-07-K.Steenhaut & J.Tiberghien - VUB
Serial Transmission
Serial Data
Clock
5
09-07-K.Steenhaut & J.Tiberghien - VUB
Serial Transmission
with clock/data multiplexing
Serial Data + Clock
6
09-07-K.Steenhaut & J.Tiberghien - VUB
Contents
• Data transmission fundamentals
– Parallel vs. serial transmission
– Synchronous vs. asynchronous communications
– Analog vs. digital communications
– Shannon’s theorem
– Eye diagrams
• Transmission error correction
– Redundant encoding
– Sliding window error correction
• Encoding and modulation
7
09-07-K.Steenhaut & J.Tiberghien - VUB
Synchronous Transmission
DTE
DTE
Data is carried by
the clock signal
Clock + Serial Data
Tx clock DCE
in DTE
or DCE Modem
8
DCE
Rx clock
extracted
by DCE
Modem
09-07-K.Steenhaut & J.Tiberghien - VUB
Synchronous Transmission
1
0
0
1
1
Clock
9
09-07-K.Steenhaut & J.Tiberghien - VUB
Asynchronous Transmission
DTE
DCE
Modem
10
The DCE’s just
transmit data bits.
Provisions for
Clock
synchronization
need to be
included in data
Serial Data
+ Clock synchronization
DTE
DCE
Modem
09-07-K.Steenhaut & J.Tiberghien - VUB
Start-stop synchronization
clock
Designed for electro-mechanical terminals
Still used in modern electronic terminals !
11
09-07-K.Steenhaut & J.Tiberghien - VUB
Most external PC modems use
an asynchronous link between
the PC and the modem and a
synchronous link between the
modems. The modem contains
a microcomputer that buffers
the data
DTE
DTE
External PC modems
Asynchronous links
(serial port or USB)
μP
μP
DCE
DCE
Synchronous link
Modem
12
Modem
09-07-K.Steenhaut & J.Tiberghien - VUB
Contents
• Data transmission fundamentals
– Parallel vs. serial transmission
– Synchronous vs. asynchronous communications
– Analog vs. digital communications
– Shannon’s theorem
– Eye diagrams
• Transmission error correction
– Redundant encoding
– Sliding window error correction
• Encoding and modulation
13
09-07-K.Steenhaut & J.Tiberghien - VUB
Digital Data Communications
011001
TX
Analog communication channel
011001
RX
14
09-07-K.Steenhaut & J.Tiberghien - VUB
Encoding and Decoding
digital signals
• Transmitter (Tx)
– Input : stream of binary numbers
– Output : stream of analog signals suitable for
transmission over long distances
• Receiver (Rx)
– Input : stream of analog signals
» generated by transmitter
» distorted by transmission channel
– Compares each input signal with all signals which could
have been transmitted and decides from which one the
input is a distorted image.
– Output : stream of binary numbers, preferably identical
to the input of the transmitter
15
09-07-K.Steenhaut & J.Tiberghien - VUB
Contents
• Data transmission fundamentals
– Parallel vs. serial transmission
– Synchronous vs. asynchronous communications
– Analog vs. digital communications
– Shannon’s theorem
– Eye diagrams
• Transmission error correction
– Redundant encoding
– Sliding window error correction
• Encoding and modulation
16
09-07-K.Steenhaut & J.Tiberghien - VUB
Analog Transmission Channel
Characterized by :
• Bandwidth
– Difference between highest and lowest frequency of
sine waves which can be transmitted
Received power
Frequency
– Number of possible state changes per second
• Signal to Noise ratio
– S/N = (signal power) / (noise power)
– S/N determines number of distinct states which can
be distinguished within a given observation interval
17
09-07-K.Steenhaut & J.Tiberghien - VUB
Binary vs. Multi-bit encoding
t
+8V
t
+8V
1
+4V
0V
0V
0
-4V
-8V
-8V
Noise margin
= +/- 4 V
11
10
01
00
+6V
+2V
-2V
-6V
Noise margin
= +/- 2 V
Modulation rate = 1/t (in Baud)
Data rate = (1/t) Log 2 n (in b/s)
18
09-07-K.Steenhaut & J.Tiberghien - VUB
Shannon’s Theorem
DataRate <= B.Log2(1+S/N)
B : Channel Bandwidth (in Hertz)
S/N : Signal to Noise ratio
Examples:
Telephone channel,
B = 3000 Hz, S/N = 1000
DataRate <= 30 000 b/s
Optical fiber
B = 25 THz, S/N >= 1
DataRate <= 25 Tb/s
19
09-07-K.Steenhaut & J.Tiberghien - VUB
Contents
• Data transmission fundamentals
– Parallel vs. serial transmission
– Synchronous vs. asynchronous communications
– Analog vs. digital communications
– Shannon’s theorem
– Eye diagrams
• Transmission error correction
– Redundant encoding
– Sliding window error correction
• Encoding and modulation
20
09-07-K.Steenhaut & J.Tiberghien - VUB
Eye Diagrams
1
0
1
t
Clock
The incoming waveforms
are displayed on an oscilloscope,
synchronized by the recovered clock
21
09-07-K.Steenhaut & J.Tiberghien - VUB
Multi-bit eye diagrams
Modern communication channels
use phase and amplitude shifts,
best displayed in polar eye diagrams
Good signal/noise ratio
22
Poor signal/noise ratio
09-07-K.Steenhaut & J.Tiberghien - VUB
Communications
in degraded mode
Same baud rate
Half bit/s rate
23
09-07-K.Steenhaut & J.Tiberghien - VUB
Contents
• Data transmission fundamentals
– Parallel vs. serial transmission
– Synchronous vs. asynchronous communications
– Analog vs. digital communications
– Shannon’s theorem
– Eye diagrams
• Transmission error correction
– Redundant encoding
– Sliding window error correction
• Encoding and modulation
24
09-07-K.Steenhaut & J.Tiberghien - VUB
Error detection and correction
Length of messages :
k + r <= LMax
Informative message:
k bits
Redundancy:
r bits, f(inf.mess.)
# Messages send:
2k
# Messages received:
2 k+r
i=1
Hamming Distance (X-Y): |Xi-Yi|
k+r
25
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Detection Example
Belgian Bank Account Numbers
• Bank account number structure
– Bank identification : 3 digits
– Account number : 7 digits
– Error detection : 2 digits
• The ten first digits modulo 97 are appended for error
detection purposes.
• This algorithm allows detection of all single digit errors
• Example :
– 140-0571659-08. 1400571659 MOD 97 = 08
– 140-0671659-08. 1400671659 MOD 97 = 01
26
09-07-K.Steenhaut & J.Tiberghien - VUB
Error detecting codes
k = 1; r = 1; red.bit = inf.bit.
01
11
00
00
Hd = 2
11
10
Single bit errors are detected if
hamming distance between legitimate messages > 1.
No guessing is possible as erroneous messages are
at equal distances from several correct ones.
27
09-07-K.Steenhaut & J.Tiberghien - VUB
Error correcting codes
k = 1; r = 2; red.bits = inf.bit.
011
010
111
001
000
000
110
Hd = 3
111
101
100
Hamming distance between legitimate messages > 2.
This implies that each erroneous message is closer
to one correct message than to any other.
28
09-07-K.Steenhaut & J.Tiberghien - VUB
Error correcting codes
Required Overhead
for single bit error correction
k+r < 2r
29
information
redundancy
Overhead
1
<= 4
<= 11
<= 26
<= 57
<= 120
<= 247
2
3
4
5
6
7
8
200 %
75 %
36 %
19 %
11 %
6%
3%
09-07-K.Steenhaut & J.Tiberghien - VUB
Error correction with a 4+3 bit code
2
1111100
3
1
0000000
1111111
0001011
4
1110100
3
4
0010110
3
1101001
0011101
4
6
1100010
0100111
1011000
0101100
4
1010011
0110001
7
1001110
0111010
1000101
The three redundant bits are a function of the four data bits
30
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Correction
• Error detecting codes
– Correction by retransmission of erroneous blocks
– If few errors, very low overhead
– Most common approach to error correction in data
communications
• Error correcting codes
–
–
–
–
–
31
Very high overhead with short data blocks
Longer data blocks can have multiple errors
Used when retransmission impossible or impractical
Also used when error rate rather high.
Error correcting codes for long blocks, with multiple
errors exist and are used (trellis encoding)
09-07-K.Steenhaut & J.Tiberghien - VUB
Contents
• Data transmission fundamentals
– Parallel vs. serial transmission
– Synchronous vs. asynchronous communications
– Analog vs. digital communications
– Shannon’s theorem
– Eye diagrams
• Transmission error correction
– Redundant encoding
– Sliding window error correction
• Encoding and modulation
32
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Correction by
Retransmission
Time-out
A
B
1
2
3
4
4
Data
Ack
time
33
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Correction by
Retransmission
Inefficient unless
round-trip delay << transmission time of a datablock
A
1
2
3
4
B
Data
Ack
time
34
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Correction
with sliding window
Data blocks in sliding window can be transmitted
without waiting for an acknowledgment.
Receiving acknowledgments pushes window forward.
A
1
2
3
4
5
6
7
8
Data
B
Ack
1
35
2
3
4
5
6
7
8 time
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Correction
with sliding window
Data blocks in sliding window can be transmitted
without waiting for an acknowledgment.
Receiving acknowledgments pushes window forward.
A
1
2
3
4
5
6
7
8
Data
B
Ack
time
36
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Correction
with sliding window
Data blocks in sliding window can be transmitted
without waiting for an acknowledgment.
Receiving acknowledgments pushes window forward.
A
1
2
3
4
5
6
7
8
Data
B
Ack
1
37
time
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Correction
with sliding window
Data blocks in sliding window can be transmitted
without waiting for an acknowledgment.
Receiving acknowledgments pushes window forward.
A
1
2
3
4
5
6
7
8
Data
B
Ack
1
38
2
time
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Correction
with sliding window
Data blocks in sliding window can be transmitted
without waiting for an acknowledgment.
Receiving acknowledgments pushes window forward.
A
1
2
3
4
5
6
7
8
Data
B
Ack
1
39
2
time
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Correction
with sliding window
Data blocks in sliding window can be transmitted
without waiting for an acknowledgment.
Receiving acknowledgments pushes window forward.
Time-out
A
1
2
3
4
6
5
7
8
Data
B
Ack
1
40
2
4
time
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Correction
with sliding window
Data blocks in sliding window can be transmitted
without waiting for an acknowledgment.
Receiving acknowledgments pushes window forward.
Time-out
A
1
2
3
4
6
5
7
8
Data
B
Ack
1
41
2
4
5
time
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Correction
with sliding window
Data blocks in sliding window can be transmitted
without waiting for an acknowledgment.
Receiving acknowledgments pushes window forward.
A
1
2
3
4
5
3
4
5
6
Data
Go Back n window
management
B
Ack
1
42
2
4
5
time
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Correction
with sliding window
Data blocks in sliding window can be transmitted
without waiting for an acknowledgment.
Receiving acknowledgments pushes window forward.
A
1
2
3
4
5
3
4
5
6
B
Ack
1
43
Data
2
4
5
3
4 time
09-07-K.Steenhaut & J.Tiberghien - VUB
Error Correction
with sliding window
Data blocks in sliding window can be transmitted
without waiting for an acknowledgment.
Receiving acknowledgments pushes window forward.
A
1
2
3
4
5
3
6
7
8
Data
Buffering required
in receiver
B
Ack
1
44
2
4
5
time
09-07-K.Steenhaut & J.Tiberghien - VUB
Contents
• Data transmission fundamentals
– Parallel vs. serial transmission
– Synchronous vs. asynchronous communications
– Analog vs. digital communications
– Shannon’s theorem
– Eye diagrams
• Transmission error correction
– Redundant encoding
– Sliding window error correction
• Encoding and modulation
45
09-07-K.Steenhaut & J.Tiberghien - VUB
Characterization of random signals*
Autocorrelation function
1

R( )  lim
v(t ). v(t   ). dt

    
Fourier Spectrum

S ( )   R (  ). cos(  ). d 

* Students with inadequate mathematical background may skip this slide
46
09-07-K.Steenhaut & J.Tiberghien - VUB
Straight Binary Code
v
0
1
0
1
0
0
1
1
1
a
t
0
Frequency spectrum :
• Maximum at f = 0
• important DC
component due to
voltage asymetry
• No energy at clock
frequency
• Amplitude of maxima
decreases as 1/f
47
Power
1
0.5
Freq
0
0
1
2
3
09-07-K.Steenhaut & J.Tiberghien - VUB
Manchester Code
v
0
1
0
1
0
0
1
1
1
t
Frequency spectrum :
• Nothing at f = 0
• High energy at clock
frequency
• Amplitude of maxima
decreases as 1/f
48
1
Power
0.5
Freq
0
0
1
2
3
4
09-07-K.Steenhaut & J.Tiberghien - VUB
Asymptotic Behavior of Spectra
Both studied codes have energy spectra decreasing as 1/f2 ,
meaning that the voltage or current spectra decrease as 1/f.
This is a consequence of the instantaneous state transitions
1
 n sin n t
1, 3 , 5 ,
49
09-07-K.Steenhaut & J.Tiberghien - VUB
Asymptotic Behavior of Spectra
1
 n 2 cos n t
1, 3 , 5 ,
The smoother the waveforms are, the lesser energy will be
found in the spectrum at higher frequencies
In actual transmission systems, rounded waveforms, such
as parts of sine waves will be used.
50
09-07-K.Steenhaut & J.Tiberghien - VUB
Modulation Techniques
1
0
0
1
1
Frequency 1
0
0
1
1
1
0
0
1
1
Amplitude
Phase
51
09-07-K.Steenhaut & J.Tiberghien - VUB
Introduced concepts
• Parallel vs. Serial transmission systems
• Transmission channel
– characterized by bandwidth & signal to noise ratio
– puts upper limit on the information throughput
• Error correction by using redundant coding of information
– with error correcting codes
– with error detecting codes and retransmission
• Throughput close to the upper limit requires specific
coding of the information (modulation/demodulation)
52
09-07-K.Steenhaut & J.Tiberghien - VUB
Bibliography
To know More about
Communication Theory
I.A.Glover
P.M.Grant
Digital Communications,
Prentice Hall 1998
ISBN 0 - 13 - 565391 - 6
Recommended for this chapter
53
09-07-K.Steenhaut & J.Tiberghien - VUB
Download