A Fuzzy-Decision Based Approach for Composite Event Detection in Wireless Sensor Networks

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 cluster-based two-dimensional τ-GAS algorithm and fuzzy-decision based composite event decision mechanism. In the case that the sensory data of most nodes are normal, the two-dimensional τ-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 fuzzy-decision holds the superiority of the fuzzy-logic 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.


Introduction
In the event-driven 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 fault-tolerant events; this algorithm determines whether an event has occurred in its self-position 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 fault-tolerant 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 2 The Scientific World Journal 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 next-hop 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 threshold-based 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 fuzzy-logic based Composite events detection is raised in the literature [21]. Fuzzy logic has had some applications in the wireless sensor network (WSN); literatures [22][23][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 anti-fuzzy.
Objectively, Composite events decision mechanism which is based on fuzzy-logic 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 fuzzy-decision based Composite event detection algorithm (FL-CED) consists of three parts: first of all, building network topology based on connected dominating sets; the dominant point is local decision node; then using space-time 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 decision-making mechanism based on fuzzy-decision. 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 decision-making mechanism based on fuzzy-decision does not need the support of huge rule base, it is more practical than the decision-making mechanism based on fuzzy logic.

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 (0) = 1, (∞) = 1, and ( ) = ( − ), where ( ) is the The Scientific World Journal 3 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. 0 and 1 denote "event does not occur" and "event occurs, " respectively. represents the measured data of node : 0 : = ; 1 : = + . is the noise energy received by the node . Let noise be distributed normally at each node , ∼ ( , 2 ), 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: | 1 ∼ ( + , 2 ). Due to the independence of the noise, the energy of the received signal of different nodes is different, but the detected value { | ∀ , 1 } of the sensor nodes is independent of the space. The peak value of the signal to noise ratio (SNR) is defined as = s/ 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 2 ) can be used to estimate the sensing data collected by the WSNs.

Definitions
Definition 1 (perceived neighbors). is the set of all nodes, , V ∈ ; let V be a sensor with a sensing property . The perception radius of is . If ( , V) ≤ , ( ( , V) represents the Euler distance between and V), then V is the -aware neighbor of . V is the -aware neighbor of , which means V 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, 1 , 2 , . . . , represent kinds of attributes values of the environment, and ( 1 , 2 , . . . , ) 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 1 , 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 k-watching nature of the event in literature [10], we propose a regional k-watching concept.
Definition 6 (k-watched area). If all attributes 1 , 2 , . . . , of the environment are detected by the node integrated by sensors 1 , 2 , . . . , , respectively, the region is k-watched, and the region also meets the k-watching nature. If ( ) (1 ≤ ≤ ) of node in the monitoring area has nodes integrated , respectively, then is said to be k-watching decision node, referred to as a decision node, ) is called the k-watching policy area, referred to as decision-making scope.
Definition 7 (detecting voids). If a node is not the decision node, and it is not in a decision-making 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.

Criteria
Assuming that detecting Composite event needs to detect environmental attributes 1 , 2 , . . . , , these properties are detected by the integrated sensor 1 , 2 , . . . , , corresponding perception range is 1 , 2 , . . ., , respectively, and 1 , 2 , . . . , 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. Proof. Take a within the decisions scope of and decision radius of is . Assuming that the distance ( , V) between and V is less than and the distance ( , V) between and node V integrated is less than / , see Figure 1 then Thus, environment attributes of can be tested by V . Since and are arbitrary, {V 1 , V 2 , . . . , V } 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.

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 = + {sink}, 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.
The Scientific World Journal 5 (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 k-watching nature. Initially, there are four types of nodes in the network.
(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 decision-making 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 1 , 2 , . . . , , so with / (1 ≤ ≤ ) 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 (1 ≤ ≤ ); if so, then the node will be the k-watching 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 residual denotes the remaining energy of the node, max 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 k-watching decision node; the message contains the ID of the node and whether it is k-watching node. After time , all k-watching decision nodes received LN packets sent from nodes within the scope of . In this way, each of the k-watching decision nodes will know its own degrees; then the node counts their priority Prio. k-watching 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 k-watching decision nodes in the range of . k-watching 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 k-watching decision node before sending BDN packets is : where Prio max is the maximum priority among the PP packet received by and Prio min is the minimum priority among the PP packet received by . is a given time period, is divided into segments, and random is a random moment in [0, / ]. 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 [0, / ] 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 non-k-watching decision node V does not accept BDN data packets sent from other nodes in time (1 + 1/ ) , but received PP data packet before, it will send passive local 6 The Scientific World Journal 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 V is not in the scope of decision node of k-watching decisions nodes; thereby there is a detect void in position V.
(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 V extracts node information from the received the LDN data packet and merges the same information. If node can provide information 1 and information 3 , then combine the two kinds of information to the perception information of node . Each kind of sensor (1 ≤ ≤ ) has a counter count ; initially, count = . The value of the corresponding count ( ≤ ≤ ) of the integrated sensor will be minus 1 by V; then V 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 count of the integrated sensor of is larger than 0, then V will choose as the sensing node to provide the information of attribute , and the corresponding count is minus 1. If the corresponding count of all sensors integrated by is 0, then V will not select as the sensor node. All of the count have become 0, V will cease to choose. When node V has selected the sensor node, V will send data packets (SN packet) to the selected sensing node; SN data package includes node ID and the list 1 , 2 , . . . , 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 e i = 1, but E = 0, 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 E = 1, 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.

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 k-watching 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 (1 ≤ ≤ ) of the sliding window is . . , }, and the data of the th attribute of the local decision node is Data received is = { 1 , 2 , . . . , } and carrying out cluster analysis on and , algorithm including the two clustering analysis is called two-dimensional -GAS algorithm. GAS (generalized agglomerative scheme) [34] is a kind of hierarchical clustering mechanism; two-dimensional -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 R 0 = { = { }, = 1, 2, . . . , }; the classification obtained at step is denoted as R . 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: = max ( − ) , ( , ∈ ) .
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 R 1 = (R 0 − { , }) ∪ { }. 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 The Scientific World Journal 7 Input: graph = ( , ), graph = ( , ), ∀ ∈ output: , S Initialization: STATE = SLEEP, CB Decide = false, CB Decide indicates whether the node is a -watching decision node Choose : (1) Broadcast LDN packets //1 is performed in the period of time (2) Receive LDN packet, calculate itself whether can be a -watching decision node according to the condition of the determine criterion. If so, CB Decide = true. //(2)-(4) will be implemented in the time period (3) broadcast(LN packets,); (4) receive(LN packets,); (5) if (CB Decide = true) //(5)-(10) performed in the time period (6) calculate priority Prio ; (7) broadcast(PP packets); (8) end if (9) receive(PP packets); //Before the end of the time period, the node is receiving PP data packet (10) if (CB Decide = true) (11) Calculate ; //11 performed in the time period (12) starts timing after the period of time ; //(14)- (22) performing in (1 + 1/ ) time period (13) while ( < ) (14) if (receive(BDN packets)) (15) stop the plan of sending BDN data package; (16) end if (17) end while (18) if (!receive(BDN packet)) //The node not received the BDN packet (19) broadcast corresponding count of all sensors of the current node = count − 1; sort node information by residual energy from large to small and get set . (6) foreach ( in ) (7) if (any count = 0) (8) break; (9) end if (10) if (count corresponding to the integrated sensor on > 0) (11) select as the sensor node, let the test attribute , count = count − 1; (12) else (13) continue; (14) end if (15) end foreach    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 = { 1 , 2 , . . . , }. 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 two-dimensional -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 = 5, = 6.
Analyzing the group of data with two-dimensional -GAS algorithm. According to the algorithm, it will analyze the data of every moment. Next we will process the data at the third moment: 3 = {55.7, 81.2, 54.1, 55.6, 21.6, 55.1} , = 10 ∘ C. Figure 2 is the clustering process of 3 with three steps in total; we get R 0 , R 1 , R 2 , and R 3 after clustering. The -GAS function will sort the collected data first; the complexity of the algorithm is ( log ). In the layer , it is needed to compare for − −1 times; the comparison number of the algorithm is Then, the total time complexity of the two-dimensional -GAS algorithm is ( × 2 + 2 ). As for = { 1 , 2 , . . . , }, if = { , 2 , . . . , ℓ }, then the node producing the data { 1 , 2 , . . . , ( −1) , . . . , (ℓ+1) , . . . , } is considered to fail. The node will be informed by the local decision node. Before running CETC algorithm, node sets = 0 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. Return ; End function -GAS Algorithm 2: Two-dimensional -GAS algorithm.

Fuzzy Decision of Composite Events
x 2 x 1 x 3 x 4 x 5 x 6 Figure 2: Clustering process. 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 { 1 , 2 , . . . , } of the current attribute of the environment can be obtained by the two-dimensional -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 = { 1 , 2 , . . . , }, the set of node decision scheme is = { 1 , 2 , . . . , }, 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 { 1 , 2 , . . . , }, calculate the fuzzy indicators matrix : Step 2. Weigh vector = { 1 , 2 , . . . , }; the weight vector reflects the influence of different attributes on scheme selection.
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, 0 ≤ ≤ 1, 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 = = max{ } ( ̸ = ), 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.

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 .

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 + + + + + / + + . 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 (1). In the time period , node needs to decide whether it can be a k-watching 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 (1). 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 (1). In the time period , non-k-watching 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 (Δ log(Δ)). So CETC algorithm's total time complexity is (Δ + Δ log(Δ)).

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 (1). So, the message complexity of the entire network is ( ).

Theorem 5. If nodes in the network are all k-watching 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 k-watching 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 V, 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 random within this time period, random ∈ [0, / ]. Because of the uncertainty in figure and residual energy of and V, and the priority of Prio is uncertain, and V 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 V are local decision nodes, then and V will send BDN data packets at the same time; the probability is When = 10 and = 10, ≈ 8.3 × 10 −5 . 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 k-watching decision node; the node will look for node V with biggest Prio within the scope of as a local decision node. When voids are not detected, always can find such a node V. 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. Proof. The DS algorithm shows that the set constituted of all active nodes is ∪ ∪ ∪ {sin }. In the network, any local decision node sends activation message to its parent nodes 1 , 2 , and the activation message will be transmitted to the base station. Nodes on the Path → sin could only be local decision nodes, sensing nodes, or connection nodes; connection nodes are only possible on such path.

12
The Scientific World Journal 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 ∪ {sin } is the dominating set of graph = ( , ). Because and ensures the connectivity from nodes in to the base station, so all the active nodes ∪ ∪ ∪ {sin } 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.

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 .
In the ideal state, no event occurs, = 0; when the event occurs, = 1. In real environment, the situation that { = 1 | 0 } and { = 1 | 1 } 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 { = 1 | No Fire}, 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 , = ({ = 1} | 0 ) = ({ = 0} | 1 ), 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 = 0.1, = 0. 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 (1 − )/ < 1, should be as small as possible, but in order to ensure that is larger, should take larger integers around the extreme value .
The Scientific World Journal When (1− )/ ≥ 1, is the large the better. When → ∞, lim → ∞ = 1− . 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.

Selection of .
According to the CETC algorithm, must meet the conditions that 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 ) . (33) When deploying nodes, we require that ( ) ≥ , where is the given threshold. For , , (1 ≤ ≤ ); ( ) 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 = 0 , = 0 , 1 ≤ ≤ , and = 1, then ] .

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 0 ; the largest communication radius of the sensor is 40 m, taking = 90%, = 1. Next we will take simulation experiment under the condition 0 = 300, 400, . . . , 1300, the corresponding optimal = 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4. 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 0 = 300, 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 14 The Scientific World Journal  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 two-dimensional -GAS algorithm. Next we will analyze the relationship between and detection accuracy and the false alarm rate to shown their influence on the two-dimensional -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 decision-making 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 trade-off between energy consumption and detection accuracy and choose reasonable and .

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. FL-CED and CDS algorithms use sleep scheduling mechanism so that the number of active nodes reduced greatly. From the figure, the larger the in FL-CED 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 FL-CED algorithm, but we will see that the performance of the FL-CED 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 FL-CED algorithm only need to send the perceived environmental attributes to the selected local decision node; thus, this one-way 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 out-event false rate to assess the accuracy of the algorithm. Set evt as the set of active nodes in the area of the event, in FL-CED algorithm, evt is the set of the local decision node in the area of the event, urg 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 A( urg ), A( urg ) = | urg ∩ evt |/| evt |. 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 E ( urg ), E ( urg ) = (| urg |−| urg ∩ evt |)/( − | evt |). Figure 10 reflects accuracy of three algorithms; from the figure, the accuracy of FL-CED 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 FL-CED algorithm and CollECT algorithm. Figure 11 reflects the out-event false rate of the node: the out-event false rate of CDS algorithm is low, there is little difference between the out-event false rate of FL-CED algorithm and CollECT, around 35%, the reason why the out-event 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 FL-CED 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 FL-CED 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 FL-CED algorithm having performed 250 rounds when 0 = 300; it can be seen from the diagram that energy consumption in the network is more balanced.

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 1 and smoke concentration 2 . Solution set is { 1 , 2 , 3 }, where 1 notes sending fire event data, 2 notes sending warning data, indicating that environment is unusual, and 3 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 = {0.5, 0.5}.
In Figures 13(a), 13(b), and 13(c) are membership functions 11 ( ) and 21 ( ) and 31 ( ) related to temperature, respectively. In Figures 13(d), 13(e), and 13(f) are the membership functions 12 ( ), 22 ( ) and 32 ( ) are related to smoke concentration, respectively. Figure 14 is the membership of three schemes, and the origin is the burning time. Before catching fire, 3 is larger, so the nodes use the scheme 3 , and they judge that there is no fire. At the beginning of fire, the sensor does not detect enough intensity to determine events, so 3 is larger. After a period of time, the fire expands, so the node can percept it, there is a dramatic increase in 1  sharply reduce, and 2 rises a little; 1 is the largest, and the nodes take scheme 1 ; they judge that the fire happened. It can be seen from Figure 14 that nodes can effectively perceive the happening of the fire.

The Conclusion
Composite event is a kind of event which widely exists in the nature; the event-driven 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. Two-dimensional -GAS algorithm being able to screen test data correctly and decision making mechanism based on fuzzy decision are proposed. Two-dimensional -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 decision-making 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.