A New Error Model and Compensation Strategy of Angle Encoder in Torsional Characteristic Measurement System

For systems of measurement, geometric errors such as manufacturing and assembly errors could have a significant impact on the accuracy of the angle encoders of the system. In this study, an error model of angular measurement with geometric errors of a torsional characteristic measurement system was developed based on multibody system theory, the aim of which was to reveal the impact of geometric errors on angular measurement and to compensate the measurement error. According to the principle of spatial error transfer, the decomposition of geometric errors is illustrated and the error matrix of geometric errors is constructed by the Denavit–Hartenberg (DH) method. Subsequently, an error compensation function can be obtained and the impact of geometric error on angular measurement is discussed. Finally, we demonstrate by the experimental results of an ultra-autocollimator that the proposed error compensation method reduced the angular measurement error from 3.7% to 0.7%, which shows that the proposed error model can effectively predict the angular measurement error. In addition, it can be seen from the measurement results of the RV reducer that the error of the torsional characteristic measurement system decreased significantly.


Introduction
The torsional characteristic measurement system (TCMS) can be used to measure the hysteresis curve, torsional stiffness, and backlash of precision reducers for robots, such as an RV reducer and harmonic drive [1]. In addition, the performance and application range of the TCMS are directly determined by the measurement accuracy of the angle. With the improvement of the efficiency and accuracy of the measurement system, the circular grating angle encoder (CGAE) is more commonly used in the field of torsional characteristic measurement because of its good stability, convenient installation, high precision, and fast speed [2,3]. However, the geometric errors of the system, such as part manufacturing tolerances and assembly error, could potentially affect the measurement accuracy of the angle encoder [4]. Therefore, it is desirable to investigate the error feature and compensation strategy of an angle encoder to enhance the measurement accuracy of the TCMS.
In recent studies, the TCMS of precision reducers mainly depends on high-precision angle-measuring equipment in order to ensure the system measurement accuracy. There have been many different torsion angle measurement methods proposed in the literature. For example, Fan and Zhang proposed a hysteretic curve measurement system based on a photoelectric encoder, and its resolution to the angle of rotation was 0.1 arcmin [5]. Michael and Torsten constructed a set of torsional characteristic testing systems using an angle encoder that could be used to measure the torsion angle of discrete points for the harmonic drive. Moreover, the measurement data were compared with that Sensors 2019, 19, 3772 2 of 14 from a theoretical model [6]. Zheng and Xi developed a dynamic characteristics test rig for an RV reducer, where the rail mounting was used to reduce the influence of installation error on the angle encoder [7]. Sun and Han used a laser instrument directly mounted at the output of the reducer to measure the hysteresis curve of a CBR reducer [8]. The measurement error of the torsion angle has a greater impact on the evaluation of the torsional characteristics than the measurement and evaluation of the rotation angle. For example, when evaluating the torsional stiffness of an RV reducer, an angular measurement error of 20 arcsec would result in a stiffness calculation error of approximately 10%.
The study of angle sensor measurement error correction mainly focuses on two directions. The first direction is based on multiple sensors or multireading heads for error compensation. Ai and Chu proposed a method to detect the magnitude and direction of eccentricity for a circular grating angle encoder by using two read heads at 180 • [9]. Lou and Hao proposed a multiread head measurement method to automatically compensate for circular grating deformation, manufacturing defects, and mounting errors. Substantially, it eliminated most of the error of the circular grating angle sensor [10]. Tsukasa et al. developed an automatic calibration system that automatically eliminated the eccentricity error of the rotating shaft using two angle encoders, and the compensation function was obtained by the equal division averaged (EDA) method [11]. However, multiple reading methods require higher mounting accuracy and more heads or sensors must be used, which adds significant cost. Therefore, many other studies have sought to improve the accuracy of circular grating angle encoders without using more read heads. In particular, Guo and Li analyzed the influence of eccentricity on the measurement accuracy of the angle sensor and used the quantitative analysis method to derive the measurement error compensation formula caused by the eccentricity [12]. Gao and Wang proposed a CGAE error compensation model using calibration data and the FFT analysis method. The parameters of the compensation model were determined by the particle swarm optimization algorithm [13]. A mathematical model was proposed by Su and Qiu to reveal the effect of the magnitude and direction of the eccentricity on the angular measurement error [14]. Mi and Gao validated the law of the sinusoidal variation of angle measurement error caused by the installation of eccentricity and angular variation and corrected the error according to the least-squares method (LSM) [15]. These studies are mainly based on calibration data to analyze the relationship between eccentricity error and measurement error and then establish a compensation strategy. However, these methods are very time consuming when calibrating the system for each measurement and only consider the effect of the eccentricity error. Therefore, the measurement error prediction and model analysis of the angle sensor considering the geometric error are of great significance for improving the measurement accuracy and the application of a sensor in different engineering measurement situations.
Based on the above discussion, this paper proposes a new circular grating angle encoder measurement error compensation model, which takes into account the geometric errors of the measurement unit. Compared with traditional error compensation methods, the proposed compensation strategy is more comprehensive and suitable for high-precision angle encoder applications. In Section 2, the geometric errors affecting the measurement accuracy of the TCMS angle encoder are analyzed, and the measurement model of the angle encoder under geometric error is proposed. Section 3 uses the Denavit-Hartenberg (DH) method to establish a mathematical model of the measurement error and derives the parameter function of the measurement error. In Section 4, the effects of these errors on the accuracy of the angular encoder are discussed and calibration experiments are performed to validate the proposed error compensation model.

Measurement System
In this study, the structure of a TCMS for a precision reducer was developed, as shown in Figure 1a. The main structure of the system consisted of a casting platform, a torsion angle measurement unit, a torque sensor, a loading unit, a servomotor, and a control system for motion control and data acquisition. In order to meet the requirements of the multimodel precision reducer and improve measurement efficiency, a circular grating angle encoder (Heidenhain RON786-18000 with a radius of rotation of 30 mm, a resolution of 0.7 arcsec after subdivision, and a system accuracy of ±2 arcsec) was used in this system, and a simplified measurement process was designed. Firstly, the measured reducer, the output shaft, and the flange for the measured reducer were assembled into a corresponding relationship. Then, the above components were mounted on a flange fixed on the casting platform, and the output shaft and angle encoder were connected by a nut, as shown in Figure 1b. control and data acquisition. In order to meet the requirements of the multimodel precision reducer and improve measurement efficiency, a circular grating angle encoder (Heidenhain RON786-18000 with a radius of rotation of 30 mm, a resolution of 0.7 arcsec after subdivision, and a system accuracy of ±2 arcsec) was used in this system, and a simplified measurement process was designed. Firstly, the measured reducer, the output shaft, and the flange for the measured reducer were assembled into a corresponding relationship. Then, the above components were mounted on a flange fixed on the casting platform, and the output shaft and angle encoder were connected by a nut, as shown in Figure 1b. The structure diagram of the torsion angle measurement unit.

Coordinate System and Geometric Source Errors
In order to quantitatively analyze geometric errors, we used the corresponding coordinate system of the torsion angle measurement unit, as shown in Figure 2, which is based on the mounting relationship of the parts. Each coordinate of the part was set as follows:  According to the analysis proposed in [16,17], the geometric error of the measurement system refers to the manufacturing error of each component and the assembly error between the components. Figures 2 and 1b show that the errors caused by the installation process in the x-axis and oyz plane are sensitive sources of measurement error. Here, for a component, we define Δl as the length dimension error along the x-axis, Δτ as the perpendicularity error, Δd as the diameter error, and Δc as the coaxial error. For the adjacent components after installation, the relative position error

Coordinate System and Geometric Source Errors
In order to quantitatively analyze geometric errors, we used the corresponding coordinate system of the torsion angle measurement unit, as shown in Figure 2, which is based on the mounting relationship of the parts. Each coordinate of the part was set as follows: • control and data acquisition. In order to meet the requirements of the multimodel precision reducer and improve measurement efficiency, a circular grating angle encoder (Heidenhain RON786-18000 with a radius of rotation of 30 mm, a resolution of 0.7 arcsec after subdivision, and a system accuracy of ±2 arcsec) was used in this system, and a simplified measurement process was designed. Firstly, the measured reducer, the output shaft, and the flange for the measured reducer were assembled into a corresponding relationship. Then, the above components were mounted on a flange fixed on the casting platform, and the output shaft and angle encoder were connected by a nut, as shown in Figure 1b. The structure diagram of the torsion angle measurement unit.

Coordinate System and Geometric Source Errors
In order to quantitatively analyze geometric errors, we used the corresponding coordinate system of the torsion angle measurement unit, as shown in Figure 2, which is based on the mounting relationship of the parts. Each coordinate of the part was set as follows:  Coordinate 1: platform coordinate S1, 1   According to the analysis proposed in [16,17], the geometric error of the measurement system refers to the manufacturing error of each component and the assembly error between the components. Figures 2 and 1b show that the errors caused by the installation process in the x-axis and oyz plane are sensitive sources of measurement error. Here, for a component, we define l as the length dimension error along the x-axis,  as the perpendicularity error, d as the diameter error, and c as the coaxial error. For the adjacent components after installation, the relative position error According to the analysis proposed in [16,17], the geometric error of the measurement system refers to the manufacturing error of each component and the assembly error between the components. Figures 1b and 2 show that the errors caused by the installation process in the x-axis and oyz plane are sensitive sources of measurement error. Here, for a component, we define ∆l as the length dimension error along the x-axis, ∆τ as the perpendicularity error,∆d as the diameter error, and ∆c as the coaxial error. For the adjacent components after installation, the relative position error along the x-axis, the eccentricity error of the x-axis, and the tilt errors along the mounting surface are defined as δr, δe, and δt, respectively. The relationship between the manufacturing errors and the assembly errors for adjacent parts can be expressed as where i and j are the component number.

Measurement Model of Angle Encoder under Geometric Errors
Based on the spatial coordinate system and angle measurement relationship established in the previous section, the angle measurement model was constructed under error, as shown in Figure 3. Under the impact of geometric errors, the position of the measuring point changes. The measurement plane in which the sensor is located is defined as plane A, and the plane of the measured point on the output shaft is defined as plane B. Ideally, the sensor and output shaft rotate about the x-axis. The traditional analysis method only considers the influence of the eccentricity error of the rotation axis. Moreover, the measurement model of the angle encoder under eccentricity error is shown in Figure 3a. The angular error can be expressed as [9] ∆θ= arctan e· sin θ where R 1 is the rotation radius of the angle encoder, e is the eccentric error, θ is the measurement angle by the encoder, and ϕ is the stagger angle of the output shaft axis and the rotation axis of the angle encoder.
where i and j are the component number.

Measurement Model of Angle Encoder under Geometric Errors
Based on the spatial coordinate system and angle measurement relationship established in the previous section, the angle measurement model was constructed under error, as shown in Figure 3. Under the impact of geometric errors, the position of the measuring point changes. The measurement plane in which the sensor is located is defined as plane A, and the plane of the measured point on the output shaft is defined as plane B. Ideally, the sensor and output shaft rotate about the x-axis. The traditional analysis method only considers the influence of the eccentricity error of the rotation axis. Moreover, the measurement model of the angle encoder under eccentricity error is shown in Figure 3a. The angular error can be expressed as [9] 1 sin =arctan cos where 1 R is the rotation radius of the angle encoder, e is the eccentric error,  is the measurement angle by the encoder, and  is the stagger angle of the output shaft axis and the rotation axis of the angle encoder.
However, under the influence of geometrical errors, the axis of rotation of the output shaft and the axis of rotation of the encoder produce staggered angles. The measurement model under geometric errors is shown in Figure 3b. Based on the basic principle of spatial meshing [18], the angular error can be expressed as a function related to ' where ' 1 R is the rotation radius of the actual measurement point on the angle encoder, and ' 2 R is the radius of the actual measurement point relative to the axis on the output shaft section. However, under the influence of geometrical errors, the axis of rotation of the output shaft and the axis of rotation of the encoder produce staggered angles. The measurement model under geometric errors is shown in Figure 3b. Based on the basic principle of spatial meshing [18], the angular error can be expressed as a function related to R 1 and R 2 : where R 1 is the rotation radius of the actual measurement point on the angle encoder, and R 2 is the radius of the actual measurement point relative to the axis on the output shaft section.

Mathematical Model of Error Compensation
In this section, based on the DH method, the relationship between the position of the measuring point and the manufacturing and assembly errors of each component is established, and then the error compensation model of the angle sensor is developed.

Error Matrix and Geometric Error Decomposition
Based on the basic principle of the multibody system error model [19], when there is a geometric error adjacent part coordinate system, it can be decomposed according to the sensitive direction of the error, which can be expressed as ∆x, ∆y, ∆z, ∆α, ∆β, and ∆γ, respectively. It should be noted that ∆x, ∆y, and ∆z are the translation errors along the x-axis, y-axis, and z-axis, and ∆α, ∆β, and ∆γ are the rotation errors around the axis, respectively. Therefore, according to the DH theory and the simplified method in [20], the general expression of the characteristic matrix of errors can be expressed as where ∆T ij (i and j are the component numbers) represents an error matrix between adjacent parts. It can be obtained that the error transmission direction is S1-S2-S3-S4 and S1-S5-S6 from the coordinate systems established in Section 2. Taking the S1 and S2 coordinate systems as an example, the geometric errors of the adjacent coordinate system are decomposed as follows: (1) Determine the relationship between the manufacturing and assembly errors of adjacent components in S1 and S2 coordinate systems based on Equation (1), and the relationship can be expressed as (2) Decompose the above assembly errors according to the translation and rotation errors in Equation (4). Simultaneously, the transformed feature matrix T 12 can be obtained based on the position relationship between coordinate systems. The feature matrix T 12 and error matrix ∆T 12 of S2 relative to S1 can be expressed as  (1) and (2) for the other adjacent coordinate systems. The feature matrix T ij and the relationships between the manufacturing and assembly errors of other adjacent components are obtained as follows: According to the above analysis, the errors between adjacent parts of the torsion angle measurement unit after decomposition are shown in Table 1.

The Transformation of the Measurement Point
Based on the principle of homogeneous coordinate transformation, the feature matrix T ij is used to describe the position coordinate transformation of the measurement point in each coordinate system. Assuming a measurement point E t in the output shaft coordinate system S4, a corresponding point E m can be obtained in the angle measurement coordinate system S6 after a series of coordinate transformations of the intermediate coordinate system. The transformation relationship of E t and E m can be expressed as

Derivation of Mathematical Model
According to the measurement model proposed in Section 2, this subsection shows how we determined the relationship between the theoretical and actual measurement points based on the spatial geometry method [21]. Suppose Pt is the theoretical measurement point on the output shaft, P is the intersection of the actual rotation axis and the measurement plane, Pa is the actual measurement point on the output shaft, and the diameter of the output shaft is d. The coupling nut on the normal plane of the output shaft passes the point Pa, the intersection of the measurement plane is Pm, and PaPm = R 2 . The intersection point of the normal of the crossing point Pm and the actual output shaft on the measurement plane is Q, as shown in Figure 4.
To facilitate the derivation calculation, the transformation matrix T64 is represented by a parameter matrix as By combining Equations (10) and (11) In the S7 coordinate system, the unit normal vector of the measurement surface can be expressed as By combining Equations (12) and (13), the angle between the actual axis of the output shaft and the axis of rotation of the angular encoder can be expressed as According to the system structure parameters, the coordinates of point Pt in the S4 coordinate system are (L 47 , 0, 0). In addition, two points (P 0 and P 1 ) on the x-axis are selected in the S4 coordinate system. The coordinates are converted according to Equation (9) to obtain corresponding points in the S6 coordinate system. The coordinate calculation formula can be expressed as To facilitate the derivation calculation, the transformation matrix T 64 is represented by a parameter matrix as By combining Equations (10) and (11), the linear equation and unit direction vector along the actual axis of the output shaft can be expressed as In the S7 coordinate system, the unit normal vector of the measurement surface can be expressed as → n = (1, 0, 0).
By combining Equations (12) and (13), the angle between the actual axis of the output shaft and the axis of rotation of the angular encoder can be expressed as Through Equations (10)- (14) and the positional relationship of each point in Figure 4, the lengths of P m O 6 and P a P t can be derived based on the spatial positional relationship: Due to the influence of the geometric errors, the measurement area will change with the changes of the actual measurement point on the output shaft. To evaluate the measurement error accurately, we define ∆θ S as the angle measurement error caused by the changes of the measurement area. Based on the above equations, the mathematical function for the angle measurement error can be expressed as where θ is the measurement value of the angle encoder, T is the loading torque, and G is the shear modulus.
According to the error compensation model, the error ∆θ S caused by the change of the measurement area is a linear change value of the torque T, which can be compensated by subtracting the value of this part from the measured value of the sensor. The measurement error of the angle sensor can be divided into two cases: When ϕ = 0, which is judged according to Formula (14), the error ∆θ can be obtained according to Formula (2), so that the eccentric error of the actual measurement point in the X and Y directions can be calculated by the above model. When ϕ 0, the coefficient of error ∆θ with respect to θ can be obtained by substituting the manufacturing error of each part into the above model.

