Servo motor drive control method, servo motor drive control device, electronic equipment and storage medium

文档序号:1190306 发布日期:2020-08-28 浏览:6次 中文

阅读说明:本技术 伺服电机驱动控制方法、装置、电子设备及存储介质 (Servo motor drive control method, servo motor drive control device, electronic equipment and storage medium ) 是由 卓国熙 于 2020-06-08 设计创作,主要内容包括:本申请提供了一种伺服电机驱动控制方法、装置、电子设备及存储介质。该伺服电机驱动控制方法,包括以下步骤:获取所述伺服电机的目标转速;根据所述目标转速获取对应输出给所述伺服电机的第一驱动电压,并采用所述第一驱动电压对所述伺服电机进行驱动;获取所述伺服电机在第一驱动电压的驱动下的第一实际转速以及第一实际电流值;根据所述第一实际转速、所述第一实际电流值以及所述第一驱动电压计算出目标驱动电压,以使得所述伺服电机达到所述目标转速。本申请可以提高转速的精确度,避免由于伺服电机老化造成的误差。(The application provides a servo motor drive control method and device, electronic equipment and a storage medium. The servo motor drive control method comprises the following steps: acquiring a target rotating speed of the servo motor; acquiring a first driving voltage correspondingly output to the servo motor according to the target rotating speed, and driving the servo motor by adopting the first driving voltage; acquiring a first actual rotating speed and a first actual current value of the servo motor under the drive of a first drive voltage; and calculating a target driving voltage according to the first actual rotating speed, the first actual current value and the first driving voltage so that the servo motor reaches the target rotating speed. The application can improve the accuracy of the rotating speed and avoid errors caused by aging of the servo motor.)

1. A servo motor drive control method is characterized by comprising the following steps:

acquiring a target rotating speed of the servo motor;

acquiring a first driving voltage correspondingly output to the servo motor according to the target rotating speed, and driving the servo motor by adopting the first driving voltage;

acquiring a first actual rotating speed and a first actual current value of the servo motor under the drive of a first drive voltage;

and calculating a target driving voltage according to the first actual rotating speed, the first actual current value and the first driving voltage so that the servo motor reaches the target rotating speed.

2. The servo motor drive control method according to claim 1, wherein the step of calculating a target drive voltage from the first actual rotation speed, the first actual current value, and the first drive voltage so that the servo motor reaches the target rotation speed includes:

calculating a rotation speed difference value according to the first actual rotation speed and the target rotation speed;

calculating the aging degree of the servo motor according to the first actual current value, the first driving voltage and the rotation speed difference value to obtain a corresponding aging degree coefficient;

and optimizing the first driving voltage according to the aging degree coefficient to obtain a target driving voltage.

3. The servo motor drive control method according to claim 2, wherein the step of calculating the degree of aging of the servo motor from the first actual current value, the first drive voltage, and the rotation speed difference value to obtain a corresponding degree of aging coefficient comprises:

acquiring a preset network model;

and inputting the first actual current value, the first driving voltage and the rotating speed difference value into the preset network model to obtain a corresponding aging degree coefficient.

4. The servo motor drive control method according to claim 3, wherein the step of obtaining a preset network model includes:

acquiring a historical network model;

and optimizing the historical network model according to historical data samples in a preset time period to obtain the preset network model, wherein the historical data samples comprise a plurality of data samples in the preset time period with the current time as an end point, and each data sample comprises a first actual current value, a first driving voltage, a rotating speed difference value and a corresponding aging degree coefficient.

5. The servo motor drive control method according to claim 1, wherein the acquiring of the first actual rotation speed of the servo motor under the drive of the first drive voltage includes:

acquiring a plurality of first rotating speed values uploaded by an angular speed sensor of the servo motor within a first preset time period;

and calculating a first actual rotating speed of the servo motor according to the plurality of first rotating speed values.

6. A servo motor drive control device characterized by comprising:

the first acquisition module is used for acquiring the target rotating speed of the servo motor;

the second acquisition module is used for acquiring a first driving voltage which is correspondingly output to the servo motor according to the target rotating speed and driving the servo motor by adopting the first driving voltage;

the third acquisition module is used for acquiring a first actual rotating speed and a first actual current value of the servo motor under the drive of the first drive voltage;

and the calculating module is used for calculating a target driving voltage according to the first actual rotating speed, the first actual current value and the first driving voltage so as to enable the servo motor to reach the target rotating speed.

7. The servo motor drive control of claim 6, wherein the calculation module comprises:

the first calculation unit is used for calculating a rotation speed difference value according to the first actual rotation speed and the target rotation speed;

the second calculation unit is used for calculating the aging degree of the servo motor according to the first actual current value, the first driving voltage and the rotating speed difference value so as to obtain a corresponding aging degree coefficient;

