Question

In: Electrical Engineering

Design a 9th order low-pass filter with cut-off ??/ 2 using the Hanning window. a) Plot...

Design a 9th order low-pass filter with cut-off ??/ 2
using the Hanning window.
a) Plot its frequency response. b) Express the Input/ Output relation. c) let ??[??] = { 0           ?????? ?? = 0,1,2…..,10 1    , ?????? ?? = 11,12,…..30

       Calculate ?? = ?? ? ?. Plot and comment on the shape of y.

Solutions

Expert Solution

clc;
clear all;
rp = input('Enter the passband ripple = ');
rs = input('Enter the stopband ripple = ');
fp = input('Enter the passband frequency = ');
fs = input('Enter the stopband frequency = ');
f = input('Enter the sampling frequency = ');
wp = 2*fp/f;
ws = 2*fs/f;
num = -20*log10(sqrt(rp*rs))-13;
dem = 14.6*(fs-fp)/f;
n = ceil(num/dem);
n1 = n+1;
if (rem(n,2)~=0)
n1 = n;
n = n-1;
end
y = hanning(n1);
% low-pass filter
b = fir1(n,wp,y);
[h,o] = freqz(b,1,256);
m = 20*log10(abs(h));
subplot(2,2,1);
plot(o/pi,m);
title('Magnitude Response of LPF');
ylabel('Gain in dB ---->');
xlabel('Normalised Frequency ---->');
grid on;
% high-pass filter
b = fir1(n,wp,'high',y);
[h,o] = freqz(b,1,256);
m = 20*log10(abs(h));
subplot(2,2,2);
plot(o/pi,m);
title('Magnitude Response of HPF');
ylabel('Gain in dB ---->');
xlabel('Normalised Frequency ---->');
grid on;
% band pass filter
wn = [wp ws];
b = fir1(n,wn,y);
[h,o] = freqz(b,1,256);
m = 20*log10(abs(h));
subplot(2,2,3);
plot(o/pi,m);
title('Magnitude Response of BPF');
ylabel('Gain in dB ---->');
xlabel('Normalised Frequency ---->');
grid on;
% band stop filter
b = fir1(n,wn,'stop',y);
[h,o] = freqz(b,1,256);
m = 20*log10(abs(h));
subplot(2,2,4);
plot(o/pi,m);
title('Magnitude Response of BSF');
ylabel('Gain in dB ---->');
xlabel('Normalised Frequency ---->');
grid on;


Related Solutions

Q1: Design a 9th order low-pass filter with cut-off ?? /2 using the Hanning window. a)...
Q1: Design a 9th order low-pass filter with cut-off ?? /2 using the Hanning window. a) Plot its frequency response. b) Express the Input/ Output relation. c) let ??[??]{ 0    ??or ??=0,1,2…..,10 {1 ??or ??=11,12,…..30 Calculate ??=????. Plot and comment on the shape of y. Q2: Design a 9th order high-pass filter with cut-off ??/ 4 using the Hanning window. a) Plot the frequency response. b) Express the Input/ Output relation. c) let ??[??]={ 0    ??or ??=0,1,2…..,10 {1...
Butterworth filter a)Design a 5th order low pass Butterworth low-pass filter with a cut-off frequency of...
Butterworth filter a)Design a 5th order low pass Butterworth low-pass filter with a cut-off frequency of 1592 Hz and a dc gain of 3dB. Find and present the mathematical transfer function of the filter, showing all your steps. b) Write a Matlab code to plot the magnitude of this function with a linear scale in dB units on the ordinate, and a log scale of frequency on the abscissa. The plot range should be: ordinate- linear scale from -100dB to...
Design and build an active second order low pass filter with cut off frequency of 8kHz...
Design and build an active second order low pass filter with cut off frequency of 8kHz using opamp -Show circuit diagram -Show input voltage and frequency - Show all calculations and placement of indicator to measure output frequency to measure cut off
Using a general Op-Amp 741, design a first order and a second-order low-pass filter with cut...
Using a general Op-Amp 741, design a first order and a second-order low-pass filter with cut off frequent of 5kHz. Subject sinusoidal inputs with frequency from 1kHz to 10kHz and plot the frequency responses for both the filters and provide your opinion.
Design a second order (two pole) high-pass filter for the following specifications Cut-off frequency, fo or...
Design a second order (two pole) high-pass filter for the following specifications Cut-off frequency, fo or fH = 2kHz   Maximally Flat, i.e. Q=1/√2 > Justify any assumption you make. > Draw circuit with all designed values. > Draw the frequency response (Gain magnitude only)
I need to obtain an approximate implementation of a Butterworth low pass first order filter using...
I need to obtain an approximate implementation of a Butterworth low pass first order filter using P-spice. It suppose to have a cutoff frequency of 1000Hz and the attenuation cutoff frequencies fixed at 3db.
a high pass rc filter can be changed to a low pass filter by
a high pass rc filter can be changed to a low pass filter by
Code in Matlab for a low pass filter and a high pass filter. Each filter must...
Code in Matlab for a low pass filter and a high pass filter. Each filter must show the frequency response (magnitude and phase) in graphs properly labelled.
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?
MATLAB. Design your own low-cut shelving filter which can cut the low frequency of given music...
MATLAB. Design your own low-cut shelving filter which can cut the low frequency of given music signal. Include magnitude and phase plot of your filter.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT