Sie sind auf Seite 1von 34

Analog signal to Digital

Data
Shammim Shaik
Asst Professor
IT
Pulse code
Modulation

Analog signal
–digital data
Delta
Modulation
ANALOG-TO-DIGITAL CONVERSION
A digital signal is superior to an analog signal because it is
more robust to noise and can easily be recovered, corrected
and amplified.
For this reason, the tendency today is to change an analog
signal to digital data.

 Pulse Code Modulation (PCM)


 Delta Modulation (DM)
4.3
PCM

PCM consists of three steps to digitize an analog signal:


•Sampling
•Quantization
•Binary encoding
Before we sample, we have to filter the signal to limit the maximum
frequency of the signal as it affects the sampling rate.
Filtering should ensure that we do not distort the signal, ie remove
high frequency components that affect the signal shape.

4.4
COMPONENTS OF PCM ENCODER

4.5
Sampling

 Analog signal is sampled every ts secs.


Ts is referred to as the sampling interval.
Fs = 1/ts is called the sampling rate or sampling frequency.
There are 3 sampling methods:
Ideal - an impulse at each sampling instant
Natural - a pulse of short width with varying amplitude
Flattop - sample and hold, like natural but with single amplitude value
The process is referred to as pulse amplitude modulation pam and the outcome is a signal with analog (non integer) values

4.6
e different sampling methods for PCM
According to the Nyquist theorem, the sampling
rate must be
at least 2 times the highest frequency contained
in the signal.
NYQUIST SAMPLING RATE
FOR LOW-PASS AND BANDPASS SIGNALS
Example 4.6

For an intuitive example of the Nyquist theorem, let us


sample a simple sine wave at three sampling rates: fs = 4f (2
times the Nyquist rate), fs = 2f (Nyquist rate), and
fs = f (one-half the Nyquist rate)..

It can be seen that sampling at the Nyquist rate can create a good approximation of the
original sine wave (part a). Oversampling in part b can also create the same approximation,
but it is redundant and unnecessary. Sampling below the Nyquist rate (part c) does not
produce a signal that looks like the original sine wave.
Telephone companies digitize voice by assuming a maximum
frequency of 4000 Hz. The sampling rate therefore is 8000 samples
per second.
Example 4.10
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.

4.12
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.

4.13
Quantization

Sampling results in a series of pulses of varying amplitude values


ranging between two limits: a min and a max.
The amplitude values are infinite between the two limits.
We need to map the infinite amplitude values onto a finite set of
known values.
This is achieved by dividing the distance between min and max into l
zones, each of height 
 = (max - min)/l
4.14
Quantization Levels
The midpoint of each zone is assigned a value from 0 to L-1 (resulting in L
values)
Each sample falling in a zone is then approximated to the value of the midpoint.

4.15
Quantization Zones
 Assume we have a voltage signal with amplitutes Vmin=-20V and Vmax=+20V.
We want to use L=8 quantization levels.
Zone width = (20 - -20)/8 = 5
The 8 zones are: -20 to -15,
-15 to -10,
-10 to -5,
-5 to 0,
0 to +5,
+5 to +10,
+10 to +15,
+15 to +20

The midpoints are: -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 12.5, 17.5
Assigning Codes to Zones

Each zone is then assigned a binary code.


The number of bits required to encode the zones, or the
number of bits per sample as it is commonly referred to, is
obtained as follows:
Nb = log2 l
Given our example, nb = 3
The 8 zone (or level) codes are therefore: 000, 001, 010, 011, 100, 101, 110, and 111
Assigning codes to zones:
000 will refer to zone -20 to -15
001 to zone -15 to -10, etc. 4.17
QUANTIZATION AND ENCODING OF A
SAMPLED SIGNAL

4.18

-0.28
DELTA OR D VALUE
D= ▲
▲= (Vmax-Vmin)/L
▲= (20-(-20))/8 = 5

Assume we have a voltage signal with amplitudes


Vmin=-20V and Vmax=+20V.
We want to use L=8 quantization levels.
The 8 zones are: -20 to -15, -15 to -10, -10 to -5, -5 to 0, 0 to +5, +5 to +10, +10 to
+15, +15 to +20
QUANTIZATION CODE PLACES
Quantization code places

