On the relationship between the energy shaping and the Lyapunov constraint based methods

In this paper, we make a review of the controlled Hamiltonians (CH) method and its related matching conditions, focusing on an improved version recently developed by D.E. Chang. Also, we review the general ideas around the Lyapunov constraint based (LCB) method, whose related partial differential equations (PDEs) were originally studied for underactuated systems with only one actuator, and then we study its PDEs for an arbitrary number of actuators. We analyze and compare these methods within the framework of Differential Geometry, and from a purely theoretical point of view. We show, in the context of underactuated systems defined by simple Hamiltonian functions, that the LCB method and the Chang's version of the CH method are equivalent stabilization methods (i.e. they give rise to the same set of control laws). In other words, we show that the Chang's improvement of the energy shaping method is precisely the LCB method. As a by-product, coordinate-free and connection-free expressions of Chang's matching conditions are obtained.


Introduction
Under the name of energy shaping method, several methods or procedures for achieving (asymptotic) stabilization of nonlinear underactuated Lagrangian and Hamiltonian systems are included: potential shaping, kinetic shaping, total energy shaping, energy plus force shaping, IDA-PBC, etc. See for instance [4,6,7,8,9,31,37,42,45], and [19,40] for more recent works.They are based on the idea of feedback equivalence (see Ref. [20]), and their purpose is to construct, for a given underactuated mechanical system, a control law and a Lyapunov function for the resulting closed-loop system.To do that, a set of partial differential equations (PDEs), known as matching conditions, must be solved.Such PDEs have among their unknowns the aforementioned Lyapunov function.
All of these methods can be seen as particular versions of the so-called controlled Lagrangians (CL) method or the controlled Hamiltonians (CH) method, which in turn are equivalent stabilization methods, in a sense that has been carefully explained in Ref. [20].
The origin of the energy shaping method can be placed 35 years ago [2,12,41,44], while the method in its more general form is around 15 years old [20].More recently, 6 years ago, an alternative stabilization method for nonlinear underactuated mechanical systems has been presented: the Lyapunov constraint based (LCB) method.It appeared for the first time in [23], it was further developed in [25], and it was extended to systems with impulsive effects in Ref. [15].The method is based on the idea of controlling actuated mechanical systems by imposing kinematic constraints (see [14,22,32,33,38,39,43]). It serves the same purpose as the energy shaping method (to construct a control law and a Lyapunov function for the resulting closed-loop system) and, in order to accomplish it, a set of PDEs must be solved too.It is worth mentioning that the LCB method has been originally developed for underactuated systems with only one actuator.
One of the aims of this paper is to extend the study of the LCB method to an arbitrary number of actuators, and to show that this method contains every version of the energy shaping method (and actually, every method that serves the same purpose), in the sense that the set of control laws that can be constructed with the energy shaping method is contained in the corresponding set of the LCB method (extending a result already presented in [25]).
Almost simultaneously with the appearance of [25], an improvement of the energy (plus force) shaping method, for underactuated systems defined by simple Lagrangian or Hamiltonian functions, was presented by Chang in [16,17,18].It consists in an important simplification of the matching conditions.The main goal of the present paper is to show that such matching conditions are exactly the PDEs related to the LCB method, at least in the context of simple Hamiltonian functions.Moreover, we show in the same context that the Chang's version of the energy shaping method is equivalent to the LCB method, i.e. both methods give rise exactly, for a given underactuated system, to the same set of control laws.In other words, we show that the Chang's improvement of the energy shaping method is precisely the LCB method.Such a result is quite surprising for us, because the involved methods are based on very different ideas: "feedback equivalence" and "controlling by the imposition of kinematic constraints." We can say that this article is similar in spirit to Ref. [20], where the equivalence between the CL and the CH methods was established.In particular, as in that paper, a substantial portion of the work is dedicated to describe, in a very precise way and by using the same language, the methods that we want to compare.
The paper is organized as follows.In Section 2, we present some basic facts about affine connections on general linear bundles, which will be used along all of the paper to write down coordinate-free expressions of the PDEs that we want to study.In Section 3, we make a review of the energy shaping method in a Hamiltonian language, i.e. the controlled Hamiltonians (CH) or IDA-PBC method.We begin with a rather general version of the method, then we progressively consider particular situations, and finally we present Chang's version of the method (see for instance [19]), with its related matching conditions.In Section 4, we recall the idea of controlling mechanical systems by the imposition of kinematic constraints.In particular, we review the idea of achieving (asymptotic) stability by means of the so-called Lyapunov constraint, which gives rise to the LCB method and its related set of PDEs.We show in the last section of the paper that such PDEs are exactly the matching conditions obtained by Chang [19], at least when underactuated systems defined by simple Hamiltonian functions are considered.Finally, we show the equivalence of the LCB method and the Chang's version of the CH method.
Basic notation.Along all of the paper, every manifold will be a smooth finite dimensional manifold, typically denoted by Q.By τ Q : T Q → Q and π Q : T * Q → Q we will denote the tangent and cotangent vector bundles, respectively.As it is customary, we indicate by •, • the natural pairing between T * q Q and T q Q at every q ∈ Q, and by X (Q) and Ω 1 (Q) the sheaves of sections of τ Q and π Q , respectively.Unless a confusion may arise, we shall omit the subindex Q for τ Q and π Q .For a vector field Y : Q → T Q, in order to indicate that its image is contained inside some subset W of T Q, we shall write, for simplicity, Y ⊂ W .Given a second manifold P and a smooth function F : Q → P , we denote by F * and F * the push-forward map and its transpose, respectively.Consider a local chart (U, ϕ) of Q, with ϕ : U → R n .Given q ∈ U , we write ϕ (q) = q 1 , ..., q n = q.For the induced local charts (T U, ϕ * ) and T * U, (ϕ * ) −1 on T Q and T * Q, respectively, we write ϕ * (v) = q 1 , ..., q n , q1 , ..., qn = (q, q) , (ϕ * ) −1 (α) = q 1 , ..., q n , p 1 , ..., p n = (q, p) , or simply for all v ∈ T U and α ∈ T * U .On T T * Q we shall consider the induced charts T T * U, (ϕ * ) −1 * , and write for all V ∈ T T * U .

