Rotor-borne atmospheric environmental pollutant detection device and method

By designing a pump-suction tandem cavity and AGRU neural network model on the rotor, the gas detection accuracy problem under the influence of the rotor airflow disturbance is solved, and efficient and accurate detection of air pollutants is achieved, which is suitable for large-scale monitoring. .

CN115144229BActive Publication Date: 2025-01-17HEBEI UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210534270.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-17
Publication Date
2025-01-17
Estimated Expiration
2042-05-17

AI Technical Summary

Technical Problem

The existing rotor-mounted gas detection device, under the airflow disturbance caused by the rotor, leads to inreliability of detection data, low accuracy, and complex equipment structure, which consumes a large amount of water resources and is not conducive to carrying.

Method used

A pump-suction tandem cavity structure including an adjustable speed miniature air pump, an airflow buffer chamber and a gas rapid response chamber are designed. The airflow is stabilized through the airflow buffer chamber, and the gas rapid response chamber provides a closed reaction environment, combined with the AGRU neural network model Perform data processing and analysis to achieve accuracy and efficiency of gas detection.

Benefits of technology

It effectively overcomes the impact of rotorcraft airflow on sensors, improves the accuracy and efficiency of gas detection, reduces energy consumption, is suitable for large-scale air environment monitoring, and the device is small and lightweight.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115144229B_ABST
    Figure CN115144229B_ABST
Patent Text Reader

Abstract

The present invention discloses a device and method for detecting atmospheric pollutants carried by a rotorcraft, including a sampling unit and a detection unit. The sampling unit includes a gas transmission module and a gas response module, wherein the gas transmission module is used to continuously pump in external gas at a stable flow rate, and the gas response module is used for the gas to react with an electrochemical gas sensor; the detection unit is used to drive the modules of the entire system to work normally, collect and transmit sensor data, and process and analyze the data. The present invention utilizes a method combining the integrated series structure in the gas transmission module and the gas response module to overcome the influence of the airflow disturbance of the multi-rotor aircraft on the sensor and speed up the response speed of the electrochemical gas sensor; the detection method improves the detection accuracy of the device for environmental atmospheric pollutants, and the device can simultaneously realize the composition identification and concentration prediction of the pollutant gas, saving time and resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field:

[0001] The invention belongs to the technical field of rapid detection of environmental multi-component gases, and in particular relates to an atmospheric environment detection device and method carried by a rotorcraft. Background technology:

[0002] Most existing air pollution monitoring systems are base station type or portable. Base station type monitoring systems are limited by their spatial location and can only reflect the air quality conditions in the area near the base station, and they are also relatively expensive. Portable monitoring systems can only meet monitoring needs within a small range and cannot adapt to the monitoring of air pollution in a large area. They also have limitations in many emergency situations, such as factory chemical leaks, fire scenes, and other scenarios where it is difficult for emergency personnel to intervene. Therefore, using unmanned systems instead of manual methods to monitor the air quality environment in local areas can effectively reduce labor costs, ensure the safety of emergency personnel in emergency situations, complete accurate assessments of the on-site gas environment, and effectively improve rescue efficiency.

[0003] Existing unmanned systems can be roughly divided into underwater unmanned systems, ground unmanned systems and aerial unmanned systems according to their application scenarios. Among them, the advantage of aerial unmanned systems is that they are less affected by terrain and can efficiently complete large-scale air quality monitoring tasks. The multi-rotor system can even better maintain hovering in the air, continuously sampling at a certain point so that the gas sensor reaches a response balance, which can more truly reflect the gas composition and content at that location. Since the rotation of the multi-rotor propeller will have a great impact on the diffusion of the surrounding airflow, the wash airflow generated by various movements of the rotorcraft is also different, and the stability of the air pressure condition is directly related to the signal-to-noise ratio of the gas sensor response, so the modeling of the air pressure condition and sensor response of the airborne gas monitoring system is relatively complex.

[0004] Patent CN114076818A discloses a gas detection device and method. The device mainly sets a condensation module to reduce the temperature of the incoming gas so that the temperature of the gas meets the working range of the tester and improves the detection accuracy. However, the condensation module for cooling the industrial waste gas in the device mainly uses water. The device is provided with a water storage module and a drain outlet, which makes the device inconvenient to carry. Moreover, since a large amount of water resources are required, it is not conducive to the loading of the rotorcraft.

[0005] Patent CN112986070B proposes an exhaust gas detection device, method and system, which is equipped with a pre-processing unit with condensation dehumidification and temperature and flow detection. The condensation chamber is cooled according to the monitored gas temperature and the pre-set target power, so that the efficiency of vehicle exhaust gas detection can be improved. However, its calculation process is complicated, and excessive pre-processing of the gas may cause changes in the final gas composition and concentration.

[0006] If the above-mentioned gas detection device is hung on a rotorcraft, the airflow disturbance caused by the rotor will make the on-site detection data unreliable, resulting in a low accuracy rate of the detection results. Therefore, improvement is needed to fully consider the impact of external airflow changes on the sensor. An atmospheric environment detection device and method based on a rotorcraft are proposed. Summary of the invention:

[0007] In view of the shortcomings of the prior art, the purpose of the present invention is to provide an atmospheric environmental pollutant detection device and detection method for a rotorcraft. The detection device and method are suitable for pollutant gas detection in rotorcraft, can overcome the influence of the airflow generated by the rotorcraft propeller on gas detection, and improve the accuracy of gas detection.

[0008] To achieve the above object, the present invention provides the following technical solutions:

[0009] A device for detecting atmospheric pollution gas carried by a rotorcraft comprises a rotorcraft, a sampling unit and a detection unit, wherein the sampling unit comprises a gas transmission module 11 and a gas response module 12; the gas transmission module 11 has a speed-adjustable micro air pump 112, and the speed-adjustable micro air pump 112 is connected to the external gas and the gas response module 12 through corresponding pipelines; the device is characterized in that:

[0010] The gas response module 12 includes an airflow buffer chamber 121, a driving amplifier circuit 124 and a gas rapid response chamber 122. The airflow buffer chamber 121 and the gas rapid response chamber 122 are on the same gas path as the gas transmission module 11. The airflow buffer chamber 121 and the gas rapid response chamber 122 are connected in series in an integrated manner. The gas rapid response chamber 122 has a plurality of cap-type cavities connected in series in sequence. Each cap-type cavity has a shell, an electrochemical gas sensor 1224 installed inside the shell, and a micro-response gas chamber located above the electrochemical gas sensor 1224. 1222, the outer wall of the electrochemical gas sensor 1224 is in close contact with the inner wall of the shell, the air flow will not flow out from the gap between the two, and the height of the inner cavity of the shell is greater than the height of the electrochemical gas sensor 1224, and there is a breathable membrane on the top of the electrochemical gas sensor 1224. The size of the micro-response gas chamber 1222 is consistent with the size of the breathable membrane, and the diameter of the breathable membrane is smaller than the outer diameter of the electrochemical gas sensor. After passing through the breathable membrane, the gas enters from the air inlet in the middle of the electrochemical gas sensor 1224, which can better prevent the gas from leaking out of the micro-response gas chamber 1222;

[0011] The outputs of the multiple electrochemical gas sensors are connected to the detection unit through the driving amplifier circuit 124;

[0012] A temperature and humidity sensor 1213 is installed in the airflow buffer chamber 121 to measure and obtain the temperature and humidity information of the ambient atmosphere;

[0013] The detection unit 2 is used to obtain the data of each electrochemical gas sensor processed by the temperature and humidity sensor 1213 and the driving amplifier circuit 124, as well as the speed, acceleration, attitude information, and positioning information of the rotorcraft, process and analyze the data, and output the gas detection results.

[0014] The electrochemical gas sensor contains substances such as electrolyte that will react chemically with the target gas. The target gas enters the electrochemical gas sensor through the air inlet at the top of the electrochemical gas sensor to produce a reaction. The internal space of the sensor is very small, and the flow of air is ignored. The gas to be tested enters from the air inlet 111 under the action of the adjustable speed micro air pump 112, is transmitted to the air inlet 1211 of the air flow buffer cavity and enters the air flow buffer cavity 121, and then the air flow enters the gas rapid response cavity 122 through the gas rapid response cavity air inlet 1221, and after reacting with the electrochemical gas sensor 1224 in the gas rapid response cavity 122, it is discharged from the gas path through the air outlet 123.

[0015] The gas delivery module 11 is used to continuously pump in external gas at a stable flow rate;

