EC244_Assigment2
EC244_Assigment2
EC244_Assigment2
Marked Assignment 2
Digital Resampling
Instructions
This assignment forms the second part of the marked assessment process for Digital Signal Processing Lab course EC244. The
completed solution for this assignment must be submitted via the Google form link by the deadline above. All solution reports
should be in the form of a word document. In particular, submissions should be made up of two elements:
1. A report of no more than 3 pages (excluding appendix) describing your understanding of the problem and provide a
detailed description of your proposed solutions. All figures included should be fully and correctly labelled. If the assignment
asks for comments on issues then these should be made in this section. A copy of all MATLAB code should be included in
the appendix.
2. MATLAB code used in the exercise should be separately submitted as a single m-file entitled: audio_resample.m
NOTE: ALL SUBMISSIONS MUST BE THE STUDENTS OWN WORK. SUBMISSIONS ARE AUTOMATICALLY CHECKED
USING ANTI-PLAGARISM SOFTWARE. PLAGARISM AND COPYING WILL BE SUBJECT TO SEVERE PENALTY.
Digital resampling
Introduction
Digital signals and images are often provided with standard sampling rates (audio) or pixel sizes (images). For example, high quality
music is usually sampled at 22 kHz, 32 kHz or 44 kHz while for telephone quality speech it is sufficient to sample at 8 kHz. Low
resolution computer images are often digitized to VGA resolution (640 x 480) while digital camera images for an 8 Megapixel camera
are: 3264 x 2448.
Moving from one sampling rate to another in audio signals, or changing the resolution of an image is called digital resampling and a
very useful tool in DSP.
This lab will look at generating an audio resampling function that can resample signals from one sampling rate to another.
Note: while MATLAB has a set of specific routines for re-sampling, these may NOT be used for the purposes of this lab.
1. Up sampling: An up sampled version of the signal (with aliasing) can be generated by interleaving the original samples
with the appropriate number of 0s.
2. Anti-aliasing filter: to remove the aliasing it is necessary to low pass filter the up-sampled signal at the appropriate rate.
3. Down sampling: to reduce the sampling rate it is now only necessary to retain the appropriate samples.
1 EC244
use MATLAB’s filter design function call FIR1. The output of FIR1 is the filter’s impulse response function which can then be
convolved with the input signal. Care must be taken in selecting a suitable filter length and the correct cut-off frequency.
NOTE: The frequency response function for a filter can be plotted using MATLAB’s freqz function.
Assignment
1) Audio re-sampling function
Write a MATLAB function called audio_resample.m that has the following syntax and functionality:
Describe your implementation in your report and include a plot of the anti-aliasing filter frequency response. Explain any design
decisions made.
Marking Scheme
Marks will be awarded for the following components of the work:
Report
1. Overall presentation ………………….. 10%
2. Problem understanding……………….. 40%
3. Results and Conclusions……………… 20%
Submission checklist
Please make sure that your submission contains the following: