Fusion-Algorithm-Based Security System with Multiple Sensors

through the communication interfaces. The monitoring system, operating on a computer or a handheld device, can confirm that an incident occurred using fuzzy analytic hierarchy process (fuzzy-AHP) by these data and establish accident models for earlier warning. These models can be transmitted to the modules making them more intelligent. Since each module developed in this paper has the function of network communication, it can be an Internet of Things (IoT) node, and the monitoring system can form a regional disaster prevention system


Introduction
The definition of quality of life, in addition to anti-theft protection, prevention of fire and gas leaks, and other disasters, also includes the abilities to prevent disasters or provide guidance for escape.In other words, one can use various security modules and modes of communication to monitor the home environment, such as ambient temperature, humidity, and illumination.However, these are just functional enhancements; how to enhance the stability and intelligence of a security system is a key issue in quality of life research.This means that security modules have a higher degree of accuracy and convenience and can be monitored by smart phones, personal digital assistants (PDAs), or other devices on the network.A system can prevent the occurrence of a disaster, or can provide a safe escape route when a disaster occurs.Such a system can be regarded as a system that provides for quality of life.
In the past, many studies of intelligent safety systems have been carried out.Kujuro and Yasuda described how to evaluate a system in a smart building and the importance of information updating and communication capabilities in the building automation system. (1)Fu et al. designed standard interfaces for intelligent building systems to be used in the control of appliances and communication. (2,3)In the area of fire hazard detection, Cheong et al. used ultraviolet (UV) sensors and ZigBee wireless sensor networks to detect the sources of fire. (4)Budi et al. combined machine vision and image recognition algorithms to identify fire sources. (5)Wang et al. used a single chip with three complementary sensors (temperature, smoke, and carbon monoxide) to detect fire sources and designed a fire detection module using the multiple sensing fusion theory. (6)t can be seen from the previous literature that an intelligent security system is quite complex and large, but many features can be implemented independently, so Agent (7) technology is very suitable for a security system.Agent, a key research topic in artificial intelligence, means that when a node fails, its function can be completed by other nodes.
From previous studies, it can be seen that a stable and correct security system requires the integration of hardware and software, including sensors, communication technology, software technology, and a variety of algorithms.This makes a security system expensive or complicated to install.With the design concept of "operating independently and monitoring centrally," we used in this study the 8051 as the master controller with a modular design to reduce the cost of the security system and to make the resulting system convenient to use.For communication, we integrated wireless RF, RS232/422/485, wireless network, wired network, and other communication interfaces, and up to three communication interfaces were used at the same time.Because the security module has wireless and wired network communication interfaces, it also has the function of the Internet of Things (IoT).This design allows each module to have a powerful ability to communicate and a more complete monitoring function.It also prevents message sending failure due to communication interface problems.
Each module of the security system has four sensor signal inputs.Users can install 1 to 4 sensors, which may be the same or different, as required.To determine the accuracy of the sensor signal to reduce the chances of a miscarriage of justice, we use the fuzzy analytic hierarchy process (fuzzy-AHP) and the adaptive fusion method (8) on each module of the security system to process the sensor signals and events.This ensures the correctness of the sensor signals and enables the grouping of events into classes.These data on the class of events and the accuracy of sensors can also be used to assess the correctness and stability of the security system modules and make the entire security system more intelligent.
In a security system module, we use micro IP (μIP), which is an implementation of the transmission control protocol/Internet protocol (TCP/IP) network protocol stack developed by Dunkels. (9)Owing to the small code size, μIP makes an 8/16bit single-chip system having functions of TCP, user datagram protocol (UDP), simple mail transfer protocol (SMTP), telnet server/client, an HTTP server and web client, domain name system (DNS), and others.Our security system modules have Wi-Fi and Ethernet functions.With these two functions together, the developed security system modules will be more convenient to use and can be linked to form an IoT system.

System Architecture
The security system module developed in this study is based on the 8051 series single chip as the main control chip with a sensor signal processing circuit, communication interface, and other peripheral circuits.A block diagram of the module is shown in Fig. 1.Up to four sensors can be connected to this module.Before being calculated or processed, each sensor signal goes through a signal processing circuit for signal amplification, zeroing, filtering, and other processing, and then is sent to the single chip A/D for digitization.
In the communication interface, the security system module can be connected to the RF wireless module, Wi-Fi, Ethernet, power-line communication (PLC), or wired universal asynchronous receiver/transmitter (UART).The security system module can use three different communication interfaces at the same time.Through the communication interfaces, processed sensor data or calculated results can be returned to the host computer, and the host computer can receive the sensor threshold, module data or parameters, communication settings, or other parameters.Because there are many communication interfaces, it is simpler and more convenient to apply the security system module, and it can be ensured that an event message is sent immediately at the time of an incident.
The module can be used alone or to form a sensor network by connecting multiple modules via the communication interfaces.In the case of multiple modules, the user can adjust the number and types of sensors used by each module according to the requirements, so that the entire monitoring system can generate more accurate results.
For data communication, a well-defined data packet structure produces the following benefits: (10) (1) The source of any information can be easily identified and the data can be easily analyzed.
(2) The leading code and the check sum can ensure the correctness of the information.
(3) The length of the data packet can be estimated, and the receiver can confirm the data integrity.(4) The required transmission time can be predetermined, and the communication efficiency can be improved.Hence, for our application, we define a data packet structure as shown in Table 1.Each data set starts with 35H (Byte 0).Definitions of other bytes are as follows: (1) ID (Byte 1): This byte defines the type of packet and the length of the receiving/transmission.
The format of this byte is shown in Table 2. Bit 7 indicates the direction of data flow: "0" means requiring information from the host, and "1" means transferring from the module.Bits 4-6 indicate data packet as shown in Table 3. Bits 3-0 indicate the data length.For example, "0001" means that the data length is 1.The maximum data length is 16 with bits 3-0 being "1111".The default data length is 4 B. (2) Sensor Kind (Byte 2): This byte defines the details of the sensor or module and is called the group number.
Each group can contain a maximum of 255 modules.By combining the bytes of Sensor Kind and Module, there can be a maximum of 65,535 modules or devices in the security network.(4) State (Byte 4): For a smart sensor module, it describes the state of the module/sensor.It means that this byte can be used for diagnostics.Consider a current-sensing module as an example.If one sensor has malfunctioned, it will be isolated and marked by this byte after the data on the sensor is processed.(5) Data: The data length is defined from bits 3-0 of Byte 1.Thus, the data length can be defined according to the sensor number or speed of the communications interface, and the longest data length is 64 B. It can also be used for setting parameters on the modules for the monitoring software.( 6) Check Sum: This byte is used to check if there is any error in the transmission data.It simply takes the lowest byte of the addition of all bytes including the starting byte 35H as the check sum.One reason for this definition is the limited computation power of a single chip.By using single-chip architecture and modular design coupled with a sound communication protocol, the security system and the module are very flexible and convenient to use.

Algorithms
To ensure that the modules can correctly classify the state of the events, we use fuzzy-AHP algorithms on the modules for assistance in analysis and judgement.The results are transmitted to the monitoring system via the communication interfaces and processed by the adaptive fusion method in the monitoring system.Such a process can prevent the system from making a wrong decision when an error occurs in the security system module in an area.In addition, the results of adaptive fusion theory can also be used to analyze the error rate of each security system module.This mechanism can reduce the rate of false positive events, and can provide for the early detection of the possible failure of a security system module.Finally, the monitoring system sends the results processed by the adaptive fusion method to the security system modules to enhance the accuracy and intelligence of each module.

