You are on page 1of 7

University of Southern Queensland

Faculty of Health, Engineering & Sciences

School of Mechanical & Electrical Engineering

Course Number: ELE3107

Course Name: Signal Processing

Internal Assessment No: 2 External

This Assessment carries 200 of the 1000 marks total for this Course.


John Leis


Mark Phythian

Assignment: Understanding the Fourier Transform

Date Given: Date Due:

Week 1 Friday Week 14

Penalty for Late Submission: Loss of 5% of total marks for this assignment per day late.

Assignments are to be typed, not handwritten. Assignments are to be submitted electronically, using the Electronic Assignment Submission Environment (EASE) link on StudyDesk. If you are not sure how to do this, see EASE will give you a receipt on submission, which you should record. Marked assignments will be returned via the EASE system. Please use PDF format to submit your assignment. Please use the naming convention LastName-StudentNumber.pdf, where StudentNumber is your 10-digit student number, and LastName is your last (family) name. By submitting this assignment, you agree to the following Student Declaration: I hereby certify that no part of this assignment has been copied from any other students work or from any other source except where due acknowledgement is made in the assignment. No part of this assignment has been written for me by any other person except where such collaboration has been authorised by the Examiner.
Any non USQ copyright material used herein is reproduced under the provision of Section 200(1)(b) of the copyright Amendment Act 1980.

Signal Processing

Understanding the Fourier Transform

Page 2

Objectives The aims of this assignment are: 1. To investigate the role of signal conditioning (course objective 6); 2. To design, implement and use signal processing algorithms (course objectives 4 and 7); Students are expected to communicate their ndings and ideas in a clear and logical manner. Submission

Assignments must: Be typed, not handwritten. Be submitted electronically at Be submitted in PDF format, and less than 4M in size. Use the le naming format LastName-StudentNumber.pdf. State your name and student number at the top of the rst page, leaving the remainder of the rst page blank for marking. You are not permitted to use any toolbox functions from MATLAB (i.e. those functions not provided as part of the standard Student Edition). For each question, submit a written report, detailing your approach and discussing your ndings. Your report should include diagrams, gures, source code, waveforms and/or images as appropriate for this assignment. Late assignments are not normally accepted. If you wish to apply for consideration for late submission, it must be done at least one week prior to the due date in writing or via email. Include documentary evidence of illness (a medical certicate) or additional work commitments (a written conrmation of changed work circumstances from your supervisor). For extension applications for other reasons, please contact the examiner at least 2 weeks in advance of the due date. Students are reminded of the penalties applying to plagiarism. Copying all or part of an assessment from another student, or from the web, is unacceptable. Plagiarism may result in loss of marks, or other penalties as determined by the Academic Misconduct Policy. Further helpful hints on how to correctly reference (and how to avoid plagiarism) may be found under the link Academic Honesty on the course Study Desk.

.../ 3

Signal Processing

Understanding the Fourier Transform

Page 3

Marking Marks are awarded as per the marking guidelines at the end of each question. The breakdown of marks will be noted on the PDF le returned to you via EASE. Where an explanation or description is specically requested, your response will be assessed according to the following:






High Distinction Excellent grasp of the problem. Explicitly addresses the question, uses knowledge from course and outside. Well-argued choice of method or approach as appropriate to the question. Correct grammar and spelling. Referenced if appropriate. Distinction Very good grasp of the problem. Addresses the question using knowledge from course. Well-argued choice of method or approach as appropriate to the question. Correct grammar and spelling, perhaps with very minor errors. Referenced if appropriate. Credit Understands the problem. Addresses the question using knowledge from course. Lacks clarity of expression or uses an imprecise argument. Moderate spelling or grammatical errors. Referenced if appropriate. Pass Has some understanding of the problem. Addresses the question but not clearly. Some misconceptions about the question. Moderate spelling or grammatical errors. Fail Has little or no understanding of the problem. Does not really address the question. Signicant misconceptions or total lack of understanding of the question. Poor spelling and/or obvious grammatical errors.

Background Several graphical demonstrations of algorithms and implementation examples are provided on the course web page. MATLAB is the recommended software package students are, however, free to choose any programming language with which they are familiar in order to complete the assignments for this course. The aim of this assignment is to gain a better understanding of Fourier Transform, and to investigate a practical application of the FFT. The data les required for this assignment may be downloaded from the course Study

.../ 4

Signal Processing

Understanding the Fourier Transform

Page 4

Desk1 . Before starting, you should do some research on DTMF signalling, for example multi-frequency signaling. Example MATLAB code, which you may use for the purpose of the assignment, is provided on the course website. See the script wavproc.m run it and trace through the code. Note well: you are permitted to use the fft and ifft functions in MATLAB, since they are part of the standard MATLAB conguration. You are not, however, permitted to use any toolbox functions from MATLAB (i.e. those functions not provided as part of the standard Student Edition).

