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
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.
Vasileios Skaramagkas
Dear Jim Riggs,
I want to be able to measure low frequencies (between 0.5 and 30Ηz) by doing FFT.

请先登录,再进行评论。

采纳的回答

Sulaymon Eshkabilov
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 个)

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by