| In recent years,with the frequent occurrence of safety accidents in the public domain,criminals have used flammable liquids to harm the society,so it is of great significance to the detection of flammable liquids.As a kind of molecular "fingerprint" spectrum,Raman spectroscopy can qualitatively analyze the substance to be detected based on the vibration between the substance molecules,and is widely used in physics,chemistry,materials and other fields.Raman spectroscopy can be applied to portable monitoring systems to accurately classify substances while ensuring operational safety.However,the amount of data is too large.If the data is not processed,subsequent analysis time will be greatly increased and the speed of automatic identification will be affected.This paper uses Raman spectroscopy to study the rapid detection technology of combustible liquids,and combines decision tree(DT),random forest(RF)and support vector machine(SVM)algorithms to achieve classification.The main research contents and results are as follows:This thesis selects nine common flammable liquids 90# gasoline,93# gasoline,97#gasoline,methanol,ethanol,ethylene glycol,xylene,tert-butanol,and acetone as samples to collect Raman spectroscopy data.The experimental equipment selects self-built portable In the Raman spectrometer,the excitation wavelength of the Raman probe is785 nm,and preliminary Raman spectroscopy experiments are performed on flammable liquid samples.Firstly,the original Raman spectroscopy data obtained from the experiment is analyzed by data preprocessing.Through the analysis of the experimental data and background fluorescence noise signal generation principle,the minimum value is obtained,and then the linear fitting is performed segmentally to correct the baseline of the Raman spectrum,and increase the selection of surrounding key values.For filtering and denoising,the method of db5 wavelet transform and Savitzky-Golay filter is used to decompose the Raman spectrum signal.db5 wavelet transform compares the decomposition results of multi-layer combustible liquid Raman spectroscopy signals and shows that: db5 wavelet3-layer signal decomposition has the best filtering effect to remove background noise.The data window of the Savitzky-Golay filter is set to 9,and the polynomial order is set to 2.The effect of removing the noise signal of 90# gasoline sample is also better.The normalization uses the Min-max standardization method,and sets the light intensity information to be distributed in the range of [0,1].The extraction of the characteristic peaks of the Raman spectrum of the combustible liquid sample adopts the nonlinear least squares algorithm to achieve Gaussian curve fitting,which can accurately extract the peak information.Establish a Raman database of flammable liquids to provide data sets for subsequent classification algorithms.After preprocessing the Raman spectrum signal of the flammable liquid sample,the data classification algorithm needs to be used to realize the rapid identification of the flammable liquid sample.This paper uses decision tree,random forest and support vector machine algorithms to quickly identify samples.First,the data is compressed.Through the comparison of the accuracy of 64,128,256,512 and 1000 points,it is found that the accuracy of 512 points is the best.Select 512 points of combustible liquid Raman spectroscopy data as the data set.After training the data set,compare the classification effects of decision tree classifier,random forest classifier and support vector machine classifier,and then evaluate the accuracy and confusion of the evaluation indicators.Matrix,it is found that the accuracy of random forest and support vector machine is98.15%,and the accuracy of decision tree is 96.30%.The confusion matrix effect of support vector machine(SVM)is better than that of decision tree and random forest,so the support vector is obtained.The conclusion that the classification effect of the machine algorithm is better.The use of Raman spectroscopy technology can accurately detect the peaks of combustible liquid samples,and the data can be preprocessed and compressed to effectively improve the analysis speed,which provides a theoretical basis and technical reference for subsequent instrument miniaturization. |