SME
Signals & Systems · Problem type
Quantization: levels, step and SQNR
Use this for “An 8-bit quantizer covers 2 V. Find the number of levels, the step size and the SQNR.”
Chart
8
bits:
256
codes,
0
to
255;
1
LSB
=
2
V
256
=
7.813
mV
1.3
V
7.813
mV
=
166.4,
rounded
down:
D
=
166;
back,
D
×
LSB
=
1.297
V
Zoomed to codes 159 to 174 of 0 to 255
This is an example. Type your own values to start a new problem.
L
=
2
Δ (mV)
=
VFS (V)
÷
L
SQNR (dB)
=
6.02
×
b
+
1.76
Vᵢₙ
Sample voltage
example
D
Level of the sample
worked out (not typed)
Formulas
L
=
2
b
256
=
2
8
Δ
=
VFS
L
0.007813
=
2
256
D
=
⌊
Vᵢₙ
Δ
⌋
166
=
⌊
1.3
0.007813
⌋
SQNR
=
6.02
×
b
+
1.76
49.92 = 6.02 × 8 + 1.76
Formulas are worked in V. The step-by-step shows the conversions.
Assumptions
•
A uniform quantizer: b bits give 2ᵇ levels, each Δ = range ÷ 2ᵇ wide.
•
A sample is truncated to the level below it, counting from 0 at the bottom of the range.
•
SQNR ≈ 6.02b + 1.76 dB holds for a sine wave filling the whole range: each bit adds about 6 dB.
Step-by-step
WE KNOW
b = 8, VFS = 2 V, Vᵢₙ = 1.3 V
FIND
levels (L), step size (Δ), level of the sample (D), signal-to-quantization-noise ratio (SQNR)
Step 1 · Find levels (L)
Use L = 2ᵇ
Each bit doubles the number of levels.
L
=
2
8
L
=
256
Step 2 · Find step size (Δ)
Use Δ = VFS ÷ L
The range is shared equally among the levels.
Δ
=
2
256
Δ
=
0.007813
V
Step 3 · Find level of the sample (D)
Use D = ⌊Vᵢₙ ÷ Δ⌋
Count the whole steps below the sample: that is the level it is truncated to.
D
=
⌊
1.3
0.007813
⌋
D
=
166
Step 4 · Find signal-to-quantization-noise ratio (SQNR)
Use SQNR = 6.02 × b + 1.76
About 6 dB per bit, plus 1.76 dB for a full-scale sine.
SQNR = 6.02 × 8 + 1.76
SQNR = 48.16 + 1.76
SQNR = 49.92 dB
Step 5 · Convert the answers
Change each answer back to the unit you chose.
Δ = 0.007813 V = 7.8125 mV (1 V = 1000 mV)
Check
Put the numbers back in. Both sides should match.
256
=
2
8
✓
0.007813
=
2
256
✓
166
=
⌊
1.3
0.007813
⌋
✓
49.92 = 6.02 × 8 + 1.76 ✓
Topic check
See what you know: 5 questions on this topic
New questions each time. Pass to mark it complete.
Related lessons
Sampling
Main lesson
Data rate and file size of sampled audio
Use this for “CD audio is sampled at 44.1 kHz with 16 bits in 2 channels. Find the bit rate and the size of one minute.”
DFT bin spacing
Use this for “A 256-point DFT is taken of samples at 1 kHz. How far apart are the bins, and where does 100 Hz fall?”