Servo control method and device of encoder direct current motor, terminal and storage medium

By simplifying the servo control algorithm of the encoder DC motor, the problem of complex computing power of DC servo motor controllers is solved, and low-cost and high-efficiency transmission device control is achieved.

CN118971685APending Publication Date: 2024-11-15SHIJIAZHUANG YULIAN VIDEO CONTROL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411062926.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In existing technologies, the controllers for DC servo motors have complex computing power requirements, high costs, and large size, making them unsuitable for controlling the transmission devices of highway toll collection robots.

Method used

Servo control is achieved by using an encoder-controlled DC motor, which simplifies the three-loop control algorithm of the servo motor by eliminating the current loop and improving the control methods of the position and speed loops. The encoder-controlled DC motor is small in size and low in cost.

Benefits of technology

This reduces the computing power requirements and cost of the controller while maintaining high control performance, meeting the real-time and dynamic response requirements of the transmission device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118971685A_ABST
    Figure CN118971685A_ABST
Patent Text Reader

Abstract

The invention provides a servo control method and device for an encoder direct current motor, a terminal and a storage medium, and relates to the field of servo control. The method comprises the following steps: acquiring the current running speed of a direct current motor of a target encoder, and acquiring an accumulated running step number in a current action completion period after running for a preset duration at the current running speed; according to the accumulative operation step number and the total operation step number, the remaining step number is determined; judging whether the residual step number is greater than a preset braking step number; if the remaining step number is smaller than the preset braking step number, the target encoder direct current motor is controlled to brake at the preset minimum speed until the remaining step number of the target encoder direct current motor in the current action completion period is reset; if the remaining step number is larger than the braking step number, the current operation speed is updated according to the current operation speed and the preset minimum speed, and the step of obtaining the current operation speed of the target encoder direct current motor is returned to continue to be executed. The control algorithm can be simplified, and the computing power demand of the controller is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of servo control, and in particular to a servo control method, device, terminal and storage medium for an encoder DC motor. Background Art

[0002] At present, the control of encoder DC motors mainly adopts PID control and simple feedback control.

[0003] (1) PID controller is not a model-based control mode, which can save energy and time to establish complex mathematical models. The disadvantage of PID controller is that it can only be applied to relatively simple applications and cannot control more complex objects with large inertia and lag. The disadvantages are as follows: 1. The initial error of PID control may be large, which may easily cause overshoot. The method of PID control error is unreasonable; 2. The differential signal of the error is not generated well; 3. The introduction of error integral feedback has side effects. 4. The algorithm is complex and occupies a large amount of computing resources.

[0004] (2) Simple feedback control: The advantage of simple feedback control is that it controls according to the deviation, has the ability to suppress the influence of any internal and external disturbances on the controlled quantity, has high control accuracy, simple algorithm, and occupies less resources. Its main disadvantage is the time lag problem, that is, there may be a time delay from the discovery of the deviation to the taking of corrective measures. When the correction is made, the actual situation may have changed greatly, and the loss is often already caused.

[0005] At present, the transmission control of highway toll robots has put forward very high requirements on the real-time and dynamic response of the transmission action. Some manufacturers have adopted the control scheme of DC servo motors, which meets the requirements in terms of real-time and dynamic response performance. However, the control scheme of DC servo motors involves the control of current loops, position loops and speed loops, which increases the complexity of the controller's computing power requirements. In addition, the motors and controllers are expensive and large in size, making them unsuitable for full promotion. Summary of the invention

[0006] The present application provides a servo control method, device, terminal and storage medium for an encoder DC motor to solve the problem of complex controller computing power requirements when a DC servo motor is used to control the movement of a transmission device in the prior art.

[0007] In a first aspect, the present application provides a servo control method of an encoder DC motor, which is applied to a transmission device, wherein the transmission device includes the encoder DC motor, and the method includes:

[0008] Obtaining the current running speed of the target encoder DC motor, and obtaining the cumulative running steps of the target encoder DC motor in the current action completion cycle after the DC motor runs at the current running speed for a preset time;

[0009] Determine the remaining number of steps of the target encoder DC motor in the current action completion cycle according to the accumulated number of operation steps and the total number of operation steps of the target encoder DC motor in one action completion cycle;

[0010] Determine whether the remaining number of steps is greater than the preset number of braking steps of the target encoder DC motor;

[0011] If the remaining number of steps is less than the preset number of braking steps, the target encoder DC motor is controlled to brake at a preset minimum speed until the remaining number of steps of the target encoder DC motor in the current action completion cycle is cleared;

[0012] If the remaining number of steps is greater than the number of braking steps, the current running speed is updated according to the current running speed and the preset minimum speed, and the step of obtaining the current running speed of the target encoder DC motor is returned to continue execution.

[0013] In a second aspect, the present application provides a servo control device for an encoder DC motor, which is applied to a transmission device, wherein the transmission device includes the encoder DC motor, and the device includes:

[0014] An acquisition module is used to acquire the current running speed of the target encoder DC motor, and acquire the cumulative running steps of the target encoder DC motor in the current action completion cycle after the DC motor runs at the current running speed for a preset time;

[0015] A remaining step number determination module is used to determine the remaining number of steps of the target encoder DC motor in a current action completion cycle according to the accumulated running number of steps and the total running number of the target encoder DC motor in one action completion cycle;

[0016] A judging module, used for judging whether the remaining number of steps is greater than a preset number of braking steps of the target encoder DC motor;

[0017] A step number clearing module, used for controlling the target encoder DC motor to brake at a preset minimum speed if the remaining number of steps is less than the preset number of braking steps, until the remaining number of steps of the target encoder DC motor in the current action completion cycle is cleared;

[0018] The speed update module is used to update the current running speed according to the current running speed and the preset minimum speed if the remaining number of steps is greater than the braking number of steps, and return to the step of obtaining the current running speed of the target encoder DC motor to continue execution.

[0019] In a third aspect, the present application provides a terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the first aspect or any possible implementation of the first aspect are implemented.

[0020] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method described in the first aspect or any possible implementation of the first aspect.

[0021] The present application provides a servo control method, device, terminal and storage medium of an encoder DC motor, which are applied to a transmission device, wherein the transmission device includes an encoder DC motor, and the method obtains the current running speed of a target encoder DC motor, and obtains the cumulative running steps of the target encoder DC motor in a current action completion cycle after running at the current running speed for a preset time; determines the remaining steps of the target encoder DC motor in the current action completion cycle according to the cumulative running steps and the total running steps of the target encoder DC motor in one action completion cycle; judges whether the remaining steps are greater than the preset braking steps of the target encoder DC motor; if the remaining steps are less than the preset braking steps, controls the target encoder DC motor to brake at a preset minimum speed until the remaining steps of the target encoder DC motor in the current action completion cycle are cleared; if the remaining steps are greater than the braking steps, updates the current running speed according to the current running speed and the preset minimum speed, and returns to the step of obtaining the current running speed of the target encoder DC motor to continue execution. This application simplifies the FOC control algorithm of the servo motor's three loops (current loop, position loop and speed loop), removes the current loop, and improves the control methods of the position loop and speed loop. On the basis of maintaining low cost and control effect, the control algorithm is simplified, the controller computing power requirements are reduced, and the use of a small and low-cost encoder DC motor also reduces the cost of the controller. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] 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 creative labor.

[0023] Figure 1 is a flow chart of an implementation of a servo control method for an encoder DC motor provided in an embodiment of the present application;

[0024] Figure 2is an execution flow chart of the servo control method of the encoder DC motor provided in an embodiment of the present application;

[0025] Figure 3 It is a structural schematic diagram of a servo control device for an encoder DC motor provided in an embodiment of the present application;

[0026] Figure 4 It is a schematic diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0028] In order to make the purpose, technical solutions and advantages of the present application clearer, specific embodiments will be described below in conjunction with the accompanying drawings.

[0029] In order to solve the high requirements of the transmission device control of the highway toll robot for the real-time and dynamic response of the transmission device action, some manufacturers directly use DC servo motors for control. Although this solution meets the requirements in terms of real-time and dynamic response performance, the DC servo motor increases the complexity of the controller's computing power requirements, and the motor and controller are expensive and large in size, which is not suitable for full promotion. The embodiment of the present application uses a small and low-cost encoder DC motor to replace the DC servo motor in the transmission device for servo control. Its control algorithm is simplified on the basis of the servo motor three-loop (current loop, position loop and speed loop) FOC control algorithm, removes the current loop, and improves the control method of the position loop and speed loop. On the basis of maintaining low cost and control effect, the control algorithm is simplified, the controller computing power requirements are reduced, and the cost of the controller is also reduced.

[0030] Among them, the transmission device in the embodiment of the present application may include but is not limited to: a robotic arm, a screw telescopic card transport mechanism of a toll robot, a belt lifting card transport mechanism of a toll robot, a screw lifting mechanism of an automatic height limiting device, etc.

[0031] In this embodiment, the encoder DC motor can be a photoelectric encoder DC motor, a magnetic encoder DC motor, a unipolar encoder DC motor, an orthogonal encoder DC motor, etc., or other selections can be made according to actual needs, but the selection of the encoder DC motor requires that its function is to rotate the motor shaft from the zero point to the current rotation angle as the motor rotates.

[0032] For encoder DC motors, it is necessary to know the maximum speed V of the corresponding encoder DC motor in advance. max , minimum speed V min , acceleration interval time (i.e. preset duration) ΔTa, current running speed V N , the remaining steps S r , deceleration step ΔS, braking step number S b and braking time T b .

[0033] Among them, the maximum speed V max and minimum speed V min Both can be set to a value ranging from 0 to 9.

[0034] Figure 1 The implementation flow chart of the servo control method of the encoder DC motor provided in the embodiment of the present application is described in detail as follows:

[0035] In step 101, the current running speed of the target encoder DC motor is obtained, and the cumulative running steps of the target encoder DC motor in the current action completion cycle after running at the current running speed for a preset time are obtained.

[0036] In the embodiment of the present application, the current running speed V of the target encoder DC motor is obtained from the memory controlled by the target encoder DC motor. N Then control the target encoder to run at the current speed V N After running for a preset time ΔTa, the cumulative number of running steps in the current action completion cycle is obtained from the memory controlled by the target encoder DC motor, that is, the number of steps run by the target encoder DC motor from starting to running for a preset time ΔTa in the current action completion cycle.

[0037] In step 102, the remaining number of steps of the target encoder DC motor in the current action completion cycle is determined according to the accumulated number of operation steps and the total number of operation steps of the target encoder DC motor in one action completion cycle.

[0038] In the embodiment of the present application, the total number of running steps of the target encoder DC motor in one action completion cycle is first determined, wherein one action completion cycle refers to the running cycle length of the encoder DC motor corresponding to the completion of one action by the transmission device. Then, the target encoder DC motor obtained in step 101 is used to run at the current running speed V N The remaining steps of the target encoder DC motor in the current action completion cycle are determined by the accumulated running steps and the total running steps in the current action completion cycle after running for a preset time ΔTa.

[0039] In a possible implementation, determining the remaining number of steps of the target encoder DC motor in the current action completion cycle according to the accumulated number of running steps and the total number of running steps of the target encoder DC motor in one action completion cycle may include:

[0040] The difference between the total running steps and the accumulated running steps is calculated as the remaining steps.

[0041] Optionally, the difference between the total running steps and the accumulated running steps is used as the remaining steps, and the calculation formula can be:

[0042] S r =S o -S c

[0043] Among them, S r is the number of remaining steps, S o is the total number of running steps, S c is the cumulative number of running steps.

[0044] In step 103, it is determined whether the remaining number of steps is greater than the preset number of braking steps of the encoder DC motor.

[0045] In the embodiment of the present application, after determining the remaining number of steps of the target encoder DC motor in the current action completion cycle and the known preset number of braking steps of the target encoder DC motor, it is determined whether the remaining number of steps is greater than the preset number of braking steps. The purpose is to determine whether the target encoder DC motor needs to enter the braking period at the current moment.

[0046] In step 104, if the remaining number of steps is less than the preset number of braking steps, the target encoder DC motor is controlled to brake at a preset minimum speed until the remaining number of steps of the target encoder DC motor in the current action completion cycle is cleared.

[0047] In the embodiment of the present application, if the remaining number of steps S r Less than the preset number of braking steps S b , that is, S r b , then the current running speed of the target encoder DC motor is controlled to become the preset minimum speed, that is, V N =V min and at a preset minimum speed V min The braking action is executed until the remaining steps of the target encoder DC motor in the current action completion cycle are reset to zero.

[0048] It should be noted that the embodiment of the present application controls the current operating speed of the target encoder DC motor to directly drop to a preset minimum speed, but for the motor, this is a speed reduction process, and the number of running steps is also during the speed reduction process.

[0049] ​In step 105, if the remaining number of steps is greater than the number of braking steps, the current running speed is updated according to the current running speed and the preset minimum speed, and the process returns to the step of obtaining the current running speed of the target encoder DC motor to continue execution.

[0050] In the embodiment of the present application, if the remaining number of steps S r Greater than the preset number of braking steps S b , that is, S r >S b , then use the current running speed V of the target encoder DC motor N and preset minimum speed V min Update the current running speed V N , and returns to obtain the current running speed step and continues to execute until the remaining steps are less than the preset braking steps.

[0051] In a possible implementation, updating the current running speed according to the current running speed and the preset minimum speed may include:

[0052] Determine whether the current running speed is less than the reference speed threshold;

[0053] If the current running speed is less than the reference speed threshold, the current running speed is updated using the sum of the current running speed and the preset speed;

[0054] If the current running speed is greater than the reference speed threshold, the current running speed is reduced to the preset minimum speed.

[0055] Optionally, determine whether the current running speed of the target encoder DC motor is less than a reference speed threshold. If so, update the current running speed using the sum of the current running speed and a preset speed; if so, reduce the current running speed to a preset minimum speed of the target encoder DC motor.

[0056] For example, the preset maximum speed V max The value range is 0 to 9, and the minimum speed is V min The value range is 0 to 9, and the current running speed is V N , the preset speed is 1, then if the current running speed is less than the reference speed threshold, the current running speed is V N The sum of the preset speed 1 updates the current running speed, that is, V N =V N +1. If the current running speed is greater than the reference speed threshold, the current running V N Reduce speed to the preset minimum speed V min , that is, V N =V min .

[0057] In a possible implementation, before determining whether the current running speed is less than the reference speed threshold, the method may further include:

[0058] The ratio of the remaining number of steps to the preset speed reduction step of the target encoder DC motor is calculated as the reference speed threshold.

[0059] The speed reduction step is the number of steps required to reduce the speed from the preset maximum speed to the preset minimum speed. For example, in the process of reducing from 6 speed to 1 speed, first reduce from 6 speed to 5 speed, there is a speed reduction step, then reduce from 5 speed to 4 speed, and then take another speed reduction step until the speed is reduced to 1 speed.

[0060] Optionally, the reference speed threshold of this embodiment is related to the remaining number of steps S r It is related to the preset speed reduction step ΔS, that is, the remaining number of steps is S r / ΔS.

[0061] In a possible implementation, reducing the current running speed to a preset minimum speed may include:

[0062] Update the current running speed using the reference speed threshold;

[0063] The target encoder DC motor is controlled to decelerate to a preset minimum speed according to a preset deceleration step of the target encoder DC motor at the updated current running speed.

[0064] Optionally, the current running speed is first updated with the reference speed threshold, and the current running speed after the first update is used as the first speed. Then, the target encoder DC motor is controlled to decrease to a preset minimum speed at the first speed according to a preset deceleration step of the target encoder DC motor. The number of running steps will also appear during the deceleration process.

[0065] In a possible implementation, before determining whether the current running speed is less than the reference speed threshold, the method may further include:

[0066] Determine whether the current running speed is greater than the preset maximum speed of the target encoder DC motor;

[0067] If the current running speed is greater than the preset maximum speed, the preset maximum speed is used to update the current running speed;

[0068] If the current running speed is less than the preset maximum speed, the step of determining whether the current running speed is less than a reference speed threshold is executed.

[0069] Optionally, before determining whether the current running speed is less than the reference speed threshold, it is also necessary to determine the magnitude relationship between the current running speed and the preset maximum speed. If the current running speed is greater than the preset maximum speed, if the speed is not reduced, due to the poor dynamic response characteristics of ordinary DC motors, it is easy to fail to brake and crash. Therefore, it is necessary to use the preset maximum preset speed to update the current maximum speed, and then perform the remaining steps and braking steps. If the current running speed is less than the preset maximum speed, the size determination step of the current running speed and the reference speed threshold is performed.

[0070] Reference Figure 2 , is an execution flow chart of an embodiment of the present application, which is as follows:

[0071] The first step is to obtain the current running speed V of the target encoder DC motor N .

[0072] The second step is to control the target encoder DC motor to run at the current speed V N After running for a preset time ΔTa, the cumulative number of running steps S of the target encoder DC motor in the current action completion cycle is obtained c .

