Ch6 Sampling
Ch6 Sampling
Ch6 Sampling
1 2 2 2
g (t ) g (t ) cos(ws t ) g (t ) cos(2ws t ) g (t ) cos(3ws t ) .
Ts Ts Ts Ts
1 1 1
G (w ) G (w ) G (w ws ) G (w ws ) G (w 2ws ) G (w 2ws )
Ts Ts Ts
1
G (w 3ws ) G (w 3ws ) .
Ts
1
Ts
G (w nw )
n
s
Spectrum of Sampled Function
Recovering the Continuous-Time Signal
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 fs ≥ 2B.
fs ≥ 2B is called Nyquist Criterion of sampling.
fs = 2B is called the Nyquist rate of sampling.
Does Sampling Theorem Make Sense?
Reconstructing the Signal: Time-Domain Prespective
ω ws g (t ) G (w ) g (t ) G (w )
Ts rect sinc t LPF
ws 2 H(w) = Ts rect(f/fs)
ω
G (w ) G (w ) Ts rect
ws
ws w
g (t ) g (t ) sinc t g (t ) (t nTs ) sinc s t
2 n 2
t
g (t ) g (nTs ) (t nTs ) sinc
n Ts
t nTs
g (t ) g (nTs ) sinc
n Ts
Graphical Illustration
Aliasing
gPAM(t)
Ts
Pulse Width Modulation (PWM)
gPWM(t)
Ts
Pulse Position Modulation (PPM)
[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 = 2n).
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
2m p
Dv
L
xq
Quantization Error
q x xq
[3] Coding
2 MUX MUX 2
...
...
22 23 24 b 1 2 . . . 24 b
24 frame 24
Dv
Pq
2m p /L
m p2
12 12 3L 2
Signal-to-Quantization-Noise Ratio
Signal Power Ps
SNR
Noise Power Pq
3L2
2 Ps .
mp
3L2 3
SNR dB
mp mp
10 log10 2 Ps 10 log10 2 Ps 10 log10 22 n
3
10 log10 2 Ps 20n log10 2
m p
6n
6n dB.
SNR-Bandwidth Exchange
More bits/sample for the same message results in more
quantization levels, less quantization step, less
quantization noise, higher SNR.
On the other hand, more bits/sample results in
bandwidth expansion
Ps
SNR 3 (2) 2 n ; ( SNR ) dB 6n
mp
One added bit results in multiplying SNR by a factor of
4 (6 dB), but multiplying the transmission bandwidth
by a factor of (n+1)/n
A signal of bandwidth 4 kHz is samples at Nyquist rate
and transmitted using PCM with uniform quantization.
If the number of quantization levels L is increased
from 64 to 256, find the change in SNR and
transmission bandwidth.
Number of bits/sample has been increased from 6 to 8.
SNR improved by 12 dB (16 times)
BT expanded by a factor of 1.33 (33% increase).
From 24 kHz to 32 kHz.
Non-Uniform Quantization
There is a huge variation in voice signal level
from user to user, and for the same use from
call to call as well as within the call (sometimes
of the order of 1000:1)
Uniform quantization provides same degree of
resolution for low and high values.
Designing the step size for the low values
results in too many levels, and designing them
for the high values destroys the low values.
Non-Uniform Quantizers
Compressors and Expanders
It is practically more feasible to compress the signal
logarithmically then apply it to a uniform quantizer.
A reciprocal process takes place at the receiver by an
expander.
The compressor/expander system is called compander.
There are two standard laws for companders, the -law
(North America and Japan) and the A-law (Europe and
rest of the world).
-Law and A-Law Characteristics
μ - law
Compression Characteristics
V m ax ln(1 V in / V m ax )
V out
ln(1 )
Vmax = max. uncompressed analog input amplitude
Vin = amplitude of input signal at a particular instant
μ = parameter used to define the amount of
compression
Vout= compressed output amplitude
Typically μ = 255
Discrete
s000ABCD s0000000ABCD 0
s001ABCD s0000001ABCD 1
s010ABCD s000001ABCD1 2
s011ABCD s00001ABCD10 3
s100ABCD s0001ABCD100 4
s101ABCD s001ABCD1000 5
s110ABCD s01ABCD10000 6
s111ABCD s1ABCD100000 7
Example
xˆ [k ]
xˆ [k 1]
xˆ [k ] d q [k ] xˆ [k 1].
Generalized DPCM
We can get even a smaller range of values if we define the
difference as:
d [k ] x[k ] xˆ[k ]
xˆ (k ) can be predicted from previous values of x,
xˆ (k ) a1 x(k 1) a2 x(k 2) a3 x(k 3)
The more previous samples included, the better the
approximation, the smaller the difference.
The relation d[k] = x[k]- x[k-1] is a special case where the
previous sample is taken as a prediction of the current value.
Higher order prediction
DPCM concept can be extended to incorporate
more than one past sample value into the
prediction circuitry.
The additional redundancy available from all
previous samples can be weighted and summed
to produce a better estimate of the next input
sample.
With a better estimate, the range of the
prediction error decreases to allow encoding with
fewer bits.
Third Order Prediction
k
xq [k ] d [k ]; (assuming zero initial condition)
i 0
The analog signal is approximated by a staircase function.
DM is simple to implement. Moreover, it does not require word
synchronization.
DM Illustration
DM Modulator and Demodulator
xˆq (t )
xˆq (t )
dq[k] LPF xˆ (t )
Accumulator (Integrator)
Noise in DM
Slope Overload
Slope overload occurs because
d x (t)
q f s
d t
To prevent Slope overload
d x (t)
q f s
d t m ax
SNR for DM
The quantization error lies in the range (-s, s)
Granular noise power = s2/3
The noise is uniformly distributed in the band 0 to fs.
However, there is still the low pass filter in the DM
receiver -if the cutoff frequency is set to the maximum
frequency B.
The LPF will only pass (s2/3)(B/fs) of noise power.
SNR = (3/s2)(fs/B)Ps
Adpative Delta Modulation (ADM)
DM suffers from granular noise effect and
slope overload effect.
A remedy is applied by varying the step size s.
A granular noise is detected by a sequence of
alternating pulses.
A slope overload is identified by a sequence of
pulses of the same polarity.