Control-informed ballast and geometric optimisation of a three-body hinge-barge wave energy converter using two-layer optimisation

This paper presents a systematic methodology to optimise the geometry of a three-body hinge-barge wave energy converter, to maximise the energy extraction of the device in given sea states and in sitespecific wave climates. To that end, a 5-degree-of-freedom mathematical model is proposed to describe the system dynamics in two-dimensional space and a two-layer optimisation is designed to find the optimal design and control variables. The inner-layer optimisation is used to find the optimal control parameters of the power take-off system and the outer-layer optimisation, which uses a genetic algorithm, is employed to find the optimal design parameters of barge lengths and of optimal ballast positioning. In the case study, this methodology is applied to a 1:20 scale prototype of the McCabe Wave Pump device. Numerical results indicate that the optimal dimensions of the device, under given sea states, can be found efficiently and accurately, and that there appears to be no obvious benefit in the use of three barges, over a two-barge system. © 2021 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).


Introduction
Wave energy converters (WECs) are used to capture the energy carried by ocean surface waves. Over the past few decades, a large number of WEC concepts have been proposed [1], and numerous theoretical, computational and experimental studies have been performed to investigate the performance of such devices. In order to maximise the energy extraction of a WEC from incident waves, a number of strategies can be employed [2e4]. Among them, two well-known approaches propose optimising the geometry of the primary capture system and employing advanced control strategies for the power take-off (PTO) system. Geometric optimisation is relevant to all types of wave energy conversion techniques, including point absorbers [5e9], oscillating water columns (OWCs) [10e12], and overtopping devices [13e15]. In [5], the authors optimise the geometric shape and the radius of a floating WEC, based on an average annual wave energy spectrum for the deployment location at the Atlantic marine energy test site (AMETS). In [6], the optimal diameter and draft of a one-body heaving point absorber are investigated for the nearshore region of Rio de Janeiro, where the optimisation process is based on a frequency-domain model and aims to maximise both absorbed energy and absorption bandwidth while providing a natural period close to the predominant wave period of the sea site. In [7], the optimal shape and size of a heaving absorber is determined through a numerical approach, based on frequency-domain analysis. In [8], the authors perform geometric optimisation for a conical-bottom buoy with three types of PTO which are linear, constant, and quadratic non-linear, using the commercial software Flow-3D. To perform the geometric optimisation of the OWC type device, a simplified linear model is employed in [10] and a CFD model in used in [11]. The influence of different time scales on the geometric design of a bottom-fixed OWC device is highlighted in [12], showing the sensitivity to sea state, seasonal and annual periods over which the parameters are optimised. In relation to the geometric optimisation of the overtopping type WECs, the authors in [13] use a CFD approach incorporating the finite volume method to evaluate the relative depth on the design of the ramp geometry (ratio between the ramp height and its length) and to investigate the shape which leads to the highest amount of water inside the reservoir. Authors in [14] employed the same method to evaluate the influence of the ratio between the height and length of the ramp on the amount of mass that enters the tank for two different levels of submergence. Authors in [15] investigate the effect of five different geometry control scenarios on the overall hydraulic efficiency and overall hydraulic power of overtopping WECs, and find that adapting the crest freeboard of devices to the wave characteristics increases overall hydraulic efficiency and power.
Most endeavours so far have been limited to carrying out geometric optimisation independently of the control system, which has proved to have a significant influence on the energy capture of WECs [3]. Recently, PTO-control-informed geometric optimisation has been studied for several WEC concepts, particularly for pointabsorber type WECs and hinge-barge type WECs. In [16e18], results indicate that, for a 1-degree-of-freedom (DOF) point-absorber type WEC, the optimal radius and draft of the buoy can be obtained depending on the type of PTO control strategy considered during the design optimisation stage. In [19], results demonstrate that control-informed geometric optimisation can significantly improve the energy production of a three-body hinge-barge WEC, under both regular and irregular waves.
In addition to the PTO control strategy, another key factor to be considered during the design stage is the ballast mass, as the location of the centre of gravity governs the dynamics of rigid bodies and hydrodynamics of floating structures. In [20,21], the effect of mass redistribution is systematically investigated for a modified Duck WEC, and results indicate that the device's performance is changed by rearranging the ballast distribution and that it is possible to optimise the performance of the device by choosing an appropriate value for the centre of mass of the ballast for a certain sea state. More recently, results in [22] show that massoffset position has the greatest impact on the power production of a single-tether submerged spherical point absorber WEC, with asymmetric mass distribution and optimal mass distribution increasing the power production of the WEC by at least 1.5 times more than the generic single-tether point absorber.
However, to the best of the authors' knowledge, there are no studies systematically investigating the integrated impact of PTO control strategies, geometric size parameters, and ballast distribution on a hinge-barge WEC performance. In this paper, a two-layer optimisation is proposed, with the inner layer optimising the PTO control parameters and the outer layer optimising the geometry and ballast related parameters. The use of such a two-layer optimisation is not new (see, for example [16,18]), but the current study extends this state-of-the-art in considering a hinge-barge WEC with significantly more complexity than devices studied to date, specifically with regard to multi-body dynamics and user-defined ballast. The choice of optimisation routines is also reasonably standard, and adopted from the optimisation literature, though the necessity for a concurrent optimisation algorithm in the outer loop is required, given the non-convexity of the optimisation problem with respect to a number of the parameters to be optimised. The execution of such an optimisation across a range of sea states also adds novelty to the study.
Real sea states measured from a scale test site in Galway, Ireland, are used in the analysis. The proposed scheme can be used to effectively determine the global optimal design parameters of a WEC, i.e. geometric size and ballast weights, for the pre-selected/ considered deployment site, and it provides a new guideline of designing WECs, in particular multi-body connected WECs. The presented multi-DOF's motion equation is validated by the identification process, through using experimental data collected from tank test and numerical data computed by the mathematical model. The presented spectral method can accurately simulate dynamics of the multi-body hinge-barge WEC, and it can also be used to study the hydrodynamic response of other complex floating structures.
The WEC concept used in this paper is a three-body hinge-barge WEC, as illustrated in the authors' previous work [19], where control-informed geometric optimisation of the device was performed and optimal fore barge length and aft barge length of the device under regular waves, and irregular waves, were found. Earlier studies on this device can be found in [23,24], where the authors carried out optimal control of this device using a 4-DOF mathematical model and pseudo-spectral control calculations. Physical experiments were performed in wave tanks in the United States of America [25] and in Ireland [24] and tank test data are used in the identification stage of the numerical case studies. This study is broadly based around a 1:20 scale prototype model [26], with the intention of optimising its physical parameters, drawing on the validation of previous mathematical models at that scale [24,25].
The remainder of the paper is organized as follows: in Section 2, the methodology used for the overall geometric optimisation of the three-body hinge-barge WEC is briefly presented. In Section 3, the mathematical model that uses an embedding technique, based on Lagrangian mechanics, is explained for the multi-DOF multi-body system. Section 4 demonstrates the two-layer optimisation routine in detail and illustrates the spectral method used to solve the equation of motion. Section 5 shows the principle used to select the optimal design parameters of a WEC in site-specific wave climates, from a perspective of long-term operation of the WEC. In Section 6, the proposed two-layer optimisation procedure is applied to a small-scale prototype and corresponding numerical simulation results are presented. Finally, Sections 7 and 8 presents some discussion and conclusions, respectively.

