By Michael Stanley – A question that should be asked during physical design of any product incorporating sensors is: “Where should be sensors be located within the product?” Like almost anything else in life, “It depends … ” is the answer. This post discusses accelerometer placement. We’ll touch on magnetic sensors next time around.
If your application is such that the sensor is statically fixed in space, or at least not rotating, it doesn’t really matter where you mount the accelerometer on your board. But if the device can rotate, things get a lot more interesting.
The rate of change transport theorem, which can be found in any rigid body dynamics textbook, relates the rate of change of a vector r as observed in two different reference frames. For our purposes, the first is the fixed (earth) frame and the second (body frame) rotates and translates relative to the first. In equation form:
(dr/dt)_{f }=(dr/dt)_{r} + ω X r_{r} (Eqn. 1)
where the subscripts indicate the frame of reference.
The transport theorem is a fundamental relationship, based upon basic principles of geometry. It applies to ANY vector observable from two independent reference frames. You should note that both left and right sides of the equation are vectors.
We are going to repeatedly apply the transport theorem to derive a relationship defining the acceleration of an object in the fixed earth frame based upon sensor measurements made in the body frame.
In graphical form, consider movable point “P”, observable from two different frames of reference. “O_{f}” is the origin of the fixed earth reference frame. “O_{r}” is the origin of the rotating reference frame.
By basic geometry
r’ = R + r (Eqn. 2)
Note that
V = (dr/dt)_{f}
V is the rate of change of vector r as viewed in the fixed reference frame. It can also be viewed as the velocity of P as viewed in the fixed earth frame
V_{r} = (dr/dt)_{r}
V_{r }is the he rate of change of vector r as viewed in the rotating reference frame. It can also be viewed as the velocity of P as viewed within the rotating reference frame.
ω = the angular velocity of the rotating frame relative to the fixed earth frame
by differentiating Eqn. 2, we get
(dr’/dt)_{f} = (dR/dt)_{f} + (dr/dt)_{f} (Eqn. 3)
which we can also write as
V_{r’} = V + (dr/dt)_{f} (Eqn. 4)
The quantity V can be interpreted as the translational velocity of the rotating frame relative to the fixed frame of reference. V_{r’} is the velocity of point P as observed in the fixed earth frame. Typically, this is the quantity we are trying to measure.
We can apply the transport theorem to the right most term in Eqn. 4 to get
V_{r’} = V + (dr/dt)_{r} + ω X r (Eqn. 5)
V_{r’} = V + V_{r} + ω X r (Eqn. 6)
Now differentiate and take advantage of the math identity:
d/dt (A X B) = (dA/dt X B) + (A X dB/dt) (Eqn. 7)
to get
A_{r’} = (dV_{r’}/dt)_{f }= (dV/dt)_{f} + (dV_{r}/dt)_{f} + (dω/dt)_{f} X r + ω X (dr/dt)_{f} (Eqn. 8)
Let
A = (dV/dt)_{f}
where A is the acceleration of the second frame of reference relative to the fixed earth frame.
At the same time, apply the transport theorem again to substitute
(dV_{r}/dt)_{f }=(dV_{r}/dt)_{r}+ ω X V_{r} (Eqn. 9)
to get
A_{r’} = A+ (dV_{r}/dt)_{r}+ ω X V_{r}+ (dω/dt)_{f} X r + ω X (dr/dt)_{f} (Eqn. 10)
Let
α = (dω/dt)_{f }
where α is the rate of angular acceleration, and
A_{r} = (dV_{r}/dt)_{r}
where A_{r} is the rate of acceleration of P relative to O_{r}. Then
A_{r’} = A+ A_{r}+ ω X V_{r}+ α X r + ω X (dr/dt)_{f} (Eqn. 11)
and one last substitution using the transport theorem for the right most term in Eqn. 11 to get
A_{r’} = A+ A_{r}+ ω X V_{r}+ α X r + ω X ((dr/dt)_{r} + ω X r) (Eqn. 12)
A_{r’} = A+ A_{r}+ ω X V_{r}+ α X r + ω X (V_{r} + ω X r) (Eqn. 13)
A_{r’} = A+ A_{r}+ ω X V_{r}+ α X r + ω X V_{r} + ω X (ω X r)) (Eqn. 14)
A_{r’ }= | A + A_{r} + | <– Inertial Acceleration | |
2ω X V_{r} + | <– Coriolis Acceleration | ||
α X r + | <– Euler Acceleration | ||
ω X (ω X r)) | <– Centripetal Acceleration | (Eqn. 15) |
Eqn. 15 is a classic result, and can give you a lot of insight into tradeoffs associated with accelerometer placement. To see how, let’s modify our previous figure by locating O_{r} at the center of mass of a portable consumer device. Point P represents the location of our accelerometer within the same device. Point O_{f} is essentially the center of the earth.
Since points P and O_{r} are fixed relative to one another (they are part of the same rigid body), A_{r} and V_{r} are zero by definition, and drop out of the equation. If the rotational rate of the device is zero, then ω=0, and both Coriolis and Centripetal acceleration terms drop out of the equation. Finally, if α (the rotational acceleration) is zero, there will be no Euler acceleration. If all these terms hold true, then the value measured by our accelerometer is
A_{r’} = A = the translational rate between the two frames of reference
which is exactly what we would like. But what if ω≠0? If we collapse point P back into the center of mass (O_{r}), then both Euler and Centripetal accelerations still drop out.
What happens if you ignore these effects? Let’s work an example assuming that angular acceleration is zero, but angular rotation is not:
A_{r’ }= | A + A_{r} + | <– Inertial Acceleration | |
ω X (ω X r)) | <– Centripetal Acceleration | (Eqn. 16) |
To bound the problem, I’m going to take advantage of the identity:
A X B = |A| |B| sin Θ n
where Θ is the angle between vectors A and B, and n is a unit vector perpendicular to the plane containing both A and B.
Looking at just the extremes, we can see that the Centripetal acceleration ranges between +/- |ω|^{2}r in magnitude, depending upon the axis of rotation and accelerometer offset from center of mass.
Assume
- ω = 2π radians/sec
- r = 5 cm
Putting numbers to Eqn. 16, we get
Centripetal Acceleration = +/- 0.05 (2π)^{2} =+/- 1.97 m/s^{2}.
That’s better than 1/5 gravities! At a very modest rate of rotation!
Basically, sensor fusion mathematics get much easier when the accelerometer is at the center of mass (which is also the center of the rotating frame of reference). If you can make the assumption that, in your use case, the device is in a quasi-static state with no rotation, it doesn’t matter. If not, you need to place the sensor at the center of mass OR account for the effects mathematically. That involves keeping continuous track of the axis and rate of rotation and then making the adjustments required to separate out the Centripetal acceleration.
References:
- Dynamics of Particles and Rigid Bodies: A Systematic Approach, Anil V. Rao, Cambridge University Press, 2006
- Motion in a Non-Inertial Frame, Alain J. Brizard, Saint Michael’s College, http://www.dartmouth.edu/~phys44/lectures/Chap_6.pdf
It would be really useful if you gave us the option to download these articles as pdf files instead of cutting, pasting and converting ourselves … and getting a messy format.
Just a little friendly customer feedback.
Kind regards
John Moran
John,
I agree. There have been a number of times I wished I had that feature as well. I don’t know if it is possible with the tool we use for our blog site, but I will pass along your suggestion to the Freescale web support team.
Thanks,
Mike
Another alternative would be to compose the article in Word (or something (anything) better) and print it to Adobe PDF (via Acrobat Pro).
Salamat.
Jeff
If you use Firefox, try pdfit:
https://addons.mozilla.org/en-us/firefox/addon/pdfit/
Very useful.
Tom
Obviously we need to study the references you indicate, but it is a very good article. Thanks Mike.
Richard.
Pingback: Accelerometer placement – where and why « MEMSblog
Hello,
The MMA8451Q, 3-Axis, 14-bit/8-bitDigital Accelerometer
I would like know if it is possible to have the value of earth accéleration with a precision of 0,03% at least
Thanks for your help
Possible – yes. But (like everything else) the devil is in the details. I suggest you review a couple of Freescale application notes that should be helpful. The first is AN4075: How many bits are enough? by Kimberly Tuck. The second is AN4399: High Precision Calibration of a Three-Axis Accelerometer, by Laura Salhuana. Both are available from the Freescale web site at http://www.freescale.com/sensors (just search on the “AN” numbers”).
hi
MMA7361L
what the max of xout ?
ex
for 100g xout?yout?zout?
The MMA7361L datasheet is located at http://cache.freescale.com/files/sensors/doc/data_sheet/MMA7361LC.pdf?pspll=1. It has two ranges: +/- 1.5g and +/-6g.
Pingback: Magnetometer placement – where and why « The Embedded Beat: Freescale Blog Community
Hrishik,
Yes, it sounds like you are seeing the sum of centripetal and tangential acceleration. The tangential acceleration is equal to the product of the radius of curvature and angular acceleration. The centripetal is also related to the radius. Since those two terms are at right angles to each other, you take the square root of the sum of the squares to get the result.
Mike
I appreciate your prompt response Mr. Stanley. It is clear that in this case, because the inertial measurement unit is mounted with y-axis aligned with the body frame forward direction, the measurement vectors shall yield positive vector quantities when it moves forward in the ‘ay’ axis. But, when there is a turn involved, the ‘ax’ axis also rises because of the radial component of motion.
As a consequence, the inertial measurement parameters like position and velocity shall show magnitudes inclusive of the fictitious forces, which is not correct in body frame measurements. eg) When I am computing speed in body frame, i.e v = sqrt(Vx^2 + Vy^2), the Vy component comprises of the translational speed while Vx is mostly radial. Currently, I am using only Vy in a closed feedback in a Kalman filter with GPS to get accurate values. This imposes a constraint, that the device has to mounted with the body axes. But, I want to make the application orientation independent, i.e, the device mounting should not bear any change on computations. For this, I am using Direct cosine matrix operations, but there has to be a way to remove the centripetal component from calculations, so that I get translational speed at all instants.
Thank you,
Hrishik Mishra
Hrishik,
I don’t think there is an “easy out”. I believe your equations of motion will need to include all applicable fictious forces if you want to compute orientation correctly. Or you could just continue to live with the restriction that your device is mounted with the body axes.
Good luck,
Mike