Final Year Project · Department of Computer Engineering · University of Peradeniya

Neuromorphic Smart Sensor for Autonomous Underwater Vehicles

A neuromorphic-inspired perception system combining a software-based Spiking Neural Network for obstacle detection with a tether based geometric model for 3D positioning, delivering competitive accuracy at a fraction of the computational cost.

Spiking Neural Networks Neuromorphic Computing Event-based Sensing Autonomous Underwater Vehicles Underwater Navigation
92.71%
Detection Accuracy
98%
FLOP Reduction vs LSTM
99%
Energy Reduction
92.3%
Input Sparsity
Team

Researchers & Supervisors

K.G.R.I. Bandara
E/20/036
K.G.R.I. Bandara
Designed and implemented the machine learning pipeline, EventDrivenSNN architecture, Send-on-Delta encoder, feature engineering, six-model comparative evaluation, and real-time inference engine.
R.V.C. Rathnaweera
E/20/328
R.V.C. Rathnaweera
Designed and fabricated the hardware prototype, including the custom PCB, sensor wiring, ESP32 firmware, and pool trial setup.
V.P.H. Sidantha
E/20/377
V.P.H. Sidantha
Designed and implemented the tether-based geometric positioning model, mathematical unit tests, and simulation validation.
Academic Supervisor
Prof. S.M.K.B. Samarakoon
Prof. S.M.K.B. Samarakoon
Department of Computer Engineering · University of Peradeniya
01 · Abstract

Overview

Autonomous Underwater Vehicles (AUVs) face a fundamental tension between perception accuracy and energy consumption. Conventional sensing architectures rely on continuously-active neural networks whose power demands severely limit mission duration. This paper presents a neuromorphic-inspired system combining a software-based Spiking Neural Network (SNN) for obstacle detection with a tether-based geometric model for 3D positioning.

The obstacle detection subsystem uses Leaky Integrate-and-Fire neurons trained on ultrasonic readings from a JSN-SR04T sensor. A Send-on-Delta encoder converts continuous distance measurements into sparse spike trains (92.3% sparsity), enabling 92.71% detection accuracy at only 6,220 floating-point operations per inference. This represents a 98% reduction versus an equivalent LSTM (387,968 FLOPs) and a 99% reduction in analytical energy (2,448.3 nJ vs. 30.21 nJ). The positioning subsystem derives location from tether cable geometry using IMU and pressure sensor data, offering a practical alternative to DVL systems costing USD 15,000–50,000.

Keywords — Autonomous Underwater Vehicles Neuromorphic Computing Spiking Neural Networks Event-based Sensing Underwater Navigation
03 · Methodology

System Architecture & Methods