Geometric optimisation methodology
As illustrated in Fig. 1, the candidate WEC used in this study consists of three floating barges, one damping plate and two PTO systems. The damping plate is rigidly connected to the central barge. The central barge has a separate hinge connection with the fore and aft barges. As the hinge-barge WEC is designed to operate along the direction of wave propagation, the system dynamics under consideration are confined to a two-dimensional space. Therefore, only the barge lengths, rather than the barge widths, are of interest. The original three-barge WEC is equipped with two PTO systems, one located between the fore barge and the central barge and the other located between the aft barge and the central barge.
The objective of the overall optimisation is to maximise the time-averaged power generation of the WEC in irregular waves and long-term operation, by integrating an optimal PTO control strategy and optimal ballast positioning at the geometry design phase. To approach the control-informed and ballast-optimisationinformed geometric optimisation, a two-layer optimisation routine is proposed. As illustrated in Fig. 2, the purpose of the inner layer is to optimise the PTO control variables, and the outer layer is designed to optimise the location of the centre of gravity, influenced by the ballast masses and the geometric parameters of the barges. In this study, the geometric parameters to be optimised are the lengths of fore and aft barges, i.e. L1 and L3, shown in Fig. 1, and the ballast-related parameters to be optimised are mapped to the position changes of the new centre of gravity to the centroid of fore barge and aft barge respectively, i.e. x d1, z d1, x d3, z d3 shown in Fig. 1. Additionally, this model-based geometric optimisation requires estimation of the energy production (as an objective function of the optimisation problem) of a device in the sea state under consideration. To this end, a 5-DOF mathematical model is required to describe the system dynamics. To model the collection of multiple bodies, linked by hinges or by rigid connection, the proposed methodology treats the three floating barges as free-response bodies in the hydrodynamic model and considers the damping plate and the central barge as one body, as they are rigidly connected, then incorporates all the constraints representing hinge connections in the formulation of the motion equations. Linear potential flow theory is used to solve the hydrodynamic problem. It has previously been shown that the hydrodynamics of hinge barges are predominantly linear [36].
The developed computational/mathematical model allows the control forces, the lengths, and the locations of the centres of gravity of the fore and aft barges to be adjusted. The PTO forces, or the corresponding control parameters, are optimised in the interoptimisation routine, fully considering the hinge connection and hydrodynamic interaction in all motion modes. This mathematical model is able to evaluate the wave-induced response of the central barge in heave, surge and pitch modes, and also allows computation of the relative rotation of the fore and aft barges with respect to the central barge, respectively.
Finally, the optimal ballast and the optimised geometric sizes, i.e. lengths of the fore and aft barges, are selected while incorporating the optimal PTO control strategy at the geometry design optimisation stage.

