Question

In: Electrical Engineering

Using Matlab, Design a Band-Stop Filter (BSF) that removes frequencies from 500Hz to 1000Hz in a...

  1. Using Matlab, Design a Band-Stop Filter (BSF) that removes frequencies from 500Hz to 1000Hz in a signal that is sampled at 10kHz.
  • Compare an elliptic filter of order 12 and 6 to an order-12 Yule-Walker filter design
  • Plot the magnitude of the two designs on the same plot.

Solutions

Expert Solution

MATLAB code:

%specifications for BSF

Fs=10000;%sampling frequency

%band edge frequencies

wp1=2*500/Fs;wp2=2*1000/Fs;

%Yule walker design

f = [0 wp1 wp2 1];

m = [1 0 0 1];N=12;

[b,a] = yulewalk(N,f,m);

w=0:pi/1000:pi;

H = freqz(b,a,w);

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

xlabel('w X pi');ylabel('|H(w)| in db')

%Elliptic Filter design for order 12

Rp=2;Rs=40;%Assumption

wp=[wp1 wp2];

[b,a] = ellip(6,Rp,Rs,wp,'stop');%elliptic returns 2n order transfer function. Hence enter order =6 for 12th order filter

H=freqz(b,a,w);

plot(w/pi,20*log10(abs(H)),'r');hold on;grid on;

%Elliptic Filter design for order 6

[b,a] = ellip(3,Rp,Rs,wp,'stop');%elliptic returns 2n order transfer function. Hence enter order =3 for 6th order filter

H=freqz(b,a,w);

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

legend('Yule walker for order 12','Elliptic for order 12','Elliptic for order 6')

ylim([-100,20])


Related Solutions

Design a linear phase, minimum-length, band-pass FIR digital filter in MATLAB to meet the specifications listed...
Design a linear phase, minimum-length, band-pass FIR digital filter in MATLAB to meet the specifications listed below. Use Rectangular Windowing (MATLAB function: fir1) pass-band frequencies: f_p1 = 0.35, f_p2 = 0.65 stop-band frequencies: f_s1 = 0.10, f_s2 = 0.80 pass-band tolerance: d_p <= 0.1 stop-band tolerance: d_s <= 0.1 I am attempting to learn more about MATLAB and I am having trouble with specific filter design and it would be helpful to have an example.
Matlab Design a FIR filter directly using fir1 function in matlab with parameter M = 50....
Matlab Design a FIR filter directly using fir1 function in matlab with parameter M = 50. Design FIR filters with different M = 5, 10, 50, 100, 500 and plot their frequency responses H(e j?) on the same figure.
4)Design a band-pass filter with a passband from 500 Hz to 2000 Hz using “butter” routine...
4)Design a band-pass filter with a passband from 500 Hz to 2000 Hz using “butter” routine of MATLAB. Assume a sampling frequency of 8KHz. Let the filter order be M=4. Plot the magnitude response and provide the filter coefficients and the transfer function
How to design FIR lowpass filter using matlab. Note : Do not write matlab code. Only...
How to design FIR lowpass filter using matlab. Note : Do not write matlab code. Only explain the steps of designing filter
Design a second-order band-pass filter using resistors and capacitors for a microphone for a hearing aid,...
Design a second-order band-pass filter using resistors and capacitors for a microphone for a hearing aid, which allows signals in the range of 1 to 16 kHz to pass through. For the component values that you chose, at what frequency is the transfer function at a maximum?
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...
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
Design a wide band pass filter with fL = 500 Hz, fH = 2kHz and a...
Design a wide band pass filter with fL = 500 Hz, fH = 2kHz and a pass band gain of 10.
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.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT