Secure Distributed Detection under Energy Constraint in IoT-Oriented Sensor Networks

We study the secure distributed detection problems under energy constraint for IoT-oriented sensor networks. The conventional channel-aware encryption (CAE) is an efficient physical-layer secure distributed detection scheme in light of its energy efficiency, good scalability and robustness over diverse eavesdropping scenarios. However, in the CAE scheme, it remains an open problem of how to optimize the key thresholds for the estimated channel gain, which are used to determine the sensor’s reporting action. Moreover, the CAE scheme does not jointly consider the accuracy of local detection results in determining whether to stay dormant for a sensor. To solve these problems, we first analyze the error probability and derive the optimal thresholds in the CAE scheme under a specified energy constraint. These results build a convenient mathematic framework for our further innovative design. Under this framework, we propose a hybrid secure distributed detection scheme. Our proposal can satisfy the energy constraint by keeping some sensors inactive according to the local detection confidence level, which is characterized by likelihood ratio. In the meanwhile, the security is guaranteed through randomly flipping the local decisions forwarded to the fusion center based on the channel amplitude. We further optimize the key parameters of our hybrid scheme, including two local decision thresholds and one channel comparison threshold. Performance evaluation results demonstrate that our hybrid scheme outperforms the CAE under stringent energy constraints, especially in the high signal-to-noise ratio scenario, while the security is still assured.


Introduction
With the rapid advances in low-cost wireless sensors, radio frequency identification (RFID), Web technologies and wireless communications recently, connecting various smart objects to Internet and realizing the communications of machine-to-human and machine-to-machine with the physical world have been expected widely [1]. That is the concept of Internet of Things (IoT), which can provide ubiquitous connectivity, information gathering and data transmitting capabilities in different fields, such as health monitoring, emergencies, environment control, military and industries. The pervasive sensing and control capabilities brought by IoT will change our daily life significantly [2][3][4].
In an era of IoT, there are billions of devices linked to the Internet. Cisco predicts that 50 billion devices are going to be in use in 2020 [3]. Such a large number of devices deployed in the IoT lead to many technical challenges including spectrum scarcity, energy consumption and security [4][5][6]. Aiming to the spectrum scarcity problem, some enhanced technologies with high spectrum efficiency are advocated, for example, the cognitive Internet of Things (CIoT) who introduces the cognitive radio (1) In order to enhance the operability of the channel aware flipping method [10] in an energy constrained WSN, a specific energy limit indicator represented by the sensors' activity probability is taken as the additional design constraint over the perfect secrecy. We call this modified scheme the transmission channel based only (TCBO) secure detection under energy constraint. Then, the simplified log-likelihood ratios (LLR) computed approximately under the low and high signal-to-noise ratio (SNR) conditions are derived. Following that, we obtain asymptotic error probabilities of the ally fusion center (AFC) at the worst and best noise situations with help of the central limit theorem (CLT). Next, the optimization problems with the perfect secrecy and energy constraint are established to find three comparison thresholds used in the randomly flipping operation. After simplifying the optimization target functions, the optimal thresholds are discussed and achieved. The above framework for error probability analysis and parameters optimization will also be taken as the mathematic approach in our newly designed scheme to solve for the main parameters.
(2) Considering local detection performance also affects the decision fusion evidently, we combine the local observation quality with the transmission channel information to design a more efficient hybrid scheme. Here, the energy constraint is satisfied by censoring the sensor with a less informative local LLR and transmission security is guaranteed through randomly flipping the local decisions based on the estimated channel gains. This innovative scheme is called the joint local decision and wireless transmission (JLDWT) scheme. Then, following the mathematic framework given by the first work, two local detection thresholds and one flipping comparison threshold are optimized to minimize the AFC's error rates, besides, satisfy the perfect secrecy condition and the energy limitation.
(3) At last, through an overall simulation from diffident perspectives, the above two schemes are evaluated in a practical wireless transmission environment. The simulation results demonstrate that the new proposed hybrid scheme can improve the error performance of the AFC under a relatively high SNR transmission environment with a more severe energy constraint, as well as, maintain the perfect secrecy.
The rest of the paper is organized as follows: an overview of related work is discussed in Section 2. Section 3 describes the system model. The TCBO and JLDWT schemes are presented in Sections 4 and 5, respectively. The simulation results are discussed in Section 6. Section 7 concludes the paper.