System dynamics
To describe the dynamics of the three-body hinge-barge floating WEC in a dimensional space, three kinds of reference frames are used: one global inertia frame, three local body frames, and the generalised frame. The global inertial frame is fixed in space, its orientation and location will not change over time, and it uses rotation and translation to define the general displacements of a rigid body in a multi-body system. The local body frame is a noninertial frame of reference, and its orientation and location in the global inertia frame varies over time. As depicted in Fig. 1, each local body frame is fixed on each barge, thereby the particles of a rigid body do not move with respect to its local body frame. Finally, the configuration of a multi-body system is identified by defining the location of the origin, and the orientation of the body frame of each rigid body, with respect to the global inertia frame. For example, the global position vector of the hinge point H 1 in Fig. 1 is defined by the location and orientation of local body frame O 1 À x 1 z 1 as: body analysis, and R O1 g is the global position vector of the origin O 1 . A o1g is the transformation matrix from a local body frame to the global inertial frame, defined as: where q o1 is the pitch rotation angle of local body frame O 1 À x 1 z 1 .
For small amplitudes of pitch rotation, the transformation matrix can be linearised using cosðq o1 Þz1 and sinðq o1 Þzq o1 . In a similar way, the global position vector of the hinge point H 1 can also be defined by the location and orientation of the local body frame O 2 À x 1 z 1 as: The generalised frame is used when the dynamic equations of a constrained multi-body system are formulated by the embedding technique. For a multi-body system, consisting of N interconnected rigid bodies, 6N generalised coordinates are needed to describe the configuration of this system in a 3-dimensional space, with 3N generalised coordinates are required for a 2-dimensional space. However, due to the existence of hinge connections, some generalised coordinates are not independent. Deriving expressions for the kinetic energy, force and virtual work in terms of generalised coordinates, the equation of motion is ultimately associated with the system-independent coordinates, with constraint forces automatically eliminated using the embedding technique [37]. For the three-body hinge-barge WEC, in two-dimensional space, the generalised coordinates are defined as: Q ðtÞ ¼ ½q 1 ; q 2 ; q 3 ; q 4 ; q 5 ; q 6 ; q 7 ; q 8 ; q 9 T ¼ ½x b1 ; z b1 ; q b1 ; x b2 ; z b2 ; q b2 ; x b3 ; z b3 ; q b3 T ; (4) where R Oi g ¼ ½x bi ; z bi T is the global position vector of the origin of body frame O i À x i z i , and x bi and z bi represent the Cartesian coordinates in the x and z directions, respectively. q bi is the orientation angle of local body frame O i À x i z i with respect to the global inertia frame O g À x g z g .
The number of independent generalised coordinates equals the number of DOF of a multi-body system. The three-body hingebarge WEC has 5 DOFs in two-dimensional space, and the independent generalised coordinates are defined as: Q s ðtÞ ¼ ½q b1 ðtÞ; x b2 ðtÞ; z b2 ðtÞ; q b2 ðtÞ; q b3 ðtÞ T : Based on the D'Alembert-Lagrange equation, the equation of motion of the three-body hinge-barge WEC is expressed [19,38] as: where M s is the generalised mass matrix associated with independent generalised coordinates, M ¼ diagðM 1 ; M 2 ; M 3 Þ is the mass matrix, M ∞ is the matrix of added mass at infinite frequency, P is the system Jacobian matrix, ing the wave excitation force vector of body i. The PTO force vector is where u 1 ðtÞ and u 2 ðtÞ are the PTO control forces applied at the fore PTO and at the aft PTO, respectively. The PTO control configuration matrix F PTO , for a 5-DOF threebody system, in two-dimensional space, is defined as: The independent velocity vector, V s ðtÞ, is defined through: VðtÞ ¼ PV s ðtÞ: Matrix P, derived from the linearised kinematic constraint equations, is defined as: P ¼ If the pitch velocities of the aft and of fore barges in V s ðtÞ are defined with respect to the pitch motion of the central barge, the system Jacobian matrix is expressed as: Àh H2 x3 0 0 0 1 1   3   7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  7  5 : The linearised viscous matrix is identified from experimental and simulation results. More details are given in [24].
where N f is the number of frequencies in the spectrum of the incident waves, N DOF is the number of degrees of freedom, H j and b H j are the experimental and theoretical transfer functions between the j th DOF and the incident wave, respectively.