Some preliminary results
In this section we shall recall some results on vector bundles and affine connections that will enable us to write global expressions of the equations we want to study later.Most of these results were proved in Ref. [22].Nevertheless, for the sake of completeness, we include some proofs here.Also, at the end of the section, we recall some basic facts about Lyapunov functions.
Let us consider a vector bundle Π : U → Q and fix an affine connection ∇ : Related to the latter we can define a diffeomorphism β : T U → U ⊕ T Q ⊕ U, given as follows (see Ref. [22]).For V ∈ T U, consider a curve u : (−ε, ε) → U passing through τ U (V ) and with velocity V at s = 0, i.e. u * ( d/ds| 0 ) = V .Finally, define Fixing q ∈ Q and a vector X ∈ U q (i.e.Π (X) = q), we have the linear isomorphisms given by respectively, where we take u in the second equation to be a curve in U such that We have in addition their corresponding transpose maps In terms of β, the horizontal and vertical subbundles related to ∇ at a point X ∈ U q are, respectively, It can be shown that the vertical lift isomorphism (This is true for any connection ∇.) Let us suppose that U = T * Q and Π = π Q = π.The related diffeomorphism is given by where u : (−ε, ε) → T * Q is a curve passing through α at s = 0 with velocity V .In a local chart (U, ϕ) of Q, it is easy to show that β(q, p, q, ṗ) = (q, p) ⊕ (q, q) ⊕ (q, ṗ + Γ (q, p, q)) ( (omitting in the last expression the map ϕ, just for simplicity), where Γ (q, p, q) is given by the Christoffel symbols Γ k il (q) of ∇ (in the coordinate frame) as Sum over repeated indices convention is assumed from now on.On the other hand, using the relationship between the vertical lift isomorphism vlift α : T * π(α) Q → ker π * ,α and the linear isomorphism 4), ( 5) and ( 7)], every vertical vector Y α ∈ T α T * Q may be identified with a unique covector y α ∈ T * π(α) Q in the following ways: As a consequence, every vertical vector field Y : T * Q → T T * Q is defined by the unique fiber preserving map Definition 1 Given a function F : U → R, the fiber and base derivatives of F are defined as the fiber-preserving maps FF : U → U * and BF : U → T * Q given by and Remark 2 Note that FF is independent of ∇, but BF is not.
Let us come back to the cotangent bundle of Q.Given a smooth function F : T * Q → R, the fiber and base derivatives of F are bundle morphisms FF : and Regarding basic functions F : U → R, i.e. functions for which there exists f : have the next result.
Proof.Given X, Z ∈ U q for some q ∈ Q, i.e.Π (X) = Π (Z) = q, we have that On the other hand, given in addition Y ∈ T q Q and a curve u satisfying (13), as we wanted to show.
The isomorphisms β * −1 X [see Eq. ( 6)] give rise to another diffeomorphism β : For the cotangent bundle, we have a diffeomorphism Proposition 4 Given F : U → R and X ∈ U, Proof.We must show that, for all q ∈ Q, Y ∈ T q Q and Z ∈ U q , Let u 1 : (−ε, ε) → U be a curve satisfying (13) and u 2 : (−ε, ε) → U such that u 2 (s) := X + s Z. Since , what ends our proof.
Remark 5 Let us replace U by the Whitney sum of k copies of U, which we shall denote U × • • • × U, and consider on such a vector bundle the affine connection naturally induced by one fixed on U.Then, given a function , its fiber and base derivatives will be defined by the formulae , respectively, where each u i : (−ε, ε) → U is a (horizontal) curve such that As usual, by a tensor on U we mean a function T : U × • • • × U → R, on the Whitney sum of copies of U, which is multi-linear map when restricted to each fiber.When we write T (X 1 , ..., X k ), it is implicit that all X i 's are contained in the same fiber of U.
Consider a tensor b : The following result is immediate.
Proposition 6 For all α, σ ∈ T * Q, Let ω be the canonical symplectic form on T * Q.
being T the torsion of ∇.
Assume that ∇ is torsion-free, which we shall do from now on.In terms of the diffeomorphisms β and β we have the following result.
Proof.Following the notation of the previous proposition, since T = 0 (the torsion-free condition), we have that or equivalently This implies that on the base point of α.Finally, using the identity the proof is done.
Since the canonical Poisson bracket on T * Q is given by the formula using the last proposition and the Eq. ( 18) we easily arrive at the equation This identity will be central in the last section of the paper.
Finally, let us consider the next definition.
Definition 9 Let P be a manifold and X ∈ X(P ) a vector field on P .Given a critical point α e. non-negative and null only at α • ); As it is well-known, if such a function exists, then α • is a stable point.Moreover, if the inequality in L2 is strict for all α = α • , then α • is locally asymptotically stable, and if in addition Ĥ is a proper function and P is connected, then such a point is globally asymptotically stable.For a proof of these results, see Ref. [29].

