Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 47

Chapter 4

ENCODING AND MODULATING


-Digital-to-digital conversion
(encoding digital data into digital signal)
-Analog-to-digital conversion
(digitizing analog signal)
-Digital-to-analog conversion
(modulating a digital signal)
-Analog-to-analog conversion
(modulating analog signal)
Encoding
Coding is the process of embedding clocks into a given data stream and producing a
signal that can be transmitted over a selected medium.
Transmitter is responsible for "encoding" i.e. inserting clocks into data according
to a selected coding scheme
Receiver is responsible for "decoding" i.e. separating clocks and data from the
incoming embedded stream.
Systems that use coding are synchronous systems .
We must encode data into signals to send them from one place to another.

A signal needs to be manipulated in such a way so that it contains identifiable


changes that are recognizable to the sender and receiver.
First the information must be translated into agreed upon patterns of 0s and 1s.

E.g. Text is translated into either one of two character codes: ASCII or EBCDIC
(Appendix A).
Then, since there are two types of signals digital and analog, there are 4 possible
encoding techniques that can be used on the data:
Digital-to-digital, Digital-to-Analog, Analog-to-analog, Analog-to-digital.
Digital-to-Digital Encoding

The binary signals created by your computer (DTE) are translated into a sequence of
voltage pulses that can be sent through the transmission medium.
Binary signals have two basic parameters: amplitude and duration.
As the number of bits sent per unit of time increases, the bit duration decreases.
The three most common methods of encoding used are: unipolar , polar , and bipolar .
Unipolar
The simplest and most primitive
type of encoding is Unipolar
encoding.
Typically, one voltage level stands
for binary 0 and another voltage
level for binary 1.
Polarity refers to whether you have
a positive or a negative pulse.
Unipolar encoding uses only one
polarity, only one of the two binary
states is encoded, usually the 1.
Two problems with unipolar
encoding: DC component and
synchronization .
UNIPOLAR ENCODING

Unipolar encoding uses only one


voltage level.
DC Component
Average amplitude of a unipolar encoded signal is nonzero.
This creates a direct current (DC component) -- shifts the zero level
-- that cannot travel through some media (e.g. microwave).
Synchronization
The change in voltage for each bit is what allows a digital encoding
system to indicate changes in bit type.
Long strings of zeros and ones do not produce any transitions which may
create problems in error detection and recovery.
Lack of synchronization
Polar encoding

Polar encoding uses two levels (positive


and negative) of amplitude.
Polar encoding eliminates some of the DC
residual problem, because the average
voltage level on the line is reduced.
The power to transmit this signal is one half
that of unipolar signal.
Several types: NRZ, RZ, and biphase.
POLAR ENCODING

Polar encoding uses two voltage levels


(positive and negative).
NRZ
Non-return to Zero (NRZ) -- signal is always positive or negative.
Two main types of NRZ: NRZ-L and NRZ-I
NRZ-L
NRZ-L: signal never returns to zero voltage, and the value during a bit
time is a level voltage.
Good for short and well- shielded transmission paths.

In NRZ-L the level of the signal is


dependent upon the state of the bit.
NRZ-I
NRZ-I : invert on ones
The transition between a positive and negative voltage
represents a 1 bit.
Provides more synchronization than NRZ-L because
there is a transition for each 1 bit.

In NRZ-I the signal is inverted if a 1 is


encountered.
NRZ-L and NRZ-I encoding
RZ encoding
Tries to solve the problem of losing synchronization due to
long strings of consecutive 1s or 0s.
Signal change during each bit promotes synchronization.

Positive voltage=1
Negative voltage=0
Signal returns to zero halfway through the bit interval.
Biphase
Signal changes at the middle of the bit interval,
does not return to zero, goes to opposite pole.
Good solution to synchronization problem
Two types of biphase encoding used in networks:
Manchester and Differential Manchester
Manchester (or diphase or biphase
encoding)
This code is self-clocking.
Provides a transition for every bit in the middle of the bit
cell. This transition is used only to provide clocking.
+ve to -ve transition for a "0" bit
-ve to +ve transition for a "1" bit
Residual DC component is eliminated by having both
polarities for every bit.
This scheme is used in Ethernet and IEEE 802.3 compliant
LANs
Manchester Encoding

In Manchester encoding, the


transition at the middle of the bit is
used for both synchronization and bit
representation.
Differential Manchester Coding

Code is self-clocking
Transition for every bit in the middle of the bit cell
Transition at the beginning of the bit cell if the next bit is " 0 "
NO Transition at the beginning of the bit cell if the next bit is " 1 "
Used in Token Ring or IEEE 802.5-compliant LANs.
Differential Manchester encoding

In differential Manchester encoding, the


transition at the middle of the bit is used
only for synchronization.
The bit representation is defined by the
inversion or noninversion at the beginning
of the bit.
Analog-to-Digital Encoding
The challenge is to transform potentially infinite values in an analog message to digital
without losing data (e.g. voice on CD)
Pulse Amplitude Modulation (PAM)
Samples the analog message and generates pulses based on the sampling.
Sampling-- measures the amplitude of the signal at equal intervals.
Analog-to-Digital Encoding
Pulse Code Modulation (PCM)
Uses 3-4 processes to create a digital signal: PAM (sampling), quantization
(discrete amplitudes +/- value), binary encoding, and digital-to-digital encoding.
PCM is the sampling method used to digitize voice in T-line transmission in North
American telecommunications system (codecs).
PCM sampling rate - twice the highest frequency of the original signal - to
ensure the accurate reproduction of an original analog signal using PAM
Fig. 5-21

