Abstract
Wireless Body Area Networks (WBANs) have been introduced as a useful way in controlling health status of the monitored patients, during recent years. Each WBAN includes a number of biosensors attached to the patient’s body, collecting his vital sign features and communicating them to the coordinator to make appropriate decisions. Managing energy consumption of biosensors and continuous monitoring of the patients are two main issues in WBANs. Hence, denoting efficient sampling frequency of biosensors is very important in WBANs. In this paper, we propose a scheme which aims at determining and forecasting sampling rate of active biosensors in WBANs. In this regard, from the first round until a certain round, the sampling rate of biosensors would be determined. Accordingly, we introduce our modified Fisher test, develop spline interpolation method and introduce three main parameters. These parameters are information of patient’s activity, patient’s risk and pivot biosensor’s value. Then, by employing mentioned parameters in addition to the introduced statistical and mathematical based strategies, the sampling rate of active biosensors in the next round would be determined at the end of each entire round. By reaching a pre-denoted round, the sampling rate of biosensors would be predicted through forecasting methods. For this purpose, we develop two machine learning based techniques namely Adaptive Neuro Fuzzy Inference System (ANFIS) and Long Short Term Memory (LSTM). For estimation our approaches we simulate them in MATLAB R2018b software. Simulation results demonstrate that our methods can decrease the number of communicated data by 81%, reduce energy expenditure of biosensors by 73% and forecast the sampling rate of biosensors in the future rounds with 97% accuracy and 2.2753 RMSE.
Keywords
Background
One of the available ways to use networks in the field of medicine is the use of wireless sensor networks (WSNs). Many Wireless Sensor Network technologies are talented to enhance different parts of human lives from travelling to medicine aspects. These technologies facilitate the daily life problems [1]. Because of the growing trend in the world population, especially elder population, some sort of intelligent cares are needed to monitor their health status. Continuous monitoring operations are the result of new presented technologies of heath monitoring networks [2]. At homes that are equipped with health monitoring networks, different controlling strategies for different persons can be presented to check their vital signs and make consequent decisions [3, 4]. Continuous monitoring of patients or those people who are susceptible to risky situations helps detect their emergency conditions and reveals related alarms for medical care. Aggregation, fusion and forwarding the captured data by biosensors to any destination is performed by coordinator [5]. Some technologies like radio frequency identification (RFID), bluetooth and ZigBee enhance this phenomenon [6].
Wireless Body Area Networks (WBANs) contain a number of biosensors placed on the patient’s body to receive vital body messages including blood pressure, oxygen level, respiration rate, etc. The biosensors can connect to each other wirelessly to form a wireless body biosensor network. The set of biosensors is employed to gather patient’s information and send them to the central controller to check patient’s status instantaneously [7]. The biosensors of the Wireless Body Area Networks can be placed inside the patient’s body or put on his skin. At the other hand, wearable technology is another way to connect the biosensors to the patient, as well. In addition, the biosensors may be equipped with devices carried by humans in various situations in clothes, hands or bags. Limitations of energy consumption in biosensors of these networks shouldn’t be neglected, thus the presented sampling strategies to acquire vital sign data must pay attention to optimality in energy consumption. This means determining sampling rate adaptively and according to the patient’s statuses prevents over energy consumption in periodic data communication. Despite energy limitations, creating redundant overhead data is another issue in WBANs, therefore producing and communicating unnecessary data leads decreasing network functionality in either energy consumption or overhead data. In WBANs the regular biosensors suffer from processing restrictions. Also they are equipped by non-rechargeable power supplies which lead energy consumption limitations. Inversely, the coordinator almost doesn’t have any restrictions in energy consumption and processing capabilities [8].
In this paper we assume the most important biosensor as the pivot biosensor. This node contributes in sampling rate determination. Also, to roughly recognize patient’s status we assume patients’ activity. This means, the patient’s activity behaves as one of the most important components in sampling rate determination. The proposed determining and forecasting sampling rate method performs based on three main component including patient’s risk, patient’s activity and the values of pivot biosensor. The proposed method observes variances of the captured vital sign data and also an interpolation function to achieve at optimum sampling rate. For this reason, first a statistical test is executed to denote whether the hypothesis is accepted or rejected. Then at the second step, the interpolation function determines the optimum sampling rate. Also our approach employs ANFIS and LSTM to predict sampling rate for network biosensors. More details would be described at the rest of the paper. Some of motivations of our method are: Determining activation and sleep time slices for biosensors. Presenting an energy efficient adaptive approach to employ information of patient’s activity aiming at biosensor activation and deactivation. Presenting Modified Fisher test as a development of ANOVA model to analyze variance of weighted captured vital sign data. Applying cubic Spline interpolation function as the behavior function to determine optimum sampling rate. Defining pivot biosensor and employing its values in addition to values of patient’s risk as two main controlling points in the process of optimum adaptive sampling rate determination for active biosensors. Developing Adaptive Neuro Fuzzy Inference System (ANFIS) and Long Short Term Memory (LSTM) for predicting sampling rate of biosensors in futures round(s).
In section II we briefly mention a number of recent related works. In section III the details of Local Emergency Detection and National Early Warning System (NEWS) are reviewed. Our approaches for adaptive sampling rate determination including introduced modified fisher test, employed main parameters, developed interpolation function and also proposed algorithms are described in section IV. Also, the details of our sampling rate prediction scheme are explained in section V. Performance evaluation of our methods and comparison with similar works are explained in section VI while section VII concludes the paper.
Related works
So far, a number of algorithms have been presented for sampling rare determination in wireless body area networks and similar networks. In this section some of related works are mentioned. Yoon et al. [7] proposed a strategy to adaptively manage compression rate and sensing rate of energy harvesting wireless sensor networks. Their proposed approach can improve data resolution in parallel with decreasing blackout nodes’ number. In addition, their approach is capable to adaptively control sampling rate for sensors. Enhancing packet delivery ratio plus decreasing energy consumption of the sensor nodes are the results of their approach. Lee et al. in [8] proposed Resuscitation Adaptive Sampling Algorithm (RASA) and Compensation Adaptive Sampling Algorithm (CASA) as two algorithms for denoting adaptive sampling rate. Some results of these algorithms are self-sustainability for sensor nodes and also energy efficiency.
Smart pervasive systems and signal sampling strategies have been proposed by Scarabottolo et al. in [9]. The authors used percentage of remaining energy of sensors to determine network sampling rate. Furthermore, Scarabottolo and colleagues proposed a spectrum-based change detection test (CDT) for estimating time variance of communicated signals. Scarabottolo and other authors employed CDT to discover aliasing between signals. In their approach, by observing any aliasing between signals an adaptation strategy will denote network sampling rate. Decreasing energy consumption of network nodes in parallel with discovering and controlling aliasing of signals are the outcomes of the proposed method.
In some papers the authors worked on networks with rechargeable sensors. For example Ting Lu et al. [10] focused on this kind of networks which sensors can be recharged by using reusable energies. A two-level distributed sampling rate determining strategy has been introduced by Ting Lu et al. which also enhances data quality in rechargeable sensor networks. The authors first proposed the Energy Allocation Algorithm (EAA) to determine amount of energy that each node can consume. At the second step, data sampling Rate Allocation Algorithm (RAA) is performed to denote optimum sampling rate. Energy efficiency and enhanced data quality for rechargeable sensor networks can be addressed as the results of their approach.
Medical data fusion algorithm, based on Internet of things has been attended by Weiping et al. [11]. Authors introduced an event-driven Data Fusion Cluster-Tree Construction Algorithm (DFCTA). They employed DFCTA according to the particularity of the data in the medical Internet of things. Furthermore, Weiping and colleagues considered delay factor in data fusion operation such that their method minimizes fusion delay. For minimizing energy consumption of sensors, Xiaodong and Qi in [12] proposed a virtual uneven grid-based routing protocol for mobile sink-based WSNs in a smart home system. In their proposed approach, a Virtual Uneven Grid-based Routing protocol (VUGR) is innovated to increase stable network operating time by dynamic partitioning grid cells. Also their method checks energy resources in the smaller cells to form uneven grid cells. Marco and other writers in [13] introduced LiteSense as an adaptive sensing scheme for wireless sensor networks. Authors considered the behavior of the physical parameters of interest in each WSN context as one of the key components for energy expenditure rate of each node. To achieve at accurate sampling rate, LiteSense employs variance of the observed parameters. Optimizing energy consumption of sensors in addition to maximizing data accuracy are the outcomes of Lite Sense.
Several different approaches by several authors have been proposed for sampling rate determination in IoT and corresponding subsets [14–16]. These approaches manage sampling rate for corresponding networks aiming at controlling the number of captured and communicated data packets. Enhancing data accuracy, maximizing data integrity, minimizing overhead data and also reducing energy consumption are some results of these works. Habib et al. in [17] introduced a method for data collection and fusion in wireless body sensor networks. Their approach at the first step denotes the sampling rate adaptively then, makes decision for monitored patient via data fusion. The authors believe energy limitation of biosensors is one of the most critical problems of considered networks so they proposed an adaptive sampling rate determination algorithm which checks and controls the number of communicated packets by each biosensor. At the other hand their approach minimizes overhead data.
A number of previous works have paid attention to sampling rate determination for periodic sensor networks [18, 19]. These papers attended to sensor nodes remaining energy in parallel with the number of communicated data as two main parameters for sampling rate determination. Also the authors in [20–23] estimated routing parameters in data communication to achieve at accurate sampling rate. In fact, these works prolong lifetime of the considered networks by balancing sensor energy expenditure and overhead data. Fortino et al. [24] proposed C-SPINE as a method for multi-sensor data fusion in wireless body sensor networks. To achieve at accurate data fusion C-SPINE employs the activity of patients, athletes, elders, etc. As a result C-SPINE optimizes energy expenditure of wireless body sensor networks. Some authors considered the information of patient’s activity aiming at calculating accurate sampling rate for observed networks [25–28]. These approaches address patient’s activity in different observation time slots to approximate sampling rate. Therefore, accurate decisions, minimized energy expenditure and reduced overhead data are the outcomes of the so-called approaches. Data management in wireless body sensor networks for enhancing network functionality has been focused by some authors in [29–31].
The authors in [32] focused on adaptive sampling techniques for autonomous agents in WSNs. They believe although the size and cost of agents decrease, their batteries are generally insufficient for the desired measurement duration. Hence, they proposed adaptive sampling techniques to prolong the agents operation time. Their method, in parallel with minimizing the information loss, leads adaptations of the agents’ sampling periods, as well. This leads reducing number of communicated data and saving energy in the considered environment. Linh Nguyen and his colleagues in [33] estimated adaptive sampling regarding spatial prediction in environmental monitoring. To achieve this goal, the authors focused on stationary and mobile robotic WSNs. Their method, firstly, evaluates selecting the best subset of stationary wireless sensors monitoring environmental phenomena in terms of sensing quality; then, analyses predictive inference approaches and sampling algorithms for mobile sensing agents. This is performed to optimally observe spatially physical processes. Authors in [34] paid attention to energy efficient data collection in WSNs. For this purpose, Guorui and other authors used denoising autoencoder. Their proposed method executes in two steps. At the first step, data training is performed in which a Denoising AutoEncoder (DAE) is trained to compute the data measurement matrix and the data reconstruction matrix using the historical sensed data. Then, in the second step, data collection is performed in which the sensed data of whole network are collected along a data collection tree. Their strategy improves the performance of both data communication and data reconstruction.
Yanlong and his colleagues [35] investigated adaptive sampling for target tracking in Underwater Wireless Sensor Networks (UWSNs). The authors of this paper paid attention to energy constraint and energy imbalanced dissipation of underwater nodes. They designed an adaptive sampling interval adjustment (ASIA) method using a two-input-single-output fuzzy logic controller to maximizing energy efficiency, as well. Then, for balancing the energy consumption, they developed a dynamic uncertainty threshold adjustment (DUTA) method using a single-input-single-output fuzzy logic controller. Energy efficiency and alleviating the imbalance of energy consumption are the outcomes of their approach. Joseph and other authors in [36] employed adaptive sampling and DWT lifting scheme for efficient data reduction in WBANs. They believe one of the major difficulties in WBSNs is the power consumption due to wireless transmission of sensed data. Hence, they tried to minimize energy consumption of the network nodes by reducing number of communicated data, as well. For this purpose they presented adaptive sampling technique using dynamically adapted risk level by combining it with the Discrete Wavelet Transform lifting scheme for noise filtering. Decreasing number of communicated data is the result of their approach. Energy efficiency of WSNs via cluster head selection has been considered by some authors [37, 38]. Also, introducing adaptive sampling strategies for massive data collection in distributed sensor networks has been performed some others [39, 40]. Some authors have focused on adaptive sampling by utilizing statistical methods [41, 42]. Some other writers paid attention to data aggregation in WSNs [43–45]. Table 1 summarizes properties and drawbacks of some of the similar related works and points to the focused problem, proposed technique, results and drawbacks of each work.
Properties and Drawbacks of Similar Approaches
Properties and Drawbacks of Similar Approaches
In traditional wireless sensor networks and similar networks, captured data are communicated to the controller with the maximum sampling rate. This manner leads over energy consumption by sensors nodes in parallel with communicating enormous mass of data which leads to overhead data over the observed network. For example in Local Emergency Detection (LED*) [46], shown in algorithm 1, energy consumption rises up rapidly which leads to reduction of network overall useful lifetime. Also, LED* creates redundant overhead data that degrades network performance.
In Modified Local Emergency Detection Algorithm (Modified LED*) [17], shown in algorithm 2, the biosensors instead of sending the vital signs continuously, communicate them to the decision making center or controller if they observe any difference between the vital sign values of two consecutive periods. Therefore, both the energy consumption of the biosensors and overhead data would be balanced, as well. Like Modified LED*, in this paper we are interested in communicating vital sign data adaptively, thus, the biosensors transmit the vital sign data to the controller if they detect any difference between the vital signs of two consecutive periods. This approach reduces energy consumption and overhead data of the network while keeping data integrity, as well. In our approach, for local processing by biosensors, we employ National Early Warning System (NEWS) [47] which is shown in Fig. 1. In NEWS, first all the vital sign features are captured by biosensors then the biosensors convert them into the numbers 0 to 3 by considering NEWS table shown in Fig. 1. Converting vital sign features including respiration rate, oxygen saturation, temperature, systolic blood pressure, heart rate and level of consciousness can be considered in Fig. 1. For example, if the patient’s heart rate is between 51 and 90 then the biosensor considers this feature’s value as 0. An amount from 41 to 50 or between 91 and 110 for patient’s heart rate leads the biosensor to assume this feature value as 1. If the patient’s heart rate is between 111 and 130 then the biosensor considers this feature’s value as 2. Finally, if the patient’s heart rate is less than (or equal to) 40 or greater than (or equal to) 131 then this value would be set to 3. In our approach, instead of communicating all of the captured vital sign packets with maximum frequency as performed in [46], each biosensor communicates its captured data to the coordinator if it considers any difference in an entire feature’s value during two periods.

National Early Warning System [47].
Additionally, in our approach, despite this trend, communicating data depends on some other criteria including patient’s risk, patient’s activity and pivot senor‘s value. In fact, in our design, during n initial rounds, the sampling rate is determined according to the patient’s risk, patient’s activity and pivot senor‘s value. After round n, the sampling rate would be predicted by employing Adaptive Neuro Fuzzy Inference System (ANFIS) or Long Short Term Memory (LSTM). Fig. 2 represents the flowchart of our method. The functionality of each type of biosensor is shown in this flowchart. Also, the same biosensors with same tasks are drawn by same colors. After registering vital sign data by all of the biosensors, the pivot biosensor discovers the current activity of patient and informs other biosensor about it. According to the information of current activity of the patient, the regular biosensors by considering the number of current round less than InitRound, switches to active mode aiming at communicating their vital sign data packets to the controller by running ALED_AS algorithm or inversely switch to sleep mode to wait for activation signal from pivot biosensor. If the number of current round exceeds InitRound then the sampling rate of active nodes would be forecasted by cooperating both the controller and regular biosensors and running ALED_AS_SRP algorithm. In parallel, the pivot biosensor continuously checks the patient’s activity and activates regular biosensors when necessary. At the end, coordinator makes appropriate decisions for patient. More details of our approach would be described at the rest of the paper.

