Subdivision Error Analysis and Compensation for Photoelectric Angle Encoder in a Telescope Control System

As the position sensor, photoelectric angle encoder affects the accuracy and stability of telescope control system (TCS). A TCSbased subdivision error compensation method for encoder is proposed. Six types of subdivision error sources are extracted through mathematical expressions of subdivision signals first. Then the period length relationships between subdivision signals and subdivision errors are deduced. And the error compensation algorithm only utilizing the shaft position of TCS is put forward, along with two control models; Model I is that the algorithm applies only to the speed loop of TCS and Model II is applied to both speed loop and position loop. Combined with actual project, elevation jittering phenomenon of the telescope is discussed to decide the necessity of DC-type subdivision error compensation. Low-speed elevation performance before and after error compensation is compared to help decide that Model II is preferred. In contrast to original performance, the maximum position error of the elevation with DC subdivision error compensation is reduced by approximately 47.9% from 1.42 to 0.74. The elevation gets a huge decrease in jitters. This method can compensate the encoder subdivision errors effectively and improve the stability of TCS.


Introduction
There are increasingly high demands on acquisition, tracking, and pointing (ATP) capabilities of TCS, whose accuracy is required to reach arcsecond scale usually [1][2][3][4].When used for astronomical observations, for example, tracking star, TCS speed needs to be less than 1  /s sometimes.This places great requirements on the precision and accuracy of position measurement of photoelectric angle encoder [5,6].
The measuring accuracy of angle encoder is mainly affected by encoder output sinusoidal signal period, grating consistency and marginal definition, quality of optical filter, characteristics of optoelectronic detectors, and stability and dynamic property of further analog signal processing [6,7].Telescope azimuth and elevation encoders are without integral bearings, which we therefore should take the errors mainly generated by assembly of the scanning head, mounting eccentricity of the grating and radial runout of the shaft into consideration [6,7].The impact of these factors on angular measurement is mostly presented by encoder subdivision signal error.To prevent this measuring accuracy, loss of angle encoder, correction, or compensation methods are required.
If the causes, value, and dynamic laws of subdivision errors can be detected, it is possible to avoid the generation of some errors or to directly compensate for the subdivision error to improve the encoder measuring accuracy.Russia, Japan, and Germany are now leading the world's encoder error detection research [8].St. Petersburg State Electrotechnical University developed an encoder error detection system with an accuracy of 0.1  at speeds of up to 10 RPS, which can realize dynamic error detection [9].A set of encoder error detection lab systems with a resolution of 0.001  and an uncertainty of ±0.05  has been developed by National Institute of Advanced Industry Science and Technology in Japan [10].In National Metrology Institute of Japan, an encoder self-calibration system using the equal division averaged method (EDA method) can realize an expanded uncertainty of 0.01  [11].

Mathematical Problems in Engineering
For subdivision error compensation, Chenran and his partners from Changchun University of Science and Technology proposed an error compensation method based on a BP neural network.This method reduced the error from 20  to less than 2  in a practical application [12].Sun proposed a moire triangle subdivision error compensation method capable of integrating compensation for triangular signals.
In an actual test, this system reduced the subdivision error to 1/3 of the original error [13].The American Observatory proposed an adaptive periodic subdivision error compensation method based on a Heidenhain encoder [14].The Korean company LG applied a shifting grating method for phase error compensation for subdivision signals [15].Huazhong University of Science and Technology suggested a phase error compensation method using ellipse fitting [16].Changchun Institute of Optics, Fine Mechanics, and Physics presented an error compensation method for an optical encoder based on a RBF network [17].Ye and his team from Xi'an Jiaotong University proposed a linearization method with improved robustness for determining the displacement from the sine and cosine signals generated by optical encoders [18].Alex and his coworkers from Technische Universitat Berlin put forward a dynamic state estimation method based on Poisson spike trains towards optimal encoding to improve the accuracy of optical encoders [19].However, the requirement of an ideal laboratory environment and an overemphasis on correcting or compensating the subdivision error of the encoder rather than considering the impact of the subdivision error on the overall system continue to limit the implementation of these systems.Therefore, because these subdivision error compensation methods are difficult to adapt for use at work sites, photoelectric encoders are used in practical applications with changing environments.
However, the requirement of an ideal laboratory environment and an overemphasis on correcting or compensating the encoder subdivision error rather than considering the impact of the subdivision error on the overall system continue to limit the implementation of these systems and methods.Therefore, these methods are difficult to adapt for use at work sites, where the encoder application environment is changeable and complex.
To reduce the subdivision error and improve the angle encoder measuring accuracy, as well as the bandwidth, stiffness, response time, load capacity, accuracy, and stability of TCS, we have carried out a compensation method on photoelectric angle encoder subdivision errors.We employ the position value measured by encoder to correct the subdivision error without changing the angle encoder measuring system.This method can be applied in practical settings to improve the angular position measuring accuracy and stability of TCS.And this method has not yet been documented [20].

