You are on page 1of 4

ELEC1010 Homework 3 [20] Deadline: 10pm on 26 Oct (Fri)

Please submit ONE soft copy (pdf only) of your assignment to Canvas (Assignments)
before the deadline. NO LATE Submission! (Zero mark!)

1. [6] The time domain representation of a signal is shown below:

2
amplitude

-2

-4

-6

-8

0 20 40 60 80 100 120 140 160 180 200


time(ms)

(a) What is the fundamental frequency of the signal?


(b) This signal composes of its fundamental frequency, 2nd, 5th and 8th harmonics.
What is the highest frequency of this signal?
(c) If we use 300 samples per second as the sampling rate, can we recover the original
signal without any error? If yes, why? If no, suggest a sampling rate that can
recover the original signal exactly.
(d) Suppose we sample the signal at 1.5 times the Nyquist sampling rate, and we need
3 bytes to represent every sample. How many bits of data will 2 seconds of signal
produce?
Solution:
a) The fundamental frequency is: 20 Hz.
b) The highest frequency is: 160 Hz
c) No, we cannot recover the original signal without any error since the
minimum number of samples will be:
160𝐻𝑧 2 𝟑𝟐𝟎 𝑯𝒛 𝒐𝒓 𝟑𝟐𝟎 𝒔𝒂𝒎𝒑𝒍𝒆𝒔/𝒔𝒆𝒄𝒐𝒏𝒅

1 of 4
The suggested sampling rate should be greater than 320 Hz. (e.g. 330 Hz)

d)
𝑠𝑎𝑚𝑝𝑙𝑒𝑠
1.5 320 𝐻𝑧 480 𝐻𝑧 𝑜𝑟 480
𝑠𝑒𝑐𝑜𝑛𝑑
In 2 seconds, we have:

480 2 𝑠𝑒𝑐 3 8 𝑏𝑖𝑡𝑠/𝑠𝑎𝑚𝑝𝑙𝑒 𝟐𝟑,040 𝒃𝒊𝒕𝒔

2. [7] Using a 3-bit uniform quantization on the signal amplitude from -10 to 10 inclusively.

8
X: 14.2
Y: 8.582
6

X: 3.1
4
Y: 5.612

2 X: 26.9
amplitude

Y: 3.288
0
X: 46.2
Y: -2.518
X:-2
15.9
Y: -1.059
-4

-6 X: 85.6
Y: -7.959
-8

0 20 40 60 80 100 120 140 160 180 200


time(ms)
a) construct the “digital-to-analog” conversion map. Fill in the table below:
b) Map the 6 samples as shown with the map from part a), what is the output binary
sequence of the 6 samples?
c) What is the quantization error for each sample after quantization?

Solution: a) digital-to-analog conversion map


Analog Values Level Binary bits Reproduced analog values
7.5 to 10 7 111 8.75
5 to 7.5 6 110 6.25
2.5 to 5 5 101 3.75
0 to 2.5 4 100 1.25
-2.5 to 0 3 011 -1.25
2 of 4
-5 to -2.5 2 010 -3.75
-7.5 to -5 1 001 -6.25
-10 to -7.5 0 000 -8.75

b) and c)
Samples values Binary sequence Quantization Error
5.612 110 |6.25 5.612| 0.638
8.582 111 |8.582 8.75| 0.168
-1.059 011 | 1.059 1.25| 0.191
3.288 101 |3.288 3.75| 0.462
-2.518 010 | 2.518 3.75| 1.232
-7.959 000 | 7.959 8.75| 0.791

3. [3] Assume we have a course with 290 students and to each student we assign a grade
between A to F. The number of students obtaining each grade is shown in the figure
below:

180
158
160
140
Number of student

120
100
80
80
60 48
40
20
3 1
0
A B C D F
Grade

Find the minimum amount of bits required to record the grade of all the students.
Solution:
Find the average bit/student:
80 290 158 290 48 290 3 290 1
log log log log log 290
290 80 290 158 290 48 290 3 290
= 1.5156 bits/student
For all the students (290):
290 1.516 439.6 𝑏𝑖𝑡𝑠

𝑊𝑒 𝑟𝑒𝑞𝑢𝑖𝑟𝑒 𝟒𝟒𝟎 𝒃𝒊𝒕𝒔 𝑡𝑜 𝑟𝑒𝑐𝑜𝑟𝑑 𝑡ℎ𝑒 𝑔𝑟𝑎𝑑𝑒 𝑜𝑓 𝑎𝑙𝑙 𝑡ℎ𝑒 𝑠𝑡𝑢𝑑𝑒𝑛𝑡𝑠.


3 of 4
4. [4] Suppose a source can generate five symbol a, e, x, t, p with probability 0.5, 0.2, 0.05,
0.1, 0.15.

a) What is the entropy of the source?


b) If the source generates two of these symbol every second, find the information rate of
the source.
c) If these symbol will be transmitted over a channel with the SNR of 3 dB. What is the
minimum bandwidth required for reliable communication?
Solution:

a) 0.5 log 0.2 log 0.05 log 0.1 log 0.15 log
. . . . .

1.9232 𝑏𝑖𝑡/𝑠𝑦𝑚𝑏𝑜𝑙

b) 1.9232 2 3.8464 𝑏𝑖𝑡/𝑠

c) 𝐶 𝐵𝑊 log 1 𝑆𝑁𝑅 where C is 3.8464 bit/s, SNR is 3 dB

/
then 𝑆𝑁𝑅 10 1.9953 ~ 2

.
3.8464 b/s BW log 1 2 𝐵𝑊 1.5850 ; 𝐵𝑊 2.4268 𝐻𝑧
.

4 of 4

You might also like