An encoder position detection apparatus, method and electronic device

By optimizing the combined design of the magnetic grating and sensor modules, the problems of high cost and poor convenience of multi-pole magnetic grating encoders are solved, achieving high-precision and low-cost position detection, which is suitable for a variety of devices.

CN121739869BActive Publication Date: 2026-07-10江苏烽禾升智能科技有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
江苏烽禾升智能科技有限公司
Filing Date
2026-02-26
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing multi-pole magnetic encoders suffer from high costs due to the large number of sensors and analog-to-digital converters in absolute schemes, and poor ease of use due to the need to move the actuator to calibrate its position upon power-up in incremental schemes.

Method used

The design employs a combination of magnetic grating, stator module, angle-type magnetic sensor, and switch-type magnetic sensor module. The drive control module outputs a fixed electrical angle to drive the mover to a preset position. The switch-type magnetic sensor detects the magnetic grating coverage state, and the angle-type magnetic sensor obtains the angle value. The absolute position is calculated by combining the position range and the angle value.

Benefits of technology

It significantly reduces hardware costs, simplifies the zero-finding process, improves position detection accuracy and initialization efficiency, and is suitable for high-precision applications such as automated machine tools and precision robots, while being compatible with devices of different stroke lengths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121739869B_ABST
    Figure CN121739869B_ABST
Patent Text Reader

Abstract

The application relates to an encoder position detection device, a method and electronic equipment, and belongs to the technical field of position detection. The device comprises a magnetic grid, a stator module, a plurality of angle type magnetic sensors and a plurality of switch type magnetic sensor modules. Each switch type magnetic sensor module and each angle type magnetic sensor are arranged at intervals. The switch type magnetic sensor module comprises at least one switch type magnetic sensor. The angle type magnetic sensor is used for acquiring the angle value of the magnetic grid. The switch type magnetic sensor module is used for detecting whether the magnetic grid is covered. The driving control module is used for outputting a fixed electric angle in the power-on initialization process, driving the rotor where the magnetic grid is located to move to a preset position, acquiring the number of switch type magnetic sensors that detect the magnetic grid, and judging the position range of the magnetic grid according to the number of switch type magnetic sensors. The absolute position of the magnetic grid is obtained according to the angle value and the position range. The application improves the accuracy of position detection and reduces the sensor density.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of position detection technology, and in particular to an encoder position detection device, method and electronic device. Background Technology

[0002] In the field of encoder technology, multi-pole magnetic grating encoders have been widely used in position detection scenarios due to their unique magnetic field detection principle. However, current technical solutions still face challenges in many aspects, such as sensor arrangement, position recognition accuracy, cost control, and ease of use.

[0003] Sensor density is a key factor affecting the position recognition accuracy of multi-pole magnetic grid encoders, and there is a strict matching relationship between sensor density and pole spacing. If the sensor density is less than the pole spacing, the encoder will be unable to accurately capture the periodic changes in the magnetic field, leading to position recognition failure. Therefore, sensor density must meet specific technical requirements.

[0004] For absolute encoders, the AMR magnetic sensors currently used in mainstream solutions only have angle recognition capabilities and cannot distinguish between the N and S poles of the magnetic field; while linear Hall sensors can only detect magnetic field strength and lack angle recognition functionality. This technical limitation necessitates that in absolute solutions using multi-pole magnetic grid encoders, the sensor density must be greater than or equal to the pole spacing. Further considering positioning requirements, each set of linear Hall sensors needs to be configured with two sensors to generate orthogonal signals, directly resulting in a sensor density that is twice the pole spacing. This high-density sensor arrangement not only significantly increases the number of sensors used but also correspondingly increases the number of analog-to-digital converters (ADCs) required, keeping the overall cost of absolute encoders high and limiting their application in cost-sensitive scenarios.