Fluid-structure interaction
Assuming the fluid is homogeneous, incompressible, invicid and irrotational, linear potential flow theory is used to describe the interaction of rigid bodies with plane progressive waves in water of finite depth, with the free-surface and body-boundary conditions linearised. The assumption of potential flow permits the definition of the velocity potential Q ¼ Reðfe iwwavet Þ, satisfying the Laplace equation in the fluid domain, i.e., DQ ¼ 0. The linearised fluidstructure problem permits the decomposition of the velocity potential into incident, scatter and radiation components, i.e.: The complex velocity potential f I of the incident wave is defined as: where $\b$ is the angle of the incident wave relative to the positive direction of x g axis, A wave is wave amplitude, u wave is wave frequency, H dep is water depth, g is gravitational acceleration, and k is the real root of the dispersion relation u 2 wave ¼ gktanhðkH dep Þ. The excitation force, due to incident waves, is computed by integrating the hydrodynamic pressure over the wet surface S w : b F i e ¼ À iu wave r∬ Sw n i ðf I þ f S Þds; (16) where the unit vector n ! ¼ ðn 1 ; n 2 ; n 3 Þ is normal to the body boundary and points out of the fluid domain.

Centre of gravity and centre of buoyancy
The inertia matrix is defined as: M i ¼ The mass matrix M is diagonal, if the origin of each local body frame is set at the corresponding centre of gravity. It will also result in the elimination of off-diagonal terms during the transformation from the Cartesian frame to the generalised frame. Thereby, for simplicity and to eliminate the inertial coupling between the rotation and translation of each body frame, the origin of each local body frame is always fixed to the centre of gravity of each barge.
The original COG of the fore and aft barges coincides with the centroid, assuming that each barge has symmetric (or even) mass distribution. When the ballast is added, the COG of the fore and aft barges is located at some distance from their geometric centres. The COGs of the fore and aft barges are considered as parameters to be optimised, i.e. x d1, z d1, x d3 and z d3, shown in Fig. 1. Many forms can be taken to achieve the location change of the COGs when using ballast mass, e. g, by evenly placing the weight at the outer-side surface and bottom-side surface of the fore and aft barges, where different weighting masses will yield different COG locations in the horizontal and vertical direction, respectively.
The new COG location yields new wetted surfaces as well as new centres of buoyancy (COB), in still water (no waves). The COB of each barge always coincides with the centroid of the displaced volume of fluid. The total buoyancy has an identical magnitude to that of the total device mass, but an opposite direction. For the proposed two-dimensional problem, the new wetted surface for the new ballast configuration is determined from these wellestablished principles.

Two-layer optimisation of variables
The overall problem is to maximise the energy converted for the three-body hinge-barge WEC in the sea state under consideration, by finding optimal geometric design parameters and optimal ballast positions with information from the PTO control strategy at the design stage. This energy-maximisation problem has six variables, i.e., length of the fore barge L1, length of the aft barge L3, and location parameters related to ballast x d1, z d1, x d3 and z d3, as illustrated in Fig. 1.
A two-layer optimisation methodology is proposed to achieve the optimal solution. The inner optimisation is for the PTO control variables, where different control strategies can be implemented and control variables can be optimised in this loop for each geometry set and ballast configuration, under the given sea state. The outer optimisation is to optimise the geometric variables and ballast-related variables, based on the optimal PTO control forces obtained from the inner optimisation loop.

Inner-layer optimisation of PTO control forces
In this section, energy-maximisation control using the spectral method is demonstrated. States and control variables are represented by a linear combination of basis functions, following the development in [39]. Here, velocity and PTO control forces are approximated by truncated zero-mean Fourier series, and the basis functions are expressed as: F bs ¼ ½cosðw 0 tÞ sinðw 0 tÞ… cosðnw 0 tÞ sinðnw 0 tÞ T ; (19) where w 0 is the fundamental angular frequency.
The i th components of the velocity and position vectors, are defined, respectively, as follows: x i ðtÞzF T bs ðtÞ b x i ; x N dc T are the Fourier projection vectors of velocity and displacement of mode i, respectively. The total velocity and displacement vectors are formulated, respectively, as follows: where JðtÞ ¼ I N dc 5F T bs is a N dc block diagonal matrix and each block is F T bs . The symbol I N dc denotes an identity matrix of size N dc and the symbol 5 represents the Kronecker product of two where D dc ¼ I N dc 5 D. The differential matrix D2R N bs ÂN bs is blockdiagonal, and each diagonal block D n with n ¼ 1; 2; …; N bs =2 is The PTO control force F us ðtÞ is formulated as: where L. Wang and J.V. Ringwood Renewable Energy 171 (2021) 1159e1170 b u i ¼ ½b u 1 ; b u 2 ; …; b u N bs T is the control Fourier projection vector. Substituting Eqs. (22), (23), (25) and (27) into Eq. (6), the equation of motion is reformulated to a residual form: where r is a vector of size N dc Â 1, and its i th component is: v The residual form of the equation of motion is minimised by solving The discretised equation of motion turns into a linear system: where H ds is a block matrix with N dc Â N dc blocks: and L ds is a block matrix: The i th row, j th column block of L ds is: C ds is a block matrix: The i th row, j th column block of C ds is: where i ¼ 1; 2; …; N dc and j ¼ 1; 2. The total energy converted by the WEC is: and the time-averaged power is expressed as: The control variable optimisation issue is mathematically formulated as: The optimal solution b V * s for the unconstrained problem is: While Eq. (41) gives the solution for the optimal device velocity in a general (spectral) parametric form, it can be recast for the linear passive control case, where the control forces of the fore and aft PTOs of a 5-DOF three-body hinge-barge WEC are parameterised as a linear function of velocity and PTO damping coefficients, i.e., u 1 ðtÞ ¼ À B f v 1 ðtÞ, and u 2 ðtÞ ¼ À B a v 5 ðtÞ, and B f and B a are the damping coefficients of the fore and aft PTOs, respectively, and v 1 and v 5 are the rotation velocity of the fore and aft barges relative to the central barge, respectively.
L. Wang and J.V. Ringwood Renewable Energy 171 (2021) 1159e1170 If considering the constraints on the amplitudes of control forces and velocity, the control variable optimisation issue for the optimal linear passive control case is formulated as follows, with the objective function defined in a quadratic form: s:t: : and V max and F max represent the maximum amplitudes of velocity and control force, respectively. Eq. (42d) recasts the control force from the general (spectral) form into the linear passive form.

Outer-layer optimisation of design variables and COG variables using the genetic algorithm
A genetic algorithm (GA) is an evolutionary optimisation method, relying on bio-inspired operators such as mutation, crossover and selection. GAs are typically computationally expensive, but their performance can significantly exceed that of gradient-based methods in many cases, particularly when the objective function is not expressed analytically in terms of its constitutive variables and where there exist many local extrema in the search area [40,41]. GAs have been successfully applied in the geometric optimisation of other WECs [40,42e45].
In the early work of the authors [19], where the objective is to maximise the energy conversion by optimising the fore and aft barge lengths of a 1 : 25 scale, 5-DOF hinge-barge WEC, different optimisation strategies were tried, including a direct search method, a gradient-based method and a GA. The direct search method does not use any derivative information of the objective function, while the gradient-based method uses derivative information to guide the search process. Results are shown in Table 1, and indicate that, for the problem in hand, the GA converges to the true solution by cross-validating its results with those obtained by means of the direct search method and global search method. Additionally, as illustrated in Fig. 3, the geometric optimisation problem for the 1 : 25 scale hinge-barge WEC under irregular wave excitation, where the fore and aft barge lengths are the geometric parameters to be optimised, is nonconvex. Thereby, only the GA is considered in the outer-layer optimisation of the following studies.
The outer-layer optimisation, using the genetic algorithm, starts with nominal values in the search space using an initial population. Fittest individuals of the initial population, i.e., members that better fulfill the optimisation objective (mean power in this case), are given preference to form and breed the next generation. To form Table 1 Optimal barge lengths of a 1:25 scale prototype, computed by three different optimisation methods. Hs   the next generation, each pair of surviving individuals, i.e. parents, give birth through a process called crossover to children that inherit properties from their parents. A process called mutation is introduced which randomly modifies a percentage of the newborn children, to make sure artificial evolution does not converge to a local extremum. Eventually, the global optimum is reached, in most cases, after a sufficient number of generations. For each individual parameter set used in the genetic algorithm optimisation, a discretised mesh is created to approximately describe the WEC geometry set and is used in the hydrodynamic model parameter calculations. Hydrodynamics parameters, e.g., radiation damping coefficients and added mass, are computed using linear potential flow theory. The proposed mathematical model is used to compute system dynamics and power production. Note that the fitness function used in the GA optimisation is the mean power defined in Eq. (42a).

WEC optimal design for a specific site over a long term
Sections 3-5 detail the model used to perform controlinformed ballast and geometric optimisation of the hinge-barge WEC, in a given wave condition. This model can be used to select the optimal design parameters of a WEC under both regular and irregular waves. However, in reality, a WEC will be deployed in a pre-selected test site with pre-selected geometry and the device will encounter numerous sea states during longterm operation. As illustrated in Fig. 4, statistical analysis of the measured ocean surface waves at Galway Bay from January 01, 2019 to June 30, 2019, shows that the occurrence frequency of the peak energy period and the significant wave height vary widely. It is therefore meaningful to develop a procedure to determine the optimal geometric and ballast design parameters, with a long-term perspective.
As sea state information for a pre-selected/specific test site can be predicted or gleaned from historical measurements, the optimal design parameters can be determined by evaluating the total energy production of the WEC over the complete operational time range. The evaluation function is defined as: w wt ðjÞPðj; gÞ; where N s is the total number of sea states encountered by the WEC, j is an index of the sea state, w wt ðjÞ is a weighting function, representing the likelihood of occurrence of the sea state j over longterm operation, g refers to one geometric set of ðL1; L3; x d1 ; z d1 ; x d3 ; z d3 Þ, and Pðj; gÞ represents the generated mean power. The optimal design parameter g * indicates the variable set that yields the maximum value of E tot , i.e.: In Case study A, shown in Section 6.1, only the ballast-related variables, i.e., x d1 ; z d1 ; x d3 ; z d3 , are optimised. For this case, the fore barge length is fixed to its nominal value of 0:85 m and the aft barge length is fixed to a nominal value of 1:25 m. This can provide a guideline of how to ballast the existing 1 : 20 scale hinge-barge WEC.
In Case study B, shown in Section 6.2, both the barge lengths and ballast-related variables are optimised, i.e., L 1 ; L 3 ; x d1 ; z d1 ; x d3 ; z d3 . The results will provide reference values for the optimal geometric parameters of the three-body hinge-barge WEC across the range of the 3 representative sea states employed to illustrate the example i.e. N s ¼ 3 in Eqns. (46) and (47).
In each of the case studies, the control for both hinges is parameterised as an optimal linear passive damper. This gives a bulk measure of the control force applied to the fore and aft barges, giving an indication of the relative value of fore and aft pontoons, in terms of power production. In turn, this allows some conclusions to be drawn as to the value of a three-barge system, over a two-barge one.
The proposed two-layer optimisation is used in both studies. Simulations are carried out using the MATLAB environment. The ga function, integrated within the MATLAB global optimisation toolbox, is used to find the optimal solution of the objective function. The algorithm used for optimising the PTO control variables is implemented via the fmincon function within the MATLAB optimisation toolbox. Hydrodynamic coefficients, including radiation damping coefficients, added mass and excitation force coefficients, are computed using WAMIT [47], a boundary element method code using linear potential flow theory. The high-order panel method was employed, with a frequency range of 0.1e14.8 rad/s used, similar to the parameters utilised in [38]. To investigate the sensitivity to panel size specification, a range of maximum panel lengths, from 0.01m to 0.8 m, was examined. For all lengths in this range, for both optimisation studies, consistent results were achieved, with a maximum panel size of 0.5 m adopted to produce the final results. A frequency range of 0.1e14.8 rad/s was chosen in the computation of the hydrodynamic parameters.
In terms of computation, WAMIT was run on a Dell PowerEdge machine with 48 GB RAM and Intel Xeon(R) E5-2440 processors running at 2.4 GHz8, while the calling MATLAB optimisation routine, including the simulation stage, was running on a PC with IntelÂ®Coreâ"¢i3-2120 CPU @ 3.30 GHz, with 16 GB of RAM, using a Windows 10 Pro 64-bit OS. While the genetic optimisation requires the concurrent evaluation of multiple objective function evaluations, no explicit parallelisation was employed. By way of example, 40 generations, with 6 variables to optimise, took 5 days to compute (3 days for 4 variables).
6.1. Case study A: ballast optimisation of the existing 1 : 20 prototype Here, we consider an irregular wave spectrum with a significant wave spectrum height (H s ) of 6:0 cm and a peak period (T p ) of 1:23 s, which is scaled down from one of the most common sea states in Galway Bay, off the west coast of Ireland. The controlinformed ballast optimisation is performed for the existing 1 : 20 scale three-body hinge-barge WEC.
As shown in Fig. 5, the upper plot gives the evolution of the ballast-related variables as the generations increment. Results show that the fluctuations of those values become small (the decrement ratio in -power is < 1:01 after 20 generations), which indicates that the best individuals are close to, or have reached, the optimal solutions. It indicates that more ballast weight should be used for the fore barge of the existing prototype, and the new COG is close to the outer-side surface and bottom-side surface. The suggested position change for the COG of the aft barge is slight, in particular in the horizontal direction.
Results in Fig. 5(b) indicate that the mean power production of the WEC using ballast optimisation is 0:955 W, while that of the original WEC without ballast optimisation (the COG of each body coincides with its centroid) is 0:570 W. The performance of the device is improved by 67:6% in terms of energy production, in this sea state.
6.2. Case study B: overall optimisation of barge lengths and ballastrelated variables Fig. 6(a) shows the evolution of variables related to barge lengths and ballast, over each generation of the GA optimisation of the three-body hinge-barge WEC in the same sea state (H s ¼ 6:0 cm, T p ¼ 1:23 s). Note that both the control optimisation and ballast optimisation are integrated in the overall optimisation routine. While convergence is slightly slower in this case, compared to the ballast-only case, the optimal variables have converged by generation 30, with a decrement ratio in -power of < 1:01. The optimal returned length of the fore barge is 1:995 m and the optimal length of the aft barge is 1:08 m in this sea state. More ballast weights are suggested for the aft barge of the optimised WEC and the COG should be close to the outer-side surface and bottom-side surface. The suggested position change for the COG of the fore barge is slight, under this sea state.
Results in Fig. 6(b) show that the mean power production of the WEC is 1:698 W, improving the power production up to 225:7%, compared to that of the original WEC without geometric optimisation and ballast optimisation, and up to 77:7% compared to that of the original WEC with ballast optimisation alone.

