Question

Use MATLAB to: Design an Echo Filter. The output should be the original signal followed by three echoes with attenuations of 10%, 15 % and 25% respectively and the delays should be 0.9 sec, 1.4 sec, and 1.8 sec respectively for each echo. Hint: Based on this information the original signal appears at the output with the same amplitude, the first echo has amplitude 0.9 times the amplitude of the original (10% attenuation), the second echo has amplitude 0.85 (15% attenuation) and the third echo has amplitude of 0.75 (25% attenuation). 1) 2) Use a sampling frequency of F-8192. Load the signal Splat (see class MATLAB demo video) ii) Provide an expression for the unit sample response h[n] in terms of delayed unit samples. Answer: h[n] Hint: For h[n], the delays should be given in samples (discrete time) not in seconds. Note that discrete time in samples and continuous time in seconds are related by tnTs, where T-1/F iv) Provide an expression of the system function H(z) for your echo filter, Answer: H(z) = Hint: For H(z), the delays should be given in samples (discrete time) not in seconds. Provide the discrete time filter difference equation. Answer: y[n]= Hint: For the difference equation, the delays for xIn] should be given in samples (discrete time) not in v) seconds. vi Provide time domain and frequency domain plots of your signal before and after filtering. vi) Use the sound command to hear the signal before and after the indicated audio effect. vii Turn in a formal report including, this paper with the answer blanks filled, team member names, introduction, conclusion, MATLAB code, plots and all expressions required in previous parts.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

-7373 0 2521714

********* Matlab Code for the other parts ************

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% echo filters and effects on ausio signals

clear;
load splat.mat;                 % loading the audio files
x=y;                            % x = input
Ts = 1/Fs;                      % sampling period
t = 0:Ts:(length(x)/Fs)-Ts;          % time vector

z = tf('z',Ts);
H = 1 + (0.1*z^(-7373)) + (0.15*z^(-11470)) + (0.25*z^(-14746));    % filter transfer function
y = lsim(H,x);                                                      % filter output

%%%%%%%%%%%%% Time domain plots %%%%%%%%%%%%%%
subplot(2,1,1)
plot(t,x);
xlabel('Time (s)');
ylabel('X');
title('Time domain plots of the original signal and with the echo');

subplot(2,1,2)
plot(t,y);
xlabel('Time (s)');
ylabel('Y');

%%%%%%%%%%%%% Freq domain plots %%%%%%%%%%%%%%

