DIY PPG: Comparison of waveform parameters from open-source vs commercial photoplethysmography


NSF Expeditions in Computing/PATHS-UP RET 2018

2019 RET Symposium Slides

Jimmy Newland1,2, Amruta Pai1, Akash Maity1, Ashutosh Sabharwal1, Ashok Veeraraghavan1

1NSF Expeditions in Computing/PATHS-UP Research Experience for Teachers, Scalable Health Labs, Electrical and Computer Engineering, Rice University, 6100 Main street, Houston, Texas 77005, USA
2Physics & Astronomy, Bellaire High School, Bellaire, Texas 77401, USA

NSF Expeditions in Computing/PATHS-UP Research Experience for Teachers, Scalable Health Labs, Electrical and Computer Engineering, Rice University, 6100 Main street, Houston, Texas 77005, USA
2Physics & Astronomy, Bellaire High School, Bellaire, Texas 77401, USA


Abstract: Commercial pulse oximeters often use proprietary data acquisition and visualization techniques, making it difficult to perform digital signal processing on waveform data. Careful, detailed analysis is critical when using the photoplethysmogram (PPG) for diagnostic and therapeutic purposes. Open hardware and software systems offer full access the PPG signal itself plus the algorithms for acquiring and analyzing the signal. This study compares parameters obtained from PPG signal using a closed system to that same data using an open system. The viability of a future FDA-approved open-source pulse sensing system is explored. The inter beat interval, average beats per minute, and waveform visualization techniques were compared. Data acquisition techniques were explored and compared between the systems as well as hardware and algorithmic comparisons. Code for accessing the data from the devices, analyzing the data, and visualizing the data will be discussed. Languages included Python, Arduino, Processing, C++, and RISC-based assembly.

Need to cite this? Use DOI10.13140/RG.2.2.13067.23842


In the summer of 2018, I was lucky enough to be selected by the Rice University Office of STEM Engagement (RSTEM) to participate in a research experience for teachers in the Scalable Health Labs group which is part of the Department of Electrical and Computer Engineering. I settled on a project comparing digital signals from 2 different wearable health devices. Below is the complete project with results and data.

CMS 50D+ & Pulse Sensor Amped PPG Waveforms

Photoplethysmography

  • Photoplethysmography: using light to measure the blood volume as a function of time.
  • Transmissive photoplethysmogram (PPG): light source & detector are on opposite sides of appendage; often uses red & infrared LED sources
  • Reflective PPG: source & detector are at same skin location; often uses green LED source
  • Both PPG types give pulmonary information but are processed in different ways.
Video demonstration of change in brightness light through the index finger as the heart beats and the volume of blood in the finger changes during the cardiac cycle.

Can an inexpensive open-hardware/software PPG system match the performance of a commercial one?

  • This study compares pulmonary data from the CMS 50D+ commercial pulse oximeter and the Pulse Sensor Amped attached to an Arduino UNO R3.
  • The CMS 50D+ produces PPG waveforms using transmission.
  • The Pulse Sensor Amped produces PPG waveforms using reflection.
  • The Pulse Sensor Amped requires a to handle data collection and transmission.
  • This study compares pulmonary data from the CMS 50D+ commercial pulse oximeter and the Pulse Sensor Amped attached to an Arduino UNO R3.
  • The CMS 50D+ produces PPG waveforms using transmission.
  • The Pulse Sensor Amped produces PPG waveforms using reflection.
  • The Pulse Sensor Amped requires a microcontroller to handle data collection and transmission.

Data Collection

Data collection involved reading the properly formatted data stream directly from the microcontrollers. The CMS 50D+ pulse oximeter uses a proprietary code and a Texas Instruments microcontroller. Under the guidance of my advisors, the researcher used reverse-engineered Python code to access the data headers and then to process the data into a human-readable form. The Pulse Sensor Amped code is released under open source and available codebase from the manufacturer was readily alterable to generate human-readable data for analysis.

In order to analyze health parameters, time-series data was collected from the research team and the researcher and compared for synchronization and for statistical similarities.

Filtered PPG waveforms for CMS 50D+ and P.S. Amped

Synchronization for more than several heart beats was difficult to achieve but useable datasets were collected. For more robust dataset collection and statistical testing, longer term synchronization would be required. This preliminary model is at least a proof of concept and an important first step in showing that open systems can perform as well as closed systems for analyzing real-time health parameters using photoplethysmography.

CMS 50D+ Circuit Board

Open vs Closed Systems

Characteristics of PPG System Datasets

The current literature on PPG systems was analyzed and some constraints and requirements for a useable PPG signal were determined. Three important elements were a viable waveform, a rolling heart rate, and within the signal the interbeat interval or peak-to-peak time.

  • High resolution PPG Signal (sampling frequency of 500 Hz)
  • Heart rate (rolling average beats per minute)
  • Interbeat Interval (peak-to-peak time in milliseconds)

Challenges of Closed PPG Systems

  • Closed systems don’t provide open access to the data, the hardware design, or the software of the system.
  • The CMS 50D+ has been reverse engineered by others and could be used here for comparison.
  • In other cases, researchers don’t have a clear way to directly access data, hardware, or algorithms for commercial products.

Free and Open Source Software (FOSS)

Schematic of P.S. Amped Circuit
  • FOSS allows users access to no-cost programming tools, well-established algorithms & software packages, and active communities of users.
  • My project was possible because of FOSS tools, algorithms, & communities.
  • Many Python & Arduino examples were used in the code for this project.
  • All code for this project is released as open source and can be found via the link in the references section

Pulmonary Health Parameters

  • Interbeat Interval (IBI) – time between successive peaks in the PPG waveform
  • Heart Rate (HR) – average number of beats per minute
  • Heart Rate Variability (HRV) – a measure of the variation in the IBI over time

Here we see a comparison of a synchronized PPG and a selected IBI from the two systems. Although the synchronization is a known issue, whole segments of the waveform showed clear synchronization and allowed for direct feature comparison leading to the relevant health parameters being extracted and compared.

Here the heart rate variability (HRV) is shown for the CMS 50D+ pulse oximeter in two different ways. The time-series plot gives a sense of variability in realtime where the a plot of the frequency domain as a histogram can show other trends commonly sought for diagnostic pulmonary treatment.

The graphical user interface (GUI) provided by the open-source Pulse Sensor Amped came ready-made to allow time-domain analysis of heart rate variability although the code had to be modified to export the data into an analyzable format.

Results: CMS 50D+ vs Pulse Sensor Amped

Once several synchronized datasets were collected, analysis of the three selected pulmonary parameters was done using established statistical techniques in Python. Note the major features of the time domain plot of the IBI are nearly a match between the two devices used simultaneously on the same subject. Although some variation between the datasets is present, the frequency domain analysis shows great similarity indicating that smoothing over the time interval may help to remove the role of synchronization issues. More sophisticated digital signal processing would likely yield a less noisy IBI. This analysis is meant to show the proof-of-concept idea that an open source system can provide comparable results to a closed system. Without detailed knowledge of the proprietary techniques used in digital signal processing algorithms implemented in the CMS 50D+ base code, only the coarse similarities between the two systems are displayed here.

The time-series plot and frequency domain plot of heart beats per minute (BPM) shows how similar the two system perform for the heart rate (HR) parameter. The performance is near exact match when used simultaneously on a single subject.

Looking of a numerical analysis of the IBI and HR shows that the two systems provide, at least at the coarse level, identical results. This is encouraging that the seen synchronization issues can be removed and the high-resolution data shown above would likely also show nearly identical results for larger datasets rather than the small set used here.

The open system performed on par with the commercial system

It seems obvious from this analysis that for the given systems it is possible to implement an equivalent and diagnostically useful open system to gather real-time data on pulmonary health parameters such as HRV, IBI, and HR. 

As a further test of the proof-of-concept of portability, a version of the Pulse Sensor Amped PPG was built using a Raspberry Pi. The system was demonstrated during the poster session so attendees could see real-time application of the system for monitoring health parameters from a portable platform. All code and hardware in this system, save for the LCD screen, were built using open coding and hardware standards and all code and designs are openly available to the reader.

Next Steps

  • This proof-of-concept needs a larger data set so that comparison can span a larger range of situations and patients.
  • Creating a built-from-scratch hardware system with portability and functionality in mind
  • A more sophisticated analysis of the the algorithms employed
  • Better synchronization, noise filtering, and waveform de-trending

Acknowledgements

I wish to thank my Scalable Health Labs mentors Amruta Pai & Akash Maity, the RSTEM team Christina Crawford & Allen Antoine, and the NSF (Grant NSF-IIS-1730574). Also thanks to my fellow team members: Julius Emmanuel, Jorge Olivares, Chaulladevi Bavda, Miguel Ramirez, & Ralph Cox.


Code


Poster

 NSF Expeditions in Computing RET 2018 Poster
2018 Rice U RET Summer Symposium

Videos

References

Journal Articles

  • Aymen A. Alian, Kirk H. Shelley, “Photoplethysmography”, Best Practice & Research Clinical Anaesthesiology, Vol 28, Iss. 4, 2014, Pgs. 395-406, https://doi.org/10.1016/j.bpa.2014.08.006.
  • John Allen, “Photoplethysmography and its application in clinical physiological measurement”, Physiol. Meas. 28 R1-R39. https://doi.org/10.1088/0967-3334/28/3/R01
  • C. Fischer, B. Dömer, T. Wibmer and T. Penzel, “An Algorithm for Real-Time Pulse Waveform Segmentation and Artifact Detection in Photoplethysmograms,”, IEEE Journal of Biomedical and Health Informatics, vol. 21, no. 2, pp. 372-381, March 2017. http://doi.org/10.1109/JBHI.2016.2518202
  • Alexei A. Kamshilin and Nikita B. Margaryants, “Origin of photoplethysmographic waveform at green light”, Physics Procedia 86 (2017) 72 – 80, https://doi.org/10.1016/j.phpro.2017.01.024

Websites & Blogs

GitHub Repositories

Leave a Reply