key: cord-0822941-169h0xts authors: Mehdi, Hamid; Zarrabi, Houman; Khadem Zadeh, Ahmad; Rahmani, Amir Masoud title: A flexible energy management approach for smart healthcare on the internet of patients (IoP) date: 2022-01-21 journal: J Supercomput DOI: 10.1007/s11227-021-04240-2 sha: 30be2b83f24294a62ac7e56b81e3788ebabd7b9a doc_id: 822941 cord_uid: 169h0xts Considering the importance of biosensors on the Internet of the patient body that collect vital signs and transmit them to the coordinator, energy consumption and network lifetime are essential challenges in these networks. This paper, it has been tried to present a method based on adapting sampling rate through patient’s risk and discovered pattern by employing an intelligence method based on adaptive neuro-fuzzy inference system, interpolation function, and a biosensor patron. It causes restricting sensed and transmitted data to the coordinator. In the proposed schema, three methods containing Grid partitioning, Subtractive Clustering and fuzzy c-means have been used in two modes, including hybrid and error backpropagation, to predict the individual’s behavioral pattern and determine the patient's risk, attentively. The simulation results in MATLAB R2018b show that the proposed method reduces the network communications. It has improved energy consumption by up to three times and also reduced traffic by more than 80% compared to similar methods. Today, one of the most critical issues is to increase life quality and preserve it; therefore, monitoring patients and elderlies constantly is a serious issue in smart life. Thus, monitoring patients remotely has been proposed as a solution to monitor vital signs for controlling health better and offer treatment services in emergency cases. Nowadays, with the outbreak of the Covid-19 virus, the importance of using Internet of patient (IoP) has increased. Many medical centers in different countries are not able to treat huge number of patients. Consequently, patients who do not have an emergency condition are advised to take care of themselves at home and refer to medical centers if serious problems occur. Since many patients of Covid-19 are hospitalized at home, it is important to constantly monitor and check the vital signs of these patients. The main reason behind the matter is that the virus can turn a patient's normal condition into an emergency in a very short time. On the other hand, the symptoms of Covid-19 are determined by monitoring the body temperature, respiration rate and the amount of blood's oxygen level. In many patients, the disease begins with a change in body temperature, as well as a decrease in oxygen levels and changes in respiration rate. Also, the most serious problem that can occur to patients is severe respiratory problems [1, 2] . As a result, continuous monitoring and receipt of these symptoms are essential for smart health monitoring. The main parameter for Covid-19 patients is the monitoring of their breathing rate. If they have difficulty in breathing, they should seek immediate medical attention. An IoP, which is a subset of Smart wireless biosensor, is used to monitor patients and receive their health information, continuously. These networks collect and analyze vital signs (data like heart rate, blood pressure and respiration rate) by employing various biosensors placed in different parts of the body. These networks are usually used to monitor houses to take care of elderlies to prevent unnecessary housing in hospitals and reduce healthcare costs [3] . Patient monitoring includes the periodic transmission of vital signs and issuing related alarms if they exceed a threshold. It is assumed that a network of biosensors is placed on the patient's body. Biosensors transmit the information to a coordinator; the coordinator might be placed on the body or close to it. The coordinator is used to integrate and transfer the collected data and decide to the sink node. After collecting data in the sink, the received data by the sink would be sent to the healthcare monitoring center for final processing [4] . There are many challenges regarding IoP, including energy expenditure resulting from periodic data transmission and also a large volume of the data read by the biosensors and transmitting them to the coordinator. Notably, the energy of the biosensors is minimal. To improve energy consumption, sometimes the activity of biosensors can be neglected by prevention to transmit data to the coordinator. This paper presents a solution to this problem which is described in the following. Firstly, it has been tried to present a method to identify the daily activities of the individual using ANFIS. The discovered patterns are selected based on the duration of the activities and the number of repetition of the activities. The main purpose of identifying behavioral patterns is to determine the set of activities that are in the same class. Every class includes a set of activities, which duration of activities based on time and number of repetitions are in specified bound. Then a class of discovered patterns with low priority (third class) would be determined for the proposed method. The main reason behind the matter is that the patient's behavior in this class is considered less than other classes when biosensors do not sense any vital signs, no any dangerous situations will happen for the monitored person. In the following, a special biosensor is used; after detecting a behavioral pattern of the individual, a person's activity is recognized. If the recognized activity does not exist in the discovered pattern, the biosensors switch into sleep mode whereas the special biosensor operates with maximum possible sampling rate. It should be noted that the number of communicated data is reduced in this step. In the following, if an emergency occurs in the vital signs, the special biosensor warns the other biosensors and the other biosensors operate with maximum sampling rate. After reading the vital sign data, the values are initialized by national early warning scoring system (NEWS) based on two categories (normal or emergency) that are transmitted to the coordinator. In this phase, the transmitted data and network traffic are reduced in parallel with reducing the energy consumption of the active sensors. The strategy causes increasing the network lifetime, as well. Calculating patient's risk using ANFIS is the main part of the system structure, and this is a significant factor in determining sampling rate. The proposed structure ( Fig. 1 ) includes ANFIS classification for activities and condition of patient in step 1 and the daily activity patterns and the sampling rate in step 2 and after that in step 3 are determination risk of patient and also daily activity patterns and finally adapting sampling rate has been set. In this paper, we present an effective adaptive model for energy management in IoP, which operates with low number of communicated data, high amount of data integrity, low amount of network traffic, low amount of energy expenditure and appropriate network lifetime. Our approach is an efficient algorithm for promotion Fig.1 Proposed system structure of biosensor sampling rate based on determining risk of patient and discovered patterns. In the first part of our approach, we employ ANFIS to find activity patterns and determine risk of patient. Besides, we present sensing vital signs SVS using the NEWS which is divided into two parts (normal and emergency), patron biosensor and discovered patterns to reduce network communications and traffic to promote network lifetime. In the following, we present an algorithm management sensing vital signs (MSVS) to estimate sampling rate of biosensors using risk of patient and hermit function. Hence, the core contribution of the proposed method is summarized as follows: • Determination the patient's risk in order to determine the sampling rate using ANFIS • Determination the behavioral patterns of individuals using ANFIS for classification • Adjusting the sampling rate in order to reduce network traffic by a hybrid algorithm of the above methods and interpolation functions • We present a patron biosensor to protect the patient's health when other biosensors are inactive and the patron biosensor operates at the maximum sampling rate by calculating the patient's received symptoms We index the rest of this article as follows. In Section II, we first give a generalized review of the previous works. After that, we present research tools and techniques in Sect. 3. And also in Sect. 4 entails our suggested methodology description. The evaluation of our solution is in Sect. 5. Finally, we present a conclusion of our work and some notes for future works in Sect. 6. One of the main matters in IoP is management of biosensors energy. Nowadays, adjusting the sampling rate of biosensors is studied for saving energy ( Fig. 2 and Table 1 ). A number of authors in some works [5] [6] [7] believe that to achieve at high accuracy in obtaining information, it is not necessary that the biosensors operate with a high sampling rate. In [3] , to reduce energy consumption and data traffic, a technique has been presented to monitor and evaluate healthy situations of the patient. In this method, the patient is monitored constantly and all changes in the vital signs are detected. The patient's risk is determined with a parameter with values between 0 and 1. The closer it gets to 1, the more urgent the situation. Then, patient's state (heart rate, blood pressure, and respiration rate) is determined by the early warning system (EWS). Then, data fusion is performed based on fuzzy inference systems that results the best decision for the patient. In [4] , a data management framework has been proposed for data collection by the sensors so that the energy consumption of the sensors is reduced in parallel with network connections and network traffic. First, an adaptive data collection approach has been presented. This method uses the early warning system (EWS) for optimizing data transmission and estimation of real values of vital signs. After that, the data fusion model has been employed in the coordinator using the decision-making matrix and fuzzy set. Authors of [8] have studied the relationship between the accuracy of the read data and energy consumption. In this study, time has been investigated. In [8] , a sampling threshold for data accuracy has been suggested. It has also been suggested that a sampling rate less than the mentioned threshold decreases accuracy significantly [8] . Therefore, the sampling rate should be selected such that energy of sensors is saved in parallel with high data accuracy. Furthermore, the authors of [9] have tried to obtain an optimal relationship between energy consumption and time delay. In this paper, an algorithm has been presented that investigates users' status while the biosensor and using an activity detector for calculating the proper sampling rate for reducing energy consumption. In [10] , a novel study has been presented using activity detection with a low sampling rate to reduce energy costs. On the other hand, in [11] , a novel algorithm namely AdaSense has been presented which investigates a set of features using the genetic method and studies a set of optimal features that reduce the sampling rate. In addition, the presented algorithm operates at lower sampling rates compared with constant rates (4 constant sampling rates (5 Hz, 16 Hz, 50 Hz and 100 Hz)). Another method to increase the network lifetime is to reduce data transmission rate. In the recent years, various data fusion techniques have been presented according to compressed sampling [12] [13] [14] [15] [16] . In [16] , data collection using compressed sampling has been presented for compressing data in IoP. In [17] , compressed data fusion based upon compressed sampling has been presented aiming at reducing communication costs and increasing network lifetime in large scale biosensor networks. In [18] , a set of rules has been used to denote the sampling rate of the biosensors, adaptively. However, in the mentioned study, reducing the sampling rate has not been considered. In [19] , low sampling rate has been performed during recognizing the speaker. When the voice of the speaker is recognized, sensors switch to the high sampling rate. Similarly, the proposed scheme in [20] allows the sensors to operate with a high sampling rate when an abnormal event occurs. If there is no abnormal event, the sensors operate with a low sampling rate. However, in both methods, different sensors are used for low and high sampling rates. The main drawback of these methods is their limitations in response to normal/abnormal events. In general, there are a few studies on employing compressed sampling theory and clustering-based routing in WSNs [21, 22] . Authors of [23] have presented a system that helps to find heart rate disorders and drug consumption by the patient using the Bayesian algorithm. The above study suggests that it is required to take care of the patient in the hospital which minimizes delays in offering healthcare services to the patients. This kind of studies focus on offering services and reducing time, while other parameters of these networks should be considered, simultaneously. In [24] , data sampling based on audio signal compression and reconstruction has been used in WSNs to reduce energy consumption and network overhead. Sun et al. [25] proposed a random sampling method that has been used to collect data based on compression and clustering. In this work, it has been tried to employ some strategies to control the sampling rate such that energy consumption and network traffic are reduced, as well. In [26] , determining the sampling rate in IoT based networks has been discussed. In this paper, the authors has tried to present a scheme to control the sampling rate of the sensors that cover an environment based on the number of transmitted packets; its results demonstrate reducing the network overhead in parallel with increasing data precision, as well. In [27] , it presents a method based on the Libelium smart environment for Internet of thing. It has been suggested an expanded User-Driven Adaptive Sampling Algorithm (UDASA) to manage energy consumption between IoT devices versus the data precision. Since the main goal of sampling rate is reduction energy consumption while data integrity keeps. In [28] present a new method based on an optimized uniform and adaptive sampling method. In [29] proposes a low-cost adaptive mechanism for sampling and censorship on diffusion networks that uses more node information when network error is high and otherwise uses fewer nodes. It offers rapid convergence over transients and important reduction in computational cost and steady-state energy consumption. In all the presented studies, one of the main challenges is that all the sensors and biosensors capture data when the status of patient is normal while data capturing operation can adaptively be adjusted according to the current situations. Therefore, as mentioned in the rest of the paper, the proposed approach employs pattern discovery as a solution for this problem. After detecting and observing the individual's behavioral pattern in the set of pattern discovery, all biosensors would be active; but in the other individual's activities, just one biosensor would be active to capture and transmit vital sign data to the coordinator. This technique leads reducing the number of transmitted data in parallel with decreasing network traffic and energy expenditure of the biosensors, as well. On the other hand, many different types of researches [30] [31] [32] [33] have been published on adapting the sampling rate, but all of them have always considered the patient's condition as a fixed parameter which is determined by a medical expert. Also, in [30] [31] [32] [33] to save energy, the amount of communicated data has been reduced by examining the behavioral patterns, but a suitable solution for determining the behavioral patterns of the monitored patient has never been suggested. Authors in their suggested algorithms [30] [31] [32] [33] have also used a sensor called pivot sensor to constantly monitor the patient when other sensors are inactive. The pivot is required to monitor just one feature of the patient such as blood pressure. However, the patient may not have high blood pressure and the disease may be due to an increase or decrease in respiration rate or fever (such as Covid-19). There are some important tools and techniques as the basic of suggestion approach including: ANFIS, NEWS and some concept such as activity recognition, pattern discovery and risk of patient. The first tool is ANFIS (Adaptive Neuro-Fuzzy Inference System). With the introduction of fuzzy theory to describe complex systems, this logic became very popular and has been used in various problems. The main problem with fuzzy logic is that there is no time evolution process for designing a fuzzy controller. In other words, the neural network has the ability to learn from the environment, to organize its structure and to adapt its interaction in a way. For this purpose, Jang et al. [35] presented the ANFIS model ( Fig. 3 ) which has the ability to combine the capabilities of two methods. ANFIS has good capabilities in training, construction and classification and also has the advantage of allowing the extraction of fuzzy rules from numerical information or expert knowledge and making a comparative rule. In addition, it can regulate the complex conversion of human intelligence to a fuzzy system. ANFIS is an adaptable and teachable network that is quite similar in function to the fuzzy inference system. Suppose our fuzzy system has two inputs x and y and its output is z. Also, the rules are as follows: And if we use the average centers for the non-fuzzy generator, the output will be as follows: The equivalent structure of ANFIS is as following: Layer 1: In this layer, inputs pass through membership functions. Membership functions can be a parameter that in most cases Gaussian functions are selected Such as the bell function: where a, b and c are a set of parameters. The parameters of this layer are known as premise parameters. Layer 2: Output of this layer is the multiplication of the input signals, which is actually equivalent to the part of the if-then rule. Layer 3: The output of this normalized layer is the previous layer: (1) [35] Layer 4: Layer 5: The output of this layer is the overall output of the system: A network has now been developed that is equivalent to the Sugeno fuzzy inference system. To check the amount of error in ANFIS models, it has been used statistical test. In fact, the purpose of using statistical tests is to estimate the amount of error in calculations and also to determine the structure that has the least amount of error in predicting behavioral patterns and patient's risk. The statistical tests used in this research are: Another main tool is national early warning scoring System (NEWS). In fact, the NEWS is a guide that can be used by the staff of the emergency room staff of the hospitals to determine the emergency degree of the patient status. NWES is used as a protocol for measuring physiologic parameters in patients for the early detection of people with acute diseases [34] . A healthy range is defined for each vital sign. The values outside this range are weighed and coded based on deviation from the normal range. The weight shows the intensity of physiologic disorders. Figure 4 shows NEWS which is used in the proposed algorithm. Next section describes the way by which NEWS is employed in the proposed algorithm for emergency detection. On the other side, there are three matters include activity recognition, pattern discovery and risk of patient. Activity detection operation is done to identify the activities performed by a human being. In activity detection operation, various activities such as walking, eating, running, sitting, sleeping, bathing, showering, cooking, opening and closing doors, and other normal behaviors are detected. The data needed for these diagnoses are collected by wearable biosensors or a variety of accelerometers. Activity diagnosis is widely used in medical care. For example, activity detection can be considered to take care of elders. In addition to recognizing the activity, discovering each person's behavioral pattern is also very important. A person's behavioral pattern is a set of behaviors that have had the most repetition in a period of time. Patient risk is a very effective parameter in displaying patient situations and is used in predicting the sampling rate. Patient risk (r) is a number which value is defined as a number between 0 and 1 corresponding to low and high risk in this range. The larger the value from 0.5 and closer to 1, the greater the patient risk while the smaller the number less than 0.5 and closer to 0, the lower the patient risk. For example, all elderly people who are in good physical health and are kept at home are excluded from this group of patients. Furthermore, the second group includes the patients who because of some reasons have emergency situations and need constant monitoring and care. In this article, using ANFIS, we diagnose the patient's condition based on vital signs. The main process of the suggested approach (Fig. 1) is to reduce the number of communicated data by proposing an adaptive sampling rate determination strategy. Therefore, firstly we present a method to forecast and classify daily activity patterns and then we introduce our new ANFIS-based method to predict the risk of patient aiming at increasing the accuracy of the monitored patient, as well. In the next step, we present our third algorithm (algorithm 3) which is based on daily activity patterns and executes on biosensors to reduce number of communicated sensed vital sign data. After that, algorithm 4 is introduced which uses Hermite interpolation function and risk of patient for adapting the sampling rate. Two features have been used in classifying individual activities. These features are related to the duration and number of performed activities. In all implemented models, 90% of the data is the training data, and the rest of them (10%) are the test data. According to the available data, three types of classes can be identified for individual activities, which are as follows: 1-T1P1Class: The amount of individual activities is very high 2-T1P2, T2P1, P2T2 Classes: The average individual activities 3-T1P3, T2P3, T3P1, T3P2, T3P3 Classes: The low level of individual activities According to dataset, the larger the index of the P and T indices, the duration and the number of activities are large. The classification is done on the last update (2018), Aruba daily life 2011-2012 datasets were collected in the CASAS smart home, a project of WSU (Washington State University), with full-time inhabitants [36] . Aruba is a dataset in the smart home using IoP. Aruba scenario has a kitchen, a living room, a garage, an office, two bedrooms, two bathrooms, a pantry, a dining area and a backyard. Grid partitioning, sub-clustering and FCM models have been used to predict the individual's behavioral pattern using ANFIS. For each model, two modes are used, including hybrid and error backpropagation. Modeling an individual's behavioral pattern using grid partitioning in the ANFIS model is shown in Fig. 4 . In this method, two modes of hybrid and backpropagation are used. For each of the cases, 10 classes are hypothesized to predict the individual's behavioral pattern in the so called model. The number of rules obtained for this method was about 30 rules. The correlation coefficient (R), MSE and RMSE values were used to determine the accuracy of the model in predicting the behavioral pattern. Also, considering the duration of activity as the first input and the number of repetitions of activity as a second input, the pattern of behavior as the output of the model in the three-dimensional mode is shown in Fig. 4 . According to Fig. 4 , the backpropagation model has less error than the hybrid model in the test data during predicting the behavioral pattern. The model of the individual's behavioral pattern using the subtractive method in the ANFIS model is shown in Fig. 5 . In this method, two modes including hybrid and error backpropagation are utilized. For each of the cases, a radius is considered about 0.01, and the number of rules of this model was 50. According to Fig. 5 , the hybrid model for radius 0.01 has less error than the backpropagation model error in the test data to predict an individual behavioral pattern. To make this mode efficient, the radius has been increased to 0.3. In this model the number of rules increases three times (Fig. 5c, d) . In this method, both hybrid and error backpropagation modes were used. According to Fig. 5 , the hybrid model for radius 0.3 has less error than the backpropagation model error in the test data to predict behavioral patterns. In general, by reducing the radius of reduction of the rules, the error rate in the Subtractive method is reduced. Finally, the FCM method is used to model the behavioral pattern. In this method, two modes are presented, including hybrid and error backpropagation. For each case, 10 classes are hypothesized to predict the pattern of the behavior. The values of R, MSE, and RMSE have been used to determine the accuracy of the prediction model. Also, considering the duration of the activity as the first input and the frequency of its repetition as the second input, the behavioral pattern as the output of the model in threedimensional mode can be seen in Fig. 6 . Based on Fig. 7 , in the FCM method, the hybrid model for 10 classes has less error than the backpropagation model error in the test data to predict an individual behavioral pattern. As can be considered in the hybrid model, the efficiency of this method is also suitable. And also, in the FCM method, the hybrid model has less error than the backpropagation model error in the test data to predict an individual behavioral pattern. The general results of the three models with different modes are given in Table 2 . According to the results, it is clear that among the various models for predicting (Table 2 ) and the lowest amount of error (Table 2 ) has the highest value of accuracy. Table 2 illustrates the correlation coefficient rate for each of the performed methods. As can be seen in the diagram, in the Hybrid mode, the FCM method is more accurate and based on Table 2 , obviously this method has less error than other methods. Finally, considering that the FCM method was determined as the best method, the individual's behavioral pattern is determined according to the classification of Table 3 . It has been preferred to select the last category (Other activities). The main reason behind the selection is choosing the type of activities that have less duration and number of repetitions. It means the patient performs this class of activities less than other classes. Table 3 shows the output of the proposed model. Algorithm 1 represents the steps of predicting and discovering behavioral patterns. Four features have been employed to predict the patient's risk. These four characteristics that are well considered by the NEWS include blood pressure, oxygen level, and temperature and respiration rate. In the proposed method, by utilizing ANFIS, the patient's condition is examined and the patient's risk is predicted. Predicting the patient's risk allows us to determine more accurate sampling rates based on the individual's vital signs. As mentioned in the related works, in many previous studies, the patient's risk is a constant number initially determined by a medical expert. We utilize grid partitioning, subtractive clustering and FCM models in ANFIS to forecast the patient's risk. For each model, two modes (hybrid and error backpropagation) are used. In all implemented models, 90% of the dataset are assumed as the training data while remaining 10% are considered as the test data. The NEWS table is used to obtain the classifications listed in Table 4 . According to the available data, four different classes can be identified for patient's risk that is listed as following: 1-R0 Class: The patient's risk is very low and the patient's condition is excellent. 2-R1 Class: The patient's risk is low and the patient's condition is good. 3-R2 Class: The patient's risk is high and the patient's condition is poor. 4-R3 Class: The patient's risk is very high and the patient's condition is very bad. In general, increasing the value of the R index means that the patient's risk is more urgent. Due to the importance of patient risk diagnosis and prediction by ANFIS, Grid partitioning, Sub Clustering and FCM models have been performed on various datasets including Dataset1 and Dataset2 (Figs. 8 and 9 ). For each model, two modes namely hybrid and error backpropagation are used. Also, to determine the accuracy of the models, the values of R, MSE and RMSE statistical tests were utilized. In order to check suggestion method, we use two datasets. The main reason behind the matter is that we get more detail information about suggestion method and its performance. Dataset 1 contains 150 data samples about the patient's risk that are between 0 and 1. 10% (15 samples) of the data are considered as the test data while 90% (135 samples) are considered as the training data. Dataset 2 also contains 200 samples of patient risk data, 10% of the dataset (20 samples) are considered as the test data while 180 samples are considered as the training data. Grid partitioning method is the first evaluated method. This modeling shows the risk of patient in Fig. 10 . Two modes including hybrid and backpropagation are used in this method. According to Fig. 10 , the error backpropagation model has less error than the hybrid model in test data during patient risk prediction. Then, with increasing the number of samples, the patient's risk is re-examined. The number of samples in the second study was 200. Figure 10a and Fig. 10b represent the error backpropagation method on both datasets, and also Fig. 10c and Fig. 10d represent the hybrid method on both datasets. The results show that in the grid partitioning method, the R value (Fig. 11 ) of the backpropagation method is higher than the hybrid and the error of the backpropagation method is less than the hybrid model in test data during patient risk prediction. Figure 11 shows the correlation coefficient for the grid partitioning model. Figure 11a , b show the correlation coefficient of test data for the Dataset 1, while Fig. 11c , d illustrate the correlation coefficient of the test data for the Dataset 2. As can be seen from the R values in this model, the R value for the error backpropagation model is higher compared to the hybrid model. In the following, Fig. 12 shows the patient risk model performed by subtractive clustering method in the ANFIS model using (Figs. 12 ), the hybrid model for radius 0.55 has less error than the backpropagation model error in the test data to predict patient risk. Figure 12a , which is related to the Dataset 1, represents the patient's risk and prediction process made by subtractive clustering with a hybrid model while Fig. 12b shows the same prediction with the backpropagation model. On the other hand, Fig. 12c , d are related to the Dataset 2 and corresponding to the hybrid and backpropagation models to the test data with a radius of 0.55. In general, the error rate in the subtractive method with the hybrid model is less than the backpropagation model. Figure 13 represents the correlation coefficient for the subtractive clustering model. Figure 13a , b are related to the correlation coefficient of the test data of dataset 1, while Fig. 13c , d show the correlation coefficient of the test data of the dataset 2. As it is clear from the R values in this model, the amount of R related to the hybrid model is more than the error backpropagation model, which determines the superiority of the hybrid model in this method. In the last simulation (Fig. 13) , the FCM method is used to model patient risk. In this method, both hybrid and error backpropagation modes are used. The R, MSE and RMSE values have been used to determine the accuracy of the prediction model. Based on the obtained results and according As can be observed in the hybrid mode, the efficiency of this method is also acceptable. This method employs both the hybrid and error backpropagation modes. Figure 15 shows the results of correlation coefficient plot for the FCM model. Figure 15a , b represent the correlation coefficient of the test data of Dataset 1, while Fig. 15c , d show the correlation coefficient of the test data of Dataset 2. As can be observed from the R values in this model, the amount of R related to the hybrid model is higher than the error backpropagation model which determines the superiority of the hybrid model in this method. Figure 16 shows the patient risk prediction by grid partitioning method with error backpropagation model (Fig. 16a-c) and hybrid model (Fig. 16b-d) with two datasets 1 and 2. As mentioned in the correlation coefficient issue, in this method, the R amount of the backpropagation error model is higher than the hybrid model. Therefore, it will have a more favorable prediction. In the following, different predictions results with the subtractive clustering method can be observed in Fig. 17 . In this method, unlike the grid partitioning method, the amount of R in the hybrid model is more than the error backpropagation model and as a result, predicting the hybrid model in this method will have a more favorable result than the backpropagation model. Figure 17a , c show the patient's risk prediction with the error backpropagation model for datasets 1 and 2 while Fig. 17b , d illustrate the patient's risk prediction with the hybrid model. Figure 18 shows the FCM risk of patient prediction with error back propagation model (Fig. 18a-c) and hybrid model (Fig. 18b-d) with two datasets 1 and 2. As mentioned in the correlation coefficient issue, in this method, the R value of the backpropagation error model is higher than the hybrid model but the error of the hybrid model is less, thus it will have a better and more accurate prediction. According to the results (Table 5) , it is clear that among the various models for predicting risk of patient, the hybrid model in the FCM method with the highest R (0.98) and the lowest error (1.96) has the highest accuracy. Finally, in the FCM method, the patient's risk level is generated as a number between 0 and 1 according Table 4 and the effective factors in this prediction. When the value of risk of patient is between 0.5 and 1, the patient's condition is emergency when the value of risk of patient is between 0 and 0.5, the patient's condition is normal. Algorithm 2 shows the prediction of patient risk using ANFIS. In this section, the proposed approach for optimizing the sampling rate using a discovered pattern, risk of patient, patron biosensor and national scoring system (Fig. 4) in biosensor networks is presented. Thus, before describing the proposed Continuous monitoring in addition to sensing and checking the patient's vital signs are the most important issues in IoP. The data are captured by the biosensors and then transmitted to the coordinator. In the proposed method, the biosensors are divided into two categories. The first one is the set of normal biosensors that in emergency situation sense the patient's vital signs. Furthermore, the second category is the patron biosensor which is activated only in normal situation when other biosensors are inactive. The patron biosensor calculates the patient's final condition according to the vital signs. Here we have a sequence of four vital signs: Blood pressure, Heart Rate, O, Temperature. Thus, there are eight normal cases versus eight emergency cases. In general, it can be concluded: Accordingly, whenever a normal state occurs, the biosensor continues to operate and if an emergency situation occurs the biosensor immediately sends an activation message to the other biosensors. Interpolation means finding a function that passes through specific points. If the value of a function is specified only in some points, the values of other points can be approximated by the interpolation function. In other words, interpolation S i ≤ 4, (0 or 1, 0 or 1, 0 or 1, 0 or 1) S i ≤ 12, (2 or 3, 2 or 3, 2 or 3, 2 or 3) is a method used to find the values of a function in a specified range. Interpolation is also used to quantify a function at many discrete points. In many applications, such as engineering, when some points are defined and available (such as test or sampling data), a function is found that is as close as possible to the data. As mentioned earlier, the proposed method tries to show the sampling rate of active nodes consistently. In the proposed method, the risk of patient value (r) is obtained based on ANFIS and the other two points including (0, 0) and (Mmax, Rmax) that are also related to the existing axis. Mmax is the maximum variance of the sensing values. Rmax is the maximum possible sampling rate. Next, with two other points called initial values, we achieve at the desired values based on the Hermite function. The interpolation function is shown as f(x). In addition, in this paper, the behavioral function is expressed with a beaker curve that passes through the three expressed points. • P1: (0, 0), P2: (M max , R max ), P3: r This relationship is called Hermite interpolation polynomials [37] . In the following, we will get the exact amount of sampling rate using the so called interpolation method. In this section, we present an algorithm that adapts the sampling rate of biosensors to the patient's vital signs. The proposed algorithm is implemented in two parts. The first part is reading the vital signs that runs on the biosensors. Also the second part determines the sampling rate that runs on the coordinator. In the first step, we propose an ANFIS-based algorithm whose task is to find the patient's risk based on vital signs. The basic idea is to predict the patient's risk through the vital signs received by the biosensors by using ANFIS. The patient's risk will be predicted as a number ranging from 0 to 1. If the patient's risk is between 0 and 0.5, it means that the patient's condition is normal. In this condition by utilizing the behavior function (Hermit polynomial), the desired number for the sampling rate of the biosensors would be discovered. On the other hand, if the patient's risk is predicted between 0.5 and 1, it indicates that the patient's condition is critical, so the sampling rate of the biosensors will be set to Rmax. The Hermite function is responsible for determining the sampling rate for the biosensors under normal conditions. Input values of the Hermite function are three points: the patient risk level (r), (0, 0) and (Mmax, Rmax). The function uses these points to calculate the exact value of the new sampling rate. Risk of patient is dynamically calculated by Algorithm 2 but as mentioned in the related works, in the presented algorithms of the recent works this amount is given by a medical expert, while in this article we tried to be completely intelligent by the ANFIS in each period. In fact, calculating and predicting the sampling rate of biosensors based on the patient's vital signs makes the proposed method smarter than other similar methods. Rmax is the highest value of the biosensor sampling rate; Mmax is the highest value of the read value of the patient's symptoms. On the other hand, in this method, using ANFIS, behavioral patterns (Table 3 ) are obtained. In this section, after discovering the behavioral patterns, we pay attention to these behavioral patterns in parallel with reading the vital signs of the biosensors. In this way, if the patient's activity is performing and activity is in a last class (Table 3) , the signals are immediately sent to the biosensors to switch to inactive mode, and only the patron sensor remains active and operates at the maximum sampling rate. As long as the person performs an activity that is in the selective pattern, the state of the biosensors will be the same, and as soon as the activity changes, an activation signal immediately is sent to all of the biosensors. This method significantly reduces network traffic and communications, which reduces the energy consumption of the biosensors and ultimately increases the network lifetime. Figure 19 shows the process of performing the proposed method. InacƟve watchdog biosensor and AcƟve other sensors To simulate the proposed method, first Algorithm 3 and then Algorithm 4 are simulated. To simulate Algorithm 3, the individual's behavioral pattern must first be determined. For simulating the individual behavioral pattern, as mentioned in Sect. 4.1, the best method is FCM which is applied with a hybrid model and can be seen in Table 2 . After obtaining the patient's behavioral patterns, we simulate Algorithm 4. Vital sign data are collected by the biosensors through executing algorithm 3 and then sent to the coordinator. On the other hand, algorithm 4 is implemented by a coordinator and firstly the patient status (ANFIS_Risk of patient (ARP)) is determined then the sampling rate is calculated with the Hermit interpolation function. At the end of each round, if the risk of patient is normal, the sampling rate is set to RMax else sampling rate calculates through the Hermite function. After determining the patient behavioral pattern (ANFIS_Pattern_Discovery (APD)) if activity is part of the third class (T1P3, T2P3, T3P1, T3P2, T3P3) ( Table 3) , then only the patron biosensor is active and other biosensors are disabled. As long as the patient performs an activity that is in the third class of the patterns, the biosensors are inactive. As soon as the patient's activity changes, all inactive biosensors reactivate and start sending vital sign data in R t sampling rate. During the simulations, real medical observations collected in the online MIMIC database [24] are used. Simulations are performed in 22 rounds (70 periods) under the following conditions: each round is comprised of a certain number of periods calculated at the end of each round. On the other hand, 700 energy units are considered for each biosensor; reception and transmission consume 0.3 and 1 energy units, respectively. The sampling rate is determined as a number ranging from 10 to 50 per period. Blood pressure and body temperature are also evaluated. In the simulations, patients with normal status and emergency status are studied using three measuring parameters including transmission traffic, energy consumption and patient's risk accuracy. In addition, data integrity is checked for suggested method. The main operation to reduce network traffic and communications is to restrict biosensors from sending information. Since the SVS algorithm runs on the biosensors, it reduces the sending of information to the coordinator and thus reduces the traffic over the network. In SVS, the biosensor receives the behavioral pattern that has the third priority (Table 3 ) as input which was previously detected by the APD algorithm. Then, the biosensors recognize the patient's activity. If the recognized activity is in the discovered pattern (the third priority pattern according to Table 3 ), all biosensors are deactivated and only the patron biosensor captures and sends vital symptoms with the maximum sampling rate based on the NEWS (Fig. 4) . Sending no data by other biosensors causes a serious reduction in reducing network traffic and communications. The simulation is performed in two modes. In the first case, the patient was assumed to have a normal status where only the patron biosensor was active and in a crisis where all the biosensors were operating at the maximum sampling rate. Figure 20a shows the amount of sent data by the proposed method compared to other methods (A*, LED, modified LED, A-LED [27] ) and Fig. 20b represents the amount of sent data in the patient's emergency situation. As can be seen in Fig. 20a , normally the amount of sent data to the coordinator by the proposed method is significantly less than other proposed methods (about four times). On the other side, Fig. 20b , the patient is in a critical condition and the biosensors send the sensed data to the coordinator, in which case the proposed method reduces the amount of sent data by about three times less than other methods. Figure 21 shows sent data through biosensors in emergency and normal situations. In this figure daily activities can be seen (idle, bed to toilet, leave home, evening medicines, desk activity, dining room, chores, kitchen activity, guest bathroom, mediate, and morning medicines) whereas the third class of discovered patterns in Table 3 includes Idle, bed to toilet, leave home, chores, desk activity, evening medicines, dining room, guest bathroom, mediate, kitchen activity and morning medicines. When a patient performs one of the third class of activities, patron biosensor would be activated in the maximum sampling rate while others are in sleep mode. Therefore, in Figs. 20a and 21a, transmission traffic is reduced by 84% compared to other methods. Furthermore, in Figs. 20b and 21b, when the patient is in emergency status and all biosensors are active, the transmission traffic is reduced by 50% compared to other methods. According to the mentioned facts this is clear that one of the most important methods for energy management is to adjust the sampling rate (Fig. 2) . Reducing the sampling rate of active biosensors reduces the amount of sent data and also the number of network communications. In this simulation, which was performed in 22 rounds, due to the using ANFIS to calculate the risk of patient and then determining sampling rate, the amount of sensed data is significantly low; therefore, the number of sent data from the biosensors to the coordinator is greatly reduced. This leads reducing the network communication, as well. In the proposed method, the most important factor that has reduced the network communications is the lack of sending data when the patient has performed activities with lower priority ( Table 3) . As a result, the biosensor does not read vital signals when performing third priority activities. This technique reduces network data transmission and communication. Finally, it reduces the energy consumption of the biosensors and increases the network lifetime, as well. Since captured data in the proposed method is less than other methods, therefore, biosensors consume less energy than other methods. As it can be seen in Fig. 22 , the amount of network communications reduces in each round via our approach. In addition, in Fig. 23 , it has been shown that the communications between biosensors and coordinator in the suggested method are less than other methods. Figure 24 represents the amount of energy consumed by the proposed method compared to other methods (A*, LED, Modified LED*, A_LED). The proposed method is based on the MSVS algorithm. As it can be seen in Fig. 24 , the proposed algorithm consumes less energy compared to other similar methods. The main reason behind the matter is the reduction in the amount of captured and sent data, which leads to a reduction in communications between the biosensors and the coordinator. Since the amount consumed energy during data transmission is higher than sensing data, fewer network communications between the biosensors and the coordinator lead to reduction of energy consumption by biosensors. This consequently increases network lifetime. The performed simulation, which lasted about 70 min in It is important to evaluate the integrity of data, and the received vital signs according to the recommended method. There are two scenarios for expressing information integrity. The first scenario is when a biosensor senses all the data without any restrictions, and the second scenario is when the conditions are specified for sensing by the biosensor. If the result of the patient's condition in the first scenario is the same as in the second scenario, it indicates that the integrity of the information is maintained, otherwise, the integrity is not maintained, and the proposed method is not useful. In general, the data integrity means that any change in the amount of data does not cause to achieve at the desired result. The results obtained in Table 6 show that data integrity is maintained in the proposed method. In this simulation, four properties are used, and also the mean difference is used to calculate the integrity (Eq. 15). The simulation result of the proposed method according to Table 6 proves that data integrity is maintained. In this table, four characteristics (Blood Pressure, Temperature, respiration rate, oxygen) have been used to evaluate the accuracy in maintaining data integrity. When the patient's risk level is equal to 0.4, the reduction in information for blood pressure is equal to 80%, for the temperature equals to about 90.1%, for respiration rate equals to about 85% and also for oxygen equals to 83%. (15) Hypothesis test = H0 ∶ there is no significant difference between two samples H1 ∶ there is significant difference between two samples For the same characteristics, when the numerical patient's risk was 0.9, it reduced 70%, 82.5%, 76%, 75% for blood pressure, temperature, respiration rate, and oxygen, respectively, while no any needed data was removed. As can be seen in Table 6 , by reducing the amount of data for the four features, the average difference is achieved as a small value which indicates that the information integrity is maintained. The reduction in transmitted data to the Oxygen is 83% when the patient's risk is low, while the mean differential is 2%, and the patient's risk is very high, while it is 3%. Similarly, for Temperature in bad and emergency conditions, the mean difference is 0.03 and 0.02%, respectively. On the other hand, when the patient is in a normal and emergency condition, this value for Respiration rate is 1% and 2%, respectively. Also, for Blood pressure, the rate of data reduction in low-risk conditions is 80% and in high risk is 70%, and finally, the mean difference is 5% and 3%. Considering the differential mean of all features and based on the information obtained in Table 6 , it can be concluded that the integrity of the information is maintained in the proposed method. Figure 25 shows the sensed values in the proposed method optimize about 90% in low-risk conditions and 80% in high-risk conditions. In this paper, a system for determining the sampling rate as well as predicting the patient's risk is proposed using ANFIS. To determine the sampling rate, first, an intelligent method using the ANFIS model is proposed, which classifies the patient's daily activities as patient behavioral patterns. These patterns are prioritized, and activities that have less priority are sent to the biosensor by the coordinator. In biosensors, the current activity is recognized at any time, if the recognized activity is in the list of third priority activities (Table 3) , all biosensors except the patron biosensor are deactivated. On the other hand, another algorithm is responsible for determining the patient's risk in each period. By determining the patient's risk and sending it to an interpolation function, the exact amount of sampling rate is determined. The biggest feature of the proposed system is the reduction of sent data by biosensors to the coordinator while maintaining data integrity, which reduces network communication and ultimately reduces energy consumption. The simulation results of the proposed method also prove this. To do future works, it could be used different methods to predict behavioral patterns and risk of patient with more accuracy, and utilized metaheuristic method in order to increase accuracy of method. On the other hand, it could be utilized different method to predict patient condition to determine sampling rate. Centers for disease control and prevention (CDC) World Health Organization (WHO) Health risk assessment and decision-making for patient monitoring and decision-support using wireless body sensor networks Using adaptive sampling and DWT lifting scheme for efficient data reduction in wireless body sensor networks Self-adaptive data collection and fusion for health monitoring based on body sensor networks Data fusion lexicon, joint directors of laboratories, technical panel for C3. Naval Ocean Systems Center Open source ECG analysis Trading off prediction accuracy and power consumption for context-aware wearable computing. Wearable Computers Balancing energy, latency and accuracy for mobile sensor data classification Energy-efficient continuous activity recognition on mobile phones: an activityadaptive approach Energy efficiency in wireless sensor networks: a top-down survey Sparsest random scheduling for compressive data gathering in wireless sensor networks Compressive data gathering for large-scale wireless sensor networks Data gathering in wireless sensor networks through intelligent compressive sensing Efficient measurement generation and pervasive sparsity for compressive data gathering Compressed sensing for networked data Sensor placement for activity detection using wearable accelerometers Emotion Sense: a mobile phones based adaptive platform for experimental social psychology research Speaker sense: energy efficient unobtrusive speaker identification on mobile phones Sociablesense: exploring the trade-offs of adaptive sampling and computation offloading for social sensing An efficient compressive data gathering routing scheme for large-scale wireless sensor networks Transmission-efficient clustering method for wireless sensor networks using compressive sensing A novel based algorithm for the prediction of abnormal heart rate using bayesian algorithm in the wireless sensor network Compressive sampling and reconstruction of acoustic signal in underwater wireless sensor networks Sparsest random sampling for cluster-based compressive data gathering in wireless sensor networks An adaptive method for data reduction in the internet of things Adaptive sampling for saving energy: a case study on the libelium-based environment monitoring systems On adaptive sampling algorithms for IoT devices A low-cost algorithm for adaptive sampling and censoring in diffusion networks Sampling rate prediction of biosensors in wireless body area networks using deep-learning methods Deep-learning based forecasting sampling frequency of biosensors in wireless body area networks Optimum data collection and fusion schemes in WBSN Self-Adaptive sampling rate to improve network lifetime using watchdog sensor and context recognition in wireless body sensor networks Royal College of Physicians Neuro-fuzzy and soft computing-a computational approach to learning and machine intelligence A generalization of Hermite's interpolation formula Correlation coefficient". NCME.org. National council on measurement in education