Question
matlab code as well please.
7. (100) Design a bandpass FIR filter with the following Spec: (a) Lower cut off frequency: 1250Hz, (b) lower transition widt
0 0
Add a comment Improve this question Transcribed image text
Answer #1

window type

For the attenuation of 60 db,either blackman or hamming window should be selected. But the mainlobe width provided by the blackman window is 8pi/N when compared with the main lobe width of the HAMMING window(4pi/N).

Order

Main lobe width of Hamming window= 8 pi/N ---(1)

Minimum transition width of the filter(1500,1300)=1300Hz---(2)

By comparing 1 and 2,

8 X pi/N = 2*pi*1300/sampling frequency

8 Xpi/N= 2*pi*15=300/8000

N=8/0.325 =24.6

M>=N

Hence M=25

MATLAB script:

clc;close all;clear all;

M=25;%order

fc1=1250;fc2=2850;%cut off frequencies

Fs=8000;WL=2*fc1/Fs;WH=2*fc2/Fs;

Wtype=hamming(M)';

Ftype='bandpass';

B=firwd(M-1,Ftype,WL,WH,Wtype);

w=0:pi/1000:pi;

H=freqz(B,1,w);

n=0:1:M-1;

figure;

subplot(311)

stem(n,B)

xlabel('n')

ylabel('h(n)')

title('impulse response')

subplot(312)

plot(w/pi,abs(H));xlabel('w X pi')

ylabel('|H(exp(jw)|')

title('Magnitude response')

subplot(313)

plot(w/pi,angle(H));xlabel('w X pi')

ylabel('<H(exp(jw)>')

title('Phase response')

uy793sv0E4KsG4IfuvTnnBOCrBgCAaQAAmAYAgGk

B_Impulse response coefficients:

Columns 1 through 18

0.0003 0.0001 0.0000 0.0007 -0.0069 -0.0041 0.0176 -0.0000 0.0545 0.0177 -0.2644 -0.0142 0.3980 -0.0142 -0.2644 0.0177 0.0545 -0.0000

Columns 19 through 25

0.0176 -0.0041 -0.0069 0.0007 0.0000 0.0001 0.0003

Function script:

function B=firwd(M,Ftype,WL,WH,Wtype)

Wc=[WL WH]

h=fir1(M,Wc,Ftype)

B=h.*(Wtype)

end

