Livestock and poultry breeding malodorous gas detection system and method

By designing a livestock and poultry breeding odor gas detection system and using LSTM neural network and Kalman filter to process data, the problem of cross-sensitivity and large errors of sensors in the livestock and poultry breeding environment has been solved, real-time monitoring and prediction have been achieved, and costs have been reduced. , suitable for traditional farmers.

CN118604245AInactive Publication Date: 2024-09-06ANHUI AGRICULTURAL UNIVERSITY +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410588731.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-13
Publication Date
2024-09-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Gas sensors have cross-sensitivity problems in the livestock and poultry breeding environment. They cannot specifically detect target gases, resulting in sensitivity fluctuations and large measurement errors. They cannot use a single data source for analysis and decision-making. They are also costly and difficult to popularize. traditional farmers.

Method used

A livestock and poultry breeding odor gas detection system is designed, including a main control circuit board, a sensor module, a communication module and a human-computer interaction module. The LSTM neural network model is used for data preprocessing and prediction, and the Kalman filter is combined to reduce noise errors. , realize real-time monitoring and visualization of data through microcontroller and cloud platform, and use buzzer module to alarm.

Benefits of technology

It realizes real-time monitoring and prediction of the concentration of odorous gases in livestock and poultry breeding, reduces sensor errors, provides visual data display and alarm functions, is suitable for traditional farmers, and reduces system costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118604245A
    Figure CN118604245A
Patent Text Reader

Abstract

The invention relates to the technical field of gas detection, and discloses a livestock and poultry breeding malodorous gas detection system and method based on multi-sensor data fusion, and the method comprises the following steps: carrying out a gas calibration experiment related to three gases of methane, ammonia gas and hydrogen sulfide in a laboratory environment, and reading the data analog quantity of gas sensors by using a single-chip microcomputer; uploading the acquired data to upper computer monitoring software developed by Labview through serial port communication, and storing the data in a table form; reading the data set by using Pycharm, and carrying out fusion operation on the data based on a state estimator of a Kalman filter and an LSTM neural network; and training the model, inputting analog quantities of the three gas sensors and a target gas code, outputting a gas concentration prediction value in the state, and finally compiling a model file into a binary model file capable of running on a target embedded system and burning the binary model file into a single-chip microcomputer, thereby realizing real-time prediction of the concentration of the malodorous gas in the livestock and poultry breeding environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gas detection, and in particular to a system and method for detecting malodorous gases in livestock and poultry breeding. Background Art

[0002] With the rapid transformation and development of the livestock and poultry farming industry, meat products have become an indispensable part of people's menus. However, due to the inability to effectively solve the quality, environment and safety issues, the quality and safety of meat products have repeatedly attracted attention. The main reason is that the farms are highly airtight and have high breeding density. While producing a large number of livestock and poultry products, the farms also emit a large amount of waste gas, which mainly comes from livestock and poultry excrement and sewage, followed by bedding, feed residues, dead poultry and livestock, skin secretions, etc. This type of waste gas will not only cause environmental pollution, but also seriously affect the physiological health of farmers and livestock and poultry, causing a variety of diseases, and then affecting the output and quality of agricultural products.

[0003] my country has made some progress in waste gas monitoring, mainly in the research and development of waste gas treatment technologies and instruments. For example, waste gas treatment technologies such as adsorption-catalytic oxidation, membrane separation and electrochemical oxidation have been widely used. At the same time, relevant Chinese institutions are also developing technology for drones equipped with portable gas detection equipment to achieve rapid monitoring of pollution sources.

[0004] However, gas sensors generally have cross-sensitivity problems and cannot specifically detect target gases. Due to environmental and hardware issues, the sensitivity fluctuations and measurement errors of the sensors themselves are large, and it is impossible to use a single data source for analysis and decision-making. At the same time, the cost is high, which makes it difficult for traditional farmers to popularize it. Summary of the invention

