William Stallings Data and Computer Communications - PowerPoint PPT Presentation

1 / 63
About This Presentation
Title:

William Stallings Data and Computer Communications

Description:

William Stallings Data and Computer Communications Chapter 5 Data Encoding Data Communication Basics Analog or Digital Three Components Data Signal Transmission ... – PowerPoint PPT presentation

Number of Views:126
Avg rating:3.0/5.0
Slides: 64
Provided by: Adria169
Category:

less

Transcript and Presenter's Notes

Title: William Stallings Data and Computer Communications


1
William StallingsData and Computer Communications
  • Chapter 5
  • Data Encoding

2
Data Communication Basics
  • Analog or Digital
  • Three Components
  • Data
  • Signal
  • Transmission

3
Analog Data Choices
4
Digital Data Choices
5
Encoding Techniques
  • Digital data, digital signal
  • Analog data, digital signal
  • Digital data, analog signal
  • Analog data, analog signal

6
Transmission Choices
  • Analog transmission
  • only transmits analog signals, without regard for
    data content
  • attenuation overcome with amplifiers
  • Digital transmission
  • transmits analog or digital signals
  • uses repeaters rather than amplifiers

7
Advantages of Digital Transmission
  • The signal is exact
  • Signals can be checked for errors
  • Noise/interference are easily filtered out
  • A variety of services can be offered over one
    line
  • Higher bandwidth is possible with data compression

8
Encoding schemes
Analog data, Digital signal
Analog data, Analog signal
digital
analog
analog
voice
Telephone
CODEC
Digital data, Digital signal
Digital data, Analog signal
analog
digital
digital
digital
Modem
Digital transmitter
9
Encoding and Modulation
x(t)
x(t)
g(t)
g(t)
Encoder
Decoder
digital or analog
digital
t
s(f)
s(t)
m(t)
Modulator
Demodulator
m(t)
digital or analog
analog
f
fc
fc
10
Why encoding?
  • Three factors determine successfulness of
    receiving a signal
  • S/N (Signal to Noise Ratio)
  • data rate
  • bandwidth

11
Encoding Schemes' evaluation factors
  • Signal spectrum
  • Clocking
  • Error detection
  • Signal interference noise immunity
  • Cost and complexity

12
Digital Data, Digital Signal / Characteristics
  • Digital signal
  • Uses discrete, discontinuous, voltage pulses
  • Each pulse is a signal element
  • Binary data is encoded into signal elements

13
Terms (1)
  • Unipolar
  • All signal elements have same sign
  • Polar
  • One logic state represented by positive voltage
    the other by negative voltage
  • Data rate
  • Rate of data transmission in bits per second
  • Duration or length of a bit
  • Time taken for transmitter to emit the bit

14
Terms (2)
  • Modulation rate
  • Rate at which the signal level changes
  • Measured in baud signal elements per second
  • Mark and Space
  • Binary 1 and Binary 0 respectively

15
Interpreting Signals
  • Need to know
  • Timing of bits - when they start and end
  • Signal levels
  • Factors affecting successful interpretation of
    signals
  • Signal to noise ratio
  • Data rate
  • Bandwidth

16
Comparison of Encoding Schemes (1)
  • Signal Spectrum
  • Lack of high frequencies reduces required
    bandwidth
  • Lack of dc component allows ac coupling via
    transformer, providing isolation
  • It is important to concentrate power in the
    middle of the bandwidth
  • Clocking issues
  • Synchronizing transmitter and receiver is
    essential
  • External clock is one way used for
    synchronization
  • Synchronizing mechanism based on signal is also
    used preferred (over using an external clock)

17
Spectral density
1.5
B8ZS,HDB3
NRZ-L, NRZI
1
AMI, Pseudoternary
0.5
Mean square voltage per unit bandwidth
Manchester, Differential Manchester
0
0
1
0.5
1.5
-0.5
Normalized frequency (f/r)
18
Comparison of Encoding Schemes (2)
  • Error detection
  • Can be built into signal encoding
  • Signal interference and noise immunity
  • Some codes are better than others
  • Cost and complexity
  • Higher signal rate ( thus data rate) lead to
    higher costs
  • Some codes require signal rate greater than data
    rate