Flowchart of Proposed Approach.
Modified fisher test
In this section we describe the statistical test developed and employed to estimate the variance of vital signs. For this goal, we are interested in developing Fisher test (One Way ANOVA) by considering weights for observations during different periods. This means modified Fisher test is used to measure the variance of weighted inter-period and intra-period observations.
In the proposed approach, suppose there are n biosensors connected to the patient’s body and the entire sensor i captures the vital signs during period j. In our approach, y
ji
is assumed as the measured sample of sensor i during period j and
As mentioned earlier, one of the motivations of our approach is to consider weights for observed vital sign data. To achieve at this goal, the newer periods are assumed to have greater weights than older periods. Therefore, we introduce Equation (2) to calculate weight of each period j (w
j
).
In Equation (2), k is the number of current period while j represents the number of any entire previous period. When Equation (2) is applied to the periods they get weights, therefore, the observations inside the periods get weight. The values of weighted observations in weighted periods are represented by Equation (3).
Equation (4) measures the mean of all vital sign data inside each period j, and Equation (5) calculates the variance of all the weighted data of period j. In addition, Equation (6) measures the mean of all observation periods.
Moreover, inter-period variation (SS
B
), intra-period variation (SS
E
) and total variance of all treatments (SS
T
) are respectively counted by equations (7), (8) and (9). At the end, F value is achieved by employing Equation (10).
By having α as the risk coefficient and F(J –1, N –J) as the degree of freedom, Equation (11) achieves at F
t
.
In modified Fisher test, if the measured F value is greater than F t value, the hypothesis would be rejected. Additionally, if the F value is less than or equal to the F t value, the hypothesis would be accepted.
Patient’s risk
When the patient’s critically level increases the packet communication rate increases, too. This is performed to satisfy accurate and rapid decision making in controller. Considering this fact that packet communication rate and sampling rate have direct relation to each other, therefore when the sampling rate rises up the energy consumption and overhead data rise up. After executing modified Fisher test if the of variance of patient’s vital signs is significant it can be resulted that the patient’s status isn’t normal therefore the sampling rate rises up to transmit the captured vital sign data to the controller. Reversely, when the variance of vital sign data isn’t high this can be interpreted that the patient’s status is normal therefore the sampling rate can be decreased to prevent over energy consumption by biosensors. In our approach the patient’s risk represents the critically level of the patient which can be a number from 0 to 1. Greater amounts of patient’s risk show the worse situations for the patient while lessen values show better situations for him. Therefore, high amounts of patient’s risk leads high sampling rates which increases both the energy consumption and overhead data while low amounts leads low sampling rates which consequently decreases these factors. Accordingly, in our approach we are interested in employing patient’s risk as one of the main parameters in adaptive sampling rate determination. Furthermore, in our approach the patient’s risk is achieved through calculating average of all captured vital sign data in previous rounds. As mentioned earlier, based upon NEWS system, all the captured data are converted to the numbers 0 to 3. Therefore, their average will also be a number between 0 and 3. Thus, to achieve at a number between 0 and 1 for patient’s risk, the calculated average of all the captured vital sign data would be normalized to a number from 0 to 1.
Patient’s activity measuring
As mentioned earlier, as one of the motivations, we are interested to employ the extracted information of patient’s activity to know his approximate status. The activity of monitored patient can be discovered via several ways like wearable activity trackers, depth biosensor action recognizers, RGB camera action detectors, etc.
Clearly the monitored patient may engage with different activities during day and night. In many conditions, by having the activity information of the patient, his general situations can be interpreted. Based upon activity information of the patient the biosensors can decide about their activation and deactivation time slices. Thus, they may be temporarily deactivated to avoid capturing and transmitting unnecessary data packets in some time slices. Therefore, energy consumption in parallel with overhead data decreases. The words that must be said are that deactivating of some biosensors happens for certain and limited time slices because when the patient’s status is critical the pivot biosensor issues an activation signal to instruct the deactivated biosensors to wake up and start functioning. Usually, the patient’s different activities belong to some activity groups including “walking activities", “moving activities", “daily activities", “sports or exercise activities", “upper body activities", etc. Also, some other similar groups can be considered. Changing the current patient’s activity can lead to activation and deactivation of some biosensors.
Pivot biosensor value
As mentioned, the values of all the features in wireless sensor networks and wireless body sensor networks aren’t same. This means some features and their corresponding vital sign data in wireless body sensor networks are more important than other ones. As an example, in many illnesses, the blood pressure feature is more important than other features, therefore the blood pressure feature is considered as the pivot feature and its corresponding biosensor is called pivot biosensor. Pivot feature and pivot biosensor aren’t always same for all the illnesses; however, for each illness there is one feature with most importance compared to other features. Therefore, the so-called feature is called pivot feature and its corresponding biosensor is called pivot biosensor.
As stated above, in our approach, in some time slices, some biosensors can sleep and rest until they receive activation signal from pivot biosensor. Also, if the pivot biosensor dies or because of losing all of its energy cannot work correctly the second important biosensor would be replaced by it. Thus, the pivot biosensor value is always available. According to the values of pivot biosensor, the regular biosensors can decide to switch to the active mode or select sleep mode. In our approach, all of the biosensors including regular biosensors and pivot biosensor use NEWS system to convert their corresponding feature values into numbers 0 to 3.When the pivot biosensor observes its feature value near to 3 it wakes up the regular biosensors by issuing an activation signal to them. In addition to monitoring patient’s status for activating and deactivating regular biosensors by pivot biosensor, it also contributes to sampling rate determination for active nodes. Therefore, the pivot biosensor’s value is one of the main parameters in denoting accurate sampling rate for active network nodes. Our design determines the sampling rate adaptively and by considering the patient’s current situations. This is done to avoid over sampling which leads over energy consumption and overhead data. To achieve at optimized sampling rate we introduced the modified Fisher test aiming at measuring variance of patient’s vital sign values. If the calculated variance is high, the sampling rate rises to the maximum amount. Conversely, the sampling rate decreases when the calculated variance is low. Moderate variance leads calculating accurate and optimum sampling rate based upon a behavior function. In this regard, the pivot biosensor’s value is one of the main factors used by behavior function to calculate efficient sampling rate.
Algorithm 3 which is Advanced Activity Based Local Emergency Detection Algorithm (ALED) is an efficient algorithm in the case of adaptively activating and deactivating biosensors according to patient’s activity. In algorithm 3, if the current activity of the patient belongs to group G, the pivot biosensor would be active while regular nodes switch to sleep mode. At this time, the pivot biosensor captures data of pivot feature and sends them to the controller. In parallel, the regular sleep nodes listen for activation signal from pivot biosensor and after receiving this signal they would switch to active mode. In algorithm 3, even if the patient’s current activity doesn’t belong to group G, the pivot biosensor is the only biosensor which senses and sends all of the vital sign features to the controller while other nodes sense only the vital sign data of the pivot feature. In algorithm 3, data communication from biosensors to controller is performed if the entire biosensor considers any changes between the data of two consecutive periods. In addition, the pivot biosensor instructs other biosensors to sense and send other features if it observes emergency samples with values of 2 or 3. At the same time, if the regular nodes receive activation signal from pivot biosensor or consider values of 2 or 3 for pivot feature, they will capture all of the patient’s vital signs and send them to the coordinator.
Behavior function
As mentioned earlier, the proposed approach tries to denote the sampling rate of active nodes in an adaptive way. To achieve at this goal, first a statistical test named modified Fisher test is executed to measure the variance of vital sign data. Also, regardless of patient’s activity, two main factors including patient’s risk and pivot value are given to a behavior function to draw the sampling rate curve. This curve is calculated by an interpolation method. Generally, interpolation is defined as the operation of finding a function which passes through certain points. In fact, by having the information of function points, other points can be approximated by interpolation function. In this regard, our approach employs cubic Spline interpolation function which is a strong and precise interpolation method. The cubic Spline interpolation function divides the curve into a number of intervals and executes on any interval, independently. By this way, failing any independent interval doesn’t destroy rest of the curve. The B-spline functions can be defined as Equation (12).
Equation (12) shows the zero order spline. If the function
As another motivation of our approach, we are interested to use cubic B-spline interpolation function as the behavior function aiming at finding accurate sampling rate. In our approach, the main four points of employed B-spline function are defined as following: The starting point P0 (0, 0). The control point P1 (rx, ry). The control point P2 (qx, qy). The ending point P3 (Vmax, SRmax).
In control points P1 and P2, r x , r v , q x and q y are the corresponding coordinates of P1 and P2 on the sampling rate curvature. Also, in the ending point P3, V max shows the maximum possible value assumed for variance and SR max represents the maximum possible value for sampling rate. Fig. 3 shows three sampling rate curves with four controlling points.

