# Ambient Assistive Living for Monitoring the Physical Activity of Diabetic Adults through Body Area Networks

Authors: P. Naga Srinivasu; G. JayaLakshmi; Rutvij H. Jhaveri; S. Phani Praveen
Journal: Mobile Information Systems
 (2022)

---

## Abstract

The adequate aging hypothesis seeks to help people live longer, healthy lives. Diabetic patients who stay remotely need an infrastructure to monitor them continuously and provide timely treatment. Ambient assisted living (AAL) encourages the establishment of solutions that may help optimize older people’s assistive environment while also reducing their impairments. The blood glucose levels of diabetic patients are continuously monitored by gold oxide sensors placed over the human body. The signals associated with the glucose levels in the human body are plotted over a spectrogram image using the short-time Fourier transform, which is further classified using the deep learning model based on finetuned AlexNet, which has employed random oversampling and batch normalization for better precision in the results. The model classifies the spectrogram images as low and high glucose levels and normal glucose levels. Thereby alarming the caretakers for effective treatment of the individuals. Body area networks (BANs) gather information from biosensors and send it to a domain controller to assist caretakers and physicians in recommending the physical exercises for their clients. Evaluation criteria such as sensitivity and specificity, precision, and Mathew’s correlation coefficient are used to assess the effectiveness of the proposed model in this current diabetes study. The cross-validation of the model at multiple folds is being evaluated to analyze the performance. It is evident from the obtained results that the proposed model has exhibited an acceptable performance in precisely sensing the individuals with abnormal glucose levels.


---

## Body

## 1. Introduction

Body area networks have recently become more vital in humankind. BANs utilize small and low-power sensors connected to or embedded to the body to capture biological information, especially in ambient assistive living. BANs have been broadly employed in ambient assisted living applications. Because BAN terminals usually run-on batteries, efficient power control is imperative. The IEEE 802.15.6 [1] specification makes it a point to include extended battery life as its primary criteria. Health care for chronically ill people is costly, so finding new ways to offer surveillance and assistance in a practical, dispersed, and noninvasive way. While limiting the number of human resources required to care for the elderly, AAL uses information technology to keep track of their health and well-being. This allows seniors to live longer, independent lives. When body area network and IoT platform architecture are seamlessly integrated into the network infrastructure, it is feasible to use in medical settings. Design enables the suggested platform’s components to work together effectively within the constraints of such research.Increasingly shifting trends of illness, the great expectations of clients, budgetary constraints, and an even more elderly population provide enormous difficulties for health and social care. Worldwide, the number of persons 60 and older is expected to rise from 900 million in 2015 to 1.4 billion by 2030, then again by 2050 to a staggering 2.1 billion [2]. The quality of life of an individual is being considered when assessing the incidence of sickness in conjunction with a wide variety of many other wellness outcomes connected to essential elements of that human’s life. These measures are difficult to optimize since they are based on daily life experiences and are fundamentally subjective.The desired blood glucose levels when fasting plasma glucose should be kept in the range of 80 to 100 mg/dl under normal circumstances and below 120 mg/dl for two hours after meals, i.e., during the digestive phase for prediabetes and higher than 126 mg/dl for diabetic patients, as stated by the American Diabetes Association (ADA) [3]. In AAL settings, individuals with diabetes require blood glucose management and, in most cases, insulin treatment to maintain their glucose levels within limits mentioned above. For this reason, individuals should be informed on how therapeutic regimen modifications may impact glycemic control and motivated to improve their treatment under their physician’s supervision. However, many variables, including those already stated, may affect a patient’s blood sugar levels, and any one of these factors can lead to unpredictably hazardous swings. Considering that all of these variables are not possible for diabetes individuals like the elderly, doing so is necessary if someone wants an appropriate insulin treatment. And at the same time, the individuals faint for a lower blood glucose level. There is great demand for such circumstances to monitor individuals with more melancholy blood pleasure.Insulin units (IU) are administered following the parameters shown in Figure1 in order to regulate daily variations in blood glucose (0.5f(GL)) and to manage mealtime changes in blood glucose (0.5f(GL)) during meals. The correction factor determines the amount needed to control the other influential factors of glucose levels. Even so, there is a demand for patient-centric factors. The insulin dosage is given as per the guidelines that are mentioned. When the glucose level is below 150 GL, mg/dl, giving 0.3 IU/kg/day is recommended. The glucose level in the range of 150-200 GL, mg/dl is recommended to give 0.4 IU/kg/day. The glucose level is more significant than 200GL, mg/dl, giving 0.5 IU/kg/day [4].Figure 1
Diagram representing the insulin intake.BAN platforms allow the streamlined inclusion of sensor arrays to facilitate diabetes-based sensory surveillance, such as low blood sugar prediction (the prediction of possible future low glucose levels) and robotic care potential far beyond elementary monitoring of blood glucose levels. AAL ensures that the research fusion and machine learning abilities are incorporated well within the framework and provide virtual sensing and interpersonal monitoring variability, especially concerning metabolic-related changes caused by physical activity. AAL-BAN is proposed here with the time series control and reporting of diabetes blood sugar levels [5].It is crucial for individuals taking rapid insulin injections to know about the nutrition facts on the dish that each individual consumes. Every such individual can change the daily insulin dose according to how those carbohydrates (CHO) are present for each serving [6]. Those who alter the insulin dosage, like those on oral medication or diet management, must retain their blood glucose consistently by consuming a comparable quantity of carbohydrates at each mealtime, says the American Diabetes Association. Meals with high CHO have the most significant impact on blood glucose levels, while dishes high in protein and fat (such as butter, oils, and sauces) have far less impact. As a result, medications have little impact on glucose levels in the blood [7].The study is motivated by the limitations of the conventional mode of diagnosis and analysis of the glucose levels in the human body, which needs additional equipment and a blood sample for analyzing the glucose levels, which is invasive. Moreover, the conventional models are limited to predicting abnormal blood glucose levels. The idealogy of the ambient assistive technology (AAT) is to continuously monitor the patients, provide timely treatment, and create a better livelihood for senior citizens. This has led to a necessity for research in AAL to support people who are differently-abled and individuals with diabetes or any other illness like cardiovascular disease and Alzheimers. Sensing, analyzing, and transmitting are the three key functions of biosensors [8]. Biosensors can monitor or perceive the circumstances in a sensing activity. A biosensor conducts assessments and stores them to transmit the data to the receiver with the caretaker or the associated base station. The base station receives the recorded information for further processing in the communication action. The primary objective of the current study is presented below in a pointwise manner.
(i)
The diabetic individuals are consistently monitored through the body area network, and the blood glucose levels are monitored(ii)
The food consumption and the physical activities are assessed to recommend the users about the insulin dosage(iii)
The insulin levels are monitored to trigger the notification to the caretakers about the health condition(iv)
The individuals are consistently updated about the insulin level, adhering to a better lifestyle(v)
The model predicts the abnormalities caused in the near future due to abnormal blood glucose levelsThe entire paper is organized to introduce the field of sensor-based glucose level assessment in diabetic patients. The related work section focuses more on the existing technologies used for continuously monitoring the patient’s health condition using wearable technologies and the Internet of Medical Things. The background sections present the role of biosensors in analyzing the blood glucose levels and the procedures to obtain the spectrogram images from the signal data for analysis. Section four presents the layered architecture of the deep learning-based finetuned AlexNet based model for classification of the spectrogram images. Section5 discusses the proposed model’s working procedure and various hyperparameters like training loss and accuracy, testing loss, and accuracy, followed by the learning rate. Section 6 presents the results and discussion of the proposed model concerning various existing state-of-art models. Finally, the conclusion section outlines the practical inferences and the performances of the proposed technology.