[0005] The purpose of the present invention is to provide a system and method for detecting malodorous gases in livestock and poultry farming. The technical problem solved by the present invention is that gas sensors generally have cross-sensitivity problems and are unable to perform specific detection of target gases. Due to environmental and hardware problems, the sensitivity fluctuations and measurement errors of the sensors themselves are large, and it is impossible to use a single data source for analysis and decision-making.

[0006] The purpose of the present invention can be achieved by the following technical solutions:

[0007] A livestock and poultry breeding odor gas detection system, comprising:

[0008] The main control circuit board is used to provide a power supply module with different voltages for each part of the circuit system, and is used to connect the interfaces of various hardware modules and the panel interface of the switch button;

[0009] The sensor module is used to detect the concentration of three target gases in real time. Its analog quantity and voltage information are received by the single chip microcomputer and sent to the computer;

[0010] Communication module, used to send data to the Wi F i module of the cloud platform through HTTP protocol; Bluetooth slave module used to upload data to the host computer;

[0011] Human-computer interaction module, used to display sensor voltage, gas concentration information, temperature and humidity information in real time; buttons used to control the system to set concentration thresholds;

[0012] Computer software algorithms for visualizing sensor data, data preprocessing, building LSTM neural network models, and predicting target gas concentrations.

[0013] As a further solution of the present invention: through the three buttons in the human-computer interaction area, the target gas concentration threshold is selected and modified, the real-time gas concentration is compared with the set threshold parameters, and the alarm function is realized in combination with the buzzer module.

[0014] As a further solution of the present invention: in the human-computer interaction module, the upper computer part of the system is built using the Lab ew graphical programming environment, and the serial port communication function between the lower computer and the lower computer is realized using the VI SA driver to perform data transmission;

[0015] Set the collection time interval on the host computer;

[0016] By plotting the data into images and displaying them visually, the concentration changes of the target gas and the temperature and humidity information of the current environment can be observed in real time.

[0017] As a further solution of the present invention: the laboratory self-test data set is screened, some data information that has not reached a steady state is deleted, all data sets are aggregated, and a state estimator based on a Kalman filter is used to smooth the data, delete noise points and reduce noise errors; the processed data is put into an LSTM neural network for training to predict the target gas concentration.

[0018] As a further solution of the present invention: using an LSTM neural network model for data prediction, the model is based on the Keras library to build a neural network model.

[0019] As a further solution of the present invention: the LSTM neural network model includes two LSTM layers and one fully connected layer.

[0020] As a further solution of the present invention: each LSTM layer includes 64 neural units, which mainly include three key parts, namely a forget gate, an input gate and an output gate.

[0021] As a further solution of the present invention: the forget gate is mainly used to control the retention of information, the input gate determines whether new information will be added to the state, and the output gate determines the final output state. The fully connected layer contains 32 neural units.

[0022] As a further solution of the present invention: the activation functions used in the two LSTM layers are both Tanh activation functions, which work by mapping each input value to an output value between -1 and 1, and the derivative is symmetrical, and its expression is as follows:

[0023]

[0024] A method for detecting malodorous gases in livestock and poultry farming, comprising the following steps:

[0025] Step 1: Power on and enter standby mode, give a power-on signal, start the system, and initialize each module;

[0026] Step 2: Preheat the gas sensor and wait for the reading to stabilize;

[0027] Step 3: Sample environmental parameters to detect H2S, NH3, CH4 gas concentrations and environmental temperature and humidity information; upload the collected data to the host computer and OneNet cloud platform in real time for monitoring; the yellow LED light flashes once to indicate data upload;

[0028] Step 4: Compare the gas concentration data with the concentration threshold. If it exceeds the threshold, the red LED light will be on and the buzzer module will be activated to remind you. For safety reasons, it needs to be turned off manually.

[0029] Step 5: Before shutting down the system, you need to stop the data receiving function on the host computer to save the data locally and then power off the system.

[0030] Beneficial effects of the present invention:

