Data Com Theory
Data Com Theory
11, 2017
1. If you want a quantization error of 1 degree or less and you are using linear quantization, how many binary bits would
you use to quantize?
Answer: Given:
Quantization error = 10
Temperature readings are taken between 0 and 31 degrees which means total number of levels are 32
We need to find the binary bits for quantization
2. How many bits would you use to quantize, if you wanted error to be less than 0.25 degree?
Answer:Given:
Quantization error = 0.250
Temperature readings are taken between 0 and 31 degrees which means total number of levels are 32
We need to find the binary bits for quantization
3. Refer to the graph. The y-axis is temperature and the x-axis is time (arbitrary units). Assuming that you are taking
evenly-spaced samples (i.e. say 30 samples on the x-axis evenly-spaced); can you suggest a system for quantization
where you can use the same number of bits as in Q1, but optimize the scheme in order to minimize relative quantization
error? On the graph, draw the individual quantization levels and show the error involved for each level. Show sample
calculations of relative error using your scheme. To consider: Where are the areas of greatest change in temperature?
Which areas would be less affected if the quantization levels are larger (i.e. spaced further apart)? Give me a rough table
showing what values correspond to which binary number. Use a ruler to measure out the quantization levels.
Answer:
Number of bits used in Q1 is 4 and thus step size = 2
In case of uniform Quantization, Quantization error = step size/2
= 2/2
Quantization error = 10
Thus, by using uniform quantization, Relative Error for High Temperature values is low but high for lower values of
Temperature. Non uniform Quantization is used to make Relative Error as constant.
As given in the Question, readings of temperature are taken between 0 and 31, it means 32 levels are considered.
Corresponding to each level, Quantization function is evaluated. Quantization function is chosen such that the quantization fit
to the data. In this case:
Quantization function is given as,
Q(n)=1.117n where n= Quantization levels
Page 2 of 6
EECE8100 Assignment 1: Due Jan. 25, upload to eConestoga Jan. 11, 2017
12 3.772576693
13 4.213968167
14 4.707002442
15 5.257721728
16 5.87287517
17 6.560001565
18 7.327521748
19 8.184841792
20 9.142468282
21 10.21213707
22 11.40695711
23 12.74157109
24 14.23233491
25 15.89751809
26 17.75752771
27 19.83515845
28 22.15587199
29 24.74810901
30 27.64363777
31 30.87794338
But here the total number of levels are 32, thus 5 bits are required for quantization. But in question 4 bits are to be used for
quantization. Therefore, we have to make 16 quantization levels, for this, from 0 to 2 we have chosen the middle level which
is 1; 1 will be the quantization level. Further, 3, 5 ,7upto 31 are chosen in the similar way.
Binary Temperature is
Quantization Step Size= Absolute Error= Relative Error= Absolute Error/
bits Quantization
Level, n Q(n+ 1)- Q(n) Step size/2 average[Q(n+1), Q(n)] * 100
function, Q(n)
0000 1 1.117 0 0 0
0001 3 1.393668613 0.276668613 0.138334307 11.01971848
0010 5 1.738864998 0.345196385 0.172598193 11.01971848
0011 7 2.169562731 0.430697733 0.215348866 11.01971848
0100 9 2.706939554 0.537376823 0.268688412 11.01971848
0101 11 3.377418705 0.670479151 0.335239576 11.01971848
0110 13 4.213968167 0.836549462 0.418274731 11.01971848
0111 15 5.257721728 1.043753561 0.521876781 11.01971848
1000 17 6.560001565 1.302279837 0.651139919 11.01971848
1001 19 8.184841792 1.624840228 0.812420114 11.01971848
1010 21 10.21213707 2.027295279 1.013647639 11.01971848
1011 23 12.74157109 2.529434019 1.264717009 11.01971848
1100 25 15.89751809 3.155947002 1.577973501 11.01971848
1101 27 19.83515845 3.937640359 1.968820179 11.01971848
1110 29 24.74810901 4.912950561 2.456475281 11.01971848
1111 31 30.87794338 6.129834373 3.064917186 11.01971848
Page 3 of 6
EECE8100 Assignment 1: Due Jan. 25, upload to eConestoga Jan. 11, 2017
From above table, it is clear that by choosing the base exponent value as 1.117 in Quantization function, step size varies, its
value is lower for low temperature readings and higher for high temperature readings. Absolute Error is also high for high
temperature and low for low temperature. Thus, Relative Error is constant.
If we compare these calculations to the uniform quantization calculations for temperature = 1.39 0 and 19.830, the relative
error calculated was 76.92% which now by non uniform Quantization reduced to 11.0197% whereas for Temperature= 19.83
the relative error is increased from 5.042% to 11.097%. In this scheme, either the temperature values are higher or lower,
relative error is constant and also minimum as compared to the uniform quantization technique due to implication of
Companding ( Compression and Expansion) method where Step size varies but not constant; lower for the lower temperature
values and higher for the high temperature values. The variation of absolute error also follows the same trend as step size.
Higher quantization levels are the areas where there is greatest change in temperature. For example, quantization level of 31
gives the highest Temperature 30.870. If the quantization levels are larger or spaced further, areas with the higher temperature
would be less affected as we know that Expansion technique is performed at the higher values.
The graph given below shows the Temperature readings in 0C corresponding to the Quantization levels, here from the graph,
it is clear that the levels are more compressed at the lower temperature values and expanded at the higher temperature values.
Page 4 of 6
EECE8100 Assignment 1: Due Jan. 25, upload to eConestoga Jan. 11, 2017
35
30
25
20
15
10
0
0 5 10 15 20 25 30 35
5. In Q4, I decide to use a sampling frequency of 37.5 kHz. Is this acceptable (explain)?
Answer: As we know that according to the sampling theorem
Sampling frequency > 2 x System Frequency
For system frequency = 25 kHz, Sampling frequency must be 50 kHz. But if we are using the sampling frequency of 37.5
kHz which is below the value of 50 kHz, the aliasing effect come into action which arises in the case of undersampling due to
which distortion in samples is occurred while during the reconstruction hence leading to the loss of the data or information.
Page 5 of 6
EECE8100 Assignment 1: Due Jan. 25, upload to eConestoga Jan. 11, 2017
35
30
25
20
15
10
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
Page 6 of 6