As a kind of non-contact high precision displacement sensor,PSD has received more and more attention in the measurement field.In this thesis,using PSD,through the design of hardware circuit and software program,builds a set of non-contact high-precision displacement measurement system,mainly to solve the sensor temperature drift,nonlinear and noise three problems,and the specific work content is as follows:(1)By using immune algorithm to optimize the inside of the least squares support vector machine(LSSVM)punishment factor and kernel function parameters to build the temperature compensation model,the two-dimensional experiment to obtain the original data to model for training and testing,to test set of least squares mean square error as the objective function,is transformed into a convex optimization problem to achieve the effect of temperature compensation.The test results show that the zero temperature coefficient of the sensor is increased from 3.0×10-4/℃ to 1.6×10-4/℃,which is about two times higher than that before compensation.The sensitivity temperature coefficient was increased by 10 times from 2.8×10-3 to 2.8×10-4/℃.The additional error of temperature is increased from 12.5% to 1.27%,which is nearly ten times higher than before compensation,thus effectively reducing the influence of temperature on the measurement results.(2)In this thesis,the curve fitting method is adopted to solve the nonlinear problem by using the experimental data obtained from two-dimensional calibration experiment.The specific method is to use the least square method.Subtract the calculated value and the calibrated value,then take the derivative of the undetermined coefficient and assign the value to zero to find its minimum point,and finally calculate the equation of the undetermined coefficient to the fitting curve.After correction,the nonlinearity of the sensor is increased from 1.57% before correction to 0.87% after correction,which is nearly two times higher.(3)For the noise problem,in this thesis,the method of using sinusoidal current to replace the direct current,so the laser light intensity and the sensor output current are also sinusoidal change,noise on the sinusoidal current compared with DC becomes small.Afterwards the fast Fourier transform(FFT)is used to transfer it from the time domain to the frequency domain to analyze,demodulating the amplitude of the DC component in the sinusoidal current,the amplitude of the AC component,frequency and phase.After the modulation and demodulation treatment,the error rate caused by the system noise decreased from 1.3% of the DC to less than one thousandth after the noise reduction treatment,increased by more than ten times.(4)In this thesis,the displacement measurement system based on STM32 is designed.Through the design of hardware and software,the output voltage of PSD sensor is taken as the input signal,and the data is collected by ADC analog-to-digital conversion control.The algorithm model is imported into the MCU,and the calculated displacement results are output to the LCD screen for display.And through the serial communication and network communication to upload the upper monitor.Finally,for system testing,four calibration displacement values are selected to test whether the error of the system meets the theoretical requirements. |