Intelligent multi-gas data detection system and method based on NDIR technology
By arranging sensor networks in the petrochemical environment and building a gas concentration detection model, the problem of gas detection systems being susceptible to interfering gases in the prior art is solved, more accurate leakage risk identification and timely response are achieved, and production safety and environmental protection levels are improved.
Patent Information
- Application Number
- CN202510215632.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing gas detection system based on NDIR technology is susceptible to interfering gases in the petrochemical environment, resulting in misjudgment and false alarms, which in turn affects production safety and environmental protection.
By arranging the sensor network, gas concentration and environmental data are collected, multi-dimensional features are extracted and historical databases are constructed. Based on the hybrid model of LSTM and SVM, a gas concentration detection model is constructed to determine whether there is leakage risk in real time, and the credibility level is divided through similarity scores, and a hierarchical warning is set.
It improves the accuracy of gas leakage detection, can more accurately identify leakage risks, reduce false alarms and missed reports, timely identify new leakage situations, and reduce resource waste and manual inspection costs.
Smart Images

Figure CN120145168A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gas detection, and specifically to an intelligent multi-gas data detection system and method based on the NDIR technology. Background Art
[0002] The gas detection method based on the non-dispersive infrared (NDIR) technology has been widely applied in many fields such as environmental monitoring, industrial safety, and medical diagnosis due to its high sensitivity and high-precision detection ability for specific gases. It mainly emits infrared light with a specific wavelength to penetrate the gas, utilizes the absorption characteristics of gas molecules for infrared light to cause light intensity attenuation, and then through a detector and a complex signal processing process, accurately determines the gas concentration based on the pre-stored gas spectral information and the relationship between concentration and light intensity attenuation; during the normal detection process, once the concentration of a specific gas is detected to increase abnormally and reach or exceed the preset safety threshold, the system will immediately trigger a leakage alarm and attempt to determine the specific location of the leakage source through the built-in positioning algorithm, so as to take timely countermeasures to prevent the situation from expanding.
[0003] However, in the prior art, due to the extremely complex petrochemical environment with diverse and variable gas components and a large number of interfering gases that may interfere with the detection, these interfering gases may have similar absorption characteristics for infrared light, resulting in misjudgment by the detection system, mistaking the concentration change of non-target gases for the leakage of target gases, thereby triggering false alarms and positioning. Such misjudgment not only wastes emergency resources but also may mislead operators, causing the real leakage incident to not be dealt with in a timely manner, posing a serious threat to production safety and environmental protection. Summary of the Invention
[0004] The purpose of the present invention is to provide an intelligent multi-gas data detection system and method based on the NDIR technology to solve the problems raised in the above background art.
[0005] To solve the above technical problems, the present invention provides the following technical solution: An intelligent multi-gas data detection method based on the NDIR technology, the method comprising:
[0006] Step S100: Arrange a sensor network in the petrochemical area, collect gas concentration and environmental data, and extract multi-dimensional features after preprocessing to construct a historical database;
[0007] Step S200: Construct a gas concentration detection model based on historical data, collect current gas concentration data and environmental data in real time, and after feature extraction, input them into the gas detection model for prediction to determine whether there is a leakage risk;
[0008] Step S300: According to the output result of the gas detection model, for the real-time feature data with leakage risk, relevant historical feature data are screened from the historical database according to the gas type and concentration range, and the similarity score with the real-time feature is calculated.
[0009] Step S400: Based on the similarity score, the credibility levels are divided, and graded warnings are set for different credibility levels.
[0010] Further, the step S100 includes:
[0011] Step S101: According to the equipment distribution in the petrochemical area and the historical leakage risk data, a sensor network including NDIR sensors, temperature sensors, humidity sensors, barometric pressure sensors, and wind direction sensors is arranged around each equipment and at pipeline valves, joints, and elbows. The set of sensor positions is represented as S = {s 1 , s 2 ,..., s n}, where s n represents the three-dimensional coordinates (x n , y n , z n ) of the nth sensor; the NDIR sensor is used to collect the concentrations of multiple target gases, denoted as C(t) = [C 1 (t), C 2 (t),..., C m (t)], where t represents the collection time point, and C m (t) represents the concentration of the mth gas at time t; the environmental sensors are used to collect the temperature T(t), humidity H(t), barometric pressure P(t), and wind direction and speed vector W(t) = [W x (t), W y (t), W z (t)], where W x (t), W y (t), and W z (t) respectively represent the x, y, and z-axis components of the wind direction and speed in three-dimensional space.
[0012] Step S102: An adaptive filtering algorithm is used to process the gas concentration data to remove noise interference. The filtered gas concentration is denoted as Cl(t); gas concentration features are extracted from the processed gas concentration data, including the concentration change rate, concentration gradient, and concentration peak. The concentration change rate is obtained by calculating the change rate of the gas per unit time, ΔC(t) = [ΔC 1 (t), ΔC 2 (t),..., ΔC m (t)], where ΔC m (t) = (Cm (t + Δt) - C m (t)) / Δt, where Δt represents the time interval and ΔC m (t) represents the concentration change rate of the m-th gas at time t, and C m (t + Δt) represents the concentration change rate of the m-th gas at time t + Δt; the concentration gradient C N (t) is calculated based on the gas concentration difference between adjacent sensors; the concentration peak is found by traversing the time series data of the gas concentration, and the largest concentration maximum is recorded as the peak C peak , and the time when it appears is recorded as t peak ;
[0013] Step S103: Set threshold ranges for environmental data respectively. When the collected environmental data exceeds the threshold range, it is regarded as abnormal data; for abnormal data, the weighted average method is used for correction in combination with the normal data collected in adjacent time periods; construct environmental correlation features, including the correlation between temperature and gas diffusion, through the formula D(T) = D 0 ×(T / T 0 ), 1.75 , where D(T) represents the gas diffusion coefficient at temperature T, D 0 and T 0 are the set reference diffusion coefficient and temperature; the correlation between humidity and gas absorption, and the influence coefficient α(H) of humidity on gas is obtained by fitting historical data; the correlation between wind direction and wind speed and the concentration gradient is obtained by calculating the dot product of the wind direction and wind speed vector and the concentration gradient W(t)·
[0014] C N (t);
[0015] Step S104: Construct a historical database, and store the extracted feature vectors:
[0016] F(t) = [ΔC(t), C N (t), C peak , t peak , D(T), α(H), W(t)·C N (t)] together with the corresponding timestamp t, sensor location S, and the label information L indicating whether there is a leak into the historical database, where L = 1 indicates a leak and L = 0 indicates no leak.
[0017] Furthermore, the step S200 includes:
[0018] Step S201: Construct a gas concentration detection model using a hybrid model of long short-term memory network and support vector machine; the input layer receives the feature vector F(t) from the historical database and real-time acquisition, sets multiple LSTM hidden layers, each hidden layer contains a neurons, and screens and updates the input information through the gating mechanism, and the output layer outputs an intermediate feature vector M(t); extract training data from the historical database, use the feature vector F(t) as the input, and the corresponding leakage label information L as the output, and divide the training set, test set, and validation set according to the set ratio; use the stochastic gradient descent method to train the LSTM model. In each training round, calculate the loss function between the intermediate vector feature M(t) output by the LSTM and the label information L, and update the weight parameters of the LSTM through the backpropagation algorithm;
[0019] Step S202: Use the intermediate vector M(t) output by the LSTM as the input, train the SVM using the training set data, select appropriate SVM parameters through the cross-validation method, use the radial basis function as the kernel function, and finally output the leakage risk level R. R = 0 indicates no leakage risk, and R = 1 indicates the existence of leakage risk;
[0020] Step S203: In the same way as in step 101, use the NDIR sensor and environmental sensor to collect the current gas concentration data and environmental data in real time; perform the same preprocessing operations on the real-time collected data as in steps S102 and S103, and extract the real-time feature vector F real (t) and input it into the trained hybrid model. First, the LSTM part processes the input feature vector and outputs the intermediate feature vector M real (t); then, the SVM part performs classification prediction according to M real (t) and outputs the current leakage risk level R.
[0021] Further, the step S300 includes:
[0022] Step S301: According to the real-time feature vector F real (t) obtained in step S203, screen out similar historical feature vectors from the historical database according to the gas type and concentration range, and construct a candidate feature vector set E(t); extract the gas type information and the concentration range of each gas in the feature vector F real (t), expressed as [C min1 , C max1 , [C min2 , C max2 ,..., [C minm , C maxm , where C minm and C maxmrespectively represent the minimum concentration value and the maximum concentration value of the m-th gas. Traverse each feature vector in the historical database, check whether the gas type is consistent with that in the real-time feature vector, and whether the concentration of each gas is within the corresponding real-time concentration range. If the conditions are met, add the historical feature vector to the candidate feature vector set E(t);
[0023] Step S302: Calculate the real-time feature vector F real (t) and each feature vector E i (t) in the candidate feature vector set E(t) for the similarity score Q i ; According to the Euclidean distance formula:
[0024]
[0025] where d(F real (t), E i (t)) represents the Euclidean distance between the real-time feature vector F real (t) and each feature vector E i (t) in the candidate feature vector set E(t), k is the dimension of the feature vector, F real (t)[j] and E i (t)[j] respectively represent the j-th eigenvalue of the real-time feature vector and the candidate feature vector; the similarity score where Q i ∈[0,1], Q i =0 indicates that the real-time feature vector and the candidate feature vector are completely dissimilar, Q i =1 indicates that the real-time feature vector and the candidate feature vector are exactly the same.
[0026] Further, the step S400 includes:
[0027] Step S401: According to the preset similarity score threshold, divide the credibility level of the early warning, set two thresholds b1, b2, where 0 < b1 < b2 < 1, and divide three credibility levels:
[0028] If the similarity score Q i > b2, it is determined as a high credibility level, indicating that the current gas leakage situation is highly similar to the historical leakage situation, confirming the existence of a gas leakage situation, then immediately issue an emergency warning, locate the specific leakage location according to the sensor position set S, and remind relevant personnel to immediately take emergency treatment measures;
[0029] If the similarity score b1 < Q iIf it is less than or equal to b2, it is determined as medium confidence, indicating that the current situation has a certain similarity to the historical situation, but there is uncertainty. Increase the data collection frequency of each sensor, monitor the changes in gas concentration and environmental parameters in real time, continuously judge whether there is a leakage situation according to steps S200 and S300, and at the same time issue a warning reminder, publish the specific location information to remind relevant personnel to pay attention, and continuously monitor the gas situation at this location;
[0030] If the similarity score Q i is less than or equal to b1, determine whether it is a false alarm or there is a new leakage situation. Check the scale of the candidate feature vector set E(t). If the set E(t) is empty, it means that there is no record in the historical database that is similar to the current situation in terms of gas type and concentration range, and it is determined that there is a new leakage situation; calculate the differences between the environmental parameters, temperature, humidity, and air pressure data in the real-time feature vector F real (t) and the historical data. Set the difference thresholds for temperature, humidity, and air pressure as ΔT, ΔH, and ΔP respectively. If any one of the data exceeds the difference threshold, it means that there is a new leakage situation, then immediately issue an emergency warning, locate the specific leakage location according to the sensor location set S, and remind relevant personnel to take emergency treatment measures immediately; and store the relevant data of the new leakage situation in the database; if the set E(t) is not empty, it is determined as low confidence, judged as a false alarm, issue a false alarm prompt, and mark this location as a false alarm point for warning, and record the time of the false alarm, the similarity score, and the relevant sensor data.
[0031] An intelligent multi-gas data detection system based on NDIR technology, the system includes a data collection module, a risk judgment module, a similarity calculation module, and a hierarchical warning module;
[0032] The data collection module arranges a sensor network in the petrochemical area, collects gas concentration and environmental data, extracts multi-dimensional features after preprocessing, and constructs a historical database;
[0033] The risk judgment module constructs a gas concentration detection model based on historical data, collects current gas concentration data and environmental data in real time, and after feature extraction, inputs them into the gas detection model for prediction to judge whether there is a leakage risk;
[0034] The similarity calculation module, according to the output result of the gas detection model, for the real-time feature data with a leakage risk, screens out relevant historical feature data from the historical database according to the gas type and concentration range, and calculates the similarity score with the real-time feature;
[0035] The hierarchical warning module divides the confidence level based on the similarity score, and sets hierarchical warnings for different confidence levels.
[0036] The data acquisition module includes a sensor arrangement unit, a data acquisition unit, and a data preprocessing unit; the sensor arrangement unit arranges NDIR sensors, temperature sensors, humidity sensors, air pressure sensors, and wind direction sensors around equipment and at pipeline positions according to the equipment distribution and historical leakage risk data in the petrochemical area to determine the set of sensor positions; the data acquisition unit uses the NDIR sensors to collect the concentrations of multiple target gases, and the environmental sensors to collect temperature, humidity, air pressure, and wind speed and direction data; the data preprocessing unit uses an adaptive filtering algorithm to remove noise from the gas concentration data; sets thresholds for the environmental data, and corrects the abnormal data using the weighted average method; extracts the concentration change rate, gradient, and peak characteristics from the gas concentration data, and constructs environmental correlation characteristics and a historical database.
[0037] The risk judgment module includes a model construction unit, a real-time data processing unit, and a risk judgment unit; the model construction unit constructs a gas concentration detection model using a hybrid model of LSTM and SVM, divides the training set, test set, and validation set using the data in the historical database, trains the model, and updates the parameters; the real-time data processing unit collects the current gas and environmental data in real time and extracts the feature vectors; the risk judgment unit inputs the real-time feature vectors into the trained model, outputs the current leakage risk level, and judges whether there is a leakage risk.
[0038] The similarity calculation module includes a feature screening unit and a similarity calculation unit; for the real-time feature data with leakage risk, the feature screening unit screens similar historical feature vectors from the historical database according to the gas type and concentration range, and constructs a candidate feature vector set; the similarity calculation unit calculates the Euclidean distance between the real-time feature vector and each feature vector in the candidate set to obtain the similarity score.
[0039] The hierarchical early warning module includes a credibility grading unit and an early warning processing unit; the credibility grading unit divides the early warning into three credibility levels: high, medium, and low according to the preset similarity score threshold; the early warning processing unit sets corresponding early warning prompts for the high, medium, and low credibility levels respectively.
[0040] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0041] By arranging a sensor network including NDIR sensors, temperature sensors, humidity sensors, air pressure sensors, wind direction sensors, etc., the present invention realizes the comprehensive monitoring of the concentrations of multiple gases and environmental parameters, and uses a hybrid model of long short-term memory network (LSTM) and support vector machine (SVM), combined with historical data and real-time data, to improve the accuracy of leakage detection and can more accurately identify leakage risks;
[0042] By calculating the similarity score between real-time features and historical features and dividing the credibility level according to the similarity, the present invention can more precisely evaluate the leakage risk, reduce false alarms caused by abnormal single parameters or data noise, and also reduce missed alarms caused by incomplete monitoring or improper data processing. When there are no similar records in the historical database or the environmental parameters exceed the preset threshold, the present invention can identify new leakage situations and immediately issue an emergency warning, solving the problem in the prior art of untimely response or inability to identify new leakage situations. At the same time, by adjusting the data collection frequency and monitoring strategy according to the credibility level, unnecessary resource waste is avoided, and the frequency and cost of manual inspections are reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, and do not constitute a limitation to the present invention. In the drawings:
[0044] Figure 1 is a method flow chart of an intelligent multi-gas data detection method based on the NDIR technology. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0046] Please refer to Figure 1 , the present invention provides a technical solution: an intelligent multi-gas data detection method based on the NDIR technology, the method comprising:
[0047] Step S100: Arrange a sensor network in the petrochemical area, collect gas concentration and environmental data, and extract multi-dimensional features after preprocessing to construct a historical database;
[0048] Step S200: Construct a gas concentration detection model based on historical data, collect current gas concentration data and environmental data in real time, and after feature extraction, input them into the gas detection model for prediction to determine whether there is a leakage risk;
[0049] Step S300: According to the output result of the gas detection model, for the real-time feature data with a leakage risk, screen out relevant historical feature data from the historical database according to the gas type and concentration range, and calculate the similarity score with the real-time feature;
[0050] Step S400: Based on the similarity score, divide the credibility levels, and set hierarchical warnings for different credibility levels.
[0051] Further, the step S100 includes:
[0052] Step S101: According to the equipment distribution in the petrochemical area and the historical leakage risk data, arrange a sensor network around each piece of equipment and at pipeline valves, joints, and elbows, including NDIR sensors, temperature sensors, humidity sensors, air pressure sensors, and wind direction sensors. The set of sensor positions is represented as S = {s 1 , s 2 ,..., s n}, where s n represents the three-dimensional coordinates (x n , y n , z n ) of the nth sensor; use the NDIR sensor to collect the concentrations of multiple target gases, denoted as C(t) = [C 1 (t), C 2 (t),..., C m (t)], where t represents the collection time point, and C m (t) represents the concentration of the mth gas at time t; use environmental sensors to collect temperature T(t), humidity H(t), air pressure P(t), and wind direction and speed vector W(t) = [W x (t), W y (t), W z (t)], where W x (t), W y (t), W z (t) respectively represent the x, y, and z-axis components of the wind direction and speed in three-dimensional space;
[0053] Step S102: Use an adaptive filtering algorithm to process the gas concentration data to remove noise interference. The filtered gas concentration is denoted as Cl(t); extract gas concentration features from the processed gas concentration data, including concentration change rate, concentration gradient, and concentration peak. The concentration change rate is obtained by calculating the change rate of the gas per unit time, ΔC(t) = [ΔC 1 (t), ΔC 2 (t),..., ΔC m (t)], where ΔC m (t) = (C m (t + Δt) - C m (t)) / Δt, Δt represents the time interval, ΔC m (t) represents the concentration change rate of the mth gas at time t, and C m(t + Δt) represents the rate of change of the concentration of the m-th gas at time t + Δt; the concentration gradient C is calculated based on the difference in gas concentration between adjacent sensors. N (t); the concentration peak is found by traversing the time series data of the gas concentration, and the largest concentration maximum is recorded as the peak C peak , and the time at which it appears is recorded as t peak ;
[0054] Step S103: Set threshold ranges for the environmental data respectively. When the collected environmental data exceeds the threshold range, it is regarded as abnormal data; for abnormal data, the weighted average method is used for correction in combination with the normal data collected in adjacent time periods; construct environmental correlation features, including the correlation between temperature and gas diffusion, through the formula D(T) = D 0 ×(T / T 0 ), 1.75 where D(T) represents the diffusion coefficient of the gas at temperature T, D 0 and T 0 are the set reference diffusion coefficient and temperature; the correlation between humidity and gas absorption, and the influence coefficient α(H) of humidity on gas is obtained by fitting historical data; the correlation between wind direction and wind speed and the concentration gradient, and the dot product of the wind direction and wind speed vector and the concentration gradient is calculated to obtain W(t)·
[0055] C N (t);
[0056] Step S104: Construct a historical database, and store the extracted feature vectors:
[0057] F(t) = [ΔC(t), C N (t), C peak , t peak , D(T), α(H), W(t)·C N (t)] together with the corresponding timestamp t, sensor location S, and the label information L indicating whether leakage has occurred are stored in the historical database, where L = 1 indicates that leakage has occurred and L = 0 indicates that no leakage has occurred.
[0058] Further, the step S200 includes:
[0059] Step S201: Construct a gas concentration detection model using a hybrid model of long short-term memory network and support vector machine; the input layer receives the feature vector F(t) from the historical database and real-time acquisition, sets multiple LSTM hidden layers, each hidden layer contains a neurons, screens and updates the input information through the gating mechanism, and the output layer outputs an intermediate feature vector M(t); extract training data from the historical database, use the feature vector F(t) as the input, and the corresponding leakage label information L as the output, and divide the training set, test set, and validation set according to the set ratio; use the stochastic gradient descent method to train the LSTM model. In each training round, calculate the loss function between the intermediate vector feature M(t) output by the LSTM and the label information L, and update the weight parameters of the LSTM through the backpropagation algorithm;
[0060] Step S202: Use the intermediate vector M(t) output by the LSTM as the input, train the SVM using the training set data, select appropriate SVM parameters through the cross-validation method, use the radial basis function as the kernel function, and finally output the leakage risk level R. R = 0 indicates no leakage risk, and R = 1 indicates the existence of leakage risk;
[0061] Step S203: In the same way as in step 101, use the NDIR sensor and environmental sensor to collect the current gas concentration data and environmental data in real time; perform the same preprocessing operations on the real-time collected data as in steps S102 and S103, and extract the real-time feature vector F real (t) and input it into the trained hybrid model. First, the LSTM part processes the input feature vector and outputs the intermediate feature vector M real (t); then, the SVM part performs classification prediction based on M real (t) and outputs the current leakage risk level R.
[0062] Further, the step S300 includes:
[0063] Step S301: According to the real-time feature vector F real (t) obtained in step S203, screen out similar historical feature vectors from the historical database according to the gas type and concentration range, and construct a candidate feature vector set E(t); extract the gas type information and the concentration range of each gas in the feature vector F real (t), expressed as [C min1 , C max1 , [C min2 , C max2 ,..., [C minm , C maxm , where C minm and C maxmRespectively represent the minimum concentration value and the maximum concentration value of the m-th gas. Traverse each feature vector in the historical database, check whether the gas type is consistent with the gas type in the real-time feature vector, and whether the concentration of each gas is within the corresponding real-time concentration range. If the conditions are met, add the historical feature vector to the candidate feature vector set E(t);
[0064] Step S302: Calculate the real-time feature vector F real (t) and each feature vector E i (t) in the candidate feature vector set E(t) for the similarity score Q i ; According to the Euclidean distance formula:
[0065]
[0066] where d(F real (t), E i (t)) represents the Euclidean distance between the real-time feature vector F real (t) and each feature vector E i (t) in the candidate feature vector set E(t), k is the dimension of the feature vector, F real (t)[j] and E i (t)[j] respectively represent the j-th eigenvalue of the real-time feature vector and the candidate feature vector; the similarity score where Q i ∈[0,1], Q i =0 indicates that the real-time feature vector and the candidate feature vector are completely dissimilar, and Q i =1 indicates that the real-time feature vector and the candidate feature vector are exactly the same.
[0067] Furthermore, the step S400 includes:
[0068] Step S401: According to the preset similarity score threshold, divide the credibility level of the early warning. Set two thresholds b1, b2, where 0 < b1 < b2 < 1, and divide three credibility levels:
[0069] If the similarity score Q i > b2, it is determined as a high credibility level, indicating that the current gas leakage situation is highly similar to the historical leakage situation, confirming the existence of a gas leakage situation, then immediately issue an emergency warning, locate the specific leakage location according to the sensor position set S, and remind relevant personnel to take emergency treatment measures immediately;
[0070] If the similarity score b1 < Q iIf it is less than or equal to b2, it is determined as medium confidence, indicating that the current situation has a certain similarity to the historical situation but there is uncertainty. Increase the data acquisition frequency of each sensor, monitor the changes in gas concentration and environmental parameters in real time, continuously judge whether there is a leakage situation according to steps S200 and S300, and at the same time issue a warning reminder, release the specific location information to remind relevant personnel to pay attention, and continuously monitor the gas situation at this location;
[0071] If the similarity score Q i is less than or equal to b1, judge whether it is a false alarm or there is a new leakage situation. Check the scale of the candidate feature vector set E(t). If the set E(t) is empty, it means that there is no record in the historical database that is similar to the current situation in terms of gas type and concentration range, and it is determined that there is a new leakage situation; calculate the differences between the environmental parameters, temperature, humidity, and air pressure data in the real-time feature vector F real (t) and the historical data. Set the difference thresholds for temperature, humidity, and air pressure as ΔT, ΔH, and ΔP respectively. If any one of the data exceeds the difference threshold, it means that there is a new leakage situation, then immediately issue an emergency warning, locate the specific leakage location according to the sensor location set S, and remind relevant personnel to take emergency treatment measures immediately; and store the relevant data of the new leakage situation in the database; if the set E(t) is not empty, it is determined as low confidence, judged as a false alarm, issue a false alarm prompt, and mark this location as a warning false alarm point, record the time of the false alarm, the similarity score, and the relevant sensor data.
[0072] An intelligent multi-gas data detection system based on NDIR technology, the system includes a data acquisition module, a risk judgment module, a similarity calculation module, and a hierarchical warning module;
[0073] The data acquisition module arranges a sensor network in the petrochemical area, collects gas concentration and environmental data, and extracts multi-dimensional features after preprocessing to construct a historical database;
[0074] The risk judgment module constructs a gas concentration detection model based on historical data, collects current gas concentration data and environmental data in real time, and after feature extraction, inputs them into the gas detection model for prediction to judge whether there is a leakage risk;
[0075] The similarity calculation module, according to the output result of the gas detection model, for the real-time feature data with a leakage risk, screens out relevant historical feature data from the historical database according to the gas type and concentration range, and calculates the similarity score with the real-time feature;
[0076] The hierarchical warning module divides the confidence level based on the similarity score and sets hierarchical warnings for different confidence levels.
[0077] The data acquisition module includes a sensor arrangement unit, a data acquisition unit, and a data preprocessing unit; the sensor arrangement unit arranges NDIR sensors, temperature sensors, humidity sensors, air pressure sensors, and wind direction sensors around equipment and at pipeline positions according to the equipment distribution and historical leakage risk data in the petrochemical area to determine the sensor position set; the data acquisition unit uses the NDIR sensors to collect the concentrations of multiple target gases, and the environmental sensors to collect temperature, humidity, air pressure, and wind speed and direction data; the data preprocessing unit uses an adaptive filtering algorithm to remove noise from the gas concentration data; sets thresholds for the environmental data, and corrects the abnormal data using the weighted average method; extracts the concentration change rate, gradient, and peak characteristics from the gas concentration data, and constructs environmental correlation characteristics and a historical database.
[0078] The risk judgment module includes a model construction unit, a real-time data processing unit, and a risk judgment unit; the model construction unit constructs a gas concentration detection model using a hybrid model of LSTM and SVM, divides the training set, test set, and validation set using the data in the historical database, trains the model and updates the parameters; the real-time data processing unit collects the current gas and environmental data in real time and extracts the feature vectors; the risk judgment unit inputs the real-time feature vectors into the trained model, outputs the current leakage risk level, and judges whether there is a leakage risk.
[0079] The similarity calculation module includes a feature screening unit and a similarity calculation unit; the feature screening unit screens similar historical feature vectors from the historical database according to the gas type and concentration range for the real-time feature data with leakage risk, and constructs a candidate feature vector set; the similarity calculation unit calculates the Euclidean distance between the real-time feature vector and each feature vector in the candidate set to obtain the similarity score.
[0080] The hierarchical early warning module includes a credibility grading unit and an early warning processing unit; the credibility grading unit divides the early warning into three credibility levels: high, medium, and low according to the preset similarity score threshold; the early warning processing unit sets corresponding early warning prompts for the high, medium, and low credibility levels respectively.
[0081] In an embodiment of the present invention, in a medium-sized petrochemical park with multiple storage tanks, pipelines, and processing equipment distributed therein, in order to ensure production safety, it is necessary to perform real-time monitoring on multiple gases (such as methane, hydrogen sulfide, etc.) to detect whether there is a gas leakage situation;
[0082] A total of 10 sensors (n = 10) are arranged around each equipment and at pipeline valves, joints, and elbows in the park, and the sensor position set S = {s 1 , s 2 ,..., s 10}, taking one of the sensors s1 Taking the three - dimensional coordinates of 1 as (10, 20, 5) as an example, mainly monitor two target gases (m = 2): methane and hydrogen sulfide; at t = 1 moment, the gas concentrations collected by the NDIR sensor are C(1)=[C 1 (1),C 2 (1)]=[20ppm, 5ppm]; the temperature T(1)=25°C, humidity H(1)=60%, air pressure P(1)=101kPa, wind direction and speed vector W(1)=[1, 0, 0] are collected by the environmental sensor; the adaptive filtering algorithm is used to process the gas concentration data to remove noise interference, and the filtered gas concentration is expressed as Cl(1)=[19ppm, 5ppm]; the concentration change rate is obtained by calculating the change rate of the gas per unit time, ΔC(1)=[ΔC 1 (1),ΔC 2 (1)]=[1ppm, 1ppm]; select the adjacent sensor s 2 , whose gas concentration is [22ppm, 6ppm], calculate the concentration gradient C N (1), taking methane as an example, C N (1)=|19 - 22| = 3ppm; by traversing the time - series data of the gas concentration, find the concentration peak C peak1 = 25ppm, and the time t peak1 = 3;
[0083] Set threshold ranges for environmental data respectively. The temperature threshold is [20°C, 30°C], the humidity threshold is [40%, 80%], the air pressure threshold is [100kPa, 102kPa]. The currently collected environmental data are all within the threshold range and do not need to be corrected; construct environmental - related features, set the diffusion coefficient D 0 = 0.1, the reference temperature T 0 = 20°C, then the correlation between temperature and gas diffusion D(T(1)) = 0.13; the influence coefficient α(H(1)) = 0.9 of humidity on gas is obtained by fitting historical data; the correlation between wind direction and speed and concentration gradient is obtained by calculating the dot product of the wind direction and speed vector and the concentration gradient, W(1)·C N (1)=3; the extracted feature vector: F(t)=[ΔC(1),C N (1),C peak1 ,t peak1 ,D(T(1)),α(H(1)),W(1)·
[0084] C N(1) = [1, 1, 3, 25, 3, 0.13, 0.9, 3], store it together with the timestamp t = 1, the sensor location S, and the label information L indicating whether there is a leak (L = 0, no leak at this time) into the historical database;
[0085] Adopt a hybrid model of long short - term memory network and support vector machine to construct a gas concentration detection model; the input layer receives the feature vector F(t) from the historical database and real - time acquisition. Set 2 LSTM hidden layers, each hidden layer contains 10 neurons. Extract 100 groups of data from the historical database and divide them into a training set, a test set, and a validation set according to the ratio of 7:2:1; use the stochastic gradient descent method to train the LSTM model. After 100 training rounds, continuously update the weight parameters of the LSTM; use the intermediate vector output by the LSTM as the input, use the training set data to train the SVM, select appropriate SVM parameters through the cross - validation method, use the radial basis function as the kernel function. After training is completed, output the leakage risk level R. At t = 10, collect the current gas concentration data and environmental data in the same way, and obtain the real - time feature vector F after pre - processing and feature extraction real (10), input it into the trained hybrid model, and the model outputs the leakage risk level R = 1, indicating that there is a leakage risk.
[0086] Extract the feature vector F real (10) of the gas type information and concentration range, where the methane concentration range is [22 ppm, 26 ppm], and the hydrogen sulfide concentration range is [6 ppm, 8 ppm]; traverse each feature vector in the historical database, filter out the historical feature vectors with the same gas type and concentration within the corresponding range, and construct the candidate feature vector set E(10). After screening, 3 historical feature vectors E 1 (10), E 2 (10), E 3 (10); calculate the Euclidean distance between the real - time feature vector F real (10) and each feature vector in the candidate feature vector set E(10). Set the feature vector dimension k = 8. Taking F real (10) and E 1 (10) as an example: calculate to get d(F real (10), E 1 (10)) = 2, then the similarity score Q 1 = 0.33;
[0087] Set the thresholds b1 = 0.2, b2 = 0.8. Since Q 1 = 0.33, it satisfies b1 < Q 1<= b2, it is determined as medium confidence, and the data acquisition frequency of each sensor is increased, from once per minute to once every 30 seconds, to monitor the changes in gas concentration and environmental parameters in real time, continuously judge whether there is a leakage situation according to steps S200 and S300, and at the same time issue a warning reminder to inform relevant personnel that there may be a risk of gas leakage near sensor s 1 and continuous attention is required.
[0088] Finally, it should be noted that the above are only the preferred embodiments of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. Intelligent multi-gas data detection method based on NDIR technology, characterized by: The method includes: Step S100: Arrange a sensor network in the petrochemical area, collect gas concentration and environmental data, extract multi-dimensional features after preprocessing, and construct a historical database; Step S200: Based on the historical data, construct a gas concentration detection model, collect current gas concentration data and environmental data in real time, extract features and input them into the gas detection model for prediction to determine whether there is a leakage risk; Step S300: According to the output result of the gas detection model, for the real-time feature data with leakage risk, screen out relevant historical feature data from the historical database according to the gas type and concentration range, and calculate the similarity score with the real-time feature; Step S400: Based on the similarity score, divide the credibility levels and set hierarchical warnings for different credibility levels.
2. The intelligent multi-gas data detection method based on NDIR technology according to claim 1 is characterized in that: The step S100 includes: Step S101: According to the equipment distribution and historical leakage risk data in the petrochemical area, a sensor network is arranged around each equipment and at pipeline valves, joints, and elbows, including NDIR sensors, temperature sensors, humidity sensors, air pressure sensors, and wind direction sensors. The sensor location set is represented by S = {s1, s2, ..., s n }, where s n represents the three-dimensional coordinates (x n ,y n ,z n );Use NDIR sensor to collect the concentration of multiple target gases, recorded as C(t)=[C1(t),C2(t),...,C m (t)], where t represents the time point of acquisition, C m (t) represents the concentration of the mth gas at time t; the environmental sensor is used to collect temperature T(t), humidity H(t), air pressure P(t), wind direction and speed vector W(t) = [W x (t),W y (t),W z (t)], where W x (t), W y (t), W z (t) respectively represent the x-, y-, and z-axis components of wind direction and wind speed in three-dimensional space; Step S102: Adopt an adaptive filtering algorithm to process the gas concentration data to remove noise interference. The filtered gas concentration is expressed as Cl(t). Extract gas concentration characteristics from the processed gas concentration data, including concentration change rate, concentration gradient, and concentration peak. The concentration change rate is obtained by calculating the change rate of the gas in unit time to obtain ΔC(t)=[ΔC1(t),ΔC2(t),...,ΔC m (t)], where ΔC m (t)=(C m (t+Δt)-C m (t)) / Δt, Δt represents the time interval, ΔC m (t) represents the concentration change rate of the mth gas at time t, C m (t+Δt) represents the concentration change rate of the mth gas at time t+Δt; the concentration gradient C is calculated based on the gas concentration difference of adjacent sensors. N (t); The peak concentration is obtained by traversing the time series data of the gas concentration and finding the maximum concentration value, which is recorded as the peak value C peak , and the time of its occurrence is recorded as t peak ; Step S103: Set threshold ranges for environmental data respectively. When the collected environmental data exceeds the threshold range, it is considered as data abnormality. For abnormal data, the weighted average method is used to correct it in combination with the normal data collected in adjacent time periods. Construct environmental correlation features, including the correlation between temperature and gas diffusion, through the formula D(T)=D0×(T / T0) 1.75 , where D(T) represents the diffusion coefficient of the gas at temperature T, D0 and T0 are the set reference diffusion coefficient and temperature; humidity is associated with gas absorption, and the influence coefficient of humidity and gas α(H) is obtained by fitting historical data; the association between wind direction and wind speed and concentration gradient is obtained by calculating the dot product of wind direction and wind speed vector and concentration gradient W(t)·C N (t); Step S104: Construct a historical database and store the extracted feature vectors: F(t)=[ΔC(t),C N (t),C peak ,t peak ,D(T),α(H),W(t)·C N (t)] and the corresponding Timestamp t, sensor location S, and the label information L indicating whether there is a leakage into the historical database, where L = 1 indicates a leakage occurs, and L = 0 indicates no leakage occurs.
3. The intelligent multi-gas data detection method based on the NDIR technology according to claim 1, characterized in that: The step S200 includes: Step S201: Use a hybrid model of long short-term memory network and support vector machine to construct a gas concentration detection model; the input layer receives the feature vectors F(t) from the historical database and real-time collection, set multiple LSTM hidden layers, each hidden layer contains a neurons, screen and update the input information through the gating mechanism, and the output layer outputs an intermediate feature vector M(t); extract training data from the historical database, use the feature vector F(t) as the input, and the corresponding label information L indicating whether there is a leakage as the output, and divide the training set, test set, and validation set according to the set ratio; use the stochastic gradient descent method to train the LSTM model. In each training round, calculate the loss function between the intermediate vector feature M(t) output by the LSTM and the label information L, and update the weight parameters of the LSTM through the backpropagation algorithm; Step S202: Use the intermediate vector M(t) output by the LSTM as the input, train the SVM using the training set data, select appropriate SVM parameters through the cross-validation method, use the radial basis function as the kernel function, and finally output the leakage risk level R, where R = 0 indicates no leakage risk, and R = 1 indicates there is a leakage risk; Step S203: In the same manner as step 101, use the NDIR sensor and the environmental sensor to collect the current gas concentration data and environmental data in real time; perform the same preprocessing operation as steps S102 and S103 on the real-time collected data, and extract the real-time feature vector F real (t) is input into the trained hybrid model. First, the LSTM part processes the input feature vector and outputs the intermediate feature vector M real (t); Then, the SVM part is based on M real (t) Perform classification prediction and output the current leakage risk level R.
4. The intelligent multi-gas data detection method based on the NDIR technology according to claim 1, characterized in that: The step S300 includes: Step S301: Based on the real-time feature vector F obtained in step S203 real (t), filter out similar historical feature vectors from the historical database according to the gas type and concentration range, and construct a candidate feature vector set E(t); extract the feature vector F real The gas type information and concentration range of each gas in (t) are expressed as [C min1 ,C max1 ],[C min2 ,C max2 ],...,[C minm ,C maxm ], where C minm , C maxm Respectively represent the lowest concentration value and the highest concentration value of the mth gas, traverse each feature vector in the historical database, check whether its gas type is consistent with the gas type in the real-time feature vector, and whether the concentration of each gas is within the corresponding real-time concentration range. If the conditions are met, add the historical feature vector to the candidate feature vector set E(t); Step S302: Calculate the real-time feature vector F real (t) and each feature vector E in the candidate feature vector set E(t) i The similarity score Q of (t) i ; According to the Euclidean distance formula: Where d(F real (t),E i (t)) represents the real-time feature vector F real (t) and each feature vector E in the candidate feature vector set E(t) i (t), k is the dimension of the feature vector, F real (t)[j] and E i (t)[j] represents the jth eigenvalue of the real-time feature vector and the candidate feature vector respectively; similarity score Where Q i ∈[0,1], Q i = 0 means that the real-time feature vector is completely dissimilar to the candidate feature vector, Q i =1 means that the real-time feature vector is exactly the same as the candidate feature vector.
5. The intelligent multi-gas data detection method based on NDIR technology according to claim 1 is characterized in that: The step S400 includes: Step S401: According to the preset similarity score threshold, divide the credibility levels of the warning, set two thresholds b1, b2, where 0 < b1 < b2 < 1, and divide three credibility levels: If the similarity score Q i >b2, it is judged as high credibility, indicating that the current gas leakage situation is highly similar to the historical leakage situation. If the gas leakage is confirmed, an emergency warning will be issued immediately, and the specific leakage location will be located according to the sensor location set S, reminding relevant personnel to take emergency measures immediately; If the similarity score b1 i <=b2, it is determined to be medium credibility, indicating that the current situation has a certain similarity with the historical situation, but there is uncertainty. The data collection frequency of each sensor is increased, and the changes in gas concentration and environmental parameters are monitored in real time. It is continuously determined whether there is a leak according to steps S200 and S300. At the same time, an early warning reminder is issued, and specific location information is issued to remind relevant personnel to pay attention and continue to pay attention to the gas situation at this location; If the similarity score Q i <=b1, determine whether it is a false alarm or a new leakage, check the size of the candidate feature vector set E(t), if the set E(t) is empty, it means that there is no record in the historical database that is similar to the current situation in terms of gas type and concentration range, and determine that there is a new leakage; calculate the real-time feature vector F real The environmental parameters in (t), the temperature, humidity, and air pressure data are the difference between the historical data, and the difference thresholds of temperature, humidity, and air pressure are set to ΔT, ΔH, and ΔP respectively. If any of the data exceeds the difference threshold, it means that there is a new leakage. Then an emergency warning is issued immediately, and the specific leakage location is located according to the sensor location set S, and relevant personnel are reminded to take emergency measures immediately; and the relevant data of the new leakage is stored in the database; if the set E(t) is not empty, it is judged to be of low credibility and a false alarm, a false alarm prompt is issued, and this location is marked as a warning false alarm point, and the time, similarity score and related sensor data of the false alarm are recorded.
6. Intelligent multi-gas data detection system based on NDIR technology, characterized by: The system includes a data acquisition module, a risk judgment module, a similarity calculation module, and a hierarchical warning module; The data acquisition module deploys a sensor network in the petrochemical area to collect gas concentration and environmental data, extracts multi-dimensional features after pre-processing, and constructs a historical database; The risk judgment module builds a gas concentration detection model based on historical data, collects current gas concentration data and environmental data in real time, extracts features and inputs them into the gas detection model for prediction to determine whether there is a leakage risk; The similarity calculation module, based on the output results of the gas detection model, selects relevant historical feature data from the historical database according to the gas type and concentration range for the real-time feature data with leakage risk, and calculates the similarity score with the real-time feature; The graded warning module divides the credibility levels based on the similarity scores and sets graded warnings for different credibility levels.
7. The intelligent multi-gas data detection system based on NDIR technology according to claim 6 is characterized in that: The data acquisition module includes a sensor arrangement unit, a data acquisition unit, and a data preprocessing unit; The sensor arrangement unit arranges NDIR sensors, temperature sensors, humidity sensors, air pressure sensors, and wind direction sensors around the equipment and at the pipeline locations according to the equipment distribution and historical leakage risk data in the petrochemical area, and determines the sensor position set; the data acquisition unit uses NDIR sensors to collect multiple target gas concentrations, and the environmental sensor collects temperature, humidity, air pressure, wind direction and wind speed data; the data preprocessing unit uses an adaptive filtering algorithm to remove noise from the gas concentration data; sets a threshold for the environmental data, and corrects the abnormal data using a weighted average method; extracts the concentration change rate, gradient, and peak characteristics from the gas concentration data, and constructs environmental correlation characteristics and a historical database.
8. The intelligent multi-gas data detection system based on NDIR technology according to claim 6 is characterized in that: The risk judgment module includes a model building unit, a real-time data processing unit, and a risk judgment unit; The model building unit adopts the LSTM and SVM hybrid model to build a gas concentration detection model, divides the training set, test set and validation set with the historical database data, trains the model and updates the parameters; the real-time data processing unit collects the current gas and environmental data in real time and extracts the feature vector; the risk judgment unit inputs the real-time feature vector into the trained model, outputs the current leakage risk level, and judges whether there is a leakage risk.
9. The intelligent multi-gas data detection system based on NDIR technology according to claim 6 is characterized in that: The similarity calculation module includes a feature screening unit and a similarity calculation unit; The feature screening unit screens similar historical feature vectors from a historical database for real-time feature data with leakage risk according to gas type and concentration range, and constructs a candidate feature vector set; The similarity calculation unit calculates the Euclidean distance between the real-time feature vector and each feature vector in the candidate set to obtain a similarity score.
10. The intelligent multi-gas data detection system based on NDIR technology according to claim 6 is characterized in that: The graded warning module includes a credibility grading unit and a warning processing unit; the credibility grading unit divides the warning into three credibility levels: high, medium and low according to a preset similarity score threshold; the warning processing unit sets corresponding warning prompts for the three credibility levels: high, medium and low.
Citation Information
Patent Citations
Real-time lightning stroke prewarning method and device for outdoor electric equipment
CN102508046A
Electric power device typhoon risk early warning method and system
CN106779274A
Picture infringement detection method and device and storage medium
CN110704811A
Fraudulent behavior detection method and device for insurance service and storage medium
CN116957819A
Monitoring and alarming method and control device for harmful gas of underground tunnel structure
CN117846706A
Cited By
Methane gas leakage detection method based on multi-sensor data fusion
CN121499429A