Nyquist
Theorem
Digital-to-Analog Encoding

To send the digital data over an analog media, it needs to be


converted into analog signal.

There are two cases according to data formatting(data


formatgenerally involves a header, text field, and a trailer.)

Bandpass: The filters are used to filter and pass frequencies of


interest. A bandpass is a band of frequencies which can pass the
filter.
When digital data is converted into a bandpass analog signal, it is
called digital-to analog conversion.
Low-pass: Low-pass is a filter that passes low frequencies signals
When low-pass analog signal is converted into bandpass analog
signal, it is called analog-to-analog conversion.
Bit Rate and Baud Rate
Bit rate is the number of bits transmitted per second.
Bit rate is always >/= to the baud rate
Baud rate is the number of signal units per second required to send those bits.

Bit rate=Baud rate X No. of bits per signal element


Example 1
Ananalogsignalcarries4bitsineachsignalunit.If1000
signalunitsaresentpersecond,findthebaudrateandthe
bitrate

Solution
Baud rate = 1000 bauds per second (baud/s)
Bit rate = 1000 x 4 = 4000 bps
Example 2
Thebitrateofasignalis3000.Ifeachsignalunitcarries
6bits,whatisthebaudrate?

Solution
Baud rate = 3000 / 6 = 500 baud/s
Amplitude Shift Keying (ASK)
To represent binary signals, the amplitude is varied - 1 or 0.
Keying means turning a transmitter on and off.
Highly susceptible to noise interference.
Frequency Shift Keying (FSK)
Frequency is varied to represent binary 1 or 0.
Noise interference not a problem because it's looking for frequency changes
and doesn't care about voltage spikes.
Phase Shift Keying (PSK)
Phase is varied to represent binary 1 or 0.
Limited by the ability of the equipment to detect small differences in
phase. This limits its potential bit rate.
Analog to Analog
Transmission
Analog signals are modified to represent
analog data. This conversion is also known
as Analog Modulation. Analog modulation
is required when bandpass is used. Analog
to analog conversion can be done in three
ways:
Bandpass: The filters are used to filter and
pass frequencies of interest. A bandpass
is a band of frequencies which can pass the
filter.
Figure 5-40

Analog to Analog Encoding

WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998


Types
Analog
to analog conversion can be done in three ways:
Analog-to-Analog Encoding

Three ways: Amplitude Modulation (AM), Frequency Modulation (FM), and Phase
Modulation (PM).
Amplitude Modulation (AM)
The carrier's signal is modulated so that amplitude varies with the changing amplitude
of the signal.
In this modulation, the amplitude of the carrier signal is modified to reflect the analog
data.
The bandwidth of an AM signal is equal to twice the bandwidth of the modulating signal
and covers a range centered around the carrier frequency.
AM radio stations need a minimum bandwidth of 10 Khz.
Amplitude Modulation
Amplitude modulation is
implemented by means of a
multiplier. The amplitude of
modulating signal (analog data) is
multiplied by the amplitude of
carrier frequency,
which then reflects analog data.
The frequency and phase of carrier
signal remain unchanged
AM Bandwidth
AM Band Allocation
Example
Wehaveanaudiosignalwithabandwidthof4KHz.
Whatisthebandwidthneededifwemodulatethesignal
usingAM?IgnoreFCCregulations.

Solution
An AM signal requires twice the bandwidth of the
original signal:
BW = 2 x 4 KHz = 8 KHz
Frequency Modulation (FM)
The frequency of the carrier signal is
modulated to follow the changing voltage level
(amplitude) of the modulating signal.
In this modulation technique, the frequency of the
carrier signal is modified to reflect
the change in the voltage levels of the modulating
signal (analog data).

The bandwidth of an FM signal is equal to 10


times the bandwidth of the modulating signal.

An FM station needs a bandwidth of 200 KHz


(0.2 MHz).
Figure 5-45
Frequency Modulation

WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998


Figure 5-46

FM Bandwidth

WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998


FM Band Allocation
The amplitude and phase of the
carrier signal are not altered.
Phase Modulation (PM)
The phase of the carrier signal is modulated to follow the changing
voltage level (amplitude) of the modulating signal.
Used as an alternative to frequency modulation.
In the modulation technique, the phase of carrier signal is modulated in order to
reflect the change in voltage (amplitude) of analog data signal.

Phase modulation is practically similar to Frequency Modulation, but in Phase


modulation frequency of the carrier signal is not increased. Frequency of carrier
is
signal is changed (made dense and sparse) to reflect voltage change in the
amplitude
of modulating signal.
Example
Wehaveanaudiosignalwithabandwidthof4MHz.
Whatisthebandwidthneededifwemodulatethesignal
usingFM?IgnoreFCCregulations.

Solution
An FM signal requires 10 times the bandwidth of the
original signal:
BW = 10 x 4 MHz = 40 MHz
Note:

The bandwidth of a stereo audio signal


is usually 15 KHz. Therefore, an FM
station needs at least a bandwidth of
150 KHz. The FCC requires the
minimum bandwidth to be at least 200
KHz (0.2 MHz).

You might also like