Question

In: Electrical Engineering

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 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.

PLEASE SLOVE USING MATLAB

Solutions

Expert Solution

solution::

a) and b)

Script:

clc;close all;clear all;

%Filter specifications

fs1=0.3*pi;fs2=0.6*pi;Rp=0.5;As=50;

fp1=0.4*pi; fp2=0.5*pi;Fsamp=1000;

fc1=(fp1+fs1)/2;fc2=(fp2+fs2)/2;

fc=[fc1/pi fc2/pi];

%Transition width

delw=min(fp1-fs1,fs2-fp2);

% Hamming window

L=(6.6*pi/delw)

hh=fir1(L,fc,'bandpass');%Default window used with fir1 is hamming window

w=0:pi/2000:pi;

H=freqz(hh,1,w);

figure;

subplot(221)

plot(w/pi,20*log10(abs(H)),'b');grid;

xlabel('w Xpi');ylabel('|H(exp(jw)| in db');

title(' LPF using Hamming window-Magnitude in db ')

subplot(222)

plot(w/pi,angle(H),'g');grid;

xlabel('w Xpi');ylabel('<H(exp(jw)>');

title('Phase response')

%kaiser window

fcut =[fs1 fp1 fp2 fs2];

fcc=Fsamp*fcut/(2*pi);

Mag = [0 1 0];

rp=1-(10^(-Rp/20)-1);

rs=10^(-As/20);

att= [rs rp rs];

[L,Wc,beta,ftype] = kaiserord(fcc,Mag,att,Fsamp);

L = L + rem(L,2)

%Kaiser window

hk = fir1(L,fc,ftype,kaiser(L+1,beta),'noscale');

%plots

H=freqz(hk,1,w);

subplot(223)

plot(w/pi,20*log10(abs(H)),'m');grid;

xlabel('w Xpi');ylabel('|H(exp(jw)| in db');

title('LPF using kaiser window-Magnitude in db ')

subplot(224)

plot(w/pi,angle(H),'g');grid;

xlabel('w Xpi');ylabel('<H(exp(jw)> in db');

title('Phase response')

c)

To implement the same specifications, N=67 is required for Hamming window. But this is achieved at the order of N=61 when kaiser window is used.

please give a thumb...thank you...


Related Solutions

a. Design a broadband Butterworth bandpass filter with a lower cutoff frequency of 500 Hz and...
a. Design a broadband Butterworth bandpass filter with a lower cutoff frequency of 500 Hz and an upper cutoff frequency of 4500 Hz. The passband gain of the filter is 20 dB. The gain should be down at least 15 dB at 200 Hz and 11.25 kHz. Use 20 nF capacitors in the high-pass circuit and 10 k\Omega resistors in the low-pass circuit. b) Draw a circuit diagram of the filter and label all the components.
2. Design a digital lowpass filter to meet the following specifications: passband edge = 0:45π stopband...
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 butteworth and butter commands to implement. b. Design Chebyshev Type 1 filter ( use the equivalent commands to above ) c. Design an Elliptic filter ( use the equivalent commands to part a ). d. List the order of each filter and find the...
In Matlab, Design a model for a bandpass filter with a bandwidth of 4000 Hz, and...
In Matlab, Design a model for a bandpass filter with a bandwidth of 4000 Hz, and a center frequency as specied below. Once you have the model, it is easy to programmatically change the center frequency. center frequency: 20 KHz, 24.5 KHz, 29 KHz, 33.5 KHz, 38 KHz, 42.5 KHz, 47 KHz
In Matlab, Design a model for a bandpass filter with a bandwidth of 4000 Hz, and...
In Matlab, Design a model for a bandpass filter with a bandwidth of 4000 Hz, and a center frequency as specied below. Once you have the model, it is easy to programmatically change the center frequency. center frequency: 20 KHz, 24.5 KHz, 29 KHz, 33.5 KHz, 38 KHz, 42.5 KHz, 47 KHz
A bandpass FIR filter, of length nine (nine coefficients) is required. It is to have lower...
A bandpass FIR filter, of length nine (nine coefficients) is required. It is to have lower and upper cut-off frequencies of 3 and 6 kHz respectively and is intended to be used with a sampling frequency of 20 kHz. Find the filter coefficients using the Fourier method with a rectangular window.
1. We want to design a discrete-time bandpass filter that samples and processes analog signals. The...
1. We want to design a discrete-time bandpass filter that samples and processes analog signals. The frequency response is 0 at 0 Hz and 500 Hz, and resonant occurs at 125 Hz. The sampling interval T= 1 msec. Find the transfer function H[z] of these filters and mark the poles and zeros on the complex plane.
Use a 5 nF capacitor to design a series RLC bandpass filter, as shown at the...
Use a 5 nF capacitor to design a series RLC bandpass filter, as shown at the top of Fig. 14.27.The center frequency of the filter is 8 kHz, and the quality factor is 2. a) Specify the values of R and L.using pspice b) What is the lower cutoff frequency in kilohertz? using pspice c) What is the upper cutoff frequency in kilohertz?using pspice d) What is the bandwidth of the filter in kilohertz?using pspice
Design a bandpass active filter to pass frequencies between 700 Hz and 2100 Hz, and with...
Design a bandpass active filter to pass frequencies between 700 Hz and 2100 Hz, and with K= 63. Please include the transfer function, blot plot, multisim, and the matlab code.
What I am trying to do is to design a Butterworth Bandpass filter using Matlab, High...
What I am trying to do is to design a Butterworth Bandpass filter using Matlab, High frequency must equal to 16 Hz and lower frequency must be 10Hz (passBand). and the input signal must be a white noise signal. here is my code : mu=0; sigma=2; X= sigma*randn(500,1)+mu; %Generating White Noise signal Fs=500;%Sampling Frequency Fh= 16; Fl=10; order=6; [b,a]=butter(order,[Fh Fl]/(Fs/2),'bandpass');%Butterworth BandPass filter XX=filtfilt(b,a,X);%filter the signal both forward and backword in time Actually, I am not sure about Fs value that...
Design a LP FIR filter to meet the following specifications using the window method. Use a...
Design a LP FIR filter to meet the following specifications using the window method. Use a Blackman window. Fs = 25 kHz Fc = 5.0 kHz (3 dB down) Attenuation = 80 dB at 7 kHz Give all the relevant plots (impulse, frequency responses) and the performance of the final filter. Compare this filter to one designed using the optimal method .
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT