Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In a certain concert hall, echoes of the original audio signal x(n) are generate

ID: 2079151 • Letter: I

Question

In a certain concert hall, echoes of the original audio signal x(n) are generated due to the
reflections at the walls and ceiling. The audio signal experienced by the listener y(n) is a
combination of x(n) and its echoes. Let
y(n) = x(n) + x(n k)
where k is the amount of delay in samples and is its relative strength. We want to
estimate the delay using the correlation analysis.

1. Determine analytically the crosscorrelation ryx() in terms of the autocorrelation rxx().
2. Let x(n) = cos(0.2n) + 0.5 cos(0.6n), = 0.1, and k = 50. Generate 200 samples of
y(n) and determine its crosscorrelation. Can you obtain and k by observing ryx()?

Explanation / Answer

clear; clc; n = 0:200; x = cos(0.2*pi*n) + 0.5*cos(0.6*pi*n); a = 0.1; k = 50; [y,ny] = sigshift(x,n,k); y = a*y; [y,ny] = sigadd(y,ny,x,n); subplot(2,2,1); stem(n,x,'k'); title('Given Sequence'); subplot(2,2,2); stem(ny,y,'k'); title('Delayed Signal'); [yf,nyf] = sigfold(y,ny); % Folded signal [ry,nry] = conv_m(yf,nyf,y,ny); % auto-correlation subplot(2,2,3); stem(nry,ry,'k'); title('Autocorrelation ryy'); [xf,nf] = sigfold(x,n); % Folded signal [rx,nrx] = conv_m(xf,nf,x,n); % auto-correlation subplot(2,2,4); stem(nrx,rx,'k'); title('Autocorrelation rxx');