Skip to content
uwa-channelsPublic

About

Replay a signal of your choice through an underwater acoustic channel, or unpack an underwater acoustic channel.

Topics

Resources

Contributing

Stars

18 stars

Watchers

2 watching

Forks

Latest commit

 

History

58 Commits

Folders and files

Repository files navigation

CI codecov DOI Open in MATLAB Online

Underwater Acoustic Channel Toolbox — MATLAB / Octave

Generic badge with Signal Processing Toolbox™ or Generic badge with the signal and statistics packages.

MATLAB®/Octave toolbox for replaying signals through measured underwater acoustic channels, generating realistic ocean noise, and unpacking stored impulse responses. To learn more about the channels, check out the documentation.

Please report bugs and suggest enhancements by creating a new issue. We welcome your feedback. See CONTRIBUTING.md for more information.

Functions

Function Description
replay Pass a passband signal through a measured underwater acoustic channel.
noisegen Generate realistic ocean noise: pink Gaussian (17 dB/decade), spatially-correlated Gaussian, or impulsive (symmetric α-stable).
unpack Reconstruct the full time-varying impulse response from the compressed representation.

Installation

MATLAB

Paste this into the MATLAB Command Window:

matlab.addons.install(websave([tempname '.mltbx'], 'https://github.com/uwa-channels/matlab/releases/latest/download/uwa-channels.mltbx'))

That downloads the latest release and installs it as an add-on, so replay, noisegen, and unpack are on your path in every session afterwards. Run the same command again later to upgrade in place; it replaces the installed version rather than adding a second copy.

To remove it, run matlab.addons.uninstall('uwa-channels'), or use Home > Add-Ons > Manage Add-Ons.

You can also download uwa-channels.mltbx from the latest release and double-click it.

Requires R2021a or later with the Signal Processing Toolbox.

From a clone, and for Octave

If you want to read or modify the source, or if you are running Octave (which cannot read .mltbx files), add the repository folders to the search path instead of installing the packaged toolbox:

git clone https://github.com/uwa-channels/matlab.git
cd matlab

Then, from that folder, in MATLAB or Octave:

install

This adds src and examples to the search path and saves the path so they stay available in later sessions. Because you are then running the working copy directly, edits to src take effect immediately.

Under Octave this needs version 9.0 or later with the signal and statistics packages.

Do not use both routes at once: if the packaged add-on is installed and you also run install, both copies are on the path and the one that wins depends on path order. Run matlab.addons.uninstall('uwa-channels') first if you are switching to a clone.

Quick start

Download the channel MAT-files from Zenodo and place them where MATLAB®/Octave can find them.

Replay and noise generation

channel = load('blue_1.mat');
noise = load('blue_1_noise.mat');

array_index = [1, 2, 3];
y = replay(input, fs, array_index, channel);
w = noisegen(size(y), fs, array_index, noise);
r = y + 0.05 * w;

See examples/example_replay.m for a complete example that generates a BPSK signal, replays it through the blue_1 channel, adds noise, and plots the received signal, cross-correlation, and spectrum.

Unpack

channel = load('blue_1.mat');
unpacked = unpack(fs_time, array_index, channel);

See examples/example_unpack.m for details.

Channel format

Each channel MAT-file contains:

Variable Description
h_hat Estimated impulse response, size (K × M × T)
theta_hat or phi_hat Phase or delay-phase trajectory, size (M × N)
params Struct with fs_delay, fs_time, fc
meta Estimation metadata (see estimate repo)
version File format version

Each noise MAT-file contains:

Field Description
Fs Sampling rate at which noise statistics were measured [Hz]
R Signal bandwidth [Hz]
alpha Stability index (2 = Gaussian, < 2 = impulsive)
beta Mixing coefficients, size (M × M × K)
fc Center frequency [Hz]
rms_power Per-channel RMS power scaling, size (M × 1)
version Noise struct version

Tests

This repository includes automated testing via GitHub Actions. The tests folder contains three test suites:

Test What it verifies
testReplay Generates random mobile channels ({static, mobile} × {theta_hat, phi_hat}), transmits a signal, and checks that cross-correlation peaks match the true multipath structure; also checks that array_index isolates individual hydrophones and that the output power scaling is O(1).
testNoise Verifies output size, spectral shape (17 dB/decade), spatial correlation (theoretical vs. sample), bandpass filtering, rms_power scaling, Gaussianity (α = 2), and heavy-tail behavior (α < 2).
testUnpack Tests all tracking modes (none, theta_hat, phi_hat, f_resamp, and combinations) for correct impulse response reconstruction.

Tests run automatically on every push, ensuring continued correctness of the core functions.

Related repositories

Repository Description
uwa-channels/estimate Channel estimation from single-carrier signals, with visualization.
uwa-channels/python Python implementation of the replay toolbox.

License

The license is available in the LICENSE file within this repository.

© 2025–2026, Underwater Acoustic Channels Group.

About

Replay a signal of your choice through an underwater acoustic channel, or unpack an underwater acoustic channel.

Topics

Resources

Contributing

Stars

18 stars

Watchers

2 watching

Forks

Releases

Contributors

Languages