1 Introduction

Studying the dynamics of classical mechanical systems has a long history. In particular, the differential geometric viewpoint, which focuses on coordinate-invariant descriptions of mechanical systems, is given, e.g., in [38] and transferred to optimal control in [4]. Here, system dynamics are encoded either in the Lagrangian or the Hamiltonian function which lead to the well-known Euler–Lagrange equations or Hamilton equations, respectively. Of particular interest in this context is the study of symmetries. For mechanical systems, symmetries are characterized by an invariance of the Lagrangian with respect to translations or rotations of the system, for instance, inducing a first integral, i.e., a quantity that is preserved along the system trajectory. These symmetries can be described by actions of a Lie group. Due to symmetry, equivalent trajectories exist, i.e., possibly controlled system trajectories which are identical modulo the action of the Lie group. The close relation of symmetries and conserved quantities (also called first integrals) of dynamical systems goes back to Noether’s fundamental insights obtained in the 1920s. Symmetry can be exploited to reduce the system dimension, see, e.g., [38] for an introduction. Dynamical systems with symmetry might show further structure in terms of relative equilibria, which are system motions that are completely generated by the symmetry action and thus, partially stationary in all other directions. Relative equilibria are then obtained as steady states of a symmetry reduced system. This can clearly be seen in the historical setting of Routh, wherein symmetry is assumed as invariance with respect to a subset of all configuration states (see e.g., [3] for a concise introduction). The concept of symmetry in dynamical systems transfers to control systems [3, 4, 11]. In very early works, symmetries of optimal control problems have been considered based on symmetries of the optimal control Hamiltonian (see e.g., [58]) and used to construct decompositions of optimal feedback laws [26]. Symmetric optimal control problems have also been studied in [2, 12, 52, 53] where a Noether theorem for Optimal Control Problems (OCPs) is proven leading to generalized conserved quantities along the solutions. More concretely, in [51], first integrals of optimal control problems with symmetry are identified, i.e., quantities which are preserved along the state and adjoint trajectories (the so called biextremals). The main motivation in the aforementioned works is to use first integrals to reduce the dimension of the equations of motions for dynamical systems or control problems. Relative equilibria have been generalized to control systems by Frazzoli et al. who coined the notion of trim primitives [25]. Trim primitives can be exploited in the analysis of OCPs, in motion planning, or in model predictive control of dynamical systems [22,23,24,25].

In the context of optimal control in economics, the notation of turnpike phenomena dates back to the foundational book of Dorfman [13], while earlier reference mentioning the phenomenon can be traced back to Ramsey [46] or von Neumann [59]. The turnpike phenomenon refers to a similarity property of OCPs whereby for varying initial conditions and varying horizon lengths the optimal solutions approach the neighborhood of a specific steady state during the middle part of the horizon and the time spend close to this steady state (a.k.a. the turnpike) grows as the horizon increases. Analysis and investigation of this concept are a classical branch of optimal control for economics, cf. [6, 39]. However, recently there has been a renewed interest in turnpike properties for optimal control of finite- and infinite-dimensional systems [10, 31, 32, 36] and in the context of receding-horizon solutions to OCPs [17, 28]. Interestingly, there exists a close relation between turnpike properties and dissipativity notions in OCPs, see [19, 29]. The main advantage of the dissipativity-based approach to turnpike results is that it allows to uncover fundamental mechanisms generating the turnpike phenomenon, see [16] for a recent literature overview. This way, it goes beyond the economics inspired approach which identifies the phenomenon in specific problems and only rarely asked for generalized analysis.

Moreover, it deserves to be noticed that the turnpike—i.e., the steady state which is approached be the optimal finite-horizon solutions and which under suitable conditions turns out to be a stable equilibrium of the infinite-horizon optimal solutions [18]—can be regarded as the attractor of the infinite-horizon OCP. Hence it is far from surprise that this attractor can be more general than a simple equilibrium. For example, in [48] a periodic turnpike theorem is introduced. In [55], the concept of a turnpike with respect to general sets was proved for infinite-dimensional nonlinear optimal control. In [14, 15, 44] a class of time-varying turnpike properties (so called velocity turnpikes) are analyzed, partially induced by symmetries. In [54], sufficient conditions for the inversely proportional bound on the distance to the turnpike with respect to the horizon length, already observed in [14, 15], are given via an analysis of the first-order optimality conditions. Recently, in [20, 49] it was shown that minimization of supplied energy in the context of port-Hamiltonian systems gives rise to an entire linear subspace of turnpikes.

The contribution of the present paper is to link the realms of turnpikes, trim solutions, and symmetries in OCPs for mechanical systems. Specifically, we consider Lagrangian systems with symmetries. Based on the established concepts of trim solutions, we show that if either one first formulates the OCP and then applies the trim condition to the optimality system, or one first applies the trim condition and then formulates a reduced OCP, one obtains the same result. While at first glance this looks not surprising, the commutativity of problem reduction and optimization generalizes a classical insight, wherein turnpikes are characterized as the attractive steady states of the optimality system [21, 31, 56, 67]. Specifically, this approach provides a handle to characterize time-varying turnpike solutions via a reduced OCP. Moreover, we show that under mild assumptions—i.e., if one allows non-equilibrium solutions travelling through the trim manifold—a dissipativity concept enables an elegant characterization. Specifically, we introduce a notion of dissipation of optimal solutions with respect to the distance to a manifold (here the trim manifold) and we show that this implies that optimal system operation indeed occurs on this manifold. Moreover, we show that the very same dissipativity condition implies the existence of a measure turnpike with respect to the trim manifold, i.e., the optimal solutions will spend only limited amount of time off the this manifold. In sum, the present paper does not only generalize our previous conference publications [14, 15], it also introduces a novel manifold generalization of the established dissipativity notion for OCPs. Moreover, as a by-product of our investigations, we derive a transformation to map adjoints from OCPs stated with Euler–Lagrange dynamics to the ones formulated with Hamiltonian dynamics and vice versa without resolving the problems.

The remainder of the paper is structured as follows: In Sect. 2, we introduce the problem setting and provide background on symmetries and trims as well as on Lagrangian and Hamiltonian systems. Section 3 provides novel results on the equivalence of first applying a specific problem reduction and then optimizing with the reversed order sequence. Moreover, in this section we also introduce the concept of dissipativity of OCPs with respect to manifolds and we show that this allows to state sufficient conditions for a generalized turnpike property on manifolds, whereby the manifold may or may not be induced by an underlying symmetry. Section 5 links the former results to mechanical systems in Hamiltonian form and shows how one may elegantly map the adjoint variables between OCPs for Lagrangian and OCPs for Hamiltonian systems. Finally, Sect. 6 illustrates our findings considering the Kepler problem. This paper ends with conclusions and an outlook.

Notation: \(\mathbb {N}\) denotes the positive integers, \(\mathbb {N}_0 \doteq \mathbb {N} \cup \{0\}\), and \(\mathbb {R}\) represents the real numbers. \(L^\infty ([0,T],\mathbb {R}^n)\) is the space of Lebesgue-measurable, essentially bounded functions on the interval [0, T] mapping into \(\mathbb {R}^n\), \(n \in \mathbb {N}\). Moreover, the Sobolev space \(W^{1,\infty }([0,T],\mathbb {R}^n)\) is the linear space of all functions \(x:[0,T] \rightarrow \mathbb {R}^n\) such that \(x,\dot{x} \in L^\infty ([0,T],\mathbb {R}^n)\) where \(\dot{x}\) denotes the weak time derivative of x. Furthermore, for \(x \in \mathbb {R}^n\) and a nonempty set \(S \subseteq \mathbb {R}^n\), \({{\,\mathrm{\text {dist}}\,}}(x,S)\) is defined by \(\inf _{y \in S} \Vert x - y \Vert \) where \(\Vert \cdot \Vert \) denotes the Euclidean distance in \(\mathbb {R}^n\).

2 Lagrangian systems with cyclic variables

Mechanical systems can be described by the Lagrange function

$$\begin{aligned} L(q,\dot{q}) = \frac{1}{2} \dot{q}^\top M(q) \dot{q} - V(q), \end{aligned}$$
(1)

composed of the kinetic energy \(\frac{1}{2} \dot{q}^\top M(q) \dot{q}\) with symmetric mass matrix \(M(q) \in \mathbb {R}^{n \times n}\) and potential energy V. Here, the time-dependent configuration variables are denoted by \(q = q(t) \in Q\), where Q is the n-dimensional configuration manifold. The corresponding velocities \(\dot{q} = \dot{q}(t)\) lie in the tangent space \(T_qQ\) at q. The tangent bundle is denoted by TQ, its dual, the cotangent bundle, by \(T^*Q\).

The Euler–Lagrange equation

$$\begin{aligned} \frac{\mathrm {d}}{\mathrm {d}\,t} \frac{\partial }{\partial \,\dot{q}} L(q,\dot{q}) - \frac{\partial }{\partial \,q} L(q,\dot{q}) = f(u) \end{aligned}$$
(2)

with forcing term \(f: \mathbb {R}^{m} \rightarrow {T^*Q}\), \(m\in \mathbb {N}\), reads

$$\begin{aligned}&M(q) \ddot{q} + \nabla m(q,\dot{q}) \dot{q} - \frac{1}{2} \dot{q}^\top \nabla m(q,\dot{q}) + \nabla V(q)&= f(u) \end{aligned}$$
(3)

where we used the abbreviation \(\nabla m(q,\dot{q}) \doteq \frac{\partial }{\partial \,q} \left( M(q) \dot{q}\right) \) to avoid tensor calculations.

2.1 Cyclic variables

A subclass of (Lagrangian) systems exhibits cyclic variables, which induce the following structure. The configuration space can be split into copies of \(S^1\) and the so-called shape space S, i.e., \(Q = S \times (S^1 \times \ldots \times S^1)\). Accordingly, the configuration variables q are split into shape variables s and cyclic variables \(\theta \), i.e., \(q = (s, \theta )\), where the dimension of \(\theta \) defines the number of copies of \(S^1\). The variables \(\theta \) are those variables, which do not appear explicitly in the kinetic and potential energy, although their velocities do. This directly implies that also the Lagrangian is independent of the cyclic variables \(\theta \),

$$\begin{aligned} L(q,\dot{q}) = L(s,\dot{s},\dot{\theta }).\end{aligned}$$

