1 Introduction

The rendezvous problem from robotics and space science consists of planning a path with prescribed initial and final position and velocities [1,2,3]. Achieving, for instance, a smooth docking of a service spacecraft to the International Space Station or fetching a satellite.Footnote 1

Mechanical control problems were first studied via Geometric Mechanics in Andrew Lewis thesis with Richard Murray at Caltech [5]. The standard reference is [6], a treatise by Bullo and Lewis. The organism or device is modeled by a configuration space Q, together with a metric (kinetic energy) governing its inertia. Acting external and internal forces produce an acceleration, interpreted as the control u that produces deviation from geodesic motion.

If \(\nabla \) denotes the Levi–Civita connection, the state equation is

$$\begin{aligned} \nabla _{\dot{q}} \dot{q} = u. \end{aligned}$$
(1)

The aim is to connect two tangent vectors \((q_o,v_o)\) and \((q_1,v_1)\) minimizing a cost functional. Such curves are called variational splines. Via Pontryagin’s principle, every cost functional associated to (1) yields a Hamiltonian system in \(T^* (TQ)\).

Two cases have received special attention. The first case concerns cubic splines (also called \(L^2\)), that were introduced around 1990 [7, 8]. They minimize

$$\begin{aligned} \int _0^T\,\frac{\beta }{2}\, |u|^2\, dt \end{aligned}$$
(2)

with a prescribed time T besides the starting and end tangent vectors. Cubic splines have been recently used in longitudinal studies in medical imaging. The research area is called computational anatomy [9,10,11,12].

The second case is the time minimal problem, that has been used frequently for path planning in robotics and space science.Footnote 2 In the Markov–Dubins problem, the acceleration is always normal to the path, so in this case minimal time is equivalent to minimal length. There is a vast literature on this classical problem. More recently, some authors allowed a tangential acceleration in addition to a normal component. This was called dynamic Markov–Dubins in [15]. It consists in connecting two vectors in minimum time, under the restriction

$$\begin{aligned} |u| \le A,\quad \mathrm{where}\, A \, \mathrm{is}\, \mathrm{a}\, \mathrm{prescribed} \, \mathrm{bound.} \end{aligned}$$
(3)

This paper is a follow up of [16], where we presented a geometric formulation for variational problems with state space TQ, or more generally with a state space A that is an anchored vector bundle over Q, so that \(T^*A\) is a double bundle.

A connection in the bundle \(A \rightarrow Q\) allows to rewrite the canonical symplectic form on \(T^*(TQ)\) (resp. \(T^*A\)) using a convenient splitting of covectors. Among the examples, we discussed cubic splines on spheres.

Here we continue the study, focusing on the second case: time minimal splines on \(S^2(r)\). In Sect. 2 we contextualize the problem. We apply Pontryagin’s method in its standard formulation, embedding \( TS^n(r) \) in \(\mathfrak {R}^{n+1} \times \mathfrak {R}^{n+1}\). Then we introduce modified costate variables allowing to write the equations of motion for the optimal Hamiltonian in a very geometric fashion.

The core of the paper is Sect. 3. Following [16], in the case \(n=2\) we make a special construction, using a diffeomeorphism of \(TS^2(r) - 0\) to \(SO(3) \times \mathfrak {R}_+\), with coordinates (Rv). The last column of the orthogonal matrix R is the unit normal vector to the sphere, and the first is the normalized tangent vector of the spline.

The coordinate v is the scalar velocity, conjugated to a costate variable a, that acts on the tangential acceleration, and \((M_1,M_2,M_3)\) are costate variables that act on the frame rotations \(R^{-1} \dot{R}\). These momenta satisfy \(\{ M_i, M_j\} = \epsilon _{ijk} M_k\).

We derive the reduced hamiltonian and find two families of special analytical solutions, that are organizing centers for the dynamics. One of the families trace the equators, exhibiting there the bang-bang phenomenon. The other family is formed by circles with geodesic curvature 1 / r, that can be traversed both ways. They were found by unreduction, and appear in pairs forming figure eights.

In Sect. 4 we compute the equilibria of the reduced system and show that they are of loxodromic type, as it also happened for cubic splines. Section 5 makes a digression on the 1-dimensional case of time minimal trajectories along equators. In Sect. 6 we reconstruct the trajectories of the unreduced system corresponding to the equilibria of the reduced system in Sect. 4. A benchmark numerical simulation, using the free software BOCOP, developed at INRIA, is presented in Sect. 7. Section 8 we discuss some loose ends and present some research directions.

We end this introduction with additional references about variational splines in medical imaging. In computational anatomy cubic splines have been used for longitudinal medical studies [10,11,12] and for interpolation and statistics on manifolds [17,18,19,20,21,22,23,24]. We observe that a tangent vector gives a minimal model for a short process. The idea of comparing two short physiological processes using splines is not yet much explored. This question is important in embryology, where it is called morphokinetics [25].

2 Simple splines in \(S^n(r)\): the minimal time problem

As observed by Chang [26], a dynamic optimization problem whose state space is a manifold can be conveniently formulated using embeddings on an Euclidian space. We embed \(TS^n\) in \( {\mathbb {R}}^{n+1} \times {\mathbb {R}}^{n+1}\) and write the state equations so that it has \(TS^n\) as an invariant submanifold. This allows us to apply Pontryagin’s principle in the usual way. We fix a sphere \(S^n(r)\) of radius r. The state equations are

$$\begin{aligned} \dot{x} = \mathbf{v},\quad {\dot{\mathbf{v}}} = u - |\mathbf{v}|^2 \,x/r^2,\quad u \perp x \end{aligned}$$
(4)

Here u, the tangential component of the acceleration vector, is the control. The second term in the right hand side of the equation for \(\dot{\mathbf{v}}\) is the normal acceleration required to keep the trajectory in the sphere. Hence these equations have the tangent bundle of the sphere of radius r as invariant submanifold. We used boldface only for the tangent vector \(\mathbf{v}\) because \(v = | \mathbf{v}| \).

2.1 Applying Pontryagin Maximum Principle on \({\mathbb {R}}^{2(n+1)}\)

We now formulate the problem. Let

$$\begin{aligned} ((x,\mathbf{v}), (\tilde{p}_x, \tilde{p}_v ) ) \in T^* (T {\mathbb {R}}^{n+1} ) = {\mathbb {R}}^{4(n+1)} \end{aligned}$$

with the canonical form

$$\begin{aligned} \varOmega _{T^* (T {\mathbb {R}}^{n+1} ) } = d\tilde{p}_x \wedge dx + d\tilde{p}_v \wedge d \mathbf{v}. \end{aligned}$$
(5)

We have the Hamiltonian family:

$$\begin{aligned} H^u = - 1 + \tilde{p}_x \cdot \mathbf{v} + \tilde{p}_v \cdot \left( u - \frac{ |\mathbf{v}|^2 }{r^2} \, x\right) . \end{aligned}$$

We obtain the optimal control (using \(u \perp x\))

$$\begin{aligned} u^* = A \, \frac{p_v^{\parallel }}{|p_v^{\parallel }|} \end{aligned}$$
(6)

where

$$\begin{aligned} p_v^{\parallel } = \tilde{p}_v - \langle \tilde{p}_v,x \rangle x /r^2 \end{aligned}$$
(7)

is the projection of \(\tilde{p}_v \) on tangent plane of the sphere. The case \( p_v^{\parallel } = 0, \) needs special attention and is discussed in the conclusion section. Substituting back in the Hamiltonian family we get

Proposition 1

The optimal Hamiltonian for the time minimal splines in \(S^n(r)\)

$$\begin{aligned} H^* = - 1 + \tilde{p}_x \cdot \mathbf{v} + A\,|p_v^{\parallel }| - \tilde{p}_v \cdot \frac{ |\mathbf{v}|^2 }{r^2} \, x . \end{aligned}$$
(8)

where we use standard symplectic structure (5), with initial conditions such that

$$\begin{aligned} |x|=r, \quad \mathbf{v} \perp x . \end{aligned}$$

2.2 Using split costate variables

The fact that the covectors \(\tilde{p}_x, \tilde{p}_v \) are arbitrary vectors in \(\mathfrak {R}^{n+1}\) is a nuisance: each contains one spurious dimension. Define modified costate variables \(p, \alpha \) by

$$\begin{aligned} \alpha= & {} p_v^{\parallel } = \tilde{p}_v - \langle \tilde{p}_v,x \rangle x /r^2 \end{aligned}$$
(9)
$$\begin{aligned} p= & {} \tilde{p}_x^{\parallel } - \, \frac{ \langle \tilde{p}_v ,x \rangle }{r^2}\, \mathbf{v} \end{aligned}$$
(10)

Note that if \(|x| = r \) and \( \mathbf{v} \perp x \) then \(p, \alpha \) are also in \(T_x S^n(r) \). In fact, as follows from the theory in [16], these modified costate variables represent a splitting for a covector \( P_{(x,\mathbf{v})} \in T^*_{(x,\mathbf{v})} \, TS^n(r))\), achieved via the Levi–Civita connection in the tangent bundle \(TS^n\). The Hamiltonian (8) gets a simpler expression:

$$\begin{aligned} H^* = -1 + p \cdot \mathbf{v} + A \, |\alpha |. \end{aligned}$$
(11)

There is a price: the symplectic form in the variables \((x, p, \mathbf{v}, \alpha )\) is non-canonical. It has extra terms, arising from the connection, but they have a geometric content. For any Hamiltonian \(H(x,p, \mathbf{v}, \alpha )\), the resulting equations can be conveniently written as follows:

Proposition 2

Hamiltonian equations with split momenta \(p,\alpha \):

$$\begin{aligned} \left[ \begin{array}{l} \dot{x}\\ \nabla _{\dot{x}} p \\ \nabla _{\dot{x}}v \\ \nabla _{\dot{x}} \alpha \end{array} \right] = \left[ \begin{array}{llll} 0 &{}\quad I &{}\quad 0 &{}\quad 0 \\ -I &{}\quad 0 &{}\quad 0 &{}\quad R(\cdot ,v) v \\ 0 &{}\quad 0&{}\quad 0 &{}\quad I \\ 0 &{}\quad - R(\cdot ,v) v &{}\quad -I&{}\quad 0 \end{array} \right] \quad \left[ \begin{array}{l} H_x \\ H_p \\ H_{\mathbf{v}}\\ H_{ \alpha } \end{array} \right] \end{aligned}$$
(12)

where R is the curvature tensor of the metric on Q.

Indeed, we showed in [16] that these equations also hold for any metric on a Riemannian manifold, via the splitting \(p, \alpha \) of covectors \(P_{v_x}\) induced by its Levi–Civita connection. In the case of the unit sphere (\(r=1\)) the curvature tensor is given by

$$\begin{aligned} R(X,Y) Z = (Y \cdot Z)X - (X \cdot Z)Y \end{aligned}$$
(13)

For the time-minimal problem, we use the Hamiltonian (11) so that

$$\begin{aligned} H_x = 0,\quad H_p = { \mathbf v},\quad H_{\mathbf{v}} = p,\quad H_{\alpha } = A \alpha / |\alpha | \end{aligned}$$
(14)

Explicitly

$$\begin{aligned} \dot{x} = \mathbf{v},\quad \nabla _{\dot{x}} \mathbf{v} = A \alpha / |\alpha |, \, \nabla _{\dot{x}} \mathbf{\alpha } = -p, \nabla _{\dot{x}} p = R( A \alpha / |\alpha |,\mathbf{v}) \mathbf{v} . \end{aligned}$$
(15)

For cubic splines on an arbitrary Riemannian manifold Q have the optimal Hamiltonian \(H^* = -(1/2) \beta |u|^2 + p \cdot \mathbf{v} + \alpha \cdot u\). It follows from (12) that the solution curves satisfy the Crouch–Leite equations [27],

$$\begin{aligned} \nabla ^{3}_{\dot{x}} \dot{x} = - R(\nabla _{\dot{x}} \dot{x},\dot{x}) \dot{x} . \end{aligned}$$
(16)

In contradistinction, in the time-minimal case, it seems that it is not possible to write (15) a single third order equation.

3 Convex surfaces: reduction and reconstruction equations

We recall the construction that we did in [16] of coordinates \((a,v,M_1,M_2,M_3,R)\) in \(T^*(TS^2 - 0)\), with \(v>0\), \( R \in SO(3)\). The zero section must be excluded. For a closed smooth convex surface \(\varSigma \subset {\mathbb {R}}^3\), the Gauss map induces a diffeomorphism between \(T\varSigma - 0\) and \({\mathbb {R}}^+ \times SO(3)\):

$$\begin{aligned} \mathbf{v}_q \, \leftrightarrow (v,R),\quad v = ||\mathbf{v}_q || \ne 0 \end{aligned}$$
(17)

\(R \in SO(3)\) is constructed as follows: via the Gauss map, a point \(q \in \varSigma \) correspond uniquely to an external unit normal vector to the surface, which we denote \(e_3\).. Now, a nonzero tangent vector \(\mathbf{v}_q\) corresponds uniquely to a pair \((v, e_1)\) with \(v = |\mathbf{v}_q|, |e_1| = 1. \) so \( \mathbf{v}_q = v \, e_1, v > 0. \) We use a redundant vector \(e_2 = e_3 \times e_1\) to construct the matrix R with columns \(e_1,e_2,e_3\). Now recall the Darboux formulas

$$\begin{aligned} e_1' = \kappa _g \,e_2 + \kappa _n\,e_3,\quad e_2' = - \kappa _g \,e_1 + \tau _g \,e_3,\quad e_3' = -\kappa _n \,e_1 - \tau _g\,e_2\quad (' = d/ds) \end{aligned}$$

where \(\kappa _g \) is the geodesic curvature, \(\kappa _n\) the normal curvature, and \(\tau _g\) the geodesic torsion of a curve \(\gamma \) in the surface. These formulas can be rewritten as

$$\begin{aligned} \dot{R} = R \, X,\quad X = v\, \left( \begin{array}{lll} 0 &{}\quad - \kappa _g &{}\quad - \kappa _n \\ \kappa _g &{}\quad 0 &{}\quad -\tau _g\\ \kappa _n &{}\quad \tau _g &{}\quad 0 \end{array} \right) . \end{aligned}$$
(18)

The normal curvature \(\kappa _n\) cannot be a a control variable, since it corresponds to the constraining force to the surface. In fact, taking derivatives in the ambient space,

$$\begin{aligned} \ddot{\gamma } = \dot{v}\,e_1 + v^2 \,e_1' = u_1 \,e_1 + v^2 ( \kappa _g \,e_2 + \kappa _n\,e_3) = \nabla _{\dot{\gamma }}\, \dot{\gamma } + v^2 \kappa _n\,e_3 \end{aligned}$$

with

$$\begin{aligned} \kappa _n = (e_1', e_3) = - (e_3', e_1):= B(e_1,e_1) \end{aligned}$$

where B is the second fundamental form of the surface.

3.1 State equations

We then write the state equation in terms of the Levi–Civita connection,

$$\begin{aligned} \nabla _{\dot{\gamma }}\, \dot{\gamma } = \, u_1 \, e_1 + u_2 e_2 \end{aligned}$$
(19)

where \(u_1,u_2\) are the controls. This calculation above also shows that

$$\begin{aligned} u_1 = \dot{v} ,\quad u_2 = v^2 \kappa _g . \end{aligned}$$
(20)

For the geodesic torsion, Darboux found the interesting formula

$$\begin{aligned} \tau _g = \tau _g(e_1) = (\kappa _1-\kappa _2) \sin \phi \, \cos \phi \end{aligned}$$
(21)

where \(\phi \) is the angle between the unit tangent vector \(e_1\) to the curve and a principal direction on the surface. In conclusion, the state equations can be written as

Proposition 3

$$\begin{aligned} \dot{v} = u_1,\quad \dot{R} = R \, X \end{aligned}$$
(22)

with

$$\begin{aligned} X = \left( \begin{array}{lll} 0 &{}\quad -u_2/v &{}\quad -v\, B(e_1,e_1) \\ u_2/v &{}\quad 0 &{}\quad -v\, \tau _g( e_1 ) \\ v\, B(e_1,e_1) &{}\quad v\,\tau _g( e_1 ) &{}\quad 0 \end{array} \right) . \end{aligned}$$
(23)

3.2 Hamiltonian for time minimal splines on the sphere

For an arbitrary convex surface, the state equations are coupled, but for the sphere, the dependence of X on \(e_1\) disappears. Darboux formula (21) shows that the geodesic torsion vanishes identically on any spherical curve.

Thus our convention gives a negative sign for the normal curvature in the sphere. Consider a spherical curve \(\gamma (t)\), that is \(\gamma (t) \cdot \gamma (t) \equiv r^2\). Differentiating twice results \((\ddot{\gamma },\gamma ) = - (\dot{\gamma }, \dot{\gamma })\), i.e., \( (\ddot{\gamma }, e_3) = -v^2/r \), so that \(\kappa _n = - 1/r \). The state equations for the sphere are therefore (22, 23) with

$$\begin{aligned} X = \left( \begin{array}{lll} 0 &{}\quad -u_2/v &{}\quad v/r \\ u_2/v &{}\quad 0 &{}\quad 0 \\ -v/r &{}\quad 0 &{}\quad 0 \end{array} \right) \end{aligned}$$
(24)

The skew-symmetric matrix \(X \in so(3)\) can be conveniently represented as

$$\begin{aligned} \varOmega = ( 0, v/r, u_2/v ) . \end{aligned}$$
(25)

We introduce costates (aM), \( a \leftrightarrow v \) and \( M = (M_1,M_2,M_3) \leftrightarrow \varOmega = (\varOmega _1,\varOmega _2,\varOmega _3)\), with commutation relations

$$\begin{aligned} \{a, v\} = 1, \{M_i, M_j\} = \epsilon _{ijk} M_k . \end{aligned}$$
(26)

The Hamiltonian family is given by

$$\begin{aligned} H = -1 + a \cdot u_1 + M_2\, v/r + M_3 \cdot u_2/v . \end{aligned}$$
(27)

Maximizing (27) taking into account that

$$\begin{aligned} u_1^2+u_2^2 \le A^2 . \end{aligned}$$

results in

Proposition 4

The time minimal problem in the sphere \(S^2(r)\) in state variables (vR) and costates (aM) has optimal controls

$$\begin{aligned} u_1^* = A\, a /\sqrt{a^2 + M_3^2/v^2 },\quad u_2^* = A\, M_3/ \left( v \sqrt{a^2 + M_3^2/v^2 }\right) . \end{aligned}$$
(28)

The optimal Hamiltonian is given by

$$\begin{aligned} H = -1 + A \,\sqrt{a^2 + M_3^2/v^2 } + M_2 v/r \end{aligned}$$
(29)

with commutators \( \{a, v\} = 1, \{M_i, M_j\} = \epsilon _{ijk} M_k.\) The reconstruction equations are \(\dot{R} = R\,X\) with

$$\begin{aligned} X = X(M_3,a, v) = \left( \begin{array}{lll} 0 &{}\quad - u_2^*/v &{}\quad v/r \\ u_2^*/v &{}\quad 0 &{}\quad 0\\ -v/r &{}\quad 0 &{}\quad 0 \end{array} \right) . \end{aligned}$$
(30)

The reduced equations of motion are given by

$$\begin{aligned} \dot{v}= & {} u_1^* = a A/\sqrt{a^2 + M_3^2/v^2 } \nonumber \\ \dot{a}= & {} -M_2/r + \frac{A M_3^2}{ v^3 \sqrt{a^2 + M_3^2/v^2}} \nonumber \\ \dot{M}= & {} \mathrm{det}\left( \begin{array}{ccc} i &{}\quad j &{}\quad k \\ M_1 &{}\quad M_2 &{}\quad M_3\\ 0 &{}\quad v/r &{}\quad \frac{A M_3}{ v^2 \sqrt{a^2 + M_3^2/v^2}} \end{array} \right) \end{aligned}$$
(31)

Clearly we have a Casimir

$$\begin{aligned} \mu ^ 2 = M_1^2 + M_2^2 + M_3^2 . \end{aligned}$$
(32)

We have shown in [16] that the Poisson map from unreduced variables \((x,\mathbf{v},p, \alpha )\), where \( \, x \in S^2\, (r=1, \mathbf{v},p, \alpha \perp x) \) to the reduced variables \((a,v,M_1,M_2,M_3) \), is

$$\begin{aligned} a= & {} \alpha \cdot \mathbf{v}/v ,\quad v = |\mathbf{v}| \nonumber \\ M_1= & {} \mathrm{det}( p, \mathbf{v}/v, x ) \nonumber \\ M_2= & {} p \cdot \mathbf{v}/v \nonumber \\ M_3= & {} \mathrm{det}(\alpha ,x, \mathbf{v}) \end{aligned}$$
(33)

4 Relative equilibria: stability analysis

By definition, relative equilibria of the full system in \(T^*(TS^2)\) are the equilibria of the reduced system. Let’s find them. From the \((\dot{a}, \dot{v})\) equations we get:

$$\begin{aligned} \mathrm{(i) }\quad a = 0 ,\quad M_2 = \frac{ A r }{ v^2 \mathrm{sign}(v)} \, |M_3| \end{aligned}$$

From the \(\dot{M}\) equations we get either \(M_3 = 0 \) (this case will be discussed below) or, if \(M_3 \ne 0\),

$$\begin{aligned} \mathrm{(ii)} \quad M_2 = \frac{v^3}{Ar}\, \sqrt{a^2 + M_3^2/v^2} \end{aligned}$$

Using these two informations we get, if \(M_3 \ne 0\)

$$\begin{aligned} M_2/|M_3| = \frac{Ar}{v^2 \mathrm{sign}(v) } = \frac{v^2 \mathrm{sign}(v) }{A r} \end{aligned}$$

Therefore

$$\begin{aligned} v = \pm \sqrt{r A} ,\quad M_2/|M_3| = \mathrm{sign}(v) ,\quad \mathrm{sign M_2} = \mathrm{sign}(v) \end{aligned}$$
(34)

where we allow the variable v to have a negative sign as well. Note that the dimensions are correct:

$$\begin{aligned} A \sim L/T^2, \quad r \sim L \Rightarrow |v| = \sqrt{Ar} \sim L/T \end{aligned}$$

Proposition 5

The equilibria of reduced system are

$$\begin{aligned} a= & {} 0 ,\quad v = \pm \sqrt{r A} \nonumber \\ M= & {} \mu \,\left( 0, \sqrt{2}/2, \pm \sqrt{2}/2 \right) \quad \mathrm{if} \quad v > 0 \nonumber \\ M= & {} \mu \,\left( 0, - \sqrt{2}/2, \mp \sqrt{2}/2 \right) \quad \mathrm{if} \quad v < 0 \end{aligned}$$
(35)

that live in the Casimir sphere

$$\begin{aligned} \mu ^2 = 2A/r . \end{aligned}$$
(36)

The relation (36) follows from (30). The reconstructed R(t) is therefore the product of R(0) (to the left) followed by rotation around the unit vector

$$\begin{aligned} \left( 0, \mathrm{sign}(v) / \sqrt{2}, \mathrm{sign}(M_3) / \sqrt{2} \right) \,. \end{aligned}$$
(37)

with angular velocity

$$\begin{aligned} \omega = \sqrt{2A/r}\,. \end{aligned}$$
(38)

In order to proceed to the stability analysis, it is useful to give a symplectic version of the Poisson system (31). We introduce spherical coordinates in the momentum sphere \(|M| = \mu \):

$$\begin{aligned} M= & {} \mu \, ( {\cos \phi }\,{\cos \theta }, {\sin \phi }, {\cos \phi }\,{\sin \theta }) \nonumber \\&(- \pi \le \theta \le \pi ,\quad - \pi /2 \le \phi \le \pi /2) \end{aligned}$$
(39)

so that the optimal Hamiltonian becomes

$$\begin{aligned} H = \mu \, {\sin \phi }\, v/r \,+ A {\sqrt{a^2 + \mu ^2 (\cos \phi )^2\, (\sin \theta )^2/v^2}}\end{aligned}$$
(40)

