Port-Hamiltonian Modeling and IDA-PBC Control of an IPMC-Actuated Flexible Beam

In this paper, the infinite-dimensional port-Hamiltonian modelling and control problem of a flexible beam actuated using ionic polymer metal composite (IPMC) actuators is investigated. The port-Hamiltonian framework is used to propose an interconnected control model of the mechanical flexible beam and the IPMC actuator. The mechanical flexible dynamic is modelled as a Timoshenko beam, and the electric dynamics of the IPMCs are considered in the model. Furthermore, a passivity-based control-strategy is used to obtain the desired configuration of the proposed interconnected system, and the closed-loop stability is analyzed using the early lumped approach. Lastly, numerical simulations and experimental results are presented to validate the proposed model and the effectiveness of the proposed control law.


Introduction
Minimally invasive surgery with the application of different types of endoscopes has been developed in recent years. In order to avoid irreversible damage and to alleviate the suffering of patients due to the complexity and fragility of the human body, providing additional degrees of freedom using embedded actuators on endoscopes has garnered particular attention over the last decade with the development of smart materials and manufacturing techniques. A micro-endoscope model for endonasal skull base surgery was proposed in [1], in which ionic polymer metal composites (IPMCs) were used to actuate the bending movement of the micro-endoscope. IPMCs are widely used for their attractive properties: ease of fabrication, fast response, large strain, and low actuation voltage [2].
An IPMC-actuated flexible structure for medical applications is proposed in this paper. The mechanical structure of the endoscope consists primarily of a polyethylene-made compliant inner tube. In this paper, we consider the endoscope inner tube as a flexible beam using Timoshenko beam theory. Despite its attractive properties, the modelling and control of an IPMC actuator are challenging due to its complexity and the flexibility of its structure. The physical properties of IPMC-actuated endoscopes result in a complex multiphysical modelling and non-linear infinite dimensional control problem. This motivates us to use the port-Hamiltonian framework to address the modelling and control of an actuated endoscope model. The port-Hamiltonian system (PHS) formalism is based on the energy conservation and dissipation of a system and on energy exchanges between the components of complex physical systems. Different components of the system are interconnected through energy ports in a straight-forward and clear manner. The port-Hamiltonian formulation was introduced for finite-dimensional systems in different physical nature systems [3][4][5][6] and has been further extended to infinite-dimensional systems described by partial differential equations [7][8][9].
The port-Hamiltonian formulation of IPMC actuators with different assumptions was proposed in [10,11] considering multi-scale phenomena. In the paper, an IPMC-actuated endoscope system is described by a coupled system of sets of partial differential equations (PDEs) interconnected with an ordinary differential equation (ODE). Different physical parts of the system are considered interconnected by the port-Hamiltonian formalism through the energy change ports. All of the physical natures of the components, such as the beam's flexibility and the physical propriety of IPMC actuators, are considered in this formulation.
Furthermore, the port-Hamiltonian framework was shown to be able to handle passivity-based control with a physical interpretation for finite-and infinite-dimensional systems [12,13]. Many studies have been dedicated to the interconnection and damping assignment passivity-based control (IDA-PBC) for physical systems [14,15].
Interconnected rigid links are used to model a flexible structure using the port-Hamiltonian approach in [16]. The proposed model is a non-linear lumped parameter system. However, many rigid links are needed to represent the high-frequency vibration of the flexible structure. The model proposed in [16] becomes very complex when the number of links increases and is impractical for control design. In [17], a passive linear quadratic gaussian (LQG) controller and damping injection are used to achieve the desired configuration of the flexible structure system, where the simulation results of a passive LQG controller on a mono-IPMC-actuated flexible structure are presented.
The main contribution of this paper is that a distributed parameter interconnected model with a multi-IPMC actuator is investigated to deal with the flexible nature of the structure. The distributed Timoshenko beam model is used to deal with the flexible behaviour appropriately. Furthermore, IDA-PBC feedback control is proposed for the model and we show the asymptotic stability of the closed-loop system. Moreover, control law is implemented in the experimental setup to validate the effectiveness of the proposed method in the mono-actuated case. We define an integral action conserving the Hamiltonian nature to account for steady errors due to an activity reduction of the IPMC actuator. In the multi-actuated case, the simulation results illustrate that the proposed control law allows us to shape the flexible beam into our desired shape.
The paper is organized as follows: In Section 2, we present the port-Hamiltonian formulation of the IPMC-actuated flexible beam system modelled by sets of partial differential equations (PDEs) and an ordinary differential equation (ODE). In Section 3, we design an IDA-PBC-based finite-dimensional control law to improve the flexible beam system performance. In Section 4, we give some simulation results, and an experimental validation on a platform setup is presented to validate the proposed control law. In Section 5, some concluding remarks and perspectives are given.

Port-Hamiltonian Formulation for IPMC Actuated Flexible Beam
We consider the modelling of an IPMC-actuated endoscope ( Figure 1) using the port-Hamiltonian formulation.
Several IPMC actuator patches are attached to a polyethylene-made compliant inner tube. With the voltages applied across the IPMC actuators, torques are generated to control its configuration. The distributed Timoshenko beam model (PDE) is used to describe the mechanical beam behavior of the endoscope. A lumped parameter RLC model (ODE) is presented to describe the interface/polymer diffusion dynamics of the IPMC actuator. Moreover, a power-preserving interconnection is used to obtain the coupled PDE-ODE model to describe the overall dynamics of the system.

Flexible Beam with Distributed Control
The control objective is to shape the flexible beam into a desired configuration using the IPMC patches. The patches are actuated by the distributed bending moment, denoted by u d , induced by the voltage applied. The dynamics of the Timoshenko beam [18,19] with distributed input and power conjugate output y d are given as follows: with a first-order skewed symmetric differential operator J = P 1 ∂ ∂z + P 0 on the state space X = L 2 ([a, b]; R 4 ) and with The total mechanical energy of the flexible beam is considered Hamiltonian: where w(z, t) is the transverse displacement and φ(z, t) is the beam rotation angle of the beam. The coefficients ρ and I ρ are the mass per unit length and the mass moment of inertia of the cross-section of the beams, respectively. E, I, and K are Young's modulus, the moment of inertia of the cross-section, and the shear modulus, respectively. The state variable vector of the system x = [x 1 , x 2 , x 3 , x 4 ] T ∈ X is defined from the Hamiltonian function considering the mechanical energy: x 1 = ∂w ∂z (z, t) − φ(z, t) and x 2 = ∂φ ∂z (z, t), defined by the potential energy, are shear and bending strain, respectively. x 2 = ρ(z) ∂w ∂t (z, t) and x 4 = I ρ ∂φ ∂t (z, t) are the transverse and rotational momenta for z ∈ (a, b), t ≥ 0, which correspond to the kinetic energy. Hence, the Hamiltonian function is as follows: The dissipation operator is defined as follows: with the translational and angular viscous fraction constants R t and R r .
As shown in Figure 1, the IPMC-actuated structure is fixed on a base (This base can be fixed or can be moved forward and backward by an electric motor. However, in this work, we consider the base as fixed, and only the stabilization and shape control problem of the flexible structure are investigated), and the tip side is controlled. In this condition, we consider that, on fixed side a, the velocity and the angular velocity are null, while on free side b, the strain and the moment are zero. Thus, we consider the boundary conditions as the boundary input, and the boundary power conjugate outputs are as follows: We define B : C i → X (C i denotes an i-dimensional complex space) as the distributed input map; u d ∈ C i as the distributed moment density applied to the beam, which corresponds to the torque generated by the IPMC patches in our case; and y d ∈ C i as the power conjugated output of u d , i.e., the distributed angular velocity. The distributed input operator is given by b i (z)u di (t) on the ith spatial section I bi = [α i , β i ]. We note that b i (z) = 1 if z ∈ I bi and b i (z) = 0 elsewhere and that i ∈ {1, 2, . . . , m} if m actuators are glued onto the beam. We consider the angular velocity mean values as the output in the same intervals Thus, the distributed input is given by the following: where The output variable y d = B * Lx is the power conjugate variable of the input. Hence, one can compute the energy balance of the system as follows: ∂H b ∂t ≤ y T d u d .

The IPMC Actuator Model
The dynamics of IPMCs are modeled as the coupling of three different physical contributions: the electric part from the electric double layer between the electrodes, the diffusion phenomena of water and cations, and the mechanical contribution. The physical deformation induced by the applied voltage is primarily caused by the diffusion of a cation flux in the membrane between the electrodes (see Figure 2) [2]: when a voltage source is applied to the edge of the IPMC actuator, the potential difference in the electric double layer transfers the cations and water molecules to one side of the electrode in the polymer gel. This transfer causes the gel to swell and a bending moment to be applied to the mechanical system. In this work, the interconnection between the IPMC actuator and the beam is assumed to be perfect. Thus, we consider that the mechanical contribution of the IPMC actuator is combined with the beam as part of the Timoshenko beam model. For control purposes, a simplified lumped RLC model [20] is used to model the electric dynamics of the IPMC. The torque generated by the IPMC patch is proportional to the voltage applied.
with the state variables vector x a = ϕ Q T , where Q is the charge of the capacitor and ϕ is electric flux for each IPMC equivalent electrical model: The dissipation matrices R 1 ∈ R m×m and R 2 ∈ R m×m of the IPMC actuator are defined by the resistances r 1i and r 2i of each equivalent IPMC model, where i ∈ {1, 2, . . . , m}: The total electrical energy of the m IPMC actuators is considered to be the Hamiltonian of the actuator: where we define the capacitance matrix C ∈ R m×m and the inductance matrix L ∈ R m×m as follows: The input variables u and u a are the voltage applied on the two electrodes of the IPMC actuator and the current input due to mechanical deflection of the actuator structure, respectively. Their power-conjugated outputs are y = ∂H a ∂ϕ , the current over the inductance, and y a = ∂H a ∂Q , the voltage of the capacitor. We define the interconnection relation between the IPMC actuator systems and the flexible beam system: The capacitor voltage y a provides the bending moments of each actuator with a constant factor k i . On the other hand, we assume that the power exchange between the flexible beam and IPMC actuators is perfect, i.e., the interconnection is power-preserving. Consequently, the beam movement generates current u a applied to the capacitor.
Considering the IPMC actuator Equation (8) and the flexible Equation (1), the port-Hamiltonian formulation of the complete system is defined by the following: where u, y ∈ R m , x = [x, x a ] T , with the appropriate dimension zero matrices 0. The state space of the coupled system is Due to the energy-preserving interconnections, the total energy of the system is the sum of the Hamiltonian function of the two coupled sun-systems: where the energy operator Q of the coupled PDE-ODE system is as follows: For simulation and control design purposes, the PDE-ODE coupled system (12) needs to be discretized. At the same time, in order to use the passivity-based control law, the port-Hamiltonian structure should be preserved. To this end, the structure-preserving Mixte finite element [21] discretization method is employed to discretize the system (12), which leads to a finite dimensional system as follows: where x 1n , x 2n , x 3n , and x 4n are the discretized state variables of the infinite dimensional model of a flexible beam and where the matrices T and S are the discretization of the differential operator and the coupling term of the PHS Timoshenko beam presented, which are

Remark 1.
The discritization method used in this paper is the mixed finite element method used to preserve the port-Hamiltonian structure such that we can use passivity-based control using the discretized finite dimensional system (15). We can also use other structure-preserving methods to discretize the system (12), such as the pseudo-spectral method [22], the finite difference method on a staggered grid [23], and the finite volume structure-preserving discretization method [24]. A literature review on distributed parameter port-Hamiltonian systems and their discretization methods can be found in [25].

Control Design via IDA-PBC
In this section, we propose a control law of the overall endoscope system (12). The control objective is to achieve a desired position of the beam and to acquire a desired performance by regulating the input voltages of the IMPC patches. The control block diagram is depicted in Figure 3, where the coupled system to control is composed of a flexible beam and several IPMC actuator patches interconnected by current and torque. The control law is designed for interconnection and damping assignment passivity-based control (IDA-PBC [14,26]). The main idea of the control law is to match the open-loop system with a target system using state feedback control law.

