An Innovative Control Design Procedure for Under-Actuated Mechanical Systems: Emphasizing Potential Energy Shaping and Structural Preservation

In this article, we propose a procedure to solve the controlled design for a class of under-actuated mechanical systems. Our proposed method can be viewed as a sub-method of the IDA-PBC or Controlled Lagrangian approaches, with a particular focus on shaping the potential energy. By emphasizing potential energy shaping, we can effectively tackle the bottleneck presented by the matching equation in these approaches. Moreover, our method leverages a suitable coordinate transformation that is inspired by the physics of the system, further enhancing its efficacy. Therefore, our design procedure is based on a coordinate transformation plus potential energy shaping in the new coordinates, and its existence and possibility of potential energy shaping can be verified via some algebraic calculations, making it constructive. To illustrate the results, we consider the cart-pole system and a recently introduced under-actuated mechanical system named swash mass pendulum (SMP) (Salamat and Tonello, 2021). The SMP consists of a pendulum made of a rigid shaft connected to a pair of cross-shafts where two swash masses can move under the action of servo-mechanisms.


I. INTRODUCTION
A Great deal of attention has been given to under-actuated mechanical systems to develop stabilizing techniques in many different application fields.In fully actuated mechanical systems, the number of control inputs is equal to the dimension of their configuration manifold.Therefore, they are exact feedback linearizable, which means that they can be transformed into a linear system using feedback control.As a result, their behavior can be fully controlled by the input signals, and consequently, stabilizing to any desired equilibrium is possible.However, this is not achievable for under-actuated mechanical systems due to the lack of control inputs concerning their configuration manifold.In addition, it is desirable for the closed loop system to retain the mechanical structure of the underlying system.While enforcing this structure in the controller design process may impose some restrictions, it also enables a constructive and physically interpretable approach.For instance, achieving closed-loop stabilization corresponds to shaping the energy of the system.Significant progress in shaping the total energy of under-actuated mechanical systems has been rendered possible by the milestone work of Bloch and Ortega [2], [3] that provided a methodological approach-Lagrangian for the first method and Hamiltonian for the latter-to stabilize the class of systems through a given feedback.Bloch's Lagrangian method and Ortega's mathematical framework named interconnection and damping assignment passivity-based control (IDA-PBC), suggest solving so-called matching equations to obtain a feedback law.
These matching equations consist of a set of nonlinear partial differential equations (PDEs).These PDEs can be solved (if the solution exists) and the dynamical system model and the target system are said to match.A lot of research effort has been devoted to the solution of the matching equations and using the solution for controller design see, e.g., [4], [5], [6], [7], [8], [9].
The matching equations PDEs that describe the kinetic and potential energy are achievable via feedback, guaranteeing that the closed-loop dynamics is also a mechanical system.Solving these PDEs, in general, is not an easy task.Different methods are undertaken in literature to overcome this difficulty.These methods assume some assumptions on the problem and impose some constraints on the existence of solutions, see e.g., [4], [10], [11], and [12].
Another challenge lies in the time-variant nature of the control input matrix, denoted as G(q).Notably, in the works of [4], [10], and [12], the authors adopted the simplifying assumption that the input matrix takes the form G = [I m 0 s×m ].This assumption on the input matrix G can be applied only to simple robot structures.In [12], an outer partial feedback linearization (PFL) control is used to obtain the desired form, which compromises the robustness of the closed loop.The IDA-PBC controller for the pendulum-on-cart presented in [4] uses PFL.Then, the design is augmented to a position feedback control by using an observer.One notable drawback of this approach is its dependency on velocity data.
In this article, firstly, we relax the assumption that the input matrix takes the form G = [I m 0 s×m ] on the input matrix and we focus on potential energy shaping instead of total energy shaping, and leave kinetic energy shaping.The natural question that arises is about the reason of leaving this degree of freedom in the controller design.Actually, considering both of potential and kinetic energy shaping simultaneously, leads to two coupled matching PDEs, which is the source of complexity of the problem.Instead, focusing on potential energy shaping, makes the problem more tractable.The possibility of appropriately shaping potential energy can be determined by verifying an algebraic condition on the open-loop potential energy; a nice feature of this proposed result.Roughly speaking, if the open loop potential energy has an unconditional minimum in the coordinates unaffected by inputs, then it is feasible to shape the closed-loop potential energy to control the system as desired.Even more, it is possible to obtain a family of functions -including quadratic forms-as the solutions of potential matching equation whenever the solution exist.In other words, the procedure of existence proving, proposes some solutions for matching equation, the fact which makes the proposed method constructive.However, in some applications, it is not possible to shape the potential energy in original coordinates, while it becomes possible after a suitable coordinate transformation.In this work, the transformation is motivated by its practical applications in the real world.Hence, the proposed method's applicability and the validity of its imposed constraints are assured.The existence of the transformation can be verified by making certain algebraic assumptions.
Original contributions: The first contribution of this article, is proposing the algebraic conditions, under which it is possible to asymptotically control an under-actuated mechanical systems via potential energy shaping.The second contribution is proposing a family of functions which can serve as the desired closed loop potential energy, which in turn, obviates solving nonlinear matching PDEs.By circumventing the need to solve PDEs, our approach simplifies the computational requirements for potential energy-shaping control.Lastly, it is feasible to shape the potential energy in a more complex manner to fulfill more advanced requirements.
This article is organized as follows.Section II is dedicated to preliminary materials and problem formulation.Main results of the article are reported in Section III.The cartpole system and the swash mass pendulum are analyzed in Section IV.Experimental results of this design are reported in Section V.This article ends with a conclusion in Section VI.