Fuzzy-AHP methods
Because there may be different numbers of sensors on different modules and different types of sensors on one module, there are three ways to deal with fuzzy-AHP.
(1) Using a single sensor: This is the most commonly used model and the cheapest method.However, since only one sensor is used, it is easy to produce erroneous event messages due to sensor problems.To reduce the chance of sensor error, a number of sensor data are continuously read.The total number of sensor data (measurements) j can be set by the monitoring system.A threshold h is set in the module for data comparison for sensors.Comparing the measured value v of the sensor to the threshold h, we can get S using the following equation.
Since the results obtained by multiple measurements using a single sensor are a one-dimensional array, whether an event has occurred or not can be evaluated using Eqs.( 2)- (6).Summarizing the 1's in the array and then dividing the sum by the number of samples represents the fuzzy severity of the event.As defined in Eq. ( 4), the event severities E = 1-5 mean safety, possible, warning, danger, and emergency, respectively.While transmitting the event data, the security system module transmits results of the fuzzy-AHP evaluations and the severity information to the monitoring system at the same time.The monitoring system uses this information to evaluate the accuracy and stability of the security system module.
(2) Using duplicate sensors: This is an advanced way to ensure that event judgments do not fail due to sensor failure.We set i as the number of the sensor, j as the total number of measurement by a sensor, h as the threshold value, and v as the value measurement by a sensor.If the measured value v is less than or equal to the sensor threshold, then S k = 0. Otherwise, S k = 1.Continuously reading the sensor data can reduce the chance of sensor error.The number j can be set in the monitoring system.The value of each sensor is read and compared with the threshold; we can rewrite Eq. ( 1) as The following results can be obtained after finishing all of the comparisons: Summarizing the 1's of each column, we have 1075 Then, we can write Dividing each element of Eq. ( 10) by the number of measurements, we have Applying the results of Eq. ( 11) into Eq.( 4), the following equations confirm the occurrence of the event.
Using duplicate sensors avoids false event messages due to sensor problems, but it is costly and computationally expensive.
(3) Using several different sensors: This approach uses multiple sensors associated with the detection event to detect the occurrence of an event.In this way, the characteristics of the different sensors can be used to identify and distinguish the event in more detail.For example, when we want to detect fire, we can use the flame sensor, carbon monoxide sensor, smoke sensor, and a temperature sensor.When there is a fire, the sensors listed can detect some of the characteristics of the fire.However, there may not be a clear flame at the beginning of a fire; there may be only smoke or an increase in temperature.Therefore, using a variety of different sensors enables early warning for fires, and it may be possible to clearly indicate the status of a fire.
Similar to the use of duplicate sensors, we set i as the number of the sensor, j as the total number of measurements by a sensor, h i as the threshold value of the ith sensor, and v as the value measured by the sensor.If the measured value v is less than or equal to the sensor threshold, then S k = 0. Otherwise, S k = 1.Continuously reading the sensor data can reduce the chance of sensor error.The number j can also be set in the monitoring system.The measured value of each sensor is read and compared with the threshold, and we can rewrite Eq. (1) as The following results can be obtained after finishing the comparisons: Sensors and Materials, Vol. 29, No. 7 (2017) Summarizing the 1's of each column, we have Then, we can write Dividing each element of Eq. ( 18) by the number of measurements results in Because different sensors are used; we can not only confirm the occurrence of the event but also distinguish the state of the event.For example, security system modules with flame, smoke, carbon monoxide, and temperature sensors for fire detection may have severity values of E flame = 2, E smoke = 4, E CO = 3, and E temperature = 3.Because each sensor has a different relationship to the fire, we can set a weighting factor g for each sensor in the monitoring system.Thus, we have the fuzzy assessment equation With this fuzzy assessment equation, we can assess how likely it is that a fire occurred.Moreover, as the previous example, we can describe the incident as "a possible fire; some smoke has been generated; we must pay attention to carbon monoxide and temperature".Thus, we can accurately describe the status of an event, and the description can be a reference for handling the event or escaping the area.

Adaptive fusion method
Although we use fuzzy-AHP in the sensor module to reduce the rate of false alarms, to analyze each sensor more accurately and reduce the misjudgment rate, we used the adaptive fusion method in the monitoring system.This algorithm is very suitable for digital detection signals, and the module sensor data after fuzzy-AHP processing are all digital.We can analyze the data using the adaptive fusion method.
Consider a binary hypothesizing-and-testing system with n area detecting points in which each detecting point employs a predetermined decision rule.The two hypotheses are H 0 and H 1 , where H 0 means that the event does not occur and H 1 means that the event does occur.The hypotheses have a priori probabilities P 0 = P(H 0 ) and P 1 = P(H 1 ). Figure 2 shows the system architecture.1077 With some derivations, (11,12) we have the amended rule as follows.
The initial weight value is defined as Then we define the following parameters: u i : results of events detection by individual modules or sensors, m: number of points indicating that the event has occurred n: number of points indicating that the event has not occurred m 1i : number of points for which u i = +1 and H 1 m 0i : number of points for which u i = 0 and H 0 n 1i : number of points for which u i = +1 and H 0 n 0i : number of points for which u i = 0 and H 1 Because the adaptive fusion method is a digital assessment method, we can derive the following equations for evaluation: (1) If the module/sensor signal is reliable, then the weight change is (set Δm 1i = 1, Δm 0i = 1).
(2) If the module/sensor signal is not reliable, then the weight change is (set Δn 1i = 1, Δn 0i = 1).Finally, we set the adaptive fusion rule of each sensor weight as where ŵ+ i and ŵ− i represent the weight after and before each updating.The criteria that ŵ+ i reach a stable value can be set by the monitoring system.
Using the fuzzy-AHP algorithm on the module and using the adaptive fusion method on the monitoring system reduces the possibility of false positives in the sensor or security system modules and makes the entire system more intelligent.

Experimental Results
In the completion of the design of the entire sensing module and the derivation of the algorithms, we completed the actual security system module as shown in Fig. 3.This module is based on the 8051 single chip as the main controller, taking into account considerations of moving freely and the ability to replace sensors or communication modules in accordance with the demand; the entire system is designed in modular fashion.Figure 3(a) is the front of the security system module board, and Fig. 3(b) is the back of the board with all connectors on this side.Figure 4 is the security system module with its outer casing.The user only needs to connect the power supply.Hence, it is very easy to use.Because this security system module uses the μIP network protocol, we can use a browser to monitor it directly.Figure 5 shows the actual use of this module.The measured data can be 1079 displayed on the module and the web page simultaneously.This allows us to monitor the security system modules via a browser anytime and anywhere.We also developed a central monitoring system.All of the security system modules can be monitored through this system.All data from security system modules are analyzed by the adaptive fusion method.The results are stored in a database.Users can use the monitoring system to send the results or other parameters to a security system module.This makes the whole system more intelligent.Figure 6 shows the integration of the security system modules and the monitoring system.

Conclusions
Using a low-cost MCS-51 series single chip, we have designed an "independent operation, central monitoring" security system.We used a variety of communication interfaces and network functions in each security system module at the same time.We used the fuzzy-AHP algorithm in the module to enhance the accuracy of judgment about events, and we used the adaptive fusion method for each analysis in a security system module in the event of incidents in the monitoring system so that the security system module could be more intelligent.
This system is very simple to use.Users only need to connect the security system module to a power supply.The user can determine the current state of the security system module from the LCD and voice module on the unit.Users can also use a browser to monitor the security system modules.In addition, we have also designed a monitoring system that allows the user to monitor or configure the security system module very simply.
We continue to develop a variety of sensor modules for the system so that the system is not limited for use in the home and can be applied to various fields.We will also increase the number of sensors that can be connected to the module and enhance the computing power of the module so that the module has the distributed computing ability.Indeed, this system is already an IoT system.Therefore, we will also strengthen the information security of the modules, so that this system can become a smart sensor network system for industrial applications as well as other applications.
Table 4 lists several types of sensors.By expanding this table, modules with other sensing functions can be used in the system.