Single-turn absolute value encoder power-off correction method and apparatus supporting multi-turn displacement
By calibrating the encoder speed and the number of displacement buses after power failure, and combining the instantaneous speed and the encoder reading, the encoder position is calculated and corrected. This solves the problem of large-scale multi-turn displacement of the inertial large shaft system after power failure, realizes accurate correction without backup power, and expands the application of single-turn absolute encoders.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-30
- Publication Date
- 2026-03-17
AI Technical Summary
Existing technologies make it difficult to perform encoder correction for large-scale, multi-turn displacements after a sudden power outage in an inertial large-shaft system, especially when there is no backup power supply, which leads to encoder output errors.
By calibrating the encoder drive shaft speed and the number of displacement buses after power failure, combined with the instantaneous speed and encoder readings, the actual displacement is calculated and corrected. Single-point or multi-point calibration methods are used, and the correction algorithm is employed to accurately determine the encoder position when power is restored after power failure.
It enables encoder correction for large-amplitude, multi-turn displacements without backup power, expands the application range of single-turn absolute encoders, and ensures accurate position output of the encoder when power is restored after a power outage.
Smart Images

Figure CN116793408B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a power-off correction method and device for a single-turn absolute encoder that supports large-amplitude multi-turn displacement, belonging to the field of encoder technology. Background Technology
[0002] A rotary encoder is a device for measuring the position or speed of a rotating shaft. Based on the encoding method, it can be divided into incremental and absolute types; based on the counting method, it can be divided into single-turn and multi-turn types. Electronic multi-turn encoders are widely used due to their advantages such as a large counting range, greater flexibility, simple structure, and low cost. Their disadvantage is that errors may occur if a certain displacement occurs after a power outage. To achieve displacement correction, electronic multi-turn encoders can be constructed from single-turn absolute encoders with an auxiliary counting device. They typically require a backup power supply to ensure normal output even after a power outage and multiple turns of displacement.
[0003] The applicant's prior Chinese patent application CN202211308522.9 discloses a power-off correction method for a single-turn absolute encoder. This method allows for position correction upon power-up after a power outage, without requiring a backup power supply, ensuring accurate position data upon power-up. The method can dynamically set the power-off displacement range and perform position correction upon power-up. The maximum unidirectional displacement range during the power-off period can reach one less than the encoding resolution (number of buses per turn). However, for systems with high inertia, such as lead screws and rotating shafts, a sudden power outage can cause the shaft displacement to exceed one turn. The prior application's power-off correction method is difficult to apply to such situations. Therefore, further research is needed on encoder power-off correction methods for systems where a sudden power outage may result in a large multi-turn displacement. Summary of the Invention
[0004] Purpose of the invention: In view of the shortcomings of the prior art, the purpose of this invention is to provide a power failure correction method and device for a single-turn absolute encoder that supports large-amplitude multi-turn displacement. It does not use any backup power supply or battery, and can correct the encoder when it is powered on again after a power failure. It is applicable to situations where large displacement may occur after a sudden power failure due to high inertia, and further expands the application range of single-turn absolute encoding.
[0005] Technical solution: To achieve the above-mentioned objective, this invention provides a power-off correction method for a single-turn absolute encoder supporting multi-turn displacement, comprising the following steps:
[0006] Calibrate the encoder drive shaft speed and the number of encoder displacement bus lines after the drive shaft power is cut off, and record the calibrated speed ω0 and the corresponding number of displacement bus lines f0 after power failure;
[0007] Acquire the instantaneous speed ω1, rotation direction, number of revolutions N at the moment of power failure, and encoder reading α within the revolution at the moment of power failure;
[0008] Acquire the recorded in-loop code reading β at the instant the encoder is powered on again;
[0009] Based on the calibrated rotational speed ω0, the number of displacement bus lines f0 after power failure, and the instantaneous speed ω1 at the time of power failure, determine the actual number of displacement bus lines f1 after power failure. Combined with the number of bus lines Q per encoder revolution, determine the integer amount Δn of the revolution number change and the margin of the number of lines within a revolution.
[0010] Based on the coil code reading α when power is off, the coil code reading β when power is on, and the remaining number of lines in the coil. The relationship is used to correct the integer amount of the change in the number of revolutions. The corrected number of revolutions M when the power is on is obtained by combining the number of revolutions N when the power is off and the integer amount of the change in the number of revolutions Δm after correction.
[0011] Specifically, the calibration of the encoder drive shaft speed and the number of encoder displacement buses after the drive shaft power is cut off can be performed using single-point calibration or multi-point calibration. The single-point calibration involves selecting a drive shaft speed and recording the corresponding number of encoder displacement buses after power failure. The multi-point calibration involves recording the number of encoder displacement buses after power failure at different drive shaft speeds.
[0012] As a preferred option, the formula for calculating the number of displacement buses after a power outage is:
[0013] Specifically, when f1 > T, and the direction of rotation at the instant of power failure is the same as the direction of increase of the encoded value:
[0014] Δn=f1 / Q, / and % respectively represent taking the integer part and the remainder of the divisor;
[0015] like And β
[0016] like And if β > (R-1)Q / R, then Δm = Δn-1;
[0017] In all other cases, Δm = Δn;
[0018] Where T≥(R-1)Q / R is a preset threshold, and R≥2 is a preset constant used to control the error range.
[0019] When f1 > T, and the direction of rotation at the instant of power failure is the same as the direction of decrease in the encoded value:
[0020] Δn=-(f1 / Q),
[0021] like And β
[0022] like And if β > (R-1)Q / R, then Δm = Δn-1;
[0023] In the other cases, Δm = Δn.
[0024] Specifically, the corrected number of revolutions during power-on is M = N + Δm; the accurate position of the encoder at the instant of power-on is M × Q + β.
[0025] Furthermore, when f1≤(R-1)Q / R, based on the number of revolutions N when power is off, the in-cycle code reading α when power is off, the in-cycle code reading β when power is on, and the number of displacement boundary lines set. The number of revolutions M during power-on is calibrated.
[0026] Specifically, when When the direction is preset to be the same as the direction of decreasing encoded value, if and Then M = N + 1; if and Then M = N-1; in other cases, M = N; when When the direction is preset to be the same as the direction of increasing encoded value, if and Then M = N + 1; if and Then M = N-1; otherwise, M = N.
[0027] Furthermore, when the preset encoded value decreases in the direction of... When β < α, then M = N + 1; otherwise M = N; when the preset code value increases in the direction of... If β > α, then M = N-1; otherwise, M = N.
[0028] The present invention also 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 onto the processor, it implements the above-described power-off correction method for a single-turn absolute encoder that supports multi-turn displacement.
[0029] Beneficial Effects: Compared with existing technologies, the present invention has the following advantages: The encoder power-off correction method provided by the present invention, by calibrating the encoder's rotational speed and the number of displacement lines after power failure, can estimate the actual number of displacement lines after power failure based on the instantaneous speed at the moment of power failure. This allows for a preliminary estimate of the change in the number of revolutions and the remaining displacement lines within each revolution. Furthermore, by combining the in-cycle encoding readings before power failure, the in-cycle encoding readings upon power-up, and the remaining displacement lines, the change in the number of revolutions is corrected, resulting in an accurate calculation of the change in the number of revolutions. This leads to the accurate position of the encoder when power is restored after a power failure. The present invention provides a solution for situations where large-amplitude, multi-revolution displacement occurs during a sudden power failure in a large-inertia system, accurately correcting the encoder's displacement after power failure and further expanding the application scenarios of single-revolution absolute encoders. Attached Figure Description
[0030] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.
[0031] Figure 2 This is a schematic diagram of the case where Δm = Δn + 1 when the rotation direction is the same as the direction of increase of the encoded value at the moment of power interruption in Embodiment 1 of the present invention.
[0032] Figure 3 This is a schematic diagram of the case where Δm = Δn-1 when the rotation direction is the same as the direction of increase of the encoded value at the moment of power interruption in Embodiment 1 of the present invention.
[0033] Figure 4 This is a schematic diagram of the case where Δm = Δn + 1 when the rotation direction is the same as the direction of decrease of the encoded value at the moment of power interruption in Embodiment 1 of the present invention.
[0034] Figure 5 This is a schematic diagram of the case where Δm = Δn-1 when the rotation direction is the same as the direction of decrease of the encoded value at the moment of power interruption in Embodiment 1 of the present invention.
[0035] Figure 6 This is a schematic diagram of the case where the number of backward displacement boundary lines is set in Embodiment 2 of the present invention; in (a), M = N+1, and in (b), M = N-1.
[0036] Figure 7 This is a schematic diagram of the case where the number of forward displacement boundary lines is set in Embodiment 2 of the present invention; in (a), M = N+1, and in (b), M = N-1. Detailed Implementation
[0037] The technical solution of the present invention will now be clearly and completely described in conjunction with the accompanying drawings and specific embodiments.
[0038] Example 1
[0039] like Figure 1As shown in the embodiment of the present invention, a power-off correction method for a single-turn absolute encoder supporting multi-turn displacement is disclosed. First, the encoder drive shaft speed and the number of displacement bus lines of the encoder after the drive shaft power is cut off are calibrated, and the calibrated speed ω0 and the corresponding number of displacement bus lines f0 are recorded. Then, the instantaneous speed ω1, rotation direction, number of turns N at the moment of power failure, and in-turn encoding reading α at the moment of power failure are obtained. The in-turn encoding reading β at the moment of power-on is also obtained. Next, based on the calibrated speed ω0, the number of displacement bus lines f0, and the instantaneous speed ω1 at the moment of power failure, the actual number of displacement bus lines f1 after power failure is determined. The integer amount Δn of the change in the number of turns and the margin of the number of lines per turn are determined in conjunction with the encoder's single-turn bus line number Q. Finally, based on the in-circle code reading α when the power is off, the in-circle code reading β when the power is on, and the remaining number of lines in the circle... The relationship is used to correct the integer amount of the change in the number of revolutions. The corrected number of revolutions M when the power is on is obtained by combining the number of revolutions N when the power is off and the integer amount of the change in the number of revolutions Δm after correction.
[0040] Specifically, calibrating the encoder drive shaft speed and the number of encoder displacement bus lines after the drive shaft power is cut off is essentially calibrating the encoder speed and the number of encoder displacement bus lines after power failure. Calibration can be performed in various ways. Single-point calibration can be used; for example, the drive speed can be adjusted to its highest level, and then the number of encoder displacement bus lines after power failure can be recorded. Multi-point calibration can also be used, recording the number of encoder displacement bus lines after power failure at different speeds, and selecting the calibration speed closest to the current speed during calculation to reduce computational errors. Because this invention employs a correction algorithm, errors in the number of displacement bus lines at different speeds during encoder calibration, as well as errors in the calculation process, do not affect the accuracy of the correction results.
[0041] Since the drive shaft of the encoder is braking after the power is cut off, and the net external torque does not change, the speed from the instantaneous speed at the time of power failure to the final speed of 0 can be regarded as a uniform deceleration process.
[0042] According to Γ=J×γ; where Γ represents the net external torque, H is the moment of inertia, and γ represents the angular acceleration.
[0043]
[0044] Similarly:
[0045] The number of displacement buses after the encoder is powered off is:
[0046] Based on the rated speed ω0 and the number of displacement bus lines f0 after power failure at the rated speed, the instantaneous speed ω1 of the encoder when power failure is achieved is calculated using the above formula to obtain the result f1. This result is then divided by the number of bus lines Q per encoder revolution to obtain an integer and a remainder, thus determining the change in the number of encoder revolutions after power is restored.
[0047]
[0048]
[0049] In the formula, / and % represent taking the integer part and the remainder of the divisor, respectively.
[0050] The error of Δn is corrected based on the encoder's in-coil encoding reading α when power is off and the in-coil encoding reading β when power is restored. The error range for the following calculation is based on dividing the encoder resolution into three equal parts. Other ranges can be set, such as dividing the encoder resolution into four equal parts.
[0051] like Figure 2 , 3 As shown, when the rotation direction is the same as the direction of increase of the encoded value at the instant of power failure:
[0052] like And β
[0053] like And since β > 2Q / 3, then Δm = Δn - 1;
[0054] In the other cases, Δm = Δn.
[0055] like Figure 4 , 5 As shown, when the rotation direction is the same as the direction of decrease of the encoded value at the instant of power failure:
[0056] At this time Δn, It is a negative number, that is
[0057]
[0058]
[0059] like And β
[0060] like And if β > 2Q / 3, then Δm = Δn - 1;
[0061] In the other cases, Δm = Δn.
[0062] Therefore, the number of revolutions of the encoder after power-on calibration is M = N + Δm. Furthermore, the accurate position of the encoder after power-on calibration can be determined as M × Q + β, based on the encoder's in-cycle encoding reading β when power is restored, the number of revolutions after power-on calibration M, and the encoder's single-turn bus count Q.
[0063] By using a set error range for correction calculation, the measurement and calculation errors generated during encoder speed calibration and operation do not affect the accuracy of the correction results.
[0064] This embodiment is used in situations where, after the encoder is powered off, the displacement amplitude is large due to inertia (the number of displacement bus lines after power failure is determined based on the instantaneous velocity, exceeding a preset threshold T; generally, the threshold T can be set to 2Q / 3 (taking three equal divisions as an example), and the specific value can be adjusted according to the calibration accuracy), and the position relative to the power failure position does not produce a displacement in the opposite direction of motion (equivalent to setting the displacement boundary line in the opposite direction of operation in the embodiment below). ).
[0065] Example 2
[0066] When the power-off displacement is roughly determined to be less than or equal to a preset threshold (e.g., 2Q / 3) based on the operating speed, the power-off correction method for a single-turn absolute encoder disclosed in patent application CN202211308522.9 can be used. This involves setting the number of displacement boundary lines forward (in the direction of increasing encoded value) or backward (in the direction of decreasing encoded value). Based on the number of revolutions N when power is off, the in-cycle code reading α when power is off, the in-cycle code reading β when power is restored, and the number of displacement boundary lines. The number of revolutions M during power-on is calibrated.
[0067] Specifically, such as Figure 6 ,when When the direction is preset to be the same as the direction of decreasing encoded value, if and Then M = N + 1; if and Then M = N-1; otherwise, M = N.
[0068] like Figure 7 ,when When the direction is preset to be the same as the direction of increasing encoded value, if and Then M = N + 1; if and Then M = N-1; otherwise, M = N.
[0069] Furthermore, when the preset encoded value decreases in the direction of When β < α, then M = N + 1; otherwise M = N; when the preset code value increases in the direction of... If β > α, then M = N-1; otherwise, M = N.
[0070] For example, if a 12-bit encoder is selected, the number of buses per encoder revolution Q = 4096. α, β, The unit of operation is always the line number. (Default) The direction is the direction of decreasing encoded value. The encoder's position when power is off is S. q = N×4096+α; when and When, M = N + 1; when and When M = N-1, M = N in all other cases. The encoder's position after power-on calibration is S. x =M×4096+β.
[0071] Example 3
[0072] An electronic device provided by an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded onto the processor, it implements the steps of the aforementioned power-off correction method for a single-turn absolute encoder supporting multi-turn displacement.
Claims
1. A single-turn absolute value encoder power-off correction method supporting multiple-turn displacement, characterized by, The method comprises the following steps: Calibrating the encoder drive shaft rotation speed and the total bus number of the encoder after the drive shaft power is cut off, recording the calibrated rotation speed and the corresponding total bus number of displacement f0 after power cut off; Acquiring recorded instantaneous speed of an encoder at the moment of power-off , direction of rotation, number of turns N at power-off and encoding reading within the turn at power-off ; Acquiring recorded encoder re-power-on instant in-circuie code reading ; According to the calibrated rotating speed , the number of displacement bus f0 at the moment of power-off, and the instantaneous speed at the moment of power-off Determine the actual number of displacement bus f1 after power-off, and combine the number of bus of single circle of encoder Determine the whole number of the change of the number of circle And the margin of the number of wire in the circle ; Wherein, in , the rotating direction at the moment of power-off is the same as the increasing direction of the encoding value: , ; / and respectively represent the integer division and the remainder; the rotating direction at the moment of power-off is the same as the decreasing direction of the encoding value: , ; , the preset threshold value, is a preset constant, used to control the error range; Based on the reading of the code within the circle at the time of power failure Reading of the code within the circle when powered on and the remaining number of lines within the circle The relationship is used to correct the integer amount of the change in the number of revolutions, combined with the number of revolutions N at the time of power failure and the corrected integer amount of the change in the number of revolutions. The corrected number of power-on cycles is M = N + The exact position of the encoder at the moment of power-on is: .
2. The single-turn absolute encoder power-off correction method of claim 1, wherein, The encoder drive shaft speed and the displacement bus number of the encoder after the drive shaft power is cut off are calibrated by single-point calibration or multi-point calibration; the single-point calibration is to select a drive shaft speed and record the corresponding displacement bus number of the encoder after the power is cut off; the multi-point calibration is to record the displacement bus number of the encoder after the power is cut off under different drive shaft speeds.
3. The single-turn absolute encoder power-off correction method of claim 1, wherein, The formula for calculating the total number of bus displacements after power-off is: .
4. The single-turn absolute encoder power-down correction method of claim 1, wherein, At , the rotation direction is the same as the direction of the increasing encoding value at the instant of power-off: If And Then ; If , and , then ; In all other cases, .
5. The single-turn absolute encoder power-down correction method of claim 1, wherein, At , the rotation direction at the instant of power-off is the same as the direction in which the code value decreases. If and then ; If , and , then ; In all other cases, .
6. The single-turn absolute encoder power-off correction method of claim 1, wherein, In case the number of revolutions N at the time of power-off, the inner-encoder reading at the time of power-off , the inner-encoder reading at the time of power-on and the number of displacement boundaries set , the number of revolutions M at the time of power-on is corrected.
7. The single-turn absolute encoder power-off correction method of claim 6, wherein, When the direction of the preset is the same as the decreasing direction of the encoding value, if , and , then ; if , and , then ; otherwise . When the direction of the preset is the same as the increasing direction of the encoding value, if , and , then ; if , and , then ; and in other cases .
8. The single-turn absolute encoder power-off correction method of claim 6, wherein, When the preset encoding value decreases in the direction of ; then ; otherwise ; otherwise ; When the preset encoding value increases in the direction , if , then ; Otherwise .
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The computer program is loaded into the processor to realize the power-off correction method of the single-turn absolute value encoder supporting multi-turn displacement according to any one of claims 1-8.
Citation Information
Patent Citations
Power-off correction method and equipment for single-turn absolute encoder
CN115950469B
Remote self-diagnosis method of braking performance of elevator
WO2015192440A1
Power outage tracking method and system for die height indicator
WO2019128788A1