Pseudo absolute value magnetic encoder system for rotating shaft and positioning method

By using a pseudo-absolute magnetic encoder with a modular annular magnetic grating and a dual-reading head system, combined with Lissajous radius diagnostics and a self-calibration error compensation table, the problem of high-precision measurement of ultra-large diameter rotary shafts was solved, achieving low-cost, easy-to-install and easy-to-maintain continuous and reliable position measurement.

CN121740101APending Publication Date: 2026-03-27GUANGDONG INCODE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-09
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies are insufficient for achieving high-precision, low-cost, easy-to-install and maintain position measurement of ultra-large diameter rotary shafts. Furthermore, existing solutions suffer from problems such as discontinuous measurement, misjudgment and omission, complex calibration, and limited applicability.

Method used

Employing a modular annular magnetic grating and a dual-read head system, the system utilizes a pseudo-absolute magnetic encoder composed of Hall sensors and AMR sensors, combined with Lissajous radius diagnostic technology and a self-calibrating error compensation table, to achieve real-time health monitoring and seamless switching of the read heads.

Benefits of technology

It achieves high-precision, continuous, and reliable measurement of ultra-large diameter rotary shafts, reduces manufacturing costs and maintenance difficulty, adapts to environmental changes during long-term operation, and improves system stability and measurement accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121740101A_ABST
    Figure CN121740101A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of encoders, in particular to a pseudo absolute value magnetic encoder system for a rotating shaft and a positioning method, the pseudo absolute value magnetic encoder system comprises an annular magnetic grid, a first read head and a second read head, the annular magnetic grid is formed by alternately connecting N poles and S poles and is provided with a slotted ineffective area, and each of the two read heads comprises two Hall sensors and an AMR sensor; the positioning method comprises a calibration step, a mapping relation adjustment step and a positioning step. According to the invention, through active signal diagnosis, self-calibration dynamic compensation and intelligent switching logic, absolute position feedback with low cost, high integration level and high precision is realized, and the system is suitable for super-large-diameter rotating shaft measurement and can be expanded to a pseudo absolute position measurement system of various periodic scales.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of encoder, in particular to a pseudo-absolute magnetic encoder system for rotary shaft and a positioning method. BACKGROUND

[0002] In the field of precise angle and position measurement, encoders, as the core components of mechanical displacement and electrical signal conversion, have been widely used in industrial automation, high-end equipment manufacturing, new energy and many other fields. The measurement accuracy and reliability of the encoder directly determine the operation performance of the equipment. Among them, for the position measurement demand of super large diameter rotary shaft, due to the long diameter of the rotary shaft, the traditional measurement scheme faces insurmountable technical bottlenecks.

[0003] At present, the position measurement of super large diameter rotary shaft mainly relies on two types of technical schemes: one is to use a whole high-precision circular arc grating ruler; this scheme realizes high-precision measurement by customizing a whole glass or metal grating that completely matches the diameter of the rotary shaft and cooperating with a special reading head. However, the manufacturing cost of this method is extremely high, the manufacturing, coating and engraving process of the grating becomes geometrically complex with the increase of the diameter, and the yield is extremely low. The cost may double or even several times for every one meter increase in diameter; on the other hand, the installation and maintenance are extremely difficult. The large grating, which is rigid, fragile and can weigh dozens of kilograms, needs to be assembled on the giant rotary structure without deformation and high concentricity, which requires almost harsh installation environment, tooling equipment and operator technical requirements. Once the installation deviation or damage occurs during use, the whole ruler needs to be replaced, which not only prolongs the construction period, but also causes huge economic losses, resulting in that this scheme can only be applied to a few high-end special equipment and is difficult to popularize.

[0004] Another type of solution is to use a splicable periodic grating ruler combined with a multi-reading head switching architecture to solve the cost and installation problems of the overall grating ruler through modular splicing. The commonly used solution is a switching scheme based on double reading heads, which is arranged along the grating by a master and a slave reading head, relies on the error bits output by the internal circuit of the reading head to determine the failure of the master reading head, and then switches to the slave reading head, and uses a fixed mechanical difference e for position compensation. However, this type of solution still has significant defects: first, the signal failure determination is a post-alarm mode, which completely depends on the internal diagnostic circuit of the sensor. Once the circuit fails or is disturbed, it is easy to cause misjudgment, omission, measurement interruption or abnormal precision, and the reliability is insufficient; second, the compensation mechanism is rough, the fixed difference e cannot correct the nonlinear error, temperature drift and time-varying error caused by mechanical deformation between the two reading heads, and position jump is easy to occur near the switching point, so seamless measurement cannot be realized; third, the calibration process is complex, an independent external reference ruler is needed for offline global calibration, which not only increases the system cost and reduces the integration, but also the static calibration result is difficult to adapt to the working condition changes in long-term operation, and the long-term stability is poor; fourth, the applicability is limited, the existing solution is mostly based on digital protocol reading head, and the core focuses on protocol analysis and logic switching, without involving deep diagnosis and utilization of the original analog signal of the sensor, the technology level is single, and it cannot adapt to more types of sensing units.

[0005] In addition, the existing double-reading head solution does not solve the core problem of optimizing the switching time of the reading head. Since there is an inherent difference in the position linearity of the two reading heads, if the switching position is not accurately selected, it is easy to cause position output jump at the switching moment, which destroys the continuity of measurement, especially in the application scene of super-large diameter rotating shaft with high dynamic response requirement. The jump will directly affect the running stability and control accuracy of the equipment. Therefore, developing a coding system with simple structure, low cost and easy deployment, and being able to realize continuous, high-precision and absolute position feedback, has become the key to solving the measurement problem of super-large diameter rotating shaft, and is also the technical direction that the technical personnel in the field urgently need to break through. SUMMARY

[0006] The purpose of the present application is to solve the above-mentioned problems in the prior art, and to provide a pseudo-absolute value magnetic encoder system for a rotating shaft and a positioning method.

[0007] The purpose of the present application is achieved by the following technical solution: a pseudo-absolute value magnetic encoder system for a rotating shaft, comprising a ring-shaped magnetic grating, a first reading head and a second reading head; the first reading head and the second reading head are arranged tangentially with the ring-shaped magnetic grating; the ring-shaped magnetic grating is composed of a plurality of N poles and a plurality of S poles connected alternately; the ring-shaped magnetic grating is provided with a slotted invalid area; The first read head comprises a first Hall sensor, a second Hall sensor, and a first AMR sensor arranged between the first Hall sensor and the second Hall sensor; and the second read head comprises a third Hall sensor, a fourth Hall sensor, and a second AMR sensor arranged between the third Hall sensor and the fourth Hall sensor.

[0008] The application is further provided that the arc length of the N-pole is the same as that of the S-pole.

[0009] The application is further provided that the arc length of the N-pole is the same as that of the S-pole. The interval D1 between the first Hall sensor and the second Hall sensor satisfies D1=(2n+1)*P / 2. The interval D2 between the third Hall sensor and the fourth Hall sensor satisfies D2=(2n+1)*P / 2. Wherein n is a natural number; and P is the arc length of the N-pole or the arc length of the S-pole.

[0010] The application is further provided that the arc length of the slotted invalid region is smaller than the arc length interval between the first read head and the second read head.

[0011] A positioning method of a pseudo-absolute magnetic encoder system for a rotary shaft, comprising a calibration step, a mapping relationship adjustment step, and a positioning step.

[0012] The application is further provided that the calibration step comprises the following steps: A1, the annular magnetic grating follows the rotary shaft to rotate continuously in one direction; A2, the Hall signals of the first Hall sensor, the second Hall sensor, the third Hall sensor, the fourth Hall sensor, the analog signals of the first AMR sensor, and the analog signals of the second AMR sensor are collected; A3, the Lissajous radius R1 between the first Hall sensor and the second Hall sensor is calculated, the Lissajous radius R2 between the third Hall sensor and the fourth Hall sensor is calculated, the electric angle Q1 of the first AMR sensor is calculated, and the electric angle Q2 of the second AMR sensor is calculated; A4, when the Lissajous radius R1 is smaller than a first threshold value, and the electric angle Q1 crosses zero, step A5 is entered; A5, the perimeter calculation is started, at this time, the electric angle Q1 reading is invalid, and the electric angle Q2 reading is valid; the angle difference integral of the electric angle Q2 is used for angle calibration accumulation; A6, when the Lissajous radius R1 is greater than the first threshold value, and the electric angle Q1 crosses zero, step A7 is entered; A7, the perimeter calculation is continued, at this time, the electric angle Q1 reading is valid; the angle difference integral of the electric angle Q1 is used for angle calibration accumulation; A8、When the Lissajous radius R1 is less than the first threshold value, and the electric angle Q1 crosses the zero point, stop the angle calibration accumulation; A9、According to the angle calibration accumulation in step A5 and the angle calibration accumulation in step A7, calculate the circumference L of the rotation axis corresponding to the arc length of the N pole and the S pole.

[0013] The application is further provided that, in step A7, when the Lissajous radius R1 is greater than the first threshold value, and the electric angle Q1 crosses the zero point, align the electric angle Q1 with the electric angle Q2, and record the mechanical position K at this time.

[0014] The application is further provided that, the mapping relationship adjustment step comprises the following steps: B1、After the calibration step is completed, the annular magnetic grid continues to rotate along the same direction following the rotation axis; B2、When the Lissajous radius R1 is greater than the first threshold value, and the electric angle Q1 crosses the zero point, enter step B3; B3、Take the electric angle Q2 as the reference, and start to build the table of the angle difference between the electric angle Q1 and the electric angle Q2; B4、Until the original accuracy of the electric angle Q1 and the electric angle Q2 is equal and the length of the built table data is greater than one electric period, enter step B5; B5、The angle difference table is completed.

[0015] The application is further provided that, the positioning step comprises the following steps: S1、The rotation axis rotates; S2、Collect the Hall signals of the first, second, third and fourth Hall sensors, and the analog signals of the first and second AMR sensors; S3、Calculate the Lissajous radius R1 between the first and second Hall sensors, the Lissajous radius R2 between the third and fourth Hall sensors, the electric angle Q1 of the first AMR sensor, and the electric angle Q2 of the second AMR sensor; S4、When the Lissajous radius R1 is less than the first threshold value, and the electric angle Q1 crosses the zero point, enter step S5; S5、Output the absolute position of the encoder; S6、Compare the relationship between the absolute position of the encoder and the mechanical position K; S7、If the absolute position of the encoder is greater than or equal to the mechanical position K, output the sum of the electric angle Q1 as the absolute position of the encoder; if the absolute position of the encoder is less than the mechanical position K, output the sum of the electric angle Q2 as the absolute position of the encoder; S8, compare the corresponding arc length of the absolute position of the encoder with the circumference L; S9, if the corresponding arc length of the absolute position of the encoder is greater than the circumference L, the cumulative sum of the electric angle Q2 is output as the absolute position of the encoder; then return to step S6.

[0016] Advantages of the present application: First, the present application uses a standardized, modular and splicable annular magnetic grating to replace the traditional integral circular arc grating ruler, and only needs to increase or decrease the number of magnetic grating modules to flexibly adapt to different diameters of the rotating shaft, without the need for customized production, thereby significantly reducing the manufacturing and procurement costs. At the same time, the modular magnetic grating is light in weight and flexible in installation, and can realize high concentricity assembly without complex tooling equipment, and only needs to replace the damaged module in subsequent maintenance, without the need for whole-scale replacement, thereby significantly shortening the downtime and reducing the maintenance cost, and making the high-precision measurement scheme of the super-large diameter rotating shaft have the conditions for large-scale popularization.

[0017] Second, the present application discards the passive diagnosis mode of the existing scheme relying on the internal error bit of the reading head, and instead applies the Lissajous radius diagnosis technology to real-time monitoring of the health status of multiple reading heads. By real-time calculation of the Lissajous radius of the Hall sensor output signal, combined with the electric angle zero-crossing point information of the AMR sensor, it can actively and predictively identify whether the reading head is in the open slot invalid area, and the diagnosis process is directly based on the quality of the original analog signal, and is not affected by the internal circuit failure of the sensor or external interference, effectively avoiding misjudgment and omission problems, and ensuring the continuity and reliability of the measurement process.

[0018] Third, the present application replaces the traditional fixed difference compensation mechanism through the scheme of self-calibration and local error mapping compensation table. In the calibration mode, the real-time signals of two reading heads are self-compared to establish an angle difference compensation table at the same physical position, and the table is established at the equal-precision position of the reading head, and only a small range of calibration is needed to eliminate the time-varying errors caused by nonlinear errors, temperature drift and mechanical deformation between the two reading heads. In the switching process, the system calls the compensation table to accurately correct the angle value, realizes seamless switching in a relay race, solves the pain point of position jumping at the switching point of the existing scheme, and ensures the continuity and smoothness of the position output on the whole circumference, and the stability and reliability of the measurement accuracy.

[0019] Fourth, the present application does not need to rely on an external reference ruler, and can complete the circumference calibration and error compensation table establishment through the signal self-comparison of the two reading heads inside the system, has high integration, simple calibration process, and reduces the dependence on additional high-value equipment. At the same time, the self-calibration process is closely combined with real-time measurement, and the compensation data can be flexibly updated according to the changes of the equipment operation conditions, effectively adapts to the environmental changes such as mechanical stress relaxation and temperature drift in long-term operation, and significantly improves the long-term stability and measurement accuracy retention of the system. BRIEF DESCRIPTION OF DRAWINGS

[0020] The invention will be further illustrated with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the invention. For those skilled in the art, other drawings can be obtained based on the following drawings without any creative effort.

[0021] Figure 1 This is a schematic diagram of the structure of the present invention; Figure 2 This is a flowchart illustrating the calibration steps of the present invention; Figure 3 This is a flowchart of the mapping relationship adjustment steps of the present invention; Figure 4 This is a flowchart of the positioning steps of the present invention; Wherein: 1. Ring magnetic grid; 11. N pole; 12. S pole; 2. First read head; 21. First Hall sensor; 22. Second Hall sensor; 23. First AMR sensor; 3. Second read head; 31. Third Hall sensor; 32. Fourth Hall sensor; 33. Second AMR sensor; 4. Opening invalid area. Detailed Implementation

[0022] The present invention will be further described in conjunction with the following embodiments.

[0023] Depend on Figure 1 As can be seen, the pseudo-absolute magnetic encoder system for a rotary shaft described in this embodiment includes an annular magnetic grid 1, a first reading head 2, and a second reading head 3; the first reading head 2 and the second reading head 3 are respectively tangentially arranged with the annular magnetic grid 1; the annular magnetic grid 1 is formed by alternatingly connecting multiple N poles 11 and multiple S poles 12; the annular magnetic grid 1 is provided with a slotted invalid region 4; The first read head 2 includes a first Hall sensor 21, a second Hall sensor 22, and a first AMR sensor 23 disposed between the first Hall sensor 21 and the second Hall sensor 22; the second read head 3 includes a third Hall sensor 31, a fourth Hall sensor 32, and a second AMR sensor 33 disposed between the third Hall sensor 31 and the fourth Hall sensor 32.

[0024] Specifically, the embodiment is configured by setting the annular magnetic scale 1, the first reading head 2 and the second reading head 3 to build a pseudo-absolute value measurement basis; the annular magnetic scale 1 is modularly designed by alternately connecting the N pole 11 and the S pole 12, can be adapted to different diameter rotary shafts by splicing, and solves the customization problem of the integral scale; the double reading heads are tangentially arranged with the magnetic scale to ensure the stable gap between each sensor and the annular magnetic scale 1 and to ensure the consistency of the magnetic field signal acquisition; each reading head is integrated with two Hall sensors and an AMR sensor, the Hall sensor is used to collect the magnetic field analog signal to judge the signal validity, the AMR sensor is used to accurately detect the electric angle to obtain the position information, and the two sensors realize the dual functions of signal quality diagnosis and angle accurate measurement.

