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

By introducing an instruction transition method into the servo drive, the target transition curve smooth transition control reference amount is used to solve the problem of sudden movement maneuverability of the servo drive during mode switching, and a smoother and more reliable servo motion is achieved.

CN119526376AActive Publication Date: 2025-02-28WUHAN UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD

Patent Information

Application Number
CN202311121362.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-02-28
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

The existing servo drives lack transition process during the switching of working mode, resulting in sudden changes in the mobility of movement and irregular movement or abnormal errors.

Method used

A servo driver instruction transition method is proposed. By responding to the mode switching instructions, the first instruction value is obtained, the target transition curve is determined, and the value of the control reference amount is transitioned from the first instruction value to the second instruction real-time value according to the target transition curve, ensuring a smooth transition of movement.

Benefits of technology

Through the smooth transition of the target transition curve, the problem of sudden change in the command reference value after the servo drive switches the working mode is solved, and the stability and reliability of the robot joint servo movement is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119526376A_ABST
    Figure CN119526376A_ABST
Patent Text Reader

Abstract

The invention 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, and the method comprises the steps: responding to a mode switching instruction, determining the working condition information of a second control mode, and receiving a second instruction real-time value, the mode switching instruction represents an instruction of switching from a first control mode to a second control mode, and the second instruction real-time value is a control instruction correspondingly output by the second control mode; obtaining a first instruction value, wherein the first instruction value is the value of the control reference quantity of the servo driver at the end moment of the first control mode; determining a corresponding target transition curve according to the working condition information; and the value of the control reference quantity is transited from the first instruction value to the second instruction real-time value according to the target transition curve, so that the technical problem that the instruction reference value suddenly changes after the working mode of the servo driver is switched can be solved, and servo system equipment can move more stably and reliably.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of automation control technology, and in particular, relates to a servo drive instruction transition method, device, servo drive and storage medium. Background Art

[0002] In the working process of modern robots, various working modes often need to be switched back and forth. The execution of working mode switching is completed by the control of the servo drive. However, most of the current servo drives do not arrange the transition process of mode switching; or during the switching process, only the integral type cumulative calculation of the algorithm is cleared, and no transition arrangement is made for the control instructions; the above conventional methods may cause a large mutation in the robot's motion maneuverability after the mode is switched, resulting in unstable motion or abnormal motion errors.

[0003] In order to solve the above problems, the present invention proposes a command transition method that can be used universally in the motor control mode switching of a single joint of a robot. The method can evolve different specific algorithm instances according to actual application scenarios. The motion maneuverability of the transition process is controllable, and the duration of the transition process is also controllable, which can make the joint servo movement of the robot more stable and reliable. Summary of the invention

[0004] The embodiment of the present application provides a servo drive instruction transition method, which aims to solve the technical problem of sudden change of instruction reference value after the servo drive switches the working mode.

[0005] In a first aspect, an embodiment of the present application provides a servo drive instruction transition method, the method is applied to a servo drive, the method comprising:

[0006] In response to a mode switching instruction, determining the operating condition information of the second control mode and receiving a second instruction real-time value, wherein the mode switching instruction represents an instruction for switching from the first control mode to the second control mode, and the second instruction real-time value is a control instruction value outputted corresponding to the second control mode;

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

[0008] Determine a corresponding target transition curve according to the 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] In a second aspect, an embodiment of the present application provides a command transition device for a servo drive, comprising:

[0011] An instruction switching module, used to respond to a mode switching instruction, determine the operating condition information of the second control mode and receive a second instruction real-time value, wherein the mode switching instruction represents an instruction for switching from the first control mode to the second control mode, and the second instruction real-time value is a control instruction value outputted corresponding to the second control mode;

[0012] An acquisition module, used for acquiring a first instruction value, where the first instruction value is a value of a control reference quantity of the servo driver at the end time of the first control mode;

