A foundational model to spot indications of generalized anxiety disorder and assist mental well being

Mental health, a subject that carries equal importance as physical health, has always remained in the limelight with least medical assistance sought, often leading not only to difficulty in the carrying out day-to-day activities but also to death by suicide. The number has begun to peak since the onset of the pandemic and thus needs to be addressed. Early detection and treatment play an extremely important role in treatment of mental illness. Though the period of recovery is gradual, constant screening and a follow up is sufficient enough in aiding the path back to change in lifestyle. Generalized Anxiety Disorder is one of the most common of mental illnesses among a never-ending list in the 21st century’s fast paced world and is often neglected, but curable if detected in early stages and treated. With mental well-being gaining importance and people moving forward to seek help, a technology to help them in their betterment would be benefiting. A design that is not only user-friendly but also cost effective can come handy to enable simultaneous monitoring.


INTRODUCTION
Mental illness, also referred to as mental health disorder, opens up to a wide range of mental health conditions where these disorders affect your mood, thinking and behavior. The various conditions of mental illnesses include depression, anxiety disorders, schizophrenia, eating disorders and addictive behaviour. Mental illnesses can be broadly classified into various categories that include disorders such as anxiety disorders, mood disorders, psychotic disorders, eating disorders etc. Generalized Anxiety Disorder (GAD) is one among the different anxiety disorders and is the most common of all psychiatric morbidities. Up to 20% of adults are affected by anxiety disorders each year. In addition to this, childhood anxiety occurs in about 1 in 4 children at some time between the ages of 13 and 18 years. With an increasing number of people suffering from generalized anxiety disorder, knowingly or unknowingly, the probability of risk of aggravation of the disorder increases considerably, impacting all of their dayto-day activities. But, the rate of recovery stands at 57% which is comparatively higher than any other mental illness, the key being early detection and treatment. Thus, this work proposes a reliable model to spot indications of GAD and provide assistance for mental well-being using 'Arduino' as the processor and sensors to aid for the collection of real-time data. Sensors such as Heart Rate Variability Sensor (HRV), Temperature sensor, Accelerometer, Bluetooth Module are used with particular thresholds to spot indications of GAD. Using the Global System for Mobile Communications (GSM) and the Global Positioning System (GPS), a follow up technique is established to connect the user to his family members. The organization of the paper is as follows: Section 2 provides the details of literature survey conducted on the reference papers. The overview of the overall system is done in Section 3. Section 4 gives an 2 LITERATURE SURVEY This section gives an overview of the literature surveyed with reference to the idea of the work. A journal describes the construction of flexible wearable devices that recorded various parameters through sensors like Electrocardiogram (ECG), Galvanic Skin Response (GSR), motion, temperature for mental health monitoring. The parameters were plotted against time where individuals were subject to various activities such as exercise, rest and mental tasks. With the help of this journal, the use of the above-mentioned sensors was analyzed and adopted. [1] A journal gives an overview on stress and various methods of detection ranging across several environments and individuals. Several sensors have been used for the detection of various symptoms. Hence the journal was helpful in the selection of sensors for detection of the most likely occurring symptoms [2]. A journal gives details on a three-year detailed study on Generalized Anxiety Disorder and helped to reach the conclusion that GAD can be treatable and cured with minimal efforts. This journal helped in understanding important aspects of the reactance of the body to the disorder and understanding the analysis that was to be made with respect to the disorder [3]. A conference paper provided an elaborate understanding of the real time stress detection methods such as the stress score calculation using fuzzy logic where stress was mapped into three different types taking into consideration the temperature and the Beats Per Minute(BPM) with specified thresholds. The conference paper provided the idea on basic designing of the stress detection module [4]. A conference paper gives a brief on a MYO armband using Surface Electromyography (sEMG) control that was built and the results obtained gave a good prediction of parameters that were to be achieved. The paper describes the technique to detect stress in muscles through sEMG sensor, thus helping in the understanding of use of sEMG sensor for efficient detection of the symptom of muscle fatigue [5]. A conference paper on how anxiety could be diagnosed with the use of Inertial Measurement Unit (IMU) sensors around the waist, where fear is induced or when the individual is subject to any unforeseen circumstance. This paper helped in the choice of accelerometer as an efficient sensor in the detection of anxiety [6]. A journal elaborates on a wearable device that was built with the integration of various sensor inputs through IoT and was able to draw connections between physical and psychological behavior. The journal helped in choosing right thresholds for the various sensors used in this work [7]. A conference paper describes the use of GPS and GSM technologies to provide information to emergency services in case of an accident using sensor input, attached in a helmet. The communication system has been integrated using a micro controller, which has been used in the construction of the module. Also, the use of GSM and GPS technologies were studied on, through this paper and utilized in this work [8]. A conference paper gives details on detection of sleep efficiency through accelerometer illumination and proximity sensors using PIM algorithms with the technique of wrist actigraphy. The sensors have been integrated with a micro controller for sleep detection based on the algorithm [9]. This paper has been taken as the basis for the designing of sleep detection module that is built in this work. Every model concentrated on one or two sensors and their working is monitored but multiple sensors used to measure the parameters of Generalized anxiety disorder (GAD) are not interfaced with the single hardware and found that many of the developed prototypes are not user friendly, hence this work focuses on integrating all the sensors in a single platform to give accurate results.

3
OVERALL SYSTEM ARCHITECTURE In this section, we present the overall architecture of an integrated system. The system consists of an integrated design of detection and communication modules. The detection module consists of two sub modules: Stress detection module and Sleep detection modules The modules are considered to be significant indicators of anxiety disorder. The stress detection module is built with a Heart Rate Variability Sensor (HRV) and a temperature sensor (LM35) [25]. A basic sleep detection module is constructed using Arduino Nano, Accelerometer(MPU6050), Bluetooth module(HC-05) and a battery. This work also aims to enable the transfer of collected data and communicate the status, which is achieved by a communication module to track the location and deliver a personalized message to kin in times of need. The GSM technology helps in communicating an emergency message along with a GPS (Global Positioning System) to give information about the location using coordinates. The basic flowchart in figure 1 describes the outline of the integrated system.

INTEGRATED SYSTEM MODEL
The sub modules specified in part 2 are integrated using the Arduino Mega micro controller. The controller is chosen to mount all the sub modules on to a single and compact device structure to enable better user-experience. Figure 2 gives a brief on the basic block diagram of the system. The major sub modules are elaborated below.

Stress Detection Model
This module gives an integrated design for detection of stress using two parameters i.e. heart rate variability and body temperature variation. The LM35 sensor is used as a temperature sensor and Heart rate variability sensor with contact is used to find the pulse rate. The module is based on the concept of fuzzy logic which classifies stress into three categories of low, medium and high stress and gives outputs simultaneously for the different combinations of real time sensor values. The module is also equipped to give out reminder messages in times of high stress with the help of an LCD (Liquid Crystal Display) to provide assistance in stress management. Figure 3 below shows the algorithm used for stress management.  Storing gyro values for x, y and z direction in x, y and z, a term 'activate' is used for checking if the person is in a sleep mood or not. By default, the term 'activate' is equal to zero. This condition remains true when the accelerometer detects absolutely no movement when the device is ON and will start a sleep timer. There are two confirmations that are checked for, the first confirmation is checked for sleep. If the module detects no movement for a period of 300 seconds i.e 5 minutes, it will set 'activate' to one and start counting light sleep. If 'activate' is set to one, then it is in sleep mode where the module starts counting light sleep, in seconds. If any movement is detected within this span of 5 minutes, then it will start the timer again from the beginning by checking the status of the 'activate' variable. The module checks if light sleep is more than 15 minutes, if yes, it counts that time as light sleep. If the period is less than 15 minutes, it is not counted. If light sleep is greater than 70 minutes and the body doesn't move for 10 minutes, then it will start counting time for deep sleep. If the module is in sleep mode and if any hand movement occurs, it doesn't make light sleep equal to zero but counts it as an interrupt. If there have been 5 interruptions within 5 minutes, it means that the person is awake and thus will make 'activate' equal to zero. The total sleep is now evaluated to be the sum of the light and deep sleep recorded cumulatively. If the last interruption was 5 minutes ago then it will make the interrupt set back to zero. The amount of light sleep is not displayed in the mobile app in the beginning. It will wait for a second confirmation of sleep before transmitting values via Bluetooth to the phone. Most adults have 90 minutes of sleep cycle time, hence when it reaches 90 minutes, it will again start from light sleep but before beginning again it will sum up the values of total sleep. Figure 4 shows the sleep detection algorithm. The module has been designed as a watch to enable easier detection. The output of this module is designed to be displayed on a mobile handset with the help of the Bluetooth module.

Communication Module
The communication module consists of the GPS and GSM modules to give the positioning and to enable personalized message delivery to the kin of the user in case of emergency conditions. If the threshold values of the sub modules are crossed, the module sends out a message to the number of the family member with the coordinates of position of the user so that help can be sought at the earliest.

RESULTS AND DISCUSSIONS
The results for the various sub modules are presented with relevant discussions. The complete circuit is simulated and checked for the working of the sensors and calibrated all the sensors before interfacing with the hardware. The Figure 5 shows the simulation and result is displayed in Figure 6.   Figure 9 shows the outputs obtained for the stress detection module. The module displays the type of stress, the corresponding temperature and the Beat Per Minute (BPM) of the individual at the time of measurement. When high stress is detected by the module for more than five minutes, the module gives out a few tips as shown in Figure 10 below, to help comfort of the individual.   Figure 12 gives the overview of the message that is sent on behalf of the user to the family member of the user. The communication module is integrated with the stress detection module. If the parameters cross the threshold for a given amount of time, an alert message is sent to the mobile handset of the kin of the individual with the location of the individual in coordinates so that they can reach out to them as soon as possible.

Figure12. GSM and GPS integrated interface
The final prototype as shown in Figure 13 has been tested on 5 subjects for understanding and the values have been compared. Real time values have been taken from different age groups to analyze the efficiency of the device and a comparison of cost has been drawn to understand the cost efficiency of the device as well. The prototype is tested for 5 patients who have different stress level as shown in Figure  14.  Table 1 gives the tabulated output for the stress detection module where the module was tested for 5 individuals of various age groups. The temperature, BPM and the type of stress levels have been mentioned.  Table 2 below gives the cost of the products available in the market. The cost comparison for the prototype is made and the prototype has been designed and built at the minimum of cost to provide all necessary features so that the device is user friendly, easily accessible with basic components available in the market and cost effective.

6
CONCLUSION AND FUTURE WORK The sensors that have been used, have been individually tested and integrated to enable the testing of real time values. A basic module for sleep detection and stress detection have been built and have been integrated with a communication module using the micro controller as the heart of the prototype. A prototype of the device has been built to enable easy and faster detection of Generalized Anxiety Disorder, which is not only cost effective and at the same time user-friendly and easily accessible. This module is considered to aid in providing assistance at times of need so as to avoid untimely decisions, thus acting as a support system in improving mental well-being. As future scope, the device can be developed on a single chip and can be enhanced to provide detection of other symptoms for Generalized anxiety disorder.