Encoding Techniques

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 43

Chapter 5

Signal Encoding Techniques

Text Book: Data and Computer Communications


Author: William Stallings
Important Terms
• Unipolar
• All signal elements have the same sign
• Polar
• One logic state represented by positive voltage the other by
negative voltage
• Data Rate
• Rate of data (R) transmission in bits per second
• Bit Duration or length of a bit
• Time taken for transmitter to emit the bit (1/R)
• Modulation Rate / Signaling Rate / Signal Rate
• Rate at which the signal level changes,
• signal elements per second
• measured in baud
Factors For Comparison of
Encoding Schemes
• Signal spectrum
• High frequencies increases required bandwidth
• Lack of dc component allows ac coupling and/or capacitive coupling
• Clocking
• Needed for synchronizing transmitter and receiver
• Either with an external clock or with a sync mechanism based on
signal
• Error detection
• Useful if can be built in to 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
Encoding Schemes
Nonreturn to Zero-Level (NRZ-L)

• Voltage constant during bit interval


• no transition i.e. no return to zero voltage during the bit interval

• One possibility  absence of voltage for zero, constant


positive voltage for one

• More often, negative voltage for one value and positive for
the other
Nonreturn to Zero Inverted (NRZI)
• Nonreturn to zero inverted on ones
• Data encoded as presence or absence of signal transition at
beginning of bit time
• transition (i.e. low to high or high to low) denotes binary 1
• no transition denotes binary 0
• Example of differential encoding since have
• One of the bits is represented by changes (rather than levels) with
reference to previous bit transmitted
• more reliable detection of transition rather than level
NRZ Pros & Cons
• Pros
• Easy to engineer
• Make good use of bandwidth
• Cons
• Contains DC component
• Lack of synchronization capability
• Used for magnetic recording
• Generally not often used for signal transmission
Bipolar-AMI (Multilevel Binary)
• Alternate Marks Inversion uses more than two levels
• Zero is represented by no line signal
• One is represented by positive or negative pulse
• Pulses for ones  alternate in polarity
• No loss of sync if a long string of ones, however, long runs
of zeros still a problem
• No net dc component
• Lower bandwidth
• Easy error detection
Pseudoternary (Multilevel Binary)
• Ones represented by absence of line signal

• Zeros represented by alternating positive & negative pulses

• No advantage or disadvantage over bipolar-AMI

• Each used in some applications


Multilevel Binary Issues
Though multilevel binary overcome some of the problem of
NRZ, however it has following issues

1. Synchronization problem if long runs of 0’s in


Pseudoternary and 1’s in AMI

2. A 3-level system (+A, -A, 0) could represent log23 = 1.58 bits per bit
duration i.e. Tb
• However, each signal element represents just one bit
• To keep same probability of bit error, approximately 3dB more
signal power is required
Manchester Encoding
• Manchester encoding has transition in middle of each bit
period
• Transition serves as clock
• High to low transition in the middle of bit represents zero
• Low to high transition in the middle of bit represents one
• Used by IEEE 802.3 (10 Mbps Ethernet)

• How many transitions per bit interval? Max ____ & Min ____
• Under which condition? For Max ____ & for Min _______
Differential Manchester Encoding
• Mid bit transition is for clocking only

• Transition at start of bit period representing 0


• No transition at start of bit period representing 1
• That is differential encoding scheme
• Used by IEEE 802.5 (Token Ring)

• How many transitions per bit interval? Max ____ & Min ____
• Under which condition? For Max ____ & for Min _______
Biphase Techniques
• Manchester and Differential Manchester are Biphase
techniques
• Biphase techniques require at least one transition per bit
time
• Differential encoding given Differential Manchester better
resiliency to possible impairment (transitions contain info)
• These techniques may have as many as two transitions per
bit interval
• Thus the maximum modulation rate is twice that for NRZ
• This means that the bandwidth required is correspondingly
greater
Modulation Rate
• Modulation / Signaling / Signal / Baud Rate
• Modulation rate is the rate at which signal elements are generated
• Expressed in baud i.e. signal elements per second (seps)
• Data / Bit Rate
• If Tb is bit duration or length of bit then data rate R = 1/Tb
• Expressed in bps
• For multilevel signals modulation rate D is

• D = modulation rate in baud; R = data rate, bps


