Real-Time Operating Systems for ehealth Wearable Devices Mauro Marinoni, Gianluca Franchino and Giorgio Buttazzo ReTiS Lab, TeCIP Institute Scuola superiore Sant Anna - Pisa 1
Outline Embedded systems in e-health Evolution Issues Real-time Operating systems Erika kernel Contributions Case studies Telemonitoring Telerehabilitation 2
Scenario Recent technological advances have enabled the development of low-cost, miniature medical devices, they improve the communication among patients, physicians, and other health care centers. This solution presents a lot of advantages like: reduced hospitalization; improved efficiency; speed up the diagnosis of diseases; detect critical health conditions. cut total costs; 3
Embedded systems in e-health Embedded systems for medical use have caused deep changes in medical practice: Automate tasks in the hospital Remote logging (e.g., Holter monitor) Automatic remote acquisition Tele-rehabilitation 4
Data Trust In remote logging, data are analyzed by the physician BEFORE being added to the health record; In remote acquisition, data are added to the health record and LATER validated by some physician; Data included in the health record MUST be reliable 5
Multi-sensor platforms In new generations of medical devices: Data are acquires from multiple sensors; Sensors are sampled with different periods; Some sensors share the same bus; Several configuration of sensors and sample times could be available. THEN Concurrency among tasks Resource management 6
Rehabilitation Tele-rehabilitation is characterized by an extra set of constraints correlated with the feedback that must be provided to both the remote supervisor and the patient. To provide a responsive and natural experience response times and jitters must be strictly bounded. THEN Temporal isolation reduce interference; Real-time protocols reduce jitter; Adaptive scheduling increases flexibility. 7
E-health embedded devices Summarizing the requirements: Reliable chain of data from sensor to destination; Multitasking and temporal isolation; Resource management; Adaptive scheduling; Real-time communication. Together with: Maximize the lifetime. Reduce development and certification costs; Real-Time System 8
Erika Enterprise The proposed solution is based on the tiny real-time operating system Erika Enterprise: Minimal kernel (few Kb footprint) for single and multicore platforms. Free, open-source and compliant with the OSEK/VDX API with an OSEK OIL compiler integrated into Eclipse. Support for different architectures (8, 16 and 32 bits), hiding hardware complexity. Interchangeable scheduling algorithms such as Fixed Priority with preemption thresholds, Stack Resource Policy (SRP), and Earliest Deadline First (EDF). Support for automatic code generation from ScicosLab. 9
Real-time scheduling ReTiS contributions aperiodic servers, resource reservation, shared resources Resource management overload handling, elastic tasks, adaptive allocation policies Real-time communication multi-hop communication, bandwidth allocation, task and packet co-scheduling Power management with timing constraints support for multiple algorithms for CPU and devices, integration of DVFS and DPM mechanisms 10
Power management issues Power Management for Real-Time systems Started focusing on CPU Now technology allows more devices CPU is only part of the total power consumption Embedded systems present strong interaction among each other and with the environment new constraints for energy-aware algorithms CMOS Power Dissipation due to: Dynamic power consumption (switching activities) Static power consumption (leakage current) Energy Saving through: Dynamic Voltage/Frequency Scaling (DVFS) Dynamic Power Management (DPM) 11
Power management issues (2) In embedded real-time systems with energy constraints, selecting the most appropriate energy management policy is not easy. The result heavily depends on: the platform characteristics (e.g., energy modes and profiles of the devices, frequency range and power states of the CPU); the application constraints (e.g., task deadlines, sensors acquisition delays, communication bandwidth, etc.) 12
Energy management - Proposed solution The adopted solution is an on-line algorithm to derive adaptive solutions to power management through the control the power mode of a system (device), without violating the timing constraints. Procrastinate the buffered and future events as late as possible (DPM) Adapt the execution speed of the processor (DVFS) Mix DVFS and DPM solutions 13
Kernel support for power management The Power Management is performed through a module in the Real-Time OS The Scheduler selects independently the tasks to execute (FP or EDF) The Power Manager chooses an appropriate running configuration (i.e. speed and voltage) Although Applications and the Scheduler can communicate with Power Manager, they are independent 14
Kernel module architecture Power driver and Device driver abstract the device behavior using a discrete set of states. The Power Manager is divided in independent modules. The API module implements the interface defined for the interaction with the kernel and Applications. The CPU policy submodule implements the energy saving policies. The CPU driver makes new configuration operative. Device policy implements the device strategies. Device Interface offers a single access point to the devices. 15
Case Studies Remote monitoring of physiological parameters ASCOLTA project Kinematic tracking for telerehabilitation Part of the WHITE Joint Open Lab 16
ASCOLTA Project This project has been funded by the Tuscany region to analyze the possibility of remotely monitoring patients recovering from an heart failure. The board allows to acquire ECG, SPO2, breath rate, accelerometers and communicates trough a WiFi link; 17
ASCOLTA Project Information are stored in a server to be automatically analyzed and accessed by physicians. 18
IMU and Kinetics Inertial Measurement Units (IMUs) are becoming essential in monitoring the human body: Games control Wellness Gait analysis Patient monitoring Rehabilitation A. Hadjidja, M. Souila, A. Bouabdallaha, Y. Challala, H. Owenb, «Wireless sensor networks for rehabilitation applications: Challenges and opportunities», Journal of Network and Computer Applications, 36(1), January 2013. 19
First case study: SisTAG Wearable system for telemonitoring of the knee joint 20
Current activity Monitoring of joints using wireless inertial sensors. Calculating angles and measurement errors 3D Avatar Data filtering and analysis Recognition of postures and actions 21
Non Real-time Demo 22
Nodes Synchronization To compute node position and body postures it is crucial that all data from nodes are acquired at the same time instant; Time information in embedded nodes could be affected by jitters due to low quality clock sources; Hence time synchronization among nodes must be provided. 23
Integration with body kinematics Kinematic constraints of the monitored body can be used to correlate nodes positions; Thus reducing local errors present in each single sensor (e.g., drift, random walk) 24
Conclusions E-health devices are more an more complex everyday. A real-time OS could provide: multi-tasking support, timing constraints guarantee, HW abstraction to improve portability. Two use cases have been shown to present the proposed approach. 25
Questions 26
Mauro Marinoni - m.marinoni@sssup.it thank you! Giorgio Buttazzo - g.buttazzo@sssup.it Gianluca Franchino - g.franchino@sssup.it 27