There are multiple ways of calculating significant wave height (Hs). According to wikipedia, the original definition was the average of the highest 3rd of waves. What this means is you would measure wave heights(trough to crest) for a set period, order that dataset from lowest to highest, take the top 3rd of the values and get the average of those.

The more modern definition of significant wave height is four times the standard deviation of the surface elevation or equivalently as four times the square root of the zeroth-order moment (area) of the wave spectrum. This post will just look at the standard deviation method of calculation, the calculation using the wave spectrum will be covered in a later post.

Matlab was used to test this calculation. First some simulated wave data was generated (the details of this will be covered in a later post). This simulated wave data is the vertical surface displacement over time and looks something like this:

In order to calculate significant wave height using the old definition of the highest 3rd of waves requires individual waves to be measured. This can be done in Matlab by finding the local minima and maxima using the islocalmin() and islocalmax() functions. The output of these functions just returns the index number of the dataset where the min/max is found, plotting these points over the original data looks like this:

Identifying these local extrema lets you calculate individual wave heights by calculating the difference in height between one trough and the next peak. Performing this step for the entire data set gives you a set of wave heights. Taking the highest 3rd of these values and averaging them gives the Hs measurement.

The standard deviation of the input data is calculated using the Matlab std() function. This number is then multiplied by 4 to get the significant wave height.

The difference between the highest 3rd and standard deviation calculations are shown below:

The difference between the two calculation methods varies based on the dataset used but the average difference is around 30-40%. It is proving difficult to find real world examples of calculation of significant wave height from ocean surface displacement data. Most references to the Hs measurement simply state that the highest 3rd method is roughly equivalent to the standard deviation method. The results shown here do not really match with that assertion. A 30-40% difference is quite a lot which does cast some doubt on the results shown here.

The highest 3rd calculation requires identifying the peaks in the time domain which would demand a sample rate much higher than the nyquist sample rate. This method also requires more processing power as the local extrema need to be identified, for an embedded system this would be less than ideal.

The standard deviation * 4 measurement is much easier to calculate but again, because the analysis is taking place in the time domain, a sample rate much higher than nyquist would be required in order to get an accurate picture of ocean surface displacement.

The third option mentioned above of calculating significant wave height using frequency domain data is the much more appealing option. Most other commercial wave sensors can measure ocean waves in the range 0.05-0.67Hz (1.5 – 20 second period). This means that a 2Hz sample rate would be more than enough to satisfy nyquists theorem. This low sample rate would be an advantage on a low power embedded system.

The matlab code used in this example can be found on the github repo in the folder Matlab (script name is “gen_and_plot.m”)