[0005] While incremental encoders offer advantages in sensor density and effectively control hardware costs, they present a significant zeroing challenge. Due to the lower sensor density, the encoder cannot directly identify the current position of the mover (magnetic grid) during the initial power-up phase, requiring specific operations for position calibration. Specifically, the mover must be moved out of the encoder's detection range and then re-enter it from one side, utilizing the periodic changes in the magnetic field to achieve position identification and calibration; alternatively, the mover must be moved to a preset fixed position (0 electrical angle) to achieve zeroing. In scenarios with long encoders (e.g., 480mm), this process results in an excessively large stroke required for the mover to move upon power-up, making operation cumbersome, severely impacting ease of use, and reducing overall system efficiency.

[0006] In summary, both absolute and incremental solutions for current multi-pole magnetic grating encoders have their own technical shortcomings. How to balance sensor density, control costs, and simplify the zeroing process while ensuring position recognition accuracy has become an urgent technical problem to be solved in this field. Summary of the Invention

[0007] Therefore, the technical problem to be solved by the present invention is to overcome the dual limitations of the prior art, namely, the high cost of multi-pole magnetic grid encoders in absolute schemes due to the large number of sensors and analog-to-digital converters, and the poor ease of use in incremental schemes due to the need to move the actuator to calibrate the position upon power-up.

[0008] In a first aspect, to solve the above-mentioned technical problems, the present invention provides an encoder position detection device, comprising:

[0009] Magnetic grid;

[0010] The stator module includes a drive control module, multiple angle-type magnetic sensors, and multiple switch-type magnetic sensor modules; wherein each of the switch-type magnetic sensor modules and each of the angle-type magnetic sensors are spaced apart; each switch-type magnetic sensor module includes at least one switch-type magnetic sensor.

[0011] The angle-type magnetic sensor is used to obtain the angle value of the magnetic grating;

[0012] The switch-type magnetic sensor module is used to detect whether the magnetic grating is covered;

[0013] The drive control module is used to output a fixed electrical angle during the power-on initialization process to drive the mover containing the magnetic grating to a preset position; to obtain the number of switch-type magnetic sensors that detect the magnetic grating, and to determine the position range of the magnetic grating based on the number of switch-type magnetic sensors; and to obtain the absolute position of the magnetic grating based on the angle value and the position range.

[0014] In one embodiment of the present invention, the preset position includes multiple position intervals, and the interval between each position interval is 20mm.

[0015] In one embodiment of the present invention, the angle-type magnetic sensor is an anisotropic magnetoresistive sensor, and the spacing between each anisotropic magnetoresistive sensor is 40 mm.

[0016] In one embodiment of the present invention, the switch-type magnetic sensor module includes two switch-type magnetic sensors, wherein the switch-type magnetic sensors are switch Hall sensors.

[0017] In one embodiment of the present invention, a field-programmable gate array is also included, and both of the switch Hall sensors are connected to the field-programmable gate array.

[0018] In one embodiment of the present invention, the spacing between each of the switch-type magnetic sensor modules is 40 mm.

[0019] Secondly, to solve the above-mentioned technical problems, the present invention provides an encoder position detection method, applied to the above-mentioned encoder position detection device, comprising:

[0020] S1. During the power-on initialization process, output a fixed electrical angle to drive the mover containing the magnetic grating to a preset position;

[0021] S2. Detect the coverage state of the magnetic grating using a switch-type magnetic sensor, and obtain the number of switch-type magnetic sensors that detected the magnetic grating; determine the position range of the magnetic grating based on the number of switch-type magnetic sensors;

[0022] S3. Obtain the angle value of the magnetic grating using an angle-type magnetic sensor;

[0023] S4. Obtain the absolute position of the magnetic grating based on the position range and the angle value.

[0024] In one embodiment of the present invention, step S4, which involves obtaining the absolute position of the magnetic grating based on the position range and the angle value, comprises:

[0025] Based on the stated location range, the target angle-type magnetic sensor for calculation is determined; the serial number and magnetic pole range of the target angle-type magnetic sensor are obtained.

[0026] The absolute position of the magnetic grating is calculated based on the serial number, the magnetic pole region it is located in, and the angle value; wherein the expression for calculating the absolute position is:

[0027] ;

[0028] in, Indicates the absolute position of the magnetic grating. This indicates the spacing between two adjacent angled magnetic sensors. Indicates the serial number of the target angle-type magnetic sensor. This represents the length of the straight line corresponding to a single magnetic pole. Indicates the starting magnetic pole number of the magnetic pole region where the target angle magnetic sensor is located. Indicates the angle value.

[0029] In one embodiment of the present invention, in step S2, the rule for detecting the coverage state of the magnetic grating using a switch-type magnetic sensor and obtaining the number of switch-type magnetic sensors that have detected the magnetic grating is as follows: with the angle-type magnetic sensor as a reference, the switch-type magnetic sensors synchronously arranged along the movement direction of the magnetic grating are the detection objects; if the effective magnetic field coverage signal ratio of the current switch-type magnetic sensor reaches a set threshold within a preset sampling period, it is determined that the current switch-type magnetic sensor has detected the magnetic grating and is included in the total count; otherwise, it is determined that the current switch-type magnetic sensor is an invalid detection and is not included in the count.

[0030] Thirdly, in order to solve the above-mentioned technical problems, the present invention provides an electronic device, including the encoder position detection device described above.

[0031] Compared with the prior art, the above-described technical solution of the present invention has the following advantages:

[0032] (1) The encoder position detection device, method, and electronic device described in this invention significantly improves position detection accuracy and reduces costs through optimized design of the drive control module, angle magnetic sensor, and switch magnetic sensor module. Compared with the traditional absolute solution, this invention does not require a high-density arrangement of angle magnetic sensors and matching ADCs. Only a small number of switch magnetic sensor modules are reasonably distributed on both sides of the angle magnetic sensor to determine the approximate position, reducing hardware costs and PCB layout space, simplifying the assembly process, and making it more suitable for miniaturized equipment.

[0033] (2) In terms of initialization efficiency, the present invention uses the fixed electrical angle output by the drive control module to drive the mover to stay, avoiding the cumbersome process of long-stroke movement and zeroing in the traditional incremental scheme. Combined with the initialization logic, the mover can quickly and stably stay at the preset position, greatly shortening the initialization time.

[0034] (3) In terms of positioning accuracy, the present invention adopts dual positioning logic of position range and angle value. The accuracy of position range determination is ensured by the acquisition and validity screening of multiple sets of signals from the switch-type magnetic sensor. The differential signal transmission, temperature compensation calibration and anti-interference filtering of the angle-type magnetic sensor further improve the accuracy of angle value acquisition. Combined with the accurate conversion coefficient, the absolute position accuracy can meet the needs of high-precision application scenarios such as automated machine tools and precision robots.

[0035] (4) The hardware architecture and control logic of the present invention have good adaptability. The spacing of specific positions and the number of switch-type magnetic sensor modules can be adjusted according to the stroke requirements of different devices. There is no need to make major changes to the core design. It is compatible with various linear motion devices from short stroke to long stroke and has a wide range of applications. Attached Figure Description

[0036] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0037] Figure 1 This is a schematic diagram of an encoder position detection device according to a preferred embodiment of the present invention;

[0038] Figure 2 This is a schematic diagram showing the magnetic grating on the mover moving to the first position in a preferred embodiment of the present invention;

[0039] Figure 3 This is a schematic diagram showing the magnetic grating on the mover moving to the second position in a preferred embodiment of the present invention;

[0040] Figure 4 This is a schematic diagram showing a location that anisotropic magnetoresistive sensors in the prior art cannot identify;

[0041] Figure 5 A schematic diagram showing a location that cannot be identified by existing linear Hall sensors;

[0042] Figure 6 This is a schematic diagram showing the arrangement density of anisotropic magnetoresistive sensors in an existing magnetic grating encoder scheme.

[0043] Figure 7 This is a schematic diagram showing the arrangement density of linear Hall sensors in an existing magnetic grating encoder scheme;

