\(\DeclareMathOperator*{\oiint}{{\subset\!\supset} \llap{\iint}}\)
\(\DeclareMathOperator*{\oiiint}{{\Large{\subset\!\supset}} \llap{\iiint}}\)
  A Robot Arm's Torus Riemannian Configuration Space

Consider a double-pendulum robot arm with c-space a 2D torus \(T^2\).

A 2D robot arm
My CAD model of a 2D pendulum (click for OnShape link)

3D printed robot arm
My 3D print of my 2D CAD model

Torus c-space
The 2D c-space of my double pendulum CAD model with a (not closed) geodesic traced out on it


A video of Prof. Jim Yorke displaying chaotic properties of the double pendulum at a Mardem lecture at UWM.

The quote that got me into engineering:
"The more chaotic a dynamical system is, the more controllable it is." - Dr. John Hubbard (Cornell University), Marden Lecture in Mathematics, UWM (2008)
(I haven't actually found the quote to be true, but it is the quote that got me into engineering.)


A video of Prof. Steve Brunton displaying control engineering of the chaos on the double pendulum.


A video of a Boston Dynamics robot dancing.
(When on can "make the system dance" [usually metaphorically, but literally in this case], one generally has achieved the desired level of control of the system.)

We shall identify \(T^2\) with \([0,2\pi]^2\), with units of radians, via the standard coordinate patch \(\phi: [0, 2\pi]^2 \to T^2\) given by \(\phi(\theta_1, \theta_2) = ((\cos(\theta_1), \sin(\theta_1)), (\cos(\theta_2), \sin(\theta_1)))\) and therefore endow it with the units of radians, although it is technically unitless. The Riemannian metric (r-metric) \(g(\theta_1, \theta_2)\) (written as \(M(\theta)\) in the following graphic from https://youtu.be/BjD-pL819LA?si=q8_It-jJFEq0AmEu&t=212; \(g(\theta)\) in the following graphic is the gravity term) may be read off the equation of motion (EoM):

Equation of Motion for motion on a 2-torus

The Riemannian metric in the standard coordinate patch for this robot arm is given by

\[ g(\theta_1,\theta_2) = \begin{bmatrix} I_{zz,1} + I_{zz,2} + (L_1^2m_1)/4 + L_1^2m_2 + (L_2^2m_2)/4 + L_1L_2m_2\cos(\theta_2) & (m_2L_2^2)/4 + (L_1L_2m_2\cos(\theta_2))/2 + I_{zz,2} \\
(m_2L_2^2)/4 + (L_1L_2m_2\cos(\theta_2))/2 + I_{zz,2} &                            (m_2L_2^2)/4 + I_{zz,2}\\ \end{bmatrix} \]

(For definiteness, for this particular double-pendulum robot arm, the values of the parameters are  \(m_i = 0.181\) kg, \(I_{zz,i} = 0.001\) \(\text{kg}\cdot\text{m}^2\), and \(L_i = 0.250\) m in SI, but these values are mutable. Here is an OnShape model of the robot arm https://cad.onshape.com/documents/13c5b197f578ed74e3c43266/w/31eaf96cbef839c27d1f6215/e/2af3572176e096bf67365da2?renderMode=0&uiState=64c22d4a8c079b328fbabd57. Using these values leads to a r-metric of


\[g(\theta_1, \theta_2) = \begin{bmatrix} 0.0113\cos(\theta_2) + 0.019 & 0.00566\cos(\theta_2) + 0.00383 \\
0.00566\cos(\theta_2) + 0.00383 &                      0.00383\end{bmatrix}.)\]

Note that the entries in the Riemannian metric have dimensions of \(\left[\text{Length}^2 \cdot \text{Mass}\right]\). (It should be noted that there are dimensions/units used for the describing the robot arm and hence, perhaps bizarrely, for describing the Riemannian metric. Points in the manifold and tangent vectors to the manifold are part of the intrinsic topology of the underlying smooth manifold of the c-space and have only dimensions of [Angular Measure], while inner products/norms of tangent vectors and lengths of curves/distances between points in the manifold depend on Riemannian metric, which is extrinsic to the topology of the underlying manifold; inner products of tangent vectors have dimensions of \(\displaystyle\left[\text{Angular Measure}^2\cdot\text{Length}^2 \cdot \text{Mass}\right]\) while norms of tangent vectors and lengths of curves/distances between points have units of \(\displaystyle\left[\text{Angular Measure}\cdot\text{Length} \cdot \text{Mass}^{\frac{1}{2}}\right]\). This kind of r-metric is known as the "mass matrix'" and morally has dimensions of mass. The way that things work out here, there are \(I_{zz}\) terms, and we can't just move the lengths to the \(\theta\) factors. But, morally, the mass matrix has dimensions of mass.)

This link, curvature.m, computes the sectional curvature correctly in MATLAB, and it is not identically 0. There is a check that \(\displaystyle \oiint_{T^2}\ K\ dS\ = 4\pi \chi(T^2) = 0\). This link, Curvature03.nb (shamelessly pirated from [1]), validates the computation of the sectional curvature of my Riemannian manifold in Mathematica (although it heavily uses the fact we are in dimension 2; I'll need to work on that). This is the scalar curvature as computed in MATLAB:

Scalar Curvatue
This is the scalar curvature as computed in Mathematica:

Scalar Curvature

(Special thanks to Bob Jantzen of Villanova University for help computing the scalar curvature.)

This link, TorusVolumeForm01.nb, shows that the volume of the torus is \(\displaystyle\oiint_{[T^2]}\ \eta_{\text{Vol}_g} = 0.253\ \text{rad}^2\cdot\text{m}^2\cdot\text{kg}\) in the inertial r-metric.

Bibliography:
[1] https://ekamperi.github.io/mathematics/2019/10/29/riemann-curvature-tensor.html
[2] Carmo, M. P. do. Riemannian Geometry. Mathematics (Boston, Mass.). Birkhäuser, 1992. https://doi.org/10.1007/978-1-4757-2201-7