Do the rings in Mass Effect's mass relays (2-axis gimbal) describe a stable rotation? Just out of curiosity. In the game Mass Effect, devices called mass relays contain two rotating rings, one inside of the other. See http://www.youtube.com/watch?v=qPxw5QjxhIs for an example, best seen around 00:10. 
I was wondering: is this a stable motion? Intuitively, I'd say it isn't. Obviously, the outer ring describes normal rotational motion, but when the inner ring is taken into consideration, it seems to me that an additional driving force is required to maintain the entire situation. Am I right? I've been trying to apply some mechanical principles to it, but had no luck so far... Could anyone give a decent mathematical description of this?
Richard Terrett pointed out that this is in fact called a 2-axis gimbal. I wasn't aware of this, thanks!
 A: First I wanted to turn to textbooks to solve that, but felt this way is going to be boring (especially if we are talking Mass Effect). So I decided to derive equations of motion for our system from the first principles.
Further I need a lot of trigonometry, so I'll use short-hands for cosine and sine: $$c_x=\cos x,\;s_x=\sin x$$
Let us start by introducing generalized coordinates. The system obviously has only two degrees of freedom, so our coordinates would be two rotation angles:
$$\phi(t) - \mbox{rotation angle of the 'external' ring}$$ 
$$\theta(t) - \mbox{rotation angle of the 'internal' ring}$$
Now I also introduce two more angles $\alpha$ and $\beta$. They denote position of a point mass on those rings. I'm going to integrate over those angles as soon as I'll be able to.
Coordinate system: x -- goes to the left, y -- points from the screen at you, z -- goes up.
Position of a point mass on the "external" ring is given by:
$$\vec{r}_1 = R_z(\phi)\cdot a\left(\begin{array}{c}c_\alpha\\0\\-s_\alpha \end{array}\right)=a\left(\begin{array}{c}c_\phi c_\alpha\\s_\phi c_\alpha\\-s_\alpha \end{array}\right)$$ 
Position of a point mass on the "internal" ring is more complicated:
$$\vec{r}_2 =R_z(\phi)\cdot R_x(\theta)\cdot b\left(\begin{array}{c} c_\alpha\\0\\-s_\alpha \end{array}\right)=
b\left(\begin{array}{c}
c_\phi c_\beta-s_\beta s_\theta s_\phi\\
s_\phi c_\beta+s_\beta s_\theta c_\phi\\
-s_\beta c_\theta \end{array}\right)$$ 
Where $a$ and $b$ are radii of the rings.
Now, the kinetic energy of these rings is:
$$T=\int_0^{2\pi} \frac{\rho_1|\dot{\vec{r}}_1|^2}{2}a d\alpha+\int_0^{2\pi} \frac{\rho_2|\dot{\vec{r}}_2|^2}{2}b d\beta$$
Where $\rho_{1,2}$ are linear densities along those rings. Lets take them to be:
$$\rho_1 = \frac{m_1}{2\pi a},\;\rho_2 = \frac{m_2}{2\pi b}$$
After I substituted everything (and chopped my way through trigonometry simplifications and integration over $\alpha$ and $\beta$), I got a following neat expression:
$$T = \frac{m_1 a^2}{4}\dot{\phi}^2+\frac{m_2 b^2}{4}\left(\dot{\theta}^2+(1+\sin^2\theta)\dot{\phi}^2\right)$$
Since (I hope) we don't have any potential energy. The Lagrangian for our system is just its kinetic energy and we can write its equations of motion. Here is what I've got:
$$\ddot\theta = \dot\phi^2\sin2\theta$$
$$\left[\frac{m_1 a^2}{m_2 b^2}+(1+\sin^2\theta)\right]\ddot\phi+\dot\phi\dot\theta\sin2\theta=0$$
To my taste -- this system is too complex to be stable. But to demonstrate that in general case, I'm afraid, we need numerical solutions. 
Alternatively we can exploit one peculiarity -- notice that the system has only one external parameter: $$A=\frac{m_1 a^2}{m_2 b^2}$$
Let us see what happens when $A\to\infty$, which means that external ring is much more massive. Which gives:
$$\ddot\phi=0\Rightarrow \dot\phi=\Omega$$
$$\ddot\theta=\Omega^2\sin2\theta$$
The last equation is the equation for simple pendulum. You can look at it's phase portrait here on wikipedia and see that there are obviously points of instability.
So even in this limiting case our dynamics has some instabilities. And I'm pretty sure, that if we set $A$ to some finite values, then out dynamics will be ever more complex (not to say chaotic).   
A: First the answer: The motion is not quite stable, but only because of two subtle thing that your brain probably can intuitively feel:


*

*the rate at which the outer ring (the one that is rotating around the vertical axis) rotates has to speed up and slow down as the inner ring becomes vertical and horizontal respectively. Once you slow down and speed up the outer ring, the motion is fine. But if you don't do this, you need to provide twisting torques at the top and bottom periodically to compensate.

*the rate at which the inner ring spins has to speed up and slow down as the ring becmes horizontal and vertical, due to the centrifugal force in its frame pulling it out and pushing it in.


It is these two things that make the motion nonuniform rotation speed, and this makes the motion seem off intuitively. You can't make both motions uniform with the same period--- the inner ring has to speed up and slow down even in the limit of large mass of outer ring.
When you do the slowing down and speeding up, as required by the changing moment of inertia, and also the slowing down and speeding up required by the centrifugal pushing and pulling, this motion is natural. It does require stresses and torques on the system, but they are the kind that are naturally provided by the mount, they are just the forces holding the mount in place.
Solving the Lagrangian
The analysis Kostya did for the Lagrangian is correct (althugh I originally swapped his angle names). The outer ring is rotated by a rotation matrix $R_z(\phi)$, while the inner ring is rotated by $R_z(\phi)R_x(\theta)$, meaning first rotate around the x axis, then around the z axis. The motion of any point from a change in $\theta$ is always perpendicular to the motion from $\phi$, so there are no cross-terms.
The total moment of inertia for the $\phi$ motion is the sum of the moment of inertia of the outer ring, and the moment of inertia of the tilted inner ring.
The inner ring, as it is tilted, goes from having a moment of inertia I when it is horizontal to I/2 when it is vertical. This means that the whole Lagrangian is
$$ L = {1\over 2} (A + C \cos^2(\theta)) \dot{\phi}^2 + {1\over 2} B \dot{\theta}^2 $$
Just as Kostya says (for a planar internal motion C=2B). This Lagrangian has a conserved energy and a conserved $\phi$ momentum, since $\phi$ does not appear in L (the system is symmetric with respect to rotations around the z-axis), and this reduces it to a 1 degree of freedom system.
From the conservation of $\phi$ momentum,
$$ p_\phi = (A+C \cos^2(\theta)) \dot{\phi} = P $$
Which gives the rate of change of $\phi$, and the coefficient B tells you how it speeds up and slows down as you make the inner disk vertical or horizontal. The conservation of energy now tells you $\dot{\theta}$
$$ H = p_\phi \dot{\phi} + p_\theta \dot{\theta} - L = L $$
So that
$$ B\dot{\theta}^2 + {P^2\over A+ C \cos^2(\theta)} = 2E $$
The point of this is only that the $\phi$ motion is nonuniform only to the extent that C is nonzero (the same reason the outer ring is rotating nonuniformly), so you get a perfectly fine periodic motion in $\phi$, and you can adjust the total $\theta$ period to equal the $\phi$ period to make a motion which is qualitatively like the one shown in the film. The film is never exact, even though the outer motion can be much heavier than the inner ring, the inner ring (if it is flat) must speed up and slow down due to centrifugal force.
I felt I needed intuition about the stresses involved to keep the rings rotating, which you don't see in the Lagrangian formulation.
Some intuition on the stresses
To see how the stresses work, imagine the outer ring is infinitely heavy, and rotating with a constant angular velocity (this is what is shown in the movie). Now transform to the rotating frame. There are two ficititious forces. The centrifugal force is cancelling on the ring between the two sides, and the effect of this is just to make the inner ring it want to explode outward when it is horizontal (there is no effect when it is vertical). The effect of this is to introduce the centrifugal potential term that pulls the ring horizontal, and this is the source of Kostya's pendulum force (which is the reason the inner ring can stably oscillate around the horizontal position).
The coriolis force is $\omega\times v$, and when the ring is partway between horizontal and vertical, it turns the inner ring like a steering wheel in a definite direction. This needs to be counteracted by the outer ring, and this turning push is provided by the contacts. The turning push is what is responsible for the ice-skater-like slowing down of the outer ring (but here we are assuming the outer ring is very massive).
The result is completely intuitive, and you can understand all the effects--- there is a steering wheel pull on the inner ring in opposite directions as it is rotating, which only has the effect of slowing down the outer ring, and which can be provided by the grip of the outer wheel on the inner one.
A: According to Euler's rotation theorem, simultaneous rotation around more than one axis at the same time is impossible. If two rotations are forced at the same time, a new axis of rotation will appear. You can read more about this theorem over here: Wikipedia Link
Hope it helps.