[0044] Figure 8 This is a flowchart of an encoder position detection method according to a preferred embodiment of the present invention.

[0045] Explanation of reference numerals in the accompanying drawings: 1. Magnetic grid; 2. Stator module; 3. Angle-type magnetic sensor; 4. Switch-type magnetic sensor module; 41. Switch-type magnetic sensor; 5. Mover. Detailed Implementation

[0046] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0047] Example 1:

[0048] Reference Figure 1 As shown, an embodiment of the present invention provides an encoder position detection device, comprising:

[0049] Magnetic grating 1;

[0050] The stator module 2 includes a drive control module, multiple angle-type magnetic sensors 3, and multiple switch-type magnetic sensor modules 4; wherein each switch-type magnetic sensor module 4 and each angle-type magnetic sensor 3 are spaced apart; the switch-type magnetic sensor module 4 includes at least one switch-type magnetic sensor 41;

[0051] Angle-type magnetic sensor 3 is used to obtain the angle value of magnetic grating 1;

[0052] The switch-type magnetic sensor module 4 is used to detect whether the magnetic grid 1 is covered;

[0053] The drive control module is used to output a fixed electrical angle during the power-on initialization process to drive the mover 5, where the magnetic grating 1 is located, to move to a preset position; to obtain the number of switch-type magnetic sensors that detect the magnetic grating 1, and to determine the position range of the magnetic grating 1 based on the number of switch-type magnetic sensors; and to obtain the absolute position of the magnetic grating 1 based on the angle value and the position range.

[0054] The encoder position detection device of this invention improves the accuracy of position detection and reduces the cost of absolute position detection through the design of a drive control module, multiple angle-type magnetic sensors 3, and multiple switch-type magnetic sensor modules 4. Compared with the traditional absolute method which requires a high-density arrangement of angle-type magnetic sensors 3 and a matching ADC to compensate for polarity recognition defects, this device only needs to reasonably distribute a small number of switch-type magnetic sensor modules 4 on both sides of the angle-type magnetic sensors 3. The approximate position can be determined by the switch-type magnetic sensor modules 4, without the need to increase the number of sensors and signal processing modules, significantly reducing hardware costs. At the same time, it simplifies the assembly process of the stator module, reduces PCB board layout space, and is more suitable for the needs of miniaturized equipment. In terms of initialization efficiency, the device relies on the design of the drive control module to output a fixed electrical angle to drive the mover 5 to stop, eliminating the cumbersome process of long-stroke movement to find zero in the traditional incremental method. Combined with the initialization logic, the mover 5 can quickly and stably stop at a preset specific position, and the initialization time is greatly shortened compared with the traditional method. It is especially suitable for long-stroke equipment or compact space scenarios, avoiding the time loss and space limitations caused by long-stroke movement. In terms of positioning accuracy, this device achieves precise detection through dual positioning logic of position range and angle value. Specifically, the multiple signal acquisitions and validity screening of the switch-type magnetic sensor 41 ensure the accuracy of position range determination, while the differential signal transmission, temperature compensation calibration, and anti-interference filtering of the angle-type magnetic sensor 3 further improve the accuracy of angle value acquisition. Combined with the accurate conversion coefficient calculated from the electrical angle period and the corresponding straight-line distance, the final absolute position accuracy can meet the needs of high-precision applications such as automated machine tools and precision robots. In addition, the device's hardware architecture and control logic have good adaptability. The spacing of specific positions and the number of switch-type magnetic sensor modules 4 can be adjusted according to the stroke requirements of different devices without significant changes to the core design. It is compatible with various linear motion devices from short to long strokes and has a wide range of applications.

[0055] Specifically, in this embodiment of the invention, the drive control module preferably adopts a servo controller, which has comprehensive functions of self-testing, electrical angle output, position feedback acquisition, and data processing. It can coordinate the power-on initialization positioning and absolute position calculation, adapting to the device's requirements for control accuracy and process coordination. The angle-type magnetic sensor 3 is preferably an anisotropic magnetoresistive sensor (i.e., an AMR magnetoresistive sensor), and the arrangement spacing between two adjacent anisotropic magnetoresistive sensors along the movement direction of the multi-pole magnetic grating 1 is set to 40mm. This spacing is adapted to the magnetic pole spacing and detection cycle of the magnetic grating 1, ensuring that the sensor can stably acquire magnetic field angle signals when the magnetic grating 1 moves. In addition, the switch-type magnetic sensor module 4 includes two switch-type magnetic sensors 41, and the switch-type magnetic sensors 41 are preferably switch Hall sensors, so as to accurately feedback the coverage state of the magnetic grating 1 through the level signal, while moving in the same direction. The arrangement spacing between two adjacent switch-type magnetic sensor modules 4 is also set to 40mm, so that the two types of sensors form a uniform and matched detection array in spatial layout, ensuring the synchronization and effectiveness of signal acquisition. The specific arrangement structure can be referred to Figure 1 As shown.

[0056] Furthermore, in this embodiment of the invention, the encoder position detection device also includes an FPGA (Field Programmable Gate Array), and the two switch-type magnetic sensors 41 included in each switch-type magnetic sensor module 4 are all connected to the FPGA. The core purpose of adopting a dual-sensor configuration is to improve the reliability of the magnetic grating 1 coverage status identification. This is because when the magnetic field strength detected by a single switch Hall sensor is zero, it does not necessarily mean that there is no magnetic field coverage at that location. There is also the possibility that the magnetic field direction is exactly parallel to the sensing direction of the switch Hall sensor, causing the sensor to fail to effectively sense the magnetic field signal. The dual-sensor layout, through signal complementarity verification, avoids the detection blind spot of the single sensor, ensuring the accuracy of the magnetic grating coverage status determination.

[0057] In this embodiment of the invention, the spacing of the AMR magnetoresistive sensors along the direction of movement of the magnetic grating 1 is set to four times the distance between the magnetic poles of the multiple pairs of magnetic gratings. Simultaneously, a switch Hall sensor, also with a spacing four times the distance between the magnetic poles, is arranged along the same direction. This layout allows the two types of sensors to form a uniform detection array in space that is adapted to the period of the magnetic field of the magnetic grating, ensuring that both types of sensors can stably acquire magnetic field signals when the magnetic grating moves.

[0058] Furthermore, during the power-on initialization of stator module 2, the servo controller first completes self-tests of the AMR magnetoresistive sensor, the switch Hall sensor, and the actuator to ensure that all components are working properly. Then, it outputs a specific electrical angle based on a pre-stored fixed electrical angle threshold. This electrical angle is transmitted to the servo motor driver via a PWM signal, converted into motor control current, and drives the mover 5 connected to the magnetic grating 1 to move at a low speed with appropriate accuracy towards the nearest target position. Since the electrical angle period of the multiple pairs of magnetic gratings 1 is fixed at 360°, and the linear movement distance of the mover 5 corresponding to this period is 20mm, under the real-time position feedback and dwell verification of the servo controller (continuously confirming that the position deviation is within the allowable accuracy range), the mover 5 will eventually stably stay at a specific position within the preset positions. The preset positions include multiple position intervals, with each interval being 20mm apart. This design provides a precise initial positioning reference for subsequent position range determination and absolute position calculation.