Setting \( z = {\sin \phi }\) we get

Proposition 6

Symplectic description of the reduced system

$$\begin{aligned} H= & {} \mu \, z v/r \,+ A {\sqrt{a^2 + \mu ^2 (1-z^2)\, (\sin \theta )^2/v^2}}\end{aligned}$$
(41)
$$\begin{aligned} \varOmega= & {} da \wedge dv + \mu dz \wedge d\theta , \quad dz = {\cos \phi }\, d\phi \end{aligned}$$
(42)

with \(-1 \le z \le 1, \theta \in \mathfrak {R}\,\mathrm{mod}\, 2\pi \).

There are three discrete symmetries [16], that can be explored in future work: velocity reversal (changing signs in all variables), time reversal, and left–right.Footnote 3 The equilibria are

$$\begin{aligned} a= & {} 0,\quad v = \pm \sqrt{Ar} \nonumber \\ v> & {} 0 :\quad \theta = \pm \pi /2, \phi = \pi /4 \quad (z = {\sqrt{2}/2})\nonumber \\ v< & {} 0 : \quad \theta = \pm \pi /2, \phi = - \pi /4 \quad (z = - {\sqrt{2}/2}) \end{aligned}$$
(43)

The equations of motion in variables \( (a,v, z, \theta ) \) are given by

$$\begin{aligned} \dot{a}= & {} - H_v = -\mu z/r + \frac{ \mu ^2 A (1-z^2)({\sin \theta })^2}{v^3 \sqrt{P}} \nonumber \\ \dot{v}= & {} H_a = Aa/\sqrt{P} \nonumber \\ \mu \dot{z}= & {} - H_{\theta } = - \mu ^2 \, A \,(1-z^2)\, {\sin \theta }\, {\cos \theta }\,/ \left( v^2 \sqrt{P}\right) \nonumber \\ \mu \dot{\theta }= & {} H_{z} = \mu v/r - \mu ^2 \, A \, z \, ({\sin \theta })^2 /(v^2 \sqrt{P}) \end{aligned}$$
(44)

where

$$\begin{aligned} P = a^2 + \mu ^2 (1 - z^2)\, (\sin \theta )^2/v^2 . \end{aligned}$$

We computed the linearization matrix of the system at the four equiilibria (35) [equivalently (43)] with \(\mu = \sqrt{2A/r}\) (36). These four matrices are all equal; the calculation is summarized in the “Appendix A”. We get, in the order \((a,v,z,\theta )\):

$$\begin{aligned} L = \left[ \begin{array}{llll} 0 &{}\quad 2/r^2 &{}\quad 2 \sqrt{2 A r } &{}\quad 0 \\ -Ar &{}\quad 0 &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad - \sqrt{A/(2r)}\\ 0 &{}\quad -2/r &{}\quad 2 \sqrt{2} \sqrt{A/r} &{}\quad 0 \\ \end{array} \right] \end{aligned}$$
(45)

The characteristic polynomial is

$$\begin{aligned} p(\lambda ) = \lambda ^4 + 4 \,\frac{A}{r} \,\lambda ^2 + 8 \,\frac{A^2}{r^2} \end{aligned}$$
(46)

Proposition 7

The eigenvalues at the four equilibria all equal, of loxodromic type, and are given by

$$\begin{aligned} \lambda = \mu \,\left( \pm \sqrt{(\sqrt{2} - 1)/2} \pm i \,\sqrt{(\sqrt{2} + 1)/2} \right) \quad \mathrm{with}\quad \mu = \sqrt{2A/r} \end{aligned}$$
(47)

5 The problem in \(S^1\)

We now discuss the case \(M_1 = M_3 \equiv 0\), \(\ M_2 = \mathrm{const} \ne 0 \). Equations (31) yield

$$\begin{aligned} \dot{a} = -M_2/r,\quad \dot{v} = A \,\mathrm{sign}(a) \end{aligned}$$
(48)

This shows that a(t) is a linear function, and \(\dot{v} = \pm A \) according to the sign of a, that changes sign just once since we assumed \(M_2 \ne 0 \). In turn, (30) gives \(\dot{R} = R\, X \) with

$$\begin{aligned} X = X(M_3,a, v) = \left( \begin{array}{lll} 0 &{}\quad 0 &{}\quad \frac{v}{r} \\ 0 &{}\quad 0 &{}\quad 0 \\ - \frac{v}{r} &{}\quad 0 &{}\quad 0 \end{array} \right) . \end{aligned}$$
(49)

Thus the reconstruction of R(t) is given by an initial R(0) multiplied on the right by a rotation around the second axis. If \(R(0) = I \) then the tracing point traverses a circle in the x-z plane starting in the north pole of the sphere. Since R(0) is arbitrary, all great circles are covered.

This makes sense. Solutions of the time minimal problem in \(S^1\) are embedded among the solutions of the \(S^2\) problem. The problem in \(S^1\) can be thought as a collection of time minimal problems in \(\mathfrak {R}\), its universal cover, where the initial and final positions are separated by integer multiples of \(2\pi \). The problem in \(\mathfrak {R}\) is a paradigmatic example for bang-bang solutions (eg. [28], chapter 14.5).

Examining equations (44) is also instructive. This case corresponds to \(z = \pm 1\). We have

$$\begin{aligned} \dot{a} = - \mu \, \mathrm{sign}(z)/r,\quad \dot{v} = A \mathrm{sign}(a) \end{aligned}$$

which coincides with the above equations, since \(M_2 = \mu \, \mathrm{sign}(z)\). The other equations are \(\dot{z} = 0 \) and

$$\begin{aligned} \dot{\theta } = v/r - \frac{\mu A \mathrm{sign}(z)}{v^2 |a|} \end{aligned}$$

Although this equation is irrelevant for \(z \equiv \pm 1\), since the ‘latitude’ \(\theta \) is void of meaning at \(\phi = \pm \pi /2\), it carries some information. It is discontinuous and tends to infinite as \(v \rightarrow 0\). Nearby solutions, although smooth, should be highly complex. Finally, there is the case \(\mu = 0\). In this case there is no bang-bang: the physical path is uniformly accelerated along an equator.