## 2. Related Works

An ambient assistive environment is a typical living environment enhanced with sensing devices interconnected through the internet of things. Several sensors are used to monitor, which are presented in Table1. Substantial context information may be acquired by evaluating and integrating several kinds of sensor information. Most of the AAL frameworks use this data to automate healthcare-related activities and increase occupants’ comfort concerning health and wellness.Table 1
Presents the various sensors used in the AAL environment.
SensorDescriptionPIRPassive infrared sensor used in motion detectionAIRActive infrared sensors are used in motion detection and object identification.PressurePressure sensors are used in estimations from the pressure, like pressure sensors deployed in footwear for counting steps and body mass and sensor floor mats for counting visitors.Smart tilesSensors are used to assess the pressure on the floor.RFIDRadio frequency identification sensor used in acquiring the object informationUltrasonic sensorsSensors are used in motion detection.MicrophonesMicrophone-based sensors work on sound-related data. Based on the sound, the activities are assessed.Video sensorsVideo sensors are used in surveillance to detect activities in a specific locality.GlucometerA glucometer sensor is used in assessing the glucose levels in the body.Pulse oximeterPulse oximeter used in assessing the body oxygen saturation.GSRGalvanic skin responses used in monitoring the perspiration.ThermalThe thermal sensor is used in assessing the temperature of the object.ECGElectrocardiography sensors are used in monitoring cardiac activitiesEMGElectromyography sensors are used in monitoring muscle-related activities.Preclinical and practical trials may be less reliant on gadgets such as the Smartex Wearable Wellness System (WWS) [9], available from VivoSense. WWS uses more individual customer tier equipment to enforce its workarounds, as these sensors become ever more prevalent and reliable. This enhances customer acceptability and makes the solution more precise and accurate. For caretakers to trust the gathered data, such gadgets should be validated via unbiased and trustworthy sources: several AAL and innovative building options for seniors who are not suffering from severe physical or mental decline. The model named Home Event Recognition System (HOMER) [10, 11] technology allows the assimilation and arrangement of various home sensors and robotic systems, regardless of an environmental layout, to provide specialized processes like detecting when an individual has tumbled and not yet got back up, an alarm can be stimulated. Additionally, the Fit4All [12] initiative aimed to utilize intelligent technology to help older people do regular, healthful activity both indoors and out and educate individuals regarding health conditions and physical activity in general.Cloud-oriented Cloud-based Ambient Assisted Living Middleware (CoCaMAAL) [13] aims to analyze basic information from an AAL device and return the appropriate response according to the environmental condition act. Globally Openly available Platforms and standard Architecture for Ambient Assisted Living, namely, the UniversAAL [14], an open platform that allows widely divergent Internet of Things (IoT) devices to communicate and function properly in the same system, in summing up. Many pilot studies demonstrate how quickly AAL systems could be deployed to use this technology because it is versatile enough to work with any IoT device. Moreover, other models like user-centric indoor Wi-Fi technologies proposed by Hromadova et al. [15] and Machaj et al. [16]. Healthcare surveillance systems ought to be ready to react to crises and initiate appropriate action for the individual’s well-being. In a case of mistaken identity, whenever a circumstance is flagged as an emergency, even when it is not, it is certainly bothersome, and recurrent false alarms put the system under dependability challenges. False alarms are essential since they may induce tenderness, irritation, needless suffering, or even death. Under this context, Context-Aware Body Area Network (CABAN) [17] could gather and communicate physiological data regardless of the environment. A multitude network of sensors placed throughout the user’s residences responds spontaneously to changing circumstances, only bothering people when their involvement is required or to provide information.Radio-Frequency Identification (RFID) [18, 19] solutions have been widely utilized to detect individuals moving in interior settings. These tags wander inside an electromagnetic field emitted by a probing antenna and detected by a distant receiver. This kind of technology tracks the movement of the individuals and collapses due to low blood glucose levels. With the advent of Bluetooth Low Energy (BLE) [20] technology, the constraints of low-bandwidth connection in certain situations have been overcome. Smart biosensor advancement, psychological level diagnosis, falls, and geolocation of old individuals can be tracked using the BLE technology [21]. The outcome of the RFID and BLE technologies has enriched the services and scope of AAL.Healthcare Information Exchange (HIE) is a powerful technology that has been shown to speed up the transfer of sensitive healthcare data among the sensors and the IoT component [22]. Quality of healthcare and observation for improvised surveillance in AAL has been dramatically improved by HIE equipment. It has brought down the cost of individual surveillance through data exchange. BlocHIE software improves evaluation and comprehension of clinical study findings whenever dealing with clinical data. Using HIE architecture, repositories such as Electronic Medical Records (EMR) and Personal Healthcare Data (PHD) can store and exchange large amounts of data for better prediction and alarming the primary healthcare centers about the situation. However, there might be an operational shift in the IoT model with BAN settings requiring energy-saving usage and accuracy compared to conventional methods [23].Kameas and Calemis [24] studied a variety of ubiquitous platforms that assist health-related tasks. ECG, heart rate, and oxygen saturation level may be monitored remotely. Using the HEARTFAID platform, early screening and medical support of cardiovascular disease may be improved. The platform offers coordinated care for medical practitioners, including physician telemonitoring, alert, and alarm system, such as in the case of a heart attack conclusions based on the patient clinical data and outlier identification in historical datasets. The Internet of Things (IoT) has linked smart electronic health records to make patient data more easily and universally accessible [25].An interoperable cloud-based care assistance program is the iCarer initiative’s goal [26], which intends to facilitate casual services for senior citizens. It incorporates Tunstall’s ADLife [27] facilities, upgraded to provide the casual careers with the knowledge to assist them in informal care. Extra features include a customized technical assistance program focused on training the caretaker and educating the client for whey is being cared for. These services work together to protect the caretaker and significantly decrease stress. The privacy of the data is maintained to make sure the clients feel more comfortable in rendering the services [28]. Pace et al. [29] have proposed interoperable IoT-driven services for providing the ambient environment named INTER-Health for heterogeneous contexts to detect abnormal situations.In the study use of the IoT framework, in-home healthcare in south Korea is attracting interest [30]. Even though both have advanced rapidly, there has been very little integration between healthcare technology and innovative home technology. In addition, many new technical advancements fail to consider the unique needs of the aging population. Both technologies should be used in conjunction with one other and in settings that mimic the everyday activities of the elderly to address the issue of aging more effectively. The Internet of Things (IoT) and healthcare gadgets are establishing a new healthcare paradigm by storing everyday health information as massive data for future processing [31–34]. The future AAL healthcare platform will be formed by merging healthcare and IoT technologies in the residential space. A separate table is being added to discuss the similarities studies used to assess glucose levels and diabetes predictions discussed in Table 2.Table 2
Existing state-of-art models that are widely used in diabetes studies.
ApproachesType of studyApplicationLimitationsDecision tree (DT)/random forest (RF)/support vector machine (SVM) [35]Prediction frameworkUsed in predicting diabetes from the PIMA dataset, which assists in earlier diagnostics.The model is not efficient in dealing with unstructured data.Deep neural network (DNN), Extremely Gradient Boosting (XGBoost)/RF [36]Risk prediction modelUsed in analyzing the risk prediction from minority diabetes from Tehran lipid and glucose cohort data. Model is efficient in imbalanced data.The weight assessment is quite challenging in the current model.Optimal weighted based deep artificial neural network [37]Diabetes severity assessments modelUsing the ensemble classifiers in the diabetes classification to trace out the abnormalities from the PIMA dataset.The model relies on the feature weights, and the model is used in assessing the severity based on the training set rather than the real-time glucose levels.Logistic regression (LR), classification and regression tree (CART), SVM, RF, and gradient boosting machine (GBM) [38]Characterizing the risk of type 2 diabetesUsed in assessing the risk of diabetes among the rural Chinese population through the ensemble classifiers.The models are limited to tracing the abnormalities from the structured preexisting data and limited to working on real-time blood glucose levels.RF, LR, and multilayer perceptron (MLP) [39]Diabetes classification and prediction from healthcare applicationsUsed in classifying the diabetic patients based on the insights from PIMA dataset.The models are applied over the pre-existing data and limited to work with real-time glucose levels to predict the abnormal glucose level.Wearable components for noninvasive glucose level monitoring [40]Used in real-time monitoring of the devices glucoseUsing PPG photoplethysmogram (PPG) sensor and galvanic skin response (GSR) sensors to monitor glucose levels.The equipment needs a considerable power supply, and the precision of the model is limited due to the conventional dynamic programming.Deep neural network (DNN) classifier [41]Early identification of diabetes from the PIMA datasetUsing the DNN and feature engineering for assessing diabetes.However, the computational time is considerably higher than the conventional classification model. Moreover, the model fails to assess the real-time blood glucose levels.There are various technologies available in providing healthcare-related services to the users apart from those discussed earlier in the current section. There is great demand for technologies that can continuously monitor the senior citizen toward the glucose level and notify the caretakers about the condition of the patients. The proposed technology offers continual surveillance to the patients and dispensing time treatment to the individuals.


## 3. Background

The abovementioned projects include a wide range of options for such elderly individuals. IoT architecture for remote monitoring of blood glucose levels is mentioned throughout this study. Several AAL frameworks utilize Bluetooth and WIFI technology, while the proposed model tracks individual activities through BAN [42]. Communicate through BAN and is equipped with a wide range of sensors to gather data on motions, body temperature, and glucose levels in the user’s blood. The model performs the data classification and analysis concerning the acquired glucose level and body temperature data. Figure 2 represents the environment with sensor nodes that acquires the data and update the records at the local healthcare records repository. Based on the environmental conditions, the decisions are made to initiate the treatment. The individuals are continuously monitored and alarmed about the glucose levels and body temperature to avoid future complications.Figure 2
Diagram representing the AAL environment.The proposed model encompasses three phases. The initial phase is about the data acquisition, processing, and analysis, followed by the decision phase. Continuous monitoring is performed through the glucose sensors placed over the human body. Smart wearable sensor technologies can constantly monitor analytes offer the appealing potential for delivering data to aid in the forecasting, diagnosis, and illness prevention, allowing for early potential treatment. As a patient monitoring gadget that is noninvasive, the glucose monitoring sensors that provide uninterrupted blood glucose readings depend on the precision and accuracy of biosensors to accurately and effectively convey blood glucose concentrations. Biosensors comprise three parts: a bioreceptor, a signal transducer, and a signal displayer, commonly an electronic device [43].


### 3.1. Biosensor for Blood Glucose Monitoring

The gadget measures the deposition of the analyte inside a liquid by detecting the existence of both the analyte’s attachment to a protein or molecule. Diverse biosensor categories have multiple binding types and outputs. Still, the two most common include catalytic sensors that detect enzyme reactions and affinity biosensors, which use genes and antibodies for analysis [44]. Blood glucose levels have been associated with glucose concentrations in sweat, saliva, urine, tears, and interstitial fluid, among several other body fluids. Efforts to build wearable biosensing devices that monitor glucose levels in such fluids have yielded encouraging results in recent years [45]. Sweat is a vital substrate for assessing glucose deposits as it has generated passively by most individuals. A single layer graphene-based biosensor capped in gold nanoparticles is being developed to utilize sweat to detect glucose content in the blood.Due to the high accuracy and precision of biosensing applications with glucose oxidase (GOD) has been extensively employed in fabricating glucose biosensors [46]. Gold nanoparticles have a higher surface-to-volume proportion and superior conductivity than most metal nanoparticles. They are considerably more stable, adaptable, and biocompatible than other metal nanoparticles, which has led to their widespread application as immobilizer compounds and electrode modulators. It has also been extensively utilized due to several advantages of load-bearing capacity and better electron conduction. Graphene is the thinnest double-layered carbon substance with a high surface area and phenomenal electrical characteristics.The electrochemical behavior of electrode materials was investigated using differential pulse voltammetry (DPV) and chronoamperometry curve models. It was decided to record all characteristic peaks ranging from -0.1 V to 0.7 V (against SCE) to demonstrate the electrochemical behavior of the charged electrodes. The electrical and chemical reactions of varying amounts of glucose were measured. These curves are further transformed into spectrograms for further processing of the images. Figure3 represents the procedure of acquiring the electrochemical signals and the chronoamperometry curve associated with the glucose levels in the human body, followed by the spectrogram images generated from the curves [47].Figure 3
Diagram representing the process of generating spectrogram images from GOD sensor.


### 3.2. Spectrograms from Real-Time Signal Data

Fourier transform (FT) is the most predominantly used technology for processing signal data in the frequency domain for further processing. However, the FT technique is ineffective when dealing with a nonstationary signal and its temporal content changes [48]. The HR impulses exhibit nonstationarity characteristics when their wavelengths and relative intensities evolve. The signal data is continuous and should be converted to discrete data for further analysis using the machine learning models. The spectrograms are generated for a signal of 5 seconds in duration. The short-time Fourier transform (STFT) is an enhanced version of the FT-based function that may assist the supervised neural framework in successfully retrieving relevant features in spectrogram images. In the current study, the STFT techniques generate the spectrogram images [49].The spectrogram images are then labeled based on the glucose levels of the individuals as -1, 0, and 1 based on the contexts of low blood glucose level, normal blood glucose level, and high glucose levels, respectively. The labeled spectrograms are then used to train the model for monitoring the individuals. The spectrogram images of various classes like spectrograms of individuals with low glucose, high glucose, and normal are presented in Figure4.Figure 4
Diagram representing the sample spectrogram images of various classes.The mixed signal is divided into subsignals of various frequency bands using multiresolution wavelet analysis. Signal denoising takes advantage of the wavelet transform’s decomposition and reconstruction steps, breaking down the noisy signal into discrete frequency bands and then removing the high-frequency band containing the noise. To reconstruct a signal, the low-frequency coefficients are utilized. To get an STFT for a signalTsλ, over the window Thλ must be multiplied by the original signal. Fourier transforms may be used to this transformed signal to reveal the frequency distribution across time much more enhanced. The transformed signal is demonstrated through the following equation
(1)Tsω=12π∫−∝∝e−iωtTsλThλ−tdλ.From equation (1), the summation of Fourier base functions is often called Tω, although it is a modified version of the window function. The length of the window Thλ determines overall resolving power in terms of both time and frequency. By incorporating a window to the nonstationarity input, the STFT may be significantly improved. The frequency gains a new temporal dimension with this window. Equation (2) determines the intensity magnitude, assumed as the uniform signal filter bank.
(2)fx,ω=∑y=−∝∝αyωx−ye−sωy.From equation (2), the variables x,ω denote the time and the frequency components. The variable α denotes the associated window function with an interval y which is centered with zero.


## 3.1. Biosensor for Blood Glucose Monitoring

The gadget measures the deposition of the analyte inside a liquid by detecting the existence of both the analyte’s attachment to a protein or molecule. Diverse biosensor categories have multiple binding types and outputs. Still, the two most common include catalytic sensors that detect enzyme reactions and affinity biosensors, which use genes and antibodies for analysis [44]. Blood glucose levels have been associated with glucose concentrations in sweat, saliva, urine, tears, and interstitial fluid, among several other body fluids. Efforts to build wearable biosensing devices that monitor glucose levels in such fluids have yielded encouraging results in recent years [45]. Sweat is a vital substrate for assessing glucose deposits as it has generated passively by most individuals. A single layer graphene-based biosensor capped in gold nanoparticles is being developed to utilize sweat to detect glucose content in the blood.Due to the high accuracy and precision of biosensing applications with glucose oxidase (GOD) has been extensively employed in fabricating glucose biosensors [46]. Gold nanoparticles have a higher surface-to-volume proportion and superior conductivity than most metal nanoparticles. They are considerably more stable, adaptable, and biocompatible than other metal nanoparticles, which has led to their widespread application as immobilizer compounds and electrode modulators. It has also been extensively utilized due to several advantages of load-bearing capacity and better electron conduction. Graphene is the thinnest double-layered carbon substance with a high surface area and phenomenal electrical characteristics.The electrochemical behavior of electrode materials was investigated using differential pulse voltammetry (DPV) and chronoamperometry curve models. It was decided to record all characteristic peaks ranging from -0.1 V to 0.7 V (against SCE) to demonstrate the electrochemical behavior of the charged electrodes. The electrical and chemical reactions of varying amounts of glucose were measured. These curves are further transformed into spectrograms for further processing of the images. Figure3 represents the procedure of acquiring the electrochemical signals and the chronoamperometry curve associated with the glucose levels in the human body, followed by the spectrogram images generated from the curves [47].Figure 3
Diagram representing the process of generating spectrogram images from GOD sensor.


## 3.2. Spectrograms from Real-Time Signal Data

Fourier transform (FT) is the most predominantly used technology for processing signal data in the frequency domain for further processing. However, the FT technique is ineffective when dealing with a nonstationary signal and its temporal content changes [48]. The HR impulses exhibit nonstationarity characteristics when their wavelengths and relative intensities evolve. The signal data is continuous and should be converted to discrete data for further analysis using the machine learning models. The spectrograms are generated for a signal of 5 seconds in duration. The short-time Fourier transform (STFT) is an enhanced version of the FT-based function that may assist the supervised neural framework in successfully retrieving relevant features in spectrogram images. In the current study, the STFT techniques generate the spectrogram images [49].The spectrogram images are then labeled based on the glucose levels of the individuals as -1, 0, and 1 based on the contexts of low blood glucose level, normal blood glucose level, and high glucose levels, respectively. The labeled spectrograms are then used to train the model for monitoring the individuals. The spectrogram images of various classes like spectrograms of individuals with low glucose, high glucose, and normal are presented in Figure4.Figure 4
Diagram representing the sample spectrogram images of various classes.The mixed signal is divided into subsignals of various frequency bands using multiresolution wavelet analysis. Signal denoising takes advantage of the wavelet transform’s decomposition and reconstruction steps, breaking down the noisy signal into discrete frequency bands and then removing the high-frequency band containing the noise. To reconstruct a signal, the low-frequency coefficients are utilized. To get an STFT for a signalTsλ, over the window Thλ must be multiplied by the original signal. Fourier transforms may be used to this transformed signal to reveal the frequency distribution across time much more enhanced. The transformed signal is demonstrated through the following equation
(1)Tsω=12π∫−∝∝e−iωtTsλThλ−tdλ.From equation (1), the summation of Fourier base functions is often called Tω, although it is a modified version of the window function. The length of the window Thλ determines overall resolving power in terms of both time and frequency. By incorporating a window to the nonstationarity input, the STFT may be significantly improved. The frequency gains a new temporal dimension with this window. Equation (2) determines the intensity magnitude, assumed as the uniform signal filter bank.
(2)fx,ω=∑y=−∝∝αyωx−ye−sωy.From equation (2), the variables x,ω denote the time and the frequency components. The variable α denotes the associated window function with an interval y which is centered with zero.


## 4. Deep Learning Model Based on Finetuned AlexNet for Spectrogram Classification

The spectrogram images are being processed using the AlexNet model for assessing the possibility of abnormality based on the sensor signal attached to the individual’s body. The spectrogram images are trained to the AlexNet model, making predictions based on the trained data. The AlexNet architecture is the most extensively used to handle image classification tasks. The network comprises five tiers, each of which contains a blend of five convolutional and three max-pooling, followed by three fully connected layers that assist in recognizing the features at the most acceptable level. ReLU activation is used in each of the convolution layers. To prevent overfitting in the training phase, the architecture includes dropout layers. Dropout layers are used to prevent overfitting during training. There is no forward or backpropagation for neurons that have been “dropped out” of the network. The first two fully-connected levels include dropout components. The layered architecture of the proposed finetuned AxelNet model is presented in Figure5.Figure 5
The layered architecture of finetuned AlexNet for spectrogram image classification.When using AlexNet, dropout is employed to limit the level of overfitting [50]. This is accomplished by stopping the model’s training process, neurons, with a particular probability, reducing the dependency on local nodes, and increasing the generalization capacity of the model [51]. Rather than the standard sigmoid and tanh functions, AlexNet employs a rectified linear activation function (ReLU) as its activation function. ReLU not only significantly increases the training speed of a network but it is also efficient in handling the issue of vanishing gradient and gradient explosion, making it possible to train a deeper network with better accuracy [52]. The network parameters for finetuned AlexNet are presented in Table 3.Table 3
Details of the network parameters associated with finetuned AlexNet.
ComponentKernel sizeStrideOutput tensorPadInput image227×227×3Conv_layer_111×11×3455×55×960Pool_layer_13×3227×27×960Conv_layer_25×5×48127×27×2562Pool_layer_23×3227×27×2560Conv_layer_33×3×384113×13×3841Conv_layer_43×3×384113×13×3841Conv_layer_53×3×256113×13×2561Pool_layer_33×326×6×2560Fully_conn_layer_14096 neurons4096×1Fully_conn_layer_21000 neurons1000×1To be more familiar with the network architecture, the various components like convolution layer, max-pool, fully-connected layer, and softmax used in the network architecture are elucidated in short.(i)
In the convolution layer, filtering an input using a direct convolution leads to activation. A feature map is created while the same filter is repeatedly applied to the same input. Multiple convolutional kernels extract useful features from spectrogram images. Multiple kernels of the same size in a single convolutional layer have been found. Using this approach to concatenate the feature maps produced by various forms of convolution kernels may be thought of as encoding significant features. And then, after concatenating these three layers, the extracted features were subjected to three further convolution layers in succession. The ReLU is the activation function that is associated with the convolution layer of the AlexNet architecture, which is mathematically represented through the following equation(3)fx=max0,x.From the above equation (3), the x is the input value for the ReLU. ReLU is monotonic. For every negative input value, ReLU returns zero and returns the value x for any positive input. As a result, the output ranges from zero to infinity. Table 4 below shows the number of activations and the parameters associated with each convolution layer.
(ii)
Max pooling is often used to subsample the overall width and height of tensors while maintaining the depth of tensors the same as before. Overlapping max pool is the neighboring windows on which the max value is determined to overlap one other. The key benefit of incorporating the max-pool layer is that it achieves a better convergence rate with a greater level of generalization and is resistant to scaling factors. It is associated with every or a group of convolution layers [53]. The equation for the max pool is determined through the following equation(4)maxw=I1⟶f×xmax.Table 4
Details of the parameters associated with the convolution layer of AlexNet.
Size of activationNumber of parametersConv_layer_129040034944Conv_layer_2186624614656Conv_layer_364896885120Conv_layer_4648961327488Conv_layer_543264884992From equation (4) above, the variable f designates the convolution dimension, and the s denotes the stride parameter.
(iii)
Nonlinear combinations of these identified features are learned by feeding the output of the final pooling of architecture into the fully connected layer. The corresponding layer is associated with the neurons accepting the input and matching the appropriate resultant value. Table5 presents the number of activations and the parameters associated with each convolution layer. Let the variable q denote the number of neurons associated with the layer p and the corresponding to Opq over the input ipq is determined through the following equation(5)iqp=∑x=1n−1ωq,xpaxp−1+bqp.(iv)
The softmax layer would assess the probabilities of the input that belong to various classes. The sum of all the probabilities is equivalent to 1. Classification of the input data is based on the class that has the greatest likelihood of being correct. The mathematical formula for the softmax layer is determined through equation (6). In the proposed model, there are three classes of input designated as the low glucose level, standard, and high glucose level(6)σx⟶m=exm∑n=1Nexn.Table 5
Details of the parameters associated with the fully connected layer of AlexNet.
Size of activationNumber of parametersFully_conn_layer_1409637748737Fully_conn_layer_2409616777217From equation (6), the variable xm is the values associated with the input vector. The normalizing factor guarantees all the associated output values of the softmax assessment add to one, resulting in a legitimate probability distribution. The normalization factor is located at the denominator of the equation. The softmax layer consists of activation of size 1000 neurons and 4096001 parameters associated with the layer.


## 5. Methods and Materials

In the current section of the manuscript, the operational flow of the proposed model, along with various methods and the approaches used in the experimental analysis of the model, is discussed. The conventional AlexNet model is being finetuned concerning the feature selection and optimization of the feature weights through the normalized mutual information technique and random oversampling for better model performance. The spectrogram images associated with the blood glucose levels are classified using the finetuned AlexNet. The patients are notified about the abnormal glucose levels, as shown in Figure6.Figure 6
The block diagram of finetuned AlexNet based spectrogram image classification for predicting abnormal glucose levels.


### 5.1. Refining the Feature Map

The ReLU activation function is used at the convolution layer of the AlexNet architecture. The weight initialization and optimization play a significant role in the model’s performance. He et al. [54] initialization is proven to have reasonable efficiency in the weight initialization of the network. The weights are assigned randomly based on the neuron count associated with the previous layer. The weight initialization is performed in the truncated normal distribution zero samples. The standard deviation σ is considered in the evaluation process, presented in equation (7) [55].
(7)σ=2θin,(8)Iω=2θin.Equation (8) determines the initial weight associated with the network’s neurons and the variable θin are the input in the weight map. The initial weight initialization would significantly impact the model’s performance, rather than assigning the initial weight to a random number or zeros like the conventional models. The weights are further optimized over the epochs to yield better performance. Normalized mutual information (NMI) [56] approximates the independence of two variables concerning top the assigned weights and the corresponding class labels. The NMI-based weight optimization can be understood through two parameters, namely, x and y across two instances m and n, respectively, in a databased Db with I instances, where I sum of the instances m and n over the class label Cl. Equations (9) and (10) determine the optimized weights to the corresponding features.
(9)oωx=αx,Clmeanβx,βCl,(10)oωy=αy,Clmeanβy,βCl.


### 5.2. Fine-Tuning the AlexNet Architecture

The model is finetuned for better accuracy and performance concerning the predictions. In the supervised models like AlexNet, the bios associated with the training are normalized using the random oversampling (ROS) [57] that performs data normalization.
(11)ROS=summajorfisumminorfi.From equation (11), the variable fi denotes the spectrogram image dataset used in evaluating the model and the variables majorfi,minorfi denotes the major and minor categories of images in the dataset, i.e., the normal and the abnormal glucose level associated spectrogram images. The imbalance factor ROS=12.27 is scaled down to ROS=2.30 with reasonable learning.An extremely high learning rate would cause neural networks to explode or disappear. By using batch normalization to overcome such issues. It is advisable to normalize network activation to prevent the model parameters from rapidly accelerating or disappearing network gradient. AlexNet classification accuracy has been improved significantly due to mechanizing batch normalization and random oversampling. Batch normalization would assist in improving the training performance of the model, thereby minimizing the training and testing time and making the model robust to initialization parameters. The batch normalization is done before the ReLU activation function concerning the biasb [58]. The normalization process can be better understood from the following equation
(12)p=ωq+b.Now, on performing the normalizing that cancel the associated bias, the resultant normalized equation (13) concerning to normalizer ϱ(13)p=σϱωq.Batch normalizationϱ to eliminate inbuilt covariate shift results in normal distribution over the range with 0 average and 1 variance [59]. Each layer’s input was normalized by determining the previous layer’s mean and standard deviation.


### 5.3. Hyperparameters

The hyperparameters like the training and validation loss measures and similarly. The training and validation accuracy measure are essential in analyzing the network’s performance and determining the overfitting context in the network establishment. A model is said to be overfit when it has learned too much from the training data, including unpredictability, affecting its performance in predicting the appropriate outcome from the validation data. Over the number of epochs, the training loss plot decreases, and also the validation loss plot also reduces to a level and then starts increasing. Underfitting occurs when a machine neither learns from the data nor generalizes well over the validation data. The training accuracy curve may be flat, or else it will have substantial loss values, suggesting that the model failed to learn the training dataset [60]. The performance curves associated with the hyperparameters of the AlexNet are presented in Figure 7.Figure 7
Graph representing the hyperparameters associated with AlexNet model.The conventional AlexNet is finetuned concerning the random oversampling and the batch normalization that better predicts the abnormal glucose level from the spectrogram images. The models are better accurate in classifying them as low and high glucose levels in abnormal cases. The hyperparameters associated with the finetuned AlexNet model are presented in Figure8.Figure 8
Graph representing the hyperparameters associated with finetuned AlexNet model.The learning rate of the model is exceedingly crucial in determining the performance of the model when the learning rate is very minimal, the training process would be comparatively very slow in updating the corresponding network weights, and a high learning rate results in possible diversion from the desired outcome of the objective function. In this context, it is expected to have the optimal learning rate. The learning rate of the AlexNet and the finetuned AlexNet is presented in Figure9.Figure 9
Graph representing the learning rate of the AlexNet and finetuned AlexNet.The model has been trained for 20 epochs, and the learning rate has been progressively improvised from1×10−7 to 1×10−1. The model has shown a reasonable learning competency when the learning is 1×10−2. It can be observed from the learning graphs that the performance of the finetuned AlexNet is comparatively better than the AlexNet model.


### 5.4. Implementation Environment

The proposed technology for alarming the individuals based on the glucose levels is being simulated in the standalone machine. The machine is configured with an Intel(R) Core (T.M.) i7(11th Gen)- CPU@ 4.70 GHz with 16 GB main memory over a 64-bit windows ten operating system. The model is simulated in the Jupiter notebook V6.4.4 environment using the Anaconda package to evaluate the model. Various libraries like PyTorch, sklearn, pandas, and NumPy are being used in the implementation.


### 5.5. Dataset Collection

The data is synthesized from the HR impulses generated based on the glucose levels by the GOD sensors attached to the human body. Short-time Fourier transform is used in generating the spectrogram images. The spectrogram images are then manually labeled as -1, 0, and1 concerning the glucose levels. The labeled images are then trained to the finetuned AlexNet architecture. The model was trained with 600 spectrogram images, out of which 391 images are associated with the normal glucose level (normal GL), 122 images are associated with the high glucose level, and 87 images are associated with the low glucose level of the individuals which are recognized as abnormal glucose levels (abnormal GL). The dataset is divided into 80-20 ratios for training and testing sets of the model, respectively. Figure10 denotes the number of normal and abnormal cases in the spectrogram dataset.Figure 10
Graph representing the instances of normal and abnormal GL in the dataset.


## 5.1. Refining the Feature Map

The ReLU activation function is used at the convolution layer of the AlexNet architecture. The weight initialization and optimization play a significant role in the model’s performance. He et al. [54] initialization is proven to have reasonable efficiency in the weight initialization of the network. The weights are assigned randomly based on the neuron count associated with the previous layer. The weight initialization is performed in the truncated normal distribution zero samples. The standard deviation σ is considered in the evaluation process, presented in equation (7) [55].
(7)σ=2θin,(8)Iω=2θin.Equation (8) determines the initial weight associated with the network’s neurons and the variable θin are the input in the weight map. The initial weight initialization would significantly impact the model’s performance, rather than assigning the initial weight to a random number or zeros like the conventional models. The weights are further optimized over the epochs to yield better performance. Normalized mutual information (NMI) [56] approximates the independence of two variables concerning top the assigned weights and the corresponding class labels. The NMI-based weight optimization can be understood through two parameters, namely, x and y across two instances m and n, respectively, in a databased Db with I instances, where I sum of the instances m and n over the class label Cl. Equations (9) and (10) determine the optimized weights to the corresponding features.
(9)oωx=αx,Clmeanβx,βCl,(10)oωy=αy,Clmeanβy,βCl.


## 5.2. Fine-Tuning the AlexNet Architecture

The model is finetuned for better accuracy and performance concerning the predictions. In the supervised models like AlexNet, the bios associated with the training are normalized using the random oversampling (ROS) [57] that performs data normalization.
(11)ROS=summajorfisumminorfi.From equation (11), the variable fi denotes the spectrogram image dataset used in evaluating the model and the variables majorfi,minorfi denotes the major and minor categories of images in the dataset, i.e., the normal and the abnormal glucose level associated spectrogram images. The imbalance factor ROS=12.27 is scaled down to ROS=2.30 with reasonable learning.An extremely high learning rate would cause neural networks to explode or disappear. By using batch normalization to overcome such issues. It is advisable to normalize network activation to prevent the model parameters from rapidly accelerating or disappearing network gradient. AlexNet classification accuracy has been improved significantly due to mechanizing batch normalization and random oversampling. Batch normalization would assist in improving the training performance of the model, thereby minimizing the training and testing time and making the model robust to initialization parameters. The batch normalization is done before the ReLU activation function concerning the biasb [58]. The normalization process can be better understood from the following equation
(12)p=ωq+b.Now, on performing the normalizing that cancel the associated bias, the resultant normalized equation (13) concerning to normalizer ϱ(13)p=σϱωq.Batch normalizationϱ to eliminate inbuilt covariate shift results in normal distribution over the range with 0 average and 1 variance [59]. Each layer’s input was normalized by determining the previous layer’s mean and standard deviation.


## 5.3. Hyperparameters

The hyperparameters like the training and validation loss measures and similarly. The training and validation accuracy measure are essential in analyzing the network’s performance and determining the overfitting context in the network establishment. A model is said to be overfit when it has learned too much from the training data, including unpredictability, affecting its performance in predicting the appropriate outcome from the validation data. Over the number of epochs, the training loss plot decreases, and also the validation loss plot also reduces to a level and then starts increasing. Underfitting occurs when a machine neither learns from the data nor generalizes well over the validation data. The training accuracy curve may be flat, or else it will have substantial loss values, suggesting that the model failed to learn the training dataset [60]. The performance curves associated with the hyperparameters of the AlexNet are presented in Figure 7.Figure 7
Graph representing the hyperparameters associated with AlexNet model.The conventional AlexNet is finetuned concerning the random oversampling and the batch normalization that better predicts the abnormal glucose level from the spectrogram images. The models are better accurate in classifying them as low and high glucose levels in abnormal cases. The hyperparameters associated with the finetuned AlexNet model are presented in Figure8.Figure 8
Graph representing the hyperparameters associated with finetuned AlexNet model.The learning rate of the model is exceedingly crucial in determining the performance of the model when the learning rate is very minimal, the training process would be comparatively very slow in updating the corresponding network weights, and a high learning rate results in possible diversion from the desired outcome of the objective function. In this context, it is expected to have the optimal learning rate. The learning rate of the AlexNet and the finetuned AlexNet is presented in Figure9.Figure 9
Graph representing the learning rate of the AlexNet and finetuned AlexNet.The model has been trained for 20 epochs, and the learning rate has been progressively improvised from1×10−7 to 1×10−1. The model has shown a reasonable learning competency when the learning is 1×10−2. It can be observed from the learning graphs that the performance of the finetuned AlexNet is comparatively better than the AlexNet model.


## 5.4. Implementation Environment

The proposed technology for alarming the individuals based on the glucose levels is being simulated in the standalone machine. The machine is configured with an Intel(R) Core (T.M.) i7(11th Gen)- CPU@ 4.70 GHz with 16 GB main memory over a 64-bit windows ten operating system. The model is simulated in the Jupiter notebook V6.4.4 environment using the Anaconda package to evaluate the model. Various libraries like PyTorch, sklearn, pandas, and NumPy are being used in the implementation.


## 5.5. Dataset Collection

The data is synthesized from the HR impulses generated based on the glucose levels by the GOD sensors attached to the human body. Short-time Fourier transform is used in generating the spectrogram images. The spectrogram images are then manually labeled as -1, 0, and1 concerning the glucose levels. The labeled images are then trained to the finetuned AlexNet architecture. The model was trained with 600 spectrogram images, out of which 391 images are associated with the normal glucose level (normal GL), 122 images are associated with the high glucose level, and 87 images are associated with the low glucose level of the individuals which are recognized as abnormal glucose levels (abnormal GL). The dataset is divided into 80-20 ratios for training and testing sets of the model, respectively. Figure10 denotes the number of normal and abnormal cases in the spectrogram dataset.Figure 10
Graph representing the instances of normal and abnormal GL in the dataset.


## 6. Results and Discussion

The performance of the proposed model is being evaluated against the ground facts associated with the spectrogram images. The proposed finetuned AlexNet model is being evaluated using the true positive, true negative, false positive, and false negative measured for the prediction made by the model. The metrics like sensitivity, specificity, precision, and recall are determined based on the evaluations [61]. The correct prediction of the normal GL correctly is considered true positive, and appropriate identification of abnormal GL is regarded as true negative. Similarly, the misinterpretation of abnormal GL as normal GL is considered false positive, and misinterpretation of normal GL as abnormal GL is regarded as a false negative. The assessments are made on the AlexNet and finetuned AlexNet models independently, and the performances are evaluated accordingly. The confusion matrix associated with the predictions is presented in Figure 11.Figure 11
Confusion matrix associated with AlexNet and finetuned AlexNet.It can be observed from the above confusion matrix that the proposed finetuned AlexNet model performance is better than the AlexNet alone. The assessed values are used to approximate the metrics like sensitivity, specificity, precision, and Mattews correlation coefficient (MCC) presented in Table6. The corresponding graphs generated concerning the performance metrics are presented in Figure 12.Table 6
Presents the obtained values of various performance evolution metrics.
SensitivitySpecificityPrecisionAccuracyMCCF1 scoreAlexNet0.8240.5470.8240.7460.3710.824Finetuned AlexNet0.8260.7250.9250.8060.4840.873Figure 12
Graphs representing the performance of the finetuned AlexNet model.The performance of the finetuned AlexNet is more reasonable than the convention AlexNet model for all the metrics. Random sampling would reduce the error factor in the data. Every record has an equal chance of being selected, which would assist in finetuning the hyperparameters that yield a better classification performance. The performance of the proposed model is being further evaluated against the other existing models for the prediction of type-2 diabetes from the tabulated data like the Pima dataset and the Luzou datasets from the other existing state of art models [62, 63]. The proposed model has outperformed metrics like Precision, Sensitivity, Specificity, and Mathews Correlation Coefficient measures. The performance analysis with other existing models is presented in Table 7.Table 7
Presents the performance analysis of the proposed model with other state-of-art techniques.
ApproachDatasetSensitivitySpecificityPrecisionMCCRandom forest [55]Pima0.7050.723~0.429Random forest [56]Pima0.7890.6610.8400.436Logistic regression [56]Pima0.7750.6660.8560.416K nearest neighbour [56]Pima0.7480.6030.8330.331Decision tree [56]Pima0.7810.5610.7440.762J48 [55]Pima0.7380.695~0.435Neural network [55]Pima0.7380.756~0.496Naïve Bayes [56]Pima0.8200.6870.8400.502Support vector machine [56]Pima0.7750.6660.8560.416Logistic regression [57]Pima0.5560.820~~Naïve Bayes [57]Pima0.6660.776~~Random forest [55]Luzhou0.7430.735~0.479J48 [55]Luzhou0.7340.744~0.477Neural network [55]Luzhou0.7370.745~0.482Finetuned AlexNetImages0.8260.7250.9250.484The performance of the proposed finetuned AlexNet model can be observed in Table7. The proposed model has outperformed compared to the other existing ensemble classifiers. In the relative analysis of the performance, the proposed model has experimented on the spectrogram images generated from the glucose signal obtained from the GOD sensors with the tabular datasets like Pima and Luzhou. In the current work, the model is focused on working on the grounds of real-time glucose levels of the individuals. Moreover, when comparing them with the other state-of-art techniques, the predictions’ sensitivity and precisions are more effective. Such real-time is more desired to work in the AAL environment, which can precisely alarm the caretakers about the condition of the individuals promptly.The other most predominantly used performance evaluation metrics, like the receiver operating characteristic curve (ROC curve), evaluate the classification model’s performance. The ROC curves take true positive rate and false positive rate into account. The ROC curves associated with the AlexNet and finetuned AlexNet are presented in Figure13.Figure 13
Graphs representing the ROC curves of AlexNet and finetuned AlexNet model.It can be analyzed from the ROC presented above, the performance of the finetuned AlexNet is reasonably fair and much better than the AlexNet model. Cross-validation (CV) is one of the various performance evaluation metrics for classification problems that work by splitting the data into multiple folds and ensuring every fold is utilized as a testing set. The single value parameterK refers to how many groups each test data sample should be divided into for validation, i.e., the number of folds. Thus, it is known as k-fold cross-validation. The values obtained on evaluating the model over the multiple folds are presented in Table 8, and the corresponding graphs are shown in Figure 14.Table 8
Cross validation performances of the AlexNet and finetuned AlexNet.
Value ofkAlexNet modelFinetuned AlexNet model20.7140.77950.7260.795100.7470.816Figure 14
Graphs representing the crossvalidation of AlexNet and finetuned AlexNet model.The value ofK has been evaluated at 2, 5, and 10, respectively. It can be observed from the values presented in Table 8, the performance of the models has consistently improved over the number of the fold of data samples used in the evaluation process. The finetuned AlexNet has exhibited a better classification performance over the conventional AlexNet model at multiple folds of evaluation.


## 7. Conclusions

An increasing number of researchers are influential in the outcome and use of assisted living systems for various purposes. They can help cut the price of everyday health assistance for senior citizens and monitor the overall health of those who live alone. The proposed technology for continuously monitoring diabetic patients for better treatment and livelihood has exhibited a reasonable efficiency in identifying the patients with abnormal glucose levels assisting the caretakers in timely treatment. Finetuned AlexNet has shown a reasonable performance in identifying the individuals with abnormal glucose levels from the spectrogram images generated based on the glucose concentrations in sweat. The biosensors continuously monitor the glucose levels and alarm the caretakers during abnormal conditions. The AlexNet model for classifying the abnormal cases based on the spectrogram images evaluated over various metrics like sensitivity, specificity, precision, and MCC. It is observed that the finetuned model has outperformed the conventional AlexNet model. The performance of finetuned AlexNet is better than the AlexNet model concerning the ROC curves and cross validation-based evaluations.Various algorithms have yielded better accuracy in analyzing the spectrogram images and outperformed the AlexNet model. In the current study, due to the availability of the smaller dataset, the performance of the supervised learning models is compromised. In such a context, the performance of the proposed technology can be further improvised by incorporating reinforcement learning and self-learning models. The precision of the signal data observed through the GOD sensors is challenging, and the appropriateness of the spectrogram images transformed from the frequency domain to the spatial domain leads to the loss of sensitive data. Hence, it is desired to deploy a model that can yield lossless data insights for better performance.



---

*Source: 3169927-2022-04-19.xml*