Related Work
In this section, we summarize the related work about physical layer security suitable for the IoT. The communication network consisting of controllers and actuators and the sensor network composed of sensors and controllers are two main subsystems of an abstracted IoT network [2]. The physical layer security solutions possibly available for both subsystems will be presented in the following text.
In the communication network of the IoT, the controllers are the signal transmitters, which could be equipped with multiple antennas and an adequate energy supply. Then, some of the classical secure schemes at physical layer proposed for the downlink in LTE-Advanced network may be usable [30][31][32][33][34][35][36][37][38][39]. When the main channel (the transmitter to legitimate receiver channel) and the eavesdropper channel are perfectly known, the beamforming (precoding) techniques can be adopted to maximize the signal quality difference between the destination and the eavesdropper by strengthening or weakening signals in certain dimensions. For the scenario of multiple-input, single-output and multi-antenna eavesdropper (MISOME) with a single legitimate receiver, the optimal beamforming vector is the generalized eigenvector corresponding to the largest generalized eigenvalue of the receiver and the eavesdropper channel covariance matrice [30]. While, under the multiple-input, multiple-output and multi-antenna eavesdropper (MIMOME) scenario, the search for the optimal precoder with a total power constraint has a non-convex form and the solution can be found numerically. If the power covariance constraint is considered, a closed form solution based on the generalized eigenvalue decomposition (GEVD) can be obtained [31]. As for the case of multiple receivers and eavesdroppers, the achievable secrecy rates can be used to build optimization problems to find a secrecy beamformer or precoder [32], further, a simpler but less effective design can be achieved using the channel inversion technique [33]. In addition, when the eavesdropper's CSI is unknown, emitting artificial noise (AN) is helpful to prevent the eavesdropper from getting a good channel. The AN is often added in the null space of the main channel with single destination and eavesdropper [34]. While, for the case with multiple receivers and eavesdroppers, the AN would be placed in the null space of the effective channels of all receivers [35]. Since AN may reduce the transmission power of the useful data, power allocation between data and AN should be examined to ensure good performance under secrecy constraint [36]. Another novel strategy to degrade the eavesdropper's channel quality is based on noise aggregation [40,41], where two adjacent timeslots are bounded to transmit two packets and the transmitter performs bitwise exclusive-or (XOR) operation on the even packet with previous odd one. Because the legitimate receiver can detect the packets in odd slots correctly by an ARQ protocol while eavesdropper may only have a noisy observation, the channel noise in odd slots is aggregated to even slots [41]. Obviously, many of the above security schemes are difficult to be directly employed in an IoT setting, because the accurate legitimate channel state information at the transmitter (CSIT) is difficult to acquire for the channel training opportunities are limited and the high rate feedback channels are lack in the IoT. Moreover, the eavesdropper CSIT is more difficult to yield since eavesdroppers remain completely passive. As for the AN based methods are also not desirable due to their higher energy expenditure [2].
In addition, a variety of physical layer security solutions have been proposed in literature for the distributed detection in sensor networks. With the assumption that the eavesdropping fusion center (EFC) can only distinguish busy-idle state of sensor's transmission, an optimal sensor censoring scheme with a perfect secrecy and energy constraint was given in [8]. But the processing capability of the EFC was too limited. Another category of effective scheme is the probabilistic ciphering based one, where the sensor's observation is randomly mapped to a set of quantization levels according to an optimal mapping probabilities matrix [9,24,25]. However, the security is assured by assuming the EFC being completely ignorant about the mapping probabilities. Moreover, the crucial energy efficient issue was not discussed. In [26,27], the optimal local quantizer was examined through minimizing the detection cost at the AFC meanwhile satisfying the constraints to the EFC detection cost or error performance, but the energy consumption problem was not concerned, either. In addition, all of the above solutions were not evaluated over a practical wireless channel and the effect of the transmission channel on their security was not discussed. Afterwards, a category of channel aware encryption method was proposed to realize the perfect secrecy from the EFC, including the type-based multiple access scheme proposed in [23] and the channel-based bit flipping scheme designed in [10], where not the accurate channel coefficients were needed, but only the channel gains had to be estimated using the pilot signal from the AFC. In channel aware encryption, the good energy efficiency could be realized through introducing the dormant sensors. The inherent significant difference of the wireless channels for the EFC and the AFC was explored to achieve the perfect secrecy of the sensor's information transmission, due to the channels from sensors to the EFC and the AFC are independent of each other. Especially, the channel-based randomly flipping method is very suitable for the distributed detection due to its low complexity, good scalability and less limitation on the EFC. However, the work in [10] did not give an efficient solution to optimize three comparison thresholds. In addition, when the sleeping sensor was chosen, the channel gain was taken as the only metric while the local decision quality was not concerned although it may induce more important influence on the fusion performance. In addition, AN based mechanisms that let a part of sensors or the AFC transmit the jamming signal to degrade the SINR of the EFC were also introduced to the sensor network [28,29]. However, the performance of the AFC would also be reduced when the jamming signal worsens the EFC channel [29] or the external energy would be spent by the AFC to interfere the EFC [28]. Based on the above drawbacks of the previous works, we propose the secure and energy efficient JLDWT scheme, which is a hybrid method combing the local detection and the wireless transmission, after designing an analysis framework to complete the performance analysis and thresholds optimization of TCBO scheme.

System Model
In this section, the concerned IoT sensor network scenario is given. The local detection and the transmission scheme of local decisions from the sensors to the fusion center are introduced.

IoT Sensor Network
Consider a sensor network in IoT system illustrated by Figure 1, which performs distributed detection for a binary hypothesis test of θ 0 against θ 1 . A number of sensors are distributed near the physical system to detect a binary target state and transmit their local decision results to an AFC through a wireless parallel access channel (PAC). Meanwhile, a passive EFC overhears the communications between the sensors and AFC and also attempts to detect the state of θ. The channels from sensors to the AFC and the EFC are called the main and eavesdropping channels, respectively. Moreover, the concerned sensor network is energy-constrained for the power supplies of the sensors are usually severely constrained. Obviously, the security and energy saving are the main challenges faced by our senor network. Therefore, in each local decision reporting slot, some sensors will keep dormant to meet the energy constraint and some sensors among the active ones will transmit the bit-flipping version of local detection results to make the EFC confused.  In Figure 1, the sensors with the indices in the sets of {i 1 , i 2 , ..., i K N }, {j 1 , j 2 , ..., j K F } and {k 1 , k 2 , ..., k K D } are included in the non-flipping group, flipping group and the dormant group, respectively. Thus, the total number of sensors in the network is K = K F + K D + K N . In addition, the observation to the physical system of the k-th sensor is denoted by x k . The communication channels from sensors to the AFC and the EFC are represented by h A k and h E k , respectively. And they are assumed to be independent and identically distributed (i.i.d.) Rayleigh block fading channels. Moreover, a transmission probability or an activation probability β, which is proportional to the per-sensor energy consumption, is introduced to represent the energy constraint.

