Lecture 7 - Analog 2 Digital
Lecture 7 - Analog 2 Digital
CONVERSION
LECTURE 7
Pulse Code Modulation (PCM)
The most common technique to change an analog signal to digital data
A PCM encoder has three processes
◦ The analog signal is sampled.
◦ The sampled signal is quantized.
◦ The quantized values are encoded as streams of bits.
Sampling
The first step in PCM is sampling
The analog signal is sampled every Ts s, where Ts is the sample interval
or period
The inverse of the sampling interval is called the sampling rate or
sampling frequency and denoted by fs, where fs = 1/Ts
There are three sampling methods—ideal, natural, and flat-top
Sampling Rate
One important consideration is the sampling rate or frequency
Nyquist theorem: According to the Nyquist theorem, the sampling rate
must be at least 2 times the highest frequency contained in the signal
Recovery of a sampled sine wave
for different sampling rates
Example: Sampling of a clock
Example
A complex low-pass signal has a bandwidth of 200 kHz. What is the
minimum sampling rate for this signal?
Solution: The bandwidth of a low-pass signal is between 0 and f, where
f is the maximum frequency in the signal.
Therefore, we can sample this signal at 2 times the highest frequency
(200 kHz).
The sampling rate is therefore 400,000 samples per second.
Example
A complex bandpass signal has a bandwidth of 200 kHz. What is the
minimum sampling rate for this signal?
Solution
We cannot find the minimum sampling rate in this case because we do
not know where the bandwidth starts or ends. We do not know the
maximum frequency in the signal.
𝐵𝑖𝑡 𝑟𝑎𝑡𝑒 = 𝑓𝑠 × 𝑛𝑏
𝑓𝑠 → sampling rate
𝑛𝑏 → number of bits per sample
Example
We want to digitize the human voice. What is the bit rate, assuming 8
bits per sample?
Solution
The human voice normally contains frequencies from 0 to 4000 Hz. So
the sampling rate and bit rate are calculated as follows:
Sampling rate = 4000 x 2 = 8000 samples/s
Bit rate = 8000 x 8 = 64,000 bps = 64 kbps
Original Signal Recovery
The decoder first uses circuitry to convert the code words into a pulse
that holds the amplitude until the next pulse
After the staircase signal is completed, it is passed through a low-pass
filter to smooth the staircase signal into an analog signal
PCM Bandwidth
Suppose we are given the bandwidth of a low-pass analog signal. If we
then digitize the signal, what is the new minimum bandwidth of the
channel that can pass this digitized signal?
We have said that the minimum bandwidth of a line-encoded signal is
Bmin = c × N × (1/r)
We substitute the value of N in this formula:
Bmin = c x N x 1/r = c x nb x fs x 1/r = c x nb x 2 x Banalog x 1/r
When 1/r = 1 (for a NRZ or bipolar signal) and c = (1/2) (the average
situation), the minimum bandwidth is
Bmin = nb x Banalog
PCM Bandwidth
Example:
We have a low-pass analog signal of 4 kHz. If we send the analog signal,
we need a channel with a minimum bandwidth of 4 kHz. If we digitize
the signal and send 8 bits per sample, we need a channel with a
minimum bandwidth of 8 × 4 kHz = 32 kHz.