A method, device and storage medium for electronic gear speed synchronization
By adjusting the slave shaft speed of the electronic gear online to make it equal to the slave shaft synchronization speed, the problem of electronic gear speed synchronization not conforming to the PLCOpen specification in the prior art is solved, realizing the continuity of speed and acceleration, and improving platform compatibility and computing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- KYLAND TECH CO LTD
- Filing Date
- 2023-04-28
- Publication Date
- 2026-05-01
AI Technical Summary
In the existing technology, the online speed smoothing synchronization method of electronic gears fails to comply with the PLCOpen specification, resulting in poor compatibility and reusability across different software and hardware platforms, as well as large computational load and over-adjustment issues.
By acquiring the slave shaft speed and acceleration from the previous control cycle, the slave shaft speed of the current control cycle is adjusted online using a recursive method to make it equal to the slave shaft synchronization speed. During the adjustment process, the speed and acceleration are kept continuous. Online speed synchronization of the electronic gear is achieved by using speed filtering, trapezoidal curve interpolation, or S-curve interpolation.
It achieves online speed synchronization of electronic gears in accordance with the PLCOpen specification, reduces the amount of computation, avoids over-adjustment problems, maintains the continuity of speed and acceleration during the adjustment process, and supports compatibility and reusability across different platforms.
Smart Images

Figure CN116400748B_ABST
Abstract
Description
A method, apparatus, and storage medium for electronic gear speed synchronization 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 speed 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, but they are not yet compatible with the control modes of different motors.
[0004] Electronic gears are a widely used function, but there is still no online speed smoothing synchronization method for electronic gears that conforms to the PLCOpen specification. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a method, apparatus, and storage medium for electronic gear speed synchronization. The method includes: acquiring the slave shaft speed and acceleration of the previous control cycle; when the slave shaft speed is not equal to the slave shaft synchronization speed, adjusting the slave shaft speed of the current control cycle online based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters acquired in the current control cycle, so that after several control cycles, the slave shaft speed equals the slave shaft synchronization speed. During the adjustment process, the slave shaft speed and acceleration are continuous, and the slave shaft synchronization speed is the product of the master shaft speed and the slave-master shaft gear ratio. The technical solution of the present invention achieves online speed synchronization of electronic gears conforming to the PLCOpen specification. By using a recursive method to adjust the speed of each control cycle online, the computational load is smaller and there is no overshoot problem compared to the polynomial method. Furthermore, the speed and acceleration remain continuous throughout the adjustment process. Only the slave shaft kinematic parameters and the control cycle duration need to be input, and the method can be encapsulated into a pin format conforming to the PLCOpen specification function block, facilitating copying and calling.
[0006] In a first aspect, embodiments of the present invention provide a method for electronic gear speed synchronization, comprising: acquiring the slave shaft speed and acceleration of the previous control cycle; when the slave shaft speed is not equal to the slave shaft synchronization speed, adjusting the slave shaft speed of the current control cycle online based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters acquired in the current control cycle, so that after several control cycles, the slave shaft speed equals the slave shaft synchronization speed, wherein the slave shaft speed and acceleration are continuous during the adjustment process, and the slave shaft synchronization speed is the product of the master shaft speed and the slave-master shaft gear ratio. In some embodiments, the adjustment method includes at least one of the following three methods: speed filtering, trapezoidal curve interpolation of acceleration, and a combination of S-curve and speed filtering.
[0007] As described above, by using a recursive method to adjust the speed of each control cycle online, not only can online speed synchronization of electronic gears conforming to the PLCOpen specification be achieved, but the computational load is also smaller and there is no overshoot problem compared to the polynomial method. Furthermore, the speed and acceleration remain continuous throughout the adjustment process. Only the kinematic parameters of the slave axis and the control cycle duration need to be input, and it can be encapsulated into a pin form of a function block conforming to the PLCOpen specification, making it easy to copy and call.
[0008] In one possible implementation of the first aspect, the method further includes: obtaining the planned slave axis position for the current control cycle based on the adjusted slave axis speed in each control cycle; sending the planned slave axis position for the current control cycle to the slave axis driver in each control cycle, and gradually controlling the slave axis to synchronize with the master axis.
[0009] As described above, by converting the slave axis speed of the current control cycle into the slave axis position planned for the current control cycle, the synchronization of the slave axis and the master axis of the electronic gear in position control-related control modes (cycle position synchronization mode and feedback position module) can be supported.
[0010] In one possible implementation of the first aspect, adjusting the slave axis speed of the current control cycle online based on the slave axis speed, the acceleration, and the slave axis kinematic parameters obtained in the current control cycle includes: adjusting the slave axis speed of the current control cycle online through velocity filtering based on the slave axis speed, the acceleration, and the slave axis kinematic parameters obtained in the current control cycle, without needing to determine the shape of the jerk, acceleration, or velocity distribution curve over time based on the kinematic parameters.
[0011] As described above, by adjusting the slave axis speed online in each control cycle through velocity filtering, the problem of potential unsolvable velocity interpolation of S-shaped interpolation curves and the problem of discontinuous acceleration of velocity interpolation of trapezoidal interpolation curves are avoided. Nonlinear filtering is performed directly based on the filtering parameters, which not only achieves continuous velocity and acceleration, but also reduces the computational load and improves the fitting degree compared to the time-consuming calculation of S-shaped curves to approximate the most suitable S-curve parameters and user target parameters.
[0012] In one embodiment of the first aspect, adjusting the slave shaft speed of the current control cycle online based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters obtained in the current control cycle includes: interpolating the slave shaft acceleration using a trapezoidal interpolation curve based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters obtained in the current control cycle, and adjusting the slave shaft speed of the current control cycle online.
[0013] As shown above, by interpolating the acceleration of the slave axis using a trapezoidal interpolation curve, the problem of potential unsolvable velocity interpolation with a fixed S-curve is avoided, as is the problem of discontinuity in velocity interpolation with a trapezoidal curve, thus achieving continuity in both velocity and acceleration.
[0014] In one embodiment of the first aspect, adjusting the slave shaft speed of the current control cycle online based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters obtained in the current control cycle includes: interpolating the slave shaft speed using an S-shaped interpolation curve based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters obtained in the current control cycle, and adjusting the slave shaft speed of the current control cycle online; when there is no solution for interpolating the slave shaft speed using the S-shaped curve, adjusting the slave shaft speed of the current control cycle online using velocity filtering based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters obtained in the current control cycle.
[0015] As shown above, when there is a solution for velocity interpolation of the S-shaped interpolation curve, the S-shaped interpolation curve is selected; when there is no solution for velocity interpolation of the S-shaped interpolation curve, velocity filtering is selected. This not only achieves continuity of velocity and acceleration, but also takes advantage of the mature module of the S-shaped interpolation curve and the higher fitting degree of velocity filtering.
[0016] In one embodiment of the first aspect, the velocity filtering is a parallel second-order filtering of velocity and a first-order filtering of acceleration.
[0017] As shown above, by performing second-order filtering on velocity and first-order filtering on acceleration in parallel, not only can continuous acceleration be achieved, but even if the control cycle duration and slave axis control parameters change simultaneously, the slave axis velocity and acceleration can still be continuous, with good fitting and fast following.
[0018] In one possible implementation of the first aspect, the method further includes: modifying the duration of the control cycle online during any control cycle.
[0019] Therefore, during the synchronization process, by modifying the control cycle online, the control cycle is reduced when the motion state of the slave axis changes rapidly (at the boundaries of each segment of the S-curve or trapezoidal curve), making the change of the slave axis motion state more timely and accurate. When the motion state of the slave axis changes slowly (in the middle of each segment of the S-curve or trapezoidal curve), the control cycle is increased, thereby achieving smoother slave axis motion.
[0020] In one possible implementation of the first aspect, the kinematic parameters, the control cycle, and the synchronization result are encapsulated into pins of a PLCOpen speed synchronization function block; the implementation method within the speed synchronization function block is to adjust the slave axis speed of the current control cycle online through speed filtering based on the slave axis speed, slave axis acceleration, and the slave axis kinematic parameters obtained in the current control cycle.
[0021] The above is encapsulated into the pins of the PLCOpen speed synchronization function block, which facilitates portability and improves development efficiency.
[0022] Secondly, embodiments of the present invention provide an electronic gear speed synchronization device, comprising: an acquisition module for acquiring the slave shaft speed and acceleration of the previous control cycle; and a synchronization module for, when the slave shaft speed is not equal to the slave shaft synchronization speed, adjusting the slave shaft speed of the current control cycle online based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters acquired in the current control cycle, so that after several control cycles the adjusted slave shaft speed equals the slave shaft synchronization speed, wherein the slave shaft speed and acceleration are continuous during the adjustment process, and the slave shaft synchronization speed is the product of the master shaft speed and the slave-master shaft gear ratio. In some embodiments, the adjustment method includes at least one of the following three methods: speed filtering, trapezoidal curve interpolation of acceleration, and a combination of S-curve and speed filtering.
[0023] As described above, by using a recursive method to adjust the speed of each control cycle online, not only can online speed synchronization of electronic gears conforming to the PLCOpen specification be achieved, but the computational load is also smaller and there is no overshoot problem compared to the polynomial method. Furthermore, the speed and acceleration remain continuous throughout the adjustment process. Only the kinematic parameters of the slave axis and the control cycle duration need to be input, and it can be encapsulated into a pin form of a function block conforming to the PLCOpen specification, making it easy to copy and call.
[0024] In one possible implementation of the second aspect, it further includes: a position adjustment module, configured to obtain the planned slave axis position for the current control cycle based on the adjusted slave axis speed in each control cycle; and a position output module, configured to send the planned slave axis position for the current control cycle to the slave axis driver in each control cycle, thereby gradually controlling the slave axis to synchronize with the master axis.
[0025] As described above, by converting the slave axis speed of the current control cycle into the slave axis position planned for the current control cycle, the synchronization of the slave axis and the master axis of the electronic gear in position control-related control modes (cycle position synchronization mode and feedback position module) can be supported.
[0026] In one possible implementation of the second aspect, the synchronization module is specifically used to include: adjusting the slave axis speed of the current control cycle online by velocity filtering based on the slave axis speed, the acceleration, and the slave axis kinematic parameters obtained in the current control cycle, without needing to determine the shape of the jerk, acceleration, or velocity distribution curve over time based on the kinematic parameters.
[0027] As described above, by adjusting the slave axis speed online in each control cycle through velocity filtering, the problem of potential unsolvable velocity interpolation of S-shaped interpolation curves and the problem of discontinuous acceleration of velocity interpolation of trapezoidal interpolation curves are avoided. Nonlinear filtering is performed directly based on the filtering parameters, which not only achieves continuous velocity and acceleration, but also reduces the computational load and improves the fitting degree compared to the time-consuming calculation of S-shaped curves to approximate the most suitable S-curve parameters and user target parameters.
[0028] In one embodiment of the second aspect, the synchronization module is specifically used to: interpolate the slave shaft acceleration using a trapezoidal interpolation curve based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters obtained in the current control cycle, and adjust the slave shaft speed of the current control cycle online.
[0029] As shown above, by interpolating the acceleration of the slave axis using a trapezoidal interpolation curve, the problem of potential unsolvable velocity interpolation with a fixed S-curve is avoided, as is the problem of discontinuity in velocity interpolation with a trapezoidal curve, thus achieving continuity in both velocity and acceleration.
[0030] In one embodiment of the second aspect, the synchronization module is specifically used to: interpolate the slave shaft speed using an S-shaped interpolation curve based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters obtained in the current control cycle, and adjust the slave shaft speed of the current control cycle online; when there is no solution for interpolating the slave shaft speed using the S-shaped curve, adjust the slave shaft speed of the current control cycle online using speed filtering based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters obtained in the current control cycle.
[0031] As shown above, when there is a solution for velocity interpolation of the S-shaped interpolation curve, the S-shaped interpolation curve is selected; when there is no solution for velocity interpolation of the S-shaped interpolation curve, velocity filtering is selected. This not only achieves continuity of velocity and acceleration, but also takes advantage of the mature module of the S-shaped interpolation curve and the higher fitting degree of velocity filtering.
[0032] In one embodiment of the second aspect, the velocity filtering is a parallel second-order filtering of velocity and a first-order filtering of acceleration.
[0033] As shown above, by performing second-order filtering on velocity and first-order filtering on acceleration in parallel, not only can continuous acceleration be achieved, but even if the control cycle duration and slave axis control parameters change simultaneously, the slave axis velocity and acceleration can still be continuous, with good fitting and fast following.
[0034] In one possible implementation of the second aspect, the synchronization module is further specifically used to modify the duration of the control cycle online in any control cycle.
[0035] As described above, by modifying the control cycle online, the control cycle is reduced when the motion state of the slave axis changes rapidly (at the boundaries of each segment of the S-curve or trapezoidal curve), making the change in the motion state of the slave axis more timely and accurate. When the motion state of the slave axis changes slowly (in the middle of each segment of the S-curve or trapezoidal curve), the control cycle is increased, thereby achieving smoother slave axis motion.
[0036] In one possible implementation of the second aspect, the device encapsulates the kinematic parameters, the control cycle, and the synchronization result into pins of a PLCOpen speed synchronization function block; the implementation method within the speed synchronization function block is to adjust the slave axis speed of the current control cycle online through speed filtering based on the slave axis speed, slave axis acceleration, and the slave axis kinematic parameters obtained in the current control cycle.
[0037] The above is encapsulated into the pins of the PLCOpen speed synchronization function block, which facilitates portability and improves development efficiency.
[0038] 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.
[0039] 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
[0040] Figure 1 is a flowchart illustrating a method for electronic gear speed synchronization according to a first embodiment of the present invention;
[0041] Figure 2A is a flowchart illustrating the first implementation of a second embodiment of the electronic gear speed synchronization method of the present invention;
[0042] Figure 2B is a flowchart illustrating the second implementation of a method for electronic gear speed synchronization according to the present invention.
[0043] Figure 2C is a flowchart illustrating the third implementation of a second embodiment of the electronic gear speed synchronization method of the present invention;
[0044] Figure 3 is a schematic diagram of a first embodiment of the electronic gear speed synchronization device of the present invention;
[0045] Figure 4A is a schematic diagram of the first structure of a second embodiment of the electronic gear speed synchronization device of the present invention;
[0046] Figure 4B is a schematic diagram of the second structure of a second embodiment of the electronic gear speed synchronization device of the present invention;
[0047] Figure 4C is a schematic diagram of the third structure of a second embodiment of the electronic gear speed synchronization device of the present invention;
[0048] Figure 5 is a schematic diagram of the input and output signals of various embodiments of the electronic gear speed synchronization device of the present invention;
[0049] Figure 6 is a schematic diagram of speed changes in various embodiments of the electronic gear speed synchronization device of the present invention;
[0050] Figure 7 is a schematic diagram of the structure of the computing device according to various embodiments of the present invention. Detailed Implementation
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] This invention provides a method, apparatus, and storage medium for electronic gear speed synchronization. The method includes: acquiring the slave shaft speed and acceleration of the previous control cycle; when the slave shaft speed is not equal to the slave shaft synchronization speed, adjusting the slave shaft speed of the current control cycle online based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters acquired in the current control cycle, so that after several control cycles, the slave shaft speed equals the slave shaft synchronization speed. During the adjustment process, the slave shaft speed and acceleration are continuous, and the slave shaft synchronization speed is the product of the master shaft speed and the slave-master shaft gear ratio. This invention achieves online speed synchronization of electronic gears conforming to the PLCOpen specification. By using a recursive method to adjust the speed of each control cycle online, it has a smaller computational load and avoids overshooting problems compared to polynomial methods. Furthermore, it ensures continuous speed and acceleration throughout the adjustment process and only requires inputting the slave shaft kinematic parameters and control cycle duration. It can be encapsulated into a pin-based function block conforming to the PLCOpen specification, facilitating copying and invocation.
[0056] The embodiments of the present invention are described below with reference to the accompanying drawings. First, the speed synchronization scenario of the electronic gears in the embodiments of the present invention is introduced.
[0057] In this invention, the electronic gear in each embodiment includes a master shaft and a slave shaft. There is no physical transmission device between the slave shaft and the master shaft. The slave shaft and the master shaft can be physical shafts or virtual shafts.
[0058] In this process, the main shaft moves at a constant speed, while the initial speed of the driven shaft is not equal to the synchronous speed of the driven shaft. The synchronous speed of the driven shaft is the product of the main shaft speed and the gear ratio between the driven and main shafts. After adjustment through several control cycles, the speed of the driven shaft becomes equal to the synchronous speed of the driven shaft, thus achieving meshing between the driven shaft and the main shaft.
[0059] The following describes various embodiments of the electronic gear speed synchronization method of the present invention with reference to Figures 1 to 2C.
[0060] An embodiment of an electronic gear speed synchronization method includes: acquiring the slave shaft speed and acceleration of the previous control cycle; when the slave shaft speed is not equal to the slave shaft synchronization speed, adjusting the slave shaft speed of the current control cycle online according to the slave shaft speed, the acceleration, and the slave shaft kinematic parameters acquired in the current control cycle, so that after several control cycles, the slave shaft speed is equal to the slave shaft synchronization speed, wherein the slave shaft speed and acceleration are continuous during the adjustment process, and the slave shaft synchronization speed is the product of the main shaft speed and the slave-main shaft gear ratio.
[0061] Figure 1 shows the flow chart of a first embodiment of an electronic gear speed synchronization method, including steps S110 to S120.
[0062] S110: Obtain the slave axis speed and acceleration from the previous control cycle.
[0063] The slave axis speed and acceleration of the previous control cycle can be generated in the previous control cycle, and thus used to adjust the slave axis speed of the control cycle recursively.
[0064] In some embodiments, each control cycle also acquires the kinematic parameters of the slave axis to facilitate online adjustment of the slave axis speed for the current control cycle. The kinematic parameters of the slave axis include at least the maximum permissible jerk of the slave axis and the maximum absolute value of the maximum jerk.
[0065] In some embodiments, the current control cycle duration is also obtained. Different control cycles have different durations, so that the control cycle can be modified online. When the motion state of the slave axis changes rapidly (at the boundaries of each segment of the S-curve or trapezoidal curve), the control cycle is reduced to make the change of the motion state of the slave axis more timely and accurate and avoid over-adjustment. When the motion state of the slave axis changes slowly (in the middle of each segment of the S-curve or trapezoidal curve), the control cycle is increased to achieve smoother slave axis motion.
[0066] It should be emphasized that in all embodiments of the present invention, the velocity, acceleration and position are axial space velocity, acceleration and position.
[0067] S120: When the slave shaft speed is not equal to the slave shaft synchronous speed, the slave shaft speed of the current control cycle is adjusted online based on the slave shaft speed, acceleration and the slave shaft kinematic parameters obtained in the current control cycle, so that the slave shaft speed is equal to the slave shaft synchronous speed after several control cycles of adjustment, and the slave shaft speed and acceleration are continuous in each adjustment process.
[0068] Among them, the speed adjustment of the shaft includes at least one of the following three methods: speed filtering, trapezoidal curve interpolation of acceleration, and a combination of S-curve and speed filtering.
[0069] In some embodiments, the slave axis velocity of the current control cycle is adjusted online through velocity filtering based on the slave axis velocity, acceleration, and slave axis kinematic parameters obtained from the current control cycle. This eliminates the need to determine the shape of the jerk, acceleration, or velocity-time distribution curve based on the slave axis kinematic parameters. In some embodiments, velocity filtering involves parallel second-order filtering of velocity and first-order filtering of acceleration, enabling smooth online synchronization and broad applicability even when slave axis kinematic parameters and / or control cycle duration change simultaneously. Therefore, adjusting the slave axis velocity online for each control cycle through velocity filtering avoids the potential unsolvable problem of S-shaped interpolation curve velocity interpolation and the discontinuous acceleration problem of trapezoidal interpolation curve velocity interpolation. Directly following the nonlinear filtering parameters not only achieves continuous velocity and acceleration but also, compared to the time-consuming calculation of S-shaped curves to approximate the most suitable S-curve parameters and user target parameters, velocity filtering involves less computation and achieves a higher fit.
[0070] In some embodiments, the slave axis velocity in the current control cycle is adjusted online by interpolating the slave axis acceleration using a trapezoidal interpolation curve based on the slave axis velocity, acceleration, and slave axis kinematic parameters obtained in the current control cycle. While trapezoidal interpolation curves are generally used for velocity interpolation, they are used in these embodiments for slave axis acceleration interpolation. Therefore, interpolating the slave axis acceleration using a trapezoidal interpolation curve avoids the potential unsolvable problem of fixed S-curve velocity interpolation and the discontinuity problem of velocity interpolation with a trapezoidal curve, thus achieving continuous velocity and acceleration.
[0071] In some embodiments, the slave shaft velocity is interpolated using an S-curve based on the slave shaft velocity, acceleration, and slave shaft kinematic parameters obtained in the current control cycle, and the slave shaft velocity in the current control cycle is adjusted online. When there is no solution for the slave shaft velocity interpolation using the S-curve, the slave shaft velocity in the current control cycle is adjusted online using velocity filtering based on the slave shaft velocity, acceleration, and slave shaft kinematic parameters obtained in the current control cycle. Therefore, by selecting the S-curve interpolation curve when a solution is available and selecting velocity filtering when no solution is available, not only is velocity and acceleration continuous, but the advantages of the mature S-curve interpolation module and the higher fitting degree of velocity filtering are also combined.
[0072] In some embodiments, the adjusted slave axis speed is sent to the slave axis driver in each control cycle to gradually control the slave axis to synchronize with the master axis, thereby supporting the synchronization of the slave axis with the master axis in speed-dependent control mode. In other embodiments, the planned slave axis position for the current control cycle is obtained based on the adjusted slave axis speed in each control cycle; the planned slave axis position for the current control cycle is sent to the slave axis driver in each control cycle to gradually control the slave axis to synchronize with the master axis.
[0073] In some embodiments, the slave axis kinematic parameters, control cycle, and synchronization results are encapsulated into the pins of a PLCOpen speed synchronization function block. The implementation method within the speed synchronization function block involves adjusting the slave axis speed in the current control cycle online through speed filtering, based on the slave axis speed, slave axis acceleration, and the slave axis kinematic parameters obtained in the current control cycle. This encapsulation into the pins of the PLCOpen speed synchronization function block facilitates portability and improves development efficiency.
[0074] In summary, in Embodiment 1 of an electronic gear speed synchronization method, the slave shaft speed of the current control cycle is adjusted online based on the slave shaft speed, acceleration, and kinematic parameters obtained in each control cycle. This allows for smooth synchronization between the slave shaft and the master shaft over several control cycles, achieving online speed synchronization of electronic gears in accordance with the PLCOpen specification. Furthermore, by using a recursive method to adjust the speed of each control cycle online, the computational load is smaller and there is no overshoot problem compared to the polynomial method. The speed and acceleration remain continuous throughout the adjustment process, and only the slave shaft kinematic parameters and control cycle duration need to be input. The method can be encapsulated into a pin format conforming to the PLCOpen specification, facilitating copying and calling.
[0075] Embodiment 2 of an electronic gear speed synchronization method is a specific implementation of Embodiment 1 of an electronic gear speed synchronization method. It has all the advantages of Embodiment 1 of an electronic gear speed synchronization method, realizes smooth online synchronization of electronic gears in accordance with the PLCOpen specification, and provides three detailed implementation methods for online recursive adjustment of slave shaft speed.
[0076] Figure 2A shows the flow chart of a first implementation of a second embodiment of an electronic gear speed synchronization method, including steps S210 to S250.
[0077] S210: Obtain the slave axis velocity and acceleration of the previous control cycle, the kinematic parameters of the slave axis in the current control cycle, and the control cycle duration.
[0078] Among them, the kinematic parameters of the slave axis include at least the absolute value of the maximum permissible acceleration of the slave axis and the absolute value of the jerk.
[0079] S220: Determine if the master and slave axes are synchronized.
[0080] The method for determining synchronization is whether the slave shaft speed is equal to the slave shaft synchronization speed, that is, whether it is equal to the product of the current spindle speed and the slave spindle gear ratio.
[0081] When synchronization is not achieved, step S230 is executed; when synchronization is achieved, the process ends.
[0082] S230: Based on the slave shaft synchronization speed, using the acquired slave shaft speed, acceleration, and slave shaft kinematic parameters, the slave shaft speed of the current control cycle is adjusted online by performing trapezoidal curve interpolation on the acceleration, so that the slave shaft speed smoothly changes to the slave shaft synchronization speed after several control cycles of adjustment.
[0083] The acceleration is interpolated using a trapezoidal curve. The segments of this trapezoidal curve are shown in Table 1, which are divided into: acceleration segment, uniform acceleration segment, and deceleration segment. The time, velocity, acceleration, and jerk of each stage are shown in the following table.
[0084] Table 1
[0085]
[0086] t1, t2, and t3 are obtained according to equation (1), where J is the absolute value of the maximum permissible jerk of the kinematic parameters of the slave axis, and a max For the maximum permissible acceleration, -a max For the maximum permissible deceleration, V s The slave axis speed obtained can also be the planned slave axis speed from the previous cycle, V e This is the speed synchronization of the slave axis.
[0087]
[0088] Determine whether there is a uniform acceleration segment based on equation (2). When equation (2) is true, there is a uniform acceleration segment.
[0089]
[0090] When interpolating velocity, first determine which stage (acceleration segment, uniform acceleration segment, or deceleration segment) the acquired slave axis velocity and acceleration belong to, and then calculate the velocity according to the corresponding formula.
[0091] It is important to emphasize that during the first control cycle of the axis adjustment, the segment positions of the trapezoidal curve are calculated, and the velocity and acceleration at the end of each segment are also calculated. In other control cycles, it is not necessary to calculate the segment positions of the trapezoidal curve or the velocity and acceleration at the end of each segment. Instead, the current control cycle is determined directly based on the velocity and acceleration of the previous control cycle to identify which segment it is in, and the formula for that segment in Table 1 is selected for recursive calculation.
[0092] It should also be emphasized that the control cycle length can be modified during the process of achieving slave axis synchronization. For example, a larger control cycle length can be used in the middle of each segment of the trapezoidal curve to reduce the amount of computation, while a smaller control cycle length can be used near the segment boundary of the trapezoidal curve to prevent the current control cycle length from exceeding the segment boundary, thereby avoiding callback and further improving the smoothness of slave axis movement.
[0093] It should also be emphasized that when the kinematic parameters of a control cycle change, the positions of each segment need to be recalculated.
[0094] It should also be emphasized that: Table 1 is generally used for velocity interpolation. In this embodiment, the method is used to interpolate acceleration to achieve velocity interpolation, thereby achieving acceleration continuity.
[0095] As shown above, by using trapezoidal curve interpolation for acceleration interpolation, not only is the continuity of acceleration and velocity achieved, but this embodiment also uses piecewise calculation, in which the velocity and acceleration are monotonic within each segment. Compared to using a polynomial calculation from the first cycle to the last control cycle, there is no over-adjustment problem, and the process is smoother.
[0096] S240: Obtain the slave axis position in the current control cycle by integrating the slave axis speed over time.
[0097] In this embodiment, the drive shaft adopts a position control-related control mode.
[0098] S250: Sends the slave axis position planned for the current control cycle to the slave axis driver, gradually controlling the slave axis to synchronize with the master axis.
[0099] In each control cycle, the position of the slave axis is adjusted online and then used to control the movement of the slave axis. Through several such processes, the slave axis and the master axis are smoothly synchronized.
[0100] Figure 2B shows the flow chart of a second implementation of a method for electronic gear speed synchronization, where step S235 replaces step S230 in the flow chart of the first implementation of the method for electronic gear speed synchronization.
[0101] S235: Based on the slave shaft speed, acceleration, and slave shaft kinematic parameters, the slave shaft speed is adjusted online in the current control cycle through speed filtering, so that the slave shaft speed smoothly changes to the slave shaft synchronous speed within several control cycles.
[0102] Among them, velocity filtering is a parallel second-order filtering of velocity and a first-order filtering of acceleration according to equation (3), where sign, floor, and sat are mathematical functions (taking the sign, rounding to zero, and saturation functions), and V s and A s To obtain the slave axis velocity and acceleration, V e and A e To synchronize the shaft speed and final acceleration, A e Typically 0, TSM is the duration of the control cycle, J is the jerk, and V is the acceleration. t and A t The current control cycle filters the slave shaft velocity and acceleration. Second-order filtering of velocity results in a maximum order of 2 with respect to time during the filtering process. First-order filtering of acceleration results in a maximum order of 1 with respect to time during the filtering process.
[0103]
[0104] It should be emphasized that: Equation (3) is generally used for filtering position. In this embodiment, the method is used to perform second-order filtering on velocity and first-order filtering on acceleration in parallel, so as to achieve continuous acceleration.
[0105] As described above, by adjusting the slave axis speed online in each control cycle through velocity filtering, the problem of potential unsolvable velocity interpolation of S-shaped interpolation curves and the discontinuity of acceleration in velocity interpolation of trapezoidal interpolation curves are avoided. Nonlinear filtering is performed directly based on the filtering parameters, which not only achieves continuous velocity and acceleration but also reduces the computational load compared to the time-consuming calculation of S-shaped curves to approximate the most suitable S-curve parameters and user target parameters. Furthermore, it avoids the limitation of assuming the shape of acceleration and velocity curves over time required by S-shaped interpolation curves, resulting in faster following and higher fitting.
[0106] Figure 2C shows the flow chart of the third implementation of the second embodiment of the electronic gear speed synchronization method. Compared with the flow chart of the first implementation of the second embodiment of the electronic gear speed synchronization method, step S225 is added, and step S235 of the second implementation of the second embodiment of the electronic gear speed synchronization method is also added. The original step S230 is modified into step S233.
[0107] S225: Determine if there is a solution when using the S-curve for velocity interpolation. If there is a solution, proceed to step S233; otherwise, proceed to step S235.
[0108] 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.
[0109] Table 2 shows the segments 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.
[0110] Table 2
[0111]
[0112] Continued from Table 2
[0113]
[0114] When the slave shaft accelerates and synchronizes, it involves acceleration, uniform acceleration, and deceleration segments. When the duration t2 of the uniform acceleration segment is greater than 0, the S-curve has a solution for velocity interpolation. When the slave shaft decelerates and synchronizes, it involves acceleration / deceleration segments, uniform deceleration segments, and deceleration segments. When the duration t6 of the uniform deceleration segment is greater than 0, the S-curve has a solution for velocity interpolation.
[0115] S233: Based on the acquired slave shaft speed, acceleration, and slave shaft kinematic parameters, the slave shaft speed is adjusted online through S-curve velocity interpolation to ensure that the slave shaft speed smoothly changes to the slave shaft synchronous speed within several control cycles.
[0116] The difference in this step is that the velocity interpolation of the S-shaped curve is used instead of the acceleration interpolation of the trapezoidal curve in the original S230.
[0117] As shown above, when there is a solution for velocity interpolation of the S-shaped interpolation curve, the S-shaped interpolation curve is selected; when there is no solution for velocity interpolation of the S-shaped interpolation curve, velocity filtering is selected. This not only achieves continuity of velocity and acceleration, but also takes advantage of the mature module of the S-shaped interpolation curve and the higher fitting degree of velocity filtering.
[0118] In summary, Embodiment 2 of the electronic gear speed synchronization method adjusts the slave shaft speed of the current control cycle online based on the slave shaft speed and acceleration and slave shaft kinematic parameters obtained in each control cycle through velocity interpolation of the trapezoidal acceleration curve or second-order velocity filtering. This allows the slave shaft to smoothly synchronize with the master shaft within several control cycles, thereby achieving online smooth synchronization of electronic gears in accordance with the PLCOpen specification. Furthermore, it adjusts the speed of the current control cycle online based on the slave shaft kinematic parameters obtained in the current control cycle, with low computational load and no callback problem, and also achieves continuous speed and acceleration during the synchronization process.
[0119] The following describes various embodiments of an electronic gear speed synchronization device according to the present invention with reference to Figures 3 to 6.
[0120] Figure 3 shows the structure of a device for electronic gear speed synchronization according to a first embodiment, including: an acquisition module 310 and a synchronization module 320.
[0121] The acquisition module 310 is used to acquire the slave shaft speed and acceleration of the previous control cycle. For its principle and advantages, please refer to step S110 of Embodiment 1 of an electronic gear speed synchronization method.
[0122] The synchronization module 320 is used to adjust the slave shaft speed online in the current control cycle based on the slave shaft speed, acceleration, and kinematic parameters obtained in the current control cycle when the slave shaft speed is not equal to the slave shaft synchronization speed. This ensures that after several control cycles of adjustment, the slave shaft speed equals the slave shaft synchronization speed, with continuous slave shaft speed and acceleration during each adjustment process. For its principle and advantages, please refer to step S120 of Embodiment 1 of an electronic gear speed synchronization method.
[0123] Figure 4A shows a first structure of a second embodiment of an electronic gear speed synchronization device, including: an acquisition module 410, a judgment module 420, a speed interpolation module 430, a position acquisition module 440, and an output control module 450.
[0124] The acquisition module 410 is used to acquire the slave shaft speed and acceleration of the previous control cycle, the kinematic parameters of the slave shaft in the current control cycle, and the control cycle duration. For its principle and advantages, please refer to step S210 of the first implementation method of Embodiment 2 of an electronic gear speed synchronization method.
[0125] The judgment module 420 is used to determine whether the master and slave shafts are synchronized. For its principle and advantages, please refer to step S220 of the first implementation method of Embodiment 2 of an electronic gear speed synchronization method.
[0126] The speed interpolation module 430 is used to adjust the slave shaft speed online in the current control cycle based on the acquired slave shaft speed, acceleration, and slave shaft kinematic parameters through trapezoidal curve acceleration interpolation, so that the slave shaft speed smoothly changes to the slave shaft synchronization speed within several control cycles. For its principle and advantages, please refer to step S230 of the first implementation method of Embodiment 2 of an electronic gear speed synchronization method.
[0127] The position acquisition module 440 is used to obtain the slave shaft position in the current control cycle by integrating the slave shaft speed over time. For its principle and advantages, please refer to step S240 of the first implementation method of an embodiment two of an electronic gear speed synchronization method.
[0128] The output control module 450 is used to send the slave shaft position planned in the current control cycle to the slave shaft driver, gradually controlling the slave shaft to synchronize with the master shaft. For its principle and advantages, please refer to step S250 of the first implementation method of an embodiment two of an electronic gear speed synchronization method.
[0129] Figure 4B shows a second structure of a second embodiment of an electronic gear speed synchronization device, in which the speed interpolation module 430 in the first structure of the second embodiment of an electronic gear speed synchronization device is replaced by a speed filtering module 435.
[0130] The speed filtering module 435 is used to adjust the slave shaft speed online in the current control cycle based on the slave shaft speed, acceleration, and slave shaft kinematic parameters through speed filtering, so that the slave shaft speed smoothly changes to the slave shaft synchronization speed within several control cycles. For its principle and advantages, please refer to step S235 of the second implementation method of an embodiment two of an electronic gear speed synchronization method.
[0131] Figure 4C shows a third structure of a second embodiment of an electronic gear speed synchronization device, which adds a planning selection module 425, replaces the speed interpolation module 430 in the first structure of the second embodiment of an electronic gear speed synchronization device with an S-shaped speed interpolation module 433, and also adds a speed filtering module 435 in the first structure of the second embodiment of an electronic gear speed synchronization device.
[0132] The planning and selection module 425 is used to determine whether there is a solution when using an S-curve for speed interpolation. For its principle and advantages, please refer to step S225 of the third implementation method of an embodiment two of an electronic gear speed synchronization method.
[0133] The S-shaped velocity interpolation module 433 is used to adjust the slave shaft speed online in the current control cycle through velocity interpolation of an S-shaped curve based on the acquired slave shaft speed, acceleration, and slave shaft kinematic parameters, so that the slave shaft speed smoothly changes to the slave shaft synchronization speed within several control cycles. For its principle and advantages, please refer to step S233 of the third implementation method of Embodiment 2 of an electronic gear speed synchronization method.
[0134] Figure 5 shows the input and output signals of various embodiments of an electronic gear speed synchronization device.
[0135] The input signals include the following signals.
[0136] MasterID, the spindle ID;
[0137] SlaveID, the ID of the slave axis;
[0138] Execute, the synchronous function trigger signal, is triggered by a rising edge;
[0139] ContinuousUpdate: Whether to modify parameters. When True, the parameters can be changed continuously, only affecting the ongoing motion.
[0140] RatioNumerator, the numerator of gear ratio;
[0141] RatioDenominator, the gear ratio denominator;
[0142] 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 actual position fed back by the slave axis driver.
[0143] Acceleration, the maximum permissible acceleration (referring to the maximum absolute value, which is used for acceleration in this invention);
[0144] Deceleration, the maximum permissible deceleration (referring to the maximum absolute value, which is used for deceleration in this invention);
[0145] 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;
[0146] BufferMode, the blending mode, 0 means interrupt the previous module and run immediately, 1 means run after the previous module has finished running;
[0147] Tsm controls the cycle duration.
[0148] The output signals include the following signals:
[0149] MasterID, the spindle ID;
[0150] SlaveID, the ID of the slave axis;
[0151] InGear, whether the gear ratio has been reached: 1 means the slave axis follows the spindle synchronously to complete the task, and 0 means the task has not been completed.
[0152] Busy: Function operation status, 1 is busy, 0 is idle;
[0153] Active: The state of the controlled axis (slave axis), 1 is under control, 0 is not under control;
[0154] CommandAborted: Whether the function was interrupted; 1 indicates that it was interrupted.
[0155] Error, fault signal, 1 indicates a fault, 0 indicates no fault;
[0156] ErrorID, error code.
[0157] Based on the above, the slave shaft kinematic parameters, control cycle, gear numerator and denominator, and synchronization results are encapsulated into the pins of the PLCOpen speed synchronization function block. The implementation method within the speed synchronization function block is as follows: based on the slave shaft speed, slave shaft acceleration, and the slave shaft kinematic parameters obtained in the current control cycle, the slave shaft speed in the current control cycle is adjusted online through speed filtering, or trapezoidal interpolation of acceleration, or a combination of S-curve speed interpolation and speed filtering. This facilitates function block portability and improves development efficiency.
[0158] Figure 6 illustrates the effects of various embodiments of the electronic gear speed synchronization device of the present invention. The slave shaft synchronizes with the master shaft twice. When the rising edge of the first synchronization function trigger signal First.Execute appears, the slave shaft begins synchronization, and its speed MySlave.Velocity begins to increase. After the slave shaft is synchronized, its speed MySlave.Velocity stops increasing, and the first gear ratio check signal First.Gear changes from 0 to 1, indicating that the slave shaft has been synchronized. When the rising edge of the second synchronization function trigger signal Second.Execute appears, the slave shaft begins synchronization a second time, and its speed MySlave.Velocity again begins to increase. After the slave shaft is synchronized a second time, its speed MySlave.Velocity stops increasing, and the second gear ratio check signal Second.Gear changes from 0 to 1, indicating that the slave shaft has been synchronized a second time.
[0159] As described above, the input and output signals encapsulated in the various embodiments of the present invention are compatible with the pins of PLCOpen's GearInVelocity module, facilitating portability and making them suitable for the development of various devices using PLCOpen's GearInVelocity module.
[0160] This invention also provides a computing device, which will be described in detail below with reference to Figure 7.
[0161] The computing device 700 includes a processor 710, a memory 720, a communication interface 730, and a bus 740.
[0162] It should be understood that the communication interface 730 in the computing device 700 shown in the figure can be used to communicate with other devices.
[0163] The processor 710 can be connected to the memory 720. The memory 720 can be used to store the program code and data. Therefore, the memory 720 can be a storage unit inside the processor 710, an external storage unit independent of the processor 710, or a component that includes both the storage unit inside the processor 710 and the external storage unit independent of the processor 710.
[0164] Optionally, the computing device 700 may also include a bus 740. The memory 720 and communication interface 730 can be connected to the processor 710 via the bus 740. The bus 740 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 750 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.
[0165] It should be understood that in this embodiment of the invention, the processor 710 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 710 may employ one or more integrated circuits to execute relevant programs to implement the technical solutions provided in this embodiment of the invention.
[0166] The memory 720 may include read-only memory and random access memory, and provides instructions and data to the processor 710. A portion of the processor 710 may also include non-volatile random access memory. For example, the processor 710 may also store device type information.
[0167] When the computing device 700 is running, the processor 710 executes the operation steps of the computer execution instruction execution method embodiment stored in the memory 720.
[0168] It should be understood that the computing device 700 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 700 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.
[0169] 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.
[0170] 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.
[0171] 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.
[0172] 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.
[0173] 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.
[0174] 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.
[0175] 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.
[0176] 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.
[0177] 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.
[0178] 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.
[0179] 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).
[0180] 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 speed of electronic gears, characterized in that, include: The slave shaft speed and acceleration from the previous control cycle are acquired. When the slave shaft speed is not equal to the slave shaft synchronization speed, the slave shaft speed of the current control cycle is adjusted online based on the slave shaft speed, acceleration, and the slave shaft kinematic parameters acquired in the current control cycle. This adjustment is repeated for several control cycles until the slave shaft speed equals the slave shaft synchronization speed. During this adjustment process, the slave shaft speed and acceleration are continuous, and the slave shaft synchronization speed is the product of the main shaft speed and the slave-main shaft gear ratio. The online adjustment of the slave shaft speed based on the slave shaft speed, acceleration, and the slave shaft kinematic parameters acquired in the current control cycle includes one of the following: adjusting the slave shaft speed of the current control cycle online through speed filtering based on the slave shaft speed, acceleration, and the slave shaft kinematic parameters acquired in the current control cycle. The slave axis velocity does not require determining the shape of the jerk, acceleration, or velocity-time distribution curve based on the kinematic parameters. The velocity filtering involves performing second-order filtering on the velocity and first-order filtering on the acceleration in parallel, followed by nonlinear filtering based on the filtering parameters to achieve continuous slave axis velocity and acceleration. Based on the slave axis velocity, acceleration, and slave axis kinematic parameters obtained in the current control cycle, the slave axis velocity is interpolated using an S-shaped interpolation curve, and the slave axis velocity in the current control cycle is adjusted online. When there is no solution for interpolating the slave axis velocity using the S-shaped interpolation curve, the slave axis velocity in the current control cycle is adjusted online using the velocity filtering based on the slave axis velocity, acceleration, slave axis synchronization velocity, and slave axis kinematic parameters obtained in the current control cycle. The velocity filtering is implemented using the following formula. ;in, 、 、 These are the sign function, the integer part function, and the saturation function, respectively. and To obtain the slave axis velocity and acceleration, and To synchronize the shaft speed and final acceleration, To control the duration of the cycle, The jerk in the kinematic parameters, The maximum permissible acceleration among the kinematic parameters is... and The filtered slave shaft velocity and acceleration for the current control cycle. 、 、 、 、 、 、 These are intermediate variables in the operation.
2. The method according to claim 1, characterized in that, Also includes: In each control cycle, the slave axis position for the current control cycle is obtained based on the adjusted slave axis speed; in each control cycle, the slave axis position planned for the current control cycle is sent to the slave axis driver, and the slave axis is gradually controlled to synchronize with the master axis.
3. The method according to claim 1, characterized in that, Based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters obtained in the current control cycle, the slave shaft speed of the current control cycle is adjusted online, including: based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters obtained in the current control cycle, the slave shaft acceleration is interpolated using a trapezoidal interpolation curve, and the slave shaft speed of the current control cycle is adjusted online.
4. The method according to claim 1, characterized in that, Also includes: The duration of the next control cycle can be modified online during the current control cycle.
5. The method according to claim 1, characterized in that, The kinematic parameters, control cycle, and synchronization results are encapsulated into pins of the PLCOpen speed synchronization function block. The implementation method within the speed synchronization function block is as follows: based on the slave axis speed, slave axis acceleration, and slave axis kinematic parameters obtained from the current control cycle, the slave axis speed of the current control cycle is adjusted online through the speed filter.
6. A device for electronic gear speed synchronization, characterized in that, include: The acquisition module is used to acquire the slave axis velocity and acceleration of the previous control cycle; A synchronization module is used to adjust the slave shaft speed online in the current control cycle when the slave shaft speed is not equal to the slave shaft synchronization speed, based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters obtained in the current control cycle. This adjustment ensures that after several control cycles, the slave shaft speed equals the slave shaft synchronization speed. During the adjustment process, the slave shaft speed and acceleration are continuous, and the slave shaft synchronization speed is the product of the master shaft speed and the slave-master shaft gear ratio. Specifically, the synchronization module is used to: adjust the slave shaft speed online in the current control cycle through speed filtering based on the slave shaft speed, the acceleration, and the slave shaft kinematic parameters obtained in the current control cycle, without needing to determine the jerk or acceleration based on the kinematic parameters. The velocity filtering, which is a curve representing the velocity distribution over time, involves parallel second-order filtering of the velocity and first-order filtering of the acceleration. Nonlinear filtering is then applied based on the filtering parameters to ensure continuous velocity and acceleration of the slave axis. Based on the slave axis velocity, acceleration, and kinematic parameters obtained in the current control cycle, the slave axis velocity is interpolated using an S-shaped interpolation curve, and the slave axis velocity in the current control cycle is adjusted online. When there is no solution for interpolating the slave axis velocity using the S-shaped interpolation curve, the slave axis velocity in the current control cycle is adjusted online using the velocity filtering based on the slave axis velocity, acceleration, slave axis synchronization velocity, and kinematic parameters obtained in the current control cycle. The velocity filtering is achieved using the following formula. ;in, 、 、 These are the sign function, the integer part function, and the saturation function, respectively. and To obtain the slave axis velocity and acceleration, and To synchronize the shaft speed and final acceleration, To control the duration of the cycle, The jerk in the kinematic parameters, The maximum permissible acceleration among the kinematic parameters is... and The filtered slave shaft velocity and acceleration for the current control cycle. 、 、 、 、 、 、 These are intermediate variables in the operation.
7. 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 5.