[0073] The third step is to calculate the difference between the total number of running steps and the cumulative number of running steps of the target encoder DC motor in one action completion cycle as the remaining number of steps S of the target encoder DC motor in the current action completion cycle. r .

[0074] The fourth step is to determine the remaining number of steps S r Is it greater than the preset braking step number S of the target encoder DC motor? b If it is less than, go to step 10; if it is greater, go to step 5.

[0075] The fifth step is to determine the current running speed V N Is it greater than the preset maximum speed V of the target encoder DC motor? max , if it is greater, go to step 9, if it is less, go to step 6.

[0076] Step 6: Determine the current running speed V N Is it less than the reference speed threshold, where the reference speed threshold is the ratio of the remaining steps to the preset speed reduction step of the target encoder DC motor, that is, S r / ΔS, if it is less than, go to step 7, if it is greater, go to step 8.

[0077] The seventh step is to use the current running speed V N Update the current running speed, i.e. V, by summing it with the preset speed v1 N =V N+v1, where v1 can be 1, and go to the first step to continue execution.

[0078] The eighth step is to use the reference speed threshold S r / ΔS Update current running speed V N After that, the target encoder DC motor is controlled to run at the updated current speed S r / ΔSDecelerate to the preset minimum speed V according to the preset deceleration step ΔS min , and return to the first step to continue execution.

[0079] The ninth step is to use the preset maximum speed V max Update the current running speed V N , that is, V N =V max , and return to the first step to continue execution.

[0080] Step 10: Use the preset minimum speed V min Update the current running speed V N , that is, V N =V min , and controls the target encoder DC motor to a preset minimum speed V min The braking action is executed until the remaining steps of the target encoder DC motor in the current action completion cycle are cleared, that is, S r =0.

[0081] The present application provides a servo control method for an encoder DC motor, which is applied to a transmission device, wherein the transmission rod device includes an encoder DC motor. The method obtains the current running speed of the target encoder DC motor and the cumulative running steps of the target encoder DC motor in a current action completion cycle after the target encoder DC motor runs at the current running speed for a preset time; determines the remaining steps of the target encoder DC motor in the current action completion cycle according to the cumulative running steps and the total running steps of the target encoder DC motor in one action completion cycle; determines whether the remaining steps are greater than the preset braking steps of the target encoder DC motor; if the remaining steps are less than the preset braking steps, controls the target encoder DC motor to brake at a preset minimum speed until the remaining steps of the target encoder DC motor in the current action completion cycle are cleared; if the remaining steps are greater than the braking steps, updates the current running speed according to the current running speed and the preset minimum speed, and returns to the step of obtaining the current running speed of the target encoder DC motor to continue execution. This application simplifies the FOC control algorithm of the servo motor's three loops (current loop, position loop and speed loop), removes the current loop, and improves the control methods of the position loop and speed loop. On the basis of maintaining low cost and control effect, the control algorithm is simplified, the controller computing power requirements are reduced, and the use of a small and low-cost encoder DC motor also reduces the cost of the controller.

[0082] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0083] The following is an embodiment of the device of the present application. For details not described in detail, please refer to the corresponding method embodiment described above.

[0084] Figure 3 The structure diagram of the servo control device of the encoder DC motor provided in the embodiment of the present application is shown. For the convenience of description, only the part related to the embodiment of the present application is shown, which is described in detail as follows:

[0085] like Figure 3 As shown, the servo control device 3 of the encoder DC motor is applied to the transmission device, the transmission device includes the encoder DC motor, and the device 3 includes:

[0086] The acquisition module 31 is used to acquire the current running speed of the target encoder DC motor, and acquire the cumulative running steps of the target encoder DC motor in the current action completion cycle after the target encoder DC motor runs at the current running speed for a preset time;

[0087] The remaining step number determination module 32 is used to determine the remaining step number of the target encoder DC motor in the current action completion cycle according to the accumulated running step number and the total running step number of the target encoder DC motor in one action completion cycle;

[0088] A judging module 33 is used to judge whether the remaining number of steps is greater than a preset number of braking steps of the target encoder DC motor;

[0089] The step number clearing module 34 is used to control the target encoder DC motor to brake at a preset minimum speed if the remaining step number is less than the preset braking step number, until the remaining step number of the target encoder DC motor in the current action completion cycle is cleared;