[0016] The gas response module 12 is used to stabilize the gas flow, provide a closed response environment for the electrochemical gas sensor, and achieve a full reaction between the gas and the electrochemical gas sensor;

[0017] The detection unit 2 is used to drive the modules of the whole device to work normally, collect and transmit various sensor data, process and analyze the data. The detection unit is loaded with an AGRU neural network model for detecting the concentration of atmospheric pollutant gases.

[0018] The electrochemical gas sensor 1224 can be any electrochemical gas sensor made according to the size of the "4 series" three-electrode electrochemical sensor, including but not limited to CO, SO2, H2S, O3, NO2, Freon, CH4, CO2 and other sensors, which can be replaced at will to measure different gases. The number of electrochemical gas sensors is at least 1, preferably 4-6. The types of multiple electrochemical gas sensors can be the same or different, and they can measure different types of gases in the environment at the same time. When they are of the same type, the response value of the first electrochemical gas sensor shall prevail.

[0019] The electrochemical gas sensor has a bottom diameter of 20.2 mm and a height of 16.6 mm. The cap-type cavity has a height of 24.2 mm, a bottom outer diameter of 24.4 mm, and a wall thickness of 2 mm. The electrochemical gas sensor is placed in the middle. The micro-response gas chamber has a height of 4.4 mm and a bottom diameter of 17 mm. The gas rapid response cavity has an outer diameter of 2 mm and an outer diameter of 4 mm. The vent wall thickness is 1 mm, and the distance from the center of the gas rapid response cavity inlet to the bottom is 19 mm.

[0020] Preferably, the detection unit 2 includes a battery 21, a GPS receiver 22, a core processor 23, an inertial sensor 24, an external communication interface 25, and a data storage module 26. The battery 21 is used to provide energy to various parts of the entire device; the core processor 23 is electrically connected to the adjustable speed micro air pump 112, the temperature and humidity sensor 1213, the driving amplifier circuit of the electrochemical gas sensor, the battery 21, the GPS receiver 22, the inertial sensor 24, the external communication interface 25, and the data storage module 26;

[0021] The GPS receiver 22 is used to receive positioning information and send the positioning information to the core processor 23;

[0022] The core processor 23 is used to control the operation of the entire device and perform data processing, gas analysis, etc.

[0023] The inertial sensor 24 is used to obtain the speed, acceleration and attitude information of the rotorcraft;

[0024] The external communication interface 25 is used to send data;

[0025] The data storage 26 is used to store data.

[0026] The gas rapid response chamber air inlet in the cap-type cavity is located in a section inside the cap-type cavity which is an air guide groove, and the tail end of the air guide groove is arc-shaped, bending downward toward the air inlet of the electrochemical gas sensor; the structure of the airflow buffer cavity is also a cap-type cavity, and no electrochemical gas sensor is installed in the airflow buffer cavity, but a temperature and humidity sensor is installed, and the outer shell height of the airflow buffer cavity is not greater than the outer shell height of the cap-type cavity in the gas rapid response cavity.

[0027] The present invention also protects a method for detecting atmospheric environmental pollution gases carried by a rotorcraft, characterized in that the process of the detection method is:

[0028] Step 1: Obtain the electrochemical gas sensor response data of different gases with different concentrations under different atmospheric environment data, and construct a data set (S1, S2, S3, …, S n ), where n is the number of electrochemical sensors in the detection device, S1, S2, S3, ..., S n They represent the response value time series of the corresponding electrochemical sensor, and the length of each time series is N. Before constructing the data set, the concentration range of different gases is set and the highest concentration is recorded. When constructing the data set, the response data of the corresponding electrochemical gas sensor under different known concentrations is obtained within the given concentration range.

[0029] The atmospheric environment data includes temperature data and humidity data of atmospheric environment pollutants;

[0030] Step 2: For the data set (S1, S2, S3, …, S n ) to obtain the training sample set X(S'1, S'2, S'3, ..., S' n ), X represents a small sample time series after data preprocessing. The specific process is:

[0031] Step 21: using the temperature compensation characteristic curve in the electrochemical gas sensor data manual and the atmospheric environment data obtained in step 1 to check the temperature compensation characteristic curve, obtaining the compensation value of the electrochemical gas sensor response through the curve, performing response compensation on the electrochemical gas sensor data, and obtaining compensated electrochemical sensor data;

[0032] Step 22: Performing baseline processing on the compensated data to obtain an effective value of the electrochemical gas sensor after the baseline processing;

[0033] Step 23: filtering the effective value of the electrochemical gas sensor after the baseline processing to obtain filtered data;

[0034] Step 24: setting the sampling window size and smoothing step size, and resampling the filtered data using sliding window sampling, wherein the time series length of the resampled samples is much shorter than the length of the response value time series obtained in step 1;

[0035] Step 25: Manually add labels and encode the resampled samples

[0036] The resampled samples are encoded using a multi-label encoding method. The label encoding is divided into two parts: category and concentration. The label dimension of each part is the same as the number n of electrochemical sensors. The category label is encoded in a binary manner, and each dimension takes a value of 0 or 1. The concentration label is the ratio of the current concentration to the maximum concentration. There are 2n dimensions in total, which are arranged horizontally in sequence. When the label of the classification part is 1, it means that the atmospheric environment monitored by the sensor contains such gas, and the corresponding concentration part label is the ratio of the current concentration of such gas to the maximum concentration. When the label of the classification part is 0, it means that the atmospheric environment does not contain such gas, and the corresponding concentration part label is also set to 0.

[0037] Step 26: Divide the resampled samples and the added labels to obtain the training sample set X(S'1, S'2, S'3, ..., S' n ) and the test sample set, each sample in the training sample set corresponds to the encoded binary label;

[0038] Step 3: Build the AGRU neural network model

[0039] The constructed AGRU neural network model consists of two parts: encoder and decoder. The encoder part includes a gated recurrent unit layer and an attention mechanism structure, and the decoder part includes a flattening layer, a fully connected layer, and a sigmoid layer. The output length of the decoder part is 2n.

[0040] Step 4: Train the AGRU neural network model through the training sample set to obtain the atmospheric environmental pollution gas detection model;

[0041] Step 5: Deploy the obtained atmospheric environment pollution gas detection model on the core processor to perform real-time atmospheric environment pollution gas detection.

[0042] The specific process of step 4 is as follows:

[0043] Step 41: input the training sample set into the gated recurrent unit layer to obtain the response characteristics of the electrochemical gas sensor at each moment, wherein the size of the input sample is m*n, m is the length of the time series in each sample after the sliding window sampling process, n is the number of electrochemical gas sensors, and the feature size output by the gated recurrent unit is m*l, wherein m is the number of gated recurrent units, which is equal to the length of the time series in each sample after the sliding window sampling process; l is the number of hidden neurons of the gated recurrent unit used;

[0044] Step 42: The response features obtained in step 41 are passed into the attention mechanism structure. The attention mechanism structure includes a fully connected layer and a softmax layer, and the output is the weight of the feature at each moment;

[0045] Step 43: multiply the features output by the gated recurrent unit layer in step 41 by the weights output in step 42 to obtain the output features of the encoder, with a size of m*l;

[0046] Step 44: Input the output features of the encoder into the flattening layer in the decoder to obtain a flattening layer one-dimensional vector, the length of the flattening layer one-dimensional vector is (m*l);

[0047] Step 45: Input the flattened layer one-dimensional vector into the fully connected layer to obtain a one-dimensional vector of the fully connected layer. There are three fully connected layers in total, namely the first fully connected layer, the second fully connected layer and the third fully connected layer. The number of neurons in the first fully connected layer is 50, the number of neurons in the second fully connected layer is 25, and the number of neurons in the third fully connected layer is 8. The output length of the third fully connected layer is the dimension of the label set in step 25.

[0048] Step 46: Input the one-dimensional vector of the fully connected layer into the sigmoid layer to obtain the predicted label (c1, c2, c3, c4, c5, c6, c7, c8) of the training sample. The specific steps are:

[0049] The sigmoid function is used to map the one-dimensional variable of the fully connected layer to a decimal between 0 and 1, where the first n dimensions represent the classification part. When the label value is greater than 0.5, it is set to 1, and when it is less than 0.5, it is set to 0; the last n dimensions represent the concentration part. When the current n dimensions appear 1, the label value of the corresponding dimension will take effect, representing the ratio of the current concentration of this gas to the maximum concentration. When the corresponding dimension of the current classification part is 0, the latter is directly set to 0;

[0050] Step 47: reversely train the AGRU neural network model according to the predicted labels and the real labels of the samples in the training sample set to obtain an atmospheric environmental pollution gas detection model, specifically:

[0051] The loss value between the predicted label and the true label is calculated using a double loss function, effectively combining the classification of atmospheric pollutant gases with concentration prediction. The formula for calculating the loss value is:

[0052]

[0053]

[0054] Loss = W1Loss class +W2Loss conc

[0055] In the formula, Loss class Represents the loss value of the classification part, Loss conc represents the loss value of the concentration part, m represents the length of the time series in the sample after the sliding window is sampled, out_dim represents the dimension of the classification part, and y ij is the true label of the sample, Represents the predicted label of the sample, W1 and W2 are the weights of the two parts, satisfying W1+W2=1;

[0056] The AGRU neural network model is reversely trained according to the loss function until the number of reverse training reaches a preset number of iterations, and the atmospheric environment pollution gas detection model training is completed;

[0057] The specific process of step 5 is:

[0058] Step 51: Save the AGRU neural network model obtained in step 4 as a model file with the suffix .h5;

[0059] Step 52: Select Additional Software in STM32Cu-MX and enter the plug-in X-CUBE-AL;

[0060] Step 53: In the X-CUBE-AL plug-in, select ArtificialIntelligence as the Soft Component Class, confirm that the X-CUBE-AI version is 5.2.0, check Core, and select the type of project to be generated as Application template;

[0061] Step 54: Provide the absolute path of the model, the name of the model, and the compression coefficient of the model in X-CUBE-AI, generate the optimized STM32 NN library through the C-code generator and automatically integrate it into the project file, including the API for calling the neural network;

[0062] Step 55: Detect atmospheric pollutant gases using the generated API for calling the neural network;

[0063] Acquire environmental data and electrochemical gas sensor data of gases in the current atmospheric environment, and process the real-time data. The data processing process is the same as steps 21-24, and implement sliding window sampling of real-time data to obtain resampled small samples. Use the API interface to input the small samples into the deployed atmospheric environmental pollution gas detection model for testing to obtain the category and concentration information of the current small samples.

[0064] Compared with the prior art, the present invention has the following beneficial effects:

[0065] 1. The present invention designs a pump-suction series cavity (air pump + integrated series cavity) to overcome the influence of rotorcraft airflow on gas sensors, realize rapid detection of rapid gas, and play an early buffering role on the pumped airflow, so that the airflow entering the gas response cavity and reacting with the electrochemical sensor is more stable, which can effectively reduce the sensor noise. The present invention applies for a detection device with a pump-suction lightweight design to minimize the influence of rotorcraft downwash airflow on sensor signals, improve the authenticity of gas component and content detection, extend the range of rotorcraft, and expand the monitoring range. It is of great significance for the on-site gas detection device carried by rotorcraft. It can effectively reduce the influence of propeller downwash airflow on sensor signals, and can effectively reduce the energy consumption of rotorcraft; it is small in size and can be widely used in the detection of ambient atmosphere.

[0066] 2. The present invention adopts a cap-type cavity structure based on the serial response module, so that the airflow flows directly from the gas rapid response cavity inlet into the sensor inlet, which speeds up the sensor response speed. For multiple cap-type cavities in series, the response start time of the sensor in each cavity is basically the same, and the air environment condition in 3D space can be quickly and accurately monitored on site, which can significantly improve the detection efficiency. After airflow simulation, the cap-type cavity structure can make the airflow flow directly into the electrochemical sensor inlet.

[0067] 3. The present invention proposes a method for detecting atmospheric environmental pollution gases based on rotorcraft, which realizes integrated processing of data collection and analysis, uses historical data to train models, and deploys the models on the core processor to realize data processing and analysis on the core processor. The model uses label encoding combined with a dual loss function to simultaneously realize the identification of the components of mixed gases and the estimation of their concentration, thus saving resources. The present invention can be applied to the monitoring and evaluation of atmospheric environmental conditions in a large range of local areas, and has strong universality; Description of the drawings:

[0068] Figure 1 A schematic diagram of the structure of an atmospheric environmental pollution gas detection device carried by a rotorcraft provided in Example 1 of the present invention;

[0069] FIG. 2( a ) is a front view cutaway schematic diagram of the gas response module 12 of the present invention.

[0070] FIG. 2( b ) is a top view schematically showing a cross-sectional view of the gas response module 12 of the present invention.

[0071] FIG3(a) is a schematic diagram of a front cross-sectional structure of a bin-type cavity.

[0072] FIG3( b ) is a schematic diagram of a top view of a cross-sectional structure of a bin-type cavity.

[0073] FIG4(a) is a schematic diagram of a front cross-sectional structure of a cap-type cavity.

[0074] FIG4( b ) is a schematic diagram of a top view of a cross-sectional structure of a cap-type cavity.

[0075] Figure 5 Simulation flow chart of the cavity of the present invention.

[0076] FIG6( a ) is a schematic diagram of a bin-type cavity flow field network;

[0077] Figure 6(b) is a schematic diagram of the cap-type cavity flow field network.

[0078] Figure 7It is a comparison chart of the velocity field streamline simulation and pressure field simulation results of the two cavities. In the figure, (a) is the velocity field streamline simulation result of the bin-type cavity, (b) is the velocity field streamline simulation result of the cap-type cavity, (c) is the pressure field simulation result of the bin-type cavity, and (d) is the pressure field simulation result of the cap-type cavity.

[0079] Figure 8 The velocity field simulation results of the integrated series structure consisting of the airflow buffer cavity and the gas rapid response cavity of the present invention;

[0080] Fig. 9 The flow chart of the detection method of the atmospheric environment pollution gas detection device based on the rotorcraft of the present invention;

[0081] Fig.10 The present invention is a data processing flow chart of the method for detecting atmospheric environmental pollution gases carried by a rotorcraft.

[0082] Fig.11 This is a structural diagram of the AGRU neural network model of the present invention.

[0083] Among them, 1 sampling unit, 11 gas transmission module, 12 gas response module, 111 air inlet, 112 adjustable speed micro air pump, 121 air flow buffer chamber, 1211 air flow buffer chamber air inlet, 1212 air flow buffer chamber air chamber, 1213 temperature and humidity sensor, 122 gas rapid response chamber, 1221 gas rapid response chamber air inlet, 1222 micro response air chamber, 1223 shell, 1224 electrochemical sensor, 1225 gas rapid response chamber outlet, 123 outlet, 124 drive amplifier circuit, 2 detection unit, 21 battery, 22 GPS receiver, 23 core processor, 24 inertial sensor, 25 communication interface, 26 data storage module. Specific implementation method:

[0084] The present invention is further explained below in conjunction with the accompanying drawings and embodiments, but this is not intended to limit the scope of protection of the present application.

[0085] Figure 1 The present invention provides a schematic structural diagram of a rotorcraft-mounted atmospheric environment pollution gas detection device, and FIG2(a) and FIG2(b) are a front sectional view and a top sectional view of a gas response module 12. The rotorcraft-mounted atmospheric environment pollution gas detection device described in this embodiment includes:

[0086] The sampling unit 1 includes a gas delivery module 11 and a gas response module 12.

[0087] The gas delivery module 11 includes an air inlet 111 and an adjustable speed micro air pump 112, the air inlet 111 is respectively connected to the external gas and the adjustable speed micro air pump 112, the adjustable speed micro air pump 112 is respectively connected to the air inlet 111 and the gas response module 12, the adjustable speed micro air pump 112 is electrically connected to the core processor 23, and the core processor 23 can control the flow rate of the adjustable speed micro air pump 223, so as to continuously pump in external gas at a stable flow rate;

[0088] In this embodiment, the average flow rate of the adjustable speed micro air pump 112 is set to 0.4 L / min. Due to the existence of the air flow buffer chamber and the air pump, the stability of the air pressure condition can be ensured.

[0089] The gas response module 12 includes an airflow buffer chamber 121 , a gas rapid response chamber 122 , and a driving amplifier circuit 124 .

[0090] The airflow buffer chamber 121 is used to buffer the pumped-in external airflow, so that the airflow entering the gas rapid response chamber remains relatively stable. At the same time, the temperature and humidity sensor 1213 in the airflow buffer chamber measures the temperature and humidity of the pumped-in external airflow. The temperature and humidity sensor is connected to the temperature driving circuit at the bottom of the airflow buffer chamber. The temperature driving circuit is connected to the circuit outside the cavity through the pin row passing through the bottom of the airflow buffer chamber, and then connected to the core processor; the temperature driving circuit and the driving amplifier circuit can be integrated on a circuit board.

[0091] The gas rapid response chamber 122 is used to eliminate the airflow interference of the rotorcraft, and at the same time, the pumped-in external gas and the electrochemical gas sensor in the gas rapid response chamber generate a response output current signal;

[0092] The electrochemical gas sensor 1224 generates a chemical reaction with the gas entering the gas fast response chamber 122 to output a current signal;

[0093] The driving amplifier circuit 124 is used to drive the electrochemical gas sensor to work normally, amplify the current signal generated by the electrochemical gas sensor and convert it into a voltage signal.

[0094] In this embodiment, the adjustable speed micro air pump 112 is connected to the air inlet 111 and the airflow buffer chamber 121 by a hose. The airflow buffer chamber 121 and the gas rapid response chamber 122 of the gas response module 12 are connected in series as an integral unit. The gas rapid response chamber 122 has a plurality of cap-type cavities connected in series in sequence. Each cap-type cavity has a shell, an electrochemical gas sensor 1224 installed inside the shell, and a micro-response air chamber 1222 located above the electrochemical gas sensor 1224. The outer wall of the electrochemical gas sensor 1224 is tightly attached to the inner wall of the shell, and the air flow will not flow out from the gap between the two. The height of the inner cavity of the shell is greater than that of the electrochemical gas sensor 1224. There is a breathable membrane on the top of the electrochemical gas sensor 1224. The size of the micro-response air chamber 1222 is consistent with the size of the breathable membrane. The diameter of the breathable membrane is smaller than the outer diameter of the electrochemical gas sensor. The air chamber is connected to the electrochemical gas sensor, and the blank part between the electrochemical gas sensor and the shell is called the air chamber. The shell 1223 can be obtained by 3D printing technology, and the material used is nylon material. The shell 1223 fits tightly with the side wall of the electrochemical gas sensor 1224, and the airflow can only diffuse in the micro-response air chamber 1222. Generally speaking, the electrochemical gas sensor is circular, and the upper end of the electrochemical gas sensor fits tightly with the lower end of the micro-response air chamber 1222, and the airflow will not flow out from the gap. There are electrolytes and other substances in the electrochemical gas sensor that will react chemically with the target gas. The target gas enters the electrochemical gas sensor through the air inlet at the top of the electrochemical gas sensor to produce a reaction. The internal space of the electrochemical gas sensor is very small, and the airflow is ignored. The gas fast response cavity 122 is connected to the air outlet 123 through a hose; the electrochemical gas sensor 1224 is connected to the core processor 23 through the driving amplifier circuit 124, and the current signal generated by the electrochemical gas sensor 1224 to generate a response output is amplified and converted into a voltage signal. There is a breathable membrane on the top of the electrochemical gas sensor. The size of the micro-response gas chamber 1222 is designed according to the size of the breathable membrane and is equivalent to the diameter of the breathable membrane. After passing through the breathable membrane, the gas enters from the air inlet in the middle of the electrochemical gas sensor, which is equivalent to saying that the air inlet of the electrochemical gas sensor is below the breathable membrane, which can better prevent the gas from leaking out of the micro-response gas chamber 1222 and avoid gas leakage in the gap between the electrochemical gas sensor and the casing.

[0095] In this embodiment, the gas to be tested enters from the air inlet 111 under the action of the adjustable speed micro air pump 112, is transmitted to the air flow buffer chamber air inlet 1211 and enters the air flow buffer chamber 121, and a temperature and humidity sensor 1213 is installed in the air flow buffer chamber 121 to measure the temperature and humidity information of the ambient atmosphere; then the air flow enters the gas rapid response chamber 122 through the gas rapid response chamber air inlet 1221, reacts with the multiple electrochemical gas sensors 1224 in the gas rapid response chamber 122 in turn, and is discharged from the gas path through the air outlet 123.

[0096] In this embodiment, the adjustable speed micro air pump 112 can use the model of Xinweicheng F35-FNY6003, the temperature and humidity sensor can use the SHT21 sensor, the detection pressure can use the HP203B sensor, which is installed in the airflow buffer chamber 121 to detect the air pressure condition. The electrochemical gas sensor in the gas rapid response chamber is optional but not limited to CO, SO2, H2S, O3, NO2 and other sensors. The electrochemical sensor (target gas is not limited) made according to the size of the "4 series" three-electrode electrochemical sensor can be used, and the number is consistent with the number of response cavities. Because it is used for atmospheric environment detection, the electrochemical gas sensor is a common gas type in the atmospheric environment. If there is a special gas detection requirement in the application, the electrochemical gas sensor of the corresponding type can be connected in series after the existing gas rapid response chamber, and an expansion circuit is also reserved on the driving amplifier circuit, which can amplify the current signal output by the newly added electrochemical gas sensor and convert it into a voltage signal, and give it to the core processor.

[0097] The detection unit 2 includes a battery 21 , a GPS receiver 22 , a core processor 23 , an inertial sensor 24 , an external communication interface 25 , and a data storage module 26 .

[0098] The battery 21 is used to provide energy to various parts of the entire device;

[0099] The GPS receiver 22 is used to receive positioning information and send the positioning information to the core processing 23;

[0100] The core processor 23 is used to configure the parameters of the driving amplifier circuit of the electrochemical sensor in the gas response module 12, and perform AD conversion on the voltage signal output by the driving amplifier circuit; drive and read the temperature and humidity information of the temperature and humidity sensor 1213 in the airflow buffer chamber 121 and calibrate the electrochemical gas sensor using the temperature characteristic curve in the data manual; receive and analyze the positioning information of the GPS receiver 22; receive the inertial sensing information of the inertial sensor 24; and control the speed of the adjustable speed micro air pump 112 and obtain the speed information at all times. A gas detection model is deployed in the core processor to pre-process the data collected by the sampling unit 1 and obtain the polluted gas information in the atmospheric environment through the deployed gas model; send the polluted gas, temperature and humidity, positioning information, and inertial sensing information through the external communication interface 25, and store the polluted gas, temperature and humidity, positioning information, and inertial sensing information in the data storage 26;

[0101] The inertial sensor 24 is used to obtain the speed, acceleration and attitude information of the entire device;

[0102] The external communication interface 25 is used to send data;

[0103] The data storage 26 is used to store data.

[0104] In this embodiment, the battery 21 uses two 18640 batteries, the GPS 22 receiver model is Witt Intelligent WTGPS+BD, the core processor 23 model can be STM32F429VET6 microcontroller, the inertial sensor 24 model is Witt Intelligent JY901S, the external communication interface 25 uses a serial communication interface, and the data storage module 26 is an SD card.

[0105] Fig. 9 FIG. 1 is a flow chart of a method for detecting atmospheric environmental pollution gases based on a rotorcraft according to the present invention, as shown in FIG. Fig. 9 As shown, the method includes:

[0106] Step 1: Obtain the electrochemical gas sensor response data of different gases with different concentrations under different atmospheric environment data, and construct a data set (S1, S2, S3, …, S n ), where n is the number of electrochemical sensors in the detection device. In this embodiment, four electrochemical sensors are provided, and S1, S2, S3, and S4 respectively represent the response value time series of the four electrochemical sensors, and the length of each time series is N; before constructing the data set, the concentration ranges of different gases are set, and the highest concentration is recorded. When constructing the data set, the response data of the corresponding electrochemical gas sensors at different known concentrations are obtained according to the gradient within the given concentration range;

[0107] The atmospheric environment data include temperature characteristics and humidity characteristics collected by using the above-mentioned atmospheric environment pollutant gas detection device based on the rotorcraft.

[0108] Step 2: For the data set (S1, S2, S3, …, S n ) to obtain the training sample set X(S'1, S'2, S'3, ..., S' n ), X represents the small sample time series after data preprocessing. Fig.10 As shown, the specific process of step 2 is as follows:

[0109] Step 21: Use the temperature compensation characteristic curve in the electrochemical gas sensor data manual and the atmospheric environment data obtained in step 1 (including environmental variables such as temperature characteristic g1 and humidity characteristic g2) to check the temperature compensation characteristic curve, obtain the compensation value of the electrochemical gas sensor response through the curve, perform response compensation on the electrochemical gas sensor data, and obtain compensated electrochemical sensor data.

[0110] Step 22: Perform baseline processing on the compensated data to obtain baseline processed data. Specifically:

[0111] Using the formula Baseline processing was performed on the data of four electrochemical gas sensors to solve the problem of baseline drift of electrochemical gas sensors. t ' is the effective value of the electrochemical gas sensor, I t is the current value of the electrochemical gas sensor at time t, and N is the time series length of the entire sample. t '<0, let I t '=0.

[0112] Step 23: Filter the effective value of the electrochemical gas sensor after baseline processing to obtain filtered data. The data is filtered using the Exponentially Weighted Moving-Average (EWMA), and the specific calculation formula is:

[0113]

[0114]

[0115] The effective value before time t is the historical observation value. The above formula combines the historical observation value of the sensor (the effective value of the sensor before time t) to predict the response of the sensor at the current moment. When predicting the current value, the weight of the historical observation value decreases exponentially with time. The closer the data is to the current moment, the higher the correlation is, and the greater the weight is, which can effectively reflect the recent change trend. In the formula, ρ0 is the measured initial current value of the four electrochemical gas sensors (the current value when the power is turned on), is the observed value of the electrochemical gas sensor at time t, Y t is the predicted value at time t, that is, the filtered data. The coefficient k represents the weighted decline rate. The calculation formula is as above, where τ half represents the half-life, f s is the sampling frequency, and its value range is 6-12Hz.

[0116] Step 24: Set the sampling window size and smoothing step size, and resample the filtered data using sliding window sampling. The time series length of the resampled samples is much shorter than the length of the response value time series obtained in step 1. The sampling window size is 10s, the smoothing step size is 5s, and the data duration of each resampled sample is 10s.

[0117] Step 25: Manually add labels to the resampled samples and encode them. Specifically, the resampled samples are encoded using a multi-label encoding method. After the time series length obtained under the corresponding conditions in step 1 is resampled, the concentration of the resampled samples is the same as the gas type. The label encoding is divided into two parts: category and concentration. Each part has a four-dimensional label (the four dimensions correspond to four different types of electrochemical sensors (the number of reaction chambers)). The category label is encoded in binary form, and each dimension can take a value of 0 or 1. The concentration label is the ratio of the current concentration to the maximum concentration. There are 2n dimensions in total (there are four electrochemical gas sensors in this embodiment, with a total of eight dimensions), which are arranged in sequence. When the label of the classification part is 1, it means that the atmospheric environment monitored by the sensor contains such gas, and the corresponding concentration part label is the ratio of the current concentration of such gas to the maximum concentration. When the label of the classification part is 0, it means that the atmospheric environment does not contain such gas, and the corresponding concentration part label is also set to 0;

[0118] Step 26: Divide the resampled samples and the added labels to obtain a training sample set and a test sample set. Specifically, the resampled samples are randomly divided into a training sample set (80%) and a test sample set (20%). The training sample set is X(S'1, S'2, S'3, ..., S' n ), each sample in the training sample set corresponds to the encoded binary label.

[0119] Step 3: Construct the AGRU neural network model. Fig.11 In this embodiment, the constructed AGRU neural network model includes two parts: an encoder and a decoder. The encoder part includes a gated recurrent unit layer and an attention mechanism structure, and the decoder part includes a flattening layer, a fully connected layer, and a sigmoid layer.

[0120] Step 4: Train the AGRU neural network model through the training sample set to obtain an atmospheric environmental pollution gas detection model. In this embodiment, the specific process of step 4 is:

[0121] Step 41: Input the training sample set into the gated recurrent unit layer to obtain the response characteristics of the electrochemical gas sensor at each moment. The size of the input sample is m*n, where m is the length of the time series in each sample after the sliding window sampling process, which is 10 here, and n is the number of electrochemical gas sensors, which is 4 here. The feature size of the gated recurrent unit output is m*l, where m is the number of gated recurrent units, which is equal to the length of the time series in each sample after the sliding window sampling process, and l is the number of hidden neurons of the gated recurrent unit used.

[0122] Step 42: The response features obtained in step 41 are passed into the attention mechanism structure. The attention mechanism structure includes 1 fully connected layer and 1 softmax layer, and the output is the weight of the feature at each moment.

[0123] Step 43: Multiply the features output by the gated recurrent unit layer in step 41 by the weights output in step 42 to obtain the output features of the encoder, which has a size of m*l.

[0124] Step 44: Input the output features of the encoder into the flattening layer in the decoder to obtain a one-dimensional vector of the flattening layer, and the length of the one-dimensional vector is (m*l).

[0125] Step 45: Input the flattened layer one-dimensional vector into the fully connected layer to obtain a one-dimensional vector of the fully connected layer. There are three fully connected layers in total, namely the first fully connected layer, the second fully connected layer and the third fully connected layer. The number of neurons in the first fully connected layer is 50, the number of neurons in the second fully connected layer is 25, and the number of neurons in the third fully connected layer is 8. Step 45 is specifically:

[0126] Input the one-dimensional vector of length (m*l) into the first fully connected layer to obtain a one-dimensional vector of length 50 (number of neurons), then input the one-dimensional vector of length 50 into the second fully connected layer to obtain a one-dimensional vector of length 25, and input it into the third fully connected layer again to obtain a one-dimensional vector of length 8, where the output length of the third fully connected layer is the dimension of the label set in step 25, and the length of 8 represents the gas types and concentrations corresponding to the outputs of the four sensors. In this embodiment, there are 4 kinds of gases, and each gas corresponds to a 2-dimensional label. Each sensor detects a gas, corresponding to 4 ratios of the current concentration to the maximum concentration.

[0127] Step 46: Input the one-dimensional variable of the fully connected layer into the sigmoid layer to obtain the predicted labels (c1, c2, c3, c4, c5, c6, c7, c8) of the training samples. The specific steps of step 46 are:

[0128] The sigmoid function is used to map the one-dimensional variable of the fully connected layer to a decimal between 0 and 1, where the first four dimensions (c1, c2, c3, c4) represent the classification part. When the label value is greater than 0.5, it is set to 1, and when it is less than 0.5, it is set to 0; the last four dimensions (c5, c6, c7, c8) represent the concentration part. When the first four dimensions appear 1, the label value of the corresponding dimension will take effect, representing the ratio of the current concentration of this gas to the maximum concentration. When the corresponding dimension of the previous classification part is 0, the latter is directly set to 0; the corresponding relationship between the classification part and the concentration part is that the first dimension c1 corresponds to the fifth dimension c5, the second dimension c2 corresponds to the sixth dimension c6, the third dimension c3 corresponds to the seventh dimension c7, and the fourth dimension c4 corresponds to the eighth dimension c8.

[0129] Step 47: reversely train the AGRU neural network model according to the predicted labels and the real labels of the samples in the training sample set to obtain an atmospheric environmental pollutant gas detection model. In this embodiment, step 47 is specifically as follows:

[0130] A double loss function is proposed to calculate the loss value between the predicted label and the true label, which effectively combines the classification of atmospheric pollutant gases with concentration prediction. The formula for calculating the loss value is as follows:

[0131]

[0132]

[0133] Loss = W1Loss class +W2Loss conc

[0134] Loss class Represents the loss value of the classification part, the cross entropy loss used, Loss conc represents the loss value of the concentration part, using L2 loss. In the formula, m represents the length of the time series in the sample after sliding window sampling, out_dim represents the dimension of the classification part, which is 4 here, and y ij is the true label of the sample, Represents the predicted label of the sample. W1 and W2 are the weights of the two parts, satisfying W1+W2=1. Using the grid search method, W1 is determined to be 0.7 and W2 is 0.3.

[0135] The AGRU neural network model is reversely trained according to the loss function until the number of reverse training reaches a preset number of iterations, and the atmospheric environmental pollution gas detection model training is completed.

[0136] Step 5: Deploy the trained atmospheric pollution gas detection model on the core processor. Specifically include:

[0137] Step 51: Save the AGRU neural network model obtained in step 4 as a model file with the suffix .h5;

[0138] Step 52: Select Additional Software in STM32Cu-MX and enter the plug-in X-CUBE-AL;

[0139] Step 53: In the X-CUBE-AL plug-in, select ArtificialIntelligence as the Soft Component Class, confirm that the X-CUBE-AI version is 5.2.0, check Core, and select the type of project to be generated as Application template.

[0140] Step 54: Provide the absolute path of the model, the name of the model, and the compression factor of the model in X-CUBE-AI, and the C-code generator will generate an optimized STM32 NN library and automatically integrate it into the project file, including the API for calling the neural network.

[0141] Step 55: Use the generated API for calling the neural network to detect atmospheric environmental pollutants.

[0142] Step 6: Use the deployed atmospheric pollution gas detection model to perform real-time atmospheric pollution gas detection, including:

[0143] Step 61, obtain the environmental data of the gas in the current atmospheric environment and the electrochemical gas sensor data, and process the real-time data. The data processing process is the same as steps 21-24, and the sliding window sampling of the real-time data is implemented to obtain a small sample with a length of 10s.

[0144] Step 62: Using the API interface, the small sample is input into the atmospheric environmental pollution gas detection model of the core processor for testing to obtain the category and concentration information of the current small sample.

[0145] Step 63: The GPS receiver and inertial sensor response signals in the detection unit 2 are transmitted to the core processor 23 for processing to obtain the real-time positioning information and inertial sensor information of the rotorcraft.

[0146] Step 64: The ambient atmospheric pollutant gas information obtained by the core processor, as well as the real-time positioning of the rotorcraft, inertial sensor and other information are transmitted to the data storage module and the communication interface. The data storage module stores the data in the SD card, and the communication interface sends the location and pollutant gas information to the host computer.

[0147] In order to test the influence of different cavity forms on the results, the simulation and experimental verification of the gas response module are carried out below.

[0148] In this embodiment, the airflow buffer chamber 121 specifically includes an airflow buffer chamber air inlet 1211, an airflow buffer chamber air chamber 1212, and a temperature and humidity sensor 1213. The gas to be measured enters the entire series cavity structure from the airflow buffer chamber air inlet, reacts with the temperature and humidity sensor 1213 in the airflow buffer chamber air chamber 1212, and obtains the temperature and humidity information of the atmospheric environment, and compensates the electrochemical gas sensor data later based on the measured environmental data.

[0149] In this embodiment, the gas rapid response chamber 122 includes a gas rapid response chamber air inlet 1221, a micro-response air chamber 1222, a physical housing 1223, an electrochemical gas sensor 1224, and a gas rapid response chamber air outlet 1225. The two ends of the gas rapid response chamber air inlet 1221 are the airflow buffer chamber 121 and the gas rapid response chamber module 122, so that the gas to be tested flows from the airflow buffer chamber 121 into the gas rapid response module 122; the gas to be tested reacts with the electrochemical gas sensor 1224 in the micro-response air chamber 1222, and is discharged from the gas rapid response chamber air outlet 1225 after obtaining the sensor response.

[0150] The shell 1223 of the bin-type cavity shown in Figures 3(a) and 3(b) covers the outside of the electrochemical gas sensor 1224, and the part between the electrochemical gas sensor 1224 and the shell 1223 becomes a micro-response gas chamber 1222. The shell is located outside the electrochemical gas sensor and surrounds the electrochemical gas sensor. There is a large distance between the outer wall of the electrochemical gas sensor and the inner wall of the shell. In the bin-type structure, there are gaps between the side and top of the electrochemical gas sensor and the shell. This part is called a micro-response gas chamber.

[0151] The size of the housing 1223 is much larger than that of the electrochemical gas sensor 1224 , and the entire electrochemical gas sensor 1224 is included in the cavity. The airflow diffuses in the micro-response air chamber 1222 around the electrochemical gas sensor 1224 .

[0152] In the cap-type cavity structure shown in FIG. 4(a) and FIG. 4(b), the outer wall of the side of the electrochemical gas sensor is in close contact with the inner wall of the shell, and only the top of the electrochemical gas sensor is spaced apart from the shell. The inner cavity of the shell above the electrochemical gas sensor is called a micro-response air chamber. The size of the shell 1223 is consistent with that of the electrochemical gas sensor 1224, and the diameters of the two are comparable, so that the two can be in close contact, resulting in the shell 1223 and the electrochemical gas sensor 1224 being tightly connected, and only the portion between the top of the electrochemical gas sensor 1224 and the physical shell 1223 becomes the micro-response air chamber 1222, and the airflow diffuses only in the micro-response air chamber 1222 at the top of the electrochemical gas sensor 1224.

[0153] In this embodiment, computational fluid dynamics (CFD) is used to simulate the distribution of the air flow field and the air pressure field when the gas flows through the cavity, and the influence of different cavity structure designs on the response of the electrochemical sensor is effectively evaluated. Figure 5 It is a simulation flow chart of the present invention.

[0154] Step 1: Use AutoCAD to perform geometric modeling on the two designed cavities. Specifically, set the sensor bottom diameter to 20.2 mm and the height to 16.6 mm. In Figure 3(a) and Figure 3(b), the height of the bin-type cavity is 23.6 mm, the outer diameter of the bottom is 32 mm, the wall thickness is 0.8 mm, the inner diameter of the gas rapid response cavity inlet 1221 is 2 mm, the outer diameter is 4 mm, the wall thickness of the vent is 1 mm, and the distance from the center of the gas rapid response cavity inlet 1221 to the bottom is 19 mm. In Figure 4(a) and Figure 4(b), the cap-type cavity has a height of 24.2mm, an outer diameter of the bottom of 24.4mm, and a wall thickness of 2mm. An electrochemical gas sensor with a bottom diameter of 20.2mm is placed in the middle. The micro-response gas chamber has a height of 4.4mm and a bottom diameter of 17mm. The outer diameter of the gas rapid response cavity inlet 1221 is 2mm, the outer diameter is 4mm, the wall thickness of the vent is 1mm, and the distance from the center of the gas rapid response cavity inlet 1221 to the bottom is 19mm.

[0155] Step 2: Grid the flow field. Specifically:

[0156] The boundary structure of the bin-type cavity is relatively simple and has fewer details. After passing through the air inlet, the airflow will directly diffuse to the entire air chamber without changing the direction of the airflow. Figure 7 The simulation results of (a) and (b) clearly show the direction of the airflow, but the calculation area is large. In order to reduce complexity and increase calculation speed, a coarser grid division is selected, and a total of 20146 grids are generated, as shown in Figure 6 (a). The structure of the entrance and exit of the cap-type cavity is relatively complex. It can be clearly seen that the airflow entrance of the cap-type has a small section of air guide groove after reaching the air chamber (the part located inside the cap-type cavity is called the air guide groove). The tail end of the air guide groove is arc-shaped (such as a hemispherical shape), which can change the direction of the airflow and make the airflow go downward, but the calculation area is relatively small. In order to ensure the accuracy of the calculation results, more grids are required, so a refined grid division is used, and a total of 58909 grids are generated, as shown in Figure 6 (b). When the flow field simulation is performed in the figure, only the airflow direction is simulated, so the cap-type cavity only retains the structural part of the air chamber in the figure, and the part where the electrochemical gas sensor is located is ignored.

[0157] Step 3: Calculate the Reynolds number of the fluid to determine the turbulence model. The formula is:

[0158]

[0159] Among them, ρ is the fluid density and viscosity coefficient, d is the diameter of the tubular microelement, v is the fluid flow velocity, η is the viscosity of the fluid, Re<2300 is laminar flow, Re=2300-4000 is transitional flow, and Re>4000 is turbulent flow. In this embodiment, the average flow rate of the air pump is about 0.4L / min. Combined with the air inlet size of 2mm, it can be calculated that the Reynolds number is greater than 4000, so the k-ε turbulence model is used for airflow simulation.

[0160] Step 4: Determine the initial and boundary conditions, specifically:

[0161] When performing numerical simulation calculations on the cavity, the boundary conditions of the simulated environmental conditions, velocity inlet, and pressure outlet are mainly set. The type of airflow entering the fluid domain is air, the temperature is set to 293.15K, and the pressure is 1 standard atmosphere. One side is selected as the inlet boundary, and the flow rate is calculated based on the air pump flow rate of 0.4L / min and the air inlet size of 0.2mm. The normal inflow velocity of the velocity field at the inlet boundary is set to 2m / s. The other side is used as the outlet boundary, and the outlet pressure is set to 0Pa.

[0162] Step 5: Use the finite element method to solve the turbulence model based on the flow equation. Specifically:

[0163] Comsol Multiphysics uses the finite element method to solve the problem based on the basic flow equations. The basic flow equations include the mass conservation equation, momentum conservation equation, and energy conservation equation. The formulas are as follows:

[0164]

[0165]

[0166]

[0167] Among them, ρ is the fluid density, x, y, z are three orthogonal vectors, u, v, w are the components of the velocity field in the x, y, z directions, p is the pressure, τ is the viscous stress, represents the velocity vector, is the body force vector, C p is the specific heat capacity, T is the temperature, q is the heat flux, and I is the flow rate.

[0168] Output simulation results. Specifically:

