Transcript Document

Data Transmission and
Computer Networks
 Data
1
Encoding
Sami Al-Wakeel
Data Encoding

Analog and digital data can be encoded
into either digital or analog signal, creating
four possible combinations:
1- Digital Data, Digital Signal.
2- Analog Data, Digital Signal.
3- Digital Data, Analog Signal.
4- Analog Data, Analog Signal.
2
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals:
 Binary data are transmitted by encoding
each data bit into signal element.
 Factors determine how successful the
receiver will interpret the incoming signal:
–
–
–
3
An increase in data rate increases bit error
rate.
An increase in S/N decreases bit error rate.
An increase in bandwidth allows an increase in
data rate.
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals (Continued):
Digital Signal Encoding
Polar
NRZ
NRZ-L
4
RZ
NRZI
Bipolar
Biphase
Manchester
AMI
B8ZS
Differential
Manchester
Sami Al-Wakeel
HDB3
Data Encoding
1. Digital Data, Digital Signals (Continued):
5
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals (Continued):
6
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals (Continued):
Digital signal Encoding Formats:
I. NonReturn-to-Zero-Level (NRZ-L) Encoding:
 A negative voltage is equated with binary 1 and a positive voltage
with binary 0.
II. NonReturn to Zero Inverted (NRZI) Encoding:
 Binary 0 is represented by no transition at the beginning of bit
interval, and binary 1 is represented by a transition at beginning
of bit interval.
7
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals (Continued):
Advantages of NRZ:
– The NRZ codes are simple and make efficient use of
bandwidth.
Disadvantages of NRZ:
– Lack of synchronization capability. Consider a long
string of 1’s or 0’s for NRZ-L, or a long string of 0’s for
NRZI, the output is a constant voltage over a long
period of time.
8
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals (Continued):
III. Bipolar-AMI Encoding:
 A binary 0 is represented by no line signal, and a binary 1
is represented by a positive or negative pulse. The binary
1 pulse must alternate in polarity.
IV. Pseudoternary Encoding:
 A binary 1 is represented by no line signal, and a binary 0
by alternating positive or negative pulses.
9
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals (Continued):
 Advantages of Bipolar-AMI or Pseudoternary:
– No loss of synchronization if long string of binary
1’s occurs in the case of AMI or 0’s in the case of
Pseudoternary.
– The pulse alternation property provides a simple
means of error detection.
Disadvantages of Bipolar-AMI or Pseudoternary:
– Long string of binary 0’s in the case of AMI or 1’s in
the case of Pseudoternary still present a problem.
– Multilevel binary signal requires approximately 3 dB
more signal power than a two-valued signal for the
same probability of bit error.
10
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals
(Continued):
V. Manchester Encoding:
 There is a transition at the middle of each bit period.
 The mid-bit transition serves as a clocking mechanism
and also as data.
 A low-to high transition represents a binary 1, and a
high-to-low transition represents a binary 0.
11
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals (Continued):
VI. Differential Manchester Encoding:
 There is a transition at the middle of each bit period.
 The mid-bit transition is used only to provide clocking.
 A binary 0 is represented by the presence of a transition at
the beginning of a bit period, and a binary 1 is represented
by the absence of a transition at the beginning of a bit
period
12
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals
(Continued):
Advantages of Manchester and Differential Manchester Encoding:
– Synchronization: Because this is a transition at the middle
of each bit period.
– Error Detection: The absence of the expected transition
can be used to detect errors.
Disadvantages of Manchester and Differential Manchester
Encoding:
– High Signaling Rate: At least one transition per bit time is
needed, and may have at maximum two transitions.
Therefore, the maximum modulation rate (rate at which
signal level is changed) is twice that for NRZ; this means
the required bandwidth is greater.
13
Sami Al-Wakeel
Data Encoding
Modulation Rate:Minimum

14
101010
Maximum
Modulation rate is the rate at which signal
…elements are generated.
NRZ-L
0 (all 0’s or
1’s)
1.0
1.0
NRZI
0 (all 0’s)
0.5
1.0 (al1’s)
Bipolar-AMI
0 (all 0’s)
1.0
1.0
Pseudoternary
0 (all 1’s)
1.0
1.0
Manchester
1.0 (101010
…)
1.0
2.0 (all 0’s or 1’s)
Differential
Manchester
1.0 (all 1’s)
1.5
2.0 (all 0’s)
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals (Continued):
 VII. Bipolar with 8-zeros substitution (B8ZS):
 The coding scheme is based on a bipolar-AMI. The
encoding is updated with the following rules:
– If an octet of all zeros occurs and the last voltage
pulse preceding this octet was positive, then the
eight zeros of the octet are encoded as 0 0 0 + - 0 - +
.
– If an octet of all zeros occurs and the last voltage
pulse preceding this octet was negative, then the
eight zeros of the octet are encoded as 0 0 0 - + 0+ .
15
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals (Continued):

