Energy-shaping control of soft continuum manipulators with in-plane disturbances

Soft continuum manipulators offer levels of compliance and inherent safety that can render them a superior alternative to conventional rigid robots for a variety of tasks, such as medical interventions or human–robot interaction. However, the ability of soft continuum manipulators to compensate for external disturbances needs to be further enhanced to meet the stringent requirements of many practical applications. In this paper, we investigate the control problem for soft continuum manipulators that consist of one inextensible segment of constant section, which bends under the effect of the internal pressure and is subject to unknown disturbances acting in the plane of bending. A rigid-link model of the manipulator with a single input pressure is employed for control purposes and an energy-shaping approach is proposed to derive the control law. A method for the adaptive estimation of disturbances is detailed and a disturbance compensation strategy is proposed. Finally, the effectiveness of the controller is demonstrated with simulations and with experiments on an inextensible soft continuum manipulator that employs pneumatic actuation.


Introduction
Soft continuum manipulators are devices made of lowstiffness materials, which are typically exploited to achieve large structural deformations and displacements (Rus and Tolley, 2015). Such devices offer many attractive features, including compliance, light weight, inherent safety, and relatively simple miniaturization. These features make them ideally suited for human-robot interaction and for operation in cluttered environments, such as those found in medicine (DeGreef et al., 2009;Gerboni et al., 2017). The development of soft continuum manipulators has received significant attention, particularly in recent years (Burgner-Kahrs et al., 2015;Gerboni et al., 2015;Trivedi et al., 2008;Webster and Jones, 2010;Wehner et al., 2016). Among the different actuation strategies proposed, pressurized fluids, and particularly pneumatics, is one of the most popular. This can be credited to the high power-to-weight ratio, fast response, affordability, compatibility with magnetic resonance imaging (MRI), and miniaturization potential that soft continuum manipulators with pneumatic actuation can offer. A pioneer device in this category is the flexible micro actuator (FMA) (Suzumori, 1996;Suzumori et al., 1991Suzumori et al., , 1992. Since its invention, multiple other FMA designs have been proposed and developed (e.g. Abe et al., 2007;Chen et al., 2009;Cianchetti et al., 2014;Garriga-Casanovas et al., 2018;Marchese and Rus, 2016;McMahan et al., 2006;Mosadegh et al., 2014;Wehner et al., 2016), as well as torsional soft actuators (Sanan et al., 2014). Despite all this progress on design and manufacturing of FMAs and soft continuum manipulators in general, the study of model-based control strategies specific to these systems remains a largely unexplored field (Thuruthel et al., 2018).
Control strategies for soft continuum manipulators have been proposed in the literature using model-free and model-based methods. Numerical model-free methods have the advantage of not relying on a dynamical model of the system, which can be difficult to derive analytically for general cases or can be prohibitively time consuming if computed numerically. A model-free controller based on an adaptive Kalman filter was recently proposed by Li et al. (2018), while machine learning techniques were employed by Rolf and Steil (2014) and Thuruthel et al. (2017) to construct inverse kinematic models for control purposes. A common drawback of machine learning approaches is the need for training data, while the study of stability conditions remains an open problem. In addition, low-level control of the actuators in Thuruthel et al. (2017) employs high gains. As highlighted by DellaSantina et al. (2017), highgain feedback control imposes de facto a reduction of the compliance of the system, thus potentially defeating the purpose of physical compliance. Recent research on finiteelement (FE) models (Bieze et al., 2018;Goury and Duriez, 2018) has shown promising results in reducing computation time. This has allowed using FE models for control purposes (Bieze et al., 2018;Zhang et al., 2016), but this approach is only intended for quasi-static conditions.
Model-based closed-loop control has been indicated as particularly promising for accurate positioning (Thuruthel et al., 2018). In addition, analytical control provides the tools to analyze the stability of the closed-loop system with respect to the dynamical model. Recent model-based controllers for soft continuum manipulators rely increasingly on concentrated-parameters models (DellaSantina et al., 2018;Falkenhahn et al., 2015;Godage et al., 2015;Sadati et al., 2018), which typically introduce the assumption of constant curvature (CC) or piecewise-constant curvature (PCC). The resulting discrete models are computationally more efficient than continuous models based on beam theory (Renda et al., 2014;Rucker and Webster, 2011), and thus more suitable for closed-loop control. However, the assumptions of CC and PCC might not be verified in the presence of disturbances. In addition, concentratedparameters models only provide an approximation of the complex dynamics of soft continuum manipulators and are consequently less accurate than continuous models based on Cosserat rod theory (Alqumsan et al., 2019;Grazioso et al., 2018;Till et al., 2019). Lastly, a promising emerging trend in the modeling of soft continuum manipulators consists of employing a port-Hamiltonian approach (Ross et al., 2016), which focuses on the energy associated with the system (Moghadam et al., 2016). The main advantages of port-Hamiltonian modeling are the general applicability to different physical domains and the common formalism with energy-based control techniques.
Notable results in model-based control of soft continuum manipulators include feedback linearization techniques (Deutschmann et al., 2017;Gravagne et al., 2003) and optimal control (Falkenhahn et al., 2017). In addition, the combination of feedback and feed-forward actions was proposed by DellaSantina et al. (2017) in order to enhance robustness to uncertainties while preserving the compliance of the manipulator in closed loop, thanks to the use of small gains. More recently, sliding-mode control (SMC) algorithms, such as those reported in Slotine and Li (1991), were implemented for this class of systems by Alqumsan et al. (2019) for the case of bounded disturbances.
Nevertheless, model-based dynamic controllers for soft continuum manipulators are still in their nascent stage. One of the main challenges is posed by unstructured environments due to the presence of unknown disturbances (Thuruthel et al., 2018).
Employing a concentrated-parameters model for control purposes enables a simpler controller design and a reduced computation time. Constructing a rigid-link model of a soft continuum manipulator involves associating unactuated degrees-of-freedom (DOFs) to the compliant elements, in a similar manner to flexible mechanisms (Franco et al., 2018;Yu et al., 2005). Controlling the resulting underactuated model in the presence of disturbances is a challenging engineering problem. Energy-shaping methods (Bloch et al., 2000;Ortega et al., 2002) are among the preferred choices for the control of underactuated mechanisms and they also appear particularly suited for soft continuum manipulators since they do not rely on high gains, hence they can preserve the system compliance in closed loop. In addition, robust or adaptive versions of energy-shaping algorithms have recently been developed to compensate for the effects of different types of disturbances (Donaire et al., 2017;Franco, 2019b). In particular, disturbances that only affect the actuated DOF are termed matched, while unmatched disturbances affect the unactuated DOF. One of the main difficulties associated with energy-shaping control is the need to solve a set of partial-differential equations (PDEs), which is notoriously problematic for systems with a large number of DOFs. While a variety of approaches have been investigated to circumvent this obstacle (Donaire et al., 2016;Nunna et al., 2015), they typically rely on restrictive assumptions and are difficult to generalize. In this respect, computing energy-shaping control laws in closed-form for larger classes of systems represents an open research problem with significant practical relevance, and is of immediate interest for the control of soft continuum manipulators (Katzschmann et al., 2019).
In this paper, an energy-shaping approach is investigated for the dynamic control of soft continuum manipulators consisting of one inextensible segment with a constant section, similar to Garriga-Casanovas et al. (2018), which bends due to internal pressurization resulting in a single control input, and is subject to unknown in-plane disturbances, which can be either matched or unmatched. To this end, a rigid-link model and a port-Hamiltonian formulation are employed. The main contributions of this work can be summarized as follows.
1) An adaptive algorithm for the online estimation of a class of linearly parameterized disturbances acting in the plane of bending is presented. 2) A controller design procedure is outlined and control laws are derived in closed-form for the case of an n DOF rigid-link underactuated model, where n can be arbitrarily large. 3) A disturbance compensation strategy is implemented and stability conditions are discussed. Differently from other approaches, prior knowledge of the disturbance bounds is not required in this case. 4) An experimental validation of the proposed controller using a soft continuum manipulator consisting of one inextensible segment with pneumatic actuation in the presence of external forces.
It should be noted that this paper focusses on a planar case similarly to other recent work on the topic (DellaSantina et al., 2017(DellaSantina et al., , 2018Marchese and Rus, 2016). However, it is shown that the results can be readily applied to the control of this type of manipulator in threedimensional (3D) space.
The rest of the paper is organized as follows. In Section 2, the model of the manipulator is briefly introduced and the assumptions that define the control problem are detailed. In Section 3 the control laws are derived and the stability conditions are discussed. In Section 4, the simulation results for a rigid-link model and the experimental results for a soft continuum manipulator are presented. Finally, concluding remarks are summarized in Section 5, together with suggestions for future work.

Model overview
A schematic of the soft continuum manipulator that serves as reference design for this work is shown in Figure 1. The manipulator consists of a tubular structure made of a hyperelastic material (Elastosil M 4601) with a constant crosssection defining three equal internal chambers spaced at 2p=3. An inextensible nylon fiber is embedded at the center of the cross-section along the entire device to prevent longitudinal extension and to increase the capability of supporting external wrenches (Garriga-Casanovas et al., 2018). A second inextensible fiber is wound around the outer wall to prevent radial expansion while allowing longitudinal strain. This manipulator can thus bend in any direction in 3D space by applying a specific set of pressures P 0 , P 1 , P 2 in the internal chambers, while variation in length and external diameter are negligible. In the absence of disturbances, the orientation of the bending plane u and the rotation of the tip u on the plane of bending at equilibrium can be approximated as in (Suzumori, 1996) u = 1 k ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi P 2 0 + P 2 1 + P 2 2 À P 1 P 2 À P 1 P 0 À P 2 P 0 q ð1:aÞ tan u ð Þ= ffiffi ffi 3 p P 1 À P 2 ð Þ P 1 + P 2 À 2P 0 ð1:bÞ where k is the stiffness of the structure. For the purpose of deriving closed-loop control laws, the manipulator is modeled as a rigid-link system, similarly to Godage et al. (2015). The link lengths are defined as l i . The joint angles are defined as q i , which represent the rotation of link i with respect to link i À 1. A point mass m i is located at the mid-point of each link, and their sum equals the total mass of the manipulator m T . The bending moment generated by the combined effect of the internal pressures has amplitude u = ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi P 2 0 + P 2 1 + P 2 2 À P 1 P 2 À P 1 P 0 À P 2 P 0 p and corresponds to the control input of the dynamical model. Setting the ratio between P 0 , P 1 , P 2 allows selecting the plane of bending, as shown in Figure 1(b) and expressed in Equation (1.b). The dynamics of the n DOF rigid-link model in Figure 1 is expressed employing a port-Hamiltonian formulation. To this end, we define the position q 2 R n and the momenta p = M _ q 2 R n , where M(q) is the positive-definite and invertible inertia matrix. The open-loop Hamiltonian H = T q, p ð Þ+ V (q) corresponds to the total energy of the system, with T q, p ð Þ= 1 2 p T M À1 p representing the kinetic energy, and V (q) representing the potential energy. The control input is u.0 and the input mapping is G, with rank G ð Þ\n indicating underactuation. The damping matrix is D.0, while the disturbances d 2 R n represent the effect of model uncertainties and of generalized external forces acting in the plane of bending. The open-loop system dynamics is defined as The n × n identity matrix is indicated with I, the symbol r q ( Á ) represents the vector of partial derivatives in q, and the symbol r p ( Á ) represents the vector of partial derivatives in p.

Assumptions
The following assumptions, which define the control problem considered in this work, are introduced and briefly discussed.
Assumption 1: The states (q, p) 2 R 2n are exactly known.
Assumption 2: The potential energy only contains elastic terms, is quadratic in the position, and is expressed as where the stiffness of the structure k is constant and identical for all joints. Similarly, damping is constant and identical for all joints, thus D = D 0 I.0. The effect of gravity, which is not included in V q ð Þ, is accounted for instead within the disturbance d.
Assumption 3: The input matrix G 2 R n × 1 is constant and has identical elements equal to 1.
Assumption 4: In the presence of disturbances there exists a non-empty set O Ã of attainable open-loop equilibrium positions q Ã that satisfy the following condition, where G ? is a full-rank left annihilator of G such that G ? G = 0 and such that rank G ? ð Þ= n À 1 Assumption 5: The disturbances only act in the plane of bending and are linearly parameterized is a known scalar function of the state and d 0 is a vector of unknown parameters, potentially time varying, with time derivative _ d 0 .
In particular, Assumption 1 implies that (q, p) are known from measurements or from an appropriate observer, such as Venkatraman et al. (2010). Including the observer in the control formulation is beyond the scope of this paper and is part of our future work. According to Assumption 2 the effect of gravity is not accounted for in the potential energy. Instead, the effect of the weight of the manipulator and of any payload, and any un-modeled dynamics (e.g. variations in structural stiffness due to pressurization) are included in the disturbances d for controller design purposes. Assumption 3 implies that the bending moment generated by the control input u is uniformly distributed over all joints. The expression of the matrix G specifies that only the dynamics in the plane of bending is considered. This is motivated by the fact that, for the type of soft continuum manipulators considered here, the orientation of the bending plane is defined by the geometry of the internal chambers and by the corresponding pressures according to (1.b). Assumption 4 implies that under a given external load d the manipulator acquires the configuration q Ã and is typically verified if the load is commensurate with the material properties so that neither rupture nor plastic deformation occurs, while hysteretic effects are negligible.
Assumption 5 limits the scope of this work to generalized forces that act in the plane of bending. Relaxing this assumption to include out-of-plane disturbance is part of our future work. For illustrative purposes, a force d 0 acting along the y-axis at the tip of the distal link produces a bending moment d The effect of un-modeled dynamics is accounted for by the time-varying parameter d 0 .
Note finally that the rigid-link model approximates the dynamics of a soft continuum manipulator, since it is underactuated and it can include an arbitrary number n of DOFs, but it is not specific to pneumatic actuation. Thus, a similar approach could be employed for different actuation strategies, such as tendons or electro-active polymer actuators (Mattioni et al., 2018).
Remark 1: If G ? d = 0 the disturbances are only matched and solving (3) gives q Ã 1 = q Ã i , 8i ł n, confirming that CC is an attainable equilibrium for system (2). In this case, the model in quasi-static conditions reduces to 1 DOF. Differently from classical examples of underactuated mechanisms (Franco et al., 2018), the class of systems considered here admits a set O Ã of attainable equilibria instead of a single position q Ã . Thus, by employing an appropriate control action, it is theoretically possible to stabilize any CC configuration if the disturbances are only matched. The latter is the case for a moment load at the tip of the manipulator. Conversely, in the presence of unmatched disturbances, the attainable equilibrium is not CC and a 1 DOF model is no longer representative even in quasi-static conditions. This scenario includes in-plane forces applied at the tip of the manipulator, the weight of the manipulator or of any payload, and uncertain non-uniform stiffness.

Adaptive estimate of the disturbances
The unknown disturbances are estimated from the openloop dynamics (2) using the Immersion and Invariance (I&I) method (Astolfi and Ortega, 2003;Astolfi et al., 2007), as outlined in the following proposition.
Proposition 1: Consider system (2) under Assumptions 1,5 with _ d 0 = 0. Then, the disturbance estimated =d 0 f converges to the correct value exponentially with the following adaptation law and with the tuning parameter a.0 Proof: We define the vector of estimation errors z as follows, where the functionsd 0 and b p ð Þ are the stateindependent part and the state-dependent part of the estimated 0 Computing the time derivative of (6) and substituting (2) and (6) gives Substituting (7), which correspond to the adaptation law (5), gives Finally, choosing the Lyapunov function candidate W = 1 2 z T z, computing its time derivative, and substituting (8) gives _ W = À a zf j j 2 \0. Consequently, the quantity zf j j is bounded and converges to zero exponentially, concluding the proof n Remark 2: In the case in which f is constant (e.g. constant bending moment) the disturbances reduce to d = d 0 and the adaptation law (5) can be simplified as Employing (9) in the presence of variable disturbances does not ensure convergence of the estimate to the correct value. Nevertheless, the effect of the disturbances can be compensated for by an appropriate control action (see Corollary 1). Both the adaptive estimates (5) and (9) require full state feedback, which motivates the need for Assumption 1 in this work. This point becomes apparent observing that the term r q H contains the partial derivatives in q of the inertia matrix M, which depend on the individual joint angles (the inertia matrix for n = 3 is reported in Appendix A). In practice, Assumption 1 can be obviated with a simplified adaptation law (see Corollary 1). Conversely, the remaining Assumptions 2-4 are not required for the purpose of disturbance estimation.

Control law for CC equilibrium
The control aim considered in this work corresponds to stabilizing the desired equilibrium q, p ð Þ= q d , 0 ð Þ with q d 2 O Ã ; hence, it is a setpoint regulation problem. Introducing the matrix G y = G T G À Á À1 G T , the energyshaping control law is defined as the sum of the term u es , which assigns the closed-loop equilibrium q d , of the term u di , which injects damping in the system necessary to attain stability at equilibrium (Ortega et al., 2002), and of a disturbance compensation term u Ã : where the parameter k v = k T v .0 is a constant gain governing the damping injection, and J 2 = À J T 2 is a free matrix dependent on p. The closed-loop dynamics becomes then where Hamiltonian and q d = argmin(V d ) corresponds to a strict minimizer of the closed-loop potential energy V d . Equating (2) and (11) and pre-multiplying by G ? we obtain the potential-energy PDE and the kinetic-energy PDE, which should be satisfied for all (q, p) 2 R 2n Finding a closed-form solution of (12) is typically problematic for systems with a large number of DOFs. This is achieved here with the kinetic-energy-shaping design M d = k m M, where k m is a positive tuning parameter, which solves (12.b) with J 2 = 0. Expressing (12.a) for system (2) under Assumptions 2 and 3 results then in a system of n À 1 linear PDEs that admits solutions in the following form Choosing F as in (13) (13) into (10) gives u es for a generic n DOF model Alternative expressions of F result in different control laws (see Appendix B).
Computing the term u di gives Proposition 2: Consider system (2) under Assumptions 1-5 in closed loop with controller (10), where u es is defined as (15) and u di is defined as (16). Assume that the disturbances are only matched and are estimated with (5). Then the equilibrium q, p In addition, Proof: To streamline the proof of the first claim we initially consider the case of null disturbances. Choosing the Lyapunov function candidate H d = 1 2 p T M À1 d p + V d , computing its time derivative, substituting (2), (10), and recal- Since D.0, asymptotic stability of the equilibrium is concluded for all k v ø 0.
Matched disturbances can be expressed as Gd, which substituted in (2) gives _ p = À r q H + G u À d ð ÞÀD _ q. We define the estimation error z =d À d (see Proposition 1) and the Lyapunov function candidate W 0 = H d + 1 2 z T z. Computing the time derivative of W 0 along the trajectories of the closed-loop system and substituting (5) gives Introducing the Young's inequality in (18) and employing a Schur complement argument gives If D 0 _ q j j 2 .k m _ d 2 , k v .0, and a. 1 + k v ð Þ=4k v then _ W 0 ł 0 and the equilibrium is locally stable. The strictminimizer claim follows from (14), concluding the proof n Remark 3: Neglecting the disturbances in the adaptation law has detrimental effects on the stability of the equilibrium. Defining the Lyapunov function candidate H d and computing its time derivative along the trajectories of the closed-loop system gives Following the same procedure as Proposition 2, the corresponding stability condition is in this case D 0 _ q j j 2 . _ q T Gd, which depends on the magnitude of the disturbance rather than on its time derivative, and thus it is typically more stringent (e.g. consider the case of a large but slowly varying disturbance).

Control law for variable curvature equilibrium
Solving (3) for the case of in-plane unmatched disturbances results in a new set of attainable equilibria O Ã 0 , which deviate from CC where 1 ł i, j ł n and i 6 ¼ j. Since the system is underactuated, the individual joint angles cannot be regulated to arbitrary values. Nevertheless, it is still possible to achieve the setpoint regulation for the tip rotation u d (respectively for the tip coordinate x d or y d ) with an appropriate control action.
To account for in-plane unmatched disturbances in the controller (10), the gradient vector r q V d is augmented with the non-conservative generalized forces L(q) as in Franco (2019a), resulting in the extended vector This approach preserves the solution of the PDE (13) and the expression of u es (15). Computing L from (22) and enforcing the minimizer conditions (14) for where g is a tuning parameter. Expressing (14) for V 0 d gives then The disturbance compensation term u Ã for unmatched disturbances is then Proposition 3: Consider system (2) under Assumptions 1-5 in closed loop with controller (10), where u es is defined as (15), u di is defined as (16), u Ã is defined as (26), and the disturbances (matched and unmatched) are estimated with (5). Then the equilibrium q, p Proof: Following closely the structure of Proposition 2 we introduce the function H Introducing the Young's inequality z T _ d ł z j j 2 =4 + _ d 2 in (27) and employing a Schur complement argument gives Thus W 0 ł 0 and the equilibrium is locally stable. Finally, the strict-minimizer claim follows from (24), concluding the proof n Remark 4: The difference between Proposition 2 and Proposition 3 is due to the dimension of z, which is a scalar in (18), while it is a vector of dimension n in (27). In the latter case, the disturbances also affect the unactuated states; thus, the condition on the parameter a relies on the open-loop damping D 0 rather than on the damping injection parameter k v . The parameter k m resulting from the kinetic-energy shaping allows additional tuning freedom for a with a given D 0 . Notably, the stability conditions provided in Proposition 2 and Proposition 3 are sufficient but not necessary. This is due to the use of the Young's inequality, which is a conservative condition.
Remark 5: If the control aim corresponds to regulating the tip rotation so that P n i = 1 q Ã i = u Ã = u d and if g = 0 then u Ã in (26) coincides with u Ã = G y d, which refers to the matched disturbances case. Otherwise, the constant term k p u Ã À u d ð Þand the linear term g u À u Ã ð Þcontribute to the control input. In addition, taking g(q) dependent on the states results in a nonlinear control law. In this respect, expression (26) is more general than (10). Finally, the regulation of the tip position can be achieved in the same way as the angle regulation by employing an appropriate Remark 6: Introducing the tip rotation u = G T _ q and its desired value u d = nq d in (15) reveals that the components of the control law u es and u di are only dependent on u, _ u. However, the adaptation law (5) depends on the individual positions of the virtual joints, which need to be computed with an appropriate observer. To simplify the controller implementation, a compact version of (26) is constructed approximating r q H ffi r q V , which is reasonable for slow movements of the manipulator. The complete control law becomes The integral term in (29) corresponds to the cumulative disturbance estimate G yd with a constant f (see Remark 2), while the second and the third terms are the same as in (26). As a result, only the cumulative effect of the disturbances (i.e. G y d = G y d 0 f ) is estimated, rather than the values of the unknown parameters d 0 . Since (29) only depends on u and _ u, in this case Assumption 1 can be removed. The stability of the equilibrium (21) for system (2) in closed loop with controller (29) is discussed in the following corollary.
Proof: Computing the time derivative of the estimation error z =d + b p ð Þ À d and substituting _ d =a Àr q V + Gu À ÀDr p H Àd 0 Þ results in the following error dynamics Substitutingd =d in (26) recovers (29). Computing the time derivative of W 00 as in (27) and substituting (29) and (31) gives We recall that r p H T = _ q and G T r p H = _ u. In addition, motivated by the structure of M (see Appendix A), we can write r q p T M À1 p À Á ł k 1 m T _ q j j 2 and p j j ł k 2 m T _ q j j for some positive constants k 1 , k 2 . Rewriting (32) and regrouping the common terms gives Introducing the Young's inequalities and employing a Schur complement argument gives where A is given in (30). Thus, _ W 00 ł 0 and the equilibrium is locally stable if (30) is verified and provided that k v k 2 m _ u 2 . _ d 2 + ak 1 m T _ q j j 4 , which concludes the proof n Note finally that, if m T ( 1, inequality (30) can be approximated neglecting the terms m 2 T , which yields the condition and D 2 = 6k 2 m T ð Þ. Inequality (35) admits real solutions provided that D 0 .k 2 m T + 3 ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi k 2 m T =k m p .

Results of simulations and experiments
The proposed controllers are implemented for the soft continuum manipulator described by Garriga-Casanovas et al. (2018), by employing a 3 DOF rigid-link model with link lengths l 0 = l 3 = 0:125l T and l 1 = l 2 = 0:375l T , where l T is the total length of the device. These values were chosen as a result of an optimization routine to minimize the difference between the potential energy of the rigid-link model and that of the computer-aided design (CAD) model computed with FE simulations. A point mass m i is located at the mid-point of each link, and is proportional to its length so that the sum of the masses is equal to the mass of the manipulator m T . It must be noted that the proposed controllers do not depend on this particular choice.

Simulations
Simulations were conducted in MATLAB, by employing the solver ode23 with the following parameters representative of an ideal manipulator: k = 5, l T = 0:1, m T = 1:5, D 0 = 0:01, k v = 4, k p = 0:01, k m = 20, a = 10, and alternatively a = 20, chosen according to Propositions 2 and 3. The value of desired tip rotation is u d = p=2, which corresponds to equal joint angles q d = p=6 in the case of CC equilibrium. The control input was computed with (10), (26) and the disturbances were estimated with (5) using full state feedback. Three types of disturbance were employed for illustrative purposes: matched disturbances consisting of a constant bending moment d = À 1Nmm (see Figure 2); matched and unmatched disturbances consisting of a tip force P = À 10N in the y direction (see Figure 3); and the weight of the manipulator amplified by a factor 10 (see Figure 4). Notably, the force P corresponds to the weight of a mass attached at the tip of the manipulator, as might occur during a manipulation task (see Section 4.2). A baseline proportional-integral-derivative (PID) controller defined as u Þdt was implemented for comparison purposes. Note that, because of the close similarity between the structure of the PID and of the controller (10), (26), the following equalities hold: Consequently, the PID parameters are chosen as K p =0:2,K v =0:2,K i = 10, or K i = 20. Thus, the corresponding tuning parameters are identical in both controllers. Low values of k p and corresponding values of K p are chosen to avoid reducing the compliance of the manipulator in closed loop (DellaSantina et al., 2017).
In the case of matched disturbances both controllers correctly achieve the regulation goal, which corresponds to CC equilibrium (see Figure 2). Their smooth and slow response is due to the presence of open-loop damping and to the use of small gains. In particular, the adaptive controller (10), (26) results in a slower and smoother response compared to the PID baseline with the same tuning. Employing a = 20, the disturbance estimate reaches the correct value more quickly without drastically changing the closed-loop response. Conversely, the PID with K i = 20 results in a larger overshoot (8.7% with K i = 10, and 22.5% with K i = 20). This is due to the contribution of the integral term, which shows a similar trend and also converges to a different value compared to the case with K i = 10.
Employing larger values of k p and K p (e.g. k p = 1, k m = 2, and K p = k p k m = 2) results in a faster response for both controllers (see Figure C1 in Appendix C). Also in that case, however, the baseline PID shows a noticeable overshoot with K i = 20. Finally, setting a = K i = 0 results in large steady-state errors because the disturbances are not compensated.
The simulation results for the case of unmatched disturbances are shown in Figure 3. Also in this case, the regulation goal is correctly achieved by both controllers. The system response with the adaptive controller (10), (26) is similar for different values of a and is comparable to that of Figure 2 even though the disturbance has a different magnitude. With small values of K i (e.g. K i = 2) the performance of the PID becomes similar to that of controller (10), (26). However, the system response changes more drastically with larger K i , resulting in noticeable overshoot (11% with K i = 10, and 25.4% with K i = 20). This suggests that the performance of the proposed controller is less sensitive to the gain governing the integral action compared to the PID. In practice, this can be advantageous since it could avoid time consuming tuning procedures. Finally, the adaptation law (5) correctly estimates the force P for different values of a, which could serve the purpose of estimating interactions with the environment. Instead, the contribution of the integral action in the PID changes depending on K i . The simulation results for a different type of unmatched disturbances representative of the weight of the manipulator amplified by a factor 10 are shown in Figure 4 considering two opposite mounting positions (i.e. gravity vector pointing up or down with respect to the robot frame). In both cases the manipulator at rest is horizontal while the weight of each segment acts in the vertical direction. The same tuning is employed for the parameters k v , k p , k m , K p , K v as in Figure  3. The values a = 20 and K i = 2 are used in an attempt to match the response of the controller (10), (26) with that of the PID (see Figure 3). The results show that the energyshaping controller leads to a similar response for different directions of the load. Conversely, the performance of the PID changes more drastically. Increasing a results in a similar response, while increasing K i leads to a faster convergence with a noticeable overshoot for the ''down'' orientation, since gravity acts in the direction of motion.
The time history of the position q for the previous operating conditions is shown in Figure 5. In the presence of matched disturbances, the position deviates from the CC configuration during the transient. This confirms that, although the regulation of the tip rotation might appear to be a 1 DOF problem in proximity of the equilibrium, a 1 DOF model is not appropriate outside of quasi-static operating conditions. Instead, in the presence of unmatched disturbances the equilibrium is no longer a CC configuration. However, it is still possible to stabilize the equilibrium u = u d or alternatively x = x d employing an appropriate value of u Ã in (26). The value of u Ã is typically different from u d and can be either computed analytically from a kinematic model or numerically based on the time history of u and x.
The system response with controller (29) employing the same tuning parameters is shown in Figure 6 for both disturbances and for different values of n. If the parameter n in (29) matches the number of DOFs of the model, the resulting response is very close to that of the controller (10), (26). Using a different n in (29) results in noticeable but limited differences that do not compromise performance (e.g. overshoot). In addition, the regulation goal is still achieved in a similar way for disturbances of different magnitude. A notable difference is that with the controller (10), (26) and with the adaptation law (5) the unknown parameter d 0 is correctly estimated (see Figures 2 and 3). Instead, controller (29) compensates for the cumulative effect of the disturbances but does not provide an estimate of the parameter d 0 .

Experiments
4.2.1. Experimental setup. The controller (29) was tested on the soft continuum manipulator described by Garriga- proportional pressure regulators (Tecno Basic, Hoerbiger, Germany), which supply the chambers of the manipulator. The prototype employed in the experiments measures 30 mm in length and 6 mm in diameter, and its mass is approximately 1.5 g. The stiffness of the structure (k = 4Nmm=rad) was determined from FE simulations and experiments. The latter confirmed that the tip rotation at equilibrium varies almost linearly with the internal pressure up to 2.5 bar, and thus Equation (1.b) suggests that employing a constant parameter k is a reasonable approximation in this case. The damping D 0 was estimated experimentally by applying a step command of 1 bar in different chambers and recording the values of u, _ u. Computing D 0 from (2) evaluated at the maximum velocity and averaging the values for different chambers resulted in D 0 = 0:03Nms. The following numerical values of the controller parameters were thus used for the experiments: k = 4, k v = 1, k p = 0:01 or k p = 0:025, k m = 20, a = 10, and alternatively a = 20. Both values of a fulfil the conditions of Corollary 1 for all k 2 \0:6 (e.g. 1\a\21 if k 2 = 0:6). In particular, a small value of k p is employed to avoid high feedback gains in spite of using larger values of k m . In turn, employing a large value of k m allows a greater variation of a according to condition (35). Given a desired value of the tip rotation u d , different orientations of the bending plane can be achieved by setting P 1 = mP 2 with appropriate values of m. Considering the small size of the internal chambers of the manipulator (( 1ml), and the comparatively large flow rate that the digital pressure regulators can supply () 10l=s) as well as their fast response (ffi 10ms), the pressure dynamics of the system was neglected in this work. The motivation of this choice is that in this case the pressure wave propagates considerably faster than the reaction time of the pressure regulator (0.3 ms propagation time for a 0.1 m long pipe). The pressure dynamics would not be negligible with longer supply pipes (e.g. .10m), which are required in specific applications, such as MRI-compatible robotics (Franco et al., 2016). This specific scenario will be investigated as part of our future work. The disturbances acting on the manipulator during the experiments include the following: the weight of the manipulator itself and of the sensor, which is mounted at the tip; uncertainties in stiffness and damping parameters, which might not be uniform due to manufacturing inaccuracies and might be affected by pressurization; uncertainty in the bending moment generated by the applied pressure. Finally, an additional disturbance was included by attaching a small mass at the tip of the manipulator.

Experimental results.
The controller (29) correctly achieved the regulation goal u Ã = u d = p=6 consistently for different orientations of the bending plane ( Figure 8). This result confirms that the control of the manipulator in three dimensions is a direct extension of the two-dimensional (2D) problem in the absence of out-of-plane disturbances.
The system response is slower compared to the simulations because of the higher damping of the prototype. The effect of the parameter a and of the parameter k p is illustrated in Figure 9, which shows a close similarity to the simulation results. In particular, larger values of a and of k p result in a faster response. The repeatability of the closed-loop system response was assessed for the two regulation goals u d = p=6 and u d = p=8, each repeated five times. The standard deviation of the tip rotation u was evaluated at time t = 1 s and at t = 2 s and remained below 0.01. Finally, the controller (29) was tested with u Ã = 0, resulting in a large error on the tip rotation u. In this case, incrementing k p in an attempt to reduce the error increases the closed-loop stiffness of the system and might lead to instability since the disturbances are not accounted for (see Remark 3).
A mass of 3 g, which is approximately twice the mass of the manipulator, was attached at its tip to introduce additional disturbances due to gravity (Figure 10). The results show that the controller (29) with a = 20 correctly achieves the regulation goal u Ã = u d = p 6 . Similar to the simulation study, the baseline PID was employed for comparison purposes using the tuning parameters K p = k p k m = 0:2, K v = k v =k m = 0:05, which correspond to those of the energy-shaping controller ( Figure 10). In this case, the value K i = 10 was employed for the PID since the system becomes unstable with K i = a = 20. Although the PID results in a faster response, it also leads to high overshoot and oscillations, which increase in amplitude with larger K i . Employing lower values of K i the system response becomes more similar for both controllers (see Figure C2 in Appendix C, which shows results for a different setpoint and different tip forces). This confirms the validity of linear controllers in quasi-static operating conditions (Bieze et al., 2018;Zhang et al., 2016). Comparing the control law (29) with the PID highlights a close similarity and suggests that their different performance could be due to the following reasons: (a) the PID lacks a feed-forward term that accounts for the structural stiffness of the manipulator; (b) the disturbance compensation in (29) accounts for the damping and for the stiffness of the manipulator within the adaptive law, which are ignored in the PID.
A further set of experiments was conducted attaching the 3 g mass to the tip of the manipulator during the test (Figure 11). Also in this case, controller (29) results in a smooth response and the increment in control input after the mass is attached to the manipulator corresponds to the increase in the cumulative disturbance estimate G yd . Comparing Figure 10(a) and Figure 11(a) confirms that the system response with the controller (29) is similar during the first 10 seconds even though the disturbances are Instead, with the tuning employed the PID results in a faster response and higher overshoot before the mass is attached to the tip of the manipulator, since the actuator encounters less resistance. The onset of the disturbances is indicated on Figure 11 by vertical dashed lines. In particular, the mass is attached manually to the tip of the manipulator and this operation requires a few seconds. This variability contributes to the different deviation between u and u d after the disturbance onset. Afterwards, the controller (29) brings the tip rotation u back to the desired value while the PID results in small oscillations around the setpoint. A faster response is achieved by employing a larger value of k p in (29) and a corresponding value of K p in the baseline PID (see Figure C3 in Appendix C). In the latter case, the PID results in higher overshoot and oscillations after the disturbance onset, while controller (29) still achieves a smooth response.  (29) with a ¼ 20 and n ¼ 30; (b) tip rotation u for PID with K i ¼ 5, K p ¼ k p k m ¼ 0:5, K v ¼ k v =k m ¼ 0:05. The constant load refers to the same test condition as Figure 10, while the variable load denotes the same test condition as Figure 11.
Note finally that a very similar response of the controller (29) and of the PID can be achieved by reducing K i (e.g. K i = 5) and by increasing n (e.g. n = 30), as shown in Figure 12. In this case, the feed-forward term that accounts for the structural stiffness of the manipulator in the control law (29) is reduced. The system response is similar for both loading conditions considered (i.e. tip mass introduced either at the beginning of the test or when the rotation reaches the setpoint) and the PID only shows a small overshoot (approximately 4%). The performance of both controllers could be further improved with an optimized parameter tuning, which we intend to explore as part of future work.

Conclusions
An adaptive energy-shaping controller for a class of soft continuum manipulators subject to in-plane disturbances was designed by employing a rigid-link model and a port-Hamiltonian formulation. The rigid-link model approximates the dynamics of the soft continuum manipulator and simplifies the controller design. The effects of the discrepancies between the model and the real system are treated as disturbances and are compensated adaptively. Closedform expressions of the control law for an n DOF model, where n can be arbitrarily large, were presented and stability conditions were discussed. The effects of external disturbances on the equilibrium were highlighted, confirming that CC is not achievable with unmatched disturbances. The effectiveness of the controller was demonstrated with simulations and with experiments on a soft continuum and inextensible manipulator with pneumatic actuation. A comparison with a baseline PID highlighted that the energyshaping controller results in a smoother but slower response when employing the same tuning parameters. The results indicate that, while similar performance can be achieved with both controllers for a given loading condition, the energy-shaping controller appears less sensitive to the tuning of the integral action.
Although the controller presented in this work was implemented for a specific soft continuum manipulator consisting of one inextensible segment, we believe that the proposed approach is of wider applicability. Future work aims to extend the results to out-of-plane disturbances and to investigate the control of manipulators consisting of multiple segments arranged in series. In addition, we intend to include the pressure dynamics in the port-Hamiltonian model and to investigate the control of soft manipulators with long supply pipes within the context of a medical application. Finally, we intend to apply the proposed control approach to soft continuum manipulators that employ different types of actuation.   (29) with a = 10, k p = 0:025 and for proportional-integral-derivative (PID) with K i = a = 10, K p = k p k m = 0:5, K v = k v =k m = 0:05; (b) corresponding control input. The disturbance onset is indicated with vertical dashed lines.