Mathematical Analysis for Subdivision Errors
The ideal encoder output two signals are composed of two quadrature signals of equal amplitude with zero mean value, which need to be further subdivided to achieve highresolution and high-precision performance [21].For TCS, the subdividing number typically needs to be larger than 1000 to obtain sufficient and effective information, especially when the servosystem is operating at low speed [6,7].At present, graphical or data analysis on features of the sample points is commonly used methods, whereas mathematical analysis is rarely mentioned in subdivision error research [22].
The encoder output signals are obtained by the moire fringe technique in a quasisine waveform.The expressions of the two subdivision signals A and B are as follows [22]: where A and B consist of four parts. 0 and  0 represent the DC components, which are DC subdivision error sources.  and   are the amplitudes of the base waves, which are amplitude subdivision error sources.∑ ∞ =2   sin( +   ) and ∑ ∞ =2   cos( +   ) are the sum of higher harmonics, which are harmonic subdivision error sources.  represents the electrical noise, which is the electrical noise subdivision error source.In addition, the analog-to-digital conversion (A/D) of A and B is the quantization subdivision error source and the phase difference between A and B is the phase subdivision error source.
To achieve a high subdividing number, we adopted the arc tangent subdivision method [23], which is expressed as where   and   are the real and measured subdivision signal angles, respectively, and Δ is the subdivision error.Therefore, an analysis will be carried out on the above 6 factors to find out the rules and features of these error sources to improve the subdivision accuracy.

DC Subdivision Error Analysis. If only DC components exist in A and B without any other error sources, the relation between A and B is
according to which we draw Figure 1.
In Figure 1, the dashed part represents the Lissajous figure of A and B without error sources.The solid part represents the figure with DC error sources  0 and  0 . is the current measuring point of subdivision angle.Δ is the DC subdivision error.  and   + 180 ∘ are the intersections of line   and the two circles.And there are   = ∠  ,   = ∠, and Δ = ∠  .InitialAngle is zero phase shift.And the following relationship can be deduced from Figure 1 by trigonometric function:

Amplitude Subdivision Error Analysis. If only amplitude
error sources exist in  and , the relationship between  and  is according to which we can draw Figure 2 for signature analysis.
In Figure 2, the dashed part represents the Lissajous figure of A and B without subdivision error sources, and the solid part is the figure with amplitude error sources. is the current measuring point.Δ = ∠ is the amplitude subdivision error.And there are  =   ,   = ||,   = ∠, and   = ∠.
From Figure 2 and the definition of the arc tangent subdivision (2), we obtain the following expression: 2.3.Harmonic Subdivision Error Analysis.If only  ( > 1) harmonic error sources exist in A and B without other error sources, a relationship can be determined according to (1) and ( 2): ) . ( If there are different harmonic error components, the total harmonic subdivision errors equal the sum of subdivision errors brought by all of the harmonic components.

Electrical Noise Subdivision Error Analysis. If only noise error sources exist in A and B without other error sources, then
where   and   are the noises carried by signals  and , respectively.And there is  =   =   .The encoder noise generally comes from strong magnetic fields of the transformer, brake, and motor, as well as stray magnetic fields of high-frequency equipment, pulsers and switching power supplies, and AC power lines and power lines of these devices.Noise can be introduced to the system through the terminals of the signal lines and the input/output lines.The encoder noise is essentially caused by capacitive or inductive conductivity.If the installation and use of matched cables and cable assemblies are applied correctly, the encoder will comply with the provisions of the EMC standard 89/336/EEC.We adopt connectors with metal shells or a terminal box recommended by the encoder company and connect shielding at the cable leads in an attempt to achieve a no-inductance connection.Both   and   will be controlled in a very small range, which means that the electric noise will have little impact on the subdivision signal, let alone the accuracy of the encoder and TCS [6,7].angle obeys uniform distribution.So the quantization subdivision error can be expressed as

Quantization Subdivision Error Analysis. The quantization of photoelectric subdivision signals and subdivision
where Δ is the root mean square error of this uniform distribution as well.  is the resolution of the subdivision angle.
If   is small enough, the influence of the quantization subdivision error Δ on the encoder measuring precision can be neglected.) ,

Phase Subdivision Error
where   refers to the phase difference between  and .
From the above 6 mathematical expressions of Δ, we can see that both Δ and subdivision signals A and B are function of   .Then, we deduce the following relationship between Δ and subdivision signals as shown in Table 1.

