ECE101_project2_partC

.pdf

School

University of California, San Diego *

*We aren’t endorsed by this school

Course

101

Subject

Electrical Engineering

Date

Jun 4, 2024

Type

pdf

Pages

4

Uploaded by DeaconPencil14021

n b Project 2 - Part C - Building an echoed voice signal In this set of tasks, you will create a speech signal with an echo. You will learn how to use autocorrelation to find the delay in unknown signals. Task 1. Create a folder to share the files for part C. Create a new folder on your MATLAB Drive. Name this folder ECE101_project2_partC_yourinitials . For example, ECE101_project2_partC_SB will be my folder's name. Right-click on the folder and select "share", and then click on "Create Link". Copy and paste the link to your folder in the below space. https://drive.mathworks.com/sharing/d968cd62-a248-4445-b708-9735c78eb0b4 Task 2. Create or choose a 2 seconds long "speech" audio file, and save its data to your workspace. After creating a 2 seconds long speech file (or choosing a speech audio file), read the file and store its data in an array named x . Also, store the sampling rate of your audio file in a variable named Fs . Note: Please refer to Tasks 1 to 3 in part C of MATLAB project 1 if you need help with completing this task. [x,Fs] = audioread( 'test.wav' ); plot(x) Task 3. Add an echo to your speech signal 1
Choose a delay value N and attenuation factor to add an echo to the speech signal that you stored in array x . Create an array y to store the elements of y[n]. N = 200 N = 200 alpha = 0.5 alpha = 0.5000 n = 0:17640 n = 1×17641 0 1 2 3 4 5 6 7 8 9 10 11 12 delta = @(x) x==0; y = delta(n)+ alpha.*delta(n-N) y = 1×17641 1 0 0 0 0 0 0 0 0 0 0 0 0 Note: Try different N and values and play y to make sure the echo can be heard and distinguished in your recorded speed signal. In the space below, write the N and values that you chose. N = 200, alpha = 0.5 Task 4. Autocorrelation. The autocorrelation of signal denoted by is defined as . Autocorrelation is the correlation of a signal with a delayed copy of itself as a function of delay. For example, shows how much overlap (similarity) is between and by multiplying the the samples of and point by point and adding them all up. It is used to find the delay in signals that contain an echo. i. Using the above definition of , show that , where denotes the convolution operation. (analytical solution; hand-written or typed). Write your answer in the below space. Rxx [n]=∑ n =− ∞∞ x [ n ]∗ x [ n m ] Rxx [ m ]= x [ m ] x [− m ]=∑ x [ n ]∗ x [− m n ] 2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help