Finally, the existence of cyclic variables induces symmetry in the unforced system, i.e., \(f(u)\equiv 0\). The Euler–Lagrange equations (2) for \(\theta \) reduce to

$$\begin{aligned} \frac{\mathrm {d}}{\mathrm {d}\,t} \frac{\partial }{\partial \,\dot{\theta }} L(s,\dot{s},\dot{\theta }) = 0, \end{aligned}$$

i.e., \(p_\theta \doteq \frac{\partial }{\partial \,\dot{\theta }} L(s,\dot{s},\dot{\theta }) \) is constant along system motions. This is a special case of Noether’s theorem, which relates system symmetry to the existence of a conserved quantity. In our case, the system symmetry is induced by the invariance of L w.r.t. shifts in \(\theta \).

2.2 Block-diagonal mass matrix structure

As the mass matrix M and the potential energy V are both independent of the cyclic variables \(\theta \) we may write

$$\begin{aligned} M(q) = \begin{bmatrix} M_{11}(s) &{} M_{12}(s) \\ M_{21}(s) &{} M_{22}(s) \end{bmatrix} \qquad \text { and }\qquad V(q) = V(s). \end{aligned}$$

In the subsequent analysis, we make the following assumption to avoid technicalities.

Assumption 1

Let the matrix M be block diagonal, i.e., \(M_{12} = M_{21} = 0\) holds. Let further \(M(q)=M(s)\) be regular for all \(s\in S\).

Invoking Assumption 1 to make use of the block-diagonal inertia matrix M, the Euler–Lagrange equation (3) can be written as

$$\begin{aligned} \begin{bmatrix} M_{11} &{} 0 \\ 0 &{} M_{22} \end{bmatrix} \begin{bmatrix} \ddot{s} \\ \ddot{\theta } \end{bmatrix}&+ \begin{bmatrix} \frac{\partial }{\partial s}(M_{11} \dot{s}) \dot{s} \\ \frac{\partial }{\partial s} (M_{22} \dot{\theta }) \dot{s} \end{bmatrix} - \frac{1}{2} \begin{bmatrix} \dot{s}^\top \frac{\partial }{\partial s}(M_{11} \dot{s}) + \dot{\theta }^\top \frac{\partial }{\partial s} (M_{22} \dot{\theta }) \\ 0 \end{bmatrix} \\&+ \begin{bmatrix} \frac{\partial V(s)}{\partial \,s} \\ 0 \end{bmatrix} = \begin{bmatrix} f_s(u)\\ f_\theta (u)\end{bmatrix} , \end{aligned}$$

where we suppressed the argument s of the matrices \(M_{ii}\), \(i \in \{1,2\}\). Clearly, this can be written as a first-order system

$$\begin{aligned} \begin{aligned} \dot{s}&= v_s \\ \dot{v}_s&= M_{11}^{-1}(s) \left( \textstyle \frac{v_s^\top }{2} \frac{\partial (M_{11}(s) v_s)}{\partial s} + \frac{v_{\theta }^\top }{2} \frac{\partial (M_{22}(s) v_\theta )}{\partial s} - \frac{\partial (M_{11}(s) v_s)}{\partial s} v_s - \frac{\partial V(s)}{\partial \,s} + f_s(u) \right) \\ \dot{\theta }&= v_\theta \\ \dot{v}_\theta&= M_{22}^{-1}(s) \left( -\frac{\partial }{\partial s} (M_{22}(s) v_\theta ) v_s + f_\theta (u) \right) . \end{aligned} \end{aligned}$$
(EL)

Remark 1

(Non-orthogonal forcing) Note that what we observed in Sect. 2.1, i.e.,

$$\begin{aligned} p_\theta \doteq \frac{\partial }{\partial \,v_\theta } L(s,\dot{s},v_\theta ) = M_{22}(s) v_{\theta } = \text {const}., \end{aligned}$$
(4)

does not hold in (EL) in the presence of forces. However, in case of orthogonal forcing (i.e., orthogonal to the subspace spanned by cyclic variables), namely \(f_\theta (u)\equiv 0\), \(p_\theta \) remains an invariant along solutions to (EL).

2.3 Trim primitives

Symmetry in Lagrangian systems may lead to the existence of special trajectories, so-called trim primitives (trims for short).

Definition 1

(Trim Primitive) Let a Lagrangian system (EL) be given. Assume orthogonal forcing, i.e., \(f_\theta \equiv 0\) holds. Then, a trajectory of the (EL) system \((s,v_s,\theta ,v_\theta )(t; (s^0,v_s^0,\theta ^0,v_\theta ^0))\) emanating from the initial state \((s^0,v_s^0,\theta ^0,v_\theta ^0)\) with constant input \(u(t) \equiv \bar{u}\), is called a trim (primitive) if it can be written for all \(t\ge 0\) as

$$\begin{aligned} \begin{aligned} s(t)&= s^0,\\ v_s(t)&= 0,\\ \theta (t)&= \theta ^0 + v_\theta ^0 \cdot t,\\ v_\theta (t)&= v_\theta ^0. \end{aligned} \end{aligned}$$
(5)

Roughly speaking, a trim is a motion of constant velocity only in the direction of the cyclic variables while the shape space variables are constant. Note that we can explicitly write down this specific type of trajectories, although we do not assume to know the solution of (EL) in general.

Formally, trim primitives are motions along the group orbits of the symmetry group and they correspond to relative equilibria in the uncontrolled case; for details we refer to [22, 23] and [24, Section 2] for an illustrative example. We detail both characterizations in the following.

2.3.1 Trim characterization via controlled potentials

Relative equilibria can be found by solving for the critical points of the amended potential [38]. In [22, 23], this approach has been extended to controlled potentials in order to compute trim primitives. Consider the function \(\nu (s,u) \doteq s^\top f_s(u)\). Clearly, \( \frac{\partial \nu }{\partial s} = f_s(u) \) holds. Then, we define the forced potential

$$\begin{aligned} V^u(s,u) \doteq V(s) - \nu (s,u). \end{aligned}$$
(6)

Note that the Euler–Lagrange equations (EL) with orthogonal forcing can also be derived as unforced Euler–Lagrange equations with \(V^u\) replacing the original potential V. Interpreting the forcing as an additional parametrized potential allows us to apply the classical theory of relative equilibria [38]: The locked inertia tensor, i.e., the inertia tensor if shape variables s are fixed, is given by \(M_{22}(s)\). Then, we fix a value \(\mu \, { \in T^\star _q Q}\) of the conserved quantity (4), \(p_\theta = M_{22}(s) v_{\theta }\). For instance, using the initial values \(s^0\) and \(v_\theta ^0\) yields \(\mu = M_{22}(s^0) v_{\theta }^0\). Lastly, we define the forced amended potential as

$$\begin{aligned} V_\mu ^u(s,\mu ,u)&\doteq V^u(s,u) + \frac{1}{2} \mu ^\top M_{22}^{-1}(s) \mu . \end{aligned}$$
(7)

The following central lemma yields a way to derive trim primitives. A proof can be found in [22, 23].

Lemma 1

Consider a Lagrangian system (EL) with orthogonal forcing, i.e., \(f_\theta \equiv 0\). Let \((\hat{s},\hat{\mu },\hat{u})\in S\times T^\star _q Q\times \mathbb {R}^{m}\) be a critical point of the forced amended potential (7), i.e.,

$$\begin{aligned} \nabla _s V_\mu ^u(\hat{s},\hat{\mu },\hat{u}) = \frac{\partial V(s)}{\partial s} + \frac{1}{2} \mu ^\top \frac{\partial }{\partial s} (M^{-1}_{22}(s) \mu ) -f_s(u) = 0. \end{aligned}$$
(8)

Then, \((\hat{s},\hat{\mu },\hat{u})\) defines a trim primitive in the following way:

$$\begin{aligned} s(t)&= \hat{s},&v_s(t)&= 0,\\ \theta (t)&= \theta ^0 + M_{22}(\hat{s})^{-1} \hat{\mu } \cdot t,&v_\theta (t)&= M_{22}(\hat{s})^{-1} \hat{\mu },\\ u(t)&= \hat{u}, \end{aligned}$$

with \(\theta ^0\) being an arbitrary initial value of the cyclic variable.

2.3.2 Trim characterization via partial steady states

A trim requires the shape space variables s to be at steady state. Then, \(\dot{s} = v_s = 0\) holds along the trim trajectory and thus, also \(\dot{v}_s = 0\). This simplifies the corresponding differential Equation in (EL) to (recall \(M_{11}\) is assumed to be regular for all s)

$$\begin{aligned} \frac{1}{2} v_\theta ^\top \frac{\partial }{\partial s} (M_{22}(s) v_\theta ) - \frac{\partial }{\partial s} V(s) + f_s(u) = 0. \end{aligned}$$

Lemma 2

(Trim condition) Consider a Lagrangian system (EL) with orthogonal forcing, i.e., \(f_\theta \equiv 0\). Let a function T be given by

$$\begin{aligned} T(s,v_\theta , u)\doteq M_{11}^{-1}(s) \left( \frac{1}{2} v_\theta ^\top \frac{\partial }{\partial s} (M_{22}(s) v_\theta ) - \frac{\partial }{\partial s} V(s) + f_s(u) \right) . \end{aligned}$$
(9)

Then, a triple \((\tilde{s},\tilde{v}_\theta ,\tilde{u})\) which satisfies \(T(\tilde{s},\tilde{v}_\theta ,\tilde{u}) = 0\) defines a trim primitive when setting \(s^0=\tilde{s}\), \(v_\theta ^0=\tilde{v}_\theta \) and \(\bar{u}=\tilde{u}\) in Definition 1, with \(\theta ^0\) being an arbitrary initial value of the cyclic variable.

Corollary 1

Every triple \((\hat{s},\hat{\mu },\hat{u})\) which satisfies (8) in Lemma 1, also satisfies \(T(\hat{s},\hat{v}_\theta ,\hat{u})=0\) with \(\hat{v}_\theta = M_{22}(\hat{s})^{-1} \hat{\mu }\) in Lemma 2 and vice versa, using

$$\begin{aligned} M^\prime _{22}(s)^{-1} = - M_{22}^{-1}(s) M^\prime _{22}(s) M_{22}^{-1}(s). \end{aligned}$$
(10)

