Performance evaluation of a WSN system for distributed event detection using fuzzy logic

Performance evaluation of a WSN system for distributed event detection using fuzzy logic

Ad Hoc Networks 23 (2014) 87–108 Contents lists available at ScienceDirect Ad Hoc Networks journal homepage: www.elsevier.com/locate/adhoc Performa...

1MB Sizes 1 Downloads 98 Views

Ad Hoc Networks 23 (2014) 87–108

Contents lists available at ScienceDirect

Ad Hoc Networks journal homepage: www.elsevier.com/locate/adhoc

Performance evaluation of a WSN system for distributed event detection using fuzzy logic Sofia Maria Dima ⇑, Christos Panagiotou, Dimitris Tsitsipis, Christos Antonopoulos, John Gialelis, Stavros Koubias Department of Electrical and Computer Engineering, University of Patras, Patras, Greece

a r t i c l e

i n f o

Article history: Received 24 June 2013 Received in revised form 29 January 2014 Accepted 24 June 2014 Available online 3 July 2014 Keywords: WSNs Event recognition Fuzzy logic Health status Task scheduling Distributed data mining

a b s t r a c t The research field of event detection in realistic WSN environments has attracted a lot of interest, with health monitoring being one of its most pronounced applications. Although efforts related to the healthcare applications exist in the current literature, there is a significant lack of investigation on the performance of such systems, when applied in error prone and limited resource wireless environments. This paper aimed to address this need by porting a Fuzzy Inference System (FIS) to a WSN simulation framework. The considered FIS is implemented on TelosB motes and evaluates the health status of a monitored person, in an energy conserving manner. A distributed implementation of the above FIS is also proposed, comprising an additional contribution of this paper, based on an objective function, attempting to reduce the network congestion and balance the energy consumption between network nodes. This work presents a thorough performance evaluation of the FIS under the distributed and the centralized approach, while varying the communication conditions and highlighting the advantages of the distributed execution of the FIS, leading to packet loss gain and transmission gain up to 67% and 25% respectively. The networking benefits from the distributed approach are reflected to the FIS performance. Respective results and comparative evaluation against Matlab simulations reveal strong dependencies of the application’s performance to critical WSN network parameters. Ó 2014 Elsevier B.V. All rights reserved.

1. Introduction In recent years, Wireless Sensors Networks (WSNs) have emerged as a promising research field and have been used in a wide variety of applications including industrial control, environmental monitoring, and healthcare applications. The primary objective in such WSN applications was the accurate and reliable monitoring of an environment, based on the processing of the sensors values and the identification of irregular situations or dynamic real life events. The collaborating monitoring tasks lead to ⇑ Corresponding author. Tel.: +30 2610962485. E-mail address: [email protected] (S.M. Dima). http://dx.doi.org/10.1016/j.adhoc.2014.06.004 1570-8705/Ó 2014 Elsevier B.V. All rights reserved.

specific action scenarios, so as to control the monitored environment. The process of observing a real phenomenon and evaluating its behavior is known as event detection in WSNs [1]. Generally, the real events can be distinguished in two categories: single modality and multi-modality events [2]. The former concerns the examination of the values of each parameter separately, and based on the assumption that if any of these exceed a specific ‘‘normal’’ range, an event occurs [3]. The latter category includes the multimodality events which are based on the correlation of several attribute values, the processing of whom indicates the occurrence of an event [4]. The target of event detection in WSN focuses on energy saving, data integrity and deeper

88

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

insight into the monitored environment. Therefore, the development of a classification model is essential for the accurate recognition of an event, along with the reduction of the communication overhead. The classification of an event can be defined as the process of evaluating an event of interest using multiple sensor nodes (multi-modality event). This processing may vary from a trivial rule engine machine to a complex machine learning algorithm, while the final outcome of this process triggers specific action scenarios. From this perspective, the classification of an event is strongly connected with the communication conditions between the actuation units in order to optimize the monitoring and control of the environment. More specifically, considering an application which is based on single-modality events when a sensor value exceeds an upper/lower bound (i.e. temperature in an environmental monitoring application), this indicates the generation of an event (i.e. fire alarm). However, in many cases, such decisions may lead to false alarms, since most of the events depend on multiple monitored parameters. In the fire alarm example, an accurate decision should take into consideration the existence of smoke and luminosity level along with the temperature value. Alarm situations trigger specific reactions and thus, node to node communication (actor-to-actor coordination schemes) [5]. Therefore, false alarms will lead to an application’s performance degradation, as well as to an increase of network traffic and energy consumption. Hence, the need for more sophisticated multi-modality classification processes arises that will optimize the application’s accuracy and will avoid redundant communication among the actuation units. Considering also that the communication modules are the most energy consuming components of a sensor node, the lifetime of the node and the network’s health status is anticipated to be increased respectively. In that respect, the utilization of classification algorithms [6] (i.e. Fuzzy Inference Systems-FIS), in WSNs regarding the identification of complex events is crucial in achieving the aforementioned objectives. Existing data mining techniques can offer several algorithmic solutions [7] to this field. However, they require high processing capabilities and abundant memory availability, in order to satisfy specific execution time limitations. Such assumptions contradict to typical WSN characteristics, where the sensor nodes suffer from limited processing power and available memory. The aforementioned characteristics, in combination with the error prone nature of wireless communications, raise the challenge for designing distributed, highly efficient, yet low complexity and low resource-demanding data mining algorithms in WSNs. As a result, in realistic WSN applications, the distributed implementation of these computational intensive-algorithms proves to be highly beneficial toward balancing CPU load among several nodes. In addition, the distributed implementation of an algorithm increases onsite processing, and can potentially reduce the number of transmissions, leading to bandwidth saving and network relaxation. Moreover, the performance of these algorithms in WSNs effectively pertains to the network’s QoS metrics.

An indicative example could concern the case where, the outcome of the classification process is extracted using invalid inputs. This could be caused by several factors, i.e. the input values may not be up-to-date because of some transient problematic network conditions, such as network congestion, resulting to increased packet loss and delay, or node mobility leading to network dis-connectivity. Traditional data mining approaches do not consider these problems. Specifically, the input data are assumed to be always valid (in time and without errors), while the execution delay is assumed negligible due to abundant processing resources. This work offers a comprehensive study of these problems under a WSN environment and propose a framework enabling application of existing data mining algorithms in the WSNs, considering the distributed processing power, the communication cost, and the algorithm’s sensitivity to invalid inputs. Hence, we study a fuzzy logic system in a healthcare scenario by simulating a realistic WSN infrastructure characterized by significant communication challenges. In our previous work [8] a centralized implementation of this system was presented, where a TelosB mote was considered as a cluster head, being responsible for the reception of all the generated packets and the FIS execution. The evaluation results proved the sensitivity of the system’s performance to the networking conditions and the cluster head’s overloading. Driven by these observations this paper addresses the lack of a comprehensive study on implementing in an efficient way data mining algorithms for WSNs applications. Toward this objective, this work investigates the FIS’s performance under two different scenarios: centralized and distributed execution. As the centralized approach is characterized by unbalanced CPU and communication workload among the sensor nodes, we propose a distributed approach to split the execution of the FIS among the nodes, trying to optimally balance the energy consumption between the nodes and diffuse the network traffic avoiding the all-to-one communication scenarios. Moreover, we try to explore how the wireless channel conditions, the network topology (1-hop and multihop routing paths) and the packet arrival rate affect the overall performance of the FIS and the final outcome of the system. The contribution of this paper is threefold. Firstly, to the best of our knowledge it is the first attempt for an online execution of a fuzzy logic system considering the limitations and the restrictions of a WSN infrastructure. We implemented a centralized health FIS in a well known WSN platform, and port the Matlab oriented algorithms– Mamdani’s model [9], fuzzy max aggregation, max implication, centroid of the graph defuzzification method [10] to C based functions which are able to be executed on a TelosB platform, taking into account the processing and memory resources. Secondly, a comprehensive comparative study and evaluation effort is presented, concerning the execution of the FIS following a centralized and a distributed approach, trying to allocate efficiently the CPU and communication workload over multiple nodes. For the task distribution we considered an objective function, which is based on the CPU workload of each task, and the communication cost that the network topology

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

introduces. Thirdly a comprehensive investigation through respective result analysis is addressed, showing how the network conditions affect the system’s performance. The remainder of this paper is organized as follows. In Section 2 relevant works are presented. In Section 3 an introduction to the data mining domain is presented and the system model is exhibited, while in Section 4 the necessity of a distributed execution of a high processing algorithm (classification algorithm) through task scheduling is analyzed. The holistic framework for evaluating the aforementioned concept is analyzed in Section 5. The performance analysis of our work is depicted in Section 6. Finally, in Section 7 the conclusions of our work are presented.

2. Related work We categorize the related work based on the two basic aspects that this work is going to address: the application of a FIS in a healthcare application under a WSN infrastructure, and the distributed execution of an algorithm considering the processing and the communication cost. The application of the fuzzy logic in the healthcare domain has been addressed by several studies in current literature. However, networking conditions are not taken into consideration in order to evaluate their impact to the final outcome of the system. More specifically, in [11] the authors have proposed a remote monitoring solution which allows the elderly people to live at home in safety. In the same way, Medjahed et al. have also presented in [12] a fuzzy logic system targeting recognition of daily activities, considering ubiquitous healthcare scenarios. However, both papers do not consider networking challenges i.e. potential packet loss, or untimely arrivals of packets. Moreover, the implementation of these fuzzy healthcare systems is not considered on WSNs, which are characterized by low computational and memory resources. However, there are some applications (not health related) which utilize the fuzzy logic and are targeted in WSN environments. Nevertheless, these works, also, do not consider the impact of the wireless medium to the performance and to the predictability of the FIS. Specifically, in [13], a fuzzy rule based system for fire detection is proposed, based on environmental values, while in [14] a fuzzy logic system for controlling home appliances is proposed, so as to create the smart home environment. The same use case scenario is considered in [15], where the authors offer an interesting analysis, targeting reduction of false alarms in fire-detection scenarios, under the utilization of the fuzzy logic framework. In addition they proposed the use of spatial and temporal characteristics into the rule-base so as to increase the system’s accuracy, while they proposed techniques for reducing the exponential growth of the rule-base without compromising the accuracy of event detection. As the authors claimed in their manuscript: The main goal of this work was threefold (a) to recommend fuzzy logic as an accurate technique for detecting various events (b) to propose new characteristics that will serve as inputs to the fuzzy engine so as to reduce the number of false alarms and (c) to propose new

89

techniques for reducing the rule set length, so as to allow its storage to the limited sensor’s memory. The evaluation analysis was performed utilizing the FuzzyJ Toolkit software, while the authors used the fire events public database from NIST so as to evaluate their system. At this point it is important to note that this software is not a network simulator and the performance results were not affected by networking constraints such as sensors disconnectivity, packet loss and latency. Moreover, an energy estimation of how this algorithm exhausts sensor’ s resources is not taken into consideration. These limitations have also commented by the authors, in the Conclusions Section, mentioning that the fuzzy logic algorithm was not run in sensor platforms. Moreover the experimental analysis did not take into consideration the networking characteristics, and how these can affect algorithm’s performance. Such monitions raise concerns regarding the results practicality and accuracy considering a realistic WSN setup. Finally, the distributed application of the above FIS has not been considered as a possible solution for efficient allocation of computational cost and reduction of communication load as well. Furthermore, a congestion fuzzy logic estimation model for QoS in wireless sensor network is presented in [16], while the evaluation results confirm that the proposed FIS is able to efficiently sort out traffic and minimize packet loss, even in critical scenarios. In addition, the authors of [17] present an activity recognition architecture utilizing multi-node collaboration and fuzzy logic, in order to produce a reliable recognition result from unreliable sensor data. Moreover, in [18] it is proven that fuzzy logic can be effectively used to enable location estimation in mobile robots, while they emphasize the reduced computational requirements and heuristic determination of combination rules. Nevertheless, none of the above papers present evaluation results of the required energy for executing the classification system or comparative metrics of the performance and the sensitivity of the fuzzy algorithm, under critical networking conditions. Secondly the problem of the distributed execution of an algorithm over WSNs, has been investigated and is known as task allocation problem. The authors of [19] emphasize on the weakness of the direct implementation of existing computational intensive algorithms in WSNs due to limited resource availability and shared communication medium. They propose an application-independent task mapping and scheduling solution for multihop topologies in WSNs able to map tasks of an application based on the minimization of the energy consumption and the delay. Moreover, in [20] the authors note that data fusion techniques are important in order to reduce communication traffic. However such methods introduce additional computation effort, and unbalanced network traffic and energy consumption among the nodes. Therefore the authors propose two models, the communication model to describe the network topology as well as the communication data flows, and the task model which describes the sensing and processing tasks and the dependencies between these tasks. These dependencies are defined by the essential communication processes that have to be done in order to enable the application’s execution. They formulate the above problem as a quadratic programming problem and

90

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

evaluate it in different networking topologies, with a given task model. Another solution is introduced in [21], where the divide-and-conquer technique is utilized in order to partition a set of real time tasks with dependencies and a Markov Decision Process method is also used so as to schedule sequential tasks. The evaluation results showed a better time response and less energy consumption. Finally, in [22] the authors present an energy efficient task assignment and a distributed task migration for WSNs. As the computation tasks are strongly connected with specific communication tasks, the execution of a processing task may be migrated into a neighbor node if the node’s remaining energy is less than a threshold. This collaboration between sensor nodes achieves optimization on the energy consumption. However, the aforementioned works highlight the problem of task scheduling, there is not a use case scenario of how these methodologies can be applied in a specific WSN infrastructure using a well known computational intensive algorithm for splitting the algorithm into parallel and sequential tasks. Actually this splitting of the algorithm should take into consideration the communication and processing dependencies that are created, which are essential for the task distribution. In this work the two aforementioned aspects are merged in a healthcare application, where the health status of a monitored human is detected using a fuzzy logic system. The workload of this fuzzy logic algorithm is split to some independent tasks that can be executed parallel and some tasks that have dependencies with the outputs of the independent tasks. These subtasks are allocated to different sensor nodes considering the computation load as well as the communication load which depends on the network topology. 3. Data classification in WSNs The basic aim of using data classification techniques in WSNs was to apply sophisticated methods to a huge amount of data so as to achieve accurate classification results [23]. The increasing use of sensing units, the need for acquiring data and apply knowledge on them, as well as the need for confirming the presence of an ambiguous event arises the necessity for the development of adequate data mining techniques, based on several modalities. The multi-modality events are based on the relational sequence of single-modality events and require such a fusion process so as to derive a safe conclusion, able to activate the actuation units. The resulted conclusion is that higher accuracy can prevent unnecessary communications between the actuation units, enabling also the reduction of the communication overhead for sensor-actor communication. Regions of interest are constructed and the local sensors’ values are processed by a classification algorithm, which can be executed by a node or a subset of nodes (centralized/distributed approach) reducing the direct transmissions to the actuation units which they will finally decide the reactions to the monitored environment. Considering the centralized architecture, a central server maintains a database of all sensors’ readings. The sensor nodes send their values to this server node, which is able to perform the classification algorithm. In this way, the

whole processing effort is placed on the cluster head node, which is responsible to extract from the data flows the high-level information needed for the efficient monitoring of the system. On the distributed approach the CPU load is split, achieving at least an energy consumption balance. Several data classification algorithms can provide a solution to the problem of event detection: fuzzy logic systems, Bayes Networks. Fuzzy logic is a well adapted algorithmic framework for multi-sensor scenarios. It deals with uncertainty and inaccuracy and it can be built based on experts’ experience. It is also a low computational cost solution comparing with other algorithms such as Support Vector Machines. Hence, it correlates perfectly with the nature of our application. The use of Fuzzy systems in classification problems has also been highlighted by several works [24,15]. The imprecise sensor’s values, the complexity of determining precise thresholds when more than one parameters are involved in an event detection scheme, the potential conflicting rules lead us to believe that using crisp values to describe WSN events is not the most suitable approach. Fuzzy logic, on the other hand, can address these challenges better than crisp logic. In this work we consider as a use case scenario a healthcare assessment application, able to evaluate the health status of a monitored person, while a Fuzzy Inference System is utilized so as to classify the health status. The healthcare application serves as a use case study. The healthcare domain is a critical, for many reasons, domain posing respective challenges. A respective reason pertains to the fact that heterogeneous sensor values are semantically related, and thus they have to be merged so as to derive a safe conclusion. There are two main factors that should be satisfied in case of health related applications. First of all the detection of abnormal situations and the emergent response, and secondly the reduction of false alarms rate. However, the effective addressing of the above requirements posses specific requirements making the use of crisp thresholds unsuitable for our application. In contrast, the use of fuzzy logic seems to offer a good solution [15]. In addition, fuzzy logic can efficiently handle sensors measurements fluctuations (due to sensors’ hardware imprecisions), thus leading to a reduction to the false alarms rate compared to crisp logic. However the output of the fuzzy logic system requires that the pattern of the input values is always in time and their timestamp is close to the time that the FIS is executed. These two assumptions are at stake, in case of sensor networks as the delay and the packet loss ratio (and in general networking related phenomena) can cause problems to the correct execution of the fuzzy system. Hence, the vital importance of health related applications, arises the necessity for a comprehensive study of the FIS under several networking conditions. In addition techniques that can reduce the affect of the networking quality of service to the algorithm’s performance (i.e. centralized distributed approach) should be investigated. The errorprone nature of the wireless communication is a critical constraint not only for healthcare applications. Concluding both the nature of the application (requiring advanced methods of data management i.e. fuzzy logic system) and the nature of the environment (i.e. wireless sensor networks) posses numerous of challenging issues.

91

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

In fuzzy logic, numerical values are replaced by linguistic variables. According to Zadeh [25] linguistic variables are ‘‘variables whose values are not numbers but words or sentences in a natural or artificial language’’. As indicative example the heart rate, where the numerical value of 65 bpm can be considered as normal heart rate. The structure of a Fuzzy Inference System consists of the following four modules: fuzzification unit, fuzzy rule engine, inference engine, defuzzification unit. The fuzzification unit converts a crisp value into degrees of membership by applying the corresponding membership function. A membership function determines the certainty [0–1] with which a crisp value is associated with a specific linguistic value. The fuzzy rule engine consists of a set of linguistic statements, called rules. These rules are of the form IF antecedent, THEN consequent where the antecedent is composed of fuzzy input variables connected by logical functions (e.g. AND, OR, NOT) and the consequent is a fuzzy output variable. Each set of the inputs should activate at least one rule. The inference engine applies reasoning to compute fuzzy outputs. For every rule that is activated its weight is calculated based on the logical operands (Mamdani Model). We categorize the rules based on the linguistic variable of the consequent. Applying the implication method, we use the rules’ weights so as to define the overall weight [0–1] of each output’s linguistic variable. Using the shape and the weight of each output’s linguistic variables a set of fuzzy output can be calculated using the aggregation method. The defuzzification unit is the transformation of this set of percentages into a single crisp value. The most common method for extracting the crisp output is the center of gravity method.

Table 1 Membership functions of the fuzzy inputs. Membership functions with fiducial points Heart rate

Alarm: trapezoidal (0, 0, 30, 50) + trapezoidal (140, 160, 199, 199) Possible alarm: trapezoidal (30, 50, 60, 80) + trapezoidal (110, 130, 140, 160) Normal: trapezoidal (60, 80, 110, 130)

Sound class

Possible-alarm: triangular (7.5, 15, 22.5) Alarm: trapezoidal (12.5, 22.5, 30, 30) Normal: trapezoidal (5, 5, 10, 10) No-signal: trapezoidal (1, 1, 1, 1)

Activity

Immobile: trapezoidal (0, 0, 7, 10) Rest: trapezoidal (7, 10, 20, 30) Normal: trapezoidal (20, 30, 40, 60) Tense: trapezoidal (40, 60, 100, 100)

Fall detection

No-fall: singleton (0) Fall: singleton (1)

Time

Day: Trapezoidal (6, 8, 16, 18) Night: trapezoidal (0, 0, 6, 8) + trapezoidal (16, 18, 24, 24)

Health status

Alarm: Gaussian (18, 11.98) No-alarm: Gaussian (18, 87.35)

1

Degree of membership

3.1. Overview of fuzzy logic

0.8 0.6 0.4 0.2 0

3.2. Health status fuzzy inference system In our proposed distress situation detection algorithm the set of input fuzzy variables are: sound class SC 2 {NoSignal, Alarm, Normal, Possible Alarm} heart rate HR 2 {Alarm, Normal, Possible Alarm} activity A 2 {Immobile, Normal, Rest, Tense} fall recognition F 2 {Fall, Not Fall} time of day T 2 {Day, Night} and the health status (HS) is the resulting output HS 2 {alarm: A, not-alarm: NA}. The input variables are collected by the related sensor nodes and are used as input to the FIS. Mamdani’s model is considered for this fuzzy system. For each crisp value, the degree to which they belong to a predefined fuzzy set is determined via membership functions. The membership functions are defined on each input variable as trapezoidal and triangular functions [26] and are listed in Table 1. As indicative example the membership functions of the heart rate along with the linguistic variables are illustrated in Fig. 1. The thresholds for an individual’s parameters are defined by physicians and can be easily adjusted. The core

alarm

0

20

40

60

possible alarm

80

normal

100 120 140 160 180 200

heart−rate Fig. 1. Membership function of the heart rate.

of the FIS is the rule system which leads the inference system to produce the fuzzy outputs. Using the number of linguistic variables for each input the total number of rules is defined 192ð4  3  4  2  2Þ. As validated [27], a subset of them can be selected so as to reduce both network traffic and processing and memory requirements, while preserving the system’s accuracy and predictability. The ability of the proposed FIS itself to assess human’s status as a fuzzy logic system has indeed been checked by physicians. The fundamental rules (Table 2) have been extracted using medical studies [28] and have been checked by physicians. The utility of fuzzy logic can be shown with an indicative example. Assuming the following values for each fuzzy input: sound class: 6.24, heart rate = 100, activity = 56, time = 9, fall = 0. In such a scenario, since, the value of heart rate is quite high the crisp logic will conclude that there is an abnormal situation. However, according to fuzzy logic the well-being is 86.2%, clearly invalidating the result of the crisp logic. Furthermore, for reasons of completeness a simulation scenario is provided, so as to

92

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

Table 2 Rule engine. Inputs

Rules

IN

R1

Heart alarm Heart normal Heart possible alarm Sound NoSignal Sound alarm Sound normal Sound possible alarm Activity immobile Activity normal Activity rest Activity tense Fall Not fall Day Night Health status

x x p

R2 p x x x x x x x x x x x x x x A

x p x x p x x x x p x p A

R3

R4

R5

R6

R7

R8

R9

R10

R11

R12

R13

R14

R15

R16

R17

R18

R19

x x p

x x x x p

x x p

x x x x x x p

x x p

x p

x p

x p

x p

x p

x x x x p

x x x x x x x p

x x p

x x x x x x x p

x x x x x p

x x x x x x x x p

x x x x x x p

x x p

x x p

x x NA

x x NA

x x x x x x x x x x x x p

x x p

x p

x x x x x x x x x x p

x x x x x x x x x x x p

x p

x x x p

x x p p

x x x x x x p x x x x x A

x x x x x p x x x p A

x x x p p x x x x p p x A

x x x x p x x x A

x x x x x x x p x x p x NA

x x p x x x x x x NA

Table 3 Fuzzy logic vs crisp logic. Fuzzy logic High Risk

Medium Risk

Low Risk

8.33%

41.67%

50%



Normal 5.6%

Crisp Logic Abnormal 94.4%

show the advantages of fuzzy logic compared to crisp logic, is provided. It is noted that based on Table 2 the heart rate comprises the most critical parameter. In the crisp logic if the heart rate is above 120 bpm, an alarm situation is triggered. However, the fuzzy logic fuses the fuzzified heart rate (via heart rate membership function) with the other fuzzified inputs so as to extract a more objective evaluation concerning the normality/abnormality percentage of the health status. Specifically, in the context of the considered simulation, we assume that the heart rate is higher than 85 bpm with a percentage of 95%, while the activity is configured so as to generate values higher than 30%. All the other inputs are handled to generate ‘normal’ values. Consequently, patterns consisted of all the input parameters paired with the respective health status are generated. Studying the respective results there are cases, where the heart rate value is labeled as alarm or possible alarm and the health status is quite high. For these reasons, we categorize the health status in three categories highrisk (0–33.3%), medium risk (33.4%-66.6%), low-risk (66.6–100%). The results of fuzzy logic and crisp logic implementations are listed in Table 3. As it can be noticed crisp logic proves to be quite myopic compared to fuzzy logic offering a more objective and comprehensive evaluation. More specifically, utilizing crisp logic the 94.4% of the generated input patterns will conclude in an abnormal health status, while the fuzzy logic leads to more comprehensive results where the 8.33% are in high risk (abnormal), 41.67% in medium risk and 50% are considered as low risk. This is an indicative scenario, where the advantages of the fuzzy logic are obvious.

x x p

x x x p x x x p x x x A

x x x x x NA

NA

x x x A

x x x p A

x x x x x x A

x x x x NA

x x x x x x NA

x x x x p x x x x x x x A

Following, all vital and environmental inputs have been fuzzified, the minimum implication method is applied to each rule, taking the fuzzified inputs and applying them to the antecedent of the fuzzy rule in order to derive its weight. The outputs of all rules are aggregated using the maximum method. The aggregated output fuzzy set is defuzzified using the centroid of gravity method and the output is a crisp number. The aforementioned procedure is presented in Algorithm 1. It is worth noting that effort has been devoted in the optimization of critical loops and optimization of floating points calculations, in order to efficiently execute the FIS on a TelosB mote within acceptable time limits. The aforementioned functions of fuzzy logic (aggregation, implication, centroid of graph) can be used to every FIS (i.e. environmental or industrial applications). Algorithm 1. Pseudocode of the fuzzy process

Input: Hrt, Snd, Act, Fall, Time, HrtMembFunc, SndMembFunc, ActMembFunc, TimeMembFunc, FallMembFunc, HealthMembFunc, RuleEngine Output: Health Status FHrt = Fuzzify (Hrt)//Heart Fuzzification FSnd = Fuzzify (Snd)//Sound Fuzzification FAct = Fuzzify (Act)//Activity Fuzzification FTime = Fuzzify (Fall)//Fall Fuzzification FFall = Fuzzify (Time)//Time Fuzzification for (i in Len (RuleEngine) do weightrule[i] = findweight (RuleEngine (i),FHrt,FSnd, FAct,FTime,FFall) end 9 8 > > > forði in LenðRuleEngineÞdo > > > > > if ðantencedentðRuleEngineðiÞ ¼¼ notalarmÞ > > > > > > > > then > > > > > > > > if ðweightruleðiÞ >¼ maxnotalarmÞ then > > > > > > > > maxnotalarm ¼ weightruleðiÞ > > > > < = end implication else > > > > > > > > > > if ðweightruleðiÞ >¼ maxalarmÞ then > > > > > > > > maxalarm ¼ weightruleðiÞ > > > > > > > > end > > > > > > > > end > > : ; end area = aggregation (HealthMembFunc,maxalarm,maxnotalarm) Health Status = centroidofgraph (area)//defuzzification

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

Algorithm 2. Pseudocode of node functionality in the centralized approach i NodeID if (i! = FCHN) then Sense its value; Send to the FCHN; else Receive the incoming packets; Execute the FIS periodically; end

The algorithm presented above can be executed in a resource rich node which is called Fuzzy Cluster Head (FCHN). The heart, sound, activity, time, fall sensor node (HSN, SSN, ASN, TSN, FSN) are responsible for acquiring the respective data values. In the centralized approach, these values are transmitted to the FCHN, which also serves as the fusion cell, which performs the FIS algorithm. The role of each node in the centralized scenario is described in (Algorithm 2). However if we assume that a realistic size of a sensor network consists of tens of nodes, restrictive limitations are imposed. The number of messages sent to the cluster head as well as the processing load of the data mining tasks demand increased processing capabilities and increase the network congestion as well. Hence a decentralized application of a data mining algorithm is needed, in order to achieve more efficient operation and minimize network performance degradation. 4. Task scheduling in WSNs The task scheduling problem can be defined as a process which allocates intensive computing tasks to several processing elements (sensor nodes) in order to maximize and balance the utilization of sensors resources, while minimizing the communication (data flows) between the processing elements. In fact, existing high processing algorithms cannot be directly implemented in WSNs due to the limited availability of resources and the shared communication medium. For instance, data mining processing involves computation-intensive operations that a single sensor node may not be able to fulfill the job or it may quickly become energy-exhausted. Cluster based schemes have been proposed several times in current literature, where high level processing tasks are assigned to cluster heads, without considering the capacity of cluster heads computation power and the concurrent data flows to the cluster head, which will increase the number of collisions. Cooperation among sensor nodes through distributed and parallel mechanisms emerges as a promising solution to achieve high processing power in resource restricted WSNs. The distributed execution of these algorithms can be achieved through task scheduling schemes in order to allocate computation tasks to specific sensor nodes, providing multiple benefits as follows. Contrary to centralized architectures where raw data are transferred and processed to a resource rich station (i.e.

93

cluster head, base station), task assignment schemes utilize the sensors computing capabilities for local processing. The on-site processing of the data shortens the communication pathways. Consequently the application is benefited since the communication overhead and communication delay are reduced. Therefore it is expected that these reductions will increase the health of the network and the rate of valid data delivered to the application. The overall energy consumption regarding processing tasks is balanced among the sensor nodes. In addition, a distributed implementation of such algorithms allows a partially parallel execution of some computation tasks. This can potentially lead to improved execution time of the algorithm and to meet applications deadlines. The application’s deadlines are also benefited by the reduced data volume, leading to reduced data communication and delivery latency. The data volume that is transferred over the air and the number of hops that is required for the communication events is a critical parameter, regarding communication cost, which is the main consuming factor of total energy. The segmentation of an intensive algorithmic job to several algorithmic tasks, is highly restricted by the dependencies that occur between computation tasks. These execution dependencies impose also communication dependencies as well, since these tasks are allocated on different sensor nodes. We should also mention that the network traffic is strongly affected by this task parallelization since the traffic flows are not directed to the base station as they are in the centralized approach. However the distribution of processing tasks among the sensor nodes must be carefully configured, since there are various issues that must be taken into consideration. Specifically, the parallelization of the main process and the assignment of the tasks can be summarized as follows:  Calculation of the total processing cost that the application requires.  Determination of the tasks that can be parallelized and identification of the dependencies among the tasks, in terms of data dependencies, time of delivery to the application and network traffic.  Finding the respective sensor nodes that they will be responsible for the execution of each task.  Synchronization among the parallelized tasks and the final application that they will feed with their outcome. The goal of the task scheduling in WSNs was to balance the energy consumption among the nodes that are related to an algorithm, without increasing the network’s total energy and reduce the number of transmissions so as to relax the network traffic. Here we describe the required energy for executing a computational task. The energy required for executing a specific computational task (t) in a node (n) is given by the following equation:

Ecomp ðt; nÞ ¼

NðtÞ  IðnÞ  VðnÞ; FðnÞ

ð1Þ

where N is the number of cycles for this task, F is the node’s CPU frequency and I is the active CPU current and V is the voltage supply.

94

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

At the same time the energy that is needed for the communication task between two nodes which are in the same radio range is defined as follows: 2

Etx ðn1; n2Þ ¼ Eelec  k þ ampl  k  d ðn1; n2Þ

ð2Þ

where Etx is the transmission energy, Eelec is the energy per bit that is consumed on the transmitter’s circuitry, ampl is the energy that is consumed at the transmitter amplifier, k is the packet’s datalength and d is the Euclidian distance between nodes n1 and n2. The energy for receiving a packet is as follows:

Erx ðn1; n2Þ ¼ Eelec  k

ð3Þ

For multihop scenarios with j hops, the energy for transmitting a packet between the nodes na and nb

Etx ðna ; nb Þ ¼

 X  2 Eelec  k þ ampl  k  dj;jþ1 ðnj ; njþ1 Þ

ð4Þ

j¼a:b1

Hence for each node the total energy consumed is defined as the sum of computational energy and communication energy consumption. More specifically each node has a task procedure which varies from simple sensing to sensing and processing. The output of this task should be delivered to another node based on the algorithm’s dependencies. Regarding the network topology this output may need to be transferred over one or more hops to reach the final destination. Regardless this information, which is crucial for the network’s total energy and for the delay that the output is available at the desirable node, the transmitter node has to spent energy for 1-hop communication (Eq. (2)). We categorize the role of each node, which may act as raw transmitter: (sense)-transmit, raw transceiver: receive-(sense)-transmit, high processing transmitter: (sense)-process-transmit, high processing transceiver: receive-(sense)-process-transmit or high processing receiver: receive, processing. Consequently the total energy that each node has to spend for the communication and computational part is the sum of Eq. (1) and (2). The network’s total energy is extracted considering the energy of each node.

node has not to transmit its own data, and thus the number of transmissions is reduced. The node that was assigned with the additional task of evaluating the coefficient of each rule was selected based on the average distance among the others and its energy resources. The other two remaining tasks: the implication and the aggregation method are the most computational intensive. However the aggregation method needs as input the weight of each rule. In our case this means that 12 float numbers, one for each rule need to be transmitted. If we merge these values in one packet, the packet size is increased and this affects the duration that a node occupies the medium. Moreover if these two tasks are not assigned in different nodes, the basic CPU load will remain in the cluster head. For this reason we assume the node that calculates the rule of each weight should apply also the implication method. In this way, only the output of this method, which is two float numbers in our case, is going to be transmitted to the cluster head, which is going to apply the aggregation method and to defuzzify the fuzzy output by finding the center of the gravity. A centralized and a distributed topology of our network is depicted at Figs. 2, 3. In the centralized approach (Fig. 2) the five nodes are responsible only for the sensing and transmitting the values to the base station. Therefore, the base station will take over the reception of the sensing data and their processing as described in Section 3.1. In the distributed approach (Fig. 3), as we have already mentioned, one node from the FSNs is responsible for evaluating the rules’ weights and for applying the implication method. This node is called coef_FSN. We assume that for a given topology the heart sensor is closer to the other fuzzy nodes. Hence for this topology the heart sensor is the coef_FSN. The remaining fuzzy related nodes sense their values and fuzzify them according to the membership functions, while the FCHN takes as input the two weights (maxalarm–maxnotalarm, see Algorithm 1). The functionality of each fuzzy related node in the distributed approach can be derived from the Algorithm 3. Algorithm 3. Pseudocode of node functionality in the distributed approach

4.1. Heuristic approach Based on the above, we try to decentralize the execution of the FIS among the fuzzy related nodes, considering the CPU load of each task that the FIS consists of, and the communication cost among the sensor nodes so as to perform the FIS. In the distributed approach, we assigned tasks to the nodes based on criteria such as, data dependencies, nodes’ sensing capabilities, locality and energy resources. Hence for our application, the sensing tasks and the respective fuzzification processes can be considered as independent tasks that can be executed in the sensing element. In this way, we accomplish the onsite processing of the data. The next step of our application demands the evaluation of the coefficient rules. This task depends on the fuzzified inputs. Hence we decided to relocate it closer to the sensing nodes, and particularly to one of them. In this case this

i NodeID if (i == FSN and i! = coef_FSN) then Fuzzification (); Send to the coef_FSN; else if (i == coef_FSN) then Evaluate the weights of each rule (); Apply the implication (); else if (i == FCHN) then Apply the aggregation; Defuzzify the fuzzy output; else Send to the FCHN;

Considering the task assignment that is depicted in Fig. 3, we provide a comprehensive evaluation of how the total energy is distributed among the nodes. In this way, we try to prove how the heuristic approach is beneficial

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

95

Fig. 2. Centralized topology.

Fig. 3. Distributed topology.

for the purposes of this paper. We assume an 1-hop network topology which consist of 6 nodes. The CPU energy that is consumed for each task is calculated according to the following process. First of all the application code is written in C, as a module for the Contiki OS [29]. It is then compiled into a firmware for the TelosB platform [30]. At the next step we isolated all the related to our application, tasks and based on the profile data that the MSPSIM [31] provided us, we calculated the average clocks per instruction (CPI) that the CPU requires to perform each task. (MSPSIM is a tool which can emulate Texas Instruments MSP430 micro-controller based sensor motes from the instruction level). For applying the Eq. (1) we used that the TelosB motes that we emulated are equipped with the TI MSP430 [32] microcontroller unit (CPU), clocked at 8 MHz with 108 kB RAM, the active current is 2.33 mA, while the voltage supply is 3.3 V [33]. Following this approach, Table 4 presents the Table 4 CPI per task. Task

Average CPI

Average energy (mJ)

heart_process activity_process sound_process fall_process time_process eval.rules’_weights_&_implication aggregation_defuzzification

7883 6348 6327 571 6264 20985 455764

0.00757 0.0061 0.0061 0.0005 0.006 0.02 0.438

processing load, in terms of CPI, for each task of interest. We also calculated the average CPU energy for generating a packet value, formulating it to a packet and copying it to the output buffer using the energy timers that Cooja Simulator [34] provides. The value of the consumed energy for this part of the process was calculated at 0.107 mJ. In addition, we used the energy timers for the radio that the Contiki OS provides. We calculated that the average energy for transmitting/receiving a 2-byte packet is 0.0607 mJ/ 0.0672 mJ respectively. In the centralized approach the whole CPU energy consumption due to processing takes place at the base station, while in the distributed approach, this processing load is shared among the 6 nodes. Based on our previous analysis, we expect a respective balance on the network traffic and consumption as well. Here we are presenting an indicative numerical example of how the energy is splitted among the 6 nodes, considering the centralized and the distributed approach using Table 4 and the already calculated energy for sensing, sending and receiving a packet. As the generation rate is a crucial parameter, we are going to investigate the most stressed and the most relaxed scenario. In the first case the algorithm is executed every 4 s, while the sensing/generation rate (tf1) has a value of 0.5 s. For these parameter values, the total energy for one execution of the fuzzy logic algorithm can be extracted as follows: In this interval each one of the FSNs has generated and transmitted 8 packets, which is equal to 1.3416 mJ. The FCHN has received 40 packets from the FSNs and has executed the Fuzzy algorithm once, which

96

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

is equal to 3.2260 mJ. The total energy is 9.9340 mJ, while the CPU energy part is of 4.8180 mJ and the remaining 5.116 mJ is the radio energy. For the same scenario, considering the decentralized approach, the coef_FSN receives the fuzzified values from the remaining four FSNs (tf1 = 0.5 s), and when the fuzzy timer (4 s) expires, it fuzzifies its value, it calculates the weight of each rule and it sends the two weights of the fuzzified alarm/not-alarm output to the FCHN. The aforementioned tasks equal to an average CPU energy of 2.8867 mJ. The four remaining FSNs sense, fuzzify and transmit their value every tf1. Based on the energy that is required for the fuzzification of each modality this energy varies from 1.3421 mJ to 1.3477 mJ. Finally, the FCHN applies the defuzzification method to calculate the absolute percent of the well-being (0.5052 mJ). Hence, in the distributed approach the total energy is 8.771 mJ and the radio energy is 4.0928 mJ. Moreover the absolute number of transmissions has reduced 17.5%. Moreover, we investigate the energy consumed when the tf1 has a value of 4 s. In this case the FSNs transmit when the fuzzy timer expires. In the centralized approach, each of the FSNs spent 0.168 mJ while the FCHN spends 0.8740 mJ. For the distributed approach the coef_FSN spends 0.4641 mJ, the remaining FSNs 0.1738 mJ and the FCHN 0.5052 mJ. In this case the total energy is approximately the same with the centralized approach, however the overall energy has been balanced among the nodes. The proposed framework as well as the two approaches that have been presented in this work can easily be adjusted to several applications. The distributed version of our FIS can be easily extracted for every FIS, if we know the computational cost, the data flows and the network topology.

5. Methodology-framework 5.1. Route discovery In the context of our algorithm’s functionality, the FSNs that sense data (centralized approach) or produce intermediate results (distributed approach) need to know where should they forward it. To that end, a route discovery protocol is required. In the centralized approach the sensed data need to be forwarded to the FCHN. In the distributed approach the fuzzified data need to reach the coef_FSN. Given a task assignment, at the time of deployment the network nodes know the sinks (final destinations) for their data, but not how to reach them. A sink discovery protocol suitable for our application is the following, executed once for the FCHN and for the coef_FSN (only in the distributed approach): At the deployment time, the sink broadcasts a routing packet to its neighbors, which contains the route to itself (essentially it announces its presence). Each node that receives a routing packet stores the information contained within, and rebroadcasts it after adding itself to the route. This is done first in the 1-hop neighbors of the sink, which receive 1 node (sink) route path, then the 2-hop neighbors, which receive a 2 node route path, and so on. When a route

1

8

9

14

7

3

5

4

13

2

11

6

12

Fig. 4. Route discovery scheme.

packet arrives at a node who already knows a path to the sink, the best (shortest) route is kept and the rest are discarded. At the end, all nodes will possess routing information toward all needed sinks. It should be noted that the information that must actually be stored at each node is the first hop destination, and the total number of hops (for comparison with routing packets that arrive later). In Fig. 4, node 1 initializes the route discovery, by sending a packet with itself to its neighbors (nodes: 8, 7 and 5). They retransmit this packet adding themselves to their neighbors. Node 4 receives three packets. It accepts the packet which has the fewer relay nodes (1-hop communication path). Finally all nodes know the paths that should be followed. The procedure can also be repeated upon the detection of a problem in traffic, or at regular time intervals, to optimize routing paths according to the current network state and topology, or to overcome undetected traffic problems. 5.2. Experimental scenarios In order to justify the impact of the approach that we propose in this paper, we needed to run multiple simulations with different configuration setups. The healthcare application has been implemented in two different programming environments. Firstly we implemented the FIS in the Matlab environment and we have used it as the reference point in order to evaluate the application’s performance. Secondly, the application has been ported in C language and optimized to be executed on MSP430 CPU based hardware platforms, especially the TelosB WSN platform. The Contiki OS was the host operating system for our application. Contiki is an open source operating system for networked wireless devices with limited resources. Contiki applications are written in standard C and run on a range of low-power wireless devices, such as TelosB, which are equipped with the MSP430 CPU. The simulations were conducted with Cooja, the network simulator that Contiki OS provides. It is a well-known network simulator [35] and it has been used in sever research efforts and projects.

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

FCHN FSN

97

noise nodes coef_FSN

Fig. 5. The utilized multihop topologies.

Cooja Simulates networks of sensors running the Contiki OS, while also comprising a highly accurate emulation of real hardware platforms such as TelosB and MicaZ. Effectively, it is a code level simulator, which compiles the Contiki Core, the user code and the special simulation drivers into object code native to the simulation platform. Consequently, the code written, compiled and executed by Cooja is exactly the same code used by a real Contiki OS platform. In other words, a code not adequate for TelosB cannot be executed in Cooja either. Hence the FIS has been written in C, and these processes are compiled into TelosB object code and is run under the utilization of Cooja Simulator. The utilization of Cooja framework in our work is threefold: (a) to study how the networking conditions (topology, network traffic, packet size) affect the performance of an algorithm, (b) to investigate the limitations of the TelosB platform, for running a fuzzy logic system and (c) to see both the applications run in large-scale networks and in extreme detail on fully emulated hardware devices (i.e. TelosB). As Cooja enables the emulation of the TelosB node the energy profile of each node can be derived and the distribution of the fuzzy logic algorithm among the FSNs enable as to evaluate the energy balance among the FSNs. However, as is the case for all network simulators, shortcomings and deficiencies do exist especially concerning the simulations of the physical layer (i.e. signal propagation model, node disconnection events, etc.), antenna directivity in the connected coverage problem, noise floor, environmental conditions, sensors’ placement or potential hardware failures. Concerning the selected frequency band, also comprising a critical network selection, it is noted that in this paper the 2.4 GHz is selected as the one supported by several of the prominent WSN platform nowadays (e.g. TelosB being the platform the experimental analysis is based on, MicaZ, etc.). However, it is noted that the proposed techniques presented and respective implementation in this paper is exchangeable since it is not relevant to the actual frequency band and can be applied to alternate bands without any modification. In other words, our focus is not on the advantages or disadvantages of a particular frequency band, but the effect of the networking

related problems (which are present in each band) in the FIS execution. The MAC layer protocol considered is the low power CSMA protocol, without duty cycling, which efficiently deals with problems such as energy consumption and hop-by-hop latency. Based on this framework and in order to reach useful conclusions, a comprehensive evaluation effort is made, using parameterizing network characteristics, while considering all required performance metrics. Topology: The number of nodes is twenty-five. In each case one node is considered the cluster head node (Fuzzy Cluster Head Node – FCHN) and five nodes are related to the fuzzy process (Fuzzy Sensor Nodes – FSN). FSN’s values represent heart rate, sound class, activity rate, fall, and time respectively. The remaining nodes (19 in total) are the Non-FSNs, whose purpose is to simulate a realistic scenario, where numerous nodes coexist, some of them are irrelevant to the FIS objective and thus effectively disturb the direct transmissions of the FSNs to the FCHN. This leads to a low quality, error prone communication channel as anticipated to face in an actual WSN deployment. The communication models and the respective simulations are splitted in two branches, the 1-hop and the multihop communication. In the multihop scenarios, the FSNs communicate with the base station through routes that their distances range from 1 to 3 hops. In order to justify the consistency of results we simulated 2 different multihop topologies (Fig. 5left/right-topology 1/2). In the centralized approach the FCHN gathers the data from all the nodes, and executes the FIS. In the distributed approach, the node that is responsible for evaluating the rules’ weights and applying the implication method is called coef_FSN and is someone of the FSNs. The Non-FSNs and the coef_FSN send their data to the FCHN, which also derives the final outcome of the algorithm. Traffic Factor: The Traffic Factor describes the packet generation rate. The packet generation rate of the 5 nodes (tf1) is tuned from 0.25–3 s, while the Traffic Factor of the remaining nodes (tf2) is tuned from 0.25 s to 4 s, showing the rate the Non-FSNs nodes disturb the transmissions of the FSNs nodes to their final destination. Tf1 values vary

98

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

from 0.25 s to 3 s, while Tf2 value vary from 0.25 s to 4 s. Based on tf1, tf2 and number of nodes (FSN and NonFSN), several congestion situations can be simulated. As the majority nodes are Non-FSNs the value of tf2 controls the traffic. Thus when, tf2 has low values (0.25 s) the network is quite stressed, while when tf2 increases to 4 s, the network is quite relaxed. Fuzzy timer: This parameter represents the execution frequency of the fuzzy algorithm, indicating the time between two consecutive executions. It must be noted that the input data considered are the latest received FSN packets. Therefore, depending on algorithm’s frequency and channel’s errors, the data utilized may not be up to date, due to network delay or packet loss, revealing another critical trade-off. The fuzzy timer is predefined at 4 s. However, this parameter may change depending on the criticality of the monitoring event. For example if a patient with high probability of distress situation occurring is being monitored then the fuzzy process should be as frequent as possible. A more comprehensive view of the different simulation’s configurations is depicted in Fig. 6. The values of the Traffic Factor 1 and Traffic Factor 2, correspond to the frequency the environment is being monitored, and how intense is the network noise. Hence various networking scenarios are simulated. The network congestion and the network confidence are different for each combination. Thus, we try to provide an investigation, of the algorithm’s performance under different networking characteristics. For a predefined topology, a specific algorithm’s execution and a specific tf1 value, 6 simulation scenarios have to be run, regarding tf2 values. Each one of this simulation scenario is repeated 20 times so as to evaluate the simulator’s randomness in our results. For each possible combination every experiment is repeated 20 times. Therefore for the centralized approach of the 1-hop topology (20  (3  6)) = 360 simulations executions are considered. 360 simulations have also run for the distributed approach applying on the 1-hop topology. The same simulation process has been followed utilizing the multihop topologies 1 and 2. During these multiple experiments no significant change has been observed concerning the simulator’s output. Therefore the mean value of each evaluation metric, during the 20 repetitions, gives as the specific data point in each graph. At this point we have to emphasize that the deviation of each measured parameter, during the

simulations does not exceed the threshold of 2%. In this case the mean value seems to be a good indicator for our evaluation analysis. This is a common practice in WSNs. At this point it should be noted that for the distributed approach the tf1 value could be close to ft, as the fuzzification of each sensor value is executed on site. This could further improve the networking conditions of the decentralized implementation, as the number of transmissions is reduced. However, in this evaluation work tf1 is in the same ranges for both approaches. This approach allows to make direct comparison between the centralized and the distributed approach and an increase in the flexibility of the system, in cases that the sensor nodes do not know when the fuzzy timer is expired. Evaluation metrics: The implemented FIS has proven to accurately detect respective events in [27], where the proposed FIS was evaluated in terms of assessing human’s health status. To achieve this level of accuracy, all data must be updated. However this requirement is challenged by the considered wireless medium. Therefore, an important evaluation metric is the number of executions of the fuzzy algorithm with not-updated input data. If the last generated fuzzy inputs have not been received by the FCHN or the coef_FSN when the fuzzy timer expires, then the fuzzification will be executed with old inputs (i.e. not updated). Such an event is indicated as a not updated (NU) fuzzy process. Moreover, an important metric is the comparison of the output of the fuzzy algorithm, executed in various network conditions, to the reference output provided by the Matlab environment, which is essentially the ideal output, as it is always based on the last generated values. The comparison between Cooja and Matlab is to show how the networking conditions affect the algorithm’s performance. Matlab results are considered as the benchmark compared to which this evaluation’s results are analyzed. More specifically when the fuzzy timer expires the FIS should be executed. As we have already mentioned, the last generated FSNs values may not have arrived at the FCHN (centralized approach) or the coef-FCHN (distributed approach) at the fuzzy timer’s expiration time. In this case the FIS will run with not-updated inputs. We keep trace files which are the instances of the last generated FSNs values before the fuzzy timer expires. Each instance serves as input to the FIS which is executed offline utilizing Matlab’s framework. The respective comparison is important since a not-updated fuzzy process does not necessarily lead to

Fig. 6. Simulations’ configurations.

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

false results, as the latter depends on 5 different parameters. Each parameter appears on a different number of fuzzy rules, thus it participates in the health monitoring situation with a different weight. Each time the fuzzy process is performed it is checked if it is a NU process. NU fuzzy processes For each simulation the ratio total , the packet fuzzy processes not receiv ed packets loss total and the number of transmissions are generated packets calculated. The differentiation rate between matlab and network simulations is also calculated. The simulation results justify the impact of the networking characteristics on the fuzzy logic performance and the superiority of the distributed approach. 6. Evaluation results In our previous work [8] we investigated the impact of the networking conditions to the application’s performance (considering the verification of our previous work [27]), assuming centralized approach. The basic conclusions of that work indicated that the concurrent data flows to the base station stressed the network traffic, resulting to significant packet loss ratios. In addition significant delay was observed when the base station executed the FIS and packets from the rest fuzzy nodes arrived and the respective tasks needed to be served. The centralized nature of the network presented in [8] burdens the base station with receiving packets from multiple sources. The increased usage of CPU and radio for processing and receiving the data leads to base station consuming excessively more power than the rest of the nodes. Therefore the energy resources of the base station get exhausted sooner, resulting in an unbalanced energy consumption in the network and thus the system lifetime. In the case of a real WSN environment the exhaustion of the base station will lead to the application’s failure as well. Such observations drove us to investigate on approaches enabling relaxing the network’s congestion by balancing the traffic and reducing the base station’s workload, applying a distributed implementation of the FIS. The minimization of the energy consumption functions described in Section 4 along with the algorithm’s dependencies and network topologies imposed significant restrictions that had to be resolved. Both approaches are considered (centralized and distributed) in 1-hop and multihop communication paths so as to derive more comprehensive results. The experimental setup using the centralized or the distributed implementation along with the tf1 value (0.25 s, 1 s, 3 s) is denoted as centr-0.25, distr-0.25, centr-1, distr-1, centr-3, distr-3 for both communication scenarios in the figures’ legends. 6.1. Centralized vs distributed in 1-hop scenarios In this section critical evaluation results are presented concerning the centralized and the distributed implementation of the proposed FIS in the 1-hop communication scenario. One fundamental metric that we utilized to evaluate the performance of both approaches is the packet loss ratio. Particularly in Fig. 7(a) we observe that the packet loss in the distributed approach is about 20% when tf2 has a

99

value of 0.25 s, while it varies from 3% to 8.5% when the network is quite relaxed (tf2 = 4 s). Concurrently, high packet loss ratios occur when the Non-FSNs generate and transmit packets in a higher rate introducing congestion in the network. The traffic that the FSN nodes introduce to the rest of the network is negligible and do not contribute the overall packet loss ratio. In the more relaxed scenarios, where the tf2 is more than 1 s the packet loss decreases to lower than 4%. Respectively in the centralized scenario we observe packet loss around 75% in the more stressed scenarios, while it varies from 55% to 65% when the generation rate decreases (tf2 = 4 s). Before going into performance analysis and conclusions extraction, elaboration is required concerning the different between Fig. 7(a) and (b). Both subfigures concern the same simulation scenarios, where different random generators’ seeds are used by the considered simulation environment. The need for this repetition was triggered due to the existence of isolated ‘‘weird’’ points deviating the general pattern. Through this repetition it is shown that such points are due to synchronization issues caused by the use of random generators. Furthermore, it must be noted that in all such cases deviation never exceeded 2% which can easily be considered as an acceptable statistical deviation. The major conclusions that can be extracted from the packet loss figures are: (a) the distributed approach leads to significant lower packet loss ratios and (b) the packet loss rate decreases while the Non-FSNs transmission rate decreases (except of some weird points). These weird points can be attributed to: random generation numbers, synchronization issues. For example in Fig. 7 in the graph for tf1 = 0.25 s we observe that the packet loss in the distributed approach is about 20% when tf2 has a value of 0.25 s, 7% when tf2 has a value of 3 s and 8.3% when tf2 has a value of 4 s. This increase to the packet loss rate that is attributed to the previous reasons can be considered negligible (1.3%). Similarly the weird points in Fig. 7 that show the packet loss in the centralized approach present small deviations that do not exceed the threshold of 2%. In the centralized approach the packet loss is higher because all the nodes send directly their data to the FCHN. As anticipated, the distributed implementation balanced the traffic flows among the network as the FSNs nodes forward their fuzzified results to the coef_FSN, while the NonFSNs send directly their data to the FCHN. Moreover an important computational task of the FIS has been executed to the FSNs and to the coef_FSN, and thus the FCHN is not overloaded with the reception of all the incoming packets and the whole processing. As a result the congestion effects were minimized for all the Traffic Factors. This is not the only reason that minimized the congestion in the distributed implementation. Additionally in the distributed approach, the number of transmissions decreases since the generation packets from the coef_FSN are not transmitted to the FCHN. They are fuzzified locally and are used as input to the implication method, with the received fuzzy values from the 4 remaining FSNs. In Fig. 8 the transmissions gain comparing the centralized and the distributed approach is depicted. As it can be seen for all the traffic scenarios there is a gain in the number of transmissions

100

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

20

75

18 distr−0.25

70

distr−1

14

Packet loss (%)

Packet loss (%)

16

distr−3

12 10 8

65

60

centr−0.25 centr−1

6

55 centr−3

4 2 0

1

2

3

50

4

0

1

tf2 (sec)

2

3

4

tf2 (sec)

(a) Packet loss distributed vs centralized 1-hop with random seed 20

75

18

distr−0.25 distr−1

16

70

Packet loss (%)

Packet loss (%)

distr−3

14 12 10 8

65 centr−0.25 centr−1

60

6

centr−3

4 2

0

1

2

3

4

tf2 (sec)

55

0

1

2

3

4

tf2 (sec)

(b) Packet loss distributed vs centralized 1-hop with random seed Fig. 7. Packet loss distributed vs centralized 1-hop.

comparing the distributed and the centralized approach. This percentile transmission decrease varies from 1% to 4% to the more stressed scenarios with respect to tf2 and reaches the percentage of 17%, which corresponds to 4 s tf2 and 0.25 s tf1. A useful observation in this graph is that when the tf1 increases the differentiation on the number of

tx−gain (%)

20 tf1−0.25sec tf1−1sec tf1−3sec

15 10 5 0 0

0.5

1

1.5

2

2.5

3

3.5

4

tf2 (sec) Fig. 8. Percentile transmission decrease distributed vs centralized 1-hop.

transmissions decreases between the centralized and the distributed approach. This is because of the node that is responsible for executing the implication and aggregation method, which receives packets from the FSNs every tf1 and it forwards the output of the implication method to the FCHN every ft. Hence as the ratio tfft1 is close to one, the number of transmissions is almost similar for the centralized and the distributed approach. In this case the transmission’s gain is negligible. A general observation of this figure is that the percentile transmission decrease is analogous to tf2 increase, since the transmissions from the Non-FSNs are reduced and thus the total number of transmissions is decreased. However, the number of the transmissions that are avoided depends on the tf1, which is constant for a specific graph. Consequently, the percentage difference is increased. Additionally, when tf1 is close to tf2, the Non-FSNs traffic is the dominant, and the gain of the FSNs traffic is not significant. However when the rate of the FSNs node is higher than the Non-FSNs this gain is significant.

101

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

We provide details for the minimum and maximum number of transmissions for each tf1 value in Table 5. The maximum number of transmissions is achieved, when the Non-FSNs nodes generate packets in a high rate (tf2 = 0.25 s), while the fewer transmissions occur when tf2 has the value of 4 s. As depicted, during each experiment by minimum 5597 transmissions occur (while maximum reach up to 142,997 packet transmissions). Therefore, in each experiment a sufficient number of packet transmissions are considered so as to extract objective results and conclusions. We can conclude that the packet loss ratio and the network health respectively were benefited by the distributed implementations in two ways.

90 distr−0.25 distr−1 distr−3 centr−0.25 centr−1 centr−3

80

not updated (%)

70 60 50 40 30 20 10 0

0

0.5

1

1.5

2

2.5

3

3.5

4

tf2 (sec)  Balance of the overall network traffic.  Decrease of the needed packet transmissions.

Fig. 9. Not updated fuzzy processes distributed vs centralized 1-hop.

Therefore the expectations for minimizing the network congestion effects were justified by the results of Fig. 7(a). The next metric is application oriented, and depicts how the network health affects the application performance. Packet losses lead to algorithm execution with outdated values and as it can be shown in Fig. 9 the number of the fuzzy processes that were executed with invalid inputs (old values) is in all scenarios considerably lower in the distributed scenario. The increase of tf2 has a significant inversely analogous result on NU fuzzy processes. A decrease of the NU fuzzy process with respect to tf2 can be noted up to 0.5 s. Further increase of tf2 (i.e. reducing the Non-FSN packet workload) has rather diminishing effect on NU fuzzy process, as indicated by the slope of the respective graphs. This is because the networking conditions are more relaxed in this case. In the most stresses scenarios (tf2 = 0.25 s) the difference in the ratios of the not updated fuzzy process varies from 5% to 7% when tf1 value varies from 3 s to 0.25 s respectively. This behavior is almost similar for the remaining tf2 range, except of the most relaxed scenarios (tf2 > 3 s) where the difference between the two implementations is negligible. We further investigate the algorithm’s robustness comparing the Matlab’s output (verified and used as reference value) with the Contiki’s output (Fig. 10). It is true that if the networking conditions are quite poor, the input pattern of the FIS will contain potentially erroneous values (i.e. not updated values) and this is going to affect the algorithm’s outcome. However, it is important to elaborate that if there is not a significant change in the crisp values of the monitoring parameters, the algorithm’s output will be ok because of the fuzzy logic nature. But, in case that there is a significant change in one parameter, and this value has not been delivered immediately to the FCHN/coef_FSN,

this will affect the algorithm’s output. This deviation shows that in the distributed scenario, where the not updated processes and the packet loss ratio are lower the increased application reliability. Specifically, the percentile difference between Contiki and Matlab’s outputs varies from 25% to 19% for the centralized approach, while this difference for the distributed approach is almost the same for all the tf2 values (around 18%), indicating a considerably more robust behavior. Furthermore the decrease on packet transmission and the balance of the network traffic that was mentioned earlier are expected to benefit the energy consumption as well. The energy consumption gain of the distributed scenario is presented in Fig. 11(a) where the ratio of the energy consumed by the CPU and the radio over the total energy spent for each of the 6 FSNs nodes are presented. The results of the consumed energy in these nodes are similar while varying tf1 value, however these figures consider a tf1 value of 1 s. Node 6 is the FCHN in both cases, while node 1 has been selected as the coef_FSN in the distributed implementation. On the one hand, in the centralized approach the FCHN’s processing load is overloaded since it is the base station of the network which is also responsible for executing the FIS while the FSNs nodes only sense and transmit their value. On the other hand in the distributed approach all the FSN nodes are responsible for the sensing and the fuzzification of the sensed values. The coef_FSN is responsible for gathering the data from the FSNs, for applying the implication method and for sending the two weights (Section 4.1) to the FCHN. Finally, the FCHN has assigned the reception of the Non-FSNs and the coef_FSN packets, and the defuzzification method. As we can see the CPU utilization is almost evenly balanced

Table 5 Number of transmissions. centr-1hop

tf1 = 0.25 s tf1 = 1 s tf1 = 3 s

distr-1hop

centr-mh1

distr-mh1

centr-mh2

distr-mh2

tf2 = 0.25 s

tf2 = 4 s

tf2 = 0.25 s

tf2 = 4 s

tf2 = 0.25 s

tf2 = 4 s

tf2 = 0.25 s

tf2 = 4 s

tf2 = 0.25 s

tf2 = 4 s

tf2 = 0.25 s

tf2 = 4 s

142977 120666 116949

36859 14546 10826

136583 119141 116162

30555 13057 10079

96612 78331 75499

32992 11712 8220

88121 75680 74062

23770 10003 7635

74953 64164 61975

20298 8236 6135

73980 63478 61937

18057 7367 5597

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

matlab−cooja deviation (%)

102

among all the nodes in the distributed implementation. Especially nodes 1 and 6 represent the two major processing elements and this is obvious to their CPU utilization. However the CPU_utilization has been balanced among the nodes, we should assure that the total energy is not increased, otherwise the network’s lifetime is going to be decreased. From Fig. 11(b), it is observed that the overall energy is significantly reduced in the decentralized scenarios even if there is a slight increase in the radio consumption. For instance, the total energy that is consumed in the 6 nodes in the distributed approach has been decreased by a factor of 62.5% compared to the centralized approach. The reason for the radio energy consumption increase, is

26 distributed centralized

24 22 20 18 16

0

1

2

3

4

tf2 (sec) Fig. 10. Performance deviation distributed vs centralized 1-hop.

energy:centralized−vs−distributed−tf1[0.5sec]

100

cpu tx rc

90

energy−percentage

80 70 60 50 40 30 20 10 0

node−1 node−2 node−3 node−4 node−5 node−6 node−1 node−2 node−3 node−4 node−5 node−6

Centralized Architecture

Decentralized Architecture

(a) Percentage energy per node distributed vs centralized 14000 radio−utilization cpu−utilization

12000

Energy (mJ)

10000

8000

CPU: 94.37%

CPU: 89.84%

CPU: 97%

6000

4000 CPU: 64.37%

2000

0

CPU: 71.77% Radio: 10.16%

Radio: 35.63%

Radio:5.63%

Radio: 28.23%

Centr−tf1:0.25s Distr−tf1:0.25s Centr−tf1:1.0s Distr−tf1:1.0s

CPU: 79.6% Radio:3%

Centr−tf1:3s

Radio:20.4%

Distr−tf1:3s

Network scenarios

(b) Absolute total energy, CPU utilization and radio energy - Percentage CPU utilization radio energy Fig. 11. Analysis of the consumed energy.

103

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

80

25

Packet loss (%)

Packet loss (%)

centr−1

distr−1 distr−3

15

centr−0.25

70

distr−0.25

20

10

60 centr−3 50 40 30

5 20 0 0

1

2

3

10 0

4

1

tf2 (sec)

2

3

4

tf2 (sec)

(a) Packet loss distributed vs centralized mh1 with random seed 1 80

25

Packet loss (%)

Packet loss (%)

centr−1

distr−1 distr−3

15

centr−0.25

70

distr−0.25

20

10

60 centr−4 50 40 30

5 20 0

0

1

2

3

tf2 (sec)

4

10

0

1

2

3

4

tf2 (sec)

(b) Packet loss distributed vs centralized mh1 with random seed 2 Fig. 12. Packet loss distributed vs centralized mh1.

the output of each task of the FIS has a bigger payload than the payload of the raw sensor values and therefore the FSNs transmit longer packets. It should be noted that the CPU utilization includes also the CPU energy for executing the code for transmission and receive and for handling the interrupts between the monothread. This means that the CPU utilization is not only the energy for executing the FIS, which leads to a significant difference in the CPU utilization, as shown in Fig. 11(b). The processes’ handling required by the Contiki OS and the pass information between the communication and processing threads, lead to the observed CPU utilization increase. 6.2. Centralized vs distributed in multihop scenarios In order to evaluate the techniques we described earlier in more realistic cases we conducted additional simulations on multihop scenarios. In order to justify the consistency of our results two multihop topologies (Fig. 5) have been simulated.

In Figs. 12(a) and 13(a) the packet loss ratio is depicted for both topologies. For the stressed scenarios the packet loss ratio at both centralized topologies is (around 70%), whereas distributed implementation proves to be able to tackle such poor performance since respective packet loss is emphatically reduced in the range of 15–23%. As tf2 increases and the traffic relaxes, the packet loss ratio decreases respectively but a significant improvement in the distributed implementations compared to the centralized is still apparent. This is quite emphatic in tf2 equal to 2 s scenarios where packet loss for considering centralized approach is approximately 40% while distributed approach manages a critical reduction to 5% packet loss. In the most relaxed scenario (tf2 = 4 s) the distributed approach loses packets in a ratio lower than 4%, while in the centralized approach this ratio is not lower than 18%. Summarizing, the task distribution can improve the packet loss ratio by a factor of (67.1–78.6%) for the most stressed scenarios. Figs. 12(a) and 13(a) present also some weird trends. Such a case is present when tf2 has a value of 3 s and the

104

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

20

80

distr−0.25 distr−1 distr−3

packet loss (%)

packet loss (%)

15

centr−0.25 centr−1 centr−3

70

10

5

60 50 40 30 20

0

0

1

2

3

10

4

0

1

tf2 (sec)

2

3

4

tf2 (sec)

(a) Packet loss distributed vs centralized mh2 with random seed 1 20

80 distr−0.25 distr−1 distr−3

18

packet loss (%)

packet loss (%)

16

centr−0.25 centr−1 centr−3

70

14 12 10 8

60 50 40 30

6 20

4 2

0

1

2

3

4

tf2 (sec)

10

0

1

2

3

4

tf2 (sec)

(b) Packet loss distributed vs centralized mh2 with random seed 2 Fig. 13. Packet loss distributed vs centralized mh2.

tf1 has the same value. The synchronization in this case seems to be the main reason for causing this deviation of about (4%). Repetition of specific scenarios varying the random generator seeds proves the validity of such claim since points exhibiting noticeable deviation from the general pattern disappear while others may appear (Figs. 12(b) and 13(b)). As claimed in Section 4, 1-hop evaluation scenarios have verified that the distributed approach of the proposed technique is able to significantly reduce required transmissions. As already argued, this claim is based on the fact that coef_FSN does not communicate with the base station unless is needed. Thus, redundant communication between the coef_FSN and base station is avoided. This improvement is depicted at Figs. 14 and 15 where the transmissions’ gain for the 2 considered multihop topologies for the centralized and distributed approach are respectively depicted. It is obvious that in every case the distributed version requires less communication than the centralized for the same simulation time. The analysis for the reduction of the transmissions, has already presented in Subsection 6.1, and thus some quantitative observations are reported. For the first topology the transmissions’ percentile decrease varies from around 1–8% for the most stressed scenarios, while for the same networking conditions this gain is about 1.2%

regarding the topology 2. As tf2 increases, the transmissions of the Non-FSNs decrease and thus the percentile gain increases. When FSNs generation rate is high enough (tf1 = 0.25 s), this gain is higher compared to the packet creation of 1 and 3 s respectively, as the FSN’s traffic strengthens. The most remarkable results correspond to a transmission gain of 25%/12.5% for the topology 1/2 respectively, which corresponds to 4 s tf2 and 0.25 s tf1. This observation is quite important, because in case the FSN’s generation rate needs to be high (emergency situation), and the network noise is low, the redundant transmissions are avoided, leading to better networking QoS and thus more accurate system’s performance. Moreover, when tf1 is much lower than ft there is significant improvement, since the number of transmissions from the coef_FSN to the FCHN is tfft1 times lower than the centralized approach for a time interval of ft. As the packet generation rate of the sensing nodes decreases, the FSNs network traffic is comparable to the Non-FSNs and this enhances the percentile gain. These observations along with the packet loss ratio improvement as we expected are reflected to the energy consumed in the network as well. From the application perspective, the percentages of the not-updated fuzzy processes in the centralized and in the

105

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

100

30

distr−0.25

tf1−0.25sec

distr−1

tf1−1sec

25

80

not updated (%)

tx−gain (%)

tf1−3sec

20 15 10 5

distr−3 centr−0.25 centr−1

60

centr−3

40

20

0 0

0.5

1

1.5

2

2.5

3

3.5

4

0

tf2 (sec)

0

0.5

1

1.5

2

2.5

3

3.5

4

tf2 (sec)

Fig. 14. Percentile transmission decrease distributed vs centralized topology-1.

Fig. 16. Not updated fuzzy processes distributed vs centralized topology1.

14 100

tf1−0.25sec

12

centr−0.25

tf1−1sec

distr−1

80

tf1−3sec

distr−3

not updated (%)

tx−gain (%)

10 8 6 4

distr−0.25 centr−1

60

centr−3

40

20 2 0

0

0.5

1

1.5

2

2.5

3

3.5

4

tf2 (sec)

0

0

0.5

1

1.5

2

2.5

3

3.5

4

tf2 (sec)

Fig. 15. Percentile transmission decrease distributed vs centralized topology-2.

Fig. 17. Not updated fuzzy processes distributed vs centralized topology-2.

distributed approach for the two topologies are depicted in Figs. 16 and 17. Regarding the topology 1, in the most stressed conditions (tf2 = 0.25 s), the percentage of the not-updated fuzzy-processes is around 50% for tf1 of 1 and 3 s in the distributed scenario, while the respective percentage for the centralized scenario varies in the range of [70–90%], indicating a 20–40% higher power consumption. For the same tf2 value there is no significant difference when tf1 has a value of 0.25 s. In the most relaxed conditions 10% (tf1 = 2 and 3 s) the fuzzy processes are executed with invalid inputs, in the distributed scenario, while the same metric for the centralized scenario varies from 18% to 38%, corresponding to a critical 8–28% power consumption expenditure. Generally the number of not updated fuzzy processes decreases, while the generation rate of the noisy nodes is lower, since their flow is the dominant factor of the network congestion. In all cases the percentage of the not-updated fuzzy-processes is lower in the distributed approach than the centralized. Additionally, we observe that when the tf1 is 3 s in some cases the percentage of the not-updated fuzzy processes

is higher than the percentages when tf1 is lower. This can be attributed to a synchronization problem as the FSNs generate packets at the same time when the fuzzy timer expires and consequently the algorithm is executed with invalid inputs. The results are similar for the topology 2. For every tf2 we calculate the deviation between Contiki’s and Matlab’s output about the health status and the mean value as well. This is depicted in Figs. 18, 19 for the two topologies respectively. The lower deviation of our simulations results with Matlab’s results (reference value) indicate the advantage of applying the distributed nature of the FIS in a WSN environment, in order to achieve an optimal algorithm’s performance. In both topologies the percentile deviation varies decreases from 7.5%/8.5% (centralized implementation) to 4.2%/3.6% (distributed implementation), respectively in the more stressed conditions. The two graphs present the highest deviation for tf2 below 1 s/2 s for the topology 1 and 2 respectively, showing that the output of the distributed approach is closer to the reference output.

106

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

10

distributed centralized

7

matlab−cooja deviation (%)

matlab−cooja deviation (%)

8

6 5 4 3

distributed centralized 8

6

4

2

2 1

0 0

1

2

3

4

0

Fig. 18. Performance Deviation distributed vs centralized topology-1.

The corresponding simulation results confirmed our assumptions that the decentralized execution of an algorithm can lead to fewer transmissions, thus lower packet loss rate and lower not updated executions. In addition the energy consumption analysis confirmed our main goal for energy balancing. So concluding, considering an ideal environment from a network point of view FIS’s accurate has been verified in [27], but in this paper a realistic network is also of critical concern thus Cooja comes into play. 7. Conclusions This paper aimed to address the lack of a comprehensive study and comparative analysis when applying existing classification algorithms in WSNs for health applications. The application of classification models in several WSN applications is crucial for increasing the data accuracy, handling large amount of raw data, achieving better control of the monitored environment, dealing with the uncertainty, minimizing redundant communications between actuation units. However, extra processing capabilities are required for the classification’s algorithms execution. Direct implementation of a classification algorithm in one node, which serves as a fusion cell, leads to energy exhaustion of this node, which will result to the application’s failure. In addition the concurrent data flows to one node, reduces the available bandwidth, leading to significant packet loss ratios. Consequently, the classification schemes are executed with invalid inputs (i.e. lost packets), leading to performance degradation. Thus the error prone wireless medium along with the algorithms’ sensitivity to invalid inputs and the limited available resources in a WSN environment raise the necessity for distributed implementation of these algorithms. A fuzzy logic system for detecting distress situations of monitoring humans, is studied as a use case scenario. Vital and environmental parameters are fused so as to derive a safe conclusion about the health status of the monitoring human. A centralized implementation along with the evaluation results have presented, showing the strong impact of the networking characteristics to the algorithm’s performance. As an additional contribution of this work a

1

2

3

4

tf2 (sec)

tf2 (sec)

Fig. 19. Performance Deviation distributed vs centralized topology-1.

distributed implementation of the above algorithm, has also proposed. The distribution of the algorithm to subtasks with specific dependencies and the allocation of each subtask to a specific node has been achieved based on some utility functions. In that context, our proposed FIS for event-detection in the healthcare domain has been implemented in a centralized and distributed way, utilizing the TelosB mote CPU. The two approaches were thoroughly evaluated in a simulated WSN environment with various networking conditions. The distributed execution of the FIS resulted in lower network congestion, a balanced energy consumption among the FSNs nodes, a reduction of the total network’s energy, a better algorithm’s performance. The evaluation results showed a packet loss gain around 73% and 67% (in the most stressed scenarios) and a transmission gain which reaches the level of 17% and 25%, comparing the centralized and the distributed implementation in the 1hop and in the multihop communication paths respectively. As the networking conditions are benefited in the distributed implementation, the algorithm’s performance is also benefited showing a percentile difference between Matlab’s and Contiki’s output of 8% and 5% in the 1-hop and multi-hop scenario in the stressed scenarios. The evaluation results can offer guidance to design and deployment of WSN able to sufficiently perform the health FIS. Moreover additional work has to be done for developing an event dissemination protocol, which will trigger the algorithms execution, when a rule from the Rule engine is activated, in order to avoid the execution of the FIS when it is not necessary (i.e. none rule which leads to alarm situation is activated). Finally, additional classification algorithms and WSN applications can be benefited from the proposed framework, balancing the energy consumption and increasing the algorithm’s performance. Acknowledgment This work was supported by E.U. ARTEMIS Joint Undertaking under the Cyclic and person-centric Health management: Integrated appRoach for hOme, mobile and clinical eNvironments – (CHIRON) Project, Grant Agreement # 2009-1-100228 [36].

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108

References [1] G. Wittenburg, N. Dziengel, C. Wartenburger, J. Schiller, A system for distributed event detection in wireless sensor networks, in: Proceedings of the 9th ACM/IEEE International Conference on Information Processing in Sensor Networks, IPSN ’10, ACM, 2010, pp. 94–104. http://dx.doi.org/10.1145/1791212.1791225. [2] D. Li, K. Wong, Y.H. Hu, A. Sayeed, Detection, classification, and tracking of targets, IEEE Signal Proc. Mag. 19 (2002) 17–29, http:// dx.doi.org/10.1109/79.985674. [3] D. Li, K. Wong, Y.H. Hu, A. Sayeed, Detection, classification, and tracking of targets, IEEE Signal Proc. Mag. 19 (2) (2002) 17–29, http://dx.doi.org/10.1109/79.985674. [4] M. Bahrepour, N. Meratnia, P. Havinga, Automatic fire detection: a survey from wireless sensor network perspective, December 2008. . [5] J. Barbarán, M. Díaz, I. Esteve, D. Garrido, L. Llopis, B. Rubio, RTCoord: a methodology to design WSAN applications, in: Proceedings of the XXI International Conference on Computer, Electrical, and Systems Science, and Engineering CESSE 2007, May 25-27, 2007 Vienna, Austria, WASET, Wien, Austria, 2007, pp. 144–150. [6] E.F. Nakamura, A.A.F. Loureiro, A.C. Frery, Information fusion for wireless sensor networks: methods, models, and classifications, ACM Comput. Surv. 39. http://dx.doi.org/10.1145/1267070.1267073. [7] N.D. Phung, M.M. Gaber, U. Rhm, Resource-aware online data mining in wireless ensor networks, in: CIDM’07, 2007. [8] S. Dima, D. Tsitsipis, C. Antonopoulos, J. Gialelis, S. Koubias, Flogera: a fuzzy logic event recognition algorithm in a wsn environment, in: Wireless Communications and Mobile Computing Conference (IWCMC), 2012 8th International, 2012, pp. 850–855. http:// dx.doi.org/10.1109/IWCMC.2012.6314315. [9] E. Mamdani, Application of fuzzy algorithms for control of simple dynamic plant, Proc. Inst. Electr. Eng. 121 (12) (1974) 1585–1588, http://dx.doi.org/10.1049/piee.1974.0328. [10] R.R. Yager, D.P. Filev, Essentials of Fuzzy Modeling and Control, 1st ed., John Wiley & Sons Inc., New York, NY, USA, 1994. [11] D. Istrate, J. Boudy, H. Medjahed, J.L. Baldinger, Medical remote monitoring using sound environment analysis and wearable sensors, in: Biomedical engineering, 2009, pp. 517–532. [12] H. Medjahed, D. Istrate, J. Boudy, B. Dorizzi, Human activities of daily living recognition using fuzzy logic for elderly home monitoring, in: Fuzzy Systems, 2009. [13] P. Manjunatha, A. Verma, A. Srividya, Multi-sensor data fusion in cluster based wireless sensor networks using fuzzy logic method, in: Industrial and Information Systems, 2008. [14] L. Zhang, H. Leung, K.C.C. Chan, Information fusion based smart home control system and its application, IEEE Trans. Consum. Electr. 54 (3) (2008) 1157–1165. [15] K. Kapitanova, S.H. Son, K.-D. Kang, Using fuzzy logic for robust event detection in wireless sensor networks, Ad Hoc Networks 10 (4) (2012) 709–722. [16] S. Munir, Y.W. Bin, R. Biao, M. Man, Fuzzy logic based congestion estimation for qos in wireless sensor network, in: Wireless Communications and Networking Conference, IEEE, 2007. [17] M. Marin-Perianu, C. Lombriser, O. Amft, P. Havinga, G. Troster, Distributed activity recognition with fuzzy-enabled wireless sensor networks, in: Distributed Computing in Sensor Systems, 2008. [18] A.G. Dharne, J. Lee, S. Jayasuriya, Using Fuzzy Logic for Localization in Mobile Sensor Networks: Simulations and Experiments, in: 2006 American Control Conference, IEEE. [19] Y. Tian, Y. Gu, E. Ekici, F. Ozguner, Dynamic critical-path task mapping and scheduling for collaborative in-network processing in multi-hop wireless sensor networks, in: 2006 International Conference on Parallel Processing Workshops, 2006, ICPP 2006 Workshops, 2006, pp. 8–222. [20] L. Zhigang, L. Shining, Z. Xingshe, Y. Zhiyi, Energy-efficient task allocation for data fusion in wireless sensor networks, in: Mobile and Ubiquitous Systems: Networking Services, MobiQuitous, 2009, MobiQuitous ’09, 6th Annual International, 2009, pp. 1–6. http:// dx.doi.org/10.4108/ICST.MOBIQUITOUS2009.6877. [21] J. Zhu, J. Li, H. Gao, Tasks allocation for real-time applications in heterogeneous sensor networks for energy minimization, in: Eighth ACIS International Conference on Software Engineering, Artificial Intelligence, Networking, and Parallel/Distributed Computing, 2007, SNPD 2007, vol. 2, 2007, pp. 20–25. http://dx.doi.org/10.1109/ SNPD.2007.255. [22] H. Park, M.B. Srivastava, Energy-efficient task assignment framework for wireless sensor networks, Tech. rep., 2003.

107

[23] L. Gu, D. Jia, P. Vicaire, T. Yan, L. Luo, A. Tirumala, Q. Cao, T. He, J.A. Stankovic, T. Abdelzaher, B.H. Krogh, Lightweight detection and classification for wireless sensor networks in realistic environments, in: Proceedings of the 3rd International Conference on Embedded Networked Sensor Systems, SenSys ’05, ACM, pp. 205–217. http:// dx.doi.org/10.1145/1098918.1098941. [24] K.-X. Thuc, K. Insoo, A collaborative event detection scheme using fuzzy logic in clustered wireless sensor networks, AEU–Int. J. Electron. Commun. 65 (5) (2011) 485–488. [25] L. Zadeh, The concept of a linguistic variable and its application to approximate reasoning, Inform. Sci. 8 (1975) 199–249, http:// dx.doi.org/10.1016/0020-0255(75)90036-5. . [26] H. Medjahed, D. Istrate, J. Boudy, B. Dorizzi, A fuzzy logic system for home elderly people monitoring (emutem), in: Proc.of the 10th WSEAS Conference on Fuzzy Systems, 2009. [27] S.-M. Dima, C. Antonopoulos, J. Gialelis, S. Koubias, A network reliability oriented event detection scheme for wireless sensors and actors networks, in: The International Conference on Industrial Technology, IEEE, 2012. [28] M. Mahfouf, M.F. Abbod, D.A. Linkens, A survey of fuzzy logic monitoring and control utilisation in medicine, Artif. Intell. Med. 21 (1–3) (2001) 27–42. [29] http://www.sics.se/contiki/. [30] http://www.sentilla.com/moteiv-transition.html. [31] J. Eriksson, F. Österlind, N. Finne, N. Tsiftes, A. Dunkels, T. Voigt, R. Sauter, P.J. Marrón, Cooja/mspsim: interoperability testing for wireless sensor networks, in: Proceedings of the 2nd International Conference on Simulation Tools and Techniques, Simutools ’09. http://dx.doi.org/10.4108/ICST.SIMUTOOLS2009.5637. [32] http://www.ti.com/msp430. [33] F. Kerasiotis, A. Prayati, C. Antonopoulos, C. Koulamas, G. Papadopoulos, Battery lifetime prediction model for a wsn platform, in: 2010 Fourth International Conference on Sensor Technologies and Applications (SENSORCOMM), 2010, pp. 525– 530. http://dx.doi.org/10.1109/SENSORCOMM.2010.85. [34] F. Osterlind, A. Dunkels, J. Eriksson, N. Finne, T. Voigt, Cross-level sensor network simulation with cooja, in: Proceedings 2006 31st IEEE Conference on Local Computer Networks, 2006, pp. 641–648. http://dx.doi.org/10.1109/LCN.2006.322172. [35] L. Sitanayah, C.J. Sreenan, S. Fedor, A cooja-based tool for maintaining sensor network coverage requirements in a building, in: Proceedings of the 11th ACM Conference on Embedded Networked Sensor Systems, SenSys ’13, 2013. [36] http://www.chiron-project.eu/.

Sofia Maria Dima is a Ph.D. candidate at the Electrical and Computer Engineer Department in the University of Patras (UoP). Sofia has received her Electrical and Computer Engineer Diploma from the same Department of UoP in 2010. Her main research interests include Wireless Sensor Networks, Data Mining, Task Scheduling and Embedded Systems. Sofia has worked as a research in EU-funded R&D projects and as a teaching assistant.

Christos Panagiotou is a Computer Engineer and he received his diploma from the Computer Engineering and Informatics dpt., University of Patras. He is a Ph.D. Candidate at the Electrical and Computer Engineering dpt., University of Patras and his main research interests focus on wireless sensor networks, embedded systems and biomedical engineering.

108

S.M. Dima et al. / Ad Hoc Networks 23 (2014) 87–108 Dimitris Tsitsipis is a Ph.D. candidate at the Electrical and Computer Engineer Department in the University of Patras (UoP). Dimitris has received his Electrical and Computer Engineer Diploma and his MSC in Embedded Systems from the same Department of UoP in 2007 and 2010 respectively. His main research interests include Wireless Sensor Networks, Security, Wireless Multimedia Sensor Networks, and Embedded System Design. Dimitris has worked as a research in EU-funded R&D projects, as well as an independent Software Developer.

Christos P. Antonopoulos received his Diploma and Ph.D. at Electrical Engineering and Computer Technology from the Department of Electrical Engineering and Computer Technology, University of Patras, Greece in 2002 and 2008 respectively. From 2002 is a member of the Applied Electronics Laboratory at the Department of Electrical Engineering and Computer Technology, University of Patras, Greece. He has participated in several European and National research projects as a researcher for the Industrial System Institute (ISI) Patras Greece. Furthermore, he has participated in several European research projects as well as the production of telecommunication systems at INTRACOM-Telecom Telecommunication Company. He has published sufficient number of research papers in international journals and conferences which have received over 70 citations. His main research interests lay in the areas of wireless network, wireless networks communication protocols design, wireless network simulation, performance evaluation, embedded software, sensor networks, wireless broadband access networks, embedded system architecture and programming.

John V. Gialelis received the Ph.D. degree in electrical engineering from the University of Patras, the M.Sc. degree in electrical engineering from the Polytechnic University, U.S. and the B.Sc. in Electrical Engineering from Fairleigh Dickinson University, U.S. Since 1996 he has been a research fellow and a lecturer in the School of Engineering of the University of Patras, Greece and he is a member of the Industrial Systems Institute/ ATHENA RC. He has over 50 publications in journals and conference proceedings and he is involved in many National and European Commission funded R&D projects. His current research interests are focused on networked embedded

systems in the industrial and ehealth domains. He is a regular reviewer in many scientific journals. He is a member of IEEE Industrial Electronics Society.

S. Koubias received the Diploma in Electrical Engineering and the Ph.D. degree from the Department of Electrical and Computer Engineering, University of Patras, Greece, in 1976 and 1982 respectively. He had been elected as the Rector of the University of Patras for the period 2006–2010. From 1976 until today, he has served to the Department of Electrical and Computer Engineering, University of Patras, as a researcher and faculty member. During the period of 2001–2003 he has served as Deputy Chairman of the Department of Electrical and Computer Engineering. Since 2008 he is the Director of the Applied Electronics Laboratory, Department of Electrical and Computer Engineering, School of Engineering, University of Patras. Also, during the period 1984–1990 has served as professor in the Technological and Educational Institute of Patras. During the period 2001–2003 he was the Chairman of the Scientific Committee of the Network Operations Center (NOC) of the University of Patras, which supports over 25,000 users. He has long academic and research experience. His main current research interests include real-time embedded (distributed) systems, communication protocols, advanced wired and wireless industrial networking systems, distributed wireless sensor networks, routing protocols, management techniques for wireless nodes power consumption, advanced distributed enterprise systems and industrial communication structures for C2B, B2B applications (use of ontologies, web-services, industrial GRID, etc.), advanced interoperable industrial networking architectures, interworking of heterogeneous control communication systems, advanced building networking systems and industrial machine vision systems. He has published over 150 scientific papers in international prestigious journals and conference proceedings, he is the author of a book and has participated in the writing and translation of others. He has actively participated in organizing major international conferences and for some of them (IEEE conferences, like ETFA, ICIT, ISADS) he was acting as the General Chair. He has participated as project leader or member of research teams in important Greek and European R&D and educational programs and he has important and extended scientific and research collaborations in an international basis. Finally, during the period of 2008–2010 he was acting as a Member-at-Large for the Administrative Committee of the IEEE Industrial Electronics Society.