[0013] A determination module, used to determine a corresponding target transition curve according to 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] In a third aspect, the present invention further proposes a servo drive, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect above when executing the computer program.

[0016] In a fourth aspect, the present invention further proposes a storage medium, which is a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect above are implemented.

[0017] The beneficial effect of the present application is that: according to the target transition curve, the value of the control reference quantity of the servo driver can be smoothly transitioned from the first instruction value at the end of the previous control mode to the second instruction real-time value corresponding to the next control mode, thereby solving the technical problem of sudden change of the instruction reference value after the servo driver switches the working mode, making the movement of the servo system equipment more stable and reliable. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 It is a flowchart of a servo drive instruction transition method provided in Example 1 of the present application;

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

[0021] Figure 3 It is a flowchart of a servo drive instruction transition method provided in Embodiment 2 of the present application;

[0022] Figure 4 This is a flow chart of the instruction transition method of the first mode switching in one embodiment of the present application;

[0023] Figure 5 is a schematic diagram of a real-time instruction curve for switching from a previous control mode to a subsequent control mode in a conventional manner;

[0024] Figure 6 A schematic diagram of a first target transition curve corresponding to a transition mode and a real-time instruction curve corresponding to a second control mode in the second embodiment;

[0025] Figure 7 is a flow chart of the instruction transition method of the second mode switching in one embodiment of the present application;

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

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

[0028] Fig.10 is a simplified structural diagram of a servo driver provided in an embodiment of the present application;

[0029] Fig.11 It is a structural schematic diagram of a servo drive instruction transition device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

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

[0032] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0033] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0034] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0035] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0036] The applicant of the present invention has found that modern robots often have to switch back and forth between various working modes when working; for example, in the single-joint motor motion control of the robot, there are often task switching of various working modes; for example, in the master-slave control of the surgical robot, the way of switching tasks includes: switching from profile position mode (PP) to periodic cycle position mode (CSP), switching from periodic cycle torque mode (CST) to profile position mode (PP), and other working mode tasks.

[0037] The execution of working mode switching is completed by the servo drive controller, but most of the current drives do not arrange a transition process for mode switching; or during the switching process, only the integral accumulation calculation of the algorithm is cleared, and no transition arrangement is made for the control command; or there are protection settings for motion command limiting or command slope limiting in the drive control algorithm, but the limit value is generally a fixed value and is set according to the maximum capacity of the joint movement, which is not conducive to dynamic adjustment and smooth transition of mode switching, and may even cause a larger mutation in the initial motion mobility of a single joint after the mode switch compared to before the switch, resulting in unstable motion or abnormal motion errors.

[0038] Embodiment 1

[0039] In order to solve the above problems, the present invention proposes a servo drive instruction transition method, which is applied to the servo drive and is suitable for using the instruction transition method of the present application in the application scenario of switching the motor control mode of a single joint of a robot. The motion mobility of the transition process is controllable, which can make the joint servo motion of the robot more stable and reliable. Figure 1 As shown, the servo drive instruction transition method of this embodiment mainly includes the following steps:

[0040] Step S10, responding to the mode switching instruction, determining the operating condition information of the second control mode and receiving the second instruction real-time value, wherein the mode switching instruction represents the instruction for switching from the first control mode to the second control mode, and the second instruction real-time value is the control instruction output corresponding to the second control mode;

[0041] It should be noted that the executor of the method embodiment of the present application is a servo drive; the application scenarios of the method of 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 drive, a control device (including a PLC programmable logic controller, a computer control device of a host computer or an upper-level master station, etc.) and a motor (such as a motor that drives the movement of the robot arm).

[0042] The servo drive receives signal instructions from the control device (such as physical signals such as digital quantity and pulse quantity, or control signals such as serial communication and field bus), and drives the motor to operate according to the specified curve. At the same time, the motor also feeds back its own status to the servo drive in real time, and the servo drive can perform closed-loop dynamic PID adjustment at any time.