Discussion
Section 6 demonstrates the application of an efficient two-layer optimisation to the control-informed ballast and geometric optimisation of a three-body hinge-barge WEC. Through a systematic approach, the optimal geometric parameters of the device, under a given sea states, are found. Results demonstrate the importance of properly choosing barge lengths and ballast-related parameters for a site-specific wave climate, in order to maximise the total energy generated. To make the conclusions more general, the performance of the WEC under more sea states, scaled down from three of the most popular wave climates shown in Fig. 4, is examined.
From Fig. 7, it is clear that the control-informed ballast and geometric optimisation has better performance than other two methods, in terms of improving the energy production of the WEC. The energy production of the WEC improved by the proposed two-   layer optimisation is up to 225:7%, compared to that of the original 1 : 20 prototype (only control optimised, without ballast optimisation). Additionally, for the existing physical 1 : 20 WEC with given barge lengths, the performance can be improved by optimal use of ballast mass, by up to 70:8%, in terms of energy production. The sea states used are documented in Table 2. Initially, examining Fig. 8(b) and (c), it is clear that, while optimising fore or aft barge power individually, the preference is for a finite (modest) damping value for the barge under consideration, while the damping value for the other barge should be quite large. This suggests that a two-barge system might be preferable. Equally, examining the total power in Fig. 8(a) (and indeed, Fig. 9(a) and (b)) it suggests that, for an optimal (finite) damping value for one hinge, either fore or aft, that the total power is relatively insensitive to the other damping value. Therefore, from economic considerations, we can chose one barge to have very high damping, effectively recommending a two-barge system. This has strong implications for both the physical WEC design and for the PTO configurations, as it would be economically prudent to minimise the number of individual barges and PTO systems. This may help to explain the trend towards two-barge systems, such as the Mocean WEC [33], the SeaPower WEC [32] and the M4 WEC [28,29] devices.
It should be noted that this analysis assumes idealised power take-off systems that use optimal linear passive dampers, and employs linear potential flow theory. The sensitivity of the geometric optimisation to the control strategies and to nonlinear potential flow is not examined in this study.
Additionally, the proposed two-layer optimisation routine can be replaced by a three-layer optimisation routine, where the outer layer is to optimise the lengths of the fore barge and of the aft barge, the middle layer is to optimise the ballast-related variables and the inner layer is to optimise the PTO control parameters. However, this will require that the ballast-related variables must converge before the next iteration of barge lengths can be taken, with a consummate increase in computation time. Nevertheless, such an approach may better explicitly observe any dependence between optimal ballast and barge length parameters.

Conclusions
This paper presents a generic methodology for the optimal design of a multi-degree-of-freedom three-body hinge-barge wave energy converter. The demonstrated multi-degree-of-freedom mathematical model helps in the understanding the fundamental dynamics of the multi-body device. The developed two-layer optimisation routine can accurately examine the effects of geometric size, control strategy and ballast on the wave energy converter, in irregular waves.
The two-layer optimisation procedure is successfully applied to a 1 : 20 scale prototype of the McCabe Wave Pump device. Results indicate that performance of the device in irregular waves is significantly improved by the simultaneous design of the device geometry, control strategy and ballast. For example, the energy production is improved by up to 225:7% in a sea state with a significant wave height of 11:3 cm (with a scaled-up value of 2:25 m, based on the 1 : 20 scale prototype) and a peak period of 1:45 s (with a scaled-up value of 6:5 s), compared to the original design. Additionally, the centre of gravity, tuned by ballast mass, also influences the dynamics and performance of the device. Optimal ballast improves the energy production of the physical existing 1 : 20 scale hinge-barge device by up to 70:8% in the sea state with a significant wave height of 5:0 cm (with a scaled-up value of 1:0 m) and a peak period of 1:0 s (with a scaled-up value of 4:5 s).  In conclusion, for the three-body hinge-barge wave energy converter with optimised barge lengths, the optimal location of centre of the gravity does not coincide with the centroid, in particular for the aft barge. More ballast weight is suggested for the aft barge, and the position of the centre of the gravity is suggested to be placed closer to the outer-side surface in the horizontal direction and to the bottom surface in the vertical direction. It is also concluded that there is no obvious performance benefit in three barges, over a two-barge system, indicating the potential for significant capital cost savings.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.