Motor deceleration control method, device, motion controller and storage medium
By generating and performing deceleration planning when the motor is decelerating and controlling the output pulse of the servo driver, the problem of responsive impact during the motor is decelerating, and the smooth deceleration of the motor and the improvement of the calculation efficiency are achieved.
Patent Information
- Application Number
- CN202410216447.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-27
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-02-27
AI Technical Summary
In the prior art, the motor directly stops the pulse output when decelerates, causing the motor to withstand huge responsive impacts and increase the failure rate.
After receiving the deceleration command, enter the planning period and generate a deceleration plan based on the current motion planning and the duration of the planned period, including slices of multiple time nodes. Each slice includes the speed of the motor and the movement position of the robot arm, and controls the servo drive. The output pulse is reached until the preset condition is reached.
The motor is slow deceleration is achieved, huge impact force is avoided, the calculation process is simplified, the calculation efficiency is improved, and the failure rate is reduced.
Smart Images

Figure CN118174597B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of automation, and in particular to a motor deceleration control method, device, motion controller and storage medium. Background Art
[0002] EtherCAT (Ethernet for Control Automation Technology) is a high-performance, real-time industrial Ethernet communication protocol, which is commonly used to implement high-precision motion control systems, such as industrial robots and high-precision machine tools. The motion controller and servo drive in the general control system are connected in series through the EtherCAT bus, and the motor is driven by the algorithm to perform high-real-time and high-precision work. Therefore, the design of the algorithm is crucial to the performance of the control system. When the motor is decelerated, the prior art generally stops the pulse output directly. However, this method will cause the motor to withstand a huge reverberation shock and increase the failure rate of the motor.
[0003] In summary, in the prior art, the control system directly stops pulse output when performing deceleration control on the motor, which causes a technical problem that the motor is subjected to a huge reverberation impact. Summary of the invention
[0004] The embodiments of the present invention provide a motor deceleration control method, device, motion controller and storage medium, which solve the technical problem in the prior art that the control system directly stops pulse output when performing deceleration control on the motor, causing the motor to be subjected to huge reverberation impact.
[0005] In a first aspect, an embodiment of the present invention provides a motor deceleration control method, which is applicable to a motion controller for controlling a servo drive, wherein the servo drive is used to drive a motor, and the motor is used to drive a mechanical arm to move, comprising:
[0006] When receiving a deceleration instruction, entering a planned period, the duration of which is pre-set;
[0007] In the planning period, according to the current motion plan and the duration of the planning period, the first speed of the motor and the execution time of the deceleration plan at the end of the planning period are determined, and the deceleration plan is generated according to the first speed, the allowable stop speed of the motor and the deceleration of the motor; the allowable stop speed of the motor and the deceleration of the motor are set in advance, and the deceleration plan includes a plurality of slices corresponding to continuous time nodes, each of the slices includes the speed of the motor at the corresponding time node and the motion position of the robot arm at the corresponding time node;
[0008] When the execution time is reached, the servo driver is controlled to output pulses to the motor according to the deceleration plan until a preset condition is met.
[0009] Preferably, generating the deceleration plan according to the first speed, the allowable stop speed of the motor and the deceleration of the motor includes:
[0010] Determining a duration of the deceleration plan according to the first speed, the allowable stop speed, and the deceleration;
[0011] A deceleration plan is generated according to the first rotational speed, the allowable stopping rotational speed, the duration, and the motion trajectory of the robotic arm.
[0012] Preferably, when the execution time is reached, the servo driver is controlled to output pulses to the motor according to the deceleration plan until a preset condition is met, including:
[0013] When the execution time is reached, the servo driver is controlled to output pulses to the motor according to the rotation speed and movement position corresponding to the slices in the deceleration plan, until the preset conditions are met.
[0014] Preferably, when the execution time is reached, the slices in the deceleration plan are added to the motion buffer queue.
[0015] Preferably, the preset condition is that the rotation speed of the motor is less than or equal to the allowable stop rotation speed.
[0016] In a second aspect, an embodiment of the present invention provides a motor deceleration control device, which is suitable for controlling a motion controller of a servo drive, wherein the servo drive is used to drive a motor, and the motor is used to drive a mechanical arm to move, including:
[0017] An instruction receiving module, used for entering a planned period when a deceleration instruction is received, wherein the duration of the planned period is pre-set;
[0018] A deceleration planning module, used to determine, within the planning period, according to the current motion plan and the duration of the planning period, the first speed of the motor and the execution time of the deceleration plan at the end of the planning period, and to generate the deceleration plan according to the first speed, the allowable stop speed of the motor and the deceleration of the motor; the allowable stop speed of the motor and the deceleration of the motor are set in advance, and the deceleration plan includes a plurality of slices corresponding to continuous time nodes, each of the slices includes the speed of the motor at the corresponding time node and the motion position of the robot arm at the corresponding time node;
[0019] A pulse output module is used to control the servo driver to output pulses to the motor according to the deceleration plan when the execution time is reached until a preset condition is met.
[0020] Preferably, the deceleration planning module includes:
[0021] a duration determination submodule, configured to determine the duration of the deceleration plan according to the first speed, the allowable stop speed and the deceleration;
[0022] The deceleration planning submodule is used to generate a deceleration plan according to the first rotational speed, the allowable stopping rotational speed, the duration and the motion trajectory of the robotic arm.
[0023] Preferably, the pulse output module is specifically used to control the servo driver to output pulses to the motor according to the rotation speed and movement position corresponding to the slices in the deceleration plan when the execution time is reached, until a preset condition is met.
[0024] In a third aspect, an embodiment of the present invention provides a motion controller, the motion controller comprising a processor and a memory;
[0025] The memory is used to store a computer program and transmit the computer program to the processor;
[0026] The processor is used to execute a motor deceleration control method as described in the first aspect according to instructions in the computer program.
[0027] In a fourth aspect, an embodiment of the present invention provides a storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute a motor deceleration control method as described in the first aspect.
[0028] The embodiment of the present invention discloses a motor deceleration control method, device, motion controller and storage medium. The embodiment of the present invention reserves a planning period. After receiving a deceleration instruction, the motion controller generates a deceleration plan for the speed of the motor in the planning period, and after the planning period ends, controls the servo driver to output pulses to the motor according to the deceleration plan, thereby controlling the speed of the motor and achieving smooth deceleration of the motor. The embodiment of the present invention generates a deceleration plan in the planning period, and controls the motor to decelerate smoothly according to the deceleration plan, which can avoid the motor from being subjected to huge impact force, and the calculation process is simple, which reduces the calculation time and further improves the calculation efficiency, and solves the technical problem that the control system in the prior art directly stops the pulse output when performing deceleration control on the motor, causing the motor to be subjected to huge reverberation impact. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic flow chart of a motor deceleration control method provided in an embodiment of the present invention.
[0030] Figure 2 A connection diagram of a control system provided by an embodiment of the present invention.
[0031] Figure 3 A schematic flow chart of another motor deceleration control method provided by an embodiment of the present invention.
[0032] Figure 4 A schematic diagram of a motor deceleration control method is provided for an embodiment of the present invention.
[0033] Figure 5 A schematic structural diagram of a motor deceleration control device is provided in an embodiment of the present invention.
[0034] Figure 6 A structural schematic diagram of a motion controller is provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following description and accompanying drawings fully illustrate the specific embodiments of the present application so that those skilled in the art can practice them. The examples represent possible variations only. Unless explicitly required, separate components and functions are optional, and the order of operation can vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. The scope of the embodiments of the present application includes the entire scope of the claims, and all available equivalents of the claims. In this article, each embodiment may be represented individually or generally by the term "invention", which is only for convenience, and if more than one invention is disclosed in fact, it is not intended to automatically limit the scope of the application to any single invention or inventive concept. In this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, without requiring or implying any actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed. The various embodiments are described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. As for the structures, products, etc. disclosed in the embodiments, since they correspond to the parts disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0036] In the prior art, when the control system performs deceleration control on the motor, there are generally the following methods: (1) directly stop the pulse output. This method will cause the motor to bear a huge reverberation impact and cause damage to the motor. (2) The control layer decelerates the movement and runs the deceleration algorithm in the control layer. This method takes a long time to calculate and is not suitable for scenarios such as continuous interpolation. (3) Realize acceleration continuity in the control layer. This method has high calculation complexity. When the acceleration is not 0 and is in the positive direction, the deceleration process will have an acceleration segment. In addition, in the prior art, the deceleration process is generally not paused under the original motion trajectory, which makes it difficult to restore the original motion trajectory after the motor stops.
[0037] Based on this, an embodiment of the present invention provides a motor deceleration control method, such as Figure 1 As shown, Figure 1 The flowchart of a motor deceleration control method provided by an embodiment of the present invention. The motor deceleration control method provided by an embodiment of the present invention is applicable to a motion controller controlling a servo drive, the servo drive is used to drive a motor, and the motor is used to drive a mechanical arm to move. Specifically, Figure 2 As shown, Figure 2 A schematic diagram of the structure of a control system provided by an embodiment of the present invention, Figure 2 In the embodiment, the motion controller is connected in series with multiple servo drivers via an EtherCAT bus, each servo driver is connected to a motor, and the motion controller can control each motor via the servo driver. The motor deceleration control method provided by the embodiment of the present invention includes:
[0038] Step 101: When a deceleration instruction is received, a planning period is entered, and the duration of the planning period is pre-set.
[0039] During normal operation, when the motion controller receives a deceleration instruction, it will enter a planning period, in which the deceleration instruction is used to instruct the motion controller to control the motor to decelerate. The planning period refers to the time period used to generate a deceleration plan. It can be understood that since the process of generating the deceleration plan involves data calculation, a certain amount of time needs to be reserved for calculation. The specific duration of the planning period can be set in advance according to actual needs, and is not specifically limited in this embodiment.
[0040] Step 102: within the planning period, according to the current motion plan and the length of the planning period, determine the first speed of the motor and the execution time of the deceleration plan at the end of the planning period, and generate a deceleration plan according to the first speed, the allowable stopping speed of the motor and the deceleration of the motor; the allowable stopping speed of the motor and the deceleration of the motor are set in advance, and the deceleration plan includes multiple slices corresponding to continuous time nodes, each slice includes the speed of the motor at the corresponding time node and the motion position of the robot arm at the corresponding time node.
[0041] After entering the planning period, the motion controller will first determine the first speed of the motor and the execution time of the deceleration plan after the end of the planning period according to the current motion plan, and determine the insertion node of the deceleration plan in the current motion plan according to the execution time. The current motion plan refers to the control system's current planning of the motor speed and the motion trajectory of the robot, such as the motor speed and the motion position of the robot at different times. Specifically, the motion controller can determine the end time of the planning period according to the length of the planning period, and determine the first speed of the motor at the end time according to the current motion plan, and can determine the execution time of the deceleration plan according to the end time.
[0042] After determining the execution time, the motion controller also needs to generate a deceleration plan within the planning time period according to the first speed, the allowable stop speed of the motor and the deceleration of the motor. The deceleration plan refers to planning the deceleration process of the motor to determine the speed of the motor at different times during the deceleration process and the movement position of the robot arm. In addition, the allowable stop speed of the motor refers to the minimum speed of the motor when it is allowed to stop outputting pulses to the motor. When the speed of the motor reaches the allowable stop speed, it can be directly controlled to stop outputting pulses to the motor. In this embodiment, the allowable stop speed can be set to a smaller value to avoid the motor from being subjected to a large reverse impact during deceleration. The deceleration of the motor is the acceleration of the motor's speed during the deceleration process.
[0043] In one embodiment, when generating a deceleration plan, the motion controller may first determine the duration of the deceleration plan, that is, the duration of executing the deceleration plan, based on the first speed, the allowed stop speed, and the deceleration. Then, the deceleration plan is generated based on the first speed, the allowed stop speed, the duration, and the motion trajectory set by the robot arm, so as to determine the speed of the motor and the motion position of the robot arm at different times. It should also be noted that during the planning period, the motion controller still needs to control the motor according to the current motion plan.
[0044] In this embodiment, the deceleration plan includes a plurality of slices corresponding to continuous time nodes, and each slice includes the speed of the motor at the corresponding time node and the motion position of the robot arm at the corresponding time node. That is, each slice includes the speed corresponding to the motor and the motion position of the robot arm, and the motion controller can subsequently control the speed of the electric motor according to each slice in the deceleration plan. Exemplarily, assuming that in the process of deceleration planning, the robot arm moves from point A to point B, and the distance of movement is Xcm. Assuming that each 1 second is a time node, the speed planning of the motor speed at each time node is A1r / s, A1r / s, A2r / s, A3r / s, A4r / s, A5r / s, A6r / s, 0, and the trajectory planning of each time node is 0, S1cm, S2cm, S3cm, S4cm, S5cm, S6cm, Xcm, that is, the speed planning and trajectory planning generate a total of 8 slices, and each time node executes a corresponding slice.
[0045] Step 103: When the execution time is reached, the servo driver is controlled to output pulses to the motor according to the deceleration plan until the preset conditions are met.
[0046] When the execution time is reached, that is, the current motion plan is executed to the insertion node, that is, the planning period ends, the motion controller can use the deceleration plan to replace the current motion plan, and according to the speed and motion position corresponding to each slice in the deceleration plan, control the servo driver to output pulses to the motor, thereby controlling the speed of the motor so that the motor decelerates smoothly until the speed of the motor reaches the preset condition, which is a pre-set condition. In one embodiment, the preset condition can be set to the speed of the motor being less than or equal to the allowable stop speed, that is, when the speed of the motor is less than or equal to the allowable stop speed, the pulse output can be stopped to prevent the motor from being subjected to a large reverberation shock.
[0047] As mentioned above, the embodiment of the present invention reserves a planning period, and after receiving the deceleration instruction, the motion controller generates a deceleration plan for the speed of the motor in the planning period, and after the planning period ends, controls the servo driver to output pulses to the motor according to the deceleration plan, thereby controlling the speed of the motor and achieving smooth deceleration of the motor. The embodiment of the present invention generates a deceleration plan in the planning period, and controls the motor to decelerate smoothly according to the deceleration plan, which can avoid the motor from being subjected to huge impact force, and the calculation process is simple, which reduces the calculation time and further improves the calculation efficiency, and solves the technical problem that the control system in the prior art directly stops the pulse output when decelerating the motor, causing the motor to be subjected to huge reverberation impact.
[0048] like Figure 3 As shown, Figure 3 Another motor deceleration control method provided by an embodiment of the present invention is: Figure 3 The motor deceleration motion shown is a specific embodiment of the motor deceleration control method described above. The motor deceleration control method provided by the embodiment of the present invention includes:
[0049] Step 201: When a deceleration instruction is received, a planning period is entered, and the duration of the planning period is pre-set.
[0050] Step 202: within the planning period, according to the current motion plan and the duration of the planning period, determine the first speed of the motor and the execution time of the deceleration plan at the end of the planning period, and according to the first speed, the allowed stopping speed and the deceleration, determine the duration of the deceleration plan, and generate the deceleration plan according to the first speed, the allowed stopping speed, the duration and the motion trajectory of the robot arm; the allowed stopping speed of the motor and the deceleration of the motor are set in advance, and the deceleration plan includes multiple slices corresponding to continuous time nodes, each slice includes the speed of the motor at the corresponding time node and the motion position of the robot arm at the corresponding time node.
[0051] In one embodiment, when generating a deceleration plan, the motion controller first needs to determine the duration of the deceleration plan based on the first speed, the allowed stop speed, and the deceleration. Specifically, the duration for the motor speed to decrease from the first speed to the allowed stop speed can be determined based on the deceleration. This duration is the duration of the deceleration plan. Then, this duration is added to the execution time to obtain the specific time for the motor speed to decrease from the first speed to the allowed stop speed, thereby obtaining the end time of the deceleration plan.
[0052] After obtaining the duration of the deceleration plan, the motion controller can generate a deceleration plan based on the insertion node, the first speed, the allowed stopping speed, the duration and the motion trajectory of the robot arm, so as to obtain the speed of the motor at different time nodes and the motion position of the robot arm. The motion trajectory of the robot arm can be set in advance. By generating a deceleration plan based on the motion position of the robot arm, the position of the robot arm can remain on the preset motion trajectory during the deceleration process, which is convenient for restoring the motion trajectory later.
[0053] Step 203, when the execution time is reached, the servo driver is controlled to output pulses to the motor according to the rotation speed and movement position corresponding to the slices in the deceleration plan, until the preset conditions are met.
[0054] When the execution time is reached, that is, when the current motion plan is executed to the insertion node, the motion controller can control the servo driver to output pulses to the motor according to the speed and motion position corresponding to each slice in the deceleration plan, so that the motor reaches the speed corresponding to the slice, and the robot moves to the motion position corresponding to the slice. The motion controller controls the servo driver to output pulses to the motor according to the deceleration plan, so that the motor decelerates smoothly until the preset condition is reached, and the motion controller controls the servo driver to stop outputting pulses. In one embodiment, the preset condition is that the speed of the motor is less than or equal to the allowable stop speed.
[0055] Based on the above embodiment, when the execution time is reached, the slices in the deceleration plan are added to the motion buffer queue.
[0056] In another embodiment, when the execution time is reached, the motion controller can add the slice in the deceleration plan to the motion buffer queue, thereby replacing the current motion plan. The subsequent motion controller can directly take each slice from the motion buffer queue in turn, and output corresponding pulses to the motor according to the slice. In one embodiment, the overall process of deceleration control of the motor speed is as follows: Figure 4 shown.
[0057] As mentioned above, an embodiment of the present invention provides a motor deceleration control method. The embodiment of the present invention reserves a planning period. After receiving the deceleration instruction, the motion controller generates a deceleration plan for the speed of the motor in the planning period. After the planning period ends, the servo driver is controlled to output pulses to the motor according to the deceleration plan, thereby controlling the speed of the motor and achieving smooth deceleration of the motor. The embodiment of the present invention generates a deceleration plan in the planning period and controls the motor to decelerate smoothly according to the deceleration plan, thereby preventing the motor from being subjected to a huge impact force. The calculation process is simple, the calculation time is reduced, and the calculation efficiency is further improved. The technical problem that the control system in the prior art directly stops the pulse output when performing deceleration control on the motor is solved, causing the motor to be subjected to a huge reverberation impact. In addition, when generating the deceleration plan, the embodiment of the present invention also decelerates the robot arm on the original motion trajectory, ensuring a high-precision motion trajectory, which is easy to move according to the motion trajectory later.
[0058] The embodiment of the present invention also provides a motor deceleration control device, such as Figure 5 As shown, Figure 5 The present invention provides a schematic diagram of the structure of a motor deceleration control device according to an embodiment of the present invention. The motor deceleration control device according to an embodiment of the present invention is suitable for controlling a motion controller of a servo drive. The servo drive is used to drive a motor, and the motor is used to drive the movement of a mechanical arm. The motor deceleration control device includes:
[0059] The instruction receiving module 301 is used to enter the planning period when receiving the deceleration instruction, and the duration of the planning period is pre-set;
[0060] The deceleration planning module 302 is used to determine, within the planning period, the first speed of the motor and the execution time of the deceleration plan at the end of the planning period according to the current motion plan and the length of the planning period, and to generate a deceleration plan according to the first speed, the allowable stopping speed of the motor and the deceleration of the motor; the allowable stopping speed of the motor and the deceleration of the motor are set in advance, and the deceleration plan includes multiple slices corresponding to continuous time nodes, each slice includes the speed of the motor at the corresponding time node and the motion position of the robot arm at the corresponding time node.
[0061] The pulse output module 303 is used to control the servo driver to output pulses to the motor according to the deceleration plan when the execution time is reached, until the preset conditions are met.
[0062] Based on the above embodiment, the deceleration planning module 302 includes:
[0063] A duration determination submodule, used to determine the duration of the deceleration plan according to the first speed, the allowed stop speed and the deceleration;
[0064] The deceleration planning submodule is used to generate a deceleration plan according to the first rotation speed, the allowed stopping rotation speed, the duration, and the motion trajectory of the robot arm.
[0065] Based on the above embodiment, the pulse output module 304 is specifically used to control the servo driver to output pulses to the motor according to the rotation speed and movement position corresponding to the slices in the deceleration plan when the execution time is reached, until the preset conditions are met.
[0066] Based on the above embodiment, it also includes a queue adding module, which is used to add the slices in the deceleration plan to the motion buffer queue when the execution time is reached.
[0067] Based on the above embodiment, the preset condition is that the rotation speed of the motor is less than or equal to the allowable stop rotation speed.
[0068] As described above, an embodiment of the present invention provides a motor deceleration control device. The embodiment of the present invention reserves a planning period. After receiving the deceleration instruction, the motion controller generates a deceleration plan for the motor speed in the planning period, and after the planning period ends, the servo driver is controlled to output pulses to the motor according to the deceleration plan, thereby controlling the motor speed and achieving smooth deceleration of the motor. The embodiment of the present invention generates a deceleration plan in the planning period, and controls the motor to decelerate smoothly according to the deceleration plan, which can avoid the motor from being subjected to huge impact force, and the calculation process is simple, which reduces the calculation time and further improves the calculation efficiency. It solves the technical problem that the control system in the prior art directly stops the pulse output when performing deceleration control on the motor, causing the motor to be subjected to huge reverberation impact.
[0069] The motor deceleration control device provided in the embodiment of the present invention is included in a motion controller and can be used to execute the motor deceleration control method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0070] It is worth noting that in the embodiment of the above-mentioned motor deceleration control device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0071] This embodiment also provides a motion controller, such as Figure 6 As shown, Figure 6 A schematic diagram of the structure of a motion controller provided by an embodiment of the present invention is shown in FIG. Figure 6 As shown, the motion controller 40 includes a processor 400 and a memory 401;
[0072] The memory 401 is used to store the computer program 402 and transmit the computer program 402 to the processor 400;
[0073] The processor 400 is used to execute the steps in the above-mentioned motor deceleration control method embodiment according to the instructions in the computer program 402.
[0074] Exemplarily, the computer program 402 may be divided into one or more modules / units, one or more modules / units are stored in the memory 401, and are executed by the processor 400 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 402 in the motion controller 40.
[0075] The motion controller 40 may include, but is not limited to, a processor 400 and a memory 401. Those skilled in the art will appreciate that Figure 6 It is only an example of the motion controller 40 and does not constitute a limitation of the motion controller 40. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the motion controller 40 may also include input and output devices, network access devices, buses, etc.
[0076] The processor 400 may be a central processing unit (CPU), or 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 any conventional processor, etc.
[0077] The memory 401 may be an internal storage unit of the motion controller 40, such as a hard disk or memory of the motion controller 40. The memory 401 may also be an external storage device of the motion controller 40, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the motion controller 40. Further, the memory 401 may also include both an internal storage unit of the motion controller 40 and an external storage device. The memory 401 is used to store computer programs and other programs and data required by the motion controller 40. The memory 401 may also be used to temporarily store data that has been output or is to be output.
[0078] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0079] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0080] 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.
[0081] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0082] 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 technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store computer programs.
[0083] An embodiment of the present invention further provides a storage medium containing computer executable instructions, which are used to execute a motor deceleration control method when executed by a computer processor. The method includes the following steps:
[0084] When receiving a deceleration instruction, the vehicle enters a planned period, and the duration of the planned period is pre-set;
[0085] In the planning period, according to the current motion plan and the duration of the planning period, the first speed of the motor and the execution time of the deceleration plan at the end of the planning period are determined, and the deceleration plan is generated according to the first speed, the allowable stop speed of the motor and the deceleration of the motor; the allowable stop speed of the motor and the deceleration of the motor are set in advance, and the deceleration plan includes a plurality of slices corresponding to continuous time nodes, each slice includes the speed of the motor at the corresponding time node and the motion position of the robot arm at the corresponding time node;
[0086] When the execution time is reached, the servo driver is controlled to output pulses to the motor according to the deceleration plan until the preset conditions are met.
[0087] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the embodiments of the present invention are not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the embodiments of the present invention. Therefore, although the embodiments of the present invention are described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.
Claims
1. A motor deceleration control method, applicable to a motion controller controlling a servo drive, wherein the servo drive is used to drive a motor, and the motor is used to drive a mechanical arm to move, characterized in that: include: When receiving a deceleration instruction, entering a planned period, the duration of which is pre-set; In the planning period, according to the current motion plan and the duration of the planning period, the first speed of the motor and the execution time of the deceleration plan at the end of the planning period are determined, and the deceleration plan is generated according to the first speed, the allowed stop speed of the motor and the deceleration of the motor; the allowed stop speed of the motor and the deceleration of the motor are set in advance, and the deceleration plan includes a plurality of slices corresponding to continuous time nodes, each of the slices includes the speed of the motor at the corresponding time node and the motion position of the robot arm at the corresponding time node, and the allowed stop speed is the minimum speed of the motor when it is allowed to stop outputting pulses to the motor; When the execution time is reached, the servo driver is controlled to output pulses to the motor according to the deceleration plan until a preset condition is reached, wherein the preset condition is that the rotation speed of the motor is less than or equal to the allowable stop rotation speed.
2. A motor deceleration control method according to claim 1, characterized in that: The step of generating the deceleration plan according to the first speed, the allowable stop speed of the motor, and the deceleration of the motor includes: Determining a duration of the deceleration plan according to the first speed, the allowable stop speed, and the deceleration; A deceleration plan is generated according to the first rotational speed, the allowable stopping rotational speed, the duration, and the motion trajectory of the robotic arm.
3. A motor deceleration control method according to claim 1, characterized in that: When the execution time is reached, the servo driver is controlled to output pulses to the motor according to the deceleration plan until a preset condition is met, including: When the execution time is reached, the servo driver is controlled to output pulses to the motor according to the rotation speed and movement position corresponding to the slices in the deceleration plan, until the preset conditions are met.
4. A motor deceleration control method according to claim 1, characterized in that: When the execution time is reached, the slices in the deceleration plan are added to the motion buffer queue.
5. A motor deceleration control device, suitable for controlling a motion controller of a servo drive, wherein the servo drive is used to drive a motor, and the motor is used to drive a mechanical arm to move, characterized in that: include: An instruction receiving module, used for entering a planned period when a deceleration instruction is received, wherein the duration of the planned period is pre-set; A deceleration planning module, used to determine, within the planning period, according to the current motion plan and the duration of the planning period, the first speed of the motor and the execution time of the deceleration plan at the end of the planning period, and to generate the deceleration plan according to the first speed, the allowed stop speed of the motor and the deceleration of the motor; the allowed stop speed of the motor and the deceleration of the motor are set in advance, the deceleration plan includes a plurality of slices corresponding to continuous time nodes, each of the slices includes the speed of the motor at the corresponding time node and the motion position of the manipulator at the corresponding time node, and the allowed stop speed is the minimum speed of the motor when it is allowed to stop outputting pulses to the motor; A pulse output module is used to control the servo driver to output pulses to the motor according to the deceleration plan when the execution time is reached until a preset condition is met, wherein the preset condition is that the speed of the motor is less than or equal to the allowable stopping speed.
6. A motor deceleration control device according to claim 5, characterized in that: The deceleration planning module includes: a duration determination submodule, configured to determine the duration of the deceleration plan according to the first speed, the allowable stop speed and the deceleration; A deceleration planning submodule is used to generate a deceleration plan according to the first rotational speed, the allowable stopping rotational speed, the duration and the motion trajectory of the robotic arm.
7. A motor deceleration control device according to claim 5, characterized in that: The pulse output module is specifically used to control the servo driver to output pulses to the motor according to the rotation speed and movement position corresponding to the slices in the deceleration plan when the execution time is reached, until the preset conditions are met.
8. A motion controller, characterized in that: The motion controller includes a processor and a memory; The memory is used to store a computer program and transmit the computer program to the processor; The processor is used to execute a motor deceleration control method according to any one of claims 1 to 4 according to instructions in the computer program.
9. A storage medium storing computer executable instructions, characterized in that: The computer executable instructions are used to execute a motor deceleration control method according to any one of claims 1 to 4 when executed by a computer processor.
Citation Information
Patent Citations
Spatial smooth stop control method applied to six-axis mechanical arm
CN107598921A