19
Encoding Schemes
  • Nonreturn to Zero-Level (NRZ-L)
  • Nonreturn to Zero Inverted (NRZI)
  • Bipolar -AMI (Alternate Mark Inversion)
  • Pseudoternary
  • Manchester
  • Differential Manchester
  • B8ZS
  • HDB3

20
Digital data, Digital signal
0
1
0
0
1
1
0
0
0
1
1
NRZ
NRZI
Bipolar -AMI
Pseudoternary
Manchester
Differential Manchester
21
Nonreturn to Zero-Level (NRZ-L)
  • Two different voltages for 0 and 1 bits
  • Voltage constant during bit interval
  • Most often, negative voltage for one value and
    positive for the other

22
Nonreturn to Zero Inverted
  • Nonreturn to zero inverted on ones
  • Constant voltage pulse for duration of bit
  • Data encoded as presence or absence of signal
    transition at beginning of bit time
  • Transition (low to high or high to low) denotes a
    binary 1
  • No transition denotes binary 0
  • An example of differential encoding (Data
    represented by changes rather than levels)

23
NRZ
24
NRZ pros and cons
  • Pros
  • Easy to engineer
  • Makes good use of bandwidth
  • Cons
  • dc component
  • Lack of synchronization capability
  • Used for magnetic recording
  • Not often used for signal transmission

25
Multilevel Binary
  • Use more than two levels
  • Bipolar-AMI
  • zero represented by no line signal
  • one represented by positive or negative pulse
  • one pulses alternate in polarity
  • No loss of sync if a long string of ones happens
    (zeros still a problem)
  • No net dc component ? Can use a transformer for
    isolating transmission line
  • Lower bandwidth
  • Easy error detection

26
Pseudoternary
  • One represented by absence of line signal
  • Zero represented by alternating positive and
    negative
  • No advantage or disadvantage over bipolar-AMI

27
Bipolar-AMI and Pseudoternary
28
Trade Off for Multilevel Binary
  • Not as efficient as NRZ
  • With multi-level binary coding, the line signal
    may take on one of 3 levels, but each signal
    element, which could represent log23 1.58 bits
    of information, bears only one bit of information
  • Receiver must distinguish between three levels
    (A, -A, 0)
  • Requires approx. 3dB more signal power for same
    probability of bit error

29
Biphase
  • Manchester
  • Transition in middle of each bit period
  • Transition serves as clock and data
  • Low to high represents one
  • High to low represents zero
  • Used by IEEE 802.3 (Ethernet)
  • Differential Manchester
  • Midbit transition is for clocking only
  • Transition at start of a bit period represents
    zero
  • No transition at start of a bit period represents
    one
  • Note this is a differential encoding scheme
  • Used by IEEE 802.5 (Token Ring)

30
Biphase Pros and Cons
  • Con
  • At least one transition per bit time and possibly
    two
  • Maximum modulation rate is twice NRZ
  • Requires more bandwidth
  • Pros
  • Synchronization on mid bit transition (self
    clocking)
  • No dc component
  • Error detection
  • Absence of expected transition points to error in
    transmission

31
Modulation Rate
RData Ratebits/sec1 Mbps for both
cases Modulation RateBaud RateRate at which
signal elements are generatedR for NRZI2R for
Manchester
32
Scrambling Techniques
  • Used to reduce signaling rate relative to the
    data rate by replacing sequences that would
    produce constant voltage for a priod of time with
    a filling sequence that accomplishes the
    following goals
  • Must produce enough transitions to maintain
    syncchronization
  • Must be recognized by receiver and replaced with
    original data sequence
  • is same length as original sequence
  • No dc component
  • No long sequences of zero level line signal
  • No reduction in data rate
  • Error detection capability
  • As an example, fax machines use the modified
    Huffman code to accomplish this.

33
B8ZS
  • Bipolar With 8 Zeros Substitution
  • Based on bipolar-AMI
  • If octet of all zeros and last voltage pulse
    preceding was positive, encode as 000-0-
  • If octet of all zeros and last voltage pulse
    preceding was negative, encode as 000-0-
  • Causes two violations of AMI code
  • This is unlikely to occur as a result of noise
  • Receiver detects and interprets the sequence as
    octet of all zeros

34
HDB3
  • High Density Bipolar 3 Zeros
  • Based on bipolar-AMI
  • String of four zeros replaced with one or two
    pulses

Note The following is the explanation for the
HDB3 code example on the next slide (see rules in
Table 5.4, page 142) Assuming that an odd number
of 1's have occurred since the last substitution,
since the polarity of the preceding pulse is "-",
then the first 4 zeros are replaced by "000-".
For the next 4 zeros, since there have been no
Bipolar pulses since the 1st substitution, then
they are replaced by"00" since the preceding
pulse is a "-". For the 3rd case where 4 zeros
happen, 2 (even) Bipolar pulses have happened
since the last substitution and the polarity of
the preceding pulse is "", so "-00-" is
substituted for the zeros.
35
B8ZS and HDB3
(Assume odd number of 1s since last substitution)
See Table 5.4 for HDB3 Substitution Rules
36
Digital Data, Analog Signal
  • Transmitting digital data through PSTN (Public
    telephone system)
  • 300Hz to 3400Hz bandwidth
  • modem (modulator-demodulator) is used to convert
    digital data to analog signal and vice versa
  • Three basic modulation techniques are used
  • Amplitude shift keying (ASK)
  • Frequency shift keying (FSK)
  • Phase shift keying (PSK)

37
Modulation Techniques
38
Amplitude Shift Keying
  • Values represented by different amplitudes of
    carrier
  • Usually, one amplitude is zero
  • i.e. presence and absence of carrier is used
  • Susceptible to sudden gain changes
  • Inefficient
  • Up to 1200bps on voice grade lines
  • Used over optical fiber

39
ASK
Vd(t)
Vc(t)
VASK(t)
Signal power
frequency spectrum
Frequency
fc
fcf0
fc3f0
fc-f0
fc-3f0
40
Frequency Shift Keying
  • Values represented by different frequencies (near
    carrier)
  • Less susceptible to error than ASK
  • Up to 1200bps on voice grade lines
  • High frequency radio (3-30 MHz)
  • Higher frequency on LANs using co-ax

41
FSK
Data signal
vd(t)
v1(t)
Carrier 1
v2(t)
Carrier 2
vFSK(t)
Signal power
frequency spectrum
Frequency
f1
f2
42
FSK in modem (on Voice Grade Line)
frequency spectrum
43
Phase Shift Keying
  • Phase of carrier signal is shifted to represent
    data
  • Differential PSK
  • Phase shifted relative to previous transmission
    rather than some reference signal

44
PSK
Data Signal
vc(t)
Carrier
vc(t)
Phase coherent
vPSK(t)
Differential
vPSK(t)
  • bit rate signaling rate

1800
01
Differential example for every logic 1, 180
degree phase shift
phase diagram
45
Quadrature PSK
  • More efficient use by each signal element
    representing more than one bit
  • e.g. shifts of ?/2 (90o)
  • Each element represents two bits
  • Can use 8 phase angles and have more than one
    amplitude
  • 9600bps modems use 12 angles , four of which have
    two amplitudes

46
Multilevel modulation method
10
11
01
00
0
90
180
270
  • bit rate n x signaling rate

47
Multilevel modulation method
9001
18010
000
27011
4-PSK phase diagram
16-QAM phase diagram
48
Performance of Digital to Analog Modulation
Schemes
  • Bandwidth
  • ASK and PSK bandwidth directly related to bit
    rate
  • FSK bandwidth related to data rate for lower
    frequencies
  • requires more analog bandwidth than ASK
  • (See Stallings for math)
  • In the presence of noise, bit error rate of PSK
    and QPSK are about 3dB superior to ASK and FSK

49
Analog Data, Digital Signal
  • Digitization
  • Conversion of analog data into digital data
  • Digital data can then be transmitted using NRZ-L
    or using other codes
  • Digital data can then be converted to analog
    signal
  • Analog to digital conversion done using a codec
  • Pulse code modulation
  • Delta modulation

50
Analog data, Digital signal
  • Two principle techniques used
  • PCM (Pulse Code Modulation)
  • DM (Delta Modulation)

Sampling clock
PAM signal
PCM signal
Sampling Circuit
Quantizer and compander
Analog voice signal
Digitized voice signal
51
Pulse Code Modulation(PCM) (1)
  • If a signal is sampled at regular intervals at a
    rate higher than twice the highest signal
    frequency, the samples contain all the
    information of the original signal
  • (Proof - Stallings appendix 4A)
  • Voice data limited to below 4000Hz
  • Require 8000 sample per second
  • Analog samples (Pulse Amplitude Modulation, PAM)
  • Each sample assigned digital value

52
Pulse Code Modulation(PCM) (2)
  • 4 bit system gives 16 levels
  • Quantized
  • Quantizing error or noise
  • Approximations mean it is impossible to recover
    original exactly
  • 8 bit sample gives 256 levels
  • Quality comparable with analog transmission
  • 8000 samples per second of 8 bits each gives
    64kbps

53
The process starts with an analog signal, which
is sampled by PAM sample. the resulting pulse are
quantized to produced PCM pulses and then encoded
to produce bit stream. At the receiver end, the
process is reversed to reproduce the analog
signal.
54
PCM
  • Sampling signal based on nyquist theorem

Original signal
3.9
4.2
3.4
3.2
2.8
PAM pulse
1.2
4
4
PCM pulse with quantized error
3
3
3
1
011
100
011
011
001
100
011100011011001100
PCM output
55
Nonlinear Encoding
  • 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
  • Can also be done by companding

56
Nonlinear encoding
Quantizing level
15
15
14
14
13
13
12
12
11
11
10
10
9
8
9
8
7
7
6
5
6
4
5
3
4
3
2
2
1
1
0
0
Without nonlinear encoding
With nonlinear encoding
57
Prior to the input signal being sampled and
converted by ADC into a digital form, it is
passed through a circuit known as a compressor.
Similarly, at the destination, the reverse
operation is perform on the output of the DAC by
a circuit known as expander.
58
Delta Modulation
  • Analog input is approximated by a staircase
    function
  • Move up or down one level (?) at each sample
    interval
  • Binary behavior
  • Function moves up or down at each sample interval

59
Delta Modulation - example
60
Delta Modulation - Performance
  • Good voice reproduction
  • PCM - 128 levels (7 bit)
  • Voice bandwidth 4khz
  • Should be 8000 x 7 56kbps for PCM
  • Data compression can improve on this
  • e.g. Interframe coding techniques for video

61
Analog Data, Analog Signals
  • Why modulate analog signals?
  • Higher frequency can give more efficient
    transmission
  • Permits frequency division multiplexing (chapter
    8)
  • Types of modulation
  • Amplitude
  • Frequency
  • Phase

62
Analog Modulation
63
Spread Spectrum
  • Analog or digital data
  • Analog signal
  • Spread data over wide bandwidth
  • Makes jamming and interception harder
  • 2 schemes are used
  • Frequency hoping
  • Signal broadcast over seemingly random series of
    frequencies
  • Direct Sequence
  • Each bit is represented by multiple bits in
    transmitted signal known as a chipping code
Write a Comment
User Comments (0)
About PowerShow.com