TWI664823B - Instant correction method for encoder and system thereof - Google Patents

Instant correction method for encoder and system thereof Download PDF

Info

Publication number
TWI664823B
TWI664823B TW108100363A TW108100363A TWI664823B TW I664823 B TWI664823 B TW I664823B TW 108100363 A TW108100363 A TW 108100363A TW 108100363 A TW108100363 A TW 108100363A TW I664823 B TWI664823 B TW I664823B
Authority
TW
Taiwan
Prior art keywords
positioning
positioning positions
sine wave
curve
calculation group
Prior art date
Application number
TW108100363A
Other languages
Chinese (zh)
Other versions
TW202027429A (en
Inventor
蔡清雄
焦郁華
林正平
Original Assignee
台達電子工業股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 台達電子工業股份有限公司 filed Critical 台達電子工業股份有限公司
Priority to TW108100363A priority Critical patent/TWI664823B/en
Application granted granted Critical
Publication of TWI664823B publication Critical patent/TWI664823B/en
Priority to JP2019198999A priority patent/JP6788721B2/en
Publication of TW202027429A publication Critical patent/TW202027429A/en

Links

Abstract

一種用於編碼器之即時校正方法,包括下列步驟。感測待測元件之運動,以取得第一弦波信號與第二弦波信號,其中第一弦波信號與第二弦波信號的相位相差90度。對第一弦波信號與第二弦波信號進行取樣,以取得N個第一數位信號值與N個第二數位信號值。依據N個第一數位信號值與N個第二數位信號值,產生N個定位位置。將N個定位位置加入計算群組中。對計算群組中之定位位置進行迴歸分析,以取得迴歸曲線。依據回歸曲線,預測第N+1個預測位置。依據理想位置曲線,在第N+1個預測位置的時間點,取得待測元件之理想位置,並利用第N+1個預測位置與理想位置之間的誤差值對待測元件進行校正。 An instant calibration method for an encoder includes the following steps. The movement of the device under test is sensed to obtain a first sine wave signal and a second sine wave signal, wherein the phase of the first sine wave signal and the second sine wave signal are 90 degrees out of phase. Sampling the first sine wave signal and the second sine wave signal to obtain N first digital signal values and N second digital signal values. According to the N first digital signal values and the N second digital signal values, N positioning positions are generated. Add N positioning positions to the calculation group. Regression analysis is performed on the positioning positions in the calculation group to obtain a regression curve. According to the regression curve, the N + 1th predicted position is predicted. According to the ideal position curve, at the time point of the N + 1th predicted position, the ideal position of the device under test is obtained, and the error value between the N + 1th predicted position and the ideal position is used to correct the device to be tested.

Description

用於編碼器之即時校正方法及其系統 Instant correction method and system for encoder

本發明有關於一種用於編碼器之即時校正方法及其系統。 The invention relates to an instant correction method and system for an encoder.

編碼器主要用以提供例如伺服馬達之轉子(動子)之精確位置,以滿足伺服驅動裝置穩定控速與精準定位之需求。然而,機構於組裝時所造成的誤差將會影響編碼器之位置輸出之精確度。另外,在持續使用一段時間後,由於機構等相對位置改變或者受到外在環境污染的影響,進而使編碼器位置輸出的準確度變差。因此,如何即時地計算編碼器位置輸出的誤差並修正位置輸出為目前所需解決之問題。 The encoder is mainly used to provide the precise position of the rotor (mover) of the servo motor to meet the requirements of stable speed control and precise positioning of the servo drive device. However, the error caused by the mechanism during assembly will affect the accuracy of the position output of the encoder. In addition, after continuous use for a period of time, the accuracy of the encoder's position output deteriorates due to changes in the relative position of the mechanism or other external environmental pollution. Therefore, how to calculate the position error of the encoder and correct the position output in real time is a problem that needs to be solved at present.

為解決上述問題,本發明提供一種用於編碼器之即時校正方法,藉以提定位精確度及延長編碼器的使用壽命,以增加使用上的便利性。 In order to solve the above problems, the present invention provides an instant correction method for an encoder, so as to improve positioning accuracy and extend the service life of the encoder, thereby increasing convenience in use.

本發明提供一種用於編碼器之即時校正方法,包括下列步驟。感測待測元件之運動,以取得第一弦波信號與第 二弦波信號,其中第一弦波信號與第二弦波信號的相位相差90度。對第一弦波信號與第二弦波信號進行取樣,以取得N個第一數位信號值與N個第二數位信號值。依據N個第一數位信號值與N個第二數位信號值,產生N個定位位置。將N個定位位置加入計算群組中。對計算群組中之定位位置進行迴歸分析,以取得迴歸曲線。依據回歸曲線,預測第N+1個預測位置。依據理想位置曲線,在第N+1個預測位置的時間點,取得待測元件之一理想位置,並利用第N+1個預測位置與理想位置之間的誤差值對待測元件進行校正。 The invention provides an instant correction method for an encoder, which includes the following steps. Sensing the motion of the DUT to obtain the first sine wave signal and the first A two-sine wave signal, where the phase of the first sine wave signal and the second sine wave signal differ by 90 degrees. Sampling the first sine wave signal and the second sine wave signal to obtain N first digital signal values and N second digital signal values. According to the N first digital signal values and the N second digital signal values, N positioning positions are generated. Add N positioning positions to the calculation group. Regression analysis is performed on the positioning positions in the calculation group to obtain a regression curve. According to the regression curve, the N + 1th predicted position is predicted. According to the ideal position curve, at the time point of the N + 1th predicted position, an ideal position of the device under test is obtained, and an error value between the N + 1th predicted position and the ideal position is used to correct the device to be tested.

本發明另一實施例提供一種用於編碼器之即時校正系統,包括感測單元、取樣單元以及處理單元。感測單元用以感測待測元件之運動,取得第一弦波信號與第二弦波信號,其中第一弦波信號與第二弦波信號的相位相差90度。取樣單元對第一弦波信號與第二弦波信號進行取樣,以取得N個第一數位信號值與N個第二數位信號值。處理單元依據N個第一數位信號值與N個第二數位信號值,產生N個定位位置,將N個定位位置加入計算群組中,對計算群組中之定位位置進行迴歸分析,以取得迴歸曲線,依據回歸曲線,預測第N+1個預測位置,且依據理想位置曲線,在第N+1個預測位置的時間點,取得待測元件之理想位置,並利用第N+1個預測位置與理想位置之間的誤差值對待測元件進行校正。 Another embodiment of the present invention provides an instant correction system for an encoder, including a sensing unit, a sampling unit, and a processing unit. The sensing unit is used for sensing the movement of the device under test to obtain a first sine wave signal and a second sine wave signal, wherein the phase of the first sine wave signal and the second sine wave signal are 90 degrees out of phase. The sampling unit samples the first sine wave signal and the second sine wave signal to obtain N first digital signal values and N second digital signal values. The processing unit generates N positioning positions according to the N first digital signal values and the N second digital signal values, adds the N positioning positions to the calculation group, and performs regression analysis on the positioning positions in the calculation group to obtain Regression curve, predict the N + 1th predicted position based on the regression curve, and obtain the ideal position of the component to be tested at the time point of the N + 1th predicted position based on the ideal position curve, and use the N + 1th prediction The error value between the position and the ideal position is corrected for the component under test.

本發明實施例所揭露之用於編碼器之即時校正方法及其系統,透過取得對應待測元件之N個定位位置,並對N個定位位置進行回歸分析,以取得回歸曲線,進而預測第N+1 個預測位置,再依據理想位置曲線,於對應第N+1個預測位置的時間點,取得待測元件之理想位置,並利用第N+1個預測位置與對應之理想位置之間的誤差值對待測元件進行校正。如此一來,可以有效地讓編碼器之定位位置精確度維持在一定範圍且也可延長編碼器的使用壽命,以增加使用上的便利性。 The real-time correction method and system for an encoder disclosed in the embodiment of the present invention obtains a regression curve by obtaining N positioning positions corresponding to the component to be tested, and performing regression analysis on the N positioning positions, thereby predicting the Nth position. +1 Based on the ideal position curve, at the time point corresponding to the N + 1th predicted position, obtain the ideal position of the component under test, and use the error value between the N + 1th predicted position and the corresponding ideal position Correct the component to be tested. In this way, the accuracy of the positioning position of the encoder can be effectively maintained within a certain range, and the service life of the encoder can be extended, so as to increase convenience in use.

100‧‧‧用於編碼器之即時校正系統 100‧‧‧ Real-time correction system for encoder

110‧‧‧感測單元 110‧‧‧sensing unit

120‧‧‧取樣單元 120‧‧‧Sampling unit

130‧‧‧處理單元 130‧‧‧processing unit

131‧‧‧計算單元 131‧‧‧ Computing Unit

132‧‧‧計算單元 132‧‧‧ Computing Unit

133‧‧‧校正單元 133‧‧‧correction unit

134‧‧‧濾波器 134‧‧‧Filter

210‧‧‧待測元件 210‧‧‧DUT

220‧‧‧驅動單元 220‧‧‧Drive unit

S502~S514、S602、S604、S606‧‧‧步驟 S502 ~ S514, S602, S604, S606‧‧‧ steps

第1圖為依據本發明一實施例所述之用於編碼器之即時校正系統之示意圖。 FIG. 1 is a schematic diagram of an instant correction system for an encoder according to an embodiment of the present invention.

第2A圖為依據本發明一實施例所述之編碼器的理想位置輸出之示意圖。 FIG. 2A is a schematic diagram of an ideal position output of an encoder according to an embodiment of the present invention.

第2B圖為依據本發明一實施例所述之編碼器的實際位置輸出之示意圖。 FIG. 2B is a schematic diagram of the actual position output of the encoder according to an embodiment of the present invention.

第3圖為依據本發明一實施例所述之定位位置、預測位置與回歸曲線之對應關係的之示意圖。 FIG. 3 is a schematic diagram of a correspondence relationship between a positioning position, a predicted position, and a regression curve according to an embodiment of the present invention.

第4圖為依據本發明一實施例所述之經校正後的位置信號以及未經校正的位置信號之比較示意圖。 FIG. 4 is a comparison diagram of a corrected position signal and an uncorrected position signal according to an embodiment of the present invention.

第5圖為依據本發明一實施例所述之用於編碼器之即時校正方法之流程圖。 FIG. 5 is a flowchart of an instant correction method for an encoder according to an embodiment of the present invention.

第6圖為依據本發明另一實施例所述之用於編碼器之即時校正方法之流程圖。 FIG. 6 is a flowchart of an instant correction method for an encoder according to another embodiment of the present invention.

有關本發明之裝置以及方法適用之其他範圍將於 接下來所提供之詳述中清楚易見。必須了解的是下列之詳述以及具體之實施例,當提出有關用於編碼器之即時校正系統及其方法之示範實施例時,僅作為描述之目的以及並非用以限制本發明之範圍。 Other areas of applicability of the device and method of the present invention will be The details provided below are clear and easy to see. It must be understood that the following detailed description and specific embodiments, when presenting an exemplary embodiment of an instant correction system and method for an encoder, are only for the purpose of description and are not intended to limit the scope of the invention.

第1圖顯示本發明一實施例所述之用於編碼器之即時校正系統之示意圖。本實施例之用於編碼器之即時校正系統100適用於校正待測元件210,且待測元件210例如馬達等的各種不同待測元件。請參考第1圖,用於編碼器之即時校正系統100包括感測單元110、取樣單元120、處理單元130與儲存單元140。 FIG. 1 shows a schematic diagram of an instant correction system for an encoder according to an embodiment of the present invention. The instant calibration system 100 for an encoder in this embodiment is suitable for calibrating the DUT 210, and the DUT 210, such as a motor, is a variety of different DUTs. Please refer to FIG. 1. The instant calibration system 100 for an encoder includes a sensing unit 110, a sampling unit 120, a processing unit 130, and a storage unit 140.

感測單元110連接待測元件150,用以感測待測元件210之運動,取得第一弦波信號與一第二弦波信號。在本實施例中,第一弦波信號與第二弦波信號的相位相差90度。並且,第一弦波信號例如為正弦(sin)信號,而第二弦波信號例如為餘弦(cos)信號。另外,第一弦波信號與一第二弦波信號可以於待測元件210開始運作時取得,或是於待測元件210運作一段時間後取得。 The sensing unit 110 is connected to the device under test 150 to sense the movement of the device under test 210 to obtain a first sine wave signal and a second sine wave signal. In this embodiment, the phase of the first sine wave signal and the second sine wave signal differ by 90 degrees. The first sine wave signal is, for example, a sine signal, and the second sine wave signal is, for example, a cosine (cos) signal. In addition, the first sine wave signal and a second sine wave signal may be obtained when the DUT 210 starts to operate, or after the DUT 210 is operated for a period of time.

取樣單元120連接感測單元110,對第一弦波信號與第二弦波信號進行取樣,以取得N個第一數位信號值與N個第二數位信號值,其中N為大於1的正整數。在本實施例中,取樣單元120例如為高速訊號取樣器。 The sampling unit 120 is connected to the sensing unit 110 and samples the first sine wave signal and the second sine wave signal to obtain N first digital signal values and N second digital signal values, where N is a positive integer greater than 1. . In this embodiment, the sampling unit 120 is, for example, a high-speed signal sampler.

處理單元130例如為數位信號處理器(digital signal processor,DSP)或者現場可程式化邏輯閘陣列(Field Programmable Gate Array,FPGA)。處理單元130連接取樣單元 120,依據N個第一數位信號值與N個第二數位信號值,產生N個定位位置,其中N為大於1的正整數。在本實施例中,處理單元130可以透過座標旋轉數位計算器(Coordinate Rotation Digital Computer,CORDIC)演算法或反三角函數演算法,依據N個第一數位信號值與N個第二數位信號值,產生N個定位位置。接著,處理單元130將N個定位位置加入計算群組中,並對計算群組中之定位位置進行迴歸分析,以取得迴歸曲線。 The processing unit 130 is, for example, a digital signal processor (DSP) or a Field Programmable Gate Array (FPGA). The processing unit 130 is connected to the sampling unit 120: Generate N positioning positions according to the N first digital signal values and the N second digital signal values, where N is a positive integer greater than 1. In this embodiment, the processing unit 130 may use a Coordinate Rotation Digital Computer (CORDIC) algorithm or an inverse trigonometric function algorithm according to the N first digital signal values and the N second digital signal values. Generate N positioning positions. Next, the processing unit 130 adds N positioning positions to the calculation group, and performs regression analysis on the positioning positions in the calculation group to obtain a regression curve.

之後,處理單元130依據上述回歸曲線,預測第N+1個預測位置。也就是說,第N+1個預測位置對應於下一取樣時間點之預測位置。接著,處理單元130依據理想位置曲線,在第N+1個預測位置的時間點,取得待測元件210之理想位置。在本實施例中,理想位置曲線可以是依據計算群組中之N個定位位置之至少一部分產生。 After that, the processing unit 130 predicts the N + 1th prediction position according to the regression curve. That is, the N + 1th prediction position corresponds to the prediction position at the next sampling time point. Next, the processing unit 130 obtains the ideal position of the device under test 210 at the time point of the N + 1th predicted position according to the ideal position curve. In this embodiment, the ideal position curve may be generated according to at least a part of the N positioning positions in the calculation group.

接著,處理單元130可以利用第N+1個預測位置與上述理想位置之間的誤差值,對待測元件210進行校正。舉例來說,處理單元130可以依據上述誤差值,產生輸出驅動信號給驅動單元220。如此,驅動單元220可依據上述驅動信號,對待測元件210進行校正,以提高編碼器之定位精確度。 Next, the processing unit 130 may use the error value between the N + 1th predicted position and the above-mentioned ideal position to correct the component to be tested 210. For example, the processing unit 130 may generate an output driving signal to the driving unit 220 according to the above error value. In this way, the driving unit 220 can correct the component to be tested 210 according to the driving signal described above, so as to improve the positioning accuracy of the encoder.

進一步來說,在利用上述誤差值對待測元件210進行校正後,處理單元130更可以取得第N+1個定位位置。接著,處理單元130可以將計算群組中之第1個定位位置刪除,且將第N+1個定位位置加入計算群組中,以更新計算群組。此時,計算群組包括第2個定位位置至第N+1個定位位置。 Further, after the component to be tested 210 is corrected by using the above error value, the processing unit 130 can further obtain an N + 1th positioning position. Then, the processing unit 130 may delete the first positioning position in the calculation group, and add the N + 1th positioning position to the calculation group to update the calculation group. At this time, the calculation group includes the second positioning position to the N + 1th positioning position.

之後,處理單元130會重新對計算群組中之定位位 置(即第2個定位位置至第N+1個定位位置)進行迴歸分析,以取得迴歸曲線,並依據此回歸曲線,預測第N+1個預測位置(此時,第N+1個預測位置為第N+2個預測位置)。接著,處理單元130會依據理想位置曲線,在第N+1個預測位置(即第N+2個預測位置)的時間點,取得待測元件210之理想位置。之後,處理單元130可以利用第N+1個預測位置(即第N+2個預測位置)與理想位置之間的誤差值對待測元件210進行校正。 After that, the processing unit 130 re-positions the positioning bits in the calculation group. Position (that is, the second positioning position to the N + 1th positioning position) for regression analysis to obtain a regression curve, and based on this regression curve, predict the N + 1th prediction position (in this case, the N + 1th prediction position Position is the N + 2th predicted position). Then, the processing unit 130 obtains the ideal position of the device under test 210 at the time point of the N + 1th prediction position (ie, the Nth + 2 prediction position) according to the ideal position curve. After that, the processing unit 130 may use the error value between the N + 1th prediction position (ie, the N + 2th prediction position) and the ideal position to correct the component to be tested 210.

接著,處理單元130更可以取得第N+1個定位位置(此時,第N+1個定位位置為第N+2個定位位置)。接著,處理單元130可以將計算群組中之第1個定位位置刪除,且將第N+1個定位位置加入計算群組中,以更新計算群組。此時,計算群組包括第3個定位位置至第N+2個定位位置。 Then, the processing unit 130 can further obtain the N + 1th positioning position (in this case, the N + 1th positioning position is the N + 2th positioning position). Then, the processing unit 130 may delete the first positioning position in the calculation group, and add the N + 1th positioning position to the calculation group to update the calculation group. At this time, the calculation group includes the third positioning position to the N + 2th positioning position.

之後,處理單元130會重新對計算群組中之定位位置(即第3個定位位置至第N+2個定位位置)進行迴歸分析,以取得迴歸曲線,並依據此回歸曲線,預測第N+1個預測位置(此時,第N+1個預測位置為第N+3個預測位置)。接著,處理單元130會依據理想位置曲線,在第N+1個預測位置(即第N+3個預測位置)的時間點,取得待測元件210之理想位置。之後,處理單元130可以利用第N+1個預測位置(即第N+3個預測位置)與理想位置之間的誤差值對待測元件210進行校正。其餘則類推。 After that, the processing unit 130 performs a regression analysis on the positioning positions in the calculation group (ie, the third positioning position to the N + 2 positioning position) to obtain a regression curve, and predicts the N + th position based on the regression curve. 1 prediction position (in this case, the N + 1th prediction position is the N + 3th prediction position). Then, the processing unit 130 obtains the ideal position of the device under test 210 at the time point of the N + 1th prediction position (ie, the Nth + 3th prediction position) according to the ideal position curve. After that, the processing unit 130 may use the error value between the N + 1th prediction position (ie, the N + 3th prediction position) and the ideal position to correct the component to be tested 210. The rest is analogous.

儲存單元140可以為非揮發性記憶體。儲存單元140用以儲存對應於如上所述之N個定位位置、取得本發明各種參數值所需的算式以及用以校正待測元件210之定位位置之誤差值及誤差表。 The storage unit 140 may be a non-volatile memory. The storage unit 140 is used to store the N positions corresponding to the above, the calculation formulas required to obtain various parameter values of the present invention, and the error values and error tables used to correct the positioning positions of the component 210 to be tested.

進一步來說,處理單元130包括計算單元131、132與校正單元133。計算單元131連接取樣單元120,依據N個第一數位信號值與N個第二數位信號值,產生N個定位位置,並將N個定位位置加入計算群組。其中,計算單元131透過座標旋轉數位計算器演算法或反三角函數演算法,依據N個第一數位信號值與N個第二數位信號值,產生N個定位位置。計算單元132連接計算單元131,接收上述計算群組,對計算群組中之定位位置進行迴歸分析,以取得迴歸曲線。 Further, the processing unit 130 includes calculation units 131 and 132 and a correction unit 133. The calculation unit 131 is connected to the sampling unit 120, and generates N positioning positions based on the N first digital signal values and the N second digital signal values, and adds the N positioning positions to the calculation group. The calculation unit 131 generates N positioning positions based on the N first digital signal values and the N second digital signal values through a coordinate rotation digital calculator algorithm or an inverse trigonometric function algorithm. The calculation unit 132 is connected to the calculation unit 131, receives the calculation group, and performs regression analysis on the positioning positions in the calculation group to obtain a regression curve.

校正單元133連接計算單元132與儲存單元140,依據回歸曲線,預測第N+1個預測位置,且依據理想位置曲線,在第N+1個預測位置的時間點,取得待測元件210之理想位置,並利用第N+1個預測位置與理想位置之間的誤差值對待測元件210進行校正。接著,校正單元133也會將第N+1個預測位置與理想位置之間的誤差值儲存至儲存單元140中,以更新儲存單元140所儲存之資料,例如誤差值及誤差表。 The correction unit 133 is connected to the calculation unit 132 and the storage unit 140, and predicts the N + 1 prediction position based on the regression curve, and according to the ideal position curve, obtains the ideal of the DUT 210 at the time point of the N + 1 prediction position. Position, and use the error value between the N + 1th predicted position and the ideal position to correct the component to be tested 210. Then, the correction unit 133 also stores the error value between the N + 1th predicted position and the ideal position in the storage unit 140 to update the data stored in the storage unit 140, such as the error value and the error table.

進一步來說,處理單元130更包括濾波器134。濾波器134連接於計算單元131與計算單元132之間,用以對N個定位位置進行濾波處理,以濾除N個定位位置的雜訊,並將濾波後的N個定位位置輸出至計算模組132。如此一來,可以避免計算群組132所產生之回歸曲線被雜訊干擾而造成計算誤差過大的影響。在本實施例中,濾波器134可以是低通濾波器(Low Pass Filter,LPF)。 Further, the processing unit 130 further includes a filter 134. The filter 134 is connected between the calculation unit 131 and the calculation unit 132, and is used for filtering the N positioning positions to filter out the noise of the N positioning positions and output the filtered N positioning positions to the computing module. Group 132. In this way, the regression curve generated by the calculation group 132 can be avoided from being disturbed by noise and causing an excessively large calculation error. In this embodiment, the filter 134 may be a low-pass filter (Low Pass Filter, LPF).

第2A圖為依據本發明一實施例所述之編碼器的理想定位位置輸出之示意圖,而第2B圖為依據本發明一實施例所 述之編碼器的實際定位位置輸出之示意圖。當待測元件210(如馬達)以定速運轉時,由於待測元件210之機構慣性,因此待測馬達210在短時間內的位置變化應呈現線性變化,如第2A圖所示。 FIG. 2A is a schematic diagram of an ideal positioning position output of an encoder according to an embodiment of the present invention, and FIG. 2B is a diagram of an ideal positioning position output according to an embodiment of the present invention. The schematic diagram of the actual positioning position output of the encoder is described. When the DUT 210 (such as a motor) is running at a constant speed, the position change of the DUT 210 in a short time should show a linear change due to the inertia of the mechanism of the DUT 210, as shown in FIG. 2A.

然而,如前所述,由於編碼器與待測元件210組裝時所造成的誤差或者受到外在環境的影響,編碼器的實際定位位置輸出會有誤差,如第2B圖所示。為了提高編碼器之定位位置輸出精確度,本發明之實施例將會對編碼器的輸出位置進行預測,並依據一理想位置曲線取得對預測位置與其對應之理想位置之間的誤差,對待測元件210進行校正,以改善定位精確度。 However, as mentioned above, due to the error caused when the encoder is assembled with the device under test 210 or the external environment, the actual positioning position output of the encoder will have errors, as shown in Figure 2B. In order to improve the positioning position output accuracy of the encoder, the embodiment of the present invention will predict the output position of the encoder, and obtain an error between the predicted position and the corresponding ideal position according to an ideal position curve, and the component to be tested 210 is corrected to improve positioning accuracy.

第3圖為依據本發明一實施例所述之定位位置、預測位置與回歸曲線之對應關係的示意圖。在本實施例中,N例如以18為例。如第3圖所示,“x”表示對應取樣時間T1~T18之定位位置、“o”表示定取樣時間點T19的預測位置。 FIG. 3 is a schematic diagram of a correspondence relationship between a positioning position, a predicted position, and a regression curve according to an embodiment of the present invention. In this embodiment, N is taken as an example of 18, for example. As shown in Fig. 3, "x" indicates the positioning position corresponding to the sampling time T1 to T18, and "o" indicates the predicted position at the fixed sampling time point T19.

請合併參考第1圖及第3圖。在本實施例中,在取得對應於取樣時間點T1~T18(即T1~TN)之18(即N)個定位位置後,處理單元130更將上述18(即N)個定位位置加入計算群組中。接著,處理單元130對計算群組中之18(即N)個定位位置進行迴歸分析,以取得對應於18(即N)個位置之多項式(如第3圖之回歸曲線301)。之後,處理單元130可以依據如上之回歸曲線301,預測對應於取樣時間點T19(即TN+1)之預測位置。 Please refer to Figure 1 and Figure 3 together. In this embodiment, after obtaining 18 (ie N) positioning positions corresponding to the sampling time points T1 to T18 (ie, T1 to TN), the processing unit 130 further adds the above 18 (ie N) positioning positions to the calculation group. In the group. Next, the processing unit 130 performs regression analysis on 18 (ie, N) positioning positions in the calculation group to obtain a polynomial corresponding to the 18 (ie, N) positions (such as the regression curve 301 in FIG. 3). After that, the processing unit 130 may predict the predicted position corresponding to the sampling time point T19 (ie, TN + 1) according to the regression curve 301 as described above.

在一實施例中,上述N個定位位置之取樣時間範圍至少大於第一弦波信號或者第二弦波信號之一循環週期。另外, 上述多項式之階次依據待測元件210(馬達)之運動狀態決定。舉例來說,當待測元件210之運轉為固定速度或者速度變動小於一既定範圍時,用以預測下一取樣時間點TN+1之定位位置的多項式可為一次多項式。 In one embodiment, the sampling time range of the N positioning positions is at least greater than one cycle of the first sine wave signal or the second sine wave signal. In addition, The order of the above polynomial is determined according to the movement state of the DUT 210 (motor). For example, when the operation of the DUT 210 is at a fixed speed or the speed variation is less than a predetermined range, the polynomial used to predict the positioning position of the next sampling time point TN + 1 may be a first-order polynomial.

此外,當待測元件210之運轉有加速度的情況產生或者待測元件210於每個取樣時間點之間之定位位置差異較大時,處理單元130所使用之預測取樣時間點TN+1之定位位置的多項式會採用二次多項式。在本實施例中,上述多項式之係數可透過最小平方演算法取得。也就是說,處理單元130可以透過最小平方演算法對計算群組中之定位位置進行回歸分析,以取得迴歸曲線。 In addition, when the acceleration of the operation of the DUT 210 occurs or the positioning position of the DUT 210 at each sampling time point is significantly different, the positioning of the predicted sampling time point TN + 1 used by the processing unit 130 The polynomial of the position is a quadratic polynomial. In this embodiment, the coefficient of the above polynomial can be obtained by a least squares algorithm. That is, the processing unit 130 may perform a regression analysis on the positioning positions in the calculation group through a least square algorithm to obtain a regression curve.

舉例來說,由於第3圖之每兩個取樣時間點所對應之定位位置變化較不固定,因此處理裝置130所採用的多項式為二次多項式,用以取得迴歸曲線。在本實施例中,迴歸曲線301之取樣時間範圍可為T1~T18(即TN),或者只取對應於一個循環週期之既定時間範圍。接著,於取得迴歸曲線301後,處理單元130更可依據計算群組中之18(即N)個定位位置之至少一部分,以取得理想位置曲線。 For example, since the change of the positioning position corresponding to each two sampling time points in FIG. 3 is not fixed, the polynomial used by the processing device 130 is a quadratic polynomial to obtain a regression curve. In this embodiment, the sampling time range of the regression curve 301 may be T1 ~ T18 (ie, TN), or only a predetermined time range corresponding to one cycle period. Then, after the regression curve 301 is obtained, the processing unit 130 may further obtain at least a part of the 18 (ie, N) positioning positions in the calculation group to obtain an ideal position curve.

舉例來說,以取樣時間點T1~T6對應之定位位置(即計算群組之N個定位位置之至少一部分)為例。處理單元130可分別計算對應於取樣時間點T1~T2、T2~T3、T3~T4、T4~T5、T5~T6之間之定位位置的變化,再將所取得之定位位置的變化除以5個時間間隔,以計算每一個時間間隔之待測元件210所移動的平均距離。其中,上述5個時間間隔為取樣時間點T1~T6 之取樣時間的間隔。接著,處理單元130可以依據上述之平均距離,以取得理想位置曲線。在一實施例中,在待測元件210運作於相同的環境條件下,例如於對應於理想位置曲線之取樣時間內,待測元件210之轉速維持不變。 For example, taking the positioning positions corresponding to the sampling time points T1 to T6 (that is, calculating at least a part of the N positioning positions of the group) as an example. The processing unit 130 may calculate changes in the positioning positions corresponding to the sampling time points T1 to T2, T2 to T3, T3 to T4, T4 to T5, and T5 to T6 respectively, and then divide the obtained positioning positions by 5 Time intervals to calculate the average distance moved by the device under test 210 in each time interval. Among them, the above 5 time intervals are sampling time points T1 to T6 The sampling time interval. Then, the processing unit 130 may obtain an ideal position curve according to the above average distance. In one embodiment, the speed of the device under test 210 remains unchanged when the device under test 210 operates under the same environmental conditions, such as a sampling time corresponding to an ideal position curve.

此外,在另一實施例中,理想位置曲線亦可為使用者自定義之方程式來產生,亦即理想位置曲線與待測元件210之運轉狀態無直接的關聯。接著,處理單元130可以依據理想位置曲線,以在對應於第19(即N+1)個預測位置的取樣時間點T19(TN+1)時,取得取樣時間點T19(TN+1)所對應之待測元件210的理想位置。 In addition, in another embodiment, the ideal position curve may be generated by a user-defined equation, that is, the ideal position curve is not directly related to the operating state of the device under test 210. Then, the processing unit 130 may obtain the corresponding sampling time point T19 (TN + 1) at the sampling time point T19 (TN + 1) corresponding to the 19th (ie, N + 1) predicted position according to the ideal position curve. The ideal location of the device under test 210.

接著,處理單元130依據對應於取樣時間點T19(TN+1)之第19(N+1)個預測位置(即第3圖所示之“o”),並將第19(N+1)個預測位置與對應之理想位置相減,以得到對應的誤差值。 Next, the processing unit 130 performs the 19th (N + 1) prediction based on the 19th (N + 1) th prediction position corresponding to the sampling time point T19 (TN + 1) (ie, "o" shown in FIG. 3). Each predicted position is subtracted from the corresponding ideal position to obtain the corresponding error value.

之後,處理單元130可以利用此誤差值對待測元件210進行校正。舉例來說,處理單元130可以依據此誤差值,輸出驅動信號至驅動單元220,使得驅動單元220可依據對應於誤差值之驅動信號,對待測元件210的運轉速度進行校正,以提高定位精確度。 After that, the processing unit 130 can use this error value to correct the component to be tested 210. For example, the processing unit 130 can output a driving signal to the driving unit 220 according to the error value, so that the driving unit 220 can correct the operating speed of the device to be tested 210 according to the driving signal corresponding to the error value to improve the positioning accuracy. .

在處理單元130利用所計算之誤差值對待測元件210進行校正後,取樣單元120更可以取樣對應於取樣時間點T19(TN+1)之第19(N+1)個定位位置,並將第19(N+1)個定位位置提供給處理單元130。接著,處理單元130可以將第19(N+1)個定位位置加入計算群組,並將計算群組中之第1個定位位置 刪除,以更新計算群組。此時,計算群組之N個定位位置包括第2至19個定位位置。其中,第2個定位位置作為計算群組中的第1個定位位置,而第19個定位位置可以作為計算群組中的第N個定位位置。 After the processing unit 130 corrects the component to be tested 210 using the calculated error value, the sampling unit 120 may further sample the 19th (N + 1) th positioning position corresponding to the sampling time point T19 (TN + 1), and 19 (N + 1) positioning positions are provided to the processing unit 130. Then, the processing unit 130 may add the 19th (N + 1) th positioning position to the calculation group, and add the first positioning position in the calculation group. Delete to update the calculation group. At this time, the N positioning positions of the calculation group include the 2nd to 19th positioning positions. The second positioning position is used as the first positioning position in the calculation group, and the 19th positioning position is used as the Nth positioning position in the calculation group.

之後,處理單元130會重新依據計算群組之定位位置(即第2至19個定位位置)進行回歸分析,以取得回新的回歸曲線,並依據此回歸曲線,預測第20個預測位置。接著,處理單元130會依據理想位置曲線,在第20個預測位置的時間點,取得待測元件210之理想位置。之後,處理單元130可以利用第20個預測位置與對應之理想位置之間的誤差值對待測元件210進行校正。其餘則類推。另外,藉由持續重新取得回歸曲線、重新取得下一個預測位置、重新取得對應於下一個預測位置之時間點的理想位置,並依據下一個預測位置與對應之理想位置之間的誤差對待測元件210進行校正,使得待測元件210之實際運作狀況越接近理想狀態,以提升其運作之精確度。 After that, the processing unit 130 performs regression analysis again according to the positioning positions of the calculation group (ie, the 2nd to 19th positioning positions) to obtain a new regression curve, and predicts the 20th predicted position based on the regression curve. Next, the processing unit 130 obtains the ideal position of the device under test 210 at the time point of the 20th predicted position according to the ideal position curve. After that, the processing unit 130 may use the error value between the 20th predicted position and the corresponding ideal position to correct the component to be tested 210. The rest is analogous. In addition, by continuously reacquiring the regression curve, reacquiring the next predicted position, and reacquiring the ideal position at the time point corresponding to the next predicted position, and based on the error between the next predicted position and the corresponding ideal position, 210 performs calibration to make the actual operation status of the device under test 210 closer to the ideal state to improve the accuracy of its operation.

此外,在一實施例中,處理單元130亦可將依據取樣時間點T1~T18所對應之定位位置所求得之迴歸曲線301儲存於儲存單元140中,並將取樣時間點T1~T18所對應之定位位置與所對應理想位置曲線之理想位置相減,以取得對應之誤差值,並利用這些誤差值建立誤差表。接著,處理單元130可於待測元件210啟動後,依據事先所儲存之迴歸曲線301對預測下一個預測位置,或者直接依據誤差表中之誤差值對待測元件210進行校正,以減少運算時間。 In addition, in an embodiment, the processing unit 130 may also store the regression curve 301 obtained according to the positioning positions corresponding to the sampling time points T1 to T18 in the storage unit 140, and store the regression curves 301 corresponding to the sampling time points T1 to T18. The positioning position is subtracted from the ideal position of the corresponding ideal position curve to obtain corresponding error values, and an error table is established using these error values. Then, the processing unit 130 can predict the next predicted position according to the regression curve 301 stored in advance after the device under test 210 is activated, or directly correct the device under test 210 according to the error value in the error table to reduce the calculation time.

在本實施例中,處理單元130更在取得迴歸曲線 301前,透過濾波器134對對應取樣時間點T1~T18之18個定位位置進行濾波處理,以濾除定位位置所產生的雜訊,使得計算單元132所產生之迴歸曲線301不會受到雜訊的影響。舉例來說,如第3圖所示,取樣時間點T14所對應之定位位置相較於取樣時間點T13之定位位置跳動較大,因此透過濾波器134進行濾波處理,可以有效地消除取樣時間點T14所對應之定位位置的雜訊,將取樣時間點T14所對應之定位位置平滑化,使得對應如圖3所示之回歸曲線301不會受到雜訊的影響,以增加位置校正的精確度。 In this embodiment, the processing unit 130 is further obtaining a regression curve. Before 301, the 18 positioning positions corresponding to the sampling time points T1 to T18 are filtered by the filter 134 to filter out noise generated by the positioning positions, so that the regression curve 301 generated by the calculation unit 132 will not receive noise. Impact. For example, as shown in FIG. 3, the positioning position corresponding to the sampling time point T14 is larger than the positioning position of the sampling time point T13. Therefore, the filtering process through the filter 134 can effectively eliminate the sampling time point. The noise of the positioning position corresponding to T14 smoothes the positioning position corresponding to the sampling time point T14, so that the corresponding regression curve 301 shown in FIG. 3 is not affected by the noise, so as to increase the accuracy of position correction.

第4圖為依據本發明一實施例所述之經校正的位置信號以及未經校正的位置信號之比較示意圖。如第4圖中所示,未經校正的位置信號相較於經校正的位置信號其誤差波動較大,而經校正的位置信號則接近於理想狀態之有斜率的一直線。 FIG. 4 is a comparison diagram of a corrected position signal and an uncorrected position signal according to an embodiment of the present invention. As shown in Figure 4, the uncorrected position signal has larger error fluctuations than the corrected position signal, and the corrected position signal is close to the ideal straight line with a slope.

第5圖為依據本發明一實施例所述之用於編碼器之即時校正方法之流程圖。在步驟S502中,感測待測元件之運動,以取得第一弦波信號與第二弦波信號,其中第一弦波信號與第二弦波信號的相位相差90度。在步驟S504中,對第一弦波信號與第二弦波信號進行取樣,以取得N個第一數位信號值與N個第二數位信號值。 FIG. 5 is a flowchart of an instant correction method for an encoder according to an embodiment of the present invention. In step S502, the movement of the device under test is sensed to obtain a first sine wave signal and a second sine wave signal, wherein the phase of the first sine wave signal and the second sine wave signal are 90 degrees out of phase. In step S504, the first sine wave signal and the second sine wave signal are sampled to obtain N first digital signal values and N second digital signal values.

在步驟S506中,依據N個第一數位信號值與N個第二數位信號值,產生N個定位位置。在步驟S508中,將N個定位位置加入計算群組中。在步驟S510中,對計算群組中之定位位置進行迴歸分析,以取得迴歸曲線。在步驟S512中,依據回 歸曲線,預測第N+1個預測位置。在步驟S514中,依據理想位置曲線,在第N+1個預測位置的時間點,取得待測元件之理想位置,並利用第N+1個預測位置與理想位置之間的誤差值對待測元件進行校正。在本實施例中,理想位置曲線是依據計算群組中之定位位置之至少一部分產生。 In step S506, N positioning positions are generated according to the N first digital signal values and the N second digital signal values. In step S508, N positioning positions are added to the calculation group. In step S510, regression analysis is performed on the positioning positions in the calculation group to obtain a regression curve. In step S512, according to the back Return to the curve and predict the N + 1th predicted position. In step S514, according to the ideal position curve, the ideal position of the device under test is obtained at the time point of the N + 1th predicted position, and the error value between the N + 1 predicted position and the ideal position is used. Make corrections. In this embodiment, the ideal position curve is generated according to at least a part of the positioning positions in the calculation group.

第6圖為依據本發明一實施例所述之用於編碼器之即時校正方法之流程圖。在步驟S502中,感測待測元件之運動,以取得第一弦波信號與第二弦波信號,其中第一弦波信號與第二弦波信號的相位相差90度。在步驟S504中,對第一弦波信號與第二弦波信號進行取樣,以取得N個第一數位信號值與N個第二數位信號值。 FIG. 6 is a flowchart of an instant correction method for an encoder according to an embodiment of the present invention. In step S502, the movement of the device under test is sensed to obtain a first sine wave signal and a second sine wave signal, wherein the phase of the first sine wave signal and the second sine wave signal are 90 degrees out of phase. In step S504, the first sine wave signal and the second sine wave signal are sampled to obtain N first digital signal values and N second digital signal values.

在步驟S506中,依據N個第一數位信號值與N個第二數位信號值,產生N個定位位置。在步驟S508中,將N個定位位置加入計算群組中。在步驟S602中,對計算群組之定位位置進行濾波處理。在步驟S510中,對計算群組中之定位位置進行迴歸分析,以取得迴歸曲線。在步驟S512中,依據回歸曲線,預測第N+1個預測位置。在步驟S514中,依據理想位置曲線,在第N+1個預測位置的時間點,取得待測元件之理想位置,並利用第N+1個預測位置與理想位置之間的誤差值對待測元件進行校正。在本實施例中,理想位置曲線是依據計算群組中之定位位置之至少一部分產生。 In step S506, N positioning positions are generated according to the N first digital signal values and the N second digital signal values. In step S508, N positioning positions are added to the calculation group. In step S602, the positioning position of the calculation group is filtered. In step S510, regression analysis is performed on the positioning positions in the calculation group to obtain a regression curve. In step S512, the N + 1th prediction position is predicted according to the regression curve. In step S514, according to the ideal position curve, the ideal position of the device under test is obtained at the time point of the N + 1th predicted position, and the error value between the N + 1 predicted position and the ideal position is used. Make corrections. In this embodiment, the ideal position curve is generated according to at least a part of the positioning positions in the calculation group.

在步驟S604中,取得第N+1個定位位置。在步驟S606中,將計算群組中之第1個定位位置刪除以及將第N+1個定位位置加入計算群組中,以更新計算群組。接著,進入步驟S602 中,以對更新後的計算群組之定位位置進行濾波處理、重新取得迴歸曲線、重新預測第N+1個預測位置、重新取得對應預測第N+1個預測位置之時間點的理想位置,並持續對待測元件進行校正。 In step S604, the N + 1th positioning position is obtained. In step S606, the first positioning position in the calculation group is deleted and the N + 1th positioning position is added to the calculation group to update the calculation group. Then, it progresses to step S602 In order to filter the positioning positions of the updated calculation group, re-obtain the regression curve, re-predict the N + 1th predicted position, re-acquire the ideal position corresponding to the time point of the predicted N + 1th predicted position, And continue to make corrections to the component under test.

值得注意的是,第5圖及第6圖之步驟的順序僅用以作為說明之目的,不用於限制本發明實施例之步驟的順序,且上述步驟之順序可由使用者視其需求而改變。並且,在不脫離本發明之精神以及範圍內,可增加額外之步驟或者使用更少之步驟。 It is worth noting that the order of the steps in FIG. 5 and FIG. 6 is for illustrative purposes only, and is not intended to limit the order of the steps in the embodiment of the present invention, and the order of the above steps can be changed by the user according to his needs. In addition, without departing from the spirit and scope of the present invention, additional steps may be added or fewer steps may be used.

綜上所述,本發明實施例所揭露之用於編碼器之即時校正方法及其系統,透過取得對應待測元件之N個定位位置,並對N個定位位置進行回歸分析,以取得回歸曲線,進而預測第N+1個預測位置,再依據理想位置曲線,於對應第N+1個預測位置的時間點,取得待測元件之理想位置,並利用第N+1個預測位置與對應之理想位置之間的誤差值對待測元件進行校正。另外,本發明實施例可進一步取得第N+1個定位位置,以重新取得迴歸曲線、重新預測第N+1個預測位置、重新取得對應預測第N+1個預測位置之時間點的理想位置,並持續對待測元件進行校正。如此一來,可以有效地讓編碼器之定位位置精確度維持在一定範圍且也可延長編碼器的使用壽命,以增加使用上的便利性。 In summary, the real-time correction method and system for an encoder disclosed in the embodiments of the present invention obtain a regression curve by obtaining N positioning positions corresponding to the component under test and performing regression analysis on the N positioning positions. , And then predict the N + 1th predicted position, then according to the ideal position curve, at the time point corresponding to the N + 1th predicted position, obtain the ideal position of the component to be tested, and use the N + 1th predicted position and the corresponding The error value between the ideal positions is corrected for the component under test. In addition, the embodiment of the present invention can further obtain the N + 1th positioning position to reacquire the regression curve, re-predict the N + 1th predicted position, and reacquire the ideal position at the time point corresponding to the predicted N + 1th predicted position. And continue to make corrections to the component under test. In this way, the accuracy of the positioning position of the encoder can be effectively maintained within a certain range, and the service life of the encoder can be extended, so as to increase convenience in use.

本發明雖以實施例揭露如上,然其並非用以限定本發明的範圍,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可做些許的更動與潤飾,因此本 發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention is disclosed as above with the examples, it is not intended to limit the scope of the present invention. Any person with ordinary knowledge in the technical field can make some modifications and retouches without departing from the spirit and scope of the present invention. Therefore this The scope of protection of the invention shall be determined by the scope of the attached patent application.

Claims (13)

一種用於編碼器之即時校正方法,包括:感測一待測元件之運動,以取得一第一弦波信號與一第二弦波信號,其中該第一弦波信號與該第二弦波信號的相位相差90度;對該第一弦波信號與該第二弦波信號進行取樣,以取得N個第一數位信號值與N個第二數位信號值;依據該N個第一數位信號值與該N個第二數位信號值,產生N個定位位置;將該N個定位位置加入一計算群組中;對該計算群組中之該些定位位置進行迴歸分析,以取得一迴歸曲線;依據該回歸曲線,預測一第N+1個預測位置;以及依據一理想位置曲線,在該第N+1個預測位置的時間點,取得該待測元件之一理想位置,並利用該第N+1個預測位置與該理想位置之間的誤差值對該待測元件進行校正。An instant correction method for an encoder includes: sensing a motion of a device under test to obtain a first sine wave signal and a second sine wave signal, wherein the first sine wave signal and the second sine wave The phase of the signal is 90 degrees apart; the first sine wave signal and the second sine wave signal are sampled to obtain N first digital signal values and N second digital signal values; according to the N first digital signals Value and the N second digital signal values to generate N positioning positions; adding the N positioning positions to a calculation group; performing regression analysis on the positioning positions in the calculation group to obtain a regression curve ; Predicting an N + 1 prediction position based on the regression curve; and obtaining an ideal position of the device under test at the time point of the N + 1 prediction position according to an ideal position curve, and using the first The error value between the N + 1 predicted positions and the ideal position is used to correct the DUT. 如申請專利範圍第1項所述之即時校正方法,其中該理想位置曲線是依據該計算群組中之該些定位位置之至少一部分產生。The instant correction method as described in the first item of the patent application scope, wherein the ideal position curve is generated according to at least a part of the positioning positions in the calculation group. 如申請專利範圍第1項所述之即時校正方法,更包括:取得該第N+1個定位位置;將該計算群組中之第1個定位位置刪除以及將該第N+1個定位位置加入該計算群組中,以更新該計算群組;以及對該計算群組中之該些定位位置進行迴歸分析,以取得該迴歸曲線。The real-time correction method as described in item 1 of the scope of patent application, further includes: obtaining the N + 1th positioning position; deleting the first positioning position in the calculation group; and removing the N + 1th positioning position. Join the calculation group to update the calculation group; and perform regression analysis on the positioning positions in the calculation group to obtain the regression curve. 如申請專利範圍第1項所述之即時校正方法,其中依據該N個第一數位信號值與該N個第二數位信號值,產生該N個定位位置的步驟包括:透過一座標旋轉數位計算器演算法或一反三角函數演算法,依據該N個第一數位信號值與該N個第二數位信號值,產生該N個定位位置。The real-time correction method according to item 1 of the scope of patent application, wherein the step of generating the N positioning positions according to the N first digital signal values and the N second digital signal values includes: rotating a digital calculation through a standard An algorithm or an inverse trigonometric function algorithm generates the N positioning positions according to the N first digital signal values and the N second digital signal values. 如申請專利範圍第1項所述之即時校正方法,其中對該計算群組中之該些定位位置進行迴歸分析,以取得該迴歸曲線包括:透過一最小平方演算法對該計算群組中之該些定位位置進行回歸分析,以取得該迴歸曲線。The real-time correction method according to item 1 of the scope of patent application, wherein performing regression analysis on the positioning positions in the calculation group to obtain the regression curve includes: performing a least squares algorithm on the calculation group A regression analysis is performed on the positioning positions to obtain the regression curve. 如申請專利範圍第1項所述之即時校正方法,更包括:在取得該迴歸曲線前,對該些定位位置進行濾波處理。The real-time correction method described in item 1 of the scope of the patent application, further includes: filtering the positioning positions before obtaining the regression curve. 一種用於編碼器之即時校正系統,包括:一感測單元,用以感測一待測元件之運動,取得一第一弦波信號與一第二弦波信號,其中該第一弦波信號與該第二弦波信號的相位相差90度;一取樣單元,對該第一弦波信號與該第二弦波信號進行取樣,以取得N個第一數位信號值與N個第二數位信號值;以及一處理單元,依據該N個第一數位信號值與該N個第二數位信號值,產生N個定位位置,將該N個定位位置加入一計算群組中,對該計算群組中之該些定位位置進行迴歸分析,以取得一迴歸曲線,依據該回歸曲線,預測一第N+1個預測位置,且依據一理想位置曲線,在該第N+1個預測位置的時間點,取得該待測元件之一理想位置,並利用該第N+1個預測位置與該理想位置之間的誤差值對該待測元件進行校正。An instant correction system for an encoder includes: a sensing unit for sensing the movement of a device under test to obtain a first sine wave signal and a second sine wave signal, wherein the first sine wave signal A phase difference from the second sine wave signal by 90 degrees; a sampling unit that samples the first sine wave signal and the second sine wave signal to obtain N first digital signal values and N second digital signals And a processing unit that generates N positioning positions based on the N first digital signal values and the N second digital signal values, adds the N positioning positions to a calculation group, and calculates the calculation group Perform a regression analysis on these positioning positions to obtain a regression curve, predict an N + 1 prediction position based on the regression curve, and according to an ideal position curve, at the time point of the N + 1 prediction position , Obtaining an ideal position of the device under test, and correcting the device under test by using an error value between the N + 1th predicted position and the ideal position. 如申請專利範圍第7項所述之即時校正系統,其中該理想位置曲線是依據該計算群組中之該些定位位置之至少一部分產生。The instant correction system according to item 7 of the scope of patent application, wherein the ideal position curve is generated according to at least a part of the positioning positions in the calculation group. 如申請專利範圍第8項所述之即時校正系統,其中該處理單元包括:一第一計算單元,依據該N個第一數位信號值與該N個第二數位信號值,產生N個定位位置,並將該N個定位位置加入該計算群組;一第二計算單元,對該計算群組中之該些定位位置進行迴歸分析,以取得該迴歸曲線;以及一校正單元,依據該回歸曲線,預測一第N+1個預測位置,且依據一理想位置曲線,在該第N+1個預測位置的時間點,取得該待測元件之一理想位置,並利用該第N+1個預測位置與該理想位置之間的誤差值對該待測元件進行校正。The instant correction system according to item 8 of the patent application scope, wherein the processing unit includes: a first calculation unit that generates N positioning positions based on the N first digital signal values and the N second digital signal values And adding the N positioning positions to the calculation group; a second calculation unit that performs regression analysis on the positioning positions in the calculation group to obtain the regression curve; and a correction unit based on the regression curve , Predict an N + 1th predicted position, and obtain an ideal position of the device under test at the time point of the N + 1th predicted position according to an ideal position curve, and use the N + 1th predicted position The error value between the position and the ideal position corrects the DUT. 如申請專利範圍第7項所述之即時校正系統,其中該處理單元更取得該第N+1個定位位置,並將該計算群組中之第1個定位位置刪除以及將該第N+1個定位位置加入該計算群組中,以更新該計算群組,並重新對該計算群組中之該些定位位置進行迴歸分析,以取得該迴歸曲線,重新依據該回歸曲線,預測該第N+1個預測位置,且重新依據該理想位置曲線,在該第N+1個預測位置的時間點,取得該待測元件之該理想位置,並利用該第N+1個預測位置與該理想位置之間的誤差值對該待測元件進行校正。The instant correction system as described in item 7 of the scope of patent application, wherein the processing unit further obtains the N + 1th positioning position, deletes the 1st positioning position in the calculation group, and deletes the N + 1th positioning position Positioning positions are added to the calculation group to update the calculation group, and regression analysis is performed on the positioning positions in the calculation group to obtain the regression curve, and the Nth prediction is re-predicted based on the regression curve. +1 prediction position, and according to the ideal position curve again, at the time point of the N + 1th prediction position, obtain the ideal position of the device under test, and use the N + 1th prediction position and the ideal The error value between the positions corrects the DUT. 如申請專利範圍第7項所述之即時校正系統,其中該處理單元更透過一座標旋轉數位計算器演算法或一反三角函數演算法,依據該N個第一數位信號值與該N個第二數位信號值,產生該N個定位位置。The real-time correction system as described in item 7 of the scope of patent application, wherein the processing unit further uses a standard rotation digital calculator algorithm or an inverse trigonometric function algorithm, according to the N first digital signal values and the Nth The two-digit signal value generates the N positioning positions. 如申請專利範圍第7項所述之即時校正系統,其中該處理單元更透過一最小平方演算法對該計算群組中之該些定位位置進行回歸分析,以取得該迴歸曲線。The real-time correction system described in item 7 of the scope of the patent application, wherein the processing unit further performs a regression analysis on the positioning positions in the calculation group through a least square algorithm to obtain the regression curve. 如申請專利範圍第7項所述之即時校正系統,其中該處理單元更在取得該迴歸曲線前,對該些定位位置進行濾波處理。The real-time correction system according to item 7 of the scope of patent application, wherein the processing unit performs filtering processing on the positioning positions before obtaining the regression curve.
TW108100363A 2019-01-04 2019-01-04 Instant correction method for encoder and system thereof TWI664823B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW108100363A TWI664823B (en) 2019-01-04 2019-01-04 Instant correction method for encoder and system thereof
JP2019198999A JP6788721B2 (en) 2019-01-04 2019-10-31 Encoder immediate correction method and its system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108100363A TWI664823B (en) 2019-01-04 2019-01-04 Instant correction method for encoder and system thereof

Publications (2)

Publication Number Publication Date
TWI664823B true TWI664823B (en) 2019-07-01
TW202027429A TW202027429A (en) 2020-07-16

Family

ID=68049500

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108100363A TWI664823B (en) 2019-01-04 2019-01-04 Instant correction method for encoder and system thereof

Country Status (2)

Country Link
JP (1) JP6788721B2 (en)
TW (1) TWI664823B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6734666B2 (en) * 1999-12-15 2004-05-11 Bien-Air S.A. Method of determining the angular position of a permanent magnet rotor of a polyphase electric motor
CN101194424A (en) * 2005-02-03 2008-06-04 德州仪器公司 Resolver arrangement
US9641108B2 (en) * 2014-04-16 2017-05-02 Eaton Corporation Method and system for calibrating and detecting offset of rotary encoder relative to rotor of motor

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006029937A (en) * 2004-07-15 2006-02-02 Matsushita Electric Ind Co Ltd Compensation method for rotation angle of rotation angle detector
JP4925789B2 (en) * 2006-11-02 2012-05-09 Ntn株式会社 Rotation detection device and bearing with rotation detection device
JP5193930B2 (en) * 2009-04-17 2013-05-08 アルプス電気株式会社 Small angle detection sensor
JP6194914B2 (en) * 2015-03-27 2017-09-13 Tdk株式会社 Position prediction apparatus and position detection apparatus
DE112016001331T5 (en) * 2015-06-17 2017-12-21 Asahi Kasei Microdevices Corporation Detector device, rotation angle detection device, detection method and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6734666B2 (en) * 1999-12-15 2004-05-11 Bien-Air S.A. Method of determining the angular position of a permanent magnet rotor of a polyphase electric motor
CN101194424A (en) * 2005-02-03 2008-06-04 德州仪器公司 Resolver arrangement
US9641108B2 (en) * 2014-04-16 2017-05-02 Eaton Corporation Method and system for calibrating and detecting offset of rotary encoder relative to rotor of motor

Also Published As

Publication number Publication date
TW202027429A (en) 2020-07-16
JP2020109394A (en) 2020-07-16
JP6788721B2 (en) 2020-11-25

Similar Documents

Publication Publication Date Title
KR100772915B1 (en) Apparatus and method for correcting bias of gyroscope on a moving robot
US6556153B1 (en) System and method for improving encoder resolution
US11722157B2 (en) Methods, computer programs, devices, and encoders for signal error correction
JPWO2006043403A1 (en) Encoder signal processing apparatus and signal processing method thereof
JP5805207B2 (en) Volumetric evaluation method and volumetric measuring apparatus
CN111412939B (en) Real-time correction method and system for encoder
TWI664823B (en) Instant correction method for encoder and system thereof
CN116182924A (en) Phase compensation method, device and magnetic encoder
JP5056853B2 (en) Speed detection method and motor control apparatus using the same
WO2014061380A1 (en) Position detection unit
CN111076761B (en) Magnetic encoder calibration method and system
CN105094439B (en) The acceleration transducer calibration of touch panel device, Dip countion method and device
JP6887189B2 (en) Power failure tracing method and system for mold altitude indicator
TWI397792B (en) On-line compensation apparatus for feedback position of encoder and method for operating the same
CN111721210B (en) Initialization method, device, equipment and medium after conversion of logical raster resolution
JP4943171B2 (en) Amplitude detector
US11092583B2 (en) Machine learning stabilization of gas sensor output
CN113804914A (en) Motor speed measuring method and device, computer equipment and storage medium
CN111189471A (en) Correction method, correction device and computer storage medium
CN1272600C (en) Phase differential nonsensitive counting method and device for node tracking mohr interference fringe signals
JP6719684B1 (en) Numerical control device
Li et al. An improved M/T speed algorithm based on RISC-V DSP
KR101418150B1 (en) Method and Apparatus for Compensating Sinusoidal Optical Encoder Signal
Fan et al. Research on zero-finding method for the incremental encoder of hydraulic position servo motor
CN113533769A (en) Motor speed measuring method and device, computer equipment and storage medium