doi:10.1155/2010/174063 Research Article Decentralized Detection in IEEE 802.15.4 Wireless Sensor Networks

We present a mathematical model to study decentralized detection in clustered wireless sensor networks (WSNs). Sensors and fusion centers (FCs) are distributed with the aim of detecting an event of interest. Sensors are organized in clusters, with FCs acting as cluster heads, and are supposed to observe the same common binary phenomenon. A query-based application is accounted for; FCs periodically send queries and wait for replies coming from sensors. After reception of data, FCs perform data fusion with a majority-like fusion rule and send their decisions to an access point (AP), where a final data fusion is carried out and an estimate of the phenomenon is obtained. We assume that sensors are IEEE 802.15.4-compliant devices and use the medium access control (MAC) protocol defined by the standard, based on carrier-sense multiple access with collision avoidance. Decentralized detection and MAC issues are jointly investigated through analytical modelling. The proposed framework allows the derivation of the probability of decision error at the AP, when accounting for packets' losses due to possible collisions. Our results show that MAC losses strongly affect system performance. The impact of different clustering configurations and of noisy communications is also investigated.


Introduction and Related Work
Wireless sensor networks (WSNs) have become an interesting research topic, both in military and civilian scenarios [1]. Remote environmental monitoring, such as surveillance of reserved areas, are important fields of application of WSNs. These applications often require very low-power consumption, low-cost hardware [2], and clustering has been proposed as a possible approach for saving energy. As an example, when contention-based medium access control (MAC) protocols are used, splitting nodes in small clusters not interfering among them allows to decrease the time needed for accessing the channel and, therefore, the energy consumed. In fact, the smaller is the number of nodes competing for the channel, the lower will be the probability to find the channel busy and to delay transmissions. The increasing interest for WSNs has spurred a significant activity on the design of efficient distributed detection techniques, allowing to efficiently detect a physical phenomenon of interest, while keeping the node complexity as low as possible [3][4][5][6][7].
We consider a network performing a specific decentralized detection task: sensor nodes (hereafter denoted as sensors) observe a binary phenomenon that is spatially constant, meaning that each sensor observes (neglecting observation noise) the same value of the phenomenon. Nodes are grouped into clusters and directly connected with local fusion centers (FCs), one per cluster, which send periodic queries to simultaneously poll all sensors in a cluster. The majoritylike distributed detection strategy used in this paper leads to estimate the phenomenon status which is observed by the majority of the sensors. This is meaningful, for example, when it is of interest to detect if the phenomenon under observation (e.g., temperature, humidity, pressure, presence of a dangerous gas, etc.) overcomes a critical threshold.
In [8], a general framework on decentralized detection in clustered WSNs, accounting for communication noises and  Figure 1: Logical representation of a clustered sensor network (case (a)) and detailed representation of a specific cluster highlighted above (case (b)). different clustered topologies, is presented. This analysis was carried out by considering an ideal MAC protocol, that is, in the absence of collisions. In this paper, we extend this approach to scenarios where collisions and MAC failures may occur due to the contention-based nature of the channel access mechanism. The impact of the MAC protocol on decentralized detection in clustered WSNs is analyzed. To the best of the authors' knowledge, there are no works, in the literature, dealing with distributed detection and contentionbased MAC protocols jointly. As reference standard for the MAC, we consider the IEEE 802.15.4 [9]. However, the framework presented here can be extended to any MAC protocol.
IEEE 802.15.4 standard refers to a short-range wireless technology intended for Personal Area Networks (PANs). According to the standard, sensors use a carrier-sense multiple access with collision avoidance (CSMA/CA) protocol to access the channel. A recently proposed mathematical model for IEEE 802.15.4 networks is used in this paper to evaluate the Packet Success Probability (PSP), that is, the probability that a sensor can transmit correctly its packet (i.e., without collisions) to the PAN coordinator, when competing with the other sensors in the network [10,11]. Even though in the literature there exist some models for the IEEE 802.15.4 MAC protocol [12][13][14][15], none of these can be applied to query-based applications, where sensors have only one packet per query to be transmitted [10,11]. All the above mentioned models, in fact, assume that packets transmitted from different sources collide with constant and independent probabilities, regardless of the backoff stage. However, this assumption is not accurate for query-based applications, where the number of sensors accessing the channel varies over time. Moreover, some of these models (e.g., [12,14]) do not show a good agreement with simulation results. The model used in the current paper, instead, has been validated through simulations [10,11] and experimental measurements [16].
We consider the reference scenario shown in Figure 1; FCs act as PAN coordinators gathering data from sensors belonging to their clusters and transmitting their decisions to the final destination, denoted as access point (AP). We assume that a different network (e.g., an infrastructure-based network where radio resources are scheduled) is used for the communication between the FCs and the AP and there are no MAC losses (i.e., a contention-free access is used). In this case, FCs will act as gateways between two different networks: the IEEE 802.15.4 network and the infrastructurebased network.
Both uniform and nonuniform clustering configurations are analyzed. Our results show a strong impact of the IEEE 802.15.4 MAC protocol on the system performance. While in the case of ideal MAC the best performance is obtained in the absence of clustering, on the opposite, when MAC collisions are considered, splitting sensors in noninterfering clusters allows reducing collisions within clusters and leads to better performance. Finally, the presence of noisy communication links between the sensors and the FCs is considered and its relative impact, with respect to MAC collisions, is analyzed.
The paper is structured as follows. In Section 2, the mathematical framework for decentralized detection is presented. Section 3 describes the IEEE 802.15.4 MAC protocol. In Section 4, a new mathematical model, accounting for decentralized detection and MAC issues jointly, is derived. Finally, Sections 5 and 6 report numerical results and concluding remarks, respectively.

Decentralized Detection in Clustered
Sensor Networks

Preliminaries on Decentralized Detection.
In this section, we provide the reader with a few preliminaries on decentralized detection of a common binary phenomenon in the presence of an ideal (collision-less) MAC protocol [8].
We consider a network scenario where n sensors observe a common binary phenomenon whose status is defined as follows: where p 0 P{H = H 0 }, P{A} being with the probability that the event A happens. The sensors are clustered into n c < n groups, and each sensor can communicate only with its local FC. The groups may have either the same or different dimensions, depending on the distribution of the sensors among the clusters. In the former case, clustering is referred to as uniform whereas in the latter the topology is referred to as nonuniform.
The FCs collect data from the sensors in their corresponding clusters and make local decisions on the status of the binary phenomenon. Each local FC then transmits to the AP, which makes the final decision. A logical representation of the overall considered architecture is shown in Figure 1(a), whereas Figure 1(b) shows a more detailed view of a scenario with a single cluster and the AP.
The observed signal at the ith sensor can be expressed as where and {w i } are additive noise samples. Note that s is considered as a deterministic parameter. Assuming that the noise samples {w i } are independent random variables with the same Gaussian distribution N (0, σ 2 ), the common signal-tonoise ratio (SNR) at the sensors, denoted as SNR sensor , can be defined as [17] SNR sensor s 2 σ 2 .
Each sensor makes a decision comparing its observation r i with a threshold value τ (the same at all sensors, for simplicity) and computes a local decision u i = U(r i − τ), where U(·) is the unit step function. In particular, τ is equal to s/2. In a scenario with noisy communication links, simply modeled as binary symmetric channels (BSCs), the decision u i sent by the ith sensor can be flipped with a probability corresponding to the cross-over probability of the BSC model and denoted as p [18]. This simplified model is accurate only in the presence of additive communication noise, without other impairments, such as intersymbol interference and path loss. For instance, when additive white Gaussian noise (AWGN) and binary phase shift keying are considered, it holds that p = Q( The received bit at the FC can be expressed as u i with probability 1 − p, and 1 − u i with probability p.
The majority-like fusion rule used at the FCs and the AP is defined as follows: where x 1 , . . . , x M are the M binary data (x m ∈ {0, 1}) to be fused together and k ∈ {0, . . . , M} is the decision threshold.
By denoting the number of sensors in the ith cluster as d (i) c (i = 1, . . . , n c ), the following decision thresholds will be set: (i) k i = d (i) c /2 + 1 is the decision threshold at the ith FC with size d (i) c ; (ii) k f = n c /2 + 1 is the decision threshold at the AP. In the presence of uniform clustering, d (i) c = d c for all i.
Note that in the absence of clustering, the overall network architecture shown in Figure 1(a) collapses into a single cluster and the AP coincides with the corresponding cluster FC.

Probability of Decision Error at the AP.
When an ideal (collision-less) MAC protocol is considered, the number of data packets received at an FC is equal to the number of sensors in the corresponding cluster, since no losses at MAC level occur. We denote by D the n c -dimensional vector containing the number of decisions received at the n c FCs.
In the case with ideal MAC protocol, it holds that Furthermore, define also the following two probability vectors: where p 1|1 (p 1|0 , resp.) is the probability that the -th FC ( = 1, . . . , n c ) decides for H 1 when H 1 (H 0 , resp.) has happened. The elements of P 1|1 (equivalently, the elements of P 1|0 ) are, in general, different from each other and depend on the particular distribution of the sensors among the clusters. We first consider ideal communication links between the sensors and the FCs. Note that in this case an error may still occur due to the quantization of the sensors' observations and the fusion operation performed by the FCs. In [8], it is shown that the probability of decision error can be expressed as follows: where c i, j = (c i, j (1), . . . , c i, j (n c )) is the vector of FCs' decisions. The index j designates the jth configuration, over the nc i possible, with i "1"s (and, obviously, n c − i "0"s). For example, c 1,2 is the second possible configuration with one "1" (and two "0s"); the "1" is the decision of the second FC. The rationale behind (7) is the following. The first summation at the right-hand side of (7) represents the probability that the AP decision on the phenomenon status is in favor of H 1 and H 0 is the true status. This happens when 4 EURASIP Journal on Wireless Communications and Networking at least k f = n c /2 + 1 (over n c decisions coming from the FCs) are in favor of H 1 , due to the majority-like fusion rule. Similarly, the second summation at the right-hand side of (7) represents the probability that the AP decision on the phenomenon status is in favor of H 0 and H 1 is the true status. This happens when less than k f = n c /2 + 1 (over n c decisions coming from the FCs) are in favor of H 1 .
Finally, in a scenario with noisy communication links, the probability of decision error can be derived from (7), by replacing the probabilities ..,nc , which take into account the noise in the communication links between sensors and FCs and are defined as follows: where k depends on the number of packets received at the -th FC. Since the same majority-like fusion rule of the AP is applied to each FC, the same considerations given above for k f still apply here for the value of k .
In (8), P 10 = 1 − P 00 is the probability that a sensor decision sent to an FC is in favor of H 1 when H 0 has happened and can be expressed, according to the BSC model for a noisy communication link, as In fact, the first term at the right-hand side is obtained when there is an observation error but error-free communications whereas the second term is obtained when there is no observation but communication noise. Similarly, in (9), P 11 = 1 − P 01 represents the probability that a decision sent by a sensor to an FC is in favor of H 1 when H 1 has happened and can be given the following expression: For large values of the sensor SNR, a floor on the probability of decision error can be computed from (8) and (9), by setting SNR sensor → ∞ and, therefore, s → ∞. Since τ = s/2, it is easy to obtain that Therefore, the probability of decision error in a scenario with noisy communication links, given a clustering configuration (i.e., D), becomes We consider a network composed of IEEE 802.15.4compliant sensors, working in beacon-enabled mode [9]. Each FC coincides with a PAN coordinator, receiving data from sensors belonging to its PAN (i.e., its cluster). We assume that the different clusters use the same frequency channel, but different resources in terms of time. In other words, a time division between clusters is applied, so that sensors of different clusters do not interfere among them. We evaluate performance by fixing the total time made available to all sensors in the network (i.e., all the clusters) for transmitting data to the FCs. This means that performance is evaluated under a total achievable throughput constraint. In this section, we consider an illustrative cluster composed of d c (IEEE 802.15.4) sensors transmitting data to the FC. We assume that no connectivity problems exist; each sensor can receive the query (i.e., the beacon packets) from the FC and reach it. Nodes transmit packets with size D · 10 bytes, being D an integer parameter. According to the IEEE 802.15.4 MAC protocol in beaconenabled mode, the access to the channel is managed through a superframe, starting with a packet, denoted as beacon, transmitted by the PAN coordinator [9]. The superframe may contain an inactive part, allowing sensors to enter in sleeping mode whereas in the active part sensors use a slotted CSMA/CA algorithm to transmit data. The duration of the active part, namely, the superframe duration, and of the entire superframe, namely, the beacon interval, depend on the value of two integer parameters ranging from 0 to 14, called superframe order (SO) and beacon order (BO), respectively. In particular, the superframe duration can be expressed as 960 · 2 SO · T s , where T s =16 μs is the symbol time whereas the beacon interval is given by 960 · 2 BO · T s (see Figure 2).  Time division between clusters is performed as follows. The application sets the value of BO, that is the total time made available to the network for transmissions from sensors to FCs. If the AP does not know the clusters size, it allocates the same resource to all the clusters, that is the same value of SO. In particular, SO is set accordingly to the value of BO and the number of clusters, such that all clusters have a portion of the beacon interval allocated. If, instead, the AP is aware of the network topology, it may allocate resources according to the number of sensors in each cluster. In this case, the AP assigns different values of SO according to the clusters' sizes; the smaller the cluster, the smaller the value of SO assigned to it. Both the above mentioned resource allocation strategies will be considered in Section 5. The AP communicates to the FCs the values of SO and BO and the instant in which the superframe of each FC must start. In this way, the active parts of the superframes defined by the different FCs will not overlap and during transmissions within a given cluster, sensors belonging to the other clusters will be in sleeping mode, being in the inactive part of the superframe of their FCs (see Figure 2). According to our application, each FC will send periodic queries, starting from the instant provided by the AP, and will wait for decisions coming from sensors. The application also requires that the data must be received by the FC by the end of the active part of the superframe defined by the FC. Therefore, each sensor has one packet to be transmitted per beacon received and has to transmit it by the end of the active part of the superframe defined by its FC.
In [10,11], a mathematical model for the IEEE 802.15.4 MAC protocol in beacon-enabled mode is introduced. This model describes the behavior of a sensor accessing the channel by using the slotted CSMA/CA algorithm and allows the evaluation of the PSP, denoted, hereafter, as p MAC , and representing the probability that a sensor transmits successfully the packet to its FC by the end of the active part of the superframe of its FC. A packet could be lost due to the following reasons: (i) a collision, (ii) the channel is sensed busy more than five consecutive times [9], (iii) the available time ends before the channel is sensed idle. Note that retransmissions are not allowed in our scenario. For the sake of conciseness, we do not report here the analysis made to derive p MAC but we refer to [10,11]. To show the behavior of p MAC when varying different parameters, in Figure 3, p MAC is shown, as a function of d c (a single cluster is considered), for different values of SO (assumed to be equal to BO) and when D = 2. Only the analytical model results are reported and we refer to [10,11] for the validation of the model. p MAC decreases by increasing d c , since more sensors compete for the channel (i.e., the collision probability increases), and by decreasing SO, since less time is given to sensors to try to access the channel. Since sensors start the CSMA/CA algorithm at the same time, they can sense the channel for a limited number of times and no retransmissions are allowed, it will exist a maximum delay with which sensors can access the channel [11]. For this reason, performance achieved in the cases SO = 1 and 2 is almost the same.

Impact of the Channel Access Probability on Decentralized Detection
In this section, we derive an analytical framework for the computation of the probability of decision error in the presence of the IEEE 802.15.4 MAC protocol. Each FC will receive a number of decisions smaller than the number of sensors in the cluster, owing to the contention-based nature of the protocol, that may cause collisions. Equation (13) needs to be modified to take into account the presence of a nonideal MAC protocol, characterized, concisely, by p MAC ≤ 1.
Being p MAC (d c ) the PSP in a scenario with d c competing sensors in a cluster and assuming that all transmissions are independent, it follows that the number of successful transmissions in the j-th cluster can be modeled as a binomial random variable, denoted as D ( The symbol D was used in Section 2.2 for a deterministic vector. With an abuse of notation, it now refers to a random vector. The context eliminates any ambiguity.) Note that even through the clusters are uniform, the number of decisions received at the FCs may vary from cluster to cluster, being such number a random variable. Therefore, the true clustering configuration is nonuniform.
At this point, the probability of decision error depends on a realization of the random vector D which, in turn, depends on P 1|1 and P 1|0 . The average probability of decision error, with respect to the clustering configuration, can then be computed as follows: After a few manipulations, one obtains that where the last probability at the right-hand side is given by (13) (with d ( j) c = i j , j = 1, . . . , n c ) and It would be interesting to preliminary evaluate a lower bound on the average probability of decision error, as the limiting average probability of decision error in an ideal scenario with no observation and communication noises, that is, for SNR sensor → ∞ and p = 0. In this case, if at least one bit is delivered to the AP, then a correct decision will be made. At this point, there is a decision error if and only if no sensor decisions can be reliably sent to the AP. Therefore, an error happens only if i = 0, for all ∈ {1, . . . , n c }. In this case, the AP decides randomly, thus obtaining that In the presence of uniform clustering, that is, d (i) c = d c , for all i, (17) reduces to where we have used the fact that n c · d c = n, regardless of the (uniform) clustering configuration. It can be observed that expression (18) for P e,lim is a decreasing function of the number of clusters. On the opposite, in a scenario with an ideal MAC protocol, this limiting probability does not depend on d c [8]. As an example, in the case n = 64, D = 2, BO = 3, when no clustering is applied, P e,lim will be equal to 10 −5 (see Figure 5(b)). By increasing the number of clusters, p MAC gets larger and, therefore, the floor appears at very small (and not practical) values of the probability of decision error (e.g., in the case with eight uniform clusters we have P e,lim = 6 · 10 −22 ). Finally, note that the limiting probability (17) equals to zero for any unbalanced configuration with at least one cluster with one sensor. In this case, in fact, the sensor directly connected to its FC always accesses the channel and, therefore, there is always at least one correct decision (sent by the corresponding FC to the AP) on the basis of which the AP can correctly estimate the phenomenon status.

Numerical Results
We now investigate the performance of the proposed decentralized detection schemes. In particular, in the presence of IEEE 802.15.4 MAC protocol the value of p MAC is determined offline, for a given clustering configuration, by using the analytical framework presented in Section 3. The obtained value is then used in (15) and in our simulator. In particular, our C simulator is designed "ad hoc" as follows. The transmissions from the sensors to the FCs are represented as Bernoulli trials, each with parameter p MAC . On the basis of the received packets in their cluster, the FCs perform a data fusion (with decision threshold set according to the number of received packets) and transmit their decisions to the AP. Since each sensor must send only its decision (i.e., one bit) and since the model requires that sensors transmit packets of size multiple of 10 bytes [11], being the packet header equal to 19 bytes, we set D = 2, that is, packets of 20 bytes are transmitted. In the following, we set n = 64 and the MAC parameters to the default values (see [11]). We first consider uniform resources allocation among clusters. Then, in Figure 7, we extend our approach to a scenario where resources are allocated accordingly to the cluster size. Note that in the first case, uniform clustering will be favored with respect to the nonuniform case, since resources will be better used. By the way, in scenarios where the AP is not aware of the network topology, only the uniform resource allocation can be implemented. Unless otherwise stated, we set BO = 3 and (apart from Figure 7) we set SO = BO = 3 (i.e., we give to the cluster all the available time) when n c = 1; SO = 2 (i.e., two  nonoverlapping active parts within the beacon interval are present) when n c = 2; SO = 1 when n c = 3 and 4; SO = 0 when n c = 5 and 8. Note that in the cases n c = 3 and n c = 5 part of the beacon interval is not used by any cluster and, therefore, some resources are wasted, due to the constraint that SO must be an integer.
In Figure 4, a comparison between analytical and simulation results in a scenario with IEEE 802.15.4 MAC protocol and ideal communication links (i.e., no noisy communication links) and two possible clustering configurations, uniform (16-16-16-16) and nonuniform (40-8-8-8), is proposed.
As expected, a good agreement between simulations and analytical results was found in both cases. In fact, the analysis carried out in Section 4 is exact and the simulator is implemented by exactly replicating the analysis conditions. In other words, this is a "sanity check," which allows us to use the simulator, especially to avoid numerical problems in the evaluation of the analytical formulas.
In Figure 5, the probability of decision error is shown, as a function of the sensor SNR, for different clustering configurations. No noisy communication links are accounted for and ideal MAC is considered in case (a) whereas the IEEE 802.15.4 MAC protocol is accounted for in case (b). The use of the IEEE 802.15.4 MAC protocol leads to a performance degradation with respect to the case of ideal MAC. The highest degradation is achieved with no clustering, since in this case a large number of sensors are competing for the radio resource. The best configuration, in the case with IEEE 802.15.4 MAC protocol is achieved for n c = 8, where only eight sensors per cluster are competing for the channel, and even though SO = 0 (i.e., sensors have only approx. 15 ms to access the channel), the success probability is the largest. By comparing curves in (a) and (b) we can observe that, while distributed detection is mainly affected by the uniformity or nonuniformity of clusters, rather than by the number of clusters itself, MAC losses strongly depend on the value of n c . In fact, while in the ideal case the performance of uniform clustering does not depend on the specific configuration, this is no longer true in the presence of contention-based MAC protocols. Moreover, note that the case (40- 8-8-8) outperforms the case (32- 8-8-8-8), since even though more sensors are competing for the channel (in the largest cluster), sensors have more time to access the channel (i.e., SO = 1 instead of 0). In fact, we have p MAC = 0.23 in the cluster with 40 sensors and SO = 1, and p MAC = 0.13 in the cluster with 32 sensors and SO = 0. This means that the best performance is achieved when a good balance between the number of sensors competing for the channel and the time made available to sensors for transmissions is reached.
The comparison made in Figure 5 is done by assuming that all decisions coming from the FCs have the same reliability. This implies that the same weight is assigned to all FCs' decisions. However, in nonuniform scenarios the decisions obtained by fusing a larger number of sensors' decisions are more reliable than those obtained by fusing a smaller number of sensors' decisions. Therefore, one may resort to a weighing strategy, where the AP decides according to the following rule: where y 1 , . . . , y M are the M data (y m = 2x m − 1) to be fused together and w 1 , . . . , w M are the weights computed as the number of sensors in the cluster (which successfully access the channel) divided by the total number of sensors (which successfully access the channel). In Figure 6, P e is shown, as a function of the sensor SNR, for different clustering configurations, ideal communication links, and weighing strategy at the AP. Two scenarios for the MAC are considered: (a) ideal MAC protocol and (b) IEEE 802.15.4 MAC protocol. In the scenario with ideal MAC protocol, one can observe that the nonuniform configurations experience the expected performance improvement. Moreover, the higher is the nonuniformity degree, the larger is this improvement. On the other hand, when the IEEE 802.15.4 MAC protocol is considered, one can observe that the weighing strategy has no significant impact and the performance is the same predicted in Figure 5(b). This is probably due to the fact that, while in the case with no weighing strategy the performance is given by the average number of sensors accessing the channel, in the presence of weighing the performance is determined by the overall statistics of the number of sensors accessing the channel.
In Figure 7, we show the performance achieved when resources (in terms of time) are allocated to clusters depending on their size. In particular, we set BO = 3 and we allocate SO = 0 to clusters with 8 sensors, SO = 1 to clusters with 16 sensors, SO = 2 to clusters with 32 sensors, and SO = 3  to the nonclustering case. In this way, the resource available to each cluster is proportional to the cluster size and also no resources are wasted for the considered set of network topologies. As expected, the performance of the nonuniform cases slightly improve with respect to those with uniform resource allocation (see, e.g., the case (32-8-8-8-8) present in both the figures). In particular, when the weighing strategy is applied, the results related to the nonuniform scenarios are approximatively the same. However, uniform configurations are still to be preferred.
Since increasing the number of FCs will increase also the cost of the network, being FCs sensors with special functionalities, and therefore high cost, it is of interest to investigate what is the best possible configuration for a fixed number of FCs. Only results in the presence of the IEEE 802.15.4 MAC protocol will be presented in the following figures. In Figure 8, the probability of decision error is shown, as a function of the sensor SNR, in a scenario with n = 64 and 4 FCs. Two different values of p are considered: 0 (ideal communication links) and 0.1 (high communication noise). In the ideal case, the uniform configuration is still to be preferred, thus confirming the results in [8] with an ideal MAC protocol. Moreover, the larger the nonuniformity degree, the worse is the performance. In fact, when clusters EURASIP Journal on Wireless Communications and Networking  are balanced, the decisions coming from the FCs to the AP have approximately the same reliability, since the number of collisions is approximately the same in all clusters. On the other hand, with unbalanced clusters the decisions do not have the same reliability and, therefore, the quality of the AP decision worsens. In the scenario with p = .1, the impact of the communication noise on the probability of decision error is significant and the performance rapidly degrades. As predicted in Section 2.2, for large values of SNR curves present a floor, due to the communication noise. Therefore, increasing more and more the observation quality does not  lead to better performance, since this is also limited by the communication noise.
In Figure 9, P e is shown, as a function of the SNR, for different clustering configurations, considering ideal communication links and the IEEE 802.15.4 MAC protocol. For each value of n c , the best and the worst configurations are shown. More precisely, the best possible configurations are uniform for all values of n c : 32-32 for n c = 2, 16-16-16-16 for n c = 4, and 8-8-8-8-8-8-8-8 for n c = 8. On the other hand, the worst possible configuration, for a given value of n c , is that with one big cluster and the others with only one sensor, that is, 63-1 for n c = 2, 61-1-1-1 for n c = 4, and 57-1-1-1-1-1-1-1 for n c = 8. One should observe that the relative loss (in terms of sensor SNR) from the best to worst configuration is approximately constant, regardless of the value of n c . For instance, at P e = 10 −3 this loss is around 4.5/5 dB. This implies that the gain brought by the use of uniform clustering is (more or less) the same, the only difference being the fact that the larger the number of FCs (with a corresponding larger cost), the better is the performance.

Concluding Remarks
In this paper, we have proposed a mathematical framework to study decentralized detection in IEEE 802.15.4 WSNs. In particular, on the basis of an analytical computation of the probability that a packet is correctly received at the destination when the IEEE 802.15.4 MAC protocol is used, we have evaluated the impact of the MAC protocol on a decentralized detection strategy. This analysis has been carried out considering different clustered topologies. Results show that the MAC protocol has a relevant impact on the performance. In particular, while the absence of clustering guarantees the best performance of a decentralized detection strategy, in the presence of an ideal MAC, this leads to the worst performance with the 802.15.4 MAC protocol. In the latter case, in fact, splitting sensors in clusters noninterfering among them, leads to decreasing the collision probability and, therefore, the error probability on the decision. Finally, the presence of communication noise increases the probability of decision error floor induced by the MAC protocol, and this degradation is more pronounced, the higher is the nonuniformity degree among the clusters.