I was planning to develop Android / iOS applications that enable users to measure 3D length using their smartphones.

According to this question, you need to know at least the time-varying bias that affects the accelerometer's signal. Hence, I need to estimate the bias every time a user is going to measure. How can I do that? I've seen articles about this estimation but to be honest I'm not expert in signal processing so I didn't understand them. Can you explain a method to estimate?

  • $\begingroup$ This is a bit broad, but I think you can narrow things down by going through bzarg.com/p/how-a-kalman-filter-works-in-pictures . Bias estimation either happens within your model, or you add a preprocessing step that uses additional axes to estimate the direction of gravity and remove it from your instantaneous estimate. My guess is that if you're doing bias estimation, you'll inherently "blow up" your reduced 1D problem back to 3D, and could basically work 3D from the start (still do the 1D implementation first! Just without estimating a changing bias – assume the phone is held … $\endgroup$ Commented Jun 13, 2018 at 9:33
  • $\begingroup$ … steadily and calibrate once before the measurement starts. As soon as 1D works, extend to 3D, and then add dynamic offset compensation.) $\endgroup$ Commented Jun 13, 2018 at 9:34
  • $\begingroup$ You may want to watch Sensor Fusion on Android Devices (2010). $\endgroup$ Commented Jun 14, 2018 at 13:37

1 Answer 1


According to this IEEE article.

You can model errors this way: $$ a = f*a' + g + b + \eta$$ where $a$ is the actual acceleration, $f$ is a 3x3 matrix to model scaling, misalignments, cross-axis and ... errors. $a'$ is sensor's data, $g$ is gravity, $b$ is 3x1 matrix to model bias, and $\eta$ is 3x1 matrix to model noise.

You can calibrate accelerometer by reading $a'$ from sensor data when the accelerometer is in static positions. In static positions, the only force effecting accelerometer is gravity. So by minimizing this summation, $f$ and $b$ can be computed(calibration): $$ (|a_0|^2 - |g|^2)^2 + (|a_1|^2 - |g|^2)^2 + ... + (|a_N|^2 - |g|^2)^2 $$ where $N$ is number of static positions.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.