On the tuning of a nonlinear energy‐based regulator for the positioning of a fully actuated surface marine craft

Funding information Defence Science and Technology Group Abstract The authors address the problem of tuning a non-linear energy-based regulator for the positioning of a surface marine craft. Interconnection and damping assignment passivity-based control (IDA-PBC) is used for the control design, resulting in passive target dynamics that can be expressed as a port-Hamiltonian system (PHS). The IDA-PBC methodology has been successfully utilised in several applications, however, there has been minimal development in tuning methods that can analytically assist the designer to achieve desired response characteristics. It is demonstrated that eigenvalue assignment of the linearised target dynamics in PHS form can significantly aid the tuning process. Based on this analysis, the authors propose a systematic tuning approach to achieve certain performance and response characteristics. A comprehensive demonstration of the proposed tuning method is provided for the position regulation of an underwater vehicle in the horizontal plane in a case study, where numerical analysis of robustness is also conducted.


INTRODUCTION
The dynamic response of mathematical models of marine craft involves complex fluid-body and environmental interactions, therefore these models often present a significant degree of uncertainty. In the presence of uncertainty, passive energy-based non-linear control methods have proved to be effective in controlling marine craft, see for example [1][2][3]. In recent decades, interesting applications of energy-based approaches have been proposed for the motion control of marine craft. In [4], a Lagrangian approach was adopted and the problem of stabilisation of fully actuated underwater vehicles was considered. A control law was designed in [5] for the problem of position regulation of fully actuated marine craft in three degrees of freedom. In [1], the problem of dynamic positioning of offshore vessels was addressed. The treatment of underactuation and more realistic hydrodynamics were described in [3], while the addition of energy-based guidance was considered in [6]. In all of these applications, the tuning of target dynamics was done based on designers' intuition. This can be achieved smoothly in energybased designs with limited number of parameters, such as the design in [5], whereas the tuning process becomes more difficult in cases where designs become more complex and several criteria are desirable for good time-domain performance, see for example [3].
Conventional tuning of the target dynamics for a non-linear control law has been conducted based primarily on non-linear time-domain objectives. However, non-linear control designs, such as interconnection and damping assignment passivitybased control (IDA-PBC) design (see e.g. [7]), can benefit from frequency-domain considerations in tuning. For example, local linear dynamics assignment was adopted in [8] complementing the IDA-PBC methodology to tune the large number of free parameters in a reasonable manner and providing transparency with respect to the local behaviour in closed loop. Eigenstructure assignment was used in [9] to assist with the IDA-PBC tuning process for the position regulation of a surface marine craft to the origin, providing a mechanism for simultaneously considering the frequency-domain and time-domain characteristics. The tuning method was proposed using a frequency-domain approach, whereby the closed-loop system was linearised about the equilibrium (operating) point, which was assumed to be the origin, and the attainable eigenstructure assignment was investigated. However, although there was good performance in the responses of the linearised closed-loop system, there was large undershoot in the yaw angle of the non-linear closed-loop system, and, to the best of the authors' knowledge, there is little guidance on methods to tune the controller presented in [9]. A tuning procedure is needed to overcome tuning difficulties and undesirable response characteristics, for example, undershoot and overshoot.
Our main contribution in this paper is to present a novel simulation-based process for the method proposed in [9] to provide a systematic way of tuning the regulation controller designed in [5], such that certain performance criteria are met. In particular, we address the tuning of the energy-based controller for the position regulation of a surface marine craft based on eigenvalue assignment of the linearised target dynamics, relaxing the assumption of the equilibrium point at the origin. The analysis of the admissible closed-loop eigenstructure allows for selecting simple eigenvalues, which ensures robustness properties [10], and simultaneously reducing the set of controller parameter values. In addition, we assign non-linear damping for the closedloop system, while in [9] the non-linear damping component in closed loop was assumed to be equal to the non-linear damping component in open loop.
The motivation for simulation-based tuning rather than optimised tuning is justified due to the nature of the problem. There are vast alternatives for tuning and we are interested in finding tuning matrices such that the linearised closed-loop system has desired eigenvalues and simultaneously certain performance objectives are satisfied for the non-linear closed-loop system. In other words, we are interested in satisficing rather than optimal tuning of the energy-based controller in the sense that it is sufficient to select desired eigenvalues and controller parameters for a performance that satisfies the requirements. Satisficing is a term introduced by Simon [11] to describe a decision-making strategy that aims at a satisfactory or adequate result rather than the optimal solution.
We consider the tuning of two types of controllers, the first one is the standard set-point controller, and the second is a switched controller that uses an intermediate set-point, which may aid in performance improvement with regard to the position trajectory. Moreover, for position regulation to the origin, we propose systematic tuning of the energy-based controller using quadratic and trigonometric energy functions taking inspiration from [12], where it was shown that it is possible to improve heading control using a trigonometric energy function.
The remainder of the paper is organised as follows. In Section 2, we provide a brief description of the IDA-PBC methodology. In Section 3, we describe the problem of position regulation of fully actuated surface marine craft, and consider candidate control designs for tuning. A method for tuning the stabilising controller based on eigenvalue assignment of the linearised closed-loop dynamics is provided in Section 4, and a systematic process for the selection of eigenvalues of the linearised closed-loop system and non-linear damping parameters of the controller in Section 5. The analysis is illustrated with a comprehensive case study of an unmanned underwater vehicle in Section 6. Finally, concluding remarks and future work are offered in Section 7.

