Development of Ammonia Gas Leak Detection and Location Method

This paper proposed the gas for industrial ammonia leak diffusion model and the Gauss method of leakage localization. A set of wireless ammonia leak alarm system is composed of sensor node, network coordinator and host used in the industrial field was developed, the purpose is to reduce the loss of property caused by the leakage of ammonia industry. Using the monitoring system to carry out the ammonia leak location simulation measurement experiment, the result shows that the relative positioning error of the monitoring system is about 12%, which meets the needs of industrial production safety monitoring. Using the wireless sensor network to monitor the concentration of ammonia gas and locate the leakage source, it solves the problems of traditional wired alarm system, such as difficult wiring and weak expansibility, which helps to find the leak timely and provides a reference for the emergency rescue work


Introduction
Ammonia gas has a wide range of applications in the chemical fertilizer production, petroleun chemical industry, bio-pharmaceutical ,etc.In order to use conveniently, we usually change ammonia gas into liquid ammonia storage in the industrial production.Liquid ammonia is a green refrigerant.It is the first choice of the kiloton cold storage which is mostly used in the industrial cold storage [1,2].Liquid ammonia transport pipeline containing high pressure, it will cause ammonia leak accident once the connection of pipeline and valve loose or pipe wall break, so the use of liquid ammonia has a great security risk.
In recent years, the convenient, scalable, low-power, low-cost features of Wireless Sensor Networks become more prominent [3].In the civil and other related fields are beginning to use wireless technology to monitor the pollution of the gas.The civil and other related fields are beginning to use wireless technology to monitor the pollution of the gas.In 2012, Huiyun He, etc. had used the technology of Zigbee to design intelligent weather station, and achieved the air quality monitoring [4].In 2014, Gonzalez-Castano and others in Spain remotely monitored the toxic gases in shipyards [5], and made an early warning when the concentration of toxic gas exceeded, which nip it in the bud.
However, the above-mentioned domestic and foreign gas monitoring equipment mainly carries out basic concentration detection and over-limit alarm, and does not have the leakage source locating function which plays a key role in fire emergency rescue work.In this paper, the leakage accident of ammonia was studied deeply.An industrial ammonia leak alarm system with distributed monitoring and centralized display is developed using wireless sensor networks.In the event of a leak, the concentration of ammonia in the environment changes, and the monitoring system will remind the staff on duty at the factory in the form of sound and light alarm; Moreover, the host computer will calculate the position of the leakage source by weighted centroid algorithm, according to the concentration of site ammonia.To provide effective information guidance for the fire and rescue, reduce the loss of property personnel.These provide effective information guidance for the fire and rescue and reduce the loss of personnel property.

