Abstract:In order to compensate the hysteresis effect of piezoelectric ceramics in the twodimensional piezoelectric scanning mirror, a model based on the Madelung rule and the theory of Ru Changhai is established. With the method of accurately calculating the output voltage corresponding to the position after the deflection, the scanning angle nonlinearity problem caused by the hysteresis is handled. First we need to measure the main hysteresis loop of voltageposition curve and store it in the FLASH memory to construct the corresponding hysteresis table. Then by taking the advantage of strong timing and highspeed computing power of FPGA, the piezoelectric hysteresis effect of piezoelectric ceramics can be accurately compensated. Finally, through the DA module output and the external voltage amplifier circuit, the FPGA can precisely control the deflection of the scanning mirror. The test platform is mainly composed of HeNe laser, scanning mirror, position sensitive detector (PSD) and NI data acquisition card. The LabVIEW programming can be used in the test platform to directly measure the deflection angle information of scanning mirror. The maximum error of the deflection angle of the piezoelectric scanning mirror before correction is 2.5 mrad while it is less than 0.3 mrad after the openloop compensation algorithm correction. The results show that the proposed algorithm can effectively compensate the hysteresis effect.