Butterworth filter how it works

22 visualizzazioni (ultimi 30 giorni)
tupac1971ful
tupac1971ful il 21 Mag 2016
Risposto: Star Strider il 21 Mag 2016
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?

Risposte (1)

Star Strider
Star Strider il 21 Mag 2016
You might find my discussion in: How to design a lowpass filter for ocean wave data in Matlab? a bit more understandable.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by