VII. Bipolar with 8-zeros substitution (B8ZS):
Polarity of
previous bit
Polarity of
previous bit
+
0
0
0
0
0
0
0 0
-
0
0
0
0
0
0
0
+
0
0
0 +
-
0
-
-
0
0
0
-
+ 0 +
-
Violation
16
Violation
+
Violation
0
Violation
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals (Continued):
VIII. High-density Bipolar-3 zeros (HDB3):
 HDB3 is based on the AMI encoding.
 HDB3 replaces strings of 4 zeros with sequences
containing one or two pulses.
 In each case, the fourth zero is replaced with a code
violation.
 In addition, successive violations are of alternate
polarity. Thus, if the last violation was positive, this
violation must be negative, and vice versa.
17
Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals (Continued):
VIII. HDB3(Continued):
 The following table shows the HDB3 substitution rules:
Polarity of
Preceding
Pulse
+
18
Number of Bipolar Pulses
(Ones) Since Last
Substitution
Odd
Even
000+00+
000+
-00Sami Al-Wakeel
Data Encoding
1. Digital Data, Digital Signals (Continued):
VIII. HDB3(Continued):
19
+
0 0 0 0
-
0 0 0 0
+
0 0 0 +
-
0 0 0 -
+
0 0 0 0
-
0 0 0 0
+
- 0 0 -
-
+ 0 0 +
Sami Al-Wakeel
Data Encoding
20
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals:
 The most familiar of use of this transformation is for
transmitting digital data through the public telephone
network.
 The telephone network is designed to transmit, switch,
and receive analog signals in the voice-frequency range
of about 300 to 3400 Hz.
 A telephone line will not pass low-frequency signals
that could occur if the data stream is made up of a
continuous string of binary 1s or 0s.
 Thus digital devices are attached to the network via a
modem (Modulator-demodulator) which coverts digital
data to analog signals, and vice versa.
21
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals (Continued):
22
Sami Al-Wakeel
Definitions
23
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals (Continued):
Encoding Techniques:
 There are three basic encoding or modulation
techniques for transforming digital data into analog
signals:
– Amplitude-Shift Keying (ASK).
– Frequency-Shift Keying (FSK).
– Phase-Shift Keying (PSK).
24
Sami Al-Wakeel
Data Encoding
2. Digital Data,
Analog Signals:
25
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals:




26
Bit rate is the number of bits per second.
Baud rate is the number of signal elements per second.
The baud rate equals the bit rate divided by the number
of bits represented by each signal element.
The carrier signal is a high-frequency signal that acts as
a basis for information signal. The receiving device is
turned to the frequency of the carrier signal that it
expects from the sender.
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals (Continued):
Encoding Techniques:
Digital/analog Encoding
ASK
FSK
PSK
QAM
27
Sami Al-Wakeel
Data Encoding
2. Digital Data,
Analog Signals:
I. Amplitude-Shift Keying:
28
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals (Continued):
I. Amplitude-Shift Keying (ASK):
 We can represent a unipolar periodic signal, vd(t), with unity
amplitude and fundamental frequency w0 as:
1 2
1
1
vd (t )   {cos w0 t  cos 3w0t  cos 5w0t  ...}
2 
3
5

We can represent the carrier signal as:
vc (t )  cos wct

ASK can be represented mathematically as:
v ASK (t )  vc (t ).vd (t )
29
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals (Continued):
I. Amplitude-Shift Keying (ASK):
 However:
1
2
1
1
v ASK (t )  cos wc t  {cos wc t. cos w0 t  cos wc t. cos 3w0t  cos wc t. cos 5w0t  ...}
2

3
5
2 cos A. cos B  cos( A  B)  cos( A  B)
1
1
v ASK (t )  cos wct  {cos( wc  w0 )t cos( wc  w0 )t
2

1
1
 cos( wc 3w0 )t cos( wc 3w0 )t
3
3
1
1
 cos( wc 5w0 )t cos( wc 5w0 )t  ...}
5
5
30
Sami Al-Wakeel
Data Encoding
2. Digital Data,
Analog Signals:
II. Frequency-Shift Keying:
31
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals (Continued):
II. Frequency-Shift Keying (FSK):
FSK can be represented mathematically as:
vFSK (t )  vc1 (t ).vd (t )  vc 2 (t ).[1  vd (t )]
where
vc1 (t )  cos w1t
vc 2 (t )  cos w2t
w1 and w2 are the two carrier frequencies in radians
per second.
32
Sami Al-Wakeel
Data Encoding
2.Digital Data, Analog Signals (Continued):
II. Frequency-Shift Keying (FSK):
 An example of use of FSK for full-duplex operation
