TW202317336A - Motor driver with improvement accuracy of measurement and robotic arm thereof - Google Patents

Motor driver with improvement accuracy of measurement and robotic arm thereof Download PDF

Info

Publication number
TW202317336A
TW202317336A TW110139412A TW110139412A TW202317336A TW 202317336 A TW202317336 A TW 202317336A TW 110139412 A TW110139412 A TW 110139412A TW 110139412 A TW110139412 A TW 110139412A TW 202317336 A TW202317336 A TW 202317336A
Authority
TW
Taiwan
Prior art keywords
current
temperature
motor
signal
offset
Prior art date
Application number
TW110139412A
Other languages
Chinese (zh)
Other versions
TWI853191B (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 TW110139412A priority Critical patent/TWI853191B/en
Priority claimed from TW110139412A external-priority patent/TWI853191B/en
Priority to CN202210915190.4A priority patent/CN116015152A/en
Publication of TW202317336A publication Critical patent/TW202317336A/en
Application granted granted Critical
Publication of TWI853191B publication Critical patent/TWI853191B/en

Links

Images

Landscapes

  • Control Of Electric Motors In General (AREA)
  • Measurement Of Current Or Voltage (AREA)

Abstract

The disclosure provides a motor driver with improvement accuracy of measurement and robotic arm thereof. The motor driver measures a motor current to generate a current sensing signal, and corrects the current sensing signal according to a first temperature, a first current offset, a second temperature, and a second current offset for improving the performance of the motor.

Description

提升量測正確性的馬達驅動器及其機械手臂 Motor drive and its robotic arm to improve measurement accuracy

本發明有關一種提升量測正確性的馬達驅動器及其機械手臂,尤其關於提升量測馬達電流的正確性,而降低馬達的力矩漣波,驅使馬達與機械手臂振動減少的馬達驅動器及其機械手臂。 The present invention relates to a motor driver and its mechanical arm that improve the accuracy of measurement, especially to improve the accuracy of measuring motor current, reduce the torque ripple of the motor, and drive the motor driver and its mechanical arm to reduce the vibration of the motor and the mechanical arm. .

一般馬達由馬達驅動器控制其馬達電流與轉動速度,然而,馬達驅動器易受溫度影響,致使電路間運作產生的數值或訊號產生偏移,如此馬達驅動器會誤判從馬達偵測獲得的馬達電流數值,長久運作下來,馬達性能越來越差,例如振動現象嚴重。 Generally, the motor current and rotation speed are controlled by the motor driver. However, the motor driver is easily affected by temperature, which causes the value or signal generated by the operation of the circuit to deviate. In this way, the motor driver will misjudge the motor current value obtained from the motor detection. After running for a long time, the performance of the motor is getting worse, such as serious vibration.

鑒於上述問題,本發明提供一種馬達驅動器,提升量測馬達電流的正確性後,可以及時偵錯與動態補償馬達電流,而精準控制馬達電流,達到降低馬達的力矩漣波,驅使馬達的振動減少。 In view of the above problems, the present invention provides a motor driver. After improving the accuracy of measuring the motor current, it can detect errors in time and dynamically compensate the motor current, and precisely control the motor current to reduce the torque ripple of the motor and reduce the vibration of the motor. .

本發明之目的提供一種提升量測正確性的馬達驅動器及其機械手臂,馬達驅動器提升量測馬達電流的正確性後,可以及時偵錯與動態補償馬達電流,而精準控制馬達電流,達到馬達與機械手臂的振動減少。 The object of the present invention is to provide a motor driver and its mechanical arm that improve the accuracy of measurement. After the motor driver improves the accuracy of measuring the motor current, it can detect errors in time and dynamically compensate the motor current, and precisely control the motor current. The vibration of the mechanical arm is reduced.

為了達到前述發明的目的,本發明馬達驅動器量測一馬達電 流而產生一電流感測訊號,及依據一第一溫度、一第一電流偏移量、一第二溫度與一第二電流偏移量校正電流感測訊號。 In order to achieve the purpose of the foregoing invention, the motor driver of the present invention measures a motor flow to generate a current sensing signal, and correct the current sensing signal according to a first temperature, a first current offset, a second temperature and a second current offset.

或者,馬達驅動器於第一溫度時量測馬達電流且具有該第一電流偏移量,及於第二溫度時量測馬達電流具有第二電流偏移量,依據第一溫度、第一電流偏移量、第二溫度與第二電流偏移量建立一校正直線,而獲得電流感測訊號的一校正值,以校正電流感測訊號。 Alternatively, the motor driver measures the motor current at the first temperature and has the first current offset, and measures the motor current at the second temperature with the second current offset, according to the first temperature, the first current offset The displacement, the second temperature and the second current offset establish a correction straight line to obtain a correction value of the current sensing signal to correct the current sensing signal.

或者,馬達驅動器於執行任務前,於第一溫度時量測馬達電流且具有該第一電流偏移量,及於第二溫度時量測馬達電流且具有第二電流偏移量,並依據第一溫度、第一電流偏移量、第二溫度與第二電流偏移量建立補償運算式。如此,馬達驅動器於執行任務時量測一第三溫度下的馬達電流而獲得電流感測訊號,並依據第三溫度與補償運算式運算出校正值,而依據校正值校正電流感測訊號。 Or, before the motor driver executes the task, it measures the motor current at the first temperature with the first current offset, and measures the motor current with the second current offset at the second temperature, and according to the first A temperature, the first current offset, the second temperature and the second current offset establish a compensation formula. In this way, the motor driver measures the motor current at a third temperature to obtain a current sensing signal when performing a task, calculates a correction value according to the third temperature and the compensation formula, and corrects the current sensing signal according to the correction value.

10:馬達驅動器 10: Motor driver

30:位置控制模組 30:Position control module

31:第一運算電路 31: The first operation circuit

32:位置控制器 32: Position controller

40:速度控制模組 40: Speed control module

41:第二運算電路 41: The second operation circuit

42:速度控制器 42: Speed controller

50:電流控制模組 50: Current control module

51:電流運算電路 51: Current operation circuit

52:電流控制器 52: Current controller

53:溫度感測器 53:Temperature sensor

54:電流感測電路 54: Current sensing circuit

541:電流感知器 541: current sensor

55:數位類比轉換電路 55: Digital to analog conversion circuit

56:微處理器 56: Microprocessor

60:馬達 60: motor

70:速度計算器 70:Speed Calculator

80:編碼器 80: Encoder

a:馬達電流 a: motor current

ADC1:數位類比轉換電路 ADC1: digital to analog conversion circuit

ADC2:數位類比轉換電路 ADC2: digital to analog conversion circuit

ADC3:數位類比轉換電路 ADC3: digital to analog conversion circuit

b:馬達電流 b: motor current

c:馬達電流 c: motor current

cmd:電流命令 cmd: current command

Cp:校正值 Cp: correction value

GND:接地電壓 GND: ground voltage

L56:校正直線 L56: Calibration straight line

O1:偏移量 O1: offset

O2:偏移量 O2: offset

RefV1:參考電壓 RefV1: reference voltage

RefV2:參考電壓 RefV2: reference voltage

RefV3:參考電壓 RefV3: reference voltage

V31:第一運算訊號 V31: The first computing signal

V32:位置控制訊號 V32: Position control signal

V41:第二運算訊號 V41: Second computing signal

V42:速度控制訊號 V42: Speed control signal

V51:電流運算訊號 V51: current calculation signal

V52:馬達控制電壓 V52: motor control voltage

V55:類比訊號 V55: Analog signal

V56:回授訊號 V56: Feedback signal

V70:馬達位置訊號 V70: Motor position signal

V80:馬達速度訊號 V80: motor speed signal

Va_T:電流感測訊號 Va_T: current sensing signal

Va_T1:電流感測訊號 Va_T1: current sensing signal

Va_T2:電流感測訊號 Va_T2: current sensing signal

Va_T3:電流感測訊號 Va_T3: current sensing signal

Vb_T:電流感測訊號 Vb_T: current sensing signal

Vc_T:電流感測訊號 Vc_T: current sensing signal

T:溫度資訊 T: temperature information

T1:溫度資訊 T1: temperature information

T2:溫度資訊 T2: temperature information

T3:溫度資訊 T3: Temperature Information

第一圖為本發明馬達驅動器校正溫度影響之一實施例的電路圖。 The first figure is a circuit diagram of an embodiment of correcting temperature effects of the motor driver of the present invention.

第二圖為本發明電流控制模組校正溫度影響之一實施例的電路圖。 The second figure is a circuit diagram of an embodiment of the current control module correcting the temperature effect of the present invention.

第三圖為本發明估算溫度對馬達驅動器的影響之一實施例的流程圖。 The third figure is a flowchart of an embodiment of the present invention for estimating the influence of temperature on a motor driver.

第四圖為本發明電流控制模組之一校正直線之一實施例的示意圖。 FIG. 4 is a schematic diagram of an embodiment of a calibration straight line of the current control module of the present invention.

第五圖為本發明機械手臂在線校正溫度影響之一實施例的流程圖。 The fifth figure is a flow chart of an embodiment of the online temperature correction of the mechanical arm of the present invention.

有關本發明為達成上述目的,所採用之技術手段及其功效,茲舉實施例,並配合圖式加以說明如下。 Relevant present invention is to achieve above-mentioned object, the technical means that adopts and effect thereof, give embodiment hereby, and cooperate drawing to illustrate as follows.

請參閱第一圖,其為本發明馬達驅動器校正溫度影響之一實施例的電路圖。如圖所示,馬達驅動器10控制馬達60運作,及量測一馬達電流a而產生一電流感測訊號Va_T,惟馬達驅動器10會因溫度影響導致,電流感測訊號Va_T的準位非實際馬達電流a。所以在不同溫度時,例如一第一溫度與一第二溫度下,馬達驅動器10會有一第一電流偏移量與一第二電流偏移量,而本發明馬達驅動器10利用第一溫度、第二溫度、第一電流偏移量與第二電流偏移量校正電流感測訊號Va_T,獲得正確的馬達電流a,提升量測正確性,而可以精確控制馬達電流a,使馬達的振動現象減緩。如此。本發明之馬達驅動器10應用至機械手臂時,亦可以減少機械手臂運作時的振動。 Please refer to the first diagram, which is a circuit diagram of an embodiment of correcting temperature effects of the motor driver of the present invention. As shown in the figure, the motor driver 10 controls the operation of the motor 60, and measures a motor current a to generate a current sensing signal Va_T, but the motor driver 10 will be affected by temperature, and the level of the current sensing signal Va_T is not the actual motor. Current a. Therefore, at different temperatures, such as a first temperature and a second temperature, the motor driver 10 will have a first current offset and a second current offset, and the motor driver 10 of the present invention utilizes the first temperature, the second temperature Two temperature, the first current offset and the second current offset correct the current sensing signal Va_T to obtain the correct motor current a, improve the accuracy of measurement, and can precisely control the motor current a to slow down the vibration of the motor . in this way. When the motor driver 10 of the present invention is applied to a robot arm, it can also reduce the vibration of the robot arm during operation.

馬達驅動器10包含一位置控制模組30、一速度控制模組40與一電流控制模組50,馬達驅動器10接收一電流命令cmd,位置控制模組30、速度控制模組40與電流控制模組50依據電流命令cmd控制馬達60的運作。電流控制模組50依據電流命令cmd產生一馬達控制電壓V52控制馬達60運作,電流控制模組50包含一電流控制器52、一電流感測電路54與一微處理器56。如此,電流控制器52於第一溫度時依據電流命令cmd輸出馬達控制電壓V52,而控制馬達60運轉產生馬達電流a,及於第二溫度時依據電流命令cmd輸出馬達控制電壓V52,而控制馬達60運轉產生馬達電流a。其中,假設馬達60運轉產生的馬達電流a符合電流命令cmd的控制,無明顯偏移的現象。 The motor driver 10 includes a position control module 30, a speed control module 40 and a current control module 50, the motor driver 10 receives a current command cmd, the position control module 30, the speed control module 40 and the current control module 50 controls the operation of motor 60 according to the current command cmd. The current control module 50 generates a motor control voltage V52 to control the operation of the motor 60 according to the current command cmd. The current control module 50 includes a current controller 52 , a current sensing circuit 54 and a microprocessor 56 . In this way, the current controller 52 outputs the motor control voltage V52 according to the current command cmd at the first temperature to control the operation of the motor 60 to generate the motor current a, and outputs the motor control voltage V52 according to the current command cmd at the second temperature to control the motor 60 running produces motor current a. Wherein, it is assumed that the motor current a generated by the operation of the motor 60 complies with the control of the current command cmd, and there is no obvious deviation.

電流感測電路54於第一溫度下量測馬達電流a而產生第一溫度下的電流感測訊號Va_T1(如第三圖),及於第二溫度下量測馬達電流a而產 生第二溫度下的電流感測訊號Va_T2(如第三圖)。微處理器56運算電流命令cmd與第一溫度下的電流感測訊號Va_T1,而產生第一電流偏移量;及運算電流命令cmd與第二溫度下的電流感測訊號Va_T2,而產生第二電流偏移量。如此,微處理器56依據電流命令cmd與不同溫度量測到的電流感測訊號Va_T而運算出第一電流偏移量與第二電流偏移量。另外實施例中利用一溫度感測器53量測第一溫度與第二溫度,而產生一第一溫度資訊(如第三圖)與一第二溫度資訊(如第三圖),所以微處理器56儲存不同溫度下的第一電流偏移量與第二電流偏移量,及儲存不同溫度下的第一溫度資訊T1與第二溫度資訊T2。 The current sensing circuit 54 measures the motor current a at the first temperature to generate a current sensing signal Va_T1 at the first temperature (as shown in the third figure), and measures the motor current a at the second temperature to generate Generate a current sensing signal Va_T2 at the second temperature (as shown in FIG. 3 ). The microprocessor 56 calculates the current command cmd and the current sensing signal Va_T1 at the first temperature to generate the first current offset; and calculates the current command cmd and the current sensing signal Va_T2 at the second temperature to generate the second current offset. current offset. In this way, the microprocessor 56 calculates the first current offset and the second current offset according to the current command cmd and the current sensing signal Va_T measured at different temperatures. In another embodiment, a temperature sensor 53 is used to measure the first temperature and the second temperature to generate a first temperature information (such as the third figure) and a second temperature information (such as the third figure), so the microprocessor The device 56 stores the first current offset and the second current offset at different temperatures, and stores the first temperature information T1 and the second temperature information T2 at different temperatures.

因此,馬達驅動器10於第一溫度時量測馬達電流a具有第一電流偏移量,於第二溫度時量測馬達電流a具有第二電流偏移量,並依據第一溫度、第一電流偏移量、第二溫度與第二電流偏移量建立一補償運算式,而可以依據補償訊算式獲得電流感測訊號Va_T的一校正值Cp。換言之,微處理器56利用所儲存的第一電流偏移量、第二電流偏移量、第一溫度資訊T1與第二溫度資訊T2建立補償運算式,而運算出電流感測訊號Va_T的校正值Cp。如此,藉由校正值Cp提升量測馬達電流a的正確性,而校正過的電流感測訊號Va_T可以使馬達驅動器10及時偵錯與動態補償馬達電流a,而精準控制馬達電流a,達到馬達60與機械手臂的振動減少。 Therefore, the motor driver 10 has a first current offset when measuring the motor current a at the first temperature, and has a second current offset when measuring the motor current a at the second temperature, and according to the first temperature, the first current The offset, the second temperature, and the second current offset establish a compensation calculation formula, and a correction value Cp of the current sensing signal Va_T can be obtained according to the compensation calculation formula. In other words, the microprocessor 56 uses the stored first current offset, the second current offset, the first temperature information T1 and the second temperature information T2 to establish a compensation calculation formula to calculate the correction of the current sensing signal Va_T Value Cp. In this way, the accuracy of measuring the motor current a is improved by the correction value Cp, and the corrected current sensing signal Va_T can enable the motor driver 10 to detect errors in time and dynamically compensate the motor current a, so as to accurately control the motor current a to reach the motor current a. 60 with reduced vibration of the mechanical arm.

復參閱第一圖,馬達驅動器10的電流控制模組50包含一數位類比轉換電路55,其耦接電流感測電路54而轉換電流感測訊號Va_T為一類比訊號V55。微處理器56耦接數位類比轉換電路55而接收類比訊號V55,以產生一回授訊號V56。一電流運算電路51接收回授訊號V56與一速度控制訊 號V42而產生一電流運算訊號V51。如此,電流控制器52依據電流運算訊號V51產生馬達控制電壓V52,並可以依據高正確性的回授訊號V56(電流感測訊號Va_T)調整馬達電流a。此外,從馬達60到電流運算電路51之間皆是回授迴路,其間的訊號皆可以算是回授的訊號。 Referring back to FIG. 1 , the current control module 50 of the motor driver 10 includes a digital-to-analog conversion circuit 55 coupled to the current sensing circuit 54 to convert the current sensing signal Va_T into an analog signal V55 . The microprocessor 56 is coupled to the digital-to-analog conversion circuit 55 to receive the analog signal V55 to generate a feedback signal V56. A current operation circuit 51 receives the feedback signal V56 and a speed control signal signal V42 to generate a current calculation signal V51. In this way, the current controller 52 generates the motor control voltage V52 according to the current calculation signal V51, and can adjust the motor current a according to the highly accurate feedback signal V56 (current sensing signal Va_T). In addition, there is a feedback loop between the motor 60 and the current computing circuit 51, and the signals therein can be regarded as feedback signals.

馬達驅動器10包含一編碼器70與一速度計算器80。編碼器70偵測馬達60的一馬達轉動位置而產生一馬達位置訊號V70,速度計算器80耦接編碼器70,而依據馬達位置訊號V70產生一馬達速度訊號V80。位置控制模組30包含一第一運算電路31與一位置控制器32,第一運算電路31接收電流命令cmd與馬達位置訊號V70而產生一第一運算訊號V31,位置控制器32依據第一運算訊號V31產生一位置控制訊號V32。速度控制模組40包含一第二運算電路41與一速度控制器42,第二運算電路41接收位置控制訊號V32與馬達速度訊號V80而產生一第二運算訊號V41,速度控制器40依據第二運算訊號V41產生速度控制訊號V42。 The motor driver 10 includes an encoder 70 and a speed calculator 80 . The encoder 70 detects a motor rotation position of the motor 60 to generate a motor position signal V70. The speed calculator 80 is coupled to the encoder 70 to generate a motor speed signal V80 according to the motor position signal V70. The position control module 30 includes a first calculation circuit 31 and a position controller 32. The first calculation circuit 31 receives the current command cmd and the motor position signal V70 to generate a first calculation signal V31. The position controller 32 generates a first calculation signal V31 according to the first calculation The signal V31 generates a position control signal V32. The speed control module 40 includes a second computing circuit 41 and a speed controller 42. The second computing circuit 41 receives the position control signal V32 and the motor speed signal V80 to generate a second computing signal V41. The speed controller 40 generates a second computing signal V41 according to the second The calculation signal V41 generates a speed control signal V42.

因此,馬達驅動器10於驅動執行任務前依據第一溫度、第一電流偏移量、第二溫度與第二電流偏移量建立補償運算式,而馬達驅動器10於驅動執行任務時量測一第三溫度下的馬達電流a而獲得電流感測訊號Va_T3,並依據第三溫度與補償運算式運算出另一校正值Cp,而依據該校正值Cp校正電流感測訊號Va_T3。其中,第一溫度不同於第二溫度,但未限制第三溫度是否相同於第一溫度與第二溫度。此外,若馬達驅動器10在出廠前有校正第一溫度下所量測到的電流感測訊號Va_T1,則馬達驅動器10沒有第一電流偏移量,即第一電流偏移量為0。 Therefore, the motor driver 10 establishes a compensation calculation formula according to the first temperature, the first current offset, the second temperature, and the second current offset before driving to perform a task, and the motor driver 10 measures a first when driving to perform a task. The current sensing signal Va_T3 is obtained from the motor current a at the three temperatures, and another correction value Cp is calculated according to the third temperature and the compensation formula, and the current sensing signal Va_T3 is corrected according to the correction value Cp. Wherein, the first temperature is different from the second temperature, but it is not limited whether the third temperature is the same as the first temperature and the second temperature. In addition, if the motor driver 10 calibrates the current sensing signal Va_T1 measured at the first temperature before delivery, the motor driver 10 does not have the first current offset, that is, the first current offset is 0.

請參閱第二圖,其為本發明電流控制模組校正溫度影響之一 實施例的電路圖。如圖所示,馬達驅動器10因偵測複數馬達電流a、b、c而於設置複數電流感測電路54,且該些電流感測電路54分別包含一電流感知器541與複數阻抗元件,以分別偵測馬達電流a、b、c後,分別產生電流感測訊號Va_T、Vb_T、Vc_T至ADC電路55。再者,該些電流感測電路54的電流感知器541分別耦接參考電壓Ref V1、Rer V2、Rer V3以供運作之用,且第二圖所示三個參考電壓Ref V1、Rer V2、Rer V3可以互為相同或不同,其為設計之選項。因此,於第二圖實施例中包含複數個ADC電路55,例如ADC1、ADC2、ADC3,從第二圖的上至下,分別耦接三個電流感測電路54。而且ADC1電路、ADC2電路與ADC3電路設置於微處理器56內,或者可以如第一圖實施例設置於微處理器56外,皆為設計之選項,本發明之實施未加以限制。 Please refer to the second figure, which is one of the correction temperature effects of the current control module of the present invention Example circuit diagram. As shown in the figure, the motor driver 10 is provided with a plurality of current sensing circuits 54 for detecting the complex motor currents a, b, and c, and these current sensing circuits 54 respectively include a current sensor 541 and a plurality of impedance elements, so as to After the motor currents a, b, and c are respectively detected, current sensing signals Va_T, Vb_T, Vc_T are respectively generated to the ADC circuit 55 . Furthermore, the current sensors 541 of the current sensing circuits 54 are respectively coupled to the reference voltages Ref V1, Rer V2, Rer V3 for operation, and the three reference voltages Ref V1, Rer V2, Rer V2, Rer V3 can be the same or different from each other, which is a design option. Therefore, the embodiment in the second figure includes a plurality of ADC circuits 55 , such as ADC1 , ADC2 , and ADC3 , which are respectively coupled to three current sensing circuits 54 from top to bottom in the second figure. Moreover, the ADC1 circuit, the ADC2 circuit and the ADC3 circuit are arranged in the microprocessor 56, or can be arranged outside the microprocessor 56 as in the embodiment of the first figure, which are all design options, and the implementation of the present invention is not limited.

再者,溫度感測器53同樣可以選擇設置於電流控制模組50內,而量測環境溫度,例如第一溫度、第二溫度與第三溫度,環境溫度可以包含馬達驅動器10本身運作產生的溫度加上周遭的整體溫度。溫度感測器53量測環境溫度後產生溫度資訊T,第一溫度的溫度資訊為T1(如第三圖),第二溫度的溫度資訊為T2(如第三圖),第三溫度的溫度資訊為T3(如第五圖)。而且,該些電流感測訊號Va_T、Vb_T、Vc_T亦可能受溫度變化的影響,無法代表正確的該些馬達電流a、b、c。如此,微處理器56依據儲存的資訊建立補償運算式後,可以產生各別的校正值Cp校正該些電流感測訊號Va_T、Vb_T、Vc_T,而產生各自的回授訊號V56。 Furthermore, the temperature sensor 53 can also be optionally installed in the current control module 50 to measure the ambient temperature, such as the first temperature, the second temperature, and the third temperature. The ambient temperature can include the temperature generated by the operation of the motor driver 10 itself. temperature plus the overall temperature of the surrounding area. The temperature sensor 53 generates temperature information T after measuring the ambient temperature. The temperature information of the first temperature is T1 (as shown in the third figure), the temperature information of the second temperature is T2 (as shown in the third figure), and the temperature information of the third temperature is T2 (as shown in the third figure). The information is T3 (as shown in the fifth picture). Moreover, the current sensing signals Va_T, Vb_T, and Vc_T may also be affected by temperature changes, and cannot represent the correct motor currents a, b, and c. In this way, after the microprocessor 56 establishes the compensation formula according to the stored information, it can generate respective correction values Cp to correct the current sensing signals Va_T, Vb_T, Vc_T, and generate respective feedback signals V56.

請參閱第三圖,其為本發明估算溫度對馬達驅動器的影響之一實施例的流程圖。如圖所示,先估算馬達驅動器10驅動執行任務前受到 溫度影響的電流偏移量,而馬達驅動器10可以應用於機械手臂,換言之,估算機械手臂執行任務(例如焊接、取放工件或其他協作任務)前受到溫度影響的電流偏移量。馬達驅動器10(或機械手臂)剛啟用時,環境溫度應是低溫或為室溫,即開始步驟S11,低(室)溫(如第一溫度)偏移估算程序。步驟S12,一控制器耦接馬達驅動器10,並輸出電流命令cmd至馬達驅動器10,以控制馬達60運作。步驟S13,馬達驅動器10的電流感測電路量測馬達電流a,產生低(室)溫下的電流感測訊號Va_T1。其中,馬達60有三相馬達電流a、b、c,惟實施例通常以一個馬達電流a進行說明。於步驟S14,馬達驅動器10(或微處理器56)計算低(室)溫下電流感測訊號Va_T1的電流偏移量(如第一電流偏移量)O1=cmd-Va_T1。於步驟S15,溫度感測器53量測環境的溫度以產生溫度資訊T1,即第一溫度的溫度資訊T1。於步驟S16,馬達驅動器10(或微處理器56)儲存低(室)溫下估算的電流偏移量O1與量測到的溫度資訊T1。 Please refer to FIG. 3 , which is a flow chart of an embodiment of the present invention for estimating the influence of temperature on the motor driver. As shown in the figure, it is first estimated that the motor driver 10 is driven to perform tasks The current offset affected by temperature, and the motor driver 10 can be applied to the robot arm, in other words, estimate the current offset affected by the temperature before the robot performs tasks (such as welding, picking and placing workpieces or other collaborative tasks). When the motor driver 10 (or the robot arm) is first started, the ambient temperature should be low temperature or room temperature, that is, start step S11, the low (room) temperature (eg first temperature) offset estimation procedure. Step S12 , a controller is coupled to the motor driver 10 and outputs a current command cmd to the motor driver 10 to control the operation of the motor 60 . In step S13 , the current sensing circuit of the motor driver 10 measures the motor current a to generate a current sensing signal Va_T1 at low (room) temperature. Wherein, the motor 60 has three-phase motor currents a, b, and c, but the embodiment is usually described with one motor current a. In step S14 , the motor driver 10 (or the microprocessor 56 ) calculates the current offset (such as the first current offset) O1=cmd−Va_T1 of the current sensing signal Va_T1 at low (room) temperature. In step S15 , the temperature sensor 53 measures the temperature of the environment to generate temperature information T1 , that is, temperature information T1 of the first temperature. In step S16 , the motor driver 10 (or the microprocessor 56 ) stores the estimated current offset O1 and the measured temperature information T1 at the low (room) temperature.

再者,馬達驅動器10(或機械手臂)工作一段時間後溫度逐漸上升,即為第二溫度。於步驟S21,開始進行高溫偏移估算程序。於步驟S22,控制器同樣輸出電流命令cmd至馬達驅動器10以控制馬達60運轉,然而,未限制第二溫度時的電流命令cmd是否相同於第一溫度時的電流命令cmd。於步驟S23,電流感測電路54量測馬達電流a,產生高溫(如第二溫度)下的電流感測訊號Va_T2。於步驟S24,微處理器56計算高溫下電流感測訊號Va_T2的電流偏移量(如第二電流偏移量)O2=cmd-Va_T2。於步驟S25,溫度感測器53量測環境的溫度以產生溫度資訊T2,即第二溫度的溫度資訊T2。於步驟S26,微處理器56儲存高溫下估算的電流偏移量O2與量測到的溫度資訊T2。 Furthermore, the temperature of the motor driver 10 (or the mechanical arm) rises gradually after working for a period of time, which is the second temperature. In step S21, the high temperature offset estimation procedure is started. In step S22 , the controller also outputs the current command cmd to the motor driver 10 to control the operation of the motor 60 . However, it is not limited whether the current command cmd at the second temperature is the same as the current command cmd at the first temperature. In step S23 , the current sensing circuit 54 measures the motor current a to generate a current sensing signal Va_T2 at a high temperature (such as a second temperature). In step S24 , the microprocessor 56 calculates a current offset (such as a second current offset) O2 = cmd - Va_T2 of the current sensing signal Va_T2 at high temperature. In step S25 , the temperature sensor 53 measures the temperature of the environment to generate temperature information T2 , that is, temperature information T2 of the second temperature. In step S26 , the microprocessor 56 stores the estimated current offset O2 and the measured temperature information T2 at high temperature.

第四圖為本發明電流控制模組之校正直線之一實施例的示意圖。馬達驅動器10所儲存的資訊可以建立補償運算式,並繪出第一交會點(O1,T1)與第二交會點(O2,T2)以建立一校正直線L56,並依據校正直線L56校正電流感測訊號Va_T。然而,當機械手臂經過出廠前校正時,並無第一電流偏移量O1,所以第一交會點可以改成(0,T1),而第二交會點不變,但校正直線L55的斜率不同。其中,X軸為相關於溫度的溫度資訊T,Y軸為電流偏移量,所以Y軸顯示出電流感測訊號Va_T所需的補償值,亦可以稱為校正值Cp。換言之,機械手臂儲存校正直線L55的相關訊息後,開始執行任務,即在相同或不同於第一溫度或第二溫度的第三溫度下,可以利用查詢的方式,依據第三溫度(X軸)對應查出電流偏移量(Y軸),以校正電流感測訊號Va_T。如此,機械手臂於運作時可以選擇,不經由補償運算式運算出校正值Cp,同樣可以提升量測馬達電流a的正確性。此外,補償運算式的運算非限制由微處理器56進行,其他具備相符的運算能力(如控制器),亦可以處理相同運算。 Figure 4 is a schematic diagram of an embodiment of the calibration straight line of the current control module of the present invention. The information stored in the motor driver 10 can establish a compensation calculation formula, and draw the first intersection point (O1, T1) and the second intersection point (O2, T2) to establish a correction line L56, and correct the current inductance according to the correction line L56 Test signal Va_T. However, when the manipulator is calibrated before leaving the factory, there is no first current offset O1, so the first intersection point can be changed to (0, T1), while the second intersection point remains unchanged, but the slope of the calibration line L55 is different . Wherein, the X-axis is the temperature information T related to the temperature, and the Y-axis is the current offset, so the Y-axis shows the compensation value required by the current sensing signal Va_T, which can also be called the correction value Cp. In other words, after the mechanical arm stores the relevant information of the calibration line L55, it starts to execute the task, that is, at the third temperature that is the same as or different from the first temperature or the second temperature, it can use the method of query, according to the third temperature (X axis) Correspondingly detect the current offset (Y axis) to correct the current sensing signal Va_T. In this way, the manipulator can choose not to calculate the correction value Cp through the compensation calculation formula during operation, which can also improve the accuracy of measuring the motor current a. In addition, the computation of the compensation formula is not limited to be performed by the microprocessor 56, and other computing capabilities (such as controllers) with matching capabilities can also handle the same computation.

請參閱第五圖,其為本發明機械手臂在線校正溫度影響之一實施例的流程圖。如圖所示,除了第四圖實施例的依據校正直線L56查詢不同溫度下的校正值Cp外,可以採用第五圖實施例以補償運算式,獲得校正值Cp。於步驟S31開始在線校正程序,即機械手臂(馬達驅動器10)運作下亦同時進行校正。補償運算式可以如上述說明先建立並儲存,或者如步驟S32,當需要時再進行讀取相關資訊,即讀取低(室)溫的電流偏移量O1、溫度資訊T1,與讀取高溫的電流偏移量O2、溫度資訊T2。於步驟S33,依據先前讀取的資訊,而建立機械手臂內電流感測模組50的補償運算式,其為 Y=((O2-O1)/(T2-T1))*X+((O1T2-O2T1)/(T2-T1))。於步驟S34,機械手臂內的溫度感測器53量測環境溫度,而產生相關第三溫度的溫度資訊T3。於步驟S35,將溫度資訊T3帶入上述補償運算式,為Cp=((O2-O1)/(T2-T1))*T3+((O1T2-O2T1)/(T2-T1)),而求出校正值Cp。於步驟S36,電流感測模組50量測馬達電流a而產生電流感測訊號Va_T3,此時的電流感測訊號是於第三溫度下所量測,故標記為Va_T3。於步驟S37,補償於第三溫度下的電流感測訊號Va_T3,即電流感測訊號Va_T3減去受溫度影響的電流偏移量(如校正值Cp)後為Va=Va_T3-Cp,獲得實際的馬達電流a,即降低環境溫度的影響。此外,第五圖實施例是先建立補償運算式,再量測環境的溫度資訊T3,惟實施方式可以改成先量測環境的溫度資訊T3,再建立補償運算式,其為實施例可調整之選擇。 Please refer to FIG. 5 , which is a flow chart of an embodiment of the online temperature correction of the mechanical arm of the present invention. As shown in the figure, in addition to querying the correction value Cp at different temperatures according to the correction line L56 in the embodiment in the fourth figure, the embodiment in the fifth figure can be used to obtain the correction value Cp through the compensation formula. The online calibration procedure starts in step S31, that is, the calibration is also performed while the mechanical arm (motor driver 10) is operating. The compensation calculation formula can be established and stored as described above, or as in step S32, read relevant information when needed, that is, read the current offset O1 and temperature information T1 of the low (room) temperature, and read the high temperature Current offset O2, temperature information T2. In step S33, according to the previously read information, a compensation formula for the current sensing module 50 in the robotic arm is established, which is Y=((O2-O1)/(T2-T1))*X+((O1T2-O2T1)/(T2-T1)). In step S34, the temperature sensor 53 in the robot arm measures the ambient temperature to generate temperature information T3 related to the third temperature. In step S35, bring the temperature information T3 into the above-mentioned compensation formula, which is Cp=((O2-O1)/(T2-T1))*T3+((O1T2-O2T1)/(T2-T1)), and obtain Correction value Cp. In step S36 , the current sensing module 50 measures the motor current a to generate a current sensing signal Va_T3 , and the current sensing signal at this time is measured at the third temperature, so it is marked as Va_T3 . In step S37, the current sensing signal Va_T3 at the third temperature is compensated, that is, the current sensing signal Va_T3 minus the temperature-affected current offset (such as the correction value Cp) is Va=Va_T3-Cp, and the actual The motor current a, that is, the effect of reducing the ambient temperature. In addition, the embodiment in the fifth figure is to establish the compensation calculation formula first, and then measure the temperature information T3 of the environment, but the implementation method can be changed to first measure the temperature information T3 of the environment, and then establish the compensation calculation formula, which is adjustable in the embodiment choice.

綜上所述,本發明馬達驅動器量測一馬達電流而產生一電流感測訊號,及依據一第一溫度、一第一電流偏移量、一第二溫度與一第二電流偏移量校正電流感測訊號。 To sum up, the motor driver of the present invention measures a motor current to generate a current sensing signal, and corrects it according to a first temperature, a first current offset, a second temperature, and a second current offset current sense signal.

或者,馬達驅動器於第一溫度時量測馬達電流且具有該第一電流偏移量,及於第二溫度時量測馬達電流具有第二電流偏移量,依據第一溫度、第一電流偏移量、第二溫度與第二電流偏移量建立一校正直線,而獲得電流感測訊號的一校正值,以校正電流感測訊號。 Alternatively, the motor driver measures the motor current at the first temperature and has the first current offset, and measures the motor current at the second temperature with the second current offset, according to the first temperature, the first current offset The displacement, the second temperature and the second current offset establish a correction straight line to obtain a correction value of the current sensing signal to correct the current sensing signal.

或者,馬達驅動器於執行任務前,於第一溫度時量測馬達電流且具有該第一電流偏移量,及於第二溫度時量測馬達電流且具有第二電流偏移量,並依據第一溫度、第一電流偏移量、第二溫度與第二電流偏移量建立補償運算式。如此,馬達驅動器於執行任務時量測一第三溫度下的 馬達電流而獲得電流感測訊號,並依據第三溫度與補償運算式運算出校正值,而依據校正值校正電流感測訊號。 Or, before the motor driver executes the task, it measures the motor current at the first temperature with the first current offset, and measures the motor current with the second current offset at the second temperature, and according to the first A temperature, the first current offset, the second temperature and the second current offset establish a compensation formula. In this way, the motor driver measures the temperature at a third temperature when performing a task The motor current is used to obtain the current sensing signal, and the correction value is calculated according to the third temperature and the compensation calculation formula, and the current sensing signal is corrected according to the correction value.

上述兩種實施方式皆可以及時偵錯與動態補償馬達電流,而精準控制馬達電流,達到馬達的振動減少。而且,應用於機械手臂亦可以減少手臂的振動現象。 Both of the above two implementations can detect errors in time and dynamically compensate the motor current, and precisely control the motor current to reduce the vibration of the motor. Moreover, the application to the mechanical arm can also reduce the vibration phenomenon of the arm.

以上所述者,僅為用以方便說明本發明之實施例,本發明之範圍不限於該等實施例,凡依本發明所做的任何變更,於不脫離本發明之精神下,皆屬本發明申請專利之範圍。 The above-mentioned ones are only used to illustrate the embodiments of the present invention for convenience. The scope of the present invention is not limited to these embodiments. The scope of patent applications for inventions.

53:溫度感測器 53:Temperature sensor

54:電流感測電路 54: Current sensing circuit

541:電流感知器 541: current sensor

55:數位類比轉換電路 55: Digital to analog conversion circuit

56:微處理器 56: Microprocessor

60:馬達 60: motor

a:馬達電流 a: motor current

ADC1:數位類比轉換電路 ADC1: digital to analog conversion circuit

ADC2:數位類比轉換電路 ADC2: digital to analog conversion circuit

ADC3:數位類比轉換電路 ADC3: digital to analog conversion circuit

b:馬達電流 b: motor current

c:馬達電流 c: motor current

GND:接地電壓 GND: ground voltage

RefV1:參考電壓 RefV1: reference voltage

RefV2:參考電壓 RefV2: reference voltage

RefV3:參考電壓 RefV3: reference voltage

Va_T:電流感測訊號 Va_T: current sensing signal

Vb_T:電流感測訊號 Vb_T: current sensing signal

Vc_T:電流感測訊號 Vc_T: current sensing signal

T:溫度資訊 T: temperature information

Claims (9)

一種機械手臂,其包含一馬達驅動器量測一馬達電流而產生一電流感測訊號,及依據一第一溫度、一第一電流偏移量、一第二溫度與一第二電流偏移量,校正該電流感測訊號。 A mechanical arm, which includes a motor driver to measure a motor current to generate a current sensing signal, and according to a first temperature, a first current offset, a second temperature and a second current offset, Calibrate the current sense signal. 如申請專利範圍第1項所述之機械手臂,其中,該馬達驅動器於該第一溫度時量測該馬達電流具有該第一電流偏移量,於該第二溫度時量測該馬達電流具有該第二電流偏移量,依據該第一溫度、該第一電流偏移量、該第二溫度與該第二電流偏移量建立一補償運算式,依據該補償訊算式獲得該電流感測訊號的一校正值。 The mechanical arm described in item 1 of the scope of the patent application, wherein the motor driver measures the motor current at the first temperature with the first current offset, and measures the motor current at the second temperature with the The second current offset is based on the first temperature, the first current offset, the second temperature and the second current offset to establish a compensation calculation formula, and the current sensing is obtained according to the compensation calculation formula A calibration value of the signal. 如申請專利範圍第1項所述之機械手臂,其中,該馬達驅動器依據該第一溫度、該第一電流偏移量、該第二溫度與該第二電流偏移量建立一校正直線,依據該校正直線校正該電流感測訊號。 The mechanical arm described in item 1 of the scope of the patent application, wherein the motor driver establishes a calibration line based on the first temperature, the first current offset, the second temperature, and the second current offset, according to The calibration straight line corrects the current sensing signal. 如申請專利範圍第1項所述之機械手臂,其中,該馬達驅動器於執行任務前依據該第一溫度、該第一電流偏移量、該第二溫度與該第二電流偏移量建立一補償運算式,該馬達驅動器於執行任務時量測一第三溫度下的該馬達電流而獲得該電流感測訊號,依據該第三溫度與該補償運算式運算出一校正值,依據該校正值校正該電流感測訊號。 The mechanical arm described in item 1 of the scope of the patent application, wherein the motor driver establishes a function according to the first temperature, the first current offset, the second temperature and the second current offset before performing the task. A compensation calculation formula, the motor driver measures the motor current at a third temperature to obtain the current sensing signal when performing a task, calculates a correction value based on the third temperature and the compensation calculation formula, and calculates a correction value based on the correction value Calibrate the current sense signal. 如申請專利範圍第1項所述之機械手臂,其包含: The robotic arm described in item 1 of the scope of the patent application includes: 一電流控制器,於該第一溫度時依據一電流命令輸出一馬達控制電壓,而控制該馬達電流; a current controller, outputting a motor control voltage according to a current command at the first temperature to control the motor current; 一電流感測電路,量測該馬達電流而產生該第一溫度下的該電流感測訊號;及 a current sensing circuit measuring the motor current to generate the current sensing signal at the first temperature; and 一微處理器,運算該電流命令與該電流感測訊號,而產生該第一電流偏移量。 A microprocessor calculates the current command and the current sensing signal to generate the first current offset. 如申請專利範圍第5項所述之機械手臂,其中,該電流控制器於該第二溫度時依據該電流命令輸出該馬達控制電壓,而控制該馬達電流,該電流感測電路量測該馬達電流而產生該第二溫度下的該電流感測訊號,該微處理器運算該電流命令與該電流感測訊號而產生該第二電流偏移量。 The mechanical arm described in item 5 of the scope of the patent application, wherein the current controller outputs the motor control voltage according to the current command at the second temperature to control the motor current, and the current sensing circuit measures the motor The current is used to generate the current sensing signal at the second temperature, and the microprocessor calculates the current command and the current sensing signal to generate the second current offset. 如申請專利範圍第6項所述之機械手臂,其包含: The robotic arm described in item 6 of the scope of the patent application includes: 一溫度感測器,量測該第一溫度與該第二溫度,而產生一第一溫度資訊與一第二溫度資訊; a temperature sensor for measuring the first temperature and the second temperature to generate a first temperature information and a second temperature information; 其中,該馬達驅動器儲存該第一溫度資訊、該第二溫度資訊、該第一電流偏移量與該第二電流偏移量。 Wherein, the motor driver stores the first temperature information, the second temperature information, the first current offset and the second current offset. 如申請專利範圍第7項所述之機械手臂,其包含: The robotic arm described in item 7 of the scope of the patent application includes: 一數位類比轉換電路,耦接該電流感測電路,轉換該電流感測訊號為一類比訊號; A digital-to-analog conversion circuit, coupled to the current sensing circuit, converts the current sensing signal into an analog signal; 該微處理器,依據該電流命令與不同溫度量測到的該電流感測訊號而運算出該第一電流偏移量與該第二電流偏移量,並儲存該第一溫度資訊與該第二溫度資訊,及儲存該第一電流偏移量與該第二電流偏移量,以產生一校正值校正於一第三溫度下的該電流感測訊號,而產生一回授訊號; The microprocessor calculates the first current offset and the second current offset according to the current command and the current sensing signals measured at different temperatures, and stores the first temperature information and the second current offset. 2 temperature information, and store the first current offset and the second current offset to generate a correction value to correct the current sensing signal at a third temperature, and generate a feedback signal; 一電流運算電路,接收該回授訊號與一速度控制訊號而產生一電流運算訊號;及 A current calculation circuit, receiving the feedback signal and a speed control signal to generate a current calculation signal; and 該電流控制器,依據該電流運算訊號產生該馬達控制電壓,而調整該馬達電流。 The current controller generates the motor control voltage according to the current operation signal to adjust the motor current. 如申請專利範圍第8項所述之機械手臂,其包含: The robotic arm described in item 8 of the scope of the patent application includes: 一編碼器,偵測一馬達轉動位置,產生一馬達位置訊號; An encoder, which detects the rotational position of a motor and generates a motor position signal; 一速度計算器,耦接該編碼器,依據該馬達位置訊號產生一馬達速度訊號; A speed calculator, coupled to the encoder, generates a motor speed signal according to the motor position signal; 一位置控制模組,包含一第一運算電路與一位置控制器,該第一運算電路接收該電流命令與該馬達位置訊號而產生一第一運算訊號,該位置控制器依據該第一運算訊號產生一位置控制訊號;及 A position control module, including a first computing circuit and a position controller, the first computing circuit receives the current command and the motor position signal to generate a first computing signal, the position controller according to the first computing signal generating a position control signal; and 一速度控制模組,包含一第二運算電路與一速度控制器,該第二運算電路接收該位置控制訊號與該馬達速度訊號而產生一第二運算訊號,該速度控制器依據該第二運算訊號產生該速度控制訊號。 A speed control module, including a second computing circuit and a speed controller, the second computing circuit receives the position control signal and the motor speed signal to generate a second computing signal, the speed controller according to the second computing signal to generate the speed control signal.
TW110139412A 2021-10-21 2021-10-21 Robotic arm equipment with improvement accuracy of measurement TWI853191B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW110139412A TWI853191B (en) 2021-10-21 Robotic arm equipment with improvement accuracy of measurement
CN202210915190.4A CN116015152A (en) 2021-10-21 2022-08-01 Motor driver for improving measurement accuracy and mechanical arm thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110139412A TWI853191B (en) 2021-10-21 Robotic arm equipment with improvement accuracy of measurement

Publications (2)

Publication Number Publication Date
TW202317336A true TW202317336A (en) 2023-05-01
TWI853191B TWI853191B (en) 2024-08-21

Family

ID=

Also Published As

Publication number Publication date
CN116015152A (en) 2023-04-25

Similar Documents

Publication Publication Date Title
US10491827B2 (en) Actuator driver, imaging device and calibration method
JPWO2016104378A1 (en) POSITION ESTIMATION METHOD AND POSITION CONTROL DEVICE
CN112066863B (en) Moving-coil linear motor position calibration device and method
JPH0667716A (en) Device and method for numerical control
JP5469053B2 (en) Position speed controller
US9438147B2 (en) Position detecting apparatus and driving system
CN113726258B (en) Measurement and compensation method for internal signal transmission delay of magnetic encoder
TWI853191B (en) Robotic arm equipment with improvement accuracy of measurement
TW202317336A (en) Motor driver with improvement accuracy of measurement and robotic arm thereof
JP5803173B2 (en) Robot control apparatus and calibration method
US10254137B2 (en) Photoelectric encoder for deconcentrating calculation load and reducing power consumption and measuring instrument including thereof
TWI397792B (en) On-line compensation apparatus for feedback position of encoder and method for operating the same
US10044299B2 (en) Motor driving device
CN114089694A (en) Position correction method and apparatus, storage medium, servo driver, servo system
CN114503425A (en) Motor control device and motor control method
JP4223324B2 (en) Optical encoder
TWI826820B (en) Robotic arm
JP2004108959A (en) Shape measuring apparatus
JP2005005913A (en) Ad conversion method and device thereof
JP2002271160A (en) Equipment and method for detecting and correcting matching point distance
JP2002048595A (en) Calibration method for sensor
JP5877323B2 (en) Optical absolute encoder and device
US11188174B2 (en) Control apparatus
JPH0771954A (en) Method and device for measuring flatness of disc
JPH0740269A (en) Industrial robot origin adjusting method and device therefor