Subdivision Error Compensation Algorithm Proposed in TCS
A telescope that we use as the experimental platform is shown in Figure 3.And the angle encoder measuring system works as shown in Figure 4.
From Figure 4, we can see that, for upper software operator, coarse code and fine code commonly are the only parameters received from the angle encoder.Coarse code represents the complete period number of subdivision signals  and  the shaft has rotated.As for representation of the left position expression part that the shaft rotates less than the angle that one subdivision signal space period can be The total digits AllBit, as well as the digits of the angle encoder measuring system, are the sum of CoarseBit and FineBit.For code disk, the density of grating increases inside out, and coarse code is obtained from the most sparse grating that we tacitly approve that the position    measured by the CoarseCode is accurate and the subdivision error exists in the position    represented by FineCode.
The subdivision error compensation scheme combines the angle encoder measuring system with TCS and connects the encoder subdivision error Δ with the shaft position   measured by the angle encoder of TCS directly to compensate for the subdivision error while making full use of the excellent properties of TCS.The algorithm diagram is shown in Figure 5.
In The implementation steps for Module A are as follows.
Step 1. Through mathematical analysis of the subdivision error, error source type can be determined combined with the encoder measuring system and the encoder application environment.If the influence of the subdivision error on the accuracy of TCS is weak enough to be neglected, Module A ends and Module B will not be performed.Otherwise, Module A continues.
Step 5. Judge whether the subdivision signals have zero phase deviation InitialAngle.If there is an InitialAngle, we regard the current zero point as starting point and the real measured subdivision angle   can be expressed as   =   − .  is the measured subdivision angle obtained by   and (1), according to the error source type.If there is no offset, then   =   .
The core idea of Module A is calculating   and its fine code with the help of angle   to obtain CodeAll of the real measured shaft position   .In this way, the encoder subdivision error will be fed to Module B in the form of code values.
Module B is divided into two parts.Module B-1 operates as follows.Step 2. Obtain the uncorrected fine code NCFineCode according to  =  − .Module B-1 is complete.
Module B-2 operates as follows.
Step 1. Calculate the electrical subdivision angle represented by the unmodified fine code according to ℎ = ( ⋅ /  ) ⋅ 360 ∘ .FinePhaseOrigin and   are from different sources.The former comes from the uncorrected fine code, whereas the latter is acquired by the is an obvious jitter with an amplitude of 1.4  approximately at 22.76 Hz in frequency domain.We recorded the elevation position error, its guide speed, and the frequency of jitter points.To acquire the effective position error of the elevation leading operation Error, we set v as the leading speed first.
Then the leading position can be expressed as   () = V * () at the time of ().Make   () represent the feedback position acquired by the angle encoder.The error at the time of () can be calculated according to () =   () −   ().Then Error can be expressed by RMS (root mean square) of the () according to  = (∑  =1 (()) 2 /) 1/2 .And the jitter period  in space domain can be determined according to  =  * 1/.
The 24-bit encoder measuring system resolution of TCS is  = (360/2  ) ∘ = (360/2 24 ) ∘ ≈ 0.07724761962890625  .16-bit fixed-point TMSC5416 chip produced by TI (Texas Instruments) is chosen as the processor of TCS.In order to avoid unnecessary loss of processor resources and guarantee the angle measuring precision, we choose the angle measuring accuracy to be at 0.000001 ∘ , which has up to four digits after the decimal point in the arcsecond scale expression as 0.0001  .
The statistical results are shown in Table 2.Although all six subdivision error sources can affect the accuracy and the stability of the control system, the impact ability of each error source is various in different systems.To save the system resources and guarantee the good real-time ability of the control system, only the main subdivision errors are modified or compensated generally.
From Figure 8 and Table 2, we can see that obvious jitter exists in each frequency domain of the elevation performance in constant speed leading working mode, which can be transformed into angular value in space domain according to  =  * 1/ shown in Table 2 (column 3).The TCS employs a 24-bit photoelectric absolute angle encoder, of which there are 14 bits for the coarse code.Through coarse code, the shaft position corresponding to one-period length of subdivision signals A and B can be calculated as   = (360/2  ) ∘ = 79.1016 .So the angular value  corresponding to the jitters  is equal to the space period of subdivision signals A and B, which means   /  = 1 in the acceptable degree of accuracy.Comparing this result with Table 1, whose parameters are deduced through mathematical and theoretical analysis, we can see that the DC subdivision errors and the second harmonic subdivision errors are just in line with the comparison.
A sinusoidal leading operation to the elevation is done, which sets 60 ∘ as center position, defines its period as 10000 seconds, and gives a maximum velocity of 1.5 rad/s, a maximum acceleration of 0.094 rad/s 2 , and a maximum motion of 23.873 ∘ .The elevation status detected by the encoder is shown in Figure 9.Given that the sinusoidal purity of measuring results is excellent, we choose to neglect the influence of the second harmonic subdivision error on the encoder measuring accuracy.After comprehensive analysis, we chose the DC subdivision error for compensation according to the proposed subdivision error compensation algorithm.
To compensate for the DC subdivision error, we first take the initial parameters  = 24,  = 14 and  = 10 into the algorithm.Because of the existence of the DC subdivision error, we need to solve for the phase offset  first.We suppose that the influence of the DC subdivision error source on elevation is far stronger than other error sources.The DC offsets  0 and  0 are assumed to be approximately equal.Thus, the DC offset can be calculated from where  is the sampling number in one period of    .As long as the sampling number is large enough,  0 and  0 are perceived as correct.
Because the photoelectric angle encoder outputs 1V PP subdivision signals, we make   = 1.The zero shift of the subdivision signal angle can be obtained by  = arctan( 0 /(1 +  0 )).According to the definition of subdivision signals and Figure 1, we obtain the following: We plug the above parameters into the subdivision error compensation algorithm and apply Model I and Model II in elevation control system.Compared with Figure 8, from Figure 10 we can see that the jitter has been obviously weakened to approximately 0.45  and the elevation error has been decreased by approximately 42.2% from 1.05  to 0.61  when elevation works at 0.5 ∘ /s.The measured low-speed working performance of the elevation is shown in Figure 11.
The tracking performance of elevation is obviously enhanced after the two control models are applied compared with the performance without DC subdivision error compensation.Thus, the proposed subdivision error compensation algorithm can improve the encoder measuring accuracy and suppress the tracking error to ensure the low-speed stability of TCS.Model II provides superior error compensation in the elevation control system, especially elevation working at the speed of 0.05-0.3∘ /s.It also provides a relatively stable working stage when the elevation rotational speed is larger than 0.8 ∘ /s.In addition, the test results of Model II are closer to the working performance of the azimuth control system, which usually provides excellent performance.The subdivision error compensation algorithm is simple and easy to implement, placing little burden on TCS operation.Thus, Model II is more appropriate for use in TCS.Compared with the elevation control system without DC subdivision error compensation, the maximum corrected elevation position error was reduced by approximately 47.9% from 1.42  to 0.74  .The low-speed and overall performance of the elevation control system was enhanced significantly.