[0031] The present invention can monitor the concentration of malodorous gases and environmental temperature and humidity parameters in livestock and poultry breeding in real time. Through hardware programming, the sensor data collection and the single-chip microcomputer serial port communication function are realized, and the trained LSTM model is built into the single-chip microcomputer. The concentration is predicted through real-time sensor data, and the communication module is used to send the data to the host computer and the cloud platform respectively, so as to realize data visualization and save the data for later query and use. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The present invention will be further described below in conjunction with the accompanying drawings.

[0033] Figure 1 It is a schematic diagram of the structure of the livestock and poultry breeding malodor gas detection system of the present invention. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] Example 1

[0036] See also Figure 1 As shown, the present invention is a livestock and poultry breeding odor gas detection system, comprising:

[0037] The main control circuit board is used to provide a power supply module with different voltages for each part of the circuit system, and is used to connect the interfaces of various hardware modules and the panel interface of the switch button;

[0038] The sensor module is used to detect the concentration of three target gases in real time. Its analog quantity and voltage information are received by the single chip microcomputer and sent to the computer;

[0039] Specifically, conduct a gas calibration experiment in a laboratory environment. Prepare gas sampling bags containing standard concentrations of H2S, CH4, and NH3 gases and corresponding syringes in advance for backup. Place the detection device in a sealed box and turn on the internal fan to ensure air circulation in the box. Monitor the sensor readings through the host computer, and after the readings stabilize, inject the same concentration of the test gas into the sealed box at regular intervals and record, and repeat the operation; after the gas information is collected, open the cover, turn on the exhaust fan, and evacuate the gas in the box to wait for the next experiment. After completing three sets of experiments, the original three sets of gas calibration self-test data sets are obtained;

[0040] The concentration prediction results of each target gas are based on the data of three gas sensors, which reduces the error generated during concentration detection to a certain extent. The gas calibration self-test data in the laboratory environment is used as the data set for training the neural network model. A certain concentration of target gas is injected in a sealed environment according to the corresponding concentration gradient.

[0041] Three gas concentration threshold parameters are built into the hardware program. The three buttons in the human-computer interaction area are used to select and modify the target gas concentration threshold. The real-time gas concentration is compared with the set threshold parameters, and the alarm function is realized by combining with the buzzer module.

[0042] Communication module, used to send data to the Wi F i module of the cloud platform through HTTP protocol; Bluetooth slave module used to upload data to the host computer;

[0043] Human-computer interaction module, used to display sensor voltage, gas concentration information, temperature and humidity information in real time; buttons used to control the system to set concentration thresholds;

[0044] Computer software algorithms for visualizing sensor data, data preprocessing, building LSTM neural network models, and predicting target gas concentrations;

[0045] Specifically, the upper computer part of the system is built using the Lab ew graphical programming environment, and the serial communication function between the lower computer and the VI SA driver is used to realize data transmission. The acquisition time interval can be set on the upper computer. The data is drawn into an image for visual display, and the concentration information change of the target gas and the temperature and humidity information of the current environment can be observed in real time. Finally, all the sensor data information monitored this time is saved in a table form for easy query and use later.

[0046] The laboratory self-test data set was screened, and some data information that had not reached a steady state was deleted. All data sets were summarized, and a state estimator based on a Kalman filter was used to smooth the data, remove noise points and reduce noise errors. The processed data was put into an LSTM neural network for training to predict the target gas concentration.

[0047] The LSTM neural network model is used for data prediction. The model is based on the Keras library to build a neural network model, which contains two LSTM layers and one fully connected layer. Each LSTM layer contains 64 neural units, mainly including three key parts, namely the forget gate, input gate and output gate. The forget gate is mainly used to control the retention of information. The input gate determines which new information will be added to the state, and the output gate determines the final output state. The fully connected layer contains 32 neural units. The activation function used in the two LSTM layers is the Tanh activation function. The Tanh activation function is one of the widely used activation functions and is used to introduce nonlinearity in neural networks. It works by mapping each input value to an output value between -1 and 1. Its derivative is symmetrical, so it can perform better in some cases. Its expression is as follows:

[0048]

[0049] This setting enables the neural network model to obtain more complex and in-depth learning capabilities, better acquire features in the input data, and make the model have stronger classification and prediction capabilities.

