DP02 - Biopac & NK Synchronisation Analysis

Problem

While collected in parallel, offline analysis required matching timestamps. A 5V TTL pulse was sent to both systems via MATLAB interfacing Blackbox Toolkit USB-TTL module, and used to align data streams

This page demonstrates the synchronisation process between Biopac and NK (iEEG) data streams.

1. Pre-Synchronisation Timeline

Original Timeline - Before Synchronisation Correction

Hover, click and pan above to see the timestamps of the files and TTLs.

What you're seeing:

2. Discrepancy Analysis

Discrepancy Analysis

Synchronisation Methodology

To quantify the synchronisation problem, we analysed the time discrepancies between TTL pulses in both systems:

  1. TTL Extraction: Extract TTL timestamps from both Biopac and iEEG systems
  2. Discrepancy Calculation: discrepancy = nk_timestamp - bp_timestamp across all files
  3. Linear Regression: offset = m × time_since_start + b
  4. Offset Correction: Apply calculated offset correction to Biopac timestamps per file
Discrepancy Regression

3. Post-Synchronisation Timeline

Corrected Timeline - After Synchronisation Correction

What changed: The post-sync timeline shows the same data with corrected Biopac timestamps. The TTL markers from both systems now align much more closely, all within 1 second of each other across the entire multi-day recording period.