Servo driver instruction transition method and device, servo driver and storage medium

CN119526376BActive Publication Date: 2026-09-15WUHAN UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311121362.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2026-09-15
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

[0004]本申请实施例提供了一种伺服驱动器指令过渡方法,旨在解决伺服驱动器切换工作模式后出现的指令参考值突变的技术问题

Benefits of technology

[0017] The beneficial effect of this application is that, according to the target transition curve, the value of the control reference quantity of the servo drive can be smoothly transitioned from the first instruction value at the end of the previous control mode to the real-time value of the second instruction corresponding to the next control mode, thereby solving the technical problem of sudden change in instruction reference value after the servo drive switches working modes, making the servo system equipment move more smoothly and reliably.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119526376B_ABST
    Figure CN119526376B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of automation control, and provides a servo driver instruction transition method and device, a servo driver and a storage medium. The method comprises the following steps: in response to a mode switching instruction, determining working condition information of a second control mode and receiving a second instruction real-time value, the mode switching instruction representing an instruction of switching from a first control mode to the second control mode, and the second instruction real-time value being a control instruction corresponding to an output of the second control mode; acquiring a first instruction value, the first instruction value being a value of a control reference quantity of the servo driver at an end time of the first control mode; determining a corresponding target transition curve according to the working condition information; and transitioning the value of the control reference quantity from the first instruction value to the second instruction real-time value according to the target transition curve, thereby solving the technical problem of sudden change of an instruction reference value after the servo driver switches the working mode, and making the motion of the servo system device more stable and reliable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of automation control technology, and in particular relates to a servo driver instruction transition method, device, servo driver and storage medium. Background Technology

[0002] In the operation of modern robots, there are often various working modes that need to be switched back and forth. The switching of working modes is executed by the control of servo drives. However, most servo drives do not have a transition process for mode switching; or during the switching process, only the integral accumulation calculation of the algorithm is cleared, without transitioning the control commands. The above conventional methods may cause a large change in the robot's motion mobility after the mode switch, resulting in unstable motion or triggering abnormal motion errors.

[0003] To address the aforementioned issues, this invention proposes a universal instruction transition method applicable to motor control mode switching in a single joint of a robot. This method can evolve into different specific algorithm instances based on actual application scenarios. The motion mobility and duration of the transition process are controllable, enabling smoother and more reliable joint servo motion of the robot. Summary of the Invention

[0004] This application provides a servo driver instruction transition method, which aims to solve the technical problem of sudden changes in instruction reference values ​​after a servo driver switches operating modes.

[0005] In a first aspect, embodiments of this application provide a servo driver instruction transition method, the method being applied to a servo driver, the method comprising:

[0006] The system responds to a mode switching command, determines the operating condition information of the second control mode, and receives the real-time value of the second command. The mode switching command represents a command to switch from the first control mode to the second control mode, and the real-time value of the second command is the control command value output by the second control mode.

[0007] Obtain a first instruction value, wherein the first instruction value is the value of the control reference quantity of the servo driver at the end of the first control mode;

[0008] Determine the corresponding target transition curve based on the aforementioned operating condition information;

[0009] The value of the control reference quantity is transitioned from the first instruction value to the second instruction real-time value according to the target transition curve.

[0010] Secondly, embodiments of this application provide an instruction transition device for a servo driver, comprising:

[0011] The instruction switching module is used to respond to mode switching instructions, determine the operating condition information of the second control mode and receive the real-time value of the second instruction, wherein the mode switching instruction represents the instruction to switch from the first control mode to the second control mode, and the real-time value of the second instruction is the control instruction value output by the second control mode.

[0012] An acquisition module is used to acquire a first instruction value, wherein the first instruction value is the value of the control reference quantity of the servo driver at the end of the first control mode;

[0013] The determination module is used to determine the corresponding target transition curve based on the operating condition information;

[0014] A transition module is used to transition the value of the control reference quantity from the first instruction value to the second instruction real-time value according to the target transition curve.

[0015] Thirdly, the present invention also proposes a servo driver, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.

[0016] Fourthly, the present invention also proposes a storage medium, which is a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.

[0017] The beneficial effect of this application is that, according to the target transition curve, the value of the control reference quantity of the servo drive can be smoothly transitioned from the first instruction value at the end of the previous control mode to the real-time value of the second instruction corresponding to the next control mode, thereby solving the technical problem of sudden change in instruction reference value after the servo drive switches working modes, making the servo system equipment move more smoothly and reliably. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating a servo driver instruction transition method provided in Embodiment 1 of this application;

[0020] Figure 2 This is a control block diagram of a conventional single-joint servo system for robots;

[0021] Figure 3 This is a flowchart illustrating a servo driver instruction transition method provided in Embodiment 2 of this application;

[0022] Figure 4 This is a flowchart of the instruction transition method for the first mode switching in one embodiment of this application;

[0023] Figure 5 This is a schematic diagram of the real-time command curve when switching from one control mode to another in a conventional manner.

[0024] Figure 6 This is a schematic diagram of the first target transition curve corresponding to the transition mode and the real-time command curve corresponding to the second control mode in this embodiment 2.

[0025] Figure 7 This is a flowchart of the instruction transition method for the second mode switching in one embodiment of this application;

[0026] Figure 8 This is a schematic diagram comparing the target transition curve corresponding to the first-order equation and the target transition curve corresponding to the second-order equation in one embodiment of this application.

[0027] Figure 9 This is a comparative schematic diagram of the target transition curves corresponding to the second-order equation in one embodiment of this application under different loop execution cycles set by the user;

[0028] Figure 10 This is a simplified structural diagram of the servo driver provided in the embodiments of this application;

[0029] Figure 11 This is a schematic diagram of the servo driver instruction transition device provided in the embodiments of this application. Detailed Implementation

[0030] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0031] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0032] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0033] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0034] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0035] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0036] The applicant of this invention has discovered that modern robots often need to switch between various working modes during operation; for example, in the single-joint motor motion control of robots, there are often task switching between various working modes; for example, in the master-slave control of surgical robots, the way to switch tasks includes: switching between contour position mode (PP) and cycle position mode (CSP), cycle torque mode (CST) and contour position mode (PP), etc.

[0037] The switching of working modes is performed by the servo drive controller. However, most drives currently do not have a transition process for mode switching; or during the switching process, only the integral accumulation calculation of the algorithm is cleared without transitioning the control commands; or the drive control algorithm has protection settings for motion command amplitude or command slope amplitude, but these limits are generally fixed values ​​and are set according to the maximum capacity of joint movement, which is not conducive to dynamic adjustment and smooth transition of mode switching. It may even cause a large change in the initial motion mobility of a single joint after mode switching compared to before switching, resulting in unstable movement or triggering abnormal motion errors.

[0038] Example 1

[0039] To address the aforementioned problems, this invention proposes a servo driver command transition method. This method is applied to the servo driver and is suitable for use in applications involving switching motor control modes for single robot joints. The transition process offers controllable motion mobility, enabling smoother and more reliable joint servo movements in the robot. Figure 1 As shown, the servo driver instruction transition method in this embodiment mainly includes the following steps:

[0040] Step S10: Respond to the mode switching command, determine the operating condition information of the second control mode and receive the real-time value of the second command, wherein the mode switching command represents the command to switch from the first control mode to the second control mode, and the real-time value of the second command is the control command output corresponding to the second control mode.

[0041] It should be noted that the execution subject of the method embodiment of this application is a servo driver; the application scenarios of the method in this embodiment include but are not limited to single joint control of a robot. The application scenario is illustrated by taking single joint control of a robot as an example. The servo system of the robot includes a servo driver, a control device (including a PLC programmable logic controller, a host computer or a computer control device of the upper-level master station, etc.) and a motor (such as a motor that drives the robot arm to move).

[0042] The servo drive receives signal commands from the control device (such as physical signals like digital quantities and pulse quantities, or control signals like serial communication and fieldbus). The servo drive drives the motor to run according to the specified curve. At the same time, the motor also feeds back its own status to the servo drive in real time. The servo drive performs closed-loop dynamic PID adjustment at any time.

[0043] In a specific implementation, the servo drive can respond to the mode switching command issued by the control device to switch the current operating mode of the servo drive, for example, switching the current first control mode (old) to the second control mode (new), acquiring the operating information of the new mode in real time and receiving the real-time value of the second command; the mode switching in this embodiment can be a mode switching between the periodic control mode and the contour control mode of the servo drive, or a mode switching between the control loops of the servo drive.

[0044] The real-time value of the second instruction received at the same time as the response mode switching instruction is the control instruction output corresponding to the second control mode. It can be understood that the real-time value of the second instruction corresponding to the second control mode will take effect at the next moment after the end of the first control mode, and the real-time instruction curve of the second control mode will be generated inside the servo driver.

[0045] Step S20: Obtain a first instruction value, wherein the first instruction value is the value of the control reference quantity of the servo driver at the end of the first control mode;

[0046] Specifically, the control reference value can be a global variable, which needs to be assigned a value by the output value corresponding to the real-time command of the current operating mode of the servo driver.

[0047] Step S30: Determine the corresponding target transition curve based on the operating condition information;

[0048] Specifically, when the servo drive receives a mode switching command (i.e., the end time of the first control mode), it will stop running the (old) first control mode and prepare to run the (new) second control mode. The value of the current control reference quantity of the servo drive will no longer be the first command value at the next moment after the end time of the first control mode. In order to avoid a large change in the initial motion maneuverability after receiving the mode switching command compared with that before the switch (i.e., a sudden large difference between the value of the control reference quantity at the end time of the first control mode and the value at the next moment), this embodiment will pre-set corresponding target transition curves for the working condition information of different modes, so that the servo drive can enter the transition mode. The target transition curve is used to adjust the value of the control reference quantity of the servo drive over time until it smoothly transitions to the real-time command value corresponding to the next control mode (i.e., the second control mode).