[0050] The trained LSTM network model is compiled to obtain a binary model file that can be run on the target embedded system and burned into the microcontroller, so that the real-time analog quantities input into the three gas sensors can predict the target gas concentration and display it in real time on the display module.

[0051] Example 2

[0052] The present invention is a method for detecting malodorous gases in livestock and poultry farming, comprising the following steps:

[0053] Step 1: Power on and enter standby mode, give a power-on signal, start the system, and initialize each module;

[0054] Step 2: Preheat the gas sensor and wait for the reading to stabilize;

[0055] Step 3: Sample environmental parameters to detect H2S, NH3, CH4 gas concentrations and environmental temperature and humidity information; upload the collected data to the host computer and OneNet cloud platform in real time for monitoring; the yellow LED light flashes once to indicate data upload;

[0056] Step 4: Compare the gas concentration data with the concentration threshold. If it exceeds the threshold, the red LED light will be on and the buzzer module will be activated to remind you. For safety reasons, it needs to be turned off manually.

[0057] Step 5: Before shutting down the system, you need to stop the data receiving function on the host computer to save the data locally and then power off the system.

[0058] The working principle of the present invention is as follows: Based on the Ke i l5 programming software, a program that can realize functions such as sensor data reading, serial port communication, OneNet cloud platform server connection and module initialization is burned into the single-chip microcomputer, the main control circuit board is designed and manufactured, and the gas detection device prototype is obtained after connecting various hardware.

[0059] The functions and interface of the upper computer are designed through Labview graphical programming software, so that serial communication can be realized through VISA driver to connect to the lower computer, read the uploaded data and visualize it, present the changes of sensor indications in the form of curve graphs, and save all data in tabular form.

[0060] After completing the design and production of the lower and upper computers, conduct a gas calibration experiment in a laboratory environment. Prepare gas sampling bags containing standard concentrations of H2S, CH4, and NH3 gases and corresponding syringes in advance. Place the detection device in a sealed box and turn on the internal fan to ensure air circulation in the box. Monitor the sensor readings through the upper computer, and after the readings stabilize, inject the same concentration of the gas to be tested into the sealed box at intervals and record, and repeat the operation. After the gas information is collected, open the cover, turn on the exhaust fan, and evacuate the gas in the box to wait for the next experiment. After completing three sets of experiments, the original three sets of gas calibration self-test data sets are obtained.

[0061] Due to interference from the environment or the sensor itself, the data in the data set may fluctuate greatly, so it is necessary to exclude outliers and some data that have not reached a stable state, and use the Kalman filter to smooth the data, fit a relatively smooth curve and retain the step information. The three processed data sets are merged to obtain a complete experimental data set.

[0062] After completing data preprocessing and preparing the data set, build an LSTM neural network model, which includes two LSTM layers and one fully connected layer. The parameters are selected through grid search and cross-validation methods to finally determine the optimal parameters. The LSTM layer has 64 neural units, the fully connected layer is set to 32 neural units, and the activation function uses the Tanh activation function. This setting can provide the neural network with more complex and in-depth learning capabilities, so as to better capture the features in the input data and make the model have stronger classification and prediction capabilities. Put the data set into the model for training, so that after inputting the three sensor readings and the target gas code, the concentration value of the gas in the current state can be predicted. Compare the MSE mean square error during training and verification for model evaluation. Save the best model and name it as mode l.h5.

[0063] Open the trained model l.h5 model file, use the TensorFlow L i te converter to convert it to the TensorFlow L i te model (suffix .tf li te), and compile the TensorFlow L i te model into a binary model file (suffix .cc and .h) that can run on the target embedded system through TensorFlow L i te for Microcontrollers (TFLM). Copy the generated model l.cc and model lh files to the corresponding example project of the STM32F103C8T6 development board, modify the code, compile and burn it. Finally, realize the concentration conversion work on the lower computer side, and display the concentration results on the OLED screen.

