Position feedback data processing method

By acquiring and analyzing encoder position data, and combining range thresholds and direction determination, the multi-turn cumulative position counter is updated, solving the problem of single-turn encoder boundary misjudgment. This achieves high-precision, low-cost position feedback, improving the stability and safety of robot motion.

CN121576979APending Publication Date: 2026-02-27NANJING ENCOS INTELLIGENT TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202610063492.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-19
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing single-turn encoders are prone to misinterpreting a change in motion direction when a moving object crosses the boundary of a single turn, resulting in serious deviations in the cumulative angle and position calculation results, affecting motion accuracy and potentially causing equipment damage or personal injury. Multi-turn encoders have complex structures and high costs, making them difficult to apply in cost-sensitive or space-constrained scenarios.

Method used

By acquiring the single-cycle position data of the encoder in the current and previous sampling periods, and combining the single-cycle range threshold and crossing direction, the number of cycles of the cumulative position is updated. The validity verification and physical constraints are used to determine crossing events, ensuring the stability and reliability of position feedback.

Benefits of technology

While reducing costs and simplifying the structure, it improves the stability and accuracy of moving object position detection, ensuring the reliability and safety of robot posture control and trajectory following under complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121576979A_ABST
    Figure CN121576979A_ABST
Patent Text Reader

Abstract

The invention provides a position feedback data processing method. According to the method, current single-circle position data of an encoder on a moving object and single-circle position data of a previous sampling period are obtained, and then whether a single-circle boundary crossing event occurs or not is determined according to a difference value between the current single-circle position data and the single-circle position data of the previous sampling period in combination with a single-circle range threshold value. When it is determined that the single-circle boundary crossing event occurs, a circle number counter of a multi-circle accumulation position is updated based on the crossing direction, so that the accumulation angle position of the moving object is determined according to the circle number counter and the current single-circle position data, the position of the moving object is effectively fed back, the cost is reduced, the structure is simplified, and meanwhile, the accuracy of the moving object is improved. And the stability and reliability of position detection can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to data processing technology, and more particularly to a location feedback data processing method. Background Technology

[0002] Currently, encoders are generally divided into two types: single-turn encoders and multi-turn encoders. Single-turn encoders can only provide angular information of a moving object configured with the encoder within a single rotation cycle (0-360°). For moving objects rotating more than one revolution, they cannot directly obtain the complete cumulative angular position. While multi-turn encoders can record the cumulative position of a moving object rotating over multiple revolutions, they are usually complex in structure and expensive, and are difficult to widely apply in cost-sensitive or space-constrained applications.

[0003] When using only a single-loop encoder to obtain the cumulative position information of a moving object over multiple loops, when the moving object crosses the single-loop boundary (i.e., returns from 360° to 0° or rotates from 0° to 360°), the single-loop position data will change abruptly. This normal boundary crossing is easily misjudged as a sudden change in the moving object's direction of motion or other abnormal situations, thus causing serious deviations in the calculation results of the cumulative angle position.

[0004] This deviation not only affects the motion accuracy of the moving object, but may also cause the moving object to collide with the surrounding environment, resulting in serious consequences such as equipment damage or even personal injury. Summary of the Invention

[0005] This application provides a position feedback data processing method to effectively provide feedback on the position of a moving object, thereby improving the control accuracy of the moving object.

[0006] In a first aspect, this application provides a location feedback data processing method, including: Obtain the current single-turn position data of the encoder on the moving object, wherein the single-turn position data corresponds to the angle information of the moving object within a single rotation cycle; Obtain the single-lap position data of the previous sampling period, wherein the single-lap position data of the previous sampling period and the current single-lap position data correspond to adjacent sampling periods; Based on the difference between the current single-lap position data and the single-lap position data of the previous sampling period, and in conjunction with the single-lap range threshold, it is determined whether a single-lap boundary crossing event has occurred. When the single-lap boundary crossing event is determined to have occurred, the lap counter of the multi-lap cumulative position is updated based on the crossing direction, so as to determine the cumulative angular position of the moving object according to the lap counter and the current single-lap position data.

[0007] Secondly, this application provides an electronic device, comprising: Processor; and, Memory for storing the executable instructions of the processor; The processor is configured to perform any of the possible methods described in the first aspect by executing the executable instructions.

[0008] Thirdly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement any of the possible methods described in the first aspect.

[0009] The position feedback data processing method provided in this application acquires the current single-loop position data of the encoder on the moving object and the single-loop position data of the previous sampling period. Then, based on the difference between the current single-loop position data and the single-loop position data of the previous sampling period, and in conjunction with the single-loop range threshold, it determines whether a single-loop boundary crossing event has occurred. When the single-loop boundary crossing event is determined to have occurred, the number of loops of the cumulative position of multiple loops is updated based on the crossing direction. Based on the number of loops of the counter and the current single-loop position data, the cumulative angular position of the moving object is determined, thereby effectively feeding back the position of the moving object. While reducing costs and simplifying the structure, it can also ensure the stability and reliability of position detection. Attached Figure Description

[0010] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0011] Figure 1 This is a schematic flowchart illustrating a location feedback data processing method according to an example embodiment of this application; Figure 2 This is a schematic diagram illustrating the implementation process of S130 according to an example embodiment of this application; Figure 3 This is a schematic diagram illustrating the implementation process of validity verification according to an example embodiment of this application; Figure 4 This is a schematic diagram of the structure of a position feedback data processing device according to an example embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device according to an example embodiment of this application.

[0012] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0013] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0014] Figure 1 This is a schematic flowchart illustrating a location feedback data processing method according to an example embodiment of this application. Figure 1 As shown, the location feedback data processing method provided in this embodiment includes: S110. Obtain the current single-lap position data of the encoder on the moving object.

[0015] In this step, the current single-turn position data of the encoder on the robot joint is obtained. The single-turn position data corresponds to the angle information of the robot joint within a single rotation cycle.

[0016] S120: Obtain the single-circle position data of the previous sampling period.

[0017] In this step, the single-lap position data of the previous sampling period is obtained. The single-lap position data of the previous sampling period and the current single-lap position data correspond to adjacent sampling periods.

[0018] S130. Based on the difference between the current single-lap position data and the single-lap position data of the previous sampling period, and in conjunction with the single-lap range threshold, determine whether a single-lap boundary crossing event has occurred.

[0019] In this step, based on the difference between the current single-lap position data and the single-lap position data of the previous sampling period, and in conjunction with the single-lap range threshold, it is determined whether a single-lap boundary crossing event has occurred.

[0020] It's worth noting that in scenarios where the encoder provides single-turn position data, simply identifying events that cross single-turn boundaries is insufficient to ensure the accuracy of cumulative position calculations. In practical applications, the direction of crossing must be accurately identified; otherwise, an incorrect direction of crossing will cause the turn counter to update in the reverse direction, resulting in a constant deviation in the cumulative position. In particular, for bidirectional rotary joints, if the direction of motion is not correctly determined, attitude control and trajectory following will deviate in the opposite direction.

[0021] In response, Figure 2 This is a schematic diagram illustrating the implementation flow of S130 according to an example embodiment of this application. Figure 2 As shown, S130 in this embodiment includes: S131. When the difference is greater than the positive crossing threshold, a negative crossing boundary event is determined to have occurred.

[0022] Specifically, when the difference is greater than the positive crossing threshold, a negative crossing boundary event is determined to have occurred. The positive crossing threshold is the angle value related to the single-turn range threshold in the first rotation direction.

[0023] S132. When the difference is less than the negative crossing threshold, a positive crossing boundary event is determined to have occurred.

[0024] Specifically, when the difference is less than the negative crossing threshold, a positive crossing boundary event is determined to have occurred. The negative crossing threshold is the angle value related to the single-turn range threshold in the second rotation direction, and the first rotation direction is opposite to the second rotation direction.

[0025] Specifically, for S131-S132, after detecting a single-turn boundary crossing event, the crossing direction is determined by calculating the difference between the current single-turn position data and the single-turn position data of the previous sampling period, and comparing this difference with a preset single-turn range threshold. The preset single-turn range threshold is half the encoder's single-turn range, used to distinguish whether the position change is caused by normal rotation or a crossing event. Optionally, the single-turn range threshold is half the encoder's single-turn range, and the positive crossing threshold and / or negative crossing threshold have the same angle value as the single-turn range threshold.

[0026] Specifically, when the difference is greater than the single-turn range threshold, a negative directional crossing is determined, and the rotation counter is decremented by one; when the difference is less than the negative single-turn range threshold, a positive directional crossing is determined, and the rotation counter is incremented by one; when the absolute value of the difference is less than or equal to the single-turn range threshold, no single-turn boundary crossing event is determined, and the rotation counter remains unchanged. In other words, when the crossing direction corresponds to a positive boundary crossing event, the current count value of the rotation counter is incremented by one. When the crossing direction corresponds to a negative boundary crossing event, the current count value of the rotation counter is decremented by one. The updated rotation counter value is combined with the current single-turn position data to calculate the cumulative angular position of the robot joint.

[0027] In the direction determination process, a judgment mechanism based on the maximum theoretical angle change value between the actual joint speed and the sampling period can be optionally adopted to filter out false cross-circle events caused by noise or data loss, thereby improving the judgment accuracy.

[0028] Furthermore, it's worth noting that the above steps demonstrate significant advantages in multi-rotation scenarios such as inspection robots and industrial collaborative robots, and are particularly suitable for high-speed rotation or bidirectional switching motion tasks. These steps ensure stable and consistent cumulative angle calculations, thereby guaranteeing the robot's attitude accuracy and trajectory control reliability during long-cycle operation tasks.

[0029] It is worth noting that during high-speed motion or long-cycle operation, the encoder may experience abnormal jumps in position data due to factors such as instantaneous pulse loss, communication delays, and sampling period drift. These jump values ​​may sometimes exceed the actual physical movement range of the joint within a single sampling period. If these position data are directly accumulated, abnormal position changes cannot be identified and eliminated, resulting in significant deviations in the cumulative angle calculation. This leads to errors in attitude control, trajectory tracking, and torque calculation, affecting the robot's operational stability and accuracy, and in extreme cases, even causing joint movement to exceed limits or mechanical collisions.

[0030] To address this, before incrementing or decrementing the current count of the revolution counter, a validity verification of the crossing direction can be performed. This validity verification is based on the actual motion trend of the robot joints and the changing trend of the encoder output signal. Furthermore, if the validity verification result is invalid, the current count of the revolution counter remains unchanged.

[0031] Through the above effectiveness verification, the maximum possible angle change value within each sampling period can be dynamically calculated based on the real-time velocity information of the joints and the sampling period length during each position data update. This value is then used as the threshold for judging abnormal position jumps. When a position change exceeding this threshold is detected, the data is immediately identified as abnormal and discarded, while the rotation counter and cumulative position remain unchanged. This prevents sudden changes in the cumulative position even in the event of instantaneous pulse loss, data interference, or communication delays in the encoder, effectively maintaining the continuity and stability of attitude calculation, trajectory planning, and torque control. Consequently, it significantly improves the motion accuracy and safety of the robot under high-speed, multi-rotation conditions.

[0032] One specific implementation method for the above validity verification is as follows. Figure 3 This is a schematic diagram illustrating the implementation process of validity verification according to an example embodiment of this application. For example... Figure 3 As shown, the validity verification in this embodiment includes: S133. Obtain the joint velocity information of the robot joint in two adjacent sampling periods.

[0033] The joint velocity information of the robot joints is obtained in two adjacent sampling periods. The joint velocity information is calculated by differential calculation of encoder position data.

[0034] S134. The direction of the actual motion trend is determined based on the symbol of the joint velocity information.

[0035] S135. Compare the direction of the actual motion trend with the direction of the encoder output signal change trend.

[0036] The direction of the actual motion trend is compared with the direction of the encoder output signal change trend. When the two are consistent, the crossing direction is determined to be valid; when the two are inconsistent, the crossing direction is determined to be invalid.

[0037] The above validity verification utilizes continuously sampled encoder position signals to calculate joint angular velocity through differential operations, and determines the actual motion direction based on the sign of the angular velocity. Simultaneously, the sign of the encoder position change trend is acquired as a directional criterion for crossing events. When the actual motion direction matches the crossing direction criterion, it indicates that the crossing detected by the encoder is a genuine event consistent with the actual joint movement, thus allowing for safe updating of the revolution counter. When the directions are inconsistent, it indicates potential signal anomalies or erroneous data jumps; in this case, revolution updates are rejected to maintain the accuracy of the position data. This principle combines velocity information in the time domain with the change trend in the position domain, making the confirmation of crossing events no longer dependent on a single position difference judgment. This increases the dimensionality and robustness of the judgment, enabling high-precision, multi-revolution position feedback in complex environments. Furthermore, it effectively filters out erroneous crossing judgments caused by abnormal factors such as noise, jitter, and sudden data jumps during actual operation, improving the robustness and accuracy of multi-revolution cumulative position calculation, thereby enhancing the control reliability and safety of the robot under long-term operation and complex working conditions.

