Motor speed measuring method and device, computer equipment and storage medium

文档序号:404693 发布日期:2021-12-17 浏览:41次 中文

阅读说明:本技术 电机测速方法、装置、计算机设备和存储介质 (Motor speed measuring method and device, computer equipment and storage medium ) 是由 李飞 肖绍旻 于 2021-08-02 设计创作,主要内容包括:本申请涉及一种电机测速方法、装置、计算机设备和存储介质。所述方法包括:在对目标电机进行测速的第N测速周期结束后,获取所述第N测速周期结束时刻所述目标电机的实际转速,第N-1测速周期结束后所述目标电机的平均加速度,以及所述第N-1测速周期结束后所述目标电机的校正转速;根据所述第N-1测速周期结束后所述目标电机的平均加速度和所述第N-1测速周期结束后所述目标电机的校正转速,确定所述第N测速周期结束时刻所述目标电机的预估转速;根据所述第N测速周期结束时刻所述目标电机的实际转速和预估转速,确定所述第N测速周期结束后所述目标电机的校正转速。采用本方法能够减小转速波动带来的误差。(The application relates to a motor speed measuring method and device, computer equipment and a storage medium. The method comprises the following steps: after an nth speed measuring period for measuring the speed of a target motor is finished, acquiring the actual rotating speed of the target motor at the end moment of the nth speed measuring period, the average acceleration of the target motor after the nth-1 speed measuring period is finished, and the corrected rotating speed of the target motor after the nth-1 speed measuring period is finished; determining the estimated rotation speed of the target motor at the end moment of the Nth speed measuring period according to the average acceleration of the target motor after the Nth-1 speed measuring period is ended and the corrected rotation speed of the target motor after the Nth-1 speed measuring period is ended; and determining the corrected rotating speed of the target motor after the Nth speed measuring period is finished according to the actual rotating speed and the estimated rotating speed of the target motor at the end of the Nth speed measuring period. By adopting the method, the error caused by the fluctuation of the rotating speed can be reduced.)

1. A method for measuring speed of a motor, the method comprising:

after an nth speed measuring period for measuring the speed of a target motor is finished, acquiring the actual rotating speed of the target motor at the end moment of the nth speed measuring period, the average acceleration of the target motor after the nth-1 speed measuring period is finished, and the corrected rotating speed of the target motor after the nth-1 speed measuring period is finished; the starting time of the Nth speed measuring period is the ending time of the Nth-1 speed measuring period;

determining the estimated rotation speed of the target motor at the end moment of the Nth speed measuring period according to the average acceleration of the target motor after the Nth-1 speed measuring period is ended and the corrected rotation speed of the target motor after the Nth-1 speed measuring period is ended;

and determining the corrected rotating speed of the target motor after the Nth speed measuring period is finished according to the actual rotating speed and the estimated rotating speed of the target motor at the end of the Nth speed measuring period.

2. The method according to claim 1, wherein the determining the estimated rotation speed of the target motor at the end of the nth speed measurement period according to the average acceleration of the target motor after the end of the nth-1 speed measurement period and the corrected rotation speed of the target motor after the end of the nth-1 speed measurement period comprises:

determining the rotation speed variation of the target motor in the Nth speed measuring period according to the average acceleration of the target motor after the Nth-1 speed measuring period is finished and the duration of the Nth speed measuring period;

and determining the estimated rotating speed of the target motor at the end moment of the Nth speed measuring period according to the corrected rotating speed of the target motor after the Nth-1 speed measuring period is ended and the rotating speed variation of the target motor in the Nth speed measuring period.

3. The method according to claim 1, wherein the determining the corrected rotation speed of the target motor after the nth speed measurement period ends according to the actual rotation speed and the estimated rotation speed of the target motor at the end of the nth speed measurement period comprises:

and calculating the average value of the actual rotating speed and the estimated rotating speed of the target motor at the end moment of the Nth speed measuring period, and determining the calculated average value as the corrected rotating speed of the target motor after the Nth speed measuring period is ended.

4. The method according to claim 1, wherein the step of obtaining the average acceleration of the target motor after the N-1 th tachometer period is over comprises:

acquiring the actual rotating speed of the target motor at the end moment of the N-1 th speed measuring period and the actual rotating speed of the target motor at the end moment of the N-i th speed measuring period; wherein N-1 is greater than N-i;

determining a first time interval from the end time of the (N-1) th speed measuring period to the end time of the (N-i) th speed measuring period;

and acquiring the average acceleration of the target motor after the N-1 speed measuring period is finished according to the actual rotating speed of the target motor at the end moment of the N-1 speed measuring period, the actual rotating speed of the target motor at the end moment of the N-i speed measuring period and the first time interval.

5. The method according to claim 4, wherein the obtaining the average acceleration of the target motor after the N-1 th speed measurement period ends according to the actual rotation speed of the target motor at the N-1 th speed measurement period end time, the actual rotation speed of the target motor at the N-i th speed measurement period end time, and the first time interval comprises:

calculating a rotation speed difference value between the actual rotation speed of the target motor at the end moment of the N-1 th speed measuring period and the actual rotation speed of the target motor at the end moment of the N-i th speed measuring period;

and calculating the ratio of the rotating speed difference value to the first time interval, and determining the ratio as the average acceleration of the target motor after the N-1 th speed measurement period is finished.

6. The method according to claim 1, wherein the obtaining the actual rotation speed of the target motor at the end of the nth tachometer period comprises:

acquiring the number of pulses in the Nth speed measuring period;

if the number of the pulses in the Nth speed measuring period is greater than 0, determining a second time interval according to the appearance time of the last pulse before the Nth speed measuring period and the appearance time of the last pulse in the Nth speed measuring period;

and calculating the actual rotating speed of the target motor at the end moment of the Nth speed measuring period according to the pulse number in the Nth speed measuring period and the second time interval.

7. The method of claim 6, wherein after said obtaining the number of pulses in said nth tachometer period, said method further comprises:

if the number of pulses in the Nth speed measuring period is equal to 0, determining a third time interval according to the occurrence time of the last pulse before the Nth speed measuring period and the end time of the Nth speed measuring period;

and calculating the actual rotating speed of the target motor at the end moment of the Nth speed measuring period according to the last pulse before the Nth speed measuring period and the third time interval.

8. A motor speed measurement device, the device comprising:

the rotating speed obtaining module is used for obtaining the actual rotating speed of the target motor at the moment when the Nth speed measuring period for measuring the speed of the target motor is finished, the average acceleration of the target motor after the Nth-1 speed measuring period is finished and the corrected rotating speed of the target motor after the Nth-1 speed measuring period is finished; the starting time of the Nth speed measuring period is the ending time of the Nth-1 speed measuring period;

the estimated rotation speed determining module is used for determining the estimated rotation speed of the target motor at the end moment of the Nth speed measuring period according to the average acceleration of the target motor after the Nth-1 speed measuring period is ended and the corrected rotation speed of the target motor after the Nth-1 speed measuring period is ended;

and the corrected rotating speed determining module is used for determining the corrected rotating speed of the target motor after the Nth speed measuring period is finished according to the actual rotating speed and the estimated rotating speed of the target motor at the end moment of the Nth speed measuring period.

9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.

10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.

Technical Field

The present application relates to the field of motor speed measurement technologies, and in particular, to a motor speed measurement method and apparatus, a computer device, and a storage medium.

Background

The motor rotating speed is one of the important indexes of various motors and plays an important role in a control system. At present, the rotating speed of a motor is usually obtained by firstly detecting the number of pulses output by a photoelectric pulse encoder coaxially connected with the motor and then calculating according to the number of the pulses. Common motor speed measurement methods include: m method, T method and M/T method.

On the basis of an M method, a T method and an M/T method, a speed measurement scheme capable of further improving the measurement accuracy is provided, the speed measurement scheme is to obtain the actual interval time between pulses, and the motor rotating speed is calculated according to the actual interval time between pulses and the number of pulses.

However, under the influence of load and operating environment, the above speed measurement scheme may cause a situation that the measured motor rotation speed fluctuates greatly, and a fluctuation error may be caused if the rotation speed fluctuates greatly.

Disclosure of Invention

In view of the above, it is necessary to provide a motor speed measuring method, device, computer device and storage medium capable of reducing fluctuation errors caused by rotation speed fluctuation.

A method of measuring speed of a motor, the method comprising:

after the Nth speed measuring period for measuring the speed of the target motor is finished, acquiring the actual rotating speed of the target motor at the end moment of the Nth speed measuring period, the average acceleration of the target motor after the Nth-1 speed measuring period is finished and the corrected rotating speed of the target motor after the Nth-1 speed measuring period is finished; the starting time of the Nth speed measuring period is the ending time of the (N-1) th speed measuring period;

determining the estimated rotation speed of the target motor at the end of the Nth speed measuring period according to the average acceleration of the target motor after the end of the Nth-1 speed measuring period and the corrected rotation speed of the target motor after the end of the Nth-1 speed measuring period;

and determining the corrected rotating speed of the target motor after the Nth speed measuring period is finished according to the actual rotating speed and the estimated rotating speed of the target motor at the end of the Nth speed measuring period.

In one embodiment, the determining the estimated rotation speed of the target motor at the end of the nth speed measurement period according to the average acceleration of the target motor after the end of the nth-1 speed measurement period and the corrected rotation speed of the target motor after the end of the nth-1 speed measurement period includes:

determining the rotation speed variation of the target motor in the Nth speed measuring period according to the average acceleration of the target motor after the Nth-1 speed measuring period is finished and the duration of the Nth speed measuring period;

and determining the estimated rotating speed of the target motor at the end moment of the Nth speed measuring period according to the corrected rotating speed of the target motor after the Nth-1 speed measuring period is ended and the rotating speed variation of the target motor in the Nth speed measuring period.

In one embodiment, the determining the corrected rotation speed of the target motor after the nth speed measurement period ends according to the actual rotation speed and the estimated rotation speed of the target motor at the end of the nth speed measurement period includes:

and calculating the average value of the actual rotating speed and the estimated rotating speed of the target motor at the end of the Nth speed measuring period, and determining the calculated average value as the corrected rotating speed of the target motor after the Nth speed measuring period is ended.

In one embodiment, the process of obtaining the average acceleration of the target motor after the nth-1 tachometer period is finished includes:

acquiring the actual rotating speed of the target motor at the end moment of the (N-1) th speed measuring period and the actual rotating speed of the target motor at the end moment of the (N-i) th speed measuring period; wherein N-1 is greater than N-i;

determining a first time interval from the end time of the (N-1) th speed measuring period to the end time of the (N-i) th speed measuring period;

and acquiring the average acceleration of the target motor after the N-1 speed measuring period is finished according to the actual rotating speed of the target motor at the end moment of the N-1 speed measuring period, the actual rotating speed of the target motor at the end moment of the N-i speed measuring period and the first time interval.

In one embodiment, the obtaining the average acceleration of the target motor after the N-1 th speed measurement period ends according to the actual rotation speed of the target motor at the N-1 th speed measurement period end time, the actual rotation speed of the target motor at the N-i th speed measurement period end time, and the first time interval includes:

calculating a rotation speed difference value between the actual rotation speed of the target motor at the end moment of the N-1 th speed measuring period and the actual rotation speed of the target motor at the end moment of the N-i th speed measuring period;

and calculating the ratio of the rotating speed difference value to the first time interval, and determining the ratio as the average acceleration of the target motor after the N-1 th speed measurement period is finished.

In one embodiment, the obtaining the actual rotation speed of the target motor at the end of the nth speed measurement period includes:

acquiring the number of pulses in the Nth speed measuring period;

if the number of pulses in the Nth speed measuring period is larger than 0, determining a second time interval according to the appearance time of the last pulse before the Nth speed measuring period and the appearance time of the last pulse in the Nth speed measuring period;

and calculating the actual rotating speed of the target motor at the end moment of the Nth speed measuring period according to the pulse number in the Nth speed measuring period and the second time interval.

In one embodiment, after obtaining the number of pulses in the nth tachometer period, the method further includes:

if the number of pulses in the Nth speed measuring period is equal to 0, determining a third time interval according to the appearance moment of the last pulse before the Nth speed measuring period and the end moment of the Nth speed measuring period;

and calculating the actual rotating speed of the target motor at the end moment of the Nth speed measuring period according to the last pulse before the Nth speed measuring period and the third time interval.

A motor speed measurement device, the device comprising:

the rotating speed obtaining module is used for obtaining the actual rotating speed of the target motor at the end moment of the Nth speed measuring period, the average acceleration of the target motor after the Nth-1 speed measuring period is ended and the corrected rotating speed of the target motor after the Nth-1 speed measuring period is ended after the Nth speed measuring period for measuring the speed of the target motor is ended; the starting time of the Nth speed measuring period is the ending time of the (N-1) th speed measuring period;

the estimated rotation speed determining module is used for determining the estimated rotation speed of the target motor at the end moment of the Nth speed measuring period according to the average acceleration of the target motor after the Nth-1 speed measuring period is ended and the corrected rotation speed of the target motor after the Nth-1 speed measuring period is ended;

and the corrected rotating speed determining module is used for determining the corrected rotating speed of the target motor after the Nth speed measuring period is finished according to the actual rotating speed and the estimated rotating speed of the target motor at the end moment of the Nth speed measuring period.

In one embodiment, the estimated rotation speed determining module is specifically configured to determine a rotation speed variation of the target motor in an nth speed measurement period according to an average acceleration of the target motor after the nth-1 speed measurement period is ended and a duration of the nth speed measurement period; and determining the estimated rotating speed of the target motor at the end moment of the Nth speed measuring period according to the corrected rotating speed of the target motor after the Nth-1 speed measuring period is ended and the rotating speed variation of the target motor in the Nth speed measuring period.

In one embodiment, the corrected rotation speed determining module is specifically configured to calculate an average value of an actual rotation speed and an estimated rotation speed of the target motor at the end of the nth speed measurement period, and determine the calculated average value as the corrected rotation speed of the target motor after the end of the nth speed measurement period.

In one embodiment, the rotation speed obtaining module includes:

the first rotation speed obtaining submodule is used for obtaining the actual rotation speed of the target motor at the end moment of the N-1 th speed measuring period and the actual rotation speed of the target motor at the end moment of the N-i th speed measuring period; wherein N-1 is greater than N-i;

the first time interval determining submodule is used for determining a first time interval from the end time of the (N-1) th speed measuring period to the end time of the (N-i) th speed measuring period;

and the acceleration determining submodule is used for acquiring the average acceleration of the target motor after the N-1 speed measuring period is finished according to the actual rotating speed of the target motor at the end moment of the N-1 speed measuring period, the actual rotating speed of the target motor at the end moment of the N-i speed measuring period and the first time interval.

In one embodiment, the acceleration determining submodule is specifically configured to calculate a rotation speed difference between an actual rotation speed of the target motor at the end of the N-1 th speed measurement period and an actual rotation speed of the target motor at the end of the N-i th speed measurement period; and calculating the ratio of the rotating speed difference value to the first time interval, and determining the ratio as the average acceleration of the target motor after the N-1 th speed measurement period is finished.

In one embodiment, the rotation speed obtaining module is specifically configured to obtain the number of pulses in an nth speed measurement period; if the number of pulses in the Nth speed measuring period is larger than 0, determining a second time interval according to the appearance time of the last pulse before the Nth speed measuring period and the appearance time of the last pulse in the Nth speed measuring period; and calculating the actual rotating speed of the target motor at the end moment of the Nth speed measuring period according to the pulse number in the Nth speed measuring period and the second time interval.

In one embodiment, the rotation speed obtaining module is further configured to determine a third time interval according to an occurrence time of a last pulse before an nth speed measurement period and an end time of the nth speed measurement period if the number of pulses in the nth speed measurement period is equal to 0; and calculating the actual rotating speed of the target motor at the end moment of the Nth speed measuring period according to the last pulse before the Nth speed measuring period and the third time interval.

A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:

after the Nth speed measuring period for measuring the speed of the target motor is finished, acquiring the actual rotating speed of the target motor at the end moment of the Nth speed measuring period, the average acceleration of the target motor after the Nth-1 speed measuring period is finished and the corrected rotating speed of the target motor after the Nth-1 speed measuring period is finished; the starting time of the Nth speed measuring period is the ending time of the (N-1) th speed measuring period;

determining the estimated rotation speed of the target motor at the end of the Nth speed measuring period according to the average acceleration of the target motor after the end of the Nth-1 speed measuring period and the corrected rotation speed of the target motor after the end of the Nth-1 speed measuring period;

and determining the corrected rotating speed of the target motor after the Nth speed measuring period is finished according to the actual rotating speed and the estimated rotating speed of the target motor at the end of the Nth speed measuring period.

A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:

after the Nth speed measuring period for measuring the speed of the target motor is finished, acquiring the actual rotating speed of the target motor at the end moment of the Nth speed measuring period, the average acceleration of the target motor after the Nth-1 speed measuring period is finished and the corrected rotating speed of the target motor after the Nth-1 speed measuring period is finished; the starting time of the Nth speed measuring period is the ending time of the (N-1) th speed measuring period;

determining the estimated rotation speed of the target motor at the end of the Nth speed measuring period according to the average acceleration of the target motor after the end of the Nth-1 speed measuring period and the corrected rotation speed of the target motor after the end of the Nth-1 speed measuring period;

and determining the corrected rotating speed of the target motor after the Nth speed measuring period is finished according to the actual rotating speed and the estimated rotating speed of the target motor at the end of the Nth speed measuring period.

According to the motor speed measuring method, the motor speed measuring device, the computer equipment and the storage medium, after an Nth speed measuring period for measuring the speed of the target motor is finished, the processor obtains the actual rotating speed of the target motor at the moment when the Nth speed measuring period is finished, the average acceleration of the target motor after the Nth-1 speed measuring period is finished and the corrected rotating speed of the target motor after the Nth-1 speed measuring period is finished; determining the estimated rotation speed of the target motor at the end of the Nth speed measuring period according to the average acceleration of the target motor after the end of the Nth-1 speed measuring period and the corrected rotation speed of the target motor after the end of the Nth-1 speed measuring period; and determining the corrected rotating speed of the target motor after the Nth speed measuring period is finished according to the actual rotating speed and the estimated rotating speed of the target motor at the end of the Nth speed measuring period. According to the embodiment of the disclosure, the processor estimates the running state of the target motor at the end of the Nth speed measurement period according to the running state of the target motor at the end of the Nth speed measurement period, and corrects the actual rotating speed by using the estimated rotating speed, so that the rotating speed fluctuation can be reduced, and the error caused by the rotating speed fluctuation is reduced.

Drawings

FIG. 1 is a diagram illustrating an exemplary embodiment of a method for measuring speed of a motor;

FIG. 2 is a schematic flow chart of a method for measuring speed of a motor according to an embodiment;

FIG. 3 is a schematic diagram illustrating a comparison of a corrected rotational speed and an actual rotational speed according to one embodiment;

FIG. 4 is a schematic flow chart illustrating the steps of determining the estimated rotation speed of the target motor at the end of the Nth tachometer period in one embodiment;

FIG. 5 is a flowchart illustrating the step of obtaining the average acceleration of the target motor after the nth-1 speed measurement period ends in one embodiment;

