Rotational Speed Control Using ANN-Based MPPT for OWC Based on Surface Elevation Measurements

Fares M’zoughi 1,* , Izaskun Garrido 1 , Aitor J. Garrido 1 and Manuel De La Sen 2 1 Automatic Control Group—ACG, Institute of Research and Development of Processes—IIDP, Department of Automatic Control and Systems Engineering, Faculty of Engineering of Bilbao, University of the Basque Country—UPV/EHU, Po Rafael Moreno no3, 48013 Bilbao, Spain; izaskun.garrido@ehu.eus (I.G.); aitor.garrido@ehu.eus (A.J.G.) 2 Automatic Control Group—ACG, Institute of Research and Development of Processes—IIDP, Department of Electricity and Electronics, Faculty of Science and Technology, University of the Basque Country—UPV/EHU, Bo Sarriena s/n, 48080 Leioa, Spain; manuel.delasen@ehu.eus * Correspondence: fares.mzoughi@ehu.eus; Tel.: +34-94-601-4469


Introduction
Global energy transformation is the key to reduce climate damages. This transformation would help achieve a cheaper renewable power, reduction of emissions and air pollution, and increase welfare and growth. The World Meteorological Organization declared that the 20 hottest years recorded have all transpired during the last 22 years and the highest four took place in the last four years only [1]. In fact, the IPCC special report on the impacts of global warming of 1.5 • C states that during the latest decade (2009-2018) the average temperature was about 0.93 • C more than the pre-industrial baseline, and during the five years (2014-2018) it was 1.04 • C more than the baseline [2]. For these reasons, many efforts have been invested to reduce the damages of the climate change which can be seen in the objectives set by the Kyoto Protocol (1997) to decrease polluting emissions of five greenhouse gases (GHG); methane, nitrogen oxide, hydrofluorocarbons, perfluorocarbons, sulfur hexafluoride aside from the carbon dioxide to a minimum of 5% against the emissions documented in 1985 [3], and later with the objectives set by the 20-20-20 agenda which states that every European Country needs to achieve by 2020 a 20% emission level decrease on GHG from the 1990 numbers, a 20% renewables in the final energy consumption, and a 20% improvement of energy efficiency [4].
Despite these efforts, the average energy that are related to CO 2 releases have escalated 1.3% yearly in the past five years widening the gap between registered emissions and the required emissions levels to reach the globally fixed climate goals [5]. Considering the accelerating climate change damages, the transformation of the global energy system requires significant acceleration to reach the goals of the Paris Agreement [6]. Those goals consist of keeping the increase in average global temperatures lower than 2 • C and preferably to restrict warming to 1.5 • C during this century.
Electrification based on renewables while combined with energy efficiency is the key ingredient of a successful energy transition that can guarantee a lower overall energy demand. This concept can start to reduce energy-related CO 2 emissions immediately and substantially. Moreover, it decreases air pollution and raises health benefits, beneficial socio-economic advantages and can turn into an important factor to form a connected and digitalized economy and society. In this sense, governments should enforce further forceful climate, renewable energy and energy efficiency strategies and goals. Notably, governments ought to line up climate and sustainability objectives with power plans [5].
To fulfill the Paris Agreement on Climate Change, the Ocean Energy Forum established a strategic roadmap to build an ocean energy system for Europe which will guarantee around 10% of power demands of Europe through wave and tidal energy by 2050 [7]. The roadmap highlights the importance of Research and Development to speed up testing and validation of numerous ocean technologies to achieve a commercial maturity and secure industrial deployment [7]. According to the European Marine Energy Centre, many countries have been engaged in projects which concentrate on the development of the Wave Energy Converter (WEC) industry for instance United Kingdom (26 projects), Norway (14), Denmark (9), Spain (9), Ireland (7), Sweden (5), France (4), Finland-Germany-Portugal (2), and Greece (1) [8]. However, since many countries, which are developing WECs, are at various phase of development there exist no mutual ground to define the best configuration, Power Take-Off (PTO) system and control strategies in light of implementation intricacies. Hence, the central point of research, in next years, must change from large scale WECs to the difficulties of developing WECs and adapted projects proper to promote the development of niche markets [9].
The Oscillating Water Columns (OWC) are widely deployed wave energy converters thanks to their simplicity and feasibility. Nevertheless, OWC devices using Wells turbine-based PTO systems withstand a hindrance in power generation caused by the stalling phenomenon that affects the Wells turbine's aerodynamic efficiency resulting into a reduced energy extraction [10,11]. Many scientists and research groups have studied and investigated the effects of the stalling phenomenon in Wells turbine and how to reduce its impact on the produced power. M. Toressi et al. worked on the stall effect of Wells turbine and performed many analyses from numerical and experimental data. In [12] they used detailed CFD to investigate the flow-field through the turbine blades to offer a description of the complex flow mechanism that originates separation and, consequently, low efficiency at high flowrates by solving the Reynolds-averaged Navier-Stokes equations together with three turbulence models. In addition, in [13] they investigated a 3D-printed Wells turbine in the open wind tunnel of the Polytechnic University of Bari. The scaled prototype was designed to operate in a 1:10 scaled model of a REWEC3 breakwater for ocean application and was tested under steady-state and pulsating flow conditions. Obtained results indicated that when the turbine experiences large sinusoidal variations of the flow coefficient at high mass flow rates, a delayed onset of stall can be observed and that the variation of the turbine performance under dynamic flow conditions is crucial for a correct design of the Wells turbine. F. Cambuli et al. investigated in [14] the dynamic interaction between the OWC and the Wells turbine. In this work, a lumped parameter model has been introduced and compared to experimental and CFD data. The proposed lumped parameter model allows rapid isolation of parameters with the largest influence on system performance and could be integrated with existing wave-to-wire models to improve the understanding of the hydrodynamic/aerodynamic interaction in the overall system. I. Hashem et al. investigated in [15] the possibility of enhancing the Wells turbine performance by using water as the working fluid rather than air by submerging the Wells turbine in the sea water. For this CFD simulations were performed using the steady 3D incompressible Reynolds-Averaged Navier-Stokes (RANS) calculations on this type of axial turbine rotor with realizable k-ε turbulence model. Also, from a control point of view, O. Barambones et al. proposed in [16] a real-time sliding mode control for a wave energy converter based on a Wells turbine using Lyapunov stability theory to analyze its stability. The proposed control is tested first by means of simulations using MATLAB/Simulink and then using a real-time experimental platform based on a dSPACE DS1103 control board.
The present manuscript introduces the OWC's model and proposes a rotational speed control. The propose of the rotational speed control is to help the turbo-generator evade the stalling behavior which will increase the power generation. For this purpose, an ANN-based rotational speed control has been developed and implemented with the intention to control the back-to-back (BTB) converter connected to a Doubly Fed Induction Generator (DFIG). This will allow the regulation of the rotational speed by considering the wave input and predicting the optimal rotational speed via an Artificial Neural Network (ANN)-based Maximum Power Point Tracking (MPPT). The designed network has been trained using measured wave data from the harbor of Mutriku by means of an Acoustic Doppler Current Profiler (ADCP) and its capabilities have been adopted to recognize the incoming strong waves causing the stall effect and generate the suitable reference value of the desired rotational speed for the proposed rotational speed control scheme.
The rest of this manuscript is structured as follows: Section 2 presents the theoretical considerations of the OWC plant model, of the stalling phenomenon and the Artificial Neural Networks to be used. Section 3 explains the materials and methods used to carry out the design and development of the proposed ANN rotational speed control. Section 4 discusses the performance of the designed ANN-based MPPT and the selected model, it also sets two demonstrative study cases to study the effectiveness of the proposed ANN rotational speed control with regular waves and with real measured waves. Finally, Section 5 finishes the paper with some concluding remarks.