[0025] The N pole 11 and the S pole 12 have the same arc length, which can make the magnetic field change generated by the annular magnetic scale 1 present uniform periodicity, ensure that each Hall sensor can output a sine / cosine signal with stable amplitude and change rule during the rotation of the magnetic scale, avoid the magnetic field distortion caused by the uneven arc length of the magnetic pole, and further affect the accuracy of signal quality judgment and angle calculation.

[0026] The pseudo-absolute value magnetic encoder system for the rotary shaft; The interval D1 of the first Hall sensor 21 and the second Hall sensor 22 satisfies D1=(2n+1)*P / 2; The interval D2 of the third Hall sensor 31 and the fourth Hall sensor 32 satisfies D2=(2n+1)*P / 2; Wherein n is a natural number; P is the arc length of the N magnetic pole or the arc length of the S magnetic pole.

[0027] Specifically, the arc length P of the N pole 11 or the S pole 12 is the magnetic pole period of the magnetic scale, the interval D1 and D2 of the Hall sensor are set to (2n+1)*P / 2 (n is a natural number), which can make the phase difference of the magnetic field sensed by the two Hall sensors on the same reading head be exactly 90°, so as to output strictly orthogonal sine / cosine signals. The Lissajous trajectory composed of the orthogonal signals in the XY plane is a standard circle, and the radius thereof can directly and accurately reflect the strength and integrity of the magnetic field signal, thereby providing a core basis for signal validity diagnosis.

[0028] The slit invalid area 4 has an arc length smaller than the arc length interval between the first read head 2 and the second read head 3. The slit invalid area 4 of the annular magnetic grid 1 is a necessary structure for module splicing, and the arc length is smaller than the arc length interval between the first read head 2 and the second read head 3. It can be ensured from the physical structure that when one read head enters the slit invalid area 4, the other read head is necessarily in the effective magnetic grid area (N pole 11 or S pole 12 coverage range), and the situation that both read heads are invalid at the same time does not occur.

[0029] By Figures 2 to 4 It can be known that the positioning method of the pseudo-absolute magnetic encoder system for the rotary shaft comprises a calibration step, a mapping relationship adjustment step and a positioning step. The positioning method follows the logical architecture of basic calibration-error compensation-real-time positioning. The circumference L of the rotary shaft (realizing position normalization) and the mechanical position K (determining the switching boundary) are obtained through the calibration step to solve the problem of missing measurement reference. The angle difference compensation table of the first read head 2 and the second read head 3 is established through the mapping relationship adjustment step to solve the problems of inherent error and dynamic error. Finally, real-time signal acquisition, invalidation diagnosis and intelligent switching are realized through the positioning step to solve the problem of real-time accurate output. The three steps are progressive and mutually supporting.

