Examine a few examples in the time and frequency domain

Assignment Help MATLAB Programming
Reference no: EM132856883

DTMF Decoding

Project assignment

The project consists of 3 parts. There are 2 bonus parts (4th and 5th ) that are completely voluntary.

1. You should work on the project individually.

2. Please submit all your codes as well as a report (in .doc or .pdf format) where you describe your approach, your design decisions, any theoretical formulations, as well as show any graphics and analyses of your code. Do NOT include code as part of your report.

3. Your submission should include your MATLAB functions following the parameters defined in each part of the project. The code submitted should be fully debugged and only use built-in MATLAB functions (no third-party software or special MATLAB toolboxes.) Keep in mind your code will be tested using our own generated sequences. So, it should be fully automated and ready to analyze any unknown sequences of phone numbers. There are some implementations of DTMF available online, but they don't cover many aspects of our project. Make sure you develop your own code. Plagiarism will be severely punished.
4. Submit your project files on blackboard no later than 4/29/2021 at 11:59pm.

Part 1 - Encoding DTMF

First, we get ourselves more familiar with DTMF sounds. Using the frequencies given in the figure above, write a function DTMFencode.m with the following parameters:

[x,fs] = DTMFencode(key,duration,weight,fs)

Output

x

output sound waveform generated by pressing the corresponding key

 

fs

sampling rate in Hz

Input

key

a character corresponding to one of twelve possible keys (Figure 1)

 

duration

[optional argument] desired duration of the signal (default 200ms)

 

weight

[optional argument] 1x2 vector with desired weight of low and high frequency

component (default [1 1])

 

fs

[optional argument] sampling rate in Hz (default 8000Hz). Note: values below

3000Hz should not be accepted

Write and submit the code for DTMFencode

Generate the twelve possible digits with your choice of parameters and save each digits as an audio file named digitX.wav (X=1,2,...)

Provide in your report a plot of both the time-domain signals and Fourier transform magnitude of each digit. Make sure all axes are labeled properly.

Describe in your code how you checked that your code is running properly.

Part 2 - Decoding DTMF keys

Next, we focus on decoding an audio signal into the corresponding digit. Here, we assume our audio recording contains only one digit. Write a function DTMFdecode.m with the following parameters:

[key,fs] = DTMFdecode(filename)

Output

key

a character corresponding to one of twelve possible keys (Figure 1)

 

fs

The sampling rate in Hz

Input

filename

*.wav file that contains a single DTMF signal

Write and submit the code for DTMFdecode.
o Your code should work with any sampling rate above 3000Hz, any signal duration and any weighting of low and high frequencies.
o You should think of the best strategy to determine the DTMF values (time-domain, frequency- domain, energy over small frequency bins or a combination).
o Keep in mind that your code for Part 2 will be used in Part 4; it should be able to work well in noisy conditions. You can add other sounds (off the web) to your test signals to generate noisy versions of dialed keys in order to make sure your decoder is robust to noise.
o Generate audio files from Part 1 (with varying parameters) to test your DTMF decoder.
Describe in your report what strategy or strategies you use to decode the key. Choose for your report an example test-file and plots that describes how your decoder works on this example.

Part 3 - Decoding DTMF sequences

Next, we will deal with parsing a continuous recording of a person dialing a phone number. Here, the unknowns are the onset and offset of each key press as well as how many key presses there are. Write a function DTMFsequence.m with the following characteristics:

[seq,fs] = DTMFsequence(filename)

Output

seq

a string of characters 1 corresponding to one of twelve possible keys (Figure 1)

 

fs

The sampling rate in Hz

Input

filename

*.wav file that contains a sequence of key presses of unknown length

Write and submit the code for DTMFsequence
o You should generate a variety of test signals using your code from Part 1.
o To appreciate the range of difficulty in real-life applications, you are provided with a list of 20 real-life recordings recorded in a real office (some of these are noisy, and may include additional short sections of dialtone or ringtone). You should also generate your own test signals with varying degree of distortions.
Use the report to explain your strategy for finding the key presses in the sequence. Use an example and plots (both time and frequency domain with proper axes) to walk us through how an example works.

Part 4 - Decoding DTMF sequences in open environments

Now, we would like to understand the limits of your algorithm (so we know what settings we can market it for!) How much noise can it tolerate? You are provided a noise recording referred to as babble noise. It corresponds to a recording from a group of people talking at the same time, as would happen in a cafeteria or at a party. If a person is dialing their phone at this party, how loud can the party be before your algorithm stops reliably decoding the phone number? To estimate that, follow these steps:

a. Generate 50 random phone sequences (random numbers and random length) and encode them using your code from Part 1 (with varying DTMF parameters across sequences: frequency weighting and tone duration). You can assume that the weighting and duration is constant within each sequence.

b. Normalize each audio signal s[n] to an absolute maximum of 1

c. Normalize the background noise distortion d[n] to an absolute maximum of 1

d. Combine each sequence s[n] with the distortion d[n] using the equation:
y[n] = s[n] + α d[n]

e. Gradually vary the degree of noise (α) from 0 to 3 in steps of 0.1. Obviously, α = 0 represents your clean sequence without distortion.

f. For each level of α, decode your sequence and check your error rate (how correctly are you decoding the phone number?).

g. Repeat this procedure 50 times with each of the 50 sequences and provide an average accuracy for each noise level α

h. Include a plot of average accuracy vs. α in your report.

i. Examine a few examples in the time and frequency domain and comment on why you think your algorithm deteriorated at a certain level α.

Part 5 - Bonus section

Repeat the procedure in Part 4. Instead of using additive noise (y[n] = s[n] + α d[n]), we want to analyze effects of room reverberation, i.e. the reflections of the sound through all surfaces in the room. In this case, the distortion can be modeled as a convolution: y[n] = s[n] ∗ d??[n] where d??[n] is the impulse response of the room. You are provided a MATLAB function addreverb.m which simulates reverberation with different echo characteristics. The parameter reverbTime in the MATLAB function represents that echo characteristics: the higher that value, the more echo in the room. Repeat the procedure in Part 4, but this time testing accuracy of the algorithm as a function of reverberation time.

Revisit your analysis of Part 4. Repeat your analysis, but this time estimate how the encoding of DTMF tones affects your accuracy? Do longer or shorter tones give you better accuracy, or is your accuracy independent of tone duration? How about the weighting of low and high frequencies?

Attachment:- DTMF Decoding.rar

Reference no: EM132856883

Questions Cloud

What will the monthly payments be : Assuming that a fully amortizing loan is made, what will the monthly payments be during year 1? What will be the loan balance at the EOY 2
What impact will the three methods of depreciation have : What impact will the three methods of depreciation have on your business' balance sheet at December 31, 2021? What impact will the three methods have
What is the value of notes payable : If Katy Inc. resorted to pledging of A/R, what is the value of notes payable to appear on the balance sheet as of December 31, 2020
Explain threats of having employee telecommute working : Explain FIVE (5) threats of having employee telecommute working from home during Covid-19 pandemic season and discuss the controls to overcome those threats.
Examine a few examples in the time and frequency domain : Provide in your report a plot of both the time-domain signals and Fourier transform magnitude of each digit. Make sure all axes are labeled properly
What is the gross profit for the year for gold company : Gold Company showed net income of P 480,000 for the year. Selling expenses were equal to 15% of sales. What is the gross profit for the year?
Determine the earnings per share : Blanco, Inc. has a net income of $300,000 for 2014, Determine the earnings per share for 2014
What is the amount of direct labor cost incurred : What is the amount of direct labor cost incurred? Goods in process at year-end amounted to 10% of the total manufacturing costs.
Estimate company as return on equity : The current estimate of the market risk premium is 6%, and the stock is trading at a P/E ratio of 9.5, estimate Company A's return on equity

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd