Improvement of SDE for Linear Encoder with an Auto-Compensation System

1. Abstract Sub-divisional errors (SDE) of linear encoders adversely affect mechanical equipment performance. Existing compensation methods often entail high costs or increased complexity. This research introduces an adaptive auto-com-pensation system for SDE reduction by minimize the factors of DC-offsets, deviation in amplitudes and phase disparities. The system has the advantage mitigate errors without significant additional expenses or complexity. Theoretical analysis of SDE and the experimental setup are discussed, alongside analytical data demonstrating the system's effectiveness.


Introduction
Linear encoders are employed in mechanical equipment, such as CNC machines [1], laser cutting equipment [2], 3D printing systems [3], PCB drilling machine [4], solar tracking systems [5] and so forth.Linear encoders serve as the 'eyes' of the closed-loop system, providing crucial position information.Hence, the errors of the linear encoders play a negative role in influencing the performance of the equipment.The external causes that introduce errors such as velocity and acceleration [6] and vibrations [7].have been thoroughly investigated.And the methods of detect or compensate such errors are well developed [8].On the other hand, the 'internal' errors within the linear encoders are more challenging to measure and compensate for.The most important error among these types is the sub-divisional error (SDE).SDE arises from imperfections within the linear encoder, which are often challenging to examine.These imperfections include mechanical errors, uneven light or magnetic distribution, inconsistencies in photocells/AMR detectors, and flaws on the index grating or main grating during the manufacturing process.SDE repeats within each pitch period of the linear encoder [9], causing a significant negative impact to the motion control system.
There are multiple methods to reduce SDE.For instance, the specially designed zigzag shape of the photo diodes can decrease the third order harmonics, effectively suppressing SDE.However, this method is hindered by the high production costs associated with the photo diode [10].The triple-grating optical system can reduce the higher order harmonics as well, but this method makes assembling of the optical system complex and time-consuming [11].The twostage double-layered radial basis function (RBF) neural network can enhance performance without requiring additional expenses [12].However, because it necessitates more computational time, this approach imposes restrictions on the maximum traveling speed of the linear encoder, thereby making it unsuitable for many industrial scenarios.A practical and cost-effective method involves measuring the distortion in the original analog output signal and manually adjusting the relevant factors responsible for this distortion.In mass production scenarios, a limitation of this method emerges: compensating for a large volume of linear encoders proves to be a time-consuming task.Furthermore, the hands-on aspect of corrections raises concerns about consistency and quality.
In this research, an adaptive, auto-compensation system of the SDE is proposed, which can overcome the previously mentioned drawbacks.Chapter 2 delves into the theoretical analysis of the SDE, while Chapter 3 introduces the auto-compensation system and experimental setup.In Chapter 4, the results and analytical data are presented, demonstrating the effectiveness of the proposed system.

