{'fraction_non_alphanumeric': 0.023025150549061284, 'fraction_numerical': 0.0071732199787460146, 'mean_word_length': 4.9941613588110405, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Methane Monitoring in Kitchen Based on ZigBee Antenna Array

With the obvious improvement in people’s quality of life, the use of natural gas is becoming increasingly common. Household natural gas has hidden safety hazards while being hygienic and convenient. There are many gas explosion accidents every year, and life and property are seriously damaged. When the natural gas body leaks a little and the methane concentration in the air is extremely low, the methane sensor may fail to report, and the signal is weak or the early warning signal cannot be processed in time, which brings hidden dangers to the accident of gas explosion. In this paper, an optimized array of antenna arrays is designed based on the ZigBee network. Use multiple MQ-4 sensor arrays to detect the methane concentration in the kitchen, and send the weak signals collected by the four methane sensors to the ZigBee router in the same direction through the four antennas of the ZigBee module. The router timely and accurately transmits to the ZigBee coordinator and uses ZigBee network technology to upload the alarm information to the cell monitoring center through wireless. The simulation test results show that the diamond antenna array can quickly detect the change of methane concentration, and has high sensitivity and reliability.


Introduction
ZigBee is an emerging wireless communication technology, which has many advantages: low power consumption, short delay, low cost, large network capacity, and also has strong advantages in scalability, self-recovery, and compatibility. Although wireless networks such as USB, wireless wi-fi, and Bluetooth have made rapid progress with the development of technology, ZigBee's relatively low power consumption and lower cost make it better in many wireless communication devices and widely used in various industries.
ZigBee is mainly used in medical sensors devices, e-commerce, building automation and games, and other fields [1] [2]. Home safety is widespread concerned and natural gas used in the kitchen (the main ingredient is methane) is the focus of monitoring. For the case of gas leakage, we will design a ZigBee system based on kitchen safety. By installing the methane sensor at the terminal, the antenna array is reasonably designed to make it timely and accurately monitor the methane concentration in the air, to prevent the occurrence of fire and methane gas explosion accidents.
ZigBee network is suitable for small signal real-time transmission and can monitor the information sent to all objects within the network coverage in real-time [3] [4]. To monitor gas leaks in a timely and accurate manner, MQ-4 methane sensors are used to monitor the methane concentration in the kitchen. Via the diamond antenna of the ZigBee module, the signals collected by the four methane sensors are sent to the ZigBee router in the same direction. The signal is enhanced, thereby overcoming the false positives, false positives, and inconsistent directions of multiple sensors by a single methane sensor [5] [6][7]. The router transmits the signal with strong gain to the ZigBee coordinator and uses ZigBee wireless network technology to upload the alarm information to the community monitoring center. At the same time, the simulation test results show that the diamond antenna array can quickly detect changes in methane concentration, and has high sensitivity and reliability [8].

System Scheme
The system uses an array layout of wireless sensor networks to make nodes distributed in an orderly manner, and multi-sensors enable timely and accurate online detection of methane gas concentration. According to the detected methane gas concentration information, the uniqueness theorem, Maxwell's equations, and Poynting's theorem are used to calculate the antenna directivity system. A half-wave array antenna is selected, and multiple unit antennas are arrayed reasonably, so that the ZigBee module antenna It has directivity and consistent directivity, and the radiant power of the antenna is significantly enhanced. The ZigBee coordinator receives the signal of methane gas concentration in time, increasing the system's adaptability to different environmental factors, high flexibility, and effectively improving the accuracy of the system alarm. The entire monitoring system network is divided into two layers. The upper computer composed of the computer and its applications and databases belongs to the upper layer. All the information on the network is gathered here. At the same time, the analysis and processing of the data are also completed here. The coordinator, routers, and nodes form the lower layer, ZigBee's wireless communication network, then the nodes, routers, and coordinators constitute the transmission channel of information [9]. The overall block diagram of the system is shown in Figure 1.

System Principle
The system integrates the advantages of methane sensor, wireless ZigBee network, and diamond antenna to solve the problem of sensitivity of methane concentration, thus timely and accurate alarm to prevent the occurrence of methane explosion accident. The advantages of small size, lightweight, low price and low power consumption of MQ-4 methane gas sensors in the system are suitable for multiple array distributions, each mounted on the CC2530 module. CC2530 is an important part of the hardware of the ZigBee wireless network. The signal collected by the methane gas sensor is amplified and processed, sent to router through wireless ZigBee network, and then sent to PC. ZigBee reliability, high security, power consumption, low cost, free frequency band of 2.4GHz specified by IEEE802.15.4, and its low data rate is suitable for methane concentration detection.
The above hardware transceiver antenna is essential. The number of antennas and the shape of the array play a crucial role in the gain and accuracy of the signal. The system divides the building units into multiple nodes, each consisting of four ZigBee modules with MQ-4 methane sensors and a router. The antenna of each module is made of copper wire of the appropriate size, the antenna of four modules is composed of the diamond array, the long the diagonal reverse pointing to the router, and the direction of the antenna array is drawn by CST simulation software. The linear Diamond array can send the methane concentration signal collected by the sensor in time and effectively [10].

Detection node module
Each dot of the system is composed of four ZigBee modules and one router. Each ZigBee module is equipped with an MQ-4 methane sensor, the model of which is CC2530. The signal collected by the methane sensor is processed by the internal circuit of the ZigBee module, and the electromagnetic wave carrying the signal is sent to the router through the antenna, and finally, the concentration signal is converted into a voltage signal. Then the CC2530 module sends the collected concentration value to the coordinator through the ZigBee network. The acquisition node module diagram is shown in Figure 2.

Coordinator circuit
The coordinator is the core component of each ZigBee network, and its main function is to initialize network information. The internal has the controller, the encoder timer, the oscillator and so on function circuit. The coordinator is mainly composed of a power adapter, serial port bus module, and the coordinator and PC are connected by RS-232 serial port bus, which constitutes the monitoring center [11]. The coordinator will receive the gas concentration signal recorded through the computer, the concentration of the network over the threshold to do timely processing, early prevention of accidents. The coordinator circuit is shown in Figure 3.

Software Parts
After the initialization of the system, when the methane sensor detects methane gas, a weak current signal will be generated. The amplifier filter processes the signal and sends it to the internal sampling end of the current signal, which converted into a voltage signal through the ADC, and the methane gas concentration in the environment is calculated by the voltage value. Then select the appropriate positioning algorithm according to the factors that affect the accuracy of the direction map, and use the geographical location information of the reference node from the coordinator to locate the emission source [12]. The software flowchart is shown in Figure 4.

Construction of Antenna Diamond Arrays
To describe the directivity of the antenna, it is implemented with a pattern of the relationship between the radiation field strength and the directivity [13]. The pattern of the element is wide. To enhance the directivity, one of the basic methods is to arrange the antenna. The antenna composed of multiple element antennas becomes the antenna array. Four factors control the N element linear array: element pattern and orientation, element spacing, current phase distribution and current amplitude distribution [14].The working principle of the diamond antenna is shown in Figure 5. When the diamond-shaped electrical length / l  is constant, in order to obtain the maximum radiation in the direction of the long diagonal, the angle between the edges is connected. The joint angle 0 2 should be selected as follows:   (7) is substituted into formula (2) to obtain formula (8). This shows that the radiation fields in ①, ③ in the direction of the long diagonal of the rhombus are basically the same. Similarly, the fields on the sides ③ and ④ are superimposed in the same phase.
The typical parameters of the diamond antenna are shown in Table 1. The semi-obtuse angle:

Location Algorithm of Far Field and Pattern
To calculate the far field of diamond antenna, the coordinate system of the diamond antenna is shown in Figure 6 and Figure 7.
According to the directional function analysis, the frequency bands of the ZigBee wireless sensor network are 868MHz, 915Mz, and 2.4GHz, and this system uses the popular 2.4GHz frequency band, the antenna length and electrical length of each ZigBee module are as shown in formulas (19) and (20).   . Threedimensional pattern of the diamond antenna The three-dimensional pattern of the diamond antenna is shown in Figure 11. According to the simulation results, the smaller the electric length, the wider the main lobe and the less the side lobe. Accurate and timely alarms are important in mine methane monitoring. Therefore, the antenna parameter selects the smaller electrical length 2 l  = .

Conclusion
This article mainly studies and analyzes the field radiation direction of the antenna array, which apply the diamond antenna pattern and direction function to the design and combination of the ZigBee module antenna. Multiple methane sensors collect information at the same time. The radiation direction is transmitted so that the router antenna receives a strong methane gas concentration signal, which can promptly find and solve problems and prevent accidents such as fire and explosion. The system has the advantages of widely distributed nodes, flexibility, and strong applicability. At the same time, this system can also be used in fields such as farm monitoring, exhaust gas treatment, and military heavy field monitoring. It has a broad application prospect and strong practicability.