TL;DR
This paper presents a proof-of-concept for using a low-cost Raspberry Pi minicomputer to acquire and process data for Diffuse Correlation Spectroscopy (DCS), a technique used to measure blood flow in tissues. By developing a custom bare-metal operating system, the Raspberry Pi successfully captured high-frequency signals, and the resulting autocorrelations were comparable to those obtained with expensive commercial hardware, paving the way for more accessible DCS systems.
What Problem Does This Paper Address?
Diffuse Correlation Spectroscopy (DCS) is a valuable non-invasive optical technique for monitoring hemodynamic properties, such as blood flow, in biological tissues. However, a significant barrier to its widespread adoption is the cost of the specialized hardware required for signal acquisition and autocorrelation. Typically, DCS systems rely on dedicated hardware correlator boards that are expensive and essential for capturing and processing the rapidly changing intensity signals from photon detectors. This paper aims to address this cost barrier by demonstrating that a readily available and inexpensive Raspberry Pi minicomputer can be repurposed to perform these critical functions, potentially making DCS more accessible for research and clinical applications.
Methods
The core of this work involves leveraging the Raspberry Pi's capabilities for high-frequency digital signal acquisition and subsequent software-based autocorrelation.
- Custom Bare-Metal OS: The standard Linux operating system on the Raspberry Pi proved insufficient for the required high-speed, uninterrupted data acquisition. To overcome this, the authors developed a custom operating system written in ARM assembly language. This bare-metal OS allowed for precise control over the General Purpose Input/Output (GPIO) pins, enabling the acquisition of the digitized photon arrival signals (TTL pulses) from an Avalanche Photodiode (APD) detector at a high and stable sampling rate.
- High-Frequency Data Acquisition: The APD detector outputs TTL pulses representing photon arrivals. These pulses were fed into the Raspberry Pi's GPIO pins. The custom OS was designed to sample these signals at a rate of approximately 5.2 MHz, capturing the rapid temporal variations crucial for DCS.
- Data Transfer and Software Autocorrelation: Due to limitations in the custom OS for permanent storage, the acquired data was transferred to a second Raspberry Pi running Linux, and then to a laptop PC. On the laptop, the autocorrelation function was computed numerically using the Fast Fourier Transform (FFT) algorithm, as described by the Wiener-Khinchin theorem. This software-based approach replaces the need for a dedicated hardware correlator.
- Experimental Validation: The performance of the Raspberry Pi-based system was rigorously compared against a commercial hardware correlator in two experimental setups:
- Pump-Controlled Flow Experiments: A controlled flow of a microsphere suspension was used to simulate varying blood flow rates.
- In Vivo Cuff-Occlusion Experiments: A human volunteer's arm was subjected to cuff occlusion to manipulate blood flow, mimicking physiological changes.
Datasets
Not discussed in the paper. The experiments involved acquiring real-time data from optical measurements, not pre-existing datasets.
Key Insights and Ideas
- Democratizing DCS: The most significant insight is that a low-cost, widely available platform like the Raspberry Pi can be engineered to perform the demanding data acquisition and processing required for DCS. This has the potential to drastically reduce the cost of DCS instrumentation.
- Bare-Metal Control is Key: The success of the data acquisition hinges on bypassing the overhead of a standard operating system. Developing a bare-metal OS was crucial for achieving the necessary high-speed, uninterrupted sampling.
- Software Autocorrelation is Viable: The paper demonstrates that numerical computation of the autocorrelation function using FFT on the acquired data yields results comparable to hardware correlators, validating the software-based approach.
- Comparable Performance: Despite the cost difference, the Raspberry Pi system demonstrated comparable accuracy and stability to commercial hardware in both controlled flow experiments and in vivo physiological measurements.
Key Results
- Sampling Rate: The custom bare-metal OS on the Raspberry Pi achieved a sampling frequency of approximately 5.2 MHz, with 137 clock ticks (approximately 0.19 µs) between successive GPIO reads.
- Pump-Controlled Flow: Autocorrelation traces acquired by the Raspberry Pi were nearly identical to those from the hardware correlator. The derived flow parameter (1/τ½) showed less than a 15% difference between the two devices across various flow rates. However, standard deviations were about three times larger for the Raspberry Pi data in these experiments.
- Cuff-Occlusion Experiments: The Raspberry Pi system accurately captured the expected physiological changes in blood flow during cuff occlusion. The trends observed in the autocorrelation traces and the derived flow parameter were consistent between the Raspberry Pi and the hardware correlator. In this in vivo setting, the standard deviations for the Raspberry Pi data were nearly equal to those of the hardware correlator.
Limitations and Future Work
- Permanent Storage: A significant limitation is the current inability of the custom bare-metal OS to store data directly to permanent storage (SD card or USB). Data must be transferred to another device, adding complexity.
- On-Device Autocorrelation: While the Raspberry Pi successfully acquired data, the autocorrelation computation was performed off-device. The authors suggest that future work should focus on enabling the Raspberry Pi to compute the autocorrelation function itself, potentially using open-source FFT libraries.
- Uniform Sampling with Storage: Integrating permanent storage capabilities might introduce interrupt handlers that could affect the uniformity of signal sampling. This needs careful study.
- Cost Reduction: The paper highlights the potential for cost reduction, but further advancements in light source technology could also contribute to making DCS more affordable.
- Next-Generation Raspberry Pi: The authors are optimistic that future Raspberry Pi models with faster processors and more memory will make overcoming these challenges more feasible.
Summary updated