# Real-Time Wave Energy Converter Control Using Instantaneous Frequency
## 3 Comparison of Methods
### NRMSE Comparison of Estimation Methods  
The normalized root mean square error (NRMSE) is computed as follows:  
\[\text{NRMSE}=\frac{\sqrt{\frac{1}{N}\sum_{l=1}^{N}(f_{\text{est},i}-f_{\text{ true},i})^{2}}}{f_{\text{max}}-f_{\text{min}}}\times 100, \tag{7}\]  
where \(f_{\text{est}}\) and \(f_{\text{true}}\) represent the estimated and true instantaneous frequencies, respectively, and \(f_{\text{max}}\) and \(f_{\text{min}}\) denote the maximum and minimum observed frequencies. Parameter Sensitivity Analysis for Instantaneous Frequency Estimation  
To determine the optimal tuning parameters for the instantaneous frequency estimation methods, an iterative parameter sweep was performed using 50 different random wave realizations. In each iteration, a JONSWAP wave elevation time series was generated over a 1200 s duration, sampled at 10 Hz. The key wave parameters were set as follows: a significant wave height of \(H_{s}=1.5\) m, a peak frequency of \(f_{p}=1/9\) Hz, uniformly distributed random phase information, and a spectral peakedness parameter \(\gamma=3.3\). The generated time series were characterized by an energy mean frequency \(f_{e}\), defined as follows:  
\[f_{e}=\frac{m_{1}}{m_{0}}, \tag{8}\]  
where \(m_{0}\) and \(m_{1}\) are the zeroth and first spectral moments, respectively. The \(n\)-th spectral moment \(m_{n}\) is given by the following:  
\[m_{n}=\int_{0}^{\infty}f^{n}S(f)\,df, \tag{9}\]  
where \(S(f)\) is the wave energy spectrum. Specifically, \(m_{0}\) represents the total energy of the spectrum while \(m_{1}\) quantifies the energy-weighted mean frequency. These spectral moments were numerically computed based on the discretized JONSWAP spectrum used in each random realization. The resulting time series, denoted as Case 4, served as the input for both the CHT- and PLL-based instantaneous frequency estimation tests. This setup ensured that the parameter tuning was evaluated under realistic, irregular sea conditions exhibiting broadband frequency content. For each wave realization, the true instantaneous frequency was assumed to be computed using a Non-Causal Hilbert Transform (NCHT) algorithm, which has full access to  
Figure 6: Case 4: Instantaneous frequency comparison showing performance of CHT and PLL estimations for JONSWAP sea condition. both the past and future history of the signal. In contrast, the CHT method relies on the choice of a median window to estimate the instantaneous frequency. The median window was defined to cover approximately ten wave cycles, calculated as follows:  
\[\text{window size}=\text{round}\left(\frac{10}{f_{e}\Delta t}\right), \tag{10}\]  
where \(f_{e}\) is the energy mean frequency and \(\Delta t\) is the simulation time step. The median window fraction is defined as the ratio of the chosen median window size to the total analysis window size. In the parameter sweep, the median window fraction was varied from 0.005 to 0.2 in increments of 0.005. For each median window fraction, the CHT-based instantaneous frequency estimate was computed, compared against the true NCHT-derived frequency (after conversion to radians per second), and the corresponding NRMSE was evaluated. For the PLL method, the key tuning parameter is the cutoff frequency \(f_{c}\) of the PI controller within the loop filter. The cutoff frequency was swept according to the following:  
\[f_{c}=0.05\times i\quad\text{(Hz)}, \tag{11}\]  
where \(i\) is the sweep index, ranging from 1 to 40 (corresponding to 0.05 Hz to 2 Hz). For each cutoff frequency, the PI controller gains were tuned to maintain a fixed phase margin of 60\({}^{\circ}\), using MATLAB's Linearization Toolbox. For each tuning parameter value, a simulation of Case 4 was performed, and the PLL-based instantaneous frequency was estimated. This entire parameter sweep procedure was repeated for 50 independent iterations, each corresponding to different random phase information while preserving the same JONSWAP spectral.