Next Article in Journal
Advanced Nonlinear and Learning-Based Control Techniques for Complex Dynamical Systems
Previous Article in Journal
DPAF-SA: A Formation Control Algorithm for Dynamic Allocation and Fusion of Potential Fields for UAV Swarms
error_outline You can access the new MDPI.com website here. Explore and share your feedback with us.
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Anti-Interference Compensation of Grating Moiré Fringe Signals via Parameter Adaptive Optimized VMD Based on MSPSO

1
College of Electronic and Computer, Jilin Jianzhu University, Changchun 130118, China
2
Modern Industry College, Jilin Jianzhu University, Changchun 130118, China
*
Author to whom correspondence should be addressed.
Electronics 2026, 15(2), 258; https://doi.org/10.3390/electronics15020258
Submission received: 19 November 2025 / Revised: 4 January 2026 / Accepted: 5 January 2026 / Published: 6 January 2026
(This article belongs to the Section Circuit and Signal Processing)

Abstract

This paper proposes a grating Moiré fringe signal compensation method based on Variational Mode Decomposition (VMD) to address signal errors in grating encoders. VMD decomposes Moiré fringe signals into multiple amplitude-modulated and frequency-modulated components, and realizes noise compensation through parameter optimization and signal reconstruction. The Multi-Strategy Particle Swarm Optimization (MSPSO) enhances optimization performance via adaptive inertia weight adjustment and chaotic perturbation, solving the problems of mode mixing or over-decomposition caused by blind parameter selection in traditional VMD. A hardware-software co-design test system based on ZYNQ FPGA is developed, which optimally allocates tasks between the Processing System and Programmable Logic, resolving issues of large data volume and long computation time in traditional systems. The compensation scheme provides excellent signal processing performance. The experimental tests on random periodic signals, triangular waves and square waves with different duty cycles have demonstrated the robustness of this scheme. After compensation, the output signal exhibits excellent sinuosity and orthogonality, with harmonic components and noise in the frequency domain almost negligible. It provides a practical solution for high-precision measurement in ultra-precision machining, semiconductor manufacturing, and automated control.

1. Introduction

In high-end manufacturing, precision instrumentation, and automated control systems, photoelectric encoders serve as irreplaceable core sensing components for achieving high-precision displacement and angular measurement [1,2,3,4]. Their metrological performance directly governs the control accuracy and operational reliability of industrial systems, acting as a pivotal technical pillar for the advancement of advanced manufacturing and precision engineering [5,6,7]. However, in practical industrial scenarios, encoders are inevitably subjected to multiple interference factors during operation: mechanical jitter induced by equipment vibration gives rise to periodic distortion of Moiré fringe signals; temperature drift modulates the refractive index of optical devices, triggering amplitude fluctuation and phase deviation; and long-term service leads to grating wear, coating degradation, and aging of optical components, resulting in a continuous decline in signal-to-noise ratio (SNR) and signal integrity [8,9,10]. These adverse factors superimpose significant noise, harmonic distortion, and baseline drift onto the original ideal Moiré fringe signals, severely restricting the improvement of encoder subdivision accuracy and emerging as a critical bottleneck that hinders the further enhancement of measurement performance in high-precision applications.
In early studies, filtering and correction schemes based on hardware circuits were widely adopted. For instance, Hung Van Hoang and Jae Wook Jeon proposed an improved phase-locked loop structure for the adaptive tracking and correction of noise, DC offset, phase shift, and waveform distortion in encoder output signals [11]; Zhang, GQ developed an adaptive linear neural network-based filter using a quadrature phase-locked loop, which tracks and compensates for harmonic ripples by continuously updating the filter weights online [12]. At the algorithmic level, methods such as the Hilbert transform [13] and genetic algorithms [14] have been widely adopted. In 2021, Lin Yu’s team from China Jiliang University implemented the solution of signal waveform parameters using the particle swarm optimization algorithm in an FPGA [15]. Despite the certain effectiveness of these traditional methods under stable operating conditions, their inherent drawbacks—such as insufficient adaptability and robustness—have become increasingly prominent when confronted with multi-source coupled interference, nonlinear distortion, and dynamic measurement requirements in complex industrial environments [16]. Therefore, in recent years, with the advancement of artificial intelligence and data science technologies, the focus of relevant research has gradually shifted toward advanced data-driven signal decoding and error compensation techniques.
In 2019, Zhu et al. proposed a sinusoidal error compensation method based on Particle Swarm Optimization (PSO), which was implemented on a Field-Programmable Gate Array (FPGA) platform to mitigate signal distortion in Moiré fringes [17]. They constructed a harmonic waveform fitting model and utilized PSO to efficiently optimize waveform parameters, achieving a significant improvement in angular resolution and effective suppression of spectral noise in real-time measurement scenarios. In 2021, Li et al. developed a soft sensor model based on Dynamic Neural Networks (DNN) to address displacement estimation challenges in flexible motion stages [18]. In 2024, they further proposed a real-time correction method targeting DC offset, amplitude imbalance, and quadrature phase error, effectively alleviating the degradation of signal integrity caused by the limited number of grating line pairs in compact reflective encoders [19]. In 2025, Wu et al. proposed a deep Q-learning reinforcement learning framework, which adaptively eliminates speed-related encoding errors and enhances localization and decoding accuracy across multiple test scenarios, especially in low-speed measurement ranges (0.10–0.50 mm/s) [20]. These studies have fully demonstrated that intelligent algorithms can significantly enhance the adaptability and robustness of signal processing systems.
Noise suppression, harmonic distortion correction, and quality optimization of Moiré fringe signals are core common challenges in Moiré fringe metrology, not unique to photoelectric encoders, but also concerned in X-ray/neutron metrology [21,22]. Existing solutions are limited to hardware optimization or scenario-specific physical models, lacking general intelligent compensation for multi-interference and dynamic conditions: a key demand for industrial devices [19]. On this basis, drawing on existing research findings, this study proposes a novel compensation scheme for Moiré fringe signals of photoelectric encoders, which integrates VMD with the Multi-Strategy Particle Swarm Optimization (MSPSO) algorithm. The core research contributions are summarized as follows:
(1)
A multi-strategy collaborative optimization mechanism is constructed. By virtue of adaptive population initialization, dynamic inertia weight adjustment, and mutation escape strategies, this mechanism addresses the local optimization problem of traditional optimization algorithms in VMD parameter optimization, thus achieving the global optimal matching of k and α;
(2)
A complete technical pipeline featuring adaptive decomposition-precise separation-signal reconstruction is established. This pipeline breaks through the dependence of traditional methods on predefined signal models and enables the simultaneous suppression of multi-source interferences.

2. VMD Algorithm

As shown in Figure 1, the VMD algorithm is employed for the correction and compensation of grating Moiré fringe signals, with the primary objective of achieving effective frequency-domain separation between valid signals and interference components. VMD decomposes the target signal into a set of IMFs and iteratively seeks the optimal solution of the variational model to determine the center frequency and bandwidth of each component, thereby realizing efficient frequency-domain signal separation. The core mechanism relies on spectral transformation: initially, the Moiré fringe signal is converted from the time domain to the frequency domain, where signal principal components and noise are identified through spectral analysis; subsequently, the optimal principal frequency band is screened in the frequency domain to eliminate high-frequency noise and interference; finally, the processed signal is transformed back to the time domain, enabling it to approximate the ideal sinusoidal waveform.
Thus, VMD is more suitable for the correction of grating Moiré fringe signals compared to alternative methods [23]. Its advantages are manifested in high decomposition accuracy, effective suppression of mode mixing, and the ability to separate signals across distinct frequency bands. Furthermore, by introducing the penalty factor α to balance modal bandwidth and reconstruction error, the algorithm ensures the accuracy and stability of results, which in turn contributes to enhancing the SNR of denoised signals. In addition, as elaborated subsequently, VMD determines the center frequency by calculating the centroid to identify the region with the maximum energy as the center frequency. Consequently, regardless of whether the frequency of the input signal varies in real time, VMD can consistently select the optimal frequency as the center frequency based on the concentration of spectral energy, thereby providing a robust foundation for the subsequent decomposition and processing of signals.

2.1. Construction

In the VMD model, f represents the signal to be analyzed, μ k denotes the mode functions, ω k stands for the center frequency of each mode. The mathematical model of VMD can be described as follows:
T a r g e t = m i n { k = 1 K t ( δ t + j π t ) × μ k ( t ) e j ω k t 2 2 }
First, each order of intrinsic mode function μ k ( t ) is convolved with ( δ ( t ) + j π t ) , i.e., undergoing Hilbert transform, which imposes a 90° phase shift on the modal signal in the complex frequency domain. The resulting complex signal is treated as an analytical signal, facilitating the decomposition of narrowband modes.
Second, spectral shifting is achieved via the complex exponential e j ω k t , concentrating the frequency components around the center frequency of each modal function and realizing frequency concentration of the mode functions.
Finally, time-domain differentiation is performed on the entire signal. Since the derivative describes instantaneous changes and the model aims to separate modes with the narrowest possible bandwidth, this requirement is expressed as minimizing the time-domain derivative in the time domain.
Given that the constrained variational model cannot be directly solved using numerical methods, a quadratic penalty factor α and a Lagrange multiplier λ(t) are introduced to convert the constrained variational problem into an unconstrained one. The expression of the transformed variational model is as follows:
L ( { μ k } , { ω k } , λ ) = α k = 1 K t ( δ t + j π t ) μ k ( t ) e j ω k t 2 2 + f ( t ) k = 1 K μ k ( t ) 2 2 + λ ( t ) , f ( t ) μ k ( t )
In the formula, α functions to ensure the weight of the minimum bandwidth term after signal reconstruction, avoiding the influence of other terms on the minimum bandwidth term. λ(t) as the constraint term of the model, guarantees the integrity of the signal. f ( t ) μ k ( t ) is the residual term; if the difference between the sum of the mode functions and the original signal is not zero, indicating signal loss, λ(t) will perform correction.

