Rotation speed estimation method for incremental encoder

By generating multiple square waves to generate pulse signals and detecting the time length, combined with the total number of pulses in one rotation of the rotor, the problem that the existing technology cannot adapt to low-speed and high-speed measurements at the same time is solved, and the accuracy of the incremental encoder speed is achieved estimate.

CN119165187APending Publication Date: 2024-12-20ARTERY TECH CO
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310810268.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-06-13
Filing Date
2023-07-04
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing incremental encoder speed estimation methods cannot adapt to low-speed and high-speed measurements at the same time, and lack methods that take into account both.

Method used

By generating multiple square waves to generate pulse signals, detect the time length of the pulse signal arrival, and combine the total number of pulses in one turn of the rotor, the rotation speed is calculated using a comprehensive method of multiple time lengths and pulse numbers to achieve an estimation that adapts to different rotation speeds. .

Benefits of technology

This method can effectively calculate the rotation speed, avoiding the shortcomings of traditional methods in high-speed and low-speed measurements, and provides a speed estimation solution that takes into account high-speed and low-speed speeds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119165187A_ABST
    Figure CN119165187A_ABST
Patent Text Reader

Abstract

A rotating speed estimation method for an incremental encoder includes generating a plurality of pulse signals according to a plurality of square waves, detecting a time length when the pulse signals reach a predetermined number, and generating a rotating speed of a rotating wheel according to the predetermined number, the time length and a total number of pulses when the rotating wheel of the incremental encoder rotates a circle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a rotation speed estimation method, in particular to a rotation speed estimation method for an incremental encoder. Background Art

[0002] Rotary encoders are divided into two types: absolute and incremental. The absolute type outputs the absolute position (angle) of the rotating shaft, while the incremental type only outputs the relative position (angle) of the rotating shaft. Both encoders can output information such as rotation speed per minute and rotation angle through other devices or sensors.

[0003] The existing incremental encoder speed estimation method includes M-mode estimation and T-mode estimation. The M-mode estimation is performed at a fixed sampling time length T. S Internal counting encoder pulse number P r , combined with the total number of pulses in a single cycle of the wheel P T , the speed can be calculated This method is suitable for high-speed measurement but not for low-speed measurement.

[0004] T mode estimates the time length T of two encoder pulses r , the speed can be calculated This method is suitable for low-speed measurement but not for high-speed measurement.

[0005] It can be seen that the current technology lacks a rotation speed estimation method for incremental encoders that can take into account both low-speed and high-speed. Summary of the invention

[0006] An embodiment of the present invention provides a rotational speed estimation method for an incremental encoder, comprising generating multiple pulse signals based on multiple square waves, detecting a time length for these pulse signals to reach a predetermined number, and generating a rotational speed of the incremental encoder based on the predetermined number, the time length and a total number of pulses when a wheel of the incremental encoder rotates one circle.

[0007] An embodiment of the present invention also provides a rotational speed estimation method for an incremental encoder, comprising generating multiple pulse signals based on multiple square waves, detecting multiple time lengths when these pulse signals reach a predetermined number, and generating a rotational speed of the incremental encoder based on the predetermined number, a sum of these time lengths, and a total number of pulses when a rotating wheel of the incremental encoder rotates one circle. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 Schematic diagram of the incremental encoder of the present invention.

[0009] Figure 2 yes Figure 1 Schematic diagram of the rotating wheel, light source and light sensor.

[0010] Figure 3 is based on Figure 1 The first signal and the second signal output by the optical sensor generate waveform diagrams of a plurality of pulse signals.

[0011] Figure 4 It is a schematic diagram of another incremental encoder of the present invention.

[0012] Figure 5 is based on Figure 4 The first signal and the second signal output by the optical sensor generate waveform diagrams of a plurality of pulse signals.

[0013] Figure 6 It is a flow chart of the rotation speed estimation method for the incremental encoder of the present invention.

[0014] Figure 7 The flowchart of another rotation speed estimation method for an incremental encoder according to the present invention.

[0015]

Explanation of symbols

[0016] 10, 40: Incremental encoder

[0017] 100: Microprocessor

[0018] 110: Direct Memory Access

[0019] 120: Counter

[0020] 130, 420, 430: Timer

[0021] 140: Wheel

[0022] 150: Light source

[0023] 160: Light sensor

[0024] 200, 210: Light Emitting Diode

[0025] 201, 211: light sensing element

[0026] 230: Holes

[0027] A: First signal

[0028] B: Second signal

[0029] C: Pulse signal

[0030] 600, 700: Speed ​​estimation method

[0031] S610 to S630, S710 to S730: Steps DETAILED DESCRIPTION

[0032] Encoders can be divided into mechanical, magnetic induction and optical types according to the signal generation principle. In the optical encoder, there is a disk that rotates synchronously with the main shaft, which is divided into many concentric circles of light-transmitting and light-impermeable areas. There are light sources and light sensors on both sides of the disk, and the data read by them can calculate the position of the disk. The light sensor will transmit the read data to the microprocessor for calculation and convert it into the position of the rotating shaft.

[0033] If classified by encoding method, it can be divided into absolute encoder and incremental encoder. Incremental encoder can use the first signal A and the second signal B with a phase difference of 90 degrees, resulting in four states at the output end, where the first signal A and the second signal B are (0, 0), (0, 1), (1, 1), (1, 0), respectively. In this way, the number of pulses of the rotating disk can be converted from the high and low levels of the first signal A and the second signal B. Assuming that the total number of pulses of the rotating disk is 600, the process of the first signal A and the second signal B changing from (0, 0) to (0, 1) is a total rotation of 1 / 600 of the rotating disk.

[0034] The embodiment of the present invention provides a rotation speed estimation method for an incremental encoder. Figure 1 1 is a schematic diagram of an incremental encoder 10 of the present invention. The incremental encoder 10 includes a microprocessor 100, a direct memory access (DMA) 110, a counter 120, a timer 130, a rotating wheel 140, a light source 150, and a light sensor 160. The microprocessor 100 is used to control the counter 120, the timer 130, and access the DMA 110 at an appropriate time. The light emitted by the light source 150 will enter the light sensor 160 through the light-transmitting area on the rotating wheel 140, and the light sensor 160 will output a light sensing square wave signal, and the signal is sent to the microprocessor 100. The microprocessor 100 converts the rising edge and the falling edge of the square wave signal into a pulse signal. The drawings of the present invention are based on optical encoders, but the actual application is not limited thereto, and can be applied to mechanical, magnetic induction, or optical incremental encoders.

[0035] Figure 2 is a schematic diagram of the rotating wheel 140, the light source 150 and the light sensor 160. Figure 2The configuration enables the microprocessor 100 to generate a pulse signal. The rotating wheel 140 has a plurality of holes 230. The light source 150 may include a plurality of light emitting diodes 200 and 210 disposed on one side of the rotating wheel 140. The light sensor 160 may include a plurality of light sensing elements 201 and 211 disposed on the other side of the rotating wheel 140. The light emitting diodes 200 and 210 may continuously emit light, and the light sensing elements 201 and 211 may continuously detect the light emitted by the corresponding light emitting diodes 200 and 210. When the rotating wheel 140 rotates, when the light emitted by the light emitting diode 200 passes through the hole 230, the light sensing element 201 may detect the light transmitted from the light emitting diode 200; and when there is no hole 230 between the light emitting diode 200 and the light sensing element 201, the light sensing element 201 cannot detect the light transmitted from the light emitting diode 200, so that the light sensing element 201 may generate a first signal A having a square wave. When the wheel 140 rotates, when the light emitted by the LED 210 passes through the hole 230, the light sensing element 211 can detect the light from the LED 210; and when there is no hole 230 between the LED 210 and the light sensing element 211, the light sensing element 211 cannot detect the light from the LED 210, so the light sensing element 211 can generate a second signal B with a square wave. By properly arranging the LEDs 200, 210 and the light sensing elements 201, 211, the phase difference between the first signal A and the second signal B can be substantially 90 degrees.

[0036] Figure 3 is a waveform diagram of generating a plurality of pulse signals according to the first signal A and the second signal B. Figure 3 As shown, since the phase difference between the first signal A and the second signal B is substantially 90 degrees, a quadruple frequency pulse signal C can be generated, and the number of the quadruple frequency pulse signal C can be counted by the counter 120 .

[0037] When the microprocessor 100 starts the speed measurement, the microprocessor 100 can store the clock pulse number (N-1) recorded by the counter 120 into the DMA 110 or other memory, or clear the count value of the counter 120 so that N=1, and start the timer 130 when the next pulse number (N) is generated by the rising edge or falling edge of the first signal A or the second signal B, so that the timer 130 starts to count a period T C The microprocessor 100 stores a constant k, which may be between 0.5 and 1.0, such as k=0.8. The timer 130 starts counting at 0. When the timer 130 reaches kT C When the pulse number recorded by the counter 120 is M, the microprocessor 100 can set the pulse number to reach the predetermined pulse number. When the timer 130 needs to stop timing.

[0038] When the timer 130 stops timing, the timer 130 counts to T d , the recorded elapsed time length is T d , the microprocessor 100 can be operated by a time length T d , the total number of pulses P when the wheel rotates one circle T , pulse number N, preset pulse number P r , generating a rotation speed of the runner 140

[0039] In another embodiment of the present invention, if the microprocessor 100 calculates the rotation speed of the rotating wheel 140 as ω1, ω2, ..., ω n , where ω1, ω2, …, ω n Slope when doing linear regression If it is a negative value, it means that the wheel is decelerating, where is ω1, ω2, …, ω n When the microprocessor 100 starts the speed measurement, the microprocessor 100 can store the clock pulse number (N-1) recorded by the counter 120 into the DMA 110 or other memory, and start the timer 130 when the next pulse number (N) is generated at the rising edge or falling edge of the first signal A or the second signal B, so that the timer 130 starts to count a period T C The microprocessor 100 stores a constant k and a constant p. The constant k can be between 0.5 and 1.0, such as k=0.8. The constant p is used to compensate for the deviation of the deceleration of the rotating wheel 140. The timer 130 starts counting at 0. When the timer 130 reaches kT C When the pulse number recorded by the counter 120 is M, the microprocessor 100 can set the pulse number to reach the predetermined pulse number. When the timer 130 needs to stop timing.

[0040] When the timer 130 stops timing, the length of the elapsed time recorded by the timer 130 is T d , the microprocessor 100 can be operated by a time length T d , the total number of pulses P when the wheel rotates one circle T , pulse number N, preset pulse number P r , generating a rotation speed of the runner 140

[0041] In another embodiment of the present invention, a method for estimating the rotation speed of an incremental encoder is provided. When the microprocessor 100 starts the speed measurement, the period is T CThe timer 130 starts the cycle timing. The microprocessor 100 can store the clock pulse number (N-1) recorded by the counter 120 into the DMA 110 or other memory, and when the next pulse number (N) is generated at the rising edge or falling edge of the first signal A or the second signal B, the DMA 110 is used to set the start time T of the timer 130 at this time. a The microprocessor 100 stores a constant k, which may be between 0.5 and 1.0, such as k=0.8. When the timer 130 reaches kT C When the pulse number recorded by the counter 120 is M, the microprocessor 100 can set the pulse number to reach the predetermined pulse number. When the end time T of the timer 130 is set by DMA 110, b Stored in memory.

[0042] The microprocessor 100 can start at time T a and end time T b , resulting in a time length T d =T b -T a The microprocessor 100 can be operated by a time length T d , the total number of pulses P of the rotating wheel 140 rotating one circle T , pulse number N, preset pulse number P r , generating a rotation speed of the runner 140

