Department of Electronic Engineering

ELE00112M Introduction to MATLAB Coursework Assessment

2020/21


SUMMARY DETAILS

This coursework (Exercises) contributes 100% of the assessment for this module.

Clearly indicate your Exam Number on every separate piece of work submitted.

Submission is via the VLE module submission point. The deadline is 12:00 noon on 3/12/2020, Autumn Term, Week 10, Thursday. Please try and submit early as any late submissions will be penalised. Assessment information including on late penalties is given in the Statement of Assessment.


ACADEMIC INTEGRITY

It is your responsibility to ensure that you understand and comply with the University’s policy on academic integrity. If this is your first year of study at the University then you also need to complete the mandatory Academic Integrity Tutorial. Further information is available at http://www.york.ac.uk/integrity/.

In particular please note:

● Unless the coursework specifies a group submission, you should assume that all submissions are individual and should therefore be your own work.

● All assessment submissions are subject to the Department’s policy on plagiarism and, wherever possible, will be checked by the Department using Turnitin software.


Introduction to MATLAB

Assessment Information 2020/21


GENERAL INSTRUCTIONS

The assessment is based on completion of Exercise 2 in the session five and six laboratory procedure document (copied below). You are required to submit all your code and results for this exercise in the form of a report.


ASSESSMENT DETAIL

Session 5-6 – Exercise 2 (100% of the module)

Analogue telephone lines use a Dual-Tone Multi-Frequency (DTMF) signalling standard between telephone handsets and switching centres, to identify which numbers have been dialled. When a number or symbol on the handset is pressed, a sinusoidal tone is generated comprising a distinct pair of frequencies (one low and one high). The dual-tone signals are then decoded at the switching centres to determine which key was pressed. Figure 5-4 shows the frequencies used for each key, which are based on the particular row and column in which the key is located.

Figure 5-4: Telephone keypad and corresponding dual tone frequencies

As an example of Fourier synthesis and analysis:

A)   Produce a normalised (maximum amplitude of one) DTMF signal for the number 5 in MATLAB. Your time domain signal vector (t) should be of 0.25s duration, with a 32,768 Hz sample rate. Illustrate the DTMF signal with two sub-plots, one showing the entire signal and one showing the signal over the first 10ms (21%)

(Hint: Remember that the general form of a sinusoidal signal is: y = sin(2 ft). You need to generate the two DTMF signal components and then combine them).

B)   Write a MATLAB function to produce a DTMF signal sequence, based on a telephone number entered at the MATLAB prompt (e.g. 01904). Your function should generate 0.25s DTMF signals for each digit and display the first 10ms of each signal in separate figure windows. Your function should combine the signals together to form one continuous signal consisting of the 0.25s DTMF signals separated by 0.25s silence periods. The sample rate should be 32,768 Hz. Your function should play the resulting dialling sequence (30%)

(Hint: Use the code developed in part A) as a starting point. There are many different ways to write a suitable solution to this problem, but the key steps from an example solution are given below. You are free to find an alternative approach and may use fewer or more built-in functions in your solution. Marks will be given for each part, with maximum marks available for a complete solution, which automates the process as much as possible).

Key steps:

o   Initialise variables

o   Read a telephone number from the MATLAB prompt (input may be useful).

o   Process each digit of the telephone number in turn (for may be useful).

   Determine the pair of frequencies corresponding to the digit (switch …case may be useful).

   Generate the two sinusoids for the digit and combine them together to form the DTMF signal (sin and pi may be useful).

   Plot the first 10ms of the DTMF signal for the digit (plot and axis may be useful).

   Append a silence period on to the end of the DTFM signal (zeros may be useful).

   Append the new DTMF signal on to the end of the existing DTMF signal sequence

o   Play the complete DTMF signal sequence (sound may be useful).

C)   Run the MATLAB function written in B) with the York area code (01904). Keep a record of your plots. Listen to the sequence and determine whether it sounds like the same number being dialled on a conventional telephone (6%)

D)  The ‘dtmfsig.wav’ file contains a DTMF signal sequence of a telephone number being dialled. The sample rate is 44,100 Hz. Write a MATLAB script to extract the useful components of the signal (the frequencies of the successive pairs of sinusoidal signals) and determine the dialled number sequence (43%)

(Hint: The Discrete Fourier Transform (fft) and amplitude spectrum example should help you here. There are many different ways to write a suitable solution to this problem, but the key steps from an example solution are given below. You are free to find an alternative approach and may use fewer or more built-in functions in your solution. Marks will be given for each part, with maximum marks available for a complete solution, which automates the process as much as possible).

Key steps:

o   Read the .wav file and store as a matrix (wavread may be useful).

o   Initialise variables

o   Plot and play the DTMF signal sequence (plot and sound may be useful).

o   Extract the DTMF signals for the individual digits from the DTMF signal sequence and store them in a suitable form (you may wish to use the plot to obtain the sample numbers required to extract appropriate sections of the signal).

o   Process each digit of the telephone number in turn (for may be useful).

   Generate the amplitude spectrum of the DTMF signal for the digit (fft and abs may be useful).

   Determine the two most significant frequency components based on the amplitude spectrum (sort may be useful here).

   Determine the closest DTMF signal frequencies to the observed frequency components (abs and min may be useful here).

   Determine which digit was dialled and store the new digit (conditional statements such as if..elseif may be useful here).

o   Print the complete telephone number in the MATLAB command window.


SUBMISSION INSTRUCTIONS

Your individual work should be submitted compressed into a single ZIP file (maximum size 30MB) and uploaded to the module’s VLE entry point by the deadline, which is shown on the cover sheet.

Your submitted ZIP file should contain the following items:

A report in .doc or .pdf format. It will include the MATLAB code and plots required to fulfill the four parts of exercise 2.

All your MATLAB code, with the files organised in such a way that I will be able to run them on my PC.

As an example structure for the report which you submit, you may have the following:-

Title Page (including the name of the module and your examination number)

Exercise 2, part A

MATLAB code listing for part A

DTMF signal plot containing two subplots

Exercise 2, part B

MATLAB code listing for part B

Exercise 2, part C

MATLAB plot of the DTMF signal for the number 0
MATLAB plot of the DTMF signal for the number 1
MATLAB plot of the DTMF signal for the number 9
MATLAB plot of the DTMF signal for the number 4

Exercise 2, part D

MATLAB code listing for part D

You do not need to provide any substantial written text, but make sure that you clearly specify which part of the exercise each code listing or plot corresponds to. You may include one or two sentences to explain any important features of your solutions.


OTHER ASPECTS

Please use your examination number to identify your work and make sure that it is embedded into all your code listings and plots, as previously instructed. Please do not include your name or e-mail address anywhere in your documentation or electronic files.

If you have any questions about the assessment, please don’t hesitate to contact me.