[0030] The positioning method of the pseudo-absolute magnetic encoder system for the rotary shaft comprises the following steps in the calibration step: A1, the annular magnetic grid 1 continuously rotates in one direction along with the rotary shaft; in this step, the rotary shaft is controlled to rotate at a constant speed in a fixed direction (such as Figure 1 counterclockwise) to maintain a single rotation direction, so that the magnetic field change presents continuous, regular periodicity, avoiding problems such as phase confusion of the Hall signal and fuzzy zero-crossing judgment of the electric angle caused by reverse rotation, and providing a stable physical motion basis for subsequent signal diagnosis and angle integration; A2, the Hall signals of the first Hall sensor 21, the second Hall sensor 22, the third Hall sensor 31 and the fourth Hall sensor 32, the analog signals of the first AMR sensor 23 and the second AMR sensor 33 are collected; in this step, the Hall voltage signals of the first Hall sensor 21, the second Hall sensor 22, the third Hall sensor 31 and the fourth Hall sensor 32 are synchronously collected by the analog signal collection module integrated by the FPGA; and the analog voltage signals of the first AMR sensor 23 and the second AMR sensor 33 are collected; A3, calculate the Lissajous radius R1 between the first Hall sensor 21 and the second Hall sensor 22, calculate the Lissajous radius R2 between the third Hall sensor 31 and the fourth Hall sensor 32, calculate the electric angle Q1 of the first AMR sensor 23, and calculate the electric angle Q2 of the second AMR sensor 33; in this step, real-time signal processing is performed inside the FPGA, and the specific calculation logic is as follows: Lissajous radius calculation: for the first read head 2: R1 = V(Hall1 2 + U_Hall2 2), U_Hall1 and U_Hall2 are the real-time output voltages of the first Hall sensor 21 and the second Hall sensor 22; for the second read head 3: R2 = V(Hall3 2 + U_Hall4 2); U_Hall3 and U_Hall4 are the real-time output voltages of the third Hall sensor 31 and the fourth Hall sensor 32; Electric angle calculation: using the CORDIC (Coordinate Rotation Digital Computer) algorithm, the phase of the analog signals of the first AMR sensor and the second AMR sensor is calculated, and the electric angles Q1 and Q2 (range 0° to 360°) are output; Since the signals of the first Hall sensor 21 and the second Hall sensor 22 are strictly orthogonal sine / cosine signals (because the distance satisfies D = (2n + 1) * P / 2), the Lissajous trajectory of their combination is a standard circle, and the radius R1 directly reflects the strength and integrity of the magnetic field signal. When the signal is valid, the Lissajous radius R1 is stable near the rated value, and when the signal is invalid (in the slotted invalid area 4), the Lissajous radius R1 significantly decays. The Lissajous radius R2 monitors the signal state of the second read head 3 in real time, ensuring that at least one read head is in the valid area during calibration to avoid measurement interruption. In addition, the electric angles Q1 and Q2 accurately reflect the phase position of the magnetic grid rotation, providing core data for angle difference integration and perimeter calculation; A4, when the Lissajous radius R1 is less than the first threshold, and the electric angle Q1 crosses zero, step A5 is entered; wherein the first threshold is set as follows: according to the rated output amplitude of the Hall sensor (such as 2V), the first threshold is set to 1.5V (the threshold needs to be calibrated through experiments to ensure that the read head is necessarily in the slotted invalid area 4 when it is below this value); electric angle crossing zero judgment: when the electric angle Q1 jumps from 359.99° to 0.01° (or from 0.01° to 359.99°), it is determined that the electric angle Q1 crosses zero. When the electric angle Q1 crosses zero, the electric angle changes clearly without ambiguous interval, and the time when the first read head 2 enters / exits the slotted invalid area 4 can be accurately defined; A5, start the circumference calculation, at this time the electric angle Q1 reading is invalid, and the electric angle Q2 reading is valid; the angle difference integral of the electric angle Q2 is used for angle calibration accumulation; at this time, the first reading head 2 is in the slit invalid area 4 (the Lissajous radius R1 is less than the first threshold value), and the second reading head 3 is necessarily in the effective magnetic grid area (the Lissajous radius R2 is greater than the second threshold value) because the arc length of the slit invalid area 4 is less than the distance between the two reading heads, so the electric angle Q1 is invalid, and the electric angle Q2 is valid; The angle difference AQ2=Q2(i)-Q2(i-1) of the adjacent sampling points of the electric angle Q2 is calculated in real time, and the angle calibration accumulation value S1=∑AQ2 (the integral time length is the time for the first reading head 2 to pass through the slit invalid area 4) is obtained by accumulating and integrating, and after completion, S1 is temporarily stored to the cache module of the FPGA; A6, when the Lissajous radius R1 is greater than the first threshold value, and the electric angle Q1 crosses zero, step A7 is entered; when R1 is greater than 1.5V (the first reading head 2 returns to the effective area, and the signal returns to normal), and the electric angle Q1 crosses zero again (for example, 0.01° jumps to 359.99°), step A7 is triggered to enter; the zero-crossing point is again used as a switching trigger point to accurately define the time when the first reading head 2 exits the invalid area and enters the effective area, so as to ensure the accuracy of the time when the subsequent switching to the electric angle Q1 for integration, and avoid the integral error caused by signal recovery delay; A7, continue the circumference calculation, at this time the electric angle Q1 reading is valid; the angle difference integral of the electric angle Q1 is used for angle calibration accumulation; at this time, the first reading head 2 enters the effective area, and the calibration focus is switched to the electric angle Q1, so it is determined that the electric angle Q2 is invalid, and the electric angle Q1 is valid; then the angle difference AQ1=Q1(i)-Q1(i-1) of the adjacent sampling points of the electric angle Q1 is calculated in real time, and the angle calibration accumulation value S2=∑AQ1 is obtained by accumulating and integrating; A8, when the Lissajous radius R1 is less than the first threshold value, and the electric angle Q1 crosses zero, stop the angle calibration accumulation; at this time, it is determined that the first reading head 2 enters the slit invalid area 4 again, and the rotation shaft has completed one rotation, and the angle difference integral accumulation is immediately stopped; the first reading head 2 enters the invalid area twice as a symbol, so as to ensure that the angle accumulation value Stotal=S1+S2 is exactly equal to the total angle of one rotation of the rotation shaft, and avoid the circumference calculation error caused by more or less rotation; A9, according to the angle calibration accumulation in step A5 and the angle calibration accumulation in step A7, the circumference L of the rotation shaft is calculated according to the arc length of the N pole 11 and the S pole 12; since the arc lengths of the N pole 11 and the S pole 12 are the same (assuming L_pole), the arc length P of the adjacent N / S pole 12 is L_pole, and Stotal=S1+S2 (corresponding to one rotation of the main shaft); The relationship between the circumference L and the angle is L=(S total / 360°)×P, wherein S total corresponds to the angle of one revolution of the main shaft, i.e., L=(S total / 360°)×L_pole, and finally the circumference L is calculated; then the circumference L is stored in the Flash chip of the FPGA, and is used for position normalization in subsequent positioning; in this embodiment, the self-calibration of the circumference of the rotary shaft is realized through self-comparison and integral calculation of internal signals of the system, without relying on external measurement tools, so that the system integration is improved, the error introduced by external measurement is avoided, and the calculation accuracy of the circumference L is ensured.

[0031] In step A7, when the Lissajous radius R1 is greater than the first threshold value, and the electric angle Q1 crosses the zero point, the electric angle Q1 is aligned with the electric angle Q2, and the mechanical position K at this time is recorded.

[0032] Specifically, the electric angle value of the electric angle Q1 is forced to be equal to the electric angle value of the electric angle Q2, a unified angle reference of the first read head 2 and the second read head 3 is established, and the angle offset caused by the initial installation deviation is eliminated; the mechanical position K is recorded, the initial installation position of the main shaft is taken as the 0° reference, the mechanical position K at this time is recorded, and is stored in the Flash chip of the FPGA as a demarcation point for read head switching in subsequent positioning steps.

[0033] The positioning method of the pseudo-absolute magnetic encoder system for the rotary shaft in this embodiment comprises the following steps in the mapping relationship adjustment step: B1, after the calibration step is completed, the annular magnetic grid 1 continues to rotate in the same direction along with the rotary shaft; the circumference L calculation and the mechanical position K recording in the calibration step (A1-A9) have been completed, at this time, the rotation direction of the rotary shaft is kept unchanged, so as to avoid the magnetic field phase confusion and the electric angle misjudgment caused by the direction switching; then the FPGA ensures that the first read head 2 and the second read head 3 are both in the effective magnetic grid area (the Lissajous radius R1 is greater than the first threshold value, and the Lissajous radius R2 is greater than the second threshold value) by monitoring the Lissajous radius R1 and the Lissajous radius R2 in real time, to provide a reliable signal basis for the angle difference table building; B2, when the Lissajous radius R1 is greater than the first threshold value, and the electric angle Q1 crosses the zero point, step B3 is entered; at this time, the first threshold value (such as 1.5V) in the calibration step is used, when the FPGA detects that the Lissajous radius R1 is greater than 1.5V (the first read head 2 is in the effective area, and the signal is complete and reliable), and the electric angle Q1 appears the electric angle crossing zero point (such as jumping from 359.99° to 0.01°), the building table stage is triggered to enter; in addition, it is also confirmed that the Lissajous radius R2 is greater than the second threshold value (the second read head 3 is also in the effective area), to ensure that the electric angle data of the electric angle Q2 is effective, and to avoid the building table error caused by taking invalid signal as the reference; The cross-zero point of the electrical angle Q1 is the starting / ending boundary of the electrical angle cycle. The starting time of the table is built based on the cross-zero point, so that the angle difference data covers the complete cycle of 0° to 360°, and the missing compensation table data caused by the starting position offset of the table is avoided. In addition, it is ensured that the electrical angle Q1 and the electrical angle Q2 are based on valid signals during the table building process, and the angle difference only reflects the inherent error (such as installation deviation and sensor consistency difference) of the two read heads, rather than the distortion caused by invalid signals. B3, with the electrical angle Q2 as the reference, the electrical angle Q1 and the electrical angle Q2 start to build the angle difference table. At this time, the electrical angle of the electrical angle Q2 is fixed as the reference reference (because the electrical angle Q2 has been verified by the invalid area switching in the calibration stage, the signal stability and accuracy have been confirmed), and the electrical angle Q1 is taken as the object to be calibrated. The FPGA real-time collects the electrical angle data of the electrical angle Q1 and the electrical angle Q2, calculates the instantaneous angle difference between the two, records a group of change values at a fixed angle interval, and stores the corresponding change value data to the temporary cache module of the FPGA. The data acquisition covers the complete cycle of the rotating shaft rotation, ensuring that the compensation table can adapt to any mechanical position in the positioning process; B4, until the original accuracy of the electrical angle Q1 and the electrical angle Q2 is equal and the table building data length is greater than one electrical cycle, step B5 is entered; when the angle difference between the electrical angle Q1 and the electrical angle Q2 is stable within the inherent accuracy range of the sensor, it is determined that the original accuracy of the two is equal; by setting the above termination condition, the table building time is shortened, the system startup efficiency is improved, and the core error coverage of the compensation table is ensured; B5, the angle difference table is completed.

[0034] The embodiment has obtained the circumference L of the rotating shaft and the mechanical position K on the basis of the calibration step, and establishes a dynamic angle difference compensation table through real-time signal self-comparison of the first read head 2 and the second read head 3, accurately records the inherent error, temperature drift error and installation deviation of the first AMR sensor 23 and the second AMR sensor 33 at different mechanical positions, provides error correction basis for seamless switching of the read head in the subsequent positioning step, and solves the problem of accuracy reduction at the switching point caused by traditional fixed difference compensation.

[0035] The positioning method of the pseudo-absolute value magnetic encoder system for the rotating shaft comprises the following steps: S1, the rotating shaft rotates; the rotating shaft rotates freely according to the actual working condition, without the need to maintain the uniform speed limit in the calibration / table setting stage; the rotating direction in the calibration stage can be maintained, and the rotating direction can also be reversed; the FPGA monitors the rotating state of the rotating shaft in real time, ensures that the signal acquisition of each sensor is synchronized with rotation, and avoids signal zero drift misjudgment caused by static; the positioning steps of the embodiment adapt to the actual operation of the rotating shaft. working condition, without the need for low-speed uniform speed limit in the calibration / table setting stage, meeting the measurement needs of dynamic rotation in industrial scenarios; the direction compatibility improves the practicality of the system, without the need to forcibly fix the rotating direction; S2, the Hall signals of the first Hall sensor 21, the Hall signals of the second Hall sensor 22, the Hall signals of the third Hall sensor 31, the Hall signals of the fourth Hall sensor 32, the analog signals of the first AMR sensor 23, and the analog signals of the second AMR sensor 33 are collected; this step is the same as step A2; S3, the Lissajous radius R1 between the first Hall sensor 21 and the second Hall sensor 22 is calculated, the Lissajous radius R2 between the third Hall sensor 31 and the fourth Hall sensor 32 is calculated, the electric angle Q1 of the first AMR sensor 23 is calculated, and the electric angle Q2 of the second AMR sensor 33 is calculated; this step is the same as step A3; S4, when the Lissajous radius R1 is less than the first threshold, and the electric angle Q1 crosses zero, step S5 is entered; this step is the same as step A4; S5, the absolute position of the encoder is output; S6, the relationship between the absolute position of the encoder and the mechanical position K is compared; the mechanical position K recorded in the calibration step is read from the Flash chip of the FPGA; the absolute position of the encoder preliminarily output in step S5 is compared with the mechanical position K in real time, to determine whether the current mechanical position is on the left side (<K) or the right side (≥K) of K; the mechanical position K is the demarcation point of the angle alignment of the first read head 2 and the second read head 3, providing a basis for subsequent read head selection; the mechanical position K serves as the demarcation for switching between the two read heads, ensuring that the optimal read head is selected for output at different mechanical positions, and avoiding the decrease in accuracy caused by the signal attenuation at the edge of the effective area of the read head; S7, if the absolute position of the encoder is greater than or equal to the mechanical position K, the cumulative sum of the electric angle Q1 is output as the absolute position of the encoder; if the absolute position of the encoder is less than the mechanical position K, the cumulative sum of the electric angle Q2 is output as the absolute position of the encoder; When the absolute position of the encoder is greater than or equal to the mechanical position K, the first read head 2 is in the core range of the effective zone, the electrical angle Q1 signal is more accurate, at this time the cumulative sum of the electrical angle Q1 is taken as the final absolute position output, the cumulative sum of the electrical angle Q1 is the sum of the electrical angle Q1 and the historical cumulative angle (the historical cumulative angle is the cumulative value of the electrical angle Q1 in the previous sampling period), and no additional correction is required before output (the electrical angle Q1 Q1 is the main read head, and the error calibration has been completed by taking the electrical angle Q2 as the reference during table building); When the absolute position of the encoder is less than or equal to the mechanical position K, the second read head 3 is in the core range of the effective zone, the electrical angle Q2 signal is more stable, at this time the cumulative sum of the electrical angle Q2 is taken as the final absolute position output, the cumulative sum of the electrical angle Q2 is the sum of the corrected electrical angle Q2 and the historical cumulative angle; and the final absolute position is synchronously output through the encoder interface; S8, compare the corresponding arc length of the absolute position of the encoder with the circumference L; the arc length L_pos corresponding to the absolute position = (absolute position / 360°) x L (L is the circumference of the rotating shaft obtained in the calibration step; in this embodiment, L_pos is compared with L to determine whether there is a cross-period rotation (i.e., the rotating shaft rotates more than one turn). The circumference L is a core parameter for position normalization, and cross-period position management is achieved through arc length comparison, so as to avoid unlimited accumulation of the absolute position value, ensure that the output conforms to the standardized position range of 0°-360° of the absolute encoder, and facilitate calculation of the number of rotation turns by the external control system; S9, if the corresponding arc length of the absolute position of the encoder is greater than the circumference L, the cumulative sum of the electrical angle Q2 is taken as the absolute position output of the encoder; and then return to step S6; when the arc length L_pos corresponding to the absolute position is greater than the circumference L, it is determined that the rotating shaft has rotated more than one turn, at this time the absolute position is reset to zero, and the cumulative sum of the corrected electrical angle Q2 is taken as the new absolute position output; after the cross-period processing is completed, return to step S6 to continuously compare the relationship between the absolute position and K, and repeat the logic of read head selection-position output-cross-period determination, so as to realize uninterrupted positioning of the continuous rotation of the rotating shaft; the number of rotation turns is synchronously recorded in the system, and can be output as needed through the encoder interface to meet the application scenarios requiring number of turns statistics; The cross-period zero reset processing in this embodiment ensures the standardization of the absolute position output and avoids numerical overflow; the cyclic positioning logic realizes uninterrupted measurement and adapts to the working conditions of long-term continuous operation of the rotating shaft; and the number of turns recording function expands the applicability of the system and meets the measurement requirements in multiple scenarios.

[0036] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the protection scope of the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced equivalently without departing from the essence and scope of the technical solutions of the present application.

Claims

1. A pseudo-absolute magnetic encoder system for a rotary shaft, characterized in that: It includes a ring magnetic grid (1), a first reading head (2) and a second reading head (3); the first reading head (2) and the second reading head (3) are respectively tangentially arranged with the ring magnetic grid (1); the ring magnetic grid (1) is formed by alternatingly connecting multiple N poles (11) and multiple S poles (12); the ring magnetic grid (1) is provided with a slotted ineffective region (4); The first read head (2) includes a first Hall sensor (21), a second Hall sensor (22), and a first AMR sensor (23) disposed between the first Hall sensor (21) and the second Hall sensor (22); the second read head (3) includes a third Hall sensor (31), a fourth Hall sensor (32), and a second AMR sensor (33) disposed between the third Hall sensor (31) and the fourth Hall sensor (32).

2. The pseudo-absolute magnetic encoder system for a rotary shaft according to claim 1, characterized in that: The arc length of the N pole (11) is the same as that of the S pole (12).

3. A pseudo-absolute magnetic encoder system for a rotary shaft according to claim 1, characterized in that: The distance D1 between the first Hall sensor (21) and the second Hall sensor (22) satisfies D1=(2n+1)*P / 2; The distance D2 between the third Hall sensor (31) and the fourth Hall sensor (32) satisfies D2=(2n+1)*P / 2; Where n is a natural number; P is the arc length of the N magnetic pole or the arc length of the S magnetic pole.

4. A pseudo-absolute magnetic encoder system for a rotary shaft according to claim 1, characterized in that: The arc length of the open-slit invalid area (4) is less than the arc length distance between the first reading head (2) and the second reading head (3).

5. A positioning method based on the pseudo-absolute magnetic encoder system for a rotary shaft as described in any one of claims 1-4, characterized in that: It includes calibration steps, mapping adjustment steps, and positioning steps.

6. A positioning method for a pseudo-absolute magnetic encoder system for a rotary shaft according to claim 5, characterized in that: The calibration process includes the following steps: A1. The annular magnetic grating (1) rotates continuously in one direction following the rotation axis; A2. Collect the Hall signal of the first Hall sensor (21), the Hall signal of the second Hall sensor (22), the Hall signal of the third Hall sensor (31), the Hall signal of the fourth Hall sensor (32), the analog signal of the first AMR sensor (23), and the analog signal of the second AMR sensor (33); A3. Calculate the Lissajous radius R1 between the first Hall sensor (21) and the second Hall sensor (22), calculate the Lissajous radius R2 between the third Hall sensor (31) and the fourth Hall sensor (32), calculate the electrical angle Q1 of the first AMR sensor (23), and calculate the electrical angle Q2 of the second AMR sensor (33). A4. When the Lissajous radius R1 is less than the first threshold and the electrical angle Q1 crosses zero, proceed to step A5. A5. Start the perimeter calculation. At this time, the electrical angle Q1 reading is invalid, while the electrical angle Q2 reading is valid. Use the angle difference integral of electrical angle Q2 for angle calibration accumulation. A6. When the Lissajous radius R1 is greater than the first threshold and the electrical angle Q1 crosses zero, proceed to step A7. A7. Continue the perimeter calculation. At this point, the electrical angle Q1 reading is valid. Use the angle difference integral of electrical angle Q1 for angle calibration accumulation. A8. When the Lissajous radius R1 is less than the first threshold and the electrical angle Q1 crosses zero, stop the angle calibration accumulation. A9. Based on the angle calibration accumulation in step A5 and the angle calibration accumulation in step A7, calculate the circumference L of the rotating shaft corresponding to the arc length of the N pole (11) and the S pole (12).

7. A positioning method for a pseudo-absolute magnetic encoder system for a rotary shaft according to claim 6, characterized in that: In step A7, when the Lissajous radius R1 is greater than the first threshold and the electrical angle Q1 crosses zero, the electrical angle Q1 is aligned with the electrical angle Q2, and the mechanical position K at this time is recorded.

8. A positioning method for a pseudo-absolute magnetic encoder system for a rotary shaft according to claim 7, characterized in that: The mapping relationship adjustment step includes the following steps: B1. After the calibration step is completed, the annular magnetic grating (1) continues to rotate in the same direction along the rotation axis; B2. When the Lissajous radius R1 is greater than the first threshold and the electrical angle Q1 crosses zero, proceed to step B3. B3. Using electrical angle Q2 as the reference, start to establish an angle difference table between electrical angle Q1 and electrical angle Q2; B4. Continue until the original precision of electrical angle Q1 and electrical angle Q2 are equal and the length of the table data is greater than one electrical cycle, then proceed to step B5. B5. Angle difference table creation completed.

9. A positioning method for a pseudo-absolute magnetic encoder system for a rotary shaft according to claim 8, characterized in that: The positioning step includes the following steps: S1, The rotating shaft rotates; S2. Acquire the Hall signal of the first Hall sensor (21), the Hall signal of the second Hall sensor (22), the Hall signal of the third Hall sensor (31), the Hall signal of the fourth Hall sensor (32), the analog signal of the first AMR sensor (23), and the analog signal of the second AMR sensor (33); S3, calculate the Lissajous radius R1 between the first Hall sensor (21) and the second Hall sensor (22), calculate the Lissajous radius R2 between the third Hall sensor (31) and the fourth Hall sensor (32), calculate the electrical angle Q1 of the first AMR sensor (23) and calculate the electrical angle Q2 of the second AMR sensor (33); S4. When the Lissajous radius R1 is less than the first threshold and the electrical angle Q1 crosses zero, proceed to step S5. S5, Absolute position of the output encoder; S6. Compare the relationship between the absolute position of the encoder and the mechanical position K; S7. If the absolute position of the encoder is greater than or equal to the mechanical position K, the sum of the electrical angles Q1 is used as the absolute position output of the encoder; if the absolute position of the encoder is less than the mechanical position K, the sum of the electrical angles Q2 is used as the absolute position output of the encoder. S8. Compare the relationship between the corresponding arc length of the absolute position of the encoder and the circumference L; S9. If the arc length corresponding to the absolute position of the encoder is greater than the circumference L, the sum of the electrical angles Q2 is used as the absolute position output of the encoder; then return to step S6.