Data Communications: Analog To Digital Conversion

You might also like

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

Data Communications

Analog to Digital Conversion


Pulse Code Modulation (PCM)

Sampling Quantization Encoding 10010011010

Pulse Amplitude Modulation Quantized Signal


(PAM)

• PCM is the most common technique.


• The process of converting Analog signal to digital data is called digitization.
Sampling
• The analog signal is sampled every 𝑇𝑠 𝑠, where:
• 𝑇𝑠 is the sample interval or period.
• Sampling Rate (Sampling Frequency): the inverse of the sampling interval.
1
• 𝑓𝑠 = 𝑇
𝑠

Implemented using special circuit.


Not easy to implement Implemented using a high speed the most common method
On-off switch Also called Sample and Hold
Sampling
• Sampling rate must be at least twice the highest frequency in the original signal (Nyquist theorem).
• A signal must be band-limited. In other words, a signal with an infinite bandwidth cannot be sampled.
• The sampling rate must be at least 2 times the highest frequency, not the bandwidth.
Quantization
• Assume that the original analog signal has instantaneous amplitudes between 𝑉𝑚𝑖𝑛 and 𝑉𝑚𝑎𝑥 .
• Divide the range into L zones, each of height Δ 𝑑𝑒𝑙𝑡𝑎 .
∆= (𝑉𝑚𝑎𝑥 −𝑉𝑚𝑖𝑛 )/𝐿
• Assign quantized values of 0 to L − 1 to the midpoint of each zone.
• Approximate the value of the sample amplitude to the quantized values.

20V
4D
3D Normalized PAM
𝐴𝑚𝑝𝑙𝑖𝑡𝑢𝑑𝑒/∆
2D
Middle zone
Amplitude

1D
Quantization Error
-1D
Quantization Code
-2D
Encoded Word
-3D
-4D
-20V
Quantization
• The quantization error changes the signal-to-noise ratio of the signal.
• The contribution of the quantization error to the 𝑆𝑁𝑅𝑑𝐵 of the signal depends on:
• The number of quantization levels L.
• The bits per sample 𝑛𝑏 .
𝑆𝑁𝑅𝑑𝐵 = 6.02𝑛𝑏 + 1.76 𝑑𝐵

• A telephone subscriber line must have an 𝑆𝑁𝑅𝑑𝐵 above 40.


• The minimum number of bits per sample is:
𝑆𝑁𝑅𝑑𝐵 = 6.02𝑛𝑏 + 1.76
40 = 6.02𝑛𝑏 + 1.76
40 − 1.76 = 6.02𝑛𝑏
38.24 = 6.02𝑛𝑏
38.24
𝑛𝑏 =
6.02
𝑛𝑏 = 6.53
• Telephone companies usually assign 7 or 8 bits per sample.
Encoding
• The number of bits for each sample is determined from the number of quantization levels.
• If the number of quantization levels is L, the number of bits is 𝑛𝑏 = log 2 𝐿 .
• If L is 8 then 𝑛𝑏 is therefore 3.
• The bit rate can be found from the formula:
𝐵𝑖𝑡 𝑟𝑎𝑡𝑒 = 𝑆𝑎𝑚𝑝𝑙𝑖𝑛𝑔 𝑟𝑎𝑡𝑒 × 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑖𝑡𝑠 𝑝𝑒𝑟 𝑠𝑎𝑚𝑝𝑙𝑒 = 𝑓𝑠 × 𝑛𝑏

• Digitizing the human voice.


• The bit rate (assuming 8 bits per sample)
• The human voice normally contains frequencies from 0 to 4000 Hz.
• The Sampling Rate:
4000 × 2 = 8000 𝑠𝑎𝑚𝑝𝑙𝑒𝑠/𝑠
• The Bit Rate:
8000 × 8 = 64000 𝑏𝑝𝑠 = 64𝑘𝑏𝑝𝑠
Original Signal Recovery
PCM Decoder

Make and Connect


10010011010 Samples Low-Pass Filter
Digital Data

Staircase Signal

• The minimum bandwidth of a line-encoded signal is: • Data Rate:


