Power-off correction method and equipment for single-turn absolute encoder

By recording the number of revolutions and position points at the moment the encoder is powered off, combining the number of displacement dividing lines, and dynamically setting the displacement direction, the problem of position error after power failure of the single-turn absolute encoder is solved, precise correction without a backup power supply is achieved, and the scope of application is expanded.

CN115950469BActive Publication Date: 2025-09-19扬州大祺自动化技术有限公司

Patent Information

Application Number
CN202211308522.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-25
Publication Date
2025-09-19
Estimated Expiration
2042-10-25

AI Technical Summary

Technical Problem

Single-turn absolute encoders may shift after power failure, resulting in position errors. Existing technologies require backup power supplies or complex mechanical structures to solve this problem.

Method used

By recording the number of encoder revolutions and position points at the moment of power failure, combined with the number of displacement boundaries, the displacement direction is dynamically set, and the exact position when power is restored after a power failure is calculated, correction without the need for a backup power supply can be achieved.

Benefits of technology

Without relying on backup power supply, the displacement error after power failure is eliminated to the greatest extent, the application range of single-turn absolute encoder is expanded, and the measurement accuracy and economic benefits are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115950469B_ABST
    Figure CN115950469B_ABST
Patent Text Reader

Abstract

The present invention discloses a power-off correction method and device for a single-turn absolute encoder, and belongs to the technical field of encoders. The present invention sets the number of displacement dividing lines in one direction, combines the first number of turns and the encoding reading within the first position point circle recorded at the moment of power failure of the encoder, and the encoding reading within the second position point circle at the moment of power restoration, and uses the number of displacement dividing lines to determine the possible displacement interval, as well as the positional relationship between the counting position point / zero point, the recording position point and the displacement interval, or uses the numerical relationship between the displacement dividing line, the encoding reading / zero point of the counting position point, and the encoding reading of the recording position point to correct the second number of turns at the moment of power restoration. The present invention can ensure accurate position data of the encoder when it is powered on again after displacement after power failure without using any backup power supply, and allows the maximum displacement after power failure to reach the encoder resolution minus one, which greatly expands the use occasions of the single-turn absolute encoder.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a power-off correction method and equipment for a single-turn absolute value encoder, belonging to the technical field of encoders. Background Art

[0002] A rotary encoder is a device that measures the position or speed of a rotating shaft. Based on the encoding method, it can be categorized as incremental or absolute, and based on the rotation counting method, it can be divided into single-turn and multi-turn encoders. Multi-turn encoders can be used directly using a mechanical multi-turn encoder or an electronic rotation counting method combined with a single-turn encoder. Mechanical multi-turn encoders typically consist of a gear-driven, multi-turn counting mechanism. Their greatest advantage is that they can provide absolute position information and record the encoder's absolute position even after a power outage. However, they suffer from a limited measurement range, complex structure, large size, and high cost. Electronic multi-turn encoders typically consist of a single-turn absolute encoder combined with an electronic rotation counting mechanism. Electronic rotation counting encoders typically require a backup power supply to ensure that the output remains stable even after a power outage. Electronic rotation counting encoders offer a wide rotation range, greater flexibility, simple structure, low cost, and widespread application. However, a disadvantage is that they can introduce errors if a certain amount of displacement occurs after a power outage. For example, inertia after a sudden power outage can cause angular displacement of a rotating shaft. Similarly, vibration, mechanical wear, and clearance can cause shaft displacement, potentially leading to position errors when the encoder is powered back on.

[0003] For the above problems, it is generally required to recalibrate the encoder, or to use a mechanical turn counter or an electronic turn counter with a backup power supply during design to solve the problem. For example, Chinese invention patent application CN202110167352.6 discloses a turn number decoding method, device, and system for an absolute encoder. The method includes: when the main power supply is normally supplying power to the main encoding component and the backup encoding component, collecting the main encoding signal output by the main encoding component and the backup encoding signal output by the backup encoding component; decoding the main encoding signal to obtain and output the absolute position including the first turn value and the single turn position; decoding the backup encoding signal to obtain and record the second turn value; when the main power supply is disconnected and the backup power supply is supplying power to the backup encoding component, collecting the backup encoding signal output by the backup encoding component and obtaining the second turn value; when the main power supply is powered on again after being disconnected, determining the turn number correction value based on the current single turn position and the code channel zero point position deviation at the current moment, correcting the current second turn value based on the turn number correction value, and outputting the corrected current second turn value as the current turn value. This method avoids the problem of inaccurate circle values ​​in the absolute position caused by accidental power failure of the main power supply, and improves the measurement accuracy of the absolute encoder. However, it requires the configuration of main and backup encoding components, and the configuration of a backup power supply to power the backup encoding component. Summary of the Invention

[0004] Purpose of the invention: In view of the deficiencies of the above-mentioned prior art, the purpose of the present invention is to provide a method and device for power-off correction of a single-turn absolute encoder. For multi-turn applications of a single-turn absolute encoder, without using any backup power supply or battery, position correction can be performed when the encoder is powered on again after power failure, ensuring that the correct position data is maintained when the encoder is powered on again after displacement after power failure.

[0005] Technical solution: To achieve the above-mentioned purpose, the present invention provides a single-turn absolute encoder power-off correction method, comprising the following steps:

[0006] Obtain the first circle number N and the intra-circle code reading U at the first position point B at the moment the encoder power is disconnected;

[0007] Obtain the displacement boundary number K of the encoder relative to B after power failure, where K∈[0,Q), where Q is the total number of single-turn encoder lines; determine the displacement region after power failure based on U and K, including a first displacement region along the direction of increasing code value and / or a second displacement region along the direction of decreasing code value;

[0008] Obtain the recorded encoder reading V at the second position point E at the moment the encoder is restored to power;

[0009] According to the positional relationship between the encoder's revolution position point Z and the second position point E and the first displacement region and / or the second displacement region, the second revolution number M at the moment the encoder resumes power supply is corrected based on the first revolution number N.

[0010] Furthermore, in the correction method, when Z and E are simultaneously located in the first displacement area, and E is in the direction of increasing the coding value relative to Z, M=N+1; when Z and E are simultaneously located in the second displacement area, and E is in the direction of decreasing the coding value relative to Z, M=N-1; in other cases, M=N.

[0011] Furthermore, in the correction method, when the direction of K is preset to be the same as the direction of decreasing encoder reading, the number of displacement dividing lines in the direction of increasing encoder reading is Q-1-K; when the direction of K is preset to be the same as the direction of increasing encoder reading, the number of displacement dividing lines in the direction of decreasing encoder reading is Q-1-K.

[0012] Furthermore, in the correction method, when K∈(0, Q), the displacement region existing after the encoder is powered off is divided into a first displacement region and a second displacement region according to U and K;

[0013] When the direction of K is preset to be the same as the direction in which the encoder reading decreases, the in-circle encoded reading range of the first displacement region is (U, Q - 1] ∪ [0, U - K), where U ≥ K; or (U, Q + U - K), where U < K; the in-circle encoded reading range of the second displacement region is [U - K, U), where U ≥ K; or [Q + U - K, Q - 1] ∪ [0, U), where U < K.

[0014] When the direction of K is preset to be the same as the direction in which the encoder reading increases, the in-circle encoded reading range of the first displacement region is (U, U + K], where U + K < Q; or (U, Q - 1] ∪ [0, U + K - Q], where U + K ≥ Q; the in-circle encoded reading range of the second displacement region is (U + K, Q - 1] ∪ [0, U), where U + K < Q; or (U + K - Q, U), where U + K ≥ Q.

[0015] Further, in the calibration method, when K = 0 in the preset direction of the encoder reading decrease, only the first displacement region exists after the encoder is powered off. If E is in the direction of increasing encoded value relative to Z, then M = N + 1; otherwise, M = N. When K = 0 in the preset direction of the encoder reading increase, only the second displacement region exists after the encoder is powered off. If E is in the direction of decreasing encoded value relative to Z, then M = N - 1; otherwise, M = N.

[0016] Further, in the calibration method, when K ∈ (0, Q), the direction of K is preset to be the same as the direction in which the encoder reading decreases, and when U < K, let G be the in-circle encoded reading of Z; if G ∈ (U, Q + U - K), V ∈ (U, Q + U - K), and V ≥ G; then M = N + 1; if G ∈ [Q + U - K, Q - 1], V ∈ [Q + U - K, Q - 1], and V < G; or G ∈ [0, U), V ∈ [0, U), and V < G; or G ∈ [0, U), V ∈ [Q + U - K, Q - 1]; then M = N - 1; when K ∈ (0, Q), the direction of K is preset to be the same as the direction in which the encoder reading decreases, and when U ≥ K, if G ∈ (U, Q - 1], V ∈ (U, Q - 1], and V ≥ G; or G ∈ [0, U - K), V ∈ [0, U - K), and V ≥ G; or G ∈ (U, Q - 1], V ∈ [0, U - K); then M = N + 1; if G ∈ [U - K, U), V ∈ [U - K, U), and V < G, then M = N - 1; when K ∈ (0, Q), the direction of K is preset to be the same as the direction in which the encoder reading increases, and when U + K < Q, if G ∈ (U, U + K], V ∈ (U, U + K], and V ≥ G; then M = N + 1; if G ∈ (U + K, Q - 1], V ∈ (U + K, Q - 1], and V < G; or G ∈ [0, U), V ∈ [0, U), and V < G; or G ∈ [0, U), V ∈ (U + K, Q - 1]; then M = N - 1; when K ∈ (0, Q), the direction of K is preset to be the same as the direction in which the encoder reading increases, and when U + K ≥ Q, if G ∈ (U, Q - 1], V ∈ (U, Q - 1], and V ≥ G; or G ∈ [0, U + K - Q], V ∈ [0, U + K - Q], and V ≥ G; or G ∈ (U, Q - 1], V ∈ [0, U + K - Q]; then M = N + 1; if G ∈ (U + K - Q, U), V ∈ (U + K - Q, U), and V < G, then M = N - 1.

[0017] The present invention also provides a single - turn absolute encoder power - off calibration method, including the following steps:

[0018] Obtain the first number of turns N and the in - circle encoded reading U of the first position point B at the moment when the encoder power supply is disconnected.

[0019] Obtain the displacement demarcation line number K set for the encoder after power - off relative to B, K ∈ [0, Q), where Q is the number of single - turn buses of the encoder; determine the displacement area existing after the encoder power - off according to U and K, including a first displacement area along the direction of increasing encoded value and / or a second displacement area along the direction of decreasing encoded value.

[0020] Obtain the in - circle encoded reading V of the second position point E at the moment when the encoder power supply is restored.

[0021] Based on the positional relationship between the encoder zero point and the second position point E and the first displacement region and / or the second displacement region, the second number of turns M at the moment when the encoder resumes power supply is corrected based on the first number of turns N.

[0022] Further, in the correction method, when E and the zero point are both in the first displacement region and E is in the direction of increasing coding value along the zero point, M = N + 1; when E and the zero point are both in the second displacement region and E is in the direction of decreasing coding value along the zero point, M = N - 1; in other cases, M = N.

[0023] Further, in the correction method, when the direction of K is preset to be the same as the direction of decreasing encoder reading, the number of displacement dividing lines in the direction of increasing encoder reading is Q - 1 - K; when the direction of K is preset to be the same as the direction of increasing encoder reading, the number of displacement dividing lines in the direction of decreasing encoder reading is Q - 1 - K.

[0024] Further, in the correction method, when K ∈ (0, Q), the displacement region existing after the encoder is powered off is divided into a first displacement region and a second displacement region according to U and K;

[0025] When the direction of K is preset to be the same as the direction of decreasing encoder reading, the in - circle coding reading range of the first displacement region is (U, Q - 1] ∪ [0, U - K), U ≥ K; or (U, Q + U - K), U < K; the in - circle coding reading range of the second displacement region is [U - K, U), U ≥ K; or [Q + U - K, Q - 1] ∪ [0, U), U < K;

