PR07 - Biopac NK Synchronisation Analysis
Problem
- Peripheral physiology data collected using Biopac MP160 + BioNomadix amplifier modules + AMI100D I/O at 2kHz sampling (NIST internet time)
- Neural data collected using Nihon Kohden Neurofax EEG-1200 system at 2kHz or 10kHz sampling (own internal clock)
- Behavioural data was collected using online surveys (NIST internet time)
While collected in parallel, offline analysis required matching timestamps. A TTL pulse was sent to both systems, 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
What you're seeing: The pre-sync timeline reveals the complexity of the PR07 dataset with extensive recording sessions across multiple days. The TTL markers show significant temporal drift that accumulates over the recording period.
Key observations:
- Extensive dataset with 1500+ files spanning multiple recording days
- TTLs appearing at different times in the Biopac and NK streams
- Multi-day recording sessions with varying session lengths
- Behavioural rating schedules interspersed throughout
2. Discrepancy Analysis
Synchronisation Methodology
To quantify the synchronisation problem, we analysed the time discrepancies between TTL pulses in both systems:
- TTL Extraction: Extract TTL timestamps from both BioPac and iEEG systems
- Discrepancy Calculation:
discrepancy = nk_timestamp - bp_timestamp across all files
- Linear Regression:
offset = m × time_since_start + b
- Offset Correction: Apply calculated offset correction to Biopac timestamps per file
3. Post-Synchronisation Timeline
Corrected Timeline - After Advanced Synchronisation Correction
What changed: TThe 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.