Finally, we introduce the trim manifold as a submanifold of TQ.

Definition 2

(Trim manifold) The trim manifold \(\mathcal T\) is defined by

$$\begin{aligned} \mathcal T \doteq \{ (s, v_s, \theta , v_\theta )^\top \in TQ \,|\, v_s = 0 \text { and } \exists u \in \mathbb {R}^{m}:~T(s,v_\theta ,u) = 0 \}, \end{aligned}$$

with T defined by (9), i.e., the manifold of states for which a control exists such that Definition 1 for trim primitives is satisfied.

Assuming orthogonal forcing (\(f_\theta \equiv 0\)) in (EL), each point in the trim manifold can serve as the initial value of a trim primitive. If an initial point \((s^0, v_s^0, \theta ^0, v_\theta ^0) \in \mathcal T\) and \(\bar{u}\) are chosen such that \(T(s^0,v_\theta ^0,\bar{u})=0\) holds, then \((s,v_s,\theta ,v_\theta )(t; (s^0,v_s^0,\theta ^0,v_\theta ^0)) \in \mathcal T\) for all \(t\ge 0\) given that \(u(t)\equiv \bar{u}\), i.e., the trim primitive stays within the trim manifold.

Remark 2

Moreover, the function T can be interpreted as an output map and the dynamics on \(\mathcal T\) can be understood as the zero dynamics of (EL) w.r.t. \(T(s,v_\theta , u) = 0\). Note that this viewpoint does not rely on the restriction to orthogonal forcing, i.e., allowing \(f_\theta (u) \ne 0\), more solutions besides trims which evolve in \(\mathcal T\) may exist. For more details on zero-dynamics, see [34, 41] and [43] for the link to symmetries.

In the following, we study the role of trim primitives and output-zeroing solutions in optimal control. To simplify the further exposition, we will consider all variables to be scalar-valued, i.e., \((s,\theta ,v_s,v_\theta ) \in \mathbb {R}^4\) and \(M_{11}(s), M_{22}(s) \in \mathbb {R}\). The implications will be discussed in Remark 4. Note that by fixing the set of coordinates, we also decide to leave the differential geometric setting and consider coordinates in the state space \(\mathbb {R}^4\). This leads to the following set of system equations

$$\begin{aligned} \begin{aligned} \dot{s}&= v_s, \\ \dot{v}_s&= M_{11}^{-1} (s)\left( \frac{1}{2} M'_{22}(s) v_\theta ^2(t) - \frac{1}{2} M'_{11}(s) v^2_s- V'(s) + f_s(u) \right) , \\ \dot{\theta }&= v_\theta , \\ \dot{v}_\theta&= M_{22}^{-1}(s) \left( - M'_{22}(s) v_\theta (t) v_s + f_\theta (u) \right) . \end{aligned} \end{aligned}$$
(11)

