DSPRelated.com
Forums

Re: problems implementing 8th order bessel-filter

Started by Unknown December 19, 2007
Dear Dwisuu,

I think I know what's is going wrong. You are using the coefficients in the
s-domain in a command that you should feed with coefficients in the
z-domain. You are trying to make an analog filter using the command
"besself" and matlab is returning coefficients in the s-domain, when you use
the matlab command "filtfilt" matlab thinks that you are entering with
z-coefficients. All you have to do is to use a method for analog-to-digital
filter conversion. A good method is the bilinear.

Below follows some code to explain.

%****************************************************************
n = 5
w0 = 2*pi*2500; %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*2500;

%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);

%*******************************************************************

Best regards,
AndrTahim
2007/12/9, d...@gmail.com :
>
> hi, I'm trying to low-pass filter my input signal with an 8th order
> bessel filter, cut-off at 2500Hz.
>
> my code goes like that:
>
> [b,a] = besself(8,1250/5000);
> filteredSignal = filtfilt(b,1,inputSignal);
>
> Problem: the filtered vector doesn't show ANY difference in shape compared
> to the original input signal, except that it has a much lower magnitude.
> If I substitute besself with butter it does show a nice filtering effect,
> but I need a bessel filter.
> I tried it with higher orders and lower cut-off freqs, but no effect
> whatsoever.
>
> what am I missing here?
>
>

--
AndrTahim
a...@gmail.com
MSN: c...@hotmail.com
(48) 9132-3007