FIG. 6 is a schematic flow chart illustrating the step of obtaining the actual rotational speed of the target motor at the end of the Nth tachometer period in one embodiment;

FIG. 7 is one of the schematic diagrams of tachometer periods and pulses in one embodiment;

FIG. 8 is a second schematic diagram of tachometer periods and pulses in one embodiment;

FIG. 9 is a schematic diagram of timing signals in one embodiment;

FIG. 10 is a block diagram of an exemplary motor speed measuring device;

FIG. 11 is a diagram illustrating an internal structure of a computer device in one embodiment.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

The motor speed measurement method provided by the application can be applied to the application environment shown in fig. 1. The application environment comprises a motor 101, a speed measurement sensor 102 and a processor 103; in the rotation process of the motor 101, the speed measuring sensor 102 detects the rotation speed of the motor 101 and outputs pulses according to the detection result; the processor 103 determines the rotation speed of the motor 101 based on the number of pulses output from the tachometer sensor 102. Wherein, the motor 101 may be but not limited to a high precision motor in a servo system; the tacho sensor may be, but is not limited to, a photo-electric pulse encoder; the processor 103 may be, but is not limited to, various FPGAs (Field Programmable Gate arrays) and CPUs (Central Processing units).

In one embodiment, as shown in fig. 2, a method for measuring speed of a motor is provided, which is described by taking the method as an example for being applied to the processor in fig. 1, and includes the following steps:

step 201, after an nth speed measurement period for measuring the speed of the target motor is finished, acquiring an actual rotating speed of the target motor at the end of the nth speed measurement period, an average acceleration of the target motor after the nth-1 speed measurement period is finished, and a corrected rotating speed of the target motor after the nth-1 speed measurement period is finished.

Wherein N is a positive integer greater than 1; the starting time of the Nth speed measuring period is the ending time of the Nth-1 speed measuring period, namely the Nth-1 speed measuring period and the Nth speed measuring period are two adjacent speed measuring periods in front and back, and the duration of each speed measuring period is equal.

After the nth speed measurement period for measuring the speed of the target motor is finished, the processor can determine the actual rotating speed of the target motor at the end moment of the nth speed measurement period, and subsequently, the actual rotating speed needs to be corrected, so that the actual rotating speed fluctuation of the target motor is reduced. The measurement mode of the actual rotating speed is not limited in the embodiment of the disclosure, and the measurement mode can be set according to the actual situation.

Similarly, after the N-1 speed measurement period for measuring the speed of the target motor is finished, the processor may also determine the actual rotation speed of the target motor at the end of the N-1 speed measurement period, and perform the correction processing on the actual rotation speed at the end of the N-1 speed measurement period by using the same correction method, so as to obtain the corrected rotation speed after the N-1 speed measurement period is finished. And then, the processor records the corrected rotating speed of the target motor after the N-1 th speed measurement period is finished.

After each speed measuring period is finished, the processor can obtain the actual rotating speed of the target motor at the end of the speed measuring period, and the average acceleration of the target motor after the end of the N-1 speed measuring period can be determined according to the actual rotating speed of the target motor at the end of the N-1 speed measuring period, the actual rotating speed of the target motor at the end of a certain speed measuring period before the N-1 speed measuring period and the time interval between the two actual rotating speeds.

For example, the actual speed of the target motor at the end of the N-1 th tacho period is VN-1The actual rotation speed of the target motor at the end of a certain speed measuring period before the N-1 th speed measuring period is VxIf the time interval between two actual rotation speeds is delta t, the speed measuring period of the N-1 thAverage acceleration of the target motor after the end is

It is understood that the actual rotation speed is the rotation speed calculated by the processor based on the number of pulses output from the tacho sensor and the elapsed time of the number of pulses.

Step 202, determining the estimated rotation speed of the target motor at the end of the Nth speed measuring period according to the average acceleration of the target motor after the end of the Nth speed measuring period 1 and the corrected rotation speed of the target motor after the end of the Nth speed measuring period 1.

After the average acceleration of the target motor after the N-1 th speed measurement period is finished and the corrected rotating speed of the target motor after the N-1 th speed measurement period is finished are obtained, the processor can determine the rotating speed variation in the N-1 th speed measurement period according to the average acceleration of the target motor after the N-1 th speed measurement period is finished, and then estimate the rotating speed of the target motor at the end of the N-1 th speed measurement period according to the corrected rotating speed of the target motor after the N-1 th speed measurement period is finished and the rotating speed variation in the N-1 th speed measurement period to obtain the estimated rotating speed of the target motor at the end of the N-1 th speed measurement period.

And 203, determining the corrected rotating speed of the target motor after the Nth speed measuring period is finished according to the actual rotating speed and the estimated rotating speed of the target motor at the end moment of the Nth speed measuring period.

And after the processor obtains the actual rotating speed and the estimated rotating speed of the target motor at the end moment of the Nth speed measuring period, correcting the actual rotating speed according to the estimated rotating speed to obtain the corrected rotating speed of the target motor after the Nth speed measuring period is ended. The correction mode is not limited in the embodiment of the disclosure, and can be set according to actual conditions. As shown in fig. 3, after the correction processing, the corrected rotation speed fluctuates less than the actual rotation speed and matches the desired rotation speed more closely.

In the motor speed measuring method, after an nth speed measuring period for measuring the speed of the target motor is finished, the processor acquires the actual rotating speed of the target motor at the end moment of the nth speed measuring period, the average acceleration of the target motor after the nth-1 speed measuring period is finished, and the corrected rotating speed of the target motor after the nth-1 speed measuring period is finished; determining the estimated rotation speed of the target motor at the end of the Nth speed measuring period according to the average acceleration of the target motor after the end of the Nth-1 speed measuring period and the corrected rotation speed of the target motor after the end of the Nth-1 speed measuring period; and determining the corrected rotating speed of the target motor after the Nth speed measuring period is finished according to the actual rotating speed and the estimated rotating speed of the target motor at the end of the Nth speed measuring period. According to the embodiment of the disclosure, the processor estimates the running state of the target motor at the end of the Nth speed measurement period according to the running state of the target motor at the end of the Nth speed measurement period, and corrects the actual rotating speed by using the estimated rotating speed, so that the rotating speed fluctuation can be reduced, and the error caused by the rotating speed fluctuation is reduced.

In an embodiment, as shown in fig. 4, the step of determining the estimated rotation speed of the target motor at the end of the nth tachometry period according to the average acceleration of the target motor after the end of the nth-1 tachometry period and the corrected rotation speed of the target motor after the end of the nth-1 tachometry period may include:

step 301, determining the variation of the rotating speed of the target motor in the nth speed measuring period according to the average acceleration of the target motor after the nth-1 speed measuring period is finished and the duration of the nth speed measuring period.

For example, the average acceleration of the target motor after the end of the N-1 th tachometer period is aN-1If the duration of the nth speed measuring period is Δ T, the variation of the rotating speed of the target motor in the nth speed measuring period is Δ VN=aN-1Δ T. Considering the operating environment (such as load condition, damping state, etc.) of the target motor and the fluctuation feedback condition of the actual rotating speed, a weight parameter k can be set, so that the rotating speed variation of the target motor in the nth speed measurement period is Δ VN=kN*aN-1Δ T, wherein kNAnd the weight parameter is corresponding to the Nth speed measurement period. The value of the weight parameter is not limited in the embodiment of the disclosure, and can be set according to actual conditions.

Step 302, determining the estimated rotation speed of the target motor at the end of the nth speed measuring period according to the corrected rotation speed of the target motor after the nth-1 speed measuring period is ended and the rotation speed variation of the target motor in the nth speed measuring period.

And after the processor obtains the rotating speed variation of the target motor in the Nth speed measuring period and the corrected rotating speed of the target motor after the Nth speed measuring period is ended, calculating the sum of the rotating speed variation of the target motor in the Nth speed measuring period and the corrected rotating speed of the target motor after the Nth speed measuring period is ended, and obtaining the estimated rotating speed of the target motor at the end moment of the Nth speed measuring period.

For example, the corrected rotation speed of the target motor after the end of the N-1 th speed measurement period is V'N-1The variation of the target motor speed in the Nth speed measurement period is delta VNAnd the estimated rotation speed of the target motor at the end of the Nth tachometer period is V "N=V'N-1+ΔVN=V'N-1+kN*aN-1*ΔT。

As shown in fig. 3, if the nth tachometer period is the 7 th tachometer period, and the end time of the nth tachometer period is T7, the variation of the rotation speed of the target motor in the 7 th tachometer period is Δ V7=k7*a6Δ T, estimated rotation speed V of the target motor at the end of 7 th tachometric period "7=V'6+ΔV7=V'6+k7*a6*ΔT。

In the process of determining the estimated rotating speed of the target motor at the end of the nth speed measuring period, the processor determines the rotating speed variation of the target motor in the nth speed measuring period according to the average acceleration of the target motor after the end of the nth-1 speed measuring period and the duration of the nth speed measuring period; and determining the estimated rotating speed of the target motor at the end moment of the Nth speed measuring period according to the corrected rotating speed of the target motor after the Nth-1 speed measuring period is ended and the rotating speed variation of the target motor in the Nth speed measuring period. According to the embodiment of the disclosure, the processor predicts the running state of the target motor at the end of the Nth speed measurement period according to the running state of the target motor at the end of the Nth speed measurement period, so as to obtain the predicted rotating speed and correct the actual rotating speed.

In an embodiment, the determining the corrected rotation speed of the target motor after the nth speed measurement period ends according to the actual rotation speed and the estimated rotation speed of the target motor at the end of the nth speed measurement period includes: and calculating the average value of the actual rotating speed and the estimated rotating speed of the target motor at the end of the Nth speed measuring period, and determining the calculated average value as the corrected rotating speed of the target motor after the Nth speed measuring period is ended.

In the embodiment of the present disclosure, the actual rotation speed of the target motor at the end of the nth speed measurement period is VNEstimated rotation speed is V'NThe corrected rotation speed of the target motor after the Nth speed measurement period is ended is

In practical application, the estimated rotation speed is used for correcting the actual rotation speed, the actual rotation speed and the estimated rotation speed of the target motor at the end moment of the Nth speed measurement period can be weighted and summed, and the calculated sum is determined as the corrected rotation speed of the target motor after the Nth speed measurement period is ended.

For example, if the weight corresponding to the actual rotation speed of the target motor at the end of the nth speed measurement period is m1 and the weight corresponding to the estimated rotation speed of the target motor at the end of the nth speed measurement period is m2, the corrected rotation speed of the target motor after the end of the nth speed measurement period is V'N=VN*m1+V”NM 2. The calculation method of the correction rotation speed is not limited in the embodiment of the present disclosure.

In the process of determining the corrected rotating speed of the target motor after the nth speed measuring period is finished, calculating the average value of the actual rotating speed and the estimated rotating speed of the target motor at the moment when the nth speed measuring period is finished, and determining the calculated average value as the corrected rotating speed of the target motor after the nth speed measuring period is finished. Through the embodiment of the disclosure, the processor fully considers the actually measured rotating speed and the rotating speed estimated according to the previous speed measuring period, so that the calculated corrected rotating speed after the Nth speed measuring period is finished accords with the expected value.

In an embodiment, as shown in fig. 5, the process of obtaining the average acceleration of the target motor after the nth-1 th tachometer period is ended may include:

step 401, obtaining the actual rotating speed of the target motor at the end of the nth-1 speed measuring period and the actual rotating speed of the target motor at the end of the nth-i speed measuring period.

Wherein N-1 is larger than N-i, and i is a positive integer. And if the (N-1) th speed measuring period is the 1 st speed measuring period, the actual rotating speed of the target motor is 0 at the end moment of the (N-i) th speed measuring period.

In practical application, if the actual rotation speed of the target motor does not fluctuate much, the nth-i speed measurement period may be a previous speed measurement period of the nth-1 speed measurement period, i.e., the nth-2 speed measurement period. As shown in fig. 3, the nth-1 speed measurement period is the 6 th speed measurement period, and the end time of the nth-1 speed measurement period is T6; the nth-i speed measuring period is the 5 th speed measuring period, and the end time of the nth-i speed measuring period is T5.

If the actual rotation speed fluctuation of the target motor is larger, the nth-i speed measurement period can be separated from the nth-1 speed measurement period by more speed measurement periods. As shown in fig. 3, the nth-1 speed measurement period is the 6 th speed measurement period, and the end time of the nth-1 speed measurement period is T6; the nth-i speed measuring period is the 3 rd speed measuring period, and the end time of the nth-i speed measuring period is T3.

The processor measures the actual rotating speed of a target motor at the end moment of each speed measuring period and records the actual rotating speed of the target motor at the end moment of each speed measuring period.

Step 402, determining a first time interval from the end time of the (N-1) th speed measuring period to the end time of the (N-i) th speed measuring period.

After the nth-i tachometer period is determined according to the actual rotating speed fluctuation condition of the target motor, the processor can correspondingly determine a first time interval from the end time of the nth-1 tachometer period to the end time of the nth-i tachometer period.

For example, when the nth-1 tachometer period end time is T6 and the nth-i tachometer period end time is T5, the first time interval is Δ T; and under the condition that the end time of the (N-1) th tachometer period is T6 and the end time of the (N-i) th tachometer period is T3, the first time interval is 3 delta T.

And step 403, acquiring the average acceleration of the target motor after the N-1 speed measuring period is finished according to the actual rotating speed of the target motor at the end of the N-1 speed measuring period, the actual rotating speed of the target motor at the end of the N-i speed measuring period and the first time interval.

After acquiring the actual rotating speed of the target motor at the end moment of the N-1 th speed measuring period, the actual rotating speed of the target motor at the end moment of the N-i th speed measuring period and the first time interval, the processor calculates the rotating speed difference value between the actual rotating speed of the target motor at the end moment of the N-1 th speed measuring period and the actual rotating speed of the target motor at the end moment of the N-i th speed measuring period; and then, calculating the ratio of the rotation speed difference value to the first time interval, and determining the ratio as the average acceleration of the target motor after the N-1 th speed measurement period is finished.

For example, when the nth-1 th tachometer period end time is T6 and the nth-i th tachometer period end time is T5, the first time interval is Δ T and the average acceleration of the target motor after the nth-1 th tachometer period ends isUnder the conditions that the end time of the N-1 th speed measuring period is T6 and the end time of the N-i speed measuring period is T3, the first time interval is 3 delta T, and the average acceleration of the target motor after the N-1 th speed measuring period is ended is

In the process of acquiring the average acceleration of the target motor after the N-1 speed measuring period is finished, the processor acquires the actual rotating speed of the target motor at the end moment of the N-1 speed measuring period and the actual rotating speed of the target motor at the end moment of the N-i speed measuring period; determining a first time interval from the end time of the (N-1) th speed measuring period to the end time of the (N-i) th speed measuring period; and acquiring the average acceleration of the target motor after the N-1 speed measuring period is finished according to the actual rotating speed of the target motor at the end moment of the N-1 speed measuring period, the actual rotating speed of the target motor at the end moment of the N-i speed measuring period and the first time interval. Through the embodiment of the disclosure, the processor determines two actual rotating speeds and the first time interval according to the running condition of the target motor, so that the corresponding acceleration is determined according to different running conditions, and the acceleration at the end moment of the N-1 th speed measurement period can be more accurate and more accord with the running condition of the target motor.

In an embodiment, as shown in fig. 6, the step of obtaining the actual rotation speed of the target motor at the end of the nth tachometer period may include:

step 501, obtaining the number of pulses in the nth tachometer period.

The processor may record the occurrence time of each pulse, and then count the number of pulses in each tachometer period according to the occurrence time of each pulse.

As shown in fig. 7, the number of pulses in the 1 st tachometer period is 1, the number of pulses in the 2 nd tachometer period is 3, the number of pulses in the 3 rd tachometer period is 1, the numbers of pulses in the 4 th tachometer period and the 5 th tachometer period are both 0, and the numbers of pulses in the 6 th tachometer period and the 7 th tachometer period are both 1.

Step 502, if the number of pulses in the nth speed measurement period is greater than 0, determining a second time interval according to the occurrence time of the last pulse before the nth speed measurement period and the occurrence time of the last pulse in the nth speed measurement period.

As shown in fig. 7, the 1 st tachometer period is the initial tachometer period, and no pulse occurs before the 1 st tachometer period, so for the special 1 st tachometer period, the second time interval Δ t is determined according to the tachometer initial time to the occurrence time of the last pulse of the 1 st tachometer period1

For other tachometry periods except the 1 st tachometry period, as shown in fig. 7, the number of pulses in the 2 nd tachometry period is greater than 0, the last pulse before the 2 nd tachometry period occurs in the 1 st tachometry period, and then the second time interval is determined to be Δ t according to the occurrence time of the last pulse in the 1 st tachometry period and the occurrence time of the last pulse in the 2 nd tachometry period2. For another example, if the number of pulses in the 7 th tachometer period is greater than 0, and the last pulse before the 7 th tachometer period occurs in the 6 th tachometer period, the second time interval is determined to be Δ t according to the occurrence time of the last pulse in the 6 th tachometer period and the occurrence time of the last pulse in the 7 th tachometer period7

Step 503, calculating the actual rotation speed of the target motor at the end of the nth speed measuring period according to the number of pulses in the nth speed measuring period and the second time interval.

For the 1 st tachometer period, the number of pulses 1 in the 1 st tachometer period and the second time interval Δ t are calculated1And determining the ratio as the actual rotating speed of the target motor at the end of the 1 st tachometer period.

For other tachometer periods except the 1 st tachometer period, such as the 2 nd tachometer period, the pulse number 3 and the second time interval Δ t in the 2 nd tachometer period are calculated2And determining the ratio as the actual rotating speed of the target motor at the end of the 2 nd speed measuring period.

Step 504, if the number of pulses in the nth speed measurement period is equal to 0, determining a third time interval according to the occurrence time of the last pulse before the nth speed measurement period and the end time of the nth speed measurement period.

As shown in fig. 7, if the number of pulses in the 4 th tachometer period is equal to 0, and the occurrence time of the last pulse before the 4 th tachometer period is within the 3 rd tachometer period, the third time interval is Δ t according to the occurrence time of the last pulse in the 3 rd tachometer period and the end time of the 4 th tachometer period4

As will be appreciated, the third time interval is the time interval Δ t between the occurrence of the last pulse in the 3 rd tachometer cycle and the end of the 3 rd tachometer cycle3' and the sum of the duration of the 4 th tacho period, Δ T.

And 505, calculating the actual rotating speed of the target motor at the end moment of the nth speed measuring period according to the last pulse before the nth speed measuring period and the third time interval.

Determining the number of pulses according to the last pulse before the nth tachometer period, which may include: if the time interval between the last pulse before the Nth speed measuring period and the end moment of the Nth speed measuring period is less than the preset time length, determining that the number of pulses is 1; and if the time interval between the last pulse before the Nth speed measuring period and the end moment of the Nth speed measuring period is greater than the preset time length, determining that the number of the pulses is 0. And after the pulse number is determined, calculating the ratio of the pulse number to the third time interval, and determining the ratio as the actual rotating speed of the target motor at the end of the Nth tachometer period.

As shown in FIG. 7, the number of pulses is determined to be 1 according to the last pulse of the 3 rd tachometer period before the 4 th tachometer period, and the third time interval is Δ t4Then the actual rotation speed of the target motor at the end of the 4 th tachometer period is

The second time interval and the third time interval are determined by using the last pulse before the nth tachometer period. In practical application, it is also possible to find out the speed measurement period before the nth speed measurement period, where the number of pulses is greater than 0 and is closest to the nth speed measurement period, and then determine the second time interval and the third time interval according to the occurrence time of the first pulse in the speed measurement period.

As shown in fig. 8, the number of pulses in the 3 rd tachometer period is greater than 0, before the 3 rd tachometer period, the number of pulses is greater than 0, and the 2 nd tachometer period is closest to the 3 rd tachometer period, and then the second time interval Δ t is determined according to the occurrence time of the first pulse in the 2 nd tachometer period and the occurrence time of the first pulse in the 3 rd tachometer period3

It will be appreciated that the instant of occurrence of the first pulse in each tachometer period is easier to determine than the instant of occurrence of the last pulse, and therefore it is also easier to calculate the second and third time intervals using the instant of occurrence of the first pulse in each tachometer period.

In one embodiment, a timing signal is used to calculate the time interval. As shown in fig. 9, the timing signal is a falling edge at the end of each tacho period and a rising edge at the occurrence of each pulse. If the number of pulses in one tachometer period is 0, the timing signal is always at a low level in the tachometer period. Thus, the second time interval or the third time interval can be determined from the position of the rising edge.

In the process of obtaining the actual rotating speed of the target motor at the end of the nth speed measuring period, the processor obtains the number of pulses in the nth speed measuring period, then determines the time interval to be used according to the number of pulses in the nth speed measuring period, and finally calculates the actual rotating speed of the target motor at the end of the nth speed measuring period according to the number of pulses and the determined time interval. Through the embodiment of the disclosure, the processor adjusts the time interval for calculating the actual rotating speed of the target motor, so that the pulse number is more matched with the time interval, and the calculated actual rotating speed is more accurate.

It should be understood that, although the steps in the flowcharts of fig. 2 to 6 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2 to 6 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the other steps or stages.

In one embodiment, as shown in fig. 10, there is provided a motor speed measuring device including:

a rotation speed obtaining module 601, configured to obtain, after an nth speed measurement period for measuring the speed of the target motor is ended, an actual rotation speed of the target motor at the end of the nth speed measurement period, an average acceleration of the target motor after the nth-1 speed measurement period is ended, and a corrected rotation speed of the target motor after the nth-1 speed measurement period is ended; the starting time of the Nth speed measuring period is the ending time of the (N-1) th speed measuring period;

an estimated rotation speed determining module 602, configured to determine an estimated rotation speed of the target motor at the end of the nth speed measurement period according to the average acceleration of the target motor after the nth-1 speed measurement period is ended and the corrected rotation speed of the target motor after the nth-1 speed measurement period is ended;

and a corrected rotation speed determining module 603, configured to determine, according to the actual rotation speed and the estimated rotation speed of the target motor at the end of the nth speed measurement period, a corrected rotation speed of the target motor after the end of the nth speed measurement period.

In one embodiment, the estimated rotation speed determining module 602 is specifically configured to determine a rotation speed variation of the target motor in an nth speed measuring period according to an average acceleration of the target motor after the nth-1 speed measuring period is ended and a duration of the nth speed measuring period; and determining the estimated rotating speed of the target motor at the end moment of the Nth speed measuring period according to the corrected rotating speed of the target motor after the Nth-1 speed measuring period is ended and the rotating speed variation of the target motor in the Nth speed measuring period.

In one embodiment, the corrected rotation speed determining module 603 is specifically configured to calculate an average value of an actual rotation speed and an estimated rotation speed of the target motor at the end of the nth speed measurement period, and determine the calculated average value as the corrected rotation speed of the target motor after the end of the nth speed measurement period.

In one embodiment, the rotation speed obtaining module 601 includes:

the first rotation speed obtaining submodule is used for obtaining the actual rotation speed of the target motor at the end moment of the N-1 th speed measuring period and the actual rotation speed of the target motor at the end moment of the N-i th speed measuring period; wherein N-1 is greater than N-i;

the first time interval determining submodule is used for determining a first time interval from the end time of the (N-1) th speed measuring period to the end time of the (N-i) th speed measuring period;

and the acceleration determining submodule is used for acquiring the average acceleration of the target motor after the N-1 speed measuring period is finished according to the actual rotating speed of the target motor at the end moment of the N-1 speed measuring period, the actual rotating speed of the target motor at the end moment of the N-i speed measuring period and the first time interval.

In one embodiment, the acceleration determining submodule is specifically configured to calculate a rotation speed difference between an actual rotation speed of the target motor at the end of the N-1 th speed measurement period and an actual rotation speed of the target motor at the end of the N-i th speed measurement period; and calculating the ratio of the rotating speed difference value to the first time interval, and determining the ratio as the average acceleration of the target motor after the N-1 th speed measurement period is finished.

In one embodiment, the rotation speed obtaining module 601 is specifically configured to obtain the number of pulses in an nth speed measurement period; if the number of pulses in the Nth speed measuring period is larger than 0, determining a second time interval according to the appearance time of the last pulse before the Nth speed measuring period and the appearance time of the last pulse in the Nth speed measuring period; and calculating the actual rotating speed of the target motor at the end moment of the Nth speed measuring period according to the pulse number in the Nth speed measuring period and the second time interval.

In one embodiment, the rotation speed obtaining module 601 is further configured to determine a third time interval according to an occurrence time of a last pulse before an nth speed measurement period and an end time of the nth speed measurement period if the number of pulses in the nth speed measurement period is equal to 0; and calculating the actual rotating speed of the target motor at the end moment of the Nth speed measuring period according to the last pulse before the Nth speed measuring period and the third time interval.

For specific limitations of the motor speed measuring device, reference may be made to the above limitations of the motor speed measuring method, which are not described herein again. All or part of each module in the motor speed measuring device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.

In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 11. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of measuring speed of a motor. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.

Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.

In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:

after the Nth speed measuring period for measuring the speed of the target motor is finished, acquiring the actual rotating speed of the target motor at the end moment of the Nth speed measuring period, the average acceleration of the target motor after the Nth-1 speed measuring period is finished and the corrected rotating speed of the target motor after the Nth-1 speed measuring period is finished; the starting time of the Nth speed measuring period is the ending time of the (N-1) th speed measuring period;

determining the estimated rotation speed of the target motor at the end of the Nth speed measuring period according to the average acceleration of the target motor after the end of the Nth-1 speed measuring period and the corrected rotation speed of the target motor after the end of the Nth-1 speed measuring period;

and determining the corrected rotating speed of the target motor after the Nth speed measuring period is finished according to the actual rotating speed and the estimated rotating speed of the target motor at the end of the Nth speed measuring period.

In one embodiment, the processor, when executing the computer program, further performs the steps of:

determining the rotation speed variation of the target motor in the Nth speed measuring period according to the average acceleration of the target motor after the Nth-1 speed measuring period is finished and the duration of the Nth speed measuring period;

and determining the estimated rotating speed of the target motor at the end moment of the Nth speed measuring period according to the corrected rotating speed of the target motor after the Nth-1 speed measuring period is ended and the rotating speed variation of the target motor in the Nth speed measuring period.

In one embodiment, the processor, when executing the computer program, further performs the steps of:

and calculating the average value of the actual rotating speed and the estimated rotating speed of the target motor at the end of the Nth speed measuring period, and determining the calculated average value as the corrected rotating speed of the target motor after the Nth speed measuring period is ended.

In one embodiment, the processor, when executing the computer program, further performs the steps of:

acquiring the actual rotating speed of the target motor at the end moment of the (N-1) th speed measuring period and the actual rotating speed of the target motor at the end moment of the (N-i) th speed measuring period; wherein N-1 is greater than N-i;

determining a first time interval from the end time of the (N-1) th speed measuring period to the end time of the (N-i) th speed measuring period;

and acquiring the average acceleration of the target motor after the N-1 speed measuring period is finished according to the actual rotating speed of the target motor at the end moment of the N-1 speed measuring period, the actual rotating speed of the target motor at the end moment of the N-i speed measuring period and the first time interval.

In one embodiment, the processor, when executing the computer program, further performs the steps of:

calculating a rotation speed difference value between the actual rotation speed of the target motor at the end moment of the N-1 th speed measuring period and the actual rotation speed of the target motor at the end moment of the N-i th speed measuring period;

and calculating the ratio of the rotating speed difference value to the first time interval, and determining the ratio as the average acceleration of the target motor after the N-1 th speed measurement period is finished.

In one embodiment, the processor, when executing the computer program, further performs the steps of:

acquiring the number of pulses in the Nth speed measuring period;

if the number of pulses in the Nth speed measuring period is larger than 0, determining a second time interval according to the appearance time of the last pulse before the Nth speed measuring period and the appearance time of the last pulse in the Nth speed measuring period;

and calculating the actual rotating speed of the target motor at the end moment of the Nth speed measuring period according to the pulse number in the Nth speed measuring period and the second time interval.

In one embodiment, the processor, when executing the computer program, further performs the steps of:

if the number of pulses in the Nth speed measuring period is equal to 0, determining a third time interval according to the appearance moment of the last pulse before the Nth speed measuring period and the end moment of the Nth speed measuring period;

and calculating the actual rotating speed of the target motor at the end moment of the Nth speed measuring period according to the last pulse before the Nth speed measuring period and the third time interval.

In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:

after the Nth speed measuring period for measuring the speed of the target motor is finished, acquiring the actual rotating speed of the target motor at the end moment of the Nth speed measuring period, the average acceleration of the target motor after the Nth-1 speed measuring period is finished and the corrected rotating speed of the target motor after the Nth-1 speed measuring period is finished; the starting time of the Nth speed measuring period is the ending time of the (N-1) th speed measuring period;

determining the estimated rotation speed of the target motor at the end of the Nth speed measuring period according to the average acceleration of the target motor after the end of the Nth-1 speed measuring period and the corrected rotation speed of the target motor after the end of the Nth-1 speed measuring period;

and determining the corrected rotating speed of the target motor after the Nth speed measuring period is finished according to the actual rotating speed and the estimated rotating speed of the target motor at the end of the Nth speed measuring period.

In one embodiment, the computer program when executed by the processor further performs the steps of:

determining the rotation speed variation of the target motor in the Nth speed measuring period according to the average acceleration of the target motor after the Nth-1 speed measuring period is finished and the duration of the Nth speed measuring period;

and determining the estimated rotating speed of the target motor at the end moment of the Nth speed measuring period according to the corrected rotating speed of the target motor after the Nth-1 speed measuring period is ended and the rotating speed variation of the target motor in the Nth speed measuring period.

In one embodiment, the computer program when executed by the processor further performs the steps of:

and calculating the average value of the actual rotating speed and the estimated rotating speed of the target motor at the end of the Nth speed measuring period, and determining the calculated average value as the corrected rotating speed of the target motor after the Nth speed measuring period is ended.

In one embodiment, the computer program when executed by the processor further performs the steps of:

acquiring the actual rotating speed of the target motor at the end moment of the (N-1) th speed measuring period and the actual rotating speed of the target motor at the end moment of the (N-i) th speed measuring period; wherein N-1 is greater than N-i;

determining a first time interval from the end time of the (N-1) th speed measuring period to the end time of the (N-i) th speed measuring period;

and acquiring the average acceleration of the target motor after the N-1 speed measuring period is finished according to the actual rotating speed of the target motor at the end moment of the N-1 speed measuring period, the actual rotating speed of the target motor at the end moment of the N-i speed measuring period and the first time interval.

In one embodiment, the computer program when executed by the processor further performs the steps of:

calculating a rotation speed difference value between the actual rotation speed of the target motor at the end moment of the N-1 th speed measuring period and the actual rotation speed of the target motor at the end moment of the N-i th speed measuring period;

and calculating the ratio of the rotating speed difference value to the first time interval, and determining the ratio as the average acceleration of the target motor after the N-1 th speed measurement period is finished.

In one embodiment, the computer program when executed by the processor further performs the steps of:

acquiring the number of pulses in the Nth speed measuring period;

if the number of pulses in the Nth speed measuring period is larger than 0, determining a second time interval according to the appearance time of the last pulse before the Nth speed measuring period and the appearance time of the last pulse in the Nth speed measuring period;

and calculating the actual rotating speed of the target motor at the end moment of the Nth speed measuring period according to the pulse number in the Nth speed measuring period and the second time interval.

In one embodiment, the computer program when executed by the processor further performs the steps of:

if the number of pulses in the Nth speed measuring period is equal to 0, determining a third time interval according to the appearance moment of the last pulse before the Nth speed measuring period and the end moment of the Nth speed measuring period;

and calculating the actual rotating speed of the target motor at the end moment of the Nth speed measuring period according to the last pulse before the Nth speed measuring period and the third time interval.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.

The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.

The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:测风器及气象站

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!