Processing Pipeline
📡
Sensor Acquisition
JSN-SR04T · ESP32 · 200ms · EMA filter
Send-on-Delta
Continuous → sparse spikes · θ=0.5 · 92.3% sparsity
🧠
EventDrivenSNN
LIF neurons · 3 FC layers · W=15 windows
🧭
Classification
Safe / Danger · 3.5 Hz nav commands
📍
3D Positioning
Tether geometry · IMU · CORS/RTK GPS
🔊
Sensor Acquisition Firmware
ESP32 drives four JSN-SR04T waterproof ultrasonic sensors using sequential triggering to prevent acoustic cross-talk. Each sensor fires seven pings at 25 ms intervals; median echo duration converted to distance at 0.148 cm/µs. Drop-rejection filter and EMA smoothing (α=0.25) applied. Adaptive per-sensor baseline learned from 25 stability-gated samples within a 12 cm band.
Send-on-Delta Encoding
Core neuromorphic contribution: converts feature windows into binary spike trains. A positive (ON) spike emitted when a feature value change exceeds threshold θ; a negative (OFF) spike when it falls below −θ. With θ=0.5 and five input features, channel dimension doubles from 5 to 10, yielding 91.5% silent inputs on real AUV data.
🧠
EventDrivenSNN Architecture
Three fully-connected layers interleaved with Leaky Integrate-and-Fire neurons: 10 → FC(10→32) → LIF₁ → FC(32→32) → LIF₂ → FC(32→2) → LIF₃. β=0.9 decay, U_thr=1. Only 1,474 trainable parameters — 9× fewer than equivalent two-layer LSTM. Trained with fast sigmoid surrogate gradient.
📍
Tether-Based Positioning
Implements Viel et al. model: tether assumed straight two-segment geometry maintained by sliding ballast. Given total cable length L, AUV depth z from pressure sensor, and four tether angles from two IMUs, segment lengths and AUV Cartesian offset computed analytically. CORS/RTK GPS converts local offset to WGS84 absolute coordinates.
📊
Feature Engineering
Five temporal features: (1) time_gap — sensor timing regularity; (2) dist_f_cm — EMA-filtered distance; (3) delta — deviation from adaptive baseline; (4) velocity — Δd_f/Δt, approach rate; (5) acceleration — Δv/Δt. Sliding windows W=15 with stride S=5. Labels assigned at prediction horizon H=0.
⚖️
Training Configuration
Session-level 70/15/15 train/validation/test split. Class-balanced cross-entropy loss (weights: 0.61 safe, 2.79 danger). Adam optimiser, η=10⁻³, 20 epochs, batch size 64. Compared against RF, LSTM, GRU, 1D-CNN, and MLP baselines under identical splits, scalers, and class weights.
SNN Architecture Pipeline
Fig: End-to-end Machine Learning Pipeline from Sensor to Spike-based Decision
GeoModel Architecture
Fig 2: Tether-based Geometric Model for 3D Positioning using IMU and Pressure Data
04 · Experiment

Setup & Implementation

Hardware Prototype
  • PVC pipe frame with four JSN-SR04T waterproof ultrasonic sensors (front, downward, right, left)
  • ESP32 microcontroller on custom-designed fabricated PCB
  • Six thrusters for full manoeuvring capability
  • USB tether to surface station (simultaneous UART data + navigation commands)
  • Syringe-based variable ballast mechanism (designed and prototyped)
  • NVIDIA Jetson Nano for AI inference on embedded GPU
  • CORS/RTK GPS receiver on surface buoy for centimetre-accurate positioning
Dataset Summary
PropertyValue
Total raw records26,273
Records after filtering22,270
Sessions87
Safe windows3,423
Danger windows768
Window size W15 timesteps
Stride S5 timesteps
Total windows4,191
Class ratio≈ 4.46 : 1
Pool Trial Setup
  • Conducted in a real pool with Sensor 1 (front-facing) active
  • Obstacle: flat pool wall surface
  • Approximately ten test runs at low speed via manual thruster control
  • Detection confirmed via serial monitor DANGER events and Streamlit dashboard
  • Navigation sequence: FORWARD → CAUTION → STOP observed consistently
  • Validates end-to-end perception pipeline under real underwater conditions
Baseline Models Evaluated
  • Random Forest — 100 estimators, depth 10, non-neural upper-bound
  • LSTM — Two-layer, hidden 32, dropout 0.2; primary recurrent baseline
  • GRU — Two-layer, hidden 32, dropout 0.2; lighter recurrent test
  • 1D-CNN — Three causal dilated conv layers (32/64/64 channels)
  • MLP — Two hidden layers size 64 with batch norm
  • SNN (Ours) — EventDrivenSNN with Send-on-Delta on snntorch
05 · Results

Results & Analysis

Six-Model Comparison · 741-window held-out test set
MetricRFLSTMGRU1D-CNNMLPSNN (Ours)
Accuracy99.46%98.65%99.33%98.65%98.25%92.71%
Danger Recall0.98741.00001.00000.99370.99370.8679
Danger F10.98740.96950.98450.96930.96050.8364
Parameters5,20413,50610,14619,5229,4101,474
FLOPs / Inference2,000387,968291,008567,61618,0486,220
Active Memory (B)21,1164,1482,2284,14882010
Energy CPU (nJ)3387.82448.31695.13274.7214.230.21
Saving vs LSTM−38%+31%−34%+91%+99%
SparsityN/AN/AN/AN/AN/A92.3%
Neuromorphic HWNoNoNoNoNoYes
Key Findings
01
98% FLOP↓
SNN requires only 6,220 FLOPs per inference vs 387,968 for LSTM — a 98% reduction achieved purely through event-driven sparsity, not specialised neuromorphic hardware.
02
99% Energy↓
Analytical energy drops from 2,448.3 nJ (LSTM) to 30.21 nJ (SNN CPU), with further reduction to 0.0074 nJ on Intel Loihi — a 22% mission duration increase on a 74 Wh battery.
03
92.3% Sparse
92.3% input sparsity arises naturally from AUV's slow underwater motion (≤14.1 cm per 200ms) falling below the Send-on-Delta threshold θ=0.5. Mean active spike rate: 7.7%.
04
1D-CNN ≠ Efficient
1D-CNN consumes 34% more energy than LSTM (3,274.7 vs 2,448.3 nJ). Architectural modernity does not guarantee efficiency — only event-driven sparsity achieves fundamental active-compute reductions.
05
25 cm Position
Tether-based geometric positioning passed all four mathematical unit tests, replacing DVL systems costing USD 15,000–50,000 with off-the-shelf sensors.
06
Pool Validated
End-to-end perception pipeline correctly detected a flat pool wall under real underwater conditions across ~10 test runs with consistent FORWARD → CAUTION → STOP sequencing.
06 · Conclusion

Conclusion & Future Work

This paper presented a neuromorphic-inspired sensing and positioning system for low-cost AUVs, demonstrating that the computational advantages of event-driven processing are achievable on conventional embedded hardware without recourse to specialised neuromorphic chips. An EventDrivenSNN with Leaky Integrate-and-Fire neurons was trained on 26,273 real ultrasonic sensor readings collected across 87 experimental sessions. A Send-on-Delta encoder converts continuous distance measurements into sparse binary spike trains, yielding a measured input sparsity of 92.3% on real sensor data. The network achieves 92.71% obstacle detection accuracy at only 6,220 FLOPs per inference — a 98% reduction versus an equivalent LSTM and a 99% reduction in analytical energy (30.21 nJ versus 2,448.3 nJ).

Closed-loop autonomy: Close the control loop between SNN inference output and thruster commands for fully autonomous obstacle avoidance without human intervention.
Multi-sensor fusion: Extend SNN to fuse readings from all four JSN-SR04T sensors simultaneously, improving danger recall and false alarm suppression.
Neuromorphic hardware deployment: Port EventDrivenSNN to Intel Loihi to empirically validate the theoretical 0.0074 nJ sub-nanojoule inference energy.
IMU-integrated positioning: Integrate tether-geometry model with live IMU angle measurements and pressure-sensor depth readings, validated against a ground-truth reference system.
Open-water generalisation: Collect data in open-water environments subject to varying temperature, salinity, turbulence, and acoustic conditions to test robustness of the SNN pipeline.
Variable-ballast integration: Integrate the syringe-based variable-ballast mechanism for depth control without manual weight adjustment, completing the fully autonomous underwater platform.
Author Contributions

Individual Contributions

K.G.R.I. Bandara
E/20/036
Conceived and implemented the machine learning pipeline, including the EventDrivenSNN architecture, Send-on-Delta encoder, feature engineering, six-model comparative evaluation, and real-time inference engine. Contributed equally to system integration, manuscript preparation, and presentation of results.
R.V.C. Rathnaweera
E/20/328
Designed and fabricated the hardware prototype, including the custom PCB, sensor wiring, ESP32 firmware, and pool trial setup. Contributed equally to system integration, manuscript preparation, and presentation of results.
V.P.H. Sidantha
E/20/377
Designed and implemented the tether-based geometric positioning model, mathematical unit tests, and simulation validation. Contributed equally to system integration, manuscript preparation, and presentation of results.
Prof. S.M.K.B. Samarakoon
Academic Supervisor
Provided academic supervision, research direction, and critical review of the manuscript throughout the project.