Analysis of Ammonia Leakage Diffusion Model
If a leak occurs in the ammonia pipeline at a location in the factory, leakage of ammonia gas will spread gradually with the turbulent air movement.There is no fixed direction of atmospheric turbulence when the effects of environmental strokes are not taken into account.From a statistical point of view, concentration distribution profile of gas molecules in the environment prents Gaussian distribution [6].Ammonia pipeline rupture, diffusion when the valve is leaking is continuous point source diffusion, the diffusion of the rupture of Ammonia pipeline and the leak of the value continuous point source diffusion, which is in accordance with the conditions of Gaussian diffusion model.Gaussian Smoke Plume Model and Gaussian Anthracite Model are representative of the Gaussian diffusion model, of which Gaussian plume model is mainly used to study the long time continuous discharge [7].More over, the model test data is more, the application mature, the computation is convenient, and has the very high transplantability.Concentration distribution formula of Gaussian plume model ( , , , ) C x y z T is as follows: Among them, (x,y,z) is the current checkpoint coordinates; Q is the leakage source signal strength; T is the gas diffusion time after the occurrence of the leak; H is the effective height of the leakage source; u is the average wind speed of the point; σ y 、σ z is the horizontal and vertical diffusion coefficient Respectively [8].σ y 、σ z can be obtained either by querying relevant local meteorological data or by performing multiple experiments.In the actual environment, the gas diffusion is a very complex process of fluid movement.Although with the development of science and technology, modern high-performance computer has been able to simulate the law of fluid movement [9], the complicated gas diffusion model will obscure the subsequent source position inversion method, so the leakage environment must be specialized.
Through the measurement of the ammonia concentration in the same height in the static wind environment, we can obtain that in the same leak process, the diffusion distance x is an important factor in determining the gas concentration at this point.The closer the distance is, the higher the concentration is.Equal concentration points in the flat are connected by a line to form an approximate concentric circle, where the center of the leak is the source.In order to reduce the difficulty of implementation, this paper properly simplify the process of leak again; Assuming that it is a steady-state gas diffusion process, the intensity of the leak source does not change during the leaking process and the local temperature difference due to the pressure change before and after the gas leakage is neglected.The simplified Gaussian model is as follows: In the formula, Q is the leakage source equivalent signal strength; ' u is the ammonia diffusion parameter in the current environment; x i is the gas diffusion distance; α is the attenuation factor; w i is the additional random noise of ammonia during the diffusion process.The simplified Gaussian model describes mainly the concentration field distribution of the leaked gas after reaching the steady state.The model does not take into account the concentration of gas before the equilibrium state changes with time.This is because the leakage time can not be measured as an unknown change in the process of continuous ammonia leakage, which make it difficult to calculate the leakage source location in an unbalanced state.Figure 1 is the continuous leakage source around the gas concentration trend.As can be seen from the figure, for the same monitoring point, the concentration change is a dynamic process.When the leakage of gas diffuse to a certain point, the gas concentration begin to rise, but the upward trend will gradually slow down, and finally stabilized.In the figure, 1209 the gas concentration is the highest at the monitoring point S4 near the leakage source, the gas concentration at the point S2, which is far from the source of the leak, is the lowest.After waiting for the leakage into the steady state, by using the concentration field difference of different monitoring points, we can calculate the leakage source location.

Study on the Location Method of Industrial Ammonia Leakage Source
The goal of industrial ammonia leak detection is to provide an early warning signal within a short period of time after a leak, and quickly find the source of the leak, so that firefighters can deal with accidents and rescue personnel for the first time.
In this paper, in order to make full use of the gas concentration difference in the leakage area, a weighted centroid location algorithm based on gas diffusion model is proposed [10].The general centroid algorithm only reflects the connectivity of the wireless network and does not consider the influence of the distance between the leak source and the detection node on the gas concentration.In the same detection node under the alarm system, the greater the concentration of gas means that the point from the leakage source closer to the coordinates of the positioning results should also be greater [11].Using the influencial factor θ to reflect the weight of the monitoring node in the centroid location, the calculation formula is as follows: d i is the distance between the i th detection node and the leakage source.Take the influencial factor θ i into the formula of polygon centroid coordinates can calculate the location of the leakage source: Expand Equation ( 4) to expand and simple processing: Propagation distance d i can not be directly obtained.After ignoring the influence of noise in the diffusion process, according to the industrial ammonia leakage model, the gas concentration C(d i ) and the distance d i satisfy the following conditions: Substituting Equation (6) into Equation (5).After the simplification, we can get the weighting centroid calculation formula of the leakage source coordinates after considering the distance weight: Although the method is still limited by the distribution density of detection nodes, it make full use of the leak site gas concentration information.Subsequently, error coefficient can also be used to correct the initial results to improve positioning accuracy.

