Methane concentration detection system and method based on PSO-BP
By introducing the PSO-BP algorithm and non-dispersive infrared principle into the methane concentration detection system, the problems of low accuracy and high cost in the existing technology are solved, and high-precision and low-cost methane concentration detection are achieved, which is suitable for complex environments such as coal mines.
Patent Information
- Application Number
- CN202510410706.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-06-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing methane concentration detection technology has problems such as low accuracy, high cost, susceptibility to interference and safety hazards in coal mines and other environments, and it is difficult to meet the high-precision and low-cost detection needs.
A non-dispersive infrared methane concentration detection system based on the PSO-BP algorithm is used, combined with an infrared sensor system and a PSO-BP neural network module, methane gas is detected through the non-dispersive infrared principle, and data processing and error compensation are used to output the corrected methane concentration value.
It realizes high-precision, fast and stable methane concentration detection, reduces detection costs, is suitable for complex environments, and improves the safety and reliability of detection.
Smart Images

Figure CN120213844A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of methane collection, and particularly relates to a methane concentration detection system and method based on PSO-BP. Background Art
[0002] As the main component of natural gas and an important chemical raw material, the detection of methane concentration is of crucial importance. China is rich in coal resources, and gas disasters frequently occur in coal mining. For example, gas accidents in 2019-2020 caused heavy casualties. Methane is the main component of gas, and gas explosion needs to meet specific conditions. Controlling the methane concentration not exceeding 5% can effectively prevent explosion. At present, domestic coal mines commonly use thermal catalytic elements to detect methane, but they have low accuracy, narrow range, are easily interfered with and have potential safety hazards; although the advanced infrared absorption principle detection abroad has high accuracy and good stability, the import price is expensive. Therefore, it is urgent to develop a high-precision and low-cost methane detection system. Summary of the Invention
[0003] The purpose of the present invention is to provide a methane concentration detection system and method based on PSO-BP to solve the problems faced in the above background art.
[0004] The purpose of the present invention can be achieved through the following technical solutions:
[0005] A non-dispersive infrared methane concentration detection system based on the PSO-BP algorithm includes an infrared sensor system, a main controller module, a power supply module, a display module, a communication module, a light source driving module, a signal processing module, an A / D conversion module and an optical system module. The infrared sensor system uses the non-dispersive infrared principle to detect methane gas, and the main controller module receives the data transmitted by the infrared sensor system and performs processing, communication and control operations;
[0006] The system further includes a PSO-BP neural network module, which processes and analyzes the preprocessed methane concentration data and outputs the corrected methane concentration value;
[0007] A display and warning module, connected to the PSO-BP neural network module, is used to display the corrected methane concentration value and trigger an alarm signal when the methane concentration exceeds a preset safety threshold;
[0008] A storage module is used to store the collected original data, the processed corrected data and the training parameter information of the PSO-BP neural network.
[0009] As a further description of the technical solution of the present invention, the infrared sensor system includes an imported MEMS infrared light source and a dual-channel pyroelectric detector;
[0010] The optical system module includes a gas chamber for accommodating methane gas to be measured.
[0011] As a further description of the technical solution of the present invention, the system further includes a human-computer interaction module, which is designed with a management area and a user area, and can perform parameter setting and threshold setting operations.
[0012] As a further description of the technical solution of the present invention, the working process of the PSO-BP neural network module includes:
[0013] Collect the methane concentration once every period of time, and use the collected methane concentration data as the input vector x, x = [x1, x2,..., x n , where n is the number of methane concentration data collected;
[0014] Input the vector x as the input data into the neural network module respectively. Based on the PSO-BP neural network module, process the collected methane concentration, and the output data is:
[0015]
[0016] In the formula, m is the dimension number of the neural network hidden layer, W 2jk represents the weight from the j-th neuron in the hidden layer to the k-th neuron in the output layer, b 2k represents the threshold of the k-th neuron in the output layer, W 1ij represents the weight from the i-th neuron in the input layer to the j-th neuron in the hidden layer, b 1j represents the threshold of the j-th neuron in the hidden layer, where i belongs to n and j belongs to m.
[0017] As a further description of the technical solution of the present invention, the working process of the display and warning module includes:
[0018] Obtain the correction value vector set of n times of collected methane concentration data, y = [y1, y2,..., y n ;
[0019] Compare the correction values of n times of collected methane concentration data with the methane concentration threshold interval set by the system respectively. If there is any correction value of the collected methane concentration data that does not meet the methane concentration threshold interval set by the system, it means that the methane concentration is unqualified, and a first-level warning is immediately issued;
[0020] If the correction value of any collected methane concentration data meets the threshold interval set by the system, continue to judge whether a second-level warning needs to be issued.
[0021] As a further description of the technical solution of the present invention, the working process of continuing to judge whether a second-level warning needs to be issued includes:
[0022] Build an early warning coefficient calculation model, and the expression is:
[0023]
[0024] In the formula, [y1, y2] is the methane concentration threshold interval set by the system. Compare the early warning coefficient ρ with the early warning threshold set by the system. If the early warning coefficient ρ is greater than the early warning threshold set by the system, it means that the methane concentration is unqualified, and a secondary early warning is immediately issued.
[0025] As a further description of the technical solution of the present invention, the methane concentration threshold interval [y1, y2] is adjusted according to the environmental quality, and the adjustment calculation model is:
[0026]
[0027] In the formula, [y 10 , y 20 is the methane concentration threshold interval adjusted according to the environmental quality, q is the number of key environmental parameter items involved, E p is the value of the pth environmental parameter, E p0 is the standard value of the pth environmental parameter, k p is the weight coefficient corresponding to the jth environmental parameter, where p belongs to q.
[0028] As a further description of the technical solution of the present invention, the level of the primary early warning is higher than that of the secondary early warning.
[0029] A methane concentration detection method based on PSO-BP, and the method is implemented through a methane concentration detection system based on PSO-BP.
[0030] The beneficial effects of the present invention:
[0031] 1. High detection accuracy: Adopt the non-dispersive infrared principle, dual-channel detection technology and PSO-BP algorithm for intelligent compensation and calibration to ensure the rapid, accurate and stable measurement of methane concentration.
[0032] 2. Low cost: Optimize the system design and component selection to reduce the manufacturing cost, and have a price advantage compared with similar high-precision detection systems.
[0033] 3. Strong practicability: Simple structure, convenient processing, easy to disassemble and clean, and suitable for complex environments such as mines, oil fields, and chemical industries.
[0034] 4. Complete functions: Have functions such as real-time detection, display, communication, and alarm, can set upper and lower limit thresholds, and give an audible and visual alarm when the threshold is exceeded, improving the safety and reliability of methane detection.
[0035] Of course, it is not necessary for any product implementing the present invention to achieve all of the above advantages simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for describing the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0037] Figure 1 FIG. is a schematic structural diagram of a non-dispersive infrared methane concentration detection system based on the PSO-BP algorithm of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0038] The technical solutions in the embodiments of the present invention will be clearly and completely described below 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 fall within the protection scope of the present invention.
[0039] Please refer to Figure 1 As shown, a non-dispersive infrared methane concentration detection system based on the PSO-BP algorithm is disclosed, which includes an infrared sensor system, a main controller module, a power supply module, a display module, a communication module, a light source driving module, a signal processing module, an A / D conversion module, and an optical system module. The infrared sensor system uses the non-dispersive infrared principle to detect methane gas. The main controller module receives the data transmitted by the infrared sensor system and performs processing, communication, and control operations.
[0040] Infrared sensor system: Based on the non-dispersive infrared (NDIR) principle, an imported MEMS infrared light source EMIRS200 and a dual-channel PYS3228 pyroelectric detector are used. The radiation characteristics of the light source are close to those of a black body, meeting the requirements of system power consumption, volume, and cost, and the output is stable, ensuring sufficient energy in the characteristic absorption band of the gas to be measured. The output signal of the detector has a parabolic relationship with the incident light frequency, is suitable for low frequencies, and uses a modulation frequency of 1 / 6 Hz. The internal filter of the detector has good band selectivity, thermal stability, moisture resistance, and mechanical properties.
[0041] Controller module: The STM32F103C8T6 single-chip microcomputer is selected, with a clock frequency of 72 MHz, low power consumption, high cost performance, capable of working at low voltage, having rich on-chip resources and peripheral interfaces, and can control A / D conversion, obtain temperature data, and communicate with the host computer.
[0042] Power supply module: It converts the 220V mains power into 24V through a switching power supply, then uses the step-down chip LM2576S to convert it to 5V, and finally steps it down to 3.3V by LM117MPX to supply power to the main controller. It also has overvoltage, overcurrent and short-circuit protection functions.
[0043] Display module: Select a serial screen from Shenzhen Taojingchi Electronics Co., Ltd. (such as the 7-inch screen of the T0 series). It has a wide working voltage range, a large flash capacity, sufficient operating memory and serial instruction buffer, a high main control frequency, and good interactive interface development. It can intuitively and real-time display the methane concentration.
[0044] Communication module: It adopts an RS485 communication circuit and is connected to the main controller through the half-duplex transceiver SP3485. It supports differential balanced transmission and half-duplex communication, has strong anti-interference ability, and can achieve multi-point connection and data transmission.
[0045] Light source drive module: Design a drive circuit for EMIRS200 to meet the requirements of power output and stability and take power isolation measures. The on and off of the light source is controlled by the MOSFET drive circuit.
[0046] Signal processing module: The output signal of the detector is weak and vulnerable to interference. Design two identical amplifier and filter circuits. Select the AD8552 amplifier, which has the advantages of low offset, zero drift, and high common-mode rejection ratio (140dB), effectively reducing errors. One circuit processes the signal of the measurement channel, and the other processes the signal of the reference channel. The signal of the measurement channel adopts first-stage amplification.
[0047] A / D conversion module: Adopt the ADS1100 analog-to-digital converter to convert the analog voltage signal processed by the detector into a digital signal and send it to the main controller. Its VIN+ terminal is connected to the output terminal of the detector, and the SDA and SCL ports are connected to the corresponding ports of the main controller.
[0048] Optical system module: It includes a gas chamber. The gas chamber adopts a cylindrical structure. The inner wall of the aluminum material is coated with a film to enhance reflection. Small holes for gas inlet and outlet are sealed at both ends to ensure that the axis is parallel to the infrared light source. The inner diameter is as small as possible under the premise of meeting the installation requirements. The length is determined according to the gas type, measurement range, sensitivity and resolution. The structure is simple and compact, easy to process, and convenient for loading, unloading, cleaning and replacement. It also includes a circuit for standard signal output, which uses the AD5420 chip to achieve 4-20mA current output, and controls the update of the output current by the SPI communication protocol to ensure the measurement accuracy.
[0049] The system further includes a PSO-BP neural network module, which includes a particle swarm optimization algorithm (PSO) part and a backpropagation neural network (BP) part. The PSO algorithm is used to optimize the initial weights and thresholds of the BP neural network. The BP neural network processes and analyzes the preprocessed methane concentration data and outputs the corrected methane concentration value.
[0050] A display and warning module, connected to the PSO-BP neural network module, is used to display the corrected methane concentration value and trigger an alarm signal when the methane concentration exceeds a preset safety threshold.
[0051] A storage module is used to store the collected original data, the processed corrected data, and the training parameter information of the PSO-BP neural network.
[0052] The signal processing module filters and amplifies the weak electrical signal, and the A / D conversion module converts the analog signal into a digital signal and transmits it to the main controller.
[0053] The infrared sensor system includes an imported MEMS infrared light source and a dual-channel pyroelectric detector.
[0054] The optical system module includes a gas chamber for accommodating the methane gas to be measured.
[0055] Through the above technical solution, the present invention uses the non-dispersive infrared detection method, based on the infrared spectrum generated by the internal energy level transition of molecules and the principle of gas absorption of infrared light at a specific wavelength, and combines the Beer-Lambert law to achieve methane concentration detection. Compared with the traditional thermal catalytic element sensor, the measurement is more accurate, fast, and stable, and can perform real-time online detection and data transmission. The PSO-BP algorithm is introduced for error compensation, and the PSO algorithm is used to optimize the weights and biases of the BP neural network, enabling the network to better fit the relationship between methane concentration and sensor output signal, overcoming the uncertainty of the initial weights and thresholds of the BP network, and performing warning analysis on the corrected data to improve the reliability and stability of the system.
[0056] The system further includes a human-computer interaction module, which is designed with a management area and a user area, and can perform parameter setting and threshold setting operations.
[0057] The working process of the PSO-BP neural network module includes:
[0058] Collect the methane concentration once every period of time, and use the collected methane concentration data as the input vector x, x = [x1, x2,..., x n , where n is the number of methane concentration data collected.
[0059] The vector x is used as input data and input into the neural network module respectively. Based on the PSO-BP neural network module, the collected methane concentration is processed, and the output data is as follows:
[0060]
[0061] In the formula, m is the number of dimensions of the neural network hidden layer, and W 2jk represents the weight from the j-th neuron in the hidden layer to the k-th neuron in the output layer, and b 2k represents the threshold of the k-th neuron in the output layer, and W 1ij represents the weight from the i-th neuron in the input layer to the j-th neuron in the hidden layer, and b 1j represents the threshold of the j-th neuron in the hidden layer, where i belongs to n and j belongs to m.
[0062] Through the above technical solution, this embodiment discloses a method for correcting methane concentration data. The collected methane concentration-related data is formed into an input vector, and the PSO algorithm is used to optimize the initial weights and thresholds of the BP neural network; using the optimized weights and thresholds, the BP neural network processes the input methane concentration data, and finally outputs the corrected methane concentration value.
[0063] As a further description of the technical solution of the present invention, the working process of the display and warning module includes:
[0064] Obtain the corrected value vector set of the methane concentration data collected n times, y = [y1, y2,..., y n ;
[0065] Compare the corrected values of the methane concentration data collected n times with the methane concentration threshold interval set by the system. If there is any corrected value of the methane concentration data collected that does not meet the methane concentration threshold interval set by the system, it means that the methane concentration is unqualified, and a first-level warning is immediately issued;
[0066] If the corrected value of any methane concentration data collected meets the threshold interval set by the system, continue to judge whether a second-level warning needs to be issued.
[0067] The working process of continuing to judge whether a second-level warning needs to be issued includes:
[0068] Construct a warning coefficient calculation model, and the expression is:
[0069]
[0070] In the formula, [y1, y2] is the methane concentration threshold interval set by the system. Compare the warning coefficient ρ with the warning threshold set by the system. If the warning coefficient ρ is greater than the warning threshold set by the system, it means that the methane concentration is unqualified, and a second-level warning is immediately issued.
[0071] As a further description of the technical solution of the present invention, the methane concentration threshold range [y1, y2] is adjusted according to the environmental quality, and the adjustment calculation model is as follows:
[0072]
[0073] In the formula, [y 10 , y 20 is the methane concentration threshold range adjusted according to the environmental quality, q is the number of key environmental parameter items involved, E p is the value of the p-th environmental parameter, E p0 is the standard value of the p-th environmental parameter, k p is the weight coefficient corresponding to the j-th environmental parameter, where p belongs to q.
[0074] The level of the first-level warning is higher than that of the second-level warning.
[0075] Through the above technical solution, this embodiment provides a method for analyzing methane concentration data. The corrected values of the methane concentration data collected n times are respectively compared with the methane concentration threshold range set by the system. If the corrected value of any one of the collected methane concentration data does not meet the methane concentration threshold range set by the system, it indicates that the methane concentration is unqualified, and a first-level warning is immediately issued; if the corrected value of any one of the collected methane concentration data meets the threshold range set by the system, the warning coefficient ρ is calculated through the formula The warning coefficient ρ is compared with the warning threshold set by the system. If the warning coefficient ρ is greater than the warning threshold set by the system, it indicates that the methane concentration is unqualified, and a second-level warning is immediately issued.
[0076] At the same time, based on the formula The methane concentration threshold range [y1, y2] is adjusted according to the environmental quality to eliminate the interference of environmental factors on the monitoring results.
[0077] A methane concentration detection method based on PSO-BP, and the method is implemented through a methane concentration detection system based on PSO-BP.
[0078] It should be noted that the thresholds, threshold ranges, and coefficients set in this application are all empirical values, and all data in this application have been processed, and all calculations are dimensionless calculations, which will not be elaborated here.
[0079] The above content is only an example and explanation of the concept of the present invention. Those skilled in the art of this technology can make various modifications or supplements to the specific embodiments described or use similar methods to replace them, as long as they do not deviate from the concept of the invention or exceed the scope defined by this claim book, they should all fall within the protection scope of the present invention.
Claims
1. A non-dispersive infrared methane concentration detection system based on PSO-BP algorithm, characterized in that: It includes an infrared sensor system, a main controller module, a power module, a display module, a communication module, a light source driving module, a signal processing module, an A / D conversion module and an optical system module. The infrared sensor system detects methane gas using the non-dispersive infrared principle. The main controller module receives data transmitted by the infrared sensor system and performs processing, communication and control operations. The system also includes a PSO-BP neural network module, which processes and analyzes the pre-processed methane concentration data and outputs a corrected methane concentration value; A display and warning module, connected to the PSO-BP neural network module, is used to display the corrected methane concentration value and trigger an alarm signal when the methane concentration exceeds a preset safety threshold; The storage module is used to store the collected original data, the processed corrected data and the training parameter information of the PSO-BP neural network.
2. According to the non-dispersive infrared methane concentration detection system based on PSO-BP algorithm in claim 1, it is characterized in that: The infrared sensor system includes an imported MEMS infrared light source and a dual-channel pyroelectric detector; The optical system module comprises a gas chamber for containing the methane gas to be measured.
3. The non-dispersive infrared methane concentration detection system based on PSO-BP algorithm according to claim 1 is characterized in that: The system also includes a human-computer interaction module, which is designed with a management area and a user area, and can perform parameter setting and threshold setting operations.
4. A methane concentration detection system based on PSO-BP according to claim 1, characterized in that: The working process of the PSO-BP neural network module includes: The methane concentration is collected every once in a while, and the collected methane concentration data is used as the input vector x, x = [x1, x2, ..., x n ], where n is the number of methane concentration data collected; The vector x is input into the neural network module as input data. The collected methane concentration is processed based on the PSO-BP neural network module, and the output data is: Where m is the number of hidden layer dimensions of the neural network, W 2jk represents the weight from the jth neuron in the hidden layer to the kth neuron in the output layer, b 2k represents the threshold of the kth neuron in the output layer, W 1ij represents the weight from the i-th neuron in the input layer to the j-th neuron in the hidden layer, b 1j represents the threshold of the jth neuron in the hidden layer, where i belongs to n and j belongs to m.
5. The methane concentration detection system based on PSO-BP according to claim 1, characterized in that: The working process of the display and warning module includes: Obtain the correction value vector set of the methane concentration data collected n times, y = [y1, y2, ..., y n ]; Compare the correction values of the methane concentration data collected n times with the methane concentration threshold interval set by the system. If the correction value of any of the methane concentration data collected does not meet the methane concentration threshold interval set by the system, it means that the methane concentration is unqualified and a first-level warning is issued immediately; If the correction value of any collected methane concentration data meets the threshold range set by the system, it will continue to determine whether a second-level warning needs to be issued.
6. A methane concentration detection system based on PSO-BP according to claim 5, characterized in that: The process of continuing to determine whether a secondary warning needs to be issued includes: Construct the early warning coefficient calculation model, the expression is: Where [y1, y2] is the methane concentration threshold interval set by the system. The warning coefficient ρ is compared with the warning threshold set by the system. If the warning coefficient ρ is greater than the warning threshold set by the system, it means that the methane concentration is unqualified and a secondary warning is issued immediately.
7. A methane concentration detection system based on PSO-BP according to claim 6, characterized in that: The methane concentration threshold interval [y1, y2] is adjusted according to the environmental quality, and the adjustment calculation model is: In the formula, [y 10 ,y 20 ] is the methane concentration threshold interval adjusted according to environmental quality, q is the number of key environmental parameters involved, E p is the pth environmental parameter value, E p0 is the standard value of the pth environmental parameter, k p is the weight coefficient corresponding to the jth environmental parameter, where p belongs to q.
8. The methane concentration detection system based on PSO-BP according to claim 6, characterized in that: The level of the first-level warning is higher than the level of the second-level warning.
9. A methane concentration detection method based on PSO-BP, characterized in that: The method is implemented by the PSO-BP-based methane concentration detection system described in any one of claims 1-8.
Citation Information
Cited By
Real-time online monitoring and early warning equipment, method and system for methane gas concentration and medium
CN120510685A