Research on High Precision Angle Measurement and Compensation Technology Based on Circular Grating

In this paper, the angle measurement method of high-precision circular grating is studied. The principle analysis of circular grating angle measurement, the principle analysis of multi reading head, and the design of rotary servo control system are carried out. After analyzing the error model of circular grating angle measurement, the research based on harmonic compensation model is carried out respectively. Aiming at the problem of zero crossing oscillation of compensation algorithm, the piecewise compensation strategy is designed, which fully demonstrates the application value of circular grating angle measurement method in high-precision angle measurement system.


Introduction
With the continuous development of navigation, aviation, ship, control and other technologies, higher requirements are put forward for the accuracy of angle measurement system. For example, in the high precision platform analytical inertial navigation system, the measurement error of frame angle should be less than 2 angular seconds. Therefore, it is necessary to carry out the related research of higher precision angle information measurement technology. Compared with the traditional angle measurement method, the circular grating angle measurement method has the advantages of simple structure, large measurement range, high measurement accuracy and good dynamic performance, which has become a research hotspot in recent years. In addition, with the application of computer technology in signal processing of circular grating system, the rapidity, accuracy and stability of angle measurement system are greatly increased. At the same time, the circular grating is easy to be subdivided and fused to improve the resolution and angle measurement accuracy.

Analysis of Grating Angle Measurement Principle
High precision grating has thousands or even tens of thousands of slits in the width of 1cm. When two gratings with the same density are overlapped, Moire fringes with alternating light and dark will be produced. The brightness of the stripe changes in a sinusoidal period. After fixing the position of the light-emitting tube, indicating grating and photocell according to figure 1, with the rotation of the scale grating, the electric signal emitted by the light-emitting tube will fall on the photocell through the Moire fringe. The intensity of Moire fringe light signal changes one cycle and the output current of photocell changes one cycle with each rotation cycle of scale grating. After the current passes through the rectifier circuit, a counting pulse will be output. The angle reading of the circular grating can be obtained by capturing and counting the number of pulses.

Analysis of Homogenization Effect of Multiple Reading Heads
In order to improve the angle measurement accuracy of circular grating, on the one hand, it is necessary to increase the number of parallel notches of a single circular grating, on the other hand, it is necessary to use the homogenization effect of multiple reading heads to eliminate the influence of installation eccentricity, shaft jump and shaft inclination. The measurement error of circular grating can be approximately expressed as Fourier series composed of many discrete harmonic components. Therefore, the measurement error of circular grating with single reading head at angle φ can be expressed as follows: ∑ Where k is the order of the harmonic and is the amplitude of the k-th harmonic. Then, if n reading heads are evenly arranged, the average value of each reading ̅̅̅̅ can be expressed as follows: For a certain harmonic k: For a harmonic k of a certain order, when k is equal to cn, n is equal to integers such as 1, 2, 3 and c is an integer, the following is true: The formula shows that when k is equal to cn, the amplitude and relative phase of the synthesized signal remain unchanged. That is to say, the signal average of n-head uniformly distributed reading has no effect on the harmonic wave with the order of k being an integer multiple of n. These error components constitute the error of the average value of multiple reading heads in the multi reading head system. When k is not equal to cn, n cosines are added, and they are staggered by in phase, that is, they are evenly divided in the range of . Through vector calculation, it is known that the combined quantity must be zero, then the scalar of the composite vector is also zero. That is to say, the average signal of n-head uniformly distributed reading head can eliminate the order harmonics when k is not equal to cn.