Energy shaping method
We present in this section the Hamiltonian side of the energy shaping method: the controlled Hamiltonians method (as defined in [20]), also known as the IDA-PBC method [37].We describe a quite general version of the method, with its related matching conditions, in terms that are more convenient for the present paper.For instance, we shall focus on Hamiltonian systems on a cotangent bundle only.We shall progressively consider particular situations to finally arrive at the case studied by Chang in Refs.[16]- [19], where particularly simple matching conditions can be derived.

The controlled Hamiltonians
Fix a manifold Q, a function H : defines an underactuated Hamiltonian system on Q (with Hamiltonian function H and space of actuators W).It is clear that the rank of W represents the number of actuators.Suppose that we want to solve the following problem.
P. Find a control signal Y ⊂ W, i.e. a vertical vector field Y ∈ X (T * Q) with image inside W, such that the closed loop system defined by X H + Y is stable at α • .
We shall call stabilization method to any "systematic procedure" that enables us to solve the problem P. To be more precise, let us consider the definitions below.
Definition 10 Fix a manifold Q and let U be a subset of triples (H, W, α • ), where (H, W) is an underactuated the subset of all the vector fields Y ∈ X (T * Q) solving P. We shall call stabilization method on U to any function1  Definition 11 Given two stabilization methods ̥ and ̥ ′ on the subsets U and U ′ , respectively, we shall say that If both inclusions hold, we shall say that ̥ and ̥ ′ are equivalent on U ∩ U ′ .
Remark 12 For methods on some common subset U, the inclusion relation we just presented defines a partial order.For such a partially ordered set, a maximal element represents the most general way to systematically stabilize underactuated systems in U.
The same can be said for the subset of Lyapunov based stabilization methods.
The intention behind above definitions is to give a precise framework to compare different methods and to establish what we mean by an equivalence between them.Nonetheless, we will not construct the functions ̥ when we describe the methods involved in this paper, but give a synthetic explanation of the procedure they give rise to instead.
In the following, we shall define a Lyapunov based stabilization method on the whole set of triples (H, W, α • ), known as the controlled Hamiltonians method.
Assume that we are given a function Ĥ ∈ C ∞ (T * Q), an anti-symmetric tensor B : an almost-Poisson structure) on T * Q and two vertical vector fields Z g , Z d ∈ X (T * Q) such that: because of 2, 4 and the fact that d Ĥ (α) , X Ĥ (α) = B d Ĥ (α) , d Ĥ (α) = 0.As a consequence, since 1 coincides with L1 and Eq. ( 22) coincides with L2 (see Definition 9), Ĥ is a Lyapunov function for the dynamical system defined by X and the critical point α • .This says that such a system is stable at α • (see Ref. [29]).So, defining which belongs to W because of the points 3 and 5, the problem P is solved.In particular, we have that All that gives rise to the following procedure.
Definition 13 Given an underactuated system (H, W) on Q and a critical point finding Z d satisfying 4, 5 and 6; and defining [see (23)] It is clear that above procedure defines, according to the Definition 10, a Lyapunov based stabilization method: its function ̥ assigns to every triple (H, W, α • ) a set of vector fields ̥ (H, W, α • ) ⊂ X (T * Q) given by Eq. ( 26) (and consequently solving the problem P), where Ĥ, B, Z g and Z d must fulfill the properties summarized in the last definition.

Remark 14
The usual way of presenting the CH method is through the idea of feedback equivalence [20].We shall not explore this point of view here.

A particular version
The core of the CH method is Eq. ( 25), which is a system of PDEs for Ĥ, with unknown "parameters" B and Z g .These PDEs are usually called matching conditions. 3Different assumptions on the original underactuated system (H, W), and particular ansatzs for the unknowns Ĥ, B and Z g , give rise to particular forms of (25) and, consequently, to particular versions of the method.(In terms of Definition 11, we have in this way different included methods.)For instance, let us assume that H, Ĥ : (12)], and also i.e. their fiber derivatives are symmetric.In addition, fix a torsion-free connection on T * Q and assume that [recall Eqs. ( 8) and (17)] for some fiber bundle morphism Ψ : Remark 15 Note that, according to (10), each Also [see Eq. ( 11)], the vertical vector field Z g can be written for a unique fiber preserving map z g : Proposition 16 Under above assumptions and notation, the matching conditions (25) reduce to [see Eq. (30)] where [see Eq. ( In particular, the unknowns are Ĥ and z g only. Proof.From Eqs. ( 18) and ( 28), we have that Similarly, from Eqs. ( 18) and (20), As a consequence, using Equations ( 29), ( 30), ( 33) and (34), it easily follows that (25) reduces to for all α ∈ T * Q.This implies that Ψ = FH • F Ĥ−1 and, taking Eq. ( 27) into account, It only rests to use the Eq. ( 32) in order to end the proof.
Let us mention that, according to Eqs. ( 11) and (26), each control law Y of the method is now given by the vertical lift of the fiber preserving map Also, from point 2 above (the gyroscopic condition), according to points 4 and 5, and from point 6.

The kinetic and potential matching conditions
Let us further restrict the original underactuated system (H, W) and the unknowns Ĥ and z g of (31).Assume first that H : T * Q → R is a simple Hamiltonian function, i.e.
where h ∈ C ∞ (Q) and ρ is a Riemannian metric on Q.The first and second terms in H are known as the kinetic and potential terms.Note that H is the quadratic form of the tensor b : Also note that FH = FH = ρ ♯ [for the first equality, recall the Eq. ( 16) of Proposition 3].This implies that FH is a symmetric linear bundle isomorphism.Choosing a coordinate chart (U, ϕ) on Q and its induced one on ) and ( 2)], i.e. choosing canonical coordinates, and denoting by H (q) the coordinate matrix representation at q of the Riemannian metric ρ, we can write Of course, the symmetric condition FH = FH * translates to H as Remark 18 As it is well-known, for Hamiltonian systems defined by a simple function, the critical points are of the form α • = (q • , 0), with dh (q • ) = 0 (use Proposition 3 and Remark 17).
Regarding the unknowns of (31), assume that Ĥ is simple too.We shall use for Ĥ an analogue notation to that we used for H.For instance, we shall write Ĥ = Ĥ + ĥ • π.Thus, F Ĥ = F Ĥ. Also, assume that z g : for some tensor field Z g : This particular choice for the map z g implies that it is quadratic in α.Note that the tensor field Z g can be assumed symmetric in its first two arguments, i.e.
Coming back to the matching conditions, since the kinetic terms of H and Ĥ are quadratic functions and their potential terms are basic functions, the next result can be easily proved.