Monitoring and Location System Design
Monitoring and positioning system consists of monitoring nodes, network coordinator and host computer.The detection node is placed at a height substantially coinciding with the center line of the liquid ammonia pipe.It uses Proof anti-corrosion shell design outside the node, and includes data acquisition unit and wireless communication unit inside.The data acquisition unit is composed of a gas sensor, a signal conditioning circuit, a microcontroller system and an infrared receiver.The wireless communication unit adopts the ZigBee module design, and connects with the data acquisition unit through the serial port.Data acquisition unit uses lithium battery-powered, low power consumption requirements, and the working status is indicated by the three-tone breathing light.The system uses the NH3-3E-500-SE electrochemical gas sensor produced by United Kingdom City Corporation.It has three internal electrodes: the sensing electrode, the reference electrode and the counter electrode.Its output current signal is very weak, thus a high-gain signal conditioning circuit must be designed for conversion and amplification.The electrochemical sensor's sensing electrode and counter electrode form an electrical circuit, an access signal conditioning circuit and a reference electrode external constant potential holding circuit.
According to the needs of ammonia leakage, this paper selects the point-to-point network topology, Figure 2 shows the communication network architecture.It uses a high redundant architecture scheme, any two nodes can communicate, and the network provides multiple data transmission channels.In the ammonia detection wireless sensor network, the coordinator is responsible for establishing Zigbee network.After detecting the network, the node sends the collected ammonia concentration information to the network coordinator in multi-hop mode.Each node has multiple communication paths to choose from.Even if there is some damage to the system, it will not affect the communication of other nodes.The network coordinator is made up of ZigBee wireless communication module and Display alarm device composition, installing in the center of the site generally, and responsible for collecting the information of the detecting node and transmitting it to the host computer.The network coordinator and the detecting node wirelessly communicate through the ZigBee network, communites with the host computer serially through the RS-485 interface, and it is necessary to maintain the communication state uninterruptedly.The coordinator is a network data aggregation point, the power consumption is high so it requires an additional power supply for power.Coordinator LCD screen can display real-time status information of each node in the network, when the ammonia concentration of the area exceeds the safety limit, the coordinator will sound and light alarm.
PC is the industrial computer installed in the monitoring room, which establish a remote communication connection to display the entire monitoring network information and data through the network coordinator.When the leakage occurs, the host computer can also calculate the data in the wireless sensor network according to the industrial ammonia leakage source location algorithm, and estimate the detailed coordinates of the accident place, guide the rescue personnel to complete the accident in time.Figure 3 is a general plan view of the system.

Composition of monitoring and positioning system
After power-on, each module enters the initialization state, the PIC18FK22 microcontroller in the detection node and the network coordinator resets each module, the CC2530 chip in wireless communication module configuration ZigBee network, and PC refresh monitoring interface.After the initialization of each module is successful, the whole system enters the working state.The detection node starts the information collection, and the collected information includes the ammonia concentration in the environment and the battery power information.The PIC18FK22 internal A/D converts the analog voltage and battery voltage of the sensor front-end circuitry to digital signals.When the battery voltage is in the normal range, the detection node will send the ammonia concentration value to the network coordinator, otherwise the node will enter the sleep state.The CC2530 chip in ZigBee wireless communication modulerunning Z-stack protocol stack, and it gathers the data to the network coordinator by means of task polling, then carries on the preliminary processing and the demonstration, and synchronous transmission to the host computer.The host computer receives the information of the network coordinator according to the Modbus communication protocol through the serial port and realizes the trend of the gas concentration in each area through the monitoring interface to calculate the position of the leakage source and provide guidance for the rescue and rescue of the accident.
The ammonia leak alarm system host computer interface is shown in Figure 4.The window on the left side of the interface shows the waveform, you can observe the gas concentration trends.The window on the right side of the interface shows a three-dimensional coordinate plot that shows the concentration distribution of the sensing nodes in space.The lower left corner of the front panel is the configuration window of the alarm system.All the data will be automatically saved in the form of statements in the default path, ready to access.

System Test Experiment and Result Analysis 5.1. Measurement of Ammonia Concentration
The test gas is a mixture of the ultra-pure ammonia and clean dry air, which can be configured to different concentrations of ammonia according to the needs.Take the two nodes which had been completed calibrated into the colorless and transparent test box, and then connect the network coordinator, the coordinator LCD starts to display the ammonia concentration information of each node, and the initial concentration value for the non-vented condition is displayed as zero.Inject the test mixture into the chamber after the system is preheated and stabilized.And record the value displayed on the network coordinator's LCD screen when the concentration information transmitted from the detecting node by the radio module is stabilized.Open the ventilation pump to the chamber for ventilation after each experiment, and wait for the detection node to return to zero to start the next experiment.Tests were carried out at five concentration points of 25 ppm, 50 ppm, 100 ppm, 250 ppm and 400 ppm follow the steps above, record the value of each test point.The above experiments were repeated three times, take the arithmetic mean as the value on show by instrument of the test node.The experimental results are shown in Table 1.The relative indication error is the percentage of the difference between the average value and the standard value of the instrument of the standard concentration of the test gas [12].According to the "ammonia detection alarm technical specifications" requirements, diffusion detection alarm in the test environment that temperature 0 ~ 40℃, relative humidity less than 85%, good ventilation, no other interference factors, the indication error shall not exceed ± 5% of full scale.It can be seen from the table that relative error of the detection node is less than 5% error, which is in line with the provisions of the national ammonia measurement standards.

Simulation Experiment of Leakage Source
Leakage source simulation test is the location of the location accuracy of ammonia leakage source point test.A length of 12 meters, 10 meters wide, 4 meters high, empty room was selected as the simulation warehouse for the positioning experiment.Taking into plant ammonia pipeline has been arranged in a certain height in the industrial production, when the leak height fluctuates up and down, the axis of the pipe has an error of ± R(R is the pipe radius).The sensor detection nodes are arranged at the same height of the ammonia diffusion leak point, then according to the simplified planar Gaussian model, the detection point and the network coordinator are placed at the same point in the same height plane at 5 points of the Xshaped distribution.In a certain position within the room we place a high concentration of ammonia containing a beaker, when the beaker above the open, the ammonia will continue to volatilize ammonia to the surrounding space, and based on which we simulate the ammonia continuous leakage accident.Before the experiment, the plane coordinate system was determined according to the room size, and the position information of the detection node was inputted to the upper computer.Remove the protective cover of the beaker, wait for the number of detection node showing stablely, the host computer calculate the location of the leak source, and then record the estimated coordinates and beaker actual coordinates.After the end of the experiment, take away the beaker containing ammonia, open the room ventilation fans, wait for the upper count to resume, and then change the position to restart the experiment.The above experiment is repeated five times, and the positioning error is calculated according to the distance between the positioning result of the host computer and the actual leakage source.The positioning error is obtained by the following formula: In the formula, (x,y) is the positioning of the host computer results, (x0,y0) is the actual coordinate of the source of the leak,k is the number of experiments.The leakage source localization experiment results are shown in Table 2. Positioning error is an important indicator of system positioning accuracy, substituting the above data into Equation (8), we can calculate the positioning error of the system is about 1.4 meters.But the positioning error is absolute error, can not be expressed under different monitoring area of the positioning accuracy, so it is also necessary to calculate the relative positioning error.The relative positioning error is the percentage of the positioning error to the average side length of the monitoring area.The expression is: In the formula, D is the average length of the test site.The relative positioning error of the system is 12.7% when five detection nodes are uniformly arranged.Further simulation analysis shows that the relative positioning error of the leakage source localization algorithm tends to increase with the monitoring area becoming larger, but improving the system's detection node density can reduce the positioning error, when the uniform distribution detection nodes is more than 6, the positioning error tends to be stable, and can be controlled within 5%.Therefore, it is possible to remarkably improve the positioning accuracy by densely arranging the detection nodes in a place where the ammonia gas is liable to leak. 1) The ammonia diffusion model suitable for the location of leakage source is simplified, and the technology of ranging location used in wireless network is studied.Finally, based on the ammonia diffusion model, the data processing model of the leakage source coordinate based on the gas concentration is deduced, the real-time monitoring of ammonia concentration was realized by setting up Zigbee wireless sensor network.
2) The simplified model of ammonia diffusion is based on the plane Gaussian model.The data calculation and program complexity are not so large as to be easy to understand and develop.However, the height of the detection node cannot be consistent with the height of the ammonia leakage point, so the positioning error caused by the fire rescue will cause some interference.
3) The simulation results show that, in the static environment, the design of industrial ammonia leak alarm system is running well, which is in line with relevant state standards.However, under the dynamic environment, due to leakage model and positioning algorithm the factors are not comprehensive enough, the effect is not ideal, the adaptation under different environmental conditions need to be further improved.

Figure 1 .
Figure 1.Trend of gas concentration

Figure 2 .
Figure 2. Architecture diagram of communication network

Figure 4 .
Figure 4. Working interface of the host computer Development of Ammonia Gas Leak Detection and Location Method (Ding Xibo)1213

Table 1 .
Test data of ammonia concentration experiment

Table 2 .
The test data of leakage location experiment