Total energy-shaping control for mechanical systems via Control-by-Interconnection
Abstract
Application of IDA-PBC to mechanical systems has received much attention in recent decades, but its application is still limited by the solvability of the so-called matching conditions. In this work, it is shown that total energy-shaping control of under-actuated mechanical systems has a control-by-interconnection interpretation. Using this interpretation, alternate matching conditions are formulated that defines constraints on the added energy, rather then the total closed-loop energy. It is additionally shown that, for systems that are under-actuated degree one with the mass matrix depending on a single coordinate, the kinetic energy matching conditions resolve to ODEs which can be evaluated numerically. Using this approach controllers are proposed for the benchmark cart-pole and acrobot systems.
I INTRODUCTION
Energy-based methods for controlling nonlinear physical systems have been shown to be effective in a variety of physical domains [1]. Such methods consider the energy and structure of the system to be controlled to derive control strategies that exploit the natural system behaviours. Interconnection and Damping Assignment, Passivity-Based Control (IDA-PBC) is one such control methodology where the control input is designed such that the closed-loop can be interpreted as an alternate physical system with a different energy, interconnection and damping structure [2].
While IDA-PBC has been applied to a broad range of systems, particular attention has been given to mechanical systems which exhibit a rich canonical structure [3, 4, 5]. In the case of fully-actuated systems, IDA-PBC allows a user to arbitrarily modify the potential and kinetic energy of the closed-loop system [6], a process known as total energy shaping [3]. For under-actuated systems, however, application of IDA-PBC is limited by solutions that satisfy a set of PDEs, the so-called matching conditions. Much research effort has been committed to solving these equations, with solutions posed in several special cases [4, 5, 6]. This design methodology has been applied to a number of benchmark examples such as the cart-pole, acrobot, spider crane, amongst others.
Control-by-Interconnection (CbI) describes a sub-class of energy-based control methods that falls under the umbrella of IDA-PBC [7, 8]. Under this scheme, the controller is assumed to be a passive system that is interconnected with a passive plant to be controlled via the passive input-output pair. Casimirs, conserved quantities between the control sub-system and the plant, can be constructed to help shape the energy of the closed-loop system. It is known that potential energy shaping of fully-actuated mechanical systems falls into the class of CbI [7, 9]. Control of underactuated mechanical systems has been explored in the context of CbI by applying nonlinear PID controllers to both the standard and alternate passive outputs [10, 11, 12]. The idea of using PID for stabilisation of passive systems was formalised in [13] and a general characterisation of all passive outputs from a given system was characterised.
In this work, the connection between IDA-PBC and CbI for under-actuated mechanical systems is explored. Using the bond graph formalism (see [14] for introduction), a control sub-system is proposed that allows for shaping of the kinetic and potential energies of the closed-loop system. By representing the controller as a passive interconnection, the requisite matching conditions are reformulated in terms of the added mass and added potential energy. Equivalence between the CbI and IDA-PBC is then established in the case of mechanical systems by identifying Casimirs relating the controller states to those of the plant. Finally, using the reformulated matching conditions, it is shown that in the case that the mass matrix depends on only one coordinate that the kinetic energy matching conditions can be formulated as an ODE that can be evaluated numerically for implementation.
Notation. Function arguments are declared upon definition and are omitted for subsequent use. denotes a zeros matrix whereas denotes a identity matrix. For mappings , we denote the transposed gradient as . For , denotes the minimum and maximum (real) eigenvalues of P, respectively.
II BACKGROUND AND PROBLEM FORMULATION
In this section a number of key concepts necessary for the subsequent developments are briefly revised.
II-A Control-by-interconnection
In this work we consider input-state-output port-Hamiltonian systems (ISO-PHS) of the form
(1) |
where is the state of the plant, is the combined interconnection and damping matrix satisfying , is the Hamiltonian, is the input, is the input mapping matrix and is the natural passive output corresponding to the input .
CbI assumes that the controller is a passive system that is interconnected with the plant (1) via a passive interconnection. In this work, we consider a controller subsystem with two input-output ports, described by the ISO-PHS
(2) |
where is the state of the controller, is the controller Hamiltonian, and are passive input-output pairs and satisfies [15].
The controller system (2) can be interconnected with the plant (1) via the passive interconnection
(3) |
resulting in the closed-loop dynamics
(4) |
where is a passive input-output pair to the interconnected system. Noting that , the closed-loop interconnection and damping structure satisfies also.
In the case of stabilisation, the objective is to construct the plant functions , to ensure the existence of Casimirs which statically relate the controller states to functions of the plant states
(5) |
for . The Casimir functions and controller initial conditions are then designed to assign a desirable minimum to the total energy function
(6) |
It is noted that the Lyapunov candidate can be generalised to a function of and the Casimirs [15]. Methods to ensure the existence of and constructing Casimirs have been reported in [7] and the references therein.
II-B Underactuated mechanical systems
The primary objective of this work is to apply CbI to the class of underactuated mechanical systems, described by the dynamics
(7) |
where are the configuration and momentum vectors, respectively, in the input, is the inertia matrix and is the natural passive output corresponding the the input . The input mapping matrix is assumed to be constant and have the structure
(8) |
where is the degree of underactuation of the system111The assumed structure of requires that the first configuration coordinates are chosen to be collocated with the actuators. This class of dynamics falls into the broader class of ISO-PHS (1). For a more general input mapping matrix , there exists a change of coordinates recovering the structure (8) if the columns of are involute.. The Hamiltonian is the sum of the kinetic energy and the potential energy , which allows the gradient of with respect to to be written as
(9) |
A full-rank left-annihilator for the input mapping matrix (8) is defined as
(10) |
which satisfies .
In the subsequent development, we will require an alternate representation of the gradient of the kinetic energy with respect to configuration . Noting that the kinetic energy is quadratic in , the gradient can always be factored into the form
(11) |
for some matrix . This has been previously noted in [16] using the Christoffel symbols. Note, however, that the matrix is non-unique and in this work we will use the representation given by
(12) |
In constructing a CbI interpretation to total energy shaping it is useful to define a virtual input-output pair for the system (7) by defining the input
(13) |
which allows the system to written similarly to a fully-actuated system as
(14) |
where . From the definition (13), it is clear that any input must satisfy
(15) |
which will be ensured in subsequent control design. Assuming that (15) holds, the input can be described as a function of by
(16) |
The advantage of constructing the virtual input-output pair is that the virtual output now describes the full velocity vector
(17) |
a property that will be exploited when shaping the potential energy.
II-C IDA-PBC for underactuated mechanical systems
IDA-PBC is a control design methodology whereby the control signal is designed such that the closed-loop dynamics have a port-Hamiltonian (pH) structure. When applied to underactuated mechanical systems, the target closed-loop dynamics have the structure
(18) |
where are the desired closed-loop inertia matrix and potential energies, respectively, is skew-symmetric and is a tuning parameter used for damping injection. If is minimised at the target configuration, qualifies as a Lyapunov function for the closed-loop system [4].
The complexity of applying IDA-PBC to underactuated system is satisfying the so-called matching conditions. This conditions requires that the dynamics of the open-loop and closed-loop systems must agree on the spaces perpendicular to the control signal. The structure chosen fo the closed-loop system in (18) ensures that the dynamics of agree with (7). Comparing the dynamics of results in the condition
(19) |
which defines a PDE that should be solved for . Noting the structure of the Hamiltonians, this PDE can be separated into the components involving , and those that do not by
(20) |
These expressions are known as the kinetic energy and potential energy matching equations, respectively.
II-D Contributions
The objective of this work is to construct a CbI interpretation of IDA-PBC when applied to underactuated mechanical systems. The contributions of this work are threefold:
-
C.1
ISO-PHS with Casimirs that statically relate states are considered and a closed-form solution to remove the Casimirs by reducing the dimension of the state vector is proposed. This solution can be applied to the closed-loop dynamics of CbI implementations of the form (4) to describe the resulting dynamics as a function of only.
-
C.2
A CbI controller for underactuated mechanical system of the form (2) is proposed and the resulting closed-loop is shown to be equivalent to the well-known dynamics (18). The CbI interpretation generates alternate matching conditions to the expressions (20), describing constraints on the added mass and added potential energy.
-
C.3
Using the alternate matching conditions, it is shown that the kinetic energy matching equations reduce to ODEs in the special case of underactuation degree one where the mass matrix is a function of only one configuration coordinate. It is demonstrated that numerical methods can be utilised in such cases to avoid solving these expressions analytically.
II-E Related works
Significant attention has been given to solving the matching equations (20) in recent decades. In [3], [17] it was shown that is the system is under-actuated degree one and the mass matrix depends on a single un-actuated coordinate, the kinetic energy matching condition can be simplified to an ODE. Using a novel parametrisation of , a general solution for under-actuated degree one system was proposed in [4] under the assumption that the mass matrix depends only on the actuated coordinates. This approach was extended in [18] using a momentum transformation to simplify the matching equations. More recently, solutions to the potential energy matching equations were considered in [19] under the assumption that the mass matrix and potential energy functions were dependent on only one variable. Finally, a general solution to the special case of 2 degree-of-freedom system was proposed in [6]. The studies [20], [21] considered the effects of friction on the closed-loop stability using IDA-PBC.
In recent works, alternate approaches to constructing solutions to the matching equations have been explored. The existence of conservative forces that cannot be factorised into a skew-symmetric matrix was investigated in [22], which resulted in alternate matching equations. Implicit system representations were used in [23] to construct solutions in an over-parameterised space where the closed-loop dynamics were subject to constraints. By working in the larger dimension, a solution to a under-actuated degree 2 crane system was proposed. Pfaffian differential equations were utilised in [24] which resulted in the kinetic energy PDEs being converted to an alternate form which admits simpler solutions.
Some authors have investigated the possibility of avoiding the matching equations altogether by considering the control signal to be a CbI. The work [10] relied on a Lagrangian structure and several technical assumptions to verify the existence of a second passive output corresponding to the input . Using this second output, a stabilising control was designed that ensured stability without requiring a solution to the matching PDEs. A similar approach was proposed in [12, 11] where a second passive output was utilised and the control assumed to have a PID structure.
III CASIMIR REDUCTION
In this section, a method for reducing the state dimension of ISO-PHS with Casimirs is derived. The reduction method applies to general ISO-PHS with Casimirs and can be directly applied to the resulting closed-loop dynamics of CbI schemes of the form (4) to describe the system as a function of only. In the sequel, the reduction method will be used to show equivalence between the CbI controller for underactuated mechanical systems and the IDA-PBC dynamics (18). Before introducing the state reduction solution, a useful lemma is required.
Lemma 1
Consider a square block matrix of arbitrary dimension
(21) |
and assume that is invertible. If the symmetric component of is negative semi-definite, , the symmetric component of the Schur complement
(22) |
is negative semi-definite also.
Proof:
First note that the Schur complement of can be computed by
(23) |
The symmetric component of this expression is negative semi-definite as . ∎
The solution for reducing the dimension of ISO-PHS which exhibit Casimirs is now introduced. This development applies to systems of the form
(24) |
where is the state of the system which has been partitioned into , is the Hamiltonian, is the full-rank interconnection and damping matrix satisfying , is the input and is the corresponding passive output. It is assumed that the system contains a Casimir and the states have been partitioned such that the Casimir can be written as
(25) |
where is differentiable.
The first step in constructing a minimal system representation is defining a new set of coordinates given by
(26) |
which is identically equal to zero by construction. The system (24) can be described in the coordinates by
(27) |
where
(28) |
Recalling that is identically equal to zero, is also equal to zero. Consequently, the final row of (27) is a constraint that needs to be resolved to construct a minimal system representation. There are two methods of reduction that will be considered. Firstly, in the transformed coordinates (27) it can occur that one or more columns of is identically zero. Without loss of generality, it is assumed that the first columns of are equal to zero. To remove the zero rows, the full-rank matrix is defined as
(29) |
which acts to select the non-zero columns of . The zero columns and corresponding rows are removed from (27) by
(30) |
which does not modify the system dynamics. Note that as , also. Using this representation, a method for resolving the remaining constraint equations is presented under the assumption that is full rank.
Proposition 1
Proof:
The expression , defined in (30), is identically equal to by construction. Note, however, that the gradient is not necessarily equal to zero. Assuming that is full rank, the expression can be described as
(33) |
Substituting this expression into the dynamics (30) resolves to the reduced dynamics (31).
To verify that , note that is the Schur complement of which satisfies . It follows that by application of Lemma 1. ∎
Proposition 1 showed that an ISO-PHS that exhibits a Casimir function can be described in a reduced state-space. The class of dynamics that are derived from application of CbI (4) that result in a Casimir of the form (5) falls into the class of systems (24). The following Corollary tailors the Casimir reduction for this important sub-class of dynamics.
Corollary 1
IV CONTROL-BY-INTERCONNECTION FOR MECHANICAL SYSTEMS
In this section, a control-by-interconnection scheme for under-actuated mechanical systems is presented. A dynamic 2-port control system is introduced with the intention that it will be interconnected to the plant (14) via one of the ports. The controller states are constructed to be statically related to the plant states after interconnection, resulting in Casimirs. By applying Proposition 1, the closed-loop dynamic are defined in a reduced space in which the dynamics coincide with standard total energy-shaping control (18).
The proposed CbI scheme is shown in Figure 1. The intention of this control subsystem is to interconnect with the plant (14) via the power port.

