How to create a function for filtered data using a Nth order lowpass digital Butterworth filter.
1 view (last 30 days)
Show older comments
This question gives us the body of the function in general to work with.
function [filtereddata]= filterdata(rawdata, samplingrate, cutoff, filterorder)
the raw data is given as transducer(variable) data, as well as the samplingrate(variable) outside of the function. I am not sure how to identify the cutoff value for a Butterworth filter.
Since I am only using 2 columns of data, I think the filterorder is 1 as the function will be re-written for the other raw data.
My question is: how to identify the cutoff frequency and what the filterorder would be when making the butterworth function?
0 Comments
Answers (1)
Wayne King
on 2 Mar 2012
Hi Raymond, the cutoff frequency should be a design parameter for you. You should decide what the cutoff frequency is based on what frequency content you want to pass and what frequency content you want to attenuate. I'm sure the filter order will be greater than 1.
Once you determine your cutoff frequency, you can use buttord() to determine the lowest order for a Butterworth filter design (you'll also need to like about passband ripple and stopband attenuation) that meets your specifications.
1 Comment
Walter Roberson
on 2 Mar 2012
"you'll also need to like about [...]" ? I think a word or three got missed?
See Also
Categories
Find more on Digital Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!