Local Detection of Sensors
For the k-th sensor, the acquired observation corrupted by additive noise is modeled as: where w k is an i.i.d zero-mean Gaussian random variable with variance σ 2 , i.e., w k ∼ N (0, σ 2 ). Thus the SNR of local detection can be computed and denoted by snr L = θ 2 /σ 2 . Based on the observation, the sensor makes a one-bit local decision b k ∈ {0, 1} to indicate the absence or presence of θ by using the Bayesian detection criteria: where f ( θ i | x k ) is the posterior probability distribution function (PDF) of θ i based on x k for i = 0, 1.
The main difference of Equation (2) from the traditional Bayesian detection is that two rather than one local decision thresholds are set here. λ U and λ L , which meet 0 < λ L ≤ λ U < ∞, are the upper and lower thresholds and assumed to be identical at all the sensors. If the ratio of the posterior probability distribution lies inside the region of [λ L , λ U ], it means that the observation appears less informative for discriminating between θ 0 and θ 1 , so the corresponding decision result is more likely to be false. As for such kind of sensors, it is better to keep them silent for energy efficiency. Of course, this is the basic idea of the sensor censoring technique [8,42]. However, in this paper, we adopt it to realize the energy saving for the secure transmission of sensors and the details are described in Section 5. The prior probabilities of θ 0 and θ 1 are assumed to be q 0 and q 1 , respectively. Then the Equation (2) can be transformed into: where f ( x k | θ i ) is the conditional PDF of x k under the hypothesis θ i , and λ k is the likelihood ratio (LR). From Equation (1), it can be obtained that Furthermore, the log-likelihood ratio (LLR) can be written as Combining Equations (4) and (5), it can be easily derived that the conditional PDFs of Λ L k are Furthermore, we can obtain that the equation f ( Λ L k θ 1 )/ f ( Λ L k θ 0 ) = exp(Λ L k ) is satisfied and this is the nesting property of the LR.
There are four possible cases for local detection, namely correct decisions under two states, missed detection and false alarm. Based on Equations (3) and (6), we can calculate the probabilities of four cases and obtain where P 0d is the probability of correct detection under θ being non-existent and In addition, the error probability of local detection for each sensor can be defined as P E L = q 0 P f + q 1 P m . If we set λ U = λ L = λ, this error probability can be given by Furthermore, the first-order derivation of P E L with respect to λ is Through letting dP E L dλ = 0, it can be obtained that the optimized λ * meeting 0 < λ < ∞ to minimize P E L is λ * = 1.

Transmission of Local Decisions from Sensors to FC
After the local decisions are achieved, the sensors would deliver them to the AFC. In this paper, a wireless PAC between the sensors and the AFC is considered and the transmission channels from different sensors to the fusion center are orthogonal. However, the sensors' transmissions are overheard by the EFC, who also wishes to detect the target state. From the literature [2,7,9], we have seen that the stochastic ciphering could be employed to protect the information of the sensors from the EFC efficiently, since each sensor would flip its decision randomly and the EFC would be confused when it was ignorant about the flipping probability (i.e., the encryption key). However, the key exchange between the AFC and the sensor itself may be not secure from the EFC. In this case, the channel-aware stochastic cipher [10], whose seeds are based on the randomness of the transmission channels, are preferable. Because the channels to the AFC and the EFC from a sensor are independent, it is impossible for the EFC to deterministically know the flipping action of a sensor based on the main channel gain. Thus, the formation leaked to the EFC reduces, although the flipping probability is completely known by the EFC. Therefore, the channel-based stochastic ciphering is still adopted by us to realize the secure transmission of local decisions from sensors to the AFC.
In order to sense the channel information, the sensors would firstly receive the known pilot signal from the AFC, as well as three thresholds for comparison. Then the estimated channel gain would be compared with the thresholds to determine which action should be selected by a sensor. The sensor may report an unaltered local decision, a "flipped" decision, or stay dormant to satisfy the energy constraint.
Assume the main channel and the eavesdropping channel both follow the Rayleigh distribution with unit power, i.e., f (h) = 2h exp(−h 2 ) and h ∈ [0, ∞), which is usually considered in existing studies [10,23,42]. Assume the pilot signal is so strong that the sensors can obtain the exact channel gains. Basing on the channel reciprocity, the sensors' estimated channel gains can be used to indicate the sensor-to-AFC channels. Moreover, they are unknown by the EFC due to the statistical independence of the main channel and the eavesdropping channel. The thresholds broadcasted by the AFC are Thus, the secure transmission strategy with energy limitation is that, sensor k reports its original local decision if h A k > t 1 , reports a bit-flipping decision if t 3 ≤ h A k ≤ t 2 and stays silent for energy efficiency otherwise. From the security analysis given in [10], we can see that the condition for perfect secrecy is λ 1 Obviously, to meet the energy constraint of network, the inequality of λ 1 + λ 2 ≤ β should also be held. Moreover, the case with a single "no-send" region is concerned in this paper. That is to say either t 3 = 0 or t 1 = t 2 , which is illustrated in Figure 2.

Transmission Channel Based Only Secure Detection under Energy Constraint
In [10], the authors designed a confidential and energy efficient distributed detection method, called channel aware encryption, only from the view of the wireless transmission between sensors and the fusion center. And the condition for perfect secrecy was derived. Moreover, the LLR based decision fusion was studied, further, a simplified decision fusion rule in high SNR region was given. However, the more detailed analysis about the error probability of decision fusion and the optimization of thresholds were absent. In this section, we will analyze the error performance of the AFC based on the approximated LLRs derived under low and high SNR conditions, respectively. Afterwards, three thresholds will be optimized to minimize the probability of error at the AFC while ensuring the perfect secrecy from the EFC and satisfying the energy constraint. It should be noted that a specified energy constraint of β ≤ 1 is introduced by us. And the adjusted scheme is called the TCBO secure detection under energy constraint in our paper.

