Abstract:n recent years, a lot of oil-water sensor and oil-water detection systems for crude oil dehydration appear on the market, but there are problems emerged such as low accuracy, large error and so on. The performance indicators need to be further improved. Therefore, based on impedance measurement technology, an intelligent oil and water construction method based on AC impedance measurement was proposed. The principle and structure of the oil-water detection system are introduced, a nonlinear error compensation model based on the least square method is constructed, which solves the influence of the temperature and water content of the medium on the AC impedance are solved, and the accuracy of the intelligent oil-water detection effectively are improved. The experimental results show that the method proposed in this paper can effectively improve the detection accuracy of water content detection in crude oil. The detection range of water content in the oil-water detection system using this nonlinear error compensation method is 0 %-100 %. The detection accuracy can reach 0.3 %. The detection system has high accuracy, meets the design requirements, and the needs of related enterprises.