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) Chapter 4
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:
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 .
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.
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).
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 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).
Non-return to Zero (NRZ) -- signal is always positive or negative.
Two main types of NRZ: NRZ-L and NRZ-I
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 : 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
Tries to solve the problem of losing synchronization due to long strings of consecutive 1s or 0s.
Signal change during each bit promotes synchronization.
Signal returns to zero halfway through the bit interval.
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.
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.
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
Used in transmitting data from one computer to another across a public access phone line
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.
A high-frequency signal that acts as a basis for the information signal - by sender
Digital information is encoded by modulating the signal's: amplitude, frequency, or phase .
Bit rate=Baud rate X No. of bits per signal element
Example 1 An analog signal carries 4 bits in each signal unit. If 1000 signal units are sent per second, find the baud rate and the bit rate Solution Baud rate = 1000 bauds per second (baud/s) Bit rate = 1000 x 4 = 4000 bps
Example 2 The bit rate of a signal is 3000. If each signal unit carries 6 bits, what is the baud rate? 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.
Noise -- random electrical signals (voltages) that tend to generate errors in transmission; introduced into a line by heat from circuit components, or natural disturbances .
Relationship between baud rate and bandwidth in ASK
Example 3 Find the minimum bandwidth for an ASK signal transmitting at 2000 bps. The transmission mode is half-duplex. Solution In ASK the baud rate and bit rate are the same. The baud rate is therefore 2000. An ASK signal requires a minimum bandwidth equal to its baud rate. Therefore, the minimum bandwidth is 2000 Hz.
Example 4 Given a bandwidth of 5000 Hz for an ASK signal, what are the baud rate and bit rate? Solution In ASK the baud rate is the same as the bandwidth, which means the baud rate is 5000. But because the baud rate and the bit rate are also the same for ASK, the bit rate is 5000 bps.
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)
Phas e 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.
Quadrature Amplitude Modulation (QAM)
Means combining ASK and PSK in such a way that we have a maximum contrast between each bit, dibit (one-pair), quadbit (two-pair), and so on.
Theoretically, any measurable number of changes in amplitude can be combined with any measurable number of changes in phase.
Uses more phase shifts than amplitude shifts to reduce noise susceptibility.
Bit and baud
Time domain for an 8-QAM signal
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.
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.
Frequency Modulation (FM)
The frequency of the carrier signal is modulated to follow the changing voltage level (amplitude) of the modulating signal.
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).
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.
Figure 5-40 WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998 Analog to Analog Encoding
Types of analog-to-analog modulation
AM Band Allocation
Example We have an audio signal with a bandwidth of 4 KHz. What is the bandwidth needed if we modulate the signal using AM? Ignore FCC regulations. Solution An AM signal requires twice the bandwidth of the original signal: BW = 2 x 4 KHz = 8 KHz
Figure 5-45 WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998 Frequency Modulation
Figure 5-46 WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998 FM Bandwidth
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). Note:
FM Band Allocation
Example We have an audio signal with a bandwidth of 4 MHz. What is the bandwidth needed if we modulate the signal using FM? Ignore FCC regulations. Solution An FM signal requires 10 times the bandwidth of the original signal: BW = 10 x 4 MHz = 40 MHz