[0026] When the direction of K is preset to be the same as the direction of increasing encoder reading, the in - circle coding reading range of the first displacement region is (U, U + K], U + K < Q; or (U, Q - 1] ∪ [0, U + K - Q], U + K ≥ Q; the in - circle coding reading range of the second displacement region is (U + K, Q - 1] ∪ [0, U), U + K < Q; or (U + K - Q, U), U + K ≥ Q.

[0027] Further, in the correction method, when K = 0 preset for the direction of decreasing encoder reading, only the first displacement region exists after the encoder is powered off. If E is in the direction of increasing coding value relative to the zero point, then M = N + 1, otherwise M = N;

[0028] When K = 0 preset for the direction of increasing encoder reading, only the second displacement region exists after the encoder is powered off. If E is in the direction of decreasing coding value relative to the zero point, then M = N - 1, otherwise M = N.

[0029] Further, in the correction method, when K ∈ (0, Q) and the direction of K is preset to be the same as the direction in which the encoder reading decreases, if U ≥ K and V < U - K, then M = N + 1; if U < K and V ≥ Q + U - K, then M = N - 1;

[0030] When K ∈ (0, Q) and the direction of K is preset to be the same as the direction in which the encoder reading increases, if U + K ≥ Q and V ≤ U + K - Q, then M = N + 1; if U + K < Q and V > U + K, then M = N - 1.

[0031] The present invention also provides a single - turn absolute encoder power - off correction method, including the following steps:

[0032] Obtain the first number of turns N and the in - circle encoding reading U at the moment when the encoder power supply is disconnected.

[0033] Obtain the displacement dividing - line number K set for the encoder relative to the first position point after power - off, where K ∈ [0, Q), and Q is the number of encoder single - turn buses.

[0034] Obtain the in - circle encoding reading V of the second position point at the moment when the encoder power supply is restored.

[0035] Correct the second number of turns M at the moment when the encoder power supply is restored according to the first number of turns N, the in - circle encoding reading U of the first position point, the displacement dividing - line number K, and the in - circle encoding reading V of the second position point.

[0036] Further, in the correction method, when K ∈ (0, Q) and the direction of K is preset to be the same as the direction in which the encoder reading decreases, if U ≥ K and V < U - K, then M = N + 1; if U < K and V ≥ Q + U - K, then M = N - 1; in other cases, M = N;

[0037] When K ∈ (0, Q) and the direction of K is preset to be the same as the direction in which the encoder reading increases, if U ≥ Q - K and V ≤ U + K - Q, then M = N + 1; if U < Q - K and V > U + K, then M = N - 1; in other cases, M = N.

[0038] Further, in the correction method, when K = 0 in the preset encoder reading decrease direction, if V < U, then M = N + 1; otherwise M = N; when K = 0 in the preset encoder reading increase direction, if V > U, then M = N - 1; otherwise M = N.

[0039] Further, in the correction method, if the encoder counting - turn position point is not at the zero point, perform a relative - position transformation on U and V according to the in - circle encoding reading G of the counting - turn position point, and use the transformed U' and V' to correct the second number of turns M with the zero point as the counting - turn point.

[0040] Furthermore, in all the above correction methods, the exact position of the encoder at the moment of power restoration can be calculated as M×Q+V based on the corrected second number of turns M; or the number of turns recorded by the encoder can be verified based on the corrected second number of turns M.

[0041] Furthermore, in all the above correction methods, the number of displacement dividing lines K is preset, or dynamically set according to the rotation direction and rotation speed at the moment when the encoder power is disconnected.

[0042] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, any of the above-mentioned single-turn absolute encoder power-off correction methods is implemented.

[0043] Beneficial effects: Compared with the prior art, the present invention has the following advantages: The power-off correction method for a single-turn absolute encoder provided by the present invention sets the number of displacement dividing lines in one direction, combines the first number of turns and the encoding reading in the first position point circle recorded at the moment of power failure of the encoder, and the encoding reading in the second position point circle recorded at the moment of power restoration, and uses the number of displacement dividing lines to determine the possible displacement interval, as well as the positional relationship between the counting position point / zero point, the recording position point and the displacement interval, or uses the numerical relationship between the displacement dividing line, the counting position point encoding reading / zero point, and the recording position point encoding reading to correct the second number of turns at the moment of power restoration, and the accurate position of the encoder at the moment of power restoration can be calculated based on the corrected number of turns. This process does not require adjustment to the hardware structure of the encoder and does not rely on any backup power supply. In addition, the present invention can further predict the possible displacement direction after power-off based on the rotation direction and speed before power-off, and dynamically set the number of displacement dividing lines, thereby eliminating the displacement that may occur after power-off to the greatest extent. The maximum allowable displacement range after power-off can reach the encoder single-turn bus number (i.e., encoder resolution) minus one, which greatly expands the application range of single-turn absolute encoders and has good economic and social benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 This is a flow chart of the method of embodiment 1 of the present invention.

[0045] Figure 2 、 Figure 3 This is a schematic diagram of the correction method in which the K direction is the direction in which the encoder reading decreases.

[0046] Figure 4 、 Figure 5 This is a schematic diagram of the correction method in which the K direction is the direction in which the encoder reading increases.

[0047] Figure 6 、 Figure 7This is a schematic diagram of the correction method in which the K direction is the direction in which the encoder reading decreases (illustrating the displacement area encoding reading range).

[0048] Figure 8 、 Figure 9 This is a schematic diagram of the correction method in which the K direction is the direction of increase in encoder reading (illustrating the displacement area encoding reading range).

[0049] Figure 10 This is a flow chart of the method of embodiment 4 of the present invention.

[0050] Figure 11 This is a flow chart of the method of embodiment 7 of the present invention.

[0051] Figure 12 、 Figure 13 This is a schematic diagram of the correction method in which the K direction is the direction in which the encoder reading decreases and the circle counting point is the zero point.

[0052] Figure 14 、 Figure 15 This is a schematic diagram of the correction method in which the K direction is the encoder reading increase direction and the circle counting point is the zero point. DETAILED DESCRIPTION

[0053] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings and specific embodiments.

[0054] Example 1

[0055] An embodiment of the present invention provides a power-off correction method for a single-turn absolute encoder, comprising the following steps: obtaining a first turn number N and an intra-turn code reading U at a first position point B recorded at the moment the encoder power is disconnected; obtaining a set displacement boundary line number K relative to B after the encoder power is disconnected, and determining a displacement region existing after the encoder power is disconnected based on U and K, including a first displacement region along a direction of increasing code values ​​and / or a second displacement region along a direction of decreasing code values; obtaining an intra-turn code reading V at a second position point E recorded at the moment the encoder power is restored; and correcting the second turn number M at the moment the encoder power is restored based on the first turn number N based on the positional relationship between the encoder turn counting position point Z and the second position point E and the first displacement region and / or the second displacement region.

[0056] In the embodiment of the present invention, the maximum allowable displacement range after power failure can reach the encoder single-turn bus number Q minus one, and the value range of the set displacement dividing line number K is [0, Q), K is an integer, and the value range can also be written as [0, Q-1]. The displacement dividing line number K has directionality and can be preset to be in the direction of decreasing the encoding value (negative for short), or preset to be in the direction of increasing the encoding value (positive for short). The sum of the positive displacement dividing line and the reverse displacement dividing line during the period between power failure and power-on of the encoder is Q-1. When the preset positive displacement dividing line number K is 0, that is, there is no displacement in the direction of increasing the encoding value after the encoder is powered off, that is, there is only the second displacement area; when the preset reverse displacement dividing line number K is 0, that is, there is no displacement in the direction of decreasing the encoding value after the encoder is powered off, that is, there is only the first displacement area.

[0057] When the displacement dividing line number K is in the range of (0, Q), the first displacement area and the second displacement area can be determined based on the position point at the time of power failure (i.e., the first position point B) and the displacement dividing line number. When the encoder is restored to power, there are many situations in which the encoder's circle counting position point Z and the power-on position point (i.e., the second position point E) have a positional relationship with the two displacement areas. Under normal circumstances, in the process from power failure to power restoration, as long as the actual displacement does not exceed the circle counting position point, the number of circles after power on (i.e., the second number of circles M) and the number of circles recorded at power failure (i.e., the first number of circles) are the same, i.e., M=N. Only when the encoder is restored to power, Figures 2 to 5 Several situations require adjustments to the number of laps.

[0058] Figure 2 、 3 The diagram shows the situation where the direction of the displacement dividing line number K is preset to be the same as the direction of the encoder reading decreases, that is, a reverse displacement dividing line number K is set. When Z and E are both in the first displacement range, and E is in the direction of increasing the code value relative to Z, M = N + 1; when Z and E are both in the second displacement range, and E is in the direction of decreasing the code value relative to Z, M = N - 1.

[0059] Figure 4 、 5 The diagram shows the case where the direction of the displacement boundary line K is preset to be the same as the direction of increasing encoder readings, that is, a positive displacement boundary line K is set. When Z and E are both in the first displacement range, and E is in the direction of increasing encoder readings relative to Z, M = N + 1; when Z and E are both in the second displacement range, and E is in the direction of decreasing encoder readings relative to Z, M = N - 1.

[0060] In summary, regardless of how the direction of the displacement demarcation line number K is set, the number of turns can be corrected according to the following rules: when Z and E are both in the first displacement region and E is in the direction of increasing coding value relative to Z, M = N + 1; when Z and E are both in the second displacement region and E is in the direction of decreasing coding value relative to Z, M = N - 1; in other cases, M = N.

[0061] Embodiment 2

[0062] Based on Embodiment 1 of the present invention, the coded reading ranges within the circles of the two displacement regions are further refined and described in different cases. Specifically, when the displacement demarcation line number K ∈ (0, Q), according to the coded reading U within the circle of the first position point B and K, the displacement regions existing after the encoder is powered off are divided into the first displacement region and the second displacement region.

[0063] When the direction of K is preset to be the same as the direction of decreasing encoder reading, that is, a reverse displacement demarcation line number is set, such as Figure 6 , when U ≥ K, the coded reading range within the circle of the first displacement region is (U, Q - 1] ∪ [0, U - K); the coded reading range within the circle of the second displacement region is [U - K, U). Such as Figure 7 , when U < K, the coded reading range within the circle of the first displacement region is (U, Q + U - K); the coded reading range within the circle of the second displacement region is [Q + U - K, Q - 1] ∪ [0, U). ∪ represents the union of ranges.

[0064] When the direction of K is preset to be the same as the direction of increasing encoder reading, that is, a forward displacement demarcation line number is set, such as Figure 8 , when U + K < Q, the coded reading range within the circle of the first displacement region is (U, U + K]; the coded reading range within the circle of the second displacement region is (U + K, Q - 1] ∪ [0, U). Such as Figure 9 , when U + K ≥ Q, the coded reading range within the circle of the first displacement region is (U, Q - 1] ∪ [0, U + K - Q); the coded reading range within the circle of the second displacement region is (U + K - Q, U).

[0065] Based on the coded reading ranges of the above two displacement regions, a more detailed calculation rule for correcting the number of turns can be obtained. Let G be the coded reading within the circle of the encoder counting turn position point Z.

[0066] When K ∈ (0, Q), the direction of K is preset to be the same as the direction of decreasing encoder reading, and U < K, if G ∈ (U, Q + U - K), V ∈ (U, Q + U - K), and V ≥ G; then M = N + 1; if G ∈ [Q + U - K, Q - 1], V ∈ [Q + U - K, Q - 1], and V < G; or G ∈ [0, U), V ∈ [0, U), and V < G; or G ∈ [0, U), V ∈ [Q + U - K, Q - 1]; then M = N - 1;

[0067] When K ∈ (0, Q), the direction of K is preset to be the same as the direction in which the encoder reading decreases, and when U ≥ K, if G ∈ (U, Q - 1], V ∈ (U, Q - 1], and V ≥ G; or G ∈ [0, U - K), V ∈ [0, U - K), and V ≥ G; or G ∈ (U, Q - 1], V ∈ [0, U - K); then M = N + 1; if G ∈ [U - K, U), V ∈ [U - K, U), and V < G, then M = N - 1;

[0068] When K ∈ (0, Q), the direction of K is preset to be the same as the direction in which the encoder reading increases, and when U + K < Q, if G ∈ (U, U + K], V ∈ (U, U + K], and V ≥ G; then M = N + 1; if G ∈ (U + K, Q - 1], V ∈ (U + K, Q - 1], and V < G; or G ∈ [0, U), V ∈ [0, U), and V < G; or G ∈ [0, U), V ∈ (U + K, Q - 1]; then M = N - 1;

[0069] When K ∈ (0, Q), the direction of K is preset to be the same as the direction in which the encoder reading increases, and when U + K ≥ Q, if G ∈ (U, Q - 1], V ∈ (U, Q - 1], and V ≥ G; or G ∈ [0, U + K - Q], V ∈ [0, U + K - Q], and V ≥ G; or G ∈ (U, Q - 1], V ∈ [0, U + K - Q]; then M = N + 1; if G ∈ (U + K - Q, U), V ∈ (U + K - Q, U), and V < G, then M = N - 1.

[0070] Embodiment III

[0071] This embodiment of the present invention is a special description for the case of K = 0 based on Embodiment I. When K = 0 in the preset direction of the encoder reading decreasing, there is only the first displacement region after the encoder is powered off. If E is in the direction of increasing coding value relative to Z, then M = N + 1, otherwise M = N;

[0072] When K = 0 in the preset direction of the encoder reading increasing, there is only the second displacement region after the encoder is powered off. If E is in the direction of decreasing coding value relative to Z, then M = N - 1, otherwise M = N.

[0073] Embodiment IV

[0074] The main difference between this embodiment of the present invention and Embodiment I is that the encoder counting position point in this embodiment of the present invention is the zero point. As Figure 10As shown in the figure, a single-turn absolute encoder power-off correction method provided by an embodiment of the present invention includes the following steps: obtaining the first number of turns N and the in-circle coding reading U of the first position point B at the moment when the encoder power supply is disconnected; obtaining the number K of displacement dividing lines set relative to B after the encoder is powered off, and determining the displacement area existing after the encoder is powered off according to U and K, including a first displacement area along the direction of increasing coding value and / or a second displacement area along the direction of decreasing coding value; obtaining the in-circle coding reading V of the second position point E at the moment when the encoder resumes power supply; correcting the second number of turns M at the moment when the encoder resumes power supply based on the first number of turns N according to the position relationship between the encoder zero point, the second position point E, and the first displacement area and / or the second displacement area.

[0075] Similarly, when E and the zero point are both located in the first displacement area, and E is located in the direction of increasing coding value along the zero point, M = N + 1; when E and the zero point are both located in the second displacement area, and E is located in the direction of decreasing coding value along the zero point, M = N - 1; in other cases, M = N.

[0076] Embodiment Five

[0077] Based on Embodiment Four, this embodiment of the present invention details the correction turn calculation rule in combination with the coding reading ranges of the two displacement areas.

[0078] When K ∈ (0, Q), and the direction of K is preset to be the same as the direction of decreasing encoder reading, if U ≥ K and V < U - K; then M = N + 1; if U < K and V ≥ Q + U - K, then M = N - 1.

[0079] When K ∈ (0, Q), and the direction of K is preset to be the same as the direction of increasing encoder reading, if U + K ≥ Q and V ≤ U + K - Q; then M = N + 1; if U + K < Q and V > U + K, then M = N - 1.

[0080] Embodiment Six <​​​​​​​​​​​​When the encoder count cycle position point is the zero point, an even more simplified single-turn absolute encoder power-off correction method provided by an embodiment of the present invention is as follows Figure 11 As shown, it includes: obtaining the first number of turns N and the in-cycle coding reading U at the moment when the encoder power supply is disconnected; obtaining the number K of displacement dividing lines relative to the first position point after the encoder is powered off; obtaining the in-cycle coding reading V at the second position point at the moment when the encoder power supply is restored; correcting the second number of turns M at the moment when the encoder power supply is restored according to the first number of turns N, the in-cycle coding reading U at the first position point, the number K of displacement dividing lines, and the in-cycle coding reading V at the second position point.

[0086] The specific calculation rules that can be adopted are as follows:

[0087] When K ∈ (0, Q) and the direction of K is preset to be the same as the direction in which the encoder reading decreases:

[0088] If U ≥ K and V < U - K; then M = N + 1;

[0089] If U < K and V ≥ Q + U - K, then M = N - 1;

[0090] In other cases, M = N;

[0091] When K ∈ (0, Q) and the direction of K is preset to be the same as the direction in which the encoder reading increases:

[0092] If U ≥ Q - K and V ≤ U + K - Q; then M = N + 1;

[0093] If U < Q - K and V > U + K, then M = N - 1; in other cases, M = N.

[0094] In addition, when K = 0 in the preset direction of encoder reading decrease, if V < U; then M = N + 1; otherwise M = N; when K = 0 in the preset direction of encoder reading increase, if V > U, then M = N - 1; otherwise M = N.

[0095] Embodiment 8

[0096] In an embodiment of the present invention, an encoder with 360 lines, that is, the single-turn bus number Q of the encoder is 360, is used to exemplarily illustrate the encoder power-off correction method. Similarly, any number K of displacement dividing lines in either direction during the period after the encoder is powered off and before it is powered on again is set. As Figure 12 、<00><000230>, set the number K of reverse (coding reading decreasing direction) displacement dividing lines, then the number of forward (coding reading increasing direction) displacement dividing lines is 360 - K - 1.

[0097] When the encoder power supply is disconnected, record the first number of turns N of the encoder and the in-cycle coding reading U at the first position point B, then the position when the encoder is powered off is S =N×360+U, where the operation unit is line.

[0098] When the power supply to the encoder is restored, record the encoder's intra-circle code reading V at the second position point E.

[0099] The corrected number of encoder turns M can be directly calculated based on the first number of turns N when the encoder is powered off, the code reading U within the turn, the number of displacement dividing lines K, and the code reading V within the turn when power is restored.

[0100] The direction of K is preset to be the same as the encoder reading decreasing direction, K∈(0,360), then:

[0101] When U≥K and V<UK: M=N+1;

[0102] When U<K and V≥360+UK: M=N-1;

[0103] In all other cases: M = N;

[0104] The exact position of the encoder after power-on calibration is S x =M×360+V.

[0105] Example 9

[0106] The number of bus lines per single turn of the encoder is usually called the resolution of the encoder, which indicates the number of lines that divide the encoder's circumference. The larger the value, the higher the resolution accuracy of the encoder. It is used in situations where high precision is required. Encoders often use binary bits to represent resolution accuracy. For example, the resolution of a 10-bit encoder is 1024. The embodiment of the present invention takes a 12-bit encoder as an example, that is, the number of bus lines per single turn Q of the encoder is 4096, and illustrates the encoder power-off correction method. Similarly, a displacement boundary line K in any direction is set before the encoder is restored after power is cut off. Figure 14 、 15 , set the number of displacement dividing lines K in the positive direction (direction of increasing code reading), and the number of displacement dividing lines in the reverse direction (direction of decreasing code reading) is 4096-K-1.

[0107] When the encoder power is turned off, record the encoder's first circle number N and the circle code reading U of the first position point B. The position of the encoder when the power is turned off is S. q =N×4096+U, where the operation unit is line.

[0108] When the power supply to the encoder is restored, record the encoder's in-circle code reading V at the second position point E.

[0109] The corrected number of encoder turns M can be directly calculated based on the first number of turns N when the encoder is powered off, the code reading U within the turn, the number of displacement dividing lines K, and the code reading V within the turn when power is restored.

[0110] The direction of K is preset to be the same as the encoder reading increase direction, K∈(0, 4096), then:

[0111] When U ≥ 4096 - K and V ≤ U + K - 4096: M = N + 1;

[0112] When U<4096-K and V>U+K: M=N-1;

[0113] In all other cases: M = N;

[0114] The exact position of the encoder after power-on calibration is S x =M×4096+V.

[0115] Example 10

[0116] In most applications, the encoder's rotation count point is the encoder's zero point (i.e., the point where the encoder reading is 0). This embodiment of the present invention, building on the seventh embodiment, considers special cases where the encoder's rotation count point is not at zero. This embodiment of the present invention employs a simple position transformation method. When obtaining the intra-circle encoder reading, a fixed difference transformation is performed relative to the intra-circle encoder reading at the rotation count point. This transformed value is then used to perform rotation correction with zero as the rotation count point.

[0117] Specifically, the circle position point is designed to have an inner code reading of G. The inner code reading X of any point is converted to the corresponding inner code reading X' for calculation, which is equivalent to converting the circle counting point to zero. The specific conversion method is as follows:

[0118] When X≥G, X'=XG;

[0119] When X<G, X'=Q-G+X;

[0120] The relative positions of U and V are transformed according to G, and the transformed U' and V' are used to calibrate the second circle number M with the zero point as the circle counting point.

[0121] After adopting the relative position transformation method, the position S of the encoder when it is powered off q =N×Q+U, and the position S after the encoder is powered on and calibrated x =M×Q+V, where U and V are calculated using the transformed U' and V'.

[0122] Example 11

[0123] In practical applications, various factors affecting displacement after power failure are considered, such as mechanical wear and vibration of the rotating shaft, which will cause the rotating shaft to move after power failure. Usually, setting a direction displacement dividing line number K based on usage and experience can meet the displacement correction requirements.

[0124] In some applications, the direction of rotation switches at any time, and the speed may also be different when the power is suddenly cut off. In this case, the possible displacement direction after the power is cut off can be determined in advance based on the rotation direction and rotation speed, and the number of displacement boundaries K can be dynamically adjusted according to the speed. This can dynamically compensate for the displacement caused by changes in the rotation direction and speed.

[0125] For example, for a 12-bit encoder with a single-turn bus number of 4096, the displacement dividing line number in the direction of increasing encoder reading is set to 3000 based on comprehensive factors of the equipment used and experience. Then the displacement dividing line number in the direction of decreasing encoder reading is 4096-3000-1=1095.

[0126] At the moment the encoder power is disconnected, record the current number of encoder revolutions and the current position code reading. The allowable displacement that can ensure the correct position after the encoder power is disconnected is 3000 in the direction of increasing the encoder position code reading and 1095 in the direction of decreasing the encoder position code reading.

[0127] If the rotation direction and speed are taken into consideration, the number of displacement boundaries mentioned above can be dynamically adjusted. When the encoder power is disconnected, the current number of encoder revolutions and the current position code reading are recorded. The rotation direction and speed are also recorded. The number of displacement boundaries can be dynamically adjusted based on the rotation direction and speed.

[0128] If the rotation direction is positive (i.e., the encoder reading increases), the displacement direction due to speed after power failure is pre-determined to be positive, and the number of displacement dividing lines is appropriately adjusted according to the speed. For example, if the number of displacement dividing lines in the direction of increasing encoder reading is set to 3000 and is adjusted to 4000, the number of displacement dividing lines in the direction of decreasing encoder reading is 4096-4000-1=95.

[0129] If the rotation direction is reverse (i.e., the encoder reading is decreasing), it is pre-determined that the displacement direction after power failure due to speed is reversed, and the number of displacement dividing lines is appropriately adjusted according to the speed. For example, if the number of displacement dividing lines in the direction of increasing encoder reading is adjusted from 3000 to 2000, the number of displacement dividing lines in the direction of decreasing encoder reading is 4096-2000-1=2095.

[0130] The above example estimates the possible displacement increment after a sudden power outage by calculating the rotation direction and speed of the encoder when the power is off, and dynamically adjusts the number of positive and negative displacement boundary lines, thereby maximizing the allowable displacement range after a power outage.

[0131] Example 12

[0132] An embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the steps of the single-turn absolute encoder power-off correction method of each of the aforementioned embodiments are implemented.