Question 1 50 Marks
The audio les dial0.wav, dial1.wav, ..., dial9.wav contain telephone dial (signalling) tones for the numbers 0 through 9. Use the code provided in wavproc.m to read the .wav les. Play through the PC speakers using MATLABs sound function.

Part (a) 25 Marks

Write code to calculate and plot (on screen) the Fourier Transform magnitude for each of the ten individual digits. Each number is signalled using two simultaneous tones (see the web page cited above for further information). Note that the sample rate is 8kHz. Make sure your frequency axis is correctly scaled. In your report, include:

1. Your source code listing. 2. Two representative time-domain waveforms. 3. Two representative frequency-domain waveforms.

Part (b) 25 Marks

Show your measured frequency components, explain how you derived them from the FFT, and compare them to what is expected from the standard DTMF frequency pair allocation. Waveforms correct & plotted correctly 25 Frequencies correct & compared 25 Total 50

These were originally sourced from and were converted from .au format into .wav format.

.../ 5

Signal Processing

Understanding the Fourier Transform

Page 5

Question 2 50 Marks
This question asks you to determine a sequence of keys dialled, given only the tone-dial waveforms.

Part (a) 25 Marks

By reading the wave le in blocks and calculating the Fourier Transform of each block, design an algorithm and construct the code to determine the particular key sequence dialled from the wave le alone. Test your code using the le dial0123. The determination must be fully automatic, and must not rely on the waveforms being a precise length. In your report, include a listing of your source code, and the output of your code, clearly indicating that it has correctly determined the sequence of keys.

Part (b) 25 Marks

A further set of longer dial tones is provided, according to the naming convention: dialu<d><c|n>.wav where dialu signies unknown dial sequence d is a single digit signifying the unknown le number (not the digit(s) dialled) c|n is either c for clean signal or n for noisy signal For example, dialu2c.wav is the third2 noise-free unknown dial sequence le. Note, however, that the n le does not correspond to the c le in other words, dialu3n.wav does not necessarily contain the same key sequence as dialu3c.wav. Note also that the keys dialled includes digits as well as the standard star (*) and hash (#) keys. Firstly, listen to the sequence using a sound-playing application such as Windows Media Player. Then, test your code from the previous question for the case of a clean (noise-free) signal. For the digit d, use the last digit of your student number. For example, if your student number is 0123456789, use the le dialu9c.wav. In your report, include your source code show the output of your code, clearly indicating what your program has determined the sequence of keys to be. Determine short waveform correctly Determine long waveform correctly Total 25 25 50

Starting from 0.

.../ 6

Signal Processing

Understanding the Fourier Transform

Page 6

Question 3 50 Marks
Repeat the previous question, but use the noise-corrupted audio le and use the second-last digit of your student number3 . For example, if your student number is 098765432, use the le dialu3n.wav. In your report, include a listing of the output of your code, clearly indicating that it has determined the sequence of keys, together with a discussion of the performance of your method in the presence of noise. Explain method 10 Results 20 Discussion 20 Total 50

Question 4 50 Marks
This question requires you to estimate how much noise can be tolerated in your algorithm. Starting with the clean signal, as we increase the amount of noise added, we expect that the algorithm would work satisfactorily up to a point, after which the performance will degrade (only some of the keys will be detected, not all). At some point, with enough noise, the algorithm will not be able to detect any of the keys correctly (or, more correctly, the algorithm will produce what amounts to random results). In order to test this in the lab, we need to generate some articial noise, with a controllable power level. Let the noise-free signal (the c wave le) be x(n). Add a quantity of noise to it, according to y (n) = x(n) + v (n), where v (n) is white Gaussian noise and is a constant controlling how much noise is added. For a given , you can calculate the Signal-to-Noise ratio (SNR) in decibels (dB) using SNR = 10 log10 and noise v (n). Starting at = 0 (that is, no noise), increase the amount of noise and test the performance of your key-detection algorithm. The detection algorithm must use as input the observed signal y (n). The clean signal is not available (except for generating the noisy signal y (n) in the rst place, and determining the SNR). Determine how many keys may be recovered using your algorithm from the previous quesIf the second-last digit of your student number is the same as the last digit, then use the third-last digit instead. If that digit is still the same, then select another earlier digit, and note which one youve used in your assignment.

x2 (n) (v (n))2 N

from a data vector of reasonable length N , given the signal x(n)

.../ 7

Signal Processing

Understanding the Fourier Transform

Page 7

tion, and create a table containing , SNR and number of keys recovered. When the signal power equals the noise power, the SNR is 0 dB. Will your algorithm work at this SNR? Comment on the performance of your algorithm in the light of these results. If your algorithm will not work for larger amounts of noise, suggest and investigate some methods by which its performance could be improved. SNR Results 10 Performance Improvement 40 Total 50

End of Assignment