Highpass Blackman Filter Design
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (1)
Samuel Low
le 10 Avr 2018
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.
Catégories
En savoir plus sur Blackman dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!