Vous êtes sur la page 1sur 13

Sampling

A continuoustime analog or digital signal is defined at all time instants. On the other
hand, a discretetime analog or digital signal is defined only at some time instants. A
simple method to sample a continuoustime signal at a specific time instant is to multiply
this signal by a delta function that occurs at the time instant of interest. For example, let
the signal g(t) be a continuoustime signal with bandwidth 2tB rad/s (B Hz). The signal
g
s
(t) given by


0 0 0
( ) ( ) ( ) ( ) ( )
s
g t g t t t g t t t o o = =

is zero everywhere and a delta function at time t
0
with an area (we will also call it
magnitude) that is equal to the value of g(t) evaluated at t
0
, that is a magnitude of value
g(t
0
). This represents getting only one sample of g(t). If we want to sample g(t)
periodically every T
s
then we can repeat this process periodically. That is, multiply the
signal g(t) by a train of delta functions that occur every T
s
seconds. A train of delta
function o
Ts(t) that occur every T
s
is given by

( ) ( ).
s
T s
n
t t nT o o

=
=



Therefore, the sampled signalg(t) is given by


( ) ( ) ( )
( ) ( )
( ) ( ).
s
n
s
n
s s
n
g t g t t nT
g t t nT
g nT t nT
o
o
o

=
=
=
=



So, the sampled signal is a sum of delta functions that have magnitudes equal to the value
of g(t) at the time instants that the delta functions occur. The following figure shows a
signal 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)


and the following figure show the sampled signal g(t) where the amplitude of the deltas
follows the original signal 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 (Continuation)

Assume that the spectrum of g(t) is given by G(e) shown below.

G(e)
+2tB
e
2tB e
s
2e
s
e
s
2e
s
3e
s
3e
s
A

We can get the spectrum of g(t) by find the spectrum of the train of delta functions and
convolving it with G(e), or by decomposing the train function into sine and cosine
functions and then taking the Fourier transform of each element independently. Since the
train of delta functions o
Ts(t) is periodic, we can decompose it using the Fourier series as


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

=
=
= + + + +
+ + + +



where T
s
and e
s
are related by


2
s
s
T
t
e = .

The value of a
0
is


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

= = =
} }
,

and the value of the a
n
for any n > 1 is


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

= = = =
} } }
.

Also, the value of b
n
for any n > 1 is


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

= = = =
} } }
.

Therefore,


( ) ( )
1 2 2 2
cos( ) cos(2 ) cos(3 )
s
T s
n
s s s
s s s s
t t nT
t t t
T T T T
o o
e e e

=
=
= + + + +



and


( ) ( ) ( )
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

=
=
= + + + +



So, by taking the Fourier transform of each term of the above independently, we see that
the spectrum G(e) is given by


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

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



or simply scaled copies of the spectrum of the original continuoustime signal at multiples
of the sampling frequency e
s
. Therefore, the spectrum of the sampled signal would be

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


To extract the original signal from the sampled signal, it is clear that using a LPF with
bandwidth equal to the bandwidth of the original signal g(t) (which is 2tB rad/s in this
case) will do the job. However, this is true only if the signal was sampled at a sampling
rate that is greater than twice the bandwidth of the 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


If the signal was sampled at a sampling rate lower that 2 times the bandwidth of the signal
(called the NYQUIST SAMPLING RATE), the different spectral components of the
sampled signal (called IMAGES) will interfere with each other and reconstructing the
original signal will be impossible. This is illustrated in the following figure. The dark parts
in the figure represent parts of the sampled signal and reconstructed signal that have been
damaged.

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

Application of Sampling in TDM

If we have multiple BASEBAND signals that we would like to transmit over the same
channel such as a coaxial cable or a wireless channel, one method of being able to transmit
all channels and yet being able to extract each channel at the receiver without interference
between the different signals is to modulate each channel at a different frequency. It is
obvious in this case that the different channels are sharing the same transmission time (all
are transmitted at the same time) but they divide the frequency band (because each has its
own transmission band that resulted from modulating each at a different frequency). These
channels are said to be Frequency Division Multiplexed (FDM). This is the process that is
used for transmitting multiple radio channels in the AM or FM bands and multiple TV
channels over a satellite. In many cases, we would like to transmit multiple signals over
the same communication channels without modulating the signals first. Therefore, we
have to use timedivision multiplexing (TDM). TDM is a process in which different
signals that have the same frequency are transmitted over the same channel. These signals
instead of being multiplexed in frequency, they are multiplexed in time. One method for
performing TDM is to sample the different signals at the same rate but at different time
instants and the samples of the different signals are interleaved (placed in a sequence).
Consider for example the three signals represent by the dashed lines shown below.
T
s
g
1
(t)
g
2
(t)
g
3
(t)
T
s
T
s
g
TDM
(t)
T
s
T
s
/3


The signal containing the samples of the different original signals is a TDM signal. This
signal can be transmitted over a channel and the received samples can be DE
INTERLEAVED (samples are separated to create the original signals). It is clear that
TDM cannot be performed for continuous time signals.

Pulse Modulated Signals

Since ideal delta function cannot be implemented in practice, representing samples of
signals in terms of delta functions is only theoretical. Therefore, one practical method for
representing samples is using pulses (rect functions) instead of impulses (delta functions).
There are three main types using which we represent the information carried by a
sequence of samples (three types of pulse modulations). Notice that the term modulation
here is not used in the sense of modulation that we used in the previous chapters, which
the frequency of a signal is shifted to a higher frequency for transmission. The term
modulation here is used to specify the process in which the information signal modifies
some parameter of a sequence of pulses. This parameter is used to transmit the desired
information.

Pulse Amplitude Modulation (PAM): in this modulation scheme, the information
is carrier in the amplitude (or height) of the pulses. This is the most
logical pulse modulation method. The following shows an example of
PAM. Notice that the width of the different pulses is exactly the same
and that the pulses are always centered at the sampling instants (or may
start at the sampling instants), but there centers are always separated by
the sampling period T
s
.

T
s
g
PAM
(t)
t


PulseWidth Modulation (PWM): in this modulation, the information is carrier
in the width (or duration) of the pulses. The following shows an
example of PWM. Notice that the height (amplitude) of the different
pulses is exactly the same and that the pulses are always centered at the
sampling instants and separated by the sampling period T
s
.




T
s
g
PWM
(t)
t

PulsePosition Modulation (PPM): in this modulation, the information is carrier
in the position of the pulses. The following shows an example of PPM.
Notice that the height (amplitude) and width of the different pulses is
exactly the same. Here the pulses are not centered at sampling instants.
T
s
g
PPM
(t)
t

Comment: Each of the above pulse modulation methods has advantages and
disadvantages. For example, the advantage of PPM and PWD over PAM is
that they have constant amplitude. For transmissions over channels that
change with time (called timevarying channels) the gain of the channels may
change, and therefore the height of the pulses may change not because they
were amplitude modulated, but because the power received as different pulses
were transmitted was varying because of the distance. If the transmitted pulses
originally had constant height as it is the case for PPM and PWM, even if the
received pulses had varying amplitudes, the varying amplitude has no effect
on the receiver. This is generally not possible if PAM was used. On the other
hand, it is clear that if the amplitude of the original continuous-time signal
suddenly became large, the width of pulses in PWM may either increase to
overlap with adjacent pulses or collapse to become zero. In this case, the
receiver may get confused on what the original continuous-time signal was. A
similar problem may occur in PPM where pulses that were generated later
could precede pulses that were generated first because of high amplitude of
the input continuous-time signal.

Pulse Code Modulation (PCM)

The modulation methods PAM, PWM, and PPM discussed in the previous lecture still
represent analog communication signals since the height, width, and position of the PAM,
PWM, and PPM, respectively, can take any value in a range of values. Digital
communication systems require the transmission of a digital for of the samples of the
information signal. Therefore, a device that converts the analog samples of the message
signal to digital form would be required. Analog to Digital Converters (ADC) are such
devices. ADCs sample the input signal and then apply a process called quantization. The
quantized forms of the samples are then converted to binary digits and are outputted in the
form of 1s and 0s. The sequence of 1s and 0s outputted by the ADC is called a PCM
signal (Pulses have been coded to 1s and 0s).

Example: A color scanner is scanning a picture of height 11 inches and width 8.5
inches (Letter size paper). The resolution of the scanner is 600 dots per inch (dpi) in each
dimension and the picture will be quantized using 256 levels per each color. Find the time
it would require to transmit this picture using a modem of speed 56 k bits per second
(kbps).

We need to find the total number of bits that will represent the picture. We know
that 256 quantization levels require 8 bits to represent each quantization level.

Number of bits = 11 inches (height) * 8.5 inches (width) * 600 dots / inch (height)
* 600 dots / inch (width) * 3 colors (red, green, blue)
* 8 bits / color = 807,840,000 bits
Using a 56 kbps modem would require 807,840,000 / 56,000 = 14426 seconds of
transmission time = 4 hours.
For this reason, compression techniques are generally used to store and transmit
pictures over slow transmission channels.

Quantization

The process of quantizing a signal is the first part of converting an sequence of analog
samples to a PCM code. In quantization, an analog sample with an amplitude that may
take value in a specific range is converted to a digital sample with an amplitude that takes
one of a specific predefined set of quantization values. This is performed by dividing the
range of possible values of the analog samples into L different levels, and assigning the
center value of each level to any sample that falls in that quantization interval. The
problem with this process is that it approximates the value of an analog sample with the
nearest of the quantization values. So, for almost all samples, the quantized samples will
differ from the original samples by a small amount. This amount is called the quantization
error. To get some idea on the effect of this quantization error, quantizing audio signals
results in a hissing noise similar to what you would hear when play a random signal.

Assume that a signal with power P
s
is to be quantized using a quantizer with L = 2
n
levels
ranging in voltage from m
p
to m
p
as shown in the figure below.
t
4Ts Ts 3Ts 5Ts 2Ts 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


We can define the variable Av to be the height of the each of the L levels of the quantizer
as shown above. This gives a value of Av equal to


2
p
m
v
L
A = .

Therefore, for a set of quantizers with the same m
p
, the larger the number of levels of a
quantizer, the smaller the size of each quantization interval, and for a set of quantizers
with the same number of quantization intervals, the larger m
p
is the larger the quantization
interval length to accommodate all the quantization range.

Now if we look at the input output characteristics of the quantizer, it will be similar to the
red line in the following figure. Note that as long as the input is within the quantization
range of the quantizer, the output of the quantizer represented by the red line follows the
input of the quantizer. When the input of the quantizer exceeds the range of m
p
to m
p
,
the output of the quantizer starts to deviate from the input and the quantization error
(difference between an input and the corresponding output sample) increases significantly.
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

Now let us define the quantization error represented by the difference between the input
sample and the corresponding output sample to be q, or


q
q x x = .

Plotting this quantization error versus the input signal of a quantizer is seen next. Notice
that the plot of the quantization error is obtained by taking the difference between the
blow and red lines in the above figure.

Av 2Av 3Av 4Av Av 2Av 3Av 4Av
Av/2
Quantizer
Input x
Quantization Error q
Av/2
2m
p


It is seen from this figure that the quantization error of any sample is restricted between
Av/2 and Av/2 except when the input signal exceeds the range of quantization of m
p
to
m
p.

Quantization (Continued)


To understand the following, you will need to know something about probability theory.
Assuming that the input signal is restricted between m
p
to m
p
, the resulting quantization
error q (or we can call it quantization noise) will be a random process that is uniformly
distributed between Av/2 and Av/2 with a constant height of 1/Av. That is, all values of
quantization error in the range Av/2 and Av/2 are equally probable to happen. The power
of such a random process can be easily found by finding the average of the square of all
noise values multiplied by probability of each of these values of the noise occurring. So,


( ) ( ) ( ) ( )
( )
/ 2
/ 2 3
2
/ 2 / 2
3 3 3 3
2
1 1
3
/ 2 / 2
1 1
3 3 24 24
12
v
v
q
v q v
q
P q dq
v v
v v v v
v v
v
A
A
A =A
(
= =
(
A A

( (
A A A A
= = + ( (
A A
( (

A
=
}


Now substituting for
2
p
m
v
L
A = in the above equation gives


( )
2
2
2
2 /
12 3
p
p
q
m L
m
P
L
= = ,

As predicted, the power of the noise decreases as the number of levels L increases, and
increases as the edge of the quantization range m
p
increases.

Now let us define the Signal to Noise Ratio (SNR) as the ratio of the power of the input
signal of the quantizer to the power of the noise introduced by the quantizer (note that the
SNR has many other definitions used in communication systems depending on the
applications)


2
2
Signal Power
Noise Power
3
.
s
q
s
p
P
SNR
P
L
P
m
= =
=


In general the values of the SNR are either much greater than 1 or much less than 1. A
more useful representation of the SNR can be obtained by using logarithmic scale or dB.
We know that L of a quantizer is always a power of two or L = 2
n
. Therefore,


2
2
3
,
Linear s
p
L
SNR P
m
=

( )
( )
2
2
10 10 10 2 2
10 10 2
6

3 3
10 log 10 log 10 log 2
3
10 log 20 log 2
6 dB.
n
dB s s
p p
s
p
n
L
SNR P P
m m
P n
m
n
o
o
| | | |
= = +
| |
| |
\ . \ .
| |
= +
|
|
\ .
= +


Note that o shown in the above representation of the SNR is a constant when quantizing a
specific signal with different quantizers as long as all of these quantizers have the same
value of m
p
.

It is clear that the SNR of a quantizer in dB increases linearly by 6 dB as we increase the
number of bits that the quantizer uses by 1 bit. The cost for increasing the SNR of a
quantizer is that more bits are generated and therefore either a higher bandwidth or a
longer time period is required to transmit the PCM signal.

Generation of the PCM Signal

Now, once the signal has been quantized by the quantizer, the quantizer converts it to bits
(1s and 0s) and outputs these bits. Looking at the figure in the previous lecture, which
shown here for convenience. We see that each of the levels of the quantizer is assigned a
code from 000000 for the lowest quantization interval to 111111 for the highest
quantization interval as shown in the column to the left of the figure. The PCM signal is
obtained by outputting the bits of the different samples one bit after the other and one
sample after the other.

t
4Ts Ts 3Ts 5Ts 2Ts 0
m
p
m
p
L = 2
n
L levels
n bits
0.000
0.001
0.010
1.111
.
.
.
.
PCM Code
n bits/sample
0
Av
Quantizer Output Samples
q
x
Quantizer Input Samples x
A quantization interval Corresponding quantization value

Vous aimerez peut-être aussi