Conclusion
Based on a TCS platform, a mathematical analysis on the angle encoder subdivision error was performed to find relationships between subdivision errors and subdivision signals.And the error compensation algorithm was put forward.Then, two control models were proposed based on the compensation algorithm.As for jitter seriously affecting the elevation when it works in low-speed mode in practical engineering, the DC subdivision error compensation was determined to be done by analyzing the jittering period feature.Then the DC subdivision error compensation algorithm was applied to elevation in the two control models.And Model II that the algorithm is applied to both speed loop and position loop was adopted finally.
We provide a subdivision error compensation method with the help of control system.Six types of subdivision errors can be compensated following the concrete analysis and compensation procedures that the method has described in detail based on actual situation.The method is suitable for complex devices that have high-accuracy and strong real-time requirements.And it can be adaptable to the changing environment and does not require any expensive error detection equipment.This method avoids bringing large delay to the control system.Moreover, because it requires only the position information of the shafts rather than the complete information about the TCS, the angle encoder measuring system, and the software and hardware structure of the whole system, it is with good portability and has superiority in saving time and labor.

Figure 1 :
Figure 1: Lissajous figure of A and B with DC error sources.

Figure 2 :
Figure 2: Lissajous figure of A and B with amplitude error sources.

Figure 5 ,Figure 4 :Figure 5 :
Figure 4: The angle measuring principle of the encoder in TCS.

Step 1 .
According to  =  ⋅ 2  +  and  = ,  = [2  ⋅ [/2  ]].ACoarseCode and CodeAll are from different sources.The former comes from the input total code of Module B. The latter is acquired by   .They are theoretically equivalent.The purpose of this step is to purify the coarse code and make it more accurate.

Figure 9 :
Figure 9: Sinusoidal leading operation to the elevation.

Figure 10 :
Figure 10: Elevation works at 0.5 ∘ /s after Model II being applied.

Figure 11 :
Figure 11: The measured low-speed working performance of elevation.

Table 1 :
The features of subdivision errors.
Note:   means period of Δ, while   means period of subdivision signals  and .

Table 2 :
The position error, jitter frequency, and jitter period in space domain.