CN111649769A - A multi-turn method of using a single-turn magnetic encoder at the end of a robot joint - Google Patents
A multi-turn method of using a single-turn magnetic encoder at the end of a robot joint Download PDFInfo
- Publication number
- CN111649769A CN111649769A CN202010434522.8A CN202010434522A CN111649769A CN 111649769 A CN111649769 A CN 111649769A CN 202010434522 A CN202010434522 A CN 202010434522A CN 111649769 A CN111649769 A CN 111649769A
- Authority
- CN
- China
- Prior art keywords
- turn
- magnetic encoder
- module
- data
- turn magnetic
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 14
- 238000001514 detection method Methods 0.000 claims description 4
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01D—MEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
- G01D5/00—Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
- G01D5/12—Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
- G01D5/244—Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains
- G01D5/249—Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing characteristics of pulses or pulse trains; generating pulses or pulse trains using pulse code
- G01D5/2497—Absolute encoders
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Manipulator (AREA)
Abstract
本发明公开了一种机器人关节末端单圈磁编码器的多圈使用方法,属于机器人术领域,建立参数读取模块、位置分析模块、计算模块和存储模块;解决了单圈磁编码器无法进行多圈判断的技术问题,本发明硬件少,易于实现,成本低,精度高。
The invention discloses a multi-turn using method of a single-turn magnetic encoder at the end of a robot joint, which belongs to the field of robotics and establishes a parameter reading module, a position analysis module, a calculation module and a storage module; For the technical problem of multi-turn judgment, the present invention has less hardware, is easy to implement, has low cost and high precision.
Description
技术领域technical field
本发明属于机器人技术领域,尤其涉及一种机器人关节末端单圈磁编码器的多圈使用方法。The invention belongs to the technical field of robots, and in particular relates to a multi-turn using method of a single-turn magnetic encoder at the end of a robot joint.
背景技术Background technique
目前机器人关节上的使用的均是绝对式磁编码器,用于控制关节位置,但是大多数磁编码器都是单圈(即只可以感知一圈之内的绝对角位置)。而对于某些应用场合,比如转动的角度超过360度时,单圈不能满足要求,而采用多圈磁编码器,其成本会大大增加。At present, absolute magnetic encoders are used on robot joints to control the joint position, but most magnetic encoders are single-turn (that is, they can only sense the absolute angular position within one turn). For some applications, such as when the rotation angle exceeds 360 degrees, a single turn cannot meet the requirements, and the cost of a multi-turn magnetic encoder will be greatly increased.
发明内容SUMMARY OF THE INVENTION
本发明的目的是提供一种机器人关节末端单圈磁编码器的多圈使用方法,解决了单圈磁编码器无法进行多圈判断的技术问题。The purpose of the present invention is to provide a multi-turn using method of a single-turn magnetic encoder at the end of a robot joint, which solves the technical problem that the single-turn magnetic encoder cannot perform multi-turn judgment.
为实现上述目的,本发明采用如下技术方案:To achieve the above object, the present invention adopts the following technical solutions:
一种机器人关节末端单圈磁编码器的多圈使用方法,包括如下步骤:A multi-turn method for using a single-turn magnetic encoder at the end of a robot joint, comprising the following steps:
步骤1:建立参数读取模块、位置分析模块、计算模块和存储模块;参数读取模块用于读取单圈磁编码器的位置编码数据Qt,其中Q为位置编码数据,t为时间戳;位置分析模块用于分析位置编码数据Qt;计算模块用于对当前位置编码数据进行圈数计算;Step 1: establish a parameter reading module, a position analysis module, a calculation module and a storage module; the parameter reading module is used to read the position encoding data Q t of the single-turn magnetic encoder, where Q is the position encoding data, and t is the time stamp ; The position analysis module is used to analyze the position coded data Q t ; The calculation module is used to calculate the number of turns for the current position coded data;
步骤2:参数读取模块按时间顺序读取单圈磁编码器的位置编码数据;Step 2: The parameter reading module reads the position coding data of the single-turn magnetic encoder in time sequence;
步骤3:位置分析模块根据当前的位置编码数据Qt和前一时刻的位置编码数据Qt-1之差来计算出位置变化参数;Step 3: the position analysis module calculates the position change parameter according to the difference between the current position coding data Q t and the position coding data Q t-1 at the previous moment;
步骤4:位置分析模块设定一个位置变化常量,判断位置变化参数是否大于位置变化常量:是,则执行步骤5;否,则执行步骤6;Step 4: The position analysis module sets a position change constant, and judges whether the position change parameter is greater than the position change constant: yes, go to step 5; no, go to step 6;
步骤5:位置分析模块判定此时单圈磁编码器为反转,记录转动圈数减一,执行步骤7;Step 5: The position analysis module determines that the single-turn magnetic encoder is reversed at this time, and the number of recorded rotations is subtracted by one, and step 7 is executed;
步骤6:位置分析模块判定此时单圈磁编码器为正转,记录转动圈数加一,执行步骤7;Step 6: The position analysis module determines that the single-turn magnetic encoder is rotating forward at this time, record the number of rotations plus one, and execute Step 7;
步骤7:计算模块根据以下公式计算连续的位置数据Qm:Step 7: The calculation module calculates the continuous position data Q m according to the following formula:
Qm=Nloop×65535+Qt;Q m =N loop ×65535+Q t ;
其中,Nloop为转动圈数,Qt为单圈磁编码器的位置编码数据;Among them, N loop is the number of rotations, and Q t is the position encoding data of the single-turn magnetic encoder;
步骤8:将计算出的连续的位置数据Qm作为位置PID的反馈值,参与到机器人关节末端单圈磁编码器的多圈检测计算中;Step 8: Use the calculated continuous position data Q m as the feedback value of the position PID, and participate in the multi-turn detection calculation of the single-turn magnetic encoder at the end of the robot joint;
步骤9:记录转动圈数Nloop,并存储到存储模块中,下次上电后,读取存储模块中的圈数值参与计算模块对连续的位置数据Qm的计算。Step 9: Record the number of rotations N loop and store it in the storage module. After the next power-on, read the circle value in the storage module and participate in the calculation of the continuous position data Q m by the calculation module.
优选的,所述存储模块为EEPROM模块。Preferably, the storage module is an EEPROM module.
优选的,在执行步骤4时,所述位置变化常量的值不大于单圈磁编码器输出的最大编码值。Preferably, when step 4 is performed, the value of the position change constant is not greater than the maximum encoding value output by the single-turn magnetic encoder.
本发明所述的一种机器人关节末端单圈磁编码器的多圈使用方法,解决了单圈磁编码器无法进行多圈判断的技术问题,本发明硬件少,易于实现,成本低,精度高。The multi-turn use method of the single-turn magnetic encoder at the end of a robot joint according to the present invention solves the technical problem that the single-turn magnetic encoder cannot perform multi-turn judgment. The invention has few hardware, is easy to implement, low in cost and high in precision. .
附图说明Description of drawings
图1是本发明的流程图。Figure 1 is a flow chart of the present invention.
具体实施方式Detailed ways
如图1所示的一种机器人关节末端单圈磁编码器的多圈使用方法,包括如下步骤:As shown in Figure 1, a multi-turn method of using a single-turn magnetic encoder at the end of a robot joint includes the following steps:
步骤1:建立参数读取模块、位置分析模块、计算模块和存储模块;参数读取模块用于读取单圈磁编码器的位置编码数据Qt,其中Q为位置编码数据,t为时间戳;位置分析模块用于分析位置编码数据Qt;计算模块用于对当前位置编码数据进行圈数计算;Step 1: establish a parameter reading module, a position analysis module, a calculation module and a storage module; the parameter reading module is used to read the position encoding data Q t of the single-turn magnetic encoder, where Q is the position encoding data, and t is the time stamp ; The position analysis module is used to analyze the position coded data Q t ; The calculation module is used to calculate the number of turns for the current position coded data;
在本实施例中,参数读取模块、位置分析模块和计算模块均设置在同一个MCU中或PLC控制器中。In this embodiment, the parameter reading module, the position analysis module and the calculation module are all set in the same MCU or PLC controller.
读取单圈磁编码器位置,判断其当前值与前一时刻值变化量,根据机器人关节运动速度,设置合适的增量值,以为机器人关节速度一般不会过快,如果位置值突变较大,则可认为关节末端运动到了第二圈,此时可以设置圈数变量,记住圈数。Read the position of the single-turn magnetic encoder, judge the change between its current value and the value at the previous moment, and set an appropriate incremental value according to the movement speed of the robot joint, so that the robot joint speed is generally not too fast, if the position value changes greatly , it can be considered that the end of the joint has moved to the second circle. At this time, you can set the number of circles variable and remember the number of circles.
步骤2:参数读取模块按时间顺序读取单圈磁编码器的位置编码数据;Step 2: The parameter reading module reads the position coding data of the single-turn magnetic encoder in time sequence;
步骤3:位置分析模块根据当前的位置编码数据Qt和前一时刻的位置编码数据Qt-1之差来计算出位置变化参数;Step 3: the position analysis module calculates the position change parameter according to the difference between the current position coding data Q t and the position coding data Q t-1 at the previous moment;
步骤4:位置分析模块设定一个位置变化常量,判断位置变化参数是否大于位置变化常量:是,则执行步骤5;否,则执行步骤6;Step 4: The position analysis module sets a position change constant, and judges whether the position change parameter is greater than the position change constant: yes, go to step 5; no, go to step 6;
步骤5:位置分析模块判定此时单圈磁编码器为反转,记录转动圈数减一,执行步骤7;Step 5: The position analysis module determines that the single-turn magnetic encoder is reversed at this time, and the number of recorded rotations is subtracted by one, and step 7 is executed;
步骤6:位置分析模块判定此时单圈磁编码器为正转,记录转动圈数加一,执行步骤7;Step 6: The position analysis module determines that the single-turn magnetic encoder is rotating forward at this time, record the number of rotations plus one, and execute Step 7;
步骤7:计算模块根据以下公式计算连续的位置数据Qm:Step 7: The calculation module calculates the continuous position data Q m according to the following formula:
Qm=Nloop×65535+Qt;Q m =N loop ×65535+Q t ;
其中,Nloop为转动圈数,Qt为单圈磁编码器的位置编码数据;Among them, N loop is the number of rotations, and Q t is the position encoding data of the single-turn magnetic encoder;
步骤8:将计算出的连续的位置数据Qm作为位置PID的反馈值,参与到机器人关节末端单圈磁编码器的多圈检测计算中;Step 8: Use the calculated continuous position data Q m as the feedback value of the position PID, and participate in the multi-turn detection calculation of the single-turn magnetic encoder at the end of the robot joint;
步骤9:记录转动圈数Nloop,并存储到存储模块中,下次上电后,读取存储模块中的圈数值参与计算模块对连续的位置数据Qm的计算。Step 9: Record the number of rotations N loop and store it in the storage module. After the next power-on, read the cycle value in the storage module and participate in the calculation of the continuous position data Qm by the calculation module.
本实施例以16位单圈磁编码器为例说明,16位的单圈磁编码器转动一圈其脉冲值在0~65535内变化,也就是无论转动多少圈,其值均在0~65535内,但实际使用中,如果需要某个关节转动多圈,此时,单纯的使用单圈磁编码器的值已不能满足,且不能判断关节转动了几圈,因此需要采取本发明的方法,使关节转动的实际圈数(及角度)能够正确反映出来:In this embodiment, a 16-bit single-turn magnetic encoder is used as an example to illustrate that the pulse value of a 16-bit single-turn magnetic encoder varies within 0 to 65535 after one rotation. However, in actual use, if a certain joint needs to be rotated for many times, at this time, the value of simply using a single-turn magnetic encoder cannot be satisfied, and it is impossible to judge how many times the joint has rotated. Therefore, the method of the present invention needs to be adopted. Make the actual number of turns (and angle) of the joint to reflect correctly:
单圈磁编码器的输出只在0~65535之间切换,正向运动时,如果设定值大于65535,此时不加以处理,位置始终达不到设定值,负向运动同理。因此需要对编码器的输出值进行处理(多圈检测)。The output of the single-turn magnetic encoder only switches between 0 and 65535. During the forward motion, if the set value is greater than 65535, it will not be processed at this time, and the position will never reach the set value, and the same is true for the negative motion. Therefore, it is necessary to process the output value of the encoder (multi-turn detection).
在本实施例中,因无论正转情况下由65535突变到0,还是反转由0突变到65535,其变化率都在±32768之上,因此可选用±32768作为位置变化常量,防止其他情况出现。In this embodiment, the rate of change is above ±32768 regardless of whether it changes from 65535 to 0 in forward rotation or from 0 to 65535 in reverse rotation. Therefore, ±32768 can be selected as the position change constant to prevent other situations. Appear.
正向运动检测到变化率小于-32768后,圈数加1,此时计算位置时,使用当前读取的单圈磁编码器输出的编码值Qt加上圈数Nloop乘以65535,计算得到连续变化的位置数据Qm;When the forward motion detects that the change rate is less than -32768, the number of loops is increased by 1. When calculating the position, use the code value Q t output by the currently read single-turn magnetic encoder plus the number of loops N loop multiplied by 65535 to calculate obtain continuously changing position data Q m ;
正向运动检测到变化率大于32768后,圈数减1,此时计算位置时,使用当前读取的单圈磁编码器输出的编码值Qt加上圈数Nloop乘以65535,计算得到连续变化的位置数据Qm。When the forward motion detects that the change rate is greater than 32768, the number of loops is reduced by 1. When calculating the position, the code value Q t output by the currently read single-turn magnetic encoder is used plus the number of loops N loop multiplied by 65535, and the calculation is obtained. Continuously changing position data Q m .
优选的,所述存储模块为EEPROM模块。Preferably, the storage module is an EEPROM module.
优选的,在执行步骤4时,所述位置变化常量的值不大于单圈磁编码器输出的最大编码值,所述位置变化常量的值由最大转速而定。Preferably, when step 4 is performed, the value of the position change constant is not greater than the maximum encoding value output by the single-turn magnetic encoder, and the value of the position change constant is determined by the maximum rotational speed.
本发明所述的一种机器人关节末端单圈磁编码器的多圈使用方法,解决了单圈磁编码器无法进行多圈判断的技术问题,本发明硬件少,易于实现,成本低,精度高。The multi-turn use method of the single-turn magnetic encoder at the end of a robot joint according to the present invention solves the technical problem that the single-turn magnetic encoder cannot perform multi-turn judgment. The invention has few hardware, is easy to implement, low in cost and high in precision. .
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010434522.8A CN111649769A (en) | 2020-05-21 | 2020-05-21 | A multi-turn method of using a single-turn magnetic encoder at the end of a robot joint |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010434522.8A CN111649769A (en) | 2020-05-21 | 2020-05-21 | A multi-turn method of using a single-turn magnetic encoder at the end of a robot joint |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111649769A true CN111649769A (en) | 2020-09-11 |
Family
ID=72343442
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010434522.8A Pending CN111649769A (en) | 2020-05-21 | 2020-05-21 | A multi-turn method of using a single-turn magnetic encoder at the end of a robot joint |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111649769A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113267204A (en) * | 2021-05-28 | 2021-08-17 | 中国电子科技集团公司第三十八研究所 | Rotary table rotation angle coding system capable of rotating for multiple circles |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN203964927U (en) * | 2014-06-24 | 2014-11-26 | 王峰 | Multi-turn absolute value encoder |
US20150369636A1 (en) * | 2013-01-11 | 2015-12-24 | Jiangsu Multidimensional Technology Co., Ltd | Multi-turn absolute magnetic encoder |
CN105716634A (en) * | 2016-04-03 | 2016-06-29 | 长春汇通光电技术有限公司 | Multi-turn encoder adopting reed pipes and direction judging and turn-number counting method thereof |
CN205482991U (en) * | 2016-04-03 | 2016-08-17 | 长春汇通光电技术有限公司 | Adopt many rings of encoders of tongue tube |
CN106774451A (en) * | 2016-12-31 | 2017-05-31 | 深圳市优必选科技有限公司 | Multi-turn angle control method and device based on magnetic coding |
CN206479188U (en) * | 2017-02-24 | 2017-09-08 | 长春键坤联合科技发展有限公司 | Multi-turn modular converter and encoder |
CN108844558A (en) * | 2018-06-29 | 2018-11-20 | 上海共久电气有限公司 | A method of realizing that de-energized is remembered using individual pen absolute value encoder |
-
2020
- 2020-05-21 CN CN202010434522.8A patent/CN111649769A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150369636A1 (en) * | 2013-01-11 | 2015-12-24 | Jiangsu Multidimensional Technology Co., Ltd | Multi-turn absolute magnetic encoder |
CN203964927U (en) * | 2014-06-24 | 2014-11-26 | 王峰 | Multi-turn absolute value encoder |
CN105716634A (en) * | 2016-04-03 | 2016-06-29 | 长春汇通光电技术有限公司 | Multi-turn encoder adopting reed pipes and direction judging and turn-number counting method thereof |
CN205482991U (en) * | 2016-04-03 | 2016-08-17 | 长春汇通光电技术有限公司 | Adopt many rings of encoders of tongue tube |
CN106774451A (en) * | 2016-12-31 | 2017-05-31 | 深圳市优必选科技有限公司 | Multi-turn angle control method and device based on magnetic coding |
CN206479188U (en) * | 2017-02-24 | 2017-09-08 | 长春键坤联合科技发展有限公司 | Multi-turn modular converter and encoder |
CN108844558A (en) * | 2018-06-29 | 2018-11-20 | 上海共久电气有限公司 | A method of realizing that de-energized is remembered using individual pen absolute value encoder |
Non-Patent Citations (1)
Title |
---|
XIAYUFENG520: "算法:单圈绝对值编码器处理成多圈的", 《CSDN:HTTPS://BLOG.CSDN.NET/XIAYUFENG520/ARTICLE/DETAILS/89420131》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113267204A (en) * | 2021-05-28 | 2021-08-17 | 中国电子科技集团公司第三十八研究所 | Rotary table rotation angle coding system capable of rotating for multiple circles |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104742127B (en) | The control method and robot of a kind of robot | |
CN112847334B (en) | Mechanical arm target tracking method based on visual servo | |
CN109849046B (en) | Zero returning method and zero returning system of steering engine rotor, steering engine and robot | |
CN104133424A (en) | Industrial robot linear interpolation method based on programmable logic controller | |
US6701212B2 (en) | Lost motion correction system and lost motion correction method for numerical control machine tool | |
CN108731707B (en) | Method and device for measuring absolute position by double-increment type encoder | |
CN111775145B (en) | A Control System of a Series-Parallel Robot | |
CN107263543A (en) | The calibration method and computing device of a kind of joint of robot | |
WO1991009358A1 (en) | Servo motor control method | |
JPS59111502A (en) | Robot controller | |
US11340614B2 (en) | Robot and method and apparatus of controlling movement of transport robot | |
CN102929207A (en) | Optimization method of control parameters of servo system of numerical controlled machine tool | |
CN111649769A (en) | A multi-turn method of using a single-turn magnetic encoder at the end of a robot joint | |
CN105159205B (en) | High-speed position capturing implementation method and device applied to motion controller | |
JP6103927B2 (en) | Position detection device, drive control device, and lens device | |
CN109782815B (en) | Adaptive measurement path planning method for complex profiles based on multi-axis linkage system | |
CN111687838A (en) | Online compensation method and system for manipulator track following error and storage medium | |
CN110891741A (en) | Control of a robot cell | |
US20210279518A1 (en) | Learning method, learning system, and learning program | |
CN114543643A (en) | Position calculation method of mechanical multi-turn encoder | |
CN111113411A (en) | Robot control method and system based on two-dimensional code recognition and robot | |
CN115452027A (en) | Encoder zero adjustment method and system, and computer-readable storage medium | |
CN106774451A (en) | Multi-turn angle control method and device based on magnetic coding | |
WO1989002111A1 (en) | Involute interpolation system | |
CN115008468B (en) | A robot arm attitude speed planning control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200911 |