II. PROBLEM FORMULATION
Consider an under-actuated mechanical system with dynamics described by the well-known Euler-Lagrange (EL) equations of motion M(q) q + C(q, q) q + ∇V (q) = G(q)u, ( where q ∈ R n are the configuration variables, u ∈ R m are the control signals, M(q) > 0 is the generalized inertia matrix, C(q, q) represent the Coriolis and centrifugal forces, V (q) is the systems potential energy and G(q) is the input matrix.( 1) is under-actuated whenever m < n.A coordinate transformation is a diffeomorphism on configuration space.A function like : R n → R n is called diffeomorphism if it is invertible and both, the function and its inverse, are differentiable.If (q) is a diffeomorphism, then ∇ q (q) is an invertible matrix at each q in its domain of definition.
Lemma 1: Consider a diffeomorphism : R n → R n define T (q) (∇ q (q)) −1 and the generalised coordinate transformation as follows Then, the EL dynamics (1) can be written as follows M(q) q + C(q, q) q + ∇V(q) = G(q)u, where q := T −1 (q) q (4) M(q) := T (q)M(q)T (q) q= −1 (q) (5) G := T (q)G(q) and C(q, q) q is the Coriolis times the centrifugal forces associated to the mass matrix M(q), which can be computed as follows The Lagrangian in the new generalised coordinates is Proof: The proof follows from straightforward calculation computing the derivative of the coordinate transformation and using the original dynamics.
Remark 1: Notice that the matrix T (.) can be used to shape the form of the mass matrix M(.) in the new generalised coordinates.However, we restrict our attention to all invertible matrices T (.) that satisfy the integrability condition.That is, ∂T i ∂q is a symmetric matrix for i = 1, . .., n, where T i is the ith row of T .Equivalently, given an invertible matrix T (.), we assume that there exists an invertible and sufficiently smooth mapping : R n → R n that satisfies Hereafter, without loss of generality, it is assumed that, configuration coordinate q, possibly after a suitable permutation, can be partitioned as q = col(q u , q a ) such that the input matrix correspondingly can be written as where G a (q) is an invertible m × m matrix.In this regard, G u (q) and G a (q) are the under-actuated and actuated components of G(q), respectively.The EL dynamics (1) is coupled when G u (q) ≡ 0. Also, to simplify the notation, we partition the generalized velocity as q = col( qu , qa ) with q a , qa ∈ R m and q u , qu ∈ R s , and partition the inertia and Coriolis matrices as where Throughout this article, we will impose some assumptions to show particular forms of the EL dynamics (1) under generalised coordinate transformations.The set of assumptions is as follows Assumption 1: There exists a function u : R m → R s , such that Assumption 2: The inertia matrix depends only on the actuated variables q a , i.e., M(q) = M(q u ), and the sub-block matrix m aa of the inertia matrix is constant.
Assumption 3: The potential energy can be written as Proposition 1: The dynamics of the system (1), under Assumption 1, and using the coordinates transformation can be written as follows where Proof: First notice that, under Assumption 2, the coordinate transformation ( 14) satisfies Assumption 1 with Then, from Lemma 1 we obtain that the dynamics can be written in the form (3) with and Lagrangian (22) The dynamics ( 15)-( 16) follows, after some simple calculations, from the EL formula using the Lagrangian (22).
Note that the presence of the transformation necessitates m au = 0.For the singularity issue, we can conclude that if |m au | > 0, the singularity-free condition of m −1 aa m au is satisfied.
Corollary 1: The system (1) satisfying Assumption 1-3 can be written as in the EL form as follows with m s uu (q u ) = m uu (q u ) − m au (q u )m −1 aa m au (q u ).In addition, if Assumption 3 also holds, then the EL dynamics can be written as follows .
Proof: The proof follows from Proposition 1 and Assumption 1-3 by setting in ( 15)-( 16) the following conditions: q 1 = q u , q 2 = q a + u (q u ), m aa is a constant matrix, and m s uu (q) = m s uu (q 1 ).The second part follows from the fact that, under Assumption 3, the potential function is V(q) = V (q u ).
Remark 2: The system in the partial linear form given by (24) has been used to design a PID passivity-based controller in [1], [12].In that work, an outer partial feedback linearization (PFL) control is used to obtain the desired form, which may compromise the robustness of the closed loop.However, this PFL control can be avoided by using a generalized change of coordinates as shown in Corollary 1.

III. MAIN RESULT
In this section, the dynamics of under-actuated system, possibly after a suitable transformation, is considered in the form of (3).The main question here is "Under which condition it is possible to stabilize (3) at desired configuration q with only potential energy shaping?" It is known that, if (3) be fully actuated, i.e., G(q) ∈ R n×n and G(q) is full rank for every q, then it is straight forward to shape potential, and even kinetic energy in an arbitrary way by input u, such that the closed loop is stable at desired q .However, for under-actuated systems of (3), i.e., G(q) ∈ R n×m and m < n, the controller design with energy shaping is challenging [13].Most results in the context of energy shaping state that, if there exists an energy function can server as closed-loop energy if it satisfies the matching equation.Solving matching equations, which are coupled nonlinear PDEs, can result the controller [2], [13], [14], [15].However, there are rare results on the possibility of controller design via energy shaping.Here, we states the conditions, under which, it is possible to shape the potential energy in order to stabilize the closed loop system.These conditions are algebraic and easy to check.
In order to answer the main question, first, we consider the class of functions V cl : R n → R, which possibly can serve as the closed loop potential energy.
Proposition 2: Consider (3), where q ∈ R n , u ∈ R m , G ∈ R n×m and m < n.It is assumed that G(q) is full column rank for all q ∈ R n .Suppose that G ⊥ (q) ∈ R (n−m)×n is a full-rank left annihilator of G at each q, i.e., G ⊥ G = 0.For V cl : R n → R, if the following holds: then can be the closed loop potential energy function and the controller makes the closed-loop system as: This proposition characterizes all assignable closed-loop potential function.However, in order to achieve stability at desired point q , the closed-loop potential function must satisfy some more conditions.In this regard, the following theorem answers the question about the possibility of stabilization of an Euler-Lagrange system with only potential energy shaping.
Theorem 1: Consider (3), where q ∈ R n , u ∈ R m , G(q) ∈ R n×m and m < n.It is assumed that G(q) is full column rank for all q ∈ R n .Suppose that G ⊥ ∈ R (n−m)×n is a constant fullrank left annihilator of G at each q, i.e., G ⊥ G(q) = 0.If open loop potential function V(q) satisfies the following conditions at desired equilibrium point q then it is possible to assign closed loop potential function as V cl (q) via input u such that: which guarantees the stability of closed loop system at q .Proof: It is known from linear algebra (see e.g., [16]) that one can orthogonally extend the rows of G ⊥ to build a basis for R n .Name the transpose of this extension as Ḡ.Therefore, G ⊥ Ḡ = 0 and Ḡ G T ⊥ is an invertible matrix.Define V cl (q) = V(q) + ψ ( ḠT q) where ψ : R m → R can be any arbitrary smooth function of its arguments.V cl satisfies the matching (25), consider: Left-multiplying both side of above equation by G ⊥ results in the matching equation due to G ⊥ Ḡ = 0.Among all possible ψ (.), those have the following conditions, make the V cl to satisfy (29) and (30): where K is a m × m positive definite matrix and α is sufficiently large positive constant.In this regard, consider (31) evaluated at q : ∇V cl (q)| q = ∇V(q)| q + Ḡ∇ψ ( ḠT q)| q . (33) Due to the construction of Ḡ the matrix Ḡ G T ⊥ T is invertible, therefore (33) is equal to zero if and only if the following is equal to zero: First and second line of above equation are resulted due to (28), (32) and matching equation, respectively.Finally, in order to show that V cl satisfy (30), consider gradient of (31) evaluated at q as: It is known that multiplying any relation such as where M 1 and M 2 are square matrix, from left and right to T and T T , respectively, where T is an arbitrary invertible matrix, results in T M 1 T T T M 2 T T ; see e.g, [16].Therefore, (34) is positive definite if and only if the following is positive definite: is positive definite if and only if C 0 and A − BC −1 B T 0, see e.g.[16].Therefore, due to positive definiteness of G ⊥ ∇ 2 V(q)| q G T ⊥ , the above matrix is positive definite if and only if the following matrix is positive definite: Sufficiently large K makes the above expression positive definite.It is known that minimum points of energy function are stable and this function can serve as Lyapunov function to show the stability.Condition (30) with positive definiteness of M(q) show the positive definiteness of energy function about the point col(q , 0) and simple calculation shows derivative of energy function along the trajectories of the close-loop system is negative semi definite; therefore, the closed loop system is stable at col(q , 0).Remark 3: A quadratic form for ψ, e.g., where b = ḠT q , a is equal to right hand side of first equation of (32) and K is sufficiently large positive definite matrix, can meet the requirement of (32).Albeit, other forms of ψ can meet the conditions and are usable.However, this fact shows that conditions (28) guarantee the existence of solution and in meantime propose at least one solution.Consequently, focusing on potential energy shaping, make the design constructive and obviate the essential of solving matching PDEs.Remark 4: Assumption on the G ⊥ to be constant, even for q-modulated G(q), is not restrictive.It is possible to propose constant G ⊥ for non-constant G(q).For example consider: Please note that G ⊥ and Ḡ are not unique.In general, for G(q) = ḠQ(q), where Q(q) is full rank square matrix, it is possible to propose constant G ⊥ .Even more, the following result show that, when G ⊥ (q) is not constant, it is possible to use the results of Theorem 1.  and constant Ḡ ∈ R n×m such that: and Ḡ G ⊥ (q) is full rank for all q ∈ D, then the results of Theorem 1 holds on D.
Proof: Similarly, define V cl (q) = V(q) + ψ ( ḠT q) where ψ : R m → R can be any arbitrary smooth function of its arguments and Ḡ as in defined in this corollary, then (31) holds for all q ∈ D. Consequently, the rest of proof of Theorem 1 holds here for all q ∈ D.
Remark 5: Consider G : R 3 → R 2×3 as: It is not possible to find a constant G ⊥ such that G ⊥ G(q) = 0 holds for all q ∈ R 3 .However, consider , satisfy conditions of Corollary 2 on D. Remark 6: Based on Theorem (1) using the energy of closed loop system, i.e., 1  2 qM(q) q + V cl (q) as Lyapunov function, stability of closed loop system is guaranteed.However, for asymptotic stability, suitable damping must be injected in the system.In this regard, the input u can be divided in to two parts u = u es + u di , where u es is used for energy shaping such as in (26), and u di is for damping injection part.In many cases, u di = −G T q satisfy the LaSalle conditions and results in asymptotic stability.

IV. EXAMPLES
To evaluate the efficacy of the proposed methodology, we evaluate its performance for the cart-pole system and the swash mass pendulum (SMP).

A. CART-POLE SYSTEM
For this classical example shown on the left side of Fig. 1, we have n = 2, where q a is the position of the cart and q u denotes the angle of the pendulum with respect to the up-right vertical position, M is the mass of the car, m is the mass of the pendulum and its length.We apply the generalized coordinate transformation to obtain the partial form of the cart-pole system.The nonlinear dynamics of the cart-pole system be written Therefore, the conditions of Theorem 1 are satisfied.To show the performance of the proposed control law based on the potential energy shaping of the system, we performed a simulation with the objective of stabilizing the system.We consider the system parameters M + m = 1, = 0.2 and g = 9.804 ms −2 .Fig. 2 shows the results for an initial conditions q u = π 3 , qu = 0, q a = −0.5, qa = 0. Notice that even when the pendulum's initial angular position deviates from the top position, the closed-loop response remains remarkably effective.

B. SWASH MASS PENDULUM
The proposed SMP deploys a system of two mass particles [1].The main particle with mass M is fixed to one end of a massless, rigid shaft of length L, the other end of the shaft is hinged to a pivot point (PP) that enables a rotational movement for the main shaft.(see on the right-hand side of Fig. 1).To rotate and control the SMP, one additional particle of mass m is positioned on cross shafts laying on an orthogonal plane w.r.t. to the main shaft.The SMP is tilted by steering the swash mass since it generates a moment vector w.r.t. the pivot.q a and L denote the distance from the GC of the swash mass (actuated variable), and the length of the vertical shaft of the SMP.The intersection of the main shaft and the swash masses plane is referred to as the geometrical center (GC).
The EL equations can be obtained by standard Euler-Lagrange methods or applying Newton's second law.For the considered system we have n = 2, G = e 2 , and the generalized coordinates q = [q 1 q 2 ] , ))+mg(L−(q 2 sin(q 1 ) − L cos(q 1 ))).
(39) We apply the generalized coordinate transformation to obtain the partial form of the SMP.Consider the transformation obtained under Assumption 1: and consequently: + mg(L − ((q 2 − Lq 1 ) sin(q 1 ) − L cos(q 1 ))) C(q, q) = m(q 2 − Lq 1 ) q2 −m(q 2 − Lq 1 ) q1 m(q 2 − Lq 1 ) q1 0 , ∇V(q) = LMg sin(q 1 ) − gm((q 2 − Lq 1 ) cos(q 1 )) −gm sin(q 1 ) , A noticeable property of the partial form of the SMP is that the parameters of the model are such that the matrix Ṁ(q) − 2C(q, q) = 0 −2 q2 mq 1 2 q2 mq 1 0 (40) is skew-symmetric and can be used to establish the passivity of the SMP (see Appendix A).The control objective is to bring the initial states (q 1 (0), q1 (0), q 2 (0), q2 (0)) to the origin (q 1 , q1 , q 2 , q2 ) = (0, 0, 0, 0), i.e, change the stable equilibrium point into an asymptotically stable equilibrium point around some neighborhood of the origin.In our case we choose V cl to be a quadratic function which leads to where (q * a , q * u , 0, 0) denotes the equilibrium configuration and k p 1 and k p 2 are used as tuning parameters.Therefore, the explicit control law from (26) defined by gm(L sin(q 1 ) + q 2 cos(q 1 )) − LMg sin(q 1 )) − k 1 q 2 + gm sin(q 1 )k 1 q 2 + gm sin(q 1 ) . (42) The controller design is completed with the damping injection term, which yields where k d 1 and k d 2 inject damping along a specified direction of velocities.As stated in Proposition 2 the proposed controller, added to the partial form, ensures the stability of the desired equilibrium.
Remark 7: It is important to underscore that, in spite of its apparent complexity, the controller is well defined, and its highest degree is linear.This is an important property of the control, since saturation should be avoided in all practical applications.

