Post

AI-Powered Neonatal CPR Training System

An embedded AI system that analyzes finger position and compression force during neonatal CPR training to provide real-time feedback.

Grade: 9.5

View Repository

AI-Powered Neonatal CPR Training System

AI-Powered Neonatal CPR Training System

This project focused on developing a machine learning model for neonatal CPR training assessment using embedded systems. Working alongside Victor Hogeweij, we created an innovative solution (Proof-of-Concept) that moves beyond traditional logic-based evaluation methods to provide more accurate, real-time feedback for CPR training.

Content

The system utilizes advanced sensor technology to monitor both finger placement and compression depth during neonatal CPR training sessions, providing immediate feedback to improve training effectiveness.

AI-Generated CPR Training Concept

Project Overview

Cardiac arrests account for more than thirty percent of mortality worldwide, making effective CPR training crucial for saving lives. Our project (part of Johan Korten’s Phd-project) addresses the limitations of existing CPR training systems by implementing a novel modular approach specifically designed for neonatal CPR training.

AI-Generated CPR Training Concept

Key Features

  • Multi-Sensor Analysis: Combines finger position sensing (8 IR LED pairs) with Time-of-Flight distance measurement
  • Real-Time Classification: Categorizes CPR performance into four distinct classes:
    • Optimal: Correct force and finger placement
    • Sub-optimal: Slightly incorrect force or non-optimal finger placement
    • Uncertain: System confidence below threshold or potential malfunction
    • Not recommended: Poor finger placement or significantly incorrect force levels
  • Fast Response Time: Delivers feedback within 750ms of compression detection
  • Embedded Deployment: Runs entirely on Raspberry Pi Pico for portability
  • Data Logging: Comprehensive CSV logging for performance analysis and model improvement

Technical Implementation

Sensor Technology

  • Finger Position Sensor: 8 IR LED/phototransistor pairs with 12-bit ADC resolution (0-4095 range)
  • Chest Compression Sensor: Time-of-Flight sensor measuring distance in millimeters
  • Sampling Rate: 10 Hz (100ms intervals) for optimal compression cycle capture

Machine Learning Model

The system uses a decision tree classifier trained on controlled test data:

1
2
3
4
Decision Tree Features:
- Variance analysis for consistency indication
- Amplitude minimum for insufficient pressure detection
- Amplitude maximum for peak performance assessment

Data Processing Pipeline

  1. Data Acquisition: Real-time sensor data collection via FreeRTOS tasks
  2. Preprocessing: High-pass filtering to remove noise below 500 Hz
  3. Feature Extraction: Variance, min, and max calculations
  4. Classification: Decision tree inference with labeled outcomes
  5. Feedback: Real-time performance categorization
Prototype photo 1
Prototype photo 1
Prototype photo 1
Prototype photo 1

Performance Results

  • Classification Accuracy: Perfect classification on training data (100% on controlled test cases)
  • Response Time: Average inference time of 5ms with total system response under 600ms
  • System Stability: Meets timing requirements for continuous operation
  • Model Efficiency: Lightweight decision tree suitable for embedded deployment

System Architecture

Validation Process

The model was validated through controlled test scenarios:

Test CaseMeasurement HypothesisInstruction
OptimalLow variance, clear min/max distinctionFingers positioned just below nipple line on sternum center
Sub-optimal LeftValues present on left side and middleFingers positioned near left nipple
Sub-optimal RightValues present on right side and middleFingers positioned near right nipple
Too HighTop 3 sensors primarily activeFingers positioned above chest center
Xiphoid ProcessBottom sensor primarily activeFingers positioned at xiphoid process (dangerous)

Technical Challenges & Solutions

  • Sensor Noise: Implemented high-pass filtering to eliminate irrelevant low-frequency components
  • Finger Movement: Variance analysis helps detect inconsistent pressure application
  • Hardware Reliability: Rapid prototyping challenges led to recommendations for dual backup systems
  • Model Bias: Initial training data showed bias toward specific finger positioning techniques

Technologies Used

  • Programming Languages: C++ with Pico SDK and FreeRTOS
  • Machine Learning: Python with scikit-learn for model training, framework created by our teachers (Jeroen Veen and Hugo Arends)
  • Hardware: Raspberry Pi Pico with custom sensor integration
  • Development Tools: CMake, SEGGER RTT for real-time debugging
  • Analysis Tools: Logic analyzer for timing validation

Implementation Insights

The project successfully demonstrated that machine learning can significantly improve CPR training assessment compared to traditional logic-based methods. The decision tree approach proved particularly effective for this application due to:

  • Clear feature boundaries preventing overfitting
  • Interpretable results for training feedback
  • Low computational requirements for embedded deployment
  • Robust performance against sensor noise

AI-Generated CPR Training Concept

Future Enhancements

Based on the project outcomes, several improvements are recommended:

  • Expert Validation: Additional testing with domain experts for model refinement
  • Multi-Modal Integration: Combining Time-of-Flight data with finger position analysis
  • Personalized Profiles: Individual CPR technique recognition and customized feedback
  • Advanced Models: Exploration of random forest and ensemble methods
  • Wear Detection: Automatic sensor calibration adjustment over time

Project Impact

This project demonstrates the potential for AI-enhanced medical training systems. By providing more accurate, consistent feedback than traditional methods, such systems can significantly improve CPR training quality and ultimately save more lives in emergency situations.

The modular design also allows for expansion to other forms of CPR training, including advanced life support scenarios, making it a valuable contribution to medical education technology.


This project was completed as part of the Embedded Artificial Intelligence Lab (EMBSYS01-AI) course at HAN University of Applied Sciences, Embedded Systems Engineering program, S6 2023-2024, taught by Hugo Arends and Jeroen Veen, in collaboration with the Health Concept Lab’s Baby Patient Simulator project.

This post is licensed under CC BY 4.0 by the author.