• M = number of different signal elements = 2L
• L = number of bits per signal element
Modulation Rate
• One way of characterizing the modulation rate is
• To determine the average number of transitions that occur per bit
time
Modulation Rate
• One way of characterizing the modulation rate is
• To determine the average number of transitions that occur per bit
time
Scrambling Techniques - Background
• Biphase techniques (Manchester & Differential Manchester)
are widely used in LAN
• However they are not being used for high data rate
transmission and long distance applications
• The principal reason  requires high signaling/modulation rate
relative to data rate (How much? Max and Min)
• Alternate possibility then is to used Multilevel Binary
encoding
• Bipolar – AMI or Pseduoternary techniques
• However it suffers with the problem of lack of sync when
long run of 0’s occurs
Scrambling Techniques
• Design goals of Scrambling techniques are:
• No dc component
• No long sequences of zero-level line signals
• No reduction in data rate
• Error-detection capability
• The idea behind scrambling technique is
• Replace sequence producing constant voltage level by another
sequence that will provide sufficient transitions
• These filling sequences
• Must produce enough transitions to sync transmitter and receiver
• Must be recognized by receiver & replaced with original sequence
• Must be same length as original
Bipolar with 8-Zeros Substitution (B8ZS)
• Used in North America
• If an octet of all zeros occurs then
Last Voltage Pulse Preceding this Octet Encoding of 8 zeros in the octet
Positive 000+–0–+
Negative 000–+0+–
High-Density Bipolar-3 zeros (HDB3)
• Used in Europe and Japan
• If a nibble of all zeros occurs then
Voltage of Preceding Number of Bipolar pulses i.e. ones since last substitution
Pulse Odd Even
– 000– +00+
+ 000+ –00–
Digital Data to Analog Signal Encoding
• Modulation
• Is a process in which one or more of the three fundamental
parameters of carrier signal is varied according to the
instantaneous value of message signal
• Modulating / Message / Baseband Signal
• The input signal that we want to transmit
• Carrier / Auxiliary / Local Oscillator Signal
• Whose frequency is compatible with the transmission medium
• Modulated Signal
• The output / resultant signal after modulation
Amplitude Shift Keying (ASK)
• Two binary values are represented by two different
amplitudes of the carrier frequency
• Usually one of the amplitudes is zero
• Inefficient – susceptible to noise interference resulting in
amplitude fluctuations
Frequency Shift Keying (FSK)
• Most common is Binary FSK
• Two binary values represented by two different frequencies
(near carrier)
• Less susceptible to error than ASK
• Since information is embedded in frequency and not amplitude
Frequency Shift Keying (FSK)
• f1 and f2 are typically offset from the carrier frequency by equal but
opposite amounts
• For full-duplex two frequency bands are required
• Fc1 = 1170 Hz and Fc2 = 2125 Hz with shift of 100 Hz
Multiple Frequency Shift Keying (MFSK)
• More than two frequencies are used

• For example if M = 4 the f1, f2, f3 and f4


• Each signalling element represents more bits – How much?
• Thus each output signal element is held for a period of
Ts = LTb seconds where Tb is bit duration or bit length
• Total bandwidth required is 2Mfd
Multiple Frequency Shift Keying (MFSK)
• More than two frequencies are used

• Pro - More bandwidth efficient


• Con - More prone to error (Effort of receiver will increase)
Phase Shift Keying (PSK)
• Phase of carrier signal is shifted to represent data
• Binary PSK
• two phases represent two binary digits
Differential Phase Shift Keying (PSK)
• The phase shift is with reference to the previous bit
transmitted rather than to some constant reference signal
• For 1  Change the phase wrt to previous signal
• For 0  No change is in phase
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 codec
• Two principal techniques used in codecs
• Pulse Code Modulation (PCM)
• Delta Modulation (DM)
Digitization - Analog to Digital Conversion
Pulse Code Modulation (PCM)

The three steps involved are:


1. Sampling
2. Quantization
3. Encoding
PCM - Sampling
• Sampling theorem:
“If a signal is sampled at regular intervals at a rate higher
than twice the highest signal frequency, the samples
contain all information in original signal”
fs >= 2 fm
• eg. 4000Hz voice data, requires 8000 sample per sec
• Strictly have analog samples
• Pulse Amplitude Modulation (PAM)
• Converts continuous time signal into discrete time
signal  CTS to DTS
PCM – Quantization

• Quantization approximates a given signal with finite discrete


amplitude levels!
PCM – Quantization
Quantization Error
• While approximating a given signal quantization incurs error

• The signal-to-noise ratio for quantization noise can be


expressed as
Issues Related to Uniform Quantization
Non-Linear Quantization
Companding
Companding

Before

After

Source: Wikipedia https://en.wikipedia.org/wiki/Companding


Delta Modulation
• Analog input is approximated by a staircase function
• can move up or down one level () at each sample
interval
• Delta Modulation 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
• 0 for down
Delta Modulation
Delta Modulation
• Two important parameters
• Step Size
• Sampling Rate
• Higher step size will tend to increase quantization
noise/error
• Smaller step size will tend to increase slope overload
error
• Higher sampling rate with smaller step size will lead
to higher bit rate
Delta Modulation

You might also like