[0090] The speed update module 35 is used to update the current running speed according to the current running speed and the preset minimum speed if the remaining number of steps is greater than the number of braking steps, and return to the step of obtaining the current running speed of the target encoder DC motor to continue execution.

[0091] The present application provides a servo control device for an encoder DC motor, which is applied to a transmission device, wherein the transmission device includes an encoder DC motor. The device obtains the current running speed of a target encoder DC motor and the cumulative running steps of the target encoder DC motor in a current action completion cycle after the target encoder DC motor runs at the current running speed for a preset time; determines the remaining steps of the target encoder DC motor in the current action completion cycle according to the cumulative running steps and the total running steps of the target encoder DC motor in one action completion cycle; determines whether the remaining steps are greater than the preset braking steps of the target encoder DC motor; if the remaining steps are less than the preset braking steps, controls the target encoder DC motor to brake at a preset minimum speed until the remaining steps of the target encoder DC motor in the current action completion cycle are cleared; if the remaining steps are greater than the braking steps, updates the current running speed according to the current running speed and the preset minimum speed, and returns to the step of obtaining the current running speed of the target encoder DC motor to continue execution. This application simplifies the FOC control algorithm of the servo motor's three loops (current loop, position loop and speed loop), removes the current loop, and improves the control methods of the position loop and speed loop. On the basis of maintaining low cost and control effect, the control algorithm is simplified, the controller computing power requirements are reduced, and the use of a small and low-cost encoder DC motor also reduces the cost of the controller.

[0092] In a possible implementation, the remaining step number determination module may be used to:

[0093] The difference between the total running steps and the accumulated running steps is calculated as the remaining steps.

[0094] In one possible implementation, the speed update module may be used to:

[0095] Determine whether the current running speed is less than the reference speed threshold;

[0096] If the current running speed is less than the reference speed threshold, the current running speed is updated using the sum of the current running speed and the preset speed;

[0097] If the current running speed is greater than the reference speed threshold, the current running speed is reduced to the preset minimum speed.

[0098] In a possible implementation, the speed update module may also be used to:

[0099] Update the current running speed using the reference speed threshold;

[0100] The target encoder DC motor is controlled to decelerate to a preset minimum speed according to a preset deceleration step of the target encoder DC motor at the updated current running speed.

[0101] In a possible implementation, the speed update module may also be used to:

[0102] The ratio of the remaining number of steps to the preset speed reduction step of the target encoder DC motor is calculated as the reference speed threshold.

[0103] In a possible implementation, the speed update module may also be used to:

[0104] Determine whether the current running speed is greater than the preset maximum speed of the target encoder DC motor;

[0105] If the current running speed is greater than the preset maximum speed, the preset maximum speed is used to update the current running speed;

[0106] If the current running speed is less than the preset maximum speed, the step of determining whether the current running speed is less than a reference speed threshold is executed.

[0107] In a possible implementation, the target encoder DC motor may be a photoelectric encoder DC motor, a magnetic encoder DC motor, a unipolar encoder DC motor, or an orthogonal encoder DC motor.

[0108] Figure 4 is a schematic diagram of a terminal provided in an embodiment of the present application. Figure 4 As shown, the terminal 4 of this embodiment includes: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, the steps in the above-mentioned servo control method embodiments of the encoder DC motor are implemented, for example Figure 1 Alternatively, when the processor 40 executes the computer program 42, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 3 The functions of each module are shown.

[0109] Exemplarily, the computer program 42 may be divided into one or more modules / units, which are stored in the memory 41 and executed by the processor 40 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 42 in the terminal 4. For example, the computer program 42 may be divided into Figure 3 The modules shown.

[0110] The terminal 4 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 4 may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will appreciate that Figure 4It is only an example of terminal 4 and does not constitute a limitation on terminal 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.

[0111] The processor 40 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.

[0112] The memory 41 may be an internal storage unit of the terminal 4, such as a hard disk or memory of the terminal 4. The memory 41 may also be an external storage device of the terminal 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the terminal 4. The memory 41 is used to store the computer program and other programs and data required by the terminal. The memory 41 may also be used to temporarily store data that has been output or is to be output.

[0113] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

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

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

[0116] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only 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.

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

[0118] In addition, each functional unit in each embodiment of the present application 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.

