Emory Logo

Department Of Biomedical Informatics, Emory University | GSoC'23


This page demonstrates the project work titled "A Real-Time Computing Support for Concore" during Google Summer of Code, 2023 under Department of Biomedical Informatics, Emory University.

Introduction

CONTROL-CORE stands as a simulation framework intended for designing closed-loop peripheral neuromodulation control systems. At the heart of this framework lies "concore," a streamlined protocol engineered to simulate these control systems for neuromodulation.

  • Project Title: A real-time computing support for Concore.
  • Contributor: Shivang Vijay
  • Email: shivangvijay@gmail.com

Overview

Developed a shared memory Inter-Process Communication (IPC) between processes within Concore to achieve real-time computing capabilities. Additionally, generated a comparative report between shared memory IPC and file-based IPC for information sharing. Moreover, successfully set up Concore on a Raspberry Pi with Real-Time Clock (RTC) integration.

Below video shows the Concore setup on a Raspberry Pi with an RTC module, and there is no internet connection. Follow Instructions to set up Raspberry Pi with RTC.


Below video shows the Concore setup on a Raspberry Pi using VNC with an internet connection.


Contributions

Github Code Link Description
https://github.com/ControlCore-Project/concore.hpp Implementation of Shared Memory
https://github.com/ControlCore-Project/documentation/raspberrypi.rst Adding RTC Module to Raspberry Pi
https://github.com/ControlCore-Project/documentation/sharedmemory.rst Shared Memory communication in Concore
https://github.com/ControlCore-Project/documentation/CodeDocumentation.rst Code Documentation of Concore.hpp
https://github.com/ControlCore-Project/Benchtest_between_Shared_Memory_and_File_Method_in_Laptop.ipynb Benchtest between Shared Memory and File Method in Laptop
https://github.com/ControlCore-Project/Benchtest_between_Shared_Memory_and_File_Method_in_Raspberry_Pi.ipynb Benchtest between Shared Memory and File Method in Raspberry Pi


Comparison between Shared Memory and File Method in Laptop

Code Detailed Report


Result:-
Graph Description
Read_SM_VS_FM_Laptop
  • Graph for the Reading Process of Shared Memory & File Sharing Method.
  • This graph is plotted for ~100 iterations of the Read process.
Write_FM_SM_Laptop
  • Graph for the Writing Process of Shared Memory & File Sharing Method.
  • This graph is plotted for ~100 iterations of the Write process.
Sum_FM_SM_Read_Laptop
  • Graph for the Sum of Reading Process of Shared Memory (SM) & File Sharing (FS) Method.
  • This graph is plotted for ~100 iterations of the Read process.
  • Read Time of SM is 1.301279ms and of FM is 6.10308ms.
  • Difference between FM and SM is 4.801801ms.
Sum_FM_SM_Write_Laptop
  • Graph for the Sum of Writing Process of Shared Memory (SM) & File Sharing (FS) Method.
  • This graph is plotted for ~100 iterations of the Write process.
  • Write Time of SM is 0.891778ms and of FM is 3.76835ms.
  • Difference between FM and SM is 2.876577ms.


Comparison between Shared Memory and File Method in Raspberry Pi

Report generated in Raspberry Pi 3 Model B+

Code Detailed Report


Result:-
Graph Description
Read_SM_VS_FM_Rasp
  • Graph for the Reading Process of Shared Memory & File Sharing Method.
  • This graph is plotted for ~100 iterations of the Read process.
Write_FM_SM_Rasp
  • Graph for the Writing Process of Shared Memory & File Sharing Method.
  • This graph is plotted for ~100 iterations of the Write process.
Sum_FM_SM_Read_Rasp
  • Graph for the Sum of Reading Process of Shared Memory (SM) & File Sharing (FS) Method.
  • This graph is plotted for ~100 iterations of the Read process.
  • Read Time of SM is 17.375456ms and of FM is 86.978228ms.
  • Difference between FM and SM is 69.602772ms.
Sum_FM_SM_Write_Rasp
  • Graph for the Sum of Writing Process of Shared Memory (SM) & File Sharing (FS) Method.
  • This graph is plotted for ~100 iterations of the Write process.
  • Write Time of SM is 6.837646ms and of FM is 47.991238ms.
  • Difference between FM and SM is 41.153592ms.


Conclusion

My implementation of shared memory demonstrates superior performance based on the analysis of the presented graphs. The results obtained from the graphs, derived from approximately 100 iterations, reveal the effectiveness of the shared memory approach. Notably, as the number of iterations increases, the advantages of the shared memory implementation become even more pronounced, showcasing its potential to provide nearly real-time computing capabilities for Concore.


Acknowledgement

I extend my sincere gratitude to Dr. Mark G. Arnold, Senior Researcher at Lehigh University, Bethlehem, PA, and Dr. Pradeeban Kathiravelu, Assistant Professor of Computer Science at the University of Alaska Anchorage, Anchorage, AK, for their continuous guidance and support that has transcended the development of real-time computing support for Concore.

My contributions to this project have extended beyond the program, culminating in significant findings that have been meticulously compiled into a research paper. I am pleased to announce that this paper has been submitted to the 2024 American Control Conference (ACC), showcasing the culmination of our collaborative efforts under the expert mentorship of Dr. Arnold and Dr. Kathiravelu.