Theoretical Considerations
The work presented in this paper requires the understanding of the system to be controlled and the Artificial Neural Networks to be used. In this sense, this part introduces the modeling of the different parts constituting the studied Wave Energy Converter (WEC) which is the Oscillating Water Column (OWC) illustrated in Figure 1, this would include the mathematical models of the waves, capture chamber, Wells turbine and the generator. In addition, a brief background on the Artificial Neural Networks.

Wave Surface Dynamics
In the literature there exist many wave theories to describe the wave's surface dynamics such as Cnoidal wave theory, second or higher-order Stokes theory and Airy linear theory [17,18]. For this work, monochromatic unidirectional wave has been considered to be input to the developed numerical wave-to-wire model of the OWC plant.
The Airy wave theory is the simplest depiction of waves, it describes the waves as sinusoidal waveforms by neglecting turbulences, friction losses and other energy losses [18].
The waveform of a regular wave is depicted in Figure 1, where SW L denotes the Still Water Level, h marks the sea depth between the seabed and the SW L. H represents the wave which is between the wave trough and the wave crest. A marks the wave amplitude which is between SW L and the wave crest and λ marks the wavelength which measures the distance between successive crests [18,19].
Therefore, the elevation of a wave's surface can be expressed by [19,20]: here x represents the horizontal coordinate with the direction of wave propagation as positive direction, θ represents the angle between the x−axis and the wave direction, and k represents the wave number defined by (2) given in [21]. k tanh(kh) = ω 2 /g (2) where ω is the wave frequency and g is the acceleration gravity.

