Question:

Electrical Engineering - FIR Filter, Poles and Zero`s?

by  |  earlier

0 LIKES UnLike

Could somone explain the following to me (or the code in matlab to answer the questions)

A simple echo filter can be defined by the difference equation: y[n] = x[n] + α x[n - Δ], where α is the amplitude of the echo and Δ is the echo delay in samples. Clearly, this is an FIR filter.

a) Implement this difference equation in Matlab and confirm its operation with Handel's hallelujah chorus (see help sound). Note, to hear an echo try setting Δ to equal the number of samples in ~100ms, i.e., the sampling frequency divided by 10;

b) Sketch the pole and zero locations in the z-plane for α = 0.8 and Δ = 6;

c) Sketch |H(ω)|, i.e., the magnitude response of this filter from zero to half the sampling frequency;

d) What effect do α and Δ have on the shape and number of peaks in the magnitude response? Hint use the Matlab functions fvtool or zplane and freqz.

e) Suggest how a "fading" echo might be implemented by changing the original FIR filter to be IIR. What role do the poles and zeros now play? Confirm your design by implementing this filter in

Matlab.

Any help would be appreciated

 Tags:

   Report

1 ANSWERS


  1. Hmm, if I understood right they want you to inrease echo, not to decrease it (Im saying this because I might have misunderstood :)

    a) This is what I tried:

    load handel % you get vector y (sound) and Fs (sampling frequency)

    f = zeros(round(Fs/10),1); %reserve memory for filter

    f(end) = 1; %preserve original, this is the x[n] part of the equation

    alfa = 0.5; %echo amplitude

    f(1) = alfa; %this is the αx[n - Δ] part of the equation (If I'm right)

    sound(y,Fs) %test audio

    y_filtered = conv(y,f); %filter audio

    sound(y_filtered,Fs); %compare to audio that has been filtered

    b)

    You can get poles and zeros using commands

    pzmap, pole, zero, zplane

    but you should first create LTI model and I don't know how to do this :/

    c)

    Im not sure but these might have somehting to do with this:

    freqz

    It has been too long when I last did some 1D signal processing.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions