Previous Article in Journal / Special Issue
Data-Driven Inverse Design of Hybrid Waveguide Gratings Using Reflection Spectra via Tandem Networks and Conditional VAEs
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Harmonic Suppression Method for Optical Encoder Based on Photosensitive Unit Parameter Optimization

College of Instrumentation & Electrical Engineering, Jilin University, Changchun 130012, China
*
Author to whom correspondence should be addressed.
Optics 2025, 6(4), 62; https://doi.org/10.3390/opt6040062 (registering DOI)
Submission received: 25 October 2025 / Revised: 19 November 2025 / Accepted: 27 November 2025 / Published: 1 December 2025

Abstract

Optical encoders are high-precision positioning sensors based on the principle of grating diffraction. However, harmonic distortion remains a critical factor limiting the further improvement of measurement accuracy. In response to this challenge, this paper proposes a strategy to suppress harmonic components in the output signals of optical encoders. In this work, a general expression for the light intensity distribution of the grating image is derived. Then, orthogonal sine-cosine signals are generated using a grid photoelectric sensor array, which replaces the conventional slit grating. Furthermore, a method for the co-optimization of the photosensitive unit width and offset is proposed, which effectively suppresses the third and fifth harmonic components. Theoretical and simulation results collectively demonstrate that the proposed method achieves near-complete suppression of the third and fifth harmonics, leading to a significant improvement in output signal quality. This work provides an effective approach for developing high-precision optical encoder systems with low harmonic distortion.

1. Introduction

As the core sensing component for precision displacement and angle measurement, the performance of encoders directly determines the positioning accuracy and dynamic response of motion control systems. The increasingly stringent performance requirements of high-end equipment, such as high-precision Computer Numerical Control (CNC) machine tools and industrial robots, are driving the continuous evolution of encoders toward high resolution, enhanced accuracy, and real-time responsiveness [1].
Traditional optical encoders typically operate based on the principle of Moiré fringe effect. The underlying physical process involves a collimated beam that passes through a first grating and undergoes diffraction [2]. The resulting diffracted light is then modulated by a second grating, thereby generating the Moiré fringes used for measurement. The performance of this encoder type is highly sensitive to the alignment tolerance of the gap between the two gratings. Even minor relative displacements can alter the interference field distribution, degrade output signal contrast, and introduce waveform distortion, ultimately increasing measurement errors [3]. In contrast, optical encoders based on the Talbot effect have attracted significant attention due to their greater tolerance to installation misalignments [4,5]. The operating principle is as follows: when a collimated beam illuminates a periodic grating, diffraction produces a periodic self-imaging of the grating at specific distances. High-precision displacement or angle measurement is realized by detecting variations in the light intensity distribution of the self-imaging.
Optical encoders are classified into transmissive and reflective types according to their optical path configuration and the physical characteristics of the code disc [6]. A transmissive encoder typically uses a two-grating structure consisting of a code disc grating and a slit grating. The code disc is a transparent grating etched with hollowed lines, and the light source and the photoelectric sensor are positioned on opposite sides of the code disc, as shown in Figure 1. Reflective encoders, on the other hand, usually adopt a three-grating structure incorporating an index grating to mitigate measurement errors caused by non-collimated light. In this case, the code disc surface contains alternating reflective and non-reflective regions, and both the light source and sensor are placed on the same side of the code disc, as illustrated in Figure 2. In both schematic diagrams (Figure 1 and Figure 2), the red arrows represent the light emitted from the sources, and the solid red lines depict the corresponding optical paths. The relative displacement between the code disc grating and the slit grating causes periodic variations in the light intensity distribution at the detection plane. Currently, the primary approaches for detecting the intensity signal are the four-field scanning method and the single-field scanning method. The four-field method uses a slit grating with the same period as the code disc grating. This slit grating comprises four sets of slit arrays, each spatially offset by one-quarter of the grating pitch [7,8,9]. In contrast, the single-field method employs a code disc grating and a slit grating with slightly different periods. Their superposition produces Vernier fringes with a spatial period much larger than that of the individual gratings, within which four detection regions are uniformly distributed [10,11].
As the code disc and slit gratings undergo relative displacement, the photoelectric signal produced by the sensor, after pre-amplification, can ideally be transformed into four quadrature sinusoidal signals with 90° phase differences. In practice, however, factors such as light emitting diodes (LEDs) ageing, assembly inaccuracies, and grating fabrication errors introduce signal imperfections, including amplitude imbalance error, direct current offset (DC offset) error, quadrature phase error, and higher-order harmonic distortions. These imperfections introduce deviations in angle estimation, thereby significantly limiting the high-precision measurement capability of optical encoders. Online compensation technique can effectively suppress amplitude imbalance error, DC offset error, and quadrature phase error [12,13]. The method operates by continuously monitoring the maximum, minimum, and average values of the signals to dynamically compute compensation values, driving the two channels toward an ideal state with equal amplitude, zero DC offset and quadrature phase. The treatment of harmonic errors depends on their order. Even-order harmonics (e.g., 2nd, 4th), owing to their half-wave symmetry, can be effectively suppressed through differential amplification. Odd-order harmonics (e.g., 3rd, 5th) are mitigated using either active or passive approaches. Active approaches suppress harmonic generation at its origin, for example, by optimizing the duty cycle of the slit grating or introducing specific etching offsets during fabrication [14,15,16,17]. Passive approaches, in contrast, focus on correcting the signal in subsequent circuitry or through algorithmic processing. For example, works in [18,19,20,21,22] exploit phase-locked loop (PLL) technology to automatically track and correct harmonic errors, whereas works in [23,24,25,26] focus on constructing a compensation model through precise parameter identification of the harmonic signals.
In current harmonic suppression schemes for optical encoders, active compensation methods typically require the combination of multiple-tracks slit grating with different widths and spatial offsets to suppress specific harmonics. This approach results in complex structural layouts and high fabrication difficulty. Passive compensation methods, in contrast, rely on backend circuitry or digital algorithms, leading to considerable implementation complexity. To overcome these shortcomings, this paper introduces an arrangement of the photoelectric sensor array that suppresses harmonics directly by optimizing the structure and spatial configuration of the photosensitive unit. Compared to traditional electronic compensation techniques, the proposed physical suppression method offers inherent advantages in frequency response (delay-free) and noise tolerance (insensitive to random noise). The suppression ratio, guaranteed by manufacturing precision, ensures stable performance. These strategies are fundamentally complementary. By employing the presented physical method as a front-end to suppress the dominant harmonics at the source, a cleaner signal is established, thus allowing subsequent electronic compensation to perform more effectively.
In this work, Section 2.1 establishes a mathematical model for describing the intensity distribution of grating self-imaging. Section 2.2 analyzes the principles of the four-field scanning method and the single-field scanning method for photoelectric encoders, respectively. Section 2.3 evaluates the experimental results of replacing the slit grating with a grid photoelectric sensor array and discusses the impact of higher-order beams on output signal quality. Section 3.1 explores the effect of photosensitive unit width on output signal harmonic distortion. Section 3.2 discusses the role of photosensitive unit spatial offset in suppressing harmonic distortion. Based on the aforementioned theoretical analysis, Section 3.3 introduces a scanning structure design for the optical encoder, supported by simulation results. Finally, Section 4 summarizes the research content and conclusions of the paper.

2. Theoretical Analysis and Experimental Results

2.1. Theoretical Analysis of Grating Self-Imaging

When a grating is illuminated by a monochromatic plane wave at normal incidence, distinct self-imaging appears at specific periodic distances behind the grating, as shown in Figure 3. This phenomenon is known as the Talbot effect [27].
The transmission function of the grating can be represented by the following Fourier series:
t ( x )   =   N = 0 T N cos ( 2 π N d x ) ,
where x is the spatial position, d is the grating period, N is the order of the Fourier series, and T N is the N -th order Fourier coefficient.
When a plane wave of unit amplitude is normally incident on the grating, the complex amplitude of the optical wave at the distance z = 0 is given by
E ( x ) = t ( x ) .
The spatial spectrum of the complex amplitude distribution can be obtained by performing a Fourier transform as follows:
a ( f x )   =   1 2 N = 0 T N [ δ ( f x N d )   +   δ ( f x + N d ) ] ,
where f x is the spatial frequency and δ is the Dirac function.
According to the angular spectrum diffraction theory, the spatial spectrum of the diffracted wave at a distance of z from the grating can be expressed as
  e ( f x ) = a ( f x ) exp ( j kz 1 λ 2 f x 2   ) ,
where k   =   2 π / λ is the wave number and λ is the wavelength of the light wave.
Under the Fresnel approximation, e ( f x ) can be given by
e ( f x ) = a ( f x ) exp ( j kz ) exp ( j π λ zf x 2 ) .
When the propagation distance satisfies z   =   2 Md 2 / λ for M   =   1 ,   2 ,   , the complex amplitude distribution at the distance of z from the grating can be obtained as
E z ( x ) = E ( x ) exp ( j kz ) .
The result demonstrates that the complex amplitude of the light wave differs only by a constant phase factor between the initial position and a specific propagation distance, and therefore, their intensity distributions remain the same:
I z ( x )   = | E z ( x ) | 2   = | t ( x ) exp ( j kz ) | 2 = | E ( x ) | 2 .
Clear grating self-imaging patterns can be observed. This phenomenon is called the Talbot effect.
The validity of the Fresnel approximation adopted in our model is fully justified at the typical working distances for optical encoders. The range coincides with the Talbot self-imaging distances analyzed in this work, being significantly larger than the grating period d, while being substantially shorter than the far-field condition required for Fraunhofer diffraction. Therefore, this model is both adequate and accurate for guiding the optical design.

2.2. Four-Field and Single-Field Scanning Methods for Gathering Grating Self-Imaging

The configuration of the four-field scanning method for the optical encoder is illustrated in Figure 4. This method employs a code disc grating and a slit grating with identical periods. The slit grating is divided into four regions, each spatially offset by one-quarter of a period relative to the next.
The combined light intensity at the observation point can be expressed as a superposition of various harmonic components. To preliminarily elucidate the fundamental principle of angular displacement measurement, the analysis focuses on the dominant fundamental frequency component. Accordingly, the self-imaging light field of the code disc is simulated using a sinusoidal function I(x):
I ( x )   =   A sin ( 2 π d x   +   ϕ )   +   I 0 ,
where the signal intensity is presented in arbitrary units (a.u.), A is the signal amplitude, d is the period of grating self-imaging, I0 is the DC offset, and ϕ is the initial phase of the signal.
With the opening ratio of both the code disc grating and the slit grating set to 50%, the width of each scanning region is defined as W, which contains m complete periods of the self-imaging fringe. Four photoelectric signals are obtained by integrating the light intensity over the transmissive portions of the slit grating in each region, expressed as
  S i = n = 0 m 1 nd + d i 1 / 4 nd + d i + 1 / 4 I ( x ) d x ,
where i denotes the four scanning regions (i = 1, 2, 3, 4), Si is the photoelectric signal obtained from the i-th scanning region, and n (n ≥ 0) is an integer representing the fringe index within the scanning region.
When the code disc grating and the slit grating undergo relative displacement, the four photoelectric signals vary periodically, with their variations synchronized to the displacement. The amplitudes of the four signals can be expressed as
  S i = n = 0 m 1 Δ x + nd + d i 1 / 4 Δ x + nd + d i + 1 / 4 I ( x ) d x ,
where Δx represents the relative displacement between the code disc grating and the slit grating.
The single-field scanning method for photoelectric encoders employs a slight mismatch between the periods of the code disc grating and the slit grating. When overlaid, this period difference creates a Vernier structure with a period much larger than the original gratings. A schematic diagram of the configuration with a disc grating period of d and a slit grating period of 0.95d is shown in Figure 5, wherein both gratings have a 50% opening ratio. By uniformly arranging four groups of photodetectors within one period of the resulting Vernier structure to collect the light intensity distribution, four photoelectric signals with sequential 90° phase differences can be acquired.
Simulation experiments for both scanning methods were conducted in MATLAB R2020b based on Equation (8), configured with parameters A = 1, B = 1, and φ = 0. The code disc grating period was set to d = 20 μm, an industry-standard value for high-precision optical encoders, thereby grounding our model in a practical context. For the four-field method, the region width was set to W = 100 μm. For the single-field method, the slit grating period was set to 19 μm, creating a 1 μm period mismatch with the disc to generate the Vernier effect. The relative displacement Δx was varied from 0 to 40 μm in steps of 0.001 μm. The resulting quadrature signals S1S4 from the four-field and single-field methods are shown in Figure 6a and Figure 6b, respectively. The Lissajous figures for (S1, S2) and (S3, S4) are presented in Figure 6c,d. The results demonstrate that both scanning methods generate sinusoidal signals with excellent orthogonality and amplitude consistency.

2.3. Results and Discussion

It has been demonstrated that replacing the mechanical slit grating with a photoelectric sensor array is a viable technical approach for the direct acquisition of grating self-imaging [28,29,30]. While these demonstrations have primarily utilized the four-field scanning method, this work further explores the feasibility of integrating the photoelectric sensor array with the single-field scanning method.
Compared to the traditional four-field scanning method, the single-field scanning method based on the photoelectric sensor array presents distinct engineering advantages. This approach is directly comparable to the encoders reported in [28,29], as it enables (i) a large gap allowance, with sub-millimetre tolerance that greatly relaxes installation precision requirements; (ii) a highly integrated reading head, which can achieve an ultra-compact form factor like the 4.5 × 5.5 × 2.1 mm3 volume in [28]; and (iii) manufacturing scalability, where the core sensing units are fabricated via semiconductor photolithography for mass production, thereby lowering assembly complexity and cost.
The experimental system configuration and the corresponding Lissajous figures of the output signals are presented in Figure 7. The system employs a code disc grating with a period of 20 μm and an opening ratio of 50%, alongside a photoelectric sensor array with a period of 38 μm and a 1:1 width ratio between its photosensitive and non-photosensitive regions. The grating self-imaging signal was acquired under illumination by a collimated light source with a central wavelength of 650 nm. The experimental results indicate that the method successfully retrieves quadrature sinusoidal signals. However, the Lissajous figure exhibits a measurable deviation from a standard circle, suggesting the presence of harmonic distortion in the output signals.
Under ideal conditions, the light intensity at any point in the grating self-imaging varies periodically with displacement. When only the ±1st order diffracted beams are considered, this variation follows a standard sinusoidal curve. In practice, however, higher-order diffraction components such as ±2nd order and ±3rd order beams are also generated in addition to the ±1st-order beams used for imaging. The interference of these higher-order diffracted beams causes the intensity distribution on the imaging plane to deviate from the ideal sinusoidal waveform, resulting in distortion. This distortion can be regarded as the superposition of the ideal sinusoidal signal and a series of higher-order harmonics:
  I actual ( x )   =   I 0   +   n = 1 A n cos 2 n π d x   +   ϕ n ,
where A1 and ϕ1 respectively denote the amplitude and initial phase of the fundamental component, and An and ϕn (n ≥ 2), respectively, denote the amplitude and initial phase of the n-th harmonic.
Due to the effective suppression of even order harmonic components by differential amplification, this study focuses on analyzing the influence mechanism of higher-order odd harmonics on the signal quality of optical encoders. The third and fifth harmonics, which exert the most significant impact on signal distortion, are selected as the primary subjects of investigation. In our simulations of grating self-imaging, based on both the four-field and single-field scanning methods, we set the harmonic amplitudes to match the distortion levels reported in Reference [11]. Specifically, the third harmonic was configured with an amplitude of 0.04 and an initial phase of π/5, while the fifth harmonic was set to an amplitude of 0.015 and an initial phase of π/7, thereby emulating typical harmonic interference scenarios encountered in practical systems:
I ( x )   =   1   +   cos ( 2 π d x )   +   0 . 04 cos ( 3 2 π d x   +   π 5 )   +   0 . 015 cos ( 5 2 π d x   +   π 7 ) .
Using the parameters from Section 2.2, simulation experiments were conducted to capture the aforementioned light intensity distribution based on the four-field and single-field scanning methods. Their spectral analysis results are shown in Figure 8. A comparison reveals that the single-field method demonstrates superior harmonic suppression compared to the four-field method, although both still exhibit notable harmonic distortion. This difference fundamentally originates from their distinct scanning unit architectures. The four-field method employs a code disc and a sensor array with identical periods, thereby defining fixed values for the photosensitive unit width and offset. Conversely, the single-field method utilizes a slight period mismatch between the code disc and the sensor array, which is equivalent to altering the effective width and spatial offset of the sensing region, thereby imparting an inherent filtering capability for harmonics. Based on this mechanism, Section 3 will systematically investigate the impact of the photosensitive unit width and offset on harmonic components, aiming to achieve more effective harmonic suppression directly at the signal acquisition source.

3. Improved Method

3.1. Influence of the Width of the Photosensitive Unit

The proportion of each harmonic component in the output signals is influenced by the width of the photosensitive unit. The principle can be described as follows:
  S   = 0 w I ( x ) d x .
where w denotes the width of the photosensitive portion of the sensor array.
The n-th harmonic can be suppressed by designing the photosensitive unit width w to be an integer multiple of the corresponding harmonic period. For example, setting the width to an integer multiple of d/3 and d/5 can suppress the third and fifth harmonic components, respectively, as shown below:
0 d 3 sin ( 3 2 π d x   +   ϕ 3 ) d x   =   0 0 d 5 sin ( 5 2 π d x   +   ϕ 5 ) d x   =   0 .
The simulation results, based on the light intensity distribution in Equation (12), are presented in Figure 9, which shows the output Lissajous figures and harmonic ratios. Compared to the conventional four-field scanning method, the third harmonic component was reduced from 1.33% to 0.00%, and the fifth harmonic from 0.30% to 0.00%. These results confirm that optimizing the width of the photosensitive area in the sensor array effectively suppresses the corresponding higher-order harmonic components.
To systematically evaluate the manufacturability of the proposed method, we conducted a tolerance sensitivity analysis on the photosensitive unit width. Table 1 and Table 2 show the corresponding changes in the proportions of the third and fifth harmonics when the width deviates from its theoretical optimum. The simulation results indicate that the suppression of the third harmonic remains robust despite variations in the width. Specifically, when the width optimized for the third harmonic exhibits tolerances of +5% and −5%, the resulting third harmonic proportions are 0.23% and 0.25%, respectively. These values remain significantly lower than the 1.33% observed with the conventional four-field scanning method. Similarly, under a ±5% deviation of the width optimized for the fifth harmonic, its proportion stabilizes below approximately 0.08%, substantially outperforming the 0.30% from the four-field scanning method.

3.2. Influence of the Photosensitive Unit Offset

By exploiting the periodicity of higher-order harmonics, the combination of photosensitive units with specific offsets enables harmonic suppression by ensuring that these components cancel each other out due to phase symmetry over the integration domain. The principle of the method is expressed as a linear combination of integration intervals:
  S out   = Δ x Δ x + d / 2 I ( x ) d x + Δ x + Δ t Δ x + Δ t + d / 2 I ( x ) d x .
where Δt is the offset.
For the fundamental component, the integration results can be expressed as follows:
S out 1   = Δ x Δ x + d / 2 sin ( 2 π d x   +   ϕ 1 ) d x = d π cos ( 2 π d Δ x   +   ϕ 1 )                                           S out 2   = Δ x + Δ t Δ x + Δ t + d / 2 sin ( 2 π d x   +   ϕ 1 ) d x = d π cos ( 2 π d Δ x   +   ϕ 1 +   2 π d Δ t ) .
The sum of S out 1 and S out 2 remains a sinusoidal function with displacement Δx as the variable.
For the higher-order harmonic components, by setting the offsets to d/6 and d/10, respectively, the regions can exactly encompass integer multiples of the third and fifth harmonic periods. Under this condition, the harmonic components are coherently cancelled due to phase symmetry, thereby achieving harmonic suppression. Simulation results in Figure 10 verify this approach: compared to the conventional four-field method, the 3rd harmonic is reduced from 1.33% to 0.00%, and the 5th harmonic is reduced from 0.06% to 0.00%. These results confirm that designing photosensitive unit with specific offset can effectively eliminate target harmonic components.
To comprehensively assess manufacturability, we also performed a sensitivity analysis on the manufacturing tolerance of the photosensitive unit offset. Table 3 and Table 4 detail the corresponding variations in harmonic suppression performance as the offset fluctuates around its respective theoretical optimum. When the offset for suppressing the third harmonic deviates by +5% and −5%, the third harmonic proportion remains at 0.12%—significantly lower than the 1.33% from the four-field scanning method. When the offset for suppressing the fifth harmonic deviates by +5% and −5%, the fifth harmonic proportions are 0.03% and 0.02%, respectively, which are also markedly lower than the 0.30% observed in the four-field scanning method.
In summary, within reasonable manufacturing tolerances, each parameter can stably fulfil its specific harmonic suppression function. This conclusion, combined with the width tolerance analysis in Section 3.1, collectively demonstrates that the co-optimization design scheme proposed in this work is not only theoretically effective but also exhibits sufficient robustness and practical feasibility in the manufacturing process.

3.3. Optimization Design Based on Photosensitive Unit Width and Offset

This paper proposes a method for suppressing harmonics directly at the signal acquisition source. The core idea is to precisely design the effective width and spatial offset of the photosensitive unit in the scanning head, so that specific high-order harmonic components are directly cancelled out during the physical integration process of photoelectric conversion, thereby achieving effective harmonic suppression.
For the four-field scanning method, the width of the photosensitive unit within each scanning region is set to one-third of the code disc grating period to eliminate the third harmonic. Additionally, each unit is divided into two sub-cells with a spatial offset of Δt = d/10 to cancel the fifth harmonic. Figure 11a shows the layout of the photosensitive sensor array, where the blue rectangles represent the photosensitive cells, and the composite scanning regions replace the slit-grating configuration while implementing the above optimizations. Simulation results based on Equation (12), presented in Figure 11b, indicate that both the third and the fifth harmonic components in the output signal are 0.00%. The content of the third and fifth harmonics in the output signal is significantly reduced. These results demonstrate that the proposed scanning unit design can be effectively integrated into the four-field scanning method to achieve efficient suppression of the target harmonic components.
For the single-field scanning method, to eliminate the third harmonic component, the width of each photosensitive unit is also set to one-third of the code disc grating period. To suppress the fifth harmonic component, the photosensitive unit is divided into three sub-cells with a spatial offset of Δt = 2d/15. The layout of these photosensitive unit is illustrated in Figure 12a. The resulting output photoelectric signals can be expressed as follows:
  S out   = Δ x Δ x + d / 3 I ( x ) d x   + Δ x + Δ t Δ x + Δ t + d / 3 I ( x ) d x   + Δ x + 2 Δ t Δ x + 2 Δ t + d / 3 I ( x ) d x .
The initial phases of the fifth harmonic signals across the three integration intervals differ sequentially by 4π/3. For the fifth harmonic component, these three integration results can be considered as vectors of equal amplitude but with phases lagging by 4π/3 in sequence. Consequently, the sum of their integral outputs over the three subintervals is zero. Simulation results based on Equation (12) are presented in Figure 12b. The output signal shows both the third and fifth harmonic components in the output signal are effectively eliminated from the output signal. This validates that the scanning unit design proposed in this work, when applied to the single-field scanning method, also effectively suppresses the target harmonic components.
This section presents a design methodology for the scanning unit in optical encoders. The method replaces the conventional slit grating with a photoelectric sensor array. By leveraging the periodic characteristics of higher-order harmonics, it enables simultaneous suppression of the third and fifth harmonic components, thereby improving the output signal quality. The method of co-optimizing the width and spatial offset of the photosensitive area is suitable for application in both four-field and single-field scanning techniques. The approach can be generalized to any pair of odd-order harmonics, N1 and N2, by designing the unit width w as an integer multiple of the N1-th harmonic period, while configuring the integration region via a specific sub-unit offset Δt to span an integer multiple of the N2-th harmonic period, thus achieving simultaneous cancellation of both.

4. Conclusions and Discussion

This study aims to enhance the measurement accuracy of optical encoders. To address the limitation imposed by the third and fifth harmonics in the output signals, a method is proposed based on the periodic nature of these higher-order harmonics. By selecting appropriate photosensitive unit width and offset, the contributions of the targeted harmonics cancel each other out during the photoelectric integration process, thereby effectively filtering them out.
This work bridges theory and implementation with a harmonic suppression method for both four-field and single-field scanning, achieved by co-optimizing photosensitive unit width and offset. The method preserves the fundamental component while deeply suppressing higher-order harmonics. Building on this theoretical foundation from simulations, future work will centre on experimental validation.
It is important to note that this study operates within the framework of the Talbot effect, validating the proposed harmonic suppression principle under monochromatic plane-wave illumination. In practical applications, however, the use of broadband and non-ideal collimation sources is more common. As discussed in [31], under these conditions, the imaging mechanism transitions from the Talbot effect to the generalized grating imaging. This transition alters the diffracted field, which may consequently affect harmonic suppression performance. Therefore, a systematic investigation into the performance boundaries of our method under varying spectral bandwidths and numerical apertures represents a critical step toward practical application and forms the core of our subsequent research.

Author Contributions

Conceptualization, J.L., B.L. and S.L.; methodology, B.L. and S.L.; validation J.L. and B.L.; investigation, J.L., B.L. and S.L.; resources, S.L. and J.L.; data curation, B.L.; setup arrangement, experiment, data processing, and coding, B.L.; writing—original draft preparation, B.L.; writing—review and editing J.L., B.L. and S.L.; visualization, B.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in the study are included in the article. The code and processed data generated during this study are publicly available in the GitHub repository at: https://github.com/JLUlvbw/optical-encoder (accessed on 26 November 2025). Further inquiries can be directed to the corresponding author.

Acknowledgments

During the preparation of this manuscript, the authors used DeepSeek for the purpose of checking English grammar, including noun plurality and verb tenses. The authors have reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Kumar, A.S.A.; George, B.; Mukhopadhyay, S.C. Technologies and Applications of Angle Sensors: A Review. IEEE Sens. J. 2021, 21, 7195–7206. [Google Scholar]
  2. Gurauskis, D.; Przystupa, K.; Kilikevičius, A.; Skowron, M.; Matijošius, J.; Caban, J.; Kilikevičienė, K. Development and Experimental Research of Different Mechanical Designs of an Optical Linear Encoder’s Reading Head. Sensors 2022, 22, 2977. [Google Scholar] [CrossRef] [PubMed]
  3. Kao, C.-F.; Huang, H.-L.; Lu, S.-H. Optical encoder based on Fractional-Talbot effect using two-dimensional phase grating. Opt. Commun. 2010, 283, 1950–1955. [Google Scholar] [CrossRef]
  4. Crespo, D.; Alonso, J.; Bernabeu, E. Generalized grating imaging using an extended monochromatic light source. J. Opt. Soc. Am. A (Opt. Image Sci. Vis.) 2000, 17, 1231–1240. [Google Scholar]
  5. Kyvalsky, J. The self-imaging phenomenon and its applications. In Photonics, Devices, and Systems II; SPIE: Bellingham, WA, USA, 2003; Volume 5036. [Google Scholar]
  6. Yu, H.; Chen, X.; Liu, C.; Cai, G.; Wang, W. A survey on the grating based optical position encoder. Opt. Laser Technol. 2021, 143, 107352. [Google Scholar] [CrossRef]
  7. Sanchez-Brea, L.M.; Morlanes, T. Metrological errors in optical encoders. Meas. Sci. Technol. 2009, 19, 115104. [Google Scholar]
  8. Kao, C.-F.; Lu, M.-H. Optical encoder based on the fractional Talbot effect. Opt. Commun. 2005, 250, 16–23. [Google Scholar] [CrossRef]
  9. Matsuzoe, Y.; Tsuji, N.; Yoshizawa, T. Error dispersion algorithms to improve angle precision for an encoder. Opt. Eng. 2002, 41, 2282–2289. [Google Scholar] [CrossRef]
  10. Rozman, J.; Pletersek, A. Linear Optical Encoder System With Sinusoidal Signal Distortion Below 60 dB. IEEE Trans. Instrum. Meas. 2010, 59, 1544–1549. [Google Scholar]
  11. Ye, G.; Liu, H.; Jiang, W.; Li, X.; Jiang, W.; Yu, H.; Shi, Y.; Yin, L.; Lu, B. Design and development of an optical encoder with sub-micron accuracy using a multiple-tracks analyser grating. Rev. Sci. Instrum. 2017, 88, 015003. [Google Scholar]
  12. Van Hoang, H.; Le, H.T.; Jeon, J.W. A new approach based-on advanced adaptive digital PLL for improving the resolution and accuracy of magnetic encoders. In Proceedings of the 2008 IEEE/RSJ International Conference on Intelligent Robots and Systems, Nice, France, 22–26 September 2008; pp. 3133–3660. [Google Scholar]
  13. Ye, G.; Xing, H.; Liu, H.; Li, Y.; Lei, B.; Niu, D.; Li, X.; Lu, B.; Liu, H. Total error compensation of non-ideal signal parameters for Moiré encoders. Sens. Actuators A Phys. 2019, 298, 111539. [Google Scholar] [CrossRef]
  14. Ieki, A.; Hane, K.; Yoshizawa, T.; Matsui, K.; Nashiki, M. Optical encoder using a slit-width-modulated grating. J. Mod. Opt. 1999, 46, 1–14. [Google Scholar] [CrossRef]
  15. Ieki, A.; Matsui, K.; Nashiki, M.; Hane, K. Pitch-modulated phase grating and its application to displacement encoder. J. Mod. Opt. 2000, 47, 1213–1225. [Google Scholar] [CrossRef]
  16. Ye, G.; Liu, H.; Fan, S.; Li, X.; Yu, H.; Lei, B.; Shi, Y.; Yin, L.; Lu, B. A theoretical investigation of generalized grating imaging and its application to optical encoders. Opt. Commun. 2015, 354, 21–27. [Google Scholar] [CrossRef]
  17. Ye, G.; Liu, H.; Ban, Y.; Shi, Y.; Yin, L.; Lu, B. Development of a reflective optical encoder with submicron accuracy. Opt. Commun. 2018, 411, 126–132. [Google Scholar] [CrossRef]
  18. Van Hoang, H.; Jeon, J.W. An efficient approach to correct the signals and generate high-resolution quadrature pulses for magnetic encoders. IEEE Trans. Ind. Electron. 2011, 58, 3634–3646. [Google Scholar] [CrossRef]
  19. Jung, S.-Y.; Nam, K. PMSM control based on edge-field hall sensor signals through ANF-PLL processing. IEEE Trans. Ind. Electron. 2011, 58, 5121–5129. [Google Scholar] [CrossRef]
  20. Zhang, G.; Wang, G.; Xu, D.; Zhao, N. ADALINE-Network-Based PLL for Position Sensorless Interior Permanent Magnet Synchronous Motor Drives. IEEE Trans. Power Electron. 2016, 31, 1450–1460. [Google Scholar] [CrossRef]
  21. Nguyen, T.H.; Nguyen, H.X.; Tran, T.N.-C.; Park, J.W.; Le, K.M.; Nguyen, V.Q.; Jeon, J.W. An Effective Method to Improve the Accuracy of a Vernier-Type Absolute Magnetic Encoder. IEEE Trans. Ind. Electron. 2021, 68, 7330–7340. [Google Scholar] [CrossRef]
  22. Park, J.W.; Nguyen, H.X.; Tran, T.N.-C.; Jeon, J.W. A Linear Compensation Method for Improving the Accuracy of an Absolute Multipolar Magnetic Encoder. IEEE Access 2021, 9, 19127–19138. [Google Scholar] [CrossRef]
  23. Heydemann, P.L.M. Determination and correction of quadrature fringe measurement errors in interferometers. Appl. Opt. 1981, 20, 3382–3384. [Google Scholar] [CrossRef]
  24. Zhu, W.; Lin, Y.; Huang, Y. Research on Sinusoidal Error Compensation of Moire Signal Using Particle Swarm Optimization. IEEE Access 2020, 8, 14820–14831. [Google Scholar] [CrossRef]
  25. Jiang, J.; Dai, J.; Zhang, H.; Mu, Y.; Chang, Y. Improving the subdivision accuracy of photoelectric encoder using particle swarm optimization algorithm. Opt. Quantum Electron. 2022, 54, 1–21. [Google Scholar] [CrossRef]
  26. Hou, H.; Cao, G.; Ding, H.; Li, K. Research on Particle Swarm Compensation Method for Subdivision Error Optimization of Photoelectric Encoder Based on Parallel Iteration. Sensors 2022, 22, 4456. [Google Scholar] [CrossRef] [PubMed]
  27. Lohmann, A.; Silva, D. An interferometer based on the Talbot effect. Opt. Commun. 1971, 2, 413–415. [Google Scholar] [CrossRef]
  28. Hane, J.; Komazaki, I.; Ito, T.; Kuroda, Y.; Yamamoto, E. Ultra-compact encoder using Talbot interference. In Proceedings of the MEMS 2001, 14th IEEE International Conference on Micro Electro Mechanical Systems, Interlaken, Switzerland, 25 January 2001. Technical Digest, Cat. No.01CH37090. [Google Scholar]
  29. Hane, K.; Endo, T.; Ishimori, M.; Ito, Y.; Sasaki, M. Integration of grating-image-type encoder using Si micromachining. Sens. Actuators A 2002, 97–98, 139–146. [Google Scholar] [CrossRef]
  30. Wu, J.; Yuan, B.; Wang, L. New displacement measurement method based on digital Moiré fringes formed by a single grating. Hongwai Yu Jiguang Gongcheng/Infrared Laser Eng. 2014, 43, 3404–3409. [Google Scholar]
  31. Iwata, K. Interpretation of generalized grating imaging. J. Opt. Soc. Am. A 2008, 25, 2244–2250. [Google Scholar] [CrossRef]
Figure 1. Two-grating configuration scheme of transmission optical encoder.
Figure 1. Two-grating configuration scheme of transmission optical encoder.
Optics 06 00062 g001
Figure 2. Three-grating configuration scheme of reflective optical encoder.
Figure 2. Three-grating configuration scheme of reflective optical encoder.
Optics 06 00062 g002
Figure 3. Grating self-imaging effect.
Figure 3. Grating self-imaging effect.
Optics 06 00062 g003
Figure 4. Four-field scanning scheme.
Figure 4. Four-field scanning scheme.
Optics 06 00062 g004
Figure 5. Single-field scanning scheme.
Figure 5. Single-field scanning scheme.
Optics 06 00062 g005
Figure 6. Four-channel signals with displacement: (a) signals with four-field scanning method; (b) signals with single-field scanning method; (c) Lissajous figures with four-field scanning method; (d) Lissajous figures with single-field scanning method.
Figure 6. Four-channel signals with displacement: (a) signals with four-field scanning method; (b) signals with single-field scanning method; (c) Lissajous figures with four-field scanning method; (d) Lissajous figures with single-field scanning method.
Optics 06 00062 g006
Figure 7. Optical layout and the output signals with a photoelectric sensor array.
Figure 7. Optical layout and the output signals with a photoelectric sensor array.
Optics 06 00062 g007
Figure 8. Harmonic components in the output signals: (a) harmonic components with four-field scanning method; (b) harmonic components with single-field scanning method.
Figure 8. Harmonic components in the output signals: (a) harmonic components with four-field scanning method; (b) harmonic components with single-field scanning method.
Optics 06 00062 g008
Figure 9. Output signal Lissajous figure and harmonic spectrum: (a) Lissajous figure of the output signal with w = d/3; (b) harmonic spectrum with w = d/3; (c) Lissajous figure of the output signal with w = d/5; (d) harmonic spectrum with w = d/5.
Figure 9. Output signal Lissajous figure and harmonic spectrum: (a) Lissajous figure of the output signal with w = d/3; (b) harmonic spectrum with w = d/3; (c) Lissajous figure of the output signal with w = d/5; (d) harmonic spectrum with w = d/5.
Optics 06 00062 g009
Figure 10. Scanning unit offset and harmonic spectrum: (a) scanning unit offset with Δt = d/6; (b) output signal harmonic spectrum with Δt = d/6; (c) scanning unit offset with Δt = d/10; (d) output signal harmonic spectrum with Δt = d/10.
Figure 10. Scanning unit offset and harmonic spectrum: (a) scanning unit offset with Δt = d/6; (b) output signal harmonic spectrum with Δt = d/6; (c) scanning unit offset with Δt = d/10; (d) output signal harmonic spectrum with Δt = d/10.
Optics 06 00062 g010
Figure 11. Composite scanning unit design based on four-field scanning method: (a) composite scanning unit; (b) output signal harmonic spectrum.
Figure 11. Composite scanning unit design based on four-field scanning method: (a) composite scanning unit; (b) output signal harmonic spectrum.
Optics 06 00062 g011
Figure 12. Composite scanning unit design based on single-field scanning method: (a) a section of composite scanning unit; (b) output signal harmonic spectrum.
Figure 12. Composite scanning unit design based on single-field scanning method: (a) a section of composite scanning unit; (b) output signal harmonic spectrum.
Optics 06 00062 g012
Table 1. Influence of the photosensitive unit width on 3rd-harmonic suppression performance.
Table 1. Influence of the photosensitive unit width on 3rd-harmonic suppression performance.
WidthFundamental
Amplitude (a.u.)
3rd-Harmonic
Amplitude (a.u.)
3rd-Harmonic
Component
d/327.562690.000740.00%
1.02d/327.890190.026030.09%
1.05d/328.358350.065760.23%
1.1d/329.076510.130610.45%
1.2d/330.271080.248870.82%
0.98d/327.223590.027220.10%
0.95d/326.691980.066950.25%
0.9d/325.747340.131710.51%
0.8d/323.650220.249931.06%
Table 2. Influence of the photosensitive unit width on 5th-harmonic suppression performance.
Table 2. Influence of the photosensitive unit width on 5th-harmonic suppression performance.
WidthFundamental
Amplitude (a.u.)
5th-Harmonic
Amplitude (a.u.)
5th-Harmonic
Component
d/518.703340.000260.00%
1.02d/519.025530.005730.03%
1.05d/519.503160.014670.08%
1.1d/520.283730.029240.14%
1.2d/521.784080.055880.26%
0.98d/518.37820.006250.03%
0.95d/517.885070.015190.08%
0.9d/517.049150.029740.17%
0.8d/515.327670.05630.37%
Table 3. Influence of the photosensitive unit offset on 3rd-harmonic suppression performance.
Table 3. Influence of the photosensitive unit offset on 3rd-harmonic suppression performance.
OffsetFundamental
Amplitude (a.u.)
3rd-Harmonic
Amplitude (a.u.)
3rd-Harmonic
Component
d/655.133380.000830.00%
1.02d/654.797160.026900.05%
1.05d/654.281360.06680.12%
1.1d/653.390730.132690.25%
1.2d/651.504110.262320.51%
0.98d/655.462620.026630.05%
0.95d/655.946690.066530.12%
0.9d/356.723950.132430.23%
0.8d/358.157730.095750.16%
Table 4. Influence of the photosensitive unit offset on 5th-harmonic suppression performance.
Table 4. Influence of the photosensitive unit offset on 5th-harmonic suppression performance.
OffsetFundamental
Amplitude (a.u.)
5th-Harmonic
Amplitude (a.u.)
5th-Harmonic
Component
d/1060.549530.001250.00%
1.02d/1060.424690.006780.01%
1.05d/1060.232960.015680.03%
1.1d/1059.901530.030490.05%
1.2d/1059.194420.059470.10%
0.98d/1060.671970.005340.01%
0.95d/1060.851150.014240.02%
0.9d/1061.137760.029060.05%
0.8d/1061.665660.058120.09%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Lv, B.; Li, S.; Liu, J. Harmonic Suppression Method for Optical Encoder Based on Photosensitive Unit Parameter Optimization. Optics 2025, 6, 62. https://doi.org/10.3390/opt6040062

AMA Style

Lv B, Li S, Liu J. Harmonic Suppression Method for Optical Encoder Based on Photosensitive Unit Parameter Optimization. Optics. 2025; 6(4):62. https://doi.org/10.3390/opt6040062

Chicago/Turabian Style

Lv, Bowei, Shitao Li, and Jie Liu. 2025. "Harmonic Suppression Method for Optical Encoder Based on Photosensitive Unit Parameter Optimization" Optics 6, no. 4: 62. https://doi.org/10.3390/opt6040062

APA Style

Lv, B., Li, S., & Liu, J. (2025). Harmonic Suppression Method for Optical Encoder Based on Photosensitive Unit Parameter Optimization. Optics, 6(4), 62. https://doi.org/10.3390/opt6040062

Article Metrics

Back to TopTop