0% found this document useful (0 votes)
9 views6 pages

CST304 Assignment Informal

Uploaded by

zhiluke01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views6 pages

CST304 Assignment Informal

Uploaded by

zhiluke01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

OFFICE OF ACADEMIC AFFAIRS

Reference No. : XMUM.OAA - 100/2/8-V2.0


Effective Date : 23 APRIL 2018

DESCRIPTION OF COURSEWORK

Course Code CST304


Course Name Digital Signal Processing
Lecturer Lee Sui Ping
Academic Session 2024-04
Assessment Title Discrete Signals and Systems

A. Introduction/ Situation/ Background Information


This assignment mainly covers a few important topics in Digital Signal Processing, such as
convolution operations in linear time-invariant systems, discrete-time Fourier transform, discrete
Fourier transform, and digital filters. The aim is to ensure students understand the basic concept
of signal processing systems and are able to translate the theoretical knowledge to its applications.

B. Course Learning Outcomes (CLO) covered


At the end of this assessment, students are able to:
CLO 3 Synthesize discrete-time systems to fulfil different requirements and priorities using a
software tool.
CLO 4 Construct digital filters using software simulation according to filter specifications.

C. University Policy on Academic Misconduct


1. Academic misconduct is a serious offense in Xiamen University Malaysia. It can be defined
as any of the following:
i. Plagiarism is submitting or presenting someone else’s work, words, ideas, data or
information as your own intentionally or unintentionally. This includes incorporating
published and unpublished material, whether in manuscript, printed or electronic form
into your work without acknowledging the source (the person and the work).
ii. Collusion is two or more people collaborating on a piece of work (in part or whole)
which is intended to be wholly individual and passed it off as own individual work.

XMUM.OAA - 100/2/8-V2.0 Page | 1


iii. Cheating is an act of dishonesty or fraud in order to gain an unfair advantage in an
assessment. This includes using or attempting to use, or assisting another to use
materials that are prohibited or inappropriate, commissioning work from a third party,
falsifying data, or breaching any examination rules.
2. All the assessment submitted must be the outcome of the student. Any form of academic
misconduct is a serious offense which will be penalised by being given a zero mark for the
entire assessment in question or part of the assessment in question. If there is more than one
guilty party as in the case of collusion, both you and your collusion partner(s) will be
subjected to the same penalty.

D. Instruction to Students
1. Complete this task as a group or as an individual. If you are working in a group, you must
form a GROUP of no more than two (2) students to complete the task. Select your own
partner.
2. The assignment report should be typewritten. Include the assignment cover page with ‘own
work declaration’ statements.
3. Finish all tasks and paste your code into the assignment report.
4. The report shall not exceed 15 pages.
5. You are required to submit the completed assignment to MOODLE site. There will be two
files of submission in MOODLE;
i. Assignment report and
ii. Source Codes in m-file (.m) format.
6. The due date for this assignment is on 13 July 2024, 5:00 pm.
7. The report must be well-formatted. Line spacing of 1.5, Times New Roman with a font size
of 12, page margin of 1 inch at all ends, contents not more than 15 pages (not including cover
page and list of references), come with introduction and conclusion, basic referencing with
a list of references. A mark deduction of 5% will be imposed for poorly-formatted report.

XMUM.OAA - 100/2/8-V2.0 Page | 2


E. Evaluation Breakdown
Percentage
No. Component Title
(%)
1. Task 1: Discrete-time System 30
Task 2: Discrete-time Fourier Transform (DTFT) and Discrete Fourier Transform 30
2.
(DFT)
3. Task 3: Digital filter 40
TOTAL 100

F. Tasks

Task 1: Discrete-time System PLO6-C3

A digital signal can be either discrete-time or continuous-time. Although not all digital signals are
discrete-time, they all have a discrete value at each sampling point. These signals are commonly
used to represent data as a sequence of discrete values. As illustrated in Figure 1, when the sample
values of a discrete signal are quantized, it becomes a digital signal.

Figure 1

You are requiring to construct various form of discrete signal using Matlab/ Octave as following:

(i) Produce a sample rate of 100 Hz in a variable named fs. Then, create a signal named t that
extends from 0 seconds to 1 second, with time steps that are 1/fs.
[Matlab Code solution- 5 marks]
(ii) Construct a 5 Hz sine signal named sig at the sample times in t. Then, diagram a plot
of sig versus t.
[Matlab Code solution- 5 marks]

(iii) Construct a vector of normally distributed random numbers named noise that is the same size
as sig. Multiply the vector by 0.1 to scale the vector.
[Matlab Code solution- 5 marks]
(iv) Add the signal vector with the noise vector. Name the output NoisySig. Then diagram a plot
of NoisySig versus t.
[Matlab Code solution- 5 marks]
(v) Revise and diagram your signal sig and NoisySig into discrete signal.
[Matlab plots of sig and NoisySig - 10 marks]

XMUM.OAA - 100/2/8-V2.0 Page | 3


Task 2: PLO3-C4
Discrete-time Fourier Transform (DTFT) and Discrete Fourier Transform (DFT)

Given a finite duration discrete-time sequence 𝑥(𝑛) = {2, −1, 0, 1} with 𝑛 = [ 0, 1, 2, 3].

(i) The DTFT can be obtained analytically as

Use MATLAB/OCTAVE code to calculate the DTFT based on the equation above with the
frequency range, Omega = linspace(-pi, pi,500+1). [8 marks]

(ii) The DFT can be obtained analytically as

Use MATLAB/OCTAVE code to compute the DFT based on the equation above. [8 marks]

(iii) Determine the DFT of sequence 𝑥(𝑛) = {2, − 1, 0, 1} for 0 ≤ 𝑛 ≤ 3 by padding 60 zero-
valued samples at the end of the sequence. [7 marks]

Evaluate and discuss your observation on spectrum plots based on above computations.

[7 marks]

XMUM.OAA - 100/2/8-V2.0 Page | 4


Task 3: Digital filter PLO6-C3

One of the digital signal processing applications is a digital filter. A digital bandpass filter (BPF)
is a device that passes frequencies within a certain range and rejects frequencies outside that range.
The difference equation of a system that performs the bandpass filter is given as follows,

𝑦(𝑛) = 0.0202x(n) − 0.0403 x(n − 2) + 0.0202x(n − 4) + 2.1193y(n − 1) − 2.6953 y(n − 2)


+ 1.6925y(n − 3) − 0.6415y(n − 4)

The filter has a lower-cutoff frequency, 𝑓𝑙𝑐 at 1𝑘𝐻𝑧, an upper-cutoff frequency, 𝑓𝑢𝑐 at 1.5𝑘𝐻𝑧 and
a sampling rate, 8𝑘𝐻𝑧.

i. Analytically, determine the transfer function, 𝐻(𝑧) of the filter. [10 marks]
ii. Compute the filter frequency response and plot the spectrums. [10 marks]
iii. Let the input of the filter discrete-time signal, 𝑥(𝑛) is an audio recording ‘audio.mat’,
a) Compute the output of the system, 𝑦(𝑛) i.e., the filtered signal. [10 marks]
b) Compute the spectral plot of the filtered signals. [10 marks]

Complete the computations using MATLAB/OCTAVE and discuss your observations.


Note: To load the input data, 𝑥(𝑛), used - load 'audio.mat'.

Sample code to generate random audio.mat


% Generate a random audio signal
duration = 5; % Duration of the audio signal in seconds
fs = 44100; % Sampling rate (in Hz)
t = 0:1/fs: duration-1/fs; % Time vector
audio_data = rand(size(t)) * 2 - 1; % Random audio signal between -1 and 1

% Save the audio signal to a .mat file


save('random_audio.mat', 'audio_data', 'fs');

XMUM.OAA - 100/2/8-V2.0 Page | 5


APPENDIX 1
MARKING RUBRICS

Component Title Assignment Percentage (%) 100

Score and Descriptors


Criteria Excellent Good Average Need Improvement Poor Weight (%) Marks
(5) (4) (3) (2) (1)
Excellent coding work with
clear steps and comments. Good codes work, Clear Adequate codes
Assignment report nicely steps, Assignment work, clear steps, Inappropriate
prepared, arranged and easy report nicely prepared, report the result codes work,
Errors in codes
Task 1 to understand. clear observation. with some unclear steps, 30
work.
Clear observation and Somewhat able to relate explanation—lack report the results
discussions. the theories and of theoretical and discussion.
Able to relate the theories outcomes. relations.
and outcomes.
Excellent coding work with
clear steps and comments. Good codes work, Clear Adequate codes
Assignment report nicely steps, Assignment work, clear steps, Inappropriate
prepared, arranged and easy report nicely prepared, report the result codes work,
Errors in codes
Task 2 to understand. clear observation. with some unclear steps, 30
work.
Clear observation and Somewhat able to relate explanation—lack report the results
discussions. the theories and of theoretical and discussion.
Able to relate the theories outcomes. relations.
and outcomes.
Excellent analytical solution
Well written coding
and coding with clear steps
work and analytical
and comments. Present the Adequate Inadequate
solutions. Present the
computation outcome in analytical solution analytical solution
computation outcome in The codings do
various plots for and codings. and messy coding.
Task 3 plots for comparisons. not work, and 40
comparisons. Some plots and Unsatisfactory
A satisfactory report is messy report.
The report is prepared lack of discussion reports, figures,
prepared with
according to the task and observation. and discussion.
observation and
sequence and well
explained and discussed. discussions.

TOTAL 100
Note to students: Please print out and attach this appendix together with the submission of coursework

You might also like