A multi-turn decoding method and system based on magnetoresistive magnetic sensing elements
By determining the zero point and quadrant division based on the hysteresis signal of the magnetoresistive magnetic induction element, and combining the magnetoresistive count value for judgment, the problems of Hall signal fluctuation and multi-turn decoding complexity are solved, and accurate and low-cost multi-turn decoding is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI ANPU MINGZHI AUTOMATION EQUIP
- Filing Date
- 2022-03-11
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, fluctuations in Hall signals near the magnetic field strength switching point lead to multi-turn numerical errors, and multi-turn decoding methods based on magnetoresistive magnetic induction elements are complicated, lacking effective solutions.
The calibration zero point is determined by the hysteresis signal based on the magnetoresistive magnetic induction element, quadrant division is realized, the start and current information are obtained, and the positive and negative values of the magnetoresistive count are combined to determine the multi-turn count, and a simple multi-turn decoding algorithm is adopted.
It achieves accurate and low-cost multi-turn decoding, avoids the problem of Hall sensor level fluctuation, and ensures that the absolute encoder resumes multi-turn counting when power is restored after a power outage.
Smart Images

Figure CN115307664B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a multi-turn decoding method, and more particularly to a multi-turn decoding method and system based on a magnetoresistive magnetic induction element. Background Technology
[0002] Multi-turn decoding is crucial for ensuring that an absolute encoder can resume multi-turn counting after power failure and subsequent power-on. Traditionally, this involves using a multi-stage gear structure, decoding the position of each gear stage upon power-on to obtain the number of turns. Later, methods were developed based on magnetic sensing elements detecting zero-crossing or periodic marker signals related to circular rotation to count turns. The latter methods currently vary depending on the sensor and can be broadly categorized into two types: multi-turn recording and decoding methods based on Hall effect magnetic sensing elements and multi-turn recording methods based on magnetoresistive magnetic sensing elements.
[0003] The existing technology has the following main application defects:
[0004] 1) The Hall signal switches levels according to the magnetic field strength encoding, but the Hall signal fluctuates when the magnetic field strength is near the jump point, causing multiple turns of numerical error when decoding at the switching point, such as patent application CN112945283A.
[0005] 2) Although the hysteresis characteristics of magnetoresistive magnetic induction elements have the following advantages, avoiding the problem of Hall sensor level fluctuations:
[0006] When the magnetic field strength in the sensor's sensitive direction exceeds the operating point threshold, a low level is output.
[0007] When the magnetic field strength in the sensor's sensitive direction is lower than the release point threshold, a high level is output.
[0008] However, this also leads to the problem of increased complexity in multi-turn decoding algorithms. Currently, there is no multi-turn decoding method based on magnetoresistive magnetic induction elements. For example, patent application CN107941247A only mentions a multi-turn device scheme. Summary of the Invention
[0009] The purpose of this invention is to overcome the shortcomings of the prior art and provide an accurate and low-cost multi-turn decoding method and system based on magnetoresistive magnetic induction elements.
[0010] The objective of this invention can be achieved through the following technical solutions:
[0011] A multi-turn decoding method for an encoder based on a magnetoresistive magnetic induction element includes the following steps:
[0012] 1) Determine the calibration zero point based on the hysteresis signal of the magnetoresistive magnetic induction element and realize quadrant division;
[0013] 2) Obtain the starting information, which includes the starting quadrant value and the starting single-lap position;
[0014] 3) Obtain current information, which includes current quadrant value, current single-turn position, magnetoresistive count value, and magnetoresistive multi-turn value, wherein the magnetoresistive multi-turn value is equal to the integer part of the quotient of the magnetoresistive count value divided by 4;
[0015] 4) The multi-turn count is determined by judging the relationship between the current quadrant value and the initial quadrant value, as well as the sign of the magnetoresistive count value. The calibration zero point is located in the region where the magnetoresistive level signal is unrelated to the direction of rotation.
[0016] Furthermore, the quadrant division is achieved through an initialization step, which specifically includes:
[0017] 101) Read the level state and single-turn position of the magnetoresistive magnetic sensing element, rotate the encoder to determine the magnetoresistive level state at the single-turn zero position as the level of the first quadrant, thereby defining the first quadrant;
[0018] 102) Rotate the encoder clockwise to sequentially delineate the second, third, and fourth quadrants according to the magnetoresistive level switching sequence.
[0019] Furthermore, the initialization step is performed when the main power is first turned on.
[0020] Furthermore, the step of determining the multi-turn count by judging the relationship between the current quadrant value and the initial quadrant value, and the sign of the magnetoresistive count value, specifically involves:
[0021] 401) Determine whether the current quadrant value is the same as the initial quadrant value. If yes, obtain the multi-lap count through subprocess 0. If no, execute step 402).
[0022] 402) Determine whether the magnetoresistive count value is greater than 0. If yes, obtain the multi-turn count through sub-process 1. If no, obtain the multi-turn count through sub-process 2.
[0023] Furthermore, sub-process 0 specifically includes the following steps:
[0024] 001) Determine whether the initial quadrant value is in the first quadrant. If yes, proceed to step 002). If no, use the reluctance multi-turn value as the multi-turn count.
[0025] 002) Determine if there is a starting single-turn position > 180° and the current single-turn position < 180°. If yes, use the reluctance multi-turn value + 1 as the multi-turn count. If no, proceed to step 003).
[0026] 003) Determine if there is an initial single-turn position <180° and a current single-turn position >180°. If yes, use the reluctance multi-turn value -1 as the multi-turn count. If no, use the reluctance multi-turn value as the multi-turn count.
[0027] Furthermore, sub-process 1 specifically includes the following steps:
[0028] 101) Let the angle α between the starting position and the zero position be equal to the maximum value of a single lap minus the starting position of a single lap, and let the angle β between the starting position and the current position be equal to the current position of a single lap minus the starting position of a single lap.
[0029] 102) Determine if β < 0. If yes, set β equal to α + the maximum value of a single lap and then proceed to step 103). If no, proceed directly to step 103.
[0030] 103) Determine whether α < β. If yes, use the reluctance multi-turn value + 1 as the multi-turn count. If no, use the reluctance multi-turn value as the multi-turn count.
[0031] Furthermore, sub-process 2 specifically includes the following steps:
[0032] 201) Let the negative angle γ between the starting position and the zero point be equal to the starting single lap position, and the negative angle δ between the starting position and the current position be equal to the starting single lap position minus the current single lap position;
[0033] 202) Determine if δ < 0. If yes, set δ equal to γ + the maximum value of a single lap and then proceed to step 203). If no, proceed directly to step 203.
[0034] 203) Determine whether γ < δ. If so, use the reluctance multi-turn value - 1 as the multi-turn count. If not, use the reluctance multi-turn value as the multi-turn count.
[0035] The present invention also provides a multi-turn encoder decoding system based on a magnetoresistive magnetic induction element, comprising:
[0036] The single-lap decoding unit is used to obtain the starting single-lap position and the current single-lap position;
[0037] The magnetoresistive counting unit is used to acquire the initial magnetoresistive level and the current magnetoresistive level, and then obtain the initial quadrant value and the current quadrant value accordingly, and obtain the magnetoresistive count value based on the magnetoresistive level signal;
[0038] A multi-turn decoding unit is used to decode the final multi-turn position and obtain the multi-turn count based on the outputs of the single-turn decoding unit and the magnetoresistive counting unit.
[0039] The data backup unit is used to back up the starting single-turn position and the starting magnetoresistive level;
[0040] The magnetoresistive counting unit is always in operation when the encoder is working.
[0041] Furthermore, the magnetoresistive counting unit includes a magnet fixedly connected to the rotating shaft and two orthogonally placed magnetoresistive magnetic induction elements on concentric circles with the rotating shaft as the center.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] 1) This invention is based on a magnetoresistive magnetic induction element, which avoids the problem of Hall sensor level fluctuation;
[0044] 2) The multi-turn decoding scheme of the present invention can accurately obtain multi-turn counts and has the advantage of low cost. Attached Figure Description
[0045] Figure 1 This is a flowchart illustrating the overall workflow of the decoding method of the present invention.
[0046] Figure 2 The output signal of a magnetoresistive magnetic induction element varies with the magnetic field strength.
[0047] Figure 3 This diagram illustrates the switching of output level signals as two orthogonal magnetoresistive signals move in the forward direction and the magnetic field strength changes.
[0048] Figure 4 This is a diagram showing the hysteresis signal state switching and quadrant division.
[0049] Figure 5 This is a flowchart illustrating the decoding method of the present invention.
[0050] Figure 6 for Figure 5 A schematic diagram of neutron process 0;
[0051] Figure 7 for Figure 5 A schematic diagram of neutron process 1;
[0052] Figure 8 for Figure 5 A schematic diagram of neutron process 2;
[0053] Figure 9 This is a schematic diagram of the decoding system of the present invention. Detailed Implementation
[0054] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0055] Example 1
[0056] This embodiment provides a multi-turn decoding method for an encoder based on a magnetoresistive magnetic induction element, including the following steps: 1) determining the calibration zero point based on the hysteresis signal of the magnetoresistive magnetic induction element and realizing quadrant division; 2) acquiring initial information, which includes the initial quadrant value and the initial single-turn position; 3) acquiring current information, which includes the current quadrant value, the current single-turn position, the magnetoresistive count value, and the magnetoresistive multi-turn value; 4) determining the multi-turn count by judging the relationship between the current quadrant value and the initial quadrant value and the sign of the magnetoresistive count value.
[0057] The above method is based on a magnetoresistive magnetic sensing element to implement a simpler multi-turn decoding algorithm with high reliability. It can effectively ensure that the absolute encoder can restore accurate multi-turn counting when it is powered on again after a power failure, and realize multi-turn decoding and correction of multi-turn records.
[0058] like Figure 1 As shown, the above-mentioned encoder multi-turn decoding method is mainly divided into two stages: the initialization stage and the normal operation stage. The initialization stage calibrates the zero point and divides the quadrants. The normal operation stage ensures accurate multi-turn counting after power failure and subsequent power-on. Upon entering the normal operation stage, when the main power supply is powered on, the multi-turn value is calculated by executing the multi-turn decoding algorithm based on backup and current signal data to output the multi-turn value.
[0059] like Figures 2-4 The diagram shows the output level change of the magnetoresistive magnetic induction element signal with magnetic field strength and the quadrant division within the circle. It can be seen that the high and low switching points are not at the same magnetic field strength point, which is an overlapping state region on the circle. Therefore, in the initialization stage of this method, the determined calibration zero point should be located in the region where the magnetoresistive level signal is unrelated to the rotation direction.
[0060] The quadrant division during the initialization phase is achieved through an initialization step, which is executed upon the first power-on of the main power supply. The specific initialization step is as follows:
[0061] 101) Read the level state and single-turn position of the magnetoresistive magnetic sensing element, rotate the encoder to determine the magnetoresistive level state at the single-turn zero position as the level of the first quadrant, thereby defining the first quadrant;
[0062] 102) Rotate the encoder clockwise to sequentially delineate the second, third, and fourth quadrants according to the magnetoresistive level switching sequence.
[0063] like Figure 3As shown, in this embodiment, when the magnetoresistive level in the first quadrant is 01, when rotating clockwise to the threshold position of the first sensor magnetoresistive signal release point, the magnetoresistive level switches to 11 and enters the second quadrant. At this time, the count value is incremented by 1, and so on, the count is incremented by 1 for each state switch. When rotating in the opposite direction, the level switch state is: 01 → 00 → 10 → 11 → 01, and the count is decremented by 1 for each state switch. The magnetoresistive multi-turn value is the integer part of the quotient of the magnetoresistive count value / 4.
[0064] like Figure 5 As shown, the multi-turn counting is determined by judging the relationship between the current quadrant value and the initial quadrant value, as well as the sign of the magnetoresistive count value:
[0065] 401) Determine whether the current quadrant value is the same as the initial quadrant value. If yes, obtain the multi-lap count through subprocess 0. If no, execute step 402).
[0066] 402) Determine whether the magnetoresistive count value is greater than 0. If yes, obtain the multi-turn count through sub-process 1. If no, obtain the multi-turn count through sub-process 2.
[0067] The scenario where the starting quadrant is equal to the current quadrant includes some scenarios where the magnetoresistive count is equal to 0 and the magnetoresistive count is not equal to zero.
[0068] like Figure 6 The flowchart shown is for sub-process 0. When the starting quadrant is equal to the current quadrant, the starting single-turn position and the current single-turn position are in the same quadrant. We only need to focus on whether there is a zero point in the current quadrant. This invention defines the quadrant containing the zero point as the first quadrant. Therefore, the number of multiple turns in other quadrants is equal to the reluctance turn count. If the starting quadrant is in the first quadrant, there are three possible scenarios. Sub-process 0 specifically includes the following steps:
[0069] 001) Determine whether the initial quadrant value is in the first quadrant. If yes, proceed to step 002). If no, use the reluctance multi-turn value as the multi-turn count.
[0070] 002) Determine if there is a starting single-turn position > 180° and the current single-turn position < 180°. If yes, use the reluctance multi-turn value + 1 as the multi-turn count. If no, proceed to step 003).
[0071] 003) Determine if there is an initial single-turn position <180° and a current single-turn position >180°. If yes, use the reluctance multi-turn value -1 as the multi-turn count. If no, use the reluctance multi-turn value as the multi-turn count.
[0072] like Figure 7 The flowchart shown is for sub-process 1, which includes the following steps:
[0073] 101) When the reluctance count is greater than zero, the angle between the starting position and the zero point is the angle that is rotated clockwise from the starting position of a single turn to the zero point. That is, let the angle α between the starting position and the zero point be equal to the maximum value of a single turn minus the starting position of a single turn. The angle between the starting position and the current position is the angle that is rotated clockwise from the starting position of a single turn to the current position. That is, let the angle β between the starting position and the current position be equal to the current position of a single turn minus the starting position of a single turn.
[0074] 102) Determine if β < 0. If yes, set β equal to α + the maximum value of a single lap and then proceed to step 103). If no, proceed directly to step 103.
[0075] 103) Determine whether α < β. If yes, it is considered that the positive direction passes through the zero point in a single turn, and the multi-turn count is taken as the reluctance multi-turn value + 1. If no, the multi-turn count is taken as the reluctance multi-turn value.
[0076] like Figure 8 The flowchart shown is for sub-process 2. When the reluctance count is less than zero, the angle between the starting position and the zero point is the angle traversed when rotating counterclockwise from the starting position of a single turn to the zero point, equal to the starting single-turn position value. The angle between the starting position and the current position is the angle traversed when rotating counterclockwise from the starting position of a single turn to the current position. If the angle between the starting position and the current position is less than zero, then the angle between the starting position and the current position is equal to the negative angle between the starting position and the current position plus the maximum single-turn position value. When the angle between the starting position and the zero point is less than the angle between the starting position and the current position, it is considered that the negative direction within a single turn passes through the zero point, and the multi-turn count is equal to the reluctance multi-turn value - 1; otherwise, the multi-turn count is equal to the reluctance multi-turn value. Sub-process 2 specifically includes the following steps:
[0077] 201) When the reluctance count is less than zero, the angle between the starting position and the zero point is the angle that is rotated counterclockwise from the starting position of a single turn to the zero point, which is equal to the value of the starting single turn position. Let the negative angle γ between the starting position and the zero point be equal to the starting single turn position. The angle between the starting position and the current position is the angle that is rotated counterclockwise from the starting position of a single turn to the current position, that is, let the negative angle δ between the starting position and the current position be equal to the starting single turn position minus the current single turn position.
[0078] 202) Determine if δ < 0. If yes, set δ equal to γ + the maximum value of a single lap and then proceed to step 203). If no, proceed directly to step 203.
[0079] 203) Determine whether γ < δ. If so, it is considered that the negative direction passes through the zero point in a single turn, and the multi-turn count is taken as the reluctance multi-turn value -1. If not, the multi-turn count is taken as the reluctance multi-turn value.
[0080] Example 2
[0081] This embodiment provides a multi-turn decoding system for an encoder based on a magnetoresistive magnetic induction element, including a single-turn decoding unit, a magnetoresistive counting unit, a multi-turn decoding unit, and a data backup unit, such as... Figure 9 As shown, the single-turn decoding unit is used to obtain the initial single-turn position and the current single-turn position; the magnetoresistive counting unit is used to obtain the initial magnetoresistive level and the current magnetoresistive level, and then obtain the initial quadrant value and the current quadrant value accordingly, and obtain the magnetoresistive count value based on the magnetoresistive level signal; the multi-turn decoding unit is used to decode the final multi-turn position and obtain the multi-turn count based on the output of the single-turn decoding unit and the magnetoresistive counting unit; the data backup unit is used to back up the initial single-turn position and the initial magnetoresistive level.
[0082] In a specific embodiment, the single-turn decoding unit is a single-turn magnetic encoder module; the magnetoresistive counting unit includes a magnet fixedly connected to the rotating shaft and two orthogonally placed magnetoresistive magnetic induction elements on concentric circles with the rotating shaft as the center; the data backup unit may include a backup register and a non-volatile memory.
[0083] The multi-turn decoding mode of the above decoding system is as follows:
[0084] In initialization mode, the main power supply provides power. The single-turn decoding unit reads the absolute position of a single turn, and the magnetoresistive counting unit reads the magnetoresistive level signal, saving them to the backup register. The interval where the zero point is located is taken as the first quadrant, and the unit rotates clockwise, dividing the quadrant into the second, third, and fourth quadrants according to the switching order of the magnetoresistive output level, and saving the results to non-volatile memory. After initialization is complete, the system enters normal operating mode.
[0085] When in normal operating mode: powered by main power supply, when the encoder initiates a multi-turn decoding signal, the multi-turn decoding unit performs multi-turn decoding output based on the current quadrant, starting quadrant, starting single-turn position, current single-turn position, and magnetoresistive count value.
[0086] Regardless of whether the encoder's main power supply is on or off, the magnetoresistive counting unit is always in working mode, and the zero point of a single turn is within a range defined by the magnetoresistive level signal.
[0087] The multi-turn decoding process is described in Example 1.
[0088] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A multi-turn decoding method for an encoder based on a magnetoresistive magnetic induction element, characterized in that, Multi-turn decoding of an encoder is achieved based on two orthogonally placed magnetoresistive magnetic induction elements on concentric circles centered on the rotating shaft, including the following steps: 1) Determine the calibration zero point based on the hysteresis signal of the magnetoresistive magnetic induction element and realize quadrant division; 2) Obtain the starting information, which includes the starting quadrant value and the starting single-lap position; 3) Obtain current information, which includes current quadrant value, current single-turn position, magnetoresistive count value, and magnetoresistive multi-turn value, wherein the magnetoresistive multi-turn value is equal to the integer part of the quotient of the magnetoresistive count value divided by 4; 4) Determine the multi-turn count by judging the relationship between the current quadrant value and the initial quadrant value, as well as the sign of the magnetoresistive count value. The calibration zero point is located in a region where the magnetoresistive level signal is unrelated to the direction of rotation. The multi-turn counting is determined by judging the relationship between the current quadrant value and the initial quadrant value, as well as the sign of the magnetoresistive count value. 401) Determine whether the current quadrant value is the same as the initial quadrant value. If yes, obtain the multi-lap count through subprocess 0. If no, proceed to step 402). 402) Determine whether the magnetoresistive count value is greater than 0. If yes, obtain the multi-turn count through sub-process 1; if no, obtain the multi-turn count through sub-process 2. Sub-process 0 specifically includes the following steps: 001) Determine whether the initial quadrant value is in the first quadrant. If yes, proceed to step 002). If no, use the reluctance multi-turn value as the multi-turn count. 002) Determine if there exists an initial single-turn position > 180° and a current single-turn position < 180°. If yes, increment the reluctance multi-turn value by 1 as the multi-turn count. If no, proceed to step 003). 003) Determine if there exists an initial single-turn position <180° and a current single-turn position >180°. If yes, use the reluctance multi-turn value - 1 as the multi-turn count; otherwise, use the reluctance multi-turn value as the multi-turn count. Sub-process 1 specifically includes the following steps: 101) Let the angle α between the starting position and the zero position be equal to the maximum value of a single lap minus the starting position of a single lap, and let the angle β between the starting position and the current position be equal to the current position of a single lap minus the starting position of a single lap. 102) Determine if β < 0. If yes, set β equal to α + the maximum value of a single lap and then proceed to step 103. If no, proceed directly to step 103. 103) Determine if α < β. If yes, use the reluctance multi-turn value + 1 as the multi-turn count; otherwise, use the reluctance multi-turn value as the multi-turn count. Sub-process 2 specifically includes the following steps: 201) Let the negative angle γ between the starting position and the zero point be equal to the starting single lap position, and the negative angle δ between the starting position and the current position be equal to the starting single lap position minus the current single lap position; 202) Determine if δ < 0. If yes, set δ equal to γ + the maximum value of a single lap and then proceed to step 203. If no, proceed directly to step 203. 203) Determine whether γ < δ. If so, use the reluctance multi-turn value -1 as the multi-turn count. If not, use the reluctance multi-turn value as the multi-turn count.
2. The multi-turn decoding method for an encoder based on a magnetoresistive magnetic induction element according to claim 1, characterized in that, The quadrant division is achieved through an initialization step, which specifically includes: 101) Read the level state and single-turn position of the magnetoresistive magnetic induction element, rotate the encoder to determine the magnetoresistive level state at the single-turn zero position as the level of the first quadrant, thereby defining the first quadrant; 102) Rotate the encoder clockwise to sequentially delineate the second, third, and fourth quadrants according to the magnetoresistive level switching sequence.
3. The multi-turn decoding method for an encoder based on a magnetoresistive magnetic induction element according to claim 2, characterized in that, The initialization steps are performed when the main power is first turned on.
4. An encoder multi-turn decoding system for implementing the encoder multi-turn decoding method based on a magnetoresistive magnetic induction element as described in claim 1, characterized in that, include: The single-lap decoding unit is used to obtain the starting single-lap position and the current single-lap position; The magnetoresistive counting unit is used to acquire the initial magnetoresistive level and the current magnetoresistive level, and then obtain the initial quadrant value and the current quadrant value accordingly, and obtain the magnetoresistive count value based on the magnetoresistive level signal; A multi-turn decoding unit is used to decode the final multi-turn position and obtain the multi-turn count based on the outputs of the single-turn decoding unit and the magnetoresistive counting unit. The data backup unit is used to back up the starting single-turn position and the starting magnetoresistive level; The magnetoresistive counting unit is always in operation when the encoder is working.
5. The encoder multi-turn decoding system according to claim 4, characterized in that, The magnetoresistive counting unit includes a magnet fixedly connected to the rotating shaft and two orthogonally placed magnetoresistive magnetic induction elements on concentric circles with the rotating shaft as the center.
Citation Information
Patent Citations
Passive wake-up multi-turn encoder and working method thereof
CN107941247A
Turn number decoding method, device and system of absolute encoder
CN112945283A
Initialization state determination of a magnetic multi-turn sensor
US20190383645A1