[0064] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0065] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. A livestock and poultry breeding odor gas detection system, characterized in that: include: The main control circuit board is used to provide a power supply module with different voltages for each part of the circuit system, and is used to connect the interfaces of various hardware modules and the panel interface of the switch button; The sensor module is used to detect the concentration of three target gases in real time. Its analog quantity and voltage information are received by the single chip microcomputer and sent to the computer; Communication module, used to send data to the WiFi module of the cloud platform via HTTP protocol; Bluetooth slave module used to upload data to the host computer; Human-computer interaction module, used to display sensor voltage, gas concentration information, temperature and humidity information in real time; A button for controlling the system to set the concentration threshold; Computer software algorithms for visualizing sensor data, data preprocessing, building LSTM neural network models, and predicting target gas concentrations.

2. A livestock and poultry breeding odor gas detection system according to claim 1, characterized in that: Through the three buttons in the human-computer interaction area, the target gas concentration threshold can be selected and modified, the real-time gas concentration can be compared with the set threshold parameters, and the alarm function can be realized by combining with the buzzer module.

3. The livestock and poultry breeding odor gas detection system according to claim 1 is characterized in that: In the human-computer interaction module, the Labiew graphical programming environment is used to build the upper computer part of the system, and the VISA driver is used to realize the serial port communication function between the lower computer and perform data transmission; Set the collection time interval on the host computer; By plotting the data into images and displaying them visually, the concentration changes of the target gas and the temperature and humidity information of the current environment can be observed in real time.

4. The livestock and poultry breeding odor gas detection system according to claim 1 is characterized in that: The laboratory self-test data set was screened, and some data information that had not reached a steady state was deleted. All data sets were summarized, and a state estimator based on a Kalman filter was used to smooth the data, remove noise points and reduce noise errors. The processed data was put into an LSTM neural network for training to predict the target gas concentration.

5. The livestock and poultry breeding malodor gas detection system according to claim 1 is characterized in that: The LSTM neural network model is used for data prediction, and the neural network model is built based on the Keras library.

6. A livestock and poultry breeding odor gas detection system according to claim 5, characterized in that: The LSTM neural network model contains two LSTM layers and one fully connected layer.

7. A livestock and poultry breeding odor gas detection system according to claim 6, characterized in that: Each LSTM layer contains 64 neural units, which mainly include three key parts: forget gate, input gate and output gate.

8. The livestock and poultry breeding malodor gas detection system according to claim 7 is characterized in that: The forget gate is mainly used to control the retention of information, the input gate determines whether new information will be added to the state, and the output gate determines the final output state. The fully connected layer contains 32 neural units.

9. A livestock and poultry breeding odor gas detection system according to claim 8, characterized in that: The activation function used in both LSTM layers is the Tanh activation function, which works by mapping each input value to an output value between -1 and 1. The derivative is symmetrical and its expression is as follows:

10. A method for detecting malodorous gases in livestock and poultry farming, characterized in that: The following steps are involved: Step 1: Power on and enter standby mode, give a power-on signal, start the system, and initialize each module; Step 2: Preheat the gas sensor and wait for the reading to stabilize; Step 3: Sample environmental parameters to detect H2S, NH3, CH4 gas concentrations and environmental temperature and humidity information; upload the collected data to the host computer and OneNet cloud platform in real time for monitoring; the yellow LED light flashes once to indicate data upload; Step 4: Compare the gas concentration data with the concentration threshold. If it exceeds the threshold, the red LED light will be on and the buzzer module will be activated to remind you. For safety reasons, it needs to be turned off manually. Step 5: Before shutting down the system, you need to stop the data receiving function on the host computer to save the data locally and then power off the system.

Citation Information

Patent Citations

  • Method and apparatus for inspecting two-kind gas sensor array combination odour

    CN101074947A

  • Device for acquiring field data of various kinds of harmful gas

    CN102539628A

  • Environment monitoring method and equipment for live poultry feeding of intelligent cage and medium

    CN113240152A

  • Livestock and poultry house breeding environment harmful gas detection system

    CN113281465A

  • Gas detection method and system for eliminating influence of interference gas

    CN114544868A