Simulation and Experiment
We analyzed the influence of geometric parameters on the measurement accuracy of an angle sensor based on the above model and used a self-collimator for validation experiments. Finally, a new angle measurement error compensation strategy was used to compare the test results of the TCMS system.

Simulation Verification
The numerical analysis software MATLAB was used to simulate the proposed error compensation model. In order to analyze the influences of the tilt error and the relative position errors on the measurement results, the effects of the relative position error along the x-axis, the rotation error around the y-axis, and the translation error along the y-axis on the angle measurement error were taken as an example. The structure parameters of the measurement unit are shown in Table 2, and according to the machining accuracy of the components, the assemble errors δr, δe, and δt were set to 0.1 mm, 0.02 mm, and 0.02 rad, respectively. The simulation results of the measurement error are shown in Figure 5. The following conclusions can be drawn from the graph: (1) The measurement error was linear with the geometric errors as the measurement angle increased from 0 to 500 arcsec. (2) The measurement error increased after considering the tilt errors and eccentricity errors simultaneously. (3) The influence of the relative position error was less than that of the tilt error, so that ∆θ S increased by 3 arcsec as the loading torque increased from 0 to 3000 Nm.

Calibration Experiment
To validate the error compensation method, a calibration experiment was performed on the torsional characteristics measurement system, which is illustrated in Figure 6. In particular, an ultra-autocollimator with a 12-sided glass polygon (Taylor Hobson; the measuring range was 1800 arcsec, the resolution was 0.001 arcsec, and the accuracy over the total range was 0.2 arcsec) was used to measure the torsion angle when the loading actuator was loaded with the given value. The experiment procedure was as follows: 1. Verify the geometric errors of each part of the measurement unit as shown in Table 3 and obtain the error compensation function based on the above model. 2. Select the appropriate output shaft that can simultaneously satisfy the mounting of the angle sensor and the glass polygon, so that the theoretical measurement points are consistent. Then, determine the theoretical measurement point. 3. A torsion angle is measured every 50 Nm in a load torque range of 1700 Nm. 4. Repeat (3) three times and take an average to obtain 34 angle values. 5. Repeat (2)-(4) using a circular grating angle encoder. 6. Compensate the measured values of the angle encoder according to the proposed error model, and compare the data before and after the compensation and the autocollimator.

Calibration Experiment
To validate the error compensation method, a calibration experiment was performed on the torsional characteristics measurement system, which is illustrated in Figure 6. In particular, an ultra-autocollimator with a 12-sided glass polygon (Taylor Hobson; the measuring range was 1800 arcsec, the resolution was 0.001 arcsec, and the accuracy over the total range was 0.2 arcsec) was used to measure the torsion angle when the loading actuator was loaded with the given value. The experiment procedure was as follows: 1.
Verify the geometric errors of each part of the measurement unit as shown in Table 3 and obtain the error compensation function based on the above model.

2.
Select the appropriate output shaft that can simultaneously satisfy the mounting of the angle sensor and the glass polygon, so that the theoretical measurement points are consistent. Then, determine the theoretical measurement point.

3.
A torsion angle is measured every 50 Nm in a load torque range of 1700 Nm.

