DSP digital bandpass filter

조회 수: 8 (최근 30일)
John Bravo
John Bravo 2018년 10월 9일
편집: Dimitris Kalogiros 2018년 10월 9일
A digital bandpass filter has the following specifications:
Passband frequency edge: 0.2pi and 0.6pi rad/sample
Passband ripple: < 1dB
Stopband frequency edge: 0.1pi and 0.8pi rad/sample
Stopband attenuation: > 40dB
Using the windowing method, what is the lowest-order FIR filter that will meet the desired specifications? Give the numerator coefficient B.

답변 (1개)

Dimitris Kalogiros
Dimitris Kalogiros 2018년 10월 9일
편집: Dimitris Kalogiros 2018년 10월 9일
%BANDPASSFILTER Returns a discrete-time filter object.
% MATLAB Code
% Generated by MATLAB(R) 9.4 and Signal Processing Toolbox 8.0.
% Generated on: 09-Oct-2018 22:23:40
% Equiripple Bandpass filter designed using the FIRPM function.
% All frequency values are normalized to 1.
Fstop1 = 0.1; % First Stopband Frequency
Fpass1 = 0.2; % First Passband Frequency
Fpass2 = 0.6; % Second Passband Frequency
Fstop2 = 0.8; % Second Stopband Frequency
Dstop1 = 0.01; % First Stopband Attenuation
Dpass = 0.057501127785; % Passband Ripple
Dstop2 = 0.01; % Second Stopband Attenuation
dens = 20; % Density Factor
% Calculate the order from the parameters using FIRPMORD.
[N, Fo, Ao, W] = firpmord([Fstop1 Fpass1 Fpass2 Fstop2], [0 1 0], ...
[Dstop1 Dpass Dstop2]);
% Calculate the coefficients using the FIRPM function.
b = firpm(N, Fo, Ao, W, {dens});
Hd = dfilt.dffir(b);
% taps of this filter: Hd.Numerator
figure; stem(Hd.Numerator, '-b^'); grid on; zoom on; title('taps');
% frequency response
figure; freqz(Hd);

카테고리

Help CenterFile Exchange에서 Signal Generation, Manipulation, and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by