Selection of Angle Measurement Datum
In order to analyze the error characteristics and compensation algorithm of grating angle measurement, higher precision angle measurement is needed as the reference value for synchronous recording. In this paper, laser autocollimator combined with 24 prism is used to obtain the angle reference value. The optical principle diagram of the autocollimator and the imaging of the eyepiece are shown in figure 2. When the slit light source is located on the focal plane of the objective lens, the light will be refracted by the objective lens into a parallel beam, and the beam will be reflected back through a plane mirror perpendicular to the optical axis. If the plane mirror is inclined, the imaging will deviate from the original position of the slit light source after focusing the radiation beam. By reading the eyepiece, the tiny angle between the mirror and the vertical plane of the optical axis can be measured, and the maximum angle measurement accuracy is about 0.1 angular seconds, Although the autocollimator has ultra-high angle measurement accuracy, it needs to be combined with the plane mirror, which makes it difficult to apply in the ring frame angle measurement. Therefore, the measurement angle of the autocollimator is usually used as the benchmark to compare and analyze the error characteristics of other angle measurement values. Based on the autocollimator, the method of measuring grating angle error is as follows: a. Taking any side as the starting surface, the autocollimator is aligned with the first mirror by adjusting the position of the autocollimator.
b. Rotate the grating to turn the encoding angle by an integral 15 degrees. At this time, the autocollimator will roughly align the second mirror (including error), and output an error difference, that is, the transverse angle error value of eyepiece imaging. This error includes two parts: one is the error caused by the grating output angle error, the other is the machining structure error of 24 prism. The machining structure error can be obtained through the 24 body factory manual. By subtracting the two terms, we can get the angle measurement error when the grating output is 15 degrees.
c. Refer to step B and continue to rotate the grating to measure the angle measurement error when the grating output angle is 15 integral multiple angles such as 30 degrees and 45 degrees etc.

Design of Grating Angle Rotation Servo Control System
The grating angle is precisely rotated at a fixed angle. On the one hand, if manual rotation mode is adopted, it is difficult to adjust the grating output to an accurate angle of 15 degrees, on the other hand, once the angle is adjusted accurately, due to the instability of the platform and the deviation of the grating processing center of gravity, the grating will produce a certain angle rotation offset with time. Therefore, it is necessary to develop the grating angle rotation servo control system to position and control the grating angle. In this paper, the grating angle is used as the feedback value to servo control the motor in order to control the grating rotation with high precision. The control principle is shown in figure 3.

Figure 3. Control schematic diagram of grating angle servo system
According to the analysis of test requirements, grating angle measurement test needs to ensure that the grating angle is highly stable for a long time. When the servo angle input is given, the servo loop can be adjusted to a stable state at any time, but there must be a small steady-state error in the stable state. The inner and outer loop controller selected in this paper is shown in figure 4 through the adjustment and trial of control parameters and control loop. When the servo input is given, the angle servo loop is adjusted to stable state through 40 seconds, and the absolute value of servo error is less than 0.1 angular second in the next 50 seconds, as shown in figure 5. This paper uses the angle controller, the angular rate controller and the grating angle processing unit to become the servo control circuit module, and its built-in algorithm is packaged into the chip DSP28335. The upper computer writes the servo angle command to the serial port through the timer. DSP28335 chip receives the servo command through the SCI port interrupt, receives the grating output pulse at 1kHz frequency, calculates the angular rate and current control value, and writes the control value to the motor drive module through the parallel port at 1kHz frequency. At the same time, the grating angle is sent back to the upper computer by SCI at the frequency of 1Hz. The program flow of DSP28335 software configuration item is shown in figure 6.

Design of Angle Measurement Test Scheme
First of all, in order to ensure the accuracy of angle measurement test, it is necessary to ensure that the horizontal plane of the experimental instrument should be strictly vertical to the direction of gravity field, and also maintain horizontal during the dynamic rotation of the grating. Therefore, it is necessary to select the platform surface which is strictly vertical to the gravity field through the level indicator, and place the test instruments as shown in figure 7. Then, the height of the grating is controlled by adjusting the screws on the tetrahedron, so that the grating plane is strictly parallel to the platform plane in the process of rotation.

Figure 7. Overall design of grating angle measurement test
By adjusting the height of the autocollimator's knob and base, the transmitting light path of the first mirror passing through the 24hedron is strictly coincided with the receiving optical path. The transverse angle error observed by the autocollimator eyepiece should be less than 0.1 angular second.
Then turn on the power supply of the upper computer software and the servo module to make the system work. The upper computer software sends the fixed angle rotation servo command to the servo control module every 90 seconds. After receiving the servo command through the interrupt trigger, the servo control module controls the motor, and adjusts 15 degrees in turn to make the second, third, fourth of the tetrahedron The surface is aligned with the autocollimator in turn. At the same time, the upper computer acquisition software receives the readings of the two reading heads through the servo module and makes the average processing, and reads the eyepiece angle deviation value through the output serial port of the autocollimator, inputs all the data into the upper computer through RS422, and intercepts the steady-state response of the second sampling of each angle in the last 50 seconds, and carries out the angle measurement error drawing, as shown in figure 8. It can be seen from the figure that the angle measurement of grating has strong regularity. With the grating rotating for one cycle, the angle measurement error approximates the arccosine function. The maximum difference of the three groups of test data is 1.4 angular seconds, which shows that the grating test has high repeatability. The test data can truly reflect the error level of grating angle measurement, and also can show that the grating has stable angle measurement performance.

Angle Compensation Scheme Design based on Harmonic Decomposition
The angle compensation scheme based on Fourier fitting is designed. In the angular position error compensation, the numerical algorithm is usually used to fit the stationary signal. The commonly used angle compensation algorithms include piecewise linear compensation algorithm, polynomial compensation model, harmonic compensation model, and the angle dependent measurement error model is specifically selected. Among them, the harmonic compensation method is based on the error harmonic analysis to get the harmonic components of each order, and then to compensate the amplitude and phase of each harmonic. The general model formula is as follows: The specific method is to decompose the error data into Fourier series based on different reference frequencies, then calculate the harmonic phase and amplitude, and then solve the reference frequency with minimum error by numerical algorithm. Because of the sinusoidal periodicity of the angle measurement error of circular grating, the harmonic model is used to analyze the compensation. The two column vectors of angle error mean and reference angle are brought into the cftool data fitting tool of MATLAB to obtain the third-order harmonic model (since the compensation model will be applied to the embedded program for solution, in order to reduce the algorithm complexity of the future compensation model, the order of the fitting model should not be too high), as shown in Table 1. The effect of harmonic angle measurement error compensation model is shown in figure 9.

Zero Crossing Tremor and Design of Sectional Compensation Scheme
The design of piecewise compensation scheme using only the third harmonic fitting for data fitting compensation will lead to the problem that the compensation angle is not equal between 0 and 360 degrees, which will cause oscillation in servo control. This is because in the grating angle measurement experiment, the angle error gradually accumulates along with the circle movement, eventually causes the angle error after the angle error turns a circle to get 360 degree error and 0 degree error is not exactly the same, further causes the error curve after the compensation fitting is not the same in 0 degree and 360 degree, which leads to the angle error of the input servo motor can not always return to zero when the angle returns to zero. It is a small amplitude oscillation motion near zero. Therefore, in order to solve the problem, this report adopts the piecewise compensation strategy to approximate linear fit the angles between 0 ~ 2.5 degrees and 357.5 ~ 360 degrees, and uses the third-order Fourier fitting for the angles between 2.5 degrees and 357.5 degrees, so that all angles between 0 ~ 360 have unique compensation values. The specific compensation formula is as follows: a. 0°≤ < .5° 0. 53 .3 9 b. .5°≤ < 357.5° 3 3 c.357.5°≤ θ < 360° 0. 53 56.

Conclusion
From the above analysis, the conclusion is as follows: a. In this paper, the grating angle measurement method is studied, including the analysis of grating angle measurement principle, the uniform design of double reading heads, the construction of grating angle measurement test platform, and the design of grating angle rotation servo control system. The physical platform is built and a set of standard angle error measurement method design is provided. b. In this paper, the repeatability test of three groups of grating angle measurement experiments is completed. The test proves that the angle measurement error under the same angle reference is less than 1.4 angular seconds, which shows that the grating angle measurement error law is obvious and the angle measurement error repeatability is good.
c. Aiming at the angle measurement error of grating, the multi-method compensation method is studied in this paper. Finally, the harmonic compensation model is selected as the error compensation model. Aiming at the problem of zero crossing oscillation of the compensation algorithm, the piecewise compensation strategy is designed. The data simulation shows that the angle measurement error after compensation is less than 1.5 angular seconds, which has high engineering application value in the field of high-precision angle measurement.