Sei sulla pagina 1di 65

CSE 350

DATA COMMUNICATIONS

Lecture 4: Signal Encoding

Maheen Islam
Encoding Techniques
 Digital data, digital signal
 Analog data, digital signal
 Digital data, analog signal
 Analog data, analog signal
Digital Data, Digital Signal
 Digital to digital encoding is the representation of
digital information by a digital signal.
 Digital signal
 Sequence of discrete, discontinuous voltage pulses
 Each pulse is a signal element

 Binary data encoded into signal elements


Digital to Digital Encoding
Terms
 Data rate
 Rate of data transmission in bits per second
 Duration or length of a bit
 Time taken for transmitter to emit the bit, for a data rate R ,
the bit duration is 1/R.
 Modulation rate
 Rate at which the signal elements are transmitted
 Measured in baud = signal elements per second

 Mark and Space


 Binary 1 and Binary 0 respectively
 Encoding scheme
 Mapping from data bits to signal elements
 Improves performance of data transmission
Interpreting Digital Signals
 Receiver must know
 Timing of bits - when they start and end
 Signal level for each bit is high(1) or low(0).

 Factors affecting successful interpreting of signals


 Signal to noise ratio(increase in SNR decreases bit error
rate(BER))
 Data rate(increase in data rate increases bit error
rate(BER))
 Bandwidth(increase in bandwidth increases data rate)
Comparison of Encoding Schemes(1)

 Signal Spectrum
 Lack of high frequencies reduces required bandwidth
 Lack of dc component is desirable

 Concentrate power in the middle of the bandwidth

 Clocking
 To determine the beginning and end of each bit position
 Synchronizing transmitter and receiver

 External clock

 Synchronization mechanism based on transmitted signal


(alternative)
Comparison of Encoding Schemes (2)

 Error detection
 Can be built in to signal encoding
 Signal interference and noise immunity
 Some codes are better than others in the presence of
noise
 Cost and complexity
 Higher signal rate (& thus data rate) lead to higher
costs
 Some codes require signal rate greater than data rate
Types of Digital to Digital Encoding
Unipolar
 Unipolar
 All signal elements have same sign (positive or negative)
 Uses only one level of voltage
Polar
 One logic state represented by positive voltage the
other by negative voltage
 Polar encoding uses two levels (positive and
negative) of amplitude
Types of Polar Encoding
Nonreturn to Zero-Level (NRZ-L)
 Two different voltages for 0 and 1 bits
 Voltage constant during bit interval
 no transition I.e. no return to zero voltage
 More often, negative voltage for one value and
positive for the other
 +ve = the bit is 0,-ve=1 bit
 The signal is dependent upon the state of the bit
Nonreturn to Zero Inverted (NRZ-I)

 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
NRZ
Differential Encoding
 Data represented by changes between successive
signal elements rather than the signal elements
themselves.
Advantages
 More reliable detection of transition rather than

level in the presence of noise


 In complex transmission layouts it is easy to lose
sense of polarity
NRZ pros and cons
 Pros
 Easyto engineer
 Make good use of bandwidth

 Cons
 Presence of dc component
 Lack of synchronization capability
Biphase
 Manchester
 Transition in middle of each bit period
 Midbit Transition serves as clock and data
 Low to high represents binary one
 High to low represents binary zero
 Used by IEEE 802.3 Ethernet LAN
 Differential Manchester
 Midbit transition is clocking only
 The bit representation is shown by the inversion/noninversion
at the beginning of the bit
 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 LAN
Manchester and Diff. Manchester Encoding
Disadvantages
 At least one transition per bit time
 May have as many as twice
 Max modulation rate is twice than for NRZ
 The bandwidth is greater required
Biphase Pros
 Synchronization on mid bit transition (self clocking)
 No dc component

 Error detection
 Absence of expected transition can be used to detect errors
Class Task
 For the bit stream of 0100110100 draw the
waveform for Manchester and Differential
Manchester.
Manchester Encoding
Differential Manchester Encoding
Bipolar

 Uses three voltage levels : +ve,-ve,0


 0 levels used to represent binary 0
 The 1s are represented by alternating +ve and –ve
voltage
 This alternation occurs even when the 1 bits are not
consecutive
 Multilevel Binary—use more than two signal levels
Types of Bipolar Encoding
Bipolar-AMI

 Bipolar Alternate Mark Inversion


 zero represented by no line signal
 one represented by positive or negative pulse
 one pulses alternate in polarity
Pseudoternary
 A variation of bipolar-AMI
 One is represented by absence of line signal
 Zero represented by alternating positive and
negative
 No advantage or disadvantage over bipolar-AMI
Bipolar-AMI and Pseudoternary
0 1 0 0 1 1 0 0 0 1 1
Advantages
•No loss of synchronization if a long string of ones in case of
bipolar AMI and long string of zeros in case of Pseudoternary.
•Lower bandwidth
•Easy error detection because of the pulse alternation property

Disadvantages
•A long string of 0s in case of bipolar AMI and long string of 1s in
case of Pseudoternary is still a problem.
•Receiver of multilevel binary signal requires to distinguish
between three levels of signaling instead of just two in NRZ.
Class Task
 For the bit stream of 01001110 draw the
waveform for Bipolar AMI. Assume the most recent
preceding 1 bit has a negative voltage.
Solution
B8ZS
 Commonly used in North America
 Bipolar With 8 Zeros Substitution
 Based on bipolar-AMI
 Provides synchronization of long strings of 0s.
 Difference is whenever eight or more consecutive 0s are encountered
 The solution is: to force artificial signal changes within the 0 string,
violations.
 Anytime eight 0s occur in succession, this introduces changes in the
pattern based on the polarity of the previous 1
 If previous 1 is +ve, 8 0s : 0 0 0 + - 0 - +
 When receiver finds 2 consecutive + ve charges surrounding 3
0s,then the pattern is violation, not an error.
 If previous 1 is -ve, 8 0s : 0 0 0 - + 0 + -
 The pattern of violations is the same but with inverted polarities.
B8ZS Encoding
Example
Using B8ZS, encode the bit stream
10000000000100. Assume that the polarity of the
first 1 is positive .
Class Task
 Using B8ZS, encode the bit stream
10100000000010. Assume that the polarity of
the first 1 is negative .
HDB3
 High Density Bipolar 3 Zeros
 Europe and Japan
 Based on bipolar-AMI
 The problem of synchronizing strings of consecutive 0s
is solved differently.
 Changes into the bipolar-AMI pattern every time four
consecutive 0s are encountered.
 The pattern of violation is based on the polarity of
the previous 1 bit
 Unlike B8ZS,HDB3 looks at the number of 1s that have
occurred in the bit stream since the last substitution
Rules
 When the number of 1s since the last substitution is
odd: the violation is in the place of the fourth
consecutive 0
 If the polarity of the previous bit was +ve, the violation is +ve.
 When the number of 1s since the last substitution is
even: the violation is in the places of both the first
and 4th consecutive 0s
 If the polarity of the previous bit was +ve, both violations are
-ve.
 If the polarity of the previous bit was -ve, both violations are
+ve.
HDB3 Encoding
Example
 Using HDB3, encode the bit stream
10000000000100.Assume that the number of 1s so far
is odd and the first 1 is positive.
Digital Data, Analog Signal
 Public telephone system
 300Hz to 3400Hz
 Use modem (modulator-demodulator)

 Amplitude shift keying (ASK)


 Frequency shift keying (FSK)
 Phase shift keying (PSK)
Modulation Techniques
Amplitude Shift Keying
 encode 0/1 by different carrier amplitudes
 usually have one amplitude zero
 susceptible to sudden gain changes
 inefficient
 used for
 up to 1200bps on voice grade lines
 very high speeds over optical fiber
Binary Frequency Shift Keying
 most common is binary FSK (BFSK)
 two binary values represented by two different
frequencies (near carrier)
 less susceptible to error than ASK
 used for
 up to 1200bps on voice grade lines
 high frequency radio
 even higher frequency on LANs using co-ax
Multiple FSK

 each signalling element represents more than one bit


 more than two frequencies used
 more bandwidth efficient
 more prone to error
Phase Shift Keying
 phase of carrier signal is shifted to represent data
 binary PSK
 two phases represent two binary digits
 differential PSK
 phase shifted relative to previous transmission rather than
some reference signal
PSK
Data
Signal

Carrier

Phase
coherent

Differential PSK

 bit rate = signaling rate 180=0 0=1

Differential example: for every logic 1, 180 degree


phase shift
phase diagram
4-PSK Characteristics
4-PSK
4-PSK OR Q-PSK

 The pair of bits represented by each phase is called


dibit.
 Using 4-PSK data can be transmitted two times
faster than 2-PSK.
 This idea can be extended to 8-PSK
 8-PSK:
 instead of 90 degrees signals can be varied by shifts of 45
degrees
 With 8 different phases, each shift can represent 3 bits
 The three bits are called tribit
 Three times faster than 2-PSK.
8-PSK Characteristics
Multilevel PSK
•A standard 9600bps modem uses 12 phases, 4 of which have 4
amplitude values, for a total 16 different signal elements.
•Modulation Rate is given by
D = R/L = R/logM
where
D = modulation rate, baud
R = data rate,bps
M = number of different signal elements
L = number of bits per signal element
•Modulation rate is R/4 = 2400 bauds, but data rate is 9600 bps.
Analog Data, Digital Signal

 digitization is conversion of analog data into digital


data which can then:
 be transmitted using NRZ-L
 be transmitted using code other than NRZ-L

 be converted to analog signal

 analog to digital conversion done using a codec


 pulse code modulation
 delta modulation
Digitizing Analog Data
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
Pulse Code Modulation(PCM) (2)
 4 bit system gives 16 levels
 Quantized
 Quantizingerror 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
PCM Example
PCM Block Diagram
Delta Modulation

 analog input is approximated by a staircase function


 can move up or down one level () at each sample
interval
 has binary behavior
 since function only moves up or down at each sample
interval
 hence can encode each sample as single bit

 1 for up or 0 for down


Delta Modulation Example
Delta Modulation - Operation
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
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
Analog
Modulation
Techniques

 Amplitude Modulation
 Frequency Modulation
 Phase Modulation
Required Reading
 Stallings chapter 5

Potrebbero piacerti anche