Remove gravity factor from accelerometer
10 次查看(过去 30 天)
显示 更早的评论
Hello,
I am using a 3axis acceleromter ADXL345 and I want to frequencies between 0.5-25 Hz. I want to do some filtering first in order to get rid of the gravity factor and the dv offset as well as some noise. I have read multiple articles on the internet but none seems to be very clear. Can someone give me some quick tips to guide me with my task?
Thank you in advance
2 个评论
Jim Riggs
2019-6-23
This question is quite fuzzy for the following reasons:
Accelerometers do not measure gravity - they measure specific force which is the applied force (without the effects of gravity). Most people who use accelerometers that want to know the acceleration of the body being measured have to ADD the effect of gravity to get the true acceleration.
If you want to know how to select a filter for noise rejection, we need to know a bit more about the application.
If you want to estimate sensor bias, that is a different problem.
You need to restate your question and provide more information.
采纳的回答
Sulaymon Eshkabilov
2019-6-23
Hi,
In your case, to reduce noise influence from your acceleration measurements with accelerometers you would need to employ band-pass filter (e.g. Butterworth) within [0.5, 30] Hz. E.g.:
SN = ... % Measured signal
% Band pass frequency range is between 0.5 and 30 Hz.
f1 = 0.5; f2=30;
% Normalized pass frequency ranges (Wn1, Wn2):
Wn1=f1/(0.5*fs);
Wn2=f2/(0.5*fs);
% Second order (N=2) filter passes all signal components within
% a frequency range of: [Wn1 Wn2]
N=2;
% Compute second order filter coefficients:
[b, a] = butter(N, [Wn1, Wn2], 'bandpass');
filter_F = filter(b, a, SN);
% Take FFT... of the filtered signal: filter_F
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Analog Filters 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!