Integral passivity‐based control of underactuated mechanical systems with actuator dynamics and constant disturbances

This work investigates the energy shaping control of a class of underactuated mechanical systems with first‐order actuator dynamics and subject to both matched and unmatched constant additive disturbances. To this end, a new nonlinear control law which includes two independent integral actions is presented. The controller design is outlined for systems with first‐order actuator dynamics, and also for systems with direct actuation. The effectiveness of the proposed approach is demonstrated with numerical simulations on an inertia wheel pendulum and on a ball‐on‐beam system, both actuated by electric DC motors and subject to constant disturbances.

systems with fluidic actuation. 12,13Further works have investigated the effect of actuator saturation. 14In other cases, the actuator dynamics has been neglected for simplicity, considering that many actuators have higher bandwidth compared to the corresponding mechanical subsystems. 15In general, accounting for the actuator dynamics results in a system that is not input affine and where the disturbances affecting the mechanical subsystem may not be directly canceled by the control input.A number of research works have investigated the effect of disturbances within IDA-PBC, resulting in more sophisticated controllers that achieve robustification through integral actions 16 or nonlinear observers. 17In particular, the Integral IDA-PBC methodology 16 results in an extended closed-loop dynamics characterized by a port-Hamiltonian structure that preserves the energy-based interpretation and the corresponding stability properties.The initial formulation of Integral IDA-PBC was limited to systems with constant inertia matrix, constant input matrix, subject to constant matched disturbance, and it employed a burdensome change of coordinates. 18Subsequent works have refined this approach by avoiding the change of coordinates, 19 and they have extended it to systems with nonconstant inertia matrix. 19Recent works have investigated the Integral IDA-PBC methodology for systems with physical damping 20 and with nonconstant disturbances, 21 and have presented controllers for the specific case of power converters. 22In general however, most work on Integral IDA-PBC has so far been limited to systems with matched disturbances.Notable exceptions include, 23 which presented a result for fully actuated systems where unmatched disturbances represent a perturbation affecting the velocity measurement, and References 24 and 8, where unmatched disturbances were accounted for in the stability analysis but not in the design of the integral action.In addition, to the best of the authors' knowledge, the Integral IDA-PBC methodology has only been formalized for systems with direct actuation.In summary, the extension of the Integral IDA-PBC methodology to underactuated mechanical systems with actuator dynamics subject to both matched and unmatched disturbances is an open problem.
This work investigates the energy shaping control of a class of underactuated mechanical systems which are not in affine form due to the presence of first-order actuator dynamics, and which are subject to both matched and unmatched constant additive disturbances.To this end, a new control law is constructed by employing the IDA-PBC methodology 5 with the concepts of integral action 16 and of extended Hamiltonian. 17,18In summary, this work presents the following new results.
• A controller design procedure that accounts for generic first-order actuator dynamics thus extending our prior work. 12An integral action that compensates the effect of constant matched disturbances for systems that are not in affine form.
• A second integral action that explicitly accounts for the effect of constant unmatched disturbances.
• A control law for underactuated mechanical systems with direct actuation subject to matched and unmatched disturbances.
• Simulation results for two motivating examples: an inertia wheel pendulum and a ball-on-beam system, both actuated by an electric DC motor and subject to matched and unmatched constant additive disturbances.
A brief overview of the Integral IDA-PBC methodology is provided in Section 2 for completeness.The controller design is then outlined in Section 3 for underactuated mechanical systems with actuator dynamics and for underactuated mechanical systems with direct actuation.The results of numerical simulations for both examples are presented in Section 4. Concluding remarks are contained in Section 5.

Overview of Integral IDA-PBC
The dynamics of an underactuated mechanical system with n degrees-of-freedom (DOFs) and with the control input u ∈ R m applied through the input matrix G (q) ∶ R n  → R n×m , where rank (G) = m < n for all q ∈ R n , subject to matched disturbances  0 ∈ R m and with physical damping D = D T ≥ 0, D ∈ R n×n , is described in port-Hamiltonian form as where v ∈ R m is the auxiliary control input corresponding to the integral action.The mechanical energy is characterized by the inertia matrix M(q) = M(q) T > 0, M(q) ∶ R n  → R n×n , and the potential energy Ω(q) ∶ R n  → R + .
The system states are the position q ∈ R n and the momenta p = M q ∈ R n .The remaining terms in (1) are the identity matrix I, the vector of partial derivatives of H in q, ∇ q H, and the vector of partial derivatives of H in p, ∇ p H. The control aim is to stabilize the equilibrium (q, p) = (q * , 0).This is achieved in the absence of disturbances and physical damping (i.e.,  = 0, D = 0) with v = 0 and the IDA-PBC control 5 where where To achieve the regulation goal, the potential energy Ω d should admit a strict minimizer in q * hence verifying the conditions ∇ q Ω d (q * ) = 0 and ∇ 2 q Ω d (q * ) > 0. In addition, M d and Ω d should verify for all (q, p) ∈ R 2n the partial differential equations (PDEs) where Computing the time derivative of H d along the trajectories of the closed-loop system (4) yields then Thus the equilibrium (q, p) = (q * , 0) is asymptotically stable provided that the output y = G T ∇ p H d is detectable. 5f the system is subject to constant matched disturbances  0 ≠ 0, if the input matrix G and the matrix M d are constant, and if M is independent of the unactuated coordinates, the auxiliary control v in its simplest form is designed as 16 where and  is the integral state.The storage function W d that characterizes the closed-loop system is defined as where Computing the time derivative of ( 9) along the trajectories of the closed-loop system yields 16 thus the equilibrium (q, p, ) = (q * , 0, ) is asymptotically stable provided that the output y = G T M −1 d z 2 is detectable.Further variations of the integral action (8) are detailed in Reference 16, which the interested reader is referred to.Subsequent versions of the Integral IDA-PBC formulations have omitted the coordinate transformation, 19 and have extended the results to systems with nonconstant matrix M d , 25 and to nonconstant disturbances. 21

System model
This work considers a class of underactuated mechanical systems with first-order actuator dynamics and subject to constant additive disturbances, which expressed in port-Hamiltonian form yields The total energy is where x 1 is the actuator's state and K 1 = K T 1 > 0 is a constant matrix.The input matrix is G 0 ∈ R m×m ,  23 represents the coupling between the actuator and the mechanical subsystem, the matched disturbances are  0 , and the unmatched disturbances are  1 .The following assumptions define the class of systems considered in this work.
Assumption 3.All model parameters are exactly known and all system states are measurable.The matched disturbances  0 ∈ R m and the unmatched disturbances  1 ∈ R n−m are unknown but constant and bounded (i.e., with unknown bound).The prescribed equilibrium q * is assignable, that is

MAIN RESULT
The controller design is initially outlined for underactuated mechanical systems with first-order actuator dynamics and subsequently for underactuated mechanical systems with direct actuation.

Systems with actuator dynamics
The control law is designed for system (10) to achieve the regulation goal q = q * following a similar procedure to Reference 12 but including two independent integral actions denoted by  0 and  1 .The closed-loop dynamics is thus The storage function W d is defined as where and the positive tuning parameters K I 1 , K I 2 , K 0 , Γ 0 , Γ 1 .In particular, H d can be interpreted as an extended Hamiltonian with the vector Λ representing the closed-loop nonconservative forces, 17 which is defined such that where q * is an assignable equilibrium of system (10) (see Assumption 3).Note that, since  1 is only contained in the first term in parenthesis of (13a), that is = 0 (i.e., thus verifying (13b)).Note also that (13c) and (13d) ensure that q = q * is a strict minimizer of H d . 26The remaining term  is defined as The terms S ij are defined so that the open-loop dynamics (10) matches the extended closed-loop dynamics (11), that is where where S 13 and S 23 are given in (15),  is given in (14), and the integral states  0 and  1 are defined by the update laws Proposition 1.The system (10) with Assumptions 1-3 in closed-loop with the control law ( 16) and the integral actions ( 17) yields (11) with the parameters ( 14) and (15), provided that the PDEs (13a) and (13b) are verified.
Proof.Computing the partial derivatives of W d from ( 12) yields Equating the corresponding rows of (10) and of ( 11) yields the matching equations Step 1. Substituting S 12 , S 13 , S 14 , and S 15 from ( 15) and the partial derivatives of W d from ( 18) into (19a) yields Refactoring the previous expression yields (13b) (i.e., premultiplied by M −1 M d , where M = M T > 0 and , which is verified by hypothesis. Step 2. Substituting S 12 , S 22 , S 23 , S 24 , and S 25 from (15) and the partial derivatives of W d from ( 18) into (19b) yields Substituting  and  in the former expression cancels the disturbances  0 and  1 , and refactoring terms yields ) Multiplying the former expression by G † yields the PDE (13b) (i.e., premultiplied by G † J 2 ) which is verified by hypothesis: the left side of the equal is the sum of  and (13b), while S 23 cancels all terms in .Multiplying it instead by G ⊥ yields the sum of the PDEs ( 5), ( 6), (13a), and (13b) (i.e., premultiplied by G ⊥ J 2 ), which are all verified by hypothesis.
Step 3. Substituting S 34 and S 35 from (15) and the partial derivatives of W d from ( 18) into (19c) yields Refactoring the former expression cancels the unknown terms  and , and substituting the control input ( 16) yields the PDE (13b) (i.e., premultiplied by S T 23 ), which is verified by hypothesis.
Step 4. Substituting S 14 , S 24 , S 34 , S 44 and S 45 from (15) and the partial derivatives of W d from ( 18) into (19d) yields Refactoring the former expression cancels the terms  and , yielding the sum of the update law (17a) and the PDE (13b) (i.e., premultiplied by G T J 2 ) which is verified by hypothesis.
Step 5. Substituting S 15 , S 25 , S 35 , S 45 , and S 55 from (15) and the partial derivatives of W d from ( 18) into (19e) yields Refactoring the former expression cancels the terms  and  yielding the sum of the update law (17b) and the PDE (13b) (i.e., premultiplied by ) which is verified by hypothesis.▪ Proposition 2. Consider system (10) with Assumptions 1-3 in closed-loop with the control law (16)  where the integral actions are computed as in (17).Then the equilibrium point (q, p, x 1 ,  0 ,  1 ) = ( q * , 0, x * 1 , , Proof.It follows from Assumption 3 that there exist a constant K 0 > 0 such that W d in ( 12) is positive definite in a nonempty open set containing q * .Recalling that J T 2 = −J 2 by design, it follows that G T J 2 G and G ⊥ J 2 G ⊥ T are also skew symmetric.Computing the time derivative of (12) along the trajectories of the closed-loop system (11) yields then which is verified for all k v > 0, k i > 0, and Γ 0 > 0, Γ 1 > 0 hence all states are bounded and the equilibrium is stable.In particular, ∇ x 1 W d = ∇ x 1  T  where it follows from ( 14) that ∇ x 1  = G †  23 K 1 ≠ 0 according to Assumption 2, while taking Γ 0 and Γ 1 as diagonal matrices results in Γ 0 G T G and Γ 1 G ⊥ G ⊥ T being symmetric.Recalling the expression of the partial derivatives of W d from ( 18) it follows that , Combining the former expressions and substituting the PDE (13b) yields thus y = G T M −1 d p ∈  2 ∩  ∞ .In addition, it follows form (11) that ṗ, ̇, ẋ 1 , ζ 0 , ζ 1 ∈  ∞ , while  and  are bounded according to Assumption 3. Therefore y, , ( 0 − G T p − ) and converge to zero asymptotically according to Barba ̌lat's lemma. 27Employing a similar argument to Reference 5, it follows that the equilibrium is asymptotically stable provided that the output y = G T M −1 d p is detectable (i.e., y → 0 ⇒ p → 0 ).In particular, computing ṗ from (11) at ṗ = p =  = 0 and at  0 =  and  1 =  yields where the last two terms vanish at q = q * , thus yielding (13c) which is verified by hypothesis (i.e., q = q * is an extremum of W d ).In addition, it follows from (13d) that q = q * is a strict minimizer of W d .Computing  = 0 from ( 14) at (q, p, x 1 ,  0 ,  1 ) = (q * , 0, ) is asymptotically stable, concluding the proof.▪ Corollary 1.If the system (10) has constant inertia matrix, the control law ( 16) and the integral actions (17)  yield the closed-loop (11) where J 2 = 0, that is Proof.If M is constant, the PDEs ( 5) and ( 6) are solvable with a constant M d and with J 2 = 0. 5 Substituting J 2 = 0 in ( 15), (16), and ( 17) completes the proof.▪ Remark 1.The first integral action  0 fully compensates the effect of the constant matched disturbances  0 even though the system (10) is not in affine form.Conversely, the presence of unmatched disturbances affects the system dynamics on the unactuated states, thus it cannot be fully compensated by the control action.In spite of this limitation, which is intrinsic to underactuated systems, it has been shown in References 26 and 17 that explicitly accounting for the unmatched disturbances in the control law can improve performance.
To this end, the integral action  1 computed with (17b) cancels the constant unmatched disturbances  1 (see Step 2 in Proposition 1).This is a key difference from prior works, 8,24 where unmatched disturbances were accounted for in the stability analysis (i.e., by employing the input-to-state stability theory) but not in the design of the integral action.Differently from References 17 and 26 which employed the Immersion and Invariance methodology 28 to estimate the disturbances (i.e., from the open-loop dynamics), the proposed controller ( 16) employs the integral actions  0 and  1 thus resulting in the extended closed-loop dynamics (11)  which is port-Hamiltonian.Consequently, the physical interpretation of the control action in terms of system energy is preserved.In addition, the stability conditions resulting from Proposition 2 (i.e., k v > 0, k i > 0, K I 1 > 0, K I 2 > 0, Γ 0 > 0, Γ 1 > 0) are less stringent than those in Reference 17 (i.e., (Gk v G T + DM −1 M d ) > I∕4, with  = Γ 0 = Γ 1 and D representing the physical damping).On the other hand, the integral action  1 introduces the additional PDEs (13a) and (13b), thus representing a complication compared to Reference 17.In summary, the solution of the PDEs (13a) and (13b) is system specific (see Section 4), similarly to the solution of the PDEs ( 5) and ( 6) that characterize the IDA-PBC methodology.The solvability of PDEs within IDA-PBC is a challenging task which has motivated a number of works including a method to simplify the PDEs for mechanical systems, 29 the study of kinetic energy shaping for mechanical systems, 30 the algebraic solutions of the PDEs in Reference 6, and the numerical solution of the PDEs with reinforcement learning in Reference 31.The study of this aspect will be part of future work.
Remark 2. Extending the controller design to systems with physical damping D ≠ 0 requires modifying the term S 22 such that S 22 = Gk v G T − J 2 + DM −1 M d (see Reference 32 for details), which in turn affects the remaining terms S ij with i, j ≥ 2. Extracting the terms dependent on  0 ,  1 and ,  from (19b) yields then Thus, defining preserves the expression of  and .The remaining terms in (15) preserve their structure, while J 2 is replaced by J 2 − DM −1 M d .For instance, S 23 yields Similarly,  is obtained from ( 14) by replacing J 2 with J 2 − DM −1 M d .Thus, the control law is still given by ( 16), and the time derivatives of the integral states are obtained by replacing J 2 with J 2 − DM −1 M d in (17).In such case however, the closed-loop system ( 11) is port-Hamiltonian if and only if is the symmetric part and is the antisymmetric part, that is which might be more stringent depending on D S .This point highlights the limits imposed by pervasive damping to the Integral IDA-PBC methodology (see Reference 20 for details).
Remark 3. Consider the hypothetical case in which (13a) does not admit a global analytical solution but is only verified locally at the equilibrium.In such case, the controller ( 16) with the integral actions ( 17) can still yield boundedness of the closed-loop system trajectories.To highlight this point, we assume that (13a) yields a residual G ⊥ Δ(q) that vanishes at the equilibrium (i.e, Δ(q * ) = 0), which is then accounted for in the Lyapunov derivative Ẇd , that is Introducing the Young's inequality

and refactoring terms yields then
It follows that Ẇd ≤ 0 for k i > 0, Γ 0 > 0 and for some k v , Γ 1 such that (Gk v G T − I∕4) > 0 and that Then the trajectories of the closed-loop system are bounded provided that Δ ∈  2 ∩  ∞ (see Lemma 5.3

in Reference 33). The inequality
> 0, where D S has been defined in Remark 2. In comparison, if the unmatched disturbances  1 are disregarded by setting Γ 1 = 0, the Lyapunov derivative Ẇd yields instead As a result, Ẇd ≤ 0 and the trajectories of the closed-loop system are bounded only if which implies a more stringent condition on k i since  1 ≠ 0. In conclusion, even in case the PDE (13a) only admits a local solution at the equilibrium, the controller ( 16) with the integral actions (17) can still yield improved performance in the presence of unmatched disturbances (see Section 4.2).

Systems with direct actuation
In case the system (1) is directly actuated, the closed-loop dynamics is defined in a similar way to (11), that is where the elements S ij of the above matrix are given by The storage function W d is defined as where Also in this case, Ω d should solve the PDE ( 6), M d should solve the PDE ( 5) with a corresponding J 2 , and Λ should verify the conditions (13).The control input is given by The integral states are defined by the update laws Proposition 3. The system (1) with Assumptions 1 and 3 in closed-loop with the control law (24) and the integral actions ( 25) yields (21) with the parameters (22), provided that the PDEs (13a) and (13b) are verified.
The proof is similar to that of Proposition 1 and is given in Appendix A.
Proposition 4. Consider the system (1) with Assumptions 1 and 3 in closed-loop with the control law (24)  where the integral actions are computed as in (25).Then the equilibrium point (q, p,  0 ,  1 ) = (q * , 0, , ) is asymptotically stable for all positive k v , K I 1 , K I 2 , Γ 0 , Γ 1 , provided that the output y = G T M −1 d p is detectable.The proof is similar to that of Proposition 2 and is given in Appendix A.

Inertia wheel pendulum
The inertia wheel pendulum system 29 is modified here by including a DC motor for the actuation (see Figure 1).The system consists of an unactuated planar inverted pendulum with an actuated wheel attached to its end.The system has two degrees-of-freedom: the angular position of the pendulum q 1 and the angular position of the wheel q 2 .The system F I G U R E 1 Schematic of the inertia wheel pendulum actuated by a DC motor, with key model parameters.
states are thus q and p = M q.The dynamics of the mechanical subsystem in port-Hamiltonian form is given by ( 1) with total energy H = Ω + 1 2 p T M −1 p where Ω = a 3 (cos(q 1 ) + 1), the input matrix is ] is the constant inertia matrix.The terms a 1 , a 2 , a 3 are constant parameters depending on the size of the pendulum and of the wheel.The control goal consists in reaching the prescribed position 1 , q 2 ) = (q * 1 , q * 2 ), where q * 1 = 0 if and only if  1 = 0.The IDA-PBC controller (3) for the system with direct actuation yields 24 , ).The closed-loop dynamics of the mechanical subsystem is given by (4) where + .The tuning parameters are k p , k v , m 1 , m 3 , .The complete system dynamics described with (10), including the DC motor driving the wheel, yields , and the total energy is The system states are q, p = M q, and the armature current x 1 = I a , while K e , L a , and R a are the torque constant of the motor, the inductance, and the armature resistance respectively.The inertia of the motor is assumed to be included in that of the wheel for simplicity.The control law is computed as in (16) and the integral states are computed as in (17).The assignable equilibrium in the presence of the constant unmatched disturbance  1 is q * 1 = arcsin( 1 ∕a 3 ), which is constant.The estimate of  1 computed with the integral action is δ1 = Γ 1 K I 2 ( 1 − p 1 ).The analytical solution of the PDEs (13a) and (13b) which verifies the minimizer conditions (13c) and (13d) is Simulations have been conducted in Matlab using an ODE23 solver with the model parameters a 1 = 0.0124, a 2 = 0.0025, a 3 = 0.4446, and L a = 1, R a = 0.5, K e = 0.1 for illustrative purposes.The tuning parameters for the controller (16)  have been set as K p = 1, k v = 0.001, m 1 = 0.4, m 3 = 5,  = 1 and K I 1 = 10, K I 2 = 10, k i = 2 × 10 3 , Γ 0 = 0.005, Γ 1 = 0.001.The initial conditions are (q 1 , q 2 , q1 , q2 , I a ,  0 ,  1 ) = (0.1, 0, 0.2, 0, 0, 0, 0).The simulation results in Figure 2 show the system response with the controller (16) in the presence of the unknown matched disturbance  0 = 0.01 and the unmatched disturbance  1 = 0.001.The controller (16) with the proposed tuning correctly achieves the regulation goal corresponding to the assignable equilibrium q = q * , the integral states settle to constant values, and the total energy W d converges to zero at the equilibrium.This is achieved thanks to the integral states  0 and  1 which compensate the effect of the disturbances on the wheel position, provided that Γ 0 > 0 and Γ 1 > 0. In comparison, setting Γ 1 = 0 the unmatched disturbances are neglected resulting in a noticeable steady state error on the wheel position.Setting Γ 0 = Γ 1 = 0, which corresponds to the controller (16) without integral actions, yields a position error of the opposite sign, since in this case the disturbances  0 and  1 have opposite effects on the system dynamics, while the total energy settles to an even larger value.The simulation results in Figure 3 show the system response with only the matched disturbance  0 = 0.01, while  1 = 0.In this case, the regulation goal is achieved with either Γ 1 ≠ 0 or Γ 1 = 0, while q * 1 = 0. Note that the transient is slightly slower if Γ 1 ≠ 0, which again is due to the fact that the unmatched disturbances and thus the integral state  1 have an opposite effect to  0 .Additional simulation results that illustrate the effect of the tuning parameters k p , k v , k i , Γ 0 and Γ 1 on performance are included in Appendix B.

Ball on beam
The ball-on-beam system is modified here by accounting for the dynamics of a DC motor driving the beam (see Figure 4).The equations of motion of the ball-on-beam with direct actuation, under some assumptions on the masses for simplicity, are given by (1) with the parameters M = , and Ω = gq 1 sin(q 2 ), where q 1 is the position of the ball, q 2 is the inclination of the beam, L is half the length of the beam, and g is the gravity constant.The prescribed equilibrium in the absence of disturbances is (q * 1 , q * 2 ) = (0, 0).The IDA-PCB design (3) for the mechanical subsystem without disturbances yields 5 ) Schematic of the ball-on-beam actuated by a DC motor, with key model parameters.where k p and k v are positive tuning parameters.The complete system dynamics described with (10), including the DC motor driving the beam, yields , with total energy W = Ω + 1 2 p T M −1 p + 1 2 L a I 2 a .Similarly to the previous example, the system states are q, p = M q, and x 1 = I a , while K e , L a , and R a are the torque constant of the motor, the inductance, and the armature resistance respectively.For simplicity, the inertia of the motor is assumed negligible compared to that of the beam.The control law is computed as in (16) and the integral states are computed as in (17).The assignable equilibrium in the presence of the constant unmatched disturbance  1 is q * 2 = −arcsin( 1 ∕g), which is constant.The estimate of  1 computed with the integral action is δ1 = Γ 1 K I 2 ( 1 − p 1 ).
The analytical solution of the PDEs (13a) and (13b) which verifies the minimizer conditions (13c) and (13d) is thus , which however yields the residual Δ = √ 2k p q 1 q * 2 (q 2 −q * 2 ) L (i.e., the residual can be eliminated by employing an algebraic solution of the PDE as in our prior work 17 ).In particular, Δ = 0 at the prescribed equilibrium, and it vanishes for all q 2 if and only if q * 2 = 0, that is in the absence of unmatched disturbances.In addition, Δ can be made arbitrarily small by reducing k p , which should however remain strictly positive to verify the minimizer condition (13d).
Simulations have been conducted in Matlab with an ode23 solver using the model parameters L = 0.5, g = 9.81, R a = 1, L a = 1, K e = 100 with the initial conditions (q 1 , q 2 , q1 , q2 , I a ,  0 ,  1 ) = (0.45, 0, 0, 0, 0, 0, 0).The tuning parameters have been set to k p = 1, k v = 1, k i = 0.01, Γ 0 = 0.01, Γ 1 = 0.05, K I 1 = 1, K I 2 = 1 for illustrative purposes.The simulation results in Figure 5 show the system response with the controller (16) in the presence of the unknown matched disturbance  0 = 0.05 and the unmatched disturbance  1 = 0.02.The controller (16) with the proposed tuning correctly achieves the regulation goal corresponding to the assignable equilibrium q = q * , the integral states settle to a constant value, and the total energy W d converges to zero at the equilibrium.This is achieved thanks to the integral states  0 and  1 which compensate the effect of the disturbances on the ball position, provided that Γ 0 > 0 and Γ 1 > 0. In comparison, setting Γ 1 = 0 the unmatched disturbances are neglected resulting in a steady state error on the ball position, while setting Γ 0 = Γ 1 = 0 yields an even larger position error since all disturbances are neglected.The simulation results in Figure 6 show the system response with only the matched disturbance  0 = 0.05, while  1 = 0.In this case q * 2 = 0, and the regulation goal is achieved with either Γ 1 ≠ 0 or Γ 1 = 0, which yield the same transient response.Note that employing the controller (3) with the same tuning parameters, which neglects the actuator dynamics results in instability even without disturbances.The simulation results for the ball-on-beam system with direct actuation employing the controller (24) and the integral actions (25) with the tuning parameters Γ 0 = 0.1 and Γ 1 = 0.5 is shown in Figure 7. Also in this case, the integral actions yield noticeable performance improvements in the presence of matched and unmatched disturbances, compared to setting either Γ 1 = 0 or Γ 0 = Γ 1 = 0.

CONCLUSION
This work presented a new control law for a class of underactuated mechanical systems that are not in affine form due to the presence of first-order actuator dynamics, and that are subject to both matched and unmatched constant additive disturbances.The controller design builds upon the IDA-PBC methodology in a modular fashion, such that the PDEs that characterize potential energy shaping and kinetic energy shaping are preserved.Two independent integral states are introduced by employing the concept of extended Hamiltonian in order to compensate matched constant disturbances and to explicitly account for unmatched constant disturbances.Compared to the use of nonlinear observers that have been employed in previous works, the proposed approach yields less stringent stability conditions and preserves the interpretation of the control action in terms of system energy.Compared to robust controllers, the proposed approach does not require prior knowledge of the disturbance bounds.Nevertheless, the use of the integral actions results in additional PDEs which complicates the controller design.The simulation results for two examples, namely an inertia wheel pendulum and a ball-on-beam system, demonstrate the effectiveness of the controller.Although the unmatched disturbances cannot be canceled completely in underactuated mechanical systems, accounting for their effect with the proposed controller clearly improves performance.
The proposed work has nevertheless a few limitations.First of all, the solution of the additional PDEs is system specific, similarly to the PDEs characterizing the IDA-PBC methodology.In addition, the control formulation is specific to constant additive disturbances and to systems with constant input matrix.Future work will thus aim to remove these limitation.

(A1)
Γ 0 and Γ 1 (i.e., Γ 0 = 0.01, Γ 1 = 0.002) results in the integral states  0 and  1 converging faster and to smaller values.This can be explained considering the effect of Γ 0 and Γ 1 on the time derivative Ẇd (i.e., see Proposition 2) and recalling the definition of  and  in Section 3.1 (i.e.,  =  0 (K I 1 (k v G T G + Γ 0 )) −1 and  =  1 (K I 2 Γ 1 ) −1 ).In this case, increasing Γ 0 and Γ 1 yields a slower convergence of the wheel position to the prescribed equilibrium, which is in agreement with the results in Section 4.1 (see Figure 3), and it is due to the fact that the unmatched disturbances and thus the integral state  1 have an opposite effect to  0 .
T  and is verified by all J 2 and D A , and by someD S such that G T D T S G ⊥ T = −G T D S G ⊥ T (i.e.,this condition is verified for the examples in Section 4 if D S is diagonal).Finally, S 44 = S T 24 G and S 55 = S T 25 G ⊥ T contain the damping terms, therefore the stability conditions in Proposition 2 change to Gk

F I G U R E 7
Simulation results for ball-on-beam with direct actuation with controller(24) and integral actions(25) subject to constant matched disturbance  0 = 0.05 and unmatched disturbances  1 = 0.02: (A) position q 1 ; (B) position q 2 ; (C) control input u; (D) integral state  0 ; (E) integral state  1 ; (F) total energy W d .