Hi All,
I have attempted to create a low-pass fourth-order zero-lag Butterworth filter with R using the signal package. I have sampled my data at 2000 Hz and would like to use a cut-off frequency of 150 Hz. I have put "2" to make this a second-order filter because I am using the filtfilt function to filter it forwards and backwards, however, I suspect this will have a 6Db down at the cut-off frequency rather than 3Db and thus, will not be a Butterworth filter. Any advice on how to create a fourth-order BF filter on R would be hugely appreciated as my engineering side of things is not the strongest, thank you.
My current code is as follows:
'''bf = butter(2,0.15,type = c("low"), plane = c("z"))
filtereddata = filtfilt(bf, data$`Moment`)'''
Thank you,
Lucy
I have attempted to create a low-pass fourth-order zero-lag Butterworth filter with R using the signal package. I have sampled my data at 2000 Hz and would like to use a cut-off frequency of 150 Hz. I have put "2" to make this a second-order filter because I am using the filtfilt function to filter it forwards and backwards, however, I suspect this will have a 6Db down at the cut-off frequency rather than 3Db and thus, will not be a Butterworth filter. Any advice on how to create a fourth-order BF filter on R would be hugely appreciated as my engineering side of things is not the strongest, thank you.
My current code is as follows:
'''bf = butter(2,0.15,type = c("low"), plane = c("z"))
filtereddata = filtfilt(bf, data$`Moment`)'''
Thank you,
Lucy