i think the solution is found below and that my problem stems from my ignorance of how filters work. i just wanted to make sure that the explanation below, found elsewhere, is the correct one.
I'm trying to low-pass filter my data with a bessel filter cut-off at 5000Hz. (sampled at 40kHz): > [b,a] = besself(2,5000/20000); > f = filtfilt(b,a,input);
filtered version shows a high-passed look with a much lower magnitude. If I substitute besself with butter it seems to work as expected... tried higher orders, lower cut-off freqs, those lead to seemingly better high pass filters...
"
[am i using the coefficients in the s-domain in a command that i should feed with coefficients in the z-domain? when i use the matlab command "filtfilt", does matlab think i'm entering z-coefficients? how can i use the filter function with bessel the same way as with butter?]
"
%**************************************************************** n = 5 w0 = 2*pi*5000; %The frequency with constant group delay %(it isn't cut-off frequency);
%Calculating the filter in the "s-domain" [b,a]= besself(n,w0);
%Plotting the bode of the filter. transfer = tf(b,a); bode(transfer);
%If you want to use the matlab command filter or filtfilt you have %to use a method for analog-to-digital filter conversion.
%Defining the sampling frequency. fs > 2*max_frequency. fs = 4*5000;
%Maybe you have to use the prewarp fp, when using this command. [num,den] = bilinear(b,a,fs);
%Filtering the signal X. y = filter(num,den,X);
"
i found that code at the same place i found the explanations (dsprelated.)
so it sounds like i have a similar problem but that transforming the besself outputs into something "digital" that the filter function will understand is the solution.
is that correct???
thanks for any efforts, b s