In industrial places,stations,hospitals,residential and other places where people gather,the detection of certain special types of pollutants is the key to achieve air pollution control in such places.In general,for the detection of certain gases,a single gas sensor that is very sensitive to the detected object can be used,so that it can be detected,monitored and alarmed.However,it has been found that the sensitivity of each sensitive material to a specific gas will change under various conditions due to the interaction between the sensitive material and the mixed gas,and the accurate resolution of the mixed gas cannot be achieved,resulting in its performance is greatly limited.Aiming at this problem,this paper combines the sensor array with pattern recognition technology to construct a miniature,convenient and low-cost wireless detection system that can be used to detect and identify specific target gases under special circumstances.The system generates ± 5 V and 3.3 V reference voltages from the power module to the signal conditioning module and supplies power to the STM32 microcontroller.The gas sensor array converts the analog voltage signal collected by the gas detection element into digital signal output through the ADC conditioning module and transmits it to the STM32 microcontroller.With the single chip microcomputer as the core controller,the detected temperature,humidity,gas concentration and other parameter information are displayed on the OLED display screen of the single chip microcomputer.At the same time,through Lo Ra wireless communication,the collected data is transmitted to the PC host computer.Because the traditional BP neural network has problems such as large detection error and strong dependence on initial value and threshold in mixed gas detection,this paper will use the cuckoo algorithm to optimize the weights and thresholds of the neural network.In the iterative process,the simulated annealing operation is used to prevent the algorithm from falling into local extremum,thereby improving the stability and reliability of the algorithm.At the same time,the discovery probability adaptive adjustment strategy is used to generate new solutions to ensure that the algorithm can be continuously updated to improve the performance of the algorithm.Aiming at minimizing the mean square error of training samples,the optimized parameters,namely initial connection weights and thresholds,are applied to the qualitative and quantitative identification of mixed gases.In the experiment,formaldehyde,ammonia,hydrogen sulfide and sulfur dioxide were used as mixed gas samples.The output voltage value of the sensor array is used as the input data of the algorithm,and the concentration value of the mixed gas is used as the output data,which are normalized respectively.Through testing,300 sets of data were obtained and used as data sets.20 samples were randomly selected from 300 sets of sample data as prediction samples to verify the prediction results.The experimental results show that the prediction accuracy of the mixed gas concentration is 81.7 % by using a single BP neural network,and the prediction accuracy of the mixed gas concentration is 91.5 % by using the improved BP neural network.The improved algorithm is more accurate and more accurate. |