[0059] Furthermore, referring to Figure 2 and Figure 3 As shown, where Figure 2 This is a schematic diagram showing the structure of the mover 5 in the first position (i.e., position 1 in the figure). Figure 3This is a schematic diagram of the mover 5 in the second position (position 2 in the figure). A1 to A4 represent AMR magnetoresistive sensors with different numbers. The first and second positions are typical specific positions where the mover 5 may remain after power-on initialization. As shown in the figure, when the mover 5 is in the first position, the second AMR magnetoresistive sensor (A2) is directly opposite the boundary region between the first magnetic pole (N pole) and the second magnetic pole (S pole) of the magnetic grating 1; when the mover 5 is in the second position, the second AMR magnetoresistive sensor is directly opposite the boundary region between the third magnetic pole (N pole) and the fourth magnetic pole (S pole). The difference between these two positions can be accurately distinguished by the detection status of the switch Hall sensors around the second AMR magnetoresistive sensor. Specifically, in the first position, all three Hall effect sensors located on either side of the second and third AMR magnetoresistive sensors (adjacent AMR magnetoresistive sensors) can detect the magnetic grating 1. In the second position, only the two Hall effect sensors located on either side of the second AMR magnetoresistive sensor can detect the magnetic grating 1, while the Hall effect sensors around the third AMR magnetoresistive sensor do not have a valid detection signal. Based on this, the servo controller can determine the position range by counting the number of Hall effect sensors that detect the magnetic grating 1: if three Hall effect signals are detected, the mover 5 is determined to be in the first position; if only two Hall effect signals are detected, the mover 5 is determined to be in the second position. After determining the approximate position, the high-precision angle values ​​collected and calibrated by the AMR magnetoresistive sensors (such as the second AMR magnetoresistive sensor A2 in the figure) within that position range are combined with the angle and distance conversion coefficients to calculate the offset distance of the magnetic grating 1 within the current position range. Finally, by superimposing the reference coordinates of the approximate position, the absolute position of the magnetic grating 1 can be accurately determined, achieving efficient coordination between approximate positioning and angle calibration.

[0060] Furthermore, compared to existing technologies, there are two core technological limitations in the field of absolute encoders: First, AMR magnetoresistive sensors only have the ability to identify magnetic field angles and cannot distinguish between the N pole and the S pole, thus making them unable to identify... Figure 4 In scenarios with different magnetic polarities at the same angle, it is difficult to independently achieve absolute position detection; secondly, linear Hall sensors can only sense changes in magnetic field strength and lack angle recognition capabilities, making them unable to distinguish between different scenarios. Figure 5 Both scenarios, operating at different angles under the same magnetic field strength, exhibit positioning blind spots. Figure 5 B0 to B5 represent linear Hall sensors with different numbers. To compensate for the above-mentioned shortcomings, current multi-pole magnetic grating encoder solutions generally adopt a high-density sensor arrangement strategy. This applies to both AMR magnetoresistive schemes (such as...) Figure 6 (as shown), or the linear Hall scheme (such as...) Figure 7As shown), the sensor arrangement density must be greater than or equal to the magnetic pole spacing, which not only significantly increases hardware costs but also increases the assembly complexity of the stator module. The device described in this embodiment of the invention, however, utilizes a simplified hardware architecture with a small number of AMR magnetoresistive sensors, switched Hall sensors, and a servo controller (as shown). Figure 1 As shown in the figure, it cleverly avoids the limitations of existing technologies. It uses an AMR magnetoresistive sensor to collect high-precision angle signals, and a switch Hall sensor to assist in determining the position range of magnetic pole polarity correlation by detecting the magnetic grating coverage state. The two work together to cover the position detection requirements without relying on high-density arrangement. At the same time, the servo controller coordinates the initialization positioning and data processing. Under the premise of effectively controlling hardware costs and assembly difficulty, it achieves accurate detection of absolute position.

[0061] Example 2:

[0062] Reference Figure 8 As shown, this embodiment provides an encoder position detection method, applied to an encoder position detection device described in Embodiment 1, including but not limited to the following steps:

[0063] S1. During the power-on initialization process, a fixed electrical angle is output to drive the moving part 5, where the magnetic grating is located, to move to a preset position;

[0064] S2. Detect the coverage state of the magnetic grating 1 using the switch-type magnetic sensor 41, and obtain the number of switch-type magnetic sensors 41 that have detected the magnetic grating 1; determine the position range of the magnetic grating 1 based on the number of switch-type magnetic sensors 41.

[0065] S3. Obtain the angle value of the magnetic grating 1 using the angle-type magnetic sensor 3;

[0066] S4. Based on the position range and angle value, obtain the absolute position of magnetic grating 1.

[0067] Specifically, for step S2, the rule for detecting the coverage state of the magnetic grating 1 using the switch-type magnetic sensor 41 and obtaining the number of switch-type magnetic sensors 41 that have detected the magnetic grating 1 is as follows: taking the angle-type magnetic sensor 3 as a reference, the switch-type magnetic sensors 41 that are synchronously arranged along the movement direction of the magnetic grating 1 are the detection objects. Only the number of sensors that are within the effective detection range and continuously output a stable magnetic field coverage signal is counted. If the effective magnetic field coverage signal ratio of a certain switch-type magnetic sensor 41 reaches a set threshold within a preset sampling period, it is determined that the sensor has detected the magnetic grating 1 and is included in the total count. If the signal ratio does not reach the set threshold or an abnormal level occurs (such as a continuous high level / no change in low level), it is determined to be an invalid detection and is not included in the count. This ensures that the number of detections can accurately reflect the actual coverage range of the magnetic grating 1 and provide a reliable basis for subsequent rough position determination.

[0068] Specifically, for step S4, the step of obtaining the absolute position of magnetic grating 1 based on the position range and angle value is as follows:

[0069] S410. Based on the position range of the power-on initialization process, determine the serial number of the target angle-type magnetic sensor involved in the calculation, and the magnetic pole interval in which the sensor is located (located in the first...). Between magnetic poles, (The value is a positive integer), and the effective magnetic field angle value collected by the sensor is obtained. (Its value range is) ).

[0070] S420. Calculate the absolute position of magnetic grating 1 based on the sensor serial number, its magnetic pole range, and angle value. Specifically, when the... Angle-angle magnetic sensor is located at magnetic grating 1. to Between the magnetic poles, and the detected magnetic field angle value is At that time, the absolute position of magnetic grating 1 The calculation formula is:

[0071] ;

[0072] in, Indicates the absolute position of the magnetic grating. This indicates the spacing between two adjacent angled magnetic sensors. This indicates the serial number of the target angle-type magnetic sensor involved in the positioning calculation. This represents the length of the straight line corresponding to a single magnetic pole. Indicates the starting magnetic pole number of the magnetic pole region where the target angle magnetic sensor is located. This indicates the effective magnetic field angle value of the target angle type magnetic sensor. .

[0073] For example, refer to Figure 1 As shown, based on the position range, the angle-type magnetic sensor with serial number 2 (A2 in the figure) is determined to be located between the first and second magnetic poles of the magnetic grating, and the angle of the magnetic field detected by this sensor is [value missing]. Then the absolute position of the magnetic grating at this time for:

[0074] ;

[0075] Wherein, the straight line length corresponding to a single magnetic pole The spacing between two adjacent angled magnetic sensors is 10mm. It is 40mm.

[0076] Step S4 incorporates the arrangement sequence number, spacing, and magnetic pole interval reference position of the angle-type magnetic sensors into the calculation to ensure accurate positioning reference; the angle and distance conversion terms compensate for the shortcoming of angle-type sensors in not being able to identify magnetic pole polarity and eliminate detection blind spots.

[0077] Compared to traditional absolute encoders, the method described in this embodiment eliminates the need for high-density sensors and associated signal processing modules. Data acquisition can be completed using only a small number of switching Hall effect sensors in conjunction with an AMR magnetoresistive sensor, significantly reducing hardware investment and assembly complexity. During the power-on initialization phase, the servo controller outputs a fixed electrical angle to drive the mover to a stop, eliminating the cumbersome long-stroke zeroing operation of traditional solutions. Combined with a simple logic of self-testing, driving, and verification, the mover can quickly and stably stop at the preset position, simplifying the initialization process. Finally, through a collaborative mechanism of coarse position determination and high-precision angle value calculation, the absolute position of the magnetic grating is accurately output, realizing the core function of the absolute encoder and achieving the design goals of low cost, simple process, and full functionality.