2.2. Solution

In this paper, the Alternating Direction Method of Multipliers is adopted to solve the aforementioned unconstrained variational problem. Through stepwise iteration and gradual approximation to the optimal solution, the sets { μ k ( t ) } and { ω k }, that minimize L are derived. The steps are as follows:
(a)
Update the current mode function based on the center frequency and Lagrange multiplier from the previous iteration. With ω k n and λ fixed, calculate μ k to reduce the value of L.
(b)
Determine the center of gravity of the power spectrum from the calculation in step (a) as the new center frequency ω k n + 1 thereby narrowing the bandwidth of the updated mode.
(c)
Update λ according to the residual value between the new mode components and the original signal. λ forces the residual to decrease, making the mode in each iteration more similar to the original signal.
(d)
Repeat the above three steps for multiple iterations. After the iterations, perform a convergence check. When the difference between the mode components of two adjacent iterations meets the judgment threshold, it is considered that the optimal minimum value has been found, and the solution to the variational problem is completed.
The formula for solving the variational problem through iteration is as follows:
μ k n + 1 ( ω ) = f ( ω ) i k μ i ( ω ) + λ ( ω ) 2 1 + 2 α ( ω ω k ) 2
ω k n + 1 = 0 ω μ k ( ω ) 2 d ω 0 μ k ( ω ) 2 d ω
λ n + 1 ( ω ) λ n ( ω ) + τ ( f ( ω ) k μ k n + 1 ( ω ) )

3. Optimization with MSPSO

3.1. MSPSO Algorithm

PSO is an intelligent optimization algorithm developed based on the study of collective movement behaviors of bird flocks and fish schools [17]. It searches for the optimal solution through independent exploration of individual particles and information sharing among particles. The two main parameters of the algorithm are velocity v and position x. The best position of each individual particle is denoted as p b e s t , and the best position of the entire particle swarm is denoted as g b e s t . The velocity of particle i is denoted as V i , and its self-updating iteration formula is as follows:
v i d + 1 = ω v i d + c 1 r 1 ( p b e s t x i d ) + c 2 r 2 ( g b e s t x i d )
where v i d is the velocity of the i-th particle in the d-dimensional search space; c 1 and c 2 are learning factors, among which c 1 is the individual cognitive coefficient, and c 2 is the social learning coefficient; r 1 and r 2 are random numbers in the range [0,1], intended to increase the randomness of the search; p b e s t and g b e s t are the two best positions; ω is the inertia weight, which adjusts the search ability of particles.
This paper selects the PSO algorithm to optimize VMD. However, the traditional PSO algorithm has defects such as premature convergence and easy trapping in local optima. Based on the PSO algorithm, we integrate the adaptive inertia weight update strategy and position update strategy to form a multi-strategy particle swarm optimization algorithm. It dynamically adjusts the inertia weight: a larger value is used in the early stage to enhance global optimization ability, and a smaller value is used in the later stage to improve efficiency and facilitate convergence. At the same time, it optimizes particle position updates to improve information interaction between particles and accelerate the convergence speed of particles. The formulas for inertia weight and position change are as follows:
ω = α 1 + r 2       P r α 2 + r 2         P < r          
x i d + 1 = x i d   [ 1 + rand ( 1 ) ]                           ,   r 1 < l , r 1 > l W 1 g b e s t + R W 2 g b e s t x i d ,   r 1 > l , r 2 > E W 1 g b e s t R W 2 g b e s t x i d , r 1 > l ,   r 2 < E

3.2. Optimization of VMD

Before discussing the optimization of VMD by MSPSO, we need to clarify the core logic of this method: the effect of VMD decomposition and compensation is highly dependent on two key parameters, namely the number of modes k and the penalty factor α. When α and k are too small, mode mixing will occur; when they are too large, over-decomposition will lead to redundant modes. To address the above issues, we should use MSPSO to optimize these two parameters α and k. The specific optimization algorithm flow is shown in Figure 2.
The first step is to initialize the parameters of the PSO algorithm. MSPSO first randomly generates a particle swarm, where each particle represents a combination of VMD parameters (α and K). The values of α and K are randomly and uniformly selected within specified ranges. Meanwhile, each particle is initialized with a velocity, which determines the speed and direction of the particle’s movement in the search space.
The second step is to evaluate the fitness of the function based on the modal reconstruction error after VMD decomposition and the correlation among modes. Run VMD using the current particle parameters (α and K) to obtain K modal components, then calculate the reconstruction error RMSE and the inter-modal correlation coefficient MI. The fitness function is constructed as follows:
F i t n e s s = ω 1 × RMSE + ω 2 × MI
In the above equation, ω1 and ω2 are weights, which prevent aliasing and redundancy to achieve multi-objective weighting; a smaller reconstruction error RMSE indicates better reconstructed modal components; a smaller MI value indicates higher independence. In this paper, the calculated Fitness is the fitness of a particle. A smaller fitness value indicates a better reconstruction effect. Traverse the fitness of all particles and find the minimum fitness value among all particles as the global optimal solution.
The third step is to update particle positions and velocities. To prevent falling into local optima, an adaptive inertia weight strategy is adopted, where the inertia weight changes linearly with the number of iterations. A large inertia weight is used in the early stage of iteration to enhance exploration, and a small inertia weight is used in the later stage for fine-tuning near the optimal solution. The specific inertia weight formula is as follows:
ω = ω m a x ( ω m a x ω m i n ) c u r r e n t m a x
where ω m a x is the maximum inertia weight ω m i n is the minimum inertia weight, and c u r r e n t m a x is the ratio of the current number of iterations to the total number of iterations. When the global optimal solution remains unchanged for consecutive iterations, position perturbations are applied to random particles to avoid the particle swarm falling into local optima. The perturbation method is to add chaotic random numbers to α and K. The chaotic random numbers are added to the expressions of α and K as additive terms, and their values are uniformly random within a specified range.
The fourth step, the iteration terminates when the number of iterations reaches the maximum value, or the global optimal fitness of the population remains unchanged for 10 consecutive iterations. At this point, the parameter set corresponding to the global optimal position of the particle swarm is the optimal parameter for MSPSO-optimized VMD.

3.3. Effectiveness Validation

To further verify the effectiveness of the MSPSO algorithm in this embodiment, we conducted simulation experiments using MATLAB 6.5 and compared the simulation results before and after the improvement. First, we wrote functions for both the ordinary PSO algorithm and the MSPSO algorithm in MATLAB. To verify the optimization effect of the algorithm on the fitness function designed in this study, the fitness function mentioned above was directly used for verification. After multiple tests, the following initial parameters were selected: the number of iterations was 300, the particle population size was 30, and the termination condition was set as reaching the maximum number of iterations or the change in the optimal value being less than 0.001 for 10 consecutive Iterations.
Then, a simulated Moiré fringe signal was used as input for testing, and the convergence curves of the two algorithms were recorded as shown in Figure 3a. It can be observed that the improved MSPSO algorithm has a faster convergence speed and better convergence effect both in the early and late stages of iteration.
To avoid the contingency of the experiment, normal distribution diagrams of the number of iterations before and after optimization were obtained after 10,000 simulations respectively, as shown in Figure 3. It can be clearly seen that before optimization, the number of iterations of the PSO algorithm is concentrated between 120 and 180, while after optimization, the number of iterations of the MSPSO algorithm is concentrated between 70 and 90, indicating a significant optimization effect.

4. Hardware Design

In this paper, an FPGA development board with the main chip ZYNQ XC7Z035 (Kintex-7 architecture) is adopted as the main platform. Different from the traditional FPGA structure, this chip is not only equipped with a Programmable Logic (PL) module but also includes a Processing System (PS) composed of ARM cores. The two are connected via an AXI bus, and this design supports both hardware programming and software programming functions, which is conducive to the further development of the algorithm. The efficiency of the algorithm is improved through the combination of software and hardware. The hardware architecture is shown in the Figure 4.
In this design, aiming at the problems of large amount of sampled signal data, long computation time, limited precision improvement, and susceptibility to noise interference, we propose a complete signal processing technical scheme from acquisition to output [24,25]. First, the collected signal is subjected to multiple low-pass filtering through the filter module to remove high-frequency interference, and then down sampling is completed through multiple decimation, which effectively reduces the data volume, saves storage space and computing resources. To solve the meta stability problem in cross-clock domain transmission caused by inconsistent clocks between the signal acquisition module and the processing module, FIFO is used to realize multi-bit data temporary storage, ensuring synchronous and stable signal transmission. The signal processing module is based on the FPGA hardware platform, completes signal parameter calculation through the MS algorithm, sends the parameter results to the compensation module, and finally generates and outputs the ideal sinusoidal signal through the DA module, achieving the core goals of efficient noise reduction, stable transmission, and accurate signal optimization.
In this subject, VMD and MSPSO algorithms need to be applied with multiple iterations. The ARM Cortex-A9 is used as the PS part, and FPGA as the PL part, integrated on the same chip. Among them, the PS is responsible for the MSPSO algorithm, and the PL is responsible for the intensive calculations in VMD. In the ZYNQ architecture, the ARM side, as the PS part, is suitable for strategic and scheduling tasks, while the FPGA, as the PL side, is suitable for logical parts and a large number of intensive operations [26]. Therefore, during the design process, we first determine the parts responsible for the PS side and the intensive operation acceleration parts responsible for the PL side. The processing speed of the algorithm accelerated by the PL side will be significantly faster than that processed by the PS side alone. The specific design contents are as follows:
For the design of the acceleration module, Verilog or VHDL language is used to write the acceleration module for the iterative update logic and fitness calculation logic of VMD. During the writing process, attention should be paid to the parallel computing characteristics, and a reasonable module structure should be designed. At the same time, for the signal processing functions in VMD, such as FFT, the IP cores provided by Xilinx can be directly configured. For the interface design, AXI interfaces are designed for each hardware module in the PL part to facilitate the control and configuration of the hardware modules, while ensuring stable interaction between the PL and PS
The design of the PS (Processing System) part implements the logic of the MSPSO algorithm and the initialization of the entire system using C or C++ languages. A for loop is utilized to initialize the particle swarm within the parameter search range of MSPSO; all particles are traversed for fitness evaluation to obtain the global best ( g b e s t ). In the MSPSO algorithm, the adaptive inertia weight is updated according to the formula ω = ω m a x ( ω m a x ω m i n ) c u r r e n t m a x . Multiple iterations are performed, and particle chaotic perturbation is triggered when necessary. When the number of iterations is met or the results converge, the results are returned to the PL side.

5. Verification and Analysis

The test experiment platform was shown in Figure 5. The system for compensating grating Moiré fringe signals based on the MSPSO-optimized VMD algorithm had been built as mentioned above. To verify the effectiveness of the system in compensating Moiré fringe signals, a test system was built. The practical feasibility of the system was proved through the performance of the system in signal compensation under the ZYNQ architecture processor [27].
In addition to the aforementioned devices, the signal source of the experimental system was a dual-channel function/waveform generator, which could simultaneously output harmonic signals up to the 16th order. It could be adjusted to generate square waves or high-order harmonics with different phases and amplitudes as system excitation. After the excitation signal had undergone VMD decomposition and compensation optimized by the MSPSO algorithm through the system, it was displayed on the oscilloscope in the form of waveforms and Lissajous figures, as shown in the corresponding diagrams of the response signals and their Lissajous figures.
The oscilloscope display mode was adjusted to YT and XY modes to display the compensated waveforms and Lissajous figures in split screens. The phase difference between the two channels of response signals could be analyzed through the Lissajous figures. When the Lissajous figure was a perfect circle or a regular ellipse, it indicated that the frequencies of the two response signals were strictly equal (i.e., the phase difference was 90°), meaning the two responses were orthogonal. Observation of the response waveforms and their Lissajous figures showed that the frequencies of the response waveforms were strictly equal and orthogonal, which proved that the signals had been effectively compensated after passing through the system.
The core of our signal correction method lies in identifying the fundamental wave of the continuous signal through spectral transformation, and generating an ideal sinusoidal signal based on the frequency and amplitude of this fundamental wave. Therefore, besides ensuring the real-time performance of signal processing, our primary focus is on the frequency index, which also serves as the sole basis for the final output signal. Subsequently, we selected signals with random periods, triangular waves, and square waves of different duty cycles as inputs to test the system. The random signals simulate the noise errors in the real signals of grating encoders, the square waves mimic the phase errors of the real signals, and the triangular waves simulate the insufficient sinusoidality of the real signals. The signals at the input and output terminals were collected and displayed by the oscilloscope, as shown in Figure 6. Through comparative analysis, we could draw an intuitive conclusion: the system achieves a relatively ideal suppression effect on the harmonics of these several different input signals.
To better observe the compensation results of different input signal samples, we performed spectrum conversion on the four groups of output signals to analyze the true differences in their frequencies and amplitudes in the frequency domain. As shown in Figure 7, the results of the four groups of tests were scientifically presented. Firstly, it was not difficult to find that the harmonic components or noise of the four groups of output signals were within an almost negligible range, which once again verified that all output signals exhibited excellent sinusoidality. Secondly, the frequencies and amplitudes of the output signals, which we focused on most, were maintained within a very small difference range: the amplitude difference was within 1%, while the frequency difference was less than 5‰. Considering the singularity of the input signals adopted in the experiments, our study was conducted on a qualitative rather than quantitative basis. Therefore, the experimental results are only intended to verify the feasibility of the proposed method and the effectiveness of the designed hardware.
As shown in Table 1, we compared several related studies on error compensation for photoelectric encoders using different algorithms and hardware platforms. It could be observed that this study achieved a relatively high level in both signal processing speed and error correction. This was attributed to the excellent adaptability of the VMD algorithm to the characteristics of signal errors in grating encoders, while the ZYNQ FPGA-based hardware platform met the requirements for algorithm optimization and hardware acceleration. These factors collectively contributed to the achievement of relatively ideal test results in this study.

