Channel and noise file formats
Save channel and noise .mat files with these flags:
-v7.3to support large variables and theHDF5file format.-nocompressionto speed up loading.
The Python loaders load_channel and load_noise also read MAT v5 files, but files you distribute should be saved with -v7.3 -nocompression.
Required fields
Each channel .mat file must include these variables:
h_hat
Type: Multi-dimensional complex tensor.
Dimensions:
[delay, receiver, time]Units:
- Delay axis: sampled at
params.fs_delay[Hz], denoted - Time axis: sampled at
params.fs_time[Hz] - Amplitude: complex baseband impulse response (unitless)
- Delay axis: sampled at
Description: The estimated time-varying channel impulse response (TVIR) as a function of delay and time . When delay tracking is used, this is the drift-free response ; otherwise it is the drifting response . For a given receiver and time index , the slice along the delay axis is the channel vector , or in the drifting case.
Normalization:
h_hatis scaled so that a passband signal of unit power, in the band the channel was estimated in and replayed through all receivers in the file over the full length of the channel, gives output powers that sum to .replaydoes not rescale its output, soh_hatalone sets this power. Each receiver keeps its measured power relative to the others, so a subset selected witharray_indexneed not give a proportional share of . A short replay need not give either, because it sees only part of the fading.The estimate is made at samples per symbol, where is the symbol rate, so its response is confined to the signal band, a fraction of the delay band. The criterion then fixes the energy of the taps. Let be tap of receiver at time index , with taps and time samples. Averaged over time, the energy summed over all taps and receivers is
meta.nsdstores . When it is absent, . This is the value the estimate example uses and the value in every released file, so the released energies equal . In MATLAB, check the normalization withsum(abs(h_hat).^2, 'all') / size(h_hat, 3) % must equal size(h_hat, 2) / meta.nsdIn Python,
h5pyreports the axes ofh_hatin reverse order,[time, receiver, delay].
params
A structure with the following scalar fields:
| Field | Type | Unit | Description |
|---|---|---|---|
fs_delay | scalar | Hz | Sampling rate along the delay axis. |
fs_time | scalar | Hz | Sampling rate along the time axis. |
fc | scalar | Hz | Center frequency of the signal used during channel estimation. |
version
- Type: Numeric scalar.
- Description: Dataset format version number (currently
1.0).replayrejects files with a version below1.0.
Phase/delay tracking fields (optional)
phi_hat, theta_hat, and f_resamp may coexist; replay and unpack apply them according to the following precedence:
- If none of the three is present, no Doppler correction is applied.
phi_hattakes precedence overtheta_hat: ifphi_hatis present, it is used andtheta_hatis ignored; if onlytheta_hatis present, it is used instead.f_resamp(see Optional fields) is applied independently of the two phase/delay fields, whether or not either of them is present.
The estimation scripts normally save just one phase field: phi_hat when delay tracking is enabled, or theta_hat otherwise. The phi_hat field describes both phase rotation and delay drift, so it takes precedence when both fields are present.
phi_hat (delay tracking)
Type: Numeric matrix, size
[receiver, time]Units: Radians
Sampling rate:
params.fs_delayDescription: The phase estimate , a time-varying phase that encodes both phase rotation and delay drift. In this mode,
h_hatholds the drift-free response . Let denote the delay drift common to all propagation paths. It is related to the phase byUnpacking first reinserts the phase, multiplying the drift-free response by to obtain the signal . It then reinserts the delay drift by evaluating that signal at shifted instants,
where denotes interpolation, implemented here as spline interpolation.
The delay represented by
phi_hataccumulates over the recording and can reach hundreds of samples. For a replay starting at sample ,replayrestores the phase relative to that starting point: . This aligns the start of the output with the input. The output is padded to accommodate the largest delay drift reached during replay.
theta_hat (phase tracking only)
Type: Numeric matrix, size
[receiver, time]Units: Radians
Sampling rate:
params.fs_delayDescription: The phase estimate , a time-varying phase correction. In this mode,
h_hatcontains the drifting impulse response (delay drift is embedded in the taps). Only the phase is tracked separately. The baseband received signal is modeled as:where are the transmitted data symbols, is the time-varying impulse response at delay and time with drifting taps, is the symbol interval, is the channel phase, and is the additive complex baseband noise.
Duration constraint
The phase field (theta_hat or phi_hat) must cover the same duration as h_hat. For theta_hat, this requires:
size(theta_hat, 2) / params.fs_delay == size(h_hat, 3) / params.fs_time
Optional fields
f_resamp
- Type: Scalar, or vector of size
[receiver, 1]or[1, receiver](double precision) - Units: Unitless resampling factor
- Description: A constant resampling factor, typically the inverse of the factor used to remove the nominal Doppler frequency offset before channel estimation.
A scalar applies to every receiver. A vector supplies one factor per receiver, ordered as in h_hat. The array_index argument selects the corresponding factors, just as it selects receivers in phi_hat.
After the time-varying convolution, replay resamples each output column using its factor, then zero-pads the shorter columns to match the longest. For reconstruction, unpack converts the factor into a linear phase ramp . It restores this ramp as phase rotation and delay drift using the same procedure as for phi_hat.
meta
The meta structure is optional but strongly encouraged. The following fields are written by the estimate scripts; replay, noisegen, and unpack do not read meta:
| Field | Type | Description |
|---|---|---|
description | string | Free-text description of the experiment. |
nsd | scalar | Samples per symbol in the delay domain. It sets the normalization of h_hat (see h_hat); 2 when absent. |
nst | scalar | Samples per symbol in the time domain. |
K_1 | scalar | Anti-causal filter length [symbols]. |
K_2 | scalar | Causal filter length [symbols]. |
fc | scalar | Center frequency [Hz]. |
element_spacing | scalar | Array element spacing [m]. |
vertical | logical | true if vertical array. |
delay_tracking | logical | true if delay tracking is enabled (phi_hat present). |
limit | scalar | Lower dB limit for plotting. |
optim | scalar | Optimizer used: 1 LMS, 2 RLS, 3 SFTF. |
mu | scalar | LMS step size (when optim == 1). |
lambda | scalar | Forgetting factor (when optim == 2 or 3). |
regularization | scalar | Regularization factor (when optim == 2 or 3). |
Kf_1 | scalar | PLL loop filter coefficient . |
Kf_2 | scalar | PLL loop filter coefficient . |
nslr | scalar | Delay tracking rate (when delay_tracking == true). |
codename | string | Short identifier for the channel (e.g., "blue_1"). |
You can add fields to meta for other experiment details.
Noise file format
Each noise .mat file contains the following fields:
| Field | Type | Description |
|---|---|---|
Fs | scalar | Sampling rate at which noise statistics were measured [Hz]. |
R | scalar | Bandwidth of the recorded noise [Hz]. Despite the field name, this is not the symbol rate used on the channel pages. |
alpha | scalar | Characteristic exponent of the symmetric -stable distribution: 2 Gaussian, < 2 impulsive. |
beta | tensor [M, M, L+1] | Mixing coefficients for spatiotemporal noise coloring, where is the number of array elements and is the maximum lag (both defined below). |
fc | scalar | Center frequency [Hz]. |
version | scalar | Noise struct version number. noisegen rejects files with a version below 1.0. |
noisegen reads Fs, alpha, beta, and version. It generates noise at Fs, then resamples it to the requested rate.
The coefficients in beta are normalized across the full array: the expected noise powers of all elements sum to , and each element keeps its measured power relative to the others. When array_index selects a subset, the sum of the selected elements’ noise powers need not equal the number selected. When the variance is undefined, and the pseudo-power , with the scale parameter, takes its place. With the innovations defined below, the expected (pseudo-)power of element is
For , is the sum of the squared coefficients. noisegen does not rescale the mixed noise, so with all elements selected its average power per element is , before any resampling.
noisegen uses the mixing equation:
Here is the synthetically generated noise on hydrophone , with the hydrophone indices running as . The sampling interval is , where Fs stores . The maximum discrete lag with non-negligible covariance is , so has taps, .
The innovations are i.i.d. symmetric -stable variates with zero location and scale ; this scale ensures that the distribution reduces to the standard Gaussian when .
The sum runs forward in time, , which is the convention under which beta is estimated by NoiseModels.jl. For an array, mixing backward instead, , reverses the time direction of the correlation between elements while leaving the zero-lag covariance unchanged.