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 in dB or in absolute units and you may use MATLAB commands to convert if needed. Note, since you must title and label axes, the default plot from freqz is not sufficient but you may use freqz to generate the frequency response and plot that data using the plot command ( and a few others to convert to dB ).
a. Use one of the fixed windows that meets specification. Plot the
magnitude ( in dB ) and phase response. Note: the order of the
filter can be computed according to the formulas on page 20 of file
ADSP-10 and the example on page 23, for example for the Hamming
window :
4w = 6.6π/L
where L = filter order and 4w is the transition band width. ( 1 point )
b. Use a Kaiser window to meet the same specification. Plot the magnitude ( in dB ) and phase response. You may use MATLAB commands to estimate the order of the filter and implement using the fir1 command. ( 1 point )
c. Verify that both part a. and part b. meet the Rp and As specifications. ( 1 point )
Please use matlab
MATLAB script:
clc;close all;clear all;
%LPF
fs=[0.3*pi 0.6*pi];
Rp=0.5;As=50;
fp=[0.4*pi 0.5*pi];Fs=1000;
fc=(fp+fs)./(2*pi);
%Transition width
TW=min(fp(1)-fs(1),fs(2)-fp(2));
% FIR LPF using Hamming window
M=(6.6*pi/TW);
hd=fir1(M,fc,'bandpass',hamming(M+1));
%Frequency response
w=0:pi/2000:pi;
H=freqz(hd,1,w);
figure;
subplot(211)
plot(w/pi,20*log10(abs(H)),'r');grid;
xlabel('w Xpi');ylabel('|H(exp(jw)| in db');
title(' BPF using Hamming window-Magnitude ')
subplot(212)
plot(w/pi,angle(H),'b');grid;
xlabel('w Xpi');ylabel('<H(exp(jw)>');
title('Phase response')
% kaiser window
f =[fs(1) fp(1) fp(2) fs(2)]./pi;
Rp=(10^(Rp/20))-1;
Rs=10^(-As/20);
[M,Wc,Beta,ftype] = kaiserord(f,[0 1 0],[Rs Rp Rs]);
M = M+ rem(M,2);
wk = fir1(M,fc,ftype,kaiser(M+1,Beta),'noscale');
%Frequency response
H=freqz(wk,1,w);
figure;
subplot(211)
plot(w/pi,20*log10(abs(H)),'r');grid;
xlabel('w Xpi');ylabel('|H(exp(jw)| in db');
title('BPF using kaiser window-Magnitude ')
subplot(212)
plot(w/pi,angle(H),'b');grid;
xlabel('w Xpi');ylabel('<H(exp(jw)> in db');
title('Phase response')
c) Kaiser window meets the specifications exactly when compared with the hamming window.
1. Design a bandpass filter to meet the following specificatoins: lower stopband edge = 0.3π upper...
2. Design a digital lowpass filter to meet the following specifications: passband edge = 0.45π stopband edge = 0.5π Rp = 0.5 dB, As = 60 dB a. Design a Buttterworth filter, you may use the butterord and butter commands to implement. b. Design Chebyshev Type 1 filter ( use the equivalent commands to above ) c. Design an Elliptic fitler ( use the equivalent commands to part a ). d. List the order of each filter and find the...
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...
(From Mitra M7.5.) (using matlab)Design a digital Chebyshev-I lowpass filter operating at a sampling rate of 80 kHz with a passband edge frequency at 4 kHz, a passband ripple of 0.5 dB, and a minimum stopband attenuation of 45 dB at 20 kHz using the bilinear transformation method. Determine the order of the analog prototype using the command cheb1ord and then design the analog prototype using cheb1ap. Transform the analog filter into a digital one using the bilinear command. Plot...
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)...
3. (I0pts) An elliptic analog bandpass filter is to be designed with the following specifications: passband edge: 30 kHz and 50 kHz stopband edge: 25 kHz and 55 kHz peak passband ripple: 0.25dB minimum stopband attenuation: 40dB What's the bandedge of the corresponding elliptic analog low-pass filter? (Note: There are two possible solutions but you only have to provide one) (5pts) What's the filter order of the corresponding elliptic analog low-pass filter? (You can use Matlab to get your answer....
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 width: 1500Hz, (c) upper cutoff frequency: 2850 Hz, (d) upper transition width: 1300 Hz, (e) stop band attenuation: 60dB, (f) passband ripple 0.02 dB, and (g) sampling frequency: 8000Hz. Your answer needs to include (i) normalized frequencies, (ii) Window type, (iii) order of the filter and their numerical values computed by matlab command firwd(), and...
A. Design a low-pass filter (op-amp based cascade design) that meets the following (30) requirements 1. Cutoff frequency: 3.4 KHz 2. Passband gain: 20 dB 3. Stopband gain: -40 dB/decade 4. All resistors must be 1.0 k2 or higher. You have completed the design and implementation of the LP filter and are ready to deliver the filter for production. However, you are informed that the customer made a mistake and actually needed a stopb you have used in your design)....