The midpoints are: -17.5, -12.5, -7.5, -2.5, 2.5, 7.5, 12.5,
17.5
NORMALIZED PAM VALUE
Formula: Normalized PAM value= (Given value/ D)
1. Normalized PAM value for -6.1= -6.1/5 = -1.22
2. Normalized PAM values for 7.5= 7.5/5 = -1.50
3. Normalized PAM values for 16.2= 16.2/5 = 3.24
4. Normalized PAM values for 19.7= 19.7/5 = 3.94
5. Normalized PAM values for 11.0= 11.0/5 = 2.20
6. Normalized PAM values for -5.5= -5.5/5 = -1.10
7. Normalized PAM values for -11.3= -11.3/5 = -2.26
8. Normalized PAM values for -9.4= -9.4/5 = -1.88
9. Normalized PAM values for -6.0= -6.0/5 = -1.20
NORMALIZED QUANTIZED VALUE
Formula: ( The Normalized PAM value is rounded off to the nearest greatest number).
PAM value Rounded value
-1.22  -1.50
1.50  1.50
3.24  3.50
3.94  3.50
2.20  2.50
-1.10  -1.50
-2.26  -2.50
-1.88  -1.50
-1.20  -1.50
NORMALIZED ERROR
Formula: Normalized quantized value - Normalized PAM value.
1. -1.50-(-1.22)  - 0.28
2. 1.50-1.50 0
3. 3.50-3.24  +0.26
4. 3.50-3.94  -0.44
5. 2.50-2.20  +0.30
6. -1.50-(-1.10) -0.40
7. -2.50-(-2.26)  -0.24
8. -1.50-(-1.88)  0.38
9. -1.50-(-1.20)  -0.30
QUANTIZATION CODE
These values are plotted on the graph and they come under one of the quantized code:
Normalized error Quantized code
-0.28  2
0  5
+0.26  7
-0.44  7
+0.30  6
-0.40  2
-0.24  1
-0.38  2
-0.30  2
ENCODING
• Each quantized code is interpret as binary number and encoded in this way:

Quantized code Binary number

2 0010

5 0101

7 0111

7 0111

6 0110

2 0010

1 0001

2 0010

2 0010
COMPONENTS OF A
PCM DECODER

4.26
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?
• The minimum bandwidth of a line-encoded signal is
Bmin = c ×N × (1/r).
• We substitute the value of N in this formula:
Bmin =cx N x1/r= c x nb x fs x1/r =c nb x2 xBanalog x1/r
• When 1/r = 1 (for a NRZ or bipolar signal) and c = (1/2) (the average
situation), the minimum bandwidth is
Bmin 5=nb xBanalog
Example 4.14

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:

4.28
DELTA MODULATION

PCM is a very complex technique.


 Other techniques have been developed to reduce the complexity of PCM.
The simplest is delta modulation.
 PCM finds the value of the signal amplitude for each sample

DM finds the change from the previous sample.


It forms a zig zag from which an analog signal is formed.
Note that there are no code words here; bits are sent one after another.

4.29
DELTA MODULATION
MODULATION
The modulator is used at the sender site to create a stream of bits from an analog signal. The
process records the small positive or negative changes, called delta δ.
If the δ.(delta) is positive, the process records a 1;
If δ. negative, the process records a 0.
The modulator builds a second signal that resembles a staircase.
Finding the change is then reduced to comparing the input signal with the gradually made staircase
signal.

4.31
COMPARATOR AND STAIRCASE SIGNAL
• The modulator, at each sampling interval, compares the value of the analog
signal with the last value of the staircase signal.
• If the amplitude of the analog signal is larger, the next bit in the digital data is
1.
• If the amplitude of the analog signal is smaller, the next bit in the digital data is
0.
• The output of the comparator, however, also makes the staircase itself.
• If the next bit is 1, the staircase maker moves the last point of the staircase
signal δ up;
• if the next bit is 0, it moves it δ down.
• We need a delay unit to hold the staircase function for a period between two
comparisons.
DELTA DEMODULATION
 The demodulator takes the digital data and, using the staircase maker and the delay
unit, creates the analog signal.
 The created analog signal, however, needs to pass through a low-pass filter for
smoothing

4.33
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.

Das könnte Ihnen auch gefallen