C. COMPARISON WITH THE PASSIVITY-BASED CONTROL
Before closing this section, it is relevant to compare with the passivity-based control methodology [17].The present approach takes advantage of the passivity of the SMP model.
To do so, we propose the following Lyapunov function candidate where k and k p are strictly positive constants.The Lyapunov function candidate (44) is positive definite if we restrict (q 1 ∈ [0, π )).Differentiating V , we get Therefore, the explicit control law defined by for k d > 0, which leads to V = −k d q2 2 .Therefore, the closedloop system is stable.It is interesting to note that the controller (46) derived with passivity-based approach is completely different from (42).

V. EXPERIMENTAL RESULTS
In this section, we carry out some experiments to evaluate the performance of the controller in the real setup shown in Fig 3 .The realized SMP comprises three main components: The static-base unit, the T-shaped swing arm and the cylindrical swash mass assembly.The static base holds the SMP and connects to the moving part of the SMP by a central ball bearing, that indeed is the pivot point (PP).The T-shaped swing arm is a metal base plate on which all other components are mounted.To accommodate the cylindrical swash mass main shaft, two lateral ball bearings are positioned at the lower end.The shaft has a integrated tooth rack on its complete length.To this rack, a polymer gear interfaces to generate linear movement by a servo motor installed on the backside of the base plate.To increase the effect of the swash mass shaft, each end of the shaft has an additional steel mass attached.These also limit the travel of the shaft to provide a constraint on the linear movement and therefore prevent the shaft from slipping out of the bearings when the commanded control signal exceeds the allowed travel range.An inertial measurement unit (BNO055) is used and located in the geometric center of the SMP to measure the roll angle.A Kalman filter is implemented to estimate the roll angle in the BNO055 [1].The control law algorithm is written in C++, and runs on the microcontroller (16 b, 14 MHz).

