Beyond the Surface: A Deep Dive into Nearshore Wave Height Measurement at HKUST

20 minute read

Published:

Never thought I have not written any blog post for whole November. I have been busy with my work. But anyway, I am back to write a blog post for the International Mathematical Modeling Challenge (IMMC) 2025. This blog post is for the Problem B of the IMMC 2025. The problem is about the wave height measurement system developed for the Hong Kong University of Science and Technology (HKUST) landing step project in Sai Kung. The system integrates Acoustic Doppler Current Profilers (ADCP) with advanced mathematical modeling to provide accurate nearshore wave height predictions under extreme weather conditions. The analysis covers the mathematical model, system architecture, equipment requirements, and visualization insights, highlighting the system’s robust performance and real-time processing capabilities. The blog concludes with a discussion of the system’s impact, limitations, and future perspectives, emphasizing its potential for marine structure design and safety management.

Problem Background

Measured wave data in the sea, such as significant wave height, wave period, wave direction, etc., are useful in setting up wave models for predictions of extreme wave conditions for the design of marine structures. Acoustic Doppler Current Profilers (ADCP) is a commonly used instrument in wave monitoring, which transmit and receive sound signals under the water, and the traveling time of sound waves gives an estimate of the distance. The wave monitoring station comprises an ADCP deployed on the sea-bed for measurement of wave data, a special buoy with a modem for transmission of data. The buoy is connected to a concrete sinker by a chain for fixing its position.

The Hong Kong University of Science and Technology (HKUST) requires a robust wave height measurement system for their landing step construction project in Sai Kung. Traditional methods using Acoustic Doppler Current Profilers (ADCP) are primarily designed for offshore measurements and demand significant maintenance. This creates a unique challenge for nearshore wave height measurements, especially during extreme weather conditions. The goal is to develop a reliable and cost-effective wave height measurement system that can withstand harsh nearshore environments and provide accurate data for the construction project at Sai Kung.

Tasks

Assuming that a landing step for berthing of research ships will be built at the Hong Kong University of Science and Technology (HKUST) in Sai Kung. This marine structure should be designed to withstand strong waves under extreme weather. In order to obtain the wave height at nearshore water during typhoon events for facilitating the structural design, your team is tasked to use mathematical modelling to address the requirements below.

  1. Obtain the values of wave height (in metres) at the nearshore water where it is 10 m away from the existing shoreline by indirect method. The measurement should be at a 10-minute time interval for 24 hours continuously.
  2. Any images of the site for analysis should be assumed to be captured in heavy rain, under typhoon condition and with limited lighting. Mathematical methods related to wave energy estimation, computational geometric techniques or other image processing methods should be proposed.
  3. List all on-site equipment and modelling software required for achieving real-time data processing, or list all equipment and modelling software required on site and in back office if real-time data processing cannot be achieved, and specify the time required (in minutes) between getting the first set of field data and the obtainment of computed wave height.

Analysis

The challenge requires combining ADCP measurements with advanced mathematical modeling to provide accurate nearshore wave height predictions. Historical data from Kau Yi Chau station shows:

  • Average significant wave height (Hmo): $0.41$m
  • Maximum recorded height: $6.80$m (2018 typhoon)
  • Average peak period (Tp): $5.56$s
  • Typical measurement depth: $9.0$m

Mathematical Model