[0043] In a specific implementation, the servo drive may respond to the mode switching instruction issued by the control device to switch the current working mode of the servo drive, for example, switching the current first control mode (old) to the second control mode (new), acquiring the working condition information of the new mode in real time and receiving the real-time value of the second instruction; the mode switching of this embodiment may be a mode switching between a periodic cycle control mode and a contour control mode of the servo drive, or a mode switching between 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 corresponding to the output of the second control mode. It can be understood that 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 the real-time instruction curve of the second control mode will be generated inside the servo drive.

[0045] Step S20, obtaining a first instruction value, where the first instruction value is a value of a control reference quantity of the servo driver at the end time of the first control mode;

[0046] Specifically, the control reference may be a global variable, and the control reference needs to be assigned a value by an output value corresponding to a real-time instruction of a current working mode of the servo drive.

[0047] Step S30, determining a corresponding target transition curve according to the operating condition information;

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

[0049] Step S40: 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.

[0050] It is understandable that at the next moment after the end of the first control mode, the second command real-time value corresponding to the second control mode will take effect, and the real-time command curve of the second control mode will be generated inside the servo driver. However, in this embodiment, after the first control mode ends, the servo driver will first enter a transition mode. Therefore, in the transition mode stage of the servo driver of this embodiment, the output value of the real-time command curve of the second control mode that has been generated will not be assigned to the control reference value of the servo driver;

[0051] Therefore, during the transition mode stage, the servo driver of this embodiment will assign a control reference value of the servo driver through the output value of the target transition curve, until the output value of the target transition curve is exactly the same as the real-time value of the second instruction (i.e., the real-time instruction curve of the second control mode) at the same time, then the transition mode is determined to be over (i.e., the "same time" is the end of the transition mode), and the servo driver officially enters the second control mode, thereby perfectly realizing the smooth transition of the servo driver from the first control mode to the second control mode, thereby avoiding the situation where the initial motion maneuverability of the robot after receiving the mode switching instruction has a large mutation compared to before the switching, effectively preventing the unstable motion or the hidden danger of causing abnormal motion errors, and making the servo system equipment movement more stable and reliable.

[0052] Embodiment 2

[0053] Further, on the basis of the first embodiment, the second embodiment is proposed. In this embodiment, the servo driver includes multiple control loops, including a current control loop (corresponding to the current control mode cst), a speed control loop (corresponding to the speed control mode csv) and a position control loop (corresponding to the current control mode csp). The regulators of the above three control loops can be implemented by a PID controller (proportional integral differential controller).

[0054] It is understandable that the typical control architecture of a single joint of a robot is as follows Figure 2 As shown in the figure, whether it is the periodic cycle control mode or the contour control mode, the main difference between the command input sources for the robot's joint driver is that the execution control architecture is the same. The periodic cycle control mode can represent the control command of the joint driver, such as P target / v target The servo control instructions of the contour control mode are sent from the upper master station in real time cycle, such as p profile / v profile A real-time instruction curve is generated inside the drive from the known target instruction and assigned to the control reference.

[0055] But in different mission modes, the servo drive may execute different loop controllers.

[0056] If the robot joint needs to complete motor current control or torque control, the current regulator receives the current command i ref , the output u of the current regulator c Control motor movement, current bias command i offset The upper-level algorithm outputs in real time during the robot joint control process;

[0057] If the joint needs to complete speed control, the speed regulator receives the speed command v ref , the output of the speed regulator i cmd Input to the current regulator;

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

[0059] refer to Figure 2 , Figure 2 i fdb 、v fdb 、p fdb They are respectively the current motion feedback current, feedback speed, and feedback position of the joint motor. The controller of each loop generally uses PID regulation to adjust. The three control loop regulators (current regulator, speed regulator, and position regulator) of this embodiment can be specifically implemented through software unit modules.

[0060] exist Figure 2 In the above joint control process, the robot often switches between control modes due to the robot's work task requirements, so the command input of each loop regulator must also switch accordingly. For example, when the servo drive switches from current control (cst mode) to speed control (csv or pv mode), the control reference value of the current regulator changes from i target The value becomes i cmd For example, when the servo drive switches from periodic speed control (csv mode) to profile speed control (pv mode), the control reference value of the corresponding speed regulator changes from v target The value becomes v profile The value of the control reference before and after the instruction switching in the conventional way may change greatly.

[0061] For conventional methods, switching from the outer loop of the control loop to the inner loop may also have the problem of command switching, such as switching from position control (csp mode) to speed control (csv mode). The control reference v corresponding to the speed command before switching ref The value may be a larger value. The control reference v corresponding to the csv mode command received at the initial moment after switching refThe value may be 0. In the above conventional method, due to the change in the reference value before and after switching, the motor's movement continuity may undergo a large mutation.

[0062] In computer control, the servo drive is generally controlled by a timer to set the control loop execution period T s The loop execution period corresponding to the control loop may be a known parameter, and the loop execution period corresponding to the control loop may not be a known parameter. In view of the technical problems involved in the above conventional methods, this embodiment proposes two mode switching transition methods. Specifically, based on the above first embodiment, reference is made to Figure 3 , the step S30 of this embodiment further includes:

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

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

[0065] Mode switching command transition method 1:

[0066] If the judgment result is that the operating condition information includes the loop execution period t corresponding to the second control mode s , then execute step S301 "obtaining a preset maximum transition time and a first target transition curve", and finally execute step S401 "transitioning the value of the control reference amount 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] It is understandable that if the transition time of the robot's joint motion mode switching is required to be controlled, in a known loop execution period T s In the case of c The continuous transition algorithm is used to complete the instruction transition;

[0068] In a specific implementation, the last command value (i.e., the first command value) of the (old) loop regulator before the motion mode switching moment is r0, and the (new) loop regulator command value is set according to the loop period T after switching to the mode. s is the sequence number r(t), t is the continuous time, 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 range kmax=t c / T s .

[0069] In this embodiment, the maximum transition time is preset to be t c , it is expected that the value of the control reference quantity is 0≤t≤t c The maximum transition time can be set to t c Specifically, the servo drive hardware surface of this embodiment has a setting button and a display screen, and the user can set the maximum transition time t based on the setting button and the display screen. c The setting is performed to indirectly adjust the first target transition curve. Compared with the conventional technology of setting a fixed value as a limit value in the drive control algorithm to play a protective role, this embodiment allows the user to set the time of the transition process by himself, thereby meeting the different needs of users.

[0070] In addition, the maximum value of k is determined by the preset maximum transition time t c It is determined that when the transition time is exceeded, the value of the control reference is the normal command value r(t) received by the loop.

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

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

[0073] A2, according to the preset maximum transition time t c Generate a first time adjustment factor and a second time adjustment factor according to the duration corresponding to time t;

[0074] A3, based on the first time adjustment factor and the first instruction value r0, obtaining a first instruction value change amount, wherein the first instruction value change amount indicates that the first instruction value r0 decreases with an increase in a time length corresponding to the time t;

[0075] A4, based on the second time adjustment factor and the second instruction real-time value r(t), obtaining a second instruction value change, wherein the second instruction value change represents that the second instruction real-time value r(t) increases with the increase of the time length corresponding to the time t;

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

[0077] A6, the duration corresponding to the time t is greater than the preset maximum transition time t c Afterwards, the value ref(k) of the control reference quantity of the servo drive is controlled to be equal to the second instruction real-time value r(k).

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

[0079]

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

[0081] In the above formula 1, ref(t) represents the actual command value input by each cycle regulator (i.e., the actual value of the control reference quantity required to be input by the corresponding loop regulator of the servo drive of this embodiment in the second control mode), r0 represents the last command value before the motion mode switching moment (which can be regarded as the initial value of the second control mode), r(t) represents the real-time value of the second command corresponding to the moment 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, represents the first time adjustment factor, represents the second time adjustment factor, represents the change in the first instruction value, represents the change in the second instruction value, It represents the proportion of the target time in the transition mode stage. [r0-r(t)] represents the difference between the initial value and the real-time value (of the second control mode) as time goes by. The closer the time is to the transition time, the smaller the proportion of the initial value r0.

[0083] Combination Figure 4 , it can be seen from the above formula 1 that when t = 0, that is, the initial moment of the second control mode, the value of the control reference is still the final value of the first control mode before switching (that is, the initial value is the first command value r0).c That is, at the end of the transition process, the value of the control reference quantity of the loop regulator of the servo drive currently working smoothly transitions to the command value of the second control mode (ie, the second command real-time value).

[0084] The beneficial effects of this embodiment can be reflected through simulation examples: Figure 5 and Figure 6 , Figure 5 It is a schematic diagram of a real-time instruction curve of the second control mode after switching from the (front) first control mode to the (rear) second control mode in a conventional manner; Figure 6 is the first target transition curve corresponding to the transition mode in the second embodiment and the real-time command curve corresponding 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 drive, the command transition process time of the mode switching can be designed as t in this embodiment. c = 10ms, that is, k = 10 cycles, using the first-order equation formula of formula (1), the actual instruction ref1 after transition arrangement can be obtained as follows: Figure 6 As shown, at the start of the command switching, the control reference value ref of the servo drive is still the final value of the previous mode, and then it transitions to the new command sequence r(t) according to the first-order slope (corresponding to the first target transition curve). c After time t, the actual instruction follows the given instruction sequence r(t). Figure 5 and Figure 6 By comparison, we can see that Figure 6 The value of the control reference quantity can be balancedly transitioned from the first instruction value r0 to the second instruction real-time value r(t) through a first target transition curve.

[0085] Mode switching transition method 2:

[0086] If the judgment result is that the operating condition information does not include the loop execution period T corresponding to the second control mode s , then execute step S310 "obtaining the maximum threshold of the execution loop round and the second target transition curve", and finally execute step S410 "transitioning the value of the control reference 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 round";

[0087] It is understandable that if the transition time of the joint motion mode switching is required to be controlled, the internal execution cycle T corresponding to the second control mode s When it is unknown, a discrete transition algorithm can be used to set a maximum threshold M for execution loop rounds. M can be understood as the maximum number of discrete transition cycles (i.e., the maximum value of execution loop rounds).

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

[0089] B1, counting the current execution round k of the loop corresponding to the control loop of the second control mode, and receiving the second instruction real-time value r(k) 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, generating a first adjustment factor and a second adjustment factor according to the maximum threshold M of the execution loop round and the current execution round k of the loop;

[0091] B3, based on the first adjustment factor and the first instruction value r0, obtaining a first instruction value real-time adjustment amount, wherein the first instruction value real-time adjustment amount indicates that the first instruction value r0 decreases with an increase in a current execution round k of the loop;

[0092] B4, based on the second time adjustment factor and the second instruction real-time value r(k), obtaining a second instruction value real-time adjustment amount, wherein the second instruction value real-time adjustment amount indicates that the second instruction real-time value r(k) increases with an increase in the current execution round k of the loop;

[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 first instruction value real-time adjustment amount and the second instruction value real-time adjustment amount, so that the value of the control reference quantity of the servo drive decreases with the increase of the current execution round k of the loop, until the current execution round k of the loop reaches the maximum threshold value M of the loop round, and 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 ref(k) of the control reference quantity of the servo drive is controlled to be equal to the real-time value r(k) of the second instruction.

[0095] It can be understood that the last instruction value (i.e., the first instruction value) of the control (old) loop regulator before the motion mode switching moment is r0, and the (new) loop regulator instruction value after switching to the mode is the sequence number r(k), where k represents the execution round of the control loop, k=0, 1, 2..., k=0 means that the initial moment in the new working mode (i.e., the second control mode) is 0, and the loop execution cycle T of the loop regulator corresponding to the second control mode is s is unknown, k=1 indicates that the control loop corresponding to the new working mode (ie, the second control mode) works for the second time, and so on.

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

[0097] When k≤M (corresponding to the above steps B1 to B5), a first adjustment factor (1-a(k)) and a second adjustment factor are generated according to the maximum threshold M of the execution loop round and the current execution round k of the loop. 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, which is a first-order linear transition. The final value of the mode before switching and the proportion of real-time instructions of the mode after switching vary with the transition coefficient.

[0098] When k>M (corresponding to the above step B6), the value of the control reference corresponding to the regulator is equal to the real-time input instruction of the mode after switching. The specific process can be referred to Figure 7 .

[0099] In order to meet the above requirements, in a specific implementation, the above instruction transition mode is realized by pre-establishing a second target transition curve, and the second target transition curve is represented by the following formula (2):

[0100]

[0101] In the above formula 2, k represents the discrete execution rounds of the control loop, r0 represents the first instruction value, ref(k) represents the value of the control reference quantity of the servo drive (that is, the actual value of the control reference quantity required to be input by the servo drive corresponding to the loop regulator in the second control mode of the servo drive of this embodiment), r(k) represents the output value corresponding to the real-time value of the second instruction in the kth cycle, a(k) represents the discrete transition coefficient, and the discrete transition coefficient is related to k and M, and M represents the maximum threshold value of the execution loop rounds.

[0102] Then, the first adjustment factor is made to be (1-a(k)), and the first instruction value real-time adjustment amount is obtained (1-a(k))×r0, where the first instruction value real-time adjustment amount indicates that the first instruction value r0 decreases with the increase of the current execution round k of the loop;

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

[0104] In this embodiment, the key to the above-mentioned discrete handover process is to set a clear handover coefficient sequence. The user can formulate the coefficient according to different handover smoothness requirements. The user can set the maximum threshold M of the execution loop round to limit the discrete transition coefficient a(k). Specifically, the servo drive hardware surface of this embodiment has a setting button and a display screen. The user can set the maximum threshold M of the execution loop round based on the setting button and the display screen, thereby indirectly adjusting the discrete transition coefficient a(k).

[0105] The beneficial effect of the second embodiment is that: on the basis of optimizing the problem of unstable motion caused by sudden changes in commands during the robot mode switching process, the second embodiment can make the servo drive's mobility in the transition process during the mode switching process determine different target transition curves according to actual working condition information, and then use different transition methods to complete the smooth transition of commands between different modes. In addition, the time of the transition process in the mode switching transition method 1 and the stability in the mode switching transition method 2 can be controlled and arranged to meet various user needs and provide a better user experience.

[0106] Embodiment 3

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

[0108]

[0109] In Formula 3, t represents continuous time, r0 represents the first instruction value, ref(t) represents the control reference of the servo drive, and r(t) represents the real-time value of the second instruction corresponding to time t. represents a high-order function related to the continuous time t (i.e., a first time adjustment factor), wherein, 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] will decrease as time t increases. represents the change amount of the first instruction value, which is used to characterize that the first instruction value r0 decreases with the increase of the time length corresponding to the time t;

[0111] It represents the second time adjustment factor. will increase with the increase of time t. It is used to represent that the real-time value r(t) of the second instruction increases with the increase of the time length corresponding to the time t.

[0112] It is understandable that the continuous transition algorithm used in the first instruction transition method of mode switching in the embodiment of the present application can realize the first-order transition in the second embodiment, and can also realize the second-order or other asymptotic transition in the third embodiment. is a second-order function with coefficients a and t c The actual instructions ref2 of the transitional arrangements can be obtained as 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 transition process instruction using the second-order coefficient function is small in the initial stage of the transition. As the control cycle increases, the instruction accelerates the transition to the instruction sequence after the mode switching, and the transition effect is better.

[0113] In addition, in one embodiment, the user can set the maximum transition time t according to his / her needs. c Specifically, the user can connect the servo driver through an external device, and the servo driver responds to the parameter setting instruction of the external device to adjust the maximum transition time t c The target transition curve after adjustment can be displayed based on the setting result. The first target transition curve before adjustment can also be displayed. The two target transition curves before and after adjustment can be compared. Fig. 9 As shown, by setting two different t c The transition curves of the two second-order equations provide two different sets of transition effects, which can guide customers to set the target transition curve that meets their needs.

[0114] In addition, the discrete transition algorithm used in the second instruction transition method of mode switching in the embodiment of the present application has a similar purpose to the continuous transition algorithm used in the first instruction transition method of mode switching, and can realize both first-order transition and second-order or other asymptotic transition. The transition duration is determined by the number of cycles M, and the transition smoothness characteristic is determined by a(k) (i.e., the first adjustment factor or the second adjustment factor). The user can set the maximum threshold M of the execution loop round of the servo drive according to his own needs, and then indirectly adjust the discrete transition coefficient a(k).

[0115] Embodiment 4

[0116] An embodiment of the present invention provides a servo driver, such as Fig.10 As shown, Fig.10A schematic diagram of the structure of a servo driver provided in an embodiment of the present application. The servo driver of this embodiment comprises: a processor 01, a memory 02, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the instruction transition method embodiment of the present application when executing the computer program.

[0117] The servo driver also includes interfaces for connecting the servo motor and a control device (including a PLC programmable logic controller, a host computer or a computer control device of an upper master station, etc.), and the servo driver can obtain instructions and data through these interfaces.

[0118] Those skilled in the art will understand that Figure 1 This is only an example of the computer device 1 and does not constitute a limitation on the servo drive. It may include more or less components than shown in the figure, or a combination of certain components, or different components.

[0119] The processor may be a central processing unit (CPU), and the processor 01 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0120] In some embodiments, the memory may be the 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 a servo drive, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the servo drive.

[0121] Embodiment 5

[0122] In one embodiment, if Fig.11 As shown, the present invention also provides a servo drive instruction transition device, comprising:

[0123] The instruction switching module 10 is used to respond to the mode switching instruction and receive the second instruction real-time value, and determine the working condition information of the second control mode, wherein the mode switching instruction represents the instruction for switching from the first control mode to the second control mode, and the second instruction real-time value is the control instruction value outputted corresponding to the second control mode;

[0124] An acquisition module 20, configured to acquire a first instruction value, where the first instruction value is a value of a control reference quantity of the servo drive at the end time of the first control mode;

[0125] A determination module 30, configured to determine a corresponding target transition curve according to the operating condition information;

[0126] The 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, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0128] In addition, an embodiment of the present application further provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0129] If the integrated unit is implemented in the form of 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, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0130] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0131] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0132] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0134] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A servo drive instruction transition method, characterized in that: The method is applied to a servo drive, and the method comprises: In response to a mode switching instruction, determining the operating condition information of the second control mode and receiving a second instruction real-time value, wherein the mode switching instruction represents an instruction for switching from the first control mode to the second control mode, and the second instruction real-time value is a control instruction value outputted corresponding to the second control mode; Acquire a first instruction value, where the first instruction value is a value of a control reference quantity of the servo driver at the end time of the first control mode; Determine a corresponding target transition curve according to the operating condition information; 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.

2. The instruction transition method according to claim 1, characterized in that: The servo drive includes a plurality of control loops, each control loop corresponds to a control mode, and the corresponding target transition curve is determined according to the working condition information, including: Determine whether the operating condition information includes a loop execution cycle corresponding to the second control mode, and obtain a determination result; The corresponding target transition curve is obtained according to the judgment result.

3. The instruction transition method according to claim 2, characterized in that: The obtaining a corresponding target transition curve according to the judgment result includes: If the operating condition information includes a loop execution period corresponding to the second control mode, obtaining a preset maximum transition time and a 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 target transition curve includes: 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 within the range of the preset maximum transition time.