Add a comment
Know the answer?
Add Answer to:
matlab code as well please. 7. (100) Design a bandpass FIR filter with the following Spec:...
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
  • 7.29. Design a 41-tap bandpass FIR filter with lower and upper cutoff frequencies of 2,500 Hz...

    7.29. Design a 41-tap bandpass FIR filter with lower and upper cutoff frequencies of 2,500 Hz and 3,000 Hz, respectively, using the following window functions. Assume a sampling frequency of 8,000 Hz. a. Hanning window function b. Blackman window function. List the FIR filter coefficients and plot the frequency responses for each design. 7.30 Design a 41-tap band reject FIR filter with cutoff frequencies of 2,500 Hz and 3,000 Hz, respectively, using the Hamming window function. Assume a sampling frequency...

  • 3. Design a bandpass FIR filter using Kaiser's formula for filter order, using Hamming window with...

    3. Design a bandpass FIR filter using Kaiser's formula for filter order, using Hamming window with the following specifications: the lower passband and stopband edge frequencies are fpi- 700 Hz, fs1 - 300 Hz, the upper passband and stopband edge frequencies fp2 - 2 kHz fs2 - 2400 Hz, the sampling frequency fs-10 kHz, and 6p-0.03, ando0.004.

  • Using the windowing functions discussed in class, design a low-pass FIR filter with a cutoff freq...

    Using the windowing functions discussed in class, design a low-pass FIR filter with a cutoff frequency of 2 kHz, a minimum stop band attenuation of 40 dB, and a transition width of 200Hz. The sampling frequency is 10kHz. 1. Using the windowing functions discussed in class, design a low-pass FIR filter with a cutoff frequency of 2 kHz, a minimum stop band attenuation of 40 dB, and a transition width of 200 Hz. The sampling frequency is 10 kHz 2....

  • please need correct answer. I will upvote. Design a second-order digital bandpass Butterworth filter with a...

    please need correct answer. I will upvote. Design a second-order digital bandpass Butterworth filter with a lower cutoff frequency of 1.9 kHz, an upper cutoff frequency 2.1 kHz, and a passband ripple of 3dB at a sampling frequency of 8,000 Hz. a. Determine the transfer function and difference equation. b. Use MATLAB to plot the magnitude and phase frequency respon

  • Design a 5-tap FIR bandpass filter

    Design a 5-tap FIR bandpass filter with a lower cutoff frequency of1,600 Hz, an upper cutoff frequency of 1,800 Hz, and a sampling rateof 8,000 Hz using a. rectangular window functionb. Hamming window function.Determine the transfer function and difference equation of the designedFIR system, and compute and plot the magnitude frequency responsefor Ω= 0, π/4, π/2, 3π/4, and π radians.PLEASE SHOW STEPS CLEARLY

  • using Matlab: 1) Design an FIR notch filter using zero placement to remove power-line noise at...

    using Matlab: 1) Design an FIR notch filter using zero placement to remove power-line noise at 60 Hz (use file ecg_60hz_200, fs = 200 Hz). 2) Design a LP Butterworth filter with cut-off frequency of 40 Hz to remove high-frequency noise (use file ecg_hfn.dat, fs = 1000 Hz). 3) Design an Elliptic HP filter with passband ripple of 0.01 dB and stopband attenuation of 50 dB and cut-off frequency of 0.5 Hz to remove low-frequency noise (use file ecg_lfn.dat, fs...

  • Design a linear-phase, bandpass FIR filter using the window-based approach to meet the following specifications: ws,L...

    Design a linear-phase, bandpass FIR filter using the window-based approach to meet the following specifications: ws,L = 0.3T,ap.L = 0.45T,Wp u = 0.65T, "Au-0.8T, mini- mum stopband at (i) Is there a unique window to meet the desired specifications? If not, choose the window with minimum transition width (ii) Plot the magnitude and phase response of the designed filter using MATLAB. (iii Using the MATLAB command firpm, design the same linear-phase bandpass FIR filter via the Parks-McClellan algorithm. Plot the...

  • please answer all the question and print matlab code You need to design bandpass filter with lower cutoff freq. of 1000Hz and upper cutoff freq. of 3000Hz. Sampling freq. 10000Hz. Plot the freq. respo...

    please answer all the question and print matlab code You need to design bandpass filter with lower cutoff freq. of 1000Hz and upper cutoff freq. of 3000Hz. Sampling freq. 10000Hz. Plot the freq. response in DB .Use MATLAB as needed a) FIR with Hamming window at least 7 taps b) IIR using Bilinear Transformation method not more than 2end order. c) Compare the frequency response “freqz” plots and which method you recommend and why? 2 graphs on this part. d)...

  • 1. Design a bandpass filter to meet the following specificatoins: lower stopband edge = 0.3π upper...

    1. Design a bandpass filter to meet the following specificatoins: lower stopband edge = 0.3π upper stopband edge = 0.6π lower passband edge = 0.4π upper passband edge = 0.5π Rp = 0.5 dB, As = 50 dB Use a sampling frequency of 1000 Hz. You may use MATLAB and the fir1 commmand to implement. It is advisable to check the MathWorks site for help on using these commands. It is advisable to check if the commands use the ripple...

  • Using the windowing function discussed in class, design a band pass FIR filter centered at 20 MHz...

    Using the windowing function discussed in class, design a band pass FIR filter centered at 20 MHz with bandwidth 30MHz.. 3. Using the windowing functions discussed in class, design a band-pass FIR filter centered at 20 MHz with a bandwidth 30 MHz (), a minimum stop band attenuation of 30 dB, and a transition width of 1 MHz. The sampling frequency is 80 MHz, 3. Using the windowing functions discussed in class, design a band-pass FIR filter centered at 20...

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
ADVERTISEMENT