Speed measurement method, speed measurement device, electronic equipment and computer readable storage medium

By accumulating pulse increments and target speed intervals for multiple servo cycles, the problem of reduced feedback speed measurement accuracy during low-speed operation of the motor is solved, and accurate tracking and control of the motor feedback speed is achieved.

CN119165189APending Publication Date: 2024-12-20SHANGHAI JIEKA ROBOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411297003.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In the prior art, when the motor is in a low-speed operating state, the resolution and accuracy of the feedback speed measurement are reduced, making it difficult to accurately measure the feedback speed of the motor.

Method used

By determining the current set of servo cycles, accumulating the pulse increments of multiple servo cycles, calculating the feedback speed of the motor, and verifying and confirming based on the target speed interval to ensure the real-time and accuracy of the feedback speed.

Benefits of technology

Improves the speed measurement accuracy when the motor is running at low speed, reduces noise, and ensures real-time tracking and control of motor speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119165189A_ABST
    Figure CN119165189A_ABST
Patent Text Reader

Abstract

The invention provides a speed measurement method, a speed measurement device, electronic equipment and a computer readable storage medium, and relates to the technical field of motor speed measurement. The method comprises the following steps: determining a current servo period set; determining a feedback speed corresponding to the current servo period set according to the operation data of each servo period in the current servo period set; and determining the feedback speed of the motor according to the target speed interval corresponding to the current servo period set and the feedback speed. By accumulating the pulse increments of the plurality of servo periods, the determination of the feedback speed of the motor is converted into the determination of the number of the servo periods participating in speed measurement, so that the speed measurement processing during low-speed operation of the motor is realized based on the pulse increments of the plurality of continuous servo periods, and in the process of calculating the feedback speed, the more the number of the adopted servo periods is, the more the feedback speed is. The smaller the time error is, the smaller the speed measurement noise is, so that the speed measurement method suitable for calculating the feedback speed of the motor in the low-speed operation state is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of motor speed measurement, and in particular to a speed measurement method, a speed measurement device, an electronic device and a computer-readable storage medium. Background Art

[0002] Feedback speed measurement is a key component in servo motor control systems, used to ensure that the motor can run accurately at the desired speed. Specifically, when the motor rotates, the encoder generates pulse information, and the controller can determine the feedback speed of the motor by counting the pulse changes in adjacent servo cycles.

[0003] However, when the motor is running at a low speed, the encoder generates fewer pulses per unit time, that is, the pulse frequency is low, and the motor is prone to noise interference such as power supply fluctuations and electromagnetic interference during operation. The above factors will lead to reduced resolution and accuracy of feedback speed measurement, so the above method is not suitable for calculating the feedback speed when the motor is running at a low speed. Summary of the invention

[0004] The purpose of the present application is to provide a speed measurement method, a speed measurement device, an electronic device and a computer-readable storage medium to address the deficiencies in the above-mentioned prior art, so as to solve the problem that the feedback speed measurement method in the prior art is not applicable when the motor is in a low-speed running state.

[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0006] In a first aspect, an embodiment of the present application provides a speed measurement method, the method comprising:

[0007] Determine a current servo cycle set, wherein the current servo cycle set includes at least one servo cycle, and the at least one servo cycle includes a current servo cycle of the motor;

[0008] Determine the feedback speed corresponding to the current servo cycle set according to the operation data of each servo cycle in the current servo cycle set;

[0009] The feedback speed of the motor is determined according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set.

[0010] As a possible implementation manner, determining the current servo cycle set includes:

[0011] If there is no previous servo cycle set, taking the set consisting of the current servo cycle as the current servo cycle set;

[0012] If there is a previous servo cycle set, the current servo cycle set is determined according to the previous servo cycle set.

[0013] As a possible implementation manner, determining the current servo cycle set according to the previous servo cycle set includes:

[0014] Determining the number of servo cycles and the earliest servo cycle in the previous servo cycle set;

[0015] Determine the quantity to be added according to the quantity of servo cycles;

[0016] The servo cycles to be added before the earliest servo cycle are added to the previous servo cycle set to obtain the current servo cycle set.

[0017] As a possible implementation, determining the feedback speed corresponding to the current servo cycle set according to the operation data of each servo cycle in the current servo cycle set includes:

[0018] Determining the sum of the pulse increments of each servo cycle in the current servo cycle set;

[0019] The ratio of the sum to the number of servo cycles in the current servo cycle set is used as the feedback speed corresponding to the current servo cycle set.

[0020] As a possible implementation, determining the feedback speed of the motor according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set includes:

[0021] If the feedback speed corresponding to the current servo cycle set is within the target speed range, the feedback speed corresponding to the current servo cycle set is used as the feedback speed of the motor;

[0022] Otherwise, the current servo cycle set is used as a new previous servo cycle set, and the new current servo cycle set and the feedback speed corresponding to the current servo cycle set are re-determined, and the feedback speed of the motor is determined according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set, and the process is iteratively executed until the feedback speed corresponding to the new current servo cycle set is within the target speed interval corresponding to the new current servo cycle set, or the number of servo cycles in the new current servo cycle set reaches a preset threshold;

[0023] If the number of servo cycles in the new current servo cycle set reaches a preset threshold, the feedback speed of the motor is determined according to the operation data of each servo cycle in the new current servo cycle set.

[0024] As a possible implementation, determining the feedback speed of the motor according to the operation data of each servo cycle in the new current servo cycle set includes:

[0025] Determine the feedback speed corresponding to the new current servo cycle set according to the operation data of each servo cycle in the new current servo cycle set;

[0026] The feedback speed corresponding to the new current servo cycle set is used as the feedback speed of the motor.

[0027] As a possible implementation, before determining the feedback speed of the motor according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set, the method further includes:

[0028] Determine a first speed interval and a second speed interval of the motor based on a preset speed measurement threshold, wherein the preset speed measurement threshold is determined according to the rated speed of the motor, and the speed in the first speed interval is less than the speed in the second speed interval;

[0029] The first speed interval of the motor is divided according to a preset division strategy to obtain a plurality of speed intervals, and a mapping relationship between each speed interval and each servo cycle set is established.

[0030] In a second aspect, an embodiment of the present application provides a speed measuring device, the device comprising:

[0031] A first determining module, configured to determine a current servo cycle set, wherein the current servo cycle set includes at least one servo cycle, and the at least one servo cycle includes a current servo cycle of the motor;

[0032] A second determination module is used to determine the feedback speed corresponding to the current servo cycle set according to the operation data of each servo cycle in the current servo cycle set;

[0033] The third determination module is used to determine the feedback speed of the motor according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set.

[0034] As a possible implementation manner, the first determining module is specifically configured to:

[0035] If there is no previous servo cycle set, taking the set consisting of the current servo cycle as the current servo cycle set;

[0036] If there is a previous servo cycle set, the current servo cycle set is determined according to the previous servo cycle set.

[0037] As a possible implementation manner, the first determining module is specifically configured to:

[0038] Determining the number of servo cycles and the earliest servo cycle in the previous servo cycle set;

[0039] Determine the quantity to be added according to the quantity of servo cycles;

[0040] The servo cycles to be added before the earliest servo cycle are added to the previous servo cycle set to obtain the current servo cycle set.

[0041] As a possible implementation manner, the second determining module is specifically configured to:

[0042] Determining the sum of the pulse increments of each servo cycle in the current servo cycle set;

[0043] The ratio of the sum to the number of servo cycles in the current servo cycle set is used as the feedback speed corresponding to the current servo cycle set.

[0044] As a possible implementation manner, the third determining module is specifically configured to:

[0045] If the feedback speed corresponding to the current servo cycle set is within the target speed range, the feedback speed corresponding to the current servo cycle set is used as the feedback speed of the motor;

[0046] Otherwise, the current servo cycle set is used as a new previous servo cycle set, and the new current servo cycle set and the feedback speed corresponding to the current servo cycle set are re-determined, and the feedback speed of the motor is determined according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set, and the process is iteratively executed until the feedback speed corresponding to the new current servo cycle set is within the target speed interval corresponding to the new current servo cycle set, or the number of servo cycles in the new current servo cycle set reaches a preset threshold;

[0047] If the number of servo cycles in the new current servo cycle set reaches a preset threshold, the feedback speed of the motor is determined according to the operation data of each servo cycle in the new current servo cycle set.

[0048] As a possible implementation manner, the third determining module is specifically configured to:

[0049] Determine the feedback speed corresponding to the new current servo cycle set according to the operation data of each servo cycle in the new current servo cycle set;

[0050] The feedback speed corresponding to the new current servo cycle set is used as the feedback speed of the motor.

[0051] As a possible implementation manner, the third determining module is further used to:

[0052] Based on a preset speed measurement threshold, determining a first speed interval and a second speed interval of the motor, wherein the preset speed measurement threshold is determined according to the rated speed of the motor, and the speed in the first speed interval is less than the speed in the second speed interval;

[0053] The first speed interval of the motor is divided according to a preset division strategy to obtain a plurality of speed intervals, and a mapping relationship between each speed interval and each servo cycle set is established.

[0054] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the speed measurement method as described in any one of the first aspects above.

[0055] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the speed measurement method as described in any one of the first aspects above are executed.

[0056] According to the speed measurement method, speed measurement device, electronic device and computer-readable storage medium of the embodiment of the present application, the current servo cycle set is determined, the current servo cycle set includes at least one servo cycle, and the at least one servo cycle includes the current servo cycle of the motor; the feedback speed corresponding to the current servo cycle set is determined according to the operation data of each servo cycle in the current servo cycle set; the feedback speed of the motor is determined according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set. According to the embodiment of the present application, since the number of pulses generated in each servo cycle when the motor is in a low-speed operation state is small, by accumulating the pulse increments of multiple servo cycles, the determination of the motor feedback speed is converted into the determination of the number of servo cycles involved in the speed measurement, so that the speed measurement processing when the motor is running at a low speed is based on the pulse increments of multiple consecutive servo cycles. In the process of calculating the feedback speed, the more servo cycles are used, the smaller the time error will be, and the smaller the speed measurement noise will be. Moreover, the process of determining the feedback speed of the motor is dynamic. The current servo cycle set is determined in real time, and the feedback speed corresponding to the current servo cycle set is determined based on the operating data of each servo cycle in the current servo cycle set. The feedback speed is verified and confirmed by comparing the target speed range to ensure that the final feedback speed of the motor can track the actual operating status of the motor in real time and accurately, and also provide data support for the speed control and adjustment of the motor. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0058] Figure 1 A schematic diagram of a flow chart of a speed measurement method provided in an embodiment of the present application is shown;

[0059] Figure 2 A schematic flow chart of a method for determining a feedback speed corresponding to a current servo cycle set provided in an embodiment of the present application is shown;

[0060] Figure 3 A schematic diagram of a flow chart of a method for determining feedback speed of a motor provided in an embodiment of the present application is shown;

[0061] Figure 4 A schematic diagram of a process for determining a mapping relationship provided in an embodiment of the present application is shown;

[0062] Figure 5A schematic flow chart of another method for determining the feedback speed of a motor provided in an embodiment of the present application is shown;

[0063] Figure 6 A schematic diagram of the structure of a speed measuring device provided in an embodiment of the present application is shown;

[0064] Figure 7 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0065] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0066] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0067] In order to enable those skilled in the art to use the content of this application, the following implementation is provided in conjunction with a specific application scenario "feedback speed measurement of a servo motor". For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is mainly described around the speed measurement method, it should be understood that this is only an exemplary embodiment.

[0068] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0069] The speed measurement method provided in the embodiment of the present application is similar to the traditional method in feedback speed measurement when the motor is in a high-speed running state, and also relies on calculating the encoder pulse increment of adjacent servo cycles to obtain the feedback speed. When the motor is in a low-speed running state, it can adaptively calculate the pulse increment of multiple servo cycles to obtain the feedback speed, thereby improving the speed measurement accuracy and reducing the speed measurement noise.

[0070] Figure 1 A schematic diagram of a speed measurement method provided in an embodiment of the present application is shown. Figure 1 As shown, this method is mainly used on a servo motor equipped with an encoder, and specifically includes the following steps:

[0071] S101, determining a current servo cycle set.

[0072] Optionally, the current servo cycle set includes at least one servo cycle, and the at least one servo cycle includes the current servo cycle of the motor.

[0073] Optionally, the current servo cycle set refers to a set of continuous servo cycles selected for calculating the feedback speed of the motor. The current servo cycle set includes at least one servo cycle and may also include multiple servo cycles. The specific number of servo cycles depends on the target speed range and the required speed measurement accuracy. The current servo cycle of the motor refers to the servo cycle in progress at the current speed measurement moment. The current servo cycle of the motor is part of the current servo cycle set, and the current servo cycle must be included in the current servo cycle set.

[0074] S102 : Determine a feedback speed corresponding to the current servo cycle set according to the operation data of each servo cycle in the current servo cycle set.

[0075] Optionally, the running data of the servo cycle includes pulse information of the encoder in each servo cycle, and the pulse information can reflect the actual position change of the motor in each servo cycle. Based on the pulse information in each servo cycle in the current servo cycle set, the speed in the time period corresponding to the current servo cycle set is determined, and the speed can be an average speed, and the speed is determined as the feedback speed corresponding to the current servo cycle set.

[0076] Optionally, in the process of determining the feedback speed corresponding to the current servo cycle set, the T method (measuring the pulse period) and the M method (counting the number of pulses in a fixed time, such as a servo cycle) may be used. The M method is applicable to the case where the motor is in a high-speed operation state. When the motor is in a low-speed or very low-speed operation state, a pulse increment may span several servo cycles, so the M method is no longer applicable. At this time, it is necessary to switch the M method speed measurement to the T method speed measurement.

[0077] It should be noted that in the embodiment of the present application, the M method is also used to measure the speed when the motor is in a high-speed operation state, but the speed measurement processing when the motor is in a low-speed or ultra-low-speed operation state mainly relies on the pulse information of multiple continuous servo cycles.

[0078] S103 , determining the feedback speed of the motor according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set.

[0079] Optionally, there is a corresponding relationship between the speed interval and the number of servo cycles included in the servo cycle set. After determining the feedback speed corresponding to the current servo cycle set, determine whether the feedback speed belongs to the target speed interval corresponding to the current servo cycle set. If the feedback speed is within the target speed interval, the feedback speed corresponding to the current servo cycle set is used as the feedback speed of the motor. If the feedback speed is not within the target speed interval, it is necessary to re-determine a new current servo cycle set and determine the feedback speed corresponding to the new current servo cycle set, so as to determine the feedback speed of the motor according to the feedback speed corresponding to the new current servo cycle set.

[0080] Based on this, according to the test method provided by the embodiment of the present application, since the number of pulses generated in each servo cycle is small when the motor is running at a low speed, the feedback speed of the motor is converted into the number of servo cycles involved in the speed measurement by accumulating the pulse increments of multiple servo cycles, so that the speed measurement processing when the motor is running at a low speed is based on the pulse increments of multiple consecutive servo cycles. In the process of calculating the feedback speed, the more servo cycles are used, the smaller the time error will be, and the speed measurement noise will also be smaller. In addition, the process of determining the feedback speed of the motor is dynamic, by determining the current servo cycle set in real time, and based on the operating data in each servo cycle in the current servo cycle set, the feedback speed corresponding to the current servo cycle set is determined, and the feedback speed is verified and confirmed by comparing the target speed interval, ensuring that the final feedback speed of the motor can track the actual operating state of the motor in real time and accurately, and also providing data support for the speed control and adjustment of the motor.

[0081] As a possible implementation, the above step S101 determines the current servo cycle set, including: if there is no previous servo cycle set, taking the set consisting of the current servo cycle as the current servo cycle set; if there is a previous servo cycle set, determining the current servo cycle set based on the previous servo cycle set.

[0082] For example, at the beginning of the motor operation, the previous servo cycle set does not exist, that is, the current servo cycle set only contains the current servo cycle. In this case, the current servo cycle is used as the starting point of the servo cycle set to create a new servo cycle set. As the operation time increases, the previous servo cycle set exists. At this time, each servo cycle in the previous servo cycle set is added to the current servo cycle to form a new servo cycle set, and the new servo cycle set is used as the current servo cycle set.

[0083] Optionally, the above steps determine the current servo cycle set based on the previous servo cycle set, including: determining the number of servo cycles and the earliest servo cycle in the previous servo cycle set; determining the number to be added based on the number of servo cycles; adding the number of servo cycles to be added before the earliest servo cycle to the previous servo cycle set to obtain the current servo cycle set.

[0084] Exemplarily, the number of servo cycles refers to the total number of servo cycles included in the servo cycle set, and the earliest servo cycle refers to the servo cycle that occurs first in the previous servo cycle set, that is, the time starting point in the previous servo cycle set. In the embodiment of the present application, the number to be added increases exponentially, that is, in the process of adding the servo cycles to be added before the earliest servo cycle to the previous servo cycle set, the number of servo cycles to be added doubles each time. Taking one servo cycle as T as an example, the exponential addition method is adopted, and the servo cycles in the current servo cycle set obtained include T, 2T, 4T, 8T, and 16T.

[0085] On this basis, it is explained that the speed measurement time interval in the embodiment of the present application is divided exponentially. When the motor is in a low-speed operation state, the angular velocity of the motor is low, and the number of pulses generated by the encoder in a single servo cycle is correspondingly reduced. By adopting an exponential test time interval division method, a longer time interval can be used to accumulate the number of pulses in the low-speed range, thereby reducing the feedback speed measurement error caused by insufficient number of pulses during low-speed operation. In addition, a shorter servo cycle, such as T or 2T, is used during high-speed operation, and a longer time interval, such as 16T, is used during low speed, which can not only reduce the amount of unnecessary data processing during high-speed operation, but also avoid the waste of resources caused by too short time intervals during low-speed operation.

[0086] Based on this, the method of determining the current servo cycle set depends on whether there is a previous servo cycle set, which not only ensures that the feedback speed of the motor is determined according to the pulse information of the latest servo cycle, but also uses historical data to improve the accuracy and stability of the determined feedback speed.

[0087] Figure 2FIG. 1 is a flow chart showing a method for determining a feedback speed corresponding to a current servo cycle set provided in an embodiment of the present application. As a possible implementation method, refer to Figure 2 As shown, the method specifically comprises the following steps:

[0088] S201, determining the sum of the pulse increments of each servo cycle in the current servo cycle set.

[0089] Optionally, the pulse increment refers to the change in the number of pulses generated by the encoder in each servo cycle relative to the previous servo cycle, and the size of the pulse increment reflects the angular displacement or speed change of the motor in the servo cycle. The sum of the pulse increments refers to the sum value obtained by accumulating the pulse increments of all servo cycles in the current servo cycle set, and the sum value represents the total angular displacement or position change of the motor in the time period covered by the current servo cycle set.

[0090] Exemplarily, taking the current servo cycle set including 16 servo cycles as an example, the pulse increment in the current servo cycle T is P0, the pulse increment in the previous servo cycle T is P1, the pulse increment in the previous servo cycle T is P2, the pulse increment in the previous servo cycle T is P3, and so on. The pulse increment in the 15th servo cycle T is P15. On this basis, the sum of the obtained pulse increments is P0+P1+P2+…+P14+P15.

[0091] S202: The ratio of the sum to the number of servo cycles in the current servo cycle set is used as a feedback speed corresponding to the current servo cycle set.

[0092] Exemplarily, the pulse increment in the current servo cycle T is P0, the pulse increment in the previous servo cycle T is P1, the pulse increment in the previous servo cycle T is P2, the pulse increment in the previous servo cycle T is P3, and so on, the pulse increment in the 15th servo cycle T is P15, when calculating the feedback speed corresponding to the current servo cycle set, for example, the current servo cycle set only includes one current servo cycle T, then the feedback speed can be determined based on the expression P0 / T, if the current servo cycle set includes two servo cycles, then the feedback speed can be determined based on the expression (P0+P1) / (2T), if the current servo cycle set includes three servo cycles, then the feedback speed can be determined based on the expression (P0+P1+P3) / (3T), and so on, which will not be repeated here. Wherein, the servo cycle T can be set to 0.2ms.

[0093] It should be noted that there are multiple options for calculating the feedback speed of the motor. Taking the current servo cycle set including 16 servo cycles as an example, the feedback speed can be determined by the expression (P0+P1+P2+...+P14+P15) / (16T), or by the expression (P0 / T+P1 / T+P2 / T+...+P14 / T+P15 / T) / 16, which is the average value of the M method speed measurement corresponding to 16 consecutive servo cycles. It can be understood that although the above two expressions involve different calculation methods, their essence is the same.

[0094] Based on this, the feedback speed of the motor is determined by calculating the sum of the pulse increments of all servo cycles in the current servo cycle set and combining the number of servo cycles contained in the current servo cycle set. This processing method is particularly suitable for motors running at low speeds. Since the number of pulses in each servo cycle is small when the motor is running at low speed, the accuracy of feedback speed measurement can be improved by accumulating the pulse increments of multiple servo cycles. In this way, the speed measurement processing when the motor is running at low speed is based on the pulse increments of multiple consecutive servo cycles. In the process of calculating the feedback speed, the more servo cycles are used, the smaller the time error will be from the perspective of time span, and the smaller the speed measurement noise will be from the perspective of taking the average value of multiple measurements.

[0095] Figure 3 FIG. 1 is a flow chart of a method for determining the feedback speed of a motor provided in an embodiment of the present application. As a possible implementation method, refer to Figure 3 As shown, the above step S103 determines the feedback speed of the motor according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set, including:

[0096] If the feedback speed corresponding to the current servo cycle set is within the target speed range, the feedback speed corresponding to the current servo cycle set is used as the feedback speed of the motor; otherwise, the current servo cycle set is used as the new previous servo cycle set, and the new current servo cycle set and the feedback speed corresponding to the current servo cycle set are re-determined, and the feedback speed of the motor is determined according to the target speed range corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set, and the iterative execution is performed until the feedback speed corresponding to the new current servo cycle set is within the target speed range corresponding to the new current servo cycle set, or the number of servo cycles in the new current servo cycle set reaches a preset threshold; if the number of servo cycles in the new current servo cycle set reaches a preset threshold, the feedback speed of the motor is determined according to the operating data of each servo cycle in the new current servo cycle set.

[0097] Exemplarily, the feedback speed is calculated based on the ratio of the sum of the pulse increments of each servo cycle in the current servo cycle set to the number of servo cycles, and it is verified whether the feedback speed corresponding to the current servo cycle set is within the target speed interval. If so, the feedback speed corresponding to the current servo cycle set is directly used as the feedback speed of the motor, otherwise, the new current servo cycle set is re-determined. The feedback speed verification process is iteratively executed, and it is necessary to update the previous servo cycle set, re-determine the new current servo cycle set, recalculate the new feedback speed, and determine whether the new feedback speed is within the corresponding target speed interval. The iteration termination condition is that the feedback speed is within the target interval, or the number of servo cycles reaches a preset threshold. During the iteration process, when the feedback speed corresponding to the new current servo cycle set falls within the target speed interval, the iteration terminates, and the feedback speed at this time is used as the final feedback speed of the motor. Or if the number of servo cycles in the new current servo cycle set reaches a preset threshold, the feedback speed of the motor will be determined based on the operating data of each servo cycle in the new current servo cycle set, even if the feedback speed may not be completely within the target speed interval.

[0098] Based on the above processing logic, the feedback speed lag calculated within 1 servo cycle T is 1T, and the speed noise is the original noise. The feedback speed calculated within 2 servo cycles T is 2T, and the speed noise will theoretically be 1 / 2 of the original noise. The feedback speed calculated within 4 servo cycles T is 4T, and the speed noise will theoretically be 1 / 4 of the original noise. The feedback speed calculated within 8 servo cycles T is 8T, and the speed noise will theoretically be 1 / 8 of the original noise. The feedback speed calculated within 16 servo cycles T is 2T, and the speed noise will theoretically be 1 / 16 of the original noise. The lower the motor running speed, the greater the speed measurement lag and the smaller the speed measurement noise. The speed measurement time lag and the speed measurement noise are adaptively adjusted to dynamically meet the motor control performance requirements.

[0099] Optionally, the above steps determine the feedback speed of the motor according to the operation data of each servo cycle in the new current servo cycle set, including:

[0100] According to the operation data of each servo cycle in the new current servo cycle set, the feedback speed corresponding to the new current servo cycle set is determined; and the feedback speed corresponding to the new current servo cycle set is used as the feedback speed of the motor.

[0101] Exemplarily, based on the pulse increment of each servo cycle in the new current servo cycle set and the number of servo cycles, the feedback speed corresponding to the new current servo cycle set is calculated, and the new feedback speed is used as the feedback speed of the motor. Specifically, the new current servo cycle set includes two servo cycles, the current servo cycle T and the servo cycle T before the current servo cycle T, and the pulse increment in the current servo cycle T is P0, and the pulse increment in the previous servo cycle T is P1, then the feedback speed corresponding to the new current servo cycle set is (P0+P1) / (2T), and the new feedback speed is used as the feedback speed of the motor.

[0102] Based on this, through iterative execution and conditional judgment, the servo cycle set is continuously updated, the feedback speed is recalculated, and it is verified that the feedback speed is within the target speed range. When the preset number of iterations or servo cycles is reached, the feedback speed is determined based on the pulse increment of each current servo cycle to ensure the accuracy of the motor feedback speed.

[0103] Figure 4 A flowchart of a method for determining a mapping relationship provided in an embodiment of the present application is shown. As a possible implementation method, refer to Figure 4 As shown, before the above step of determining the feedback speed of the motor, the method further includes:

[0104] S401 . Determine a first speed interval and a second speed interval of a motor based on a preset speed measurement threshold.

[0105] Optionally, the preset speed measurement threshold is determined according to the rated speed of the motor, and the speed in the first speed interval is less than the speed in the second speed interval.

[0106] Exemplarily, the preset speed measurement threshold S can be 10% of the rated speed of the motor, and the specific parameters can be adjusted according to the actual operation of the motor, and are not limited to this. Based on the preset speed measurement threshold S, the motor operating speed can be divided into different speed intervals to distinguish whether the current operation of the motor is in a low-speed operation state or a high-speed operation state. Among them, the first speed interval represents the high-speed interval, and the corresponding value range can be (S, positive infinity), and the second speed interval represents the low-speed interval, and the corresponding value range can be [0, S]. Specifically, if the motor operating speed is greater than the preset speed measurement threshold S, it is determined that the motor is in a high-speed operation state. If the motor operating speed is less than the preset speed measurement threshold S, it is determined that the motor is in a low-speed operation state.

[0107] In addition, the preset speed measurement threshold is also an important basis for distinguishing whether the speed measurement method is M-method speed measurement or T-method speed measurement. For example, when the motor running speed is greater than the preset speed measurement threshold S, the M-method speed measurement is adopted. When the motor running speed is less than the preset speed measurement threshold S, the speed measurement method is switched from M-method speed measurement to T-method speed measurement, so that the speed measurement method can quickly and smoothly transition from low speed to high speed, or from high speed to low speed.

[0108] S402 , dividing the first speed interval of the motor according to a preset division strategy to obtain a plurality of speed intervals, and establishing a mapping relationship between each speed interval and each servo cycle set.

[0109] For example, in the embodiment of the present application, the first speed interval, that is, the low-speed interval, can be further divided to obtain multiple speed intervals. The preset division strategy includes linearly dividing the first speed interval [0, S] into four speed intervals [0, 0.25S, 0.5S, 0.75S, S] according to [0, 0.25S, 0.5S], (0.5S, 0.75S], and (0.75S, S].

[0110] Exemplarily, the mapping relationship between each speed interval and each servo cycle set indicates the number of servo cycles corresponding to different speed intervals. The mapping relationship includes, for example: the servo cycle set corresponding to the speed interval (0.75S, S] is 2T, the servo cycle set corresponding to the speed interval (0.5S, 0.75S] is 4T, the servo cycle set corresponding to the speed interval (0.25S, 0.5S] is 8T, and the servo cycle set corresponding to the speed interval [0, 0.25S] is 16T. On this basis, in actual application, if the driver wants to control the motor to run at a certain command speed, the command speed can be 0.1% of the motor rated speed, 0.5% of the motor rated speed, 2% of the motor rated speed. , 6% motor rated speed, 7% motor rated speed, 8% motor rated speed, 10% motor rated speed, when the command speed is 0.1% motor rated speed, the feedback speed measurement is finally calculated according to the pulse increment within 16T. When the command speed is 0.5% motor rated speed, the feedback speed measurement is finally calculated according to the pulse increment within 8T, when the command speed is 2% motor rated speed, the feedback speed measurement is finally calculated according to the pulse increment within 4T, when the command speed is 6%, 7% and 8% of the motor rated speed respectively, the feedback speed measurement is finally calculated according to the pulse increment within 2T, when the command speed is 10% of the motor rated speed, the feedback speed measurement is finally calculated according to the pulse increment within T time.

[0111] It should be noted that when the command speed is 0.5% of the rated speed of the motor, according to theoretical calculation, the feedback speed measurement at this time should be calculated according to the pulse increment within 16T, but in actual measurement, due to the jitter of the pulse increment, the feedback speed measurement is finally calculated according to the pulse increment within 8T. Similarly, when the command speed is 2% of the rated speed of the motor, according to theoretical calculation, the feedback speed at this time should be calculated according to the pulse increment within 16T, but in actual measurement, due to the jitter of the pulse increment, the feedback speed measurement is finally calculated according to the pulse increment within 4T.

[0112] Figure 5 FIG. 1 is a flow chart of another method for determining the feedback speed of a motor provided in an embodiment of the present application. As a possible implementation method, refer to Figure 5 As shown, the embodiment of the present application follows the principle of high-speed interval priority in the judgment of the speed interval, that is, the feedback speed V is always calculated by the M-method speed measurement method at the beginning, that is, the feedback speed V is calculated according to the pulse increment within the T time. Specifically, the feedback speed V is determined by calculating P0 / T, and it is determined whether the feedback speed V is within the interval (S, positive infinity), that is, it is determined whether the feedback speed V is greater than the preset speed measurement threshold S. If the feedback speed V is within the interval, the calculation is terminated, otherwise, it is calculated according to the lower speed interval until the end. Specifically, when the feedback speed V is not in the speed interval (S, positive infinity), the new feedback speed V is determined by calculating (P0+P1) / (2T), and it is determined whether the feedback speed V is in the speed interval (0.75S, S], that is, it is determined whether the feedback speed V is greater than 0.75S and less than or equal to S. If the feedback speed V is in the interval (0.75S, S], the calculation is terminated. Otherwise, the new feedback speed V is determined by calculating (P0+P1+P2+P3) / (4T), and it is determined whether the feedback speed V is in the speed interval (0.5S, 0.75S], that is, it is determined whether the feedback speed V is greater than 0.5S and less than or equal to 0.75S. If the feedback speed V is in the interval (0. If the feedback speed V is within the interval of (5S, 0.75S], the calculation is terminated; otherwise, a new feedback speed V is determined by calculating (P0+P1+...+P6+P7) / (8T), and it is determined whether the feedback speed V is within the speed interval of (0.25S, 0.5S], that is, it is determined whether the feedback speed V is greater than 0.25S and less than or equal to 0.5S. If the feedback speed V is within the interval of (0.25S, 0.5S], the calculation is terminated; otherwise, a new feedback speed is determined by calculating (P0+P1+...+P14+P15) / (16T), that is, the feedback speed V is calculated according to the pulse increment within 16T, and the feedback speed V is used as the final feedback speed of the motor, and the calculation is terminated.

[0113] Based on this, according to the motor feedback speed determination method provided in the embodiment of the present application, speed measurement when the motor is in a low-speed running state has the advantages of high accuracy and low noise, and the final feedback speed of the motor is determined based on the feedback speed corresponding to the current speed measurement cycle and the corresponding target speed range. That is, in the embodiment of the present application, the speed measurement interval time can be adaptively selected according to the actual speed.

[0114] Based on the same inventive concept, a speed measuring device corresponding to the speed measuring method is also provided in the embodiment of the present application. Since the principle of solving the problem by the speed measuring device in the embodiment of the present application is similar to the above-mentioned speed measuring method in the embodiment of the present application, the implementation of the speed measuring device can refer to the implementation of the speed measuring method, and the repeated parts will not be repeated.

[0115] Reference Figure 6 FIG. 6 is a schematic diagram of a speed measuring device provided in an embodiment of the present application. The speed measuring device 600 includes: a first determination module 601, a second determination module 602, and a third determination module 603, wherein:

[0116] A first determining module 601 is used to determine a current servo cycle set, where the current servo cycle set includes at least one servo cycle, and the at least one servo cycle includes the current servo cycle of the motor;

[0117] The second determination module 602 is used to determine the feedback speed corresponding to the current servo cycle set according to the operation data of each servo cycle in the current servo cycle set;

[0118] The third determination module 603 is used to determine the feedback speed of the motor according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set.

[0119] Based on this, according to the speed measuring device of the embodiment of the present application, since the number of pulses generated in each servo cycle is small when the motor is in a low-speed operation state, by accumulating the pulse increments of multiple servo cycles, the determination of the motor feedback speed is converted into the determination of the number of servo cycles involved in the speed measurement, so that the speed measurement processing when the motor is running at a low speed is based on the pulse increments of multiple consecutive servo cycles. In the process of calculating the feedback speed, the more servo cycles are used, the smaller the time error will be, and the speed measurement noise will also be smaller. In addition, the process of determining the feedback speed of the motor is dynamic, by real-time determination of the current servo cycle set, and based on the operating data in each servo cycle in the current servo cycle set, the feedback speed corresponding to the current servo cycle set is determined, and the feedback speed is verified and confirmed by comparing the target speed interval, ensuring that the final feedback speed of the motor can track the actual operating state of the motor in real time and accurately, and also providing data support for the speed control and adjustment of the motor.

[0120] In a possible implementation manner, the first determining module 601 is specifically configured to:

[0121] If there is no previous servo cycle set, the set consisting of the current servo cycle is used as the current servo cycle set;

[0122] If there is a previous servo cycle set, the current servo cycle set is determined according to the previous servo cycle set.

[0123] In a possible implementation manner, the first determining module 601 is specifically configured to:

[0124] determining the number of servo cycles and the earliest servo cycle in the previous servo cycle set;

[0125] According to the number of servo cycles, determine the number to be added;

[0126] The servo cycles to be added before the earliest servo cycle are added to the previous servo cycle set to obtain the current servo cycle set.

[0127] In a possible implementation manner, the second determining module 602 is specifically configured to:

[0128] Determine the sum of the pulse increments of each servo cycle in the current servo cycle set;

[0129] The ratio of the sum to the number of servo cycles in the current servo cycle set is used as the feedback speed corresponding to the current servo cycle set.

[0130] In a possible implementation manner, the third determining module 603 is specifically configured to:

[0131] If the feedback speed corresponding to the current servo cycle set is within the target speed range, the feedback speed corresponding to the current servo cycle set is used as the feedback speed of the motor;

[0132] Otherwise, the current servo cycle set is used as the new previous servo cycle set, and the new current servo cycle set and the feedback speed corresponding to the current servo cycle set are re-determined, and the feedback speed of the motor is determined according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set, and the process is iteratively executed until the feedback speed corresponding to the new current servo cycle set is within the target speed interval corresponding to the new current servo cycle set, or the number of servo cycles in the new current servo cycle set reaches a preset threshold;

[0133] If the number of servo cycles in the new current servo cycle set reaches a preset threshold, the feedback speed of the motor is determined according to the operation data of each servo cycle in the new current servo cycle set.

[0134] In a possible implementation manner, the third determining module 603 is specifically configured to:

[0135] Determine the feedback speed corresponding to the new current servo cycle set according to the operation data of each servo cycle in the new current servo cycle set;

[0136] The feedback speed corresponding to the new current servo cycle set is used as the feedback speed of the motor.

[0137] In a possible implementation manner, the third determining module 603 is further configured to:

[0138] Based on a preset speed measurement threshold, determining a first speed interval and a second speed interval of the motor, the preset speed measurement threshold is determined according to the rated speed of the motor, and the speed in the first speed interval is less than the speed in the second speed interval;

[0139] The first speed interval of the motor is divided according to a preset division strategy to obtain a plurality of speed intervals, and a mapping relationship between each speed interval and each servo cycle set is established.

[0140] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0141] The present application embodiment also provides an electronic device 700, such as Figure 7 As shown, it is a schematic diagram of the structure of an electronic device 700 provided in an embodiment of the present application, including: a processor 701, a memory 702, and optionally, a bus 703. The memory 702 stores machine-readable instructions executable by the processor 701. When the electronic device 700 is running, the processor 701 communicates with the memory 702 through the bus 703. When the machine-readable instructions are executed by the processor 701, the steps of the speed measurement method described in any one of the above items are performed.

[0142] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the speed measurement method as described in any one of the above items are executed.

[0143] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules 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 communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0144] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function 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 is essentially or part of the technical solution that contributes to the prior art or part of the technical solution can be embodied in the form of a software product, and 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 method described in 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, RandomAccess Memory), disk or optical disk and other media that can store program code.

[0145] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.

Claims

1. A speed measurement method, characterized in that: include: Determine a current servo cycle set, wherein the current servo cycle set includes at least one servo cycle, and the at least one servo cycle includes a current servo cycle of the motor; Determine the feedback speed corresponding to the current servo cycle set according to the operation data of each servo cycle in the current servo cycle set; The feedback speed of the motor is determined according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set.

2. The speed measurement method according to claim 1, characterized in that: Determining the current servo cycle set includes: If there is no previous servo cycle set, taking the set consisting of the current servo cycle as the current servo cycle set; If there is a previous servo cycle set, the current servo cycle set is determined according to the previous servo cycle set.

3. The speed measurement method according to claim 2, characterized in that: The determining the current servo cycle set according to the previous servo cycle set comprises: Determining the number of servo cycles and the earliest servo cycle in the previous servo cycle set; Determine the quantity to be added according to the quantity of servo cycles; The servo cycles to be added before the earliest servo cycle are added to the previous servo cycle set to obtain the current servo cycle set.

4. The speed measurement method according to claim 1, characterized in that: Determining the feedback speed corresponding to the current servo cycle set according to the operation data of each servo cycle in the current servo cycle set includes: Determining the sum of the pulse increments of each servo cycle in the current servo cycle set; The ratio of the sum to the number of servo cycles in the current servo cycle set is used as the feedback speed corresponding to the current servo cycle set.

5. The speed measurement method according to claim 2, characterized in that: The step of determining the feedback speed of the motor according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set includes: If the feedback speed corresponding to the current servo cycle set is within the target speed range, the feedback speed corresponding to the current servo cycle set is used as the feedback speed of the motor; Otherwise, the current servo cycle set is used as a new previous servo cycle set, and the new current servo cycle set and the feedback speed corresponding to the current servo cycle set are re-determined, and the feedback speed of the motor is determined according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set, and the process is iteratively executed until the feedback speed corresponding to the new current servo cycle set is within the target speed interval corresponding to the new current servo cycle set, or the number of servo cycles in the new current servo cycle set reaches a preset threshold; If the number of servo cycles in the new current servo cycle set reaches a preset threshold, the feedback speed of the motor is determined according to the operation data of each servo cycle in the new current servo cycle set.

6. The speed measurement method according to claim 5, characterized in that: Determining the feedback speed of the motor according to the operation data of each servo cycle in the new current servo cycle set includes: Determine the feedback speed corresponding to the new current servo cycle set according to the operation data of each servo cycle in the new current servo cycle set; The feedback speed corresponding to the new current servo cycle set is used as the feedback speed of the motor.

7. The speed measurement method according to any one of claims 1 to 6, characterized in that: Before determining the feedback speed of the motor according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set, the method further includes: Determine a first speed interval and a second speed interval of the motor based on a preset speed measurement threshold, wherein the preset speed measurement threshold is determined according to the rated speed of the motor, and the speed in the first speed interval is less than the speed in the second speed interval; The first speed interval of the motor is divided according to a preset division strategy to obtain a plurality of speed intervals, and a mapping relationship between each speed interval and each servo cycle set is established.

8. A speed measuring device, characterized in that: include: A first determining module, configured to determine a current servo cycle set, wherein the current servo cycle set includes at least one servo cycle, and the at least one servo cycle includes a current servo cycle of the motor; A second determination module is used to determine the feedback speed corresponding to the current servo cycle set according to the operation data of each servo cycle in the current servo cycle set; The third determination module is used to determine the feedback speed of the motor according to the target speed interval corresponding to the current servo cycle set and the feedback speed corresponding to the current servo cycle set.

9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to perform the steps of the speed measurement method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the speed measurement method according to any one of claims 1 to 7 are executed.