[0038] Furthermore, when the encoder is disturbed or experiences abnormal transition events (such as high-speed jitter, signal abrupt changes, or data loss), the rotation counter may make multiple erroneous increments or decrements within a short period, causing numerical overflow or severe drift. This count overflow not only makes the cumulative angle calculation result seriously inconsistent with the actual joint position, but may also trigger incorrect trajectory corrections and torque outputs in the motion control system, leading to robot malfunctions or even mechanical damage.

[0039] To address this, the rotation counter can be configured as a signed integer type, with its counting range limited by preset upper and lower limits to prevent overflow under consecutive abnormal crossing events. Specifically, a signed integer rotation counter is used, and during initialization, a maximum upper limit and a minimum lower limit for counting, determined based on joint mechanical limits and encoder characteristics, are preset. When a crossing event is detected and a rotation update is performed, it is first determined whether the updated count value exceeds the preset range. If it does, it is automatically truncated to a boundary value, and further updates are rejected. This boundary protection mechanism effectively prevents counter overflow under consecutive abnormal crossing events or high-frequency interference conditions, ensuring that the calculated position of multiple rotations remains consistent with the physical posture of the joint. This significantly improves the reliability and safety of the robot system in terms of trajectory control, posture stability, and safety protection.

[0040] S140. Update the lap counter based on the cross direction to determine the cumulative angular position of the moving object, and determine the cumulative angular position of the moving object based on the lap counter and the current single lap position data.

[0041] In this step, when it is determined that a single-loop boundary crossing event has occurred, the loop counter of the multi-loop cumulative position is updated based on the crossing direction, so as to determine the cumulative angle position of the robot joint according to the loop counter and the current single-loop position data.

[0042] Under normal joint movement, the cumulative position across multiple rotations can be achieved through the detection of crossing single-rotation boundaries and the updating of the rotation counter. However, during an emergency stop, the robot joint may continue to move for a short period due to inertia, causing a certain degree of change in the single-rotation position data output by the encoder. If the inertial displacement after the emergency stop is misjudged as an abnormal jump, the true crossing information may be lost during the rotation counter update process, resulting in errors in the calculation of the cumulative angle position and affecting accurate positioning and safe control after the emergency stop.

[0043] To handle emergency stops, before updating the cumulative position counter based on the crossing direction, the reference single-revolving position data at the time of the emergency stop event can be obtained. Then, based on the inertial physics model parameters of the robot joints at the time of the emergency stop event, the maximum possible inertial displacement angle after the emergency stop is determined. Next, the angle difference between the reference single-revolving position data and the current single-revolving position data is calculated. When the absolute value of the angle difference is less than the maximum possible inertial displacement angle, the single-revolving boundary crossing event is determined to be a valid inertial crossing event, and the rotation counter is updated when the crossing direction is consistent with the direction predicted by the inertial physics model. When the absolute value of the angle difference is greater than the maximum possible inertial displacement angle or the crossing direction is inconsistent with the direction predicted by the inertial physics model, the single-revolving boundary crossing event is determined to be an abnormal jump event, and the current count value of the rotation counter remains unchanged.

[0044] Through the above steps, the joint velocity information is acquired when an emergency stop event is triggered, and the inertial equivalent mass is calculated by combining the actual load mass and the reduction gear ratio. By setting the friction coefficient and damping parameters, the above physical quantities are substituted into the second-order inertial motion differential equation of the joint, and the theoretical decay curve of the joint velocity over time after the emergency stop is solved using numerical integration. The maximum possible inertial displacement angle value is obtained by integrating this curve. During the detection of crossing events, the change amplitude of the encoder position is compared with the upper limit of the inertial displacement, and the consistency between the change direction and the direction predicted by the inertial model is verified, so as to realize the physical constraint judgment of valid inertial crossing events and abnormal jump events. Thus, it is possible to accurately identify and capture single-turn boundary crossing events caused by inertia in emergency stop situations. At the same time, it can also effectively eliminate abnormal jumps that exceed the upper limit of inertial displacement or whose direction does not conform to physical laws, thereby ensuring that the update of the revolution counter is consistent with the actual mechanical motion, significantly reducing the cumulative angle position calculation error, improving the joint positioning accuracy after emergency stop recovery and the safety of the control system.

[0045] Furthermore, the specific method for determining the aforementioned maximum possible inertial displacement angle value can be as follows: First, obtain the joint angular velocity information within the last sampling period before the emergency stop event is triggered. The joint angular velocity information is obtained through differential calculation of encoder position data. Then, the inertial equivalent mass is calculated by combining the joint load mass with the reduction gear ratio. Next, based on the inertial equivalent mass, friction coefficient, and preset damping, the theoretical deceleration curve of the joint after the emergency stop is calculated according to the preset joint inertial motion equation. The theoretical inertial displacement angle value is obtained at the termination position of the theoretical deceleration curve.

[0046] The specific method for determining the aforementioned equivalent inertial mass can be as follows: First, obtain the actual load mass parameters of the robot joint's actuators. These parameters are mass values ​​obtained through joint structure design data or sensor measurement data. Then, obtain the reduction ratio parameters of the joint's deceleration system. These ratios are the gear ratio or harmonic transmission ratio between the input and output shafts of the deceleration mechanism. Multiply the actual load mass parameters by the square of the reduction ratio to obtain the equivalent inertial mass parameters. These parameters are used in inertial physics model calculations to characterize the equivalent inertial features after passing through the deceleration transmission system.

[0047] Furthermore, the aforementioned calculation of the theoretical deceleration curve of the joint after an emergency stop, based on the inertial equivalent mass, friction coefficient, and preset damping, according to the preset joint inertial motion equation, can be achieved by substituting the inertial equivalent mass parameter into the mass term of the joint inertial motion equation, the friction coefficient parameter into the friction resistance term of the joint inertial motion equation, and the preset damping parameter into the damping force term of the joint inertial motion equation. Then, the joint angular velocity at the instant of the emergency stop event is introduced into the joint inertial motion equation as an initial condition. Finally, through numerical integration, the theoretical deceleration curve of the joint velocity over time is solved within the time range from the moment the emergency stop signal is triggered to when the joint velocity approaches zero. The integral result of the theoretical deceleration curve is then used to calculate the theoretical inertial displacement angle value of the joint during the emergency stop process, in order to determine the maximum possible inertial displacement angle value after the emergency stop.

[0048] Optionally, the above joint inertial motion equation is a second-order dynamic differential equation containing inertial, damping and friction terms. The inertial term is calculated based on the inertial equivalent mass, the damping term is calculated based on the preset damping parameters, and the friction term is calculated based on the friction coefficient.

[0049] Furthermore, during actual robot joint operation, especially under complex conditions such as high-speed motion, communication delays, and instantaneous encoder signal jumps, the single-turn position difference may exhibit anomalies exceeding the normal range of motion. In traditional systems, these anomalies are often misinterpreted as genuine single-turn boundary crossing events, triggering an update to the turn counter. Since the data used for this update is not the actual joint motion, it leads to a rapid accumulation of position errors over multiple turns, resulting in a significant decrease in the robot's accuracy in position control, trajectory following, and safety protection, and may even lead to malfunctions or loss of control.

[0050] To address this, before updating the cumulative position counter for multiple revolutions based on the direction of the jump, the maximum possible angle change value can be determined based on the robot joint velocity information and sampling period. When the difference exceeds the maximum possible angle change value, the event of crossing a single-revolution boundary is considered an abnormal jump, and the revolution counter is not updated.

[0051] The determination of the maximum possible angle change value can be achieved by acquiring the velocity information of the robot joint in the previous sampling period. This velocity information is the joint angular velocity obtained through encoder position data differential calculation. The joint angular velocity is multiplied by the sampling period to obtain the theoretical angle change value. Then, a preset safety margin coefficient is added to the theoretical angle change value to obtain the maximum possible angle change value. The safety margin coefficient is used to compensate for calculation deviations caused by encoder quantization errors and sampling delays. Specifically, the joint's motion direction is calculated using the differential of two consecutively sampled single-turn position data, and the angular velocity sign of the joint is obtained by dividing the encoder position change by the sampling period. Subsequently, when a single-turn boundary crossing event is detected, it is determined whether the crossing direction sign is consistent with the angular velocity sign. Simultaneously, physical motion constraints are introduced, meaning the crossing direction must meet the pre-set maximum possible angle change range to be considered a valid crossing event. This dual verification mechanism ensures the physical validity and data consistency of the crossing direction, effectively preventing directional errors caused by noise or abnormal signals and ensuring accurate calculation of the cumulative position over multiple turns.

[0052] As can be seen, by adding a step to determine the maximum possible angle change value before updating the revolution counter, the theoretical angle change value can be calculated using the angular velocity and sampling period of the joint in the previous sampling period, and a safety margin coefficient can be added to limit it, while detecting events that cross single-revolution boundaries. When the current position difference exceeds this maximum possible angle change value, the crossing event is directly judged as an abnormal jump and the revolution counter is not updated. This step ensures that the update process of the cumulative position over multiple revolutions always conforms to the physical motion law of the robot joint, effectively preventing cumulative angle drift caused by sudden abnormal signals, and improving the positioning accuracy, trajectory stability and safety of the robot under long-term operation and complex working conditions.

[0053] Furthermore, in actual operating environments, encoders may be subject to interference or signal noise, causing instantaneous jumps in position data that exceed physical limits. These abnormal jumps are numerically similar to real single-turn boundary crossing events. The specific reason for this similarity is that rotary encoders output periodic modulus signals. When a joint crosses a single-turn boundary, its position data exhibits a sudden change in amplitude close to the total range of a single turn. However, in actual operation, encoders may be affected by register bit errors, communication interruptions, electromagnetic interference, and sampling synchronization deviations, causing non-physical instantaneous jumps in position values ​​within a sampling period. When such jumps occur near single-turn boundaries, their difference amplitude and direction characteristics are often highly consistent with real cross-turn events. This is because random position changes caused by interference or misreading, under periodic modulus constraints, are numerically likely to fall within the cross-turn judgment threshold range. Moreover, under the combined effect of quantization resolution and sampling delay, the abnormal amplitude is close to the cross-turn amplitude achievable by mechanical inertia, making the difference calculation result almost indistinguishable from a real cross-turn event in terms of numerical pattern. If an abnormal jump is misjudged as a real crossing event, resulting in an incorrect update of the lap counter, it will cause inaccurate calculation of the cumulative angle.

[0054] To address this, before classifying a single-loop boundary crossing event as an abnormal jump and refusing to update the loop counter, an abnormal jump detection channel and a real-loop crossing event verification channel can be established. The abnormal jump detection channel identifies jump events exceeding physical change limits based on the maximum possible angle change value and encoder signal quality indicators. The real-loop crossing event verification channel performs physical constraint verification on candidate single-loop boundary crossing events based on the robot joint velocity direction consistency and inertial physical parameters. When the abnormal jump detection channel and the real-loop crossing event verification channel are triggered simultaneously within the same sampling period, the high-speed buffer position data within the sampling period is further segmented and analyzed in chronological order, and the physical constraint verification results are used to determine whether to update the loop counter.

[0055] Optionally, the above physical constraint verification includes: obtaining the maximum permissible acceleration value of the robot joint and the equivalent inertial mass of the joint; calculating the theoretical acceleration for a single-loop boundary event based on the joint velocity information; and determining that the single-loop boundary event is invalid and refusing to update the loop counter when the theoretical acceleration is greater than the maximum permissible acceleration.

[0056] For segmented analysis of high-speed buffer position data within the sampling period in chronological order, multiple position data points can be recorded at a high sampling frequency at the upper limit of the sampling frequency within the sampling period. Then, the time segments of events crossing single-loop boundaries and the time segments of abnormal jumps are detected. Next, the continuous data sequence of the time segments of events crossing single-loop boundaries is extracted, and it is determined that the angle change direction is consistent with the joint velocity direction, and the angle change amplitude is within the range of the maximum possible angle change value. In this case, the event crossing single-loop boundaries is confirmed to be valid.

[0057] The above steps first utilize an abnormal jump detection channel to compare the encoder position difference with a pre-set maximum possible angle change value, and filter using signal quality indicators to identify jump events exceeding the upper limit of mechanical physical change. Simultaneously, a real crossing event verification channel verifies whether candidate crossing events conform to the physical laws of mechanical motion based on the directional consistency judgment of joint velocity information and inertial physics model parameters. When both channels are triggered within the same sampling period, multiple sets of position data within that period are extracted from the high-speed sampling buffer, and their angle change trends and amplitudes are analyzed in time-series segments, matched with the maximum possible angle change value and velocity direction. This avoids abnormal jumps being misjudged as crossing events, and also prevents the omission of real crossing events due to a single abnormality judgment.

[0058] It is worth noting that, to determine the cumulative angle position of the robot joint, the count value of the revolution counter is multiplied by the encoder's single-revolution range to obtain the cumulative angle over multiple revolutions. Then, the cumulative angle over multiple revolutions is added to the current single-revolution position data to obtain the cumulative angle position of the robot joint.

[0059] The revolution counter obtains a reliable integer count value through boundary event detection and direction validity verification. This count value is directly multiplied by the encoder's single-revolution range (unit angle) to obtain the cumulative angle over multiple revolutions. This cumulative angle is then added to the encoder's current single-revolution position data to obtain a continuous absolute angle value. This process achieves a mathematical transformation to construct a globally continuous angle based on discrete encoder sampling data, thereby segmenting and accumulating the total displacement of joint rotation and combining it in real time, preventing jump errors caused by boundary crossings or revolution counter anomalies.

[0060] In this embodiment, the current single-turn position data of the encoder on the robot joint and the single-turn position data of the previous sampling period are obtained. Then, based on the difference between the current single-turn position data and the single-turn position data of the previous sampling period, and combined with the single-turn range threshold, it is determined whether a single-turn boundary crossing event has occurred. When it is determined that a single-turn boundary crossing event has occurred, the number of turns counters for the cumulative position of multiple turns is updated based on the crossing direction. Based on the number of turns counters and the current single-turn position data, the cumulative angle position of the robot joint is determined, thereby effectively feeding back the robot joint position. While reducing costs and simplifying the structure, it can also ensure the stability and reliability of position detection.

[0061] Figure 4 This is a schematic diagram of the structure of a position feedback data processing device according to an example embodiment of this application. For example... Figure 4 As shown, the location feedback data processing device 300 provided in this embodiment includes: The acquisition module 310 is used to acquire the current single-turn position data of the encoder on the moving object, wherein the single-turn position data corresponds to the angle information of the moving object within a single rotation cycle. The acquisition module 310 is also used to acquire the single-circle position data of the previous sampling period, wherein the single-circle position data of the previous sampling period and the current single-circle position data correspond to adjacent sampling periods. The processing module 320 is used to determine whether a single-loop boundary crossing event has occurred based on the difference between the current single-loop position data and the single-loop position data of the previous sampling period, and in combination with the single-loop range threshold. The processing module 320 is further configured to update the lap counter of the multi-lap cumulative position based on the crossing direction when it is determined that the single-lap boundary crossing event has occurred, so as to determine the cumulative angular position of the moving object according to the lap counter and the current single-lap position data.

[0062] Figure 5 This is a schematic diagram of the structure of an electronic device according to an example embodiment of this application. For example... Figure 5 As shown, the electronic device 400 provided in this embodiment includes: a processor 401 and a memory 402; wherein: Memory 402 is used to store computer programs, and the memory may also be flash memory.

[0063] Processor 401 is used to execute the execution instructions stored in the memory to implement the various steps in the above method. For details, please refer to the relevant descriptions in the preceding method embodiments.

[0064] Alternatively, the memory 402 can be either standalone or integrated with the processor 401.

[0065] When the memory 402 is a device independent of the processor 401, the electronic device 400 may further include: Bus 403 is used to connect the memory 402 and the processor 401.

[0066] This embodiment also provides a readable storage medium storing a computer program, which, when executed by at least one processor of an electronic device, enables the electronic device to perform the methods provided in the various embodiments described above.

[0067] This embodiment also provides a program product including a computer program stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to cause the electronic device to perform the methods provided in the various embodiments described above.

[0068] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.

[0069] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A position feedback data processing method, characterized by, The method comprises: acquiring current single-turn position data of an encoder on a moving object, the single-turn position data corresponding to angle information of the moving object within a single rotation cycle range; acquiring single-turn position data of a previous sampling cycle, the single-turn position data of the previous sampling cycle corresponding to an adjacent sampling cycle of the current single-turn position data; determining whether a single-turn boundary crossing event occurs according to a difference between the current single-turn position data and the single-turn position data of the previous sampling cycle, and in combination with a single-turn range threshold value; when it is determined that the single-turn boundary crossing event occurs, updating a turn number counter of a multi-turn cumulative position based on a crossing direction, so as to determine a cumulative angle position of the moving object according to the turn number counter and the current single-turn position data.

2. The position feedback data processing method according to claim 1, characterized in that, The determination whether the single-turn boundary crossing event occurs according to the difference between the current single-turn position data and the single-turn position data of the previous sampling cycle, and in combination with the single-turn range threshold value, comprises: when the difference is greater than a positive crossing threshold value, it is determined that a negative direction crossing boundary event occurs, the positive crossing threshold value being a relevant angle value of the single-turn range threshold value in a first rotation direction; when the difference is less than a negative crossing threshold value, it is determined that a positive direction crossing boundary event occurs, the negative crossing threshold value being a relevant angle value of the single-turn range threshold value in a second rotation direction, the first rotation direction being opposite to the second rotation direction.

3. The position feedback data processing method of claim 2, wherein, The updating of the turn number counter of the multi-turn cumulative position based on the crossing direction when it is determined that the single-turn boundary crossing event occurs, comprises: when the crossing direction corresponds to the positive direction crossing boundary event, performing a plus one operation on a current count value of the turn number counter; when the crossing direction corresponds to the negative direction crossing boundary event, performing a minus one operation on the current count value of the turn number counter; the count value of the updated turn number counter is combined with the current single-turn position data to calculate the cumulative angle position of the moving object.

4. The position feedback data processing method of claim 3, wherein, Before the plus one operation on the current count value of the turn number counter or the minus one operation on the current count value of the turn number counter, the method further comprises: validity verification is performed on the crossing direction, the validity verification being based on an actual motion trend of the moving object and a change trend of an encoder output signal; when the validity verification result is invalid, the current count value of the turn number counter is kept unchanged.

5. The position feedback data processing method according to claim 4, characterized in that, The turn number counter is of a signed integer type, and a count range is limited by a preset upper limit value and a lower limit value to prevent overflow under continuous abnormal crossing events.

6. The position feedback data processing method of claim 4, wherein, The validity verification on the crossing direction comprises: acquiring joint speed information of the moving object within two adjacent sampling cycles, the joint speed information being calculated by differentiating encoder position data; determining a direction of the actual motion trend based on a sign of the joint speed information; comparing the direction of the actual motion trend with a direction of the change trend of the encoder output signal, when the two directions are consistent, it is determined that the crossing direction is valid, and when the two directions are inconsistent, it is determined that the crossing direction is invalid.

7. The position feedback data processing method according to any one of claims 2 to 6, characterized in that, The single-turn range threshold is a half value of a single-turn range of the encoder, and the positive crossing threshold and / or the negative crossing threshold have the same angular value as the single-turn range threshold.

8. The position feedback data processing method according to any one of claims 1 to 6, characterized in that, Before the step of updating the multi-turn cumulative position based on the crossing direction, the method further comprises: determining a maximum possible angular change value based on speed information of the moving object and a sampling period; when the difference value is greater than the maximum possible angular change value, determining that the single-turn boundary crossing event is an abnormal jump, and rejecting to update the multi-turn number counter.

9. The position feedback data processing method according to claim 8, characterized in that, The step of determining the maximum possible angular change value based on the speed information of the moving object and the sampling period comprises: obtaining speed information of the moving object in a previous sampling period, the speed information being a joint angular velocity obtained by differential operation on encoder position data; performing a product operation on the joint angular velocity and the sampling period to obtain a theoretical angular change value; on the basis of the theoretical angular change value, superimposing a preset safety margin coefficient to obtain the maximum possible angular change value, the safety margin coefficient being used to compensate for calculation deviation caused by encoder quantization error and sampling delay.

10. The position feedback data processing method according to any one of claims 1 to 6, characterized by, The step of determining the cumulative angular position of the moving object according to the multi-turn number counter and the current single-turn position data comprises: performing a product operation on a count value of the multi-turn number counter and a single-turn range of the encoder to obtain a multi-turn cumulative angle; performing an addition operation on the multi-turn cumulative angle and the current single-turn position data to obtain the cumulative angular position of the moving object.

Citation Information

Patent Citations

  • Multi-turn absolute value encoder and position detecting method

    CN107655399A

  • Multi-turn absolute value encoder and position detecting method

    CN107655510A

  • Encoder data conversion method, device and equipment

    CN112824059A

  • Encoder absolute position determination method, apparatus and device, and readable storage medium

    CN113865627A

  • Variable pitch system encoder fault processing method, device, equipment and medium

    CN119712445A