Motor speed measurement method, device, computer equipment and storage medium
By obtaining and using the actual speed, average acceleration and corrected speed of the motor in the motor speed measurement method, calculating and applying the estimated speed to correct the actual speed, the error problem caused by the fluctuation of the motor speed is solved and the speed measurement accuracy is improved.
Patent Information
- Application Number
- CN202110881706.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-02
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2041-08-02
AI Technical Summary
The existing motor speed measurement method causes large speed fluctuations under the influence of load and operating environment, which leads to fluctuation errors.
By obtaining the actual speed, average acceleration and correction speed of the target motor, calculate the estimated speed and correct the actual speed to reduce the error caused by the speed fluctuation.
Effectively reduce speed fluctuations, reduce errors caused by speed fluctuations, and improve speed measurement accuracy.
Smart Images

Figure CN113804914B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of motor speed measurement, and in particular to a motor speed measurement method, device, computer equipment and storage medium. Background Art
[0002] As one of the important indicators of various motors, motor speed plays a very important role in the control system. At present, the motor speed is usually obtained by first detecting the number of pulses output by the photoelectric pulse encoder coaxially connected to the motor, and then calculating it based on the number of pulses. Common motor speed measurement methods include: M method, T method and M / T method.
[0003] Based on the M method, T method and M / T method, a speed measurement scheme is proposed to further improve the measurement accuracy. This speed measurement scheme is to obtain the actual interval time between pulses and calculate the motor speed based on the actual interval time between pulses and the number of pulses.
[0004] However, affected by the load and operating environment, the above speed measurement scheme may result in large fluctuations in the measured motor speed, which may lead to fluctuation errors. Summary of the invention
[0005] Based on this, it is necessary to provide a motor speed measurement method, device, computer equipment and storage medium that can reduce the fluctuation error caused by speed fluctuation in order to solve the above technical problems.
[0006] A motor speed measurement method, the method comprising:
[0007] After the Nth speed measurement cycle of measuring the speed of the target motor ends, the actual speed of the target motor at the end of the Nth speed measurement cycle, the average acceleration of the target motor after the end of the N-1th speed measurement cycle, and the corrected speed of the target motor after the end of the N-1th speed measurement cycle are obtained; wherein the start time of the Nth speed measurement cycle is the end time of the N-1th speed measurement cycle;
[0008] Determine the estimated speed of the target motor at the end of the Nth speed measurement cycle according to the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the corrected speed of the target motor after the end of the N-1th speed measurement cycle;
[0009] According to the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement period, a correction speed of the target motor after the end of the Nth speed measurement period is determined.
[0010] In one embodiment, determining the estimated speed of the target motor at the end of the Nth speed measurement cycle according to the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the corrected speed of the target motor after the end of the N-1th speed measurement cycle includes:
[0011] Determine the speed change of the target motor in the Nth speed measurement period according to the average acceleration of the target motor after the N-1th speed measurement period and the duration of the Nth speed measurement period;
[0012] The estimated speed of the target motor at the end of the N-1th speed measurement cycle is determined according to the corrected speed of the target motor after the end of the N-1th speed measurement cycle and the speed change of the target motor in the Nth speed measurement cycle.
[0013] In one embodiment, determining the corrected speed of the target motor after the Nth speed measurement period ends according to the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement period includes:
[0014] The average value of the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement cycle is calculated, and the calculated average value is determined as the corrected speed of the target motor after the end of the Nth speed measurement cycle.
[0015] In one embodiment, the process of obtaining the average acceleration of the target motor after the N-1th speed measurement cycle ends includes:
[0016] Obtain the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle; wherein N-1 is greater than Ni;
[0017] Determine a first time interval between the end time of the N-1th speed measurement cycle and the end time of the Nith speed measurement cycle;
[0018] According to the actual speed of the target motor at the end of the N-1th speed measurement cycle, the actual speed of the target motor at the end of the Nith speed measurement cycle, and the first time interval, the average acceleration of the target motor after the end of the N-1th speed measurement cycle is obtained.
[0019] In one embodiment, obtaining the average acceleration of the target motor after the end of the N-1th speed measurement cycle according to the actual speed of the target motor at the end of the N-1th speed measurement cycle, the actual speed of the target motor at the end of the Nith speed measurement cycle, and the first time interval includes:
[0020] Calculate the speed difference between the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle;
[0021] The ratio between the speed difference and the first time interval is calculated, and the ratio is determined as the average acceleration of the target motor after the N-1th speed measurement cycle ends.
[0022] In one embodiment, the obtaining of the actual speed of the target motor at the end of the Nth speed measurement cycle includes:
[0023] Get the number of pulses in the Nth speed measurement cycle;
[0024] If the number of pulses in the Nth speed measurement cycle is greater than 0, the second time interval is determined according to the appearance time of the last pulse before the Nth speed measurement cycle and the appearance time of the last pulse in the Nth speed measurement cycle;
[0025] The actual speed of the target motor at the end of the Nth speed measurement period is calculated according to the number of pulses in the Nth speed measurement period and the second time interval.
[0026] In one embodiment, after obtaining the number of pulses in the Nth speed measurement cycle, the method further includes:
[0027] If the number of pulses in the Nth speed measurement cycle is equal to 0, the third time interval is determined according to the occurrence time of the last pulse before the Nth speed measurement cycle and the end time of the Nth speed measurement cycle;
[0028] The actual speed of the target motor at the end of the Nth speed measurement cycle is calculated according to the last pulse before the Nth speed measurement cycle and the third time interval.
[0029] A motor speed measuring device, comprising:
[0030] A speed acquisition module is used to obtain, after the Nth speed measurement cycle for measuring the speed of the target motor ends, the actual speed of the target motor at the end of the Nth speed measurement cycle, the average acceleration of the target motor after the end of the N-1th speed measurement cycle, and the corrected speed of the target motor after the end of the N-1th speed measurement cycle; wherein the start time of the Nth speed measurement cycle is the end time of the N-1th speed measurement cycle;
[0031] An estimated speed determination module is used to determine the estimated 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 N-1th speed measurement period and the corrected speed of the target motor after the end of the N-1th speed measurement period;
[0032] The correction speed determination module is used to determine the correction speed of the target motor after the end of the Nth speed measurement cycle according to the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement cycle.
[0033] In one of the embodiments, the above-mentioned estimated speed determination module is specifically used to determine the speed change of the target motor within the Nth speed measurement cycle based on the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the duration of the Nth speed measurement cycle; determine the estimated speed of the target motor at the end of the Nth speed measurement cycle based on the corrected speed of the target motor after the end of the N-1th speed measurement cycle and the speed change of the target motor within the Nth speed measurement cycle.
[0034] In one embodiment, the correction speed determination module is specifically used to calculate the average value of the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement cycle, and determine the calculated average value as the correction speed of the target motor after the end of the Nth speed measurement cycle.
[0035] In one embodiment, the rotation speed acquisition module includes:
[0036] The first speed acquisition submodule is used to acquire the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle; wherein N-1 is greater than Ni;
[0037] A first time interval determination submodule, used to determine a first time interval between the end time of the N-1th speed measurement cycle and the end time of the Nith speed measurement cycle;
[0038] The acceleration determination submodule is used to obtain the average acceleration of the target motor after the end of the N-1th speed measurement cycle according to the actual speed of the target motor at the end of the N-1th speed measurement cycle, the actual speed of the target motor at the end of the Nith speed measurement cycle and the first time interval.
[0039] In one of the embodiments, the acceleration determination submodule is specifically used to calculate the speed difference between the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle; calculate the ratio between the speed difference and the first time interval, and determine the ratio as the average acceleration of the target motor after the end of the N-1th speed measurement cycle.
[0040] In one of the embodiments, the above-mentioned speed acquisition module is specifically used to obtain the number of pulses in the Nth speed measurement cycle; if the number of pulses in the Nth speed measurement cycle is greater than 0, the second time interval is determined according to the occurrence time of the last pulse before the Nth speed measurement cycle and the occurrence time of the last pulse in the Nth speed measurement cycle; the actual speed of the target motor at the end of the Nth speed measurement cycle is calculated according to the number of pulses in the Nth speed measurement cycle and the second time interval.
[0041] In one of the embodiments, the above-mentioned speed acquisition module is also used to determine the third time interval based on the occurrence time of the last pulse before the Nth speed measurement cycle and the end time of the Nth speed measurement cycle if the number of pulses in the Nth speed measurement cycle is equal to 0; and calculate the actual speed of the target motor at the end time of the Nth speed measurement cycle based on the last pulse before the Nth speed measurement cycle and the third time interval.
[0042] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0043] After the Nth speed measurement cycle of measuring the speed of the target motor ends, the actual speed of the target motor at the end of the Nth speed measurement cycle, the average acceleration of the target motor after the end of the N-1th speed measurement cycle, and the corrected speed of the target motor after the end of the N-1th speed measurement cycle are obtained; wherein the start time of the Nth speed measurement cycle is the end time of the N-1th speed measurement cycle;
[0044] Determine the estimated speed of the target motor at the end of the Nth speed measurement cycle according to the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the corrected speed of the target motor after the end of the N-1th speed measurement cycle;
[0045] According to the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement period, a correction speed of the target motor after the end of the Nth speed measurement period is determined.
[0046] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0047] After the Nth speed measurement cycle of measuring the speed of the target motor ends, the actual speed of the target motor at the end of the Nth speed measurement cycle, the average acceleration of the target motor after the end of the N-1th speed measurement cycle, and the corrected speed of the target motor after the end of the N-1th speed measurement cycle are obtained; wherein the start time of the Nth speed measurement cycle is the end time of the N-1th speed measurement cycle;
[0048] Determine the estimated speed of the target motor at the end of the Nth speed measurement cycle according to the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the corrected speed of the target motor after the end of the N-1th speed measurement cycle;
[0049] According to the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement period, a correction speed of the target motor after the end of the Nth speed measurement period is determined.
[0050] According to the motor speed measurement method, device, computer equipment and storage medium, after the Nth speed measurement cycle for measuring the speed of the target motor ends, the processor obtains the actual speed of the target motor at the end of the Nth speed measurement cycle, the average acceleration of the target motor after the end of the N-1th speed measurement cycle, and the corrected speed of the target motor after the end of the N-1th speed measurement cycle; determines the estimated speed of the target motor at the end of the Nth speed measurement cycle according to the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the corrected speed of the target motor after the end of the N-1th speed measurement cycle; determines the corrected speed of the target motor after the end of the Nth speed measurement cycle according to the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement cycle. Through the embodiments of the present disclosure, the processor estimates the operating state of the target motor at the end of the Nth speed measurement cycle according to the operating state of the target motor at the end of the N-1th speed measurement cycle, and uses the estimated estimated speed to correct the actual speed, which can reduce speed fluctuations, thereby reducing errors caused by speed fluctuations. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A diagram showing an application environment of a motor speed measurement method in an embodiment;
[0052] Figure 2 Schematic diagram of a flow chart of a motor speed measurement method in one embodiment;
[0053] Figure 3 A schematic diagram of comparing a corrected rotation speed with an actual rotation speed in one embodiment;
[0054] Figure 4 It is a flowchart of a step of determining an estimated speed of a target motor at the end of an Nth speed measurement cycle in one embodiment;
[0055] Figure 5 A schematic diagram of a flow chart of a step of obtaining an average acceleration of a target motor after the N-1th speed measurement cycle ends in one embodiment;
[0056] Figure 6 A schematic diagram of a flow chart of a step of obtaining the actual speed of the target motor at the end of the Nth speed measurement cycle in an embodiment;
[0057] Figure 7 One of the schematic diagrams of the speed measurement cycle and pulse in one embodiment;
[0058] Figure 8 The second schematic diagram of a speed measurement cycle and a pulse in one embodiment;
[0059] Fig. 9 is a schematic diagram of a timing signal in one embodiment;
[0060] Fig.10 is a structural block diagram of a motor speed measuring device in one embodiment;
[0061] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0063] The motor speed measurement method provided in this application can be applied to Figure 1 In the application environment shown. The application environment includes a motor 101, a speed sensor 102 and a processor 103; during the rotation of the motor 101, the speed sensor 102 detects the speed of the motor 101 and outputs pulses according to the detection result; the processor 103 determines the speed of the motor 101 according to the number of pulses output by the speed sensor 102. Among them, the motor 101 can be but not limited to a high-precision motor in a servo system; the speed sensor can be but not limited to a photoelectric pulse encoder; the processor 103 can be but not limited to various FPGAs (Field Programmable Gate Arrays) and CPUs (Central Processing Units).
[0064] In one embodiment, Figure 2 As shown, a motor speed measurement method is provided, which is applied to Figure 1 The processor in the example is used to illustrate, including the following steps:
[0065] Step 201, after the Nth speed measurement cycle of measuring the speed of the target motor ends, obtain the actual speed of the target motor at the end of the Nth speed measurement cycle, the average acceleration of the target motor after the N-1th speed measurement cycle ends, and the corrected speed of the target motor after the N-1th speed measurement cycle ends.
[0066] Among them, N is a positive integer greater than 1; the start time of the Nth speed measurement cycle is the end time of the N-1th speed measurement cycle, that is, the N-1th speed measurement cycle and the Nth speed measurement cycle are two adjacent speed measurement cycles, and the duration of each speed measurement cycle is equal.
[0067] After the Nth speed measurement cycle of measuring the speed of the target motor ends, the processor can determine the actual speed of the target motor at the end of the Nth speed measurement cycle, and then need to correct the actual speed to reduce the actual speed fluctuation of the target motor. The embodiment of the present disclosure does not limit the measurement method of the actual speed, and can be set according to the actual situation.
[0068] Similarly, after the N-1th speed measurement cycle for measuring the speed of the target motor ends, the processor can also determine the actual speed of a target motor at the end of the N-1th speed measurement cycle, and use the same correction method to correct the actual speed at the end of the N-1th speed measurement cycle to obtain the corrected speed after the N-1th speed measurement cycle ends. Afterwards, the processor records the corrected speed of the target motor after the N-1th speed measurement cycle ends.
[0069] After each speed measurement cycle ends, the processor can obtain the actual speed of the target motor at the end of the speed measurement cycle. Based on the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of a speed measurement cycle before the N-1th speed measurement cycle, as well as the time interval between the two actual speeds, the average acceleration of the target motor after the end of the N-1th speed measurement cycle can be determined.
[0070] For example, at the end of the N-1th speed measurement cycle, the actual speed of the target motor is V N-1 , the actual speed of the target motor at the end of a certain speed measurement cycle before the N-1th speed measurement cycle is V x , the time interval between the two actual speeds is Δt, then the average acceleration of the target motor after the N-1th speed measurement cycle is
[0071] It can be understood that the actual rotation speed is the rotation speed calculated by the processor according to the number of pulses output by the speed sensor and the duration of the pulses.
[0072] Step 202 , determining an estimated speed of the target motor at the end of the Nth speed measurement cycle according to the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the corrected speed of the target motor after the end of the N-1th speed measurement cycle.
[0073] After obtaining the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the corrected speed of the target motor after the end of the N-1th speed measurement cycle, the processor can determine the speed change within the Nth speed measurement cycle based on the average acceleration of the target motor after the end of the N-1th speed measurement cycle, and then estimate the speed of the target motor at the end of the N speed measurement cycle based on the corrected speed of the target motor after the end of the N-1th speed measurement cycle and the speed change within the N speed measurement cycle to obtain the estimated speed of the target motor at the end of the N speed measurement cycle.
[0074] Step 203 , determining a correction speed of the target motor after the Nth speed measurement period ends according to the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement period.
[0075] After the processor obtains the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement cycle, it corrects the actual speed according to the estimated speed to obtain the corrected speed of the target motor after the Nth speed measurement cycle. The embodiment of the present disclosure does not limit the correction method and can be set according to actual conditions. Figure 3 As shown, after the correction processing, the correction speed has smaller fluctuations than the actual speed and is more consistent with the expected speed.
[0076] In the above motor speed measurement method, after the Nth speed measurement cycle for measuring the speed of the target motor ends, the processor obtains the actual speed of the target motor at the end of the Nth speed measurement cycle, the average acceleration of the target motor after the end of the N-1th speed measurement cycle, and the corrected speed of the target motor after the end of the N-1th speed measurement cycle; the estimated speed of the target motor at the end of the Nth speed measurement cycle is determined according to the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the corrected speed of the target motor after the end of the N-1th speed measurement cycle; the corrected speed of the target motor after the end of the Nth speed measurement cycle is determined according to the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement cycle. Through the embodiments of the present disclosure, the processor estimates the operating state of the target motor at the end of the Nth speed measurement cycle according to the operating state of the target motor at the end of the N-1th speed measurement cycle, and uses the estimated estimated speed to correct the actual speed, which can reduce speed fluctuations, thereby reducing errors caused by speed fluctuations.
[0077] In one embodiment, Figure 4 As shown, the step of determining the estimated speed of the target motor at the end of the Nth speed measurement cycle according to the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the corrected speed of the target motor after the end of the N-1th speed measurement cycle may include:
[0078] Step 301 : determining the speed change of the target motor in the Nth speed measurement period according to the average acceleration of the target motor after the N-1th speed measurement period and the duration of the Nth speed measurement period.
[0079] For example, after the N-1th speed measurement cycle, the average acceleration of the target motor is a N-1 , the duration of the Nth speed measurement cycle is ΔT, then the speed change of the target motor in the Nth speed measurement cycle is ΔV N =a N-1 *ΔT. Considering the operating environment of the target motor (such as load conditions, damping state, etc.) and the fluctuation feedback of the actual speed, the weight parameter k can also be set, so that the speed change of the target motor in the Nth speed measurement cycle is ΔV N =k N *a N-1 *ΔT, where k Nis the weight parameter corresponding to the Nth speed measurement period. The embodiment of the present disclosure does not limit the value of the weight parameter, and it can be set according to actual conditions.
[0080] Step 302 , determining the estimated speed of the target motor at the end of the Nth speed measurement cycle according to the corrected speed of the target motor after the end of the N-1th speed measurement cycle and the speed change of the target motor in the Nth speed measurement cycle.
[0081] After the processor obtains the speed change of the target motor in the Nth speed measurement cycle and the corrected speed of the target motor after the end of the N-1th speed measurement cycle, it calculates the sum of the speed change of the target motor in the Nth speed measurement cycle and the corrected speed of the target motor after the end of the N-1th speed measurement cycle to obtain the estimated speed of the target motor at the end of the Nth speed measurement cycle.
[0082] For example, after the N-1th speed measurement cycle, the corrected speed of the target motor is V' N-1 , the speed change of the target motor in the Nth speed measurement cycle is ΔV N , then the estimated speed of the target motor at the end of the Nth speed measurement cycle is V" N =V' N-1 +ΔV N =V' N-1 +k N *a N-1 *ΔT.
[0083] like Figure 3 As shown, assuming that the Nth speed measurement cycle is the 7th speed measurement cycle, and the end time of the Nth speed measurement cycle is T7, the speed change of the target motor in the 7th speed measurement cycle is ΔV7=k7*a6*ΔT, and the estimated speed of the target motor at the end of the 7th speed measurement cycle is V"7=V'6+ΔV7=V'6+k7*a6*ΔT.
[0084] In the above process of determining the estimated speed of the target motor at the end of the Nth speed measurement cycle, the processor determines the speed change of the target motor in the Nth speed measurement cycle according to the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the duration of the Nth speed measurement cycle; and determines the estimated speed of the target motor at the end of the Nth speed measurement cycle according to the corrected speed of the target motor after the end of the N-1th speed measurement cycle and the speed change of the target motor in the Nth speed measurement cycle. Through the embodiment of the present disclosure, the processor estimates the operating state of the target motor at the end of the Nth speed measurement cycle according to the operating state of the target motor at the end of the N-1th speed measurement cycle, so as to obtain the estimated speed and perform correction processing on the actual speed.
[0085] In one embodiment, the above-mentioned determination of the corrected speed of the target motor after the end of the N speed measurement cycle based on the actual speed and the estimated speed of the target motor at the end of the N speed measurement cycle includes: calculating the average value of the actual speed and the estimated speed of the target motor at the end of the N speed measurement cycle, and determining the calculated average value as the corrected speed of the target motor after the end of the N speed measurement cycle.
[0086] In the embodiment of the present disclosure, the actual speed of the target motor at the end of the Nth speed measurement cycle is V N , the estimated speed is V" N , then the corrected speed of the target motor after the Nth speed measurement cycle is
[0087] In practical applications, the actual speed is corrected using the estimated speed. The actual speed and the estimated speed of the target motor at the end of the Nth speed measurement cycle can be weighted and summed, and the calculated sum is determined as the corrected speed of the target motor after the Nth speed measurement cycle.
[0088] For example, the weight corresponding to the actual speed of the target motor at the end of the Nth speed measurement cycle is m1, and the weight corresponding to the estimated speed of the target motor at the end of the Nth speed measurement cycle is m2. Then, the corrected speed of the target motor after the Nth speed measurement cycle is V' N =V N *m1+V” N *m2. The disclosed embodiment does not limit the calculation method of the correction speed.
[0089] In the above process of determining the corrected speed of the target motor after the end of the Nth speed measurement cycle, the average of the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement cycle is calculated, and the calculated average is determined as the corrected speed of the target motor after the end of the Nth speed measurement cycle. Through the embodiment of the present disclosure, the processor fully considers the actual measured speed and the speed estimated according to the previous speed measurement cycle, so the calculated corrected speed after the end of the Nth speed measurement cycle meets the expected value.
[0090] In one embodiment, Figure 5 As shown, the process of obtaining the average acceleration of the target motor after the N-1th speed measurement cycle ends may include:
[0091] Step 401, obtaining the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle.
[0092] Wherein, N-1 is greater than Ni, and i is a positive integer. If the N-1th speed measurement cycle is the 1st speed measurement cycle, the actual speed of the target motor at the end of the Nith speed measurement cycle is 0.
[0093] In practical applications, if the actual speed fluctuation of the target motor is not large, the Ni-th speed measurement cycle can be the speed measurement cycle before the N-1-th speed measurement cycle, that is, the N-2-th speed measurement cycle. Figure 3 As shown, the N-1th speed measurement cycle is the 6th speed measurement cycle, and the end time of the N-1th speed measurement cycle is T6; the Ni-th speed measurement cycle is the 5th speed measurement cycle, and the end time of the Ni-th speed measurement cycle is T5.
[0094] If the actual speed fluctuation of the target motor is large, the Ni-th speed measurement cycle can be separated from the N-1-th speed measurement cycle by more speed measurement cycles. Figure 3 As shown, the N-1th speed measurement cycle is the 6th speed measurement cycle, and the end time of the N-1th speed measurement cycle is T6; the Ni-th speed measurement cycle is the 3rd speed measurement cycle, and the end time of the Ni-th speed measurement cycle is T3.
[0095] The processor measures an actual rotation speed of a target motor at the end of each speed measurement cycle, and records the actual rotation speed of the target motor at the end of each speed measurement cycle.
[0096] Step 402, determining a first time interval between the end time of the N-1th speed measurement cycle and the end time of the Nith speed measurement cycle.
[0097] After determining the Nith speed measurement period according to the actual speed fluctuation of the target motor, the processor can correspondingly determine a first time interval between the end time of the N-1th speed measurement period and the end time of the Nith speed measurement period.
[0098] For example, when the end time of the N-1th speed measurement cycle is T6 and the end time of the Nith speed measurement cycle is T5, the first time interval is ΔT; when the end time of the N-1th speed measurement cycle is T6 and the end time of the Nith speed measurement cycle is T3, the first time interval is 3ΔT.
[0099] Step 403, obtaining the average acceleration of the target motor after the end of the N-1th speed measurement cycle according to the actual speed of the target motor at the end of the N-1th speed measurement cycle, the actual speed of the target motor at the end of the Nith speed measurement cycle, and the first time interval.
[0100] After the processor obtains the actual speed of the target motor at the end of the N-1th speed measurement cycle, the actual speed of the target motor at the end of the Nith speed measurement cycle, and the first time interval, it calculates the speed difference between the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle; then, it calculates the ratio between the speed difference and the first time interval, and determines the ratio as the average acceleration of the target motor after the end of the N-1th speed measurement cycle.
[0101] For example, when the end time of the N-1th speed measurement cycle is T6 and the end time of the Nith speed measurement cycle is T5, the first time interval is ΔT, and the average acceleration of the target motor after the end of the N-1th speed measurement cycle is When the end time of the N-1th speed measurement cycle is T6 and the end time of the Nith speed measurement cycle is T3, the first time interval is 3ΔT, and the average acceleration of the target motor after the end of the N-1th speed measurement cycle is
[0102] In the above process of obtaining the average acceleration of the target motor after the end of the N-1th speed measurement cycle, the processor obtains the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle; determines the first time interval between the end of the N-1th speed measurement cycle and the end of the Nith speed measurement cycle; and obtains the average acceleration of the target motor after the end of the N-1th speed measurement cycle according to the actual speed of the target motor at the end of the N-1th speed measurement cycle, the actual speed of the target motor at the end of the Nith speed measurement cycle, and the first time interval. Through the embodiment of the present disclosure, the processor determines two actual speeds and the first time interval according to the operating conditions of the target motor, thereby determining the corresponding acceleration according to different operating conditions, so that the acceleration at the end of the N-1th speed measurement cycle can be more accurate and more in line with the operating conditions of the target motor.
[0103] In one embodiment, Figure 6 As shown, the step of obtaining the actual speed of the target motor at the end of the Nth speed measurement cycle may include:
[0104] Step 501, obtaining the number of pulses in the Nth speed measurement cycle.
[0105] The processor may first record the occurrence time of each pulse, and then count the number of pulses in each speed measurement cycle according to the occurrence time of each pulse.
[0106] like Figure 7 As shown, the number of pulses in the 1st speed measurement cycle is 1, the number of pulses in the 2nd speed measurement cycle is 3, the number of pulses in the 3rd speed measurement cycle is 1, the number of pulses in the 4th speed measurement cycle and the 5th speed measurement cycle are both 0, and the number of pulses in the 6th speed measurement cycle and the 7th speed measurement cycle are both 1.
[0107] Step 502: If the number of pulses in the Nth speed measurement cycle is greater than 0, determine the second time interval according to the occurrence time of the last pulse before the Nth speed measurement cycle and the occurrence time of the last pulse in the Nth speed measurement cycle.
[0108] like Figure 7As shown, the first speed measurement cycle is the starting speed measurement cycle. Since no pulse appears before the first speed measurement cycle, for the special first speed measurement cycle, the second time interval Δt1 is determined according to the time from the start of the speed measurement to the time when the last pulse of the first speed measurement cycle appears.
[0109] For other speed measurement cycles other than the first speed measurement cycle, such as Figure 7 As shown, if the number of pulses in the second speed measurement cycle is greater than 0, and the last pulse before the second speed measurement cycle appears in the first speed measurement cycle, the second time interval is determined to be Δt2 according to the appearance time of the last pulse in the first speed measurement cycle and the appearance time of the last pulse in the second speed measurement cycle. For another example, if the number of pulses in the seventh speed measurement cycle is greater than 0, and the last pulse before the seventh speed measurement cycle appears in the sixth speed measurement cycle, the second time interval is determined to be Δt7 according to the appearance time of the last pulse in the sixth speed measurement cycle and the appearance time of the last pulse in the seventh speed measurement cycle.
[0110] Step 503 , calculating the actual speed of the target motor at the end of the Nth speed measurement period according to the number of pulses in the Nth speed measurement period and the second time interval.
[0111] For the first speed measurement cycle, the ratio between the pulse number 1 in the first speed measurement cycle and the second time interval Δt1 is calculated, and the ratio is determined as the actual speed of the target motor at the end of the first speed measurement cycle.
[0112] For other speed measurement cycles other than the first speed measurement cycle, such as the second speed measurement cycle, the ratio between the number of pulses 3 in the second speed measurement cycle and the second time interval Δt2 is calculated, and the ratio is determined as the actual speed of the target motor at the end of the second speed measurement cycle.
[0113] Step 504: if the number of pulses in the Nth speed measurement cycle is equal to 0, determine the third time interval according to the occurrence time of the last pulse before the Nth speed measurement cycle and the end time of the Nth speed measurement cycle.
[0114] like Figure 7 As shown, the number of pulses in the 4th speed measurement cycle is equal to 0, and the occurrence time of the last pulse before the 4th speed measurement cycle is in the 3rd speed measurement cycle. Then, the third time interval is determined to be Δt4 according to the occurrence time of the last pulse in the 3rd speed measurement cycle and the end time of the 4th speed measurement cycle.
[0115] It can be understood that the third time interval is the sum of the time interval Δt3′ between the appearance time of the last pulse in the third speed measurement cycle and the end time of the third speed measurement cycle and the duration ΔT of the fourth speed measurement cycle.
[0116] Step 505 , calculating the actual speed of the target motor at the end of the Nth speed measurement cycle according to the last pulse before the Nth speed measurement cycle and the third time interval.
[0117] The number of pulses is determined according to the last pulse before the Nth speed measurement cycle. The process may include: if the time interval between the last pulse before the Nth speed measurement cycle and the end of the Nth speed measurement cycle is less than a preset time length, the number of pulses is determined to be 1; if the time interval between the last pulse before the Nth speed measurement cycle and the end of the Nth speed measurement cycle is greater than the preset time length, the number of pulses is determined to be 0. After determining the number of pulses, a ratio between the number of pulses and the third time interval is calculated, and the ratio is determined as the actual speed of the target motor at the end of the Nth speed measurement cycle.
[0118] like Figure 7 As shown, according to the last pulse of the third speed measurement cycle before the fourth speed measurement cycle, the number of pulses is determined to be 1, and the third time interval is Δt4. Then, the actual speed of the target motor at the end of the fourth speed measurement cycle is
[0119] The second time interval and the third time interval are determined by using the last pulse before the Nth speed measurement cycle. In practical applications, it is also possible to first find out the speed measurement cycle with a pulse number greater than 0 and closest to the Nth speed measurement cycle before the Nth speed measurement cycle, and then determine the second time interval and the third time interval according to the occurrence time of the first pulse of the speed measurement cycle.
[0120] like Figure 8 As shown, the number of pulses in the third speed measurement cycle is greater than 0. Before the third speed measurement cycle, the number of pulses is greater than 0 and the second speed measurement cycle is closest to the third speed measurement cycle. Then, the second time interval Δt3 is determined based on the occurrence time of the first pulse in the second speed measurement cycle and the occurrence time of the first pulse in the third speed measurement cycle.
[0121] It is understandable that the appearance time of the first pulse in each speed measurement cycle is easier to determine than the appearance time of the last pulse. Therefore, it is also easier to calculate the second time interval and the third time interval using the appearance time of the first pulse in each speed measurement cycle.
[0122] In one embodiment, a timing signal is used to calculate the time interval. Fig. 9 As shown, the timing signal is a falling edge at the end of each speed measurement cycle and a rising edge at the occurrence of each pulse. If the number of pulses in a speed measurement cycle is 0, the timing signal is always at a low level in the speed measurement cycle. In this way, the second time interval or the third time interval can be determined according to the position of the rising edge.
[0123] In the above process of obtaining the actual speed of the target motor at the end of the Nth speed measurement cycle, the processor obtains the number of pulses in the Nth speed measurement cycle, then determines the time interval to be used according to the number of pulses in the Nth speed measurement cycle, and finally calculates the actual speed of the target motor at the end of the Nth speed measurement cycle according to the number of pulses and the determined time interval. Through the embodiment of the present disclosure, the processor adjusts the time interval for calculating the actual speed of the target motor so that the number of pulses and the time interval are more matched, and thus the calculated actual speed is more accurate.
[0124] It should be understood that although Figures 2 to 6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figures 2 to 6 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0125] In one embodiment, Fig.10 As shown, a motor speed measuring device is provided, comprising:
[0126] The speed acquisition module 601 is used to acquire the actual speed of the target motor at the end of the Nth speed measurement cycle, the average acceleration of the target motor after the end of the N-1th speed measurement cycle, and the corrected speed of the target motor after the end of the N-1th speed measurement cycle after the end of the Nth speed measurement cycle; wherein the start time of the Nth speed measurement cycle is the end time of the N-1th speed measurement cycle;
[0127] The estimated speed determination module 602 is used to determine the estimated 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 N-1th speed measurement period and the corrected speed of the target motor after the end of the N-1th speed measurement period;
[0128] The correction speed determination module 603 is used to determine the correction speed of the target motor after the Nth speed measurement period ends according to the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement period.
[0129] In one of the embodiments, the above-mentioned estimated speed determination module 602 is specifically used to determine the speed change of the target motor in the Nth speed measurement cycle based on the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the duration of the Nth speed measurement cycle; determine the estimated speed of the target motor at the end of the Nth speed measurement cycle based on the corrected speed of the target motor after the end of the N-1th speed measurement cycle and the speed change of the target motor in the Nth speed measurement cycle.
[0130] In one embodiment, the correction speed determination module 603 is specifically used to calculate the average of the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement cycle, and determine the calculated average as the correction speed of the target motor after the end of the Nth speed measurement cycle.
[0131] In one embodiment, the rotation speed acquisition module 601 includes:
[0132] The first speed acquisition submodule is used to acquire the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle; wherein N-1 is greater than Ni;
[0133] A first time interval determination submodule, used to determine a first time interval between the end time of the N-1th speed measurement cycle and the end time of the Nith speed measurement cycle;
[0134] The acceleration determination submodule is used to obtain the average acceleration of the target motor after the end of the N-1th speed measurement cycle according to the actual speed of the target motor at the end of the N-1th speed measurement cycle, the actual speed of the target motor at the end of the Nith speed measurement cycle and the first time interval.
[0135] In one of the embodiments, the acceleration determination submodule is specifically used to calculate the speed difference between the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle; calculate the ratio between the speed difference and the first time interval, and determine the ratio as the average acceleration of the target motor after the end of the N-1th speed measurement cycle.
[0136] In one of the embodiments, the above-mentioned speed acquisition module 601 is specifically used to obtain the number of pulses in the Nth speed measurement cycle; if the number of pulses in the Nth speed measurement cycle is greater than 0, the second time interval is determined according to the occurrence time of the last pulse before the Nth speed measurement cycle and the occurrence time of the last pulse in the Nth speed measurement cycle; the actual speed of the target motor at the end of the Nth speed measurement cycle is calculated based on the number of pulses in the Nth speed measurement cycle and the second time interval.
[0137] In one of the embodiments, the above-mentioned speed acquisition module 601 is also used to determine the third time interval based on the occurrence time of the last pulse before the Nth speed measurement cycle and the end time of the Nth speed measurement cycle if the number of pulses in the Nth speed measurement cycle is equal to 0; and calculate the actual speed of the target motor at the end time of the Nth speed measurement cycle based on the last pulse before the Nth speed measurement cycle and the third time interval.
[0138] For the specific definition of the motor speed measuring device, please refer to the definition of the motor speed measuring method above, which will not be repeated here. Each module in the above motor speed measuring device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0139] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.11 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile 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 the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a motor speed measurement method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0140] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0141] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0142] After the Nth speed measurement cycle of measuring the speed of the target motor ends, the actual speed of the target motor at the end of the Nth speed measurement cycle, the average acceleration of the target motor after the end of the N-1th speed measurement cycle, and the corrected speed of the target motor after the end of the N-1th speed measurement cycle are obtained; wherein the start time of the Nth speed measurement cycle is the end time of the N-1th speed measurement cycle;
[0143] Determine the estimated speed of the target motor at the end of the Nth speed measurement cycle according to the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the corrected speed of the target motor after the end of the N-1th speed measurement cycle;
[0144] According to the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement period, a correction speed of the target motor after the end of the Nth speed measurement period is determined.
[0145] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0146] Determine the speed change of the target motor in the Nth speed measurement period according to the average acceleration of the target motor after the N-1th speed measurement period and the duration of the Nth speed measurement period;
[0147] The estimated speed of the target motor at the end of the N-1th speed measurement cycle is determined according to the corrected speed of the target motor after the end of the N-1th speed measurement cycle and the speed change of the target motor in the Nth speed measurement cycle.
[0148] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0149] The average value of the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement cycle is calculated, and the calculated average value is determined as the corrected speed of the target motor after the end of the Nth speed measurement cycle.
[0150] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0151] Obtain the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle; wherein N-1 is greater than Ni;
[0152] Determine a first time interval between the end time of the N-1th speed measurement cycle and the end time of the Nith speed measurement cycle;
[0153] According to the actual speed of the target motor at the end of the N-1th speed measurement cycle, the actual speed of the target motor at the end of the Nith speed measurement cycle, and the first time interval, the average acceleration of the target motor after the end of the N-1th speed measurement cycle is obtained.
[0154] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0155] Calculate the speed difference between the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle;
[0156] The ratio between the speed difference and the first time interval is calculated, and the ratio is determined as the average acceleration of the target motor after the N-1th speed measurement cycle ends.
[0157] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0158] Get the number of pulses in the Nth speed measurement cycle;
[0159] If the number of pulses in the Nth speed measurement cycle is greater than 0, the second time interval is determined according to the appearance time of the last pulse before the Nth speed measurement cycle and the appearance time of the last pulse in the Nth speed measurement cycle;
[0160] The actual speed of the target motor at the end of the Nth speed measurement period is calculated according to the number of pulses in the Nth speed measurement period and the second time interval.
[0161] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0162] If the number of pulses in the Nth speed measurement cycle is equal to 0, the third time interval is determined according to the occurrence time of the last pulse before the Nth speed measurement cycle and the end time of the Nth speed measurement cycle;
[0163] The actual speed of the target motor at the end of the Nth speed measurement cycle is calculated according to the last pulse before the Nth speed measurement cycle and the third time interval.
[0164] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0165] After the Nth speed measurement cycle of measuring the speed of the target motor ends, the actual speed of the target motor at the end of the Nth speed measurement cycle, the average acceleration of the target motor after the end of the N-1th speed measurement cycle, and the corrected speed of the target motor after the end of the N-1th speed measurement cycle are obtained; wherein the start time of the Nth speed measurement cycle is the end time of the N-1th speed measurement cycle;
[0166] Determine the estimated speed of the target motor at the end of the Nth speed measurement cycle according to the average acceleration of the target motor after the end of the N-1th speed measurement cycle and the corrected speed of the target motor after the end of the N-1th speed measurement cycle;
[0167] According to the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement period, a correction speed of the target motor after the end of the Nth speed measurement period is determined.
[0168] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0169] Determine the speed change of the target motor in the Nth speed measurement period according to the average acceleration of the target motor after the N-1th speed measurement period and the duration of the Nth speed measurement period;
[0170] The estimated speed of the target motor at the end of the N-1th speed measurement cycle is determined according to the corrected speed of the target motor after the end of the N-1th speed measurement cycle and the speed change of the target motor in the Nth speed measurement cycle.
[0171] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0172] The average value of the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement cycle is calculated, and the calculated average value is determined as the corrected speed of the target motor after the end of the Nth speed measurement cycle.
[0173] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0174] Obtain the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle; wherein N-1 is greater than Ni;
[0175] Determine a first time interval between the end time of the N-1th speed measurement cycle and the end time of the Nith speed measurement cycle;
[0176] According to the actual speed of the target motor at the end of the N-1th speed measurement cycle, the actual speed of the target motor at the end of the Nith speed measurement cycle, and the first time interval, the average acceleration of the target motor after the end of the N-1th speed measurement cycle is obtained.
[0177] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0178] Calculate the speed difference between the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle;
[0179] The ratio between the speed difference and the first time interval is calculated, and the ratio is determined as the average acceleration of the target motor after the N-1th speed measurement cycle ends.
[0180] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0181] Get the number of pulses in the Nth speed measurement cycle;
[0182] If the number of pulses in the Nth speed measurement cycle is greater than 0, the second time interval is determined according to the appearance time of the last pulse before the Nth speed measurement cycle and the appearance time of the last pulse in the Nth speed measurement cycle;
[0183] The actual speed of the target motor at the end of the Nth speed measurement period is calculated according to the number of pulses in the Nth speed measurement period and the second time interval.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0185] If the number of pulses in the Nth speed measurement cycle is equal to 0, the third time interval is determined according to the occurrence time of the last pulse before the Nth speed measurement cycle and the end time of the Nth speed measurement cycle;
[0186] The actual speed of the target motor at the end of the Nth speed measurement cycle is calculated according to the last pulse before the Nth speed measurement cycle and the third time interval.
[0187] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0188] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0189] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A motor speed measurement method, characterized in that: The method comprises: After the Nth speed measurement cycle for measuring the speed of the target motor ends, the actual speed of the target motor at the end of the Nth speed measurement cycle, the average acceleration of the target motor after the end of the N-1th speed measurement cycle, and the corrected speed of the target motor after the end of the N-1th speed measurement cycle are obtained; wherein the start time of the Nth speed measurement cycle is the end time of the N-1th speed measurement cycle; Determine the estimated 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 N-1th speed measurement period and the corrected speed of the target motor after the end of the N-1th speed measurement period; According to the estimated speed of the target motor at the end of the Nth speed measurement period, the actual speed of the target motor at the end of the Nth speed measurement period is corrected to determine the corrected speed of the target motor after the end of the Nth speed measurement period; The obtaining the actual speed of the target motor at the end of the Nth speed measurement cycle includes: Obtaining the number of pulses in the Nth speed measurement cycle; If the number of pulses in the Nth speed measurement cycle is greater than 0, determining the second time interval according to the occurrence time of the last pulse before the Nth speed measurement cycle and the occurrence time of the last pulse in the Nth speed measurement cycle; Calculating the actual speed of the target motor at the end of the Nth speed measurement period according to the number of pulses in the Nth speed measurement period and the second time interval; After obtaining the number of pulses in the Nth speed measurement cycle, the method further includes: If the number of pulses in the Nth speed measurement cycle is equal to 0, determining the third time interval according to the occurrence time of the last pulse before the Nth speed measurement cycle and the end time of the Nth speed measurement cycle; Calculate the actual speed of the target motor at the end of the Nth speed measurement period according to the last pulse before the Nth speed measurement period and the third time interval; The method further comprises: If N=1, the second time interval is determined according to the time from the start of the speed measurement to the appearance time of the last pulse of the first speed measurement cycle; wherein the duration of each speed measurement cycle is equal.
2. The method according to claim 1, characterized in that Determining the estimated 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 N-1th speed measurement period and the corrected speed of the target motor after the end of the N-1th speed measurement period includes: Determine a speed change of the target motor during the Nth speed measurement period according to an average acceleration of the target motor after the N-1th speed measurement period and a duration of the Nth speed measurement period; The estimated speed of the target motor at the end of the N-1th speed measurement cycle is determined according to the corrected speed of the target motor after the end of the N-1th speed measurement cycle and the speed change of the target motor in the Nth speed measurement cycle.
3. The method according to claim 1, characterized in that The method of correcting the actual speed of the target motor at the end of the Nth speed measurement period according to the estimated speed of the target motor at the end of the Nth speed measurement period to determine the corrected speed of the target motor after the end of the Nth speed measurement period includes: The average value of the actual speed and the estimated speed of the target motor at the end of the Nth speed measurement period is calculated, and the calculated average value is determined as the corrected speed of the target motor after the end of the Nth speed measurement period.
4. The method according to claim 1, characterized in that: The process of obtaining the average acceleration of the target motor after the N-1th speed measurement cycle ends includes: Obtaining the actual speed of the target motor at the end of the N-1th speed measurement cycle and the actual speed of the target motor at the end of the Nith speed measurement cycle; wherein N-1 is greater than Ni; Determine a first time interval between the end time of the N-1th speed measurement period and the end time of the Nith speed measurement period; The average acceleration of the target motor after the end of the N-1th speed measurement cycle is acquired according to the actual speed of the target motor at the end of the N-1th speed measurement cycle, the actual speed of the target motor at the end of the Nith speed measurement cycle, and the first time interval.
5. The method according to claim 4, characterized in that The step of obtaining the average acceleration of the target motor after the end of the N-1th speed measurement cycle according to the actual speed of the target motor at the end of the N-1th speed measurement cycle, the actual speed of the target motor at the end of the Nith speed measurement cycle, and the first time interval comprises: Calculate the speed difference between the actual speed of the target motor at the end of the N-1th speed measurement period and the actual speed of the target motor at the end of the Nith speed measurement period; A ratio between the speed difference and the first time interval is calculated, and the ratio is determined as an average acceleration of the target motor after the N-1th speed measurement cycle ends.
6. A motor speed measuring device, characterized in that: The device comprises: A speed acquisition module, for acquiring, after the end of the Nth speed measurement cycle for measuring the speed of the target motor, the actual speed of the target motor at the end of the Nth speed measurement cycle, the average acceleration of the target motor after the end of the N-1th speed measurement cycle, and the corrected speed of the target motor after the end of the N-1th speed measurement cycle; wherein the start time of the Nth speed measurement cycle is the end time of the N-1th speed measurement cycle; An estimated speed determination module, used to determine the estimated 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 N-1th speed measurement period and the corrected speed of the target motor after the end of the N-1th speed measurement period; a correction speed determination module, configured to correct the actual speed of the target motor at the end of the Nth speed measurement period according to the estimated speed of the target motor at the end of the Nth speed measurement period, and determine the correction speed of the target motor after the end of the Nth speed measurement period; The speed acquisition module is further used to obtain the number of pulses in the Nth speed measurement cycle; if the number of pulses in the Nth speed measurement cycle is greater than 0, determine the second time interval according to the appearance time of the last pulse before the Nth speed measurement cycle and the appearance time of the last pulse in the Nth speed measurement cycle; calculate the actual speed of the target motor at the end of the Nth speed measurement cycle according to the number of pulses in the Nth speed measurement cycle and the second time interval; The speed acquisition module is further configured to determine, if the number of pulses in the Nth speed measurement cycle is equal to 0, a third time interval according to the occurrence time of the last pulse before the Nth speed measurement cycle and the end time of the Nth speed measurement cycle; and calculate the actual speed of the target motor at the end time of the Nth speed measurement cycle according to the last pulse before the Nth speed measurement cycle and the third time interval; The device is also used to determine the second time interval according to the time from the start of the speed measurement to the appearance of the last pulse of the first speed measurement cycle if N=1; wherein the duration of each speed measurement cycle is equal.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Train speed measuring method, processor and train speed measuring system
CN105372442A