Approximation of LLR and Error Probabilities of FC
For the secure scheme only basing on transmission channels, the confidentiality from the eavesdropper and the energy saving are both provided by the reporting strategy of local decisions. Thus, the thresholds used in the local detection are set as λ L = λ U = λ * to optimize the sensor's local performance. Then, we have P m = 1 − P d and P 0d = 1 − P f . In addition, the common binary phase shift keying (BPSK) modulation is utilized by each sensor to deliver its one-bit decision. At the fusion center, the LLR based fusion rule is used and the transmission channel information is unknown. In addition, it is assumed that the fusion rules and the Prior information at the EFC are identical with those at the AFC and this is a worst case from the view of security.
The received signals at the AFC and EFC from sensor k are denoted as y A k and y E k , respectively. They can be described as where n A k ∼ N (0, δ 2 A ) and n E k ∼ N (0, δ 2 E ). Thus, the transmission channel SNR for the AFC and EFC can be written as SNR A = h A k x k 2 /δ 2 A and SNR E = h E k x k 2 /δ 2 E , respectively. Following the channel-aware flipping rule, we have where (a) is due to the independence of different y A k and f y A k |θ i denotes the likelihood function of sensor k for the hypothesis θ i . For the Bayesian setup, the optimal decision rule can be given by By using the similar derivation method in Section IV of [10], it can be achieved Note that the LLR based on Equation (12) requires numerical integrations. It is greatly unfavorable to the performance analysis of decision fusion and the optimization of comparison thresholds. Therefore, the approximations of LLR under low SNR and high SNR scenarios would be examined. Moreover, the error probabilities based on these approximations would be analyzed in follows.

Approximation of LLR and Error Performance under Low SNR
As the channel noise variance δ 2 where The detailed derivation of Equation (14) is given in the Appendix A. Applying Equation (14) to Equation (12), it can be obtained that where Following the assumption of δ 2 A → ∞ and the fact that log(1 + x) ≈ x with x closing to zero, we can further reduce Equation (18) to From Equation (19), we can see that the calculation of LLR can be simplified significantly for large noise variance. Note that the formulas from Equation (11) to Equation (19) are also available for the EFC provided it has the same prior information as the AFC. The only variation is the different received random variables. Then, invoking the central limit theorem [9,23], we can deem that the statistic of Λ A converges to a normal distribution for a large K. That is Ak |θ i are the mean and variance of Λ A k conditioned on θ i , respectively. And they are directly related with the mean and the variance of y A k , which can be seen from Equation (19). Next, our target is to calculate E y A k |θ i and Var y A k |θ i . Utilizing Equation (15), we can write In order to obtain Var y A k |θ i , we firstly calculate where (a) follows the fact of (22), along with the Bayesian decision rule, we can yield the error probability for the AFC as follows: Clearly, the error probability for large δ 2 A has been expressed as a function of some specific parameters, namely λ * , t 3 , t 2 , t 1 and δ 2 A . In Section 4.2, this asymptotic error probability would be taken as the optimization objection for finding the optimal comparison thresholds.

Approximation of LLR and Error Performance under High SNR
Considering the high SNR scenario, i.e., δ 2 A → 0, we derive a simplified LLR referring to the idea of [10]. Assume the FC can estimate the instantaneous sensor-to-FC channel gain as h A k = y A k since y A k ≈ h A k x k and |x k | = 1 except under the dormant case. Then, a simple hard decision rule determining which one a received signal y A k comes from among three groups can be realized. A hard decision threshold t h is selected to satisfy Thus, the following conditional probability can reduce to where δ x,b is the Kronecker delta function. Thus, the likelihood function f y A k |θ i can be calculated as Further derivation whose detail is provided in Appendix C gives that Replacing y A k and h A k with y E k and h E k in Equation (26), the simplified LLR under high SNR for the EFC is got.
In order to yield the error probability, the mean and variance of Λ A k are needed when the CLT is still used. Because h A k ≥ 0, we have y A k > 0 is equivalent to x k = 1 and y A k < 0 corresponds to x k = −1. Further, with the assumption of h A k ≈ h A k , it can be derived The derivations of Equations (27) and (28) are referred to Appendix D. Moreover, applying Equations (27) and (28) to calculate the error probability obtains

Optimization of Comparison Thresholds
In Section 4.1, the asymptotic error probabilities at the AFC for extremely low and high SNR scenarios are obtained. They would be taken as the utility function for optimizing t 3 , t 2 and t 1 in this section. Our design target is to minimize the error probability of the AFC while satisfying the constraints of perfect secrecy and energy limitation. This problem can be stated as follows: P0 : min t 3 ,t 2 ,t 1 P A e subject to : λ 1 = λ 2 where the first constraint is the perfect secrecy condition to make the EFC totally be confused [10]. The second inequality constraint is to guarantee the specified energy efficiency.
Observing the Equations (23) and (29), we find that the numerical integration is included in P A e and the variables to be optimized exist in the integral limits in a complicated form. These raise the difficulty to solve the problem. The utility function should be simplified. Fortunately, it can be seen that P A e decreases with E(Λ A k |θ 1 ) and increases with E(Λ A k |θ 0 ) since the impact of the variance of Λ A k can be ignored compared with its mean for a large K. Therefore, E(Λ A k |θ 1 ) − E(Λ A k |θ 0 ) can be used to replace the cost function in P0. The same idea was used in [9] to find the optimal encryption matrix. Thus, the optimization problem under the case of low SNR is given by P1 : max From Equations (19)∼(21), we achieve Because the first item of the right side in Equation (32) is independent on the variables to be optimized, the final object is to maximize |D(t 3 , t 2 , t 1 )| = |m (t 1 ) − n (t 3 , t 2 )| while keep λ 1 = λ 2 and λ 1 + λ 2 ≤ β. Moreover, according to the Rayleigh distribution function, we have Now, in order to determine three appropriate thresholds, we should discuss the relationship of the target function D(t 3 , t 2 , t 1 ) and the actual energy consumption indicator, i.e., α = λ 1 + λ 2 . Taking the D(t 3 , t 2 , t 1 ) as a function of α, we can derive that The detail of the calculation process for Equation (34) is shown in Appendix E. From Equation (34), it can be easily seen that δ D (α) ≥ 0 for both cases of t 3 = 0 and t 1 = t 2 due to the fact 0 ≤ t 3 ≤ t 2 ≤ t 1 < ∞. This results in that D(t 3 , t 2 , t 1 ) is strictly increasing with α. In particular, we can get D(t 3 , t 2 , t 1 ) = 0 for α = 0. Thus, there is D(t 3 , t 2 , t 1 ) ≥ 0 at the whole range of α ∈ [0, 1] and then the absolute calculation in the target function can be omitted. The above analysis contributes to that the equality (i.e., λ 1 + λ 2 = β) should be selected in the second constraint to maximize the cost function in Problem P1.
Moreover, we also find from Equation (34) This finding further tells us D(t 3 , t 2 , t 1 ) will decrease faster for t 1 = t 2 than for t 3 = 0 when α reduces from 1. Then, from the view of network robustness, choosing t 3 = 0 is preferred and this result will also be confirmed by the simulations given in Section 6.
Summarizing the above analysis can directly obtain the optimized thresholds given by Now, let's come to the case of high SNR. Referring to the analyzing methods for the low SNR, the following optimization problem is established P2 : max Applying Equation (27) yields Obviously, the cost function is strictly increasing with λ 1 + λ 2 , since the local detection probability is always larger than the false alarm probability in practice so the item P d − P f log P d (1−P f ) P f (1−P d ) is larger than zero. Thus, we should also choose λ 1 + λ 2 = β. However, which is better between t 1 = t 2 and t 3 = 0 could not be determined from Equation (37). Actually, they have the identical detection performances for the extreme case of δ 2 A = 0. This phenomenon will be demonstrated in our simulations. Consequently, the thresholds given in Equation (35) should also be used under the high SNR situation.

Joint Local Decision and Wireless Transmission Based Secure Detection under Energy Constraint
In TCBO secure detection scheme, in order to meet the energy constraint of network, the sensors whose channel gains fall in the region between t 1 and t 2 (Consider the case of t 3 = 0.) will keep inactive. Of course, this gap between t 1 and t 2 can facilitate the AFC to tells the signals from flipping group and non-flipping group to some extent. However, the decision quality of the sensor's local detection is not considered. That is to say the sensor with an error decision may be permitted to report its detection result to the FC, while the one with a correct decision perhaps is forbidden. We think this phenomenon maybe worsen the performance of decision fusion . Therefore, we propose to select the dormant sensor basing on its local decision quality that can be quantified by the local Log-Likelihood Ratio Λ L k . Sensors with very small or very large LLR will send data to the fusion center, while the others stay silent to save energy. Obviously, this is the core idea of censoring sensor technique [8,11]. In particular, a perfectly secure distributed detection scheme with censoring sensors was given in [8]. But a comparatively ideal assumption was set that the EFC had no access to the data from sensors and only monitored the transmission activity of sensors. Moreover, the strategy in [8] did not consider the effect of the wireless transmission between the sensors and the fusion center on the reliability and security, so its applicability was limited. Basing on the above considerations, a joint local decision and wireless transmission based scheme for secure distributed detection with energy constraint is proposed in this section.
The JLDWT method is performed as follows: each sensor first calculates the local Λ L k and compares it with two local decision thresholds. If Λ L k locates between log(λ L · q 0 /q 1 ) and log(λ U · q 0 /q 1 ), it will stay inactive in current report timeslot for it appears less informative to make a correct decision about the target state. Otherwise, the sensor will make a 1bit-decision regarding the state of the hypothesis and then deliver it to the FC over a wireless PAC. While, in order to keep secret from the eavesdropping FC, the active sensor still should encrypt its local decision by randomly flipping it before transmitting. A single comparison threshold t 0 is used here instead of tree thresholds in TCBO scheme. If the sensor has the channel gain satisfying ∞ > h A k ≥ t 0 , it is involved in the non-flipping group. Otherwise, it is chosen to be in the flipping group. At the fusion center, the LLR based fusion rule is still used. Three thresholds, namely log(λ L · q 0 /q 1 ), log(λ U · q 0 /q 1 ) and t 0 , along with the encryption scheme at the sensors are assumed to be known by both the AFC and EFC.

Security Analysis
Now the condition of perfect secrecy in JLDWT scheme will be derived. Our analysis begins with the conditional likelihood function of the k-th sensor calculated by the EFC, which is given by where (a) is valid as θ i → b k → x k → y E k forms a Markov chain and h A k is uncorrelated with y E k , x k and θ i . And (b) follows the fact that p (x k = 1|b k = 1) = 1 and p (x k = −1|b k = 0) = 1 for h A k ≥ t 0 , while p (x k = −1|b k = 1) = 1 and p (x k = 1|b k = 0) = 1 for h A k < t 0 . In addition, b k = null corresponds to the sensor's dormant state and x k = 0 accordingly. Furthermore, To achieve perfect secrecy, two likelihood function f y E k |θ 1 and f y E k |θ 0 should be identical [10]. Then we can establish the following group of equations based on Equation (39).
Through simply computing, we obtain the perfect secrecy condition given by λ = 1/2 and P d + P m = P f + P 0d (41) The first condition in Equation (41) directly results in t 0 = log (2). And the second condition means that the activation probability under the hypothesis θ 1 , indicated by β 1 = P d + P m , equates to the activation probability under θ 0 , denoted by β 2 = P f + P 0d . Comparing this condition with the perfect secrecy setting given in section II of [8], we find they are identical. Next, our task is to find two suitable thresholds λ U and λ L used in local Bayesian detection Equation (2) to minimize the error probability at the AFC, meanwhile, meet the perfect security and energy constraint of β 1 = β 2 ≤ β.

Optimization of Local Detection Thresholds
Referring to the derivation methods of Equations (12) and (38), we can obtain the conditional likelihood functions at the AFC, which are expressed as where Φ t a , t b , x k , y A k , δ 2 A has the expression of Equation (13).

Optimization of Local Detection Thresholds under Low SNR
Following the deducing process in Section 4.1.1, we can obtain the calculation formula of the error probability under low SNR for AFC, which can be written as where In Equation (44), P d , P m , P 0d and P d have the expressions given in Equation (7). Further, referring to the optimization problem P1, we build Applying Equation (46) to Equation (45), it can be achieved the rewritten object function is being independent on the variables to be optimized, the final target function can reduce to In addition, because the probability of correct detection is always larger than the incorrect one in practice, we have O(β 1 ) ≥ 0. Moreover, the condition β 1 = β 2 contributes to (P d − P f ) = (P 0d − P m ), and then O(β 1 ) = 2(P d − P f ).
First of all, we should find a good β 1 that meets the constraint in Equation (45) to maximize O(β 1 ). Combining Equations (7) and (47), we have Let's first focus on the following function: Applying the condition (P d − P f ) = (P 0d − P m ), we can get the result of D(λ U ) = D(λ L ), which is derived in detail in Appendix F. Substituting Equation (6) into Equation (49), it can be obtained where the error function erf( Through setting dD(λ) dλ = 0, we can find three extreme points λ = 0, λ = ∞ and λ = q 1 /q 0 (52) Substituting them into Equation (50), we have Based on Equation (53), we can draw a notional curve of D (λ) as in Figure 3.  From Figure 3, we can see that there are two thresholds corresponding to one value of D (λ), further, this D (λ) actually maps to a single β 1 . When β 1 = 1, two thresholds overlap at a point of λ = q 1 /q 0 and D (λ) has the maximum value. While β 1 decreases, we know that λ U moves towards ∞ and λ L approaches zero further. Thus, from Figure 3, we can see that the corresponding D (λ) reduces. That is to say a larger β 1 is preferred in order to get a higher D (λ).
Moreover, the reduced target function for P3 can be written as O(β 1 ) = 2D (λ U (β 1 )). Therefore, β 1 = β should be chosen to achieve the maximum O(β 1 ), along with the optimal performance of AFC, and the corresponding pair of thresholds are the optimal thresholds to be found. However, the expressions in Equations (7) and (49) are so complex that a closed-form expression of λ L (β) and λ U (β) couldn't be obtained. In this situation, a pre-calculated table corresponding to each snr L could be used to get the required λ L (β) and λ U (β), just as the processing method in our simulations.

Optimization of Local Detection Thresholds under High SNR
For the very high SNR scenario, the analysis methods in Section 4.1.2 are consulted. Firstly, the simplified LLR similar as Equation (26) are obtained, which is given by where t h is set as t 0 . Referring to the derivation of Equation (27), it is achieved that Then the design problem is built as Here, the object function can be written as O (λ L , λ U ) = P d − P f log P d P f · log P 0d P m . Because P d − P f = P 0d − P m , maximizing P d − P f could also make log P d P f and log P 0d P m largest. Therefore, the object function in Equation (56) can be transformed into P d − P f , so Problem P4 is equivalent to Problem P3 and they have the identical optimization results.

Simulation Results and Discussions
In this section, simulation results are presented to evaluate the TCBO and the proposed JLDWT schemes in a sensor network of IoT. Their error probabilities are compared from various perfectives, including with the changing of transmission channel SNR, energy constraint and local detection SNR. The performance of a degraded form of the JLDWT scheme, where the random flipping is not included, is also given to represent the performance of secure detection designed in [8] over a practical rather than an idea wireless PAC.

Simulation Settings
A wireless sensor network with K sensors is modeled. The local detection SNR and the transmission channel SNR to fusion center for different sensors are assumed to be identical, as well as, the transmission channel SNR to the AFC and the EFC is also supposed to be equal. In addition, the LLR computation at the EFC is same as the AFC except the received signals from the sensors. Detail simulation parameters are listed in Table 1. Moreover, Tables 2 and 3 give the specific local decision thresholds corresponding to different energy constraints under snr L = 0 dB and snr L = 5dB, respectively.

Simulation Results for TCBO Scheme
Let's begin with the performance evaluation for the low SNR scenarios, where the SNR is not larger than 0 dB. From Figure 4, we first notice that the error probabilities for various settings at the EFC all locate around 0.5, which is our expected situation of perfect secrecy. Moreover, it is obvious that the AFC performance for the case of t 3 = 0 expresses better than the case of t 1 = t 2 and there is a gain of about 4 dB obtained by the former one. This may be contributed by two aspects. On one side, the dormant region (or a gap) locates between the flipping and non-flipping group for the case of t 3 = 0 and it is beneficial for the AFC to discriminate between the flipping and non-flipping case, especially with serious noise. On the other side, the flipped decisions also disturb the fusion process at the AFC. For t 3 = 0, the power of received interference is lower since the flipping sensor has the lower channel gain. Thus the interference would have less effect on the fusion decision of the AFC. In addition, the error performances of using the approximated LLR (given in Equation (19)) are almost identical with the ones of using the statistic channel (SC) based LLR (Here, numerical integrations are needed.), particularly during the very low SNR region. This demonstrates the availability of the approximated LLR under low SNR. The theoretic performance calculated by using Equation (23) for t 3 = 0 is also drawn in Figure 4. It can be seen that the simulation result fits the theoretic one well for the SNR lower than −10 dB, and the gap between them becomes larger with the growing of SNR due to the noise variance being farther from the assumption of δ 2 A = ∞ included in Equation (23).   Figure 4. Error probabilities at the AFC and EFC as functions of various SNR for β = 0.8 and snr L = 5 dB over low SNR region. Figure 5 shows the performance of TCBO scheme with the SC based LLR varying with β. It can be seen that the error probabilities for t 3 = 0 and t 1 = t 2 are identical with β = 1 and they would increase with β reducing from 1. But the increasing of the former one is slower than the latter one, which is correspondent to the analysis about Equation (34) in Section 4.2. Moreover, carefully observing the curves corresponding to t 3 = 0, we find that the error probabilities even rise slowly when we continue improving β and this phenomenon is more obvious for the moderate SNR, for example SNR = 0 dB. It is because the reduced gap between the flipping and non-flipping group with a larger β leads to the confusion of the AFC to judge between two groups. It is noted that the confusion is created by the noise of channels. When the noise is very strong (or there is no such gap and the case t 1 = t 2 follows this situation), the confusion always exits, so the more energy consumes and the better performance gets, just as the analytical result under low SNR in Section 4.2. However, with the noise reducing, the confusion disappears when the gap is large (Corresponding to a small β), while it appears when the gap becomes small. Therefore, although the energy consumption increases with β becoming large, the appeared confusion would worsen the performance. Of course, when the noise reduces to zero, the confusion never appears and the error probability will strictly decrease with β. This is the asymptotical analysis result under high SNR in Section 4.2 and also will be seen in the following simulations. The performance curves of TCBO scheme for the high SNR scenarios, where the SNR is larger than 0 dB, are shown in Figure 6. Obviously, the error probabilities for various simulation conditions at the EFC are all about 0.5 and perfect secrecy is maintained. Moreover, the AFC performance for the case of t 3 = 0 is still better than the one for the case of t 1 = t 2 , and the performance gap is about 2 dB. However, we find that the performance loss induced by the approximation of LLR with δ 2 A → 0 (seen in Equation (26)) is obvious. And this loss for t 3 = 0 will decrease with improving SNR, since the noise variance is closer to zero. In fact, the performance loss for t 1 = t 2 will also reduce with the growing of SNR. In particular, this loss will reduce to zero for the extreme case of δ 2 A = 0 with two kinds of threshold setting, which can be seen in Figure 7. Therefore, the approximated LLR given in Equation (26) is still usable in terms of the reducing computation complexity, especially under high SNR scenarios. From the other perspective, Figure 7 draws the error performance varying with β under the high SNR case. It can be seen that the threshold setting of t 3 = 0 demonstrates higher robustness than t 1 = t 2 when the energy constraint is more severe. In addition, for the extreme case that the noise disappears, the error probabilities for various settings converge to an identical value and they decrease strictly as β increases. Because the confusion of the AFC for discriminating between the flipping and non-flipping group does not exist when the noise is absent, the case of t 3 = 0 would be equivalent to the case of t 1 = t 2 . Furthermore, the approximated LLR could obtain the similar performance as the SC based LLR.   Figure 7. Error probabilities at the AFC and EFC as functions of various β for snr L = 5 dB over high SNR region.

Simulation Results for JLDWT Scheme
In this section, the performances of the TCBO and the proposed JLDWT schemes are compared from various perspectives. Figure 8 gives the error probabilities of two schemes for low SNR case. We can see that the JLDWT using the SC based LLR, the JLDWT using the approximated LLR and the TCBO using the SC based LLR have almost identical performance. Because the strong channel noise dominates in low SNR, the JLDWT's advantage is not shown up. The simplified LLR for low SNR is very effective for maintaining the performance as well as reducing complexity of FC. Furthermore, all these schemes could achieve the perfect secrecy. For comparison, the degraded JLDWT method without random flipping is also evaluated. Concretely, in the degraded JLDWT scheme, each sensor still executes the local detection based on the Bayesian criteria with two local decision thresholds λ U and λ L keeping β 1 = β 2 , while the active sensor will deliver the local 1bit-decision in its original form to the FC no matter what the estimated channel gain is. That is to say the difference of the degraded JLDWT from the JLDWT is that the flipping process is not involved. As comparing it with the secure strategy given in [8], we can easily see that λ U and λ L used by the degraded JLDWT are identical with the ones used by the scheme in [8], because their optimization targets to find the optimal λ U and λ L are equivalent and the perfect secrecy constraint conditions are same. Thus, the degraded JLDWT can be seen equivalent to the scheme of [8] except that it is applied under a more realistic scenario considering the wireless transmission and a looser constraint on the EFC ability relative to the case in [8]. From Figure 8, it can be seen that the secrecy from the EFC is totally lost and the EFC has the same performance as the AFC when the secure strategy in [8] is used. That is to say the strategy given in [8] is ineffective if the EFC has the same process capability and the prior information as the AFC. Thus, random flipping is necessary to assure the information confidentiality with the enhanced EFC. Certainly, this information security is exchanged by certain performance loss of the AFC.
As for the case of high SNR, it can be seen from Figure 9 that the JLDWT scheme with the SC based LLR outperforms the TCBO using the SC based LLR and the performance gain for the AFC would increase with the transmission channel SNR going higher. That is to say preventing the worse local decision from contributing to the data fusion would facilitate to improve the performance at the FC when the disadvantage effect of transmission channel reduces. Moreover, similar as the result seen in Figure 8, the AFC and the EFC have the identical error probabilities with the degraded JLDWT and the information confidentiality is not guaranteed. In addition, the approximated LLR contributes to the performance loss for both the JLDWT and the TCBO schemes, but the JLDWT scheme still outperforms the TCBO one slightly. Figures 10 and 11 compare the error performance of TCBO and JLDWT schemes with the SC based LLR under snr L = 0 dB and snr L = 5 dB, respectively. It can be seen that the gain of the JLDWT scheme against the TCBO method increases with the growing of transmission channel SNR. That is correspondent to the result seen in Figure 9. Furthermore, this gain at the high SNR, for example SNR = 15 dB, becomes larger for a smaller β. That is the advantage induced by cancelling the worse local detection results from the fusion data and it would dominant the final decision fusion when the transmission channel becomes good. Furthermore, we also find the performance inflection phenomenon over the curves of the JLDWT, which is similar as seen in Figure 5. While, it is induced by the confusion of the sensor to judge between two hypothesis of θ 0 and θ 1 , rather than the confusion of the AFC for discriminating between the flipping and non-flipping group. Based on the above simulation results and discussions, we suggest that the TCBO scheme with the approximated LLR is a good selection over the low transmission channel SNR region. While, under a good wireless transmission scenario with a severe energy constraint, the JLDWT scheme with the SC based LLR is preferred in order to obtain the higher detection accuracy at the AFC. Moreover, a moderate β around 0.7∼0.8 is more appropriate for a practical sensor network in terms of both the energy consumption and the detection performance. In addition, it is to be noted that the TCBO and JLDWT schemes both can be easily extended to a larger sensor network, although only the case of K = 20 is studied in our simulations.

Conclusions and Future Work
Distributed detection scheme with good security and energy efficiency plays an important role in the implement of sensor network in IoT. In this paper, two secure decentralized detection schemes under energy constraint are studied comprehensively. Firstly, a specific energy constraint is introduced to the existing channel aware encryption scheme and we call it TCBO scheme. Next, the simplified LLRs under the low and high SNR are derived, respectively. Based on the new LLRs, the asymptotic error probabilities for the worst and best noise situations at the AFC are calculated. Then, three comparison thresholds are optimized through minimizing the error probability while satisfying the perfect secrecy and energy constraints. Secondly, combing the local detection and the wireless transmission of local decision at the sensor, a hybrid scheme named JLDWT is proposed, where the energy efficiency is provided by censoring the sensor with less informative local LLR and the confidentiality from the EFC is guaranteed by the channel based random flipping. Then, the asymptotic error probabilities under low and high SNR environment are also given. Furthermore, two local detection thresholds and one flipping comparison threshold are optimized to minimize the error rates, as well as, assure the perfect secrecy and the required energy efficiency. At last, we evaluate the detection performance of the TCBO and the proposed JLDWT schemes through computer simulations. The simulation results demonstrate that the perfect secrecy is assured by both schemes. The JLDWT scheme outperforms the TCBO one under the better wireless transmission environment with a severe energy constraint.
The perfect secrecy is guaranteed at the cost of reducing the detection accuracy at the AFC in the TCBO and JLDWT schemes. However, in some scenarios, a limited information leakage to the EFC maybe is permitted, while the high detection performance at the AFC is more important. In future work, the modified forms of the above two schemes will be designed to support the more flexible constraint on the EFC's performance. Moreover, except the eavesdropping attack, there are many other attack modes faced by IoT networks in practice, such as the denial of services (DOS) attack, node outage attack, signal jamming attack and intentional attack. Among them, the intentional attack could incur fatal threat on network by paralyzing a small fraction of nodes with highest degrees. As to IoT networks, if some important nodes, such as the fusion center and the controller, suffer the intentional attack, the whole IoT system may be disrupted. Therefore, the robust defense mechanism against the intentional attack for IoT will be studied in our future work.
where (a) is based on the fact that exp(x) ≈ 1 + x for small x and (b) is due to the assumption of δ 2 A → ∞.

Appendix C. Derivation of Λ A k under High SNR
In Equation (25), substituting f y A k |x k , h A k with 1 → 0 for y A k < 0 and Λ A k = 0 for y A k = 0. Substituting them into Equation (C1), we can rewrite it as the Equation (26).
where (a) follows the condition that h A k is uncorrelated with x k and θ i , and (b) is due to Equation (24). Similarly, it can be obtained that Also due to λ 1 = λ 2 , it can be achieved Further, δ D (α) = t 1 − t 3 is given.

Appendix F. Proof of D(λ U ) = D(λ L )
Beginning with (P d − P f ) = (P 0d − P m ), we get From the total probability theory, we have Then D(λ U ) can be rewritten as