sq uniform (ppt) best
Post on 04-Apr-2018
231 Views
Preview:
TRANSCRIPT
-
7/30/2019 SQ Uniform (PPT) Best
1/19
1
Ch. 9 Scalar Quantization
Uniform Quantizers
-
7/30/2019 SQ Uniform (PPT) Best
2/19
2
Characteristics of Uniform Quantizers
Constraining to UQ makes the design easier but performance usually suffersFor a uniform quantizer the following two constraints are imposed:
DBs are equally spaced (Step Size = ) RLs are equally spaced & centered between the DBs
x
0 2 3230.5 1.5 2.5 3.50.51.52.53.5
Mid-Riser SQ Mid-Step SQ
This Fig in the
book has an error
For a given Rate
Only One Choice to
make in Design
1.0
2.0
3.0
1.0
2.0
3.0
Output
-
7/30/2019 SQ Uniform (PPT) Best
3/19
3
PDF-Optimized Uniform Quantizers
The idea here is: Assuming that you know the PDF of thesamples to be quantized design the quantizers step so that it is
optimal for that PDF.
For Uniform PDF
-Xmax Xmax
fX(x)
1/(2Xmax)
Want to uniformly quantize an RVX~ U(-Xmax,Xmax)
Assume that desireMRLs forR = log2(M)
Mequally-sized intervals having = 2Xmax/M
-
7/30/2019 SQ Uniform (PPT) Best
4/19
4
Distortion is: [ ]max
max
22 ( ) ( )
X
q X
X
x Q x f x dx
=
( )/2
212
1 max( 1)
12 ( )
2
iM
i i
x i dx
X
=
=
DLs
RLs
Now b y exploiting the structure
-Xmax Xmax
fX(x)
1/(2Xmax)
x 22
Each of these
integrals is
identical!
/2
2 2
max/2
12
2 2
q
Mq dq
X
=
/2
2
/2
1q dq
=
Using =2Xmax/M
-
7/30/2019 SQ Uniform (PPT) Best
5/19
5
So the result is:
/22 2
/2
1q
q dq
=
22
12q
=
To get SQR, we need the variance (power) of the signal
Since the signal is uniformly dist. we know from Prob.
Theory that ( )2 2 2
max22
12 12
X
X M
= =
22
10 102
10
( ) 10log 10log
20log 2
6.02
X
q
n
SQR dB M
n dB
= =
=
=
For n-bit
Quantizer:
M = 2n
6 dB per bit
-
7/30/2019 SQ Uniform (PPT) Best
6/19
6
Rate Distortion Curve for UQ of Uniform RV
2 222 2max max
2
42
12 12 3
n
q
X X
M
= = =
n
2
x
2
q
Exponential
2
2 2max 23
nq X =
Rate
Rate (bits/sample)
Distortion
Distortion
-
7/30/2019 SQ Uniform (PPT) Best
7/19
7
M= 8
4-4
( )X
f x
PDF-Optimized Uniform Quantizers
For Non-Uniform PDF We are mostly interested in Non-Uniform PDFs whose domain is not bounded.
For this case, the PDF must decay asymptotically to zero
So we cant cover the whole infinite domain with a finite number of-intervals!
We have to choose a &M
to achieve a desired MSQE Need to balance to types of errors:
Granular (or Bounded) Error
Overload (or Unbounded) Error
A fixed version
of Fig. 9.10Typically,M& are
such that OL Prob. is lessthan the Granular Prob.
Not a DB the
left-most DB is -
Not a DB the
Rt-most DB is
-
7/30/2019 SQ Uniform (PPT) Best
8/19
-
7/30/2019 SQ Uniform (PPT) Best
9/19
9
Now to minimize take derivative & set to zero:2
0q
d
d
=
Gets complicated & messy to do analytically solve numerically!
1 2
1 2
1 2
min{ ( ) ( )}
( ) ( )0
( ) ( )
f x f x
df x df x
dx dx
df x df x
dx dx
+
+ =
=
2
q
Slopes are
negatives
This balances the granular & overload effects to minimize distortion
Overload but Granular
Distributions that have heavier tails tend to have larger step sizes
How practical are these quantizers? Useful when source really does adhere to designed-for-pdf
Otherwise have degradation due to mismatch
Right PDF, Wrong Variance
Wrong PDF Type
-
7/30/2019 SQ Uniform (PPT) Best
10/19
10
# of
Bits1
2
3
45
-
7/30/2019 SQ Uniform (PPT) Best
11/19
11
xB,0 xB,1 xB,N-1
Adaptive Uniform QuantizersWe use adaptation to make UQ robust to Variance Mismatch
Forward-Adaptive Quantization
Collect a Block ofNSamples
Estimate Signal Variance in theBth Block
Normalize the Samples in theBth
Block
Quantize Normalized Samples
Always Use Same Quantizer: Designed for Unit Variance
Quantize Estimated Variance
Send as Side Info
12 2
,
0
1 ( )
N
x B i
i
B xN
=
= Error in Book
2
, , / ( )B i B i xx x B=
Design Issues
Block Size
Short captures changes, SI Long misses changes, SI
# of bits for SI 8 bits is typical
-
7/30/2019 SQ Uniform (PPT) Best
12/19
12
Quantization of 16-bit Speech
16-Bit Original
vs.
3-bit Fixed Quantizer
16-Bit Original
vs.
3-bit Forward-Adapt Quant.
Another Application
Synthetic Aperture Radar (SAR)
often uses Block Adaptive
Quantizer (BAQ)
-
7/30/2019 SQ Uniform (PPT) Best
13/19
13
Alternative Method for Forward-Adaptive Quant.
Block-Shifted Adaptive Quantization (BSAQ) Given digital samples w/ large # of bits (B bits)
In each block, shift all samples up by Sbits
Sis chosen so that the MSB of largest sample in block is filled
Truncate shifted samples to b
-
7/30/2019 SQ Uniform (PPT) Best
14/19
14
Backward-Adaptive Quantization
There are some downsides to Forward AQ: Have to send Side Information reduces the compression ratio
Block-Size Trade-Offs Short captures changes, SI Coding Delay cant quantize any samples in block until see whole block
Backward-Adaptation Addresses These Drawbacks as Follows:
Monitor which quantization cells the past samples fall in
Increase Step Size if outer cells are too common
Decrease Step Size if inner cells are too common
Because it is based on past quantizedvalues,
no side info needed for the decoder to synchronize to the encoder At least when no transmission errors occur
no delay because current sample is quantized based on past samples
So in principle block size can be set based on rate of signals change
How many past samples to use? How are the decisions made?
Jayant provided simple answers!!
-
7/30/2019 SQ Uniform (PPT) Best
15/19
15
Jayant Quantizer (Backward-Adaptive)
Use single most recent output
If it
is in outer levels, increase or is in inner levels, decrease
Assign each interval a multiplier:Mkfor the kth interval
Update according to:
Multipliers for outer levels are > 1 (Multipliers are symmetric)
inner < 1 Specify min & max to avoid going too far
( 1) 1n l n nM = New Old last samples
level index
-
7/30/2019 SQ Uniform (PPT) Best
16/19
16
x
x
Example of Jayant Multipliers
-
7/30/2019 SQ Uniform (PPT) Best
17/19
17
How Do We Pick the Jayant Multipliers?
IF we knew the PDF & designed for the correct Then we want the multipliers to have no effect after, say,Nsamples:
3 6 4 1 4 5 1M M M M M M "Sequence of multipliersfor some observedN
samples
Let nk= #of timesMk is used Then () becomes
()
0
1kM
n
k
k
M=
=# ofLevels
Use = for
design
Now taking theNth root gives
0
1knM
Nk
k
M=
=where we have used the frequency of occurrence view: Pk nk/N
0
1kM
Pk
k
M=
=
For a given designed-for PDF it is possible to find the correct andthen find the resulting Pkprobabilities Then this
Is a requirement on the multipliers Mk
values
But there are infinitely many solutions!!!!
-
7/30/2019 SQ Uniform (PPT) Best
18/19
18
One way to further restrict to get a unique solution is to require a specific
form on theMk:
klkM =
0
1k kM
l P
k
=
= 0 1M
k k
k
l P
=
=
Integers (+/-)
Real # >1
0
0M
k k
k
l P
=
=
So if weve got an idea of the Pk () values for the lk
()
Large gives fast adaptationSmall gives slow adaptationThen use creativity to select :
In general we want faster expansion than contraction:
Samples in outer levels indicate possible overload (potential bigoverload error) so we need to expand fast to eliminate this potential
Samples in inner levels indicate possible underload (granular error is
likely too big but granular is not as dire as overload) so we only
need to contract slowly
-
7/30/2019 SQ Uniform (PPT) Best
19/19
19
Robustness of Jayant Quantizer
Optimal Non-Adapt is slightly
better when perfectly matched
Jayan is significantly betterwhen mismatched
Combining Figs. 9.11 & 9.18
top related