# Rotational Speed Control Using ANN-Based MPPT for OWC Based on Surface Elevation Measurements
## 3 Materials and Methods
### ANN-Based MPPT Design  
The trained ANN must generate reference rotational speed \(\omega_{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 \(\omega_{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 \(\omega_{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 \(\omega_{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  
Figure 14: Flow coefficient vs rotor rotational speed for different incoming airflow speed.  
Figure 15: Turbine torque vs rotor rotational speed for different incoming airflow speed.  
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 \(\omega_{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:  
\[w_{ji}(p+1)=w_{ji}(p)+\Delta w_{ji}(p) \tag{33}\]  
where \(w_{ji}(p+1)\) is the new calculated weight, \(w_{ji}(p)\) is the current weight and \(\Delta 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.