4.
Repeat (3) three times and take an average to obtain 34 angle values.
Compensate the measured values of the angle encoder according to the proposed error model, and compare the data before and after the compensation and the autocollimator.  Figure 7 shows the experiment data. It can be seen that the compensated angle value was quite consistent with the amplitude of each point measured by the self-collimator, and the maximum of the angular error was reduced from 10.9 to 2.1 arcsec within the range measured after compensation. In addition, the angular measurement error reduced from 3.7% to 0.7%, as shown in Table 4. Sensors 2019, 19, x FOR PEER REVIEW 10 of 14 Figure 6. Verification experiment using an ultra-autocollimator. Figure 7 shows the experiment data. It can be seen that the compensated angle value was quite consistent with the amplitude of each point measured by the self-collimator, and the maximum of the angular error was reduced from 10.9 to 2.1 arcsec within the range measured after compensation. In addition, the angular measurement error reduced from 3.7% to 0.7%, as shown in Table 4.  Figure 8a shows the difference between the actual error value and the model compensation value. The square dotted line indicates the actual error value, which is the difference of the measured values between the angle encoder and the autocollimator. The round dotted line indicates the compensation value of the error compensation model. It can be observed that the square and dotted lines had the same tendency when the angle increased, which indicates that the error compensation model was correct. In addition, the square line is slightly above the round dotted line and has significant sinusoidal periodic fluctuations, indicating that the actual error contained other error terms. In the actual situation, the compensation coefficient was a constant when the manufacturing error was determined. It can be seen from Figure 8a that the predicted error based on the model was linear. According to the error model, the measurement error of the angle sensor can be effectively reduced by analyzing the influence of manufacturing errors on the compensation coefficient and controlling the machining accuracy of the critical dimension of the components.
It can be seen from Figure 8b that the actual error value fluctuated within 2 arcsec, which was consistent with the system accuracy of the angle encoder. For the case where the actual error value was larger than the compensation value by 1-2 arcsec, it can be considered as the following two   Figure 7 shows the experiment data. It can be seen that the compensated angle value was quite consistent with the amplitude of each point measured by the self-collimator, and the maximum of the angular error was reduced from 10.9 to 2.1 arcsec within the range measured after compensation. In addition, the angular measurement error reduced from 3.7% to 0.7%, as shown in Table 4.  Figure 8a shows the difference between the actual error value and the model compensation value. The square dotted line indicates the actual error value, which is the difference of the measured values between the angle encoder and the autocollimator. The round dotted line indicates the compensation value of the error compensation model. It can be observed that the square and dotted lines had the same tendency when the angle increased, which indicates that the error compensation model was correct. In addition, the square line is slightly above the round dotted line and has significant sinusoidal periodic fluctuations, indicating that the actual error contained other error terms. In the actual situation, the compensation coefficient was a constant when the manufacturing error was determined. It can be seen from Figure 8a that the predicted error based on the model was linear. According to the error model, the measurement error of the angle sensor can be effectively reduced by analyzing the influence of manufacturing errors on the compensation coefficient and controlling the machining accuracy of the critical dimension of the components.
It can be seen from Figure 8b that the actual error value fluctuated within 2 arcsec, which was consistent with the system accuracy of the angle encoder. For the case where the actual error value was larger than the compensation value by 1-2 arcsec, it can be considered as the following two  Figure 8a shows the difference between the actual error value and the model compensation value. The square dotted line indicates the actual error value, which is the difference of the measured values between the angle encoder and the autocollimator. The round dotted line indicates the compensation value of the error compensation model. It can be observed that the square and dotted lines had the same tendency when the angle increased, which indicates that the error compensation model was correct. In addition, the square line is slightly above the round dotted line and has significant sinusoidal periodic fluctuations, indicating that the actual error contained other error terms. In the actual situation, the compensation coefficient was a constant when the manufacturing error was determined. It can be seen from Figure 8a that the predicted error based on the model was linear. According to the error model, the measurement error of the angle sensor can be effectively reduced by analyzing the influence of manufacturing errors on the compensation coefficient and controlling the machining accuracy of the critical dimension of the components. model and compensation method can effectively predict the angular measurement error caused by geometric errors. In addition, the error compensation model is a function of the part manufacturing error and the sensor angle. Therefore, the compensation coefficient can be quickly solved using MATLAB software. According to the LabVIEW programming language of the measurement system, the real-time compensation of angle measurements can be achieved by writing compensation coefficients for the measurement program.   It can be seen from Figure 8b that the actual error value fluctuated within 2 arcsec, which was consistent with the system accuracy of the angle encoder. For the case where the actual error value was larger than the compensation value by 1-2 arcsec, it can be considered as the following two cases: (a) The geometric error is averaged along the error-sensitive direction in the error model. However, the geometric error is in a fixed direction in the actual case, so the compensation value deviates from the actual error value. (b) Only the main geometric errors are considered in this paper, while the deformation of the measurement point is not taken into consideration in the measurement process.
Consequently, the above experimental results and discussions show that the proposed error model and compensation method can effectively predict the angular measurement error caused by geometric errors. In addition, the error compensation model is a function of the part manufacturing error and the sensor angle. Therefore, the compensation coefficient can be quickly solved using MATLAB software. According to the LabVIEW programming language of the measurement system, the real-time compensation of angle measurements can be achieved by writing compensation coefficients for the measurement program.

Measurement of Torsional Characteristics for RV Reducer
Three types of reducers (Nabtesco's RV-110E, RV-60N, and RV-100C) were used in this study to validate the accuracy of the measurement and the reasonableness of the error compensation. Figure 9 shows the measurement results of the hysteresis curve for the RV reducers. The backlash and torsional stiffness were evaluated and compared with the sample data generated by the sample calculation method. The comparison results are shown in Table 5.
It can be observed from Figure 9 that the measured hysteresis curve is smooth and closed, indicating that the angle measured by the sensor was consistent with the actual torsion angle. On the other hand, the values of backlash were within the sample range and were consistent with the actual situation according to Table 5. The difference between the measured value after compensation and the sample value of the torsional stiffness was 3.13, 2.51, and 2.79 Nm/arcmin, respectively. The system measurement errors decreased by 8.3%, 9.2%, and 13.4% before and after angular error compensation, respectively. So, the measurement results have also validated the proposed error compensation method. Sensors 2019, 19, x FOR PEER REVIEW 13 of 14 Figure 9. The measurement hysteresis curve of RV-100C.

Conclusions
In this paper, the influence of manufacturing and assembly errors on the measurement accuracy of an angle encoder was analyzed from the perspective of measurement structure. Based on the traditional error compensation model with calibration data, an angular sensor measurement model considering geometric errors was proposed. The process of error action was considered to be the motion between rigid bodies according to the characteristics of the new model. The geometric error was decomposed by the error-sensitive direction, and the error transfer matrix was obtained based on the multibody system theory and the DH transformation principle. Therefore, the relationship between the spatial position parameters of the measurement point and the geometric errors could be established. Next, the mathematical function of the measurement error was derived, with the established error compensation strategy. The simulation results showed that these errors, including translation errors along the x-axis, eccentricity errors, and tilt errors along the mounting surface, have an obvious influence on the angle measurement error. Further, the rationality of the model for error prediction was also validated. In addition, the results of the autocollimator in the comparison verification experiment proved the correctness of the proposed error compensation method. The measurement error of the encoder after compensation was reduced from 3.7% to 0.7% compared to the measurement data of the autocollimator. The measurement error of TCMS decreased by 8.3% to 13.4% before and after angular error compensation on three types of RV reducer, and the measurement results also validated the proposed error compensation method.
However, the compensation model is still insufficient because it does not compensate for the error caused by bending deformation during the measurement. In fact, we observed changes in the measurement points caused by deformation during the comparison experiment, which also caused angle measurement error. Therefore, the compensation model still needs to be improved, although its performance is good. We will improve the reliability of the measurement system in the future.
Author Contributions: The work described in this article is the collaborative development of all authors. Bingkui Chen and Changyan Peng contributed to the idea of the measurement error model, performed the experiments, and participated in the writing of the paper. Jian Huang made contributions to data measurement and analysis.

Acknowledgments:
The authors are grateful for all of the valuable suggestions received during the course of this work.

Conclusions
In this paper, the influence of manufacturing and assembly errors on the measurement accuracy of an angle encoder was analyzed from the perspective of measurement structure. Based on the traditional error compensation model with calibration data, an angular sensor measurement model considering geometric errors was proposed. The process of error action was considered to be the motion between rigid bodies according to the characteristics of the new model. The geometric error was decomposed by the error-sensitive direction, and the error transfer matrix was obtained based on the multibody system theory and the DH transformation principle. Therefore, the relationship between the spatial position parameters of the measurement point and the geometric errors could be established. Next, the mathematical function of the measurement error was derived, with the established error compensation strategy. The simulation results showed that these errors, including translation errors along the x-axis, eccentricity errors, and tilt errors along the mounting surface, have an obvious influence on the angle measurement error. Further, the rationality of the model for error prediction was also validated. In addition, the results of the autocollimator in the comparison verification experiment proved the correctness of the proposed error compensation method. The measurement error of the encoder after compensation was reduced from 3.7% to 0.7% compared to the measurement data of the autocollimator. The measurement error of TCMS decreased by 8.3% to 13.4% before and after angular error compensation on three types of RV reducer, and the measurement results also validated the proposed error compensation method.
However, the compensation model is still insufficient because it does not compensate for the error caused by bending deformation during the measurement. In fact, we observed changes in the measurement points caused by deformation during the comparison experiment, which also caused angle measurement error. Therefore, the compensation model still needs to be improved, although its performance is good. We will improve the reliability of the measurement system in the future.
Author Contributions: The work described in this article is the collaborative development of all authors. B.C. and C.P. contributed to the idea of the measurement error model, performed the experiments, and participated in the writing of the paper. J.H. made contributions to data measurement and analysis.