INTERCONNECTION AND DAMPING ASSIGNMENT PASSIVITY-BASED CONTROL
The objective in energy-based control is to shape the response of a system such that the energy minimum in closed loop is obtained at the desired equilibrium. Modelling a mechanical system as a port-Hamiltonian system (PHS), also called port-controlled Hamiltonian system in [13], we can use IDA-PBC to enact such an energy-based control outcome, as described in [7]. The term passivity-based control is used to define a control design method to passivise a system with a storage function having a minimum at the desired equilibrium point.
The IDA-PBC method shapes the total energy, that is, the kinetic and potential energy, and injects damping in closed loop. The controller is obtained by matching the dynamics of the open-loop system with the desired dynamics of the closed-loop system. For a survey on IDA-PBC methodology, the interested readers are referred to [14] and the references therein.
A port-Hamiltonian system with dissipation is described bẏ where E(x) is antisymmetric (skew-symmetric) matrix , that is, E(x) = −E(x) ⊤ , and describes the interconnection of the energy storing in the system, F (x) is positive semi-definite matrix, that is, F (x) ≥ 0, and describes the dissipation in the system, and the matrix G(x) weighs the action of the input and defines the output, see for example [1,15]. The objective is to construct a controller such that the desired closed-loop system has the PHS forṁ is bounded from below and minimised at the equilibrium point x * , ensuring stability of x * , see for example [14].

Model of a surface marine craft
The classical model of a marine craft in three degrees of freedom, namely, surge, sway, and yaw, is the following where ≜ [ n, e, ] ⊤ is the generalised-position vector, ≜ [ u, v, r ] ⊤ is the body-fixed velocity vector and is the vector of total forces and moments, see for example [16]. The terminology in the sequel is standard, see for example [17]. The mass matrix M, which includes the rigid body and the added mass matrix components, is symmetric and is given by where m is the mass of the marine craft, x g is the forward offset of the centre of gravity relative to a reference point, and Ẋu, … , Ṅr are the added mass coefficients. The Coriolis-centripetal matrix, due to the rotation of the body-fixed reference frame with respect to the inertial reference frame, is antisymmetric and has the following structure: where The damping matrix D( ), which is assumed to be diagonally dominant, has the form: where D is the linear damping component due to potential damping and possible skin friction, and D n ( ) is the nonlinear damping component due to quadratic damping and higher-order terms. Finally, the rotation matrix R( ) about the vertical axis (yaw) is an element in SO (3), that is, it is orthogonal and det R( ) = 1, and given by