[0119] If the integrated module / 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 process in the above-mentioned embodiment method, and can also 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 servo control method embodiment of each encoder DC motor 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 may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable media does not include electrical carrier signals and telecommunication signals.

[0120] 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 control method for an encoder DC motor, It is characterized in that Applied to a transmission device, the transmission device includes the encoder DC motor, and the method includes: Obtaining the current running speed of the target encoder DC motor, and obtaining the cumulative running steps of the target encoder DC motor in the current action completion cycle after the DC motor runs at the current running speed for a preset time; Determine the remaining number of steps of the target encoder DC motor in the current action completion cycle according to the accumulated number of operation steps and the total number of operation steps of the target encoder DC motor in one action completion cycle; Determine whether the remaining number of steps is greater than the preset number of braking steps of the target encoder DC motor; If the remaining number of steps is less than the preset number of braking steps, the target encoder DC motor is controlled to brake at a preset minimum speed until the remaining number of steps of the target encoder DC motor in the current action completion cycle is cleared; If the remaining number of steps is greater than the number of braking steps, the current running speed is updated according to the current running speed and the preset minimum speed, and the step of obtaining the current running speed of the target encoder DC motor is returned to continue execution.

2. The servo control method of the encoder DC motor according to claim 1, It is characterized in that Determining the remaining number of steps of the target encoder DC motor in the current action completion cycle according to the accumulated number of operation steps and the total number of operation steps of the target encoder DC motor in one action completion cycle includes: The difference between the total number of running steps and the accumulated number of running steps is calculated as the remaining number of steps.

3. The servo control method of the encoder DC motor according to claim 1, It is characterized in that The updating of the current running speed according to the current running speed and the preset minimum speed includes: Determine whether the current running speed is less than the reference speed threshold; If the current running speed is less than the reference speed threshold, the current running speed is updated using the sum of the current running speed and the preset speed; If the current running speed is greater than the reference speed threshold, the current running speed is reduced to the preset minimum speed.

4. The servo control method of the encoder DC motor according to claim 3, It is characterized in that The reducing the current running speed to the preset minimum speed comprises: Updating the current running speed using the reference speed threshold; The target encoder DC motor is controlled to decelerate to the preset minimum speed according to the preset deceleration step of the target encoder DC motor at the updated current running speed.

5. The servo control method of the encoder DC motor according to claim 3, It is characterized in that Before determining whether the current running speed is less than the reference speed threshold, the method further includes: The ratio of the remaining number of steps to the preset speed reduction step of the target encoder DC motor is calculated as the reference speed threshold.

6. The servo control method of the encoder DC motor according to claim 3, It is characterized in that Before determining whether the current running speed is less than the reference speed threshold, the method further includes: Determine whether the current running speed is greater than the preset maximum speed of the target encoder DC motor; If the current running speed is greater than the preset maximum speed, the preset maximum speed is used to update the current running speed; If the current running speed is less than the preset maximum speed, the step of determining whether the current running speed is less than a reference speed threshold is performed.

7. The servo control method of the encoder DC motor according to claim 1, It is characterized in that The target encoder DC motor is a photoelectric encoder DC motor, a magnetic encoder DC motor, a unipolar encoder DC motor or an orthogonal encoder DC motor.

8. A servo control device for an encoder DC motor, It is characterized in that Applied to a transmission device, the transmission device includes the encoder DC motor, and the device includes: An acquisition module is used to acquire the current running speed of the target encoder DC motor, and acquire the cumulative running steps of the target encoder DC motor in the current action completion cycle after the DC motor runs at the current running speed for a preset time; A remaining step number determination module is used to determine the remaining number of steps of the target encoder DC motor in a current action completion cycle according to the accumulated running number of steps and the total running number of the target encoder DC motor in one action completion cycle; A judging module, used for judging whether the remaining number of steps is greater than a preset number of braking steps of the target encoder DC motor; A step number clearing module, used for controlling the target encoder DC motor to brake at a preset minimum speed if the remaining number of steps is less than the preset number of braking steps, until the remaining number of steps of the target encoder DC motor in the current action completion cycle is cleared; The speed update module is used to update the current running speed according to the current running speed and the preset minimum speed if the remaining number of steps is greater than the braking number of steps, and return to the step of obtaining the current running speed of the target encoder DC motor to continue execution.

9. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the servo control method for the encoder DC motor as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the servo control method for an encoder DC motor as described in any one of claims 1 to 7 are implemented.