Theoretical analysis
Under ideal conditions, the analog output of the linear encoders can be expressed in quadrature signals： 2 , Here the symbols fs and fc signify the output signals, A represents the amplitude, p denotes the position Fig. 1 The ideal output waveform of linear encoder fs fc value of the linear encoder, and W is the width of one pitch period.The ideal output waveform is illustrated by Fig. 1.
The position value may be determined by Eq. ( 2), which calculates the position based on the phase difference between the orthogonal output signals: Signal distortion in linear encoders is commonplace in practical scenarios, attributed to both internal imperfections and introduced external errors.The interpretation of distorted signals Rs and Rc is elucidated through Eq. ( 3): In our previous research, the odd number of order harmonics can be suppressed by the specially designed phase-shift patterns on the scanning reticle, while the even order harmonics can be eliminated by the arrangement of photocells [13].Accordingly, Eq. ( 3) can be expressed more simply as: Exploring the correlation between the SDE and these factors involves examining simulations of errors introduced by each individual factor and their collective impact.Limiting the analysis to the factor of DC-offsets, Eq. ( 4) can be simplified as follows: in Eq. ( 5).
The optical linear encoder's pitch period W = 20 m.Fig. 2 and Fig. 3 depict the simulation results of the Lissajous circle and SDE curve.The red dashed line in Fig. 2. depicts the ideal circle, whereas the blue solid line corresponds to the simulated data.Notably, the discrepancy between these circles serves as an indicator of the distortion present in the analog signals.
The centre of the Lissajous circle drifts due to the presence of DC offset.The data presented in Fig. 3 shows SDE ranging from -0.32 to 0.32 μm in this specific scenario.Focusing solely the amplitude deviations, Eq. ( 4) can be formulated as: Presuming 0 10 At this condition, the Lissajous circle and SDE curve are depicted in Fig. 4 and Fig. 5.
In Fig. 4, amplitude deviations cause the Lissajous circle to deviate from a perfect circle, taking on an elliptical shape.Correspondingly, Fig. 5 displays SDE values ranging from -0.14 to 0.14 μm.
When observing exclusively the phase disparities, Eq. ( 4) can be articulated as: The Lissajous circle in Fig. 6 remains centered, but it exhibits distortion.The SDE in Fig. 7 spans from 0.04 to 0.46 μm, attributable to the lack of orthogonality.
In practical applications of optical linear encoders, while the three factors may manifest individually, their concurrent occurrence is more probable.In instances where all three factors are simultaneously present, such a scenario can be described using equation 4. If all factors take the same previously assumed values, the Lissajous circle and SDE curve are depicted in Fig. 8 and Fig. 9.
Fig. 8 and Fig. 9 illustrate that the combined impact of all three factors results in greater distortion of the Lissajous circle and higher SDE values compared to previous ones.This investigation aims to automatically mitigate DC offsets, amplitude deviations, and phase disparities.

Experimental setup and methodology
The experiment consists of two main parts.The first part involves establishing an auto-compensation system.The auto-compensation system measures the values of the signal's DC offset, phase, and amplitude in real-time.It then compares these values to the standard values and compensates for deviations using internal algorithms, aiming to minimize the impact of DC offset, phase disparities, and amplitude deviations on SDE.The second part employs a uniform motion measurement method to measure the SDE values of the linear encoder both with and without auto-compensation.By comparing these values, the effectiveness of the auto-compensation system can be evaluated.

Auto-Compensation System
In response to the factors which have negative impact on signals outlined earlier in this study, an auto-compensation system is implemented.This system is composed of five components: 1.The central control, serving as the pivotal component of this compensation system, encompasses a humanmachine interface (HMI) for managing the experimental process, a motion control card for regulating the linear servo system, and communication interfaces with data sampling cards.
2. Linear servo system: contains a linear motor and a servo drive.The servo driver controls the motor's movement, achieving precise positioning.
3. Linear encoder: includes a main scale with the grating lines and a reading head.The reading head contains an interpolation IC with programmable registers.
4. Configuration cable: functions as the means of communication between the central control and interpolation IC located within the reading head.
5. Data sampling card: a National Instruments NI6366 device, includes a total of 8 analog differential input ports with a 16-bit ADC resolution.Additionally, it can achieve a maximum sampling rate of 2.00 MS/s while maintaining a time accuracy of 50 ppm.
The schematic of auto-compensation system can be illustrated by Fig. 10.The auto-compensation process of a linear encoder's analog signals involves the following five steps.
Step-1: Initialization of the system.The linear mo- Step-2: The linear servo system operates at a constant velocity.The reading head is attached to the movable part of the linear motor, while the main scale is mounted on the stationary part.The relative motion between the reading head and the main scale enables the linear encoder to generate analog output signals.These signals are collected by the data sampling card and transmitted to the central control.
Step-3: The central control obtains the values of DC offsets, amplitude deviations, and phase disparities through FFT calculations.Subsequently, these results are compared with preset target values.If the values meet the specified standards, the compensation process concludes; otherwise, it proceeds to Step-4.
Step-4: The central control adjusts the interpolation IC registers via the configuration cable.Initially, register GF2 amplifies the amplitude, followed by adjustment of register GF1 to equalize signal amplitudes.Subsequently, registers OR1 and OR2 are fine-tuned to minimize DC offsets.Finally, register PH12 minimizes phase disparities between the signals, aiming for a 90° phase difference.
Step-5: Repeat the above-mentioned four steps until the DC offsets, amplitude deviations, and phase disparities meet the target values.Subsequently, store the configuration data in the nonvolatile memory of the interpolation IC, marking the completion of the auto-compensation process.
To provide a clearer understanding of the experimental setup, a photograph of the actual setup (Fig. 11) is included, corresponding to the schematic diagram (Fig. 10).This photograph helps illustrate the real-world implementation of the described components and their inter-connections.Fig. 11 The setup of the auto-compensation system 3.2.Uniform motion measurement method This process involves assessing SDE of the linear encoders with and without the implementation of the autocompensation mechanism.The objective is to gauge the auto-compensation system's efficacy in mitigating three specific factors and reducing the SDE value.The values of DC offsets, amplitude deviations, and phase disparities can be determined through Fourier transform analysis after collecting the sine and cosine signals.This approach provides a means to quantify these factors, aiding in the evaluation of signal.
Typically, the baseline position error of linear encoders is assessed by laser interferometer.However, this experiment focuses solely on the error within a single pitch period, rather than the overall error.The linear encoders used have a narrow pitch period of 20 μm.Achieving precise data collection within such a small interval necessitates micro steps of exceptional accuracy.For instance, gathering 400 data points per pitch period demands incremental steps of merely 50 nm for the linear servo system, presenting a formidable technical challenge.
Hence, in this experiment, the SDE value is determined using an indirect measurement method known as the uniform motion measurement method.This method is commonly used in research to analyze the SDE of linear encoders.The method entails the linear encoder moving with uniform motion and acquiring a predetermined number of sampling points.These sampled points correspond directly to the actual position values of Rs and Rc and then the actual position pa can be calculated as follows: The ideal position of each point can be separately calculated using Eq. ( 2).SDE value is the difference between the ideal position and actual position: where ps denotes the SDE value, pi represents the ideal position value and pa is the actual position.The experimental bench for the uniform motion measurement method is the same setup as illustrated in Fig. 11, which includes an IC-Haus signal acquisition unit for data collection, linear encoders, a linear servo system, and an optical table.Similar to the previous configuration and auto-compensation process, the reading head is fixed to the movable part of the linear servo system, while the main scale is mounted on the optical table.The linear servo system operates at a velocity of 20 mm/s, and the signal acquisition unit has a sampling frequency of 1 MHz, resulting in a distance between sampling points of 0.02 μm.Given the pitch period of 20 μm, a total of 1001 points will be collected to analyze the SDE value.The experiment utilized two sets of reading heads: one with auto-compensation implemented and another without.The two sets of linear encoders were tested, and data was collected separately using the aforementioned method, allowing for a comparison of the effects of auto-compensation on the linear encoders.

Experimental results
Following the collection of sampling points from both linear encoders in the experiments, the data was subjected to analysis using Fast Fourier Transform (FFT).The outcomes of this analysis, including reductions in factors such as DC-offsets, deviation in amplitudes, and phase disparities, are presented in Table 1.
Table 1  Reduction  The results demonstrate a significant reduction in both DC-offset and deviation in amplitudes, as well as phase disparities, when utilizing the reading head with compensation compared to the reading head without compensation.
Fig. 12 displays the Lissajous circle generated from the sampling points, while Fig. 13 presents the SDE curve derived using the uniform motion measurement method.
In Fig. 12, the blue line represents data collected from the reading head without compensation, resulting in a noticeably distorted Lissajous circle.In contrast, the red dashed line represents data collected from the reading head with compensation, yielding a Lissajous circle that closely resembles an ideal shape.Move to Fig. 13, the SDE curve of the reading head without compensation is depicted by the blue line, with a range from -0.27 to 1.01 μm and a total error value of 1.28 μm.The SDE curve of the reading head with compensation is represented by the red line, ranging

Conclusions
The improvement of Signal Distortion Error (SDE) is critical for optimizing the performance of linear encoders.This study conducts a comprehensive theoretical analysis and simulations to investigate the influences of DC offset, amplitude deviations, and phase disparities on the quality of analog signals and SDE.To address these issues, an autocompensation system is proposed to mitigate these factors, and a uniform motion measurement method is employed to assess the SDE of linear encoders both with and without compensation.Experimental findings demonstrate the effectiveness of the proposed compensation method.Specifically, a significant reduction in the total SDE value is observed, decreasing from 1.28 μm to 0.31 μm.These results validate the efficacy of the proposed compensation approach.
Future work will explore the integration of this auto-compensation system with advanced signal processing algorithms to further enhance performance and adaptability in dynamic environments.Additionally, the scalability of the proposed method for different types of encoders and its impact on long-term system reliability warrant further investigation.Linear encoders play a crucial role in the performance of mechanical equipment, but sub-divisional errors (SDE) can compromise their accuracy.Existing compensation methods are often costly or complex.This article proposes an adaptive auto-compensation system to reduce SDE by addressing factors such as DC-offsets, amplitude deviations, and phase disparities.The system offers the advantage of minimizing errors without significant additional expenses or complexity.Theoretical analysis and experimental setup are discussed, supported by analytical data showcasing the system's effectiveness.The conclusion emphasizes the importance of improving SDE for optimizing linear encoder performance.The proposed auto-compensation system is shown to significantly reduce total SDE values, from 1.28 μm to 0.31 μm, demonstrating its efficacy in enhancing the accuracy and reliability of linear encoder systems.
Ds and Dc represent the DC-offsets, k stands for the order of harmonics, k C and k B denotes the deviation in amplitudes.k and k signify the phase disparities.The above-listed four factors are the main cause of signal distortion, which ultimately leads to SDE.

Fig. 2
Fig. 2 Lissajous circle with the factor of DC-offsets (ideal circle is depicted using red dashed line)

Fig. 4 .
Fig. 4 Lissajous circle with the factor of amplitude deviations (ideal circle is depicted using red dashed line)

Fig. 6
Fig.6Lissajous circle with the factor of phase disparities (ideal circle is depicted using red dashed line)

Fig. 10
Fig. 10 Schematic of auto-compensation system tor returns to zero position.The central control writes initialization data to the interpolation IC embedded within the reading head via the configuration cable.Step-2: The linear servo system operates at a constant velocity.The reading head is attached to the movable part of the linear motor, while the main scale is mounted on the stationary part.The relative motion between the reading head and the main scale enables the linear encoder to generate analog output signals.These signals are collected by the data sampling card and transmitted to the central control.Step-3: The central control obtains the values of DC offsets, amplitude deviations, and phase disparities through FFT calculations.Subsequently, these results are compared with preset target values.If the values meet the specified standards, the compensation process concludes; otherwise, it proceeds to Step-4.Step-4: The central control adjusts the interpolation IC registers via the configuration cable.Initially, register GF2 amplifies the amplitude, followed by adjustment of register GF1 to equalize signal amplitudes.Subsequently, registers OR1 and OR2 are fine-tuned to minimize DC offsets.Finally, register PH12 minimizes phase disparities between the signals, aiming for a 90° phase difference.Step-5: Repeat the above-mentioned four steps until the DC offsets, amplitude deviations, and phase disparities meet the target values.Subsequently, store the configuration data in the nonvolatile memory of the interpolation IC, marking the completion of the auto-compensation process.To provide a clearer understanding of the experimental setup, a photograph of the actual setup (Fig.11) is included, corresponding to the schematic diagram (Fig.10).This photograph helps illustrate the real-world implementation of the described components and their inter-connections.

Fig. 12
Fig. 12 Lissajous circles generated by reading heads with and without compensation (red dashed linecompensated data, solid blue lineuncompensated data) , F. Yang, A. Kilikevicius IMPROVEMENT OF SDE FOR LINEAR ENCODER WITH AN AUTO-COMPENSATION SYSTEM S u m m a r y