[Physics] Orientation from acceleration

accelerationrotationsensor

I have an object that has a sensor attached on it. This sensor calculates the acceleration in all axis and angular acceleration in all axis(Keep the gravity force in mind). How can I get the Pitch, Yaw and Roll(Orientation) from the known acceleration and angular acceleration values?

Best Answer

I think you have a small misconception about rotation sensing. Accelerometers will sense a frame's rotation of constant angular velocity as well as rotation where the angular velocity varies. This is because constant angular velocity rotation is itself an acceleration: something must undergo a centripetal acceleration to follow a curved path at constant angular speed about the center of rotation.

The simplest kind of accelerometer to discuss in this context is the Sagnac effect ring laser or Sagnac effect fiber gyroscope. This essentially gives you the three components $\omega_x\,\omega_y,\,\omega_z$ of the instantaneous angular velocity.

To convert accelerometer readings into orientation, you must build a state estimator to estimate the total rotation operator $U$ from the these readings. The problem is readily illustrated with rotation about one axis: you need to find the maximum likelihood $\theta$ given that $\theta = \int_0^t \omega(u)\,\mathrm{d} u$ and given that you only measure a noisy version of $\omega$ as a function of time. You need to have a reading of $\theta$ at some time essentially to find the integration constant. Moreover, owing to the pure integration, the variance of the estimation error builds up linearly with time, being $\sigma^2 t$, where $\sigma^2$ is the measurement noise variance over a unit time interval. So, inevitably, at some stage, you will need a new direct reading of $\theta$ to reset the estimator when the error $\sigma^2 t$ becomes unacceptable for the purpose at hand.

Even if one uses a mechanical gyroscope, these too undergo perturbations and need to be recalibrated at some point in a similar way.

But, once you have a reliable initial orientation to calibrate your gyroscope, in practice the times over which modern mechanical and Sagnac gyroscopes can give accurate readings is quite amazing; it well exceeds the time needed for any flight that our aeroplanes on Earth make. In spaceflight, orientation needs to be periodically recalibrated; the Apollo missions used sextant readings to infer the spacecraft's orientation from the measured positions of distant stars.


In 3 Dimensions

One finds the total rotation operator $U$ since $t=0$ by numerical integration of the Lie theoretic evolution equations with the $\omega$ readings as input:

$$\mathrm{d}_\tau U = U\,\left( \begin{array}{ccc} 0 & -\omega_z & \omega_y \\ \omega_z & 0 & -\omega_x \\ -\omega_y& \omega_x & 0 \end{array}\right)$$

or

$$\mathrm{d}_\tau U = U\,\left( \begin{array}{cc} i\,\omega_z &i\,\omega_x -\omega_y\\ i\,\omega_x +\omega_y & -i\,\omega_z \end{array}\right)$$

Most softwares use the second, the so called $SU(2)$ or quaternionic, representation as it is less computationally costly.

Also note that in neither of these cases does the rotation operator get reduced to pitch, yaw and roll readings; these latter are Euler co-ordinates and they cannot chart the space of all rotation operators without singular points; this is the numerical analogue of the gymbal lock catastrophe that can befall mechanical gyroscopes.