𝐵𝑚𝑖𝑛 = 𝑐 × 𝑁 × 1/𝑟 𝑁𝑚𝑎𝑥 = 2 × 𝐵 × log 2 𝐿
• Substitute the value of N in this formula: • Assume that:
1 • L level is used with one signal element each:
𝐵𝑚𝑖𝑛 = 𝑐 × 𝑁 × 1
𝑟
1 𝑟 = .
= 𝑐 × 𝑛𝑏 × 𝑓𝑠 × log 2 𝐿
𝑟 • The resulting bit rate is
= 𝑐 × 𝑛𝑏 × 2 × 𝐵𝑎𝑛𝑎𝑙𝑜𝑔 × 1/𝑟 𝑁 = 𝑓𝑠 × 𝑛𝑏 = 2 × 𝐵 × log2 𝐿
• When: • The minimum bandwidth:
• 1/r = 1 (for a NRZ or bipolar signal). 𝑁
• c = (1/2) (the average situation), the minimum 𝐵𝑚𝑖𝑛 = 𝐻𝑧
2 × log 2 𝐿
bandwidth is:
𝐵_𝑚𝑖𝑛 = 𝑛𝑏 × 𝐵_𝑎𝑛𝑎𝑙𝑜𝑔
reference page 161
Delta modulation is an analog to digital and digital to
analog signal conversion technique. Delta modulation is
Delta Modulation employed to realize high signal to noise ratio. It uses one
bit PCM code to realize digital transmission of analog
signal.

• It is the simplest technique used which is less complex than PCM.


• PCM finds the value of the signal amplitude for each sample.
• DM finds the change from the previous sample.
• There are no code words in DM.
• bits are sent one after another.

Modulator Demodulator
10010011010
Comparator Staircase Maker Low Pass Filter

Delay Unit Staircase Maker Delay Unit

• The process records a small positive or negative change (Delta δ).


• 1 for positive delta.
• 0 for negative delta.
• Comparison is done with the last value of a staircase signal.
• Low-pass filter at demdulator is used to smooth the created analog signal.
Adaptive DM
• A better performance can be achieved if the value of δ is not fixed.
• In adaptive delta modulation:
• The value of δ changes according to the amplitude of the analog signal.
• DM is not perfect.
• Quantization error is always introduced in the process, however, it is much less than that for PCM.
Transmission Modes
Data Transmission

Parallel Serial

Asynchronous Synchronous Isochronous

• Sending n bits of data at a time.


• It used n wires. • Sending n bits one after the other
• Faster by a factor n than serial. • It used 1 wire.
• Expensive due to number of wires used. • Reduces the cost of parallel by a factor n.
• Limited to short distances.
Asynchronous Transmission
• The timing of a signal is not important.
• Information is received and translated by agreed upon patterns.
• Patterns are based on grouping the bit stream into bytes
• An extra bit is added to the beginning of each byte. usually a 0, is called the start bit.
• 1 or more additional bits are appended to the end of the byte. usually 1s, are called stop bits.
• Each byte is increased in size to at least 10 bits.
• Each byte may be followed by a gap of varying duration(idle channel or by a stream of additional stop bits).
• Synchronization is required, but only for the duration of a single byte.
• It is slower than other forms of transmission.
• It cheap and effective.
• Used with low speed communications.
• Keyboard and mouse.
Synchronous Transmission can be guaranted by isochronous.

• The bit stream is combined into longer “frames,” which may contain multiple bytes.
• Each byte is introduced onto the transmission link without a gap between it and the next one.
• The receiver separates the bit stream into bytes for decoding purposes.
• No gaps, No Stop and start bits:
• Timing becomes very important.
• The received information is completely dependent on the ability of the receiving device to keep an accurate
count of the bits as they come in.
• Synchronous transmission is Fast.
• No extra bits added nor gaps.
• Fewer bits to move across the link.
• Used in high-speed applications.
• Computer to computer data transmission.
• Byte synchronization is accomplished in the data-link layer.
• There may be uneven gaps between frames.
Isochronous Transmission
• In real-time audio and video (uneven delays between frames are not acceptable)
• Synchronous transmission fails.
• TV images are broadcast at the rate of 30 images per second; they must be viewed at the same rate.
• If each image is sent by using one or more frames, there should be no delays between frames. Hence,
synchronization between characters is not enough;
• The entire stream of bits must be synchronized.
• The isochronous transmission guarantees that the data arrive at a fixed rate.

You might also like