Question

In: Electrical Engineering

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.

Solutions

Expert Solution

To design a filter using fir1, the order of the filter and cut-off frequency and type of the filter should be mentions. Since a parameter M is given without mentioning the details. Explicitly, M should be the order of filter. Let the filter be band pass filter with cut-off frequency between 0.35*pi and 0.65* pi. The command to design FIR filter is b = fir1(n,Wn,ftype), Where n is the order of filter , Wn is the cutoff frequency and ftype is the type of filter.

Matlab code:

clear all;
clc;
close all;
%%
M=input('Enter the order of the filter : '); % enter the value of M
Wn=[0.35 0.65];                     % give the lower and upper cut off frequency of band pass filter

b = fir1(M,Wn);         % fir band pass filter with order M and cut off frequency Wn
freqz(b,1,512)      % magnitude and pahse response

Ouput:


Related Solutions

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 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.
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 .
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. (Please use MATLAB to give all the answers)
Using matlab a) Find the transfer function of a fourth order Butterworth filter and plot the...
Using matlab a) Find the transfer function of a fourth order Butterworth filter and plot the magnitude response. b) Find the poles.
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
Write a report 3-4 pages in DSP Digital FIR filter design Analysis {Low Pass Filter(LPF) ,High...
Write a report 3-4 pages in DSP Digital FIR filter design Analysis {Low Pass Filter(LPF) ,High Pass Filter(HPF), Band Pass Filter (BPF), Band Stop Filter (BSF)} Design 1-way of design and system pools evaluation
BUCK FILTER TRANSFER FUNCTION (CCM) USING MATLAB I. State-space Modelling and Transfer Function of Ideal Buck...
BUCK FILTER TRANSFER FUNCTION (CCM) USING MATLAB I. State-space Modelling and Transfer Function of Ideal Buck Converter 1. Write the AC state-space for an ideal Buck Converter under CCM, given the state-variables iL^(t) and vc^(t), input variables d^(t) and vs^(t), and output variables iL^(t) and vc^(t). 2. Create the state-space model in Matlab using R=5/3 ohms, L=10 uH, C=242 uF, Vs=Vin= 20 V, Vo = 5 V, D=5/20 3. Extract the transfer functions from the state-space model. vo^(s)/vs^(s), vo^(s)/d^(s), iL^(s)/vs^(s),...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT