Remove gravity factor from accelerometer
조회 수: 14 (최근 30일)
이전 댓글 표시
Vasileios Skaramagkas
2019년 6월 23일
답변: Sulaymon Eshkabilov
2019년 6월 23일
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!