Research on Particle Swarm Compensation Method for Subdivision Error Optimization of Photoelectric Encoder Based on Parallel Iteration
Abstract
:1. Introduction
2. Analysis of Subdivision Error
2.1. Sine Error Analysis
2.2. Analysis of Higher Harmonic Error
3. PSO Algorithm Error Compensation
3.1. Principle of Error Correction
3.2. Moiré Fringe Interpolation Error Compensation Model
3.3. Particle Swarm Optimization Compensation Principle
3.4. Particle Swarm Adaptive Interval Division
- Divide the population search space into regions, where i is the number of region divisions. As shown in Figure 7a, when the search area is divided for the first time, six effective search areas are obtained, and the search range of each group of areas is completely equal. As the number of algorithm iterations increases, the number of individual historical optimal particles extracted to the external memory increases. When the termination condition of the first division iteration is reached, the second region division is performed. In this paper, the number of particles in the external memory is represented by , and the external memory is essentially a comparator, which compares the extracted particles in the current optimal position of the individual to obtain the optimal position in the current population history. The optimal location acquisition is processed in parallel with the individual optimal location search in the subspace of the search domain.
- As shown in Figure 7b, as the number of iterations in the search domain is accumulated, the number of particles in the individual optimal historical position in the external comparator increases, and the number of particles in the search subspace also increases accordingly, so it is necessary to further subdivide the search area. Starting from iterations, the region adaptive division is performed:
- 3.
- By analogy, the interval division of the population search domain can be continuously realized. Ideally, it should be ensured that there is one particle in each sub-region. However, due to the fast convergence speed of the PSO algorithm, even if the number of iterations is increased in some areas, better optimization results cannot be achieved. Therefore, according to the feedback state of the particle search space, some search areas without particles can be excluded accordingly, as shown in Figure 7c. In order not to affect the overall convergence speed of the algorithm, it is necessary to set the termination condition of the algorithm iteration. In this paper, we set the algorithm to stop when the algorithm reaches the predetermined maximum number of iterations or when the number of particles in the subspace of the search domain is 1.
3.5. Particle Swarm Multi-Swarm Parallel Iteration
4. FPGA Implementation of Particle Swarm Optimization Algorithm
4.1. FPGA Logic Design of Particle Swarm Optimization Algorithm
- (1)
- Digital Signal Acquisition Module
- (2)
- Particle Velocity Update Module
- (3)
- Particle Position Update Module
4.2. FPGA Key Parameter Setting
- (1)
- Inertia Weight
- (2)
- Number of Particles
5. Experimental Design
6. Conclusions
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- Wang, X.J. Errors and precision analysis of subdivision signals for photoelectric angle encoder. Opt. Precis. Eng. 2012, 20, 379–386. (In Chinese) [Google Scholar]
- Das, S.; Chakraborty, B. Design and Realization of an Optical Rotary Sensor. IEEE Sens. J. 2018, 18, 2675–2681. [Google Scholar] [CrossRef]
- Tameh, T.A.; Sawan, M.; Kashyap, R. Novel analog ratio-metric optical rotary encoder for avionic applications. IEEE Sens. J. 2016, 16, 6586–6595. [Google Scholar] [CrossRef]
- Su, Y.; Wang, Q.; Yan, F.; Liu, X.; Huang, Y. Subdivision error analysis and compensation for photoelectric angle encoder in a telescope control system. Math. Probl. Eng. 2015, 2015, 967034. [Google Scholar] [CrossRef] [Green Version]
- Yang, Y.-P.; Ting, Y.-Y. Improved angular displacement estimation based on Hall-effect sensors for driving a brushless permanent-magnet motor. IEEE Trans. Ind. Electron. 2014, 61, 504–511. [Google Scholar] [CrossRef]
- Das, S.; Sarkar, T.S.; Chakraborty, B.; Dutta, H.S. Study on array of photo-detector based absolute rotary encoder. Sens. Actuators A Phys. 2016, 246, 114–122. [Google Scholar] [CrossRef]
- Bajić, J.S.; Stupar, D.Z.; Dakić, B.M.; Živanov, M.B.; Nagy, L.F. An absolute rotary position sensor based on cylindrical coordinate color space transformation. Sens. Actuators A Phys. 2015, 213, 27–34. [Google Scholar] [CrossRef]
- Wang, Y.; Liu, Y.; Yan, X.; Chen, X.; Lv, H. Compensation of moire fringe sinusoidal deviation in photoelectrical encoder based on tunable filter. In Proceedings of the 2011 Symposium on Photonics and Optoelectronics (SOPO), Wuhan, China, 6–18 May 2011; Volume 39, pp. 1–4. [Google Scholar]
- Anguo, H.; Honglin, Y.; Chuanxin, Z.; Wang, Y.G. Subdivision and direction judgment of grating Moire fringes. Opto Electron. Eng. 2007, 34, 45–49. [Google Scholar]
- Xianjun, W. Analysis of the error and accuracy of the subdivision signal of the photoelectric shaft encoder. Opt. Precis. Eng. 2012, 20, 379–386. [Google Scholar]
- Matszoe, Y.; Yoshizawa, T. High-performance absolute rotary encoder using muhitrack and M-code. Opt. Eng. 2003, 42, 124–131. [Google Scholar] [CrossRef]
- Luo, C.Z.; Chen, L.Y.; Sun, Y. A new optical encoder. Opt. Precis. Eng. 2003, 11, 104–108. [Google Scholar]
- Matsuzoe, Y.; Koizumi, K.; Saitoh, T. Optimizing design of high-resolution optical encoder using a poin-source light-emitting diode with slits. Opt. Eng. 2005, 44, 013609-1–013609-6. [Google Scholar] [CrossRef]
- Zhifeng, L.; Xiupeng, H.; Li, L.; Xiaodong, W. Measurement of spindle radial movement error with circular grating and autocollimator. Opt. Precis. Eng. 2019, 27, 2053–2061. [Google Scholar]
- Ying, S.; Qiuhua, W.; Ronghong, S. Subdivision error compensation method of small photoelectric encoder. J. Electron. Meas. Instrum. 2011, 25, 605–611. [Google Scholar]
- Song, J.H.; Kim, K.C.; Kim, S.H.; Yoon, K.K. A new error compensation method in linear encoder using phase shifted grating. SPIE 1999, 2740, 124–127. [Google Scholar]
- Shuliang, Y.; Qian, Z.; Weibin, Z. Study on quadrature error real-time compensation for grating Moiré signal. Chin. J. Sci. Instrum. 2017, 38, 57–64. [Google Scholar]
- Zhu, W.B.; Ye, S.J.; Huang, Y.; Xue, Z. Design of a precise subdivision system for gratings using a modified CORDIC algorithm. IET Circuits Devices Syst. 2019, 13, 1284–1291. [Google Scholar] [CrossRef]
- 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]
- Gao, X.; Wan, Q.; Lu, X.; Sun, Y. Automatic compensation of sine deviation for grating fringe photoelectric signal. J. Opt. 2013, 33, 194–199. [Google Scholar]
Particle Population | Space Dimensionality | Changing Mode | LE | Best Fitness |
---|---|---|---|---|
20 | 5 | Nonlinear inertia weight | 13,852 | |
10 | 5 | Linear inertia weight | 7697 | 2.638 × 105 |
20 | 5 | 13,067 | 7.41 × 104 | |
30 | 5 | 18,673 | 6.97 × 104 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
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. https://doi.org/10.3390/s22124456
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(12):4456. https://doi.org/10.3390/s22124456
Chicago/Turabian StyleHou, Han, Guohua Cao, Hongchang Ding, and Kun Li. 2022. "Research on Particle Swarm Compensation Method for Subdivision Error Optimization of Photoelectric Encoder Based on Parallel Iteration" Sensors 22, no. 12: 4456. https://doi.org/10.3390/s22124456
APA StyleHou, H., Cao, G., Ding, H., & Li, K. (2022). Research on Particle Swarm Compensation Method for Subdivision Error Optimization of Photoelectric Encoder Based on Parallel Iteration. Sensors, 22(12), 4456. https://doi.org/10.3390/s22124456