Y1 = fft(x);
L = length(x);
% Compute the two-sided spectrum P2.
% Then compute the single-sided spectrum P1 based on P2 and the even-valued signal length L.
P2 = abs(Y1/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
% Define the frequency domain f and plot the single-sided amplitude spectrum P1.
f = Fs*(0:(L/2))/L;
figure;
subplot(2,1,1)
plot(f,P1)
title('Single-Sided Amplitude Spectrum of X(t) and Y(t)')
xlabel('f (Hz)')
ylabel('|Y1(f)|')

Y2 = fft(y);
L = length(y);
% Compute the two-sided spectrum P2.
% Then compute the single-sided spectrum P1 based on P2 and the even-valued signal length L.
P2 = abs(Y2/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
% Define the frequency domain f and plot the single-sided amplitude spectrum P1.
f = Fs*(0:(L/2))/L;
subplot(2,1,2)
plot(f,P1)
xlabel('f (Hz)')
ylabel('|Y2(f)|')

%%%%%%%%%%%%%%%% Hearing the sounds before and after the echo effect %%%%%%%%%%%

sound(x,Fs);
pause(3);
sound(y,Fs);

******* End of Code *********

Output:

Single-Sided Amplitude Spectrum of X(t) and Y(t) 0.01 0.005 0 500 1000 1500 2000 2500 3000 3500 4000 4500 f (Hz) 0.01 0.005 0

Add a comment
Know the answer?
Add Answer to:
Use MATLAB to: Design an Echo Filter. The output should be the original signal followed by...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Discrete Time Signal Processing Question 1. Consider an IIR filter A(1-2-1 cos ω0) 1-2cos ω02-1+2...

    Discrete Time Signal Processing Question 1. Consider an IIR filter A(1-2-1 cos ω0) 1-2cos ω02-1+2 I. Compute its impulse response using the difference equation with an impulse signal δ(n) as the input. Use trigonometric identities to simplify the result as much as you can 2. Draw the diagram showing the implementation of this filter in terms of adders, delays and multipliers Note: The IIR filter above generates a cosinusoidal signal when an impulse signal is applied at its input.] Question...

  • [1].(20 Write a MATLAB program to design an FIR filter with the ssba (6KH2-12kHz) and draw the frequency response....

    [1].(20 Write a MATLAB program to design an FIR filter with the ssba (6KH2-12kHz) and draw the frequency response. The sampling rate is 40kHz and the filter order is 10. Hint: b- firl(10, passband), freqz(b, 1, n (Display the horizontal axis in terms of analog frequency.) [2].(25}) In the following system f,800 samples/sec. yln]= 0.5y/n-1+ z{n]+ z{n_1] - c) Ideal D-to-A Cunverter LTI System Ideal A-to-D Converter -1/F T.-1/P (a) Determine the impulse response h nl/ (b) Determine the output...

  • Part I: Black Box A Design your first black box adhering to the following specifications A. Input Signal to Black Box A 1. A 1 kHz cosine wave with amplitude of 1V. B. Output Signal from Black Box A...

    Part I: Black Box A Design your first black box adhering to the following specifications A. Input Signal to Black Box A 1. A 1 kHz cosine wave with amplitude of 1V. B. Output Signal from Black Box A 1. A 1 kHz sine wave with amplitude of Hint: Use an ideal op-amp C. Explain your design process. What type of circuit did you design? Discuss D. Why did vou use an op-amp? Could another component be used instead? Why...

  • Could you please provide explanations for each answer? Thank you very much! The Zonama cho-e is a smart device that needs to receive voice signals in small room with an echo (i.e., reverberation clar...

    Could you please provide explanations for each answer? Thank you very much! The Zonama cho-e is a smart device that needs to receive voice signals in small room with an echo (i.e., reverberation clarity The goal is to see if a digital filter can provide needed Given that receiving signals in the presence of an echo is a commonplace and practical task, this question looks at a means of understanding and potentially overcoming the echo with a series of filters....

  • Part A:- Synthesising a Discrete Signal using Matlab: Using a sampling frequency of 8000 Hz, determine...

    Part A:- Synthesising a Discrete Signal using Matlab: Using a sampling frequency of 8000 Hz, determine the discrete signal, x[n] that is obtained from sampling a 1000 Hz sine wave, with a peak magnitude of 0.8. (that is, x(t)-0.8cos(2rtft)). Determine an equation for xin] in terms of 'n' and then create the signal in Matlab. (Remember in this case 'n' is your independent variable not t'.) Play the x[n] signal through the PC soundcard using the 'sound' command in Matlab....

  • I wrote a Matlab program for the figure below. When I plot the waves, they look...

    I wrote a Matlab program for the figure below. When I plot the waves, they look the same. Why do the two waves frequencies look same and How do I avoid it? (I really do need this part of the question answered.) N = 200; % Total number of time domain samples in simulation. Fs = 100 ;% sampling frequency. F1 = 10; % frequency of wave - 1. F2 = 90; % frequency of wave - 2. phi =...

  • 2. (a) For each sample of a discrete time signal x[n] as input, a system S...

    2. (a) For each sample of a discrete time signal x[n] as input, a system S outputs the value y[n- . Determine whether the system S is i. linear ii. time-invariant 1ll. causal iv. stable Each of your answers should be supported by justification. In other words, show your reasoning (b) Consider a stable linear time-invariant (LTI) system with transfer function H(z). It is required to design a LTI compensator system G(z) that is in cascade with H(z) such that...

  • solve using MatLab please. HW - 1 Use a cover page Word file attached for the...

    solve using MatLab please. HW - 1 Use a cover page Word file attached for the homework solution. Solve all questions using Word and the Matlab output should be copied into the Word file. All questions and answers should be numbered HW1.1 Generate the following sequences using the basic MATLAB signal functions and the basic MATLAB signal operations discussed in this chapter. Plot signal samples using the stem function. 1- x(n) = n°[u(n+5] – u(n-6) + 105(n) + 20(0.5)* [u(n-4)...

  • [MATLAB Scriptfile task] Design N-band tone vocoder with a given figure (below) in MATLAB implementing the...

    [MATLAB Scriptfile task] Design N-band tone vocoder with a given figure (below) in MATLAB implementing the given script file(bands_cutoff). This program should be able to process any sound(.wav) file. Then, graph the band-passed signals and amplitude envelopes extracted(after rectification and low-pass filtering) and waveforms of the original sound and vocoded sound. Additionally, using the output of the script file, make spectrograms of the original sound and the synthesized sound. Bandpass filter Modulation Band-limiting Envelope detection BPF RECT LPF BPF sine...

  • [MATLAB Scriptfile task] Design N-band tone vocoder with a given figure (below) in MATLAB implementing the...

    [MATLAB Scriptfile task] Design N-band tone vocoder with a given figure (below) in MATLAB implementing the given script file(bands_cutoff). This program should be able to process any sound(.wav) file. Then, graph the band-passed signals and amplitude envelopes extracted(after rectification and low-pass filtering) and waveforms of the original sound and vocoded sound. Additionally, using the output of the script file, make spectrograms of the original sound and the synthesized sound. Bandpass filter Modulation Band-limiting Envelope detection BPF RECT LPF BPF sine...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT