A method, apparatus, device and storage medium for electronic gear position synchronization

By calculating the starting and synchronization positions of the master and slave shafts in the mold shaft space and using the velocity interpolation method to achieve synchronization of the master and slave shafts, the problem of difficult synchronization of electronic gears in the mold shaft space is solved, and efficient and low-impact position synchronization is achieved.

CN116578126BActive Publication Date: 2026-06-30KYLAND TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KYLAND TECH CO LTD
Filing Date
2023-05-16
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In the existing technology, the method for synchronizing the positions of the master and slave shafts of electronic gears in the mold shaft space has problems of poor compatibility and difficulty in synchronization, especially when the master shaft speed is high, the slave shaft cannot keep synchronized with the master shaft.

Method used

By calculating the starting position and synchronization position of the master axis using the current position and kinematic parameters of the master and slave axes in the model axis space, and combining the velocity interpolation method, the slave axis is accelerated to the synchronization speed, and the position synchronization of the master and slave axes is achieved in the model axis space.

Benefits of technology

It achieves adaptive synchronization of master and slave axes in the model axis space, reduces the professional requirements of users, simplifies the compatibility of PLCOpen specifications, avoids unsolvable situations, and has a short synchronization time and small mechanical impact.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116578126B_ABST
    Figure CN116578126B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, and storage medium for synchronizing the position of electronic gears, achieving position synchronization of the master and slave shafts of the electronic gears in a mold shaft space. The method includes: when the slave shaft speed is 0, obtaining the master shaft's initial position and synchronized position based on the master-slave shaft synchronization single-turn position, using the current position of the master and slave shafts, the master shaft speed, and the kinematic parameters of the slave shaft; when the master shaft moves to its initial position in its mold shaft space, the slave shaft begins to accelerate in its mold shaft space until its speed reaches the slave shaft synchronization speed; when the slave shaft accelerates to its synchronized speed, it continues to move at the slave shaft synchronization speed until the master shaft moves to its synchronized position in its mold shaft space, at which point the master and slave shafts synchronously reach their master-slave shaft synchronization single-turn positions. This invention's solution can achieve meshing and position synchronization of electronic gears in the mold shaft space regardless of the current position of the master and slave shafts or the speed of the master shaft.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent control, and in particular to a method, apparatus, device, and storage medium for electronic gear position synchronization. Background Technology

[0002] In recent years, with the deepening of intelligent manufacturing reform, the demand for high-end intelligent manufacturing has become increasingly urgent, especially the demand for motion control. However, most of the controllers and motion control algorithm libraries currently used in intelligent manufacturing are based on secondary development and application of mature platforms and libraries from major equipment manufacturers, resulting in poor universality and compatibility.

[0003] The PLCOpen specification aims to standardize motion control and increase the compatibility and reusability of motion control functions across different hardware and software platforms. Currently, well-known international manufacturers such as Beckhoff and Codesys include motion control function blocks compliant with the PLCOpen specification. However, these manufacturers use a method of synchronizing the master and slave axes in online axis space. When the master axis speed is high, the slave axis may not be able to maintain synchronization with the master axis in online axis space.

[0004] Electronic gears are a widely used function, but there is still no method for smooth synchronization of the master and slave axes in the mold axis space that conforms to the PLCOpen specification. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method, apparatus, device, and storage medium for electronic gear position synchronization, realizing the synchronization of the master and slave shafts of the electronic gear in the mold shaft space, including: when the slave shaft speed is 0, based on the master-slave shaft synchronization single-turn position, using the current position of the master and slave shafts and the master shaft speed combined with the kinematic parameters of the slave shaft, to obtain the master shaft starting position and master shaft synchronization position, wherein the current position of the master and slave shafts is the current position of the master and slave shafts in the mold shaft space; when the master shaft moves to the master shaft starting position in its mold shaft space, the slave shaft begins to accelerate in its mold shaft space until its speed reaches the slave shaft synchronization speed, the acceleration speed of the slave shaft is calculated using a speed interpolation method, and the slave shaft synchronization speed is the product of the master shaft speed and the slave-master gear ratio; when the slave shaft accelerates to the slave shaft synchronization speed, it continues to move at the slave shaft synchronization speed until the master shaft moves to the master shaft synchronization position in its mold shaft space, wherein the master shaft and the slave shaft synchronously reach the set master-slave shaft synchronization single-turn position in their respective single turns.

[0006] The technical solution of this invention only requires inputting the master-slave axis synchronization single-turn position, that is, setting the angle of the master and slave axes within their respective single-turn positions when the master and slave axes are synchronized. Regardless of the current position of the master and slave axes, and regardless of the speed of the master axis, the starting position and synchronization position of the master axis, which must exist in the model axis space of the master axis, can be obtained by combining the kinematic parameters of the slave axis. When the master axis moves to the starting position, the slave axis starts to accelerate. When the master axis moves to the synchronization position, the master-slave axis meshing and position synchronization of the electronic gear conforming to the PLCOpen specification are achieved, and the position synchronization time is short. Compared with the position synchronization of the linear axis space, it is not necessary to consider the master-slave axis synchronization single-turn position based on the kinematic parameters of the slave axis, nor is it necessary to calculate the next target point of the master axis and the next target point of the slave axis, nor is it necessary to calculate how far the master axis and the slave axis need to go to achieve synchronization. This invention can adaptively calculate the number of revolutions of the master and slave axes under any circumstances, eliminating any unsolvable situations. Furthermore, the user interface of this invention's embodiments only requires the master and slave axes to synchronize a single revolution position, the slave axis's kinematic parameters, and the synchronization state. This reduces the technical requirements for user input parameters and makes it easy to encapsulate into the pins of a PLCOpen electronic gear position synchronization function module, facilitating function portability. In contrast, synchronization methods in linear spool space require users to manually consider synchronization position, velocity, acceleration, and the maximum constraint of jerk. If the synchronization position is inappropriate, unsolvable error messages may occur.

[0007] In a first aspect, embodiments of the present invention provide a method for synchronizing the position of an electronic gear, realizing the synchronization of the master and slave shafts of the electronic gear in the mold shaft space, comprising: when the slave shaft speed is 0, obtaining the master shaft starting position and master shaft synchronization position based on the master-slave shaft synchronization single-turn position, using the current position of the master and slave shafts and the master shaft speed combined with the kinematic parameters of the slave shaft, wherein the current position of the master and slave shafts is the current position of the master and slave shafts in the mold shaft space; when the master shaft moves to the master shaft starting position in its mold shaft space, the slave shaft begins to accelerate in its mold shaft space until its speed reaches the slave shaft synchronization speed, the acceleration speed of the slave shaft is calculated using a speed interpolation method, and the slave shaft synchronization speed is the product of the master shaft speed and the slave-master gear ratio; when the slave shaft accelerates to the slave shaft synchronization speed, it continues to move at the slave shaft synchronization speed until the master shaft moves to the master shaft synchronization position in its mold shaft space, wherein the master shaft and the slave shaft synchronously reach the set master-slave shaft synchronization single-turn position in their respective single turns.

[0008] In one possible implementation of the first aspect, when the slave shaft speed is 0, the slave shaft speed is interpolated using the speed interpolation method according to the kinematic parameters to obtain the slave shaft engagement distance and slave shaft engagement duration. The slave shaft engagement distance is the distance the slave shaft travels within the slave shaft engagement duration, and the slave shaft engagement duration is the time it takes for the slave shaft to accelerate from the start to the slave shaft speed equal to the slave shaft synchronization speed in its mold shaft space. Based on the slave shaft synchronization single-turn position, the slave shaft engagement distance, and the current position of the slave shaft, combined with the slave shaft synchronization speed, the slave shaft synchronization duration is obtained. The slave shaft synchronization duration is the time it takes for the slave shaft to engage with the master shaft until the master and slave shaft positions are synchronized. Based on the master shaft synchronization single-turn position, the master shaft engagement distance, the master shaft synchronization distance, and the current position of the master shaft, combined with the master shaft speed, the master shaft starting position and master shaft synchronization position are obtained. The master shaft engagement distance and master shaft synchronization distance are the distances the master shaft travels within the slave shaft engagement duration and the slave shaft synchronization duration, respectively, in its mold shaft space.

[0009] As described above, by first obtaining the duration of the slave shaft engagement motion and the duration of the slave shaft synchronization motion, and then applying them to the time axis to obtain the starting position and the synchronization position of the master shaft, the starting position and the synchronization position of the master and slave shafts can be obtained based on the single-turn synchronization position of the master and slave shafts, regardless of the current position of the master and slave shafts or the speed of the master shaft, combined with the kinematic parameters of the slave shaft.

[0010] In one possible implementation of the first aspect, the step of obtaining the slave shaft synchronization duration based on the slave shaft synchronization single-turn position, the slave shaft engagement movement distance, and the current position of the slave shaft, combined with the slave shaft synchronization speed, includes: obtaining the slave shaft engagement single-turn position based on the slave shaft engagement movement distance and the current position of the slave shaft, wherein the slave shaft engagement single-turn position is the single-turn position of the slave shaft when it accelerates from its current position to engage with the main shaft in its mold shaft space; obtaining the slave shaft synchronization movement distance based on the positional relationship between the slave shaft synchronization single-turn position and the slave shaft engagement single-turn position in the slave shaft mold shaft space in the direction of the slave shaft synchronization speed, and dividing the slave shaft synchronization movement distance by the slave shaft synchronization speed as the slave shaft synchronization duration.

[0011] Therefore, when obtaining the synchronous movement distance of the slave shaft, we not only look at the absolute difference between the synchronous single-turn position of the slave shaft and the meshing single-turn position of the slave shaft, but also at the positional comparison of the two in the direction of the synchronous speed of the slave shaft. Thus, regardless of whether the synchronous single-turn position of the slave shaft is before or after the meshing single-turn position of the slave shaft, we can obtain the synchronous movement distance of the slave shaft and avoid the situation where synchronization is unsolvable.

[0012] In one possible implementation of the first aspect, the spindle starting position and spindle synchronous position are obtained based on the spindle synchronous single-turn position, spindle meshing motion distance, spindle synchronous motion distance, and spindle current position, combined with the spindle speed. This includes: obtaining the spindle starting single-turn position based on the spindle synchronous single-turn position, spindle meshing motion distance, and spindle synchronous motion distance, wherein the spindle starting single-turn position is the position of the spindle starting position within the spindle single-turn in the spindle mold axis space; and obtaining the spindle starting single-turn position based on the spindle current position, spindle starting single-turn position, and spindle current single-turn position relative to the spindle starting single-turn... The relationship between the initial single-revolution position and the spindle speed direction is used to obtain the spindle's starting position. The current single-revolution position of the spindle is the position of the current spindle position within the spindle's single-revolution. Specifically, if the initial single-revolution position of the spindle comes first, the number of revolutions at the initial spindle position is the number of revolutions at the current spindle position; otherwise, the number of revolutions at the initial spindle position is the number of revolutions at the current spindle position plus 1. The spindle's starting position is then determined based on the determined number of revolutions at the initial spindle position and the initial single-revolution position. The spindle's synchronous position is obtained based on the spindle's starting position, the spindle's meshing motion distance, and the spindle's synchronous motion distance.

[0013] Therefore, when obtaining the starting position of the spindle, it is necessary to consider not only the number of revolutions of the current spindle position and the starting single-revolution position of the spindle, but also the relationship between the current single-revolution position and the starting single-revolution position of the spindle in the spindle speed direction. This determines whether the number of revolutions of the starting position of the spindle is the number of revolutions of the current spindle position or the number of revolutions of the current spindle position + 1. Regardless of whether the starting single-revolution position of the spindle falls in front of or behind the current single-revolution position of the spindle, the starting position of the spindle can be obtained automatically. Thus, no matter where the current position of the spindle is, the starting position and the synchronous position of the spindle can be obtained to control the movement of the slave axis and achieve position synchronization of the master and slave axes in the mold axis space.

[0014] In one possible implementation of the first aspect, it further includes: before obtaining the spindle starting position and the spindle synchronization position, when the slave axis speed is not 0, obtaining the slave axis speed of the control cycle by speed interpolation according to the slave axis kinematic parameters in each control cycle, and controlling the slave axis movement of the control cycle accordingly, thereby smoothly and gradually decelerating to 0 over several control cycles.

[0015] Therefore, before obtaining the spindle starting position and spindle synchronization position, when the slave shaft speed is not 0, the slave shaft speed is calculated by speed interpolation to make the slave shaft speed 0, thereby expanding the application scope of the electronic gear position synchronization method of the present invention.

[0016] In one possible implementation of the first aspect, the velocity interpolation method uses an interpolation algorithm that includes at least an S-curve interpolation algorithm or a trapezoidal curve interpolation algorithm, wherein the S-curve interpolation algorithm has a higher priority than the trapezoidal curve interpolation algorithm; the velocity interpolation method first selects the highest priority interpolation algorithm to attempt to interpolate the slave axis velocity; if the current interpolation algorithm has a solution, it performs interpolation using the current interpolation algorithm; if the current interpolation algorithm has no solution, it selects the next priority interpolation algorithm to attempt to interpolate the slave axis velocity.

[0017] In summary, both the S-curve interpolation algorithm and the trapezoidal curve interpolation algorithm, compared to using a unified polynomial algorithm throughout the process, have no overshoot problem, fast synchronization time, and low mechanical shock. Furthermore, by prioritizing the selection of the S-curve interpolation algorithm, the acceleration and velocity of the slave axis in its modulus space are made continuous, further reducing mechanical shock.

[0018] In one possible implementation of the first aspect, the velocity interpolation method interpolates the slave shaft velocity based on the slave shaft velocity and acceleration of the previous control cycle and the kinematic parameters.

[0019] As described above, the slave shaft velocity and acceleration from the previous control cycle are used as initial values ​​for velocity interpolation to achieve recursive interpolation, thus making the slave shaft velocity and acceleration continuous.

[0020] Secondly, embodiments of the present invention provide an electronic gear position synchronization device to achieve position synchronization of the master and slave shafts of the electronic gear in the mold shaft space, comprising: a position calculation module, used to obtain the master shaft starting position and master shaft synchronization position by combining the current position of the master and slave shafts and the master shaft speed with the kinematic parameters of the slave shaft when the slave shaft speed is 0; a speed engagement module, used to accelerate the slave shaft in its mold shaft space when the master shaft moves to the master shaft starting position, the acceleration being achieved by speed interpolation with the slave shaft synchronization speed as the target, the slave shaft synchronization speed being the product of the master shaft speed and the slave-master shaft gear ratio; and a position synchronization module, used to continue moving at the slave shaft synchronization speed when the slave shaft accelerates to the slave shaft synchronization speed, until the master shaft moves to the master shaft synchronization position in its mold shaft space, and the master shaft and slave shaft synchronously reach the set master-slave shaft synchronization single-turn position in their respective single-turn cycles.

[0021] In one possible implementation of the second aspect, the position calculation module is specifically used to include: when the slave shaft speed is 0, obtaining the slave shaft meshing motion distance and slave shaft meshing motion duration by velocity interpolation based on the slave shaft synchronization speed and the kinematic parameters, wherein the slave shaft meshing motion distance is the movement distance of the slave shaft within the slave shaft meshing motion duration, and the slave shaft meshing motion duration is the time it takes for the slave shaft to accelerate from the start to the slave shaft speed equal to the slave shaft synchronization speed in its mold shaft space; obtaining the slave shaft synchronization motion duration based on the slave shaft synchronization single-turn position, the slave shaft meshing motion distance, and the current position of the slave shaft, combined with the slave shaft synchronization speed, wherein the slave shaft synchronization motion duration is the time it takes for the slave shaft to mesh with the master shaft until the master and slave shaft positions are synchronized; obtaining the master shaft starting position and master shaft synchronization position based on the master shaft synchronization single-turn position, the master shaft meshing motion distance, the master shaft synchronization motion distance, and the current position of the master shaft, combined with the master shaft speed, wherein the master shaft meshing motion distance and the master shaft synchronization motion distance are the movement distances of the master shaft in its mold shaft space within the slave shaft meshing motion duration and within the slave shaft synchronization motion duration, respectively.

[0022] As described above, by first obtaining the duration of the slave shaft engagement motion and the duration of the slave shaft synchronization motion, and then applying them to the time axis to obtain the starting position and the synchronization position of the master shaft, the starting position and the synchronization position of the master and slave shafts can be obtained based on the single-turn synchronization position of the master and slave shafts, regardless of the current position of the master and slave shafts or the speed of the master shaft, combined with the kinematic parameters of the slave shaft.

[0023] In one possible implementation of the second aspect, the position calculation module is used to obtain the slave shaft synchronization duration based on the slave shaft synchronization single-turn position, the slave shaft engagement movement distance, and the current position of the slave shaft, combined with the slave shaft synchronization speed. This includes: obtaining the slave shaft engagement single-turn position based on the slave shaft engagement movement distance and the current position of the slave shaft, where the slave shaft engagement single-turn position is the single-turn position of the slave shaft when it accelerates from its current position to engage with the main shaft in its mold shaft space; obtaining the slave shaft synchronization movement distance based on the positional relationship between the slave shaft synchronization single-turn position and the slave shaft engagement single-turn position in the slave shaft mold shaft space along the slave shaft synchronization speed direction; and dividing the slave shaft synchronization movement distance by the slave shaft synchronization speed as the slave shaft synchronization duration.

[0024] Therefore, when obtaining the synchronous movement distance of the slave shaft, we not only look at the absolute difference between the synchronous single-turn position of the slave shaft and the meshing single-turn position of the slave shaft, but also at the positional comparison of the two in the direction of the synchronous speed of the slave shaft. Thus, regardless of whether the synchronous single-turn position of the slave shaft is before or after the meshing single-turn position of the slave shaft, we can obtain the synchronous movement distance of the slave shaft and avoid the situation where synchronization is unsolvable.

[0025] In one possible implementation of the second aspect, the position calculation module is used to obtain the spindle starting position and the spindle synchronous position based on the spindle synchronous single-turn position, the spindle meshing motion distance, the spindle synchronous motion distance, and the spindle current position, combined with the spindle speed. This includes: obtaining the spindle starting single-turn position based on the spindle synchronous single-turn position, the spindle meshing motion distance, and the spindle synchronous motion distance, wherein the spindle starting single-turn position is the position within the spindle single-turn radius in the spindle mold axis space; and obtaining the spindle current position based on the spindle starting single-turn position and the spindle current single-turn position. The spindle's starting position is determined by its relationship with the initial single-revolution position of the spindle in the direction of spindle speed. The current single-revolution position of the spindle is the position of the current single-revolution position within the spindle's single-revolution range. If the initial single-revolution position precedes the current position, the number of revolutions at the initial position is the same as the number of revolutions at the current position; otherwise, the number of revolutions at the initial position is the same as the number of revolutions at the current position plus one. The spindle's starting position is then determined based on the determined number of revolutions at the initial starting position and the initial single-revolution position. Finally, the spindle's synchronous position is obtained based on the initial starting position, the spindle meshing motion distance, and the spindle synchronous motion distance.

[0026] Therefore, when obtaining the starting position of the spindle, it is necessary to consider not only the number of revolutions of the current spindle position and the starting single-revolution position of the spindle, but also the relationship between the current single-revolution position and the starting single-revolution position of the spindle in the spindle speed direction. This determines whether the number of revolutions of the starting position of the spindle is the number of revolutions of the current spindle position or the number of revolutions of the current spindle position + 1. Regardless of whether the starting single-revolution position of the spindle falls in front of or behind the current single-revolution position of the spindle, the starting position of the spindle can be obtained automatically. Thus, no matter where the current position of the spindle is, the starting position and the synchronous position of the spindle can be obtained to control the movement of the slave axis and achieve position synchronization of the master and slave axes in the mold axis space.

[0027] In one possible implementation of the second aspect, it further includes: a slave axis deceleration module, which, before obtaining the spindle starting position and the spindle synchronization position, when the slave axis speed is not 0, obtains the slave axis speed of the control cycle by speed interpolation based on the slave axis kinematic parameters in each control cycle, and controls the slave axis movement of the control cycle accordingly, thereby smoothly and gradually decelerating to 0 over several control cycles.

[0028] Therefore, before obtaining the spindle starting position and spindle synchronization position, when the slave shaft speed is not 0, speed interpolation is used to make the slave shaft speed 0, thereby expanding the application scope of the electronic gear position synchronization method of the present invention.

[0029] In one possible implementation of the second aspect, the speed interpolation method uses an interpolation algorithm that includes at least an S-curve interpolation algorithm or a trapezoidal curve interpolation algorithm, wherein the S-curve interpolation algorithm has a higher priority than the trapezoidal curve interpolation algorithm. The speed interpolation method first selects the highest priority interpolation algorithm to attempt to interpolate the slave axis speed. If the current interpolation algorithm has a solution, it performs interpolation using the current interpolation algorithm. If the current interpolation algorithm has no solution, it selects the next priority interpolation algorithm to attempt to interpolate the slave axis speed.

[0030] In summary, both the S-curve interpolation algorithm and the trapezoidal curve interpolation algorithm, compared to using a unified polynomial algorithm throughout the process, have no overshoot problem, fast synchronization time, and low mechanical shock. Furthermore, by prioritizing the selection of the S-curve interpolation algorithm, the acceleration and velocity of the slave axis in its modulus space are made continuous, further reducing mechanical shock.

[0031] In one possible implementation of the second aspect, the velocity interpolation method interpolates the slave axis velocity based on the slave axis velocity and acceleration of the previous control cycle and the kinematic parameters.

[0032] As described above, the slave shaft velocity and acceleration from the previous control cycle are used as initial values ​​for velocity interpolation to achieve recursive interpolation, thus making the slave shaft velocity and acceleration continuous.

[0033] Thirdly, embodiments of the present invention provide a computing device, including: a bus; a communication interface connected to the bus; at least one processor connected to the bus; and at least one memory connected to the bus and storing program instructions, which, when executed by the at least one processor, cause the at least one processor to perform the method described in any embodiment of the first aspect.

[0034] Based on the current position of the master and slave axes, the synchronous single-turn position of the master and slave axes, and the speed of the master axis, the starting position and synchronous position of the master axis are obtained. When the master axis moves to the starting position, the slave axis starts to accelerate, so that the master axis moves to the synchronous position and realizes the synchronization of the electronic gears, thereby realizing the synchronization of the electronic gears in the set position in accordance with the PLCOpen specification.

[0035] Fourthly, embodiments of the present invention provide a computer-readable storage medium having program instructions stored thereon, which, when executed by a computer, cause the computer to perform the method described in any embodiment of the first aspect. Attached Figure Description

[0036] Figure 1 This is a flowchart illustrating a method for electronic gear position synchronization according to a first embodiment of the present invention;

[0037] Figure 2This is a flowchart illustrating a second embodiment of the electronic gear position synchronization method of the present invention;

[0038] Figure 3 This is a flowchart illustrating the speed interpolation method of a second embodiment of the electronic gear position synchronization method of the present invention;

[0039] Figure 4 This is a schematic diagram illustrating the acquisition of the spindle starting coordinates and spindle synchronization coordinates in a second embodiment of the electronic gear position synchronization method of the present invention.

[0040] Figure 5 This is a schematic diagram of a first embodiment of an electronic gear position synchronization device according to the present invention;

[0041] Figure 6 This is a schematic diagram of a second embodiment of the electronic gear position synchronization device of the present invention;

[0042] Figure 7 This is a schematic diagram of the input and output signals of various embodiments of the electronic gear position synchronization device of the present invention;

[0043] Figure 8 This is a schematic diagram illustrating the speed changes in various embodiments of the electronic gear position synchronization device of the present invention;

[0044] Figure 9 This is a schematic diagram of the structure of the computing device according to various embodiments of the present invention. Detailed Implementation

[0045] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0046] In the following description, the terms “first, second, third, etc.” or module A, module B, module C, etc. are used only to distinguish similar objects or different embodiments and do not represent a specific ordering of objects. It is understood that a specific order or sequence may be interchanged where permitted so that the embodiments of the invention described herein can be implemented in an order other than that illustrated or described herein.

[0047] In the following description, the labels of the steps, such as S110, S120, etc., do not necessarily mean that the steps will be executed in this way. The order of the steps can be interchanged or executed simultaneously if permitted.

[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.

[0049] This invention provides a method, apparatus, device, and storage medium for electronic gear position synchronization, achieving position synchronization of the master and slave shafts of the electronic gear in the mold shaft space. The method includes: when the slave shaft speed is 0, obtaining the master shaft's starting position and master shaft synchronization position based on the master-slave shaft synchronization single-turn position, using the current master-slave shaft position and master shaft speed combined with the slave shaft's kinematic parameters; the current master-slave shaft position being the current position of the master and slave shafts in the mold shaft space; when the master shaft moves to its master shaft starting position in its mold shaft space, the slave shaft begins to accelerate in its mold shaft space until its speed reaches the slave shaft synchronization speed, the acceleration speed of the slave shaft being calculated using a speed interpolation method, and the slave shaft synchronization speed being the product of the master shaft speed and the slave-master shaft gear ratio; when the slave shaft accelerates to its slave shaft synchronization speed, it continues to move at the slave shaft synchronization speed until the master shaft moves to its master shaft synchronization position in its mold shaft space, at which point the master shaft and slave shaft synchronously reach the set master-slave shaft synchronization single-turn position within their respective single-turn cycles.

[0050] To facilitate understanding, let's first introduce the scenario of electronic gear position synchronization in various embodiments of the present invention.

[0051] In each embodiment of the present invention, the main shaft of the electronic gear maintains a constant speed. The slave shaft of the electronic gear begins to chase the main shaft when its speed is 0. When the speed of the slave shaft equals its synchronous speed (i.e., when the master and slave shafts mesh), the slave shaft begins to move at a constant speed at its synchronous speed. The speed of the slave shaft is equal to the product of the speed of the main shaft and the gear ratio between the slave and main shafts. Thus, after a period of time, the master and slave shafts reach the set synchronous single-turn positions, achieving position synchronization. At this time, if the master and slave shafts are used to control two industrial components respectively, the speed and position synchronization of these two industrial components is achieved.

[0052] The following is combined Figures 1 to 4 Various method embodiments of the present invention are described below.

[0053] First, combined Figure 1 This invention introduces a method for synchronizing the position of electronic gears, embodiment one.

[0054] An embodiment of a method for synchronizing the position of electronic gears, comprising: when the slave shaft speed is 0, obtaining the starting position and the synchronized position of the master shaft based on the synchronized single-turn position of the master and slave shafts, using the current position of the master and slave shafts and the speed of the master shaft combined with the kinematic parameters of the slave shaft, wherein the current position of the master and slave shafts is the current position of the master and slave shafts in the mold shaft space; when the master shaft moves to the starting position of the master shaft in its mold shaft space, the slave shaft begins to accelerate in its mold shaft space until its speed reaches the synchronized speed of the slave shaft, the acceleration speed of the slave shaft is calculated using a speed interpolation method, and the synchronized speed of the slave shaft is the product of the speed of the master shaft and the gear ratio between the master and slave shafts; when the slave shaft accelerates to the synchronized speed of the slave shaft, it continues to move at the synchronized speed of the slave shaft until the master shaft moves to the synchronized position of the master shaft in its mold shaft space, wherein the master shaft and the slave shaft reach the set synchronized single-turn position of the master and slave shafts in their respective single-turn cycles.

[0055] Figure 1 A flowchart of an embodiment of an electronic gear synchronization method is shown, including steps S110 to S130.

[0056] S110: When the slave axis speed is 0, based on the master-slave axis synchronization single-turn position, the master axis starting position and master axis synchronization position are obtained by combining the current position of the master-slave axis and the master axis speed with the kinematic parameters of the slave axis. The current position of the master-slave axis is the current position of the master-slave axis in the mold axis space.

[0057] The current position of the master and slave axes includes the current position of the master axis in its modulus space and the current position of the slave axis in its modulus space. The position in the modulus space can exceed 360 degrees.

[0058] Among them, the master-slave axis synchronization single-turn position is the position of the master axis within its single turn and the position of the slave axis within its single turn when the master-slave axis positions are synchronized; the master axis starting position is the position of the master axis in its mold axis space when the slave axis starts to accelerate; and the master axis synchronization position is the position of the master axis in its mold axis space when the master-slave axis positions are synchronized.

[0059] Among them, the current position and speed of the master and slave axes can be obtained in real time, and the single-cycle position of the master and slave axes synchronization is the input parameter. That is, only the single-cycle position of the master and slave axes synchronization needs to be input to obtain the starting position and the synchronization position of the master axis. Thus, the slave axis starts synchronization when the master axis starts at the starting position and the slave axis is synchronized with the master axis when the master axis moves to the synchronization position. Moreover, the time for the slave axis to achieve position synchronization is short.

[0060] In some embodiments, before obtaining the spindle start position and spindle synchronization position, when the slave axis speed is not zero, the slave axis speed for each control cycle is obtained by speed interpolation based on the slave axis kinematic parameters, and the slave axis movement for that control cycle is controlled accordingly, thereby smoothly and gradually decelerating to zero over several control cycles. This speed interpolation is implemented using an S-curve or a trapezoidal curve.

[0061] Therefore, before obtaining the spindle start position and spindle synchronization position, when the slave spindle speed is not 0, the slave spindle speed is calculated by speed interpolation to make the slave spindle speed 0, thereby expanding the scope of application of the method in this embodiment.

[0062] In some embodiments, when the slave shaft speed is 0, the slave shaft speed is interpolated using the speed interpolation method according to the kinematic parameters to obtain the slave shaft meshing motion distance and slave shaft meshing motion duration. The slave shaft meshing motion distance is the distance the slave shaft travels within the slave shaft meshing motion duration, and the slave shaft meshing motion duration is the time it takes for the slave shaft to accelerate from the start to the slave shaft speed equal to the slave shaft synchronization speed in its mold shaft space. Based on the slave shaft synchronization single-turn position, slave shaft meshing motion distance, and current position of the slave shaft, combined with the slave shaft synchronization speed, the slave shaft synchronization motion duration is obtained. The slave shaft synchronization motion duration is the time it takes for the slave shaft to mesh with the master shaft until the master and slave shaft positions are synchronized. Based on the master shaft synchronization single-turn position, master shaft meshing motion distance, master shaft synchronization motion distance, and current position of the master shaft, combined with the master shaft speed, the master shaft starting position and master shaft synchronization position are obtained. The master shaft meshing motion distance and master shaft synchronization motion distance are the distances the master shaft travels within the slave shaft meshing motion duration and the slave shaft synchronization motion duration, respectively, in its mold shaft space. The process of interpolating the slave shaft speed using the speed interpolation method based on the kinematic parameters to obtain the slave shaft engagement distance and duration includes: firstly, interpolating the slave shaft speed for each control cycle using the speed interpolation method based on the kinematic parameters to obtain the slave shaft speed for each control cycle; the sum of the durations of each control cycle is the slave shaft engagement duration; then, obtaining the slave shaft engagement distance by multiplying the slave shaft speed of each control cycle by the duration of that control cycle. It should be emphasized that the interpolation calculation in this step is a calculation process to obtain the slave shaft engagement distance and duration, and does not control the slave shaft.

[0063] Therefore, regardless of the current position of the master and slave axes, and regardless of the speed of the master axis, this invention first obtains the duration of the slave axis engagement motion and the duration of the slave axis synchronization motion, and then applies this to the time axis to obtain the starting position and the synchronization position of the master axis. Subsequently, based on the single-turn synchronization position of the master and slave axes and combined with the kinematic parameters of the slave axis, the starting position and the synchronization position of the master axis can be obtained. For traditional linear spool spaces, users must consider setting the single-turn synchronization position of the master and slave axes in conjunction with kinematic parameters; otherwise, there may be no solution, and synchronization of the master and slave axes at the set position cannot be achieved.

[0064] In some embodiments, obtaining the slave shaft synchronous motion duration based on the slave shaft synchronous single-turn position, slave shaft engagement motion distance, and slave shaft current position, combined with the slave shaft synchronous speed, includes: obtaining the slave shaft engagement single-turn position based on the slave shaft engagement motion distance and the slave shaft current position, wherein the slave shaft engagement single-turn position is the single-turn position of the slave shaft when it accelerates from its current position to engage with the main shaft in its mold shaft space; obtaining the slave shaft synchronous motion distance based on the positional relationship between the slave shaft synchronous single-turn position and the slave shaft engagement single-turn position in the slave shaft mold shaft space in the direction of the slave shaft synchronous speed, and dividing the slave shaft synchronous motion distance by the slave shaft synchronous speed as the slave shaft synchronous motion duration.

[0065] Therefore, when obtaining the synchronous movement distance of the driven shaft, we not only consider the absolute difference between the synchronous single-turn position and the meshing single-turn position of the driven shaft, but also the comparison of their positions in the direction of the synchronous speed of the driven shaft. When the synchronous single-turn position of the driven shaft is ahead, the synchronous movement distance of the driven shaft is the distance between the two. Otherwise, the synchronous movement distance of the driven shaft is the length of the single-turn position of the driven shaft minus the difference between the two distances. Thus, regardless of whether the synchronous single-turn position of the driven shaft is before or after the meshing single-turn position of the driven shaft, the synchronous movement distance of the driven shaft can be obtained, avoiding the situation where synchronization is unsolvable.

[0066] In some embodiments, obtaining the spindle starting position and spindle synchronous position based on the spindle synchronous single-turn position, spindle meshing motion distance, spindle synchronous motion distance, and spindle current position, combined with the spindle speed, includes: obtaining the spindle starting single-turn position based on the spindle synchronous single-turn position, spindle meshing motion distance, and spindle synchronous motion distance, wherein the spindle starting single-turn position is the position of the spindle starting position within the spindle single-turn in the spindle mold axis space; obtaining the spindle starting position based on the relationship between the spindle current position, the spindle starting single-turn position, and the position of the spindle current single-turn position and the spindle starting single-turn position in the spindle speed direction, wherein the spindle current single-turn position is the position of the spindle current position within the spindle single-turn; and obtaining the spindle synchronous position based on the spindle starting position, spindle meshing motion distance, and spindle synchronous motion distance.

[0067] Therefore, when obtaining the starting position of the spindle, it is based not only on the number of revolutions of the current spindle position and the starting single-revolution position of the spindle, but also on the relationship between the current single-revolution position and the starting single-revolution position of the spindle in the spindle velocity direction. When the starting single-revolution position of the spindle is ahead, the number of revolutions of the starting spindle position is the number of revolutions of the current spindle position; otherwise, the number of revolutions of the starting spindle position is the number of revolutions of the current spindle position plus 1. Then, the starting position of the spindle is determined based on the determined number of revolutions of the starting spindle position and the starting single-revolution position. Regardless of whether the starting single-revolution position of the spindle falls before or after the current single-revolution position, the starting position of the spindle can be automatically obtained. Thus, regardless of the current position of the spindle, the starting position and the synchronous position of the spindle can be obtained to control the movement of the slave axis and achieve position synchronization of the master and slave axes in the mold axis space.

[0068] It should be emphasized that in all embodiments of the present invention, all distances, positions, velocities and accelerations are distances, positions, velocities and accelerations in the mold axis space, and the distances and positions in the mold axis space can be greater than 360 degrees.

[0069] S120: When the main shaft moves to the starting position in its mold axis space, the slave shaft starts to accelerate in its mold axis space until its speed reaches the synchronous speed of the slave shaft. The speed of the slave shaft's acceleration is calculated using a speed interpolation method.

[0070] In some embodiments, the velocity interpolation method interpolates the slave axis velocity based on the slave axis velocity and acceleration of the previous control cycle and the kinematic parameters.

[0071] As described above, the slave axis velocity and acceleration from the previous control cycle are used as initial values ​​for velocity interpolation to achieve recursive interpolation, making the slave axis velocity and acceleration continuous, with low computational load and no callback issues.

[0072] In some embodiments, the speed interpolation method uses at least one interpolation algorithm: an S-curve interpolation algorithm or a trapezoidal curve interpolation algorithm, wherein the S-curve interpolation algorithm has a higher priority than the trapezoidal curve interpolation algorithm. The speed interpolation method first selects the highest priority interpolation algorithm to attempt to interpolate the slave axis speed. If the current interpolation algorithm has a solution, it performs interpolation using the current interpolation algorithm. If the current interpolation algorithm has no solution, it selects the next priority interpolation algorithm to attempt to interpolate the slave axis speed.

[0073] In summary, both the S-curve interpolation algorithm and the trapezoidal curve interpolation algorithm, compared to using a unified polynomial algorithm throughout the process, have no overshoot problem, fast synchronization time, and low mechanical shock. Furthermore, by prioritizing the selection of the S-curve interpolation algorithm, the acceleration and velocity of the slave axis in its modulus space are made continuous, further reducing mechanical shock.

[0074] S130: When the slave axis accelerates to the slave axis synchronous speed, it continues to move at the slave axis synchronous speed until the main axis moves to the main axis synchronous position in its mold axis space. Then, the main axis and the slave axis reach the set master-slave axis synchronous single-turn position in their respective single-turns.

[0075] The synchronization method provided by the present invention is divided into two stages. In the first stage, the slave shaft is accelerated so that the slave shaft speed reaches the slave shaft synchronization speed, that is, the slave shaft and the main shaft achieve speed synchronization in the mold shaft space. In the second stage, the slave shaft continues to move at the slave shaft synchronization speed. When the main shaft moves to the main shaft synchronization position in its mold shaft space, the slave shaft and the main shaft achieve synchronization at the set position.

[0076] In summary, the first embodiment of the electronic gear position synchronization method only requires inputting the master-slave shaft synchronization single-turn position, i.e., setting the angles of the master and slave shafts within their respective single-turn rotations when the master and slave shafts are synchronized. Regardless of the current position of the master and slave shafts, and regardless of the speed of the master shaft, the starting position and synchronization position of the master shaft can be obtained by combining the kinematic parameters of the slave shaft. When the master shaft moves to the starting position, the slave shaft begins to accelerate. When the master shaft moves to the synchronization position, the master-slave shaft meshing and position synchronization of the electronic gear conforming to the PLCOpen specification are achieved, and the position synchronization time is short. Compared with the position synchronization of the linear spool space, it does not require considering the master-slave shaft synchronization single-turn position based on the kinematic parameters of the slave shaft. It can adaptively calculate the number of rotations of the master and slave shafts under any circumstances, and there is no unsolvable situation. At the same time, the user interface of the technical solution of this embodiment only requires the master-slave shaft synchronization single-turn position, slave shaft kinematic parameters, and synchronization state, which can be easily encapsulated into the pins of the PLCOpen electronic gear position synchronization function module, facilitating function portability.

[0077] The following is combined Figures 2 to 4 This invention introduces a second embodiment of an electronic gear position synchronization method.

[0078] An embodiment of a method for electronic gear position synchronization, based on embodiment one, involves controlling the speed of the driven shaft to gradually and smoothly decelerate to 0 over several control cycles before synchronization begins, when the speed of the driven shaft is not 0. During the electronic gear synchronization process, segmented speed interpolation is performed using an S-shaped curve or a trapezoidal curve. Compared to using a single polynomial interpolation throughout the entire process, this method avoids overshooting and has a smaller computational load. It also adds compatibility with both forward and reverse synchronization methods, expanding the range of electronic gear synchronization.

[0079] Figure 2 The flowchart of a second embodiment of an electronic gear position synchronization method is shown, including steps S210 to S250.

[0080] S210: Before the slave axis begins synchronization, when the slave axis speed is not 0, the slave axis is smoothly and gradually decelerated to 0 through several control cycles by speed interpolation based on the slave axis kinematic parameters.

[0081] In some embodiments, before the slave axis begins synchronization, when the slave axis speed is not 0, the slave axis speed of each control cycle is obtained by speed interpolation control, and the slave axis movement of that control cycle is controlled accordingly, thereby smoothly and gradually decelerating to 0 over several control cycles.

[0082] The speed interpolation in this step can be achieved using the S-curve algorithm or the trapezoidal curve algorithm. For details, please refer to the speed interpolation method in Embodiment 2 of an electronic gear position synchronization method.

[0083] S220: Based on the kinematic parameters of the driven shaft, the speed interpolation method is used to perform speed interpolation calculation on the driven shaft to obtain the driven shaft meshing distance and driven shaft meshing duration.

[0084] Among them, the driven shaft engagement movement distance is the movement distance of the driven shaft in its mold shaft space within the driven shaft engagement movement duration, and the driven shaft engagement movement duration is the time from when the driven shaft starts to accelerate until the driven shaft speed equals the driven shaft synchronous speed.

[0085] First, based on the kinematic parameters, the slave shaft velocity of each control cycle is interpolated using a velocity interpolation method to obtain the slave shaft velocity of each control cycle. The sum of the durations of each control cycle is the slave shaft engagement motion duration. Then, based on the product of the slave shaft velocity of each control cycle and the duration of that control cycle, the slave shaft engagement motion distance is obtained. It should be emphasized that the interpolation calculation in this step is a calculation process to obtain the slave shaft engagement motion distance and slave shaft engagement motion duration, and does not control the slave shaft.

[0086] The speed interpolation in this step can be achieved using the S-curve algorithm or the trapezoidal curve algorithm. For details, please refer to the speed interpolation method in Embodiment 2 of an electronic gear position synchronization method.

[0087] S230: Based on the master-slave axis synchronous single-turn position, master-slave axis meshing motion distance, and master-slave axis current position, combined with slave axis synchronous speed and master axis speed, the master axis starting position and master axis synchronous position are obtained.

[0088] First, the slave shaft synchronization time is obtained by combining the slave shaft synchronization single-turn position, slave shaft meshing distance, and slave shaft current position with the slave shaft synchronization speed. The slave shaft synchronization time is the time from slave shaft meshing with the master shaft to master-slave shaft position synchronization. Then, the master shaft starting position and master shaft synchronization position are obtained by combining the master shaft synchronization single-turn position, master shaft meshing distance, master shaft synchronization distance, and master shaft current position with the master shaft speed.

[0089] Among them, the main shaft meshing motion distance and the main shaft synchronous motion distance are the motion distances of the main shaft in its mold shaft space during the meshing motion time of the slave shaft and the synchronous motion time of the slave shaft, respectively.

[0090] As described above, by first obtaining the duration of the slave shaft engagement motion and the slave shaft synchronization motion, and then applying them to the time axis to obtain the master shaft starting position and master shaft synchronization position, the master-slave axis synchronization single-turn position can be determined based on the master-slave axis synchronization single-turn position. Regardless of the current position of the master and slave axes, or the speed of the master shaft, the master shaft starting position and master shaft synchronization position can always be obtained by combining the kinematic parameters of the slave axis. For traditional linear axis spaces, users must consider the master-slave axis synchronization single-turn position in conjunction with kinematic parameters; otherwise, there may be no solution, and synchronization of the master and slave axes at the set position cannot be achieved.

[0091] For the specific method of this step, please refer to the method for obtaining the spindle starting position and spindle synchronization position in Embodiment 2 of an electronic gear synchronization method.

[0092] It should be emphasized that steps S220 and S230 are theoretical calculations and can be completed in one step.

[0093] S240: When the main spindle moves to the starting position in its mold axis space, the slave axis begins to accelerate in its mold axis space. This acceleration is achieved through speed interpolation with the target of the slave axis's synchronous speed.

[0094] The speed interpolation in this step can be achieved using the S-curve algorithm or the trapezoidal curve algorithm. For details, please refer to the speed interpolation method in Embodiment 2 of an electronic gear position synchronization method.

[0095] S250: When the slave shaft accelerates to the slave shaft synchronous speed, it continues to move at the slave shaft synchronous speed until the main shaft moves to the main shaft synchronous position in its mold axis space. Then, the main shaft and the slave shaft reach the set master-slave shaft synchronous single-turn position in their respective single-turns.

[0096] In this embodiment, steps S210, S220 and S240 all use velocity interpolation. The calculation methods for the three are the same, and interpolation can be performed using the S-curve algorithm or the trapezoidal curve algorithm.

[0097] The S-curve algorithm includes at least 15-segment S-curve algorithm, 11-segment S-curve algorithm, 7-segment S-curve algorithm, and trapezoidal curve algorithm, with the priority order being 15-segment S-curve algorithm, 11-segment S-curve algorithm, 7-segment S-curve algorithm, and trapezoidal curve algorithm.

[0098] When interpolating speed, interpolation starts from the highest priority interpolation algorithm. If the current interpolation algorithm has a solution, the control quantity of the control mode is planned through the current interpolation algorithm to smoothly decelerate the motor to 0. If the current interpolation algorithm has no solution, the next priority interpolation algorithm is solved.

[0099] The following examples, using the 7-segment S-curve algorithm and the trapezoidal curve algorithm as examples, illustrate under what circumstances the 7-segment S-curve algorithm should be chosen and under what circumstances the trapezoidal curve algorithm should be chosen.

[0100] Table 1 shows the segmentation of the seven S-shaped curves, including: acceleration segment, uniform acceleration segment, deceleration segment, uniform velocity segment, acceleration / deceleration segment, uniform deceleration segment, and deceleration / deceleration segment, along with the time, acceleration, acceleration, velocity, and position for each segment. The velocity interpolation in steps S220 and S240 mainly involves the acceleration segment, uniform acceleration segment, deceleration segment, and uniform velocity segment, while the velocity interpolation in step S210 mainly involves the acceleration / deceleration segment, uniform deceleration segment, and deceleration / deceleration segment.

[0101] Table 1

[0102]

[0103] Continued from Table 1

[0104]

[0105]

[0106] Table 2 shows the segmentation of the trapezoidal curve, including: acceleration segment, uniform velocity segment, and deceleration segment, along with the time, acceleration, and velocity for each stage. The velocity interpolation in steps S220 and S240 mainly involves the acceleration segment, while the velocity interpolation in step S210 mainly involves the deceleration segment.

[0107] Table 2

[0108]

[0109] Figure 3 The flowchart of a speed interpolation method according to a second embodiment of an electronic gear synchronization method is shown, including steps S310 to S340.

[0110] For ease of explanation, we will continue to use the 7-segment S-curve algorithm and trapezoidal curve as examples. The velocity interpolation in step S210 involves deceleration, while the velocity interpolation in steps S220 and S240 involves acceleration.

[0111] S310: For step S210, calculate the speed interpolation for 7 S-curve segments t5, t6, and t7; for step S220, calculate the speed interpolation for 7 S-curve segments t1, t2, and t3.

[0112] For the velocity interpolation in step S210, let the current velocity be V. s The maximum permissible absolute acceleration is a max Using equation (1), t5, t6 and t7 of the 7 S-shaped curves can be calculated.

[0113]

[0114] For the speed interpolation in steps S220 and S240, let the synchronous speed of the slave shaft be V. sl The maximum permissible absolute acceleration is a max Using equation (2), t1, t2 and t3 of the 7 S-shaped curves can be calculated.

[0115]

[0116] S320: Determine the curve type of the interpolation algorithm.

[0117] Specifically, for the velocity interpolation in step S210, it is determined whether t6 is greater than 0. If t6 is greater than or equal to 0, the velocity interpolation using the 7-segment S-curve algorithm has a solution, and step S330 is executed. Otherwise, the velocity interpolation using the 7-segment S-curve algorithm has no solution, and step S340 is executed to use the trapezoidal curve algorithm for interpolation.

[0118] Specifically, for the velocity interpolation in steps S220 and S240, it is determined whether t2 is greater than 0. If t2 is greater than or equal to 0, then the 7-segment S-curve algorithm has a solution, and step S330 is executed. Otherwise, the 7-segment S-curve algorithm has no solution, and step S340 is executed, using the trapezoidal curve algorithm for interpolation.

[0119] When choosing between the 11-segment S-curve algorithm and the 7-segment S-curve algorithm, the 11-segment S-curve can be integrated, which transforms it into a 7-segment S-curve. Then, the 11-segment S-curve algorithm is evaluated using the same method used to determine whether the 7-segment S-curve algorithm has a solution. The 11-segment S-curve achieves continuous acceleration.

[0120] Regarding the choice between the 15-segment S-curve algorithm and the 11-segment S-curve algorithm, the 16-segment S-curve can be integrated, which transforms it into an 11-segment S-curve. Then, the 15-segment S-curve algorithm is evaluated according to the method used to determine whether the 11-segment S-curve algorithm has a solution. The 15-segment S-curve algorithm realizes continuous acceleration.

[0121] It needs to be emphasized that:

[0122] (1) For the speed interpolation in step S210, the speed interpolation algorithm was selected in the first control cycle when the stop method was started, based on the initial speed of the slave shaft. The speed interpolation algorithm and the speed and acceleration at the end of each stage of the corresponding curve were saved.

[0123] (2) For the speed interpolation in step S220, steps S310 and S320 were executed based on the slave shaft synchronization speed, selecting the speed interpolation algorithm and saving the speed interpolation algorithm and the speed and acceleration at the end of each stage of the corresponding curve. The slave shaft meshing motion distance and slave shaft meshing motion duration were also calculated. Because the various embodiments of the present invention are calculated in the model axis space, the slave shaft synchronization motion distance can exceed 360 degrees. Compared with the calculation in the online axis space, no matter how fast the main shaft moves, the various embodiments of the present invention can achieve synchronization between the slave shaft and the main shaft at a set position.

[0124] (3) For the velocity interpolation in step S240, steps S310 and S320 are not executed. Instead, the velocity interpolation in step S220 is used directly to save the velocity interpolation algorithm and the velocity and acceleration at the end of each stage of the corresponding curve.

[0125] S330: Uses a 7-segment S-curve algorithm for velocity interpolation.

[0126] The smoothing of the 7-segment S-curve algorithm includes the continuity of velocity and acceleration.

[0127] It needs to be emphasized that:

[0128] (1) For the speed interpolation in step S210, in each control cycle, the current control cycle is determined to be in which stage of the curve based on the slave shaft speed and acceleration planned in the previous control cycle. The corresponding stage formula in Table 1 is selected for speed interpolation, and acceleration and speed are calculated.

[0129] (2) The velocity interpolation in step S220 is a theoretical calculation and is not actually interpolated. This step is not executed.

[0130] (3) For the speed interpolation in step S240, in each control cycle, the current control cycle is determined based on the slave shaft speed and acceleration planned in the previous control cycle. The corresponding stage of the curve is selected from the formula in Table 1 for speed interpolation, and the acceleration and speed are calculated.

[0131] S340: Interpolation is performed using a trapezoidal curve algorithm.

[0132] At this point, the velocity is continuous, but the acceleration is discontinuous.

[0133] It needs to be emphasized that:

[0134] (1) For the speed interpolation in step S210, in each control cycle, the current control cycle is located in which stage of the curve based on the slave shaft speed and acceleration planned in the previous control cycle. The corresponding stage formula in Table 2 is selected for speed interpolation, and acceleration and speed are calculated.

[0135] (2) The velocity interpolation in step S220 is a theoretical calculation and is not actually interpolated. This step is not executed.

[0136] (3) For the speed interpolation in step S240, in each control cycle, the current control cycle is determined based on the slave shaft speed and acceleration planned in the previous control cycle. The corresponding stage of the curve is selected in Table 2 for speed interpolation, and the acceleration and speed are calculated.

[0137] The speed interpolation method in Embodiment 2 of an electronic gear position synchronization method, whether it is an S-curve interpolation algorithm or a trapezoidal curve interpolation algorithm, uses a unified polynomial algorithm for the entire process, which has no overshoot problem, fast synchronization time, and small mechanical shock. Furthermore, the S-curve interpolation algorithm is preferred to achieve acceleration continuity first, further reducing mechanical shock.

[0138] In a second embodiment of an electronic gear position synchronization method, the method for obtaining the spindle starting position and the spindle synchronization position first obtains the slave shaft meshing motion duration and the slave shaft synchronization motion duration, and then applies them to the time axis to obtain the spindle starting position and the spindle synchronization position. Figure 4 The flow of the method is shown, including steps S2310 to S2350.

[0139] S2310: Based on the current position P of the slave axis sl and synchronous motion distance D from the axis s0 Obtain the single-turn engagement position D from the shaft. sl_r .

[0140] Among them, the single-turn engagement position D of the shaft sl_r The position of the slave shaft within a single revolution when the slave shaft accelerates from its current position to its synchronous speed.

[0141] The position D of a single turn of shaft engagement is calculated using equation (3). sl_r D sl_cycle This is the distance of one revolution from the axis.

[0142]

[0143] Among them, because in the mold axis space, P calculated by equation (3) sl +D s0 Regardless of whether it is positive or negative, that is, regardless of whether the synchronization process is forward or reverse from the shaft, the single-turn engagement position D of the driven shaft can be calculated. sl_r .

[0144] S2320: Based on the set single-turn synchronization position P of the slave shaft sl_sync From shaft engagement single-turn position D sl_r Synchronous speed V with the shaft sl Obtain the slave axis synchronous motion duration t1 and the master axis synchronous motion distance D1.

[0145] Among them, the synchronous motion duration t1 of the slave shaft is the time from the start of engagement between the slave shaft and the main shaft to the position synchronization, and the synchronous motion distance D1 of the main shaft is the distance the main shaft moves during the synchronous motion duration t1 of the slave shaft.

[0146] Among them, the single-turn position P of the slave shaft synchronization is obtained. sl_sync Single-turn engagement position D with the driven shaft sl_r The difference in the direction of the synchronous speed of the slave shaft in the slave shaft space is the synchronous motion time t1 of the slave shaft. This difference is essentially the synchronous motion distance of the slave shaft, which is less than a single revolution of the slave shaft.

[0147] The synchronous motion time t1 of the slave axis is calculated using equation (4), and the synchronous motion distance D1 of the master axis is calculated using equation (5).

[0148]

[0149] D1=t1*V m (5)

[0150] Among them, for V sl and D sl_r With P sl_sync The relationship classification calculation is to obtain the single-turn synchronous position P of the slave shaft. sl_sync Single-turn engagement position D with the driven shaft sl_r The accurate difference in the direction of synchronous speed of the shaft within the mold shaft space. For example, because in the mold shaft space, equation (4) in D sl_r >P sl_sync It considers the slave axis's movement distance, which is equivalent to one revolution, and supports synchronization from any starting position of the slave axis. It also utilizes V... sl Positive and negative signs support synchronization in both directions.

[0151] S2330: Based on the set spindle single-turn synchronization position P m_stnc The spindle synchronous motion distance D1 and the spindle meshing motion distance D0 are used to obtain the initial single-turn position D of the spindle. m_r .

[0152] Wherein, the spindle engagement distance D0 is the distance the spindle travels during the slave shaft engagement time t0, and is equal to t0*V m Spindle starting single-turn position D m_r Let D be the starting position of the spindle within a single spindle revolution in the spindle mold axis space. The starting position D of the spindle in a single revolution is calculated according to equation (6). m_r .

[0153]

[0154] Equation (6) also utilizes V m Positive and negative values ​​support synchronization in different directions.

[0155] S2340: Based on the current spindle position P m Spindle starting single-turn position D m_r Current single-revolution position P of the spindle m_r Position D of the starting single revolution of the spindle m_r At the main shaft speed V m The directional positional relationship, using the current position P of the main axis m Obtain the spindle starting position P mstart .

[0156] Among them, the current single-cycle position P of the main shaft m_r Main axis current position P mPosition within a single spindle revolution. Equation (7) is based on the current spindle position P. m Get the current single-cycle position P of the spindle m_r .

[0157] P m_r =P m %D m_cycle (7)

[0158] First, based on the current single-turn position P of the spindle m_r Position D of the starting single revolution of the spindle m_r At the main shaft speed V m The front-to-back relationship in the direction, using the current position P of the main axis. m Obtain the spindle starting position P mstart single lap position P mstart_r and position number P mstart_q Single lap position P mstart_r This can be considered as the starting position D of the spindle in a single revolution. m_r Correction; using the spindle starting position P mstart single lap position P mstart_r and position number P mstart_q Obtain the spindle starting position P mstart Equation (8) is used when the spindle speed V m For scenarios where the value is greater than 0, the current single-cycle position P of the main axis is used. m_r Position D of the starting single revolution of the spindle m_r At the main shaft speed V m The starting position P of the main shaft is obtained by determining the relationship between the directional position and the position. mstart The current single-revolution position P of the spindle m_r Position D of the starting single revolution of the spindle m_r At the main shaft speed V m The relationship between the positions in the direction of P m Greater than or equal to 0 and less than 0, D m_r The discussion combines greater than or equal to 0 and less than 0.

[0159] Spindle speed V m Greater than 0:

[0160]

[0161] Among them, because in the mold axis space, according to the starting single-turn position D of the main shaft... m_r and spindle speed V m The direction and the current single-turn position P of the spindle m_r Position D of the starting single revolution of the spindle m_r In the branching scenario of equation (8), the relationship can be applied to P. mstart_q Add 1 lap In P mstart_rIn D m_r Add D to the base m_cycle Or reduce D m_cycle To suit different scenarios, the main axis starting position P mstart The calculation.

[0162] Equation (9) is used for the spindle speed V. m For scenarios where the value is less than 0, the current single-cycle position P of the main axis is used. m_r Position D of the starting single revolution of the spindle m_r At the main shaft speed V m The starting position P of the main shaft is obtained by determining the relationship between the directional position and the position. mstart The current single-revolution position P of the spindle m_r Position D of the starting single revolution of the spindle m_r At the main shaft speed V m The relationship between the positions in the direction of P m Discussion of greater than or equal to 0 and less than 0.

[0163] Spindle speed V m Less than 0:

[0164]

[0165] Among them, because in the mold axis space, according to the starting single-turn position D of the main shaft... m_r and spindle speed V m The direction and the current single-turn position P of the spindle m_r Position D of the starting single revolution of the spindle m_r In the branch scenario of equation (9), the relationship can be applied to P. mstart_q Reduce 1 lap In P mstart_r In D m_r Add or reduce D on the basis of m_cycle To suit different scenarios, the main axis starting position P mstart The calculation.

[0166] S2350: Based on the spindle starting position P mstart The spindle synchronous position p is obtained by measuring the spindle meshing motion distance D0 and the spindle synchronous motion distance D1. mreach .

[0167] The spindle synchronization position p can be obtained using equation (10). mreach .

[0168]

[0169] In the second embodiment of the method for obtaining the starting position and the synchronized position of the spindle, all distances, positions and velocities are distances, positions and velocities in the linear axis space, which can be positive or negative, that is, suitable for the synchronization of electronic gears in the same direction and opposite directions.

[0170] In summary, Embodiment 2 of the electronic gear synchronization method, based on Embodiment 1, involves controlling the speed of the driven shaft to gradually and smoothly decelerate to 0 over several control cycles before synchronization begins, when the speed of the driven shaft is not 0. During the electronic gear synchronization process, segmented speed interpolation is performed using an S-shaped curve or a trapezoidal curve. Compared to using a single polynomial interpolation throughout the entire process, this method avoids overshooting issues and requires less computation. It also adds compatibility for both forward and reverse synchronization methods, thus expanding the scope of electronic gear synchronization.

[0171] The following is combined Figures 5 to 8 Various device embodiments of the present invention are described below.

[0172] An embodiment of an electronic gear position synchronization device operates an electronic gear position synchronization method. The method described in embodiment one has all the advantages of an electronic gear position synchronization method.

[0173] Figure 5 The structure of an embodiment of an electronic gear position synchronization device is shown, including a position calculation module 510, a speed engagement module 520, and a position synchronization module 530.

[0174] The position calculation module 510 is used to obtain the starting position and synchronized position of the master shaft based on the synchronized single-turn position of the master and slave shafts, using the current position of the master and slave shafts, the master shaft speed, and the kinematic parameters of the slave shaft, when the slave shaft speed is 0. The current position of the master and slave shafts refers to their current position in the mold axis space. For its principle and advantages, please refer to step S110 of Embodiment 1 of an electronic gear position synchronization method.

[0175] The speed engagement module 520 is used to accelerate the driven shaft in its own space until it reaches the synchronous speed of the driven shaft when the main shaft moves to the starting position of the main shaft. The acceleration speed of the driven shaft is calculated using a speed interpolation method, and the synchronous speed of the driven shaft is the product of the main shaft speed and the gear ratio between the main shaft and the driven shaft. For its principle and advantages, please refer to step S120 of Embodiment 1 of an electronic gear position synchronization method.

[0176] The position synchronization module 530 is used to continue moving at the slave shaft synchronous speed when the slave shaft accelerates to the slave shaft synchronous speed, until the main shaft moves to the main shaft synchronous position in its mold axis space. At this point, the main shaft and slave shaft synchronously reach the set master-slave shaft synchronous single-turn position within their respective single-turn cycles. For its principle and advantages, please refer to step S130 of Embodiment 1 of an electronic gear position synchronization method.

[0177] An embodiment of an electronic gear position synchronization device, and an embodiment of an electronic gear position synchronization method, have all the advantages of the embodiment of the electronic gear position synchronization method.

[0178] Figure 6 The structure of a second embodiment of an electronic gear position synchronization device is shown, including a slave shaft reduction module 610, a slave shaft synchronization calculation module 620, a main shaft synchronization calculation module 630, a speed engagement module 640, and a position synchronization module 650.

[0179] The slave shaft deceleration module 610 is used to, before synchronization begins and when the slave shaft speed is not zero, obtain the slave shaft speed in each control cycle based on the slave shaft kinematic parameters through speed interpolation control, and control the slave shaft movement in that control cycle accordingly, thereby smoothly and gradually decelerating to zero over several control cycles. For its principle and advantages, please refer to step S210 of Embodiment 2 of an electronic gear position synchronization method.

[0180] The slave shaft synchronization calculation module 620 is used to perform speed interpolation calculations on the slave shaft speed according to the kinematic parameters and the speed interpolation method when the slave shaft speed is 0, thereby obtaining the slave shaft meshing motion distance and slave shaft meshing motion duration. For its principle and advantages, please refer to step S220 of Embodiment 2 of an electronic gear position synchronization method.

[0181] The spindle synchronization calculation module 630 is used to obtain the spindle starting position and spindle synchronization position based on the single-turn synchronization position of the master and slave spindles, the meshing distance of the master and slave spindles, and the current position of the master and slave spindles, combined with the slave spindle synchronization speed and the master spindle speed. For its principle and advantages, please refer to step S230 of Embodiment 2 of an electronic gear position synchronization method.

[0182] The speed engagement module 640 is used to accelerate the driven shaft in its mold axis space until it reaches the synchronous speed of the driven shaft when the main shaft moves to the starting position of the main shaft. The acceleration speed of the driven shaft is calculated using a speed interpolation method, and the synchronous speed of the driven shaft is the product of the main shaft speed and the gear ratio between the main shaft and the driven shaft. For its principle and advantages, please refer to step S240 of Embodiment 2 of an electronic gear position synchronization method.

[0183] The position synchronization module 650 is used to continue moving at the slave shaft synchronous speed when the slave shaft accelerates to the slave shaft synchronous speed, until the main shaft moves to the main shaft synchronous position in its mold axis space. At this point, the main shaft and slave shaft synchronously reach the set master-slave shaft synchronous single-turn position within their respective single-turn cycles. For its principle and advantages, please refer to step S250 of Embodiment 2 of an electronic gear position synchronization method.

[0184] Figure 7The input and output signals of various embodiments of an electronic gear position synchronization device are shown.

[0185] The input signals include the following signals.

[0186] MasterID, the spindle ID;

[0187] SlaveID, the ID of the slave axis;

[0188] Execute, the synchronous function trigger signal, is triggered by a rising edge;

[0189] RatioNumerator, the numerator of gear ratio;

[0190] RatioDenominator, the gear ratio denominator;

[0191] MasterValueSource is the source of the spindle position value. The default value is 1, which means it is obtained from the previous control cycle, and 2 means it is obtained from the feedback of the spindle driver.

[0192] MasterSyncPosition, spindle single-turn synchronization position P m_sync ;

[0193] SlaveSyncPosition, the single-turn synchronization position P of the slave axis. sl_sync ;

[0194] SyncMode, the synchronization mode, sets the matching method to Shortest.

[0195] Acceleration, the maximum permissible acceleration (referring to the maximum absolute value, which is used for acceleration in this invention);

[0196] Deceleration, the maximum permissible deceleration (referring to the maximum absolute value, which is used for deceleration in this invention);

[0197] Jerk, the maximum permissible jerk (referring to the maximum absolute value, which is used in this invention to refer to the maximum absolute value), is abbreviated as J;

[0198] BufferMode, the blending mode, 0 means interrupt the previous module and run immediately, 1 means run after the previous module has finished running;

[0199] Tsm controls the cycle duration.

[0200] In some embodiments, the input signal further includes the following signals:

[0201] SMasterStartDistance, spindle start distance, is not input in this embodiment of the invention.

[0202] Velocity, synchronization speed; this signal is not input in this embodiment of the invention.

[0203] The output signals include the following signals:

[0204] MasterID, the spindle ID;

[0205] SlaveID, the ID of the slave axis;

[0206] StartSync: Whether to start synchronization. 1 indicates synchronization has started, 0 indicates synchronization has not started.

[0207] InSync indicates whether the slave axis is synchronized; 1 indicates synchronized, 0 indicates not synchronized.

[0208] Busy, function operation status: 1 is busy, 0 is idle;

[0209] Active: The state of the controlled axis (slave axis), 1 is under control, 0 is not under control;

[0210] CommandAborted: Whether the function was interrupted; 1 indicates that it was interrupted.

[0211] Error, fault signal, 1 indicates a fault, 0 indicates no fault;

[0212] ErrorID, error code

[0213] As described above, the device embodiment of the present invention only requires the master and slave shaft synchronization single-turn position, the number of master and slave shaft gears, the slave shaft kinematic parameters and synchronization state on the user interface, which can be easily encapsulated into the pins of the PLCOpen electronic gear position synchronization function module GearInPOS, facilitating function porting and device development.

[0214] Figure 8 The diagram shows the signal changes during the synchronization process of an electronic gear position synchronization device.

[0215] Synchronization begins when the Execute signal has a rising edge, and when the spindle moves to the MasterStartDistance in the mold axis space, i.e., the spindle's starting position p... mreach At that time, the slave shaft begins to accelerate in the mold shaft space, and when it accelerates to the slave shaft's synchronous speed, the master and slave shafts mesh and maintain uniform motion. After meshing, the curves of the positions of the master and slave shafts in the mold shaft space changing with time are both straight lines; when the master shaft moves to the MasterSycPosition, i.e., the master shaft synchronous position P, in the mold shaft space... mreach The slave axis and the master axis achieve position synchronization at the set position.

[0216] This invention also provides a computing device, which will be described below in conjunction with... Figure 9 Detailed introduction.

[0217] The computing device 900 includes a processor 910, a memory 920, a communication interface 930, and a bus 940.

[0218] It should be understood that the communication interface 930 in the computing device 900 shown in the figure can be used to communicate with other devices.

[0219] The processor 910 can be connected to the memory 920. The memory 920 can be used to store the program code and data. Therefore, the memory 920 can be a storage unit inside the processor 910, an external storage unit independent of the processor 910, or a component that includes both the storage unit inside the processor 910 and the external storage unit independent of the processor 910.

[0220] Optionally, the computing device 900 may also include a bus 940. The memory 920 and communication interface 930 can be connected to the processor 910 via the bus 940. The bus 940 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 950 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one line is used to represent it in this figure, but this does not mean that there is only one bus or one type of bus.

[0221] It should be understood that in this embodiment of the invention, the processor 910 may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. Alternatively, the processor 910 may employ one or more integrated circuits to execute relevant programs to implement the technical solutions provided in this embodiment of the invention.

[0222] The memory 920 may include read-only memory and random access memory, and provides instructions and data to the processor 910. A portion of the processor 910 may also include non-volatile random access memory. For example, the processor 910 may also store device type information.

[0223] When the computing device 900 is running, the processor 910 executes the operational steps of the computer execution instruction execution method embodiment stored in the memory 920.

[0224] It should be understood that the computing device 900 according to the embodiments of the present invention can correspond to the corresponding subject in executing the methods according to the various embodiments of the present invention, and the above and other operations and / or functions of each module in the computing device 900 are respectively for implementing the corresponding processes of the methods of this embodiment. For the sake of brevity, they will not be described in detail here.

[0225] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0226] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0227] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0228] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0229] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0230] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0231] This invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is used to perform the operation steps of the method embodiment.

[0232] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0233] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0234] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0235] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0236] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, all of which fall within the scope of protection of the present invention.

Claims

1. A method for synchronizing the position of electronic gears, characterized in that, To achieve position synchronization between the master and slave shafts of the electronic gear in the mold axis space, the following is included: When the slave axis speed is 0, based on the master-slave axis synchronization single-turn position, the master axis starting position and master axis synchronization position are obtained by combining the current position of the master-slave axis and the master axis speed with the kinematic parameters of the slave axis. The current position of the master-slave axis is the current position of the master-slave axis in the mold axis space. When the main shaft moves to the starting position in its mold shaft space, the driven shaft starts to accelerate in its mold shaft space until its speed reaches the synchronous speed of the driven shaft. The acceleration speed of the driven shaft is calculated using a speed interpolation method. The synchronous speed of the driven shaft is the product of the main shaft speed and the gear ratio of the driven shaft. When the slave axis accelerates to its synchronous speed, it continues to move at that speed until the master axis moves to its synchronous position within its mold axis space. At this point, both the master and slave axes synchronously reach their respective master-slave synchronous single-revolution positions within their single revolutions. Specifically, when the slave axis speed is 0, based on the master-slave axis synchronization single-cycle position, the master axis starting position and master axis synchronization position are obtained by combining the current master-slave axis position and master axis speed with the slave axis kinematic parameters, including: When the slave shaft speed is 0, the slave shaft speed is interpolated using the speed interpolation method according to the kinematic parameters to obtain the slave shaft meshing motion distance and slave shaft meshing motion duration. The slave shaft meshing motion distance is the distance the slave shaft moves within the slave shaft meshing motion duration, and the slave shaft meshing motion duration is the time it takes for the slave shaft to accelerate from the start to the slave shaft speed equal to the slave shaft synchronous speed in its model shaft space. Based on the slave shaft synchronization single-turn position, slave shaft meshing motion distance, and slave shaft current position, combined with the slave shaft synchronization speed, the slave shaft synchronization motion duration is obtained. The slave shaft synchronization motion duration is the time from slave shaft meshing with master shaft to master-slave shaft position synchronization. Based on the spindle synchronous single-turn position, spindle meshing motion distance, spindle synchronous motion distance, and spindle current position, the spindle starting position and spindle synchronous position are obtained in combination with the spindle speed. The spindle meshing motion distance and spindle synchronous motion distance are the motion distances of the spindle in its mold axis space during the slave shaft meshing motion duration and during the slave shaft synchronous motion duration, respectively.

2. The method according to claim 1, characterized in that, The process of obtaining the slave shaft synchronization duration based on the slave shaft synchronization single-turn position, slave shaft engagement distance, and current slave shaft position, combined with the slave shaft synchronization speed, includes: The single-turn position of the slave shaft is obtained based on the engagement motion distance of the slave shaft and the current position of the slave shaft. The single-turn position of the slave shaft is the position of the slave shaft when it accelerates from its current position to engage with the main shaft in its mold shaft space. The synchronous motion distance of the slave shaft is obtained by determining the positional relationship between the slave shaft synchronization single-turn position and the slave shaft engagement single-turn position in the slave shaft space along the direction of the slave shaft synchronization speed. The quotient of the synchronous motion distance of the slave shaft divided by the slave shaft synchronization speed is taken as the synchronous motion duration of the slave shaft.

3. The method according to claim 2, characterized in that, Based on the spindle synchronous single-turn position, spindle meshing motion distance, spindle synchronous motion distance, and current spindle position, combined with the spindle speed, the spindle starting position and spindle synchronous position are obtained, including: The starting position of the spindle is obtained based on the synchronous single-turn position of the spindle, the meshing motion distance of the spindle, and the synchronous motion distance of the spindle. The starting position of the spindle is the position of the spindle starting position within the single-turn position of the spindle in the spindle mold axis space. Based on the relationship between the current position of the spindle, the starting position of the spindle in a single revolution, and the position of the current position of the spindle in a single revolution and the starting position of the spindle in the direction of spindle speed, the starting position of the spindle is obtained, and the current position of the spindle in a single revolution is the position of the current position of the spindle within the single revolution of the spindle. The spindle synchronization position is obtained based on the spindle starting position, spindle engagement distance, and spindle synchronization distance.

4. The method according to claim 1, characterized in that, Also includes: Before obtaining the spindle starting position and spindle synchronization position, when the slave axis speed is not 0, the slave axis speed of each control cycle is obtained according to the kinematic parameters through the speed interpolation method, and the slave axis movement of the control cycle is controlled accordingly, so as to smoothly and gradually decelerate to 0 through several control cycles.

5. The method according to claim 1, characterized in that, The speed interpolation method uses at least the following interpolation algorithms: S-curve interpolation algorithm or trapezoidal curve interpolation algorithm, with the S-curve interpolation algorithm having a higher priority than the trapezoidal curve interpolation algorithm. The speed interpolation method first selects the highest priority interpolation algorithm to attempt to interpolate the slave axis speed. If the current interpolation algorithm has a solution, it performs interpolation using the current interpolation algorithm. If the current interpolation algorithm has no solution, it selects the next priority interpolation algorithm to attempt to interpolate the slave axis speed.

6. The method according to claim 1, characterized in that, The velocity interpolation method interpolates the slave axis velocity based on the slave axis velocity and acceleration of the previous control cycle and the kinematic parameters.

7. A device for electronic gear position synchronization, characterized in that, To achieve position synchronization between the master and slave shafts of the electronic gear in the mold axis space, the following is included: The position calculation module is used to obtain the starting position and synchronization position of the master axis based on the master-slave axis synchronization single-turn position when the slave axis speed is 0, using the current position of the master-slave axis and the master axis speed combined with the kinematic parameters of the slave axis. The current position of the master-slave axis is the current position of the master-slave axis in the model axis space. The speed engagement module is used to accelerate the driven shaft in its mold shaft space until the speed reaches the synchronous speed of the driven shaft when the main shaft moves to the starting position of the main shaft. The acceleration speed of the driven shaft is calculated using a speed interpolation method. The synchronous speed of the driven shaft is the product of the main shaft speed and the gear ratio between the main shaft and the driven shaft. The position synchronization module is used to continue moving at the slave axis synchronous speed when the slave axis accelerates to the slave axis synchronous speed, until the main axis moves to the main axis synchronous position in its mold axis space. Then, the main axis and the slave axis reach the set master-slave axis synchronous single-turn position in their respective single-turns. Specifically, when the slave axis speed is 0, based on the master-slave axis synchronization single-cycle position, the master axis starting position and master axis synchronization position are obtained by combining the current master-slave axis position and master axis speed with the slave axis kinematic parameters, including: When the slave shaft speed is 0, the slave shaft speed is interpolated using the speed interpolation method according to the kinematic parameters to obtain the slave shaft meshing motion distance and slave shaft meshing motion duration. The slave shaft meshing motion distance is the distance the slave shaft moves within the slave shaft meshing motion duration, and the slave shaft meshing motion duration is the time it takes for the slave shaft to accelerate from the start to the slave shaft speed equal to the slave shaft synchronous speed in its model shaft space. Based on the slave shaft synchronization single-turn position, slave shaft meshing motion distance, and slave shaft current position, combined with the slave shaft synchronization speed, the slave shaft synchronization motion duration is obtained. The slave shaft synchronization motion duration is the time from slave shaft meshing with master shaft to master-slave shaft position synchronization. Based on the spindle synchronous single-turn position, spindle meshing motion distance, spindle synchronous motion distance, and spindle current position, the spindle starting position and spindle synchronous position are obtained in combination with the spindle speed. The spindle meshing motion distance and spindle synchronous motion distance are the motion distances of the spindle in its mold axis space during the slave shaft meshing motion duration and during the slave shaft synchronous motion duration, respectively.

8. A computing device, characterized in that, include, bus; A communication interface, which is connected to the bus; At least one processor is connected to the bus; as well as At least one memory connected to the bus and storing program instructions that, when executed by the at least one processor, cause the at least one processor to perform the method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, It stores program instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 6.