A. CASE STUDY
In the experiment, we set the desired equilibrium (the roll angle to zero) to be reached starting from an initial state.Under this scenario, we run the experiment using two controllers: the controller proposed in Section IV, referred to as the potential energy shaping, and the passivity-based control proposed in [17], referred to as PBC.The parameters of the potential energy shaping controller are k p 1 = 0.9, k p 2 = 0.1,  4 shows the time evolution of the angle of the SMP when it starts from the initial conditions q u (0) = θ (0) = 30 • .As can be seen, both controllers satisfactory stabilize the SMP at the desired equilibrium.Upon comparing our simulation results with those presented in Fig 7 of [1], we have arrived at the conclusion that the settling time has been reduced by 25%, from 4 seconds to 3 seconds.The experimental results demonstrate the efficacy of the proposed controller, in contrast to the PBC approach.Specifically, the proposed controller successfully achieves the desired rest equilibrium of the SMP while also halting the swash mass at the geometric center of the integrated tooth rack.

VI. CONCLUSION
A constructive methodology to reduce the complexity of solving kinetic matching equations was proposed in this article.The controller is developed by shaping the potential energy in the coordinate that can be affected by inputs.In this regard, modifications on potential energy can be simply done by adding quadratic terms.The particulars of the technique are expounded upon in Section III, wherein both the stabilizing characteristics of the controller and the associated asymptotic stability are elaborated upon.We have also addressed a recently introduced under-actuated mechanical system named the swash mass pendulum (SMP).Experiments on the physical system model were presented to evaluate the performance of the proposed controller.

Corollary 2 :
In Theorem 1, suppose there exist an open subset of R n containing q named D, G ⊥ : D → R (n−m)×n

FIGURE 2 .
FIGURE 2. Proposed controller performance of the cart-pole system.

FIGURE 3 .
FIGURE 3. Experimental prototype of the SMP available at the flight mechanics laboratory.(a)-(e) CAD design of the prototype.(f)-(h) Details of the experimental setup.