[0078] Example 3:

[0079] This embodiment provides an electronic device, including the encoder position detection device described in Embodiment 1.

[0080] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0081] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0082] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0083] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0084] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. An encoder position detection device, characterized in that, include: Magnetic grid; The stator module includes a drive control module, multiple angle-type magnetic sensors, and multiple switch-type magnetic sensor modules; wherein each of the switch-type magnetic sensor modules and each of the angle-type magnetic sensors are spaced apart; each switch-type magnetic sensor module includes at least one switch-type magnetic sensor. The angle-type magnetic sensor is used to obtain the angle value of the magnetic grating; The switch-type magnetic sensor module is used to detect whether the magnetic grating is covered; The drive control module is used to output a fixed electrical angle during power-on initialization to drive the mover containing the magnetic grating to a preset position; to obtain the number of switching magnetic sensors that detect the magnetic grating, and to determine the position range of the magnetic grating based on the number of switching magnetic sensors; and to obtain the absolute position of the magnetic grating based on the angle value and the position range, specifically: Based on the stated location range, the target angle-type magnetic sensor for calculation is determined; the serial number and magnetic pole range of the target angle-type magnetic sensor are obtained. The absolute position of the magnetic grating is calculated based on the serial number, the magnetic pole region it is located in, and the angle value; wherein the expression for calculating the absolute position is: ; in, Indicates the absolute position of the magnetic grating. This indicates the spacing between two adjacent angled magnetic sensors. Indicates the serial number of the target angle-type magnetic sensor. This represents the length of the straight line corresponding to a single magnetic pole. Indicates the starting magnetic pole number of the magnetic pole region where the target angle magnetic sensor is located. Indicates the angle value.

2. The encoder position detection device according to claim 1, characterized in that, The preset position includes multiple position intervals, and the interval between each position interval is 20mm.

3. The encoder position detection device according to claim 1, characterized in that, The angle-type magnetic sensor is an anisotropic magnetoresistive sensor, and the spacing between each anisotropic magnetoresistive sensor is 40 mm.

4. The encoder position detection device according to claim 1, characterized in that, The switch-type magnetic sensor module includes two switch-type magnetic sensors, which are switch Hall sensors.

5. The encoder position detection device according to claim 4, characterized in that, It also includes a field-programmable gate array, and both of the two switch Hall sensors are connected to the field-programmable gate array.

6. The encoder position detection device according to claim 1, characterized in that, The spacing between each of the switch-type magnetic sensor modules is 40 mm.

7. An encoder position detection method, applied to an encoder position detection device according to any one of claims 1 to 6, characterized in that, include: S1. During the power-on initialization process, output a fixed electrical angle to drive the mover containing the magnetic grating to a preset position; S2. Detect the coverage state of the magnetic grating using a switch-type magnetic sensor, and obtain the number of switch-type magnetic sensors that detected the magnetic grating; determine the position range of the magnetic grating based on the number of switch-type magnetic sensors; S3. Obtain the angle value of the magnetic grating using an angle-type magnetic sensor; S4. Obtain the absolute position of the magnetic grating based on the position range and the angle value.

8. The encoder position detection method according to claim 7, characterized in that, In step S2, the rule for detecting the coverage state of the magnetic grating using a switching magnetic sensor and obtaining the number of switching magnetic sensors that have detected the magnetic grating is as follows: with the angle-type magnetic sensor as the reference, the switching magnetic sensors synchronously arranged along the movement direction of the magnetic grating are the detection objects; if the effective magnetic field coverage signal ratio of the current switching magnetic sensor reaches a set threshold within a preset sampling period, it is determined that the current switching magnetic sensor has detected the magnetic grating and is included in the total count; otherwise, it is determined that the current switching magnetic sensor is an invalid detection and is not included in the count.

9. An electronic device, characterized in that, Includes an encoder position detection device as described in any one of claims 1 to 6.