Proposition 19
Under above assumptions and notation, the matching conditions (31) decompose into two equations: the kinetic matching conditions, and the potential matching conditions.They must be satisfied for all Remark 20 Note that [see Eq. ( 32)] Ŵα = F Ĥ−1 W 0 α is the orthogonal complement of W α w.r.t. the bilinear b.
To end this section, note that under all above assumptions [see Eq. (35)] (49)

Simple matching conditions
First, assume that there exists a subbundle W ⊂ T * Q such that [recall Eq. ( 29)] Following (32), let us define another subbundle of T * Q, Remark 21 Note that, according to Remark 20, Ŵ is the orthogonal complement of W w.r.t. to the tensor b.In particular, we have that Under these assumptions, Chang showed in [16] that there exists a solution Ĥ, Z g of ( 43) if and only if Moreover, it can be shown by using elementary tensor algebra that: Proposition 22 Ĥ, Z g is a solution of (43) if and only if Ĥ satisfies the above equation and Z g is given as follows: 1. define Υ : and a tensor B : W × W × W → R satisfying (41) and (42) along W ; 3. and finally define Z g : Then, a solution Ĥ, ĥ, Z g of ( 43), ( 44) and ( 45) can be found if and only if we solve the equations for Ĥ and ĥ only.These are the new matching conditions that we mentioned above, which we shall call the Chang's or simple matching conditions.The local counterpart reads [see Eq. ( 46) for α = σ and use the torsion-free condition] and ∂ ĥ(q) ∂q k H kl (q) − ∂h(q) ∂q k Ĥkl (q) p l = 0 (57) [see Eq. (47)], for all q ∈ U and p ∈ ϕ * q −1 Ŵq , or equivalently [see (51)] ϕ −1 * ,q Ĥ(q) • p ∈ W 0 q .
Remark 23 Above equations are (up to a sign) Eqs.(2.21) and (2.29) of [19] for Now, let us study the Eqs.( 37) and (38) in the present situation.
According to the last remark and using that Suppose that we have a solution z d of (58), and consider the orthogonal projection P with image W (see Remark for some non-negative function µ : T * Q → R such that µ (σ) = 0 for all σ ∈ Ŵ .Fixing α 0 / ∈ Ŵ , i.e.P (α 0 ) = 0, and using elementary linear algebra, it follows that b (P (α 0 ) , P (α 0 )) P (α 0 ) , for some x 0 ∈ W.
In addition, since the complementary subset of Ŵ in T * Q is an open dense submanifold, this means that z d must be given by the expression for some fiber preserving map x : b (P (α) , P (α)) Reciprocally, it is easy to see that, if z d is a smooth map given by the formula (59) and satisfies (60), then it satisfies (58).Concluding, Proposition 25 If we: i. fix a non-negative function µ : ii. fix a fiber preserving map x : T * Q → T * Q with image inside W and such that the formula (59): (a) defines a smooth application on all of T * Q, (b) satisfies (60); iii. define z d : T * Q → T * Q by the formula (59); then we have a solution of (58).Moreover, every solution of (58) can be constructed in this way.
Summing up, we have a new method for solving the problem P. Assume that a connection was already chosen on T * Q.
Definition 26 Given an underactuated system (H, W), with H = H + h • π simple and W defined by a subbundle W [see Eq. (50)], and given a critical point α • ∈ T * Q of X H , the simple CH method consists in: • finding a solution Ĥ = Ĥ + ĥ • π of Eqs.(54) and (55), with Ĥ positive definite w.r.t.α • ; • fixing a tensor Z g : • fixing a fiber preserving map z d : T * Q → T * Q through the steps i to iii above; • and defining a fiber preserving map y : T * Q → T * Q as in (49) and Y ∈ X (T * Q) as the vertical lift of y.
Of course, the simple CH method is Lyapunov based.In particular, Ĥ and Y satisfy (24).And it is easy to show that the simple CH method is included (in the sense of Definition 11) in the (general) CH method (see Definition 13).
Coming back to the new matching conditions ( 54) and ( 55) [with local versions (56) and ( 57)], the improvement or simplification accomplished by Chang [w.r.t. to the matching conditions ( 43) and ( 44)] is two-fold.On the one hand, the three unknown Ĥ, ĥ and Z g in ( 43) and ( 44) have been decoupled. 6On the other hand, the Eq. ( 48) [the local version of ( 43)] has been replaced by the Eq. ( 56), a too much simple set of equations.It is simpler not only because of the form, but also because of the number of equations that contains.In fact, it can be shown that the number of equations in ( 48) and ( 56) are, respectively, being n := dim Q and m the rank of W .
Remark 27 Regarding the last improvement, it was shown in Reference [21] that, even for the traditional IDA-PBC method (where the unknowns Z ijk g adopt a particular form), the number of equations in (48) can also be reduced from (61) to (62) by using the freedom one has in choosing each function Z ijk g .Thus, the main contribution of Chang in that respect, perhaps, was not to reduce the number of equations, but to give a precise, simple and useful prescription to do that.
Equations ( 56) and (57) [and consequently (54) and (55)] were independently obtained in [25] [see Equations ( 67) and (68) of [25] for V ij = Ĥij and v = ĥ], almost simultaneously with the paper of Chang [16], in the context of the so-called Lyapunov constraint based (LCB) method for underactuated systems with only one actuator.We will see in the last section of this paper that the same equations are obtained (in the mentioned context) for an arbitrary number of actuators.

The LCB method
In this section we extend the Lyapunov constraint based method for the stabilization of underactuated systems, originally presented in [23] (and then further developed in [25]) for systems with one degree of actuation, to systems with an arbitrary number of actuators.To do that, we firstly recall, within the Hamiltonian framework, the idea of controlling underactuated mechanical systems by imposing kinematic constraints [32,33,43] (see also [22,38,39] for further examples), and the deep relationship between constrained and closed-loop mechanical systems.It is worth mentioning that we shall focus on a Hamiltonian formulation of the method, although a Lagrangian one is equally possible.

Second order constraints and closed-loop systems
Following [23], a second order constrained system (SOCS) on Q is a triple (H, P, W) where 1. H : T * Q → R is a smooth function defining an (unconstrained) Hamiltonian system, 2. P ⊂ T T * Q is a submanifold defining the second order kinetic constraints7 imposed on the system, and 3. W is a vertical subbundle of the tangent bundle T T * Q defining the subspace of constraint forces.
In this paper, by a trajectory8 of (H, P, W) we mean an integral curve Γ : Of course, any trajectory must satisfy Γ ′ (t) ∈ P, for all t ∈ I.As in the previous section, X H ∈ X(T * Q) is the Hamiltonian vector field of H w.r.t. the canonical symplectic form of T * Q.The vector field Y := X − X H is called the constraint force related to X.
Remark 28 Note that X is a solution of (63 On the other hand, a closed-loop mechanical system (CLMS) is defined in [24] as a dynamical system on Q given by 1. a smooth function H : T * Q → R, describing a (non actuated) Hamiltonian system, 2. a vertical subbundle W ⊂ T T * Q, representing the actuation subspace and defining, together with H, the underactuated system (H, W), and 3. a vector field Y on T * Q such that Y ⊂ W: the control law.
We will denote such a system by (H, Y ) W .By a trajectory of (H, Y ) W we mean an integral curve of the vector field X H + Y .Now, let us see how a SOCS gives rise to a CLMS.Let us suppose that a triple (H, P, W) defines a SOCS that admits a solution X of (63) (which is unique, for instance, in the case of normal SOCSs -see [24]-).Because of Remark 28, this is the same as saying that it admits a solution Y of (64).Then, from the SOCS (H, P, W) we can define the CLMS (H, Y ) W , with Y := X − X H .Note that • both systems have the same trajectories: the integral curves of the vector field X = X H + Y ; • the role of Y is two fold: a constraint force for (H, P, W) and a control law for (H, Y ) W .
This construction tells us that, in order to design a control strategy for controlling a given underactuated system (H, W), we can "think of constraints," i.e. we can think of the possible constraints P that give rise to the desirable behavior, and then obtain the control law as the related constraint force Y ⊂ W.
It was shown in [24] that every CLMS can be constructed from a SOCS as we did above, i.e. every control law may be seen as the constraint force of a given set of second order constraints.This result reveals a deep connection between closed-loop and constrained mechanical systems and, from the point of view of the applications to automatic control, the result says that, in order to synthesize a state feedback for a given underactuated system, we always (i.e.without loss of generality) can "think of constraints."

(Asymptotic) stability and related constraints
Let us consider a dynamical system on a manifold P defined by a vector field X ∈ X(P ).Given a critical point α • ∈ P of X, let Ĥ : P → R be a Lyapunov function for X and α • (recall Definition 9).Note that, given a trajectory Γ : where µ : P → R is the non-negative function given by µ (α) := − d Ĥ(α), X(α) , ∀α ∈ P.
Remark 29 Observe that µ −1 (0) is the La'Salle surface related to Ĥ (see [29]), and That is, condition L2 may be interpreted as a kinematic constraint on the system.Hence, roughly speaking, if we want to stabilize a dynamical system, we can think of imposing a constraint of the form (65), for appropriate non-negative functions Ĥ and µ.We shall call it Lyapunov constraint.Of course, depending on the conditions we impose on Ĥ and µ, we shall have different stability properties.For instance if, besides condition L1 for Ĥ, we ask µ to be such that the singleton {α • } is the bigger invariant subset of µ −1 (0), the La'Salle invariance principle would ensure (local) asymptotic stability for α • .This is true, for example, if we assume that property L1 also holds for µ, what would imply that d Ĥ(α), X(α) < 0 for all α = α • .
If in addition we ask Ĥ to be a proper function (and P to be connected), then global asymptotic stability for α • would be ensured.(For a proof of these results, see [29] again.) Now, let us focus our attention on Hamiltonian systems.Take P = T * Q for some Q, fix a smooth function and consider the Hamiltonian system on Q defined by H. Given a point α • ∈ T * Q and non-negative functions Ĥ, µ : T * Q → R, let us impose the constraint (65) on this system.In other words, let us define the submanifold and impose the constraint Γ ′ (t) ∈ P on the trajectories.
Remark 30 Notice that, if (U, ϕ) is a coordinate chart of Q, in terms of the induced chart on T T * Q (see Eq. (3)) the submanifold P is locally given by the equation Suppose that we want to implement this constraint by exerting forces lying inside a vertical subbundle W ⊂ T T * Q.All that defines the SOCS (H, P, W).Assume that this SOCS admits a solution X of (63), or equivalently, admits a solution Y of (64).(In other words, assume that the Lyapunov constraint P can be implemented by a constraint force Y ⊂ W.) This is the same as saying that there exists Y ∈ X (T * Q) such that or equivalently Since µ is non-negative, then d Ĥ(α), X H (α) + Y (α) ≤ 0, i.e.Ĥ satisfies L2.In addition, if X H (α • ) + Y (α • ) = 0 and Ĥ satisfies L1 for α • , then Ĥ is a Lyapunov function for X H + Y and α • , and consequently the underactuated system (H, W) can be stabilized at α • by the control law Y .Of course, if stronger conditions are imposed on Ĥ and µ (as discussed at the beginning of this section), stronger stability properties can be ensured for the system defined by X H + Y .
Remark 31 In this way, as we have seen in the previous section, we are constructing the CLMS (H, Y ) W from the SOCS (H, P, W).
In conclusion, if a solution Y exists for Equation (66), for some functions Ĥ and µ, different assertions about the stabilizability around α • of the underactuated system (H, W) can be made, depending on the properties of Ĥ and µ.
Remark 32 Also, if a solution Y of (66) exists along an open subset π −1 (U ) = T * U ⊂ T * Q containing α • , namely a local solution of (66), the same assertions can be made, just replacing Q by U .

A maximal stabilization method
The discussion in the previous section drives us to another method for (asymptotic) stabilization of non-linear underactuated mechanical systems.
Definition 33 Given an underactuated system (H, W) on Q and a critical point α • ∈ T * Q of X H , the Lyapunov constraint based (LCB) method consists in finding two functions Ĥ, µ : T * Q → R and a vector field Y ∈ X (T * Q) such that Ĥ is positive definite w.r.t.α • , µ is non-negative, Y (α • ) = 0 and Eq.(66) is solved.
Note that the method is a Lyapunov based stabilization method, and it is essentially defined by Eq. ( 66).So, we can identify the method with this equation.Let us write it in other terms.Since W is a vertical subbundle and Y is a vertical vector field, we can write W α = vlift α (W α ) and Y (α) = vlift α (y (α)), for a unique subspace To conclude the section, let us mention the important fact that any stabilization method for (H, W) which gives rise to a control law Y ⊂ W and a Lyapunov function Ĥ for the related closed-loop system X H + Y (and some critical point of X H ), as every version of the energy shaping method does, can be reduced to the LCB method, i.e.
to solve Eq. (66) [or equivalently, to solve Eq. ( 68 Proof.Given a vector field Y ⊂ W, if Ĥ is a Lyapunov function for X := X H + Y and α • , the theorem easily follows from the fact that α • must be critical for X [from which Y (α • ) = 0], the item L1 and the combination of L2 and the Eq. ( 67).
In terms of Definitions 10 and 11, this theorem says that the LCB method includes all the Lyapunov based stabilization methods, i.e. it is maximal among such methods.In other words, the LCB method is the most general method among the Lyapunov based stabilization methods (see Remark 12).In particular, any version of the CH method (see Definition 13) is included in the LCB method.
5 The LCB method for simple functions In Ref. [25], a deep study of Eq. ( 68) has been done for underactuated systems with only one actuator.In this section we shall extend such a study to an arbitrary number of actuators.More precisely, given an underactuated system (H, W) and non-negative functions Ĥ and µ, we shall study under which conditions there exists a fiber preserving map y solving (68) (thinking of Ĥ and µ as data of (68), instead of unknowns).We shall focus in the case in which H and Ĥ are simple functions.In this case, we show that the mentioned existence problem is governed by a set of PDEs for Ĥ, which define what we have called the simple LCB method in Ref. [25].We shall see that these equations are exactly the matching conditions (54) and (55) obtained by Chang in [18,19] (related to the simple CH method of Definition 26).Finally, we show that the simple LCB and the simple CH method are equivalent stabilization methods.
Lemma 37 If H and Ĥ are simple functions on T * Q and V ⊂ T * Q is a linear subbundle, the following conditions are equivalent.
2. Given a connection on T * Q, for all q ∈ Q and σ ∈ V q , the Eqs.(54) and (55) hold, with Ŵ replaced by V .
Then, if we replace p by λ p in Eq. ( 72), with λ ∈ R, we have that A λ 3 /2 + B λ = 0 for all λ ∈ R.But this is possible only if A = B = 0.
Combining last lemma and Proposition 36, we have the following result.
Proposition 42 Under above assumptions and notation, the map y given by (75) satisfies (68), for some nonnegative function µ, if and only if Ĥ satisfies (71) and z satisfies [where Υ : and Proof.Let us first recall that, from the results of the previous section (see Theorem 40), there exists a solution y of (68) for Ĥ (and for some non-negative function µ) if and only if Ĥ satisfies (71), or equivalently (73) and ( 74).
If such a solution is given by ( 75 + d ĥ (q) , FH (•) − dh (q) , F Ĥ (•) = Υ (α, α, σ) + ψ (σ) , This result says that the simple LCB method is maximal among the Lyapunov based stabilization methods for which the related Lyapunov functions can be chosen simple.In particular, it says that the simple CH method (see Definition 26) is included in the simple LCB method (recall Definition 11).We show below that the other inclusion, and consequently the equivalence, also holds.This is a very remarkable fact, since the form of the control laws given by the (simple) CH method seems to be not too general, mainly because of the rather special form of the gyroscopic forces.But, as we show below, this is a wrong impression.for some fiber preserving map z d satisfying (58) and some tensor Z g given by (53).So, it is enough to take we want to stabilize one of them by means of finding a simple Lyapunov function, the energy shaping method is the most general way to do it.This claim, to the best of our knowledge, is not previously mentioned in the literature.
)].More precisely, Theorem 34 Let (H, W) be an underactuated system and α • ∈ T * Q a critical point of X H .If we are given a vector field Y ⊂ W and a Lyapunov function Ĥ for X H + Y and α • , then Ĥ is positive definite w.r.t.α • , µ := −i XH +Y d Ĥ is non-negative and Y (α • ) = 0.In particular, Y is given by the LCB method.