ENG 3107 Signal Processing

profileaby1425
3107_signal_assignmnet_1.pdf

University of Southern Queensland

Faculty of Health, Engineering & Sciences

School of Mechanical & Electrical Engineering

Course Number: ELE3107 Course Name: Signal Processing

Internal ?

Assessment No: 1

External ?

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

Examiner: John Leis Moderator: Mark Phythian

Assignment: Signals and Systems

Date Given: Week 1

Date Due: Friday Week 8

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

Assignments are to be typed, not handwritten and scanned.

Assignments are to be submitted electronically, using the link on your Study Desk. Marked assignments are also returned to you electronically.

You do not need a coversheet for this assignment, since it is submitted electronically.

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 student’s 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 Signals and Systems Page 2

Objectives

The aims of this assignment are:

1. To understand different signal models (course objectives 1 and 2)

2. To be able to model a discrete-time system (course objectives 3).

3. To design simple signal processing algorithms (course objective 4)

Students are expected to communicate their findings and ideas in a clear and logical manner.

Submission

• Assignments must:

– Be typed, not handwritten.

– Be submitted electronically via the Study Desk.

– Be submitted in PDF format, and less than 4M in size.

– Use the file naming format LastName-StudentNumber.pdf.

– State your name and student number at the top of the first page, leaving the remainder of the first page blank for marking.

• You are not permitted to use any “toolbox” functions from MATLAB. If in doubt, use which to see if a function you wish to use is part of an add-on toolbox or not.

• For each question, submit a written report, detailing your approach and discussing your findings. Your report should include diagrams, figures, 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 certificate) or additional work commitments (a written confirmation 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 Mis- conduct 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 Signals and Systems 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 file returned to you via the Study Desk. Where an explanation or description is specifically requested, your response will be assessed according to the following:

85-100: 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.

75-85: 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.

65-75: 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.

50-65: Pass Has some understanding of the problem. Addresses the question but not clearly. Some misconceptions about the question. Moderate spelling or grammatical errors.

0-50: Fail Has little or no understanding of the problem. Does not really address the question. Significant misconceptions or total lack of understanding of the question. Poor spelling and/or obvious grammatical errors.

Software

You may use MATLAB to complete questions where you are required to plot waveforms or calculate results. You may use any MATLAB notes or tutorials provided in this course as a starting point. You must not use any MATLAB “toolbox” functions – that is, any which are not shown as “built-in” in response to the which command. Where MATLAB coding is required, show all your code for each question as part of your report.

. . . / 4

Signal Processing Signals and Systems Page 4

Part I

Question 1 — 40 Marks

Using the audiorecorder() function in MATLAB, make a recording of your voice. Use a sample rate of 8kHz, 16 bits per sample, and aim to record around 2 seconds worth.

Part (a) — 20 Marks Quantize the audio samples down from the original 16 bits by removing the least-significant bit (LSB) from the waveform, to make a 15 bit recording. Repeat for 14, 13, 12 bits, down to 1 bit.

Explain how you would do this in MATLAB, and implement your approach.

Part (b) — 20 Marks Listen to the recordings, and make a table with the number of bits and the corresponding quality assessment. This can simply be a subjective assessment; use terms such as ‘no perceptual difference’, ‘minor noise present’, ‘quite noisy’, ‘poor quality’ etc.

Calculate the signal-to-noise ratio in each case, and add that to your table. Explain how you calculated the SNR.

(a) Explanation & MATLAB coding 20 (b) Subjective assessment table with SNR 20 Total 40

Question 2 — 80 Marks

This question examines the addition of a (synthetic) echo to the voice recording, such as would be found in a reverberant room. To do this, use a difference equation of the form

y(n) = x(n) + αy(n − D) (1)

where x(n) is the input audio, y(n) is the output (echoed) audio, D is the echo delay (in samples), and α governs the amount of echo fed back.

Part (a) — 20 Marks Explain how to convert the above equation into a form suitable for passing to MATLAB’s filter() command. Use α = 0.8 and D = 2 samples to explain your reasoning.

. . . / 5

Signal Processing Signals and Systems Page 5

Part (b) — 20 Marks A delay of 2 samples (as in the previous part) would not be audible. Select an echo delay of 0.2 seconds, and α = 0.4. Using your reasoning above, implement the reverberation equation, and listen to the result.

Experiment with different values of the parameters α and D. In your report, include a plot of the waveform, and explain in your own words the physical significance of these parameters.

Part (c) — 20 Marks Convert equation (1) to a z transfer function. Where are the poles located

(i) for D in general?

(ii) for the value of D found in part (b) above?

Part (d) — 20 Marks Suppose the equation governing the reverberation is

y(n) = x(n) + αx(n − D) (2)

What is the physical significance of this form, as opposed to that used in equation (1) ? Implement an audio echo system based on equation (2), and listen to the results.

(a) Explain use of filter command 20 (b) Implement realistic filter, show waveform 20 (c) z transfer function and poles 20 (d) Explain nonrecursive transfer function 20 Total 80

. . . / 6

Signal Processing Signals and Systems Page 6

Part II

Question 3 — 20 Marks

Part (a) — 10 Marks Generate and plot a sampled sine wave with fs=8kHz, of 4 seconds duration, with frequency ωo =

π 10

rad/samp and amplitude A = 1.2. The waveform equation is

x(n) = A sin nω (3)

Explain the role of each of the variables in this equation. What is the true (Hertz) frequency generated in this case?

Part (b) — 10 Marks Generate a Gaussian random signal vector, v(n), of the same length. Then generate a noisy signal of the form

y(n) = x(n) + αv(n) (4)

Listen to the resulting signal y(n) for various values of α. You will have to choose the value of α experimentally – try both small and large, and investigate the differences. Plot one of the waveforms, and comment briefly on your results.

(a) Plot clean sinusoidal waveform & comment 10 (b) Plot waveform with noise & comment 10 Total 20

Question 4 — 60 Marks

A filter of the form

G(z) = z 2

(z − p)(z − p∗) (5)

with p = reωn will be studied.

Part (a) — 20 Marks With r = 0.95 and ωn =

π 10

, plot the time response to the input clean sinusoidal waveform generated in the previous question. Show both the transient and steady-state response.

. . . / 7

Signal Processing Signals and Systems Page 7

Part (b) — 20 Marks Plot the frequency-domain response of the filter. Explain all your working, particularly how the z transfer function is converted to gain/phase plots.

Part (c) — 20 Marks Find the gain and phase from the time-domain response of part (a), and compare to that expected from the frequency response in part (b). Are the results the same?

(a) Time response (transient+steady-state) 20 (b) Frequency response (gain+phase) 20 (c) Compare gains and phases, explain results 20 Total 60

End of Assignment