and the optimization unit is used for optimizing the first driving voltage according to the aging degree coefficient so as to obtain a target driving voltage.

8. The servo motor drive control device according to claim 7, wherein the optimization unit is configured to: acquiring a preset network model; and inputting the first actual current value, the first driving voltage and the rotating speed difference value into the preset network model to obtain a corresponding aging degree coefficient.

9. An electronic device comprising a processor and a memory, said memory storing computer readable instructions which, when executed by said processor, perform the steps of the method of any of claims 1-5.

10. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the steps of the method according to any one of claims 1-5.

Technical Field

The present disclosure relates to the field of servo motor control technologies, and in particular, to a servo motor drive control method and apparatus, an electronic device, and a storage medium.

Background

Servo motors, that is, permanent magnet synchronous motors are widely used in various fields as power sources for power output, for example, in the fields of automobiles, intelligent robots, and transmission mechanisms.

At present, the common driver speed control command interfaces all adopt an analog quantity command interface, that is, an upper computer linearly controls the speed of a servo motor (for example, -3000 rpm) by sending an analog quantity signal, for example, sending an analog quantity signal with a voltage value of-10V to + 10V.

Disclosure of Invention

An object of the embodiments of the present application is to provide a method and an apparatus for controlling driving of a servo motor, an electronic device, and a storage medium, which can improve accuracy of a rotational speed.

In a first aspect, an embodiment of the present application provides a servo motor drive control method, including the following steps:

acquiring a target rotating speed of the servo motor;

acquiring a first driving voltage correspondingly output to the servo motor according to the target rotating speed, and driving the servo motor by adopting the first driving voltage;

acquiring a first actual rotating speed and a first actual current value of the servo motor under the drive of a first drive voltage;

and calculating a target driving voltage according to the first actual rotating speed, the first actual current value and the first driving voltage so that the servo motor reaches the target rotating speed.

Optionally, in the servo motor drive control method according to the embodiment of the present application, the calculating a target driving voltage according to the first actual rotation speed, the first actual current value, and the first driving voltage so that the servo motor reaches the target rotation speed includes:

calculating a rotation speed difference value according to the first actual rotation speed and the target rotation speed;

calculating the aging degree of the servo motor according to the first actual current value, the first driving voltage and the rotation speed difference value to obtain a corresponding aging degree coefficient;

and optimizing the first driving voltage according to the aging degree coefficient to obtain a target driving voltage.

Optionally, in the servo motor drive control method according to the embodiment of the present application, the step of calculating an aging degree of the servo motor according to the first actual current value, the first driving voltage, and the rotation speed difference value to obtain a corresponding aging degree coefficient includes:

acquiring a preset network model;

and inputting the first actual current value, the first driving voltage and the rotating speed difference value into the preset network model to obtain a corresponding aging degree coefficient.

Optionally, in the servo motor drive control method according to the embodiment of the present application, the step of obtaining the preset network model includes:

acquiring a historical network model;

and optimizing the historical network model according to historical data samples in a preset time period to obtain the preset network model, wherein the historical data samples comprise a plurality of data samples in the preset time period with the current time as an end point, and each data sample comprises a first actual current value, a first driving voltage, a rotating speed difference value and a corresponding aging degree coefficient.

Optionally, in the servo motor drive control method according to the embodiment of the present application, the obtaining a first actual rotation speed of the servo motor under the drive of the first drive voltage includes:

acquiring a plurality of first rotating speed values uploaded by an angular speed sensor of the servo motor within a first preset time period;

and calculating a first actual rotating speed of the servo motor according to the plurality of first rotating speed values.

In a second aspect, an embodiment of the present application further provides a servo motor drive control device, including:

the first acquisition module is used for acquiring the target rotating speed of the servo motor;

the second acquisition module is used for acquiring a first driving voltage which is correspondingly output to the servo motor according to the target rotating speed and driving the servo motor by adopting the first driving voltage;

the third acquisition module is used for acquiring a first actual rotating speed and a first actual current value of the servo motor under the drive of the first drive voltage;

and the calculating module is used for calculating a target driving voltage according to the first actual rotating speed, the first actual current value and the first driving voltage so as to enable the servo motor to reach the target rotating speed.

Optionally, in the servo motor drive control device according to an embodiment of the present application, the calculation module includes:

the first calculation unit is used for calculating a rotation speed difference value according to the first actual rotation speed and the target rotation speed;

the second calculation unit is used for calculating the aging degree of the servo motor according to the first actual current value, the first driving voltage and the rotating speed difference value so as to obtain a corresponding aging degree coefficient;

and the optimization unit is used for optimizing the first driving voltage according to the aging degree coefficient so as to obtain a target driving voltage.

Optionally, in the servo motor drive control device according to an embodiment of the present application, the optimization unit is configured to: acquiring a preset network model; and inputting the first actual current value, the first driving voltage and the rotating speed difference value into the preset network model to obtain a corresponding aging degree coefficient.

In a third aspect, an embodiment of the present application further provides an electronic device, including a processor and a memory, where the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the electronic device executes the steps in any of the methods described above.

In a fourth aspect, the present application further provides a storage medium having a computer program stored thereon, where the computer program is executed by a processor to perform the steps in any of the methods described above.

As can be seen from the above, in the embodiment of the present application, the target rotation speed of the servo motor is obtained; acquiring a first driving voltage correspondingly output to the servo motor according to the target rotating speed, and driving the servo motor by adopting the first driving voltage; acquiring a first actual rotating speed and a first actual current value of the servo motor under the drive of a first drive voltage; and calculating a target driving voltage according to the first actual rotating speed, the first actual current value and the first driving voltage so that the servo motor reaches the target rotating speed, thereby realizing adjustment and control of the servo driving voltage, improving the accuracy of the rotating speed and avoiding errors caused by aging of the servo motor.

Additional features and advantages of the present application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the present application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.

Fig. 1 is a flowchart of a servo motor driving control method according to an embodiment of the present disclosure.

Fig. 2 is a schematic structural diagram of a servo motor driving control device according to an embodiment of the present disclosure.

Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.

Referring to fig. 1, fig. 1 is a flowchart illustrating a servo motor driving control method according to some embodiments of the present disclosure, the servo motor driving control method including the following steps:

and S101, acquiring the target rotating speed of the servo motor.

S102, obtaining a first driving voltage correspondingly output to the servo motor according to the target rotating speed, and driving the servo motor by adopting the first driving voltage.

S103, acquiring a first actual rotating speed and a first actual current value of the servo motor under the drive of a first drive voltage.

And S104, calculating a target driving voltage according to the first actual rotating speed, the first actual current value and the first driving voltage so that the servo motor reaches the target rotating speed.

In step S101, the target rotation speed is a value input by a user according to an actual requirement, for example, a preset gear is required during an operation of the device, and the servo motor converts the preset gear into the corresponding target rotation speed.

In step S102, a preset mapping table of the rotation speed and the driving voltage may be adopted, and after the target rotation speed is obtained, the mapping table is directly queried, so as to obtain the corresponding first driving voltage. The mapping table is obtained through multiple tests when the servo motor leaves a factory, certainly, the accuracy of the mapping table is reduced due to aging of the servo motor along with continuous use, and the first actual rotating speed deviates from the target rotating speed and is gradually increased under the driving of the first driving voltage.

In step S103, the first actual current of the servo motor is detected by a current detection circuit, but may be detected by other methods. The first actual rotating speed can be detected by a rotating speed sensor arranged on the servo motor. It will be appreciated that in some embodiments, in obtaining the first actual speed, the following steps may be taken: acquiring a plurality of first rotating speed values uploaded by an angular speed sensor of the servo motor within a first preset time period; and calculating a first actual rotating speed of the servo motor according to the plurality of first rotating speed values.

In step S104, the target driving voltage may be calculated according to a preset functional relationship or a neural network model. It will of course be appreciated that in some embodiments, this step S104 comprises: s1041, calculating a rotation speed difference value according to the first actual rotation speed and the target rotation speed; s1042, calculating the aging degree of the servo motor according to the first actual current value, the first driving voltage and the rotation speed difference value to obtain a corresponding aging degree coefficient; and S1043, optimizing the first driving voltage according to the aging degree coefficient to obtain a target driving voltage.

The aging degree coefficient is used for identifying the aging degree of the servo motor, and can be obtained by combining a first actual current value, the first driving voltage and the rotating speed difference value and calculating through a preset functional relation, or calculating by adopting a neural network model.

Wherein, the step S1042 includes the following steps: acquiring a preset network model; and inputting the first actual current value, the first driving voltage and the rotating speed difference value into the preset network model to obtain a corresponding aging degree coefficient. The preset network model is obtained by training a plurality of sample data, and each sample data comprises an actual current value, a driving voltage, a rotating speed difference value and an aging degree coefficient.

In some embodiments, the step of obtaining the preset network model includes: acquiring a historical network model; and optimizing the historical network model according to historical data samples in a preset time period to obtain the preset network model, wherein the historical data samples comprise a plurality of data samples in the preset time period with the current time as an end point, and each data sample comprises a first actual current value, a first driving voltage, a rotating speed difference value and a corresponding aging degree coefficient. Of course, other parameters may be introduced during training, and corresponding adjustment is also required when constructing the initial neural network model.

As can be seen from the above, in the embodiment of the present application, the target rotation speed of the servo motor is obtained; acquiring a first driving voltage correspondingly output to the servo motor according to the target rotating speed, and driving the servo motor by adopting the first driving voltage; acquiring a first actual rotating speed and a first actual current value of the servo motor under the drive of a first drive voltage; and calculating a target driving voltage according to the first actual rotating speed, the first actual current value and the first driving voltage so that the servo motor reaches the target rotating speed, thereby realizing adjustment and control of the servo driving voltage, improving the accuracy of the rotating speed and avoiding errors caused by aging of the servo motor.

Referring to fig. 2, fig. 2 is a schematic structural diagram of a servo motor driving control device in some embodiments of the present application. The device includes: a first obtaining module 201, a second obtaining module 202, a third obtaining module 203 and a calculating module 204.

The first obtaining module 201 is configured to obtain a target rotation speed of the servo motor; the target rotating speed is a value input by a user according to actual requirements, for example, a preset gear is required in the process of operating the equipment, and the servo motor converts the preset gear into the corresponding target rotating speed.

The second obtaining module 202 is configured to obtain a first driving voltage correspondingly output to the servo motor according to the target rotation speed and drive the servo motor by using the first driving voltage; a preset mapping table of the rotating speed and the driving voltage can be adopted, and after the target rotating speed is obtained, the mapping table is directly inquired, so that the corresponding first driving voltage can be obtained. The mapping table is obtained through multiple tests when the servo motor leaves a factory, certainly, the accuracy of the mapping table is reduced due to aging of the servo motor along with continuous use, and the first actual rotating speed deviates from the target rotating speed and is gradually increased under the driving of the first driving voltage.

The third obtaining module 203 is configured to obtain a first actual rotation speed and a first actual current value of the servo motor under the driving of the first driving voltage; the first actual current of the servo motor is detected by a current detection circuit, and may be detected by other methods. The first actual rotating speed can be detected by a rotating speed sensor arranged on the servo motor. It will be appreciated that in some embodiments, in obtaining the first actual speed, the following steps may be taken: acquiring a plurality of first rotating speed values uploaded by an angular speed sensor of the servo motor within a first preset time period; and calculating a first actual rotating speed of the servo motor according to the plurality of first rotating speed values.

The calculating module 204 is configured to calculate a target driving voltage according to the first actual rotation speed, the first actual current value, and the first driving voltage, so that the servo motor reaches the target rotation speed. The target driving voltage may be calculated according to a preset functional relationship or a neural network model. The calculation module 204 includes: the first calculation unit is used for calculating a rotation speed difference value according to the first actual rotation speed and the target rotation speed; the second calculation unit is used for calculating the aging degree of the servo motor according to the first actual current value, the first driving voltage and the rotating speed difference value so as to obtain a corresponding aging degree coefficient; and the optimization unit is used for optimizing the first driving voltage according to the aging degree coefficient so as to obtain a target driving voltage. The optimization unit is used for: acquiring a preset network model; and inputting the first actual current value, the first driving voltage and the rotating speed difference value into the preset network model to obtain a corresponding aging degree coefficient.

As can be seen from the above, in the embodiment of the present application, the target rotation speed of the servo motor is obtained; acquiring a first driving voltage correspondingly output to the servo motor according to the target rotating speed, and driving the servo motor by adopting the first driving voltage; acquiring a first actual rotating speed and a first actual current value of the servo motor under the drive of a first drive voltage; and calculating a target driving voltage according to the first actual rotating speed, the first actual current value and the first driving voltage so that the servo motor reaches the target rotating speed, thereby realizing adjustment and control of the servo driving voltage, improving the accuracy of the rotating speed and avoiding errors caused by aging of the servo motor.

Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, where the present disclosure provides an electronic device 3, including: the processor 301 and the memory 302, the processor 301 and the memory 302 being interconnected and communicating with each other via a communication bus 303 and/or other form of connection mechanism (not shown), the memory 302 storing a computer program executable by the processor 301, the computer program being executable by the processor 301 when the computing device is running to perform the method in any of the alternative implementations of the above embodiments when the processor 301 executes the computer program to perform the following functions: acquiring a target rotating speed of the servo motor; acquiring a first driving voltage correspondingly output to the servo motor according to the target rotating speed, and driving the servo motor by adopting the first driving voltage; acquiring a first actual rotating speed and a first actual current value of the servo motor under the drive of a first drive voltage; and calculating a target driving voltage according to the first actual rotating speed, the first actual current value and the first driving voltage so that the servo motor reaches the target rotating speed.

The embodiment of the present application provides a storage medium, and when being executed by a processor, the computer program performs the method in any optional implementation manner of the above embodiment. The storage medium may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.

In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.

In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.

The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种开关磁阻电机的控制方法及其系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!