Initial conceptual demonstration of control co-design for WEC optimization

While some engineering fields have benefited from systematic design optimization studies, wave energy converters have yet to successfully incorporate such analyses into practical engineering workflows. The current iterative approach to wave energy converter design leads to sub-optimal solutions. This short paper presents an open-source MATLAB toolbox for performing design optimization studies on wave energy converters where power take-off behavior and realistic constraints can be easily included. This tool incorporates an adaptable control co-design approach, in that a constrained optimal controller is used to simulate device dynamics and populate an arbitrary objective function of the user’s choosing. A brief explanation of the tool’s structure and underlying theory is presented. To demonstrate the capabilities of the tool, verify its functionality, and begin to explore some basic wave energy converter design relationships, three conceptual case studies are presented. In particular, the importance of considering (and constraining) the magnitudes of device motion and forces in design optimization is shown.


Introduction
At present, designs for wave energy converters (WECs) span a wide range of concepts. While it is unclear which of these concepts will achieve economic viability, the design tradeoffs particular to each concept are also not well defined. Furthermore, the degree to which any of these concepts approach some optimal is also unclear.
Design optimization studies can play an important role in the refinement and maturation of technology concepts. Additionally, a so-called control co-design (CCD) approach, which integrates control system design into full-system design process, has been demonstrated for a range of mechanical and electro-mechanical systems (Garcia-Sanz 2019), including a recent study that applied CCD in a full-system constrained design optimization of an offshore wind turbine (Hegseth et al 2020). CCD is composed of three main areas: co-optimization, co-simulation, and control-inspired paradigms. In this paper, only the co-optimization aspect is considered, where a lower fidelity multi-physics model is B Ryan G. Coe rcoe@sandia.gov 1 Sandia National Labs, Albuquerque, NM, USA 2 Data Only Greater, Maynooth, Ireland used to carry out a system wide optimization, including the control system.
For resonant WECs in particular, which exhibit tightly coupled dynamics between the controller and device, a CCD approach appears to be especially useful, perhaps even critical (O'Sullivan and Lightbody 2017; Jin et al 2019). In a system with tightly coupled dynamics, the dynamics of various subsystem (e.g., the WEC controller and hydromechanical systems) are of overlapping frequency bands. Conversely, in a wind turbine, the blade pitch controller acts to reflect changes in wind conditions, which happen on much longer time-scales (over the course of minutes) than blade rotational and tower passing rates, which are on the order of roughly 0.5 Hz.
WEC developers and designers currently lack a systematic, configurable, and tested design optimization tool. As a result, many WEC designs are based on an iterative designbuild-test (or often design-model-simulate) loop, which is inefficient and can lead to sub-optimal designs. While a fair amount of WEC design optimization studies have been conducted over the last decade (see, e.g., Blanco  In general, any nature of nonlinearity can be included by representing the physics in the pseudo-spectral domain. -Arbitrary or fixed structure controller: No fixed controller structure (e.g., proportional damping feedback resonating control, latching, or velocity tracking model predictive control) specification is required. The optimal controller can be calculated as the solution to the numerical optimal control problem, or the optimal tuning of a fixed structure control. -Open-source tool: An open-source piece of software, named "WecOptTool," which is available online, 1 has been developed to perform this study and support future work.
The subsequent sections of this paper are structured to further expand on these point. First, the theoretical basis and algorithmic structure are discussed (Sect. 2). Next, three simple case studies are performed to demonstrate and verify WecOptTool's functionality in the areas of WEC geometry and PTO co-design and explore some basic design considerations (Sect. 3). In particular, these case studies have been selected to both illustrate the key aspects of WecOptTool and to begin an exploration of the WEC control co-design space. Conclusions are presented in Sect. 4. 1 https://github.com/SNL-WaterPower/WecOptTool.

WecOptTool conceptual framework
WecOptTool provides WEC developers with a framework to easily apply a control co-design approach. In Fig. 1, the algorithmic procedure is visually classified into three columns or lanes: -User Inputs (Green): aspects of the tool that the user can interact with -Data Classes (Blue): objects used to store and transfer information within a study -Solvers (Yellow): physics models and optimization algorithms that process data Any WEC can be optimized by specifying the blocks in the User Inputs lane. Consider, for example, the famous Salter Duck (Salter 1974). First, the kinematics of this device must be defined; for the Salter Duck, this is a pitching rotation about an axis. Next, the aspects of the Duck to be optimized must be chosen, and some bounds provided for their values. These design variables could include geometric parameters, such as the length of the Duck's "bill," as well as aspects of the PTO system, such as maximum force, or generator winding resistance. The wave climate in which the device will operate (i.e., the sea states in Fig. 1) must be described. Additionally, the type of controller to be used should be selected (more details on these options in Sect. 2.2). Finally, an objective function is defined to provide a measure of fitness based on performance and cost. Fig. 1 WecOptTool schematic of data flow to determine an optimal control co-design. The flow from left to right defines the necessary user inputs, how those inputs are mapped to the solvers to determine an optimal design These user inputs are employed to construct a set of Data Class objects (see blue center lane in Fig. 1), which are then passed to a set of Solvers (yellow rightmost lane). The hydrodynamics solver currently used in WecOptTool is the boundary element method (BEM) tool NEMOH (Babarit and Delhommeau 2015). Currently, the optimal control solver uses one of the three offered methods (proportional, complexconjugate, and pseudo-spectral-the theoretical basis of these approaches is discussed in Sect. 2.2) to find the WEC velocity, PTO forces, power, and other dynamic responses of the current WEC design. These responses, along with measures of cost, can be passed to the objective function for use by the optimization routine. By design, WecOptTool is meant to leverage existing optimization algorithms and tools, such as those built into MATLAB and other third party tools.

Control design and simulation
To evaluate device performance, WecOptTool relies primarily on a pseudo-spectral (PS) solution method (see, e.g., Elnagar et al 1995). This numerical optimal control method allows for the efficient simulation of nonlinear dynamics and constrained optimal control of a WEC (Bacelli and Ringwood 2014;Bacelli 2014;Herber and Allison 2013). The importance of this approach can be understood by considering the bounds of the WEC control problem.
The upper bound of power absorption for a WEC is represented by the well-known "complex conjugate control," (CC) in which perfect impedance matching allows for maximum power absorption (see, e.g., Falnes 2002). The intrinsic impedance of a WEC is defined as: where ω is the radial frequency, B(ω) is the radiation damping, b v accounts for viscous and frictional damping, m is the rigid body mass, A(ω) is the added mass, and K H S is the hydrostatic stiffness. The response of the device can thus be defined by: where F e is the wave excitation spectrum. Optimal power transfer occurs when the PTO force, F u , is set, such that: where Z * i denotes the complex conjugate of Z i and u is the velocity. In addition to being acausal in the general sense, this approach specified by (3) is also impractical due to the large motions and forces that often result. While analysis of this limit can provide some useful insight, it is also clear to see that using an unconstrained optimal controller could result in unrealistic performance (Budal and Falnes 1975), and, therefore, unrealistic values for an objective function within a design optimization study.
Proportional damping (P) control, which is analogous to that applied in other energy generation fields in which a simple braking force is applied to the generator, is a proportional control on velocity: where the PTO damping coefficient B pto is calculated by an unconstrained numerical optimization for a given sea state.
We can see that (2) is a linear frequency-domain model. Thus, when the WEC response is simulated in this manner, the P and CC controllers cannot readily incorporate nonlinearities. While responses with the P and CC controllers could be simulated, or approximately simulated, in the timedomain, thus allowing for the incorporation of nonlinearities, this would be computationally prohibitive with an optimization study. Fortunately, as described more fully by Bacelli (2014), nonlinearities can be incorporated into a pseudospectral problem without increasing computational time to unmanageable levels. For example, instead of a linear vis- (1), viscous damping effects can be described by a quadratic term, e.g., The PS controller in WecOptTool has been configured to maximize power absorption subject to a set of constraints. For the PS controller, the dynamics of the device are solved by forming an optimization problem in which the dynamics are represented as constraints and the objective function is formulated to maximize power. The system states (in this case WEC position and velocity) and control inputs are composed by a set of basis functions-in this case, we use Fourier series. A solution is obtained by setting the weights for the basis functions so as to minimize the objective function within the constraints (Elnagar et al 1995; Herber and Allison 2013) Additionally, realistic constraints, such as limitations on the PTO force or stroke length, can be imposed (Bacelli and Ringwood 2014;Bacelli 2014). Currently, WecOptTool applies a sequential quadratic programming (SQP) solution method (Nocedal and Wright 2006) for the pseudo-spectral problem. For the CCD problem, this approach offers a number of distinct advantages to frequency-domain and time-domain models as described in Sect. 1 (explicit constraints, efficient nonlinear solutions, and arbitrary or fixed controller structures).
Currently, the PS controller in WecOptTool uses an arbitrary control structure. Thus, while the WEC may eventually be deployed with a causal feedback controller (Bacelli and  (Budal and Falnes 1979;Evans 1976;Iversen 1982), or a velocity tracking model predictive control (Cretel et al 2011;Hals et al 2011), the arbitrary PS controller in WecOptTool provides a convenient realistic stand-in for design studies. The PS controller in WecOptTool is not intended for real-time implementation, but instead represents a control design and analysis tool.

Case studies
The design of the experimental "WaveBot" (Coe et al 2016) is considered herein to provide a case study on which to apply WecOptTool and demonstrate important concepts in WEC co-control design. Figure 2 shows an illustration of the device and the design variables employed in these case studies. Three different case studies of the WaveBot are considered: (A) a simple fixed design performance assessment demonstrating and verifying the CC, P, and PS controllers; (B) a single design variable study comparing the CC, P, and PS controllers; and (C) a multi-objective study using only the PS controller. For efficiency and to improve clarity, all studies were conducted using a simple regular wave with an amplitude of A = 0.0625 m and a period of T = 3.33 s. These case studies are summarized in Table 1.
It is important to note the case studies in this paper are conceptual in nature. While more complex and realistic studies are possible with WecOptTool, these case studies have been deliberately selected to verify functionality and to demon-strate key concepts in WEC CCD. Although simplistic, these case studies describe phenomena and approaches that are fundamental to the engineering practice of WEC control codesign. A strong understanding of these concepts is essential for future applications of WecOptTool to more complex studies.

Case A: performance with CC, P, and PS controllers
Case A is not a design optimization study, but instead a simple comparison of the three controller types' performance using a single device design. Thus, the device design was fixed, and the performance in a regular wave with A = 0.0625 m, T = 3.33 s was simulated for the CC, P, and PS controllers. The PS controller was set to limit the PTO force to less than 2 kN. The results of these simulations are shown in Figs. 3 and 4, which show the spectral and time-history results, respectively. The average mechanical powers for the three controllers in Case A were CC: 121 W; P: 28 W; and PS: 97 W. Note that as the PTO force limit for the PS controller is increased, the power from this controller will approach that of the CC controller. Figure 3 shows a spectral analysis of results from the Case A simulations, with magnitude along the upper row and phase along the lower row. Each of the three columns of plots relate to a specific controller. The spectra of excitation force (F e ), velocity (u), and PTO force (F u ) resulting from each simulation are plotted. We can verify the linear behavior of the CC and P controllers by reviewing the left and center columns in Fig. 3, respectively. The linear behavior of these controllers is evident in that energy exists only at the excited frequency of 1.89 rad/s (T = 3.33 s). Also note how the CC controller creates a resonant condition, where the velocity has the same phase as the excitation force, whereas the P controller does not achieve this phase alignment. From the results of the PS controller on the far right of Fig. 3, it can be seen that the velocity at 1.89 rad/s is nearly in phase with the excitation force. The slight mismatch is due to the PTO force limit.
Observe how super-harmonics are generated by the force limited PS controller, spilling energy into additional frequencies, which are integer multiples of the fundamental. These additional harmonics outside of the fundamental excited frequency (1ω 0 = 1.89 rad/s) are a clear demonstration of the nonlinearities introduced by the PS controller. To maximize

Case B: Optimal design for CC, P, and PS controllers
The differences between these controllers and the importance of control co-design can further be demonstrated by considering how the optimal device design varies with different control strategies. To better understand this, we conduct three separate optimization studies using the CC, P, and PS controllers. These studies are performed on the following problem: Here, r is the WEC's outer radius, as shown in Fig. 2. The radius of the WaveBot as-built (that tested by Coe et al 2016) is r 0 = 0.88 m. The average power isP, where negative power is absorbed by the device. The maximum stroke of the PS controller was constrained to z max ≤ 0.6 m.
At this stage, the specification of an objective function for WEC design optimization is quite challenging given the diverse spectrum of WEC archetypes and the lack of commercial projects. The objective function defined by (5) is similar to those suggested by a number of previous studies, in that it is a ratio of power to some representation of cost (volume in this case), but surface area has also been recommended    . 6 Case B: study results. Vertical stems show optimal designs from fminbnd these factors are used to form different objective functions, thus leading to different optimal WEC designs. Note that (5) uses a polynomial expansion in the denominator, as was done previously by Neary et al (2018) to counteract the effect where small devices are disproportionately favored.
The study was completed with both a "brute-force" approach and using the MATLAB hybrid method solver fminbnd. The set of geometries considered are shown in Fig. 5. Table 2 shows the results of this study for each of the three control types. The results are also illustrated in Fig. 6.
As can be seen from Fig. 6 and Table 2, the results from the three different controllers vary dramatically. The power produced by the CC controller is often an order of magnitude greater than the P controller. Note that, accounting for friction, the power absorbed by the CC controller matches the theoretical limit for an axisymmetric body (Budal and Falnes 1975).
Additionally, the power produced by the CC controller does not vary strongly based on the outer radius design variable. This occurs because the complex-conjugate controller can so effectively maximize absorption that the geometry of the WEC (assuming it is of the same general scale) plays a less important role. This is not necessarily realistic, a problem which can be further illustrated by considering the position amplitudes, as shown in Fig. 6. The CC controller can only accomplish this feat at low frequencies by moving the WEC with an amplitude of more than 1 m (in a 0.06 m amplitude wave). Obviously, this motion violates the assumptions of the underlying models, but would also likely require an unfeasible design. Observe also that for radius values of r > 0.55 m, the PS and CC results match, but for r < 0.55 m, the motion constraint becomes active for the PS controller.
Referring back to the overall results of the study in Table 2, note that the three controllers result in different optimal designs. While this is not surprising based on the conclusions drawn from Case A (Sect. 3.1) and the results shown in Fig. 6, and also aligns with previous findings (Garcia-Rosa and Ringwood 2016), this outcome underscores the importance of incorporating realistic physical constraints when applying CCD. A WEC device's performance, and therefore the objective function value, is strongly tied to the controller, and thus, it follows that designing the controller in parallel with the full system is critical.

Fig. 7
Case C: multi-objective optimization results. Color of points corresponds maximum PTO stroke, z max . Larger plot on left-hand side shows the Pareto front most intuitively; six smaller plots to right-hand side show all projections of results, with each column pertaining to a design variable (r and F max u ) and each row pertaining to an objective function (P, (r 0 + r ) 3 , and z max ). Potential single solution at knee on surface marked with '+'

Case C: multi-objective design study
It is often beneficial for practical WEC design studies to employ a multi-objective optimization. For the WaveBot in particular, which is a lab device with no full-scale deployment plan, and therefore no detailed means of estimating LCOE, such an approach is especially useful. In a multi-objective study, a set of "responses" can be selected without applying any relative weighting factors that may be challenging, or impossible, to determine. In this way, a better understanding for how the design variables interact can be developed.
In this case, we consider the following problem: Here,P and (r 0 + r ) 3 are the average power and a volumetric function, as were used in Case B. The third response, z max , is the maximum displacement position of the WEC (PTO "stroke"). As before, the outer radius, r , is a design variable with the range [0.25, 2] m. However, in Case C, the additional design variable for the maximum PTO force, F max u , is added with a range of [0.1, 1] kN. Note that since it is considered the best suited solution for a CCD optimization study, only the pseudo-spectral control method was used in Case C (as previously discussed, complex-conjugate and proportional damping control are more useful for theoretical studies). This study was performed with the MATLAB function paretosearch, which uses a pattern search algorithm.
The results of this case study are shown in Fig. 7. As with any multi-objective study, no single device design is shown to be most fit, but the designer can begin to gain some intuition on how these different design variables and responses interact. Reviewing Fig. 7, we can see that smaller designs require larger PTO strokes to achieve the same amount of power absorption (a similar finding was noted by Kurniawan 2013). Based on this, a designer could weigh the factors that affect cost (longer PTO pistons vs. increasing hull displacementand the numerous factors tied to these variables, such as structural reinforcement, mooring design, etc.).
To find a single solution along the Pareto front, it is typical to find a "knee" in the curve or surface, in which a marginal improvement of one objective function would lead to large decline in others (see, e.g., Branke et al 2004). One potential knee on the surface shown in Fig. 7 has been marked with a '+.' Here, the WEC produces an average of 58 W, with a volume function of (r 0 +r ) 3 = 3.9 m 3 , and a maximum PTO stroke of 0.14 m.

Conclusion
An open-source WEC design optimization tool, which provides an adaptable engineering approach to control codesign, has been demonstrated and verified via three different case studies. These studies highlight the utility of the tool, in particular the important contribution of utilizing a pseudospectral numerical optimal control solution that can realistically represent constrained WEC controllers. The inclusion of the pseudo-spectral method allows for efficient and realistic control co-design studies to be performed.
Future development of WecOptTool will introduce both linear and nonlinear classes of fixed structure controllers. Additionally, further recent developments in formulations for integrated PTO modeling will be incorporated into WecOpt-Tool to allow for more detailed studies. By treating an array of WECs as an abstract multi-input, multi-output system, WecOptTool can also potentially be applied to WEC array design and used, for example, to determine device spacing within the array. To support more straightforward utilization by a wider range of users, additional WEC archetypes will be examined in case studies and provided as examples with the WecOptTool source code. Further case studies will also seek to investigate the formulation of objective functions for WEC design optimization studies, and to perform such studies using realistic WECs with real-world deployment locations.
Acknowledgements Sandia National Laboratories is a multi-mission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC., a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy's National Nuclear Security Administration under contract DE-NA0003525. This paper describes objective technical results and analysis. Any subjective views or opinions that might be expressed in the paper do not necessarily represent the views of the U.S. Department of Energy or the United States Government.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecomm ons.org/licenses/by/4.0/.