1
$\begingroup$

I filtered my signal with low pass filter butterworth forth order with cutoff frequency of 50 hz. However when I compare the filtered signal with original one in frequency domain, it seems that the cut off frequency started from 25 hz instead of 50.

The comparison of the original with filtered signal in frequency domain

this is my matlab code and my data from here

%sampling frequency is 146

[b,aa] = butter(10, 50/146,'low');
data_filtered = filtfilt (b,aa,data);

did i make some mistake ?

$\endgroup$
2
$\begingroup$

did i make some mistake ?

Yes. The cutoff frequency is specified relative to the Nyquist Frequency and not the sample rate

From the documentation

Wn must be 0.0 < Wn < 1.0, with 1.0 corresponding to half the sample rate.

Also: you design a 10th order butterworth and filtfilt() doubles that again to 20. That will give you significant domain "ringing".

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.