Ida-Pbc Control Method
First, we briefly recall the basic principles of the IDA-PBC methodology developed in [14]. We consider a open-loop port-Hamiltonian system in its general form, and we stabilize it around a desired equilibrium point x * .
Let us define an asymptotically stable PHS target systeṁ g ⊥ is a full rank left annihilator of g, i.e., g ⊥ g = 0. The PDE is a so-called matching condition. Furthermore, the Hamiltonian function H d (x) should satisfy the following: The closed-loop port-controlled Hamiltonian system with the feedback law is (locally) and asymptotically stable at the equilibrium x * ; see [14] for details. Hereafter, with the Port-Hamiltonian formulation of the representation of the interconnected total system, we propose the control laws for the stabilization of an IPMC-actuated flexible beam.

Control Design
In this subsection, we propose an IDA-PBC control law to stabilize the complete system (12). The control design is applied on the discretized port-Hamiltonian system (15), which allows us to preserve the structure. We match the open-loop system with a target system using state feedback control law, as described in Figure 3.
First, we consider not modifying the closed-loop interconnection matrix J d = J. As the system has a sensitive oscillator due to the mechanical nature of the beam, we consider additional energy damping R d = R + R c .
In order to find the set of desired Hamiltonian functions H d as proposed in [14], Equation (15) is projected onto the orthogonal space corresponding to the matching condition with input matrix g u : where g ⊥ u is a full rank annihilator. To facilitate the calculation, we set g ⊥ u as follows: We define the desired closed-loop Hamiltonian in the quadratic form: The equilibrium profile vector is defined as follows: We set the symmetric matrix Q d as follows: with the desired equilibrium position of the system as Remark 2.Q 3 , C , and L are the desired stiffness vector, desired capacitance vector, and desired inductance vector of the closed-system to be calculated. k i , k = 1, 2, 3 are constant vectors. We show later that these vectors are control parameters, and the parametrization of Q d is used for the resolution of matching equations so that the matching conditions are satisfied.
We set H d (x) = H(x) + H c (x) using the discretized system (15), and we find the developed form from the matching condition (21): where Q ∈ m×m , φ ∈ m×m , and x i ∈ n×1 .
We find that the desired Hamiltonian function is independent from x 1 , x 2 , and x 3 and has cross terms among x 3 , φ, and Q from the matching Equations (26)-(28). Thus, we set the gradients of the desired Hamiltonian as follows: Taking Equations (29)-(31); the set gradients of the closed-loop Hamiltonian; and the gradients of open-loop Hamiltonians ∂H ∂x 3 = Q 3 x 3 , ∂H ∂Q = C −1 Q, and ∂H ∂φ = L −1 φ into account, we have the gradients of H c : In order to find a solution in which H c satisfies the matching conditions (26)-(28), we set  (27) and (28). Then, the choice is made by fixingC and by satisfying the equations obtained. From the complete system dynamic (12), by computingẋ(x * , u * ) = 0, we find the equilibrium relation among x * 3 , φ * , and Q * : The condition (19) guarantees that, in the closed-loop Hamiltonian system, the equilibrium x * is the strict minimum, and the following equation interprets this condition: The left side of Equation (38) is verified naturally by setting the gradient H d in Equation (29) to that in Equation (31). The inequality on the right side of Equation (38) indicates that the Hessian of H d should be positive definite at the desired equilibrium, which yields the following condition on the control design parameter C : From the gradients of H d , H c , and H, we apply the set control parameters to the matching condition (21). Then, we obtain the control law that behaves as the target system (17) with a(n) (asymptotically) stable x * .

Control Validation by Experimentation and Simulation
In this section, through experimentation and simulations, we present the performances of the closed-loop system with the designed nonlinear state feedback controls for the one-IPMC patch case and for the multi-actuation case of the flexible beam. The control objective here is to stabilize the coupled system (12) with one or several IPMC actuators to a specific using the finite dimensional IPA-PBC controller (39). The desired position profile is computed by the transverse momentum distribution x 2 . Figure 4 presents the experimental setup. We use a dSPACE control interface and a PC with MATLAB and the Simulink software to acquire the measurements and to implement the controller by generating the voltage across the IPMC patch. The measurement of displacement is acquired by the KEYENCE (LK-G152) laser displacement sensor.
The physical parameters and the identified parameters are shown in Table 1. All these parameters are obtained by identification from the experiment setup of Femto Lab, Besancon, France.

Control of a Single IPMC-Actuated Flexible Beam
This subsection illustrates the closed-loop behavior of the system obtained through experimentation with the IDA-PBC control law (39) from Section 3 for a flexible beam actuated by a single IPMC actuator using the voltage across the IPMC as the control input. The control objective is to drive the system to this desired profile and to reduce the beam vibration. In this case, the length of the IPMC patch is 0.045 m, and the IPMC patch is placed in the middle of the flexible beam between 0.0575 m and 0.01025 m along a total length of 0.16 m. In the following, the tip displacements are measured experimentally by the laser sensor.
In Figure 5, we present the experimental results using the IDA-PBC control law without changing the control parameter C , i.e., C = C = 0.058F, and only the desired beam tip position is set at 5 mm. position stays the same. The raising time is drastically reduced compared with the looped system without changing C in Figure 5 . The endpoint of the IPMC-actuated structure is presented in Figure 6. One can that, without a damping injection, the response oscillates a lot due to the beam fle (the solid black line). To cope with this oscillation, the damping injection is intr into the control law. The oscillation is reduced significantly while the added da increases. In order to improve the time response, we shape the closed-loop energy by varying the control parameter C . In Figure 6, we present the experimental results using the IDA PBC control law with energy shaping. The control design parameter to assign the closedloop dynamic is chosen as C = 0.01 F, and the desired beam tip position stays the same. The raising time is drastically reduced compared with the closed-looped system without changing C in Figure 5.
The endpoint of the IPMC-actuated structure is presented in Figure 6. One can observe that, without a damping injection, the response oscillates a lot due to the beam flexibility (the solid black line). To cope with this oscillation, the damping injection is introduced into the control law. The oscillation is reduced significantly while the added damper r c increases.
looped system without changing C in Figure 5 .
The endpoint of the IPMC-actuated structure is presented in Figure 6. One can observe that, without a damping injection, the response oscillates a lot due to the beam flexibility (the solid black line). To cope with this oscillation, the damping injection is introduced into the control law. The oscillation is reduced significantly while the added damper r c increases. It is well known that the activity of IPMC actuators depends on their humidity (the concentration of the water molecule), which decreases during their actuation. It is validated by experiment in [27] that as the humidity level goes down, the Young's modulus continuously increases, the strain-rate damping coefficient and dielectric constant continuously decrease, which lead to the activity reduction of IPMC. This phenomenon has been observed during the experimental validation of the proposed IDA-PBC controller shown in 7. We can see that, at the end of the actuation, the activity of the IPMC actuator is visibly reduced. To overcome this default, we propose adding an integral action on the controller (38). The integral of the error between the desired tip position q * and the real tip position q is added as follow: where u is the IDA-PBC control law obtained in (38). In this case, the control diagram becomes the following ( Figure 8): It is well known that the activity of IPMC actuators depends on their humidity (the concentration of the water molecule), which decreases during their actuation. It is validated by experiment in [27] that as the humidity level goes down, the Young's modulus continuously increases, the strain-rate damping coefficient and dielectric constant continuously decrease, which lead to the activity reduction of IPMC. This phenomenon has been observed during the experimental validation of the proposed IDA-PBC controller shown in Figure 7. We can see that, at the end of the actuation, the activity of the IPMC actuator is visibly reduced. To overcome this default, we propose adding an integral action on the controller (39). The integral of the error between the desired tip position q * and the real tip position q is added as follows: where u is the IDA-PBC control law obtained in Equation (39). In this case, the control diagram becomes the following (   The above proposed controller (40) is also implemented in the experimental setup. In Figure 9, the integral action is added to two IDA-PBC different controllers. The blue dashed line presents a closed-loop response with the IDA PBC controller parameter C = C = 0.058 F. The integral action is activated at 25 s when the IPMC starts to lose its activity and the beam tip position starts to decline. One can see that the beam tip returns to the desired position. The red solid line shows the closed-loop response with IDA-PBC controller parameter C = 0.02 F = C. The integral action can overcome the default when the IPMC actuator becomes less efficient due to the decrease in the water molecule concentration of the actuator.

o
The above proposed controller (39) is also implemented in the experimental set In Figure 9, the integral action is added to two IDA-PBC different controllers. The b dashed line presents a closed loop response with the IDA PBC controller parameter C C = 0.058F. The integral action is activated at 25 seconds when the IPMC starts to lo its activity and the beam tip position starts to decline. One can see that the beam returns to the desired position. The red solid line shows the closed loop response w IDA-PBC controller parameter C = 0.02F = C. The integral action can overcome t default when the IPMC actuator becomes less efficient due to the decrease in the wa molecule concentration of the actuator.

Multi-actuation of a flexible beam
In order to improve the spatial accessibility to satisfy the endoscope working conditi the flexible beam should be capable of being shaped into a desired shape. We propose multi-actuated flexible structure. The flexible beam is actuated by four IPMC patches. T IPMC patches are placed along the clamped side at 0m − 0.018m, and the others are plac between 0.036m and 0.054m, between 0.072m and 0.09m, and between 0.108m and 0.126

Multi-Actuation of a Flexible Beam
In order to improve the spatial accessibility to satisfy the endoscope working condition, the flexible beam should be capable of being shaped into a desired shape. We proposed a multi-actuated flexible structure. The flexible beam is actuated by four IPMC patches. The IPMC patches are placed along the clamped side at 0-0.018 m, and the others are placed between 0.036 and 0.054 m, between 0.072 and 0.09 m, and between 0.108 and 0.126 m, as shown in the top half of Figure 10. The control objective is to converge the system to the desired configuration of the endoscope (Figure 10), defined by the joint and tip position [0.01, 0.5, 1, 0.57, −0.8] mm, and to reduce the beam vibration simultaneously. We recall the distributed input map B of the flexible beam model: where i ∈ {1, 2, . . . , 4} represent the ith patch of the IPMC actuators glued onto the beam. The distributed input variables are the distributed moment: b i (z)u di (t) on the ith small intervals I bi ∈ α i , β i of the spatial space [a, b]. b i (z) = 1 if z ∈ I bi , which means an IPMC actuator is in the interval I bi ∈ α i , β i , and b i (z) = 0 elsewhere. We choose the design parameter C = 0.0058F. Different IPMC patches were actuated sequentially from the clamped side to the free-hand side. Different IPMC patches are actuated at 0, 15, 30, and 45 s. The bottom left side of Figure 10 illustrates the different positional displacements of the beam for the control law with (r c = 100 Ω) or without damping injection. The bottom right side of Figure 10 illustrates the tip displacement for the control law with and without damping injection. We can conclude that, with the proposed control law, we can shape the beam to the desired shape.

Conclusion and Perspectives
We investigate the modeling and the control design problem of a IPMC-actuated flexible beam using the port-Hamiltonian approach. The flexible beam dynamic is modelled by a Timoshenko beam model, while the IPMC actuator dynamic is described by a lumped RLC equivalent circuit model. It has been shown that the PDE-described flexible beams are interconnected with the ODE-described IPMC actuator model. The control strategy is composed of an IDA-PBC passive control method coupled with damping injection.
The closed-loop response time of the system is accelerated by energy shaping, while the damping injection is used to compensate for the oscillation of the flexible beam. Finally, an experimental setup was applied to validate the proposed control law. In the mono-actuation case, the control law implemented stabilizes the system to the desired position. The closedloop response was visibly faster, and the vibration of beam was reduced significantly with the damping injection. However, at the end of actuation, the activity of the IPMC actuator was visibly reduced due to its physical nature, which causes the lack of humidity to reduce the activity of the material. An integral action was added to the controller in order to overcome this limitation. Furthermore, a multi-actuation case with four IPMC patches was simulated in order to shape the beam to a desired shape. The simulation result shows the effectiveness of the control method presented.
As a prospective work, we shall consider the parameter uncertainty and the effect of external perturbations as the actuation of IPMC is sensitive to humid working conditions. We shall complete the study with an analysis and demonstration of the integral action for the designed controls. The robustness of the control law will also be investigated in future work. Furthermore, the complete IPMC actuator model under a port-Hamiltonian framework was proposed in [11], where the diffusion of water and the cations of the polymer were considered. How this complete actuator model can be used to control the flexible beam will be considered.