Nothing Special   »   [go: up one dir, main page]

IoT Mini

Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

Stress Detection with a

Brain Computer Interface

21AI717 IOT for AI Mini-Project


(Group 7 : CB.EN.P2AIE21016 Madhumithaa V &
CB.EN.P2AIE21025 Vijayasri Iyer)
Introduction
● Stress is stated as a mechanism of the body to respond to a challenge or
reaction to mental, emotional, or physical pain.
● Physical symptoms include sweating, cramps, fainting, headache, high blood
pressure, muscular aches and sleeping difficulties whereas emotional
symptoms count anger, anxiety, depression.
● Not only do stressful conditions cause dysfunctional behavior, but they can
also exacerbate hypertension, cardiovascular disease, bowel disease.
● If the stress continues for a long duration we also get forgetfulness,
moodiness and loneliness.
Problem Statement
● To detect signals of stress by analyzing brainwaves of a human using an EEG
sensor
● Change ambient conditions upon detection of stress
● Playing relaxing music as per user preference from a playlist using a
recommender system
● Design a cloud-based streaming pipeline for the same.
Motivation
● A global survey in 2020-2021, showed that 4 in 10 adults (40%) suffered from
emotions like stress and worry.
● Prolonged states of stress is a precursor to many physical and mental health
conditions.
● People experiencing stress can also have a massive drop in productivity levels
and exhibit irritable behavior.
Need for the solution
● Most mechanisms for detecting stress focus on detect physical stress
● Done via ECG signals, Facial expressions and sweat gland activity (EDA
sensors)
● Using EEG we can detect the mental stress level that a person would
experience in real-time.
Advantages
Detecting mental stress in real-time can have many real-world benefits

1. Overall better mood and health


2. Improvement in productivity levels
3. Prevent chronic mental conditions such as depression
4. Prevent acute health conditions such as arrhythmia and heart attacks
Literature Survey
● For a stress detection problem,
we will be measuring activity in
the prefrontal lobe and the
temporal lobes of the brain
● The prefrontal lobe is the
emotion processing centre of the
brain.
Literature Survey
Stress Classification Using Brain Signals Based on LSTM Network

● This paper proposes a stress classification system by utilizing an EEG signal.


● EEG signals from thirty-five volunteers were analysed which were acquired
using four EEG sensors using a commercially available 4-electrode Muse EEG
headband.
● Compared the Multilayer Perceptron (MLP) and Long Short-Term Memory
(LSTM) for classifying stress and nonstress group.
Literature Survey
EEG Based Stress Classification in Response to Stress Stimulus

● Collected the EEG data from 20 subjects. The stress was induced in these
volunteers by showing stressful videos to them, and the EEG signal was then
acquired.
● The system was the 4-electrode Muse headband.
● The data were then classified into stress and non-stressed using different
machine learning methods - Random Forest, Support Vector Machine, Logistic
Regression, Naive Bayes, K-Nearest Neighbors, and Gradient Boosting.
Obtained 93% accuracy.
Hardware Design - Ganglion Board
Electrode Wires

Gel Electrode Stickers

Duracell AA Battery
Hardware Components

Components Quantity Cost

Ganglion Sensor (Already 1 -


Bought)

Electrode Wires 6 -

Gel Electrodes Stickers 50 120

Duracell AA Battery 4 150


Justification

● The electrical activity of brain is displayed in the form of brain waves of


different frequencies (and amplitudes) corresponding to different situations
of mind.
● In traditional setting, EEG sensors are used to measure signs of mental
stress as opposed to other sensors that measure just physical stress

● EEG sensors can also be used to stimulate the brain with minute electrical
impulses (tDCS)
Software Architecture : System at a glance
Software Design : Data Acquisition

EEG SENSOR

BrainFlow API AWS IOT Core

Bluetooth Dongle
Software Design : Cloud Storage and
Processing
UI Design
Working of EEG Sensor
Working of EEG Sensor
Working of EEG Sensor
● EEG (Electroencephalography) sensors can record up to several thousands of
snapshots of the electrical activity generated in the brain.
● The recorded brain waves are sent to amplifiers, then to a computer or the
cloud to process the data.
● With Fast Fourier Transform (FFT), these raw EEG signals can be identified as
distinct waves with different frequencies.
● Brainwaves are categorized by frequency into four main types: Beta, Alpha,
Theta and Delta.
Frequency bands
Service Level Diagram
Control Flow and Data Flow

EEG SENSOR

+
BrainFlow
API

Recommen
dation
Bluetooth system
Dongle
Level by Level IOT Layers
Logic - Analytics of Deep Learning Models
Hyper Parameters LSTM and GRU

Hyper Parameters LSTM GRU

Input Size 2548 2548

Output Size 128 128

Number of Layers 2 2

Dropout 0.2 0.2

Epocs 500 500

Learning Rate 0.1, 0.01, 0.001, 0.0001 0.1, 0.01, 0.001, 0.0001
LSTM GRU
Results
References
1. https://www.semanticscholar.org/paper/Stress-Classification-Using-Brain-Signals-Based-on-Phutela-R
elan/d2805dea22df992734fceb193d81fc43951a70f0
2. https://www.semanticscholar.org/paper/Stress-Effect-on-Attention-Level-Detection-Using-Al-Ashwal-S
yafril/762a0c3924c17c60e4eb2190412a3023b54b3a34
3. https://link.springer.com/chapter/10.1007/978-3-030-95711-7_30
4. https://www.actapress.com/PaperInfo.aspx?paperId=456095
5. https://link.springer.com/article/10.1007/s12652-021-03249-y
Thank You!
Appendix

You might also like