During the drilling process,if the characteristics of crude oil can be measured in real time,such as the composition content of crude oil,oil-gas ratio,viscosity,density,conductivity,etc.,and the type of crude oil in the formation,the degree of pollution,etc.can be known in time,and then the drilling can be quickly adjusted.Among them,viscosity and density are the physical properties of crude oil,which play an important role in crude oil extraction and reservoir estimation.Although the traditional viscosity and density measurement methods have high precision,but the instrument is bulky and has poor real-time performance and cannot be used underground.Therefore,designing a sensor that can be used to measure fluid viscosity and density downhole online can effectively solve the problem.Currently,viscosity sensors for downholes include vibrating string sensors,surface acoustic wave sensors,and tuning fork sensors.Among them,the vibrating string sensor has a complicated structure and only measures the viscosity.The surface acoustic wave sensor can only measure the product of viscosity and density.The tuning fork sensor has a simple structure and can measure viscosity and density simultaneously.The tuning fork is usually made of quartz crystal.The quartz tuning fork has high quality factor,stable resonance point and high data repeatability.This thesis mainly studies the measurement method of quartz tuning fork sensor.Firstly,the thesis combines the research status of fluid viscosity and density measurement methods at home and abroad,selects quartz tuning fork as sensor sensitive device,and studies the online viscosity and density measurement method based on quartz tuning fork sensor.The thesis analyzes the physical model of quartz tuning fork,including the piezoelectric characteristics of quartz crystal,the influence of the cutting pattern of quartz crystal on the vibration mode,the electromechanical coupling model of quartz tuning fork and the electrode arrangement of quartz crystal.The measurement theory of the quartz tuning fork sensor proposed by Polish Waszczuk K et al,who explains how to obtain the viscosity and density of the fluid through the quartz tuning fork resonance resistance and the resonant frequency.The thesis is based on this theory and is applied in the field of oil measurement.Secondly,this thesis uses quartz tuning fork sensor to carry out measurement experiments to realize the verification and application of measurement theory.First,the processing method of sensor measurement data is introduced,including how to obtain the correct resonance resistance and resonance impedance value,and the filtering method of the measurement data.Second,the quartz tuning fork sensor is calibrated with organic materials of known viscosity and density,and the calibration results are compared with the Polish literature to verify the feasibility of the theory.Third,the relationship between the resonant frequency and temperature of the tuning fork sensor is explored and the temperature compensation method is analyzed.Fourth,the viscosity and density of several types of lubricating oils are measured in a high temperature environment,and measurement errors are analyzed to evaluate the effect of the measurement.Finally,the embedded hardware circuit design and software program design are carried out.The vector current-voltage method is selected as the realization method of the tuning fork sensor impedance measurement circuit.In this paper,STM32F103 RB microcontroller and AD5933 impedance measurement chip are used to build the impedance measurement system,and the algorithm program of viscosity and density measurement is designed to realize the embedded transplantation of the method.The measurement range and accuracy of the system are determined by the test experiment.Combined with the measurement method selected in this paper,the system realizes the on-line measurement of single sensor’s viscosity and density at the same time. |