440 likes | 632 Views
Senior Capstone Design Project Real-Time Electrocardiogram Spectral Analyzer. Ryan Carnathan, Keith Berry, Mark Stadick, & Greg Michaelson Electrical & Computer Engineering. Presentation Overview. Introduction Hardware QRS Detector Spectral Analysis User Interface Summary and Conclusion
E N D
Senior Capstone Design Project Real-Time Electrocardiogram Spectral Analyzer Ryan Carnathan, Keith Berry, Mark Stadick, & Greg Michaelson Electrical & Computer Engineering
Presentation Overview • Introduction • Hardware • QRS Detector • Spectral Analysis • User Interface • Summary and Conclusion • Demonstration
Requirements • Apply knowledge • Solve Real World Problems • Work in Multidisciplinary Teams • To become actively involved in a company or community organization.
Purpose • Used in conjunction with the HP Merlin bedside monitor • Real-time spectral analysis of the beat-to-beat variability • Assess the potential for: • Improved bedside clinical monitoring • Diagnostic and predictive information
Function • Graphical interface for the display and analysis of: • ECG Waveforms • QRS Complex Detection • Heart Rate Variability (HRV) Spectrogram • These functions are performed and displayed in real-time.
Implementation • Hardware • QRS Detection • Spectral Analysis • Integration and User Interface
Definition of terms • Electrocardiogram (ECG) • Heart Rate Variability (HRV) • QRS Complex • RR v.s. NN • The ECG Waveform • The QRS Complex
Presentation Overview • Introduction • Hardware • QRS Detector • Spectral Analysis • User Interface • Summary and Conclusion • Demonstration
Hardware • Data Acquisition Card (DAQ) • Laptop Computer • Accessories
Capabilities Sample Rate 500 kS/s Number of Channels 8 Differential 16 Single Ended Gains 0.5, 1, 2, 5, 10, 20, 50, 100 Voltage Levels ±10 V - ±50 mV Configuration Sample Rate 1 kS/s Number of Channels 1 Differential Gain Setting 1 Voltage Levels ±5 V Data Acquisition Card
CPU Intel 600 MHz Pentium 256 k Level 2 Cache Storage 20 GB Hard Drive 3 ½ inch Floppy Drive Memory 512 MB of Ram Peripherals Infrared Transfer 10/100 Network Card 56k Modem (2) PCMCIA Slots 1 Taken by DAQ Operating System Windows 2000 SP 1 Laptop Computer
CPU 600 MHz 500 MHz (Battery) Hard Drive 15.4 GB Free Ram Used 128 MB (System) 384 MB Available DAQ Input 1 Differential Channel 1 kHz Sample Rate BNC Connection Laptop Configuration
Accessory Box • Component Box • Connector Block • BNC Connection • Ribbon Cable • Strain Relief Device
Connections • Merlin To DAQ • 6.35 mm Audio Cable To BNC • DAQ to Laptop • 68 Pin Ribbon Cable (0.2 M)
Program Functions Initialize DAQ Start Acquisition Check Buffer Transfer Buffer Stop Acquisition Software LabWindows CVI MatLab 6.0 Software Integration
CPU Voltage = 1.35V (Full Power) Average Power < 2.0 Watts Voltage = 1.1V (Battery) Average Power < 1.0 Watts Battery Life 3:15 per Battery 2 Batteries Possible DAQ Requirements ±5 VDC (±5%) 280 mA typ 400 mA max 70 mA unused Battery Efficiency
Presentation Overview • Introduction • Hardware • QRS Detector • Spectral Analysis • User Interface • Summary and Conclusion • Demonstration
QRS Detection Overview • QRS detection algorithm • Current Status • Future work • Summary
Remove Offset Filter Clip QRS Peak Detection Peak Acceptance/ Rejection Output QRS p-p Interval QRS Detector Algorithm • Block Diagram
QRS Detector Algorithm cont. • ECG Input Data • Remove Offset • Filter • Clip • QRS Peak Detection • Output QRS N-N Interval
Current Status • Operational • Remove d.c. offset • Clip below amplitude threshold • Detect QRS complexes (clean signals only) • Pending • Integration with graphical user interface • Digital Filter • QRS Accept/Reject function
Future Work • 1st Priority • Integration with graphical user interface • Digital Filter • QRS Accept/Reject function • Final report outline • Testing and debugging
Future Work Continued • 2nd Priority • Adaptive amplitude threshold function • Final report draft • Speed and performance improvements • 3rd Priority • Final report • Final presentation
Presentation Overview • Introduction • Hardware • QRS Detector • Spectral Analysis • User Interface • Summary and Conclusion • Demonstration
Spectral Analysis • Heart Rate Variability (HRV) • Inter Beat Intervals (IBI) • variation in the time intervals between beats • assumes irregular beats have been removed • normal to normal (NN) beats • Instantaneous Heart Rate (IHR) • variation in consecutive instantaneous heart rates • inverse of IBI
Spectral Analysis • Power Spectral Density (PSD) • Distribution of Variance Over Frequency • Three Operations • Resample • Filter • Generate Spectrogram • Fast Fourier Transform (FFT) • Transforms Time Signal to Frequency
Block Diagram QRS Detector Resample Filter FFT GUI Plot
QRS Output • Elapsed Time vs Number of Heart Beats
NN Intervals • Re-Interpreted Data From QRS Detector • NN Intervals • Indexed by Heart Beats
Resampling Overview • Interpolate • Generate Continuous Curve • Passes Through Existing Points • Sample New Series • Constant Time Period • Required for Fast Fourier Transform (FFT) • NN Intervals vs Time
Resampling • Input Signal from QRS Detector: • Resampled Signal:
Filtering • Spikes in Signal • Missed Beats by QRS Detector • Distort Valid Data • Filter • Flattens Large Excursions • Modifies Only Large Outlying Data Points
Filtering • Resampled Signal: • Filtered Signal:
Spectrogram Algorithm • Estimating Spectral Power • Remove Mean Value • Perform FFT • Power Calculation - |FFT|2
Spectrogram Example • PSD vs Time
Presentation Overview • Introduction • Hardware • QRS Detector • Spectral Analysis • User Interface • Summary and Conclusion • Demonstration
Implemented Plots ECG User Controls Start/Stop Window Size Scrolling Modes Historical Real Time Planned Plots Beat to Beat Spectrogram Scaleogram User Controls Graph Selection Notes Features
Process Budget • Limits • Data Acquisition • 10-15% of CPU • Little Memory • Beat Detection • 5-10% of CPU • Lots of Memory • Spectrogram Calculation • 30% of CPU
Presentation Overview • Introduction • Hardware • QRS Detector • Spectral Analysis • User Interface • Summary and Conclusion • Demonstration
Hardware Specified Needs Purchased / Acquired Built Software Completed Tested on Merlin GUI 2 Plots Scrolling Integration of Hardware Real-time ECG Display Historical Mode QRS Detector Literature Review Scaling Clipping Beat Detection Spectrogram Resampling Median Filter Spectral Estimation Completed
GUI Spectrogram Integration QRS Detector Integration User Notepad QRS Detector Filtering Ectopic Beat Rejection Spectral Analysis Filter Refinement Higher Resolution Spectrogram Plot Remaining Tasks
Presentation Overview • Introduction • Hardware • QRS Detector • Spectral Analysis • User Interface • Summary and Conclusion • Demonstration