University of Nottingham
Faculty of Engineering
Department of Electrical and Electronic Engineering
H64DSP – Digital Signal Processing for Telecommunications, Multimedia
and Instrumentation Coursework- Filtering of a Voice Signal
1. Introduction
The coursework component for H64DSP is worth 30% of the module assessment. The coursework makes use of MATLAB to process sound signals which have been corrupted by noise and interference.
There are Workshops that take place between 10-11 on Friday mornings in the Tower Computer Room (3rd Floor), where you have access to computers running MATLAB but you can of course work on this project outside this slot. MATLAB is available for download for all registered students. In addition, MATLAB is also run on computers in both the Tower and other communal computer rooms in the University.
The main educational aim of this project is to reinforce the theoretical material introduced in the lectures. You will have the opportunity to apply a wide variety of filters and other signal processing techniques and you should, by the end of the project, have a better understanding of these techniques.
Please note that this project is worth just 3 credits, so you should spend no more than 2 hours a week on it. If you find yourself having to work longer than this, or have any other problems, then please feel free to contact me.
2. Background to the Project
2.1 Data Files
You are provided with the following MATLAB files containing a voice signal:
H64DSP1617.m4a – Clean signal
Corrupt.m4a – corrupted version of the clean signal.
Information about reading and writing sound waves in MATLAB can be found at:
http://uk.mathworks.com/help/matlab/import_export/read-and-get-information- about-audio-files.html (last accessed 25/8/16).
For example, if you want to read an audio file, then you use the command audioread:
1
e.g. [y, fs] = audioread(‘corrupt.m4a’)
The array y will contain the data values. fs will give you the sampling frequency (Hz).
If you want to hear the signal, then you should use the sound command: sound(y,fs)
Note that the default value for fs is 8 kHz whilst the recorded signal has been sampled at 48 kHz, so, if you miss out the fs value then the recording will sound sinister!
Hearing the signal after processing may give you an indication of how close to the clean signal is the processed signal. However, if loudspeakers are not available, comparing the plots of the variations with time of the clean and processed signals is just as good a procedure for comparison.
After having processed the data, if you want to write it to a file with *m4a format then you should use the audiowrite command:
e.g. audiowrite(‘processed.m4a’,y,fs)
Note: in this example the chosen filename is processed.m4a, but any name can be chosen as long as the suffix .m4a is used.
Note that if you read the audio file H64DSP1617.m4a using the command: [y fs] = audioread(‘H64DSP1617.m4a’)
then array y will consist of two columns. For this recording, both columns of y are identical, so you need only choose one column (say the first) to compare with the corrupted signal.
2.2 Aim of the Project
The aim of the project is to process the data in corrupt.m4a in order to recover as much as possible the original signal contained in H64DSP1617.m4a. Please note: H64DSP1617.m4a is provided for your reference – information from this file must not be used to process the signal in corrupt.m4a.
You can use a variety of methods to process the signal. Digital filters are introduced in Lectures 5 and 6 but you are welcome to read ahead and use some of these filters earlier if you want to.
3. Deliverables
You should produce and hand in and submit to the student office the following:
(1) A report, approximately 10-15 pages in length, which should be word processed. See below for more details of the format of the report.
2
(2) You should email me MATLAB programs that you have written or used and also data files that you have produced after processing the signal. Your report should cross-reference to these files explaining clearly how you have processed the data to produce the filtered output. It should be possible for me to reproduce the data that you have produced.
4. Report
4.1 Deadline
You will need to hand in the report and email any files to me by Monday, December 5th before 3 pm
4.2 Structure of the Report
The report is to be structured as follows:
(1) Introduction
What are the aims and objectives of the project?
(2) Methods and Results
This is the main section of the report and should describe the following:
(3)
(4)
The signal processing methods you have used and how you have implemented them using MATLAB.
The reason why you have used that particular method. Justification for using specific choice of input parameters.
Results shown in graphical form
Give filenames for processed data that are produced – these files should also be emailed to me.
Discussion of Results
If a particular combination of signal processing methods worked well, then why is that the case?
If a particular combination of signal processing methods worked badly, then why is that the case?
Conclusions
Recommendation for the best combination of single processing methods to be used and the reasons you are recommending this combination.
3
5. Assessment
The assessment of the report will be as follows:
(1) Introduction – 10%
(2) Methods and Results – 40%
(3) Discussion of Results – 40%
(4) Conclusions – 10%
Note on assessment:
You will not be penalised for trying out a method that does not work – this happens all the time with research! You will be given credit for explaining why a method does not work (or works well). You will not receive much credit if you present a lot of results with no explanation. Try using a variety of combinations of processing methods comparing the advantages and disadvantages of each combination.
6. Connection with the Lectures
Many of the signal processing methods introduced in the lectures will be relevant to the coursework. This project should help you in the understanding of these methods.
The following is a suggested schedule for the project, for you to be able to apply the methods discussed in the lectures:
Weeks 1 and 2
Using MATLAB compare the clean and corrupted signals. Can you identify the various types of corruption that have been caused to the original signal?
You should use the first two sessions to get used to MATLAB and writing simple programs to display the signals – use the plot command to plot the corrupted and clean signals as a function of time. What features do you note in the noisy signal that are not present in the clean signal? How could you get rid of them?
Week 3
In the third lecture, we look at the applications of the Discrete Fourier Transform (DFT) and its efficient implementation, the Fast Fourier Transform (FFT). How does the FFT amplitude spectrum of the corrupted signal compare with that of the clean signal? Are there any features there that can be attributed to noise and interference?
4
Week 4
In the lectures that week, we look at techniques such as median filtering and Wiener filtering. Could either, or a combination, of these techniques be applied to processing the corrupted signal?
Weeks 5 and 6
For these lectures we discuss the various types of digital filter (FIR and IIR) and describe various ways to design these filters. The appropriate MATLAB commands are given in the lecture notes. Can these be used to reduce the effects of noise and any interference?
Weeks 7 and 8
During these two weeks, we discussed adaptive filters, which are digital filters with time varying coefficients. Can any of the interferences be reduced with adaptive filters?
Weeks 9 and 10
During these weeks you should finish off your report for submission by the deadline.
7. Other useful MATLAB Commands
During the course of the lectures, various MATLAB commands will be noted in the lectures – try reading up on these in the Mathworks web site to see if they could be useful (SPTOOL could be particularly useful):
Spectral Analysis
Demonstrations: fftdemo
• DFT: fft ifft
• Windows: bartlett triang hanning hamming blackman chebwin kaiser • JTFA: spectrogram
• PSD (Welch) : pwelch (used to be called psd)
Digital Filtering
• fir1 truncation +weighting for common filters (LP etc)
• fir2 truncation + weighting for a sampled magnitude response
• firls least square design
5
• firpm chebyshev design
• Filter properties grpdelay freqz impz zplane
• conv filter fftfilt (to implement filtering)
• SPTOOL (versatile tool for design, filtering, analysis)
8. Help with project
The methods you use is entirely up to you. Please feel free to discuss any ideas you may have with me or if you require more help. I would be interested in listening to your ideas. You can come to my office if you like or you may wish to check my availability by email first.
Remember – there are no correct and wrong answers. There are a large number of algorithms that you could come up with each with their own advantages and disadvantages.
Malcolm Woolfson, August 26th 2016
6