Incremental encoder speed measurement method and device
By calculating the target number of pulse acquisitions in the incremental encoder based on the rotational speed of the previous acquisition cycle and the preset cycle, the problems of incomplete pulse acquisition and high processor load are solved, and high-precision rotational speed measurement and load optimization are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- OMRON SHANGHAI
- Filing Date
- 2021-11-12
- Publication Date
- 2026-05-26
AI Technical Summary
Existing incremental encoder speed measurement methods suffer from problems such as incomplete pulse acquisition, incomplete clock cycle, high processor load, and switching jitter, especially making accurate switching difficult when rotating at high and low speeds.
The target number of pulse acquisitions for the current cycle is calculated based on the rotational speed of the previous acquisition cycle and the preset cycle. The rotational speed is calculated when the target number is reached. Combined with the initial rotational speed setting, the distinction between high-speed and low-speed rotation is avoided, ensuring measurement accuracy and reducing processor load.
It achieves high-precision speed measurement at both high and low speeds of the incremental encoder, reduces processor load, and avoids problems such as difficulty in determining switching points and jitter.
Smart Images

Figure CN116125093B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of measurement, and in particular to a method and apparatus for measuring the rotational speed of an incremental encoder. Background Technology
[0002] An incremental encoder converts displacement into a periodic electrical signal, then converts this electrical signal into counting pulses, using the number of pulses to represent the magnitude of the displacement.
[0003] When the shaft of an incremental encoder rotates, it outputs corresponding pulses. By counting the number of pulses, the magnitude of the angular displacement of the incremental encoder can be determined. In addition, its rotational speed can also be calculated.
[0004] Currently, the speed measurement methods for incremental encoders generally include the frequency method (M method), the period method (T method), and the M / T combination method.
[0005] Among them, the M method measures the number of pulses collected within a fixed unit time, and calculates the rotational speed of the incremental encoder based on the number of pulses collected and the fixed unit time.
[0006] The T-method is to measure the time taken to acquire a fixed number of pulses, and calculate the rotational speed of the incremental encoder based on the fixed number of pulses and the time taken.
[0007] The M / T combined method uses the M method to measure the rotational speed when the incremental encoder is rotating at high speed, and the T method to measure the rotational speed when the incremental encoder is rotating at low speed, in order to reduce the measurement error of the rotational speed.
[0008] It should be noted that the above description of the technical background is only for the purpose of providing a clear and complete explanation of the technical solutions of the present invention and facilitating understanding by those skilled in the art. It should not be assumed that the above technical solutions are known to those skilled in the art simply because they have been described in the background section of this invention. Summary of the Invention
[0009] However, we found that when using the M-method to measure rotational speed, there may be incomplete pulses when measuring the number of pulses acquired; when using the T-method to measure rotational speed, there is a problem that the clock cycle has not ended when the pulse acquisition is completed, and the incremental encoder will occupy a large amount of processor load when rotating at high speed; and when using the M / T combination method to measure rotational speed, the speed point of the M / T combination method is not easy to determine, that is, it is not easy to determine the distinguishing point between high-speed and low-speed rotation of the incremental encoder, and there is switching jitter.
[0010] This invention provides a method and apparatus for measuring the rotational speed of an incremental encoder, which can solve one or more of the above-mentioned problems.
[0011] The incremental encoder rotation speed measurement method and device calculate the target number of pulses to be acquired in the current acquisition cycle based on the rotation speed of the incremental encoder in the previous acquisition cycle and a preset cycle. When the number of acquired pulses reaches the target number, the current rotation speed of the incremental encoder is calculated as the rotation speed for the current acquisition cycle, and the measurement for the current acquisition cycle ends. In other words, the number of pulses to be acquired in the current acquisition cycle is determined based on the actual rotation speed calculated when the target number of pulses was acquired in the previous acquisition cycle and a fixed preset cycle. This ensures measurement accuracy without consuming excessive processor load, thus balancing calculation accuracy and computational load during both high-speed and low-speed rotation of the incremental encoder. Furthermore, it eliminates the need to distinguish between high-speed and low-speed rotation, avoiding difficulties in determining the switching point and the problem of switching jitter.
[0012] According to a first aspect of the present invention, a method for measuring the rotational speed of an incremental encoder is provided. The method includes: calculating a target number of pulse acquisitions in the current acquisition cycle based on the rotational speed of the incremental encoder in the previous acquisition cycle and a preset cycle; and calculating the current rotational speed of the incremental encoder as the rotational speed of the current acquisition cycle when the number of acquired pulses reaches the target number of pulse acquisitions.
[0013] According to a second aspect of the present invention, the step of calculating the number of pulse acquisition targets in the current acquisition cycle based on the rotational speed of the incremental encoder in the previous acquisition cycle and a preset cycle includes: multiplying the rotational speed of the incremental encoder in the previous acquisition cycle by the preset cycle to obtain the number of pulse acquisition targets in the current acquisition cycle.
[0014] According to a third aspect of the present invention, the calculation of the current rotational speed of the incremental encoder includes: dividing the target number of pulse acquisitions within the current acquisition cycle by the acquisition time of the pulses acquired within the target number of pulse acquisitions to obtain the current rotational speed of the incremental encoder.
[0015] According to a fourth aspect of the present invention, the method further includes: setting an initial target number of pulse acquisitions; and when the number of acquired pulses reaches the initial target number of pulse acquisitions, calculating an initial rotational speed of the incremental encoder as the rotational speed used to calculate the target number of pulse acquisitions for the first acquisition cycle.
[0016] According to a fifth aspect of the present invention, the preset period is determined based on the control period of the object being measured by the incremental encoder.
[0017] According to a sixth aspect of the present invention, the preset period is half of the control period of the measurement object of the incremental encoder.
[0018] According to a seventh aspect of the present invention, a speed measuring device for an incremental encoder is provided. The device includes: a first calculation unit that calculates a target number of pulses to be acquired in the current acquisition cycle based on the speed of the incremental encoder in the previous acquisition cycle and a preset cycle; and a second calculation unit that calculates the current speed of the incremental encoder as the speed of the current acquisition cycle when the number of acquired pulses reaches the target number of pulses.
[0019] According to an eighth aspect of the present invention, the first calculation unit multiplies the rotational speed of the incremental encoder in the previous acquisition cycle by the preset cycle to obtain the number of pulse acquisition targets in the current acquisition cycle.
[0020] According to a ninth aspect of the present invention, the second calculation unit divides the target number of pulse acquisitions within the current acquisition cycle by the acquisition time of the pulses that acquire the target number of pulse acquisitions to obtain the current rotational speed of the incremental encoder.
[0021] According to a tenth aspect of the present invention, the apparatus further includes: a setting unit for setting an initial target number of pulse acquisitions; and a third calculation unit for calculating an initial rotational speed of the incremental encoder when the number of acquired pulses reaches the initial target number of pulse acquisitions, as the rotational speed for calculating the target number of pulse acquisitions for the first acquisition cycle.
[0022] The beneficial effects of this invention are as follows: the number of pulses to be acquired in the current acquisition cycle is determined based on the actual rotational speed calculated when the target number of pulses was acquired in the previous acquisition cycle and a fixed preset cycle, which ensures measurement accuracy and does not occupy a large amount of processor load. Thus, both calculation accuracy and calculation load are taken into account in the high-speed and low-speed rotation stages of the incremental encoder. In addition, it is not necessary to distinguish between high-speed rotation and low-speed rotation, avoiding the problem of difficult-to-determine switching points and the existence of switching jitter.
[0023] Specific embodiments of the invention are disclosed in detail with reference to the following description and accompanying drawings, indicating how the principles of the invention can be employed. It should be understood that the embodiments of the invention are not therefore limited in scope. Within the spirit and scope of the appended claims, embodiments of the invention include many changes, modifications, and equivalents.
[0024] The feature information described and illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, combined with feature information in other embodiments, or substituted for feature information in other embodiments.
[0025] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, whole, step, or component, but does not exclude the presence or addition of one or more other features, wholes, steps, or components. Attached Figure Description
[0026] Many aspects of the invention can be better understood by referring to the following accompanying drawings. The components in the drawings are not drawn to scale, but are only intended to illustrate the principles of the invention. Corresponding portions in the drawings may be enlarged or reduced for ease of illustration and description of certain parts of the invention. Elements and features described in one drawing or embodiment of the invention may be combined with elements and features shown in one or more other drawings or embodiments. Furthermore, similar reference numerals in the drawings denote corresponding components in several drawings and can be used to indicate corresponding components used in more than one embodiment.
[0027] In the attached diagram:
[0028] Figure 1 This is a schematic diagram of the speed measurement method of the incremental encoder according to Embodiment 1 of the present invention;
[0029] Figure 2 This is a flowchart of the speed measurement method of the incremental encoder according to Embodiment 1 of the present invention;
[0030] Figure 3 This is a schematic diagram of the speed measuring device of the incremental encoder according to Embodiment 2 of the present invention;
[0031] Figure 4 This is a schematic diagram of the electronic device according to Embodiment 3 of the present invention;
[0032] Figure 5 This is a schematic block diagram of the system configuration of the electronic device of Embodiment 3 of the present invention. Detailed Implementation
[0033] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings.
[0034] Example 1
[0035] This invention provides a method for measuring the rotational speed of an incremental encoder. Figure 1 This is a schematic diagram of the speed measurement method of the incremental encoder according to Embodiment 1 of the present invention. Figure 1 As shown, the method includes:
[0036] Step 101: Based on the rotational speed of the incremental encoder in the previous acquisition cycle and the preset cycle, calculate the number of pulse acquisition targets in the current acquisition cycle; and
[0037] Step 102: When the number of pulses collected reaches the target number of pulses, calculate the current rotational speed of the incremental encoder as the rotational speed of the current acquisition cycle, and end the measurement of the current acquisition cycle.
[0038] In this way, the number of pulses to be acquired in the current acquisition cycle is determined by the actual rotational speed calculated when the target number of pulses was acquired in the previous acquisition cycle and a fixed preset cycle, which ensures measurement accuracy and does not occupy a large amount of processor load. Thus, the calculation accuracy and calculation load are balanced in the high-speed and low-speed rotation stages of the incremental encoder. In addition, there is no need to distinguish between high-speed and low-speed rotation, avoiding the problem of difficult-to-determine switching points and switching jitter.
[0039] In this embodiment of the invention, the incremental encoder can be of various types, and its rotating shaft is connected to the rotating shaft of the object being measured by the incremental encoder.
[0040] For example, the incremental encoder measures a motor. The rotating shaft of the incremental encoder is connected to the rotating shaft of the motor. When the motor rotates, it drives the incremental encoder to rotate together, and the incremental encoder outputs pulses as it rotates.
[0041] In step 101, the number of pulse acquisition targets in the current acquisition cycle is calculated based on the rotational speed of the incremental encoder in the previous acquisition cycle and the preset cycle. For example, the number of pulse acquisition targets in the current acquisition cycle is obtained by multiplying the rotational speed of the incremental encoder in the previous acquisition cycle by the preset cycle.
[0042] For example, if the rotational speed of the incremental encoder in the previous acquisition cycle was R1 and the preset cycle was T1, then the number of pulse acquisition targets in the current acquisition cycle is N1 = R1 × T1.
[0043] In step 102, when the number of pulses acquired reaches the target number of pulse acquisitions, the current rotational speed of the incremental encoder is calculated. For example, the target number of pulse acquisitions in the current acquisition cycle is divided by the acquisition time of the pulses that acquire the target number of pulse acquisitions to obtain the current rotational speed of the incremental encoder.
[0044] For example, if the acquisition time of the target number of pulses is T2, that is, the time taken to acquire N1 pulses from the start of the current acquisition cycle, then the current speed of the incremental encoder is R2 = N1 / T2.
[0045] In other words, since the rotational speed of the incremental encoder may vary, while the preset period T1 is fixed, the target number of pulses N1 in each acquisition period may be different. That is, the target number of pulses N1 in each acquisition period is adapted to the rotational speed of the incremental encoder. Therefore, the accuracy of the incremental encoder's rotational speed calculated when the target number of pulses N1 is acquired can be guaranteed.
[0046] For example, when the incremental encoder rotates at low speed, the current acquisition cycle ends and the rotational speed is calculated when the target number of pulses N1 is acquired, so there will be no situation where the acquired pulses are incomplete, thereby improving the measurement accuracy.
[0047] Furthermore, the start and end of each acquisition cycle are determined by the moment when the target number of pulses N1 for the current acquisition cycle is acquired. That is, the actual acquisition cycle may differ from the preset cycle, thus avoiding unnecessary processor load. For example, the actual acquisition cycle is based on the preset cycle and can fluctuate within a small range.
[0048] For example, when the incremental encoder rotates at high speed, the time required to acquire the target number of pulses N1 is short, that is, it may be shorter than the preset cycle. The current acquisition cycle ends after acquiring the target number of pulses N1, which can reduce the processor load.
[0049] In this embodiment of the invention, the preset period can be set according to the actual situation.
[0050] For example, the preset period is determined based on the control period of the object being measured by the incremental encoder. For example, the preset period is half of the control period of the object being measured by the incremental encoder.
[0051] In this embodiment of the invention, the control period of the measurement object refers, for example, the period during which control signals are sent to the measurement object.
[0052] For example, if the control cycle of the motor, which is the object of measurement of the incremental encoder, is 500 microseconds, then the preset cycle can be 250 microseconds.
[0053] In this embodiment of the invention, in step 102, when the number of pulses acquired reaches the target number of pulse acquisitions, the current rotational speed of the incremental encoder is calculated as the rotational speed of the current acquisition cycle, and the measurement of the current acquisition cycle ends, i.e., as shown... Figure 1 As shown, return to step 101 and proceed to the measurement of the next acquisition cycle.
[0054] In this embodiment of the invention, for the startup phase of the incremental encoder, i.e., the initial measurement phase, such as... Figure 1 As shown, the method may further include:
[0055] Step 103: Set the initial number of pulse acquisition targets; and
[0056] Step 104: When the number of pulses acquired reaches the initial target number of pulse acquisitions, calculate the initial rotational speed of the incremental encoder, which is used as the rotational speed for calculating the target number of pulse acquisitions in the first acquisition cycle.
[0057] In this embodiment of the invention, the initial number of pulse acquisition targets can be set according to actual needs, for example, based on the time required for the incremental encoder or the object being measured to reach stable operation after startup.
[0058] For example, the initial pulse acquisition target number N0 is 10.
[0059] In step 104, when the number of pulses acquired reaches the initial target number of pulse acquisitions, the initial rotational speed of the incremental encoder is calculated as the rotational speed used to calculate the target number of pulse acquisitions for the first acquisition cycle. For example, if the time taken to acquire N0 pulses from the initial moment is T0, then the initial rotational speed of the incremental encoder is R0 = N0 / T0.
[0060] Figure 2 This is a flowchart of the speed measurement method of the incremental encoder according to Embodiment 1 of the present invention. Figure 2 As shown, the method includes:
[0061] Step 201: Set the initial number of pulse acquisition targets;
[0062] Step 202: Determine whether the number of pulses collected has reached the initial target number of pulses collected; if the result is "yes", proceed to step 203; if the result is "no", return to step 202.
[0063] Step 203: Calculate the initial rotational speed of the incremental encoder;
[0064] Step 204: Calculate the number of pulse acquisition targets within the current acquisition cycle;
[0065] Step 205: Determine whether the number of pulses collected has reached the target number of pulses for the current collection cycle; if the result is "yes", proceed to step 206; if the result is "no", return to step 205; and
[0066] Step 206: Calculate the rotational speed of the current acquisition cycle, end the measurement of the current acquisition cycle, and enter the next acquisition cycle.
[0067] In this embodiment of the invention, the specific implementation methods of steps 201 to 206 can be referred to the content described above, and will not be repeated here.
[0068] Additionally, for example, the speed measurement method can be terminated when the incremental encoder stops operating or when measurement is no longer required.
[0069] As can be seen from the above embodiments, the number of pulses to be acquired in the current acquisition cycle is determined by the actual rotational speed calculated when the target number of pulses was acquired in the previous acquisition cycle and a fixed preset cycle, which ensures the measurement accuracy and does not occupy a large amount of processor load. Thus, the calculation accuracy and calculation load are balanced in the high-speed and low-speed rotation stages of the incremental encoder. In addition, it is not necessary to distinguish between high-speed rotation and low-speed rotation, avoiding the problem of difficult-to-determine switching points and the existence of switching jitter.
[0070] Example 2
[0071] This invention provides a speed measuring device for an incremental encoder, which corresponds to the speed measuring method for an incremental encoder described in Embodiment 1. The specific implementation can refer to the implementation of the method described in Embodiment 1, and the same or related contents will not be repeated.
[0072] Figure 3 This is a schematic diagram of the speed measurement device of the incremental encoder according to Embodiment 2 of the present invention. Figure 3 As shown, the speed measurement device 300 of the incremental encoder includes:
[0073] The first calculation unit 301 calculates the number of pulse acquisition targets in the current acquisition cycle based on the rotational speed of the incremental encoder in the previous acquisition cycle and the preset cycle; and
[0074] The second calculation unit 302 calculates the current rotational speed of the incremental encoder when the number of pulses collected reaches the target number of pulses collected, and uses it as the rotational speed of the current collection cycle, and ends the measurement of the current collection cycle.
[0075] For example, the first calculation unit 301 multiplies the rotational speed of the incremental encoder in the previous acquisition cycle by the preset cycle to obtain the number of pulse acquisition targets in the current acquisition cycle.
[0076] For example, the second calculation unit 302 divides the target number of pulse acquisitions in the current acquisition cycle by the acquisition time of the pulses that acquire the target number of pulse acquisitions to obtain the current rotational speed of the incremental encoder.
[0077] For example, such as Figure 3 As shown, the device may further include:
[0078] Setting unit 303 sets the initial number of pulse acquisition targets; and
[0079] The third calculation unit 304 calculates the initial rotational speed of the incremental encoder when the number of pulses acquired reaches the initial target number of pulse acquisitions, and uses this rotational speed as the rotational speed for calculating the target number of pulse acquisitions in the first acquisition cycle.
[0080] In this embodiment of the invention, the implementation of the functions of each of the above units can refer to the specific content of the corresponding steps in Embodiment 1, and will not be repeated here.
[0081] As can be seen from the above embodiments, the number of pulses to be acquired in the current acquisition cycle is determined by the actual rotational speed calculated when the target number of pulses was acquired in the previous acquisition cycle and a fixed preset cycle, which ensures the measurement accuracy and does not occupy a large amount of processor load. Thus, the calculation accuracy and calculation load are balanced in the high-speed and low-speed rotation stages of the incremental encoder. In addition, it is not necessary to distinguish between high-speed rotation and low-speed rotation, avoiding the problem of difficult-to-determine switching points and the existence of switching jitter.
[0082] Example 3
[0083] This invention also provides an electronic device. Figure 4 This is a schematic diagram of the electronic device according to Embodiment 3 of the present invention. Figure 4 As shown, the electronic device 400 includes a speed measuring device 401 for an incremental encoder. The structure and function of the speed measuring device 401 for the incremental encoder are the same as those described in Embodiment 2, and will not be repeated here.
[0084] In this embodiment of the invention, the electronic device 400 can be various types of electronic devices, such as computers, programmable logic controllers, microcontrollers, etc.
[0085] In this embodiment of the invention, the electronic device 400 can be integrated on the incremental encoder or it can be a separate device.
[0086] Figure 5 This is a schematic block diagram of the system configuration of the electronic device according to Embodiment 3 of the present invention. Figure 5 As shown, electronic device 500 may include processor 501 and memory 502; the memory 502 is coupled to processor 501. This figure is exemplary; other types of structures may be used to supplement or replace this structure to achieve communication functions or other functions.
[0087] like Figure 5 As shown, the electronic device 500 may also include: an input unit 503, a display 504, and a power supply 505.
[0088] In one embodiment, the function of the speed measurement device of the incremental encoder described in Example 2 can be integrated into the processor 501. For example, the processor 501 can be configured to: calculate the target number of pulse acquisitions in the current acquisition cycle based on the speed of the incremental encoder in the previous acquisition cycle and a preset cycle; and when the number of acquired pulses reaches the target number of pulse acquisitions, calculate the current speed of the incremental encoder as the speed of the current acquisition cycle, and end the measurement of the current acquisition cycle.
[0089] For example, the calculation of the target number of pulse acquisitions in the current acquisition cycle based on the rotational speed of the incremental encoder in the previous acquisition cycle and the preset cycle includes: multiplying the rotational speed of the incremental encoder in the previous acquisition cycle by the preset cycle to obtain the target number of pulse acquisitions in the current acquisition cycle.
[0090] For example, calculating the current rotational speed of the incremental encoder includes dividing the target number of pulse acquisitions in the current acquisition cycle by the acquisition time of the pulses that acquire the target number of pulse acquisitions, to obtain the current rotational speed of the incremental encoder.
[0091] For example, processor 501 can also be configured to: set an initial target number of pulse acquisitions; and when the number of acquired pulses reaches the initial target number of pulse acquisitions, calculate the initial rotational speed of the incremental encoder as the rotational speed used to calculate the target number of pulse acquisitions for the first acquisition cycle.
[0092] For example, the preset period is determined based on the control period of the object being measured by the incremental encoder.
[0093] For example, the preset cycle is half the control cycle of the object being measured by the incremental encoder.
[0094] In another embodiment, the speed measuring device of the incremental encoder described in Example 2 can be configured separately from the processor 501. For example, the speed measuring device of the incremental encoder can be configured as a chip connected to the processor 501, and the function of the speed measuring device of the incremental encoder can be realized through the control of the processor 501.
[0095] In this embodiment, the electronic device 500 is not necessarily required. Figure 5 All the components shown.
[0096] like Figure 5 As shown, processor 501, sometimes also referred to as controller or operation control, may include a microprocessor or other processor device and / or logic device. Processor 501 receives input and controls the operation of various components of electronic device 500.
[0097] The memory 502 may be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. The processor 501 can execute the program stored in the memory 502 to perform information storage or processing, etc. The functions of other components are similar to those in existing systems and will not be described further here. The various components of the electronic device 500 can be implemented using dedicated hardware, firmware, software, or a combination thereof without departing from the scope of the invention.
[0098] As can be seen from the above embodiments, the number of pulses to be acquired in the current acquisition cycle is determined by the actual rotational speed calculated when the target number of pulses was acquired in the previous acquisition cycle and a fixed preset cycle, which ensures the measurement accuracy and does not occupy a large amount of processor load. Thus, the calculation accuracy and calculation load are balanced in the high-speed and low-speed rotation stages of the incremental encoder. In addition, it is not necessary to distinguish between high-speed rotation and low-speed rotation, avoiding the problem of difficult-to-determine switching points and the existence of switching jitter.
[0099] The apparatus and methods described above can be implemented in hardware or in combination with software. This invention relates to a computer-readable program that, when executed by a logic component, enables the logic component to implement the aforementioned apparatus or constituent parts, or to implement the various methods or steps described above.
[0100] The present invention also relates to storage media for storing the above programs, such as hard disks, magnetic disks, optical disks, DVDs, flash memory, etc.
[0101] The present invention has been described above with reference to specific embodiments. However, those skilled in the art should understand that these descriptions are exemplary and not intended to limit the scope of protection of the present invention. Those skilled in the art can make various modifications and variations to the present invention based on its spirit and principles, and these modifications and variations are also within the scope of the present invention.
Claims
1. A method for measuring the rotational speed of an incremental encoder, characterized in that, The method includes: Based on the rotational speed of the incremental encoder in the previous acquisition cycle and a fixed preset period, calculate the number of pulse acquisition targets in the current acquisition cycle; and When the number of pulses acquired reaches the target number, the current rotational speed of the incremental encoder is calculated and used as the rotational speed for the current acquisition cycle, and the measurement for the current acquisition cycle ends. The target number of pulses acquired in each acquisition cycle is adapted to the rotational speed of the incremental encoder. The pulses acquired in the current acquisition cycle are complete. Furthermore, the start and end of each acquisition cycle are determined based on the time when the target number of pulses for the current acquisition cycle is acquired.
2. The method according to claim 1, characterized in that, The step of calculating the number of pulse acquisition targets in the current acquisition cycle based on the rotational speed of the incremental encoder in the previous acquisition cycle and the preset cycle includes: The number of pulse acquisition targets in the current acquisition cycle is obtained by multiplying the rotational speed of the incremental encoder in the previous acquisition cycle by the preset cycle.
3. The method according to claim 1, characterized in that, The calculation of the current rotational speed of the incremental encoder includes: The current rotational speed of the incremental encoder is obtained by dividing the target number of pulses in the current acquisition cycle by the acquisition time of the pulses that are acquired.
4. The method according to claim 1, characterized in that, The method further includes: Set the initial target number of pulse acquisitions; and When the number of pulses acquired reaches the initial target number of pulse acquisitions, the initial rotational speed of the incremental encoder is calculated and used as the rotational speed for calculating the target number of pulse acquisitions for the first acquisition cycle.
5. The method according to any one of claims 1-4, characterized in that, The preset period is determined based on the control period of the object being measured by the incremental encoder.
6. The method according to claim 5, characterized in that, The preset period is half the control period of the object being measured by the incremental encoder.
7. A speed measuring device for an incremental encoder, characterized in that, The device includes: The first calculation unit calculates the number of pulse acquisition targets in the current acquisition cycle based on the rotational speed of the incremental encoder in the previous acquisition cycle and a fixed preset cycle; and The second calculation unit, when the number of pulses collected reaches the target number of pulses, calculates the current rotational speed of the incremental encoder as the rotational speed for the current acquisition cycle, and then ends the measurement for the current acquisition cycle. The target number of pulses acquired in each acquisition cycle is adapted to the rotational speed of the incremental encoder. The pulses acquired in the current acquisition cycle are complete. Furthermore, the start and end of each acquisition cycle are determined based on the time when the target number of pulses for the current acquisition cycle is acquired.
8. The apparatus according to claim 7, characterized in that, The first calculation unit multiplies the rotational speed of the incremental encoder in the previous acquisition cycle by the preset cycle to obtain the number of pulse acquisition targets in the current acquisition cycle.
9. The apparatus according to claim 7, characterized in that, The second calculation unit divides the target number of pulse acquisitions within the current acquisition cycle by the acquisition time of the pulses that acquire the target number of pulse acquisitions to obtain the current rotational speed of the incremental encoder.
10. The apparatus according to claim 7, characterized in that, The device further includes: The setting unit sets the initial target number of pulse acquisitions; and The third calculation unit calculates the initial rotational speed of the incremental encoder when the number of pulses acquired reaches the initial target number of pulse acquisitions, and uses this rotational speed as the rotational speed for calculating the target number of pulse acquisitions in the first acquisition cycle.