| In recent years,China has achieved rapid economic development,but many enterprises have sacrificed the environment in exchange for temporary or local economic development,thus increasing environmental pollution.In particular,the problem of water pollution has become a thorny problem in China.To this end,the state has successively promulgated corresponding legislative policies to increase the monitoring and rectification of environmental pollution.Among them,the detection technology for the water pollution parameter Chemical Oxygen Demand(COD)has also emerged as the times require.This test method must use a large amount of chemical preparations,which is originally a pollutant treatment,but there are a large number of heavy metals in the detection waste liquid,which is easy to produce secondary pollution,and the period of each measurement is long and the effectiveness is low,which does not meet the current real-time detection conditions for water quality.In order to overcome the shortcomings of the above detection methods,researchers have proposed another effective detection method,ultraviolet-visible spectroscopy,which has received extensive attention in water monitoring because of its fast detection rate and no pollution.This paper mainly uses UV-Vis spectroscopy to carry out feature extraction and modeling research on water quality COD absorption spectroscopy.The main work includes:1)Research on feature extraction of spectral data.Considering that the spectral data has many dimensions and redundant information,after analyzing the original spectral mechanism of water quality COD,an appropriate feature extraction method is selected.The traditional manual analysis and extraction of features has a large workload and a limited scope of application.This paper proposes an improved particle swarm algorithm IPSO combined with the least squares linear regression model to solve the COD method.This method can perform linear regression analysis in a short time.However,with the increase of the concentration of the water sample to be tested,there is a linear shift problem in the absorption peak of the absorption spectrum.Furthermore,on the basis of IPSO,this paper improves the properties of the absorption spectrum.The area composed of absorbance in the absorption spectrum is used as the particle of the particle swarm,and the mean square error of the linear regression model is used as the fitness function of the particle swarm,and further improve the prediction accuracy of the model;For the linear loss problem at high concentration,principal component analysis is used in this paper to reduce the dimension of the spectrum,extract the spectral features useful for modeling,and simplify the operation cost to improve the model accuracy.2)Water quality COD prediction model and optimization.The AIPSO_LR water quality COD prediction model was established.In view of the problem that the relative error of the AIPSO_LR model was relatively large at low concentrations,the idea of segmental modeling was introduced,and a linear-nonlinear model was proposed.The critical concentration was determined to be 200 mg·L-1 through the error analysis of linear fitting,and the high and low concentrations were classified by the support vector machine.The AIPSO_LR prediction model was used for the water samples to be tested that were less than or equal to 200 mg·L-1.The regression model obtained the optimal wavelength range from 287.66nm to 290.04nm,where each wavelength was separated by 0.4 nm;For water samples higher than 200 mg·L-1,the BP neural network was used to deal with the nonlinear spectral problem,and the PCA_BP prediction model was established.Finally,compared with different algorithms,the results show that the prediction model proposed in this paper can meet the requirements of high precision in the shortest time,indicating that the method has advantages in the detection of water quality COD.3)The design and implementation of the software platform of the upper computer.In this study,a COD experimental platform was built based on the 2.6 generation prototype of Sichuan Bilang Technology Co.,Ltd.,and a set of UV-Vis spectral water quality COD detection PC software was developed,including spectral data acquisition,transmission,storage,COD value calculation and customization process,etc.Features.In order to meet the needs of frequent process changes,this paper introduces configuration programming.The operator can customize the process flow,edit the required process,realize the spectral collection of the water sample to be measured,and establish a COD spectral data center as the data support for model construction. |