[0049] Step S40: Transition the value of the control reference quantity from the first instruction value to the second instruction real-time value according to the target transition curve.

[0050] Understandably, at the next moment after the end of the first control mode, the real-time value of the second instruction corresponding to the second control mode will take effect and generate the real-time instruction curve of the second control mode inside the servo driver. However, in this embodiment, since the servo driver will first enter a transition mode after the end of the first control mode, the output value of the real-time instruction curve of the second control mode that has been generated will not be assigned to the control reference value of the servo driver during the transition mode stage.

[0051] Therefore, in the transition mode phase of this embodiment, the servo driver assigns a control reference value to the servo driver by using the output value of the target transition curve. This continues until the output value of the target transition curve is exactly the same as the real-time value of the second command (i.e., the real-time command curve of the second control mode) at the same moment. At this point, the transition mode is considered to have ended (i.e., the "same moment" is the end of the transition mode), and the servo driver officially enters the second control mode. This perfectly realizes the smooth transition of the servo driver from the first control mode to the second control mode, thereby avoiding the situation where the robot's initial motion mobility after receiving the mode switching command has a large change compared to before the switch. This effectively prevents unstable motion or the potential for motion abnormality errors, making the servo system device move more smoothly and reliably.

[0052] Example 2

[0053] Furthermore, based on Embodiment 1, Embodiment 2 is proposed. In this embodiment, the servo driver includes multiple control loops, including a current control loop (corresponding to current control mode CST), a speed control loop (corresponding to speed control mode CSV), and a position control loop (corresponding to current control mode CSP). The regulators of the above three control loops can be implemented by a PID controller (Proportional Integral Derivative Controller).

[0054] Understandably, the typical control architecture for a single joint of a robot is as follows: Figure 2 As shown, regardless of whether it's the cyclic control mode or the contour control mode, the main difference for the robot's joint actuators is the source of the command input; the execution control architecture is the same. The cyclic control mode can represent the joint actuator's control commands, such as P... target / v target Servo control commands in contour control mode are issued periodically from the upper master station in real time, such as p profile / v profile The driver generates a real-time instruction curve based on the known target instruction and assigns it to the control reference value.

[0055] However, in different task modes, the servo driver may execute different loop controllers.

[0056] If the robot's joints require motor current control or torque control, the current regulator receives the current command i. ref The output u of the current regulator c Controlling motor movement, current bias command i offset The upper-level algorithm outputs the data in real time during the robot's joint control process.

[0057] If the joint needs to perform speed control, the speed regulator receives the speed command v. ref The output i of the speed regulator cmd Input is given to the current regulator;

[0058] If the joint needs to achieve the target position control, the position adjuster receives the position command P. ref The output v of the position regulator cmd Input is given to speed control.

[0059] refer to Figure 2 , Figure 2 i in fdb v fdb p fdb These are the current motion feedback current, feedback speed, and feedback position of the joint motor, respectively. The controllers for each loop typically use PID regulation. In this embodiment, the three control loop regulators (current regulator, speed regulator, and position regulator) can be implemented using software unit modules.

[0060] exist Figure 2 In the joint control process described above, due to the frequent switching between control modes required by the robot's task, the command inputs of each loop regulator must also be switched accordingly. For example, during the process of the servo driver switching from current control (CST mode) to speed control (CSV or PV mode), the value of the control reference quantity of the current regulator changes from i target The value becomes i cmd The value; for example, when a servo drive switches from periodic speed control (CSV mode) to contour speed control (PV mode), the value of the control reference value of the corresponding speed regulator changes from V. target The value becomes v profile The value of the control reference quantity may change significantly before and after the instruction switching in the conventional method.

[0061] Even with conventional methods, switching from the outer loop to the inner loop of the control loop can still present command switching issues. For example, switching from position control (CSP mode) to speed control (CSV mode), the control reference quantity v corresponding to the speed command before the switch... ref The value may be large; the control reference value v corresponding to the CSV mode command received at the initial moment after the switch. refThe value may be 0. Due to the change in the reference value before and after the switching, the continuity of the motor's motion may change abruptly.

[0062] In computer control, servo drives typically use a timer to set the control loop execution cycle T. s The execution cycle of the control loop may be a known parameter, or it may not be a known parameter. To address the technical problems involved in the conventional methods described above, this embodiment proposes two mode-switching transition methods. Specifically, based on the first embodiment described above, and referring to... Figure 3 Step S30 in this embodiment further includes:

[0063] Step S30': Determine whether the operating condition information includes the loop execution cycle corresponding to the second control mode, and obtain the determination result;

[0064] Based on the judgment result, the corresponding target transition curve is obtained, and then different specific algorithm instances can be evolved according to the actual application scenario, including:

[0065] Mode switching instruction transition method 1:

[0066] If the determination result is that the operating condition information includes the loop execution cycle t corresponding to the second control mode, then... s Then, step S301 is executed to "obtain the preset maximum transition time and the first target transition curve", and finally step S401 is executed to "transition the value of the control reference quantity from the first instruction value to the second instruction real-time value according to the first target transition curve within the range of the preset maximum transition time".

[0067] Understandably, if the transition time of a robot's joint motion mode switching is required to be controlled, then within a known loop execution cycle T... s In this case, the maximum transition time t can be preset. c A continuous transition algorithm is used to complete the instruction transition;

[0068] In the specific implementation, before the motion mode switching time, the last command value (i.e., the first command value) of the control (old) loop regulator is r0. After switching to the new mode, the command value of the (new) loop regulator is based on the loop period T. s Let r(t) be the sequence number, and t be the continuous time, where t = kT. s k = 0, 1, 2..., k = 0 represents the initial time in the new working mode, k represents the current execution round of the control loop, and the maximum transition time t. c The maximum number of execution rounds within the time frame, kmax = t c / T s .

[0069] In this embodiment, the maximum transition time is preset to t. c The value of the control reference quantity is expected to be in the range of 0 ≤ t ≤ t. c The transition time can change slowly over a period of time, and the user can set the maximum transition time to t. c Specifically, the servo driver hardware surface in this embodiment has a setting button and a display screen, allowing the user to set the maximum transition time t based on the setting button and display screen. c By setting parameters, the first target transition curve can be indirectly adjusted. Compared to the conventional technique of setting a fixed value as a limit in the drive control algorithm for protection, this embodiment allows users to set the time of the transition process themselves, thereby meeting different user needs.

[0070] Furthermore, the maximum value of k is determined by the preset maximum transition time t. c It is determined that, after the transition time has elapsed, the value of the control reference quantity will be the normal command value r(t) received by the loop.

[0071] Specifically, if the operating condition information includes the loop execution cycle t corresponding to the second control mode... s Step S401 above may include the following steps:

[0072] A1, receives the preset maximum transition time t c The real-time value r(t) of the second instruction at time t within the time range, where t belongs to the preset maximum transition time t c A single moment within a continuous time range;

[0073] A2, based on the preset maximum transition time t c The first and second time adjustment factors are generated based on the duration corresponding to time t.

[0074] A3. Based on the first time adjustment factor and the first instruction value r0, the change in the first instruction value is obtained. The change in the first instruction value represents that the first instruction value r0 decreases as the duration corresponding to time t increases.

[0075] A4. Based on the second time adjustment factor and the second instruction real-time value r(t), the change in the second instruction value is obtained. The change in the second instruction value represents that the second instruction real-time value r(t) increases as the duration corresponding to time t increases.

[0076] A5, based on the first target transition curve, the value of the control reference quantity ref(t) is controlled to be equal to the sum of the changes in the first command value and the second command value, so that the value of the control reference quantity of the servo driver decreases as the duration corresponding to time t increases, until the maximum transition time t is reached at time t. c At the end of the time, the value of the control reference quantity ref(t) transitions to the real-time value r(t) of the second instruction.

[0077] A6, the duration at time t is greater than the preset maximum transition time t. c Then, the value of the control reference quantity ref(k) controlling the servo driver is equal to the real-time value r(k) of the second instruction.

[0078] To meet the above requirements, in the specific implementation, the above instruction transition method is achieved by pre-establishing a first target transition curve, which is represented by the following formula (1):

[0079]

[0080] The known loop execution period T in this embodiment s For a given value, the function formula corresponding to the first target transition curve is preferably a first-order mathematical equation;

[0081] In Equation 1 above, ref(t) represents the actual command value input by the regulator in each cycle (i.e., the actual value of the control reference quantity required by the loop regulator for the servo driver in the second control mode of this embodiment), r0 represents the last command value before the motion mode switching time (which can be regarded as the initial value of the second control mode), r(t) represents the real-time value of the second command at time t, and r(t) can also be understood as the control command value after switching to the new mode according to the loop period T. s The number of known sequences;

[0082] Understandably, This indicates that the factor was adjusted immediately. This indicates the second time adjustment factor. Indicates the change in the value of the first instruction. This indicates the change in the value of the second instruction. [r0-r(t)] represents the proportion of the target time in the transition mode phase. As time progresses, the difference between the initial value and the real-time value (in the second control mode) decreases. The closer the time is to the transition time, the smaller the proportion of the initial value r0 becomes.

[0083] Combination Figure 4 From Equation 1 above, it can be seen that when t = 0, i.e., the initial moment of the second control mode, the value of the control reference quantity is still the final value of the first control mode before the switch (i.e., the initial value is the first command value r0). When t = tc At the end of the transition process, the value of the control reference quantity of the loop regulator currently operating in the servo drive smoothly transitions to the command value of the second control mode (i.e., the real-time value of the second command).

[0084] The beneficial effects of this embodiment can be demonstrated through simulation examples: (See reference...) Figure 5 and Figure 6 , Figure 5 This is a schematic diagram of the real-time command curve of the second control mode after switching from the (front) first control mode to the (rear) second control mode in the conventional method; Figure 6 In this second embodiment, the first target transition curve corresponds to the transition mode and the real-time command curve corresponds to the second control mode (the real-time command curve corresponding to the second control mode corresponds to the second command real-time value r(t). In order to ensure the smooth movement of the servo system during the mode switching process of the servo driver, the instruction transition process time for mode switching in this embodiment can be designed to be t. c =10ms, that is, k=10 cycles. Using the first-order equation formula of equation (1), the actual instruction ref1 after transition arrangement can be obtained as follows: Figure 6 As shown, at the start of the instruction switching, the value of the control reference quantity ref of the servo driver is still the final value of the previous mode, and then it transitions to the new instruction sequence r(t) according to the first-order slope (corresponding to the first target transition curve). During the transition time t... c The actual instruction following a given instruction sequence r(t) occurs after a given time. This is achieved through... Figure 5 and Figure 6 The comparison shows that, Figure 6 The value of the control reference quantity can be smoothly transitioned from the first instruction value r0 to the second instruction real-time value r(t) through the first target transition curve.

[0085] Mode switching transition method two:

[0086] If the determination result is that the operating condition information does not include the loop execution cycle T corresponding to the second control mode, then... s Then, step S310 is executed to "obtain the maximum threshold of the execution loop rounds and the second target transition curve", and finally step S410 is executed to "transition the value of the control reference quantity from the first instruction value to the second instruction real-time value according to the second target transition curve based on the maximum threshold of the execution loop rounds".

[0087] Understandably, if the transition time for switching joint motion modes is required to be controlled, the internal execution cycle T corresponding to the second control mode will be... s In cases where the number of execution loop rounds is unknown, a discrete transition algorithm can be used, where M can be understood as the maximum number of discrete transition cycles (i.e., the maximum number of execution loop rounds).

[0088] Specifically, if the operating condition information does not include the loop execution cycle t corresponding to the second control mode s Step S410 above may include the following steps:

[0089] B1, count the current execution round k of the control loop corresponding to the second control mode, and receive the real-time value r(k) of the second instruction corresponding to the current execution round k of the loop, wherein the current execution round k does not exceed the maximum threshold M of the execution loop round;

[0090] B2, generate a first adjustment factor and a second adjustment factor based on the maximum threshold M of the execution loop round and the current execution loop round k;

[0091] B3. Based on the first adjustment factor and the first instruction value r0, a real-time adjustment amount of the first instruction value is obtained. The real-time adjustment amount of the first instruction value represents that the first instruction value r0 decreases as the current execution round k of the loop increases.

[0092] B4. Based on the second time adjustment factor and the second instruction real-time value r(k), the second instruction real-time adjustment amount is obtained. The second instruction real-time adjustment amount represents that the second instruction real-time value r(k) increases as the current execution round k of the loop increases.

[0093] B5, based on the second target transition curve, the value of the control reference quantity ref(k) is controlled to be equal to the sum of the real-time adjustment of the first instruction value and the real-time adjustment of the second instruction value, so that the value of the control reference quantity of the servo driver decreases as the current execution round k of the loop increases, until the current execution round k of the loop reaches the maximum threshold M of the loop round, at which point the control instruction reference value ref(k) transitions to the second instruction real-time value r(k).

[0094] B6, after the current execution round k of the loop is greater than the maximum threshold M of the loop round, the value of the control reference quantity ref(k) of the servo driver is equal to the real-time value r(k) of the second instruction.

[0095] Understandably, before the motion mode switching moment, the last command value (i.e., the first command value) of the control (old) loop regulator is r0. After switching to the new mode, the command value of the (new) loop regulator is the sequence number r(k), where k represents the execution round of the control loop, k = 0, 1, 2..., k = 0 indicates that the initial time is 0 under the new working mode (i.e., the second control mode), and at this time, the loop execution period T of the loop regulator corresponding to the second control mode is... s It is unknown. k=1 indicates that the control loop corresponding to the new working mode (i.e. the second control mode) is working for the second time, and so on.

[0096] Therefore, in order to achieve a smooth mode switching, this embodiment pre-sets M discrete handover cycles, where k = 0, 1, 2, ... (M-1).

[0097] When k≤M (corresponding to steps B1 to B5 above), a first adjustment factor (1-a(k)) and a second adjustment factor are generated based on the maximum threshold M of the execution loop and the current execution loop k. a(k) can be understood as a discrete transition coefficient. A discrete transition coefficient sequence a(k)∈[0,1] is set. At this time, the discrete transition coefficient is linearly monotonically increasing and is a first-order linear transition. The proportion of the final value of the mode before the switch and the real-time instruction time of the mode after the switch changes with the transition coefficient.

[0098] When k > M (corresponding to step B6 above), the value of the control reference quantity corresponding to the regulator is equal to the real-time input command of the switched mode. For details, please refer to [link / reference]. Figure 7 .

[0099] To meet the above requirements, in the specific implementation, the above instruction transition method is achieved by pre-establishing a second target transition curve, which is characterized by the following formula (2):

[0100]

[0101] In Equation 2 above, k represents the discrete execution round of the control loop, r0 represents the first instruction value, ref(k) represents the value of the control reference quantity of the servo driver (i.e., the actual value of the control reference quantity required by the loop regulator of the servo driver in the second control mode of this embodiment), r(k) represents the output value of the real-time value of the second instruction in the kth cycle, and a(k) represents the discrete transition coefficient, which is related to k and M, where M represents the maximum threshold of the execution loop round.

[0102] This makes the first adjustment factor (1-a(k)) and obtains the real-time adjustment amount of the first instruction value (1-a(k))×r0. The real-time adjustment amount of the first instruction value represents that the first instruction value r0 decreases as the current execution round k of the loop increases.

[0103] The second adjustment factor is The real-time adjustment amount of the second instruction value is a(k)×r(k), which represents that the real-time value r(k) of the second instruction increases as the current execution round k of the loop increases;

[0104] In this embodiment, the key to the above discrete handover process lies in setting a clear handover coefficient sequence. Users can formulate coefficients according to different handover stability requirements. Users can set the maximum threshold M of the execution loop rounds to limit the discrete transition coefficient a(k). Specifically, the servo driver hardware surface of this embodiment has a setting button and a display screen. Users can set the maximum threshold M of the execution loop rounds based on the setting button and the display screen, thereby indirectly adjusting the discrete transition coefficient a(k).

[0105] The beneficial effects of this second embodiment are as follows: Building upon the optimization of addressing the unstable motion problem caused by sudden command changes during robot mode switching, this second embodiment allows the servo drive to determine different target transition curves based on actual working condition information during the transition process of mode switching. This enables the use of different transition methods to achieve a smooth transition between different modes. Furthermore, the transition time in mode switching transition method one and the smoothness in mode switching transition method two can be controlled and arranged to meet various user needs, resulting in a better user experience.

[0106] Example 3

[0107] In this embodiment, the first target transition curve can also be represented by the following formula 3:

[0108]

[0109] In Formula 3, t represents continuous time, r0 represents the first command value, ref(t) represents the control reference value of the servo driver, and r(t) represents the real-time value of the second command at time t. Let represent a higher-order function (i.e., a first-time adjustment factor) related to the continuous time t, where The value of the continuous time t is a positive number not greater than 1, and the value of the continuous time t is not greater than the preset maximum transition time;

[0110] It will decrease as time t increases. This represents the change in the first instruction value, used to characterize the decrease of the first instruction value r0 as the duration corresponding to time t increases;

[0111] This refers to the second time adjustment factor. It will increase as time t increases. This is used to characterize the increase of the real-time value r(t) of the second instruction as the duration corresponding to time t increases.

[0112] It is understood that the continuous transition algorithm used in the mode switching instruction transition method one of the embodiments of this application can realize both the first-order transition in embodiment two and the second-order or other asymptotic transitions in this embodiment three. In this embodiment, it can be set to... It is a second-order function, with coefficients a and t c Regarding this, the actual instructions ref2 after the transitional arrangement can be obtained, as follows: Figure 8 As shown, Figure 8 In the example, the maximum transition time t can be set. c =10ms, by Figure 8 It can be seen that the rate of change of the instruction using the second-order coefficient function in the transition process is small in the early stage of the transition. As the control cycle increases, the instruction transitions to the instruction sequence after the mode switch at a faster pace, and the transition effect is better.

[0113] Furthermore, in one embodiment, the user can adjust the maximum transition time t according to their needs. c The user can configure settings to indirectly adjust the first target transition curve. Specifically, the user can connect to the servo driver via an external device. The servo driver responds to the parameter setting instructions from the external device, adjusting the maximum transition time to t. c The settings are configured, and the adjusted target transition curve is displayed based on the settings. It can also display the initial target transition curve before the adjustments, allowing for a comparison between the two curves. Figure 9 As shown, by setting two different t values ​​before and after, c The values ​​are 0.01s and 0.06 seconds, respectively. The two second-order equation transition curves provide two different transition effects, thereby guiding customers to set a target transition curve that meets their needs.

[0114] Furthermore, the discrete transition algorithm used in the second instruction transition method for mode switching in this embodiment is similar in purpose to the continuous transition algorithm used in the first instruction transition method for mode switching. It can achieve both first-order and second-order or other asymptotic transitions. The transition duration is determined by the number of cycles M, and the smoothness of the transition is determined by a(k) (i.e., by the first or second adjustment factor). Users can set the maximum threshold M of the execution loop rounds of the servo driver according to their needs, thereby indirectly adjusting the discrete transition coefficient a(k).

[0115] Example 4

[0116] This invention provides a servo driver, such as... Figure 10 As shown, Figure 10This is a schematic diagram of the structure of a servo driver provided in an embodiment of this application. The servo driver of this embodiment includes: a processor 01, a memory 02, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the instruction transition method embodiment of this application.

[0117] The servo driver also includes interfaces for connecting servo motors and control devices (including PLC programmable logic controllers, host computers or upper-level master stations, etc.), through which the servo driver can obtain instructions and data.

[0118] Those skilled in the art will understand that Figure 1 The computer device 1 is merely an example and does not constitute a limitation on the servo drive. It may include more or fewer components than shown, or combine certain components, or different components.

[0119] The processor can be a Central Processing Unit (CPU), but it can 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 can be a microprocessor or any conventional processor.

[0120] In some embodiments, the memory may be an internal storage unit, such as a hard disk or memory of a servo drive. In other embodiments, the memory may be an external storage device of the servo drive, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., mounted on the servo drive.

[0121] Example 5

[0122] In one embodiment, such as Figure 11 As shown, the present invention also provides a servo driver instruction transition device, comprising:

[0123] The instruction switching module 10 is used to respond to the mode switching instruction and receive the real-time value of the second instruction to determine the operating condition information of the second control mode. The mode switching instruction represents the instruction to switch from the first control mode to the second control mode, and the real-time value of the second instruction is the control instruction value output by the second control mode.

[0124] The acquisition module 20 is used to acquire a first instruction value, wherein the first instruction value is the value of the control reference quantity of the servo driver at the end of the first control mode;

[0125] The determination module 30 is used to determine the corresponding target transition curve based on the operating condition information;

[0126] Transition module 40 is used to transition the value of the control reference quantity from the first instruction value to the second instruction real-time value according to the target transition curve.

[0127] It should be noted that the above-mentioned device can be understood as a chip in the servo driver; the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application, and their specific functions and technical effects can be found in the method embodiments section, which will not be repeated here.

[0128] Furthermore, this application embodiment also provides a storage medium, which is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps in the above-described method embodiments.

[0129] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0130] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0131] 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 implementation should not be considered beyond the scope of this application.

[0132] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or 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.

[0133] 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.

[0134] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A servo driver instruction transition method, characterized in that, The method is applied to a servo drive, and the method includes: The system responds to a mode switching command, determines the operating condition information of the second control mode, and receives the real-time value of the second command. The mode switching command represents a command to switch from the first control mode to the second control mode, and the real-time value of the second command is the control command value output by the second control mode. Obtain a first instruction value, wherein the first instruction value is the value of the control reference quantity of the servo driver at the end of the first control mode; Determine the corresponding target transition curve based on the aforementioned operating condition information; The value of the control reference quantity is transitioned from the first command value to the second command real-time value according to the target transition curve; wherein, the servo driver includes multiple control loops, each control loop corresponding to a control mode, and the step of determining the corresponding target transition curve based on the operating condition information includes: Determine whether the operating condition information includes the loop execution cycle corresponding to the second control mode, and obtain the determination result; The corresponding target transition curve is obtained based on the judgment result; The step of obtaining the corresponding target transition curve based on the judgment result includes: If the operating condition information includes the loop execution cycle corresponding to the second control mode, then obtain the preset maximum transition time and the first target transition curve; The step of transitioning the value of the control reference quantity from the first command value to the second command real-time value according to the target transition curve includes: Within the preset maximum transition time range, the value of the control reference quantity is transitioned from the first instruction value to the second instruction real-time value according to the first target transition curve; The step of transitioning the value of the control reference quantity from the first instruction value to the second instruction real-time value according to the first target transition curve within the preset maximum transition time includes: Receive the real-time value of the second instruction at time t within the time range corresponding to the preset maximum transition time. ; A first time adjustment factor and a second time adjustment factor are generated based on the preset maximum transition time and the duration corresponding to time t. Based on the first time adjustment factor and the first instruction value, the change in the first instruction value is obtained, and the change in the first instruction value represents the decrease of the first instruction value as the duration corresponding to the time t increases; Based on the second time adjustment factor and the second real-time value of the instruction, the change in the second instruction value is obtained. The change in the second instruction value represents the increase of the second real-time value of the instruction as the duration corresponding to time t increases. Based on the first target transition curve, the value of the control reference quantity is controlled to be equal to the sum of the change in the first command value and the change in the second command value, so that the value of the control reference quantity of the servo driver decreases as the duration corresponding to time t increases, until the value of the control reference quantity transitions to the real-time value of the second command at the end of the maximum transition time t.

2. The instruction transition method as described in claim 1, characterized in that, The method further includes: After the duration corresponding to time t is greater than the preset maximum transition time, the value of the control reference quantity controlling the servo driver is equal to the real-time value of the second instruction.

3. The instruction transition method as described in claim 1, characterized in that, The step of obtaining the corresponding target transition curve based on the judgment result includes: If the operating condition information does not include the loop execution cycle corresponding to the second control mode, then obtain the maximum threshold of the execution loop rounds and the second target transition curve; The step of transitioning the value of the control reference quantity from the first command value to the second command real-time value according to the target transition curve includes: Based on the maximum threshold of the execution loop cycle, the value of the control reference quantity is transitioned from the first instruction value to the second instruction real-time value according to the second target transition curve.

4. The instruction transition method as described in claim 3, characterized in that, The step of transitioning the value of the control reference quantity from the first instruction value to the second instruction real-time value according to the second target transition curve based on the maximum threshold of the execution loop rounds includes: Statistics on the current execution round of the control loop corresponding to the second control mode. and receive the real-time value of the second instruction corresponding to the current execution round of the loop, wherein the current execution round The number of execution loop rounds shall not exceed the maximum threshold. Based on the maximum threshold of the execution loop rounds and the current execution loop round. Generate the first adjustment factor and the second adjustment factor; Based on the first adjustment factor and the first instruction value, a real-time adjustment amount of the first instruction value is obtained. The real-time adjustment amount of the first instruction value represents the change in the first instruction value with the current execution round of the loop. The increase leads to a decrease; Based on the second time adjustment factor and the real-time value of the second instruction, a real-time adjustment amount for the second instruction value is obtained. This real-time adjustment amount represents the change in the real-time value of the second instruction with the current execution round of the loop. Increased with the increase; Based on the second target transition curve, the value of the control reference quantity is controlled to be equal to the sum of the real-time adjustment of the first command value and the real-time adjustment of the second command value, so that the value of the control reference quantity of the servo driver changes with the current execution round of the loop. The number of cycles increases and decreases until the current execution round in the loop is reached. When the maximum threshold of the loop cycle is reached, the control command reference value transitions to the second command real-time value.

5. A command transition device for a servo driver, characterized in that, The servo driver includes multiple control loops, each corresponding to a control mode. The device includes: The instruction switching module is used to respond to mode switching instructions, determine the operating condition information of the second control mode and receive the real-time value of the second instruction, wherein the mode switching instruction represents the instruction to switch from the first control mode to the second control mode, and the real-time value of the second instruction is the control instruction value output by the second control mode. An acquisition module is used to acquire a first instruction value, wherein the first instruction value is the value of the control reference quantity of the servo driver at the end of the first control mode; A determining module is used to determine a corresponding target transition curve based on the operating condition information, including determining whether the operating condition information includes the loop execution cycle corresponding to the second control mode, and obtaining a determination result; obtaining the corresponding target transition curve based on the determination result, including obtaining a preset maximum transition time and a first target transition curve if the operating condition information includes the loop execution cycle corresponding to the second control mode; a transition module is used to transition the value of the control reference quantity from the first instruction value to the second instruction real-time value according to the target transition curve, including: transitioning the value of the control reference quantity from the first instruction value to the second instruction real-time value according to the first target transition curve within the preset maximum transition time. The step of transitioning the value of the control reference quantity from the first instruction value to the second instruction real-time value according to the first target transition curve within the preset maximum transition time includes: Receive the real-time value of the second instruction at time t within the time range corresponding to the preset maximum transition time. ; A first time adjustment factor and a second time adjustment factor are generated based on the preset maximum transition time and the duration corresponding to time t. Based on the first time adjustment factor and the first instruction value, the change in the first instruction value is obtained, and the change in the first instruction value represents the decrease of the first instruction value as the duration corresponding to the time t increases; Based on the second time adjustment factor and the second real-time value of the instruction, the change in the second instruction value is obtained. The change in the second instruction value represents the increase of the second real-time value of the instruction as the duration corresponding to time t increases. Based on the first target transition curve, the value of the control reference quantity is controlled to be equal to the sum of the change in the first command value and the change in the second command value, so that the value of the control reference quantity of the servo driver decreases as the duration corresponding to time t increases, until the value of the control reference quantity transitions to the real-time value of the second command at the end of the maximum transition time t.

6. A servo driver, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 4.

7. A storage medium, said storage medium being a computer-readable storage medium, said computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Electromechanical servo control method and system, terminal equipment and storage medium

    CN112198795A

  • Control mode switching method and device of motor, servo driving equipment and medium

    CN115333426A

  • Command value interpolation apparatus and servo driver

    US20200285689A1