komodo66
Newbie level 2
Hi everyone,
I am a newbie and i need this information,
As far as I understand quantization, the sampled voltage values of an analogue signal can be either truncated to next lower quantization level or rounded to closest quantization level.
But only examples that i can found on internet looks like truncation, here is an example:
Example 1
An analogue signal of between 0 volts to 10 volts to be represented by a 3-bit binary word. A 3-bit code
has 2^3 or 8 combinations. We need to divide the analogue signal into 8 subranges. Each sub-range will
represent a voltage range of 10/8 volts. This gives 1.25 volts per sub-range, the first sub-range starting at
0 volts.
D = 2^n x (Vin/Vref) = 2^3 x (Vin/10)
Range Voltage Range Binary Code
0 0.0 –> 1.25 000
1 1.25 –> 2.5 001
2 2.5 –> 3.75 010
3 3.75 –> 5.0 011
4 5.0 –> 6.25 100
5 6.25 –> 7.5 101
6 7.5 –> 8.75 110
7 8.75 –> 10.0 111
What i understand from above is that if Vinput is 1.24 the output will be 000 which is truncation.
So my question is, how do we round sample values?
I am a newbie and i need this information,
As far as I understand quantization, the sampled voltage values of an analogue signal can be either truncated to next lower quantization level or rounded to closest quantization level.
But only examples that i can found on internet looks like truncation, here is an example:
Example 1
An analogue signal of between 0 volts to 10 volts to be represented by a 3-bit binary word. A 3-bit code
has 2^3 or 8 combinations. We need to divide the analogue signal into 8 subranges. Each sub-range will
represent a voltage range of 10/8 volts. This gives 1.25 volts per sub-range, the first sub-range starting at
0 volts.
D = 2^n x (Vin/Vref) = 2^3 x (Vin/10)
Range Voltage Range Binary Code
0 0.0 –> 1.25 000
1 1.25 –> 2.5 001
2 2.5 –> 3.75 010
3 3.75 –> 5.0 011
4 5.0 –> 6.25 100
5 6.25 –> 7.5 101
6 7.5 –> 8.75 110
7 8.75 –> 10.0 111
What i understand from above is that if Vinput is 1.24 the output will be 000 which is truncation.
So my question is, how do we round sample values?