Highpass Blackman Filter Design
이전 댓글 표시
Hello, I'm looking for some help designing a highpass filter that uses a blackman window and has a cutoff frequency at 0.001Hz for an input signal sampled at 1Hz. I've tried playing around with designfilt(), but can't seem to get the magnitude response quite right. Any suggestions?
채택된 답변
추가 답변 (1개)
Samuel Low
2018년 4월 10일
if true
clc; clear all;
fs = 10000; % Sampling frequency in Hz
Wp = 2000; % Passband frequency in Hz
Ws = 2500; % Stop band frequency in Hz
f = [Wp,Ws];
fStop = 0.5*(Wp+Ws)/fs;
dev = [0.005,0.005];
a = [1,0];
[n,Wn,beta,ftype] = kaiserord(f,a,dev,fs);
% We use the order estimated in kaiserord
BMWindow = blackman(n+1)
b = fir1(n,fStop,'high',BMWindow) % Normalise the frequencies
freqz(b,1,512)
title('Highpass Filter Design')
end
I determined the filter length using the Kaiser Order function (which determines what my filter length should be) but you can just set any arbitrary N that you like, it just happens to have this requirement for one of my assignments and I was lazy to change it. I then defined a Blackman window using the 'blackman' function, and used this window function as one of the arguments in the variable 'b'.
Hope this helps.
카테고리
도움말 센터 및 File Exchange에서 Blackman에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!