[0043] In another embodiment of the present invention, if the microprocessor 100 generates the rotation speed of the wheel 140 as ω1, ω2, ..., ω n , where ω1, ω2, …, ω n Slope when doing linear regression If it is a negative value, it means that the wheel is decelerating, where is ω1, ω2, …, ω n When the microprocessor 100 starts the speed measurement, the period is T C The timer 130 starts the cycle timing. The microprocessor 100 can store the clock pulse number (N-1) recorded by the counter 120 into the DMA 110 or other memory, and when the next pulse number (N) is generated at the rising edge or falling edge of the first signal A or the second signal B, the DMA 110 is used to set the start time T of the timer 130 at this time. a The microprocessor 100 stores a constant k and a constant p, k can be between 0.5 and 1.0, such as k = 0.8, and the constant p is used to compensate for the deviation of the deceleration of the rotating wheel 140. When the timer 130 reaches kT CWhen the pulse number recorded by the counter 120 is M, the microprocessor 100 can set the pulse number to reach the predetermined pulse number. When the end time T of the timer 130 is set by DMA 110, b Need to be stored in memory.

[0044] The microprocessor 100 can start at time T a and end time T b , resulting in a time length T d =T b -T a The microprocessor 100 can be operated by a time length T d , the total number of pulses P of the rotating wheel 140 rotating one circle T , pulse number N, preset pulse number P r , generating a rotation speed of the runner 140

[0045] In another embodiment, the present invention provides a method for estimating the rotation speed of an incremental encoder. Figure 4 1 is a schematic diagram of an incremental encoder 40, which includes a microprocessor 100, a direct memory access (DMA) 110, a first timer 420, a second timer 430, a rotating wheel 140, a light source 150, and a light sensor 160. The microprocessor 100 is used to control the first timer 420, the second timer 430, and access the DMA 110 at an appropriate time. The light emitted by the light source 150 passes through the light-transmitting area on the rotating wheel 140 and enters the light sensor 160. The light sensor 160 outputs a binary light sensing signal to the microprocessor 100, and the microprocessor 100 converts it into a pulse signal.

[0046] Figure 5 is a waveform diagram of generating a plurality of pulse signals according to the first signal A and the second signal B. Figure 5 As shown, since the phase difference between the first signal A and the second signal B is substantially 90 degrees, a quadruple frequency pulse signal C can be generated, and the number of the quadruple frequency pulse signal C can be counted by using the internal transmission counting unit of the DMA 110 .

[0047] The microprocessor 100 can set the first timer 420 to calculate the period of each pulse signal, and trigger the DMA 110 to store the period value in the memory each time. The DMA 110 is a circular continuous sampling, and the length of the DMA 110 is the total number of pulses P when the wheel 140 rotates one circle. T When the second timer 430 restarts timing, the start count value N0 of DMA110 is recorded, and the end count value N1 of DMA110 is recorded after the timing cycle ends. CThe number of complete pulses during the period m = N1-N ω -2. At this time, as long as all the pulse periods of the memory segments N0+2 to N1 are added up, the elapsed time length T of m pulses can be obtained. d The microprocessor 100 uses the pulse number m and the time length T d , total pulse number P T The rotation speed of the wheel 140 can be generated

[0048] by Figure 5 For example, when the second timer 430 starts to enter the timing cycle, the microprocessor 100 sets N0 to 1, and the DMA 110 will continue to store the corresponding pulse cycle. Therefore, during the cycle of the second timer 430, the pulse cycle will be correspondingly stored in the access units p2, p3, p4..., m+3, m+4 of the DMA 110. Since the pulse cycle corresponding to the access unit p2 starts before the second timer 430 starts to enter the timing cycle, when calculating the elapsed time T d When the pulse cycle stored in the access unit p2 is removed, the pulse cycle corresponding to the access unit m+4 has not been stored in the corresponding pulse cycle at the end of the timing cycle of the second timer 430. d When the pulse period to be stored in access unit m+4 is removed, N1=m+3. Therefore, when calculating the number of pulses m, m=N1-N0-2, a total of m pulses, the microprocessor 100 adds up the pulse periods in access units p3, p4, ..., m+3 of DMA 110 to obtain the elapsed time length T. d The microprocessor 100 uses the pulse number m and the time length T d , total pulse number P T The rotation speed of the wheel 140 can be generated

[0049] Figure 6 is a flow chart of a rotation speed estimation method 600 for an incremental encoder 10 according to the present invention. The rotation speed estimation method 600 for the incremental encoder 10 comprises the following steps:

[0050] S610: Generate a plurality of pulse signals C according to the first signal A and the second signal B;

[0051] S620: Detect that a plurality of pulse signals C have reached a predetermined number (P r -N-1) time length T d ;and

[0052] S630: According to the predetermined quantity (P r -N-1), time length T dand the total number of pulses P of the incremental encoder 10 when the rotating wheel 140 rotates one circle T , generating the speed of the incremental encoder 10

[0053] Figure 7 is a flow chart of a rotation speed estimation method 700 for an incremental encoder 40 according to the present invention. The rotation speed estimation method 700 for the incremental encoder 40 comprises the following steps:

[0054] S710: Generate a plurality of pulse signals C according to the first signal A and the second signal B;

[0055] S720: Detect multiple pulse signals C reaching a predetermined number (N1-N0-2) of multiple time lengths (the sum of which is T d );and

[0056] S730: According to the predetermined number (N1-N0-2), the sum of multiple time lengths T d and the total number of pulses P of the incremental encoder 40 when the rotating wheel 140 rotates one circle T , generating the speed of the incremental encoder 40

[0057] In the embodiment of the present invention, a timer is used to calculate the exact duration T d The invention can be applied to the estimation of the speed / position of the rotating wheel 140, and can also be used to estimate the pulse rhythm, and record the pulse number and pulse interval within a fixed time. In addition, in addition to generating multiple pulse signals by using the first signal A and the second signal B, the invention can also generate multiple pulse signals by using more than two square wave signals.

[0058] The above descriptions are only preferred embodiments of the present invention. All equivalent changes and modifications made according to the claims of the present invention should fall within the scope of the present invention.

Claims

1. A method for estimating the rotation speed of an incremental encoder, comprising: generating a plurality of pulse signals according to a plurality of square waves; Detecting the time length of the pulse signal reaching a predetermined number; and The rotation speed of the incremental encoder is generated according to the predetermined number, the time length and the total number of pulses of the incremental encoder when the rotating wheel rotates one circle.

2. The method of claim 1, wherein detecting the time length for the pulse signal to reach the predetermined number comprises: Direct memory access is used to access and generate the start time and end time of the pulse signal.

3. The method of claim 2, wherein detecting the time length for the pulse signal to reach the predetermined number further comprises: The time length is generated according to the start time and the end time.

4. The method of claim 1, further comprising generating the predetermined number according to the number of pulses of the pulse signal and the number of revolutions of the rotating wheel when generating the number of pulses.

5. The method of claim 1, further comprising generating the predetermined number according to the number of pulses of the pulse signal, the number of rotations of the rotating wheel when generating the number of pulses, and a compensation value.

6. A method for estimating the rotation speed of an incremental encoder, comprising: generating a plurality of pulse signals according to a plurality of square waves; Detecting that the pulse signal reaches a predetermined number of pulse time lengths; and The rotation speed of the incremental encoder is generated according to the predetermined number, the sum of the pulse times and the total number of pulses when the rotating wheel of the incremental encoder rotates one circle.

7. The method according to claim 1 or 6, further comprising: The square wave is generated according to a plurality of light sources and a plurality of light sensors.

8. The method of claim 1 or 6, wherein generating the pulse signal according to the square wave comprises: The pulse signal is generated according to a first square wave and a second square wave, wherein the second square wave has the same period as the first square wave, and a phase difference between the second square wave and the first square wave is 90 degrees.

9. The method of claim 6, further comprising: The pulse time length is accessed using multiple direct memory accesses.

10. The method of claim 6, further comprising summing the pulse times to produce the sum of the pulse time lengths.

Citation Information

Cited By

  • Robot joint mechanism and calibration method thereof

    CN120245062A