[0169] In this embodiment, the results of velocity field streamline simulation and pressure field simulation are as follows: Figure 7, (a) is the simulation result of the velocity field streamline of the bin-type cavity, (b) is the simulation result of the velocity field streamline of the cap-type cavity, (c) is the simulation result of the pressure field of the bin-type cavity, and (d) is the simulation result of the pressure field of the cap-type cavity. The simulation results show that when the airflow flows into the bin-type cavity, it will cause serious diffusion in the cavity, and a large part of the airflow will flow along the diameter to the outlet, and the airflow flowing to the air inlet at the top of the sensor is small, so it may cause the sensor response time to be prolonged. In addition, some gas will remain in the cavity, which is not easy to exhaust, reducing the accuracy; while the airflow of the cap-type cavity flows directly to the top of the sensor, which can effectively shorten the response time of the sensor.

[0170] In this embodiment, by comparing the simulation results of the airflow inside the two cavities, the structure of the cap-type cavity causes the airflow flowing into the air chamber to flow directly to the air inlet at the top of the sensor. Obviously, the cap-type cavity structure is more suitable for the actual needs of fast sampling. On the basis of the cap-type cavity structure, an airflow buffer cavity is added to form a series integrated structure and simulation is performed. The results are as follows:

[0171] It can be seen from the simulation results that the designed integrated series structure can make the airflow conditions of the temperature and humidity sensor in the airflow buffer cavity and the electrochemical gas sensor in the gas rapid response cavity basically the same. When the speed of the adjustable micro air pump fluctuates, the buffer cavity part can fully play the role of airflow buffering, so that the airflow entering the rear response cavity remains relatively stable.

[0172] In this embodiment, in order to verify the consistency between the simulation results of the gas response cavities of the two structures and the actual effects, a verification experiment was carried out using the CO sensor as an example. The designed buffer cavity and the two structures of the gas rapid response cavity were realized using 3D printing technology, and the printing material used was nylon material.

[0173] In this embodiment, in order to verify that the cavity of the integrated series structure will not affect the response start time of each electrochemical gas sensor (the shell height of the airflow buffer cavity 121 is 2 mm less than the shell height of the cap-type cavity in the gas rapid response cavity), taking the CO gas test as an example, it is installed on 4 CO electrochemical sensors of the same batch for experiment. The atmospheric environmental pollution gas detection device based on rotorcraft designed by the present invention is mainly used for atmospheric environmental pollution measurement. The concentration of various pollutant gases is low. Therefore, in subsequent experiments, the measured gas is mixed into a concentration of about 1 ppm.

[0174] In this embodiment, since the concentration of the measured gas is relatively low, the electrochemical gas sensor often exhibits relatively large noise, and the obtained data needs to be preprocessed, including baseline processing and EWMA filtering.

[0175] In this embodiment, the experimental results after baseline processing and EWMA filtering processing show that the response time of the four CO sensors in the integrated series structure is long and the response start time is basically the same, and there is almost no delay problem between the sensors, which is consistent with the simulation results. The position of the electrochemical gas sensor in the series structure will not affect the start response time of the sensor. When the electrochemical gas sensors are of the same type, the response value of the first electrochemical gas sensor of the same type after the buffer cavity shall prevail.

[0176] In this embodiment, the sensor used for experimental verification is a CO electrochemical gas sensor. However, since the electrochemical gas sensor in the device of the present invention can be replaced by other electrochemical gas sensors to measure other gases, the same conclusion can be obtained by conducting experiments using the same data processing flow, which will not be described in detail here.

[0177] The present invention completes the detection of atmospheric environmental pollutant gases, realizes rapid and real-time detection of polluted gases, improves the detection accuracy of the device for environmental atmospheric pollutants, and simultaneously realizes component identification and concentration prediction of pollutant gases, saving time and resources.

[0178] Any matters not described in the present invention are applicable to the prior art.

Claims

1. A method for detecting atmospheric environmental pollution gases carried by a rotorcraft, characterized in that: The process of this detection method is: Step 1: Obtain the electrochemical gas sensor response data of different gases with different concentrations under different atmospheric environment data, and construct a data set (S1, S2, S3, …, S n ), where n is the number of electrochemical sensors in the detection device, S1, S2, S3, ..., S n They represent the response value time series of the corresponding electrochemical sensor, and the length of each time series is N. Before constructing the data set, the concentration range of different gases is set and the highest concentration is recorded. When constructing the data set, the response data of the corresponding electrochemical gas sensor under different known concentrations is obtained within the given concentration range. The atmospheric environment data includes temperature data and humidity data of atmospheric environment pollutants; Step 2: For the data set (S1, S2, S3, …, S n ) to obtain the training sample set X(S′1, S′2, S′3, …, S′ n ), X represents a small sample time series after data preprocessing. The specific process is: Step 21: using the temperature compensation characteristic curve in the electrochemical gas sensor data manual and the atmospheric environment data obtained in step 1 to check the temperature compensation characteristic curve, obtaining the compensation value of the electrochemical gas sensor response through the curve, performing response compensation on the electrochemical gas sensor data, and obtaining compensated electrochemical sensor data; Step 22: Performing baseline processing on the compensated data to obtain an effective value of the electrochemical gas sensor after the baseline processing; Step 23: filtering the effective value of the electrochemical gas sensor after the baseline processing to obtain filtered data; Step 24: setting the sampling window size and smoothing step size, and resampling the filtered data using sliding window sampling, wherein the time series length of the resampled samples is much shorter than the length of the response value time series obtained in step 1; Step 25: Manually add labels and encode the resampled samples; The resampled samples are encoded using a multi-label encoding method. The label encoding is divided into two parts: category and concentration. The label dimension of each part is the same as the number n of electrochemical sensors. The category label is encoded in a binary manner, and each dimension takes a value of 0 or 1. The concentration label is the ratio of the current concentration to the maximum concentration. There are 2n dimensions in total, which are arranged horizontally in sequence. When the label of the classification part is 1, it means that the atmospheric environment monitored by the electrochemical sensor contains such gas, and the corresponding concentration part label is the ratio of the current concentration of such gas to the maximum concentration. When the label of the classification part is 0, it means that the atmospheric environment does not contain such gas, and the corresponding concentration part label is also set to 0. Step 26: Divide the resampled samples and the added labels to obtain the training sample set X(S′1, S′2, S′3, …, S′ n ) and the test sample set, each sample in the training sample set corresponds to the encoded binary label; Step 3: Construct an AGRU neural network model. The constructed AGRU neural network model consists of an encoder and a decoder. The encoder part includes a gated recurrent unit layer and an attention mechanism structure, and the decoder part includes a flattening layer, a fully connected layer, and a sigmoid layer. The output length of the decoder part is 2n. Step 4: Train the AGRU neural network model through the training sample set to obtain the atmospheric environmental pollution gas detection model; Step 5: Deploy the obtained atmospheric environment pollution gas detection model on the core processor to perform real-time atmospheric environment pollution gas detection; The specific process of step 4 is as follows: Step 41: input the training sample set into the gated recurrent unit layer to obtain the response characteristics of the electrochemical gas sensor at each moment, wherein the size of the input sample is m*n, m is the length of the time series in each sample after the sliding window sampling process, n is the number of electrochemical gas sensors, and the feature size output by the gated recurrent unit is m*l, wherein m is the number of gated recurrent units, which is equal to the length of the time series in each sample after the sliding window sampling process; l is the number of hidden neurons of the gated recurrent unit used; Step 42: The response features obtained in step 41 are passed into the attention mechanism structure. The attention mechanism structure includes a fully connected layer and a softmax layer, and the output is the weight of the feature at each moment; Step 43: multiply the feature output by the gated recurrent unit layer in step 41 by the weight output in step 42 to obtain the output feature of the encoder, with a size of m*l; Step 44: Input the output features of the encoder into the flattening layer in the decoder to obtain a flattening layer one-dimensional vector, the length of the flattening layer one-dimensional vector is (m*l); Step 45: Input the flattened layer one-dimensional vector into the fully connected layer to obtain a one-dimensional vector of the fully connected layer. There are three fully connected layers in total, namely the first fully connected layer, the second fully connected layer and the third fully connected layer. The number of neurons in the first fully connected layer is 50, the number of neurons in the second fully connected layer is 25, and the number of neurons in the third fully connected layer is 8. The output length of the third fully connected layer is the dimension of the label set in step 25. Step 46: Input the one-dimensional vector of the fully connected layer into the sigmoid layer to obtain the predicted label (c1, c2, c3, c4, c5, c6, c7, c8) of the training sample. The specific steps are: The sigmoid function is used to map the one-dimensional variable of the fully connected layer to a decimal between 0 and 1, where the first n dimensions represent the classification part. When the label value is greater than 0.5, it is set to 1, and when it is less than 0.5, it is set to 0; the last n dimensions represent the concentration part. When the current n dimensions appear 1, the label value of the corresponding dimension will take effect, representing the ratio of the current concentration of this gas to the maximum concentration. When the corresponding dimension of the current classification part is 0, the latter is directly set to 0; Step 47: reversely train the AGRU neural network model according to the predicted labels and the real labels of the samples in the training sample set to obtain an atmospheric environmental pollution gas detection model, specifically: The loss value between the predicted label and the true label is calculated using a double loss function, effectively combining the classification of atmospheric pollutant gases with concentration prediction. The formula for calculating the loss value is: Loss=W1Loss class +W2Loss conc In the formula, Loss class Represents the loss value of the classification part, Loss conc represents the loss value of the concentration part, m represents the length of the time series in the sample after the sliding window is sampled, out_dim represents the dimension of the classification part, and y ij is the true label of the sample, Represents the predicted label of the sample, W1 and W2 are the weights of the two parts, satisfying W1+W2=1; The AGRU neural network model is reversely trained according to the loss function until the number of reverse training reaches a preset number of iterations, and the atmospheric environmental pollution gas detection model training is completed.