6 Reconstructed trajectories corresponding to relative equilibria

We obtain exactly the same “figure eight ” paths in the sphere \(S^2(r)\) as in the case of cubic splines analysed in [16]. For completeness, we summarize the calculation here, making some simple adaptations. First we observe that relation (28) for \(u_2^* = v^2 \kappa _g \) implies that the reconstructed trajectories satisfy

$$\begin{aligned} |\kappa _g| = \frac{1}{r} . \end{aligned}$$
(50)

Now we recall that on a sphere of radius r, the parallel of latitude \(\alpha \) has geodesic curvature \( \kappa _g = \tan \alpha /r . \) Thus in our case \( \alpha = \pi /4. \)

Proposition 8

Figure eights. The reconstructed curves in \(S^2\), corresponding to the two equilibria, with \(R(0)=I\), are two orthogonal (touching) circles making a \(45 ^\circ \) angle with the equatorial plane. They are given by

$$\begin{aligned} \gamma (t) = r \left( \frac{\sqrt{2}}{2}\, \sin \theta , \pm \frac{1}{2}(1-\cos \theta ) , \frac{1}{2} (1+ \cos \theta )\right) \end{aligned}$$
(51)

with

$$\begin{aligned} \theta = \sqrt{2} \,\frac{v}{r} \,t , \quad |v| = \sqrt{Ar} \end{aligned}$$
(52)

Proof

As in [16] we have steady rotations about the unit vectors

$$\begin{aligned} (u_x,u_y,u_z) = \left( 0, \frac{\sqrt{2}}{2} , \pm \frac{\sqrt{2}}{2} \right) \end{aligned}$$

with angular velocity \( \omega = \pm \sqrt{2} \,v/r \). The result is the same, but the calculations is slightly different here. Recall that \(X(M_3,a,v)\) is given by (30), the infinitesimal rotations

$$\begin{aligned} (0, - v/r, A\, M_3/ (v^2 \sqrt{a^2 + M_3^2/v^2}) \end{aligned}$$

We substitute \(a=0, A = v^2/r\), so that the third entry is

$$\begin{aligned}(v^2/r) \, \mathrm{sign}(M_3)/|v| = \mathrm{sign}(M_3) |v|/r. \end{aligned}$$

Now we recall from [16] that for an unit vector \((u_x,u_y,u_z)\) the rotation matrix \(R(\theta )\) with \(R(0) = I\) is given by

$$\begin{aligned}\left[ \begin{array}{lll} \cos \theta + u_x^2 (1-\cos \theta ) &{}\quad u_x u_y (1-\cos \theta ) - u_z \sin \theta &{}\quad u_x u_z (1-\cos \theta ) + u_y \sin \theta \\ u_x u_y (1-\cos \theta ) - u_z \sin \theta &{}\quad \cos \theta + u_y^2 (1-\cos \theta ) &{}\quad u_z u_y (1-\cos \theta ) - u_x \sin \theta \\ u_z u_x (1-\cos \theta ) - u_y \sin \theta &{}\quad u_z u_y (1-\cos \theta ) + u_x \sin \theta &{}\quad \cos \theta + u_z^2 (1-\cos \theta ) \end{array} \right] \end{aligned}$$

Equations (51) come from the third column of \(R(\theta )\). \(\square \)

In hindsight, we could allow \(v<0\) in (51), so we can describe both twin circles in both directions. We have therefore four solutions, each twin pair passing starting at the north pole (0, 0, r) with velocity vector (v, 0, 0).

7 Numerical simulations

We are presently implementing two independent approaches, to validate each other. The first approach applies Pontryagin’s method directly, with spherical coordinates \((\theta , \phi , v_{\theta }, v_{\phi })\) in \(TS^2(r)\) for the state equations. We use the freeware BOCOP developed by F. Bonnan’s group at INRIA, that has a built-in implicit equation solver to adjust the initial momenta. This freeware can be implemented also with euclidian coordinates constrained to the sphere. The second approach, uses a numerical ODE solver on our system (30,31). In future work, we will need to add an implicit equation solver, to find the initial momenta \(a, M_1, M_2, M_3\) in order to reach the final position and velocities and the minimal time.

In order to mutually validate the two approaches. In (30, 31) we could add to the initial positions and velocities (known), the initial momenta \(M_1, M_2, M_3, a \) corresponding to the initial values of \(p_{\theta }, p_{\phi }, p_{v_{\theta }}, p_{v_{\phi }} \) provided by the simulation with BOCOP. In “Appendix B” we derive the translating formulas between the two sets of momenta. We are planning for future work an in depth study, aiming a comparison between time minimal and cubic splines, using a set of representative initial and final positions and velocities.Footnote 4

7.1 Using BOCOP (www.bocop.org)

Let’s now summarize the first approach. We use letters \(\theta , \phi \) to parametrize the physical sphere \(S^2(r)\) in the usual way

$$\begin{aligned} q = r\,\left( \cos \phi \cos \theta , \cos \phi \sin \theta , \sin \phi \right) \end{aligned}$$
(53)

After straightforward calculations we get

$$\begin{aligned} \nabla _{\dot{q}} \dot{q}= & {} \left( r \cos \phi \, \ddot{\theta } - 2 r \sin \phi \, \dot{\theta }\, \dot{\phi } \right) \, e_{\theta } + \left( r \ddot{\phi } + r \cos \phi \sin \phi \, \dot{\theta }^2 \right) \, e_{\phi } \nonumber \\= & {} \bar{u}_1 \,e_{\theta } + \bar{u}_2 \,e_{\phi } \end{aligned}$$
(54)

with

$$\begin{aligned} e_{\theta } = \left( -\sin \theta , \cos \theta , 0 \right) ,\quad e_{\phi } = \left( -\sin \phi \cos \theta , - \sin \phi \sin \theta , \cos \phi \right) \end{aligned}$$

and this gives us the state equations in \((\theta , \phi , v_{\theta }, v_{\phi })\)

$$\begin{aligned} \dot{\theta }= & {} v_{\theta },\quad \dot{\phi } = v_{\phi } \nonumber \\ \dot{v}_{\theta }= & {} 2 \tan \phi \quad v_{\theta } \, v_{\phi } + \bar{u}_1/ (r \cos \phi ), \nonumber \\ \dot{v}_{\phi }= & {} - \cos \phi \sin \phi \, v_{\theta }^2 + \bar{u}_2 /r. \end{aligned}$$
(55)

It is nice to write the acceleration control in terms of the tangent and surface normal,

$$\begin{aligned} \bar{u}_1 \,e_{\theta } + \bar{u}_2 \,e_{\phi } = u_1\, \mathbf{t} + u_2\, \mathbf{n} \end{aligned}$$

where

$$\begin{aligned} \mathbf{t}= & {} \frac{v_{\theta } \cos \phi }{\sqrt{v_{\theta }^2 \cos ^2 \phi + v_{\phi }^2}} \, e_{\theta } + \frac{v_{\phi } }{\sqrt{v_{\theta }^2 \cos ^2 \phi + v_{\phi }^2}}\, e_{\phi }\\ \mathbf{n}= & {} - \frac{v_{\phi } }{\sqrt{v_{\theta }^2 \cos ^2 \phi + v_{\phi }^2}}\, e_{\theta } + \frac{v_{\theta } \cos \phi }{\sqrt{v_{\theta }^2 \cos ^2 \phi + v_{\phi }^2}} \,e_{\phi } \end{aligned}$$

so that we just replace in (55) the controls \(\bar{u}_1, \bar{u}_2\) by

$$\begin{aligned} \bar{u}_1= & {} u_1 \, \frac{v_{\theta } \cos \phi }{\sqrt{v_{\theta }^2 \cos ^2 \phi + v_{\phi }^2}} - u_2 \, \frac{v_{\phi } }{\sqrt{v_{\theta }^2 \cos ^2 \phi + v_{\phi }^2}} \nonumber \\ \bar{u}_2= & {} u_1 \, \frac{v_{\theta } \cos \phi }{\sqrt{v_{\theta }^2 \cos ^2 \phi + v_{\phi }^2}} \ + u_2 \, \frac{v_{\theta } \cos \phi }{\sqrt{v_{\theta }^2 \cos ^2 \phi + v_{\phi }^2}} \end{aligned}$$
(56)

A nice feature of BOCOP is its built-in implicit equation solver. For the time minimal problem it adjusts (by a shooting method) the four unknown momenta \((p_{\theta }, p_{\phi }, p_{v_{\theta }},p_{v_{\phi }} ) \) at the initial time position and velocity, and finds the time interval T leading to the prescribed end position and end velocity vector.Footnote 5

Due to the SO(3) symmetry, in the simulations the initial and final positions can be taken at the equator (\(\phi =0\)), and the initial longitude also set at \(\theta ^o=0\). Thus the data to be chosen are \(\theta ^f\) and the initial and final values of the velocities \(v_{\theta }, v_{\phi }\). The implicit solver is a shooting method to reach \(\theta ^f, v^f_{\theta }, v^f_{\phi } \) in an unknown time T from the initial values \(\theta ^o=\phi ^o=0, v^o_{\theta }, v^o_{\phi } \).

Fig. 1
figure 1

Benchmark example. \(x_1=\theta , x_2 = \phi , v_1 = \dot{\theta }, v_2 = \dot{\phi }; u_1, u_2 \) are respectively the tangential and normal accelerations; the boundary conditions are at half of a circle with \(k_g = 1\): \(\theta ^o = \phi _o = 0, \dot{\theta }_o = 0, \dot{\phi }_o = 1, \theta _f = \pi /2, \phi _f = 0, \dot{\theta }_f = 0, \dot{\phi }_f = -1\). The control variables seem to oscillate, but note the scale: up to very small numerical error, \(u_1 \equiv 0, u_2 \equiv 1\), as expected

Figure 1 shows the result of a benchmark simulation, with initial and final conditions in a circle with \(k_g=1\). A further interesting check is to compare the numerical results for the costates \(p_{\theta }(t), p_{\phi }(t), p_{v_{\theta }}(t), p_{v_{\phi }}(t) \) provided by BOCOP with the theoretical prediction that can be computed using (69). We can provide a zipped file with the implementation for the interested reader. When all is debugged, and the ‘build’ command in the GUI is working, one just clicks the green arrow, and BOCOP does the job automatically.

figure a

Let us check if the time \(T= 2.221489\) found by BOCOP is coherent with the theory. From (52) the difference \( \sqrt{2} \times T - \pi \) must be equal to zero. Indeed, the result is 0.000067, a reasonable numerical error.

7.2 Using an ODE solver

The figures below depict numerical solutions for the Hamiltonian (41, 42) in variables \(a,v, z, \theta \), for a solution emanating from the unstable equilibrium with loxodromic eigenvalues. In Figs. 234 and, 5 the equilibrium is inserted as initial condition. As the program runs, the very small numerical error in the initial condition amplifies exponentially, and the solutions run away. Seemingly it approaches a neighborhood of the other organizing center corresponding to \( |z|=1\). Figures 6 and 7 hints on how intricate is phase portrait . Further numerical work will be needed to clarify the transition from the linear regime for very small t to the nonlinear regime, and the asymptotic behavior as \(t \rightarrow \infty \), and if v reaches zero on such solutions.

Fig. 2
figure 2

\(a-t\) plot for a solution emanating from the equilibrium. Parameters \(r = A =1\). Note the near linear evolution of a(t) for larger values of t. The predicted slope, when \(z \sim -\,1\) is \( \dot{a} \sim \sqrt{2}\)

Fig. 3
figure 3

\(z-t \) plot. Note the dramatic change in sign of z around \(t \sim 33\). For larger t it seems to stabilize far from \(z = -\,1\)

Fig. 4
figure 4

\(\theta -t\) plot. \(\theta (t)\) controls the oscillations in the variables \(M_1, M_3\) according to (39). Oscillations around the initial value \(\theta _o = \pi /2\) are not visible due the large scales chosen

Fig. 5
figure 5

\(a-z\) and \(a-v\) plots of the same solution of the previous figures

Fig. 6
figure 6

Initial conditions appear in the top. Lagrangian projection \(a-z\) and symplectic \(a-v\) plane projection of the solution. The phase portrait becomes intricate as one leaves a small neighborhood of the unstable fixed point

Fig. 7
figure 7

Initial conditions on top on the figures. Lagrangian projection \(a-z\) and symplectic \(a-v\) plane projection of the solution

8 Discussion

This paper is a follow up of [16]. The focus there was on a splitting of cotangent vectors \(P_{(v,q)} \in T^*(TQ)\) and then rewriting the canonical symplectic form in these split coordinates. The main example was cubic splines on spheres: one fixes the time T, and minimizes the cost function \(1/(2\beta )\, \int _O^T \, |\nabla _{\dot{\gamma }}\, \dot{\gamma }\, |^2 dt. \) We gave a Hamiltonian formulation for the Crouch–Leite equations that generate the cubic splines on \(S^n\) (16). For \(n=2\), we used the coordinates \((v, R) \in TS^2-0\), and covectors \((a, M) \in T_{(v,R)}^* (TS^2-0)\) in order to study the reduced dynamics in (avM) coordinates. We showed that the reduced cubic spline system is governed by the Hamiltonian

$$\begin{aligned} H^* = \frac{1}{2\beta }\, \left( a^2 + (M_3/v)^2 \right) + M_2\, v/r. \end{aligned}$$

In this paper we make a study about the time minimal splines with bounded acceleration on \(S^2(r)\). As far as we know, this problem has not been addressed before. The same coordinates (vRaM) are used here, leading to the reduced Hamiltonian

$$\begin{aligned} H^* = A\, \left( a^2 + (M_3/v)^2 \right) ^{1/2} + M_2\, v/r . \end{aligned}$$

The reduced equations are more involved with added subtleties. To start, here the costate a does not represent the tangential acceleration, as it was in the cubic spline case. We present in this discussion some loose ends and research directions.

8.1 Comparisons with cubic splines

It is curious that both reduced problems have the same loxodromic type of relative equilibria, and that the reconstructed paths are the same figure eights. Is there a reason beyond a mere mathematical coincidence? As regards to paths along the equators, the behavior is very different. For cubic splines the path obeys a third degree polynomial in time. For time minimal the path is a concatenation of two quadratic polynomials with a sudden jump on the second derivative, \(\pm \,A\).

One problem that comes up for comparisons, is to study time minimal splines on the hyperbolic disk. It is known that on manifolds having regions of negative (sectional) curvature, cubic splines suffer a strange syndrome: the scalar velocity may reach infinity in finite time [29]. Time minimal splines offer an alternative if one needs to avoid this threat. Comparing trajectories, balancing the time spent vs. the energetic cost could be a topic for further research.

8.2 Invariant manifolds emanating from the equilibria

Recall from [16] that for cubic splines the union of relative equilibria solutions (all circles with \(\kappa _g = 1/r\)) forms a center manifold C of dimension 4. Each unreduced relative equilibrium trajectory can be associated to its initial position and velocity vector. This center manifold is parametrized by the base \(\mathfrak {R}_+ \times SO(3) \equiv TS^2 - 0\). This is because the reduced equilibria have the scalar velocity v as a free parameter. In this case all nonzero momentum spheres have these relative equilibria trajectories. \(M_1^2 + M_2^2 + M-3^2 = \mu ^2, \) with \(\mu = \sqrt{2} (\beta /r) \, v^3\). In the reduced space we have local unstable and stable (spiralling) manifolds of dimension two. They lift to 6-dimensional manifolds \(W_C^u, W_C^s \) inside \(T^*(TS^2)\). This dimension count is coherent: \( \mathrm{dim } \,C = 6 + 6 - 8 = 4 \). There is a scale invariance, given by

$$\begin{aligned} (v(t),R(t)) \rightarrow (\gamma v(\gamma t), R(\gamma t)), \end{aligned}$$
(57)

which for the conjugate momenta entails

$$\begin{aligned} a \rightarrow \gamma ^2 a(\gamma t),\quad M \rightarrow \gamma ^3 M(\gamma t) . \end{aligned}$$
(58)

For time minimal splines, there is a striking difference. The above scaling is lost, due to the interplay between the radius r and the acceleration A. In consequence, in the reduced system, only one momentum sphere \(\mu = \sqrt{2A/r}\) has an equilibrium. Fix that momentum sphere, together with the total energy. Then the phase space has effective dimension 7. The center manifold is parametrized by SO(3) since the velocity must be \( \sqrt{Ar}\). The dimension count is \( \mathrm{dim }\, C = 5 + 5 - 7 = 3 \) which is also coherent. Global dynamical question can be posed for both cases: on the reduced system, take initial conditions near the loxodromic equilibrium. What happens with the corresponding reconstructed solutions? To start, it is in order understanding the global behavior of the 2-dimensional stable and unstable manifolds of the reduced system \(W_{\mathrm{red}}^u\) and \(W_{\mathrm{red}}^s\). Do they intersect transversally?

8.3 Undefined situations for the controls

The time minimal spline problem in euclidian spaces has been addressed in [15, 30,31,32]. Even in the plane, although the setting is quite simple, the analysis is subtle at special situations where the controls are undefined. Take \(x, v, p_x, p_v\) in \( \mathfrak {R}^n\) (\(n=2\), and \(n=3\) suffice). The state equations are in this case \( \dot{x} = v, \dot{v} = u \) so that the Hamiltonian family is

$$\begin{aligned} H = -1 + p_x \cdot v + p_v \cdot u ,\quad |u| \le A, \end{aligned}$$

Hence \(u^* = A p_v/|p_v|\), provided \(p_v \ne 0\). How the solutions behave when \(p_v=0\)? This was discussed in the above references, but we fear that not completely settled.

The analysis in the sphere should be similar. Troublesome values of the reduced coordinates are i) \( a = M_3 = 0 \quad \mathrm{with}\quad v \ne 0 . \) and of course ii) \(v=0\). The value \(v=0\) is even more troublesome due to an artifact of the coordinates (vR) in \(TS^2\): R is not well defined at the zero section. Probably it will be useful in both cases to go back to the unreduced formulation (8, 9) at \(\alpha =0\).