Butterworth filter how it works
21 views (last 30 days)
Show older comments
So I wanted to remove the noise of my acceleration data signal so I could integrate to get velocity and integrate again to get displacement. I found about "filtering" on mathworks and I got the code to design but I cannot understand how it works, can someone help tellimg me what each step means and how can I modify it,if needed at all? Here's the code :
_%% Design High Pass Filter
fs = 8000; % Sampling Rate
fc = 0.1/30; % Cut off Frequency
order = 6; % 6th Order Filter
%% Filter Acceleration Signals
[b1 a1] = butter(order,fc,'high');
accf=filtfilt(b1,a1,acc); %acc : my acceleration data
I used hold on to plot both my acceleration with and without the filter to compare the results. The acceleration data had included the g acceleration and the filter removed it solely. finally something that I want to add is that I read someqhere about a function "detrend" clearing the signal. What's the difference between those two?
0 Comments
Answers (1)
Star Strider
on 21 May 2016
You might find my discussion in: How to design a lowpass filter for ocean wave data in Matlab? a bit more understandable.
0 Comments
See Also
Categories
Find more on Digital Filtering 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!