The second input is available for subsequent control design, such as damping injection. The terms are the plant mass matrix (7) and factorisation of the kinetic energy gradient (12) evaluated at the controller states whereas is a skew-symmetric matrix to be chosen. The three-port storage element has states and energy function similar to mechanical systems,
(35) |
where is the inverse added mass, is the added kinetic energy, is the desired closed-loop potential energy, is the plant potential energy function (7) evaluated at the plant state and is the total added potential energy. It is important to note that, although is represented as a matrix inverse, it need not be invertible nor positive. Indeed, it will be shown in subsequent developments that the key requirement is that
(36) |
should be positive definite.
In subsequent analysis it will be shown that the interconnection of the control system with the plant (14) via the interconnection
(37) |
yields Casimirs
(38) |
Assuming the Casimirs exist, some intuition regarding the construction of the control system in Figure 1 can be provided. Both were constructed to be equal to . Firstly is equal to by interconnection with the plant virtual output via a 1-junction. To verify a similar relation for , assume that holds which results in and . With this in mind, the transformer can be seen to reconstruct the velocity for the bottom 1-junction, resulting in .
To construct a Casimir , first note from (7) and (12) that the plant momentum dynamics can be expressed as
(39) |
The control structure acts to remove these forces from the plant via the right side of the control structure and re-introduce them via the top 0-junction where they are shared with the dynamics of . The bond acts to cancel the gravity term from the plant . Recalling that the bottom 1-junction has flow equal to , the right-side gyrator cancels the term from the plant. The left-side gyrator then re-introduces the force via the top 0-junction where it is shared between and , establishing the desired Casimir.
The claimed Casimir (38) is now formalised in the following Proposition. For this development, note that the gradients of the added energy satisfy
(40) |
and the expressions in Figure 1 can be evaluated as
(41) |
with defined in (36). To ensure that the Casimir exists, a number of requirements are imposed on the selection of the added inverse mass and closed-loop potential energy which are equivalent of the standard matching conditions used in IDA-PBC (20).
Proposition 2
Proof:
Consider that at some time instant (38) holds, implying that
(43) |
It is shown that if (42) is satisfied, then the derivatives of the states also agree
(44) |
establishing the existence of a Casimir for all future time.
We proceed by first establishing the relationship for the configuration vector. From (37) and (14) which establishes . The input is substituted into (41) to find
(45) |
confirming that .
Next we consider the behaviour of the momentum states. First note that, from the bond graph in Figure 1 and the definition (16), the plant input is given by
(46) |
Using the control definition (46) and the condition (42), the plant dynamics (7) can be expanded as
(47) |
Note that at time , . Additionally recall the assumption (42) which allows the simplification
(48) |
Recalling the identity (45), the dynamics of at time can be expanded to
(49) |
which agrees with (48). As (48) and (49) agree at time , (44) is verified for the momentum states. If at the initial time we have , , it follows that and for all time via integration, completing the proof. ∎
Proposition 2 has established that the Casimir (38) holds under some technical assumptions that will be verified in subsequent design. Before proceeding, we note that the control subsystem in Figure 1 can be written in the form (2) with
(50) |
In the subsequent developments it is assumed that the requisite (42) of Proposition 2 holds, implying , . Condition (42) will be verified by choice of and . Assuming the Casimir holds, the expressions for in (41) can be simplified to
(51) |
Recalling the definition of in (40), it is noted that contains some terms which are quadratic in and some that are functions of only. The function is divided into
(52) |
where represents kinetic energy, represents potential energy and is defined as
(53) |
As is linear in it can be written as
(54) |
where
(55) |
The key constraint for control design is choosing satisfying the matching condition (42). From the definition of in (51), the constraint equation is a function of both and , making direct design of this matrix difficult. To simplify the design process, an alternate characterisation of (42) is introduced.
In the following proposition, the inverse mass matrix, inverse added mass matrix, interconnection matrix and are partitioned as
(56) |
Using the above definitions, an alternate characterisation of (42) is presented.
Proposition 3
The matching condition (42) is satisfied if:
-
•
The added mass matrix is chosen such that
(57) for all where
(58) -
•
The desired potential energy satisfies
(59) where
(60) is the Schur complement of and
(61)
Proof:
From the graph in Figure 1 and the interconnection (37), the virtual input is given by
(62) |
Recalling the definition of , (62) is equivalent to (42). Collecting the terms and left multiplying by results in
(63) |
Due to the structure of in (8), (63) has the left annihilator , defined in (58).
Left multiplying (63) by and separating the components into those relating to the kinetic and potential energies result in
(64) | ||||
(65) |
Using (52), (65) is expanded to
(66) |
which can be seen to agree with (59) after expanding.
Now considering the constraint on the kinetic energy expression (64), the definition (52) is substituted to find
(67) |
Using the relevant definitions, the first component of (67) can be solved for as
(68) |
Substituting this expression back into the second component of (67) reveals the constraint
(69) |
The term is taken as below to solve the skew-symmetric part of this expression,
(70) |
where is a free skew-symmetric term. The symmetric part of (69) must also be equal to zero, implying that
(71) |
Finally, noting that this must be true for each , the condition (57) follows. ∎
Remark 1
The expression (57) implicitly defines a set of PDEs that must be satisfied by any choice of . From the definition of in (55), the first equations are describe partial differential equations involving the partial derivatives of . The remaining equations describe partial differential equations involving the partial derivatives of . This structure can be useful for resolving the equations into a standard representation for solving.
Corollary 2
Proof:
Assuming that the mass matrix is function only of a single configuration variable , we will also impose that the added mass is a function only of the same variable. As a consequence, the matching expression (57) is now only a function in the single variable . Notably, all partial derivatives of with respect to , where , are equal to zero.
Noting Remark 1, the first expressions of (57) produce differential equations involving the partial derivatives of . The dimension of is , so the first equations can be solved simultaneously to find an expression for . The expressions of (57) can then be resolved for an expression for , which has dimension 1. Combining these expressions, the matching equations (57) can be resolved into an ODE of the form (72). ∎
Remark 2
Corollary 2 describes situations in which the kinetic energy matching equations can be reduced to an ODE. The solution, however, will depend on the choice of and may not be globally defined. This poses the question of how should the function be chosen to ensure an appropriate solution —a nonlinear control problem!
The results of Corollary 1 describe the degrees of freedom that exist when constructing a solution to the added inverse mass matrix. Similar degrees of freedom exist in the definition of the closed-loop potential energy that can be exploited to ensure positivity of the chosen function. The following Corollary defines a free function that can be utilised to this effect.
Corollary 3
Suppose that there exists a full rank matrix-valued function such that the integral
(73) |
exists. The desired closed-loop potential energy can be chosen as
(74) |
where must be chosen to satisfy the potential energy matching conditions (59) and is a free function that does not impact the matching equations. Consequently, the matching equation (59) can be equivalently written as
(75) |
Proof:
Remark 3
is a free function precisely because is an integral of the passive output . The potential energy could be alternatively constructed as a capacitor element added to the input in Figure 1.
Now we arrive at one of the key results of this work, the equivalence of the proposed CbI scheme and total energy-shaping control of underactuated mechanical systems. Assuming that the CbI scheme has been constructed to satisfy the required matching conditions to ensure the existence of a Casimir of the form , Proposition 1 is applied to reconstruct the reduced closed-loop structure (18).
Proposition 4
Consider the underactuated mechanical system with virtual input (14) and assume that are chosen such that the conditions of Proposition 3 are satisfied in some neighbourhood of a point . If the control signal is chosen as
(78) |
where
(79) |
the following hold:
-
•
The closed-loop dynamics have the form
(80) where
(81) -
•
If satisfy
(82) in some neighbourhood of , is a stable equilibrium of the closed-loop system for .
-
•
If the input signal is used for damping injection
(83) for some positive and the equilibrium , is locally detectable from the output , the point is asymptotically stable.
Proof:
Interconnection of the mechanical system with the control subsystem results in a closed-loop of the form (4), where , and are defined in (50) and
(84) |
From (38), we have that
(85) |
To verify the claim, Corollary 1 is applied which requires a suitable definition of . Expanding the definitions of from (34) reveals
(86) |
resulting in the choice
(87) |
Expanding the expression results in
(88) |
which is invertible, ensuring that Corollary 1 can be applied. Expanding the definitions of in (32) results in the reduced dynamics
(89) |
which agrees with (80) when substituting in the definition for in (50). Stability and asymptotic stability of the point follows from Proposition 1 of [17]. ∎
V Example applications
In this section the matching conditions derived in Proposition 3 are used to construct stabilising control laws for the cart-pole and acrobot systems. In both cases, the mass matrix depends on only one configuration variable, so the kinetic energy matching conditions can be reduced to ODEs as detailed in Corollary 2. This enables the solutions to be constructed numerically, removing the need to analytically solve the equations.
Both examples were prepared in Matlab 2022a and the source code is available via https://github.com/JoelFerguson/Underactuated_Mechanical_CbI.
V-A Cart-pole example
The cart-pole system, shown in Figure 2, attempts to balance the pole of length and mass in the upright position by applying a force to the cart with mass . The state describes the horizontal displacement of the cart whereas describes the angle of the pole from vertical in the clockwise direction.

The cart-pole system can be written as a pH system of the form (7) with
(90) |
In the subsequent control design, the parameters have been used.
The mass matrix of the cart-pole system depends only on , the unactuated coordinate. The added inverse mass is assumed to also be a function of also, allowing it to be written as
(91) |
As noted in Corollary 2, the kinetic energy matching equations (57) can be reduced to an ODE as both are a function of only one variable. The associate ODE is of the form (72) for where is a free function to be chosen. The ODE can be evaluated using numerical solvers.
Before solving the ODE associated with the kinetic energy matching equations, consideration should be given to how the resulting mass matrix impacts the closed-loop potential energy . Recalling (74), the closed-loop potential energy is composed of a free term and a term which must satisfy (75), where are defined in (60), (61). As the potential are all functions of only , is also assumed to be a function of only, reducing (75) to the ODE
(92) |
which can be evaluated numerically once a solution for , and hence , are found. noting that the vector field is divergent from the point , the closed-loop vector field should reverse the direction locally. This is ensured if the ratio is positive in some neighbourhood of the origin. Recalling that is the Schur complement of , which is necessarily positive, it is required that be positive in some neighbourhood of . The values
(93) |
where chosen which result in , and .
The added inverse mass matrix can now be found by numerically evaluating the ODE (72). The term is a free function that was chosen to be constant for this example. The resulting functions for were found to exist on the interval and are shown in Figure (3). From Proposition 4, should be positive to ensure stability, so the minimum eigenvalue of this expression is shown in the same figure.

The closed-loop potential energy can now be obtained by numerically by evaluating the ODE (92). The terms are evaluated using the solutions to shown in Figure (3). The resulting function is shown in Figure (4). As expected, the function is positive in some neighbourhood of due to the choice of the added mass at in (93).

The proposed functions of , can be used to construct a controller to stabilise the pendulum in the upright position. To ensure stability of also, the free term , defined in (74), is constructed. The function defined by the integral (73), where is a free function chosen to ensure solvability. Noting that are functions of only, the parametrisation
(94) |
is introduced. The free function is chosen as , resulting in
(95) |
which can be solved numerically from the initial condition . The function was taken as with for simulation. A contour plot of the resulting closed-loop potential energy is shown in Figure (5). Note that a minimum has been assigned to .

As a final control design stage, damping is injected via the new passive input/output pair with
(96) |
The complete control signal is defined by the expression (46).
The cart-pole system was simulated for 5 seconds from initial conditions , . The resulting state evolution and closed-loop energy is shown in Figure 6. As expected, the proposed controller stabilises the origin and the closed-loop energy decreases monotonically.

V-B Acrobot example
The acrobot system, shown in Figure 7, consists of 2 links with an actuator supplying a input torque fixed between the base and second links. The base link has displacement of , measured from vertical, length , mass , moment of inertia and centre of mass from the base pivot point. The actuated link has displacement of measured relative to the base link, length , mass , moment of inertia and centre of mass from the actuated pivot point. The control objective of this system is to stabilise the upright equilibrium position .

The acrobot system can be written as a pH system of the form (7) with
(97) |
where
(98) |
For the purposes of simulation, we take the values , which were previously used in [5], [25].
In this example, the total energy-shaping controller proposed in [5] is reconstructed as a CbI control scheme by solving the matching conditions of Proposition 3. In that work, the closed-loop mass matrix was chosen to be the constant matrix
(99) |
which will be recovered in subsequent computations.
The mass matrix of the acrobot system depends only on , the actuated coordinate. The added inverse mass matrix is assumed to be a function of only also, resulting in the structure
(100) |
As the system is underactuated degree 1 and the mass matrix is a function of only one variable, the kinetic energy matching equations can be reduced to an ODE as per Corollary 2. The resulting ODE has the form (72) with and where is a free function.
In order to recover the result (99), this free function is chosen as
(101) |
The initial conditions are similarly defined as
(102) |
The added inverse mass was evaluated numerically and the results are shown in Figure 8. As the previously reported solution (99) is globally defined, it is unsurprising that the inverse added mas is also globally defined. As expected, the minimum eigenvalue of is constant also.

Solving the potential energy PDE (75) is difficult due to the open-loop potential energy being a function of both and . This dependence implies that cannot be resolved directly using an ODE solver. Considering the structure of in (97), it is proposed that the closed-loop energy has the structure
(103) |
which has derivatives
(104) |
The open-loop potential energy has gradients
(105) |
Substituting the expressions (104) and (105) into (59) and matching coefficients results in the system of equations
(106) |
which can be evaluated numerically. The values of at the origin should be chosen to ensure that the origin is an equilibrium point and is positive in . Considering the expressions (105), (106), the origin is an equilibrium for . The energy function (103) is locally positive with respect to for negative. For the purpose of simulation, was used. The resulting function is shown in Figure 9.

Considering Figure 9, it is clear that is not positive definite with respect to the origin. Note, however, that has been stabilised. To ensure stability of also, the free term , defined in (74), is constructed. The function defined by the integral (73), where is a free function chosen to ensure solvability. Noting that are functions of only, the parametrisation
(107) |
is introduced. The free function is chosen as , resulting in
(108) |
which can be solved numerically from the initial condition . The function was taken as with for simulation. A contour plot of the resulting closed-loop potential energy on a log scale is shown in Figure 10. Note that a minimum has been assigned to . As a final control design stage, damping is injected via the new passive input/output pair with
(109) |
The complete control signal is defined by the expression (46).

The acrobot system was simulated for 20 seconds from initial conditions , . The resulting state evolution and closed-loop energy is shown in Figure 11. As expected, the proposed controller stabilises the origin and the closed-loop energy decreases monotonically.

VI CONCLUSIONS AND FUTURE WORKS
In this work total energy shaping has been shown to have a CbI interpretation which results in alternate matching equations related to the added inverse mass. These equations were utilised to construct controllers for the cart-pole and acrobot systems, both of which have the property that the mass matrix depends on only one variable, using numerical methods. While the proposed approach is effective, a number of technical aspects of this approach require further investigation. In particular:
-
•
As detailed in Corollary 2, The kinetic energy matching equations can be posed as ODEs in the special case that the mass matrix depends on only one configuration variable. This property allows the matching equations to be evaluated numerical using ODE solvers. Further investigation into solving the matching equations in the case that the mass matrix is a function of multiple configuration variables is required. In some cases it may be possible to decouple the dependence on each coordinate, recovering equivalent ODEs. Alternatively, the numerical evaluation of the matching PDEs should be investigated.
-
•
When evaluating the kinetic energy matching equations in (72), the term is a free function that can be used to control the resulting added inverse mass. As seen in the cart-pole example of Section V-A, poor choice of this function results in the solution only being defined on a small domain. Conversely, in the acrobot example of Section V-A this term was chosen to ensure a global solution to the matching equations. Choice of this function defines a nonlinear control problem that should be investigated to ensure desirable behaviour of the result.
-
•
In both examples of Section V the controllers were designed to stabilise the origin of the respective systems. While this was achieved and verified numerically, asymptotic stability was not established. Asymptotic stability requires that the passive output of the closed-loop system is zero-state detectable, a task that is non-trivial for underactuated systems. Further investigation into methods for injecting damping into the unactuated momentum channels of the closed-loop system is required. It is hoped that the CbI interpretation of the controller shown in Figure 1 may provide new insight into how this might be achieved.
References
- [1] R. Ortega and E. Garcia-Canseco, “Interconnection and damping assignment passivity-based control: A survey,” European Journal of control, vol. 10, no. 5, pp. 432–450, 2004.
- [2] R. Ortega, A. Van der Schaft, B. Maschke, and G. Escobar, “Interconnection and damping assignment passivity-based control of port-controlled Hamiltonian systems,” Automatica, vol. 38, no. 4, pp. 585–596, 2002.
- [3] F. Gómez-Estern, R. Ortega, F. R. Rubio, and J. Aracil, “Stabilization of a class of underactuated mechanical systems via total energy shaping,” Proceedings of the IEEE Conference on Decision and Control, vol. 2, no. December, pp. 1137–1143, 2001.
- [4] J. Acosta, R. Ortega, and A. Astolfi, “Interconnection and damping assignment passivity-based control of mechanical systems with underactuation degree one,” IEEE Transactions on Automatic Control, vol. 50, no. 12, pp. 1936–1955, 2005.
- [5] A. D. Mahindrakar, A. Astolf, R. Ortega, and G. Viola, “Further constructive results on interconnection and damping assignment control of mechanical systems: The Acrobot example,” International Journal of Robust and Nonlinear Control, vol. 18, no. July, pp. 557–569, 2010.
- [6] P. Arpenti, F. Ruggiero, and V. Lippiello, “A Constructive Methodology for the IDA-PBC of Underactuated 2-DoF Mechanical Systems with Explicit Solution of PDEs,” International Journal of Control, Automation and Systems, vol. 20, no. 1, pp. 283–297, 2022.
- [7] R. Ortega, A. van der Schaft, F. Castaños, and A. Astolfi, “Control by interconnection and standard passivity-based control of port-Hamiltonian systems,” IEEE Transactions on Automatic Control, vol. 53, no. 11, pp. 2527–2542, 2008.
- [8] R. Ortega and L. P. Borja, “New results on Control by Interconnection and Energy-Balancing Passivity-Based Control of port-hamiltonian systems,” Proceedings of the IEEE Conference on Decision and Control, vol. 2015-Febru, no. February, pp. 2346–2351, 2014.
- [9] V. Duindam, A. Macchelli, S. Stramigioli, and H. Bruyninckx, Modeling and Control of Complex Physical Systems: The Port-Hamiltonian Approach. Berlin Heidelberg: Springer-Verlag, 2009.
- [10] A. Donaire, R. Mehra, R. Ortega, S. Satpute, J. G. Romero, F. Kazi, and N. M. Singh, “Shaping the Energy of Mechanical Systems Without Solving Partial Differential Equations,” IEEE Transactions on Automatic Control, vol. 61, no. 4, pp. 1051–1056, 2016.
- [11] J. G. Romero, A. Donaire, and R. Ortega, “Global Stabilisation of Underactuated Mechanical Systems via PID Passivity-Based Control,” pp. 1–27, 2016.
- [12] J. G. Romero, A. Donaire, R. Ortega, and P. Borja, “Global Stabilisation of Underactuated Mechanical Systems via PID Passivity-Based Control,” IFAC-PapersOnLine, vol. 50, no. 1, pp. 9577–9582, 2017.
- [13] M. Zhang, P. Borja, R. Ortega, Z. Liu, and H. Su, “PID Passivity-Based Control of Port-Hamiltonian Systems,” IEEE Transactions on Automatic Control, vol. PP, no. 99, pp. 1–1, 2017.
- [14] P. J. Gawthrop and G. P. Bevan, “Bond-Graph Modeling: A tutorial introduction for control engineers,” IEEE Control Systems Magazine, vol. 27, no. 2, pp. 24–45, 2007.
- [15] A. van der Schaft, L2-Gain and Passivity Techniques in Nonlinear Control, 3rd ed. Springer, 2017.
- [16] R. Reyes-Báez, A. van der Schaft, and B. Jayawardhana, “Tracking Control of Fully-actuated port-Hamiltonian Mechanical Systems via Sliding Manifolds and Contraction Analysis,” in Proc. IFAC World Congress. Toulouse, France: Elsevier, 2017, pp. 8256–8261.
- [17] R. Ortega, M. W. Spong, F. Gómez-Estern, and G. Blankenstein, “Stabilization of a class of underactuated mechanical systems via interconnection and damping assignment,” IEEE Transactions on Automatic Control, vol. 47, no. 8, pp. 1218–1233, 2002.
- [18] G. Viola, R. Ortega, and R. Banavar, “Total energy shaping control of mechanical systems: simplifying the matching equations via coordinate changes,” IEEE Transactions on Automatic Control, vol. 52, no. 6, pp. 1093–1099, 2007.
- [19] M. Ryalat and D. S. Laila, “A simplified IDA-PBC design for underactuated mechanical systems with applications,” European Journal of Control, vol. 27, pp. 1–16, 2016.
- [20] F. Gómez-Estern and A. van der Schaft, “Physical damping in IDA-PBC controlled underactuated mechanical Systems,” European Journal of Control, vol. 10, no. 5, pp. 451–468, 2004.
- [21] J. Sandoval, R. Kelly, and V. Santibanez, “Interconnection and damping assignment passivity-based control of a class of underactuated mechanical systems with dynamic friction,” International Journal of Robust and Nonlinear Control, vol. 21, no. 7, pp. 738–751, 2010.
- [22] A. Donaire, R. Ortega, and J. G. Romero, “Simultaneous interconnection and damping assignment passivity-based control of mechanical systems using dissipative forces,” Systems & Control Letters, vol. 94, pp. 118–126, 2016.
- [23] O. B. Cieza and J. Reger, “IDA-PBC for underactuated mechanical systems in implicit port-hamiltonian representation,” 2019 18th European Control Conference, ECC 2019, pp. 614–619, 2019.
- [24] M. R. J. Harandi and H. D. Taghirad, “Solution of matching equations of IDA-PBC by Pfaffian differential equations,” International Journal of Control, pp. 1–11, 2021.
- [25] A. Donaire, J. G. Romero, R. Ortega, B. Siciliano, and M. Crespo, “Robust IDA-PBC for underactuated mechanical systems subject to matched disturbances,” International Journal of Robust and Nonlinear Control, vol. 27, no. 6, pp. 1000–1016, 2017.