Capture Chamber Model
The air volume in the capture chamber of the oscillating water column is defined from the chamber's volume and the water volume as [20][21][22]: where V c , w c and l c are respectively the capture chamber's volume, inner width and length. The volume flow rate can be defined from Equation (3) by [20][21][22]: with c = w c /k. From the expression of the volume flow rate (4) and considering the geometry of the chamber, the airflow speed can be expressed by [20][21][22]: where D is the duct diameter, T w is the wave period.

Wells Turbine Model
The considered air turbine is a Wells turbine which is a self-rectifying axial-flow turbine [23]. This type of air turbines permits a unidirectional pivotal motion unrelatedly to the airflow direction thanks to the blade's distinct shape [24,25].
The Wells turbine shown in Figure 2 may be described by the equations given in [11] where the pressure drop across the turbine rotor is defined as: where a is the cross-sectional area, C a is the power coefficient, r is the mean radius, ω r is the angular velocity. The turbine constant K is different from Wells turbine to another and is obtained from the turbine's geometry as: where ρ is the air density, l is the blade chord length, b is the blade height, and n is the number of blades. The torque produced by the turbine will mainly depend on the turbine's mechanical characteristics and both airflow and rotational speed which is expressed as: where C t is the torque coefficient. The relation between the torque and the pressure drop may be defined as: The flow coefficient is obtained from the ratio of the airflow speed by rotational speed as: The expression of the flow rate can be defined as a function of the cross-section area and the airflow speed as: Lastly, the turbine efficiency may be written as: The characteristic curves of the Wells turbine under steady-state operating conditions, for which no hysteretic loop is reported, are formed by the power coefficient C a and the torque coefficient C t versus the flow coefficient φ depicted in Figure 3.

Doubly Fed Induction Generator Model
The mathematical modeling of the Doubly Fed Induction Generator is defined by the expressions provided in [26,27]. The dq components of both the stator and rotor voltages are defined as: with R s and R r are the stator and the rotor resistances, ω s and ω r are the stator and the rotor angular velocity, i ds and i qs are the d-q stator currents, i dr and i qr are the d-q rotor currents. The dq components of the flux linkage are defined by: ψ ds = L ss i ds + L m i dr ψ qs = L ss i qs + L m i qr (15) ψ dr = L rr i dr + L m i ds ψ qr = L rr i qr + L m i qs (16) with L ss and L rr are stator and rotor inductances and L m the magnetizing inductance. The electromagnetic torque obtained from the DFIG is defined by: with p is the pair pole number. The mechanical interaction between the turbine and the generator can be defined as: with J is the inertia of the system.

Back-to-Back Converter Model
The BTB converter is formed of a Grid-Side Converter (GSC) connected to the Grid and a Rotor-Side Converter (RSC) connected to the windings of the rotor in the DFIG [28].
The main role of the RSC is delivering voltage to the windings of the rotor in the DFIG. Its objective is aligning the rotor-flux with the stator-flux through the rotor-current control to obtain the required torque. Therefore, the RSC enables the stator voltages and generated power regulation [29].
The active and reactive powers across the stator are defined by [30,31]: The grid voltages can be defined as: where R g and L g are the grid coupling resistance and inductance, ω g is the grid's angular frequency, i dg and i qg are the d-q grid currents and u dg and u qg are the GSC voltages.
The equations describing the active and reactive powers between the GSC and the Grid are: The energy conserved within the capacitor has been defined in [32] as: with C, v dc , W dc and P dc are respectively the DC-link capacitance, voltage, energy and power.

Stalling Phenomenon
OWC systems consisting of a Wells turbine coupled to DFIG are affected by the stalling behavior when reaching a critical flow rate value v x . The stalling phenomenon occurs when strong waves entering the capture chamber create a strong airflow and the turbo-generator is supposed to keep up with this speed but cannot because the generator is slowing the turbine with its slow dynamics. This is clearly depicted in Figure 4 where the airflow speed v x increases with higher wave amplitudes and sorter wave periods as shown in Figure 4a but the generator stops rotating fast when reaching a certain airflow speed, hence the rotational speed ω r cannot shift fast enough as presented in Figure 4b.
The stalling phenomenon may be interpreted from Figure 3b that shows that when the flow coefficient φ exceeds the threshold 0.3, the torque coefficient C t decreases significantly.
As defined by Equation (10), the flow coefficient φ varies with the airflow speed v x . Though Equation (5) describes v x as a function of the wave amplitude and period. In fact, the bigger the wave amplitudes and the smaller the wave periods are, the higher the wave power and the airflow speed are as explicated by Figure 4. Figure 4 also shows that as the airflow speed increases after a certain point the rotational speed cannot keep up with the gradual increase.
The stalling effect is noticed by observing the uncontrolled oscillating-water-column system in two different ocean situations; the first situation is a wave with a 10 s period and 0.9 m wave amplitude from 0 s to 22.5 s and the second situation is a wave with a 10 s period and 1.2 m wave amplitude from 22.5 to 50 s. Figure 5 shows that the first situation offers a flow coefficient less than the threshold value 0.3 however the second situation offers a flow coefficient higher than 0.3.  Because of the flow coefficient of Figure 5, the obtained turbine torques differ at the crest of each wave as illustrated in Figure 6. In fact, no stalling was observed for the first scenario but a significant decline at the crest in the second scenario due to the stalling phenomenon that decreases the average value of the torque.

Artificial Neural Networks
Artificial Neural Networks are rather simple electronic representations based on the biological neural structure of the human brain. ANNs were designed to mimic the behavior of the human neural system without the specific knowledge of the relationships between input data and the target data [33]. This feature made ANNs sought for solving many complex problems where specific knowledge of functions is absent or hard to determine [34,35]. A biological neural network consists of many interconnected neurons whereas ANNs are formed by simple processing units, called artificial neurons.
Artificial Neural Networks are formed of neurons in the input, output and hidden layers that are related with weighted signals (w ji ). A neuron consists of a bias b j , a sum function S j associated with an activation function ϕ j as depicted in Figure 7. The sum function of the jth neuron connected to N neurons from the previous layer is: where S j is the sum from the jth neuron from the current layer, b j is the bias, N is the total number of neurons, w ji is the weight of the signal connecting the jth neuron from the current layer with the ith neuron from the previous layer and y i is the input signal from the neuron of the previous layer. Connected to the activation function the output y j of the jth neuron is defined as: The neurons' activation functions at the input layer are clamped with the input vector but the activation function of the neurons in other layers may be defined as: Among the numerous types of ANN, Multi-Layer Perceptron (MLP) is the most common type used as feed-forward ANN. Generally, MLP consists of three layers as depicted in Figure 8. The first layer is the input layer that receives measured data/information. The last layer is called the output layer where the estimated/predicted solution is obtained. The input and output layers are connected

Proposed ANN-Based Rotational Speed Control
The continuous adjustment of the DFIG's rotational speed is on way to avoid the stalling phenomenon in the OWC which will increase the extracted power from waves [20,21]. This way, according to Equation (7), the flow coefficient is regulated not to exceed the threshold value 0.3. Therefore, an ANN-based rotational speed control strategy is suggested to adjust the speed ω r of the DFIG in the OWC system via the back-to-back converter and hence maintaining the flow coefficient φ below the threshold value. The Artificial Neural Network is going to be trained to be able to recognize waves entering, via measured data with the Acoustic Doppler Current Profiler (ADCP). The scheme of the suggested ANN rotational speed control strategy is explained by Figure 9. Each side of the BTB converter controls a different aspect of the plant. The GSC adjusts the DC-link voltage and reactive power, whereas the RSC adjusts the active power and rotational speed.

Grid-Side Converter Control
The vector control based on Voltage Oriented Control has been adopted for the GSC therefore the d-axis is aligned with the grid voltage vector [29]. Hence v dg = v g and v qg = 0. Thus, the grid's active and reactive powers may be written as: Thanks to the Voltage Oriented Control the equations of voltages across the grid are: where ∆v dg and ∆v qg are feed-forward compensation terms which are added back to the control signals. Figure 10 shows the control scheme used to regulate the DC-link voltage and reactive power. The control scheme consists of two rows of two PI controllers in series.  The outer loops regulate the grid currents and generate the reference currents i * dg and i * qg using PI controllers. The PI controllers receive as reference inputs both the grid's reactive power Q * g , frequently set to zero, and the reference DC voltage V * DC = 800 V. The obtained i * dg and i * qg currents are the reference inputs of the inner loops' PI controllers. The inner loops generate reference voltages v dg and v qg which are compensated to get the required v * dg and v * qg for the Pulse Width Modulation.

Rotor-Side ANN Rotational Speed Control
For the rotor-side converter the doubly fed induction generator is controlled by the Stator-Flux Orientation to align the d-axis with the stator-flux vector [27]. Hence ψ ds = ψ s and ψ qs = 0. Thus, the stator currents and stator voltages may be written as: Using (30), the stator active and reactive powers also may be written as: Looking into (31), it indicates that the direct rotor-current i dr is controlled to regulate the reactive power whereas the quadrature rotor-current i qr is controlled to regulate the active power.
Thanks to the Stator-Flux Orientation the rotor voltages can be written as: where ∆v dr and ∆v qr are feed-forward compensation terms which are added back to the control signals.
The control scheme of rotor-side converter is illustrated in Figure 11 which uses two PI controllers to regulate the rotor currents i dr and i qr . Another two PI controllers, in cascade to the outer loops PI controllers, are used to regulate the desired rotor voltages. As with the grid-side converter control, the outer loops produce i * dr and i * qr by using as reference inputs the stator reactive power Q * s and the rotational speed ω * r . Q * s is set to zero whereas ω * r is provided by an ANN-based MPPT for OWC. The reference voltages v dr and v qr are generated by the inner loops which are compensated to obtain v * dr and v * qr .

Gathering Wave Data
The artificial neural network has been trained to identify waves entering the OWC using measured data. The data were collected by AZTI-Tecnalia at the breakwater of Mutriku in the northern coast of Spain using an Acoustic Doppler Current Profiler (ADCP) depicted in Figure 12. ADCP is a hydro-acoustic measurement tool for measuring water current speeds. This device works with the Doppler effect of sound waves returned from particles. ADCPs can send and receive sound signals using a piezoelectric transducer. The distance is estimated based on the time sound waves travel back. The frequency shift of the echo is proportional to the water velocity within the acoustic path. Measuring 3D speed needs at least three beams [36,37].
Recently further features were included to ADCPs to measure wave and turbulence data. The specific ADCP instrument for wave characteristic measurements is called the Acoustic Wave and Current (AWAC) profiler. It offers the possibility of measuring the wave's height and direction [38,39]. The AWAC system uses four transducers to transmit four beams; one middle transducer points vertically upward, and three transducers positioned symmetrically at 120 degrees from each other and are angled 25 degrees from the vertical axis [40,41].
The device installed in Mutriku is of Workhorse 600 kHz from Teledyne RDI and it is mounted upside down at the seafloor 1 m in front of the openings of the OWC's capture chamber. This distance is 5 times smaller than the wavelength λ (see Figure 1) which allows the registered wave trains to enter the chambers without the risk of changing. The considered data in this paper are from 12 May 2014 where measurements of the first 20 min were recorded every 2 h and with a sampling period of 0.5 s. The data were gathered and treated by AZTI-Tecnalia and a spectral analysis has been performed. The wave spectrum of the site of Mutriku is illustrated in Figure 13.

ANN-Based MPPT Design
The trained ANN must generate reference rotational speed ω * r for the outer loop of the RSC control scheme has been developed for a Wells turbine-based oscillating water column. The developed control considers the characteristic curve of Figure 3b with the intention of avoiding the stalling effect. Therefore, the MPPT will generate the optimum ω * r according to the incident wave. Thus, many simulations have been carried out to monitor the flow coefficient for different wave amplitudes and periods yielding the plots of Figure 14 from which the optimum ω * r may be obtained. For the same incoming airflow speed from the same wave amplitudes and periods the torque obtained against the rotational speed is presented in Figure 15. It is indicated in Figures 14 and 15 that the extractable torque is high when the flow coefficient is below the threshold value 0.3 and is highest when it reaches 0.3 which corresponds to optimal ω * r . This approves the aforementioned power constraint triggered by the stalling phenomenon. Therefore, many simulations have been performed to obtain the minimum rotational speed for corresponding wave amplitudes and periods. Hence, input and output data sets were assembled to train the ANN to provide the required rotational speed output. The desired rotational speed reference against the wave amplitude and period is illustrated in Figure 16. The optimum rotational speed in Figure 16 increases as the incoming airflow provided by the strong waves increases unlike the rotational speed shown in Figure 4b which slows down after a certain critical point.
The model of a designed ANN is determined by three features; first, the structure of the network, second, the neuron characteristics, and third, the training algorithm.
The structure of the developed ANN in this work is a Multi-Layer Perceptron (MLP) meaning all links are feed-forward connections. The ANN is formed of a 2-node input layer; one node for the wave amplitude A and the second node for the wave period T w , a hidden layer formed of variable number of hidden nodes and layers, and an output layer that has only one node for the solution which is the reference rotational speed ω * r as explained in Figure 8. The neurons used in the hidden layers are characterized by hyperbolic tangent activation function whereas in the output layer the linear activation function was used.
The developed ANN has been trained using the Levenberg-Marquardt Algorithm (LMA) which combines the gradient descent and Gauss-Newton methods [42]. The training algorithm allows the update of the weights connecting the neurons in order to improve the outcome. This is achieved through the update expression defined as follows: where w ji (p + 1) is the new calculated weight, w ji (p) is the current weight and ∆w ji (p) is the weight correction obtained by the chosen training algorithm. Selecting the needed hidden layers and neurons in a complex system is a difficult task thus forward approach-based trial-and-error rule procedure is adopted [43]. This approach starts by a small number of hidden layers/neurons and increases their number. Then every new ANN structure is trained and tested. This process is repeated until the train and test results are improved.

ANN Training Process
For the training of the network the Levenberg-Marquardt Algorithm (LMA) has been used as a learning technique [42]. LMA is based on Newton's technique that was developed to minimize functions that are sums of squares of nonlinear functions [44]. The algorithm is intended to update the ANN weights to minimize the performance index by [45]: (34) where W is weights vector, F(·) is the performance index, ∇F(·) is the gradient, ∇ 2 F(·) the Hessian matrix, µ is the learning rate and I is an identity matrix. The performance index may be described by: with E(·) is the error between the network's output and the desired output. The performance index's gradient can be given by: where J(W) is the Jacobian matrix defined as [46]: with n is the number of training patterns. Consequently, the Hessian matrix can be described by: The pseudocode Algorithm 1 is given to detail the steps of the Levenberg-Marquardt Algorithm. • Decrease learning rate by a factor β: µ = µ/β, • Return to step 3. 8. Continue training until one of the following termination conditions is reached: (Epoch> Epoch max ) or (µ>µ max ) or (E p ≤E min ) The training and validation of all tested ANN structures was performed using MATLAB R2015a while using 3.2 GHz Intel Core i7-8700 Six-Core processor and Integrated Intel UHD Graphics 630.

ANN Model Selection
The Mean Squared Error (MSE) has been chosen in this work as a selection criterion for the ANN model to be used in the proposed airflow control. The MSE is one of the indicators often used in prediction problems [47]. The best ANN structure is selected by choosing the smallest MSE obtained during the training process.
The Mean Squared Error was computed in every case using the following expression: where n is the total observations, Y i is the target output being the desired rotational speed reference andŶ i is the predicted output by the ANN.

Results and Discussion
This section of the paper presents the tests performed to assess the efficiency of the developed ANN-based rotational speed control. A complete wave-to-wire model on MATLAB/Simulink of the oscillating-water-column system has been implemented for performance evaluation of the suggested control and a comparison with the uncontrolled case has been carried out.
The implemented OWC model has been configured using the parameters obtained from real measurements at the NEREIDA wave power plant. These parameters were provided by the Basque Energy Agency (EVE) and are indicated in Table 1.

ANN Training Performance
With the forward approach-based trial-and-error rule method, numerous structures with different hidden layers and neurons have been tested with our problem. For the training process, the data were divided into 40% for the learning stage, 30% for the testing stage and 30% for the validation stage.
The results of calculations for determining the ANN model are detailed in Table 2. The results of training show that the best neural model that has been calculated is the MLP 2 × 4 × 8 × 1 with 2 neurons on the input layer (for the wave amplitude and period), 4 neurons on the first hidden layer, 8 neurons on the second hidden layer and 1 neuron on the output layer (for the rotational speed reference). The second best MLP is 2 × 4 × 4 × 1 with 2 neurons on the input layer, 4 neurons on the first hidden layer, 4 neurons on the second hidden layer and 1 neuron on the output layer. These two nets have the best learning, testing and validation qualities moreover, their validation quality is not lower than that of the learning and testing qualities.
During the simulations, the study case takes into consideration the number of epochs and the smallest MSE. Table 3 shows the validation results obtained of training different network structures applied to the problem of wave characteristics recognition.
Results of Table 3 indicate that using a network with a single hidden layer provides less accurate results due to the nonlinearity and complexity of the problem. On the other hand, multiple hidden layer networks provide better results. However, when increasing the number of neurons in the hidden layers and the number of epochs the obtained MSE is worsened. This is due to the overlearning effect.
More analysis has been performed on the curves of the training performance of the multiple hidden layer networks with the best MSE labeled as ANN1 and ANN2 for adequate structure selection. The training process history of ANN1 (2 × 4 × 8 × 1) is given by Figure 17 while the one of ANN2 (2 × 8 × 4 × 1) is given by Figure 18. Both figures indicate that for ANN1 the training process took more epochs to converge to a minimum MSE of 2.3787 × 10 −5 in 615 epochs however with ANN2 it converged to a smaller MSE of 1.5633 × 10 −5 in fewer epochs at 200. Finally, ANN2's structure has been chosen as ANN rotational speed reference generator to be used in the developed rotational speed control strategy with real measured data.

Control Assessment with Regular Waves
To assess the power generation improvement offered by the proposed ANN-based rotational speed control strategy, a comparative study using ANN1 and ANN2 with two representative sea conditions from the coast of Mutriku were considered from the wave spectrum of Figure 13.
The wave's input features consist of a water depth h = 5 m and a wave period T w = 10 s. The first wave condition has an amplitude of A = 0.8 m from 0 s to 97.5 s while the second wave condition has an amplitude of A = 1.3 m from 97.5 s to 200 s as presented in Figure 19.  Figure 20 shows the airflow speed for both waves in the uncontrolled case. With the second wave the airflow speed is stronger which will provoke the stalling behavior. To prevent the stalling phenomenon, the proposed ANN rotational speed control increases the speed when the critical values are reached as shown in Figure 21. This successfully increases the speed in terms of average value from 264.2 rad/s to 272.6 rad/s using ANN1 and 274.1 rad/s using ANN2.  Figure 22 shows the flow coefficients which, in the first wave, did not exceed the threshold value 0.3 in the uncontrolled so no control action was required in the controlled case. However, in the second wave, the flow coefficient exceeds the threshold value hence the increase of the rotational speed helped adjusting it.  Figure 23 presents the obtained torques and it is indicated that in the case of the second wave condition the torque in the uncontrolled OWC has decreases significantly at every crest reducing the torque's average value to 61.16 Nm. On the other hand, while using the ANN rotational speed control the torque has been held at the highest speed which offered a higher average value of 63.02 Nm using ANN1 and 66.22 Nm using ANN2.  Figure 24 presents the produced power which is negative because it is absorbed by the grid. The produced power did not suffer a power drop at the crests of the second wave condition. As a result, the average value of the produced power has increased to −16.51 kW using ANN1 and −17.39 kW using ANN2 compared to −15.52 kW in the uncontrolled case. From these results the total power increase obtained from using the ANN rotational speed control for only 50 s is 19.36 kW corresponding to 2.53% for one OWC.

Control Assessment with Real Measured Wave Data
To further validate the effectiveness of the proposed control, real wave surface elevation data has been considered. Figure 25 illustrates the wave data that were gathered by an ADCP on 12 May 2014, at 00:00:00 AM at Mutriku. This input wave data will allow us to investigate the developed ANN-based rotational speed control strategy with different wave amplitudes and periods in realistic conditions.   The produced torques presented in Figure 29 show that the torque of the uncontrolled OWC have indeed suffered of the stalling behavior at the instants 5 s, 8 s, 38 s and 48 s nevertheless thanks to the ANN-based rotational speed control strategy they have been effectively evaded.  Similar to the torques, the obtained powers have effectively evaded the stalling phenomenon as depicted in Figure 30. From these results the total power increase obtained from using the ANN rotational speed control for only 50 s is 7.16 kW corresponding to 2.06% for one OWC. As a final validation test, we considered the produced power of one oscillating water column in NEREIDA of Mutriku at the same time and day. The power data has been obtained from the Basque Energy Agency (EVE). The red curve represents the measured power on 12 May 2014, at 00:00:00 a.m.
Considering the quality of the power data due to the big sampling period, some similarities can be seen between the power curves. Yet, at the wave crests 5 s, 8 s, 18 s, 38 s and 48 s the numerical power from the ANN-based rotational speed control is higher than the measured power.

Conclusions
The present manuscript presents the modeling and application of an oscillating-water-column plant containing a doubly fed induction generator driven by a Wells turbine. The paper introduces a new ANN-based rotational speed control strategy for the stalling phenomenon within the Wells turbine that proved to limit the produced power.
The suggested ANN rotational speed control contains a trained ANN to identify strong incoming waves susceptible of provoking the stalling phenomenon in the oscillating water column. The wave surface elevation measurements considered to train the artificial neural network were recorded by an ADCP. Once trained, the network can generate the suitable rotational speed reference. The rotational speed reference was used within the ANN-based rotational speed control scheme. For the development of a proper ANN structure for the problem various simulations were carried out with the forward approach-based trial-and-error rule. The best network structure was chosen by taking into consideration the best performance index, the number of epochs and the least complex structure.
The ANN training process revealed that the best MSE was achieved using MLP networks. The selected network structure converged in a tolerable number of epochs. With the trained ANN within the rotational speed control scheme, it was able to identify strong waves to evade the stalling phenomenon. The results demonstrate the efficiency of the proposed control for various sea conditions. Moreover, a demonstrative study case considering measured surface elevation data of waves in Mutriku displayed decent avoidance of the stalling behavior when compared to the measured power of an OWC of NEREIDA facility.
Since the idea is to generate a rotational speed reference that solely depends on the wave amplitude and period, with a proper database of wave data, the ANN training is neither hard nor time-consuming and it is easily implemented in a conventional RSC control scheme which might already exist in existing plants. This makes the proposed control transferable to any similar sites. ω s , ω r Stator and rotor rotational speed (rad/s) S j , ϕ j , b j Sum function, activation function, bias and output of the jth neuron y i , y j output of ith neuron from previous layer and output of the jth neuron from current layer w ji Weight of signal connecting ith neuron from previous layer to jth neuron of current layer