over the PSTN.
 The PSTN will pass frequencies in the approximate
range 300 to 3400 Hz.
 To achieve full-duplex, the bandwidth is split at 1700
Hz.
 In one direction, the frequencies used to represent 1
and 0 are centered on 1170 Hz. Similarly, for the
opposite direction, the frequencies used to represent
1 and 0 are centered on 2125 Hz
33
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals:
34
Sami Al-Wakeel
Data Encoding
2. Digital Data,
Analog Signals:
III. Phase-Shift Keying:
35
Sami Al-Wakeel
Definitions
Relationship between different phases:
36
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals (Continued):
Multilevel Modulation Methods:
 More efficient use of bandwidth can be achieved
if each signaling element represents more than
one bit. For example, instead of a phase shift of
180o, Quadrature Phase-Shift Keying (QPSK)
or (4-PSK) technique uses phase shifts of
multiple of 90o.
37
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals (Continued):
4-PSK:
38
Sami Al-Wakeel
Data Encoding
8-PSK:
39
Tribit
Phase
000
001
010
011
0
45
90
135
100
101
110
180
225
270
111
315
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals (Continued):
Quadrature Amplitude Modulation (QAM).
Higher bit rates are achieved using 8 and even 16 phase
changes. In practice, however, there is a limit to how
many phases can be used.
 Hence to increase the bit rate further, it is more
common to introduce amplitude as well as phase
variations of each vector. This type of modulation is
then known as Quadrature Amplitude Modulation
(QAM).
 16-QAM has 16 levels per signal element, and hence 4bit symbols.
40
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals
(Continued):
4-QAM (1 amplitude, 4 phases):
41
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals (Continued):
8-QAM (2 amplitudes, 4 phases):
42
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals
(Continued):
16-QAM ( 4 amplitudes, 8 phases):
43
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals (MODEMS):
 A modem converts the digital signal generated by the
computer into an analog signal to be carried by a public
phone line. It is also converts the analog signals
receiver over a phone line into digital signals usable by
the computer.
 The term modem is composite word that refers to a
signal modulator and a signal demodulator.
 A modulator treats a digital signal as a series of 1s and
0s, and so can transform it into an analog signal by
using the digital-to-analog mechanisms of ASK, FSK,
PSK, and QAM.
44
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals
(MODEMS):
45
Sami Al-Wakeel
Data Encoding
2. Digital Data, Analog Signals (MODEMS):
Telephone Line Bandwidth:
46
Sami Al-Wakeel
Data Encoding
Modem Speeds: Theoretical Bit Rates for Modems:
Encoding
47
Half-Duplex
Full-Duplex
ASK , FSK , 2-PSK
2400
1200
4-PSK , 4 QAM
4800
2400
8-PSK , 8-QAM
7200
3600
16-QAM
9600
4800
32-QAM
12000
6000
64-QAM
14400
7200
128-QAM
16800
8400
256-QAM
19200
9600
Sami Al-Wakeel
Data Encoding
3. Analog Data, Digital Signals:


48
A process of converting analog data into digital data,
which process is known as digitization.
The device used for converting analog data into digital
form for transmission, and subsequently recovering the
original data from the digital is known as a codec
(coder-decoder)
Sami Al-Wakeel
Data Encoding
3. Analog Data, Digital Signals (Continued):


49
Voice transmissions are limited to a maximum bandwidth of
less than 4 KHz.
To Convert such signals into digital form, the Nyquest
sampling theorem states:
If a signal f(t) is sampled at regular intervals of time and
at the rate higher than twice the highest frequency
component, then the samples contain all the information
of the original signal. The function f(t) may be
reconstructed from these samples.
Sami Al-Wakeel
Data Encoding
3. Analog Data, Digital Signals (Continued):



50
Hence to convert a 4 KHz voice signal into digital form, it must be
sampled at rate of 8000 times per second.
The sampled signal is first converted into a pulse stream, the
amplitude of each pulse being equal to the amplitude of the original
analog signal at the sampling instant. The resulting signal is known
as a pulse amplitude modulated (PAM) signal.
The PAM signal is still analog since its amplitude can vary over the
full amplitude range.
Sami Al-Wakeel
Data Encoding
3. Analog Data, Digital Signals (Continued):



51
It is converted into an all-digital form by quantizing each
pulse into its equivalent binary form.
If eight bits are used to quantize each PAM signal, then
256 distinct levels are used.
The resulting digital signal is known as a pulse code
modulated (PCM) signal and has a bit rate of 64 kbps –
8000 sample per second each of 8 bits.
Sami Al-Wakeel
Data Encoding
3. Analog Data,
Digital Signals:
52
Sami Al-Wakeel
Data Encoding
3. Analog Data, Digital Signals:
53
Sami Al-Wakeel