| As one of the world’s strategic reserve resources,oil plays an important role in advancing economic development and maintaining national security.With the modernisation of oilfield exploration technology,the need for the development of online testing technology for crude oil water content has become increasingly urgent.In order to keep track of the extraction status of oil wells,improve recovery rates and extend well life,it is of practical importance to carry out research into water content testing technology.This paper presents an infrared spectroscopy-based method for detecting the water content of oil-water two-phase flows,according to the principle of infrared spectrum detection technology,the moisture content detection of oil-water two-phase flow is realized.First,the spectral data of oil-water two-phase flow samples with different water contents were collected using a near infrared spectrometer,after pre-processing the spectral data,the characteristic wavelengths were selected by the continuous projection method,predictive modeling of spectral data and water content using partial least squares to verify the rationality of the chosen wavelength;Secondly,based on the selected characteristic wavelength to determine the frequency band range for oil-water two-phase flow spectroscopy detection,an infrared spectroscopy oil-water two-phase flow water content detection device was developed,including a light source,a photodetector,an amplification module,an A/D acquisition module and an upper computer software;Then,using the designed water content detection device,the spectral characterisation signals of oil-water two-phase flow with different water content were collected,normalised and then a water content detection model was established.The detection model based on BP neural network and PSO-BP algorithm was studied and the parameters of the two models were compared,and the correlation coefficient of the detection model using PSO-BP algorithm was 0.9865 and the root mean square error was 0.0308.with the best performance.Finally,an indoor experimental platform was constructed to analyse the performance of the water content testing system.The test results show that the measurement error of the infrared spectroscopy oil-water two-phase flow water content testing system is within 8%,which meets the practical needs. |