4. The instruction transition method according to claim 3, characterized in that: The method further comprises: 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 range of the preset maximum transition time includes: Receive a second instruction real-time value r(t) at time t within a time range corresponding to the preset maximum transition time; Generate a first time adjustment factor and a second time adjustment factor according to the preset maximum transition time and the duration corresponding to time t; Based on the first time adjustment factor and the first instruction value, a first instruction value change is obtained, wherein the first instruction value change represents that the first instruction value decreases with an increase in a time length corresponding to the time t; Based on the second time adjustment factor and the second instruction real-time value, a second instruction value variation is obtained, where the second instruction value variation represents that the second instruction real-time value increases with the increase of the time length corresponding to the time t; Based on the first target transition curve, the value of the control reference is controlled to be equal to the sum of the first instruction value change and the second instruction value change, so that the value of the control reference of the servo drive decreases with the increase of the time length corresponding to the moment t, until the value of the control reference transitions to the second instruction real-time value at the end moment when t reaches the maximum transition time.

5. The instruction transition method according to claim 4, characterized in that: The method further comprises: After the time length corresponding to the moment t is greater than the preset maximum transition time, the value of the control reference quantity for controlling the servo driver is equal to the second instruction real-time value.

6. The instruction transition method according to claim 2, characterized in that: The obtaining a corresponding target transition curve according to the judgment result includes: If the operating condition information does not include the loop execution cycle corresponding to the second control mode, obtaining the maximum threshold of the execution loop round and the second 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 target transition curve includes: Based on the execution loop round maximum threshold, 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.

7. The instruction transition method according to claim 6, 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 execution loop round maximum threshold comprises: Counting the current execution round k of the loop corresponding to the control loop of the second control mode, and receiving the real-time value of the second instruction corresponding to the current execution round of the loop, wherein the current execution round k does not exceed the maximum threshold of the execution loop round; Generate a first adjustment factor and a second adjustment factor according to the maximum threshold of the execution loop round and the current execution round k of the loop; Based on the first adjustment factor and the first instruction value, a first instruction value real-time adjustment amount is obtained, wherein the first instruction value real-time adjustment amount indicates that the first instruction value decreases with an increase in a current execution round k of the loop; Based on the second time adjustment factor and the second instruction real-time value, a second instruction value real-time adjustment amount is obtained, where the second instruction value real-time adjustment amount indicates that the second instruction real-time value increases with an increase in a current execution round k of the loop; Based on the second target transition curve, the value of the control reference quantity is controlled to be equal to the sum of the first instruction value real-time adjustment quantity and the second instruction value real-time adjustment quantity, so that the value of the control reference quantity of the servo drive decreases with the increase of the current execution round k of the loop, until the current execution round k of the loop reaches the maximum threshold of the loop round, and the control instruction reference value transitions to the second instruction real-time value.

8. A command transition device for a servo drive, characterized in that: include: An instruction switching module, used to respond to a mode switching instruction, determine the operating condition information of the second control mode and receive a second instruction real-time value, wherein the mode switching instruction represents an instruction for switching from the first control mode to the second control mode, and the second instruction real-time value is a control instruction value outputted corresponding to the second control mode; An acquisition module, used for acquiring a first instruction value, where the first instruction value is a value of a control reference quantity of the servo driver at the end time of the first control mode; A determination module, used to determine a corresponding target transition curve according to the operating condition information; 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.

9. A servo drive, 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, the method according to any one of claims 1 to 7 is implemented.

10. A storage medium, wherein the storage medium is a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Stable platform position servo control method based on Dubins curve

    CN106919185A

  • Transition trajectory generation method, robot and computer readable storage medium

    CN111857037A

  • 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

  • Adjustable parameter machining

    TWI684842B

Cited By

  • Multi-mode control switching method for robot servo system

    CN121635051A