Multi-circle using method of robot joint tail end single-circle magnetic encoder

文档序号:1239549 发布日期:2020-09-11 浏览:24次 中文

阅读说明:本技术 一种机器人关节末端单圈磁编码器的多圈使用方法 (Multi-circle using method of robot joint tail end single-circle magnetic encoder ) 是由 康淼淼 骆敏舟 吴海波 辛艳峰 张华东 崔玮心 王永 徐乃瑞 于 2020-05-21 设计创作,主要内容包括:本发明公开了一种机器人关节末端单圈磁编码器的多圈使用方法,属于机器人术领域,建立参数读取模块、位置分析模块、计算模块和存储模块;解决了单圈磁编码器无法进行多圈判断的技术问题,本发明硬件少,易于实现,成本低,精度高。(The invention discloses a multi-circle using method of a robot joint tail end single-circle magnetic encoder, which belongs to the field of robotics and comprises the steps of establishing a parameter reading module, a position analysis module, a calculation module and a storage module; the invention solves the technical problem that a single-circle magnetic encoder cannot perform multi-circle judgment, and has the advantages of less hardware, easy realization, low cost and high precision.)

1. A multi-circle using method of a robot joint tail end single-circle magnetic encoder is characterized in that: the method comprises the following steps:

step 1: establishing a parameter reading module, a position analysis module, a calculation module and a storage module; the parameter reading module is used for reading the position coded data Q of the single-turn magnetic encodertWherein Q is position encoding data and t is a time stamp; the position analysis module is used for analyzing position coded data Qt(ii) a The calculation module is used for calculating the number of turns of the current position coded data;

step 2: the parameter reading module reads position coding data of the single-turn magnetic encoder according to a time sequence;

and step 3: the position analysis module encodes data Q according to the current positiontAnd position coded data Q of the previous timet-1Calculating a position variation parameter from the difference;

and 4, step 4: the position analysis module sets a position change constant and judges whether the position change parameter is larger than the position change constant: if yes, executing step 5; if not, executing the step 6;

and 5: the position analysis module judges that the single-turn magnetic encoder is in reverse rotation at the moment, records that the number of turns is reduced by one, and executes the step 7;

step 6: the position analysis module judges that the single-turn magnetic encoder rotates forwards at the moment, records the number of rotation turns and adds one, and executes the step 7;

and 7: the calculation module calculates continuous position data Q according to the following formulam

Qm=Nloop×65535+Qt

Wherein N isloopFor number of turns, QtEncoding data for the position of a single-turn magnetic encoder;

and 8: calculating continuous position data QmThe position PID feedback value is used for participating in multi-turn detection calculation of a single-turn magnetic encoder at the tail end of the robot joint;

and step 9: recording the number of turns NloopAnd storeIn the storage module, after the next power-on, reading the turn number value in the storage module and participating in the calculation module to continuous position data QmAnd (4) calculating.

2. The multi-turn use method of the robot joint end single-turn magnetic encoder as claimed in claim 1, characterized in that: the storage module is an EEPROM module.

3. The multi-turn use method of the robot joint end single-turn magnetic encoder as claimed in claim 1, characterized in that: in executing step 4, the value of the position change constant is not larger than the maximum encoding value output by the single-turn magnetic encoder.

Technical Field

The invention belongs to the technical field of robots, and particularly relates to a multi-circle using method of a robot joint tail end single-circle magnetic encoder.

Background

The current use of absolute magnetic encoders on robotic joints is for controlling joint position, but most magnetic encoders are single-turn (i.e., can only sense absolute angular position within one turn). For some applications, for example, when the rotation angle exceeds 360 degrees, a single turn cannot meet the requirement, and the cost is greatly increased by adopting a multi-turn magnetic encoder.

Disclosure of Invention

The invention aims to provide a multi-turn using method of a single-turn magnetic encoder at the tail end of a robot joint, and solves the technical problem that the single-turn magnetic encoder cannot judge the multi-turn.

In order to achieve the purpose, the invention adopts the following technical scheme:

a multi-circle using method of a robot joint tail end single-circle magnetic encoder comprises the following steps:

step 1: establishing a parameter reading module, a position analysis module, a calculation module and a storage module; the parameter reading module is used for reading the position coded data Q of the single-turn magnetic encodertWherein Q is position encoding data and t is a time stamp; the position analysis module is used for analyzing position coded data Qt(ii) a The calculation module is used for calculating the number of turns of the current position coded data;

step 2: the parameter reading module reads position coding data of the single-turn magnetic encoder according to a time sequence;

and step 3: the position analysis module encodes data Q according to the current positiontAnd position coded data Q of the previous timet-1Calculating a position variation parameter from the difference;

and 4, step 4: the position analysis module sets a position change constant and judges whether the position change parameter is larger than the position change constant: if yes, executing step 5; if not, executing the step 6;

and 5: the position analysis module judges that the single-turn magnetic encoder is in reverse rotation at the moment, records that the number of turns is reduced by one, and executes the step 7;

step 6: the position analysis module judges that the single-turn magnetic encoder rotates forwards at the moment, records the number of rotation turns and adds one, and executes the step 7;

and 7: computing moduleCalculating continuous position data Q according to the following formulam

Qm=Nloop×65535+Qt

Wherein N isloopFor number of turns, QtEncoding data for the position of a single-turn magnetic encoder;

and 8: calculating continuous position data QmThe position PID feedback value is used for participating in multi-turn detection calculation of a single-turn magnetic encoder at the tail end of the robot joint;

and step 9: recording the number of turns NloopAnd storing the position data into a storage module, reading the turn number value in the storage module after next power-on, participating in the continuous position data Q of the calculation modulemAnd (4) calculating.

Preferably, the storage module is an EEPROM module.

Preferably, when step 4 is performed, the value of the position change constant is not greater than the maximum encoded value output by the single-turn magnetic encoder.

The multi-turn using method of the robot joint tail end single-turn magnetic encoder solves the technical problem that the single-turn magnetic encoder cannot judge the multi-turn, and is few in hardware, easy to realize, low in cost and high in precision.

Drawings

FIG. 1 is a flow chart of the present invention.

Detailed Description

The multi-turn using method of the robot joint tail end single-turn magnetic encoder shown in the figure 1 comprises the following steps:

step 1: establishing a parameter reading module, a position analysis module, a calculation module and a storage module; the parameter reading module is used for reading the position coded data Q of the single-turn magnetic encodertWherein Q is position encoding data and t is a time stamp; the position analysis module is used for analyzing position coded data Qt(ii) a The calculation module is used for calculating the number of turns of the current position coded data;

in this embodiment, the parameter reading module, the position analyzing module and the calculating module are all disposed in the same MCU or the PLC controller.

Reading the position of the single-turn magnetic encoder, judging the current value and the value variation of the previous moment, setting a proper increment value according to the joint movement speed of the robot, so that the joint speed of the robot is generally not too high, if the position value mutation is large, the tail end of the joint can be considered to move to a second turn, and at the moment, a turn number variable can be set to remember the turn number.

Step 2: the parameter reading module reads position coding data of the single-turn magnetic encoder according to a time sequence;

and step 3: the position analysis module encodes data Q according to the current positiontAnd position coded data Q of the previous timet-1Calculating a position variation parameter from the difference;

and 4, step 4: the position analysis module sets a position change constant and judges whether the position change parameter is larger than the position change constant: if yes, executing step 5; if not, executing the step 6;

and 5: the position analysis module judges that the single-turn magnetic encoder is in reverse rotation at the moment, records that the number of turns is reduced by one, and executes the step 7;

step 6: the position analysis module judges that the single-turn magnetic encoder rotates forwards at the moment, records the number of rotation turns and adds one, and executes the step 7;

and 7: the calculation module calculates continuous position data Q according to the following formulam

Qm=Nloop×65535+Qt

Wherein N isloopFor number of turns, QtEncoding data for the position of a single-turn magnetic encoder;

and 8: calculating continuous position data QmThe position PID feedback value is used for participating in multi-turn detection calculation of a single-turn magnetic encoder at the tail end of the robot joint;

and step 9: recording the number of turns NloopAnd storing the position data into a storage module, and reading the turn number value in the storage module to participate in the calculation of the continuous position data Qm by the calculation module after the next power-on.

In this embodiment, a 16-bit single-turn magnetic encoder is taken as an example, a pulse value of a 16-bit single-turn magnetic encoder rotating a circle changes within 0 to 65535, that is, the pulse value is within 0 to 65535 no matter how many turns the encoder rotates, but in practical use, if a certain joint needs to rotate a plurality of turns, at this time, the value of the single-turn magnetic encoder used alone cannot be satisfied, and the joint cannot be judged to rotate several turns, so that the method of the present invention needs to be adopted, so that the actual number of turns (and angle) of the joint rotation can be correctly reflected:

the output of the single-turn magnetic encoder is only switched between 0 and 65535, when the single-turn magnetic encoder moves in the positive direction, if the set value is larger than 65535, the single-turn magnetic encoder does not process the set value at the moment, the position of the single-turn magnetic encoder does not reach the set value all the time, and the negative movement is the same. The output values of the encoder need to be processed (multi-turn detection).

In the embodiment, the change rate is over +/-32768 no matter the forward rotation is suddenly changed from 65535 to 0 or the reverse rotation is suddenly changed from 0 to 65535, so that +/-32768 can be selected as the position change constant to prevent other conditions from occurring.

After the forward motion detects that the change rate is less than-32768, the number of turns is added with 1, and when the position is calculated, the currently read encoding value Q output by the single-turn magnetic encoder is usedtPlus the number of turns NloopMultiplying 65535 to calculate continuously changing position data Qm

After the forward motion detection change rate is larger than 32768, the number of turns is reduced by 1, and when the position is calculated, the currently read encoding value Q output by the single-turn magnetic encoder is usedtPlus the number of turns NloopMultiplying 65535 to calculate continuously changing position data Qm

Preferably, the storage module is an EEPROM module.

Preferably, in the step 4, 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 rotation speed.

The multi-turn using method of the robot joint tail end single-turn magnetic encoder solves the technical problem that the single-turn magnetic encoder cannot judge the multi-turn, and is few in hardware, easy to realize, low in cost and high in precision.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种铁路货车海关锁检测装置及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类