Chap 2: A/D Conversion and Multiplexing
ELE745 Digital Communications
Chapter 2 : A/D Conversion and Multiplexing
Lian Zhao
Professor
Department of Electrical and Computer Engineering
Ryerson University
Chap 2: A/D Conversion and Multiplexing
Formatting and Digital Coding of Waveforms
A lot of information sources generate analog (continuous-time) information. In order to
represent, process, store and transmit data using computers and networks, the analog
data has to be converted to a faithful digital representation.
The original form of most communicated data is either textual or analog. It is needed to
be transformed to binary digits for transmission.
Textual information is transformed by use of a coder, etc. ASCII (7-bit code).
Analog signal is formatted using sampling, quantization and encoding.
In this chapter, the well established concepts of sampling and quantization are reviewed.
Representing a signal waveform using pulse code modulation will be discussed.
A/D conversion
Source
a(n)
a(t)
Sampling
{a_q}
Quantizing
Encoding
Modulator
Channel
Figure 1: Digital Coding of Waveforms.
2
Chap 2: A/D Conversion and Multiplexing
Chap. 2.1 Sampling
Analog signals can be digitized through sampling and quantization.
The sampling rate must be sufficiently high so that the analog signal can be
reconstructed from the samples with sufficient accuracy.
The sampling theorem is the basis for determining the proper sampling rate of a given
signal, and is state as If fm is the maximum frequency of the signal, then the signal
has to be sampled at a rate of at least fs samples per second, where fs = 2fm .
In practice, sampling is performed by multiplying the signal in the time-domain with a
train of impulses where each pulse is separated by sampling time (a comb function).
Chap 2: A/D Conversion and Multiplexing
x(t)
Ts
fs
fs
Figure 2: Sampling process analyzed in Frequency domain.
Chap 2: A/D Conversion and Multiplexing
Mathematically, Denote the original analog signal as x(t), sampling function (pulse train) as
x (t)
!
1. pulse train x (t) = n= (t nTs ) is periodic, and its FS are
1
Dn =
Ts
"
Ts /2
xp (t)ejn2fs t dt =
Ts /2
1
Ts
(fs =
1
)
Ts
(1)
Then the Fourier transform of x (t) is
X (f ) =
1 #
(f nfs )
Ts n=
(2)
2. In time domain, the sampled signal is
xs (t) = x(t) x (t) =
n=
x(t) (t nTs ) =
n=
x(nTs )(t nTs )
Chap 2: A/D Conversion and Multiplexing
3. In frequency domain, the sampled signal is
Xs (f )
=
=
1 #
X(f ) X (f ) = X(f )
(f nfs )
Ts n=
1 #
X(f nfs )
Ts n=
(3)
4. We observe that the spectrum of Xs (f ) is a periodic function of the original spectrum
X(f ) scaled by a constant factor ( T1s ) and centered at nfs .
5. The original signal x(t) can be recovered without distortion by using a low pass filter
when there is no spectrum overlap. Here comes the sampling theorem (fs 2fm ).
6. When sampling frequency is not high enough, there will be spectrum overlap, which is
called aliasing.
Chap 2: A/D Conversion and Multiplexing
X(f)
2fs
fs
fs
2fs
fs
fs
2fs
Over sampling
2fs
Nyquist sampling
2fs
fs
fs
2fs
Under sampling
2fs fs
fs
2fs
Figure 3: Spectrum of the sampled signal.
7
Chap 2: A/D Conversion and Multiplexing
Figure 4: Overlapping spectra due to aliasing.
8
Chap 2: A/D Conversion and Multiplexing
Figure 5: Illustration of aliasing.
Chap 2: A/D Conversion and Multiplexing
Sampling Theorem
A band-limited signal of finite energy which has no frequency components higher than B Hz,
is completely described by specifying the values of the signal at instants of time separated by
1/2B seconds.
Discussion:
The sampling rate of 2B samples per second for a signal bandwidth of B Hz is called the
Nyquist rate, and 1/2B is called the Nyquist interval.
We can oversample, but cannot undersample.
The sampling process discussed is for baseband (low-pass) signal.
If a signal is not bandlimited, no matter how fast we sample the signal, the signal cannot
be accurately recovered. For example, a square waveform.
10
Chap 2: A/D Conversion and Multiplexing
The distortion is due to fs < 2B (undersampling). This is called aliasing. When aliasing
occurs, {x(nTs )} cannot accurately recover the original signal x(t). To combat the aliasing
error in practice,
Prior the sampling, we use an LPF pre-alias filter to attenuate those high frequency
component of the signal that are not essential to the information be carried by the signal.
Taken account of the guard band of practical LP filter. Sample the signal at a rate slightly
higher than the Nyquist rate (fs > 2B).
11
Chap 2: A/D Conversion and Multiplexing
Ideal Signal Reconstruction
X(f)
2fs
fs
fs
2fs
2fs
fs
fsW fs
2fs
W < fc < fsW
fc
fc
X(f)
12
Chap 2: A/D Conversion and Multiplexing
Ideal Signal Reconstruction Analysis
(1) Frequency-domain description
Review that the spectrum of the sampled signal is
1 #
X(f nfs )
Ts n=
Xs (f ) =
The original signal can be recovered as
X(f ) =
where
1
Xs (f ) rect(f /2B)
fs
1 B f B
rect(f /2B) =
0 o.w.
is called the ideal low pass filter.
13
Chap 2: A/D Conversion and Multiplexing
(2) Time-domain description
x(t)
=
=
=
=
1 1
1
F [Xs (f ) rect(f /2B)] = F 1 [Xs (f )] F 1 [rect(f /2B)]
fs
fs
1
2B
xs (t) (2Bsinc(2Bt)) =
xs (t) sinc(2Bt)
fs
fs
$
%
2B #
x(nTs )(t nTs ) sinc(2Bt)
fs n=
F 1 [X(f )] =
2B #
x(nTs )sinc[2B(t nTs )]
fs n=
If fs = 2B, then
x(t) =
n=
(4)
x(nTs )sinc[2B(t nTs )]
Equation (4) is an interpolation formula for reconstruction the original signal from the
sequence of sample values x(nTs ). The function sinc(2Bt) is the interpolation function.
14
Chap 2: A/D Conversion and Multiplexing
Figure 6: Ideal sampling (textbook Fig 2.6 P64).
15
Chap 2: A/D Conversion and Multiplexing
Figure 7: Natural sampling (textbook Fig 2.8 P67).
16
Chap 2: A/D Conversion and Multiplexing
Practical Sampling
Ideal sampling: Ts =
n=
(t nTs ).
Natural sampling: c(t) is a periodic sampling signal. Using Fourier Series analysis, we have
c(t) =
A #
sinc(nfs )ej2nfs t
Ts n=
(5)
where is the pulse width, and A is the pulse amplitude. The sampled signal can be
expressed as
xs (t) = x(t) c(t) =
In the frequency domain.
Xs (f ) =
=
F[xs (t)] =
#
A
x(t)
sinc(nfs )ej2nfs t
Ts
n=
(6)
A #
sinc(nfs ) F[x(t)ej2nfs t ]
Ts n=
A #
sinc(nfs ) X(f nfs )
Ts n=
17
Chap 2: A/D Conversion and Multiplexing
We can observe that
Using natural sampling, no distortion in receiving x(t) if fs > 2B.
If A = 1, natural sampling is equivalent to ideal sampling when n = 0.
18
Chap 2: A/D Conversion and Multiplexing
Chap. 2.2 Quantization
Quantization is the process in which the amplitude of the sampled signal (discrete-time
signal) is limited to a predefined set of new voltage levels. As a result, for each sample there
could be a quantization error e(t), resulting due to differences in voltage between the
sampled and the quantized values.
x(t) quantizer xq (t)
e(t) = xq (t) x(t)
For uniform quantization,
stepsize
q=
Vpp
L
Vpp : peak-to-peak voltage;
L = 2N : quantization levels;
N : quantization bits
Let e represent the quantization error of a data sample x,
e = xq x
19
Chap 2: A/D Conversion and Multiplexing
The range of the quantization error would be
q
q
e
2
2
For a particular signal sample, the quantization error depends on the value of the sample. In
general, with a constant (fixed) peak-to-peak value,
quantization level
step size q =
quantization error
On the other hand,
quantization level =
the number of bits necessary to represent all the discrete level
That is, if we want to reduce the quantization error, we need to use more bits to represent
each sampled data.
20
Chap 2: A/D Conversion and Multiplexing
If we consider the quantizer input as a random variable X, then the quantization error is also
a random variable Q. Assume that Q is uniformly distributed with a pdf (probability density
function) as
1 q/2 e q/2
q
f (e) =
0
otherwise
then the mean of the quantization error e is
" q/2
me =
ef (e) de = 0
q/2
the variance of the quantization error, i.e., quantization noise power is
" q/2
" q/2
1
q2
2
2
2
2
q = E[(e me ) ] = E[e ] =
e f (e) de =
e2 de =
q
12
q/2
q/2
The quantizers performance can be described by the output signal-to-quantization noise ratio
(SNR) defined as
SNR =
ave. signal power
2
2
= X2 = 2 X
ave. noise power
q
q /12
21
Chap 2: A/D Conversion and Multiplexing
Example 1: What is the resulting SNR for a signal uniformly distributed on [-1,+1] when
uniform quantizer with 256 levels is employed?
Solution: The step size is the ratio of peak-to-peak value of the signal to the number of
quantization levels,
1 (1)
1
q=
=
256
128
Since signal X is uniformly distributed over [-1,+1], its pdf is
1 1 x 1
2
fX (x) =
0
otherwise
Yields E[X] = 0, and
2
X
therefore
SNR =
"
x fX (x)dx =
"
1
1
1 2
1
x dx =
2
3
2
X
1/3
=
= 65536 48.16(dB)
q 2 /12
(1/128)2 /12
22
Chap 2: A/D Conversion and Multiplexing
Example 2: For a full-scale sinusoid input signal, the signal power is
)
*2
) *2
1 Vpp
1 Lq
L2 q 2
S=
=
=
2
2
2 2
8
Therefore the signal to quantization noise ratio is
SNR =
ave. signal power
L2 q 2 /8
3L2
= 2
=
ave. noise power
q /12
2
when expressed in dB, then
) 2*
3L
SNR = 10 log10
= 20 log10 L + 1.76 = 20 log10 2N + 1.76 = 6.02N + 1.76(dB)
2
23
Chap 2: A/D Conversion and Multiplexing
Pulse Code Modulation (PCM)
PCM is a simple method of converting an analog signal into a digital signal (A/D conversion).
Analog signal is characterized by the fact that its amplitude can take on any value over a
continuous range. This means that it can take on an infinite number of amplitude values. An
analog signal is converted into a digital signal amplitude level by means of sampling and
quantization, and followed by encoding of each quantized sample to a binary code. Based on
the number of levels, if a fixed length coding is used then that method is described as PCM
A/D conversion
Source
a(n)
a(t)
Sampling
{a_q}
Quantizing
Encoding
Channel
Modulator
Figure 8: Digital Coding of Waveforms.
a(t): continuous-time continuous-amplitude analog signal.
a(n): discrete-time continuous-amplitude discrete signal.
aq : discrete-time discrete-amplitude digital signal.
24
Chap 2: A/D Conversion and Multiplexing
Chap. 2.3 Pulse Code Modulation (PCM)
To discretize the amplitude of a(n), the most convenient way is to quantize the amplitude to
L = 2N levels, using
log2 L = N log2 2 = N
bits
i.e., each signal level can be represented by a N -bit word. For example, when N = 3, we can
quantize the samples into codeword with 3-bits length to represent L = 8-level PCM signal.
The transmission of an L-level signal as an N -bit codeword (consisting of 0s and 1s with
2-level) is known as Pulse-code Modulation (PCM).
25
Chap 2: A/D Conversion and Multiplexing
x(t)
3.5
4
3
2.5
1.5
2
1
0.5
t
0.5
1
1.5
2
2.5
3
3.5
4
1.3
1.5
5
101
3.6
3.5
7
111
2.3
2.5
6
110
0.7
0.5
4
0.7
0.5
3
2.4
2.5
1
100
011
001
3.4
3.5
0
000
Natural sample value
Quantized sample value
Code number
PCM sequence
Figure 9: Natural sampling, quantized samples, and pulse code modulation.
26
Chap 2: A/D Conversion and Multiplexing
PCM word size
Quantization level: L; Number of bits each level: N , then
L = 2N
(7)
N = log2 (L)
How to determine N ? It will depend on how much quantization distortion we are willing
to tolerate. Let the magnitude of the quantization error, |e|, be specified as
|e| pVpp
while
|e|max =
q
Vpp
=
2
2L
Therefore,
Vpp
pVpp
2L
which implies
N
1
=L
2p
N log2
1
2p
(8)
27
Chap 2: A/D Conversion and Multiplexing
Pulse Amplitude Modulation (PAM)
PAM is one way to modulate information on to a sequence of pulses.
PAM signal
h(t) <=> H(f)
g (t)
y(t)
modulator
where
g (t) =
n=
therefore
y(t) = g (t) h(t) =
n=
g(nTs ) (t nTs )
g(nTs ) (t nTs ) h(t) =
n=
g(nTs ) h(t nTs ) (9)
PAM waveforms
Samples
T
Ts
28
Chap 2: A/D Conversion and Multiplexing
Remark:
The information carried in the PAM signal resides in the amplitude value {g(nTs )}.
The width of a PAM signal pulse (T ) is less than or equal to Ts . The ratio T /Ts < 100%
is called the duty cycle.
The sampled values {g(nTs )} are amplitude continuous, therefore, PAM is an analog
signaling scheme.
The information samples without any quantization are modulated on to pulses, the
resulting pulse modulation can be called analog pulse modulation.
When the information samples are first quantized, yielding symbols from an M-ary
alphabet set, and then modulated on to pulses, the resulting pulse modulation is digital
and we refer to it as M-ary pulse modulation.
29
Chap 2: A/D Conversion and Multiplexing
PCM vs. PAM
PCM: use 2-level, easy to detect but need more bandwidth.
PAM: use more amplitude levels, difficult to detect but save bandwidth.
30
Chap 2: A/D Conversion and Multiplexing
Example (textbook p93): The information in an analog waveform, with maximum frequency fm = 3 kHz, is to be transmitted over an M -ary PAM system, where the number of
pulse level is M = 16. The quantization distortion is specified not to exceed 1% of the Vpp
What is the minimum number of bits/sample, or bits/PCM word that should be used in
digitizing the analog waveform?
What is the minimum required sampling rate, and what is the resulting bit transmission
rate?
What is the PAM pulse or symbol transmission rate?
If the transmission bandwidth (including filtering) equals 12 kHz, determine the bandwidth efficiency for this system.
Chap 2: A/D Conversion and Multiplexing
Chap. 2.4 Multiplexing
Multiplexing is a method for simultaneous transmission of several signals over a common
communication channel.
FDM
TDM
f
s1
s2
s3
s1
fc
fc: bandwidth of the channel capacity
s2
s3
t
T_s
Ts: sampling interval
Frequency division multiplexing (FDM): to separate signals in frequency domain (for
example: AM/FM radio) and each signal occupies its frequency slot all the time.
#
fi fc
n
Time division multiplexing (TDM): the signal from different information sources are
multiplexed in time domain, and each signal occupies all the bandwidth of the channel
during its time slot.
The pulse duration of the individual inputs has to be shortened from Ts to Tx = Ts /N ,
31
Chap 2: A/D Conversion and Multiplexing
where Tx seconds is allocated to an individual sample during one sample interval. This
results in an expansion of the required bandwidth. That is TDM transmission requires a
wider transmission channel bandwidth.
Example: 10 voice signals each bandlimited to 3.2 kHz are sequentially sampled at 8 kHz
and time multiplexed on one channel.
Sampling frequency fs = 8kHz 2B(B = 3.2kHz), then the sampling interval
Ts = 1/fs = 1/8000 = 125s.
For TDM, each voice signal can occupy to
Ts /N = 125/10 = 12.5s
The bandwidth required to transmit the pulse is roughly 80 kHz.
For FDM system, 8 kHz bandwidth is needed to transmit each signal, but 10 transceivers
are needed for 10 signals.
32
Chap 2: A/D Conversion and Multiplexing
33
Chap 2: A/D Conversion and Multiplexing
34
Chap 2: A/D Conversion and Multiplexing
35