Rotational Axis Theorem (JIM)
Introduction
This post has nothing to do with A/B testing (I was getting a little burnt out on writing about that). It doesn’t have anything to do with causal inference, or even data science! This is a throwback to my time as an aerospace engineer. I was thinking about one of my favorite classes in undergrad, dynamics. The primary focus of that class was the use of coordinate transformations to simplify analysis of moving systems.
Here is a motivating example. An ant is walking along a windshield wiper. The windshield wiper is rotating on the windshield of a race car driving around a racetrack. What forces are experienced by the ant?
Does that seem like a ridiculous example? How about this: an astronaut is on a space station in orbit around the Earth. The space station is shaped like a bicycle wheel, with spokes connecting the outer rim to a central area. The space station is rotating to simulate gravity in the outer rim, but the astronaut is still weightless when in the central area. The astronaut is moving from the central area to the outer rim. What forces are experienced by the astronaut? Is there any danger of the astronaut getting dizzy or passing out along the way? This is a very important consideration for designers of space stations.
Both examples involve systems with multiple components that are all in motion. We can analyze such systems by decomposing them into nested coordinate systems, one related to another in simple ways. This breaks up a complicated problem into multiple, much easier problems.
We start by imagining observers positioned and oriented strategically in such a way that the motion of one observer relative to another is simple to work out. We will use the example of the ant on the racecar.
There are two forces acting on the ant: gravity (we assume the racecar is on Earth), and the force exerted by the windshield wiper on the ant. The total force acting on the ant is simply the sum of these two (vector) forces. The force due to gravity is $mg$, where $m$ is the mass of the ant. If we knew the acceleration the ant experienced due to the windshield wiper, we could simply multiply it by the mass of the ant to get the force imparted by the wiper and we would be done. So the hard part is determining the acceleration of the ant in an inertial frame.
We will assume an observer standing to the side of the track is in an inertial frame. This neglects the motion of the Earth, but that is fine for our purposes. We want to build our way up to computing $a_\mathcal{O}^\mathcal{A}$, the acceleration of the ant in the reference frame of the inertial observer.
Firstly, let’s assume a circular race track with radius $\rho$. The racecar drives around the track with constant speed $\nu$, completing a lap in $2\pi \rho / \nu$ time. The angular velocity of the racecar is thus $\omega = \nu / \rho$.
We imagine a caterpillar is situated at the center of the racetrack, and is so invested in the race that it keeps its eyes (do caterpillars have eyes?) fixated on the car at all times. Let $r_\mathcal{O}^\mathcal{A}$ be the position of the ant in the frame of reference (FoR) of the observer, $r_\mathcal{O}^\mathcal{C}$ the position of the caterpillar in the FoR of the observer, $R_\mathcal{O}^\mathcal{C}$ the transformation from the orientation of the caterpillar to the orientation of the observer, and $r_\mathcal{C}^\mathcal{A}$ the position of the ant in the FoR of the caterpillar. Then $$ r_\mathcal{O}^\mathcal{A} = r_\mathcal{O}^\mathcal{C} + R_\mathcal{O}^\mathcal{C} \cdot r_\mathcal{C}^\mathcal{A}. $$
The only motion the caterpillar experiences is rotational, so $r_\mathcal{O}^\mathcal{C}$ is constant, simply reflecting where the inertial observer happens to be standing. We will assume the zaxes of the reference frames of the inertial observer and the caterpillar are both perpendicular to the race track, so $R_\mathcal{O}^\mathcal{C}$ is a rotation matrix that looks like: $$ R_\mathcal{O}^\mathcal{C} = \begin{bmatrix} \cos{\omega t} & \sin{\omega t} & 0 \\\ \sin{\omega t} & \cos{\omega t} & 0 \\\ 0 & 0 & 1 \end{bmatrix}. $$ We have not yet determined the position of the ant with respect to the caterpillar, but we will simply leave this term alone for now.
The velocity of the ant in an inertial frame then is $$ v_\mathcal{O}^\mathcal{A} = \dot{r}_\mathcal{O}^\mathcal{A} = \dot{r}_\mathcal{O}^\mathcal{C} + \dot{R}_\mathcal{O}^\mathcal{C} \cdot r_\mathcal{C}^\mathcal{A} + R_\mathcal{O}^\mathcal{C} \cdot \dot{r}_\mathcal{C}^\mathcal{A}. $$
We can simplify this equation in a fairly nonobvious way by noting that any rotation matrix satisfies $R^T \cdot R = R \cdot R^T = I$, the identity matrix, so a term like $\dot{R} \cdot x = \dot{R} \cdot R^T \cdot R \cdot x$. Then by differentiating $R \cdot R^T = I$, we get $\dot{R} \cdot R^T + R \cdot \dot{R}^T = 0$ or $\dot{R} \cdot R^T = R \cdot \dot{R}^T = (\dot{R} \cdot R^T)^T$. We see that $\dot{R} \cdot R^T$ is a skewsymmetric matrix, whenever $R$ is a rotation matrix. Recall that a skewsymmetric matrix in three dimensions has the form: $$ S(\omega) = \begin{bmatrix} 0 & \omega_3 & \omega_2 \\ \omega_3 & 0 & \omega_1 \\ \omega_2 & \omega_1 & 0 \end{bmatrix}. $$
The offdiagonal terms are physically meaningful. They are the components of the angular velocity vector associated with the rotation! We can check this by actually computing $\dot{R} \cdot R^T$ and comparing it with the angular velocity, $\omega \hat{e}_z$.
Next, recall that multiplication by a skewsymmetric matrix in three dimensions is equivalent to a crossproduct: $S(\omega) \cdot x = \omega \wedge x$. Thus,
$$ \begin{align} \dot{R} \cdot x &= \dot{R} \cdot R^T \cdot R \cdot x \\\ &= S(\omega) \cdot R \cdot x \\\ &= \omega \wedge (R \cdot x). \end{align} $$
As a brief aside, it is commonly said (at least in aerospace classes) that angular velocity is a slight misnomer because the terminology implies the existence of an angular position, and that angular velocity is the derivative thereof. In fact, angular velocity is related to $\dot{R} \cdot R^T$, which has a derivative buried in there, but it is not actually the derivative of anything.
We can use these facts to replace the rotation matrix derivatives with more familiar angular velocity terms: $$ v_\mathcal{O}^\mathcal{A} = \dot{r}_\mathcal{O}^\mathcal{C} + \omega_\mathcal{O}^\mathcal{C} \wedge (R_\mathcal{O}^\mathcal{C} \cdot r_\mathcal{C}^\mathcal{A}) + R_\mathcal{O}^\mathcal{C} \cdot \dot{r}_\mathcal{C}^\mathcal{A}. $$
We can interpret the three terms on the right of this equation as being the velocity of the caterpillar in the inertial frame (which is zero in our example), the velocity of the ant in the FoR of the caterpillar (rotated appropriately), and an extra term due to the angular velocity of the caterpillar with respect to the inertial observer.
We can differentiation this equation again to get the acceleration of the ant in the inertial frame: $$ \begin{align} a_\mathcal{O}^\mathcal{A} = \dot{v}_\mathcal{O}^\mathcal{A} &= \phantom{+} \ddot{r}_\mathcal{O}^\mathcal{C} \\\ &\phantom{=} + \dot{\omega}_\mathcal{O}^\mathcal{C} \wedge (R_\mathcal{O}^\mathcal{C} \cdot r_\mathcal{C}^\mathcal{A}) \\\ &\phantom{=} + \omega_\mathcal{O}^\mathcal{C} \wedge (\dot{R}_\mathcal{O}^\mathcal{C} \cdot r_\mathcal{C}^\mathcal{A} + R_\mathcal{O}^\mathcal{C} \cdot \dot{r}_\mathcal{C}^\mathcal{A}) \\\ &\phantom{=} + \dot{R}_\mathcal{O}^\mathcal{C} \cdot \dot{r}_\mathcal{C}^\mathcal{A} \\\ &\phantom{=} + R_\mathcal{O}^\mathcal{C} \cdot \ddot{r}_\mathcal{C}^\mathcal{A}. \end{align} $$
We can apply the same derivativeofrotationmatrix trick to get $$ \begin{align} a_\mathcal{O}^\mathcal{A} = \dot{v}_\mathcal{O}^\mathcal{A} &= \phantom{+} \ddot{r}_\mathcal{O}^\mathcal{C} \\\ &\phantom{=} + \dot{\omega}_\mathcal{O}^\mathcal{C} \wedge (R_\mathcal{O}^\mathcal{C} \cdot r_\mathcal{C}^\mathcal{A}) \\\ &\phantom{=} + \omega_\mathcal{O}^\mathcal{C} \wedge (\omega_\mathcal{O}^\mathcal{C} \wedge (R_\mathcal{O}^\mathcal{C} \cdot r_\mathcal{C}^\mathcal{A}) + R_\mathcal{O}^\mathcal{C} \cdot \dot{r}_\mathcal{C}^\mathcal{A}) \\\ &\phantom{=} + \omega_\mathcal{O}^\mathcal{C} \wedge (R_\mathcal{O}^\mathcal{C} \cdot \dot{r}_\mathcal{C}^\mathcal{A}) \\\ &\phantom{=} + R_\mathcal{O}^\mathcal{C} \cdot \ddot{r}_\mathcal{C}^\mathcal{A} \\\ &= \phantom{+} \ddot{r}_\mathcal{O}^\mathcal{C} \\\ &\phantom{=} + \dot{\omega}_\mathcal{O}^\mathcal{C} \wedge (R_\mathcal{O}^\mathcal{C} \cdot r_\mathcal{C}^\mathcal{A}) \\\ &\phantom{=} + \omega_\mathcal{O}^\mathcal{C} \wedge \omega_\mathcal{O}^\mathcal{C} \wedge (R_\mathcal{O}^\mathcal{C} \cdot r_\mathcal{C}^\mathcal{A}) \\\ &\phantom{=} + 2 \cdot \omega_\mathcal{O}^\mathcal{C} \wedge (R_\mathcal{O}^\mathcal{C} \cdot \dot{r}_\mathcal{C}^\mathcal{A}) \\\ &\phantom{=} + R_\mathcal{O}^\mathcal{C} \cdot \ddot{r}_\mathcal{C}^\mathcal{A}. \end{align} $$
This scarylooking equation was given a nice, friendly name in my class: Jim. (I’m completely serious.) The year after me, the same professor called the equation the rotational axis theorem which is more descriptive but less friendly. (Depending on the direction things are rotating and how the coordinate systems are defined, sometimes there are some minus signs in there. Keeping those straight was honestly the hardest part of the class for me.)
The first and last terms represent the acceleration of the caterpillar in the inertial frame, and the acceleration of the ant in the FoR of the caterpillar (appropriately rotated), respectively. The second term accounts for any angular acceleration. The third term (the $\omega \wedge \omega \wedge \cdot$ term) accounts for the centrifugal acceleration, while the fourth term (the $2 \cdot \omega \wedge v$ term) represents the Coriolis effect.
For our particular example, $\ddot{r}_\mathcal{O}^\mathcal{C} = \dot{r}_\mathcal{O}^\mathcal{C} = \dot{\omega}_\mathcal{O}^\mathcal{C} = 0$, so the velocity and acceleration equations become: $$ \begin{align} v_\mathcal{O}^\mathcal{A} &= \omega_\mathcal{O}^\mathcal{C} \wedge (R_\mathcal{O}^\mathcal{C} \cdot r_\mathcal{C}^\mathcal{A}) + R_\mathcal{O}^\mathcal{C} \cdot \dot{r}_\mathcal{C}^\mathcal{A}, \\\ a_\mathcal{O}^\mathcal{A} &= \phantom{+} \omega_\mathcal{O}^\mathcal{C} \wedge \omega_\mathcal{O}^\mathcal{C} \wedge (R_\mathcal{O}^\mathcal{C} \cdot r_\mathcal{C}^\mathcal{A}) \\\ &\phantom{=} + 2 \cdot \omega_\mathcal{O}^\mathcal{C} \wedge (R_\mathcal{O}^\mathcal{C} \cdot \dot{r}_\mathcal{C}^\mathcal{A}) \\\ &\phantom{=} + R_\mathcal{O}^\mathcal{C} \cdot \ddot{r}_\mathcal{C}^\mathcal{A}. \end{align} $$
Recall that $\omega_\mathcal{O}^\mathcal{C} = (\nu / \rho) \hat{e}_z$, but we have not yet determined $r_\mathcal{C}^\mathcal{A}$ or its derivatives.
Now suppose there is a beetle sitting on the windshield of the racecar, but unaffected by the windshield wiper. The position of the ant with respect to the caterpillar may be written as:
$$ r_\mathcal{C}^\mathcal{A} = r_\mathcal{C}^\mathcal{B} + R_\mathcal{C}^\mathcal{B} \cdot r_\mathcal{B}^\mathcal{A}. $$ Because the caterpillar is always facing the racecar, we have $r_\mathcal{C}^\mathcal{B} = \rho \hat{e}_x$ (we are assuming the $x$axis of the caterpillar is aligned with its line of sight). Also, because the caterpillar is rotating at the same angular velocity as the car itself, and because the beetle is stationary with respect to the car (neither moving nor rotating), $R_\mathcal{C}^\mathcal{B}$ is constant, reflecting the angle of the windshield and how the beetle happens to be oriented on it.
We can apply the same reasoning as above to compute $$ \begin{align} v_\mathcal{C}^\mathcal{A} = \dot{r}_\mathcal{C}^\mathcal{A} &= \dot{r}_\mathcal{C}^\mathcal{B} + \omega_\mathcal{C}^\mathcal{B} \wedge (R_\mathcal{C}^\mathcal{B} \cdot r_\mathcal{B}^\mathcal{A}) + R_\mathcal{C}^\mathcal{B} \cdot \dot{r}_\mathcal{B}^\mathcal{A} \\\ &= R_\mathcal{C}^\mathcal{B} \cdot \dot{r}_\mathcal{B}^\mathcal{A}, \\\ a_\mathcal{C}^\mathcal{A} = \ddot{r}_\mathcal{C}^\mathcal{A} &= \phantom{+} \ddot{r}_\mathcal{C}^\mathcal{B} \\\ &\phantom{=} + \dot{\omega}_\mathcal{C}^\mathcal{B} \wedge (R_\mathcal{C}^\mathcal{B} \cdot r_\mathcal{B}^\mathcal{A}) \\\ &\phantom{=} + \omega_\mathcal{C}^\mathcal{B} \wedge \omega_\mathcal{C}^\mathcal{B} \wedge (R_\mathcal{C}^\mathcal{B} \cdot r_\mathcal{B}^\mathcal{A}) \\\ &\phantom{=} + 2 \cdot \omega_\mathcal{C}^\mathcal{B} \wedge (R_\mathcal{C}^\mathcal{B} \cdot \dot{r}_\mathcal{B}^\mathcal{A}) \\\ &\phantom{=} + R_\mathcal{C}^\mathcal{B} \cdot \ddot{r}_\mathcal{B}^\mathcal{A} \\\ &= R_\mathcal{C}^\mathcal{B} \cdot \ddot{r}_\mathcal{B}^\mathcal{A}. \end{align} $$
Then we can substitute these terms back into the equation above. The remaining unknowns are $r_\mathcal{B}^\mathcal{A}$ and its derivatives. Hopefully now the strategy is becoming clear. By inserting imaginary, strategically placed observers, we can decompose the problem into pieces. The beetle is close enough to the ant where we can see: $$ r_\mathcal{B}^\mathcal{A} = r_\mathcal{B}^\mathcal{W} + R_\mathcal{B}^\mathcal{W} \cdot r_\mathcal{W}^\mathcal{A}, $$ where $r_\mathcal{B}^\mathcal{W}$ is the position of the (base of the) windshield wiper relative to the beetle, $R_\mathcal{B}^\mathcal{W}$ is the transformation from the orientation of the windshield wiper to the orientation of the beetle, and $r_\mathcal{W}^\mathcal{A}$ is the position of the ant with respect to the (base of the) windshield wiper.
Since the windshield wiper is rotating, but its base is not moving with respect to the beetle, $r_\mathcal{B}^\mathcal{W}$ is a constant (and we might as well set it to zero, saying that the beetle is standing right at the base of the windshield wiper), but $R_\mathcal{B}^\mathcal{W}$ is not constant. We will assume it has a constant angular velocity of $\omega_\mathcal{B}^\mathcal{W}$. Finally, we will assume the ant is moving with a constant velocity along the edge of the windshield wiper. Then, $$ \begin{align} v_\mathcal{B}^\mathcal{A} = \dot{r}_\mathcal{B}^\mathcal{A} &= \dot{r}_\mathcal{B}^\mathcal{W} + \omega_\mathcal{B}^\mathcal{W} \wedge (R_\mathcal{B}^\mathcal{W} \cdot r_\mathcal{W}^\mathcal{A}) + R_\mathcal{B}^\mathcal{W} \cdot \dot{r}_\mathcal{W}^\mathcal{A} \\\ &= \omega_\mathcal{B}^\mathcal{W} \wedge (R_\mathcal{B}^\mathcal{W} \cdot r_\mathcal{W}^\mathcal{A}) + R_\mathcal{B}^\mathcal{W} \cdot \dot{r}_\mathcal{W}^\mathcal{A}, \\\ a_\mathcal{B}^\mathcal{A} = \ddot{r}_\mathcal{B}^\mathcal{A} &= \phantom{+} \ddot{r}_\mathcal{B}^\mathcal{W} \\\ &\phantom{=} + \dot{\omega}_\mathcal{B}^\mathcal{W} \wedge (R_\mathcal{B}^\mathcal{W} \cdot r_\mathcal{W}^\mathcal{A}) \\\ &\phantom{=} + \omega_\mathcal{B}^\mathcal{W} \wedge \omega_\mathcal{B}^\mathcal{W} \wedge (R_\mathcal{B}^\mathcal{W} \cdot r_\mathcal{W}^\mathcal{A}) \\\ &\phantom{=} + 2 \cdot \omega_\mathcal{B}^\mathcal{W} \wedge (R_\mathcal{B}^\mathcal{W} \cdot \dot{r}_\mathcal{W}^\mathcal{A}) \\\ &\phantom{=} + R_\mathcal{B}^\mathcal{W} \cdot \ddot{r}_\mathcal{W}^\mathcal{A} \\\ &= \phantom{+} \omega_\mathcal{B}^\mathcal{W} \wedge \omega_\mathcal{B}^\mathcal{W} \wedge (R_\mathcal{B}^\mathcal{W} \cdot r_\mathcal{W}^\mathcal{A}) \\\ &\phantom{=} + 2 \cdot \omega_\mathcal{B}^\mathcal{W} \wedge (R_\mathcal{B}^\mathcal{W} \cdot \dot{r}_\mathcal{W}^\mathcal{A}). \end{align} $$
Notably, if the ant were not moving, it would only experience centrifugal acceleration; instead it also experiences the Coriolis force.
Just for fun, we can fill this back into the original equations: $$ \begin{align} r_\mathcal{C}^\mathcal{A} &= r_\mathcal{C}^\mathcal{B} + R_\mathcal{C}^\mathcal{B} \cdot R_\mathcal{B}^\mathcal{W} \cdot r_\mathcal{W}^\mathcal{A} \\\ v_\mathcal{C}^\mathcal{A} = \dot{r}_\mathcal{C}^\mathcal{A} &= R_\mathcal{C}^\mathcal{B} \cdot (\omega_\mathcal{B}^\mathcal{W} \wedge (R_\mathcal{B}^\mathcal{W} \cdot r_\mathcal{W}^\mathcal{A}) + R_\mathcal{B}^\mathcal{W} \cdot \dot{r}_\mathcal{W}^\mathcal{A}) \\\ a_\mathcal{C}^\mathcal{A} = \ddot{r}_\mathcal{C}^\mathcal{A} &= R_\mathcal{C}^\mathcal{B} \cdot (\omega_\mathcal{B}^\mathcal{W} \wedge \omega_\mathcal{B}^\mathcal{W} \wedge (R_\mathcal{B}^\mathcal{W} \cdot r_\mathcal{W}^\mathcal{A}) + 2 \cdot \omega_\mathcal{B}^\mathcal{W} \wedge (R_\mathcal{B}^\mathcal{W} \cdot \dot{r}_\mathcal{W}^\mathcal{A})) \\\ a_\mathcal{O}^\mathcal{A} &= \phantom{+} \omega_\mathcal{O}^\mathcal{C} \wedge \omega_\mathcal{O}^\mathcal{C} \wedge (R_\mathcal{O}^\mathcal{C} \cdot r_\mathcal{C}^\mathcal{A}) \\\ &\phantom{=} + 2 \cdot \omega_\mathcal{O}^\mathcal{C} \wedge (R_\mathcal{O}^\mathcal{C} \cdot \dot{r}_\mathcal{C}^\mathcal{A}) \\\ &\phantom{=} + R_\mathcal{O}^\mathcal{C} \cdot \ddot{r}_\mathcal{C}^\mathcal{A}, \end{align} $$ which shows just how complicated these systems, and how powerful the coordinate transformation technique, can be!^{1}

Cover photo courtesy of it’s me neosiam ↩︎