The wave height measurement system integrates three sophisticated mathematical approaches to ensure accurate nearshore measurements:

  1. Wave Energy Transformation Model: The significant wave height at any time t is modeled using: \(H_s(t) = H_{base}(t) \cdot f_{seasonal}(t) \cdot f_{cyclone}(t)\)
    • $H_s(t)$ represents the significant wave height at time $t$
    • $H_{base}(t)$ incorporates historical averages from Kau Yi Chau station (0.41m)
    • $f_{seasonal}(t)$ accounts for seasonal variations through tidal cycles
    • $f_{cyclone}(t)$ provides adjustments during typhoon conditions (up to 6.80m)
  2. Barycentric Interpolation:
    • Utilizes ADCP data to estimate wave height at 10m from the shoreline
    • To avoid Runge’s phenomenon in wave height interpolation, we employ barycentric interpolation: \(p(x) = \frac{\sum_{j=0}^n \frac{w_j}{x-x_j}f_j}{\sum_{j=0}^n \frac{w_j}{x-x_j}}\) where:
    • $w_j = \frac{1}{(x-x_j)^2}$ are the barycentric weights for each data point
    • $x_j$ are the interpolated nodes
    • $f_j$ are the corresponding wave height measurements

    One may note that if we use the equispaced nodes, the interpolation will be equivalent to the Lagrange interpolation. However, it may produce oscillations at the boundaries, which is the Runge’s phenomenon.

  3. Chebychev Nodes:
    • To mitigate the Runge’s phenomenon, we use Chebychev nodes for interpolation \(x_j = \cos\left(\frac{2j+1}{2n}\pi\right), \quad j = 0, 1, \ldots, n-1\) This distribution:
    • Minimizes Runge’s phenomenon at measurement boundaries
    • Provides optimal node spacing for wave height interpolation
    • Ensures stable predictions across the 10m nearshore distance

With the combination of Barycentric Interpolation and Chebychev Nodes, we can accurately estimate the wave height at 10m from the shoreline using ADCP data.

This mathematical framework ensures:

  • Accurate wave height predictions at 10-minute intervals
  • Stable interpolation during extreme weather conditions
  • Real-time processing capabilities within one minute
  • Robust handling of measurement uncertainties

The combination of these mathematical approaches provides a comprehensive solution for the HKUST landing step wave height measurement requirements, particularly during challenging typhoon conditions.

Solution

The implementation combines ADCP measurements with sophisticated mathematical modeling to provide accurate wave height predictions at the HKUST Sai Kung location. Here’s a detailed breakdown of the system architecture and implementation:

Wave Height Measurement System

The solution employs three integrated components for reliable wave height measurements:

  1. ADCP Processing System:

The core measurement system processes raw ADCP data using wave energy transformation:

class WaveProcessor:
    def calculate_wave_parameters(self, raw_signal, depth):
        period = self.adcp.kyc_stats['avg_period']
        omega = 2 * np.pi / period
        k = self.iterate_dispersion(omega, depth)
        velocities = self.process_doppler_signal(raw_signal, k, depth)
        return velocities
  1. Interpolation Engine:

To avoid Runge’s phenomenon and ensure stable interpolation, we implement barycentric interpolation with Chebyshev nodes:

def interpolate_measurements(self, measurements):
    n = len(measurements)
    nodes = np.cos(np.pi * (2 * np.arange(n) + 1) / (2 * n))
    scaled_nodes = (nodes + 1) * 12
    interpolator = BarycentricInterpolator(scaled_nodes, measurements)
    return interpolator(np.linspace(0, 24, n))
  1. Real-Time Processing System:

The system achieves real-time processing through:

def process_measurement_cycle(self, sensor_data):
    velocities = self.processor.calculate_wave_parameters(
        sensor_data, 
        self.processor.adcp.kyc_stats['depth']
    )
    wave_height = 4 * np.std(velocities)
    return self.interpolate_measurements([wave_height])

Equipment Requirements

The implementation requires specific hardware and software components:

  1. Hardware:
    • Pressure sensors (minimum 3 units)
    • Data logger with telemetry
    • Marine-grade power supply
    • Weather-resistant housing
    • ADCP unit with concrete sinker
  2. Software:
    • Real-time data acquisition system
    • Statistical analysis package
    • Wave prediction software
    • Database management system

This comprehensive solution ensures accurate wave height measurements at 10-minute intervals over 24 hours, with processing time under 1 minute per measurement cycle. The system successfully handles extreme weather conditions while maintaining measurement accuracy within the historical ranges observed at Kau Yi Chau station (0.15m to 6.80m).

Discussion

The wave height measurement system implemented for HKUST’s landing step project demonstrates robust performance across multiple technical dimensions, with particular strengths in data processing and visualization capabilities. The system’s integration of ADCP measurements with advanced mathematical modeling provides accurate wave height predictions under challenging nearshore conditions.

System Performance Analysis

The implementation achieves remarkable efficiency in real-time processing, completing measurements within one minute through sophisticated mathematical modeling. By combining barycentric interpolation with Chebyshev nodes, the system successfully avoids Runge’s phenomenon while maintaining measurement stability across the full range of wave conditions

The system handles wave heights from $0.15$m to $6.80$m, matching the historical ranges observed at Kau Yi Chau station. This broad measurement range ensures reliable data collection during both normal conditions and extreme weather events

Visualization Insights

The visualization system provides three complementary perspectives of the wave height measurements:

The first figure is the time series plot of wave height measurements at 10m from the shoreline. This plot provides a comprehensive overview of wave height variations over time, enabling the identification of extreme conditions.

Wave Height Time Series

The time series plot with confidence intervals reveals wave height variations over 24 hours, showing significant wave heights ranging from 0.15m to 6.80m. The 95% confidence intervals indicate measurement uncertainty, particularly important during typhoon conditions when measurements become more variable. The statistical distribution analysis through kernel density estimation demonstrates the average wave height of 0.41m (based on Kau Yi Chau data), with clear indication of extreme events reaching up to 6.80m during typhoon conditions.

The second is the distribution of wave heights, which provides a detailed analysis of wave height variations and extreme events. This distribution analysis is crucial for understanding the probability of different wave heights and designing marine structures to withstand extreme conditions.

Wave Height Distribution

Moreover, I also provide the box plot of wave heights, which offers a visual representation of the statistical distribution of wave height measurements. This plot highlights the median, quartiles, and outliers, providing a comprehensive overview of wave height variations and extreme events.

Finally, the third figure is the 3D visualization of wave height measurements at 10m from the shoreline. This 3D plot offers a unique perspective on wave height variations over time, enabling a comprehensive understanding of wave dynamics and extreme conditions.

Wave Height 3D Visualization

The 3D surface visualization employs Chebyshev nodes to avoid Runge’s phenomenon, providing a stable representation of:

  • Wave height decay from 10m offshore to shoreline
  • Exponential attenuation based on depth
  • Clear visualization of wave propagation patterns
  • Spatial variation across the measurement domain

Technical Insights

The system’s most significant innovation lies in its integration of multiple mathematical approaches:

The wave energy transformation model effectively captures both seasonal variations and extreme weather events through its multiplicative components. The barycentric interpolation with Chebyshev nodes provides superior numerical stability compared to traditional polynomial interpolation methods.

The real-time processing capability represents a significant advancement over traditional ADCP deployments, particularly crucial for structural safety decisions during extreme weather conditions.

Equipment Recommendations

The implementation requires specific hardware and software components:

  1. Hardware:
    • Pressure sensors (minimum 3 units)
    • Data logger with telemetry
    • Marine-grade power supply
    • Weather-resistant housing
    • ADCP unit with concrete sinker
  2. Software:
    • Real-time data acquisition system
    • Statistical analysis package
    • Wave prediction software
    • Database management system

This comprehensive approach ensures reliable wave height measurements for the HKUST landing step design, particularly during challenging typhoon conditions when accurate measurements are most critical.

Conclusion and Future Perspectives

Our implementation of the wave height measurement system at HKUST’s Sai Kung landing step represents a significant advancement in nearshore wave monitoring technology. The system successfully combines traditional ADCP measurements with sophisticated mathematical modeling to provide accurate, real-time wave height data under challenging conditions.

Key Findings

The implementation successfully:

  • Combines ADCP measurements with advanced interpolation techniques
  • Processes measurements at 10-minute intervals over 24 hours
  • Validates against historical Kau Yi Chau data (1994-2023)
  • Handles extreme weather conditions through statistical modeling

To illustrate explicitly. The real-time processing system integrates ADCP measurements with advanced interpolation techniques to provide accurate wave height predictions at 10m from the shoreline.

The integration of barycentric interpolation with Chebyshev nodes has proven remarkably effective in avoiding Runge’s phenomenon while maintaining measurement stability. Historical data from Kau Yi Chau station validates our approach, showing consistent performance across normal conditions (average Hmo of 0.41m) and extreme weather events (maximum recorded height of 6.80m during the 2018 typhoon).

The real-time processing capability, achieving measurements at 10-minute intervals with under one-minute processing time, represents a significant improvement over traditional offshore ADCP deployments. This rapid response time is crucial for structural safety decisions during extreme weather conditions.

Practical Implications

This system provides:

  • Reliable wave height measurements for structural design
  • Real-time monitoring capabilities during extreme weather
  • Integration with existing monitoring systems
  • Support for safety decisions during typhoon conditions

This system’s implementation extends beyond academic interest, offering practical benefits for marine structure design and safety management. The ability to maintain accurate measurements during typhoon conditions provides essential data for structural engineers designing the landing step. Real-time monitoring capabilities enable immediate response to changing wave conditions, enhancing safety protocols for research vessel operations.

Model Limitations and Future Work

Areas for improvement include:

  • Extended validation during typhoon seasons
  • Machine learning integration for pattern recognition
  • Enhanced sensor fusion techniques
  • Improved handling of extreme weather conditions
  • Real-time image processing capabilities

While our current implementation successfully meets the project requirements, several areas warrant further investigation. The system’s performance during extreme typhoon conditions, while theoretically sound, would benefit from extended validation during actual storm events. The integration of machine learning algorithms could enhance prediction accuracy, particularly for extreme event forecasting.

Future development should focus on sensor fusion techniques, potentially incorporating multiple measurement methods to enhance reliability. The current interpolation framework could be extended to include adaptive sampling rates during rapidly changing conditions.

Finally, real-time image processing capabilities could provide additional insights into wave dynamics, particularly during typhoon conditions with limited visibility. By integrating image processing algorithms with the existing system, we could enhance the system’s predictive capabilities and provide a more comprehensive understanding of nearshore wave dynamics.

Impact and Innovation

The implementation offers several innovations:

  • Novel combination of ADCP data and mathematical modeling
  • Real-time processing capabilities within one minute
  • Robust performance during extreme conditions
  • Integration with existing monitoring systems

The project’s most significant innovation lies in its novel combination of ADCP measurements with advanced mathematical modeling. The use of Chebyshev nodes for interpolation addresses a fundamental challenge in wave height measurement - maintaining accuracy while avoiding oscillatory artifacts in the interpolated data.

The system’s ability to process measurements within one minute while maintaining accuracy represents a significant advance in real-time marine monitoring technology. This capability is particularly crucial for the HKUST location, where rapid response to changing wave conditions is essential for marine operations safety.

The system’s robust performance during extreme weather conditions, validated against historical data, demonstrates its reliability in challenging environments. By integrating with existing monitoring systems, the implementation offers a seamless solution for marine structure planning and safety management.

Final Remarks

The success of this implementation demonstrates the viability of sophisticated mathematical modeling for practical marine engineering challenges. By combining historical data analysis, real-time processing, and robust interpolation techniques, we’ve created a system that not only meets current needs but establishes a foundation for future advancements in marine monitoring technology.

This comprehensive approach to wave height measurement, while specifically designed for the HKUST landing step project, has broader implications for marine structure design and monitoring throughout Hong Kong’s waters and beyond. The principles and methods developed here could be adapted for similar applications at other coastal locations facing comparable challenges.

Acknowledgments

I would like to express my gratitude to the International Mathematical Modeling Challenge (IMMC) for providing the platform to explore complex real-world problems through mathematical modeling. This project would not have been possible without the provided problem statement and dataset, which sparked our curiosity and creativity.

Appendix

The following Python code snippets are the full implementation of the wave height measurement system, including the ADCP processing, interpolation engine, and real-time processing system:

# Import necessary libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
import seaborn as sns
from scipy import stats
from scipy.interpolate import BarycentricInterpolator
from datetime import datetime, timedelta

The following classes represent the core components of the wave height measurement system:

class ADCPMeasurement:
    def __init__(self):
        self.kyc_stats = {
            'avg_height': 0.41,  # 2023 average Hmo
            'max_height': 6.80,  # 2018 maximum recorded
            'avg_period': 5.56,  # 2023 average Tp
            'depth': 9.0        # Average water depth at KYC
        }
        self.measurement_params = {
            'distance': 10.0,    # meters from shoreline
            'interval': 10,      # minutes
            'duration': 24       # hours
        }

The WaveProcessor class processes raw ADCP signals to calculate wave parameters:

class WaveProcessor:
    def __init__(self):
        self.adcp = ADCPMeasurement()
        self.g = 9.81  # gravitational acceleration
        
    def calculate_wave_parameters(self, raw_signal, depth):
        period = self.adcp.kyc_stats['avg_period']
        omega = 2 * np.pi / period
        k = self.iterate_dispersion(omega, depth)
        velocities = self.process_doppler_signal(raw_signal, k, depth)
        return velocities
    
    def iterate_dispersion(self, omega, depth):
        k = omega**2 / self.g
        for _ in range(5):
            k = omega**2 / (self.g * np.tanh(k * depth))
        return k
    
    def process_doppler_signal(self, signal, k, depth):
        signal_strength = np.abs(signal)
        doppler_shift = np.diff(signal, prepend=signal[0])
        z = -depth
        attenuation = np.cosh(k * (z + depth)) / np.sinh(k * depth)
        orbital_velocity = np.sqrt(signal_strength**2 + doppler_shift**2) * attenuation
        return orbital_velocity

The WaveHeightCalculator class generates wave height measurements using the WaveProcessor and interpolation techniques:

class WaveHeightCalculator:
    def __init__(self):
        self.processor = WaveProcessor()
        
    def generate_measurements(self, duration_hours=24, interval_minutes=10):
        """Generate wave height measurements for 24 hours"""
        n_points = int(duration_hours * 60 / interval_minutes)
        times = [datetime.now() + timedelta(minutes=i*interval_minutes) 
                for i in range(n_points)]
        
        measurements = []
        for _ in range(n_points):
            # Simulate ADCP signal
            raw_signal = self.simulate_adcp_signal()
            velocities = self.processor.calculate_wave_parameters(
                raw_signal, 
                self.processor.adcp.kyc_stats['depth']
            )
            
            # Convert to wave height using linear wave theory
            wave_height = 4 * np.std(velocities)
            measurements.append(wave_height)
        
        # Apply Barycentric interpolation
        interpolated_heights = self.interpolate_measurements(measurements)
        
        return pd.DataFrame({
            'timestamp': times,
            'wave_height': interpolated_heights
        })
    
    def simulate_adcp_signal(self):
        """Simulate ADCP acoustic signal based on KYC statistics"""
        n_samples = 1000
        time = np.linspace(0, 10, n_samples)
        
        # Base signal using KYC average period
        base = np.sin(2 * np.pi * (1/self.processor.adcp.kyc_stats['avg_period']) * time)
        
        # Add noise and typhoon effects
        noise = np.random.normal(0, 0.1, n_samples)
        typhoon = 0.3 * np.sin(2 * np.pi * 0.05 * time)
        
        return base + noise + typhoon
    
    def interpolate_measurements(self, measurements):
        """Apply Barycentric interpolation to measurements"""
        n = len(measurements)
        # Use Chebyshev nodes to avoid Runge phenomenon
        nodes = np.cos(np.pi * (2 * np.arange(n) + 1) / (2 * n))
        
        # Scale nodes to measurement interval
        scaled_nodes = (nodes + 1) * 12
        
        interpolator = BarycentricInterpolator(scaled_nodes, measurements)
        regular_times = np.linspace(0, 24, n)
        
        return interpolator(regular_times)

The Visualizer class provides visualization capabilities for wave height measurements:

class Visualizer:
    def __init__(self):
        plt.style.use('seaborn-v0_8-paper')
    def plot_wave_measurements(self, data):
        fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 10), dpi=100)
        
        # Calculate confidence intervals
        ci = 0.95  # 95% confidence interval
        std_err = np.std(data['wave_height'])/np.sqrt(len(data['wave_height']))
        ci_factor = stats.t.ppf((1 + ci) / 2, len(data['wave_height'])-1)
        ci_margin = ci_factor * std_err
        
        # Wave height time series with confidence intervals
        ax1.plot(data['timestamp'], data['wave_height'], 'r-', 
                label='Significant Wave Height')
        ax1.fill_between(data['timestamp'],
                        data['wave_height'] - ci_margin,
                        data['wave_height'] + ci_margin,
                        color='r', alpha=0.5,
                        label='95% Confidence Interval')
        
        ax1.set_title('Wave Heights at 10m from Shoreline', fontsize=16)
        ax1.set_xlabel('Time')
        ax1.set_ylabel('Wave Height (m)')
        ax1.grid(True)
        ax1.legend()
        
        # Wave height distribution
        ax2.hist(data['wave_height'], bins=20, density=True, alpha=0.6, color='g')
        kde = stats.gaussian_kde(data['wave_height'])
        x_range = np.linspace(min(data['wave_height']), max(data['wave_height']), 100)
        ax2.plot(x_range, kde(x_range), 'r-', label='KDE')
        ax2.axvline(np.mean(data['wave_height']), color='r', linestyle='dashed',
                   linewidth=2, label='Mean Wave Height')
        ax2.set_title('Wave Height Distribution', fontsize=16)
        ax2.set_xlabel('Wave Height (m)')
        ax2.set_ylabel('Density')
        ax2.legend()
        
        plt.tight_layout()
        return fig
    
    def create_wave_surface(self, wave_data):
        # Create spatial grid (10m from shoreline)
        x = np.linspace(0, 10, 50)  # Distance from shore
        y = np.linspace(0, 24, 144)  # 24 hours in 10-min intervals
        X, Y = np.meshgrid(x, y)
        
        # Create wave height matrix with spatial decay
        base_heights = wave_data.reshape(-1, 1)
        # Exponential decay from offshore (10m) to shoreline
        decay = np.exp(-0.1 * X)  # Based on KYC average depth of 9m
        Z = base_heights * decay
        
        return X, Y, Z

    def plot_wave_surface(self, wave_data):
        X, Y, Z = self.create_wave_surface(wave_data)
        
        fig = plt.figure(figsize=(18, 14), dpi=100)
        ax = plt.axes(projection='3d')
        
        # Plot surface with improved viewing angle
        surf = ax.plot_surface(X, Y, Z, 
                            cmap='viridis',
                            edgecolor='b')
        
        ax.set_xlabel('Distance from Shore (m)')
        ax.set_ylabel('Time (hours)')
        ax.set_zlabel('Wave Height (m)')
        ax.set_title('Wave Height Distribution', fontsize=16)
        
        # Set viewing angle for better visualization
        ax.view_init(elev=25, azim=45)
        
        fig.colorbar(surf, ax=ax, shrink=0.5, aspect=5)
        return fig

        
    def plot_distribution(self, wave_data):
        fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(15, 5), dpi=100)
        
        # Histogram with KDE
        sns.histplot(wave_data['wave_height'], kde=True, ax=ax1)
        ax1.set_title('Wave Height Distribution', fontsize=16)
        ax1.set_xlabel('Wave Height (m)')
        
        # Box plot for statistical summary
        sns.boxplot(y=wave_data['wave_height'], ax=ax2)
        ax2.set_title('Statistical Summary', fontsize=16)
        ax2.set_ylabel('Wave Height (m)')
        
        plt.legend()
        plt.tight_layout()
        return fig

Finally, the following code snippet demonstrates the complete system implementation, including data generation, visualization, and analysis:

# Implementation
calculator = WaveHeightCalculator()
wave_data = calculator.generate_measurements()

visualizer = Visualizer()
plot_1 = visualizer.plot_wave_measurements(wave_data)
plot_1.show()
plot_1.savefig('wave_heights.png')
plot_2 = visualizer.plot_distribution(wave_data)
plot_2.show()
plot_2.savefig('wave_heights_distribution.png')
# Convert wave heights to numpy array and reshape
wave_heights = wave_data['wave_height'].values
plot_3 = visualizer.plot_wave_surface(wave_heights)
plt.show()
plot_3.savefig('wave_surface.png')

Comments