Sampling rate curve with four controlling points.
As stated above, P1 and P2 are the controlling points of sampling rate curvature. In our design, P1 and P2 are patient’s critical level and pivot biosensor’s value, respectively. In the proposed approach, equations (14) and (15) are introduced to map the controlling points P1 and P2 to the corresponding coordinates on the sampling rate curvature.
Algorithm 4 is Advanced Activity Based Local Emergency Detection Algorithm with Adaptive Sampling Algorithm (ALED_AS) in which first the biosensors execute ALED to switch to active mode or sleep mode then the accurate sampling rate is determined by running cubic B-spline interpolation as the behavior function.
Four main points p0(0, 0), p1(patient’s critically level), p2 (pivot biosensor’s value) and p3 (Vmax, SRmax) are given to the Spline interpolation function. This function returns the accurate sampling rate as the output. In algorithm 4, the variance of vital signs is calculating by the introduced modified Fisher test then if the algorithm finds patient’s risk value greater than 0.5 or discovers amounts 2 or 3 for the value of pivot biosensor, it assumes the sampling rate as its maximum possible value (SRmax).
In this section we introduce our approach to predict sampling rate of network biosensors by developing two affective tools entitled Adaptive Neuro Fuzzy Inference System (ANFIS) and Long Short Term Memory (LSTM). For this purpose, first we point to ANFIS and its operations for sampling rate prediction then pay attention to LSTM and introduce the way it can predict sampling rate.
ANFIS architecture
ANFIS architecture was firstly introduced by Jang [48] and has been always utilized for a wide range of application especially when inference or prediction is needed. ANFIS has been used in [49] and [50] to control denoted parameters in WSNs, as well. Also, the authors in [51] and [52] used ANFIS to manage controlling factors of IoT based systems while Shefali and Mahendra in [53] used it to propose an intelligent spectrum handover scheme for cognitive radio Ad hoc networks. In addition, some authors employed ANFIS for prediction of future values of observations [54–56]. As shown in Fig. 4, ANFIS architecture contains five main layers which employs Sugeno and Kang (TSK) rules inference system. Given the inputs (x, y) and output f, the fuzzy rules of ANFIS structure are written as following.

ANFIS Network Architecture [48].
Rule1: If x is A1 and y is B1, then f1 = p1x + q1y + r1
Rule2:If x is A2 and y is B2, then f2 = p2x + q2y + r2
As pointed by Equation (16), (17) and (18), the output f is calculated through weighted average of rule outputs.
Where:
The ANFIS layers are defined as following. The output of the node i is defined as:
Or
Where x (or y) is delivered to the node i as its input and Ai (or Bi - 2) is the linguistic label which is associated with the entire node function. Also, O1,i is the output of the first node of layer 1.The parameters of this layer are called initial parameters. The output of layer 2 which is shown by Equation (21) is the multiplication of the input signals that is in practice equivalent of if-then part.
The output of layer 3 which is also called normalized firing strengths is the normalized output of the previous layer.
In Equation (24),
In our approach we employed ANFIS as one of the tools to predict the sampling rate of biosensors. In this regard, we considered three different datasets respectively with 250, 350 and 450 different sampling rate amounts ranging from 10 to 50 times per each period. To predict the network sampling rate by ANFIS first we trained the system in ANFIS model by using the extracted data from sampling rate datasets. We divided each dataset into two separate sets: training dataset to train ANFIS model and testing dataset to evaluate and test the performance and accuracy of the ANFIS model after training. ANFIS is chosen as the optimum model to minimize training and testing errors. Gaussian membership function has been used to achieve at optimum results. We used two FIS generation methods including Subtractive Clustering and FCM. In the case of employing Subtractive Clustering method and using all of three datasets, following parameters have been set: Influence radius: 0.55, 0.55, 0.55 Maximum number of epochs: 200, 200, 200 Error goal: 0, 0, 0 Initial step size: 0.01, 0.01, 0.01 Step size decrease rate: 0.9, 0.9, 0.9 Step size increase rate: 1.1, 1.1, 1.1 Number of nodes: 104, 104, 92 Number of linear parameters: 48, 48, 42 Number of nonlinear parameters: 80, 80, 70 Total number of parameters: 128, 128, 112 Number of training data pairs: 225, 315, 405 Number of testing data pairs: 25, 35, 45 Number of fuzzy rules: 8, 8, 7
Also, for FCM method, following parameters have been set: Number of clusters: 10, 10, 10 Partition matrix exponent: 2, 2, 2 Maximum number of iterations: 200, 200, 200 Minimum improvement: 1e-5, 1e-5, 1e-5 Maximum number of epochs: 200, 200, 200 Error goal: 0, 0, 0 Initial step size: 0.01, 0.01, 0.01 Step size decrease rate: 0.9, 0.9, 0.9 Step size increase rate: 1.1, 1.1, 1.1 Number of nodes: 128, 128, 128 Number of linear parameters: 60, 60, 60 Number of nonlinear parameters: 100, 100, 100 Total number of parameters: 160, 160, 160 Number of training data pairs: 225, 315, 405 Number of testing data pairs: 25, 35, 45 Number of fuzzy rules: 10, 10, 10
In our design, after creating ANFIS model, the system was trained for 200 epochs with error tolerance 0. Also, to gain optimal parameters of ANFIS, we used hybrid learning method. Fig. 5 (a) shows the sampling rates of dataset with 250 data while these sampling rates in addition to forecasted sampling rates by ANFIS (Subtractive Clustering) and ANFIS (FCM) are respectively shown in Fig. 5 (b) and Fig. 5 (c). Also, like Fig. 5, similar results are shown in Fig. 6 and Fig. 7 respectively for 350 and 450 data. Fig. 6 (a) and Fig. 7 (a) show the sampling rates of datasets with 350 and 450 different sampling rate data. The values of sampling rates plus forecasted sampling rates by ANFIS (Subtractive Clustering) are illustrated by Fig. 6 (b) and Fig. 7 (b) while the sampling rate values in addition to forecasted sampling rates by ANFIS (FCM) are mentioned in Fig. 6 (c) and Fig. 7 (c). The initial results demonstrate the functionality of ANFIS in sampling rate forecasting but more results are mentioned in section 6.

Sampling Rates (a), Sampling Rates and Forecasted Sampling Rates for: ANFIS (Subtractive Clustering) (b) ANFIS (FCM) (c).

Sampling Rates (a), Sampling Rates and Forecasted Sampling Rates for: ANFIS (Subtractive Clustering) (b) ANFIS (FCM) (c).

Sampling Rates (a), Sampling Rates and Forecasted Sampling Rates for: ANFIS (Subtractive Clustering) (b) ANFIS (FCM) (c).
In this part we briefly review the fundamentals of Long Short Term Memory Neural Network (LSTM). Hochreiter and Schmidhuber [57] are the first authors who introduced and worked on the LSTM networks. They created LSTM to overcome the back propagation problems of long term sequences. In fact Hochreiter and Schmidhuber tried to improve the functionality of traditional Recurrent Neural Networks (RNNs). LSTM is a subset of RNNs which has been introduced for learning different intelligent systems. The previous same tools introduced for learning intelligent systems were involved with a number of difficulties like hard programming and high complexity issues. LSTM can properly address long term dependencies of data; therefore it is capable to optimize the complexity of data aiming at solving the problems of Simple Recurrent Networks (SRNs), as well. As shown in Fig. 8, the LSTM architecture employs a memory cell to keep previous state for a certain number of time slices while by using its non-linear gating mechanism it optimizes the information flow of input and output of the cell. LSTM is employed for system deep learning while overcoming complex nature of sequential time series data. This architecture contains three main parts including an input layer, an output layer and a certain number of hidden layers. Memory cells are used in the hidden layer such that each one has three gates including input gate (IG), forget gate (FG) and output gate (OG) plus a recurrent connection known as cell gate (CG). The cell unit of LSTM plays a critical role in this architecture because it remembers the most important values of previous data. LSTM has been proposed to solve the exploding and vanishing gradient problems that were occurred during training traditional RNNs.

LSTM structure.
In fact, the traditional RNNs use a single tanh layer; therefore they aren’t able to remember long term dependencies. To solve this problem LSTM uses four layers and employs the cells that save the information of a certain number of previous periods. These layers enable the LSTM to control memory of the system by maintaining or updating its values. Based upon the mentioned facts, one can interpret that LSTM is a useful tool to implement predictive models for long data sequences. LSTM uses some activation functions like sigmoid (σ) and tanh for proper data selection. A LSTM cell can be opened and closed by sigmoid (σ) function while the tanh function is used to conduct data to the output. Furthermore, some stochastic optimization functions like Adam [58] and RMSprop [59] are employed by LSTM. In the LSTM the following calculations are performed on each cell. Given x t as the input sequence and h t-1 as the previous block output, f t is calculated by Equation (25) to denote the information that must be forgotten by forget gate. For this purpose, Equation (25) uses sigmoid function (σ), as well.
In fact the sigmoid function is used to check the state of the cell. This is performed by employing the values of x t and ht - 1. Value 0 leads ignoring the cell’s state completely and value 1 leads maintaining its state. At the rest, C t and i t by using the input gate layer and a candidate denote the information that must be saved in the cell state. The sigmoid layer called the input gate layer decides which values would be updated. The tanh layer creates a vector of new candidate values that could be added to the state.
LSTM through Equation (28) combines the values of old cell state C t-1, the input part from input gate and also updating candidate part to achieve at new state for the cell.
Then, O t, according to equations (29) and (30) denotes the output of the observed cell and also the value of h t for the next cell, respectively. The sigmoid layer denotes the parts of the cell state that would go to the output. Then, the output of the sigmoid gate would multiply to the cell state.
LSTM performs much better than traditional RNNs, thus it has been applied in many different problems. Because of successfulness of LSTM we are interested to use it for forecasting the sampling rate of active biosensors in our approach.
As mentioned earlier, in our approach, we are interested to estimate the effects of employing LSTM rather than ANFIS to predict the sampling rate of active biosensors. There are several factors in LSTM that must be evaluated to select bests of them that lead lowest amounts of Root Mean Square Error (RMSE) and highest amounts of prediction accuracy. For this purpose we considered effects of number of hidden layers and also maximum number of training epochs in LSTM. We assumed 6 different values for the number of hidden layers including 5, 10, 20, 50, 150 and 200 layers. Additionally, for each kind of these layers we assumed 6 different values for the number of training epochs including 15, 30, 60, 100, 150 and 200 epochs. Thus, 36 different states were created. Then we calculated RMSE and prediction accuracy for LSTM (Normal) and LSTM (with Updating). The results of these estimations when using the dataset with 250 number of data are given in Table 2. Based upon the Table 2, optimum values for the number of hidden layers and maximum number of training epochs respectively are 10 hidden layers and 200 training epochs, because by these values, efficient amounts of RMSE and accuracy are resulted. By applying 20, 50, 150 and 200 hidden layers and also at least 150 learning epochs, same values for RMSE and accuracy can be resulted but it may lead over learning and over fitting for system in addition to depleting system resources. Therefore, it is much better to select the minimum values for number of hidden layers and training epochs to conduct the system to achieve at minimum RMSE and maximum accuracy. Hence, we choose 10 hidden layers for 200 training epochs when using the dataset with 250 data. In the case of using the dataset with 350 and 450 number of sampling rate data, same values for number of hidden layers and training epochs are achieved. Table 3 summarizes these results.
RMSE and Accuracy Affected by Different Number of Hidden Units and Maximum Epochs
RMSE and Accuracy Affected by Different Number of Hidden Units and Maximum Epochs
Efficient Parameters for LSTM
We considered three different datasets of different sampling rate amounts with 250, 350 and 450 data values ranging from 10 to 50 times per each period. Similar to ANFIS, we trained and tested the LSTM model with these datasets by dividing them into two separate sets including training dataset to train the LSTM model and testing dataset to test its performance in accurate sampling rate forecasting. Also, because of affective results of LSTM-Normal and LSTM-with Updating, we employed both of them and evaluated their functionality. The results of initial estimations on sampling rate forecasting by LSTM are shown in Fig. 9. In this regard, we used the dataset with 250 data (Fig. 9 (a)) and checked the performance of LSTM-Normal (Fig. 9 (b)) and LSTM-with Updating (Fig. 9 (c)) in sampling rate forecasting. Also, the similar initial results for two other datasets including 350 and 450 different values of sampling rates are represented in Fig. 10 and Fig. 11. In Fig. 10 (a), we can see the plot of 350 different sampling rates while these values in addition to forecasted values by LSTM (Normal) and LSTM (with Updating) respectively are shown in Fig. 10 (b) and Fig. 10 (c). Furthermore, based upon Fig. 11 (a), Fig. 11 (b) and Fig. 11 (c), same results for sampling rate forecasting are resulted by applying LSTM (Normal) and LSTM (with Updating) to the dataset with 450 sampling rate values. The results of initial estimations demonstrate successfulness of LSTM in sampling rate forecasting but more results with more details would be mentioned at section 6.

Sampling Rates (a), Sampling Rates and Forecasted Sampling Rates for: LSTM (Normal) (b) and LSTM (with Updating) (c).

Sampling Rates (a), Sampling Rates and Forecasted Sampling Rates for: LSTM (Normal) (b) and LSTM (with Updating) (c).

Sampling Rates (a), Sampling Rates and Forecasted Sampling Rates for: LSTM (Normal) (b) and LSTM (with Updating) (c).
Algorithm 5 indicates Advanced Activity Based Local Emergency Detection Algorithm with Adaptive Sampling Algorithm and Sampling Rate Prediction (ALED_AS_SRP) in which despite previous operations like local emergency detection and sampling rate determination by using modified Fisher test and Spline behavior function, the sampling rates for network nodes are forecasted by employing predictive models including ANFIS and LSTM. Therefore, one can say, algorithm 5 is the collection of all of our proposed methods for local emergency detection and sampling rate determination plus a new strategy for sampling rate forecasting based upon ANFIS and LSTM models. In algorithm 5, from round 1 until a round with a certain number (InitRound) the sampling rate of active biosensors is determined by ALED, modified Fisher test and also Spline interpolation function. By achieving at round number InitRound, the sampling rates of biosensors are calculated by using ANFIS model or LSTM model. For this purpose, SR.predict (round) is executed for all of alive biosensors to predict the sampling rate of next round by utilizing ANFIS model or LSTM model with mentioned details. As mentioned in algorithm 5, if the pivot biosensor observes the pivot feature value equal to 2 or 3, it’ll instruct the regular biosensors to increase their sampling rate to maximum possible amount (SR max ). This ensures the network to be ready against sudden changes of vital signs, as well.
Performance evaluation
This section indicates the results of performance evaluation of the proposed methods and compares them with previous works. For evaluating the functionality of the proposed approach and its effects on the network we simulated it by using MATLAB R2018b simulator. The results of simulations are compared with the simulations results of pervious sampling determination methods. We used a dual core lap top Dell Vostro 1310 with Intel Core 2 Duo T9300 / 2.5 GHz, 6 MB L2 Cache, 4 GB RAM and 800 MHz Data Bus Speed. Table 1 indicates the simulation parameters in MATLAB environment. During simulation, 6 biosensors have been considered for the wireless body area network to capture vital sign data and transmit the emergency packets to a decision making center.
In this section we mention the simulation results for estimating energy consumption, redundant overhead data production and data integrity in parallel with sampling rate determination and prediction. For simulation we used an online accessible database entitled MIMIC as the simulation dataset. MIMIC has been introduced by MIT laboratory and includes real information of vital sign data of about 40,000 different patients. We executed our approach for 70 to 175 periods and compared it with similar works. Fisher risk α was assumed as 0.05 for our approach. Additionally, three main features entitled systolic blood pressure, heart rate and oxygen saturation were considered in the simulation process. The activity information of the considered patient was also employed to activate and deactivate different biosensors in different observation time slices. Also the patient’s risk has been assumed as one of the main parameters during simulation, which has values between 0 and 1. In addition, the information of pivot biosensor was assumed as another parameter for determining sampling rate of active biosensors. Furthermore, for predicting the sampling rate of active biosensors we employed ANFIS and LSTM.
Data reduction evaluation
As mentioned earlier, our approach leads decreasing number of communicated data to the controller. In this part we show the simulation results of data reduction. In fact, by using the proposed methods for local emergency detection and accurate sampling rate determination, the number of communicated data must be adaptive with the situations of the patient. This is performed by ALED approach. The simulation results of number of captured and communicated data for our scenarios and comparison with similar previous method (LED* and Modified LED*) when the patient’s activity is non-critical and critical are respectively illustrated in Fig. 12 (a) and 12 (b). As shown in Fig. 12 (a) and 12 (b) there are different sampling rates for different periods that are the results of adaptive sampling rate determination. Usually, in parallel with non-critical patient’s activities and low values for pivot biosensor’s and patient’s risk, the sampling rate amount falls down to almost minimum value. Reversely, when the current patient’s activity belongs to critical group and either pivot biosensor’s value or patient’s risk is high, the sampling rate value will be close to its maximum possible value. In other cases, the sampling rate would be denoted between the minimum and maximum values. The biosensors in Modified LED* communicate the value of vital sign data to the controller if they observe any different between the data of two consequent periods. Our presented scenario performs like Modified LED*, but in addition, it considers patient’s activity information and pivot biosensor’s value for adaptive data communication, as well. According to the simulating results of number of communicated data that are illustrated in Fig. 12 (a) and 12 (b), our method outperforms similar previous work. As a numerical result, our scenario reduces the number of communicated data by 81%.

Number of Captured and Communicated Data when the Patient’s Activity is non-Critical (a) and Critical (b).
In this part we show the simulation results of energy expenditure of the network biosensors during running our scenarios and also previous similar works. As mentioned above, number of transmitted data is one of the most important factors which influence energy consumption of the network biosensors. Our approach reduces the number of communicated data and consequently energy consumption of the biosensors. This leads increasing lifetime of the considered wireless body area network.
Also, our approach despite reducing number of communicated data and also energy expenditure of the biosensors, keeps data integrity in controller, as well. Fig. 13 shows total remaining energy of the network by executing our scenarios and comparison with similar works. The network biosensors capture the vital sign data and communicate them to the controller so they consume energy. During simulation we assumed 700 energy units as the initial energy for all the network biosensors. Also, we assumed that each data transmission operation consumes one energy unit while each data receiving operation takes only 0.3 energy unit. The simulation results of energy expenditure by applying A* algorithm (non-adaptive data communication), LED* algorithm, Modified LED* algorithm, the algorithm of Ref 19 and our approach (ALED) can be seen in Fig. 13. Based upon Fig. 13, our approach outperforms previous works. The proposed method employs the information of patient’s activity as well as the pivot biosensor’s value and patient’s risk to perform adaptive biosensor activation and also adaptive sampling over the monitored network. In addition, in the proposed scheme we introduced, explained and used the modified Fisher test as a modification of ANOVA model with weighted observations. Also, we considered parameter α equal to 0.05 in modified Fisher test.After using the modified Fisher test we developed and utilized the cubic Spline interpolation method as the behavior function to achieve at optimum sampling rate. Based upon Fig. 13, our scheme performs much better than same works in the case of energy efficiency. By using A* algorithm, after 25 periods, the total remaining energy of the network falls down to 0. Also, according to Fig. 13, the network useful lifetime by employing Ref 19, LED* and Modified LED*, respectively finishes after 60, 104 and 165 periods while at this moment, by employing our approach the network still continues its functioning, as well. In fact, after 165 periods, by using ALED, 73% of network initial energy is still remained. Thus, our method has significant effects on the network energy efficiency and its lifetime.

Total Network Remaining Energy Comparison.
As stated above, we used ANFIS and LSTM models to forecast the sampling rate of active biosensors. To use the benefits of these models and show their performance we trained the system by using train data and then tested the system by employing test data. In this part we present the simulation results of performing ANFIS and LSTM in forecasting sampling rate of network nodes. For this goal, Mean Square Error (MSE), Root Mean Square Error (RMSE), Error Mean, Error St.D and Accuracy of forecasted data after using ANFIS and LSTM are calculated and illustrated. As mentioned earlier, we employed three different data set including 250, 350 and 450 sampling rate data. Also, we extracted 90 percent of dataset for training and 10 percent for testing. Figs. 14, 15 and 16, represent results of applying LSTM (Normal), LSTM (with Updating), ANFIS (Subtractive Clustering) and ANFIS (FCM) on the test data of these datasets. To clarify the effectiveness of employed techniques, the target data and output data are respectively drawn by black and red colors.

Sampling Rate Forecasting for 25 test data for LSTM (Normal) (a), LSTM (with Updating) (b), ANFIS (Subtractive Clustering) (c) and ANFIS (FCM) (d).

Sampling Rate Forecasting for 35 test data for LSTM (Normal) (a), LSTM (with Updating) (b), ANFIS (Subtractive Clustering) (c) and ANFIS (FCM) (d).

Sampling Rate Forecasting for 45 test data for LSTM (Normal) (a), LSTM (with Updating) (b), ANFIS (Subtractive Clustering) (c) and ANFIS (FCM) (d).
The simulation results for sampling rate forecasting of test data for LSTM (Normal), LSTM (with Updating), ANFIS (Subtractive Clustering) and ANFIS (FCM) when using the data set with 250 data, are respectively shown in Fig. 14 (a), Fig. 14(b), Fig. 14(c) and Fig. 14(d). Also the simulation results of applying these techniques on the datasets with 350 and 450 data are shown respectively in Fig. 15 and Fig. 16. Error rate evaluations of test data after applying LSTM (Normal), LSTM (with Updating), ANFIS (Subtractive Clustering) and ANFIS (FCM) to the dataset with 250 number of sampling rate data are mentioned in Fig. 17. Mean Square Error (MSE), Root Mean Square Error (RMSE), Error Mean and Error St.D. of forecasted test data after applying four techniques to the dataset with 250 number of sampling rate data can be seen in Fig. 17 (a), Fig. 17(b), Fig. 17(c) and Fig. 17(d). At the other hand the results of similar estimations after applying four mentioned strategies on the datasets with 350 and 450 number of data can be considered respectively in Figs. 18 and 19. Figs. 17, 18 and 19 demonstrate that the four mentioned techniques namely LSTM (Normal), LSTM (with Updating), ANFIS (Subtractive Clustering) and ANFIS (FCM) are capable of forecasting sampling rate of active biosensors with low amounts of estimation error. To show the functionality of our approach in accurate sampling rate forecasting we attended to regression plot of target and output. Regression plot of test data for LSTM (Normal), LSTM (with Updating), ANFIS (Subtractive Clustering) and ANFIS (FCM) are shown in Figs. 20, 21 and 22. Accuracy of sampling rate forecasting after applying LSTM (Normal), LSTM (with Updating), ANFIS (Subtractive Clustering) and ANFIS (FCM) to the dataset with 250 number of sampling rate data are respectively represented in Fig. 20(a), Fig. 20(b), Fig. 20(c) and Fig. 20(d).

Error rate evaluations in sampling rate forecasting for 25 test data for LSTM (Normal) (a), LSTM (with Updating) (b), ANFIS (Subtractive Clustering) (c) and ANFIS (FCM) (d).

Error rate evaluations in sampling rate forecasting for 35 test data for LSTM (Normal) (a), LSTM (with Updating) (b), ANFIS (Subtractive Clustering) (c) and ANFIS (FCM) (d).

Error rate evaluations in sampling rate forecasting for 45 test data for LSTM (Normal) (a), LSTM (with Updating) (b), ANFIS (Subtractive Clustering) (c) and ANFIS (FCM) (d).

Regression plot for test data for LSTM (Normal), LSTM (with Updating), ANFIS (Subtractive Clustering) and ANFIS (FCM).

Regression plot for test data for LSTM (Normal), LSTM (with Updating), ANFIS (Subtractive Clustering) and ANFIS (FCM).

Regression plot for test data for LSTM (Normal), LSTM (with Updating), ANFIS (Subtractive Clustering) and ANFIS (FCM).
Because of using 10 percent of dataset for testing, the mentioned techniques are applied to 25 number of data. All of the target and output value are within range 10 and 50. Like Fig. 20, the results of applying four mentioned strategies to datasets with 350 and 450 number of sampling rates respectively are represented in Fig. 21 and Fig. 22. By considering these figures we can inference that the proposed strategies are very successful in forecasting sampling rate of active biosensors because these methods can forecast the sampling rate of biosensors with at least 90% of accuracy. In fact, based upon these figures we can inference that LSTM (with Updating) is able to predict the sampling rate of network biosensors with about 97% which is an acceptable output. Thus, we can trust to the results of the proposed sampling rate forecasting strategies and employ them to achieve at future information of the patient. Therefore, the corresponding alarms can be issued before a sudden event happens for the monitored patient. Table 5 summarizes MSE, RMSE, Error Mean, Error St.D. and Accuracy of four forecasting strategies when the dataset with 250 number of sampling rate data is employed. According to Table 5, LSTM (with Updating) outperforms other methods in all the mentioned estimation factors despite Error Mean in which LSTM (Normal) is the best. Also, Table 6 represents MSE, RMSE, Error Mean, Error St.D. and Accuracy of proposed methods when they are applied to the dataset with 350 number of data. Based upon Table 6, ANFIS (Subtractive Clustering) is the best method for MSE, RMSE and Error Mean, while in the case of Error St.D. and Accuracy, LSTM (with Updating) and LSTM (Normal) respectively are the bests. In addition, similar estimation results in the case of using the dataset with 450 number of data are illustrated in Table 7. According to Table 7, LSTM (with Updating) is the best method in all factors despite Error Mean in which LSTM (Normal) outperforms other methods. For better evaluation of mentioned methods in sampling rate forecasting we compared the performance of LSTM (Normal), LSTM (with Updating), ANFIS (Subtractive Clustering) and ANFIS (FCM) when applied to our three datasets in terms of MSE, RMSE, Error Mean, Error St.D. and Accuracy. Table 8 and Fig. 23 show MSE estimation of different methods when applied to the three datasets.
Simulation Parameters in MATLAB
MSE, RMSE, Error Mean, St.D. and Accuracy when number of data is 250
MSE, RMSE, Error Mean, St.D. and Accuracy when number of data is 350
MSE, RMSE, Error Mean, St.D. and Accuracy when number of data is 450
MSE estimation of different methods when applied to the three datasets
According to Table 8 and Fig. 23, LSTM (with Updating) outperforms other methods in the case of Mean Square Error (MSE) when the dataset with 250 or 450 number of data is used. In the case of using the dataset with 350 number of data, ANFIS (Subtractive Clustering) has the best MSE. At the other hand, in terms of average MSE, LSTM (with Updating) is also the best. Also, Table 9 and Fig. 24 illustrate RMSE estimation of proposed strategies when applied to the three datasets. Based upon Table 9 and Fig. 24, LSTM (with Updating) performs better than other methods in the case of Root Mean Square Error (RMSE) when using datasets with 250 or 450 number of data; but when the dataset with 350 number of data is employed, ANFIS (Subtractive Clustering) is the best one while in terms of average RMSE, LSTM (with Updating) is the most successful method. Results of Error Mean estimations after employing our approach in sampling rate forecasting for all of the datasets can be considered in Table 10 and Fig. 25. In terms of Error Mean, it seems LSTM (Normal), ANFIS (Subtractive Clustering) and LSTM (with Updating) respectively are the best strategies by using datasets with 250, 350 and 450 number of data while in average, ANFIS (Subtractive Clustering) has the best outcome. Error St.D. estimations of different methods when applied to the three datasets are illustrated in Table 11 and Fig. 26. Accordingly, by applying LSTM (with Updating) to all the three datasets always minimum amounts for standard deviation of error are resulted compared to other methods. Results of Accuracy estimation of different methods when applied to the three datasets can be seen in Table 12 and Fig. 27. In the case of accuracy, we must select the strategy which achieves at maximum amount of accuracy in comparison with other estimated methods. By considering this fact and looking at the Table 12 and Fig. 27, we can result that LSTM (with Updating) achieves at best amounts of forecasting accuracy when using 250 or 450 number of data. In the case of employing 350 number of data, LSTM (Normal) has the best accuracy. At the other hand, by considering average accuracy column we can inference that LSTM (with Updating) outperforms all other methods. In fact, by utilizing LSTM (Normal) or LSTM (with Updating) we can make sure that the future sampling rates of active biosensors can be forecasted with about 97% accuracy which is an acceptable outcome.

MSE estimation of different methods when applied to the three datasets.

RMSE estimation of different methods when applied to the three datasets.

Error Mean estimation of different methods when applied to the three datasets.

Error St.D. estimation of different methods when applied to the three datasets.

Accuracy estimation of different methods when applied to the three datasets.
RMSE estimation of different methods when applied to the three datasets
Error Mean estimation of different methods when applied to the three datasets
Error St.D. estimation of different methods when applied to the three datasets
Accuracy estimation of different methods when applied to the three datasets
We have run ANFIS and LSTM on three datasets and represented the results. In fact, both of these techniques can forecast the sampling rates of the biosensors with acceptable accuracy. Generally, LSTM is more successful in forecasting the future values of times sires of sampling rates, because LSTM is a kind of artificial recurrent neural network (RNN) architecture which is used in the field of deep learning. LSTM networks are very good at holding long term memories and can be employed in sequence modeling, as well. In addition, each LSTM unit includes a cell, an input gate, an output gate and a forget gate. The cell is capable to remember values over arbitrary time intervals and the three gates regulate the flow of information into and out of the cell. Despite advantageous of ANFIS, it suffers from limitations that halt applications in problems with large inputs. Hence, although ANFIS is a useful way in data inference, data fusion and sequence forecasting, but the simulation results and comparisons performed in the current research demonstrate LSTM can perform better than ANFIS in the case of forecasting sampling rate of biosensors in WBANs.
In this paper we proposed a scheme for aiming at determining and forecasting sampling rate of active biosensors in Wireless Body Area Networks (WBANs). The proposed scheme divides the functionality time of the network into two parts: first part in which the sampling rate of the biosensors in the next round is determined and the second part in which the sampling rate would be forecasted. Sampling rate determination is performed by introducing and using modified Fisher test, developing and using Spline interpolation method, introducing and utilizing three main parameters. The utilized parameters are information of patient’s activity, value of patient’s risk and also value of pivot biosensor. Furthermore, sampling rate forecasting was performed by using Adaptive Neuro Fuzzy Inference System (ANFIS) and Long Short Term Memory (LSTM). The simulation results proved successfulness of the proposed schemes in decreasing number of communicated data, reducing energy expenditure of biosensors and high accurate forecasting sampling rate of biosensors in the future rounds. Hence, the proposed approach leads energy efficient performance of the network in addition to forecasting future status of the patient and network biosensors. For future work, we intend to test our proposed approach in Industrial Internet of Things (IIoT) application to control energy consumption of industrial sensors and forecast future status of the IIoT. Also, we plan to test and use more deep learning techniques in forecasting sampling frequency of sensors.
Conflict of Interests
The author declares no conflict of interest.
Ethical Considerations
This study was also approved by the Ethics Committee of Islamic Azad University, Dezful Branch and written informed consent was obtained from all participants.
Funding/Support
Islamic Azad University, Dezful Branch.
Footnotes
Acknowledgments
The author acknowledges the Islamic Azad University, Dezful Branch, who participated in this research paper.
