Professional Documents
Culture Documents
Assignment 1: Spring 2020
Assignment 1: Spring 2020
Assignment 1: Spring 2020
Assignment 1
Cut-off date: 10 April 2020
Spring 2020
Solution
Not all steps given. For reference only.
The distribution of marks for this assignment is shown in the following table:
Question 1 2 3 4 5 Total
Percentage 20% 8% 10% 31% 31% 100%
Question 1 [ 20 marks ]
(a) A music recording is digitized. Describe the signal processing processes that are needed
for obtaining the digital signal from the analogue signal. [ 5 marks ]
Answer:
- Analogue signal passes through a filter (likely low-pass filter / band-pass filter)
- Discrete-time signal obtained by sampling at a fixed sampling frequency
- Digital signal obtained by applying quantization to the discrete-time signal
(b) Given the following analogue signal, x(t), find the discrete-time signal x[n], which is
obtained by sampling x(t) at a sampling rate of 20Hz for a duration of 0.5 second. Assume
that the first sample is taken at 0 second. Sketch the discrete-time signal with x-axis labelled
in time (sec). Also label the amplitudes of the discrete-time signal samples. [ 15 marks ]
𝜋
𝑥(𝑡) = cos(2𝑓! 𝜋𝑡) + sin /2𝑓" 𝜋𝑡 + 1 , 𝑤ℎ𝑒𝑟𝑒 𝑓! = 1𝐻𝑧 𝑎𝑛𝑑 𝑓" = 5𝐻𝑧
3
Answer:
A 45-minute audio recording is recorded in stereo (2 channels). Two settings are used:
- CD Quality: 44.1kHz sampling, 16-bit quantization
- Hi-Res Quality: 96kHz sampling, 24-bit quantization
(a) How much storage space (in MB) is needed for storing the recording in CD Quality (in
MB)? Show your work. [ 2 marks ]
Answer: 454.22 MB
(b) How much storage space (in MB) is needed for storing the recording in Hi-Res Quality (in
MB)? Show your work. [ 2 marks ]
Answer: 1483.15 MB
(c) If the recording system can handle the signal with bit-rate of 2000kbps, which standard
should be used for the best quality? Support your answer with calculations. [ 2 marks ]
Answer: CD Quality: 1411 kbps Hi-Res Quality: 4608 kbps
CD Quality will be used.
(d) Calculate the SNR for CD Quality and Hi-Res Quality. Show your work. [ 2 marks ]
Answer:
SNR of CD Quality = 98.08 dB
SNR of Hi-Res Quality = 146.24 dB
Question 3 [ 10 marks ]
𝑦[𝑛] = 2𝑥 [𝑛 − 2] − 3𝑥[𝑛 − 3]
, where x[n] is the input and y[n] is the output.
(a) Sketch a block diagram with signal processing operational symbols to describe this system.
Use the minimum number of unit delays. [ 2 marks ]
Answer:
Answer:
Suppose we have input signals x1[n] and x2[n]; corresponding outputs are y1[n] and y2[n].
Suppose we have an input signal x3[n], which is the sum of x1[n] and x2[n].
𝑥# [n] = 𝑎𝑥! [n] + 𝑏𝑥" [n], where a and b are constants
Suppose now we have input signals x1[n] and x4[n]. Input signal x4[n] is obtained by
delaying x1[n] by k sample units: 𝑥$ [n] = 𝑥! [n − k]
𝑥! [n] → 𝑦! [n] = 2𝑥! [𝑛 − 2] − 3𝑥! [𝑛 − 3]
𝑥$ [n] → 𝑦$ [n] = 2𝑥$ [𝑛 − 2] − 3𝑥$ [𝑛 − 3]
= 2𝑥! [n − 2 − k] − 3𝑥! [n − 3 − k]
= 𝑦! [n − k]
Because output y4[n] is equal to y1[n] delayed by k samples, the discrete system is time-
invariant. The system is a linear time-invariant (LTI) system.
Question 4 [ 31 marks ]
Answer:
y[0] = -2, y[1] = 4 , y[2] = -1, y[3] = -3, y[4] = -2
y[5] = 1(-3) = -3, y[6] = -1(-3) = 3
Answer: m |H[m]|
0 2
1 2.632
2 5.099
3 4.590
4 0
5 4.590
6 5.099
7 2.632
Question 5 [ 31 marks ]
This question requires you use Matlab (or Octave). You may search for information on the
corresponding functions in MATLAB Help. Show all Matlab codes, and include your student
number in the title of each plot you produce. Include proper labels and units in each plot.
Note: Matlab has been installed in OUHK PC Lab (4/F, Block A, Ho Man Tin campus) at
the following computers: EW7AA1 to EW7AA5, EW7BE1 to EW7BE5
The following continuous-time signal, x(t), is given below. Assume that f1=70Hz and f2=140Hz.
(a) Using Matlab (or Octave), find the signal’s frequency magnitude spectrum with following
criteria. Show your code. [ 16 marks ]
- Number of points: 16
- Sampling frequency: 380 Hz
- x-axis is in “frequency, (Hz)”
- Print your student ID on the title with the following format: “ELECS334 2020 – ID: XXXXXXX”
Answer:
(c) Using Matlab (or Octave), find the DCT values of x(t) by implementing the 1D-DCT
equation. Show your code. [ 7 marks ]