Note that in terms of the trim conditions, we may write \( \dot{v}_s = T(s,v_\theta ,u)- \frac{1}{2} M_{11}^{-1} M'_{11}(s) v^2_s \), where the last term vanishes on \(\mathcal {T}\).

3 Optimal control of systems with symmetry

We start by formulating the Optimal Control Problem (OCP) subject to the first-order Euler–Lagrange system (11). To this end, consider a continuously differentiable stage cost \(\ell :\mathbb {R}^3 \times \mathbb {R}^m \rightarrow \mathbb {R}\). Further, let an initial state \((s^0,v_s^0,\theta ^0,v_\theta ^0)\in \mathbb {R}^4\) and a time horizon \(T>0\) be given. The OCP we will consider in the following is given by

figure a

Our standing assumption on the stage cost is as follows.

Assumption 2

The stage cost is independent of \(\theta \), i.e., \(\frac{\partial \ell }{\partial \theta } = 0\) holds.

This assumption reflects the underlying symmetry property, i.e., we do not penalize \(\theta \) in the OCP.

We will now derive the first-order Necessary Conditions of Optimality (NCO) for OCP. As OCP does neither involve terminal constraints nor input constraints, abnormality cannot occur, cf. [37, Rem. 6.9, p. 168], which allows us to normalize (and hence omit) the multiplier of the stage cost in the following. We consider the adjoints (co-states) \(\lambda =\left( \lambda _s,\lambda _{v_s},\lambda _\theta ,\lambda _{v_\theta }\right) \), and the (optimal control) Hamiltonian of OCP,

$$\begin{aligned} \mathcal {H}(s,v_s,v_\theta ,u,\lambda )&\doteq \ell (s,v_s,v_\theta ,u) \\&\quad \quad + \begin{bmatrix} \lambda _s \\ \lambda _{v_s} \\ \lambda _\theta \\ \lambda _{v_\theta } \end{bmatrix}^\top \begin{bmatrix} v_s\\ M^{-1}_{11}(s) \left( \frac{1}{2} M'_{22}(s) v_\theta ^2 {-} \frac{1}{2}M'_{11}(s) v_s^2 {-}V'(s) {+} f_s(u) \right) \\ v_\theta \\ M^{-1}_{22}(s) \left( - M'_{22}(s) v_\theta v_s + f_\theta (u) \right) \end{bmatrix}. \end{aligned}$$

Hence, the adjoint equations read

$$\begin{aligned} \dot{\lambda }(t) =&-\begin{bmatrix} 0 &{} 1&{} 0&{} 0\\ L_1(s) &{} -M^{-1}_{11}(s) M'_{11}(s) v_s &{} 0 &{} M^{-1} _{11}(s) M'_{22}(s) v_\theta &{} \\ 0 &{} 0 &{} 0 &{} 1\\ L_2(s)&{} -M^{-1}_{22}(s) M'_{22}(s) v_\theta &{} 0 &{} - M^{-1}_{22}(s) M'_{22}(s) v_s \end{bmatrix}^\top \begin{bmatrix} \lambda _s \\ \lambda _{v_s} \\ \lambda _\theta \\ \lambda _{v_\theta } \end{bmatrix} - \begin{bmatrix} \frac{\partial \ell }{\partial s} \\ \frac{\partial \ell }{\partial v_s}\\ 0 \\ \frac{\partial \ell }{\partial v_\theta } \end{bmatrix}\nonumber \\ \end{aligned}$$
(12a)

with \(\lambda (T) = 0\), where \(L_1(s)\) and \(L_2(s)\) are defined by

$$\begin{aligned} L_1(s)&\doteq M^{-1}_{11}(s)' \left( - \frac{1}{2} M'_{11}(s) v_s^2 + \frac{1}{2} M'_{22}(s) v_\theta ^2 - V'(s) + f_{s}(u)\right) \\&\quad + M^{-1}_{11}(s)\left( - \frac{1}{2}M''_{11}(s) v_s^2 + \frac{1}{2} M''_{22}(s) v_\theta ^2 -V''(s) \right) ,\\&= \frac{\partial }{\partial s} \left( T(s,v_\theta ,u)- \frac{1}{2} M_{11}^{-1} M'_{11}(s) v^2_s \right) ,\\ L_2(s)&\doteq -M^{-1}_{22}(s)' M'_{22}(s) v_\theta v_s - M^{-1}_{22}(s) M''_{22}(s) v_\theta v_s + M_{22}^{-1}(s)' f_\theta (u). \end{aligned}$$

Observe that

$$\begin{aligned} M^{-1} _{11}(s) M'_{22}(s) v_\theta = \frac{\partial }{\partial v_\theta } T(s,v_\theta ,u). \end{aligned}$$

Moreover, the gradient stationarity condition reads

$$\begin{aligned} 0 = \mathcal {H}_u =&M^{-1}_{11}(s) f_s^\prime (u) \lambda _{v_s} + M^{-1}_{22}(s) f_\theta ^\prime (u) \lambda _{v_\theta } + \frac{\partial \ell }{\partial u}\nonumber \\ =&\frac{\partial }{\partial u} T(s,v_\theta ,u)\lambda _{v_s} + M^{-1}_{22}(s) f_\theta ^\prime (u) \lambda _{v_\theta } + \frac{\partial \ell }{\partial u}. \end{aligned}$$
(12b)

In order to identify turnpike phenomena in optimal control of Lagrangian systems of type (11), we will study the optimal control problem when restricting it to the trim manifold \(\mathcal T\) via its necessary conditions of optimality.

3.1 Optimal control on the trim manifold \(\mathcal T\)

We are interested in studying the output zeroing dynamics as introduced in Remark 2 in an optimal control setting. In the scalar case, the output zeroing condition (9) can be rewritten as

$$\begin{aligned} T(s,v_\theta ,u) = M_{11}^{-1}(s) \left( \frac{1}{2} M^\prime _{22}(s)v^2_\theta - V'(s) + f_s(u)\right) =0. \end{aligned}$$
(13)

If (13) holds along a trajectory with the shape variable s being at steady state, i.e., \(v_s(t) = 0\) holds for all \(t \ge 0\), the solution stays within the trim manifold (cf. Definition 2). The trajectory is not necessarily a trim, though, since the control need not be constant.

Restricting to output-zeroing dynamics leads to the following reduced optimal control problem on the trim manifold \(\mathcal T\):

figure b

We refer to [54,  Equation (20)] and [55,  Equation (2.2)] for a reduced OCP in a general context that is, similar to (\(\mathcal {T}\)-OCP), not given by a steady-state problem but still allows for dynamics. In our case, the reduced OCP is given by the underlying symmetry structure and hence intrinsically motivated. We will show in (3.3) that in case of orthogonal forcing, (\(\mathcal {T}\)-OCP) can be reduced to a steady-state OCP.

Next, we derive the NCO of (\(\mathcal {T}\)-OCP). To this end, we define its (optimal control) Hamiltonian

$$\begin{aligned} \mathcal {H}(\bar{v}_{\bar{\theta }},\bar{u},\bar{s},\bar{\lambda }_{\bar{\theta }},\bar{\lambda }_{\bar{v}_{\bar{\theta }}})\doteq \ell (\bar{s},0,\bar{v}_{\bar{\theta }},\bar{u}) + \bar{\lambda }_{\bar{\theta }} \bar{v}_{\bar{\theta }} + \bar{\lambda }_{\bar{v}_{\bar{\theta }}} M_{22}^{-1}(\bar{s}) f_\theta (\bar{u}) \end{aligned}$$

with the adjoints \(\bar{\lambda } = (\bar{\lambda }_{\bar{\theta }}, \bar{\lambda }_{\bar{v}_{\bar{\theta }}})\). Since the output zeroing condition (13) is not included in this Hamiltonian, we augment it by direct adjoining. This is also known as the Lagrange formalism, see, e.g., [33]. The resulting (optimal control) Lagrangian is given by

$$\begin{aligned} \mathcal {L}(\bar{v}_{\bar{\theta }},\bar{u},\bar{s},\bar{\lambda }_{\bar{\theta }},\bar{\lambda }_{\bar{v}_{\bar{\theta }}},\bar{\lambda }_{\mathcal T}) \doteq \mathcal {H}(\bar{v}_{\bar{\theta }},\bar{u},\bar{s},\bar{\lambda }_{\bar{\theta }},\bar{\lambda }_{\bar{v}_{\bar{\theta }}}) + \bar{\lambda }_{\mathcal T} T(\bar{s},\bar{v}_{\bar{\theta }},\bar{u}) \end{aligned}$$

with the Lagrange multiplier \(\bar{\lambda }_{\mathcal T}\) associated with the output zeroing condition (13). Since the right-hand sides of the Hamiltonian \(\mathcal {H}\) and the Lagrangian are independent of \(\bar{\theta }\), we suppress \(\bar{\theta }\) in the lists of arguments. Stationarity of the Lagrangian, i.e., \(\nabla _{(\bar{u},\bar{s})} \mathcal L = 0\), yields the NCO of  (\(\mathcal {T}\)-OCP):

$$\begin{aligned} \dot{\bar{\lambda }}_{\bar{\theta }}&= 0 \end{aligned}$$
(14a)
$$\begin{aligned} \dot{\bar{\lambda }}_{\bar{v}_{\bar{\theta }}}&= - \frac{\partial \ell }{\partial \bar{v}_{\bar{\theta }}} \quad - \frac{\partial }{\partial \bar{v}_{\bar{\theta }}} T(\bar{s},\bar{v}_{\bar{\theta }},\bar{u}) \bar{\lambda }_{\mathcal T} \end{aligned}$$
(14b)
$$\begin{aligned} 0&= \frac{\partial \ell }{\partial \bar{u}} + \frac{\partial }{\partial \bar{u}} f_{{\theta }}(\bar{u}) M_{22}^{-1}(\bar{s}) \bar{\lambda }_{\bar{v}_{\bar{\theta }}} + \frac{\partial }{\partial \bar{u}} T(\bar{s},\bar{v}_{\bar{\theta }},\bar{u}) \bar{\lambda }_{\mathcal T} \end{aligned}$$
(14c)
$$\begin{aligned} 0&= \frac{\partial \ell }{\partial \bar{s}} + \bar{\lambda }_{\bar{v}_{\bar{\theta }}} M^{-1}_{22}(\bar{s})' f_{{\theta }}(\bar{u}) + \frac{\partial }{\partial \bar{s}} T(\bar{s},\bar{v}_{\bar{\theta }},\bar{u}) \bar{\lambda }_{\mathcal T} \end{aligned}$$
(14d)
$$\begin{aligned} T(\bar{s},\bar{v}_{\bar{\theta }},\bar{u})&= M_{11}^{-1}(s) \left( \frac{1}{2}M_{22}'(\bar{s})\bar{v}_{\bar{\theta }}^2 - V'(\bar{s}) + f_s(\bar{u})\right) = 0 \end{aligned}$$
(14e)
$$\begin{aligned} \dot{\bar{\theta }}&= \bar{v}_{\bar{\theta }} \end{aligned}$$
(14f)
$$\begin{aligned} \dot{\bar{v}}_{\bar{\theta }}&= M_{22}(\bar{s})^{-1} f_\theta (\bar{u}) \end{aligned}$$
(14g)

for a.e. \(t\in [0,T]\), \(\bar{\lambda }(T)=0\) for all adjoint states and \((\bar{\theta },\bar{v}_{\bar{\theta }})(0)=(\theta ^0,v_\theta ^0)\). Then, in view of the terminal condition \(\bar{\lambda }_{\bar{\theta }}(T)=0\) and the associated adjoint Eq. (14a), we directly obtain \(\bar{\lambda }_{\bar{\theta }} \equiv 0\) on [0, T].

3.2 Relation of OCP and (\(\mathcal {T}\)-OCP) via their NCO

The main result in this section is the following connection between the NCO of the full and the reduced optimal control problems OCP and (\(\mathcal {T}\)-OCP).

Proposition 1

(Correspondence of NCOs) Consider OCP and its reduced counterpart (\(\mathcal {T}\)-OCP) for a Lagrangian system of type (11). Suppose that Assumptions 1 and 2 hold. If an optimal solution and the corresponding Lagrange multiplier for OCP satisfy \(\dot{s}^\star (t) = v_s^\star (t) = 0\) and \(\dot{\lambda }^\star _s(t) = 0\) for \(t \in [t_1,t_2]\subseteq [0,T]\), then they also satisfy the dynamics of the first-order NCOs of  (\(\mathcal {T}\)-OCP) for all \(t\in [t_1,t_2]\) in the sense of Table 1.

Conversely, an optimal solution and the corresponding Lagrange multiplier of (\(\mathcal {T}\)-OCP) satisfy the dynamics of the first-order NCOs of OCP in the sense of Table 1 and setting \(v_s(t) = 0\) and \({\lambda }_s(t) = 0\).

Table 1 Identification of the variables occurring in the NCOs of the reduced problem (\(\mathcal {T}\)-OCP) and the full problem OCP

Proof

We start with analyzing the NCO (12). With \(\dot{s}^\star (t) = v_s^\star (t) = 0\) for an optimal solution of OCP, the primal dynamics (11) are equivalent to (14e)–(14g), i.e., the primal dynamics of the NCO (\(\mathcal {T}\)-OCP) plus the output-zeroing condition \(T(s,v_\theta ,u) =0\).

Observe that in the adjoint Eq. (12a), we have \(\dot{\lambda }_\theta = 0\). Thus, with \(\lambda _\theta (T) = 0\), we have \(\lambda _\theta \equiv 0\). Applying the trim manifold constraints \(s \equiv \text {const}.\) and \(v_s \equiv 0\) to the NCO (12) yields, suppressing the time argument for all functions,

$$\begin{aligned} \dot{\lambda }_s&= - \frac{\partial }{\partial s}T(s,v_\theta ,u) \lambda _{v_s} - M_{22}^{-1}(s)'f_\theta (u) \lambda _{v_\theta }- \frac{\partial \ell }{\partial s} \end{aligned}$$
(15a)
$$\begin{aligned} \dot{\lambda }_{v_s}&= -\lambda _s + M_{22}^{-1}(s) M'_{22}(s) v_\theta \lambda _{v_\theta } -\frac{\partial \ell }{\partial v_s} \end{aligned}$$
(15b)
$$\begin{aligned} \dot{\lambda }_{v_\theta }&= - M_{11}(s)^{-1} M'_{22}(s)v_\theta \lambda _{v_s}- \frac{\partial \ell }{\partial v_\theta } \end{aligned}$$
(15c)
$$\begin{aligned} 0&= \frac{\partial }{\partial u} T(s,v_\theta ,u)\lambda _{v_s} + M^{-1}_{22}(s) f_\theta ^\prime (u) \lambda _{v_\theta } + \frac{\partial \ell }{\partial u} \end{aligned}$$
(15d)

with

$$\begin{aligned} \frac{\partial }{\partial s}T(s,v_\theta ,u) =&M_{11}^{-1}(s)'\left( \frac{1}{2}M'_{22}(s) v_\theta ^2 - V'(s)+f_s(u)\right) \\&+M^{-1}_{11}(s) \left( \frac{1}{2}M''_{22}(s)v_\theta ^2-V''(s)\right) . \end{aligned}$$

If \(\bar{\lambda }_{\bar{v}_{\bar{\theta }}} = \lambda _{v_\theta }\) and \(\bar{\lambda }_{\mathcal {T}}= \lambda _{v_s}\), then the gradient stationary condition (15d) is equivalent to (14c). Then, with \(\bar{\lambda }_{\mathcal {T}}=\lambda _{v_s}\) we see that (15c) coincides with (14b). Further, if \(\dot{\lambda }_s = 0\), (15a) is equivalent to (14d), where we use that the primal variables of the full OCP are constrained on \(\mathcal {T}\), i.e., \(T(s,v_\theta ,u) =0\). Finally, (15b) does not have a counterpart in the NCOs (14) of the reduced system, since \(\bar{\lambda }_{\mathcal {T}}\) is not an adjoint variable but a Lagrangian multiplier only. Nevertheless, the identifications show that given a solution of the NCO of (\(\mathcal {T}\)-OCP), this solution also satisfies the NCO of OCP with \(\dot{s}^\star (t) = v_s^\star (t) = \dot{\lambda }^\star _s(t) = 0\) and vice versa. Table 1 summarizes the correspondence of NCO variables for OCP and (\(\mathcal {T}\)-OCP). \(\square \)

The result shows that one may commutate applying the output-zeroing condition (13) in OCP with applying the necessary conditions of optimality as first considering (13) yields (\(\mathcal {T}\)-OCP), cf. Fig. 1. While at first glance this result seems to be of purely technical nature, it is of interest of its own in context of turnpike analysis of OCPs. Recall that the main structure exploited in usual turnpike analysis is that KKT conditions for an optimal steady state of a system with respect to some stage cost \(\ell \) coincide with the steady-state conditions of the optimality system, see, e.g., [21, 31, 56, 67].

3.3 Optimal control on trim manifold \(\mathcal T\) with orthogonal forcing (\(f_\theta \equiv 0\))

Whereas in the last section we allowed for a general forcing term \(f(u) = \left( f_s(u),f_\theta (u)\right) ^\top \) we will now consider particular forcings that preserve the structural symmetry of the system. As discussed in Remark 1, this means that \(f_\theta \equiv 0\) such that the forcing only acts orthogonal to the space spanned by symmetry variables, or, in other words, forcing is only allowed for the shape space variables.

We are interested in how optimal trims look like, i.e., triples (\(s,v_\theta ,u\)) satisfying \(T(s,v_\theta ,u) =0\) (recall (13)) that minimize the running cost. Here we assume now that \(\dot{s}\equiv v_s\equiv 0\) as this is required for a trim according to Definition 1.

Due to \(f_\theta \equiv 0\) and \(v_s=0\) and as \(\theta \) does occur neither in the cost functional nor on the right-hand side of the dynamics, we consider the steady state optimization problem

figure c

This problem is a particular version of (\(\mathcal {T}\)-OCP) with \(f_\theta \equiv 0\).

To derive NCO, we define the Lagrangian with an adjoint state \(\bar{\lambda }\in \mathbb {R}\)

$$\begin{aligned} \mathcal {L}(\bar{s},\bar{v}_\theta ,\bar{u},\bar{\lambda }) = \ell (\bar{s},0,\bar{v}_\theta ,\bar{u}) + \bar{\lambda } T(\bar{s},\bar{v}_\theta ,\bar{u}) \end{aligned}$$
(16)

and compute the stationarity conditions, omitting the argument \(\bar{s}\) of the mass matrices and the potential:

$$\begin{aligned} 0&=\frac{\partial \mathcal {L}}{\partial \bar{s}} = \,\frac{\partial \ell }{\partial \bar{s}} + \bar{\lambda } \frac{\partial }{\partial \bar{s}} T(\bar{s},\bar{v}_\theta ,\bar{u}) \end{aligned}$$
(17a)
$$\begin{aligned} 0&=\frac{\partial \mathcal {L}}{\partial \bar{v}_\theta } = \frac{\partial \ell }{\partial \bar{v}_\theta } + \bar{\lambda } \frac{\partial }{\partial \bar{v}_\theta } T(\bar{s},\bar{v}_\theta ,\bar{u}) \end{aligned}$$
(17b)
$$\begin{aligned} 0&=\frac{\partial \mathcal {L}}{\partial {\bar{u}}} = \frac{\partial \ell }{\partial \bar{u}} + \bar{\lambda } \frac{\partial }{\partial \bar{u}} T(\bar{s},\bar{v}_\theta ,\bar{u}) \end{aligned}$$
(17c)
$$\begin{aligned} 0&= \frac{\partial \mathcal {L}}{\partial {\bar{\lambda }}} = T(\bar{s},\bar{v}_\theta ,\bar{u}) . \end{aligned}$$
(17d)
Fig. 1
figure 1

Illustration of Propositions 1 and 2

Proposition 2

(Correspondence of NCOs (cont’d)) Consider OCP and its reduced counterpart (SOP) for a Lagrangian system of type (11) with \(f_\theta \equiv 0\). Suppose that Assumptions 1 and 2 hold. If an optimal solution and the corresponding Lagrange multiplier for OCP satisfy \(\dot{s}^\star (t) =v^\star _s(t) = 0\), \(\dot{\lambda }^\star _s(t) = 0\) and \(\dot{\lambda }^\star _{v_\theta }(t)=0\) for \(t\in [t_1,t_2]\subseteq [0,T]\), then they also satisfy the dynamics of the first order NCOs of (SOP) on \([t_1,t_2]\) when identifying \(\bar{s}\) with \(s^\star \), \(\bar{v}_\theta \) with \(v_\theta ^\star \), \(\bar{u}\) with \(u^\star \) and \(\bar{\lambda }\) with \(\lambda _{v_s}^\star \). In particular, \(v^\star _\theta (t) = \text {const}.\), \(\theta ^\star (t)\) is linear and \(\lambda ^\star _{v_s}(t)=\text {const}\) for all \(t\in [t_1,t_2]\).

Proof

The proof follows the same structure as the proof of Proposition 1 setting \(f_\theta =0\). \(\square \)

The results of Propositions 1 and 2 are summarized in Fig. 1. In essence, these results extend the usual turnpike analysis [6, 56, 67], in the sense that the turnpike now corresponds to the solutions living on the trim manifold \(\mathcal {T}\). Moreover, note that even on the level of (SOP) one considers situations more general than classical steady-state turnpikes. The reason is that, while (SOP) is a steady-state problem, its optimal solution characterizes a trim, which in turn corresponds to a continuum of dynamic trajectories.

Remark 3

(Trims, velocity turnpikes and the trim manifold) In [14, 15] we proposed the concept of velocity turnpikes to establish a link between symmetries, trims and turnpike properties in OCPs. In essence, velocity turnpikes are a special case of the trim manifold approach considered in the present paper. To establish velocity turnpikes we considered systems

$$\begin{aligned} \dot{q}&= v\\ \dot{v}&= f(v,u), \end{aligned}$$

i.e., the dynamics are assumed to be invariant of all configuration velocities. Geometrically speaking, this system class corresponds to mechanical systems on Lie groups, i.e., all position variables are cyclic. Since the stage cost \(\ell \) was not allowed to depend on the cyclic variables either, one can rely on established turnpike concepts which include all state variables except the position states. Based on the results of this paper, the next generalization is to remove the assumption on cyclic variables and to consider (mechanical) systems with general symmetries defined by left-actions \(\varPsi : \mathcal {G} \times TQ \rightarrow TQ\).

Remark 4

(Extension to the multi-variate case) In (11), we restrict our analysis to the four-dimensional case. In order to use relative equilibria in the optimal control problem and, particularly, within the turnpike analysis, the system representation is given in coordinates. However, we conjecture that a differential geometric description of turnpikes on the trim manifold can be derived such that coordinate-free descriptions which are also not limited to four dimensions can be derived. This is out of scope of this paper, though.

While the analysis so far leveraged—at least partially—symmetries and trims, we turn to a more general setting of manifold turnpikes.

4 Manifold turnpikes and optimal operation on a manifold

The basis of our subsequent developments is the following extension of OCP

figure d

where \(\psi :\mathbb {R}^4 \rightarrow \mathbb {R}^{n_\psi }\) specifies a target set. For brevity, we use the shorthand

$$\begin{aligned}x \doteq \begin{bmatrix}s&v_s&\theta&v_\theta \end{bmatrix}^\top \end{aligned}$$

for the state vector. Then, defining the terminal set \(\varPsi \doteq \{x\in \mathbb {R}^4 \,|\, \psi (x) \le 0\}\), allows to state the terminal constraint in (OCP\(_\psi \)) as \(x(T) \in \varPsi \).

4.1 Sufficient conditions for manifold turnpikes

The concept of a turnpike property with respect to sets is given in [55] in the more general framework of nonlinear optimal control in infinite dimensions. The authors showed that optimal operation on a set, a controllability assumption with respect to this set and a coercivity property on the optimal value function imply a weak turnpike property with respect to this set [55, Theorem 1]. In the special case that the set is given by an optimal equilibrium, i.e., is a singleton, they proved that strict dissipativity implies the above mentioned coercivity property and a measure turnpike property, see [55, Section 3]. Next we introduce a dissipativity framework for the turnpike property in connection to optimal operation with respect to a manifold in order to generalize this result.

Before we proceed, we require the following notation: A continuous function \(\alpha : \mathbb {R}_{\ge 0} \rightarrow \mathbb {R}_{\ge 0}\) is said to be a class \(\mathcal {K}\)-function if \(\alpha (0) = 0\) and \(\alpha \) is monotonically increasing, see also [35, 50] for further details on comparison functions.

Next, we want to show that (OCP\(_\psi \)) exhibits a measure turnpike property with respect to a manifold. To this end, we require both strict dissipativity as well as cost controllability whereas the latter can be replaced by (potentially) weaker assumptions referring to reachability. Note that we state the following definitions and Theorem 1 such that they are directly applicable to OCPs with more general system dynamics evolving in \(\mathbb {R}^{n}\), \(n \in \mathbb {N}\), inputs \(u \in \mathbb {R}^{m}\), and stage costs \(\ell :\mathbb {R}^{n}\times \mathbb {R}^{m} \rightarrow \mathbb {R}\).

Definition 3

(Strict dissipativity w.r.t. a manifold) (OCP\(_\psi \)) is said to be strictly dissipative w.r.t. a manifold \(\mathcal {T}\subset \mathbb {R}^{n}\) on the set \(\mathbb {X} \subseteq \mathbb {R}^{n}\) if there exists a storage function \(S:\mathbb {R}^{n}\rightarrow \mathbb {R}_{\ge 0}\), that is bounded on compact sets, and a \(\mathcal {K}\)-function \(\alpha \) such that

$$\begin{aligned} \begin{aligned} S(x^\star (T))- S(x^0) \le \int _0^T \ell (x^\star (t),u^\star (t))&-\alpha ({{\,\mathrm{\text {dist}}\,}}(x^\star (t),\mathcal {T}))\,\mathrm {d}t \quad \forall \,T \ge 0 \end{aligned} \end{aligned}$$
(18)

for all optimal controls \(u^\star \in L^{\infty }([0,T],\mathbb {R}^{m})\) and associated state trajectories \(x^\star \in W^{1,\infty }([0,T],\mathbb {R}^{n})\) with initial values \(x^0 \in \mathbb {X}\).

We emphasize that in this definition strict dissipativity is a property of (OCP\(_\psi \)) which is parametric in \(x^0\) and T. Alternatively, it can be defined as a property of the underlying dynamical system, see the foundational works of Willems [60,61,62] or more recent treatments in [40, 63]. Related to this, observe that similar to [19] in the definition above we require the dissipation inequality (18) to hold only along optimal solutions. This is a weaker property than assuming (18) to hold for all feasible trajectories. However, in view of our aim to analyze the turnpike phenomenon, which refers to parametric properties of optimal solutions (see Definition 5 below), this is a natural setting, cf. also the remarks in [16, 17].

In addition to dissipativity, we further require certain reachability properties. Here, we state the results based on cost controllability on a compact set, see [9] for details. Definition 4 extends the previously proposed concepts of cost controllability introduced in [27, 30, 57] for discrete-time systems and [47] in the continuous-time setting, see [65, 66] for connections between continuous- and discrete-time systems and [64] for a thorough comparison of cost controllability and its precursors.

In the following we will denote by \(x(t;x^0,u)\) a state trajectory evolving from the dynamics (11) with control u and initial state \(x^0\), where with slight abuse of notation we stick to the state space being \(\mathbb {R}^{n}\) instead of \(\mathbb {R}^4\).

Definition 4

(Cost controllability on a set \(\mathbb {X}\)) Let a set \(\mathbb {X} \subseteq \mathbb {R}^{n}\) be given. Then, assuming

$$\begin{aligned} \ell ^\star (x^0) \doteq \inf _{\hat{u} \in \mathbb {R}^{m}} \ell (x^0,\hat{u}) \in \mathbb {R}, \end{aligned}$$
(19)

the (OCP\(_\psi \)) with (optimal) value function \(V_T: \mathbb {R}^{n} \rightarrow \mathbb {R} \cup \{-\infty ,\infty \}\) defined by

$$\begin{aligned} V_T(x^0) \doteq \inf _{u \in L^\infty ([0,T],\mathbb {R}^{m})} \int _0^T \ell (x(t;x^0,u),u(t))\,\text {d}t \end{aligned}$$

is called cost controllable if there exists a bounded and increasing growth function \(B_{\mathbb {X}}:\mathbb {R}_{\ge 0} \rightarrow \mathbb {R}_{\ge 0}\) such that

$$\begin{aligned} V_T(x^0) \le B_{\mathbb {X}}(T) \cdot \ell ^\star (x^0) \qquad \forall \,x^0 \in \mathbb {X}, T \ge 0. \end{aligned}$$
(20)

Condition (19) holds, e.g., if \(\ell (x,u) = \ell _1(x) +\ell _2(u)\) with continuous and positive definite \(\ell _2\).

The strict dissipativity inequality (18) implies that the cost of optimal trajectories is bounded from below by the distance to the trim manifold. In particular, this means that cost controllability in the sense of (20) implies that the manifold \(\mathcal {T}\) can be approached from any initial value \(x_0\in \mathbb {X}\).

Definition 5

(Manifold turnpike property) (OCP\(_\psi \)) is said to have the manifold turnpike property w.r.t. a manifold \(\mathcal {T}\) on a set \(\mathbb {X} \subseteq \mathbb {R}^{n}\) if, for all compact sets \(K \subseteq \mathbb {X}\) and for all \(\varepsilon > 0\), there is a constant \(C_{K,\varepsilon }\) such that all optimal solutions consisting of \(u^\star \in L^\infty ([0,T],\mathbb {R}^{m})\) and \(x^\star (\cdot ;x^0,u^\star ) \in W^{1,\infty }([0,T],\mathbb {R}^n)\) satisfy

$$\begin{aligned} \mu \Big (\{t \in [0,T]\,| {{\,\mathrm{\text {dist}}\,}}(x^\star (t;x^0,u^\star ),\mathcal {T})>\varepsilon \}\Big ) \le C_{K,\varepsilon } \qquad \forall \,x^0 \in K, T>0 \end{aligned}$$

where \(\mu (S)\) denotes the Lebesgue-measure of a set \(S \subseteq \mathbb {R}^{n}\).

Next, we can state our main theorem of this section; namely that strict dissipativity and cost controllability imply the turnpike property on manifolds. The techniques are an adaptation of the arguments used for the turnpike property with respect to a controlled steady state, see e.g., [19].

Theorem 1

Let (OCP\(_\psi \)) be strictly dissipative w.r.t. a manifold \(\mathcal {T} \subseteq \mathbb {R}^{n}\) on \(\mathbb {X} \subseteq \mathbb {R}^n\) and cost controllable on \(\mathbb {X}\). Further assume that \(\ell ^\star \) is bounded on bounded sets. Then, the OCP satisfies the manifold turnpike property with respect to \(\mathcal {T}\) on \(\mathbb {X}\).

Proof

Let \(K \subseteq \mathbb {X}\) be an arbitrary but fixed compact set. Moreover, for a given initial value \(x^0 \in K\), let \((x^\star ,u^\star )\) be an optimal solution of the OCP in consideration. In view of the assumed strict dissipativity (18), we obtain

$$\begin{aligned} \begin{aligned} \int _0^T \alpha ({{\,\mathrm{\text {dist}}\,}}(x^\star (t),\mathcal {T}))\,\text {d}t&\le S(x^0) - S(x(T)) + \int _0^T \ell (x^\star (t),u^\star (t)) \,\text {d}t \\&\le c_1(K) + \int _0^T \ell (x^\star (t),u^\star (t)) \,\text {d}t. \end{aligned} \end{aligned}$$
(21)

where \(c_1(K)\doteq \sup _{x^0\in K}S(x^0)\) by boundedness on the compact set K and positivity of the storage function S. Next, we estimate the last term using cost controllability (20), i.e.,

$$\begin{aligned} \int _0^T \ell (x^\star (t),u^\star (t)) \text {d}t \le B_{\mathbb {X}}(T) \cdot \ell ^\star (x^0) \le c_2(K) \end{aligned}$$

for a constant \(c_2(K)\ge 0\) independent of T, where the last inequality follows by the boundedness of \(\ell \) on compact sets and compactness of the set K and boundedness of the growth function \(B_{\mathbb {X}}\). Further, setting \(S_\varepsilon = \{t\in [0,T]\,|\, {{\,\mathrm{\text {dist}}\,}}(x^\star (t),\mathcal {T})>\varepsilon \}\), we get the estimate

$$\begin{aligned}&\int _0^T \alpha ({{\,\mathrm{\text {dist}}\,}}(x^\star (t),\mathcal {T}))\,\text {d}t = \int _{S_\varepsilon } \alpha ({{\,\mathrm{\text {dist}}\,}}(x^\star (t),\mathcal {T}))\,\text {d}t \\&\qquad \qquad \qquad +\int _{[0,T]\setminus S_\varepsilon } \alpha ({{\,\mathrm{\text {dist}}\,}}(x^\star (t),\mathcal {T}))\,\mathrm {d}t \ge \mu (S_\varepsilon ) \cdot \alpha (\varepsilon ) \end{aligned}$$

using monotonicity of the \(\mathcal {K}\)-function \(\alpha \). Combining the derived inequalities, this yields the upper bound \(C_{K,\varepsilon } \doteq (c_1(K)+c_2(K))/\alpha (\varepsilon )\) on \(\mu (S_\varepsilon )\), which concludes the proof. \(\square \)

4.2 Optimal operation on a manifold

Besides establishing turnpike theorems, dissipativity can be used to deduce performance results for model predictive control and to characterize the asymptotics of optimal control problems. In this context, optimal operation at the turnpike, in our case a manifold, plays an important role.

To the end of analyzing such links, we propose the following definition of optimal operation on a manifold, which is a natural extension of the established concept of optimal operation at steady state, cf. [1]. We assume in the following that the cost functional is zero on the manifold. This can always be achieved, if the stage costs are constant on the manifold, e.g., by subtracting the constant.

Definition 6

(Optimal operation on the trim manifold \(\mathcal {T}\)) Let the stage cost be zero on the trim manifold \(\mathcal {T}\), which was defined in Definition 2, i.e., \(\ell (s,v_s,v_\theta ,u) = 0\) if \(T(s,v_\theta ,u) = 0\) holds (in particular, \(x = (s\,v_s\,\theta \,v_\theta )^\top \in \mathcal {T}\)). Then, System (11) is said to be optimally operated on the manifold \(\mathcal T \subseteq \mathbb {R}^4\) if, for all \(x^0 \in \mathbb {R}^4\) and all control-state pairs \((x,u) \in W^{1,\infty }([0,\infty ),\mathbb {R}^4) \times L^\infty ([0,\infty ),\mathbb {R}^{m})\), the following inequality holds

$$\begin{aligned} \liminf _{T \rightarrow \infty }\ \frac{1}{T} \int _0^T \ell (s(t),v_s(t),v_\theta (t),u(t))\,\mathrm {d}t \ge 0. \end{aligned}$$
(22)

Optimally operated at the manifold means that the averaged costs for any trajectory is at least as high as the averaged cost on the manifold in the limit.

Proposition 3

(Optimal operation on \(\mathcal {T}\)) Let (OCP\(_\psi \)) be strictly dissipative on a set \(\mathbb {X} \subseteq \mathbb {R}^4\) such that the storage function S is bounded on the terminal region \(\varPsi \). Moreover, let the stage cost \(\ell \) be zero on the manifold \(\mathcal T \subseteq \mathbb {R}^4\) as assumed in Definition 6. Then, the system governed by the dynamics (11) is optimally operated on \(\mathcal {T}\).

Proof

The proof follows along the lines of [19, Theorem 3] by contradiction. Let \(x^0 \in \mathbb {R}^4\) be given. Suppose that there exists a monotonically increasing sequence \(\{T_k\}_{k\in \mathbb {N}}\), \(T_k\rightarrow \infty \) for \(k\rightarrow \infty \), with \((x^k,u^k) \in W^{1,\infty }([0,T_k],\mathbb {R}^4) \times L^\infty ([0,T_k],\mathbb {R}^{m})\) admissible for the OCP in consideration such that

$$\begin{aligned} \liminf _{k \rightarrow \infty }\ \frac{1}{T_k} \int _0^{T_k} \ell (s^k(t),v_s^k(t),v_\theta ^k(t),u^k(t))\,\text {d}t \le -\delta \end{aligned}$$
(23)

for some \(\delta >0\). Dividing the strict dissipativity inequality (18) by \(T_k\) yields

$$\begin{aligned} \frac{1}{T_k} \left( S(x^\star _k (T_k))- S(x^0)\right) \le \frac{1}{T_k} \int _0^{T_k} \ell (x^\star _k(t),u^\star _k(t))&-\alpha ({{\,\mathrm{\text {dist}}\,}}(x^\star _k(t),\mathcal {T}))\,\mathrm {d}t \end{aligned}$$

where \(x^\star _k = x^\star _k(\cdot ;x^0,u^\star _k)\) solves the OCP  (OCP\(_\psi \)) with optimization horizon \(T_k\) (feasibility is ensured by the existence of the sequence \((T_k)_{k \in \mathbb {N}}\)) and, with a slight abuse of notation, \(\ell (x^\star _k(t),u^\star _k(t))\) denotes the stage cost evaluated along the corresponding optimal control-state pair. Invoking the assumed boundedness of S on the terminal region, the difference \(S(x^\star _k(T))- S(x^0)\) is bounded and the left-hand side converges for \(k \rightarrow \infty \). Hence, taking non-negativity of \(\alpha \) and optimality of the control-state pair \((u^\star _k,x^\star _k)\) into account, yields non-negativity of the left-hand side of inequality (23) and, thus, \(0 \le -\delta \), i.e., the desired contradiction. \(\square \)

Remark 5

(Link to overtaking optimality) A more classical concept, which originated in the analysis of infinite-horizon OCPs, is overtaking optimality [5, 6]. That is, instead of (22) consider

$$\begin{aligned} \liminf _{T \rightarrow \infty } \int _0^T \ell (s(t),v_s(t),v_\theta (t),u(t))\,\mathrm {d}t - \int _0^T \ell (\bar{s},0,\bar{v}_\theta (t),\bar{u}(t))\,\mathrm {d}t \ge 0. \end{aligned}$$
(24)

If this condition is considered for a fixed initial condition, it gives the concept of overtaking optimality. If it is considered for a set of initial conditions, it defines a generalized concept of optimal operation being characterized by \((\bar{s},0,\bar{v}_\theta (t),\bar{u}(t))\). We refer to [45, Chap. 4] for further (discrete-time) insights on the link between overtaking optimality and optimal operation.

5 Hamiltonian perspective and Legendre transformation of OCPs

Evidently the Lagrangian approach and the Hamiltonian approach to describing mechanical systems with symmetries complement each other. Hence, it is fair to ask for potential changes in the results of Sect. 3 if the analysis is done from the Hamiltonian perspective instead of the Lagrangian one. Next we briefly investigate this aspect.

5.1 The Hamiltonian perspective on mechanical systems

Recall that the Euler–Lagrange equations (2) can alternatively be written in Hamiltonian form, i.e., \(\dot{q} = \partial H/ \partial p, \; \dot{p} = -\partial H/ \partial q + f(u)\), by means of the Hamiltonian

$$\begin{aligned} H(q,p) = \frac{1}{2} {p}^\top M^{-1}(q) {p} + V(q), \end{aligned}$$
(25)

where \(M^{-1}\) is the inverse of the mass matrix. With configuration variables \(q\in Q\), the corresponding momenta p lie in the cotangent space \(T_q^*Q\). As M(q) is assumed to be regular, the Lagrange function (1) and the Hamiltonian (25) are hyperregularFootnote 1 and Euler–Lagrange and Hamilton equations are equivalent. The Legendre transform of (1) gives the relation \(p=M(q)\dot{q}\). In particular, under Assumption 1, the Hamilton equations in shape and cyclic variables are

$$\begin{aligned} \begin{aligned} \dot{s}&= M_{11}^{-1}(s) p_s \\ \dot{p}_s&= - \frac{1}{2} M_{11}^{-1}(s)^\prime p_s^2 - \frac{1}{2} M^{-1}_{22}(s)^\prime p_\theta ^2 - V^\prime (s) + f_s(u) \\ \dot{\theta }&= M_{22}^{-1}(s) p_\theta \\ \dot{p}_\theta&= f_\theta (u) \end{aligned} \end{aligned}$$
(H)

with \(p_s = M_{11}(s) v_s, \; p_\theta = M_{22}(s) v_\theta \).

Assuming orthogonal forcing, i.e., \(f_\theta \equiv 0\), the last equation of (H) directly gives the conserved quantity induced by the symmetry, namely \(p_\theta = M_{22}(s) v_\theta = \text {const}.\) Recall the characterization of trim primitives in Lemma 1 via the forced amended potential (7), which yields for (H)

$$\begin{aligned} \nabla _s V_\mu ^u(s,\mu ,u) = V^\prime (s) + \frac{1}{2} {M^{-1}_{22}}(s)^\prime \mu ^2 -f_s(u) = 0 \end{aligned}$$
(26)

with \(\mu = p_\theta = M_{22}(s) v_\theta \). Corollary 1 states that \(\nabla _s V_\mu ^u(s,\mu ,u) = T(s, M_{22}^{-1}p_\theta ,u)\) and thus, \(\nabla _s V_\mu ^u(s,\mu ,u)\) can alternatively be used to define the trim manifold.

With \(\tilde{\ell }(s,p_s,\theta ,p_\theta )\doteq \ell (s,M_{11}(s)v_s,\theta ,M_{22}(s)v_\theta )\) , the optimal control problem OCP, the reduced problem on the trim manifold (\(\mathcal {T}\)-OCP), as well as the steady state optimization problem (SOP) can alternatively be stated in the Hamiltonian setting, i.e., replacing the corresponding Euler–Lagrange equations by the Hamiltonian counterparts. In complete analogy, first-order necessary conditions for optimality can be derived and compared in order to see that the problems lead to identical solutions if the full optimal control problem is constrained to solutions satisfying \(\nabla _s V_\mu ^s =0\). Moreover, as we will show next, based on the knowledge of the underlying coordinate change one can also derive a coordinate change for the adjoints.Footnote 2

5.2 Legendre-induced transformation of adjoints

The diffeomorphism \(\varPhi :T_qQ \rightarrow T_q^*Q\) given by

$$\begin{aligned} \varPhi : \begin{bmatrix} s \\ v_s \\ \theta \\ v_\theta \end{bmatrix} \mapsto \begin{bmatrix} s \\ p_s \\ \theta \\ p_\theta \end{bmatrix} = \begin{bmatrix} s \\ v_s M_{11}(s) \\ \theta \\ v_\theta M_{22}(s) \end{bmatrix} \end{aligned}$$
(27)

maps (EL) to (H). Put differently, the coordinate change \(\varPhi \) is induced by the by the Legendre transformation of (1) to (25).

Lemma 3

(Legendre-induced adjoint transformation) Consider OCP and let \((x^\star , u^\star , \lambda ^\star )\) be an optimal lift. Consider a diffeomorphic coordinate change \(\varPhi : \mathbb {R}^{n} \rightarrow \mathbb {R}^{n}, x\mapsto z\) valid along any optimal solution of OCP. Let \(\nu \) be the adjoint corresponding to OCP expressed in the coordinates \(z = \varPhi (x)\). Then the corresponding adjoints satisfy

$$\begin{aligned} \left. \left( \frac{\partial \varPhi }{\partial x}\right) ^\top \right| _{x = \varPhi ^{-1}(z)} \nu ^\star = \lambda ^\star \quad \end{aligned}$$
(28)

In case of \(\varPhi \) from (27) we obtain

$$\begin{aligned} \left. \left( \frac{\partial \varPhi }{\partial x}\right) ^\top \right| _{x = \varPhi ^{-1}(z)} = \begin{bmatrix} 1 &{} M_{11}'v_s &{} 0 &{} M_{22}'v_\theta \\ 0 &{} M_{11} &{}0 &{}0 \\ 0 &{} 0 &{} 1 &{} 0 \\ 0 &{} 0 &{} 0 &{} M_{22} \end{bmatrix} = \begin{bmatrix} 1 &{} M_{11}'M_{11}^{-1} p_s &{} 0 &{} M_{22}'M_{22}^{-1} p_\theta \\ 0 &{} M_{11} &{}0 &{}0 \\ 0 &{} 0 &{} 1 &{} 0 \\ 0 &{} 0 &{} 0 &{} M_{22} \end{bmatrix}. \end{aligned}$$
(29)

Proof

Recall the optimal control Hamiltonian of OCP written in (xu) coordinates

$$\begin{aligned} {\mathcal {H}}(x,u, \lambda ) = \ell (x,u) +\lambda ^\top f(x,u). \end{aligned}$$

Notice that in \(z-u\) coordinates the dynamics \(\dot{x} = f(x,u)\) read

$$\begin{aligned} \dot{z} = \frac{\partial \varPhi }{\partial x} f(x,u) = \left. \frac{\partial \varPhi }{\partial x}\right| _{x = \varPhi ^{-1}(z)} f\left( \varPhi ^{-1}(z), u\right) \doteq g(z,u). \end{aligned}$$

Now, consider the optimal control Hamiltonian of OCP expressed in \(z-u\) coordinates

$$\begin{aligned} \tilde{\mathcal {H}}(z,u, \nu ) = \tilde{\ell }(z,u) + \nu ^\top g(z,u). \end{aligned}$$

Substituting the expression for g(zu) and \(\tilde{\ell }(z,u) \doteq \ell (\varPhi ^{-1}(z), u)\) yields

$$\begin{aligned} \tilde{\mathcal {H}}(z,u, \nu ) = \ell (\varPhi ^{-1}(z),u) + \nu ^\top \left. \frac{\partial \varPhi }{\partial x}\right| _{x = \varPhi ^{-1}(z)} f\left( \varPhi ^{-1}(z), u\right) . \end{aligned}$$

Comparing the last equation with the one for \({\mathcal {H}}(x,u, \lambda )\) gives the first part of the assertion. The expression for \(\left( \frac{\partial \varPhi }{\partial x}\right) ^\top \) follows from the definition of \(\varPhi \) in (27). \(\square \)

We remark that the transformation of adjoints does mainly rely on \(\varPhi \) being a diffeomorphic coordinate change along optimal solutions. That is, it can be applied to general OCPs. It is the structure of the matrix (29) which is induced by the underlying Legendre transformation.

Lemma 3, which on the one hand is structurally not surprising while, on the other hand, appears to not have been mentioned in the literature, is useful in at least two contexts: (i) it allows to generate primal-dual initial guesses for OCP considering \(\{\)Lagrangian, Hamiltonian\(\}\) dynamics by solving the counterpart, i.e., the OCP considering \(\{\)Hamiltonian, Lagrangian\(\}\) dynamics. This can be helpful for indirect solution methods. It can also be used to cross-check the numerical solutions for adjoints of those OCPs in an efficient manner. (ii) it answers the question for what changes in the analysis of Sect. 3 if one swaps the Lagrangian for the Hamiltonian framework. In short, all the results hold mutatis-mutandis and Lemma 3 shows how to map the adjoint variables without re-doing the technical derivations. These insights and the use of Lemma 3 are sketched in Fig. 2.

Fig. 2
figure 2

Illustration of Lemma 3 and its use for optimal control of mechanical systems

6 Kepler problem: optimal operation on manifold turnpike

Lastly, let us illustrate the findings of Sect. 3: The first numerical example shows the existence of non-trivial trim turnpikes, that is, turnpikes with non-stationary behavior on the trim manifold. The second example illustrates the insides of Proposition 1 regarding the correspondence of primal variables in the respective optimal control problems.

In astrodynamics, n-body problems are widely considered to describe the dynamics of bodies in the gravitational field. The two-body problem is also known as the Kepler problem and might be used to describe the motion of a spacecraft relative to a planet’s or a moon’s gravitational field (ignoring all other influences from more distant bodies). Coordinates can be chosen to describe the motion of the second body, relatively to the first body’s motion, via radius \(s \in \mathbb {R}_{>0}\) and angle \(\theta \in [0,2\pi )\). With \(v_s\) and \(v_\theta \) denoting the corresponding velocities, the (energy) Lagrangian is given by

$$\begin{aligned} L(s,v_s,\theta ,v_\theta ) = \frac{1}{2} m_2 \left( v_s^2 + s^2 v_\theta ^2\right) + \gamma \frac{m_1 m_2}{s} \end{aligned}$$

with \(m_1,m_2\) being the masses of the primary (e.g., planet) and the secondary (e.g., spacecraft) body and \(\gamma \) the gravitational constant. As in [42], we choose \(k \doteq \gamma m_1 m_2 = 1.016895192894334 \times 10^3\) and \(m_2 = 1.0\).

We have L being independent of \(\theta \), so this is a cyclic variable. For \(f_\theta (u)=0\), the conserved quantity is \(p_\theta = m_2 s^2 v\theta \) (cf. Remark 1). Further, Assumption 1 is satisfied, since the mass matrix is

$$\begin{aligned} M = \begin{bmatrix} m_2 &{} 0 \\ 0 &{} m_2 s^2 \end{bmatrix}, \text { in particular, } M_{11}(s) = m_2, \, M_{22}(s) = m_2 s^2,\end{aligned}$$

and \(V(s) = -\gamma \frac{m_1 m_2}{s}\). Note that the Kepler problem is special in the fact that \(M_{11}\) is constant and thus, \(M_{11}' = 0\). Moreover, the model has a singularity at \(s=0\), so we restrict to \(s>0\). Then, \(M_{22}\ne 0\) holds.

The Euler–Lagrange equations, directly written in first-order form, are

$$\begin{aligned} \dot{s}&= v_s,&\dot{v}_s&= s v_\theta ^2 - \frac{\gamma m_1 m_2}{m_2 s^2} + \frac{1}{m_2} f_s(u),\\ \dot{\theta }&= v_\theta ,&\dot{v}_\theta&= - \frac{2}{s} v_\theta v_s + \frac{1}{m_2 s^2} f_\theta (u), \end{aligned}$$

with control \(u = (u_s,u_\theta )^\top \in \mathbb {R}^2\) and forcing \(f_s(u) = u_s\), \(f_\theta (u) = u_\theta \).

For the function T of Lemma 2, we obtain

$$\begin{aligned} T(s,v_\theta ,u) = s v_\theta ^2 - \frac{k}{m_2 s^2} + \frac{1}{m_2} f_s(u), \end{aligned}$$

i.e., any triple \((\tilde{s},\tilde{v_\theta },\tilde{u})\) such that \(T(\tilde{s},\tilde{v_\theta },\tilde{u})=0\) generates a trim primitive. Geometrically, trim primitives are circular motions of body \(m_2\) about \(m_1\). The trim manifold reads

$$\begin{aligned}\mathcal T = \left\{ (s, v_s, \theta , v_\theta )^\top \in TQ \,\left| \, v_s =0,\, u_s = -m_2 s v_\theta ^2 + \frac{k}{s^2} \right. \right\} .\end{aligned}$$

We consider optimal control problems of type OCP on a sufficiently long time horizon \(T>0\). The starting point is defined as \((s^0,v_s^0,\theta ^0,v_\theta ^0) = (5.0,0.0,0.0,\sqrt{\frac{k}{m_2 5.0^3}})\); this corresponds to a trim primitive with zero control \(u_s\).

Furthermore, let \(\tilde{x} \doteq (\tilde{s},\tilde{v}_s,\tilde{\theta },\tilde{v_\theta }) = (4.5,0.0,0.0,\sqrt{\frac{k}{m_2 4.5^3}})\) be given and note that \(T(\tilde{s},\tilde{v}_\theta ,\tilde{u})=0\) holds for \(\tilde{u} = (0.0,0.0)\), i.e., this defines an uncontrolled trim primitive.

Firstly, let us consider the cost functional

$$\begin{aligned} \ell (s,v_s,v_\theta ,u) = \frac{1}{2} (x-\tilde{x})^\top Q (x-\tilde{x}) + (u-\tilde{u})^\top R (u-\tilde{u}) \end{aligned}$$
(30)

with \(Q=\text {diag}([1,0,1,1])\) and \(R=10^{-2}\cdot \text {diag}([1,1])\). A Mayer term is defined as \(V_f(x(T)) = 10^2 \cdot (x(T)-x^f)^\top Q (x(T)-x^f)\) with

$$\begin{aligned} x^f = (s^f,\theta ^f, v_s^f,v_\theta ^f) = \left( 6.0,0.0,0.0,\sqrt{\frac{k}{m_2 6.0^3}}\right) . \end{aligned}$$

Recall that Mayer terms can equivalently be transformed into Lagrange terms and, thus, this problems fits the framework of our analysis.

We solve the corresponding (OCP) with CasADI, using a direct method with the RK-4 integrator for a discretization with 300 nodes on a time interval with \(T=30\). The result is given in Fig. 3. A turnpike can be observed at \((\tilde{s},\tilde{v}_\theta ,\tilde{u}_s) = (4.5,\sqrt{\frac{k}{m_2 4.5^3}},0.0)\) with \(v_s = v_\theta =u_\theta =0\) and all adjoints vanishing, too, for the largest part of the time interval. The incoming and outgoing arcs are caused by the boundary conditions. Mechanically, the solution corresponds to a circular-shaped turnpike orbit in the 2D-plane, which is an element of the trim manifold.

Fig. 3
figure 3

Example with turnpike on a trim at \(s=4.5\) for quadratic cost functional as in (30) on time horizon \(T=30\)

While the first example specifically favors the \(s=4.5\)-orbit by construction, we now consider running costs which are designed using the general trim manifold description, i.e.,

$$\begin{aligned} \ell (s,v_s,v_\theta ,u) = 5\times 10^3 \cdot T(s,v_\theta ,u)^2 + \frac{1}{2} (s-\tilde{s})^2 + \frac{1}{2} (u-\tilde{u})^\top R (u-\tilde{u}) \end{aligned}$$
(31)

with \(\tilde{s} = 5.3\), \(\tilde{u} = [0,1]^\top \), \(R=10^{-3}\cdot \text {diag}([1,1])\). Thus, the first term of \(\ell \) vanishes whenever the system is on \(\mathcal {T}\). This criterion is complemented by the other two terms with arbitrarily chosen values of \(\tilde{s}\) and \(\tilde{u}\). The intuition behind this stage cost is that making \(\ell \) small the optimal solutions have to approach the set on which \( T(s,v_\theta ,u)^2=0\), i.e., the trim manifold. Though a formal proof of manifold dissipativity for this example is still open.

Fig. 4
figure 4

Example with turnpike on a trim obtained from running costs (31) on time horizon \(T=100\)

Setting the initial condition to \((s^0,v_s^0,\theta ^0,v_\theta ^0) = (5.3,0.0,0.0,\sqrt{\frac{k}{m_2 5.3^3}})\) makes an incoming arc obsolete; the system stays in the trim that is defined by the initial point almost until the end of the time interval, when the term \((u-\tilde{u})^\top R (u-\tilde{u})\) of \(\ell \) in (31) rules the optimal solution. This can be observed in Fig. 4, in which we show the computed solution for \(T=100\) (RK4-integrator with 200 discretization nodes). Moreover, we depict the solution of (\(\mathcal {T}\)-OCP), which we have solved with CasADI, as well, using identical initial values for \((\bar{\theta },\bar{v}_{\bar{\theta }},\bar{u})\) and time horizon, with dashed lines. Recall that in (\(\mathcal {T}\)-OCP), \((\bar{\theta },\bar{v}_{\bar{\theta }},\bar{u})\) are the dynamic states and controls, while \(\bar{s}\) is a scalar parameter and \(T(\bar{s},\bar{v}_{\bar{\theta }},\bar{u})=0\) is added as a nonlinear constraint. For both problems, the same turnpike is approached, as can be seen in Fig. 4 in the subfigures of the states and controls. However, the adjoints for s show different behavior, since in OCP, there is an initial condition on s, while in (\(\mathcal {T}\)-OCP), there is not. Further numerical discrepancies between the adjoints presumably stay in context with the accuracy of which \(T=0\) is fulfilled when either considered within the objective (in OCP) or as an equality constraint (in (\(\mathcal {T}\)-OCP)). Note that we do not consider terminal constraints in this example in order to match the setting of Proposition 1.

7 Conclusions and outlook

The paper has studied the link of turnpikes, trim solutions, and symmetries in OCPs for mechanical systems. Specifically, we considered Lagrangian systems with symmetries. Based on the established concepts of trim solutions, we have shown that if either one first formulates the OCP and then applies the trim condition to the optimality system, or one first applies the trim condition and then formulates a reduced OCP, one obtains the same result. This generalizes a classical insight, wherein turnpikes are characterized as the attractive equilibria of the optimality system. Hence, the paper provides a novel characterization of time-varying—not necessarily periodic—turnpike solutions via reduced OCPs. Moreover, we introduced a notion of dissipation of optimal solutions with respect to the distance to a manifold (here the trim manifold) which implies that optimal system operation occurs on this manifold. The paper has also shown that the very same dissipativity condition implies the existence of a measure turnpike with respect to the trim manifold, i.e., the optimal solutions will spend only limited amount of time far from this manifold. Moreover, we investigated how the Legendre transformation, which allows to switch from the Lagrangian to the Hamiltonian perspective, induces a related coordinate change for adjoint variables. This allows to directly transfer our results to the Hamiltonian setting.

In sum, the present paper introduced a novel manifold generalization of the established dissipativity notion for OCPs. This way it addresses the gap between the symmetry-based analysis of OCPs of mechanical systems and dissipativity-based turnpike analysis.

Future work should discuss how the developed notions can be leveraged in context of receding-horizon optimal control. Moreover, it would be interesting to generalize the concept of manifold turnpikes even further and to consider symmetries induced by non-mechanical systems.