Abstract
The event detection is one of the fundamental researches in wireless sensor networks (WSNs). Due to the consideration of various properties that reflect events status, the Composite event is more consistent with the objective world. Thus, the research of the Composite event becomes more realistic. In this paper, we analyze the characteristics of the Composite event; then we propose a criterion to determine the area of the Composite event and put forward a dominating set based network topology construction algorithm under random deployment. For the unreliability of partial data in detection process and fuzziness of the event definitions in nature, we propose a clusterbased twodimensional τGAS algorithm and fuzzydecision based composite event decision mechanism. In the case that the sensory data of most nodes are normal, the twodimensional τGAS algorithm can filter the fault node data effectively and reduce the influence of erroneous data on the event determination. The Composite event judgment mechanism which is based on fuzzydecision holds the superiority of the fuzzylogic based algorithm; moreover, it does not need the support of a huge rule base and its computational complexity is small. Compared to CollECT algorithm and CDS algorithm, this algorithm improves the detection accuracy and reduces the traffic.
1. Introduction
In the eventdriven wireless sensor networks (EWSNs) [1], a large number of sensor nodes deployed in monitoring area detect interested physical phenomena (such as forest fire prevention) in the environment. Event is the state changes in the real world [2]. Most previous studies of event detection just consider simple events. The literature [3] proposes distributed Bayesian algorithm for the area detection of the faulttolerant events; this algorithm determines whether an event has occurred in its selfposition through exchanging information with surrounding nodes. The literature [4] shows three ways to determine whether the nodes are at the boundary of the event; these three methods are based on statistics, image processing algorithm, and classification algorithm, respectively. The position of the node and judgment will be sent to the base station, and then the base station judges the area of the event. The literature [5] presents faulttolerant events area detection mechanism by combining with spacetime correlation and threshold. The literature [6] analyzes the simple event detection delay; only a kind of sensor is needed in the network in the judgment of the simple event. However, most events need to detect various properties of the environment, if sensors that are needed to detect the Composite event can be integrated on a node, and then Composite event can be regarded as a simple event [7].
In recent years, heterogeneous wireless sensor network [8] (WHSN) consisted of different types of nodes has appeared; different types of nodes in the network integrate into different sensors. For example, there may be three kinds of nodes in the wireless sensor network (WSN) to detect fire; temperature, smoke concentration, and light intensity sensors are integrated into each node separately.
Wireless heterogeneous sensor network (WHSN) is suitable for Composite event detection [9], and there are two ways to deploy the nodes: nonrandom deployment and random deployment. For these two kinds of deployment, there are many literatures that have discussed the distributed algorithms. In the literature [10, 11], the monitoring area is divided into multiple virtual grids with the same size, and each grid has a gateway node. The activated nodes provide the gateway node with environmental information, and then the gateway node judges whether the Composite event has occurred. Such algorithms assume that the sensing range of the node can cover the whole grid, and there are sufficient nodes in the girds to determine whether the Composite event occurs. The literature [12] studies the coverage of Composite events on the basis of dividing the grid. Whether Composite event occurs can be determined through exchanging information with neighboring under random deployment. According to the literature [13], CollECT algorithm is proposed for Composite event detection and tracking problems. Since CollECT algorithm requires that each node be active, therefore the traffic of this algorithm will be heavy when the event occurs. The literature [14] shows a method which is based on connected dominating set (CDS) for Composite events detection, but the accuracy is not high. Compared with CollECT algorithm, CDS algorithm detects the Composite events by the sleep scheduling mechanism, and it reduces the network energy consumption effectively. In addition, the algorithm only needs active nodes to know their own locations; thus it reduces the position overhead.
A reliable routing mechanism is needed to ensure that the event information can be transmitted to the base station successfully after the events are detected. Reliable routing mechanism often establishes multiple paths between the source node and the base station, and event information can be sent to the base station as long as at least one path is valid. The literatures [15, 16] establish multiple disjoint paths between the source node and the base station to ensure the reliability of data transmission. The literature [17] proposes a SSR protocol, which requires data packets to consider the situation of surrounding nodes and choose the nexthop node properly in every transmission. Cut point will appear in the network when the node fails. When the cut point fails, the event information could not be transmitted to the base station, if all the paths between the source node and the base station pass the cut point. Therefore, it is necessary to fix the cut points. The literature [18] summarizes the existing cut point predicting algorithm and analyzes its performance. The literature [19] discusses how to repair the cut points in the case that there are mobile nodes in the network. When the link that reaches the next hop in the routing table fails, flooding [20] can be used to set a new route to forward the event information.
The above literatures have researched the network topology and routing. They all use thresholdbased determination mechanisms; that is, when a node senses that a property’s value is more than a given threshold, it considers that event related to the property occurs. In the literature [4], each node uses this strategy to determine whether the simple event occurs, then exchanges information with neighbor nodes, and finally determines their own verdict to ensure the boundaries of simple events. In the literatures [2, 10], the Composite event detection is achieved by the following process: first of all, whether simple events corresponding to different sensors reach a given threshold, Boolean calculation is operated on the result of these events to get the result of the determined events. However, it is not reasonable to determine the events in nature through the threshold mechanism. Since data around the threshold may affect the test result, and as a result of many other factors, part of data produced by sensor in the sensing process may be wrong.
Because the definition of the event in the realistic environment is uncertain, and fuzzylogic based Composite events detection is raised in the literature [21]. Fuzzy logic has had some applications in the wireless sensor network (WSN); literatures [22–24] use fuzzy logic method to select cluster heads, literatures [25, 26] use it to solve the safety problem in wireless sensor network, literature [27] utilizes it in data fusion, and literature [28] imposes it to design routing algorithms. Decision mechanism based on fuzzy logic divides simple events into different levels firstly, calculates the membership of the detected attribute value to each level with membership function, then calculates each rule in the rule base, and finally obtains result with antifuzzy.
Objectively, Composite events decision mechanism which is based on fuzzylogic resolves many unreasonable problems resulting from using threshold value to determine events, but as the decision mechanism needs huge rule base, and rule base will grow exponentially with the number of attributes to be detected increase, thus, it puts forward higher requirements for the sensor node’s storage capacity.
In this paper, the proposed fuzzydecision based Composite event detection algorithm (FLCED) consists of three parts: first of all, building network topology based on connected dominating sets; the dominant point is local decision node; then using spacetime correlation to cluster the perceived value of the same attribute, screening out the correct data, and identifying the fault node; finally, determining Composite events with decisionmaking mechanism based on fuzzydecision. The construction of the network topology based on connected dominating set forms the spanning tree which regards the control point as the decision point, and clustering algorithm ensures the correctness of the data involved in determining. Because decisionmaking mechanism based on fuzzydecision does not need the support of huge rule base, it is more practical than the decisionmaking mechanism based on fuzzy logic.
2. Network Model
Let sensor nodes randomly deploy in the detection area , so that the monitoring area is substantially covered and each node is integrated by one or more sensors. Different sensors have different sensing ranges and thus have a different perception and the communication radius is adjustable. Maximum communication radius is described as . The network consisting of nodes is connected; each node with a unique ID determines its own position by localization algorithm [29, 30] or GPS [31].
Generally, the signal energy transmitted from sensor node is decreasing as the distance from the signal source is increasing. Assuming that is the distance between node and the event source, and is the signal energy of the detection node, the lost energy is , and , , and , where is the signal attenuation function, and it is subject to climatic and other environmental conditions; is loss index of the signal transmission, and its range is from 2.0 to 5.0. In this paper, the signal attenuation function [32] is as follows:
Errors of sensing data of the sensor mainly come from the hardware or the random ambient noise. and denote “event does not occur” and “event occurs,” respectively. represents the measured data of node : : ; : . is the noise energy received by the node . Let noise be distributed normally at each node , ~ (,), where and are the mean and variance, respectively. The noise is independent of the sensor and obeys normal distribution. The sensing data of the detection node is a normal distribution: . Due to the independence of the noise, the energy of the received signal of different nodes is different, but the detected value of the sensor nodes is independent of the space. The peak value of the signal to noise ratio (SNR) is defined as to quantify the level of the noise. The signal attenuation and noise model that obeys independent normal distribution has been widely applied in multisensor node signal detection and has been shown [32]. In fact, noise transmission is an approximate normal distribution. The model (i.e., , , , and ) can be used to estimate the sensing data collected by the WSNs.
3. Definitions
Definition 1 (perceived neighbors). is the set of all nodes, ; let be a sensor with a sensing property . The perception radius of is . If , ( represents the Euler distance between and ), then is the aware neighbor of . is the aware neighbor of , which means can sense attribute of .
Definition 2 (active sensing neighbors). The nodes that are not greater than / ( is an integer greater than 1) distance from node are called the effective perception neighbor of , and the set of all the points satisfying the properties is denoted by (the selection of will be discussed in Section 8.3).
Definition 3 (simple event). The event occurred can be determined by detecting an attribute of the environment, while the event is called a simple event, denoted as where means a simple event and means the corresponding environment attribute value of event . When its value is true, it indicates that the event occurred. When the value is false, it indicates that the event did not occur.
Definition 4 (composite event). Only detecting multiple attributes of the environment can determine whether an event occurs; then the event is called Composite event, denoted as where represents the Composite event, represent kinds of attributes values of the environment, and is the decision function, whose meaning is the same with the simple event.
Definition 5 (event area). If detecting events (simple event or Composite event) in any position of area , the results are all , then area is called the event area.
In the boundary of the event area, since attribute values of the environment do not vary, the environmental attribute values detected by the node can approximately reflect the state of the attribute in the node sensing range. Because of harsh environmental conditions, nodes are likely to be damaged. Then we can deploy many nodes of the same type to detect the region. Based on the kwatching nature of the event in literature [10], we propose a regional kwatching concept.
Definition 6 (kwatched area). If all attributes of the environment are detected by the node integrated by sensors , respectively, the region is kwatched, and the region also meets the kwatching nature. If of node in the monitoring area has nodes integrated , respectively, then is said to be kwatching decision node, referred to as a decision node, is called the kwatching policy area, referred to as decisionmaking scope.
Definition 7 (detecting voids). If a node is not the decision node, and it is not in a decisionmaking scope of a decision node, then the events surrounding the node could not be detected; the location of the node is called a detection void.
Definition 8 (clustering [33]). Let be a data set, ; denotes properties of object . An mcluster of is donated as ; then is divided into classes by and satisfies the following three conditions:(1), ;(2);(3), , .
Definition 9 (membership function). An arbitrary mapping from the domain to the closed interval : , for any , , ; then is called a fuzzy subset of , is called membership function of , and is called the membership of to fuzzy set , denoted as
Given a limited domain , its fuzzy subset can be denoted as Chad notation:
where is the element of the domain, is the membership function of to , , the formula represents a fuzzy set of elements, and “+” is sign for Chad mark.
4. Criteria
Assuming that detecting Composite event needs to detect environmental attributes , these properties are detected by the integrated sensor , corresponding perception range is , , , , respectively, and are the values of corresponding attribute. The node that detects sends the message (attribute, value) to the local decision node, and the concrete properties values are not contained in the message, which only contains 0 or 1; 1 shows that and can reduce the length of data packets. Local decision node operates after receiving packets and judges whether event happens within the decision scope.
Criteria. For any node in the network, have the node with integrated sensors , and their readout are ; if , Composite event could happen in the circular area, which regards as the center and as radius; the set of all nodes within decisions scope of is denoted as .
Theorem 1. For any node in the network, one can choose an node integrated sensor from , a collection constituted of these nodes is recorded as (elements can be repeated), and if there is such a , can sense any environment attributes of any position in the decision scope of .
Proof. Take a within the decisions scope of and decision radius of is . Assuming that the distance between and is less than and the distance between and node integrated is less than , see Figure 1 then
Thus, environment attributes of can be tested by . Since and are arbitrary, can sense any environment attribute within any position of decision scope of .
Theorem 1 shows that as long as selected part of decision nodes is in the monitoring area and other nodes are within the scope of their decisions, then we can determine the status of the incident in this monitoring area by testing the environment with these decision nodes. However, attribute values received by local decision node not necessarily reflect changes of the environment correctly. Decision mechanism proposed in this paper is divided into two parts: first, the local decision nodes process the detecting data with clustering algorithm and use the processed data to make fuzzy decision and get the final conclusion.
5. Construction of the Network Topology
Abstracting the network into a graph , and , represents the set of all the nodes in the network, represents the set consisted of neighbor node pairs communicating with each other in , and , where sink is the base station. represents the set consisted of neighbor node pairs communicating with each other in ; is the set consisting of node pairs whose Euler distance is not more than . The CETC algorithm proposed in this paper regards dominating sets as the topology of the event detection and selects a subset of the graph as , where the point is the local decision node. The choice of should meet the following demands.(1)Nodes in are decision nodes.(2) is a dominating set of ; domination relationship is the decision making.(3)Use a distributed algorithm, each node can decide whether to be a point of in local scope.(4)Algorithm has lower time complexity and message exchange complexity.(5)Nodes in have more residual energy than other nodes.(6)The number of points in should be less as possible and these points are scattered in space.
Based on the goal above, the process of building the topology structure of the network is divided into two steps: selecting and . Selecting is selecting a dominating set of . Selecting is selecting part of the nodes in , providing the nodes in with attributes that they cannot sense, and making the decision range of the node in the satisfy the kwatching nature. Initially, there are four types of nodes in the network.(1)Sleep node (SLEEP): node inactive.(2)Local decision node (DECIDE): nodes collecting the information of peripheral nodes and determining whether the Composite events happen within .(3)Sensor nodes (SENSE): perceiving attribute values of the environment and sending them to the local decision node.(4)Connect nodes (CONNECT): nodes forwarding results of the event.
Local decision node has three decisionmaking results (RESULT): decision scope is in the area of the event, decision scope is on the boundary of the event area, and no events are in the decision scope.
Initially, all nodes are SLEEP, and the network performs CETC algorithm, execution time is , when the algorithm ends, nodes start to detect the event in the monitoring area, and the time of each round is the .
(1) Selecting . First of all, determine which nodes can be kwatching decision nodes in the network. Assume that node integrated a variety of sensors , so with for the radius broadcast decision node to discover data packets (LDN packet), which includes the ID of the node, the type of sensor integrated by the node, and the residual energy of the node. After time , each node receives the LDN data packet from the neighboring nodes, extracts the information of LDN packets, and stores it. Each node will determine whether received at least LDN packets sent by nodes integrated of ; if so, then the node will be the kwatching decision node; the set which consists of kwatching decision nodes is denoted as .
Then, selecting a part of nodes from to constitute so that is a dominating set of the graph , nodes of will be the local decision nodes. Local decision node has more residual energy compared to other nodes, and there should be more nodes within its decision scope, namely, greater degree. The degree of the node means the number of neighbor nodes; the degree of the node in figure is . Choosing the node with greater degree contributes to reducing the number of local decision nodes in network and making the distribution of local decision nodes more dispersed. The priority Prio represents the residual energy of the node and the whole situation of the degree; the calculation of the priority of is given by where denotes the remaining energy of the node, is the initial energy of the node, is the degree of the node, and indicates the average degree of the nodes in graph . Consider where is the number of nodes in a network and is the size of the monitoring area. Node broadcasts neighbor discovery packets (LN packets) with radius after confirming whether the node itself is kwatching decision node; the message contains the ID of the node and whether it is kwatching node. After time , all kwatching decision nodes received LN packets sent from nodes within the scope of . In this way, each of the kwatching decision nodes will know its own degrees; then the node counts their priority Prio.
kwatching decision nodes broadcast the priority packet (PP packet) with radius; the priority information is contained in PP data packet. After time, each node receives packets sent by the kwatching decision nodes in the range of . kwatching decision nodes extract the information of all nodes in PP data packets and then calculate the waiting time of sending BDN packets. The waiting time of a kwatching decision node before sending BDN packets is : where is the maximum priority among the PP packet received by and is the minimum priority among the PP packet received by . is a given time period, is divided into segments, and is a random moment in . If received a PP packet, the wait time is calculated by the first equation; if does not receive a PP packet, will choose a random value in as the waiting time. After time , all nodes have finished the calculation and start timing. Waiting for time , will send BDN packets. During the waiting period, if received the BDN data packet from other nodes, it will give up sending operation. Otherwise, the node sends a BDN packet and informs that it will become the local decision node and set its STATE to DECIDE.
If a nonkwatching decision node does not accept BDN data packets sent from other nodes in time , but received PP data packet before, it will send passive local decision node data packets (CDN data packet) to node of maximum priority in PP data packets and inform to be the local decision node; will set the STATE to DECIDE after receiving the message. If being not received PP packet, then is not in the scope of decision node of kwatching decisions nodes; thereby there is a detect void in position .
(2) Selecting . As local decision nodes have integrated limited sensors and need to select the surrounding nodes as the sensing nodes to provide the environmental information that could not be detected, there is a sensor node list in the cache of the local decision node, storing related information of the sensor node and containing ID of the node and property . When , the sensing nodes will send simple events data packet (SE packet) to the local decision node in the list.
When choosing , each local decision node has received the LDN data packet sent from the neighboring nodes. Local decision node extracts node information from the received the LDN data packet and merges the same information. If node can provide information and information , then combine the two kinds of information to the perception information of node . Each kind of sensor has a counter ; initially, . The value of the corresponding of the integrated sensor will be minus 1 by ; then will sort node information in the LDN data packet by residual energy of the node from large to small. Selecting nodes from the sorted sequence sequentially, let the node selected currently be ; if the corresponding of the integrated sensor of is larger than 0, then will choose as the sensing node to provide the information of attribute , and the corresponding is minus 1. If the corresponding of all sensors integrated by is 0, then will not select as the sensor node. All of the have become 0, will cease to choose. When node has selected the sensor node, will send data packets (SN packet) to the selected sensing node; SN data package includes node ID and the list of attributes to be detected. The sensor node extracts the information from the received SN data packet, adds the source node sending a SN packet to its local decision node list, and then returns the acknowledgment packet (CF packet). Local decision node will add the information of the sensor node to its local decision node list after receiving a confirmation message. Let be the time required for selecting sensor nodes. The pseudocode of CETC algorithm is as shown in Algorithm 1.

In the initial conditions, the RESULT of the local decision node is Out_Event. If there is part of , but , it indicates the decision range of the local decision node on the boundaries of the Composite event and sets the RESULT of the local decision node as Boundary_Event. If , set the RESULT of local decision node as In_Event. If the RESULT is not Out_Event, the local decision node will send event data packets (CE) to the base station; the data packets contain the position and the RESULT of the local decision node. The base station will determine the area of Composite event according to the positions and decision contained in the received CE data packet.
6. Cluster Analysis and Fault Detection
Supposing the transmit period of perception nodes is , the local decision node receives the data transmitted by the perception node periodically. It needs to detect kinds of attributes of the environment in order to determine the Composite events. The decision ranges of local decision making nodes satisfy kwatching nature; that is to say, the local decision node will receive data each cycle. We use the sliding window mechanism, making the local decision node stores the data of the recent cycles at any moment. That means the size of the sliding window is , so it saves data each moment. The value of th attribute at time of the sliding window is , the data received at time is , and the data of the th attribute of the local decision node is . Data received is and carrying out cluster analysis on and , algorithm including the two clustering analysis is called twodimensional GAS algorithm. GAS (generalized agglomerative scheme) [34] is a kind of hierarchical clustering mechanism; twodimensional GAS algorithm adds restriction conditions on the basic of the GAS algorithm and uses spatiotemporal correlation to cluster the data.
Initially, each attribute value corresponds to a class, a total of classes, as ; the classification obtained at step is denoted as . Then, the clustering of the first layer data is carried out. Due to spatiotemporal correlation, we mark the differences between the two classes using the poor between the two elements with the smallest difference in two classes, denoted as :
Then merge the smallest two classes of and get . Using span to denote the maximum difference between the elements in a class as follows:
Values of the same attribute are similar; therefore, for the attribute, given a threshold , and , could not be too small, in case that reasonable data are neglected, could not be too large, in case that wrong data and correct data are in a class. When , merge two minimum classes of and get . Then repeat the above steps until merging of any two of the classes does not satisfy the formula , or leaving only one classify finally.
Setting the class with maximum number of elements as a correct data class, the average is the value of attribute at time :
If the number of category with maximum number of elements is more than one, then calculate of each classification; finally, take values which are most close to event attribute, and the corresponding class will be attributed to the correct category. As classifying temperature data in fire detection, if the number of category with maximum number of elements is more than one, then the class with the largest is considered as a correct category. The average of all the th properties at moments is . In order to eliminate the temporary failure of the node, cluster the data of by the process above and get the average . The algorithm above is called twodimensional GAS algorithm; the description of the algorithm is as shown in Algorithm 2.

Next, we present an example of performing a twodimensional GAS cluster on temperature. Table 1 shows a set of temperature data when , .
Analyzing the group of data with twodimensional GAS algorithm. According to the algorithm, it will analyze the data of every moment. Next we will process the data at the third moment:
Figure 2 is the clustering process of with three steps in total; we get , , , and after clustering. The number of elements in of is the largest; therefore, and are considered to be unreliable; . Analyzing the other data, we get . Then clustering again, we will get the class with the most elements, 29.52 may be caused by the temporary changes of the environment or temporary failure of the node. Therefore, is used to indicate the current temperature of the environment.
The GAS function will sort the collected data first; the complexity of the algorithm is . In the layer , it is needed to compare for times; the comparison number of the algorithm is Then, the total time complexity of the twodimensional GAS algorithm is .
As for , if , then the node producing the data is considered to fail. The node will be informed by the local decision node. Before running CETC algorithm, node sets for each sensor, represents the times of failure of the node in a round. If local decision node determines that a sensory data is invalid, then it will notify the corresponding nodes, value of the corresponding node increases 1. Time of each round is , the execution time of CETC algorithm is , and data collection cycle of local decision node is denoted by ; then the collecting times of each round are The perception probability of a sensor node failure is Given a threshold , if , the node cannot sense the environment.
7. Fuzzy Decision of Composite Events
Fuzzy decision is an important part of fuzzy system theory. A decision is the countermeasures and strategies taken on a thing [35]. In real life, factors that affect the determine results of Composite events are fuzzy mostly, a given method is sorted by fuzzy decision algorithm; decision results can be considered as solution set, from which the most appropriate processing scheme is selected. Such as in fire detection, the decision results of the node are divided into three possible schemes {send information of event occurs, send information of the abnormal environment, without any operation}. In some cases, part of the property value of the environment is higher, but the event has not occurred; then the scheme of abnormal environment was sent. For this kind of abnormal phenomenon, we will process it additionally.
The estimate value of the current attribute of the environment can be obtained by the twodimensional GAS algorithm; with the estimated value, we can obtain the optimal scheme of the event decision. In the paper, we adopt a compromised type of fuzzy multiattribute method [36] to make decisions on events; its basic idea is that for the initial sample data, virtual fuzzy positive ideal solution, and fuzzy negative ideal solution, the fuzzy positive ideal solution is constituted of the maximum value of the fuzzy parameter values of each attribute, and the fuzzy negative ideal solution is constituted of the minimal value of fuzzy indicator values. Then calculate the weighted distance between each alternative and the fuzzy positive ideal solution and fuzzy negative ideal solution with weighting method. On this basis, calculate the membership degree of each alternative belonging to fuzzy positive ideal; the greater the degree of membership, the more ideal the scheme.
The paper modifies the compromised type of fuzzy multiattribute method appropriately to adapt the determination of the Composite event in the wireless sensor network. The set of the attributes of the determining solution is , the set of node decision scheme is , elements of are ordered, is the factor that the scheme needs to consider, such as fire detection, and the can be temperature; it can also be a temperature of fixed period of time. indicates node processing solution: choosing the optimal solution by decision algorithm. The following is the main steps of the determining mechanism based on the fuzzy decision.
Step 1. The membership degree function matrix of each attribute relative to the scheme is , and calculate the fuzzy indicators matrix : is a membership function, indicating the suitability of adopting scenario when the value of th attribute is . Membership function can be formulated by experts of the relevant application domain or obtained by machine learning algorithms. Given , calculate the fuzzy indicators matrix :
Step 2. Weigh vector ; the weight vector reflects the influence of different attributes on scheme selection.
Step 3. Construct fuzzy decision matrix , where .
Step 4. Define the fuzzy positive ideal solution and fuzzy negative ideal solution , where and . Among this, is the maximum value relative to indicator values of the th column. The fuzzy index is the minimal value relative to fuzzy indicator values of the th column.
Step 5. Calculate the distance between scheme and fuzzy positive ideal solution and the distance between scheme and fuzzy negative ideal solution , respectively:
Step 6. Select decision scheme.
Let a scheme belong to the fuzzy positive ideal with membership ; here
Clearly, , if the is more close to , the is more close to 1. According to the membership degree, sort in descending order. The greater the is, the more reasonable the scheme is. Scheme of is sorted from high to low order according to the urgency; when , if , select ; otherwise, select .
There are two important parameters in the algorithms above: the set of membership functions and weight vector . The algorithm can be suitable for the Composite event detection in different environments by configuring different and . Such as fire detection, the environment in summer and winter is different. The temperature in summer is higher; modifying the membership functions associated with temperature and cut down the weight of temperature can reduce the effect of temperature on scheme selection. The temperature in winter is lower; raising the weight of temperature can improve the effect of temperature on scheme selection.
The decision mechanism based on threshold is unable to process the fuzzy properties. The rule base grows exponentially as the attribute increases in the decision mechanism based on fuzzy logics. The proposed decision mechanism of Composite event based on fuzzy logic can not only deal with the vaguely defined attribute but also with the condition that the number of elements in the membership function matrix grows exponentially as increases when is given.
For scheme , if part of is bigger, then will be larger. The determination mechanism based on fuzzy decision cannot indicate the complex Boolean function in the determination mechanism based on threshold and complex rules in the decision mechanism based on fuzzy logic; thus, it cannot judge the more complex Composite event. When most attributes of the environment or part of properties with greater weight meet the requirements of the occurrence of Composite event, the determination mechanism based on fuzzy decision can determine whether the Composite event occurs, which meets the nature of most Composite events in the real world; the rules package in the literature [21] contains such rules. Therefore, the determination mechanism based on fuzzy decision of the Composite event can be applied to the Composite event detection in the general situation.
8. Performance Analysis
This section will discuss the time complexity and the complexity of message exchange of the algorithm and analyze advantages of detecting events using multiple kinds of properties. Finally, it will discuss the selection of .
8.1. Complexity and Performance Analysis of the Algorithm
Theorem 2. The CETC algorithm would end within a limited time.
Proof. From CETC algorithm, we can know that the algorithm is time synchronization. The algorithm has eight time periods corresponding to different calculation and operations of data sending. As shown in Figure 3, scale above marks data packets to be sent, and scale below is the corresponding time period. If exceeding the corresponding time period, the node will not deal with the corresponding data packets. Therefore, CETC algorithm will end within .
Theorem 3. The total time complexity of CECT algorithm is , where indicates the maximum value of the number of nodes in the scope of network node and shows the maximum number of nodes in the decision range of any node in the network, that is, the maximum node degree in figure .
Proof. In Figure 3, the corresponding calculation operations must be carried out at each time period. In the time period , the time complexity of broadcasting LDN packet of each node is . In the time period , node needs to decide whether it can be a kwatching decision node; therefore, nodes need to deal with the received LDN packets one by one in the time period and the time complexity is . In the time period , nodes need to calculate their own priorities and the time complexity is . In the time period , nodes need to calculate the time of sending BDN data packet, so they need to find the maximum value and minimum value of priority level of the received PP data packet, and the time complexity is . BDN data packets will be sent and received in the time period ; the time complexity is . In the time period , nonkwatching decision node that did not receive BDN data packet needs to look for the maximum priority level of the received PP data packet; the time complexity is . In the time period , local decision node needs to extract the information of the node from LDN data packet and sorts nodes according to the energy of the node; then choosing the node with larger energy as sensor node disposable, the time complexity of sorting is . So CETC algorithm’s total time complexity is .
Theorem 4. Message exchange complexity (Message exchange complexity) of CETC algorithm is and is the total number of nodes in a network.
Proof. In addition to exchanging message with specific node in the and period, nodes carry out broadcasting operations in the other period, so message exchange complexity of each node is . So, the message complexity of the entire network is .
Theorem 5. If nodes in the network are all kwatching decision nodes, when the CETC algorithm ends, the probability of two local decision nodes’ distance less than is small.
Proof. If nodes in the network are all kwatching decision nodes, this means that each node can send BDN package. In the time period , all the nodes could be controlled by the local decision node. Assume that there are two nodes and , whose distance is not larger than , the waiting time before sends BDN data packet is as follows:
As seen from the above equation, is divided into segments; each node selects a time period according to the priority firstly and then chooses a random time within this time period, . Because of the uncertainty in figure and residual energy of and , and the priority of Prio is uncertain, and will choose a moment randomly in time period . Assume that there is moments within . So the probability of node sending BDN data packets at any moment is as follows:
If and are local decision nodes, then and will send BDN data packets at the same time; the probability is
When and , . In fact, the value of is bigger and the usage of collision detection algorithm would also be considered; as a result, the probability of the distance of two local decision nodes less than is small.
Theorem 5 shows that local decision node is geographically distributed when CECT algorithm ends; thus, it helps to balance energy consumption of the network.
Theorem 6. When voids are not detected, is a dominating set of graph .
Proof. The CETC algorithm shows that if the node sends BDN packets successfully, then STATE of the node is set to DECIDE. If does not send or receive any BDN data packets, then is not available kwatching decision node; the node will look for node with biggest Prio within the scope of as a local decision node. When voids are not detected, always can find such a node . So for any node in the network, a local decision node always can be found within the scope of . It can be seen that is a dominating set of graph . Due to , is a dominating set of graph .
From Theorem 6, we know that when the voids are not detected, the decision range of local decision node covers all nodes within the monitoring area, so nodes in the are active; then they can monitor all Composite events in the position of the nodes, so as to monitor the occurrence situation of Composite event in the whole monitoring area approximately.
Theorem 7. The set constituted of all active nodes is connected dominating set of .
Proof. The DS algorithm shows that the set constituted of all active nodes is . In the network, any local decision node sends activation message to its parent nodes , , and the activation message will be transmitted to the base station. Nodes on the Path could only be local decision nodes, sensing nodes, or connection nodes; connection nodes are only possible on such path.
Accordingly, in the case that graph is connected, there is at least one path between local decision nodes and base station. Since is the dominating set of graph , so the is the dominating set of graph . Because and ensures the connectivity from nodes in to the base station, so all the active nodes are the connected dominating set of graph .
Theorem 7 shows that the connection node ensures the connectivity between local decision nodes and base stations, so the information of Composite event of the local decision node can be transmitted to the base station; if nodes in are active, then they can complete the detection of events within the monitoring area and send the result of the local decision to the base station.
8.2. Analysis of Composite Events
Theorem 8. Testing events with multiple attributes are more accurate than with one attribute.
Proof. Assuming that Composite event is , if using properties can completely test . Now there are only kinds of sensors in the network; the judgment of the th property is . are not related; then .
Because , then
When = 1, the occurrence probability of composite event probability of is as follows:
When testing various attributes, when , , the probability of the Composite event is as follows:
In order to simplify the analysis, ; then
If is identified, , grows exponentially along with . Therefore, testing the event with multiple attributes is more accurate than with one attribute.
In the ideal state, no event occurs, = 0; when the event occurs, = 1. In real environment, the situation that and tends to appear, which is called that the node has been influenced. There may be two situations of the interference: the first is the failure of the node itself; the second is the interference caused by other factors in the environment. For example, in forest fire detection, temperature properties are ; when , a node may fail, or the sensor is exposed to direct sunlight in summer, causing the perceived temperature data to be higher. is the real value whether events happen in the environment; is the determination result that according to types of properties values of the event of the node, .
Setting the probability that the node is interfered as , , and the probability of the nodes correctly detecting the environment is as follows:
The probability that node cannot detect the environment correctly is as follows:
The indicates the probability that event occurs. For given and , the influence that has on is analysed. Making derivation for , when the derivative is zero, get when is the maximum value:
first increases and then decreases along with . Figure 4 is the situation of when , .
If the detection is required with higher accuracy, can take larger integers around the extreme value . But for the important event, it is considered that the node can detect the change of attributes of the environment and has believable probability of determination result when the events occur; that is,
So if testing important events, when , should be as small as possible, but in order to ensure that is larger, should take larger integers around the extreme value . When , is the large the better. When , . Since is monotonically decreasing, so when takes a larger value, the probability of node accurately testing the environment is still great as long as is lesser.
8.3. Selection of
According to the CETC algorithm, must meet the conditions that and ; then
To simplify the analysis, assume that there are kinds of nodes deployed in area randomly, the th node integrated sensor is and the number of this kind of nodes is . For the node integrated , denotes that there is the th node in the range / ( is the integer greater than 1) from , and indicates that can be the local decision node; then When deploying nodes, we require that , where is the given threshold. For , , ; will decrease along with increasing. When , we will get a biggest integer , and it is the optimal solution. So makes the decision range biggest and decreases the number of local decision nodes and active nodes. Assuming that , , , and , then
9. Experiment and Discussion
We do the simulation experiments and analysis about the accuracy, error rate, energy consumption, the fault detection ability, and decision mechanism of the proposed algorithm in Java and MATLAB. We perform a fire detecting in area 300 × 300 m^{2}; three kinds of sensor nodes are deployed randomly in the area to perceive the temperature, light intensity, and smoke concentration, respectively, the initial energy of the node is 1 J, and the size of packet is 128 bits. The number of each kind of nodes is ; the largest communication radius of the sensor is 40 m, taking = 90%, . Next we will take simulation experiment under the condition , the corresponding optimal . The area of Composite event is a circular area with radius 100 m; the Composite event happens randomly. The experimental data is the average of 50 times simulation.
Figure 5 is the condition when , there is a total of 113 local decision nodes, and sleeping nodes are not marked. Distribution of decision node is more scattered. There still exist a few areas that have not been covered, though they almost cover the entire monitoring area. We only need to determinate these nodes to make sure whether there is a fire in the monitoring area. The experimental parameters are shown in Table 2.
9.1. Failure Detection
Assume that the probability of node failure is . For the faulty node, it will produce the wrong perception attribute values. We separate the wrong data from the sensing data by the twodimensional GAS algorithm. Next we will analyze the relationship between and detection accuracy and the false alarm rate to shown their influence on the twodimensional GAS algorithm. Precision (DR) is defined as the ratio of the number of the fault nodes detected accurately and the number of actual fault nodes in the network. The false alarm rate (FAR) is the ratio of the number of nonfaulty nodes which are wrongly detected and the number of normal nodes in the network.
From Figure 6, when is the same, the larger is and the smaller DR is; that means under the same conditions, detection accuracy will be reduced when there are much fault nodes. When is the same, we found that DR is bigger when is even; this is because such an assumption is made in the simulation that the node can always choose the right category to make fuzzy decisionmaking when the number of two types of data is the same. From the overall trend, DR increases as increases, and this is because the larger the is, the more the nodes are that will provide the attribute information of the environment; then the detection accuracy will be improved.
As can be seen from Figure 7, when is even, the above problem still exists. From the overall trend, FAR decreases along with the increase of . This is because that the greater the is, the more the nodes are that provide the attribute information of the environment, and the error rate will reduce.
By formula (34), when given and the number of nodes in the network, monotonically decreases along with the increase of . Since , the optimal solution of is the max value of when . In practical applications, the and may all be variable, larger helps to reduce the energy consumption in network; a larger could improve the accuracy of event detection and fault detection. But when given the number of nodes, will decrease rapidly along with the increase of and . Therefore, in practice, we should establish a tradeoff between energy consumption and detection accuracy and choose reasonable and .
9.2. Energy Consumption and Accuracy
This experiment evaluates the energy consumption situation of the detection algorithm through the number of active nodes and the exchange capacity of the information when event occurs. Active node refers to the node which is in a nondormant state; capacity of message exchange refers to the number of all the packets which are received by the nodes in the network and used to detect the event.
Figure 8 reflects the number of active nodes of the three algorithms. There are more active nodes in CollECT algorithm because of lack of sleep scheduling. FLCED and CDS algorithms use sleep scheduling mechanism so that the number of active nodes reduced greatly. From the figure, the larger the in FLCED algorithm is, the smaller the number of active nodes is; this is due to the fact that the greater leads to larger decision range of the node, so the monitoring area could be tested with fewer active nodes in the network. Since the perception range of the node is not considered in CDS algorithm, the node just sends perceived environmental attributes to communication neighbors, so the number of activation nodes is fewer compared to FLCED algorithm, but we will see that the performance of the FLCED algorithm is better than the CDS algorithm in the detection accuracy and message exchange capacity.
Figure 9 reflects the comparison of message exchange capacity of three algorithms. The figure shows that CollECT algorithm requires a large amount of data exchange when event occurs. Sensor nodes in FLCED algorithm only need to send the perceived environmental attributes to the selected local decision node; thus, this oneway transmission mechanism reduces the message exchange capacity further compared to the way of broadcasting adopted in CDS algorithm.
Document [35] defines the accurate rate and outevent false rate to assess the accuracy of the algorithm. Set as the set of active nodes in the area of the event, in FLCED algorithm, is the set of the local decision node in the area of the event, is a collection of nodes that indicates an event occurs, and is the total number of nodes.
Accurate Rate. Accurate rate is the ratio of the number of nodes that indicates an event occurs and the total number of nodes in the area of event, noted as , . Out  the Event false rate: the ratio of the number of nodes indicating an event occurs out of the event area and the total number of nodes out of the event area, noted as , .
Figure 10 reflects accuracy of three algorithms; from the figure, the accuracy of FLCED algorithm is close to 100%; this is due to that the perception node in the event region is able to correctly perceive events and send it to local decision node for judging. In CollECT algorithm, it is not necessarily that nodes perceiving all properties of the Composite event in network topology constituted of the node and its neighbor nodes exist; therefore, judgment that nodes make has mistakes. The accuracy of CDS algorithm is not as good as FLCED algorithm and CollECT algorithm. Figure 11 reflects the outevent false rate of the node: the outevent false rate of CDS algorithm is low, there is little difference between the outevent false rate of FLCED algorithm and CollECT, around 35%, the reason why the outevent false rate of the event reaches to 35% is that the area of events is larger in the experiment, and the monitor area is smaller, but this does not affect the performance comparison of the algorithm. Although the accuracy of CDS algorithm is lower, the probability of misjudging the event of the node which is in event peripheral is lower, so CDS algorithm can reflect the external events more accurately. Because we tend to attach importance to determine the situation within the event area, so overall, accuracy of FLCED algorithm is superior to CollECT algorithm and CDS.
Since different incident detection algorithms may use different routing algorithms, so the performance of life cycle is not possible to be compared. However, from the number of active nodes and message exchange capacity, we can know that the energy consumption of FLCED algorithm is less compared with the other two algorithms. In addition to energy consumption, energy balance is also an indicator affecting the network life cycle. Assuming that the incident happens once each round, the area is round with radius 100 m; the Figure 12 shows energy distribution after FLCED algorithm having performed 250 rounds when ; it can be seen from the diagram that energy consumption in the network is more balanced.
9.3. Fuzzy Decision of Composite Event
Data used in this study is fire testing data [35] released from the USA NIST. We will test the fire with temperature and smoke concentration . Solution set is , where notes sending fire event data, notes sending warning data, indicating that environment is unusual, and notes that no event occurs and does nothing. Constructing membership functions is based on given thresholds [37] of smoke sensor and thermal sensors Weighting matrix is .
In Figures 13(a), 13(b), and 13(c) are membership functions and and related to temperature, respectively. In Figures 13(d), 13(e), and 13(f) are the membership functions , and are related to smoke concentration, respectively. Figure 14 is the membership of three schemes, and the origin is the burning time. Before catching fire, is larger, so the nodes use the scheme , and they judge that there is no fire. At the beginning of fire, the sensor does not detect enough intensity to determine events, so is larger. After a period of time, the fire expands, so the node can percept it, there is a dramatic increase in , sharply reduce, and rises a little; is the largest, and the nodes take scheme ; they judge that the fire happened. It can be seen from Figure 14 that nodes can effectively perceive the happening of the fire.
(a)
(b)
(c)
(d)
(e)
(f)
(a)
(b)
(c)
10. The Conclusion
Composite event is a kind of event which widely exists in the nature; the eventdriven wireless sensor network is mainly used for detecting the Composite event, such as fire and intrusion detection. Due to the limitation of node itself, nodes cannot integrate all types of sensors required to detect composite events. However, the detection of Composite event requires collaboration of multiple nodes to complete. By analyzing the characteristics of the composite event, considering that different sensors have different perception, the paper has proposed a criterion of Composite event detection and designed the network topology structure algorithm CETC based on the dominating set; the algorithm will choose part of nodes in the network as local decision nodes and select a specific node as the sensing node. Local decision node makes decisions on the Composite event within its decision scope. Twodimensional GAS algorithm being able to screen test data correctly and decision making mechanism based on fuzzy decision are proposed. Twodimensional GAS algorithm can effectively filter the errors data perceived by failed node through the sliding window mechanism and clustering analysis and then calculate an estimated value of the current environment attributes. Node can determine which sensors have a permanent fault through calculating the probability of failure of the sensor. For the ambiguity of the definition of the composite event, this paper puts forward a decision mechanism based on fuzzy decision; this decision mechanism can determine whether the event has happened effectively. Compared with the decision mechanism based on fuzzy logic in the paper, this decision mechanism does not need a huge rule base. It retains the advantages of the decisionmaking mechanism based on fuzzy logic and can adjust to the event detection in different environment by configuring membership function matrix and weight matrix . The Composite event in this paper is static; it is not suitable for detecting dynamic Composite event in motion. Therefore, the tracking for mobile composite event still needs further research.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgments
This work is supported by the National Natural Science Foundation of China under Grants nos. 61070169 and 61201212, Natural Science Foundation of Jiangsu Province under Grant no. BK2011376, Production Teaching Research Prospective of Jiangsu Province no. BY2012114, Suzhou Key Laboratory of Converged Communication nos. SKLCC2013XX and SZS0805, and Application Foundation Research of Suzhou of China no. SYG201239.