[0133] The corrected second revolution count M in the above-described embodiment is generally used to calculate the encoder's exact position at the moment power is restored. It can also be used to verify the revolution count recorded by a multi-turn encoder. For example, in practical applications, if a failure occurs in the revolution counting system of a single-turn absolute encoder powered by a battery or backup power source and using electronic revolution counting, or a multi-turn encoder with a mechanical revolution counting system, the present invention can be used to verify the post-power-off displacement of the revolution count. This method provides prompt information when a battery, backup power source, or mechanical revolution counting system failure occurs, thereby enhancing system reliability.

[0134] It should be noted that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying the existence of an actual relationship such as order of precedence, relative importance, etc.

[0135] The parts of the technical solutions provided in the above embodiments that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.

[0136] This specification describes the embodiments in a progressive manner, focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

Claims

1. A power-off calibration method for a single-turn absolute encoder, characterized in that: It includes the following steps: Obtain the first number of turns N recorded at the moment when the encoder power supply is disconnected and the in-circle coding reading U of the first position point B; Obtain the set number of displacement dividing lines K relative to B after the encoder is powered off, where K ∈ [0, Q), and Q is the single-turn bus number of the encoder; determine the displacement area existing after the encoder is powered off according to U and K, including the first displacement area in the direction of increasing coding value and / or the second displacement area in the direction of decreasing coding value; Obtain the in-circle coding reading V of the second position point E recorded at the moment when the encoder resumes power supply; Correct the second number of turns M at the moment when the encoder resumes power supply based on the first number of turns N according to the positional relationship between the encoder turn counting position point Z and the second position point E and the first displacement area and / or the second displacement area.

2. The power-off calibration method for a single-turn absolute encoder according to claim 1, wherein: When Z and E are both in the first displacement area and E is in the direction of increasing coding value relative to Z, M = N + 1; when Z and E are both in the second displacement area and E is in the direction of decreasing coding value relative to Z, M = N - 1; in other cases, M = N.

3. The single-turn absolute encoder power-off correction method according to claim 1, wherein: When the direction of K is preset to be the same as the direction of decreasing encoder reading, the number of displacement dividing lines in the direction of increasing encoder reading is Q - 1 - K; when the direction of K is preset to be the same as the direction of increasing encoder reading, the number of displacement dividing lines in the direction of decreasing encoder reading is Q - 1 - K.

4. The power-off correction method for a single-turn absolute encoder according to claim 1, characterized in that: When K ∈ (0, Q), divide the displacement area existing after the encoder is powered off into the first displacement area and the second displacement area according to U and K; When the direction of K is preset to be the same as the direction of decreasing encoder reading, the in-circle coding reading range of the first displacement area is (U, Q - 1] ∪ [0, U - K), U ≥ K; or (U, Q + U - K), U < K; the in-circle coding reading range of the second displacement area is [U - K, U), U ≥ K; or [Q + U - K, Q - 1] ∪ [0, U), U < K; When the direction of K is preset to be the same as the direction of increasing encoder reading, the in-circle coding reading range of the first displacement area is (U, U + K], U + K < Q; or (U, Q - 1] ∪ [0, U + K - Q], U + K ≥ Q; the in-circle coding reading range of the second displacement area is (U + K, Q - 1] ∪ [0, U), U + K < Q; or (U + K - Q, U), U + K ≥ Q.

5. The single-turn absolute encoder power-off correction method according to claim 1, wherein: When K = 0 in the preset direction of decreasing encoder reading, only the first displacement area exists after the encoder is powered off. If E is in the direction of increasing coding value relative to Z, then M = N + 1, otherwise M = N; When K = 0 in the preset direction of increasing encoder reading, only the second displacement area exists after the encoder is powered off. If E is in the direction of decreasing coding value relative to Z, then M = N - 1, otherwise M = N.

6. The single-turn absolute encoder power-off correction method according to claim 1, wherein: When K ∈ (0, Q), the direction of K is preset to be the same as the direction in which the encoder reading decreases, and when U < K, let G be the in-circle encoded reading of Z; if G ∈ (U, Q + U - K), V ∈ (U, Q + U - K), and V ≥ G; then M = N + 1; if G ∈ [Q + U - K, Q - 1], V ∈ [Q + U - K, Q - 1], and V < G; or G ∈ [0, U), V ∈ [0, U), and V < G; or G ∈ [0, U), V ∈ [Q + U - K, Q - 1]; then M = N - 1; When K ∈ (0, Q), the direction of K is preset to be the same as the direction in which the encoder reading decreases, and when U ≥ K, if G ∈ (U, Q - 1], V ∈ (U, Q - 1], and V ≥ G; or G ∈ [0, U - K), V ∈ [0, U - K), and V ≥ G; or G ∈ (U, Q - 1], V ∈ [0, U - K); then M = N + 1; if G ∈ [U - K, U), V ∈ [U - K, U), and V < G, then M = N - 1; When K ∈ (0, Q), the direction of K is preset to be the same as the direction in which the encoder reading increases, and when U + K < Q, if G ∈ (U, U + K], V ∈ (U, U + K], and V ≥ G; then M = N + 1; if G ∈ (U + K, Q - 1], V ∈ (U + K, Q - 1], and V < G; or G ∈ [0, U), V ∈ [0, U), and V < G; or G ∈ [0, U), V ∈ (U + K, Q - 1]; then M = N - 1; When K ∈ (0, Q), the direction of K is preset to be the same as the direction in which the encoder reading increases, and when U + K ≥ Q, if G ∈ (U, Q - 1], V ∈ (U, Q - 1], and V ≥ G; or G ∈ [0, U + K - Q], V ∈ [0, U + K - Q], and V ≥ G; or G ∈ (U, Q - 1], V ∈ [0, U + K - Q]; then M = N + 1; if G ∈ (U + K - Q, U), V ∈ (U + K - Q, U), and V < G, then M = N - 1.

7. A power-off correction method for a single-turn absolute encoder, characterized in that: It includes the following steps: Obtain the first number of turns N at the moment when the encoder power supply is disconnected and the in-circle encoded reading U of the first position point B; Obtain the set number K of displacement dividing lines relative to B after the encoder is powered off, K ∈ [0, Q), Q is the number of encoder single-turn buses; determine the displacement area existing after the encoder is powered off according to U and K, including a first displacement area along the direction of increasing encoded value and / or a second displacement area along the direction of decreasing encoded value; Obtain the in-circle encoded reading V of the second position point E at the moment when the encoder power supply is restored; Correct the second number of turns M at the moment when the encoder power supply is restored based on the first number of turns N according to the position relationship between the encoder zero point and the second position point E and the first displacement area and / or the second displacement area.

8. The single-turn absolute encoder power-off correction method according to claim 7, wherein: When both E and the zero point are located in the first displacement region, and E is located in the direction of increasing coding value from the zero point, M = N + 1; when both E and the zero point are located in the second displacement region, and E is located in the direction of decreasing coding value from the zero point, M = N - 1; in other cases, M = N.

9. The power-off calibration method for a single-turn absolute encoder according to claim 7, wherein: When the direction of K is preset to be the same as the direction of decreasing encoder reading, the number of displacement dividing lines in the direction of increasing encoder reading is Q - 1 - K; when the direction of K is preset to be the same as the direction of increasing encoder reading, the number of displacement dividing lines in the direction of decreasing encoder reading is Q - 1 - K.

10. The power-off correction method for a single-turn absolute encoder according to claim 7, characterized in that: When K ∈ (0, Q), according to U and K, the displacement regions existing after the encoder is powered off are divided into a first displacement region and a second displacement region; When the direction of K is preset to be the same as the direction of decreasing encoder reading, the in-circle coding reading range of the first displacement region is (U, Q - 1] ∪ [0, U - K), U ≥ K; or (U, Q + U - K), U < K; the in-circle coding reading range of the second displacement region is [U - K, U), U ≥ K; or [Q + U - K, Q - 1] ∪ [0, U), U < K; When the direction of K is preset to be the same as the direction of increasing encoder reading, the in-circle coding reading range of the first displacement region is (U, U + K], U + K < Q; or (U, Q - 1] ∪ [0, U + K - Q], U + K ≥ Q; the in-circle coding reading range of the second displacement region is (U + K, Q - 1] ∪ [0, U), U + K < Q; or (U + K - Q, U), U + K ≥ Q.

11. The power-off correction method for a single-turn absolute encoder according to claim 7, characterized in that: When K = 0 preset for the direction of decreasing encoder reading, only the first displacement region exists after the encoder is powered off. If E is in the direction of increasing coding value relative to the zero point, then M = N + 1, otherwise M = N; When K = 0 preset for the direction of increasing encoder reading, only the second displacement region exists after the encoder is powered off. If E is in the direction of decreasing coding value relative to the zero point, then M = N - 1, otherwise M = N.

12. The power-off calibration method for a single-turn absolute encoder according to claim 7, wherein: When K ∈ (0, Q) and the direction of K is preset to be the same as the direction of decreasing encoder reading, if U ≥ K and V < U - K; then M = N + 1; If U < K and V ≥ Q + U - K, then M = N - 1; When K ∈ (0, Q) and the direction of K is preset to be the same as the direction of increasing encoder reading, if U + K ≥ Q and V ≤ U + K - Q; then M = N + 1; if U + K < Q and V > U + K, then M = N - 1.

13. A power-off correction method for a single-turn absolute encoder, characterized in that: Comprising the following steps: Obtain the first number of turns N and the in-circle coding reading U of the first position point recorded at the moment when the encoder power supply is disconnected; Obtain the number of displacement dividing lines K set for the encoder relative to the first position point after power-off, K ∈ [0, Q), and Q is the number of encoder single-turn buses; Obtain the in-circle coding reading V of the second position point recorded at the moment when the encoder power supply is restored; The second turn number M at the instant when the encoder resumes power supply is corrected according to the first turn number N, the in-circle encoded reading U at the first position point, the displacement dividing line number K, and the in-circle encoded reading V at the second position point; When K ∈ (0, Q) and the direction of K is preset to be the same as the direction in which the encoder reading decreases, if U ≥ K and V < U - K; then M = N + 1; If U < K and V ≥ Q + U - K, then M = N - 1; in other cases M = N; When K ∈ (0, Q) and the direction of K is preset to be the same as the direction in which the encoder reading increases, if U ≥ Q - K and V ≤ U + K - Q; then M = N + 1; if U < Q - K and V > U + K, then M = N - 1; in other cases M = N; When K = 0 in the preset direction of decreasing encoder reading, if V < U; then M = N + 1; otherwise M = N; When K = 0 in the preset direction of increasing encoder reading, if V > U; then M = N - 1; otherwise M = N.

14. The single-turn absolute encoder power-off correction method according to claim 13, wherein: If the encoder counting turn position point is not at the zero point, U and V are subjected to relative position transformation according to the in-circle encoded reading G at the counting turn position point, and the corrected second turn number M is corrected with the zero point as the counting turn point by using the transformed U' and V'.

15. The power-off correction method for a single-turn absolute encoder according to any one of claims 1 to 14, characterized in that: The accurate position at the instant when the encoder resumes power supply is calculated as M × Q + V according to the corrected second turn number M; or the number of turns recorded by the encoder is verified according to the corrected second turn number M.

16. The power-off correction method for a single-turn absolute encoder according to any one of claims 1 to 14, characterized in that: The displacement dividing line number K is preset or dynamically set according to the rotation direction and rotation speed at the instant when the encoder power supply is disconnected.

17. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: The computer program realizes the single-turn absolute encoder power-off correction method according to any one of claims 1-16 when loaded into the processor.

Citation Information

Patent Citations

  • Turn number decoding method, device and system of absolute encoder

    CN112945283A

  • Power outage tracking method and system for die height indicator

    WO2019128788A1

Cited By

  • Single-ring absolute value encoder power-off correction method and device supporting multi-ring displacement

    CN116793408A

  • Single-turn absolute value encoder power-off correction method and apparatus supporting multi-turn displacement

    CN116793408B