Gas cylinder storage leakage point positioning detection method and system
A hexagonal sensor array with adaptive filtering and Kalman filter enhancements addresses the challenge of accurately detecting gas leaks in petrochemical environments, enhancing detection accuracy and reducing costs through LoRa-based wireless communication.
Patent Information
- Application Number
- CN202411293646.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-09-14
AI Technical Summary
Existing gas cylinder leakage detection systems face challenges in accurately locating leaks in petrochemical environments due to complex diffusion patterns influenced by obstructions and wind, and require cost-effective solutions that can monitor large areas in real time without extensive wiring.
A method utilizing a hexagonal sensor array layout with adaptive filtering, continuous wavelet transform, and an improved Kalman filter to enhance detection accuracy, incorporating a gas turbulence diffusion model and window function to account for wind and obstructions, and employing LoRa technology for wireless communication.
The system achieves high-accuracy leak detection and positioning with fewer nodes, reducing costs and complexity, while ensuring timely and reliable monitoring in petrochemical settings.
Smart Images

Figure CN119226786A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of gas source detection and positioning, and in particular to a method and system for positioning and detecting leakage points in gas cylinder storage. Background Art
[0002] Gas cylinders are widely used in industry, medicine, and life, including liquefied petroleum gas, oxygen, nitrogen, etc. However, gas cylinder leakage may cause gas leakage accidents, posing a threat to people's lives and property safety, so it is necessary to carry out research on leakage point positioning systems. Researching a gas cylinder leakage point positioning system can improve the safety and reliability of gas cylinders. By real-time monitoring of gas cylinder leakage and timely and accurate positioning of leakage points, emergency measures can be taken quickly to avoid accidents or reduce the losses of accidents. Through remote monitoring and automatic alarm functions, abnormal conditions of gas cylinders can be discovered in time and early warnings can be issued, which is conducive to strengthening the management and maintenance of gas cylinders and improving work efficiency and resource utilization. Therefore, the research on gas cylinder storage leakage point positioning system can not only protect people's lives and property safety, but also improve the safety, reliability and management efficiency of gas cylinders, which has important social and economic significance.
[0003] In the past, the online monitoring system for locating hazardous gas leaks usually used cables to achieve data transmission between monitoring nodes, and arranged each node in a certain way within the monitoring area, and transmitted the data of each node to the PC host computer through cables, and finally completed the processing of monitoring data on the PC. However, due to the requirement of prohibiting wiring at petrochemical sites, a new type of data transmission network is needed to be proposed in order to be applied in gas cylinder storage warehouses. With the development of wireless sensors, wireless sensor communication technologies such as Bluetooth, WiFi, 4G, 5G, ZigBee, NBIOS, and LoRa have emerged. Considering that LoRa technology can achieve long-distance data transmission, it is very beneficial for factories or facilities with wide coverage.
[0004] LoRa technology has strong anti-interference ability and can stably transmit data in complex electromagnetic environments, which is crucial for monitoring systems in industrial environments. Compared with other communication technologies, the cost of LoRa modules is relatively low, which makes it more suitable for large-scale deployment and application in cost-sensitive projects. LoRa technology can build a simple star or mesh topology network without complex infrastructure, reducing the cost and complexity of network construction.
[0005] Traditional handheld gas detectors, although highly flexible and can be used in different locations, rely on the accuracy and attention of the operator, may have false alarms or missed alarms, and cannot monitor a large area in real time, requiring personnel to move to possible leak points for detection. Although the deployment of a gas detection instrument network can monitor a large area in real time, it requires the deployment of a large number of sensors, which is costly. The deployment of a sensor array can monitor the gas in real time and locate it, and the layout is simple. In the gas cylinder storage plant, there are often obstructions that will change the direction of gas diffusion, and the establishment of the gas model does not take into account the change in diffusion direction caused by the obstructions.
[0006] Therefore, there is an urgent need to design an online monitoring system for locating hazardous gas leaks that can be applied to the petrochemical field to improve the system detection accuracy while ensuring safety. Summary of the invention
[0007] Purpose of the invention: In view of the problems pointed out in the background technology, the present invention provides a method for locating and detecting leakage points in gas cylinder storage, introduces a sensor array with a hexagonal layout to achieve leakage detection and positioning, and introduces a window function of relevant time points into the Kalman filter to effectively improve the detection accuracy.
[0008] Technical solution: The present invention discloses a method for locating and detecting leakage points of gas cylinder storage, comprising the following steps:
[0009] Step 1: Construct a gas cylinder leakage model in windless and windy conditions, use a gas turbulence diffusion model to simulate the leakage process, determine the gas sensor node layout, and introduce a sensor array to detect gas leakage points;
[0010] Step 2: Introduce the adaptive filtering algorithm AF to remove noise from the data detected by the sensor array;
[0011] Step 3: Use continuous wavelet transform (CWT) and modulus maximum method to extract the time difference information hidden in the gas sensor signal, determine the best leak point location, and obtain the positioning information at a certain time point;
[0012] Step 4: Based on the Kalman filter algorithm, a window function is introduced. The improved Kalman filter algorithm is used to process multiple sets of positioning information at different time points, filter out invalid measurement signal interference that is not within the range of the window function, and estimate the best positioning point.
[0013] 2. A method for locating and detecting leakage points in gas cylinder storage according to claim 1, characterized in that the gas cylinder leakage model in step 1 when there is no wind and when there is wind is specifically as follows:
[0014] S11: Without considering the influence of wind speed and wind direction on the model, the gas turbulence diffusion model in windless conditions is based on Fick's diffusion theorem to express the diffusion equation. Then, an error compensation function is introduced to consider the influence of the distance between the gas source point and the monitoring point on the concentration. When the equilibrium state is reached, the diffusion equation in windless conditions is obtained.
[0015] S12: Considering the influence of wind speed and wind direction on gas leakage, a gas source point is set to simulate the continuous diffusion along the wind speed direction. The model under windy conditions is also based on Fick's diffusion theorem, but the influence of wind is taken into account. The gas diffusion direction is adjusted to be opposite to the wind direction, and the concentration at the leakage point is used as the gas source strength. The diffusion equation under windy conditions is derived. When the equilibrium state is reached, the diffusion equation under windy conditions is obtained.
[0016] Furthermore, the gas cylinder leakage model without wind in S11 is specifically as follows:
[0017] According to Fick's diffusion theorem, the gas flux of the diffusing gas passing through a single cross section perpendicular to the diffusion direction per unit time is proportional to the concentration gradient at the cross section. At the same time, the propagation direction of the gas diffusion is opposite to the direction of the concentration gradient, so the expression can be obtained:
[0018]
[0019] Where C is the concentration of the sensor node at point (x, y, z) at time t; k represents the gas diffusion coefficient; represents the gas flux;
[0020] Diffusion equation in the absence of wind:
[0021]
[0022] Assuming the gas source coordinates are (x0, y0, z0), and starting from time t0, it spreads around at a certain mass diffusion rate, i.e., the gas source intensity Q, we get:
[0023]
[0024] in, represents the error compensation function; d is the Euclidean distance from (x, y, z) to the source point (x0, y0, z0). When t→+∞, the equilibrium state is reached and the formula is converted to:
[0025] Furthermore, the gas cylinder leakage model with wind in S12 is specifically as follows:
[0026] The gas diffusion equation under wind conditions can be transformed into:
[0027]
[0028] Where, u is the wind speed;
[0029] The concentration at the leakage point is the largest, which is regarded as the gas source strength, and its diffusion equation is derived:
[0030]
[0031] in, x=(x-x0)cosθ+(y-y0)sinθ, θ is the wind direction angle;
[0032] When t→+∞, the equilibrium state is reached, and the formula is converted to:
[0033]
[0034] In the actual environment, the influence of noise on the concentration value is added, and the model formula is changed to:
[0035]
[0036] When u = 0, the relationship between distance and concentration is: N i Represents the impact of noise.
[0037] Furthermore, the gas sensor node layout in step 1 is specifically as follows:
[0038] Each sensor array network node is designed using an MCU, a gas sensor array, a wind speed and direction sensor, and a lora wireless sensor. The gas sensor array is arranged in a hexagonal honeycomb layout.
[0039] Furthermore, in step 2, an adaptive filtering algorithm AF is introduced to remove noise from the data detected by the sensor array, and the process is as follows:
[0040] 1) Initialize the filter coefficient vector w(0) to a zero vector, step size parameter μ, and delay parameter D;
[0041] 2) Obtain gas concentration data from the sensor array through the MCU's internal ADC;
[0042] 3) Put the acquired sensor array data into the filter and calculate the filter output: y(k) = w T (k)x(kD), where k is the current discrete time point and x(kD) is the delayed version of the noisy signal;
[0043] 4) Calculate the estimated error e(k) = x(k) - y(k), where x(k) is the current noisy signal;
[0044] 5) Update the filter coefficient w(k+1)=w(k)+μe(k)x(kD);
[0045] 6) To adjust the step size parameter μ according to the size of the acquired ADC data, if the ADC data is large, increase the value of μ to improve the response speed;
[0046] 7) Repeat steps 2)-6).
[0047] Furthermore, the step 3 uses continuous wavelet transform CWT and modulus maximum method to extract the time difference information hidden in the gas sensor signal. The specific process is as follows:
[0048] 1) Inputting the signal after the adaptive filtering in step 2 into a time difference information extractor based on wavelet transform, wherein the signal is time series data of gas concentration changing with time;
[0049] 2) Select Daubechies wavelet as the wavelet basis function;
[0050] 3) Perform convolution operation on the adaptively filtered signal;
[0051] 4) Remove low-frequency components and retain high-frequency components to extract the spectral features of the signal at different scales and positions;
[0052] 5) For each scale and position of the wavelet coefficient, calculate its modulus, i.e., amplitude. The modulus represents the energy or intensity of the signal at the corresponding scale and position;
[0053] 6) Find the maximum modulus: For each scale, find the maximum modulus and save it. The maximum modulus corresponds to the main energy concentration point of the signal at different scales.
[0054] 7) Time difference information extraction: For each gas sensor in the sensor array, the maximum value of the modulus at different scales is extracted, and its position on the time axis is observed. By comparing or interpolating the time position of the maximum value of the modulus, the time difference information of different sensors passing through a modulus is estimated.
[0055] Furthermore, the specific process of determining the optimal leakage point position in step 3 is as follows:
[0056] After extracting the time difference information of the same modulus between the two gas sensors, it is known that under windless conditions, the gas concentration is inversely proportional to the distance between the monitoring node and the leakage point. The direction of gas leakage is determined by the concentration change detected by the sensor array. The distance ratio between each sensor in the sensor array is:
[0057]
[0058] Among them, d1 is the distance from the first node of the sensor array to the leak point, d2 is the distance from the second node of the sensor array to the leak point, and the concentration of each sensor is used to construct the position estimation equation group:
[0059]
[0060] Among them, d1, d2, …d n is the distance from the nth node in the sensor array to the leakage point. The time difference information of t1-t2, t3-t4, and t5-t6 is known. Because the sensor array is distributed equidistantly, as long as the coordinates of one sensor are known, the coordinates of all sensors in the array are known. d2 is represented by d1+x1, d4 is represented by d3+x3, and d6 is represented by d5+x5. By solving the equation group, the optimal leakage estimation point at a certain time can be obtained;
[0061] By calculating the same concentration ratio in the case of wind, the distance ratio between each sensor in the sensor array is obtained as:
[0062]
[0063] Through the simultaneous equations:
[0064]
[0065] Where k is the gas diffusion coefficient, Δx1, Δx2…Δx n The component representing the distance from the nth node of the sensor array to the leakage point in the x-axis direction, the time difference information of t1-t2, t3-t4, t5-t6 in the equation group is known, and solving the equation group can obtain the optimal leakage estimation point at a certain moment.
[0066] Furthermore, the specific process of step 4 is as follows:
[0067] 1) Initialize the state estimation vector x0 is the initial estimated data point, and the covariance matrix is 1;
[0068] 2) Take the optimal solution obtained by the time difference information as the measurement value at the current moment, and use the Kalman filter model formula represents the prior estimate, F k represents the state transfer matrix, B k represents the control matrix, is the optimal estimate at the previous moment, u k is the actual measured estimate at the current moment; the state estimate at the current moment is predicted to obtain the state estimate at the next moment, where the control input gain B is taken k =0;
[0069] 3) Update the optimal Kalman gain P k|k-1 is the state error covariance matrix, H k is the mapping matrix, S k is the observation error covariance matrix, the covariance matrix P k|k =(IK k *H k )*P k|k-1 and the best estimate Among them, the measurement residual is the current measured value, H k In one dimension, it is 1;
[0070] 4) Calculate the window function for the optimal estimate after Kalman filtering. The window function formula is Where n is the discrete time point, N is the fixed time window function width, is the adjustable window function width parameter, The value needs to be adjusted according to the actual site environment and size;
[0071] 5) Continuously repeat the above steps to perform prediction and measurement update steps to estimate the state of the system optimal solution in real time.
[0072] The present invention also discloses a system for a method for locating and detecting leakage points in gas cylinder storage, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the system implements the method for locating and detecting leakage points in gas cylinder storage when the computer program is loaded into the processor.
[0073] Beneficial effects:
[0074] 1. The present invention abandons the traditional sensor network node method and introduces a hexagonal layout sensor array, which can achieve the effect of leak detection and positioning with very few nodes. This method has simple wiring, low cost, and is more suitable for deployment in actual working environments.
[0075] 2. The present invention introduces the window function of the relevant time point into the Kalman filter. Taking into account that there may be obstacles such as walls and pillars in the actual working environment that will reflect the gas, resulting in deviations in the constructed gas model, the positioning information measured at this time point during the gas diffusion process but before encountering obstacles has a higher credibility. The window function can be used to retain the information at this time point well, and the remaining information with less credibility can be filtered, which can effectively improve the positioning accuracy.
[0076] 3. The present invention realizes an online monitoring system for locating dangerous gas leaks based on a wireless sensor array based on the lora module. The designed system is no longer a single form of monitoring system, but two online monitoring systems including an embedded mobile terminal and a PC-side configuration. The system fully considers the integrity and applicability of the system, and brings great convenience to the work of petrochemical maintenance personnel and managers. The AF (adaptive filtering algorithm)-CWT (wavelet transform algorithm)-KF (Kalman filter algorithm) algorithm plays a vital role in the present invention. The AF algorithm is used to filter out the signal noise of each sensor node, the CWT algorithm is used to extract the time difference information of a single time point in the sensor array and estimate a single leakage point, and the KF algorithm is used for continuous time point leakage point signal processing, so as to improve the detection accuracy of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 It is the sensor network layout diagram;
[0078] Figure 2 This is the sensor network structure diagram;
[0079] Figure 3 This is a flow chart of the adaptive filtering algorithm of the present invention;
[0080] Figure 4 A flow chart of extracting time difference information from a sensor signal according to the present invention;
[0081] Figure 5 This is a flow chart of the improved Kalman filter of the present invention;
[0082] Figure 6 This is a flow chart of the signal processing structure of the present invention;
[0083] Figure 7 Block diagram of the embedded system for locating gas cylinder leaks. DETAILED DESCRIPTION
[0084] To make the technical solution of the present invention clearer, the present invention is further described below in conjunction with the accompanying drawings. The present invention is specifically implemented according to the following steps:
[0085] The present invention discloses a gas leakage detection method based on a wireless sensor network, comprising the following steps:
[0086] Step 1: Construct the gas cylinder leakage model and sensor node layout.
[0087] S11: First, construct a gas turbulence diffusion model in the absence of wind, assuming that in an open environment, the gas source diffuses outward with a certain diffusion coefficient. According to Fick's diffusion theorem, the gas flux of the diffused gas passing through a single cross section perpendicular to the diffusion direction per unit time is proportional to the concentration gradient at the cross section position. At the same time, the propagation direction of the gas diffusion is opposite to the direction of the concentration gradient, thus the expression can be obtained:
[0088]
[0089] Where C is the concentration of the sensor node at point (x, y, z) at time t; k represents the gas diffusion coefficient; represents the gas flux. Therefore, the diffusion equation in the absence of wind can be derived:
[0090]
[0091] Assuming the gas source coordinates are (x0, y0, z0), and starting from time t0, it spreads around at a certain mass diffusion rate (i.e., gas source intensity) Q (mg s), we can get:
[0092]
[0093] in, represents the error compensation function; d is the Euclidean distance from (x, y, z) to the source point (x0, y0, z0). When t→+∞, the equilibrium state is reached and the formula is converted to:
[0094] S12: Then, a gas turbulence diffusion model under windy conditions is constructed. The gas diffusion equation under windy conditions can be transformed into:
[0095]
[0096] Where u is the wind speed. The concentration at the leakage point is the largest, which can be regarded as the gas source strength, and its diffusion equation is derived:
[0097] When t→+∞, the equilibrium state is reached, and the formula can be converted to:
[0098]
[0099] Ideally, the measured concentration value is the same as the result of the gas cylinder estimation model, but in the actual environment, the influence of noise on the concentration value needs to be added, so the model formula is changed to:
[0100]
[0101] The above formula can be used to obtain the relationship between distance and concentration when u = 0: Ni Represents the impact of noise.
[0102] S13: The present invention introduces a sensor array to detect gas leakage points. Compared with the sensor network method, it requires fewer nodes, has a simple layout, and is low in cost, making it more suitable for actual application scenarios. Each sensor array network node is designed using MCU + gas sensor array + lora wireless sensor, and the sensor node layout is arranged in a hexagonal honeycomb layout. Compared with the square layout, this layout can save some sensor materials and costs, and has higher positioning accuracy for the positioning method used in the present invention. The larger the hexagonal layout range, the higher the positioning accuracy. The specific layout distribution is as follows: Figure 1 shown.
[0103] In order to achieve the purpose of gas concentration detection, four sensor array nodes are arranged, and wireless communication is required between the nodes, which involves a wireless sensor network, so a suitable networking method needs to be designed. Compared with the detection method of multiple sensor nodes, the present invention requires fewer nodes, so the tree network structure is well suited for this design. Figure 2 shown.
[0104] Step 2: Introduce the adaptive filtering algorithm (AF algorithm) to remove noise. Due to the influence of noise, the signal becomes non-stationary. Therefore, processing the raw data can well improve the accuracy of the leakage point estimation at each time point. The output of the gas sensor may be affected by nonlinear factors, such as temperature changes, humidity changes, etc. Adaptive filters are usually able to handle this nonlinear relationship and make more accurate estimates and corrections to the sensor output. The adaptive filter can dynamically adjust its parameters to adapt to different environmental conditions and noise characteristics. This means that it can automatically adapt to gas sensor noise of different types and intensities without manually adjusting the filter parameters. The adaptive filtering algorithm has self-learning capabilities and can continuously improve its performance based on historical data and feedback information. This means that the filter can be continuously optimized over time to adapt to changes and drifts in sensor output.
[0105] Adaptive filtering steps (structure such as Figure 3 shown):
[0106] 1. Initialization: Initialize the filter parameters, including the filter type, initial parameter values, etc.
[0107] 2. Get sensor data: Get raw data from sensors or other data sources, which usually include signals and noise.
[0108] 3. Estimation model: Based on the acquired raw data, estimate the dynamic model of the system or the characteristics of the signal. This step may include modeling the system, such as by observing the statistical characteristics of the data or using prior knowledge.
[0109] 4. Filtering: Using the estimated model and system characteristics, the raw data is filtered. This includes applying appropriate filtering algorithms to reduce noise and extract the signal components of interest. The parameters of the filter may be adjusted based on real-time data.
[0110] 5. Output results: The filtered data is used as the output of the system for subsequent analysis, control or other applications. The output results will be further used to update the parameters of the filter to continuously optimize the performance of the filter.
[0111] 6. Evaluation and adjustment: Regularly evaluate the performance of the filter and make adjustments as needed. This involves analyzing the accuracy, stability, and real-time performance of the filtered data, and adjusting the filter parameters or selecting different filtering algorithms based on the feedback information.
[0112] The specific filtering process is as follows:
[0113] 2.1) Initialize the filter coefficient vector w(0) to the zero vector, the step size parameter μ, and the delay parameter D.
[0114] 2.2) Obtain gas concentration data from the sensor array through the MCU's internal ADC.
[0115] 2.3) Put the acquired sensor array data into the filter and calculate the filter output: y(k) = w T (k)x(kD), where x(kD) is the delayed version of the noisy signal.
[0116] 2.4) Calculate the estimated error e(k)=x(k)-y(k), where x(k) is the current noisy signal.
[0117] 2.5) Update the filter coefficient w(k+1)=w(k)+μe(k)x(kD).
[0118] 2.6) Adjust the step size parameter μ according to the size of the acquired ADC data. If the ADC data is large, increase the value of μ to improve the response speed.
[0119] 2.7) Repeat the steps from 2.2) to 2.6).
[0120] Considering that the traditional method of deploying sensor network nodes requires too many nodes, and considering that it is very difficult to arrange the power lines required for so many nodes on site, the present invention proposes a method of using a sensor array. Only four sensor array nodes need to be deployed in a room to achieve better leakage monitoring and positioning.
[0121] Step 3: Extract the time difference information from the sensor signal to determine the best leak point location
[0122] Using continuous wavelet transform (CWT) and modulus maximum method to discover the time difference information hidden in the gas sensor signal can be carried out as follows (structure as Figure 4 shown):
[0123] 3.1) Obtaining gas sensor signals: First, collect the raw signal data from the gas sensor. These data may be time series data of gas concentration changing over time. The signal after adaptive filtering in step 2 is input into the time difference information extractor based on wavelet transform. The signal is the time series data of gas concentration changing over time.
[0124] 3.2) Continuous Wavelet Transform (CWT): Perform continuous wavelet transform on the gas sensor signal to extract the spectral features of the signal at different scales and positions, and select Daubechies wavelet as the wavelet basis function. CWT can help find the local frequency components in the signal and capture the characteristics of the signal at different time scales. Perform convolution operation on the adaptively filtered signal to remove the low-frequency components and retain the high-frequency components to extract the spectral features of the signal at different scales and positions.
[0125] 3.3) Calculate the modulus: For each wavelet coefficient at each scale and position, calculate its modulus (amplitude). The modulus represents the energy or strength of the signal at the corresponding scale and position.
[0126] 3.4) Find the maximum modulus: For each scale, find the maximum modulus. These modulus maxima correspond to the main energy concentration points of the signal at different scales.
[0127] 3.5) Time difference information extraction: For the maximum value of the modulus at different scales, observe its position on the time axis. Since the wavelet transform has the characteristics of multi-scale resolution, the position of the maximum value of the modulus on the time axis can provide time difference information about the signal at different scales. By comparing or interpolating the time position of the maximum value of the modulus, the time difference information of the signal at different scales can be estimated.
[0128] It is known that under windless conditions, the gas concentration is inversely proportional to the distance between the monitoring node and the leakage point. The direction of gas leakage is determined by the concentration change detected by the sensor array. The distance ratio between each sensor in the sensor array is:
[0129]
[0130] Where d1 is the distance from the first node of the sensor array to the leak point, d2 is the distance from the second node of the sensor array to the leak point, and the concentration of each sensor is used to construct the position estimation equation group:
[0131]
[0132] where d1, d2, …d n is the distance from the nth node in the sensor array to the leakage point. The time difference information of t1-t2, t3-t4, and t5-t6 is known. Because the sensor array is distributed equidistantly, as long as the coordinates of one sensor are known, the coordinates of all sensors in the array are known. d2 is represented by d1+x1, d4 is represented by d3+x3, and d6 is represented by d5+x5. By solving the equation group, the optimal leakage estimation point at a certain time can be obtained;
[0133] By calculating the same concentration ratio in the case of wind, the distance ratio between each sensor in the sensor array is obtained as:
[0134]
[0135] Through the simultaneous equations:
[0136]
[0137] In the above formula, k represents the gas diffusion coefficient, Δx1, Δx2…Δx n The component representing the distance from the nth node of the sensor array to the leakage point in the x-axis direction, the time difference information of t1-t2, t3-t4, t5-t6 in the equation group is known, and solving the equation group can obtain the optimal leakage estimation point at a certain moment.
[0138] Step 4: Introduce an improved Kalman filter algorithm (KF algorithm) to improve the accuracy of the leakage point prediction value.
[0139] Since the gas cylinders are stored in sheltered areas such as warehouses, they cannot be calculated completely according to the method of an open environment. Therefore, the present invention introduces the concept of confidence. The confidence of the leakage point obtained at different times is different. When the leakage just starts, it can be considered that the gas does not encounter any interference from any obstructions during the leakage process. At this time, it can be approximately considered as the diffusion of an open environment, and the confidence of the leakage point estimation value is relatively high. After the gas encounters an obstruction and rebounds to change the diffusion direction, the confidence of the leakage point estimation value at this time is relatively low.
[0140] Based on the above problems, the present invention introduces a window function on the basis of the Kalman filter algorithm, which can effectively filter out invalid signal interference that is not within the range of the window function, thereby improving accuracy.
[0141] Improved Kalman filter steps (structure as Figure 5 shown):
[0142] 1) Initialize the state estimation vector x0 is the initial estimated data point with a covariance matrix of 1.
[0143] 2) Take the optimal solution obtained by the time difference information as the measurement value at the current moment, and use the Kalman filter model formula represents the prior estimate, F k represents the state transfer matrix, B k represents the control matrix, is the optimal estimate at the previous moment, u k is the actual measured estimate at the current moment; the state estimate at the current moment is predicted to obtain the state estimate at the next moment, where the control input gain B is taken k =0.
[0144] 3) Update the optimal Kalman gain P k|k-1 is the state error covariance matrix, H k is the mapping matrix, S k is the observation error covariance matrix, the covariance matrix P k|k =(IK k *H k )*P k|k-1 and the best estimate Among them, the measurement residual z k is the current measured value, H k In one dimension it is 1.
[0145] 4) Calculate the window function for the optimal estimate after Kalman filtering. The window function formula is Where n is the discrete time point, N is the fixed time window function width, is the adjustable window function width parameter, The value needs to be adjusted according to the actual site environment and size.
[0146] 5) Continuously repeat the above steps to perform prediction and measurement update steps to estimate the state of the system optimal solution in real time.
[0147] Step 5: Build the Embedded System
[0148] The basic embedded system technology solution is shown in the figure. Each sensor node adopts the solution of MCU+LoRa wireless communication+gas sensor array. Each node can join the sensor network through automatic networking. The sensor network networking adopts a tree network topology. After the information collected by all nodes is transmitted to the MPU chip through the wireless network, the information is processed in real time to calculate the coordinate estimation value of the leakage point. The specific signal processing process is as follows Figure 6 Considering that in order to facilitate the staff to monitor the node information, it is necessary to connect the display screen to the MPU chip and design a UI interface for intuitive viewing. The specific structure is as follows Figure 7 As shown, Figure 7 Four of the MPU chips are connected to four sensor arrays, which are used to collect gas information for positioning. Four MCU chips are used to collect information for positioning. The middle MCU chip is connected to the wind direction and wind speed sensors, which are just separated to make it more convenient for practical layout. Because the wind direction and wind speed sensors are relatively large. When monitoring leaks, in order to enable staff to receive leak alarm information in a timely manner, the leak point information is sent to the cloud server, so that the leak point information can be warned through the mobile app, so that the staff can find the leak point in a timely and accurate manner, and can quickly carry out corresponding safety processing to avoid irreparable accidents.
[0149] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for locating and detecting leakage points in gas cylinder storage, characterized in that: The steps include: Step 1: Construct a gas cylinder leakage model in windless and windy conditions, use a gas turbulence diffusion model to simulate the leakage process, determine the gas sensor node layout, and introduce a sensor array to detect gas leakage points; Step 2: Introduce the adaptive filtering algorithm AF to remove noise from the data detected by the sensor array; Step 3: Use continuous wavelet transform (CWT) and modulus maximum method to extract the time difference information hidden in the gas sensor signal, determine the best leak point location, and obtain the positioning information at a certain time point; Step 4: Based on the Kalman filter algorithm, a window function is introduced. The improved Kalman filter algorithm is used to process multiple sets of positioning information at different time points, filter out invalid measurement signal interference that is not within the range of the window function, and estimate the best positioning point.
2. A method for locating and detecting leakage points in gas cylinder storage according to claim 1, characterized in that: The specific gas cylinder leakage models in step 1 when there is no wind and when there is wind are as follows: S11: Without considering the influence of wind speed and wind direction on the model, the gas turbulence diffusion model in windless conditions is based on Fick's diffusion theorem to express the diffusion equation. Then, an error compensation function is introduced to consider the influence of the distance between the gas source point and the monitoring point on the concentration. When the equilibrium state is reached, the diffusion equation in windless conditions is obtained. S12: Considering the influence of wind speed and wind direction on gas leakage, a gas source point is set to simulate the continuous diffusion along the wind speed direction. The model under windy conditions is also based on Fick's diffusion theorem, but the influence of wind is taken into account. The gas diffusion direction is adjusted to be opposite to the wind direction, and the concentration at the leakage point is used as the gas source strength. The diffusion equation under windy conditions is derived. When the equilibrium state is reached, the diffusion equation under windy conditions is obtained.
3. A method for locating and detecting leakage points in gas cylinder storage according to claim 2, characterized in that: The specific model of gas cylinder leakage without wind in S11 is as follows: According to Fick's diffusion theorem, the gas flux of the diffusing gas passing through a single cross section perpendicular to the diffusion direction per unit time is proportional to the concentration gradient at the cross section. At the same time, the propagation direction of the gas diffusion is opposite to the direction of the concentration gradient, so the expression can be obtained: Where C is the concentration of the sensor node at point (x, y, z) at time t; k represents the gas diffusion coefficient; represents the gas flux; Diffusion equation in the absence of wind: Assuming the gas source coordinates are (x0, y0, z0), and starting from time t0, it spreads around at a certain mass diffusion rate, i.e., the gas source intensity Q, we get: in, represents the error compensation function; d is the Euclidean distance from (x, y, z) to the source point (x0, y0, z0). When t→+∞, the equilibrium state is reached and the formula is converted to:
4. A method for locating and detecting leakage points in gas cylinder storage according to claim 3, characterized in that: The specific model of gas cylinder leakage in windy S12 is as follows: The gas diffusion equation under wind conditions can be transformed into: Where, u is the wind speed; The concentration at the leakage point is the largest, which is regarded as the gas source strength, and its diffusion equation is derived: in, Δx=(x-x0)cosθ+(y-y0)sinθ, θ is the wind direction angle; When t→+∞, the equilibrium state is reached, and the formula is converted to: In the actual environment, the influence of noise on the concentration value is added, and the model formula is changed to: When u = 0, the relationship between distance and concentration is: N i Represents the impact of noise.
5. A method for locating and detecting leakage points in gas cylinder storage according to claim 1, characterized in that: The specific layout of the gas sensor nodes in step 1 is as follows: Each sensor array network node is designed using an MCU, a gas sensor array, a wind speed and direction sensor, and a lora wireless sensor. The gas sensor array is arranged in a hexagonal honeycomb layout.
6. A method for locating and detecting leakage points in gas cylinder storage according to claim 1, characterized in that: In step 2, an adaptive filtering algorithm AF is introduced to remove noise from the data detected by the sensor array. The process is as follows: 1) Initialize the filter coefficient vector w(0) to a zero vector, step size parameter μ, and delay parameter D; 2) Obtain gas concentration data from the sensor array through the MCU's internal ADC; 3) Put the acquired sensor array data into the filter and calculate the filter output: y(k) = w T (k)x(kD), where k is the current discrete time point and x(kD) is the delayed version of the noisy signal; 4) Calculate the estimated error e(k) = x(k) - y(k), where x(k) is the current noisy signal; 5) Update the filter coefficient w(k+1)=w(k)+μe(k)x(kD); 6) To adjust the step size parameter μ according to the size of the acquired ADC data, if the ADC data is large, increase the value of μ to improve the response speed; 7) Repeat steps 2)-6).
7. A method for locating and detecting leakage points in gas cylinder storage according to claim 1, characterized in that: The step 3 uses continuous wavelet transform CWT and modulus maximum method to extract the time difference information hidden in the gas sensor signal. The specific process is as follows: 1) Inputting the signal after the adaptive filtering in step 2 into a time difference information extractor based on wavelet transform, wherein the signal is time series data of gas concentration changing with time; 2) Select Daubechies wavelet as the wavelet basis function; 3) Perform convolution operation on the adaptively filtered signal; 4) Remove low-frequency components and retain high-frequency components to extract the spectral features of the signal at different scales and positions; 5) For each scale and position of the wavelet coefficient, calculate its modulus, i.e., amplitude. The modulus represents the energy or intensity of the signal at the corresponding scale and position; 6) Find the maximum modulus: For each scale, find the maximum modulus and save it. The maximum modulus corresponds to the main energy concentration point of the signal at different scales. 7) Time difference information extraction: For each gas sensor in the sensor array, the maximum value of the modulus at different scales is extracted, and its position on the time axis is observed. By comparing or interpolating the time position of the maximum value of the modulus, the time difference information of different sensors passing through a modulus is estimated.
8. A method for locating and detecting leakage points in gas cylinder storage according to claim 7, characterized in that: The specific process of determining the optimal leakage point position in step 3 is as follows: After extracting the time difference information of the same modulus between the two gas sensors, it is known that under windless conditions, the gas concentration is inversely proportional to the distance between the monitoring node and the leakage point. The direction of gas leakage is determined by the concentration change detected by the sensor array. The distance ratio between each sensor in the sensor array is: Among them, d1 is the distance from the first node of the sensor array to the leak point, d2 is the distance from the second node of the sensor array to the leak point, and the concentration of each sensor is used to construct the position estimation equation group: Among them, d1, d2, …d n is the distance from the nth node in the sensor array to the leakage point. The time difference information of t1-t2, t3-t4, and t5-t6 is known. Because the sensor array is distributed equidistantly, as long as the coordinates of one sensor are known, the coordinates of all sensors in the array are known. d2 is represented by d1+x1, d4 is represented by d3+x3, and d6 is represented by d5+x5. By solving the equation group, the optimal leakage estimation point at a certain time can be obtained; By calculating the same concentration ratio in the case of wind, the distance ratio between each sensor in the sensor array is obtained as: Through the simultaneous equations: Where k is the gas diffusion coefficient, Δx1, Δx2…Δx n The component representing the distance from the nth node of the sensor array to the leakage point in the x-axis direction, the time difference information of t1-t2, t3-t4, t5-t6 in the equation group is known, and solving the equation group can obtain the optimal leakage estimation point at a certain moment.
9. A method for locating and detecting leakage points in gas cylinder storage according to claim 1, characterized in that: The specific process of step 4 is as follows: 1) Initialize the state estimation vector x0 is the initial estimated data point, and the covariance matrix is 1; 2) Take the optimal solution obtained by the time difference information as the measurement value at the current moment, and use the Kalman filter model formula represents the prior estimate, F k represents the state transfer matrix, B k represents the control matrix, is the optimal estimate at the previous moment, u k is the actual measured estimate at the current moment; the state estimate at the current moment is predicted to obtain the state estimate at the next moment, where the control input gain B is taken k =0; 3) Update the optimal Kalman gain P k|k-1 is the state error covariance matrix, H k is the mapping matrix, S k is the observation error covariance matrix, the covariance matrix P k|k =(IK k *H k )*P k|k-1 and the best estimate Among them, the measurement residual is the current measured value, H k In one dimension, it is 1; 4) Calculate the window function for the optimal estimate after Kalman filtering. The window function formula is Where n is the discrete time point, N is the fixed time window function width, is the adjustable window function width parameter, The value needs to be adjusted according to the actual site environment and size; 5) Continuously repeat the above steps to perform prediction and measurement update steps to estimate the state of the system optimal solution in real time.
10. A system based on the method for locating and detecting gas cylinder storage leakage points according to any one of claims 1 to 9, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, the method for locating and detecting a gas cylinder storage leakage point as described in any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Flow channel monitoring method and system of shared juice platform and readable storage medium
CN112528754A
Ship target imaging method and system by inverse synthetic aperture radar
CN113589284A
Doppler frequency shift synchronization method based on four-dimensional track prediction
CN114884790A
Gas positioning method based on marine predator algorithm and particle filter algorithm
CN118014001A
Coal mine underground production environment monitoring node positioning method
CN118042593A
Cited By
Hazardous chemical storage leakage positioning and tracing method based on gas array
CN120217113A
Combustible and toxic gas monitoring method and system
CN120255344A
Positioning optimization method and system for leakage noise of water supply network and medium
CN120740040A
Method, system and medium for positioning optimization of water supply network leakage noise
CN120740040B
