{'fraction_non_alphanumeric': 0.040622527037720915, 'fraction_numerical': 0.01233183856502242, 'mean_word_length': 4.29874213836478, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Reformulation of Matching Equation in Potential Energy Shaping

Stabilization of an underactuated mechanical system may be accomplished by energy shaping. Interconnection and damping assignment passivity-based control is an approach based on total energy shaping by assigning desired kinetic and potential energy to the system. This method requires solving a partial differential equation (PDE) related to he potential energy shaping of the system. In this short paper, we focus on the reformulation of this PDE to be solved easier. For this purpose, under a certain condition that depends on the physical parameters and the controller gains, it is possible to merely solve the homogeneous part of potential energy PDE. Furthermore, it is shown that the condition may be reduced into a linear matrix inequality form. The results are applied to a number of benchmark systems.


I. INTRODUCTION
Stabilization of an underactuated mechanical system is a challenging problem since it is not fully feedback linearizable due to fewer number of actuators than the degrees of freedom (DOF). Nevertheless, Interconnection and damping assignment passivity-based control (IDA-PBC) is a general approach to stabilize an underactuated system by shaping total energy of the system [1]. In this method, the desired structure of the closed-loop system is selected instead of classical passivity, and then all assignable energy functions are derived. For this purpose, two sets of PDEs related to the shaping of potential and kinetic energy functions, which are called matching equations, should be solved analytically [2]. By this means, the desired inertia matrix should be derived from the kinetic energy PDE, and then by knowing this matrix, the potential energy PDE is solved. Since the analytic solutions of these equations shall be derived, the applicability of this approach is significantly restricted.
Several papers have focused on solving or reformulating the matching equations. In [3], solving the matching equations of systems with one degree of underactuation has been reported. It has been shown that upon certain conditions, the solution of the kinetic and potential energy PDEs could be derived analytically. Furthermore, Solving the PDEs of 2-DOF underactuated systems satisfying some conditions has been reported in [4]. Simplification of kinetic energy PDE by means of coordinate transformation has been studied in [5]. In [6] the total energy shaping without solving the matching equations for a class of underactuated systems has been investigated, (see also [7] A method for simplifying the kinetic energy PDE has been reported in [8] in which a particular structure for desired inertia matrix has been considered to simplify the related matching equation. Recently in [9], it has been shown that replacing a PDE with some Pfaffian differential equations may ease up this stumbling block of solving matching equations. Furthermore, it has been shown that the solution of potential energy PDE may be divided into homogeneous and non-homogeneous components, while [10] reports on the general structure of the homogeneous solution. In some cases, derivation of desired potential energy, especially the non-homogeneous component, is a prohibitive task. The situation is more crucial when the kinetic energy PDE is as challenging as to derive another desired inertia matrix for the system. In this note, we concentrate on reformulation of the potential energy PDE. For this purpose, we derive a certain and applicable condition for many systems to merely derive the homogeneous solution of the PDE. Furthermore, we show that verification of the proposed condition is quite easy since it is based on physical parameters of the system, desired inertia matrix, and the controller gains in the homogeneous part of desired potential function. Furthermore, it is shown that the proposed condition may be reformulated into a linear matrix inequality (LMI), that may impose some constraints on the controller gains. Note that in this formulation, the gravity torques of unactuated configuration variables remain in the closed-loop system. Thus, the contribution of this note may be interpreted as rejection of a specific unmatched disturbance by merely suitable selection of the controller gains (see [11] for the challenges of unmatched disturbance rejection). The effectiveness of the method is verified through some examples.

II. REVIEW OF IDA-PBC FOR MECHANICAL SYSTEMS
Dynamic equations of a mechanical system in port Hamiltonian modeling are as follows [1] where q, p ∈ R n are generalized position and momentum, respectively, H(q, p) = 1 2 p T M −1 (q)p + V (q) denotes the Hamiltonian of the system which is the summation of kinetic and potential energy, 0 < M ∈ R n×n denotes the inertia matrix, u ∈ R m is the input, G(q) ∈ R n×m denotes full rank input mapping matrix and the operator ∇ denotes gradient of a function which is represented by a column vector. Presume that the target dynamic of the closed-loop system is in the following form in which is the summation of the desired kinetic and potential energy, J 2 ∈ R n×n is a free skew-symmetric matrix, K v ∈ R m×m is positive definite damping gain, and V d should be designed such that q d = arg minV d (q) with q d being the desired equilibrium point. By setting (1) equal to (2), the control law is given as while the following PDEs shall be satisfied The first PDE is related to kinetic energy shaping, and the second one corresponds to the potential energy PDE. First, M d should be derived from nonlinear PDE (4) and then V d is obtained from (5). Stability of q d is ensured by considering H d as a Lyapunov candidate whose derivative In the next section, we focus on the reformulation of PDE (5).

III. MAIN RESULTS
As indicated in [9] and [10], the solution of potential energy PDE can be divided to homogeneous (V dh ) and nonhomogeneous (V dn ) components. Furthermore, V dh is derived from the following PDE and has the following form in which, V dhi s are functions satisfying (6). Typically, the free design function φ is set as: in which V * dhi = V dhi | q=q d and k i s are free positive gains. Furthermore, V dn is the particular solution of the PDE (5).
The solution of (5) clearly depends on M d , which is derived from PDE (4). Since in general, the nonlinear PDE (4) is very hard to be solved analytically, especially in the cases that the first term of (4) is non-zero, deriving multiple M d is a prohibitive task. This means that the designers are very reluctant to solve (5), given M d . Furthermore, derivation of non-homogeneous solution of (5) is more challenging than that of the homogeneous part. As an example, examine the case reported in [8] for the systems with G = P [I m , 0 m×n ] T where P denotes permutation matrix. In this case, the term (6) is a constant vector resulting in straightforward PDE (6) to be solved 1 . However, for the same case derivation of the non-homogeneous solution is still very difficult (see section IV-C for more details).
To tackle this problem, in the following theorem, a condition is proposed, through which it is enough to solve the PDE (6) instead of (5), and therefore, derivation of the homogeneous solution would be sufficient.
Theorem 1: Consider IDA-PBC methodology introduced in section II with V d = V dh as the solution of (6). Then q d is stable if the following condition is satisfied in which, while G ⊥ i denotes the ith row of G ⊥ .
Notice that verification of condition (8) is quite simple since only positive definiteness of a constant matrix should be checked.
Proof : Substitute the control law (3) with V d = V dh as the solution of (6) in (1). Then, the closed-loop equations are given by: with (10) is resulted from dissatisfaction of (5) and is interpreted as the natural gravity torques/forces of the system in the direction of unactuated coordinates. Now, consider the following function It is easy to verify that its derivative along the trajectories of the system isV Thus, if it is shown that V is a suitable Lyapunov function, the proof is completed. For this purpose, we should show the following terms 1 Note that based on the structure of M −1 d given in [8], the kth row of adjugate of M −1 d is constant, but its determinant is configuration-dependent. However, the determinant is omitted in (6).
Note that η may be represented by: Hence, the only p-dependent term in V is 1 2 p T M −1 d p that clearly satisfies (12). Therefore, we verify conditions (12) with respect to q for the other terms of V . By this means, we have Recall that q d is an equilibrium point, and therefore, it is on the manifold G ⊥ ∇V = 0. Hence, the second condition of (12) will be reformulated as (8) and this completes the proof. Notice that the closed-loop equations (10) may be interpreted as a simple IDA-PBC in the presence of unmatched disturbance. Thus, it may be seen as the rejection of particular form of external disturbance.
Remark 1: In the proof of Theorem 1, based on the IDA-PBC methodology, it is shown that the closed-loop system is represented by (10). Here, it is explained from another point of view. Suppose that (10) is the target dynamic of the closedloop system. By multiplying (1) and (10) from left side to the full rank matrix [G, G ⊥ T ] T , the control law and kinetic energy PDE are derived as (3) and (4), respectively, while V d is the solution of the PDE (6).
From (7), it is deduced that the condition (8) depends on M d and V dh , and may impose a constraint on k i s. Generally, the first term of (8) is positive semi-definite; thus, M d should be designed such that the second term is not negative definite. In the following, some cases are analyzed.
Case 1: Presume that q d is natural equilibrium point of the system and M d = M . In this case, the condition (8) is trivially satisfied since it is the summation of two positive (semi) definite matrices. The advantage of Theorem 1 in this case is the simple design of V d for the systems with ∇V | q=q d = 0. This might be very useful in applications such as underactuated cable-driven robots [12].
Case 2: If V dh is designed as the general form of (7), the first term of (8) is given by: . . .
Therefore, generally we can argue that the inequality (8) can be reformulated into an LMI. Solving a LMI problem has been studied thoroughly in several references such as [13], and many tractable software are developed to accomplish this task.
Case 3: Consider systems with G = P [I m , 0 m×n ] T . The condition (8) is in the following form In particular, assume that n = 2 and m = 1 which corresponds to most of the benchmark systems given in the literature. In this case, we have an inequality in the form of: in which the first and second matrix represent ∇ 2 V dh q=q d and ∂ 2 η ∂q 2 q=q d , respectively. The first matrix is assumed to be positive semi-definite with the following properties As explained before, the second matrix must not be negative definite (if so, M d should be altered). Therefore, we have the following scenarios One can easily verify that (13) is satisfied with which must be positive. In the next section, some examples are given as representative of benchmark systems to show the applicability of the proposed method in practice. Readers are referred to [arxiv version of this note] to see more examples.

A. Spatial Underactuated Cable-Driven Robot
This system consists of a suspended mass from two cables that their length is controlled by the actuators. The dynamic parameters of the system, as well as the solution of the potential energy PDE (5) with M d = M are given as follows [12] in which m denotes the mass of the end-effector while y is always negative. It is clear that by defining it is not possible to satisfy q d = arg minV d (q). However, by omitting mgy and designing V d = V dh , the condition (8) is reduced to which shows that the condition (8) of Theorem 1 is satisfied with k 1 , k 2 > 0. This choice clearly simplifies the controller design.

B. Acrobot
The system is a 2R serial robot whose second link is merely actuated. Dynamic parameters of the system are given as [14] and G = [0, 1] T . An IDA-PBC controller has been designed in [4] with the following parameters for the controller Furthermore, b 0 is a free constant and b i s for i ∈ {1, ..., 4} are constant values defined in [4], [14]. To apply Theorem 1, consider the desired potential energy as follows Condition (8) is in the form of (13) with the following parameters Since a 3 > a 2 , the case A1 in (14) is applicable and the suitable value of k is given in (15). Note that since a i s are all positive free scalars, assurance of ρ > 0 is quite simple.

C. Pendubot
As explained before, Theorem 1 is appropriate to integrate with the proposed method in [8] in which a systematic approach to solve or simplify (4) has been introduced. The reason is the particular structure of M d such that the vector γ defined as is independent of the configuration-dependent element of M d . By this means, M d and V dh may be derived easily. However, derivation of V dn is very complicated in general. As an example, consider Pendubot whose dynamic parameters are given as (16) with G = [1, 0] T . By applying the procedure of [8], M −1 d is derived as follows in which λ is a free parameter, and the constants a 1 and b should be chosen such that a 1 c 1 + a 1 c 2 + b 1 c 2 = 0. The solution of PDE (6) which is independent of a(q 2 ) is However, derivation of the non-homogeneous solution of (5) is a prohibitive task. To tackle this problem, we may investigate whether Theorem 1 could be applied in this case. For this purpose, by virtue of (7), condition (8) is in the following form It seems that condition (8) coincides with A1 in (14) that the suitable value of k is derived from (15). Note that λ, a 1 and b should be chosen such that ρ > 0.

D. Cart-pole
The system consists of a suspended mass from a cart. Dynamic equations are as follows [3] In literature, the designed IDA-PBC are based on a partial feedback linearization to transform the system into so called Spong's normal form. Here, our goal is to stabilize the system without partial feedback linearization. For this purpose, we apply the method introduced in [8]. By this means, M −1 d is in the following form Condition (8) is in the form of (13) with the following parameters , α 3 = 1, It is matched with A1 in (13) and the suitable value of k is derived from (15) where positiveness of ρ may be deduced from suitable values of a 1 , b 1 and λ.

V. CONCLUSION AND FUTURE WORKS
In this paper, we concentrated on the reformulation of potential energy PDE of IDA-PBC approach. It was shown that under the satisfaction of a condition, it is enough to merely derive the homogeneous solution of this PDE. The condition was analyzed for three cases including 2-DOF underactuated robots. Furthermore, it was deduced that the proposed condition may be reformulated into LMI problem. The proposed method was verified on an underactuated cabledriven robot, Acrobot, and Pendubot. Generalization of the method to simplify the kinetic energy PDE is our future aim.