| 研究生: |
吳昭儀 Wu, Chao-Yi |
|---|---|
| 論文名稱: |
類比式編碼器之細分割與解析度提升 A Subdivision Method for Improving Resolution of Analog Encoders |
| 指導教授: |
何明字
Ho, Ming-Tzu |
| 學位類別: |
碩士 Master |
| 系所名稱: |
工學院 - 工程科學系 Department of Engineering Science |
| 論文出版年: | 2016 |
| 畢業學年度: | 104 |
| 語文別: | 中文 |
| 論文頁數: | 119 |
| 中文關鍵詞: | 類比編碼器 、正交弦波校正 、細分割 |
| 外文關鍵詞: | analog encoder, calibration of quadrature encoder signals, subdivision algorithm |
| 相關次數: | 點閱:72 下載:0 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
本論文旨在提高增量型類比編碼器之解析度。由於實際上類比編碼器之輸出訊號並非完全等振幅、正交弦波訊號,且平均準位也有偏差,故本論文為了得到高解析度之細分割結果,必須先對失真的弦波訊號做校正,吾人利用線性迴歸之形式以其最小平方法解求得校正係數,代入設定之失真正交弦波訊號即可得到更加準確之等振幅正交弦波訊號,並以MATLAB/Simulink軟體進行模擬,確認訊號校正與細分割之演算法流程。而在實作上,本系統使用德州儀器公司(Texas Instruments, TI)所生產的數位訊號處理器TMS320F28335做為核心以實現類比編碼器之細分割演算法,最後可將類比編碼器之解析度提升至原本的千倍,同時以細分割後之位置回授控制馬達也能夠正確地工作。
SUMMARY
The aim of this thesis is to improve the resolution of incremental analog encoders. In practice, the outputs of analog encoders are not the quadrature sinusoidal waves, in which there always are the mean offsets, phase offsets, and amplitude difference. To solve these problems, the correction coefficients are introduced. These coefficients can be obtained by the least-squares method to remove distortion of encoder outputs. Furthermore, MATLAB / Simulink are used to simulate the algorithm of signal calibration and subdivision algorithm to improve the resolution of analog encoders. In experiments, the algorithms are implemented on a digital signals processor (TMS320F28335) from Texas Instruments. Finally, through a motor driver, the motor can be controlled by using the improvement of analog encoder’s resolution.
Keywords: analog encoder; calibration of quadrature encoder signals; subdivision algorithm
INTRODUCTION
For better control, the motor needs a high resolution encoder when performing position control. However, the higher the resolution of an encoder, the higher the price it will cost. How to improve the resolution of an encoder with lower cost is the goal of this research. Encoders have different types and different output signals. There are digital encoders and analog encoders. Instead of using a high resolution encoder, the analog encoder with low resolution can be improved by some methods, for examples using the additional external circuit or algorithms. The aim of this thesis is to improve the resolution of any incremental analog encoders using the subdivision algorithm. Through MATLAB, the subdivision algorithm is tested to verify the improvement of resolution of analog encoders. In experiment, the subdivision codes are implemented and tested on a motor driver to obtain and process the actual encoder signals.
MATERIALS AND METHODS
In experiments, the algorithm is implemented on a digital signal processor (TMS320F28335) in the motor driver in which an incremental analog encoder is used as the input feedback. The motor driver can acquire the incremental analog encoder output signals and digital encoder output signals at the same time. The resolution of incremental analog encoder is 0.05 mm/count, while the resolution of incremental digital encoder is 0.5 . Both of them are put on a linear motor, so that the motor driver can obtain these signals simultaneously. The output signals from analog encoder always have some distortions. Thus, the first priority is to perform calibration of the analog encoder outputs. By collecting the encoder outputs data, the calibration coefficients can be obtained by the least-squares method, and then, the quadrature sinusoidal wave can be calculated by using the encoder output signals and the coefficients. After calibration, the subdivided angles can be obtained by performing arctangent processing. By combining these angles and the original position data (QEP), the position of the motor can be acquired accurately. In other words, the resolution of analog encoder becomes higher.
RESULTS AND DISCUSSION
Before calibration, phase A and phase B of analog encoders output signals are put together on the x-axis and y-axis as shown in Figure 1.
Then, after performing the algorithm of calibration, the encoder’s output signals are put together on the x-axis and y-axis as shown in Figure 2. It is shown in Figure 2 that the phase A and phase B data become more accurate as a perfect circle as it is compared to the results shown in Figure 1.
In these results, the original resolution of the analog encoder is 0.05 mm, and then, after subdivision, the resolution of analog encoder can be raised to 100 times. In other words, the resolution of analog encoder becomes 0.5 /count. Considering one period of a sinusoidal wave is 0.2 mm, the linear motor is controlled such that the movement of the analog encoder reaches 0.2 mm. Then, the output from analog encoder and digital encoder are recorded every 0.01 mm. The errors are obtained by comparing the analog encoder’s outputs and digital encoder’s outputs as shown in Figure 3.
In Figure 3, it is shown that the accuracy is about 4.5 with 2 repeatability. Let the resolution of the analog encoder raise to 1000 times. In other words, the resolution of the analog encoder becomes to 0.05 /count. Then, the outputs from the analog encoder and laser interferometer are recorded every 0.01 mm. The errors are obtained by comparing the analog encoder’s outputs and laser interferometer’s outputs as shown in Figure 4.
Finally, in Figure 4, the accuracy of position is 3.7 with repeatability 1.9 .
CONCLUSION
In this thesis, the output signals of an analog encoder is calibrated by using the least-squares method. By controlling the motor, the outputs of an analog encoder and calibration coefficients can be obtained. After calibration, there are two quadrature sinusoids, namely, phase A and phase B. By performing arctangent calculation from phase A and B, we can get the subdivided angle of the encoder. By combining the subdivided angle and original position (QEP) of the analog encoder, the position of motor can be obtained with high resolution. Thus, the resolution of the analog encoder can be improved higher than before.
參考文獻
[1] K. K. Tan, T. H. Lee, and H. X. Zhou, “New Interpolation Method for Quadrature Encoder Signals”, IEEE Transactions on Instrumentation and Measurement, Vol. 51, No. 5, pp.1073-1079, Oct. 2002.
[2] Schmitt trigger, Wikipedia, https://en.wikipedia.org/wiki/Schmitt_trigger
[3] iC-TW4 8-Bit Sin/Cos Interpolator with Automatic Offset Correction Datasheet, iC-Haus, 2008
[4] 林勇全,「高倍頻編碼器之設計」,南台科技大學電機工程研究所碩士論文碩士論文,民國九十五年七月。
[5] H. Rieder, M. Schwaiger, RSF. Elektronik, and GmbH. Tarsdorf, Austria, “Method of Electronically Correcting Position Errors in an Incremental Measuring System and Measuting System for Carrying out the Method,” United States Patent: 5021650, June, 1991.
[6] T. Emura, L. Wang, and A. Arakawa, “A High-Resolution Interpolator for Incremental Encoders By Two-Phase Type PLL Method” Proceedings of the International Conference on Industrial Electronics, Control, and Instrumentation, Vol. 3, pp. 1540-1545, 1993.
[7] N. Hagiwara, Y. Suzuki, and H. Murase, “A Method of Improving the Resolution and Accuracy of Rotary Encoders using a Code compensation Technique,” IEEE Transactions on Instrumentation and Measurement, Vol. 41, No. 1, pp. 98–101, Feb. 1992.
[8] 藍啟峰,「以FPGA 發展電子細分割及其於光柵干涉儀之應用」,國立台灣大學-機械工程研究所碩士論文,民國九十年六月。
[9] Linear regression, wolfram mathworld, http://mathworld.wolfram.com/LinearRegression.html
[10] Least squares fitting-polynomial , wolfram mathworld, http://mathworld.wolfram.com/LeastSquaresFittingPolynomial.html
[11] Multiple-angle formulas, wolfram mathworld, http://mathworld.wolfram.com/Multiple-AngleFormulas.html
[12] 蕭景隆,「線性馬達驅動控制系統之設計與實現」,國立成功大學工程科學系碩士論文,民國一百零三年一月。
[13] iC-TW8 16-Bit Sin/Cos Interpolator with Automatic Calibration Datasheet, iC-Haus, 2012.
[14] RENISHAW, XL-80 laser measurement system, http://www.renishaw.com.tw/tw/xl-80-laser-measurement-system--8267
[15] Gauss-Jordan elimination, wolfram mathworld, http://mathworld.wolfram.com/Gauss-JordanElimination.html
[16] Moving average filter, Wikipedia, https://en.wikipedia.org/wiki/Moving_average
[17] S.W. Smith, The Scientist and Engineer's Guide to Digital Signal Processing, California Technical Publishing, San Diego, CA, 1997.
[18] Median filter, Wikipedia, https://en.wikipedia.org/wiki/Median_filter
[19] Texas Instruments TMS320F2812 Digital Signal Processor Datasheet.
校內:2021-08-31公開