6. Conclusions

This study enhances optimization performance by integrating the adaptive inertia weight adjustment and chaotic perturbation strategies of the MSPSO algorithm. The VMD parameters optimized via this algorithm enable accurate separation of effective signals from multi-source interference, thereby laying a solid foundation for high-quality signal compensation. Meanwhile, the proposed compensation scheme demonstrates excellent signal processing capabilities: experimental tests involving random periodic signals, triangular waves, and square waves with varying duty cycles confirm the scheme’s robustness. Specifically, a dynamic weight adjustment strategy is implemented: in the early stage of particle swarm search, a relatively large inertia weight is applied to expand the search space, which effectively enhances the global optimization capability of the algorithm. In the later stage, the inertia weight is reduced appropriately, which prevents the particle swarm from missing the optimal solution due to excessively large step sizes in the neighborhood of the optimal value interval. Meanwhile, chaotic random numbers are introduced as perturbation factors in the improved algorithm. The integration of chaotic random numbers aims to avoid the premature convergence of the particle swarm within a single local search interval, and also mitigates the problem of trapping into local optimal solutions to a certain extent.
In addition, the ZYNQ-based hardware-software co-design system ensures practical applicability through optimal task allocation. This architecture balances processing speed and flexibility, effectively addressing challenges in traditional signal processing systems such as large data volumes and prolonged computation times. Furthermore, the scheme holds broad application prospects in high-precision measurement scenarios: it significantly improves the signal-to-noise ratio (SNR) and integrity of Moiré fringe signals, ultimately providing critical technical support for enhancing the subdivision accuracy and operational reliability of photoelectric encoders.

Author Contributions

Conceptualization, Y.M.; methodology, G.W. and Y.M.; validation, R.W., G.W. and S.W.; formal analysis, G.W. and X.M.; data curation, J.W.; writing—original draft preparation, G.W.; writing—review and editing, Y.M.; project administration, G.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Science and Technology Development Project of Jilin Province, grant number 20240602070RC.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Liu, T.; Matsukuma, H.; Suzuki, A.; Sato, R.; Gao, W. An Improved Data Processing Algorithm for Spectrally Resolved Interferometry Using a Femtosecond Laser. Sensors 2024, 24, 2869. [Google Scholar] [CrossRef]
  2. Li, K.; Zhang, Z.; Lin, J.; Sato, R.; Matsukuma, H.; Gao, W. Angle measurement based on second harmonic generation using artificial neural network. Nanomanuf. Metrol. 2023, 6, 28. [Google Scholar] [CrossRef]
  3. Shi, N.; Wang, S.; Xue, G.; Liu, M.; Han, Y.; Zhu, J.; Ni, K.; Wang, X.; Li, X. A real-time processing system for dual-channel six degree-of-freedom grating ruler based on FPGA. In Optical Design and Testing XI; SPIE: Bellingham, WA, USA, 2021; pp. 250–260. [Google Scholar]
  4. Luo, L.; Shan, S.; Li, X. A review: Laser interference lithography for diffraction gratings and their applications in encoders and spectrometers. Sensors 2024, 24, 6617. [Google Scholar] [CrossRef] [PubMed]
  5. Lin, X.; Su, X.; Wang, J.; Sun, Y.; Hu, P. Laser Interferometer Technology and Instruments for Sub-Nanometer and Picometer Displacement Measurements. Laser Optoelectron. Prog. 2023, 60, 0312016. [Google Scholar]
  6. Chang, D.; Sun, Y.; Wang, J.; Yin, Z.; Hu, P.; Tan, J. Multiple-beam grating interferometry and its general Airy formulae. Opt. Lasers Eng. 2023, 164, 107534. [Google Scholar] [CrossRef]
  7. Ortlepp, I.; Zollner, J.P.; Rangelow, I.W.; Manske, E. Heterodyne Standing-Wave Interferometer with Improved Phase Stability. Nanomanuf. Metrol. 2021, 4, 190–199. [Google Scholar] [CrossRef]
  8. Zhong, Z.; Li, J.; Lu, T.; Li, X. High dynamic wavefront stability control for high-uniformity periodic microstructure fabrication. Precis. Eng. 2025, 93, 216–223. [Google Scholar] [CrossRef]
  9. Jamro, E.; Wielgosz, M.; Bieniasz, S.; Cioch, W. FPGA–ARM heterogeneous system for high speed signal analysis. Solid State Phenom. 2012, 180, 207–213. [Google Scholar] [CrossRef]
  10. Spence, T.; Calzada, M.; Gardner, H.; Leefe, E.; Fontenot, H.; Gilevicius, L.; Hartsock, R.; Boyson, T.; Harb, C. Real-time FPGA data collection of pulsed-laser cavity ringdown signals. Opt. Express 2012, 20, 8804–8814. [Google Scholar] [CrossRef]
  11. Hoang, H.V.; 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]
  12. Zhang, G.Q.; Wang, G.L.; Xu, D.G.; Zhao, N.N. An ADALINE-Network-Based PLL for Position Sensorless Interior Permanent Magnet Synchronous Motor Drives. IEEE Trans. Power Electron. 2016, 31, 1450–1460. [Google Scholar] [CrossRef]
  13. Gao, X.; Wan, Q.H.; Sun, Y.; Yang, S.W. Real-time compensation for orthogonality deviation of photoelectric Moiré Fringe Signals. Opt. Precis. Eng. 2014, 22, 213–219. [Google Scholar]
  14. Yang, H.H.; Feng, W.L.; Liu, F. Research on grating signal identification and deviation compensation based on genetic algorrithm. Laser Optoelectron. Prog. 2016, 53, 131–138. [Google Scholar]
  15. Lin, Y.; Zhu, W.B.; Huang, Y.; Xue, Z. Development of sinusoidal error compensation circuit for grating moiré signals based on FPGA. Instrum. Tech. Sens. 2021, 2, 99–103. [Google Scholar]
  16. Ye, W.; Zhang, M.; Zhu, Y.; Wang, L.; Hu, J.; Li, X.; Hu, C. Ultraprecision real-time displacements calculation algorithm for the grating interferometer system. Sensors 2019, 19, 2409. [Google Scholar] [CrossRef]
  17. Zhu, W.; Lin, Y.; Huang, Y.; Xue, Z. Research on sinusoidal error compensation of Moiré signal using particle swarm optimization. IEEE Access 2020, 8, 14820–14831. [Google Scholar] [CrossRef]
  18. Li, Y.; Zhang, M.; Zhu, Y.; Li, X.; Wang, L. Soft Sensor Model for Estimating the POI Displacement Based on a Dynamic Neural Network. J. Adv. Comput. Intell. Intell. Inform. 2021, 25, 963–973. [Google Scholar] [CrossRef]
  19. Li, R.; Wang, T.; Niu, Q.; Wang, L.; Lin, S. A reflective grating displacement measurement method based on error analysis and the improved CORDIC algorithm. Chin. J. Sci. Instrum. 2025, 45, 215–223. [Google Scholar]
  20. Wu, Z.; Nie, J.; Cai, N.; Sun, P. A Compensation Model for Optical Encoders at Various Speeds Based on Improved DQN. In Proceedings of the 2025 5th International Conference on Consumer Electronics and Computer Engineering (ICCECE), Dongguan, China, 28 February–2 March 2025; pp. 629–633. [Google Scholar]
  21. Miao, H.X.; Panna, A.; Gomella, A.A.; Bennett, E.E.; Znati, S.; Chen, L.; Wen, H. A universal moiré effect and application in X-ray phase-contrast imaging. Nat. Phys. 2016, 12, 834–930. [Google Scholar] [CrossRef]
  22. Pushin, D.A.; Sarenac, D.; Hussey, D.S.; Miao, H.; Arif, M.; Cory, D.G.; Huber, M.G.; Jacobson, D.L.; LaManna, J.M.; Parker, J.D.; et al. Far-field interference of a neutron white beam and the applications to noninvasive phase-contrast imaging. Phys. Rev. A 2017, 95, 043637. [Google Scholar] [CrossRef]
  23. Lin, J.; Matsukuma, H.; Li, K.; Sato, R.; Gao, W. Improvement of angle measurement sensitivity using second harmonic wave interference. Opt. Express 2024, 32, 40915–40930. [Google Scholar] [CrossRef]
  24. Quan, L.; Shimizu, Y.; Sato, R.; Shin, D.W.; Matsukuma, H.; Archenti, A.; Gao, W. Design and testing of a compact optical angle sensor for pitch deviation measurement of a scale grating with a small angle of diffraction. Int. J. Autom. Technol. 2022, 16, 572–581. [Google Scholar] [CrossRef]
  25. Hsu, C.-C.; Tsai, C.-M.; Ye, C.-Y.; Chen, P.-L.; Lee, T.-T.; Dai, Z.-X. Period measurement of a periodic structure by using a heterodyne grating interferometer. Appl. Opt. 2024, 63, 4211–4218. [Google Scholar] [CrossRef]
  26. Zhang, M.; Lu, C.; Liu, W.; Liu, X.; Zhao, Q. Integrated Micro Sensor Based on Grating Interferometer: A Review. IEEE Sens. J. 2024, 25, 2073–2089. [Google Scholar] [CrossRef]
  27. Han, Y.; Ni, K.; Li, X.; Wu, G.; Yu, K.; Zhou, Q.; Wang, X. An FPGA Platform for Next-Generation Grating Encoders. Sensors 2020, 20, 2266. [Google Scholar] [CrossRef]
  28. Yu, J.Y.; Dou, R.J.; Zhang, W.N.; Wang, X.Y.; Xu, J.T.; Liu, J.; Wu, N.J.; Liu, L.Y. Precision encoder grating mounting: A near-sensor computing approach. Sci. Rep. 2024, 14, 22249. [Google Scholar] [CrossRef]
Figure 1. VMD Compensation for Grating Moiré Fringe Signals.
Figure 1. VMD Compensation for Grating Moiré Fringe Signals.
Electronics 15 00258 g001
Figure 2. Algorithm optimization process.
Figure 2. Algorithm optimization process.
Electronics 15 00258 g002
Figure 3. Validation of the Algorithm’s Optimization Performance for the Fitness Function: (a) Comparison Diagram of Convergence Curves; (b) Normal Distribution Diagram of Iteration Counts.
Figure 3. Validation of the Algorithm’s Optimization Performance for the Fitness Function: (a) Comparison Diagram of Convergence Curves; (b) Normal Distribution Diagram of Iteration Counts.
Electronics 15 00258 g003
Figure 4. Normal Distribution Diagram of Iteration Counts: (a) Hardware architecture diagram; (b) ZYNQ development board; (c) AD module; (d) DA module.
Figure 4. Normal Distribution Diagram of Iteration Counts: (a) Hardware architecture diagram; (b) ZYNQ development board; (c) AD module; (d) DA module.
Electronics 15 00258 g004
Figure 5. Test system: the specific characteristic parameters of this test system are presented in tabular form in the figure; the screenshot of the signal source shows the harmonic components of the input signal, and the screenshot of the oscilloscope displays the output signal after compensation.
Figure 5. Test system: the specific characteristic parameters of this test system are presented in tabular form in the figure; the screenshot of the signal source shows the harmonic components of the input signal, and the screenshot of the oscilloscope displays the output signal after compensation.
Electronics 15 00258 g005
Figure 6. Test results: (a) Periodic Signal Compensation ComparisonL; (b) Square Waves Compensation Comparison; (c) Triangula Waves Compensation Comparison; (d) Different duty cycles Compensation Comparison.
Figure 6. Test results: (a) Periodic Signal Compensation ComparisonL; (b) Square Waves Compensation Comparison; (c) Triangula Waves Compensation Comparison; (d) Different duty cycles Compensation Comparison.
Electronics 15 00258 g006aElectronics 15 00258 g006b
Figure 7. The Differences in Frequency and Amplitude of Signals After Compensation for Different Input Signals as Shown in the Spectrum Diagram.
Figure 7. The Differences in Frequency and Amplitude of Signals After Compensation for Different Input Signals as Shown in the Spectrum Diagram.
Electronics 15 00258 g007
Table 1. Comparison of Mainstream Error Compensation Algorithms.
Table 1. Comparison of Mainstream Error Compensation Algorithms.
Comparison ItemThis PaperYu et al. [28]Li et al. [19]Zhu et al. [17]
PlatformZYNQ FPGAXilinx Kintex 7STM32Altera Cyclone E
Solution ArchitectureVMD+MSPSOLook-Up TableImprove CORDICPSO
Fixed Frequency200k86.7k--
Processing SpeedReal-time8.41 ms/frame-real-time
Subdivision ErrorVirtually ideal-86% reduction41% reduction
Application scenariosGrating encoderEncoder Grating
Mounting
Linear encoder Grating Encoder
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

Wu, G.; Wei, R.; Wang, S.; Mu, X.; Wang, J.; Sun, G.; Mu, Y. Anti-Interference Compensation of Grating Moiré Fringe Signals via Parameter Adaptive Optimized VMD Based on MSPSO. Electronics 2026, 15, 258. https://doi.org/10.3390/electronics15020258

AMA Style

Wu G, Wei R, Wang S, Mu X, Wang J, Sun G, Mu Y. Anti-Interference Compensation of Grating Moiré Fringe Signals via Parameter Adaptive Optimized VMD Based on MSPSO. Electronics. 2026; 15(2):258. https://doi.org/10.3390/electronics15020258

Chicago/Turabian Style

Wu, Gang, Ruihao Wei, Shuo Wang, Xiaoqiao Mu, Jing Wang, Guangwei Sun, and Yusong Mu. 2026. "Anti-Interference Compensation of Grating Moiré Fringe Signals via Parameter Adaptive Optimized VMD Based on MSPSO" Electronics 15, no. 2: 258. https://doi.org/10.3390/electronics15020258

APA Style

Wu, G., Wei, R., Wang, S., Mu, X., Wang, J., Sun, G., & Mu, Y. (2026). Anti-Interference Compensation of Grating Moiré Fringe Signals via Parameter Adaptive Optimized VMD Based on MSPSO. Electronics, 15(2), 258. https://doi.org/10.3390/electronics15020258

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop