Application of Wireless Sensor Network Buildings Application of Wireless Sensor Network Technology in Security Control of Intelligent Buildings

— When a wireless sensor network is used to perform real-time security monitoring inside a building, there are drawbacks like multi-path signal fading and difficulty in spectrum sensing. In light of these problems, this paper proposes an improved signal spectrum sensing algorithm based on support vector machine (SVM), which inhibits the impacts brought by the low signal-noise-ratio (SNR) environment in the transmission process of wireless sensor signals through the embedded cyclostationary characteristic parameters. Based on this, considering the low efficiency and poor fault tolerance of multi-task monitoring and scheduling inside the building, this paper also proposes a multi-task coordination and scheduling algorithm based on physical information integration, which achieves multi-task scheduling and execution through intelligent breakdown and prioritization of general tasks. The simulation test shows that, compared with the artificial neural network (ANN) algorithm and the maximum-minimum eigenvalue (MME) algorithm, the proposed algorithm has much better spectrum sensing effect under low SNR, takes less computation time, and achieves higher accuracy in large-scale multi-task coordination and scheduling. The research conclusions can provide new ideas for the application of wireless sensor network in intelligent building security monitoring.


Introduction
In recent years, fire, flood, gas explosion and indoor environmental pollution have frequently occurred in all kinds of buildings. Therefore, it is of great significance to establishing and improving real-time monitoring systems for buildings to realize unattended and intelligent building security control [1][2][3].
A building security monitoring system mainly consists of a sensor cluster network, a data processing centre and an information management system, but the traditional building security monitoring system cannot well achieve continuous monitoring and accurate analysis of accidents [4][5][6][7]. Intelligent building security control based on wireless sensor network (WSN) is a newly proposed method for building monitoring [8][9][10]. WSN has such merits as low wiring cost, continuous monitoring, unattended and remote control, but it also has deficiencies like electromagnetic interference, indistinguishable environmental noise, and inability of sensors to be embedded in buildings [11][12][13].
When a wireless sensor network is used to perform monitoring inside a building, there are drawbacks like multi-path signal fading and difficulty in spectrum sensing [14][15][16]. To address these problems, researchers proposed signal classification and energy detection algorithms such as the maximum-minimum eigenvalue method, artificial neural network algorithm and SVM method, but these methods all have shortcomings like poor detection effect, low sensing accuracy [17][18]; regarding the low WSN-based multi-task monitoring and scheduling efficiency and poor fault tolerance, etc., researchers proposed minimum time algorithm, genetic algorithm and minimum execution time/earliest finish time algorithm, etc. [19][20][21], but as the multi-task coordination inside buildings is a problem integrating data and computational task, the above methods can easily result in local node overload, low search efficiency, and low task assignment success rate in the calculation process [22][23][24][25].
In light of the above problems, this paper proposes an improved signal spectrum sensing algorithm based on SVM, which inhibits the impacts brought by the low SNR environment in the transmission process of wireless sensor signals through the embedded cyclostationary characteristic parameters. Based on this, considering the low efficiency and poor fault tolerance of multi-task monitoring and scheduling inside the building, this paper also proposes a multi-task coordination and scheduling algorithm based on physical information integration, which achieves multi-task scheduling and execution through intelligent breakdown and prioritization of general tasks. The research conclusions can provide new ideas for the application of wireless sensor network in intelligent building security monitoring.

2
Design of the intelligent building WSN system  The design of the intelligent building WSN system is shown in Fig.1. It is mainly composed of sensor computing nodes, internal physical environment of the building, an information centre and a user terminal. The WSN monitors the internal environment of the building in real time and feeds back the attributes of the environment through common nodes to the information centre. The processing commands of the information centre are transmitted back to the internal environment of the building through the actuator node.

3
WSN-based indoor spectrum sensing algorithm

Indoor spectrum sensing model
Take one building for an example. Suppose that there are W primary users and M secondary users in the building network set, the network system can be expressed as follows: H 0 /H 1 indicates that the system has a/no main user; T is the overall sampling time; and s w (t) is zero mean signal, whose autocorrelation function and cyclic spectrum are: a is the cyclic frequency; and Y (t n , f) is the Fourier transform. The identification of the signal spectrum mainly takes the maximum spectral correlation coefficient M c , the spectral average energy E, and the spectral function M s when a=1/T 0 as input vectors. The expression is as follows: The spectrum sensing input vector is X= {E M c M s }. It is used as the training sample to train the SVM. After the training, the monitoring signals collected from the site are used as actual detection samples for spectrum sensing at different wireless sensor nodes. The decision function for different spectrum sensing is expressed as follows:

Simulation and verification
The algorithm proposed in this paper was compared with the MME algorithm and the ANN algorithm to verify its spectrum sensing performance inside the building. The simulation software was Matlab 2012b, and 3 kinds of modulated signals AM (single frequency sine wave), BPSK and MSK were set, of which the latter two are of random signal sequences. Different SNRs were set for calculation. Table 1 shows the spectrum sensing accuracy of the MME algorithm, the ANN algorithm, and the proposed algorithm with respect to the three kinds of modulated signals at a SNR of -12dB and 0dB. From the table, it can be seen that when the SNR decreased, the spectrum sensing accuracy of the MME algorithm and the ANN algorithm decreased significantly, while the proposed algorithm achieved better sensing accuracy at both SNRs. When the SNR was -12dB, the accuracy of the proposed algorithm was higher than those of the MME algorithm and the ANN algorithm by 70.7% and 22.7%.  Fig.2 illustrates the detection accuracy of the three algorithms under different SNR conditions with respect to two modulated signals -AM (the upper one) and BPSK (the lower one). As can be seen, when the SNR was greater than 0dB, the spectrum sensing accuracy of the 3 algorithms was all high, but when the SNR was less than -5dB, the accuracy of the MME algorithm drastically decreased, and that of the ANN algorithm also decreased greatly, while the proposed algorithm could maintain an accuracy of over 75%.  3 shows the structure of the indoor multi-monitoring-task scheduling in an intelligent building. The structure mainly addresses the task allocation and task scheduling. For a specific task, the system decomposes it into multiple subtasks by calculating the correlation constraint relationships and computational complexity, etc., and assigns the subtasks to different computing nodes one by one. The task scheduler performs big data analysis to determine in what sequence these subtasks will be executed.  This paper carries out intelligent distribution of the multi-task WSN monitoring based on the multi-band Turing machine model. Let there be a total of N working bands, the relational system be M, the initial state of the Turing machine be q 0 , the input task be w, and the time when M accepts w be t (w). The Turing machine server exists inside each monitoring node in the whole wireless sensor system. Based on the complexity of the monitoring task, the server divides it into multiple subtasks superimposed. The Turing machine server achieves optimal breakdown and allocation of the monitoring task according to the complexity of the task and sorts the sub-tasks according to the calculated degree of difficulty. If a node cannot complete the task after computing for a period of time, it will break down and match the sub-task for a second time until the overall task is completed. According to the above analysis, a WSN-based indoor dynamic multi-monitoringtask scheduling algorithm is established, as shown in Fig.5. The proposed scheduling algorithm targets the shortest overall multi-task execution time and the highest task execution efficiency. Prior to multi-task scheduling, the first step is to query the directed acyclic graph parameters of related tasks, randomly generate a schedule list, and calculate the priority of different tasks according to Equation (7).

Controller
M p and M c are the median values of unit calculation and link transmission capacities, respectively.

Test results and analysis
The simulation software was Matlab 2012b. 20 common sensor nodes were arranged inside a building, and 30-150 tasks were generated randomly. Fig.6 shows the overall task scheduling time of the MM algorithm, the genetic algorithm, the MCT algorithm and the proposed algorithm with different numbers of tasks. As can be seen from the figure, when the number of tasks increased, the scheduling time of all the algorithms tended to increase. When the number of tasks reached 100, the task scheduling time of the proposed algorithm is 265ms, much lower than those of the MM algorithm (299ms), genetic algorithm(308ms) and MCT algorithm(330ms). Compared with the other three algorithms, the proposed algorithm is improved in terms of node load balancing, resource allocation, and prevention of premature convergence. Fig.7 shows the histogram of the overall task scheduling time when the number of tasks was 30, 50, 60, 100, and 150. As can be seen, the proposed algorithm took the minimum time to complete all five numbers of tasks. This was because the proposed scheduling algorithm broke down the task with high complexity into several sub-tasks with lower complexity, and used the sorting mechanism to assign them to the corresponding computing nodes according to the degree of difficulty. It can also be seen that as the number of tasks increased, the computational advantage of the proposed algorithm became more obvious.  Fig.8 shows the curve relationship between the number of task and the task scheduling success rate under each of the four algorithms. As can be seen, as the number of tasks increased, the task scheduling success rates of the four algorithms all tended to decrease. When the number of tasks reached 150, the task scheduling success rate of the MCT algorithm decreased the most, which was generally 76%, followed by that of the genetic algorithm, which was 82%, and then it was the success rate of the MM algorithm, which was 87%. The task scheduling success rate of the proposed algorithm reached 90%. This was because the other three algorithms prioritized the tasks that were less time consuming, but in this way the overall scheduling of tasks was often not optimal.

Conclusions
When a wireless sensor network is used to perform real-time security monitoring inside a building, there are drawbacks like multi-path signal fading and difficulty in spectrum sensing. In light of these problems, this paper proposes an improved signal spectrum sensing algorithm based on support vector machine (SVM), which inhibits the impacts brought by the low signal-noise-ratio (SNR) environment in the transmission process of wireless sensor signals through the embedded cyclostationary characteristic parameters. Based on this, considering the low efficiency and poor fault tolerance of multi-task monitoring and scheduling inside the building, this paper also proposes a multi-task coordination and scheduling algorithm based on physical information integration. Through simulation test, this paper proves the feasibility of this algorithm. The conclusions are as follows: 1. The WSN-based indoor spectrum sensing algorithm proposed can still have a high spectrum reconfiguration ability when the SNR is low, and when the SNR is reduced to -15dB, the spectrum sensing accuracy rate can still be over 75%. 2. The multi-task scheduling algorithm for indoor building monitoring proposed in this paper has improvements in node load balancing, resource allocation and prevention of premature convergence. It decomposes the task with high overall complexity into several sub-tasks with low complexity and uses the sorting mechanism to assign the sub-tasks to the corresponding computing nodes according to the degree of difficulty. For large-scale multi-task coordination and scheduling, it has higher accuracy.