HeartSavers: The Final Stretch TEAM 5 CHRIS HOFFMAN RYAN KELLOGG MIKE ZIZZA APRIL 11, 2007 http://www.ece.cmu.edu/~ece549/spring07/team5/ Status Update Project Concept: Wearable heart monitor: Electrodes in shirt, capture/process signal, send data wirelessly to smart phone Status update: Implementation Have working hardware FIFO Buffer implemented, tested on Robostix for storing ADC values Eases real-time pressure for polling Robostix Enables variable length processing time on Gumstix Gumstix can interact with Robostix FIFO Progress on ECG circuit: Can see a heart beat, but it’s super noisy Status update: Testing and Experimentation Performance comparison of different QRS complex detection algorithms Whether QRS algorithm throughput changes with heart rate Length of time to do ADC conversion How long takes to transfer full buffer on Robostix to Gumstix Experiment Plan #1 Compare QRS detection algorithms Overall performance (speed, accuracy) Does performance depend on frequency of QRS complexes (heart rate)? Metrics: Run Time (sec) Accuracy (%) Why they matter: Helps us decide which is best for our project How we measure Script (in C) to run each algorithm 100 times and record performance values in a file Compute statistics in MATLAB Initial Data #1 WQRS vs. SQRS (Execution time) Does algorithm performance change with heart rate? 0.8 1 SQRS WQRS Execution time (sec) 0.6 0.5 0.4 0.3 0.2 0.1 0 0.9 Execution time (normalized sec.) Relative frequency of QRS Complexes 0.7 0.8 0.7 0.6 0.5 0.4 QRS Complex frequency SQRS Execution time (Normalized) WQRS Execution time (Normalized) 0.3 1 2 3 4 5 6 7 Data Set # 8 9 10 This graph compares execution time for competing QRS detection algorithms – WQRS is faster for all data sets tried. 0.2 0 2 4 6 8 Data Set # QRS detection algorithm performance depends only on number of sample points and not on heart rate. 10 Experiment #2 Determine sampling parameters on Robostix (ADC conversion time, transfer rate to Gumstix) Metrics Time (sec) Data rate (KB/s) Why they’re important Want to know how many ADC samples we can do Can we sample fast enough? How much processing time is left on Robostix? How we will measure Toggle IO pins and view ADC conversion time on scope Take full FIFO (~ 3K), send across I2C, get timestamp on Gumstix at finish Initial Data #2 Set polling frequency to 244 Hz Can only send 16 points (ADCs) in one packet 15 transfers just to get a second’s worth of data 488 bytes to transfer for one second (244 samples/sec * 2 bytes per sample) Results Time for one ADC conversion: 115 us Transfer rate to Gumstix: 5.7 KB/s Time to send one packet 0.1 sec Looking Forward What have learned so far? Don’t underestimate the weirdness of analog Quirky timing function on Gumstix Quirky I2C on Robostix Next steps: Make ECG algorithms run in streaming fashion Run algorithm as daemon, communicate through sockets or pipes Make the circuit work as expected Make GUI on phone to display ECG information Don’t give up on non-stick electrodes Questions?