Assignment 1: Spring 2020

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

ELEC S334

Signal Processing and Multimedia Technology

Assignment 1
Cut-off date: 10 April 2020

Spring 2020

Solution
Not all steps given. For reference only.

Assignment 1 ELEC S334, Spr 2020 Pres. 1


ELEC S334 Assignment 1 (2020) Cut-off date: 10 April 2020

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:

Assignment 1 ELEC S334, Spr 2020 Pres. 2


Question 2 [ 8 marks ]

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 ]

A system is described by the input-output relationship:

𝑦[𝑛] = 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:

Assignment 1 ELEC S334, Spr 2020 Pres. 3


(b) Verify whether the system is linear and / or time-invariant. Show your work. [ 8 marks ]

Answer:

Suppose we have input signals x1[n] and x2[n]; corresponding outputs are y1[n] and y2[n].

𝑦! [𝑛] = 2𝑥! [𝑛 − 2] − 3𝑥! [𝑛 − 3]


𝑦" [𝑛] = 2𝑥" [𝑛 − 2] − 3𝑥" [𝑛 − 3]

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

With x3[n] as the input, the output becomes:


𝑦# [n] = 2𝑥# [n − 2] − 3𝑥# [n − 3]
= 2 ∙ E𝑎𝑥! [n − 2] + 𝑏𝑥" [n − 2]F − 3E𝑎𝑥! [n − 3] + 𝑏𝑥" [n − 3]F
= 𝑎[2𝑥! [𝑛 − 2] − 3𝑥! [𝑛 − 3]] + 𝑏[2𝑥" [𝑛 − 2] − 3𝑥" [𝑛 − 3]]
= 𝑎𝑦! [𝑛] + 𝑏𝑦" [𝑛]

System is linear. It satisfies the Homogeneity Property.

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 ]

Consider an LTI’s system’s impulse response, h[n], as follows:

ℎ[𝑛] = −𝑥[𝑛] + 2𝑥[𝑛 − 1] − 3𝑥[𝑛 − 3]


(a) Given the following input signal, x[n], calculate y[n], the output of the system. Show your
work. x[0] = 2, x[1] = 0, x[2] = 1, x[3] = -1 [ 10 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

Assignment 1 ELEC S334, Spr 2020 Pres. 4


(b) Perform 8-point DFT of h[n] with zero-padding. Show your work. Sketch the frequency
magnitude spectrum magnitude with proper labels. [ 21 marks ]

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.

𝑥(𝑡) = sin(2𝜋𝑓! 𝑡) − 2(𝑡 + 0.5) cos(2𝜋𝑓" 𝑡 + 𝜋/3)

(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:

Assignment 1 ELEC S334, Spr 2020 Pres. 5


(b) What is DFT leakage? Is there leakage in the DFT in Part (a)? Explain why or why not.
[ 8 marks ]
Answer:
- DFT leakage: energy of a signal’s frequency component(s) leaking into the surrounding
analysis frequencies in the process of DFT; occurs when the frequency components do
not exactly match analysis frequencies

- Yes, there is leakage


- Analysis frequencies at m*(fs/N) = = m*23.75Hz
- x(t) has frequency components at 70Hz and 140Hz, but they do not match any of the
analysis frequencies

(c) Using Matlab (or Octave), find the DCT values of x(t) by implementing the 1D-DCT
equation. Show your code. [ 7 marks ]

Assignment 1 ELEC S334, Spr 2020 Pres. 6

You might also like