  In this paper we present a method to robustify energy-shaping controllers for
port-Hamiltonian (pH) systems by adding an integral action that rejects unknown
additive disturbances. The proposed controller preserves the pH structure and,
by adding to the new energy function a suitable cross term between the plant
and the controller coordinates, it avoids the unnatural coordinate
transformation used in the past. This paper extends our previous work by
relaxing the requirement that the systems Hamiltonian is strictly convex and
separable, which allows the controller to be applied to a large class of
mechanical systems, including underactuated systems with non-constant mass
matrix. Furthermore, it is shown that the proposed integral action control is
robust against unknown damping in the case of fully-actuated systems.