2. The method for detecting atmospheric pollutant gases carried by a rotorcraft according to claim 1, characterized in that: The specific process of step 5 is: Step 51: Save the AGRU neural network model obtained in step 4 as a model file with the suffix .h5; Step 52: Select Additional Software in STM32Cu-MX and enter the plug-in X-CUBE-AL; Step 53: In the X-CUBE-AL plug-in, select ArtificialIntelligence as the Soft Component Class, confirm that the X-CUBE-AI version is 5.2.0, check Core, and select the type of project to be generated as Application template; Step 54: Provide the absolute path of the model, the name of the model, and the compression coefficient of the model in X-CUBE-AI, generate the optimized STM32 NN library through the C-code generator and automatically integrate it into the project file, including the API for calling the neural network; Step 55: Detect atmospheric pollutant gases using the generated API for calling the neural network; Acquire environmental data and electrochemical gas sensor data of gases in the current atmospheric environment, and process the real-time data. The data processing process is the same as steps 21-24, and implement sliding window sampling of real-time data to obtain resampled small samples. Use the API interface to input the small samples into the deployed atmospheric environmental pollution gas detection model for testing to obtain the category and concentration information of the current small samples.

3. The method for detecting atmospheric pollutant gases carried by a rotorcraft according to claim 1, characterized in that: The GPS receiver and inertial sensor response signals in the detection unit are transmitted to the core processor for processing to obtain the real-time positioning information and inertial sensing information of the rotorcraft; the ambient atmospheric pollutant gas information and the real-time positioning and inertial sensing information of the rotorcraft obtained by the core processor are transmitted to the data storage module and the communication interface. The data storage module stores the data in the SD card, and the communication interface sends the location and polluted gas information to the host computer.

4. The method for detecting atmospheric pollutant gases carried by a rotorcraft according to claim 2, characterized in that: The sampling window size is 10s, the smoothing step is 5s, the data duration of each resampled sample is 10s, W1 is 0.7, and W2 is 0.3; Using the formula Baseline processing is performed on each electrochemical gas sensor data, where I t ' is the effective value of the electrochemical gas sensor, I t is the current value of the electrochemical gas sensor at time t, N is the time series length of the entire sample; when I t ′<0, let I t ′=0; The number weighted average method is used for filtering, and the specific calculation formula is: The effective value before time t is the historical observation value, where ρ0 is the measured initial current value of the electrochemical gas sensor, is the observed value of the electrochemical gas sensor at time t; Y t is the predicted value at time t, that is, the filtered data, the coefficient k represents the weighted decline rate, τ half represents the half-life, f s is the sampling frequency.

5. A rotorcraft-borne atmospheric environmental pollution gas detection device, comprising a rotorcraft, a sampling unit, and a detection unit, wherein the sampling unit comprises a gas transmission module and a gas response module; the gas transmission module has an adjustable speed micro air pump, and the adjustable speed micro air pump is connected to the external gas and the gas response module through a corresponding pipeline; characterized in that: The gas response module includes an airflow buffer chamber, a driving amplifier circuit and a gas rapid response chamber. The airflow buffer chamber and the gas rapid response chamber are on the same gas path as the gas transmission module. The airflow buffer chamber and the gas rapid response chamber are connected in series in an integrated manner. The gas rapid response chamber has a plurality of cap-type cavities connected in series in sequence. Each cap-type cavity has a shell, an electrochemical gas sensor installed inside the shell, and a micro-response gas chamber located above the electrochemical gas sensor. The outer wall of the electrochemical gas sensor is in close contact with the inner wall of the shell, and the airflow will not flow out from the gap between the two. The height of the inner cavity of the shell is greater than the height of the electrochemical gas sensor. A breathable membrane is provided on the top of the electrochemical gas sensor. The size of the micro-response gas chamber is consistent with the size of the breathable membrane, and the diameter of the breathable membrane is smaller than the outer diameter of the electrochemical gas sensor. The outputs of the multiple electrochemical gas sensors are connected to the detection unit through the driving amplifier circuit; A temperature and humidity sensor is installed in the airflow buffer cavity to measure the temperature and humidity information of the ambient atmosphere; The detection unit is used to obtain data from the temperature and humidity sensor and the electrochemical gas sensors after being processed by the driving amplifier circuit, and output the gas detection results; The gas delivery module is used to continuously pump in external gas at a stable flow rate; The gas response module is used to stabilize the gas flow, provide a closed response environment for the electrochemical gas sensor, and achieve a full reaction between the gas and the electrochemical gas sensor; The detection unit is used to drive the normal operation of each module of the entire device, collect and transmit various sensor data, and process and analyze the data; the detection unit is loaded with an AGRU neural network model for detecting the concentration of atmospheric environmental pollutants.

6. The atmospheric environment pollution gas detection device carried by a rotorcraft according to claim 5, characterized in that: The detection unit includes a battery, a GPS receiver, a core processor, an inertial sensor, an external communication interface, and a data storage module. The battery is used to provide energy to various parts of the entire device; the core processor is electrically connected to the adjustable speed micro air pump, the temperature and humidity sensor, the driving amplifier circuit of the electrochemical gas sensor, the battery, the GPS receiver, the inertial sensor, the external communication interface, and the data storage module; The GPS receiver is used to receive positioning information and send the positioning information to the core processor; The core processor is used to control the operation of the entire device and perform data processing and gas analysis; The inertial sensor is used to obtain the speed, acceleration and attitude information of the rotorcraft; The external communication interface is used to send data; The data storage is used to store data.

7. The atmospheric environment pollution gas detection device carried by a rotorcraft according to claim 5, characterized in that: The electrochemical gas sensor is an electrochemical gas sensor made according to the size of a "4-series" three-electrode electrochemical sensor, including but not limited to at least one of CO, SO2, H2S, O3, NO2, Freon, CH4, and CO2 sensors. A gas sensor is installed in each cap-type cavity in the gas response module. The types of gas sensors installed in different cap-type cavities may be the same or different, and different types of gases in the environment can be measured at the same time; the electrochemical gas sensor has a bottom diameter of 20.2mm and a height of 16.6mm. The cap-type cavity has a height of 24.2mm, an outer bottom diameter of 24.4mm, and a wall thickness of 2mm. The electrochemical gas sensor is placed in the middle, the micro-response gas chamber has a height of 4.4mm, and a bottom diameter of 17mm. The gas rapid response cavity has an inner diameter of 2mm and an outer diameter of 4mm. The vent wall thickness is 1mm, and the distance from the center of the gas rapid response cavity inlet to the bottom is 19mm.

8. The atmospheric environment pollutant gas detection device carried by a rotorcraft according to claim 5, characterized in that: The gas rapid response chamber air inlet in the cap-type cavity is located in a section inside the cap-type cavity which is an air guide groove, and the tail end of the air guide groove is arc-shaped, bending downward toward the air inlet of the electrochemical gas sensor; the structure of the airflow buffer cavity is also a cap-type cavity, and no electrochemical gas sensor is installed in the airflow buffer cavity, but a temperature and humidity sensor is installed, and the outer shell height of the airflow buffer cavity is not greater than the outer shell height of the cap-type cavity in the gas rapid response cavity.

Citation Information

Patent Citations

  • An exhaust gas detection device, method and system

    CN112986070B

  • Method and system for operating an adsorption-based system for removing water from a process stream

    CA3176568A1

  • Structure of test cavity

    CN102662033A