You are on page 1of 23

Chapter 6

Sampling & PCM


Advantages of Digital Communications
Rugged: Can withstand channel noise and
distortion much better.
Use of repeaters (travels as far as needed).
Use of TDM
Can be encrypted (Security and Privacy)
Can be encoded for error correction (reliability).
Easy to process, store and search.
Analog to Digital Conversion (A/D)
In converting an analog signal to an equivalent
sequence of 0s and 1s, we go through three
processes:
Sampling:
o converting continuoustime analog signals to discretetime
analog signals.
Quantization
o converting discretetime analog signals to discretetime
digital signals (finite set of amplitude levels).
Coding
o Map each amplitude level to a binary sequence.
[1] Sampling: Mathematical Representation
One sample of g(t) can be obtained from

If we want to sample g(t) periodically every T
s
sec then we
can repeat this process periodically
0 0 0
( ) ( ) ( ) ( ) ( )
s
g t g t t t g t t t o o = =
( ) ( ) ( )
( ) ( )
( ) ( ).
s
n
s
n
s s
n
g t g t t nT
g t t nT
g nT t nT
o
o
o

=
=
=
=

Sampling: Time-Domain Plot


e
T
s
2T
s
3T
s
4T
s
5T
s
6T
s
6T
s
5T
s
4T
s
3T
s
2T
s
T
s
g(t)
e
T
s
2T
s
3T
s
4T
s
5T
s
6T
s
6T
s
5T
s
4T
s
3T
s
2T
s
T
s
g(t)
Sampling: Frequency-Domain Analysis (1/2)
0 1 2 3
1 2 3
( ) ( )
cos( ) cos(2 ) cos(3 )
sin( ) sin(2 ) sin(3 )
s
T s
n
s s s
s s s
t t nT
a a t a t a t
b t b t b t
o o
e e e
e e e

=
=
= + + + +
+ + + +

2
s
s
T
t
e =
2 2
0
2 2
1 1 1
( ) ( )
s s
s
s s
T T
T
T T s s s
a t dt t dt
T T T
o o

= = =
} }
2 2 2
0
2 2 2
2 2 2 2
( ) cos( ) ( ) cos( ) ( ) cos(0)
s s s
s
s s s
T T T
T s s
T T T s s s s
a t t dt t t dt t dt
T T T T
o e o e o

= = = =
} } }
2 2 2
0
2 2 2
2 2 2
( ) sin( ) ( ) sin( ) ( ) sin(0) 0
s s s
s
s s s
T T T
T s s
T T T s s s
b t t dt t t dt t dt
T T T
o e o e o

= = = =
} } }
) ( ) ( ) ( t t g t g
s
T
o =
a
n

b
n

Sampling: Frequency-Domain Analysis (2/2)
( ) ( ) ( )
1 2 2 2
( ) ( ) cos( ) ( ) cos(2 ) ( ) cos(3 ) .
s
n
s s s
s s s s
g t g t t nT
g t g t t g t t g t t
T T T T
o
e e e

=
=
= + + + +

| | | |
| |
1 1 1
( ) ( ) ( ) ( ) ( 2 ) ( 2 )
1
( 3 ) ( 3 ) .
1
( )
s s s s
s s s
s s
s
s
n
s
G G G G G G
T T T
G G
T
G n
T
e e e e e e e e e e
e e e e
e e

=
= + + + + + +
+ + + +
=

Spectrum of Sampled Function


G(e)
+2tB
e
2tB e
s
2e
s
e
s
2e
s
3e
s
3e
s
A
G(e)
+2tB
e
2tB e
s
2e
s
e
s
2e
s
3e
s
3e
s
A/T
s
... ...
e
s
+2tB e
s
2tB e
s
+2tB e
s
2tB
Recovering the Continuous-Time Signal
G(e)
+2tB
e
2tB e
s
2e
s
e
s
2e
s
3e
s
3e
s
A/T
s
... ...
e
s
+2tB e
s
2tB e
s
+2tB e
s
2tB
LPF for reconstructing the origianl
signal from the sampled signal
Reconstructed Signal
+2tB 2tB e
s
2e
s
e
s
2e
s
3e
s
3e
s
A/T
s
T
s
Magnitude of LPF should be Ts to cancel
the scaling factor caused by sampling
e
s
> 2(2tB) No interference between Images
e
Sampling Theorem
A baseband signal whose spectrum is band-
limited to B Hz can be reconstructed exactly
(without any error) from its samples taken
uniformly at a rate f
s
2B.
f
s
2B is called Nyquist Criterion of sampling.
f
s
= 2B is called the Nyquist rate of sampling.
Does Sampling Theorem Make Sense?


Aliasing








Sampling a signal at a rate less that the Nyquist rate results in
Aliasing.
In aliasing, the higher frequency components take the identity of
lower frequencies.
Real life Example: Sampling a rotating wheel.
G(e)
e
2e
s
4e
s
e
s
2e
s
3e
s
A/T
s
... ...
LPF for reconstructing the origianl
signal from the sampled signal
Reconstructed Signal
A/T
s
T
s
e
s
< 2(2tB) Interference between images
will occur
e
s
3e
s
4e
s
Damaged part of the signal
2e
s
4e
s
e
s
2e
s
3e
s
e
s
3e
s
4e
s
e
Time Division Multiplexing
(TDM)
Multiplexing: The process of
sending two or more signals
together
FDM: Sending them together at the
same time over different bands
using carrier modulation (AM &
FM broadcasting)
TDM: Sending them together over
the same band by sampling the
signals and sending the samples at
different time instants
(interleaved).
T
s
g
1
(t)
g
2
(t)
g
3
(t)
T
s
T
s
g
TDM
(t)
T
s
T
s
/3
How to Transmit the Samples?
Pulse Modulation:
Use the samples to modulate a carrier of pulses
Pulse Amplitude Modulation (PAM)
Pulse Width Modulation (PWM)
Pulse Position Modulation (PPM)
Pulse Code Modulation (PCM)
Quantization of samples
Coding
Pulse Amplitude Modulation (PAM)
T
s
g
PAM
(t)
t
Pulse Width Modulation (PWM)
T
s
g
PWM
(t)
t
Pulse Position Modulation (PPM)
T
s
g
PPM
(t)
t
[2] Quantization
Analog samples with an amplitude that may take value
in a specific range are converted to a digital samples
with an amplitude that takes one of a specific pre
defined set of values.
The range of possible values of the analog samples is
divide into L levels. L is usually taken to be a power of
2 (L = 2
n
).
The center value of each level is assigned to any
sample that falls in that quantization interval.
For almost all samples, the quantized samples will
differ from the original samples by a small amount,
called the quantization error.
Quantization: Illustration
t
4T
s
T
s
3T
s
5T
s
2T
s
0
m
p
m
p
L = 2
n
L levels
n bits
0
Av
Quantizer Output Samples
q
x
Quantizer Input Samples x
A quantization interval Corresponding quantization value
2
p
m
v
L
A =
Input-Output Characteristics of Quantizer
Av 2Av 3Av 4Av Av 2Av 3Av 4Av
Av/2
3Av/2
5Av/2
7Av/2
Av/2
3Av/2
5Av/2
7Av/2
Quantizer
Input x
Quantizer
Output x
q
q
x
x
2m
p
[3] Coding
4T
s
T
s
3T
s
5T
s
2T
s
0
m
p
m
p
L = 2
n
L levels
n bits
000
001
010
111
PCM Code
n bits/sample
0
Av
Quantizer Output Samples
q
x
Quantizer Input Samples x
A quantization interval Corresponding quantization value
011
100
101
110
001 011 100 110 110 110 100 010 010 010 100 101 101
We want to scan and send a black-and-white image of
height 11 inches and width 8.5 inches (Letter size paper).
The resolution of the scanner is 600600 dots per inch
square. The picture will be quantized using 256 levels.
Find the size of the scanned image and the time it takes
to transmit the image using a modem of speed 56 kbps.
Size of image =
11(in)8.5(in)600600(samples/in
2
)8bits/sample
= 269280000 bits = 269 Mbits
Time to transmit = 269280000 / 56,000 = 4808 sec = 80 min

How would 0s and 1s be transmitted?
The simplest form is to send a +ve pulse for a
1 and a ve pulse for a 0.
Transmitting the message g(t) would translate
into sending a a long sequence of +ve and ve
pulses.

Nyquist Theorem for Transmission
Note that the larger the transmission rate
(pulses/sec) the narrower the pulse, the wider
its spectrum, the higher the channel bandwidth
required for transmission.
The minimum theoretical bandwidth
required to transmit R pulses/sec is R/2 Hz.
(To be demonstrated later)

You might also like