LSTM‐based real‐time stress detection using PPG signals on raspberry Pi

Abstract Stress, widely recognised for its profound adverse effects on both physical and mental health, necessitates the development of innovative real‐time detection methods. In this context, the escalating prevalence of wearable embedded systems, integrated with artificial intelligence (AI) for th...

Full description

Saved in:
Bibliographic Details
Main Authors: Amin Rostami, Koorosh Motaman, Bahram Tarvirdizadeh, Khalil Alipour, Mohammad Ghamari
Format: Article
Language:English
Published: Wiley 2024-12-01
Series:IET Wireless Sensor Systems
Subjects:
Online Access:https://doi.org/10.1049/wss2.12083
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850243560766439424
author Amin Rostami
Koorosh Motaman
Bahram Tarvirdizadeh
Khalil Alipour
Mohammad Ghamari
author_facet Amin Rostami
Koorosh Motaman
Bahram Tarvirdizadeh
Khalil Alipour
Mohammad Ghamari
author_sort Amin Rostami
collection DOAJ
description Abstract Stress, widely recognised for its profound adverse effects on both physical and mental health, necessitates the development of innovative real‐time detection methods. In this context, the escalating prevalence of wearable embedded systems, integrated with artificial intelligence (AI) for the continuous monitoring of critical physiological indicators like heart rate and blood pressure, accentuates their growing relevance in the efficient detection of stress. This article presents an innovative methodology employing deep learning algorithms on the Raspberry Pi 3, a platform distinguished by its cost‐effectiveness and limited resources. The authors have developed an advanced AI algorithm that achieves high accuracy in real‐time stress detection using photoplethysmography (PPG) sensors while significantly reducing computational demands. The authors’ method utilises an artificial neural network with long short‐term memory (LSTM) layers, proving highly effective in time‐series data analysis. In this study, the authors implement key TensorFlow toolkit optimisation techniques including quantisation aware training (QAT), Pruning and prune‐preserving quantisation aware training. These techniques are applied to refine the authors’ model, decreasing size and latency without sacrificing accuracy. The results highlight the LSTM‐based model's proficiency in accurately detecting stress using raw PPG sensor data on the Raspberry Pi 3, a comparatively affordable platform. The model attains an accuracy of 89.32% and an F1 score of 89.55% on the diverse wearable stress and affect detection stress‐level dataset. Additionally, the authors’ optimised model exhibits substantial reductions in both size and latency while maintaining high accuracy. This approach shows great potential for various applications, such as stress monitoring in healthcare, sports, and workplace settings. The use of the Raspberry Pi 3 makes the system portable, cost‐effective, and energy‐efficient, enhancing its potential impact and accessibility.
format Article
id doaj-art-dc53db5d0bb046258203546df6e08977
institution OA Journals
issn 2043-6386
2043-6394
language English
publishDate 2024-12-01
publisher Wiley
record_format Article
series IET Wireless Sensor Systems
spelling doaj-art-dc53db5d0bb046258203546df6e089772025-08-20T01:59:57ZengWileyIET Wireless Sensor Systems2043-63862043-63942024-12-0114633334710.1049/wss2.12083LSTM‐based real‐time stress detection using PPG signals on raspberry PiAmin Rostami0Koorosh Motaman1Bahram Tarvirdizadeh2Khalil Alipour3Mohammad Ghamari4Advanced Service Robots (ASR) Laboratory Department of Mechatronics Engineering School of Intelligent Systems Engineering College of Interdisciplinary Science and Technology University of Tehran Tehran IranAdvanced Service Robots (ASR) Laboratory Department of Mechatronics Engineering School of Intelligent Systems Engineering College of Interdisciplinary Science and Technology University of Tehran Tehran IranAdvanced Service Robots (ASR) Laboratory Department of Mechatronics Engineering School of Intelligent Systems Engineering College of Interdisciplinary Science and Technology University of Tehran Tehran IranAdvanced Service Robots (ASR) Laboratory Department of Mechatronics Engineering School of Intelligent Systems Engineering College of Interdisciplinary Science and Technology University of Tehran Tehran IranDepartment of Electrical Engineering California Polytechnic State University San Luis Obispo CA USAAbstract Stress, widely recognised for its profound adverse effects on both physical and mental health, necessitates the development of innovative real‐time detection methods. In this context, the escalating prevalence of wearable embedded systems, integrated with artificial intelligence (AI) for the continuous monitoring of critical physiological indicators like heart rate and blood pressure, accentuates their growing relevance in the efficient detection of stress. This article presents an innovative methodology employing deep learning algorithms on the Raspberry Pi 3, a platform distinguished by its cost‐effectiveness and limited resources. The authors have developed an advanced AI algorithm that achieves high accuracy in real‐time stress detection using photoplethysmography (PPG) sensors while significantly reducing computational demands. The authors’ method utilises an artificial neural network with long short‐term memory (LSTM) layers, proving highly effective in time‐series data analysis. In this study, the authors implement key TensorFlow toolkit optimisation techniques including quantisation aware training (QAT), Pruning and prune‐preserving quantisation aware training. These techniques are applied to refine the authors’ model, decreasing size and latency without sacrificing accuracy. The results highlight the LSTM‐based model's proficiency in accurately detecting stress using raw PPG sensor data on the Raspberry Pi 3, a comparatively affordable platform. The model attains an accuracy of 89.32% and an F1 score of 89.55% on the diverse wearable stress and affect detection stress‐level dataset. Additionally, the authors’ optimised model exhibits substantial reductions in both size and latency while maintaining high accuracy. This approach shows great potential for various applications, such as stress monitoring in healthcare, sports, and workplace settings. The use of the Raspberry Pi 3 makes the system portable, cost‐effective, and energy‐efficient, enhancing its potential impact and accessibility.https://doi.org/10.1049/wss2.12083biosensorsdeep learningsignal processingstress detection
spellingShingle Amin Rostami
Koorosh Motaman
Bahram Tarvirdizadeh
Khalil Alipour
Mohammad Ghamari
LSTM‐based real‐time stress detection using PPG signals on raspberry Pi
IET Wireless Sensor Systems
biosensors
deep learning
signal processing
stress detection
title LSTM‐based real‐time stress detection using PPG signals on raspberry Pi
title_full LSTM‐based real‐time stress detection using PPG signals on raspberry Pi
title_fullStr LSTM‐based real‐time stress detection using PPG signals on raspberry Pi
title_full_unstemmed LSTM‐based real‐time stress detection using PPG signals on raspberry Pi
title_short LSTM‐based real‐time stress detection using PPG signals on raspberry Pi
title_sort lstm based real time stress detection using ppg signals on raspberry pi
topic biosensors
deep learning
signal processing
stress detection
url https://doi.org/10.1049/wss2.12083
work_keys_str_mv AT aminrostami lstmbasedrealtimestressdetectionusingppgsignalsonraspberrypi
AT kooroshmotaman lstmbasedrealtimestressdetectionusingppgsignalsonraspberrypi
AT bahramtarvirdizadeh lstmbasedrealtimestressdetectionusingppgsignalsonraspberrypi
AT khalilalipour lstmbasedrealtimestressdetectionusingppgsignalsonraspberrypi
AT mohammadghamari lstmbasedrealtimestressdetectionusingppgsignalsonraspberrypi