Upload
suzanna-parks
View
217
Download
0
Embed Size (px)
Citation preview
ECE 4371, 2009
Class 9
Zhu Han
Department of Electrical and Computer Engineering
Class 9
Sep. 22nd, 2009
QuantizationQuantization Scalar Quantizer Block Diagram
Mid-tread
Mid-rise
EquationsEquations
function. staircase a is which stic,characteriquantizer thecalled is
(3.22) )g( mapping The
size. step theis , levelstion reconstrucor tion representa theare
L..,.1,2, , where isoutput quantizer then the )( If
3.9 Figin shown as )(
amplitude discrete a into )( amplitude sample
theing transformof process The:onquantizati Amplitude
hreshold.decision t or the leveldecision theis Where
(3.21) ,...,2,1 , :
cellpartition Define
1
1
m
mm
tm
nT
nTm
m
Lkmmm
kk
s
s
k
kk
kννJ
J
kkk
k
Quantization NoiseQuantization Noise
Quantization Noise Level Quantization Noise Level
(3.28) 12
1
)(][
(3.26) otherwise
2
2 ,0
,1
)(
levels ofnumber total: ,
(3.25) 2
is size-step the
typemidrise theofquantizer uniforma Assuming
(3.24) )0][( ,
(3.23)
valuesample of variable
random by the denoted beerror onquantizati Let the
2
2
2
22
2
222
max max
max
dqqdqqfqQE
qqf
LmmmL
m
MEVMQ
mq
Q
Quantization SNRQuantization SNR
).(bandwidth increasing lly withexponentia increases (SNR)
(3.33) )23
(
)(
)( ofpower average thedenote Let
(3.32) 23
1
(3.31) 2
2
(3.30) log
sampleper bits ofnumber theis where
(3.29) 2
form,binary in expressed is sample quatized theWhen
o
22max
2o
22max
2
2
max
R
m
P
PSNR
tmP
m
m
LR
R
L
R
Q
RQ
R
R
, 6dB per bit
ExampleExample SNR for varying number of representation levels for sinusoidal
modulation 1.8+6 X dB, example 3.1
Number of representation level L
Number of Bits per Sample, R
SNR (dB)
32 5 31.8
64 6 37.8
128 7 43.8
256 8 49.8
Conditions for Optimality of Scalar Quantizers
Let m(t) be a message signal drawn from a stationary process M(t)
-A m A
m1= -A mL+1=A
mk mk+1 for k=1,2,…., L
The kth partition cell is defined as
Jk: mk< m mk+1 for k=1,2,…., L
d(m,vk): distortion measure for using vk to represent values inside Jk.
Condition for Optimal QuantizerCondition for Optimal Quantizer
kk
kk
M
M
L
km k
L
kkL
kk
mmd
mf
dmmfmdDk
by zedcharacteridecoder aandby zedcharacteri
encoderan : components twoof consistsquantizer
owever thesolution.H form closed havenot may
whichproblemnonlinear a ison optimizati The
(3.38) )( ),(
commonly used is distortion square-mean The
known. is which pdf, theis )( where
(3.37) )(),(
distortion average the
minimize that , and sets two theFind
,
2
1
11
J
J
J
Condition OneCondition One
)(2
1
0)()()()(
,)()(
distortion square-meanFor
,,1,2 ,)g(
mappingnonlinear by the definedencoder thefind toisThat
. D minimizes that set thefind , set Given the
decodergiven afor encoder theof Optimality . 1Condition
,,1opt ,
221
1k
2
11
(3.40)
optkoptkk
kMkkkMkkk
M
L
m k
k
L
kkL
kk
ffD
dmmfmD
Lkm
k
J
JJJJJ
J
J
Condition TwoCondition Two
minimum a reaches D untiliteration, Using
)(
)(
0)()(2
)()(
distortion square-meanFor
. minimized that set thefind ,set Given the
encodergiven afor decoder theofy .Optimalit 2Condition
(3.47)1
opt ,
1k
2
1k
2
11
kk
m M
Mmk
M
L
m kk
M
L
m k
L
kkL
kk
mmmME
dmmf
dmmfm
dmmfmD
dmmfmD
D
k
k
k
k
J
J
J
J
J
Vector QuantizationVector Quantization
Vector QuantizationVector Quantization
image and voice compression, voice recognition
statistical pattern recognitionvolume rendering
Rate Distortion CurveRate Distortion Curve Rate: How many codewords
(bits) are used?– Example: 16-bit audio vs. 8-
bit PCM speech
Distortion: How much distortion is introduced?– Example: mean absolute
difference(L1), mean square error (L2)
Vector Quantizer often performs better than Scalar Quantizer with the cost of complexity
Rate (bps)
Distortion
SQ
VQ
Non-uniform QuantizationNon-uniform Quantization
Motivation– Speech signals have the
characteristic that small-amplitude samples occur more frequently than large-amplitude ones
– Human auditory system exhibits a logarithmic sensitivity
More sensitive at small-amplitude range (e.g., 0 might sound different from 0.1)
Less sensitive at large-amplitude range (e.g., 0.7 might not sound different much from 0.8)
histogram of typical speech signals
Non-uniform QuantizerNon-uniform Quantizer
x Q xF F-1
Example F: y=log(x) F-1: x=exp(x)
y y
F: nonlinear compressing functionF-1: nonlinear expanding function
F and F-1: nonlinear compander
We will study nonuniform quantization by PCM example next
A law and law
Law/A LawLaw/A Law
The -law algorithm (μ-law) is a companding algorithm, primarily used in the digital telecommunication systems of North America and Japan. Its purpose is to reduce the dynamic range of an audio signal. In the analog domain, this can increase the signal to noise ratio achieved during transmission, and in the digital domain, it can reduce the quantization error (hence increasing signal to quantization noise ratio).
A-law algorithm used in the rest of worlds.
A-law algorithm provides a slightly larger dynamic range than the mu-law at the cost of worse proportional distortion for small signals. By convention, A-law is used for an international connection if at least one country uses it.
LawLaw
A LawA Law
Law/A LawLaw/A Law
Analog to Digital ConverterAnalog to Digital Converter Main characteristics
– Resolution and Dynamic range : how many bits
– Conversion time and Bandwidth: sampling rate
Linearity– Integral
– Differential
Different types– Successive approximation
– Slope integration
– Flash ADC
– Sigma Delta
Successive approximationSuccessive approximation Compare the signal with an n-bit DAC
output
Change the code until – DAC output = ADC input
An n-bit conversion requires n steps
Requires a Start and an End signals
Typical conversion time– 1 to 50 s
Typical resolution– 8 to 12 bits
Cost– 15 to 600 CHF
Single slope integrationSingle slope integration Start to charge a capacitor at constant current
Count clock ticks during this time
Stop when the capacitor voltage reaches the input
Cannot reach high resolution– capacitor
– comparator
-
+IN
C
R
S Enable
N-bit Output
Q
Oscillator Clk
Co
un
ter
StartConversion
StartConversion
02468
101214161820
0 2 4 6 8 10 12 14 16
Time
Vo
lta
ge
acc
ross
th
e c
ap
aci
tor
Vin
Counting time
Flash ADCFlash ADC Direct measurement with 2n-1
comparators
Typical performance:– 4 to 10-12 bits
– 15 to 300 MHz
– High power Half-Flash ADC
– 2-step technique 1st flash conversion with 1/2 the
precision Subtracted with a DAC New flash conversion
Waveform digitizing applications
Sigma-Delta ADCSigma-Delta ADC
Over-sampling ADCOver-sampling ADC
Hence it is possible to increase the resolution by increasing the sampling frequency and filtering
Reason is the noise level reduce by over sampling.
Example :– an 8-bit ADC becomes a 9-bit ADC with an over-sampling factor of
4
– But the 8-bit ADC must meet the linearity requirement of a 9-bit
bitsofnumbereffectivethebeingnnSNR
dBf
fn
ffA
Ax
SNR s
sn
'68.1
log1068.1
212
8log10log1000
2
2
2
2
2
Resolution/Throughput RateResolution/Throughput Rate
<10kHz 10 – 100 kHz 0.1 – 1 MHz 1 – 10 MHz 10 – 100 MHz > 100 MHz
>17 bits
14 – 16 bits
12 – 13 bits
10 – 11 bits
8 – 9 bits
<8 bits
Digital to Analog conversion DACDigital to Analog conversion DAC
DAC
Input code = n0110001010001001001000101011:::
Output voltage = Vout(n) V+ref
V-ref
Digital to Analog ConverterDigital to Analog Converter Pulse Width Modulator DAC
Delta-Sigma DAC
Binary Weighted DAC
R-2R Ladder DAC
Thermometer coded DAC
Segmented DAC
Hybrid DAC
Pulse Code Modulation (PCM)Pulse Code Modulation (PCM)
Pulse code modulation (PCM) is produced by analog-to-digital conversion process. Quantized PAM
As in the case of other pulse modulation techniques, the rate at which samples are taken and encoded must conform to the Nyquist sampling rate.
The sampling rate must be greater than, twice the highest frequency in the analog signal,
fs > 2fA(max) Telegraph time-division multiplex (TDM) was conveyed as early as 1853, by
the American inventor M.B. Farmer. The electrical engineer W.M. Miner, in 1903.
PCM was invented by the British engineer Alec Reeves in 1937 in France.
It was not until about the middle of 1943 that the Bell Labs people became aware of the use of PCM binary coding as already proposed by Alec Reeves.
Figure Figure The basic elements of a PCM system.The basic elements of a PCM system.
Pulse Code Modulation
Encoding
Advantages of PCM
1. Robustness to noise and interference
2. Efficient regeneration
3. Efficient SNR and bandwidth trade-off
4. Uniform format
5. Ease add and drop
6. Secure
DS0: a basic digital signaling rate of 64 kbit/s. To carry a typical phone call, the audio sound is digitized at an 8 kHz sample rate using 8-bit pulse-code modulation. 4K baseband, 8*6+1.8 dB
Virtues, Limitations and Modifications of PCM
0000
1111
1110
1101
1100
1011
1010
1001
0001
0010
0011
0100
0101
0110
0111
0000 0110 0111 0011 1100 1001 1011
Numbers passed from ADC to computer to represent analogue voltage
Resolution=1 part in 2n
PCMPCM