IDA-PBC control designs for position regulation of a surface marine craft
In this section, we describe IDA-PBC control designs for position regulation of a surface marine craft, which will be used for the tuning analysis in this paper. The objective in the problem of position regulation of a surface marine craft is → * and → 0. For the position regulation of a surface marine craft using energy-based control, we consider the non-linear system: where [ x 1 and the Hamiltonian is which is the total kinetic energy, see for example [1]. The desired closed-loop system has the PHS form: whereD d (x 1 ) > 0 is the desired dissipation given bỹ where D d > 0 is the desired linear component andD d,n (x 1 ) ≜ D d,n (M −1 x 1 ) > 0 is the desired non-linear component. We assume thatD d (x 1 ), or, equivalently, D d ( ) has the following form: where The elements of the matrices D d and D d,n are tuning parameters for the dissipation. The desired Hamiltonian  d (x 1 , x 2 ), with a minimum at the desired equilibrium, can be chosen to be quadratic as follows: where K is a symmetric positive definite matrix to be chosen. The associated matching problem for the desired Hamiltonian in (19), corresponds to equating the right-hand side of (9) with the right-hand side of (13), which leads to the controller The controller assigns damping and the total energy of the system is reshaped by adding potential energy such that the system is attracted to the desired position like a virtual spring.
Since the desired Hamiltonian has a strict minimum at , global asymptotic stability of the desired equilibrium is ensured by choosing the desired Hamiltonian in (19) as a Lyapunov function and applying the invariance principle, see for example [18].
In this paper, we also propose a switched controller for two operating points , assuming that is an intermediate operating point. Two controllers are constructed as in (20) for the two operating points. The first desired Hamiltonian is and we apply the controller: until the motion variables asymptotically converge to the intermediate position and orientation x * 2,1 with a certain tolerance, for example, the error between the actual and desired motion variables is less than 0.001. Then, assuming that the initial position and orientation is x * 2,1 , the desired Hamiltonian is and we apply the second controller: The controllers are switched only once in such a way that the controller 1 is applied from initial time t 0 to the switching time t sw and then the controller 2 takes over from t sw to infinity. This single switching will not compromise the stability, since the two controllers are globally stabilising controllers. The stability of the closed loop may be compromised in cases where multiple switching strategies are used or in cases where the controllers are locally stabilising. In these cases, the control law can be designed using the criteria for global asymptotic stability found in [19][20][21] using multiple Lyapunov functions, and in [22,23] using equilibria-dependent Lyapunov functions. Multiple switching strategies are outside of the scope of this paper. For position regulation to the origin, the desired Hamiltonian can be chosen to be trigonometric as follows: This energy function was proposed in [12] and was motivated by the energy function of a pendulum. This energy function has multiple minima at In this case, matching the right-hand side of (9) with the righthand side of (13), the controller becomes: whereK ≜ diag{K 1 ,K 2 ,K 3 } > 0 to be chosen. Similarly, asymptotic stability of the desired equilibrium at the origin is ensured by choosing the desired Hamiltonian in (25) as a Lyapunov function and applying the invariance principle.

TUNING OF THE ENERGY-BASED CONTROLLER VIA EIGENVALUE ASSIGNMENT IN LINEARISED CLOSED LOOP
A tuning method based on linearisation of closed-loop dynamics and eigenvalue assignment is proposed in this section.
The closed-loop system (13) has the formẋ = f (x) and it has equilibrium pointx. We assume that the equilibrium point . Defining the deviations from the equilibrium asx ≜ x −x, we may obtain the linearised closed-loop systeṁx where A way to tune the energy-based controller such that the linearised closed-loop system has desired eigenvalues is to firstly compute the characteristic polynomial of the linearised closedloop system, which is the following determinant: We assume that This assumption together with the assumption of diagonal D d in (16) is made for simplicity and to overcome the limitation of choosing maximum four eigenvalues as was the case in [9]. Assuming diagonal D d andK, we need to compute only six parameters for these matrices. This will be done by assigning six eigenvalues of the linearised closed-loop system. It can be easily shown that the linearised open-loop system in (9) is controllable and observable, so that the eigenvalues of the linearised closed-loop system in (13) can be chosen arbitrarily. where We are interested in assigning six non-defective eigenvalues, that is, simple or semi-simple, because systems with defective eigenvalues are necessarily less robust, see for example [10]. We consider the case of simple eigenvalues and the desired closed-loop characteristic polynomial is equal to ( − 1 )⋯( − 6 ). The distinct 1 , … , 6 are assumed to be negative real to guarantee linear stability. Note that linear stability does not guarantee nonlinear stability, however the latter is guaranteed by the PHS form of the target dynamics, which cannot be satisfied if the linearised closed-loop system is unstable. It can be shown that where e 1 , … , e 4 are the elementary symmetric functions of 3 , … , 6 given by The parameters D d,1 ,K 1 are computed by which are derived by equating the quadratic polynomial in (32) with the quadratic polynomial in (38) multiplied by M 11 . The parameters D d,2 , D d, 3 ,K 2 ,K 3 are computed by solving the following system of four non-linear equations which is obtained by equating the quartic polynomial in (32) with the quartic polynomial in (38) multiplied by P 4 in (33). If * = 2 , where ∈ ℤ, then R(x * 2 ) = I 3 and K =K. Note that linearising the closed-loop system using the trigonometric energy function, the elementK 3 is multiplied by cos * which is equal to 1 for * = 2 , therefore we will not distinguish betweenK andK in this case.
Eigenvector assignment for the non-singular quadratic matrix polynomial 2 M + D d +K is outside the scope of this paper. For the problem of robust eigenstructure assignment in nonsingular quadratic matrix polynomials, the interested readers are referred to [10] and the references therein.

SYSTEMATIC PROCESS FOR THE SELECTION OF EIGENVALUES AND NON-LINEAR DAMPING PARAMETERS OF THE ENERGY-BASED CONTROLLER
To tune the energy-based controller in (20) or (26), we need to select six closed-loop eigenvalues to compute the six parameters of D d andK in (16) and (31), but also select the three parameters of D d,n in (18). In [9], the non-linear damping parameters were chosen to be equal to the non-linear damping parameters of the open-loop dissipation and there were several choices of eigenvalues. The eigenvalue selection was made in such a way to avoid reaching the input saturation limit.
In the case study of [9], there was large undershoot in the closed-loop yaw angle. For good performance, it is desirable to avoid undershoot and overshoot in the responses of position and orientation. For this reason, we propose a tuning method to achieve the smallest convergence time for a certain tolerance while satisfying the following criteria: (I) the control forces and moments are limited to certain values. (II) there is minor undershoot and overshoot.
The process is simulation based and the initial step is to select a set of positive numbers for the non-linear damping parameters, and a set of six negative real numbers for the eigenvalues. First, we choose a set of numbers for the non-linear damping parameters, for example, where Δ, ∈ ℕ, and construct a matrix L 1 of all possible permutations with repetition of three elements of  1 . The number of alternatives for the non-linear damping parameters is 3 (or 2 if one parameter is fixed), so that L 1 is an 3 × 3 (or 2 × 3) matrix. For the set of desired distinct eigenvalues, we may choose, for example, where z ∈ ℝ − and is a small positive number. The selection of the eigenvalues in  2 can be driven by requirements (such as avoidance of sea sickness), arbitrary or, for quicker tuning, based on empirical insight from an initial simulation. We construct a matrix L 2 of all possible permutations of the elements of  2 without taking into account the order of the first two elements or the order of the remaining four elements. This can be done by computing all possible combinations of the elements of  2 taken two at a time, and completing them with the remaining four elements. The number of these combinations of alternatives for eigenvalues is Next, we construct a 15 × 6 matrix L 3 consisting of the corresponding six parameters of D d andK computed using (43) and solving the system of four non-linear equations in (44) for each row of L 2 . Then, for each row of L 1 , we concatenate horizontally each row of L 3 and construct a 15 3 × 9 (or 15 2 × 9) matrix L of alternatives for the parameters of D d ,K and D d,n .
For each row of L, we run simulations of the responses of the motion variables and control forces and moments, subject to the constraint that criteria (I) and (II) are satisfied. If there is no successful simulation in the sense that there is no simulation for which criteria (I) and (II) are satisfied, then we choose larger z and/or smaller and repeat the procedure. Each successful simulation is paused when the errors between the desired and actual position and orientation are sufficiently small. The plot responses of the motion variables and position trajectories corresponding to the smallest convergence time t conv for a certain tolerance are returned.
If the performance is not satisfactory, for example, convergence is slow, then the tuning method can be optionally repeated using smaller z and/or , and/or different Δ. If the tuning is satisficing in the sense that criteria (I) and (II) are satisfied and the performance is satisfactory, then the parameters of D d ,K, D d,n , the desired (ordered) eigenvalues and t conv are returned. A flowchart of the proposed process for the tuning of the energy-based controller is shown in Figure 1.
It should be noted that if no parameter selection is returned after repeating the procedure for different choices of z, and Δ, then the switched controller is recommended, because it is expected that the desired eigenvalues for satisficing tuning will be smaller than the ones using the controller for one operating point. The switched controller may also be advantageous in the case of large distance between the initial and desired position and orientation.
Let , , and  denote the sets of all possible alternatives, chosen alternatives and satisficing alternatives, respectively, for FIGURE 1 Flowchart of the proposed systematic tuning process the tuning of the energy-based controller, then  ⊆  ⊆ . The proposed process returns the satisficing alternative (if  is not empty) for which the fastest asymptotic convergence is achieved with a certain tolerance. If the objective is a quick tuning over a large number of alternatives, then the process can be modified to return the first alternative for which criteria (I) and (II) are satisfied. The choice of eigenvalues and non-linear damping parameters using the proposed process will be "good enough" to satisfy the desired criteria in a reasonable time frame. In other words, such a choice for tuning is sufficient in the viewpoint of satisficing, see for example [11]. Note that, in order to assist with the decision-making for satisficing tuning, the proposed process can be adapted to consider different metrics, for example, 1 -norm or 2 -norm can be used for the deviations between the desired and actual motion variables-see [24] and [25] for different types of norms.

CASE STUDY
We consider the model of an open-frame remotely operated underwater vehicle with a mass of 140 kg from [5]. In this case study, we illustrate the proposed process for the tuning of the energy-based controller for position regulation of the marine craft to desired values. The control forces and moments are limited to ±150 N and ±20 N⋅m, respectively.
We choose tol = 0.001, = 0.02, Δ = 100 and = 6. The negative real number z will vary from −0.12 to −0.4, which is based on empirical insight gained in [9]. To reduce the running time of simulations, we assume that D d,n,1 = 0 and if the performances are not desirable, further choices for this parameter can be made. Hence, the number of simulations is 15 2 = 540. We also conduct numerical analysis of robustness to parameter uncertainty by assuming that M, D and the parameters of D n ( ) are known with ±20% certainty, generating 20 samples of 500 uniformly distributed combinations within the assumed range and implementing the nominally tuned controllers.
First, we assume that the initial and desired position and orientation are [ 5 m, 3 m, 225 • ] ⊤ and [ 0 m, 0 m, 360 • ] ⊤ , respectively, and design two controllers using the quadratic and  (19) and (25). We will refer to these controllers as controller Q and controller T. Eigenvalue selection, tuning for the controllers Q and T, and convergence times are shown in Table 1.
The desired and actual motion variables, and position trajectories of the corresponding non-linear and linearised closedloop systems are shown in Figure 2. We observe that, using the controller Q, the actual position trajectory is closer to the desired position trajectory, while, using controller T, we have faster asymptotic convergence to the desired values. We also observe that the settling time of the linearised closed-loop system is smaller than the settling time of the non-linear closedloop system in both cases. The responses implementing the nominally tuned controllers Q and T for a sample of 500 uniformly distributed combinations within the assumed range are shown in Figures 3 and 4, respectively. It is observed that, using the quadratic function and the particular systematic tuning, there is better performance under parameter uncertainty.
We now assume that the initial and desired position and orientation are zero and [ 5 m, 3 m, 45 • ] ⊤ , respectively, and design two controllers using the quadratic energy functions:  ] ⊤ . We will refer to these controllers as controller A and controller B. Eigenvalue selection, tuning for the controllers A and B, and convergence times are shown in Table 2.
The desired and actual motion variables, and position trajectories of the corresponding non-linear and linearised closedloop systems are shown in Figure 5. We observe that, using the controller A, we have faster asymptotic convergence to the desired values, while, using the switched controller B, the actual position trajectory is closer to the desired position trajectory. We also observe that, using the controller A, the settling time of the linearised closed-loop system is quite smaller than the settling time of the non-linear closed-loop system with respect to the yaw angle. The responses in surge and sway position of the linearised closed-loop system are a good approximation of the corresponding responses of the non-linear closed-loop system in both cases for the particular tuning. The overall system using the switched controller B is stable as can be seen from the Hamiltonian in Figure 6, where it is shown that the Hamiltonian values over time for each subsystem are monotonically non-increasing during each mode. There is, however, an increment of the Hamiltonian when the controllers are switched. This increment on the energy is dissipated for the second controller, which takes over the closed loop for all time t > t sw , where t sw is the switching time. The responses implementing the nominally tuned controllers A and B for a sample

CONCLUSION AND FUTURE WORK
We propose a systematic process for the tuning of an energybased controller for the position regulation of a surface marine craft. A PHS model of a surface marine craft is used and the approach is based on stabilisation of the system at a desired position and orientation. The stabilising controller shapes the total energy by adding potential energy and injecting damping. The closed-loop system is expressed in PHS form and the target dynamics is linearised at one or two operating points.
We demonstrate a method based on eigenvalue assignment for the linearised closed-loop system, to tune the non-linear stabilising controller, considering quadratic and trigonometric energy functions for position regulation to the origin, and switched control design for the case of two operating points. The stability of the non-linear closed-loop system is guaranteed by the PHS form and the properties of the target dynamics, the dissipation matrix and the interconnection matrix. A simulation-based systematic process is proposed for satisficing selection of eigenvalues and non-linear damping parameters, in order to satisfy desired performance criteria. The performance of the method is illustrated with a case study for the position regulation of an unmanned underwater vehicle in the horizontal plane. This study also includes a numerical analysis of sensitivity to parameter uncertainty. Simulations show that the proposed tuning method is effective.
Future work will consider a tuning process for energy-based controller with integral action to guarantee position regulation in the presence of constant unknown disturbances. The work in this paper provides the basis for analysis of the full eigenstructure assignment, which can enable improved performance characteristics due to decoupling of the different degrees of freedom. This will also be investigated as part of the future work. Finally, a natural topic for future work is the adaptation of the proposed process to consider different metrics for satisficing tuning.