Error compensation method and device of hall sensor, electronic equipment and storage medium

By identifying interference sources and compensation methods in the Hall sensor array, leakage magnetic interference between Hall sensors was reduced, thereby improving measurement accuracy.

CN116772700BActive Publication Date: 2026-11-06BEIJING TIANMA INTELLIGENT CONTROL TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310601528.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2026-11-06
Estimated Expiration
2043-05-25

AI Technical Summary

Technical Problem

In multi-way valve products, Hall effect sensors are often subject to magnetic leakage interference between adjacent sensors due to the incomplete coverage of the magnetic shielding shell, which affects measurement accuracy.

Method used

By identifying the first sensor to be compensated in the Hall sensor array and the second sensor that is the source of interference, the displacement value of the second sensor is obtained, the target compensation value is determined based on the displacement value, and the output value of the first sensor is compensated.

Benefits of technology

It reduces magnetic leakage interference from adjacent Hall sensors and improves detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116772700B_ABST
    Figure CN116772700B_ABST
Patent Text Reader

Abstract

This disclosure discloses an error compensation method, apparatus, electronic device, and storage medium for a Hall sensor, relating to the field of Hall sensor technology. The method includes: identifying a first Hall sensor in a Hall sensor array to be compensated for, and a second Hall sensor that causes the first Hall sensor to produce an error; obtaining the displacement value corresponding to the second Hall sensor; determining a target compensation value corresponding to the first Hall sensor based on the displacement value corresponding to the second Hall sensor; and compensating the output value of the first Hall sensor based on the target compensation value to obtain the compensated output value corresponding to the first Hall sensor. This reduces the interference of leakage magnetic flux from adjacent Hall sensors on the first Hall sensor, improving the detection accuracy of the first Hall sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of Hall sensor technology, and in particular to an error compensation method, apparatus, electronic device and storage medium for a Hall sensor. Background Technology

[0002] A Hall sensor is a contact-type linear displacement sensor based on the Hall effect. Its main principle is that when an internal Hall element is energized, charged particles in a magnetic field are deflected by the Lorentz force, generating an induced electromotive force (EMF). When a push rod is subjected to force and displacement occurs, it drives an internal permanent magnet, causing a change in the magnetic field strength near the Hall element, which in turn changes the induced EMF. By measuring this change in EMF, the displacement of the push rod can be measured. As a displacement sensor, it offers advantages such as non-contact measurement, long service life, and high accuracy. Multiple Hall sensors can be integrated into hydraulic valves for precise displacement measurement of internal valve cores and other components. Because Hall sensors are based on magnetic field strength detection, they are highly susceptible to interference from spatial electromagnetic fields. Therefore, various compensation and shielding methods are crucial to ensure their detection accuracy and operational reliability.

[0003] Existing Hall effect sensor hardware shielding methods mostly employ magnetic shielding shells for interference suppression. These shells, made of high-permeability materials, concentrate external interfering magnetic fields, significantly reducing their impact on output accuracy. However, in actual testing, it was found that when multiple Hall effect sensors are used in valve assemblies or multi-way valves, the limited space inside the valve means the magnetic shielding shells cannot completely cover the sensor area. Furthermore, the close proximity of the sensors means that while the magnetic shielding shells effectively isolate most magnetic fields, some leakage magnetic interference still exists. When using Hall effect sensors for high-precision position measurement, this leakage cannot be ignored, leading to a decrease in accuracy. Summary of the Invention

[0004] This disclosure aims to at least partially address one of the technical problems in the related art.

[0005] The first aspect of this disclosure provides an error compensation method for a Hall sensor, comprising:

[0006] Identify the first Hall sensor in the Hall sensor array to be compensated for error, and the second Hall sensor that causes the first Hall sensor to generate an error.

[0007] Obtain the displacement value corresponding to the second Hall sensor;

[0008] Based on the displacement value corresponding to the second Hall sensor, the target compensation value corresponding to the first Hall sensor is determined;

[0009] Based on the target compensation value, the output value of the first Hall sensor is compensated to obtain the compensated output value of the first Hall sensor.

[0010] A second aspect of this disclosure provides an error compensation device for a Hall sensor, comprising:

[0011] The determination module is used to determine the first Hall sensor to be compensated for error in the Hall sensor array, and the second Hall sensor that causes the first Hall sensor to generate an error.

[0012] The first acquisition module is used to acquire the displacement value corresponding to the second Hall sensor;

[0013] The query module is used to determine the target compensation value corresponding to the first Hall sensor based on the displacement value corresponding to the second Hall sensor.

[0014] The second acquisition module is used to compensate the output value of the first Hall sensor based on the target compensation value, so as to obtain the compensated output value of the first Hall sensor.

[0015] A third aspect of this disclosure provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements an error compensation method for a Hall sensor as proposed in a first aspect of this disclosure.

[0016] A fourth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements an error compensation method for a Hall sensor as proposed in a first aspect of this disclosure.

[0017] A fifth aspect of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements an error compensation method for a Hall sensor as proposed in a first aspect of this disclosure.

[0018] The error compensation method, apparatus, electronic device, and storage medium for the Hall sensor disclosed herein have the following beneficial effects:

[0019] In this embodiment, firstly, a first Hall sensor to be compensated for error in the Hall sensor array and a second Hall sensor that causes error in the first Hall sensor are identified. Then, the displacement value corresponding to the second Hall sensor is obtained. Based on the displacement value of the second Hall sensor, a target compensation value corresponding to the first Hall sensor is determined. Finally, based on the target compensation value, the output value of the first Hall sensor is compensated to obtain the compensated output value of the first Hall sensor. Therefore, the target compensation value corresponding to the first Hall sensor can be determined based on the displacement value of the second Hall sensor that causes error in the first Hall sensor. Then, the output value of the first Hall sensor is compensated based on the target compensation value, thereby reducing the interference of leakage magnetic flux from adjacent Hall sensors on the first Hall sensor and improving the detection accuracy of the first Hall sensor.

[0020] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description

[0021] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:

[0022] Figure 1 This is a schematic diagram of the structure of a Hall sensor;

[0023] Figure 2 This is a schematic diagram of magnetic field interference between two Hall sensor values.

[0024] Figure 3 This is a schematic flowchart of an error compensation method for a Hall sensor provided in an embodiment of the present disclosure;

[0025] Figure 4 This is a schematic diagram of a Hall sensor array provided in one embodiment of the present disclosure;

[0026] Figure 5 This is a schematic flowchart of an error compensation method for a Hall sensor provided in another embodiment of the present disclosure;

[0027] Figure 6 This is a schematic diagram of an error compensation method for a Hall sensor provided in an embodiment of the present disclosure;

[0028] Figure 7 This is a schematic diagram of an error compensation method for a Hall sensor provided in an embodiment of the present disclosure;

[0029] Figure 8 This is a schematic diagram of the structure of an error compensation device for a Hall sensor provided in an embodiment of this disclosure;

[0030] Figure 9 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation

[0031] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.

[0032] The error compensation method, apparatus, electronic device, and storage medium of the Hall sensor according to embodiments of the present disclosure are described below with reference to the accompanying drawings.

[0033] Figure 1 This is a schematic diagram of the structure of a Hall sensor. Figure 1 As shown, it includes two Hall sensors. The Hall sensor module (13) includes a push rod (11), a permanent magnet (12), and a Hall element (14). The permanent magnet (12) is inside the push rod (11), and the Hall element (14) is deployed on the circuit board.

[0034] When the Hall sensor detects the displacement of the measured part, the push rod contacts the measured part. When the measured part is displaced, it drives the push rod and the internal permanent magnet to move. The magnetic field around the Hall element changes with the movement of the permanent magnet, generating a change in the output value. By calculating this output value, the real-time displacement of the measured part can be obtained.

[0035] However, when the distance between the two Hall sensors is small, the distribution of magnetic field lines inside the Hall sensor is as follows: Figure 2 As shown, the simplified Hall sensor structure is illustrated. When the two sensors are close together, the magnetic field of the permanent magnet (1) of the left sensor and the magnetic field of the permanent magnet (2) of the right sensor simultaneously cover the Hall element (3). The Hall element at this point is actually located inside the right sensor. When the permanent magnet inside the left sensor moves, the magnetic field changes and is detected by the Hall element, interfering with the output value of the Hall element.

[0036] Existing technology can use a high-permeability shell to isolate most magnetic field interference from the Hall sensor. However, when multiple Hall sensors are used in valve assemblies or multi-way valve products, the space inside the valve is small, and the size of the magnetic shielding shell cannot guarantee complete coverage. In addition, the Hall sensors are close together. Although the magnetic shielding shell can isolate most of the magnetic field, some magnetic leakage interference still exists.

[0037] Figure 3 This is a schematic flowchart of an error compensation method for a Hall sensor provided in an embodiment of the present disclosure.

[0038] This disclosure illustrates by exemplifying the error compensation method of the Hall sensor being configured in the error compensation device of the Hall sensor. The error compensation device of the Hall sensor can be applied to any electronic device so that the electronic device can perform the error compensation function of the Hall sensor.

[0039] like Figure 3 As shown, the error compensation method for this Hall sensor may include the following steps:

[0040] Step 301: Determine the first Hall sensor to be compensated for error in the Hall sensor array, and the second Hall sensor that causes the first Hall sensor to generate an error.

[0041] A Hall sensor array can contain multiple Hall sensors, and each Hall sensor can be interfered with by the magnetic fields generated by other Hall sensors, or its own magnetic field can interfere with other Hall sensors. This necessitates error compensation for some Hall sensors within the array.

[0042] The first Hall sensor can be a sensor in the Hall sensor array that is affected by the magnetic field interference of other Hall sensors.

[0043] The second Hall sensor can be a Hall sensor that is pre-determined to interfere with the first Hall sensor's magnetic field. That is, if the permanent magnet in the second Hall sensor is displaced, it can interfere with the first Hall sensor.

[0044] Figure 4 This is a schematic diagram of a Hall sensor array provided in one embodiment of the present disclosure, as shown below. Figure 4 As shown, Hall sensor 1 is affected by the magnetic field of Hall sensor 2; Hall sensor 2 is affected by the magnetic fields of Hall sensor 1 and Hall sensor 2; Hall sensor 3 is affected by the magnetic fields of Hall sensor 2 and Hall sensor 4; and Hall sensor 4 is affected by the magnetic field of Hall sensor 3. Therefore, Hall sensor 1, Hall sensor 2, Hall sensor 3, and Hall sensor 4 are all first Hall sensors.

[0045] Step 302: Obtain the displacement value corresponding to the second Hall sensor.

[0046] Optionally, if the second Hall sensor does not require error compensation, the displacement value corresponding to the second Hall sensor can be determined based on the output value of the second Hall sensor.

[0047] Alternatively, if the second Hall sensor is to be compensated for errors, the displacement value corresponding to the second Hall sensor can be determined based on the compensated output value of the second Hall sensor.

[0048] The specific steps for obtaining the compensated output value of the second Hall sensor if the second Hall sensor is to be error compensated are the same as the specific steps for obtaining the compensated output value of the first Hall sensor, and will not be described in detail in this disclosure.

[0049] like Figure 4 As shown, if Hall sensors 1, 2, 3, and 4 are all interfered with by the other Hall sensors at the same time, the output value of each Hall sensor will have an error, making it impossible to accurately determine the displacement of each Hall sensor. Therefore, it is necessary to determine a reference Hall sensor, assuming that the output value of the reference Hall sensor is error-free. This allows the displacement value of each sensor to be determined sequentially.

[0050] In some embodiments, the Hall sensor in the Hall sensor array that is less affected by the magnetic field interference of other Hall sensors can be determined based on the position of the Hall element in the Hall sensor, and then the sensor is determined to be a sensor that is not affected by other magnetic fields.

[0051] like Figure 4 As shown, the Hall element in each Hall sensor is on the left side of the Hall sensor. If the distance between any two adjacent Hall sensors is the same, then the distance between the Hall element in Hall sensor 1 and the permanent magnet in Hall sensor 2 is relatively large, and the interference of Hall sensor 2 on Hall sensor 1 can be ignored. That is, Hall sensor 1 in the Hall sensor array does not produce errors.

[0052] Hall sensor 2 is affected by the magnetic field of Hall sensor 1, Hall sensor 3 is affected by the magnetic field of Hall sensor 2, and Hall sensor 4 is affected by the magnetic field of Hall sensor 3. That is, Hall sensor 2, Hall sensor 3, and Hall sensor 4 are all first Hall sensors.

[0053] If the first Hall sensor is Hall sensor 3, then the second Hall sensor is Hall sensor 2. When calculating the compensated output value of Hall sensor 2, it is necessary to compensate the output value of Hall sensor 2 based on the displacement value of Hall sensor 1.

[0054] Similarly, if the Hall element in each Hall sensor is on the right side of the Hall sensor, then it is determined that Hall sensor 4 is not affected by the magnetic field of other sensors and does not produce errors.

[0055] Optionally, fault detection can be performed on each Hall sensor in the Hall sensor array in real time. If a fault is detected in the second Hall sensor, the displacement value of the second Hall sensor can be determined according to the type of fault and the displacement value of the second Hall sensor before the fault occurred.

[0056] For example, if the fault type of the second Hall sensor is detected as push rod jamming, then the displacement of the push rod before the fault is determined as the displacement value of the second Hall sensor at the current moment.

[0057] Alternatively, if the second Hall sensor is detected to have a fault with an output value of zero or no output value, then the interference of the second Hall sensor on the first Hall sensor is ignored.

[0058] Step 303: Determine the target compensation value corresponding to the first Hall sensor based on the displacement value corresponding to the second Hall sensor.

[0059] Optionally, based on the displacement value corresponding to the second Hall sensor, the compensation value mapping table corresponding to the first Hall sensor is queried to obtain the target compensation value corresponding to the first Hall sensor.

[0060] The compensation value mapping table for the first Hall sensor can be pre-built and stored in the storage space. The compensation value mapping table can contain the output value of the first Hall sensor at each displacement of the push rod of the second Hall sensor when the displacement of the push rod of the first Hall sensor is zero (i.e., the error caused by the second Hall sensor to the first Hall sensor).

[0061] Optionally, the compensation value mapping table corresponding to the first Hall sensor can be obtained through the following steps:

[0062] (1) Determine a second Hall sensor associated with the first Hall sensor, wherein the distance between the permanent magnet in the second Hall sensor and the Hall element in the first Hall sensor is less than a distance threshold.

[0063] It should be noted that a distance threshold can be set. If the distance between the permanent magnet in the Hall sensor and the Hall element in the first Hall sensor is less than the distance threshold, it indicates that the Hall sensor will affect the first Hall sensor.

[0064] like Figure 4 As shown, if the output value of Hall sensor 3 is not the initial value, Hall sensor 3 is determined to be the first Hall sensor. If the distance between Hall sensor 4 and Hall sensor 2 and Hall sensor 3 is less than the distance threshold, Hall sensor 4 and Hall sensor 2 are determined to be the second Hall sensor.

[0065] Therefore, in a Hall sensor array, the magnetic fields between any two adjacent Hall sensors interfere with each other. Thus, the minimum and maximum distances between the Hall elements and permanent magnets in any two adjacent Hall sensors are determined. Then, based on the maximum and minimum distances, a distance threshold is determined, where the distance threshold is greater than the minimum distance and less than the maximum distance.

[0066] Therefore, not only can the second Hall sensor associated with the first Hall sensor be accurately determined based on the distance threshold, but the reference sensor in the Hall sensor array (i.e., the Hall sensor that does not require error compensation) can also be accurately determined.

[0067] (2) Control the displacement of the push rods in the Hall sensor array, except for the second Hall sensor, to be zero.

[0068] (3) Adjust the displacement of the push rod in the second Hall sensor to obtain the output value of the first Hall sensor at each displacement of the push rod in the second Hall sensor.

[0069] That is, it is determined that the first Hall sensor did not move, and the displacement of the second Hall sensor affected the output values ​​of the first and second Hall sensors.

[0070] (4) Based on the output value of the first Hall sensor at each displacement of the push rod in the second Hall sensor, determine the compensation value of the first Hall sensor at each displacement of the push rod in the second Hall sensor.

[0071] Optionally, the difference between the initial value and the output value corresponding to the first Hall sensor can be determined as a compensation value. The initial value is the output value when the displacement of the push rod in any Hall sensor is zero.

[0072] (5) Generate a compensation value mapping table based on the mapping relationship between the displacement of the push rod in the second Hall sensor and the corresponding compensation value.

[0073] In this embodiment of the disclosure, a compensation value mapping table corresponding to each Hall sensor in the Hall sensor array can be generated, and the generation method is the same as the method for generating the first Hall sensor. This disclosure does not describe this in detail.

[0074] Optionally, the target compensation value corresponding to the displacement value can be determined based on a function between the displacement of the second Hall sensor and the compensation value of the first Hall sensor.

[0075] Specifically, the displacement of the second Hall sensor can be predetermined, which will cause an error in the first Hall sensor (i.e., the required compensation value for the first Hall sensor). This allows us to determine the function relating the displacement of the second Hall sensor to the compensation value of the first Hall sensor. In application, the target compensation value for the first Hall sensor can then be determined based on this function and the displacement value of the second Hall sensor.

[0076] For cases with linear changes, a linear function can be set to directly perform compensation calculations. For example, each segment of displacement results in the same change in output value (such as voltage), such as a voltage change of 0.05 volts (V) for every 1 millimeter (mm) of displacement.

[0077] Step 304: Based on the target compensation value, compensate the output value of the first Hall sensor to obtain the compensated output value of the first Hall sensor.

[0078] Specifically, a target compensation value can be added to the output value of the first Hall sensor to obtain the compensated output value of the first Hall sensor.

[0079] In this embodiment, firstly, a first Hall sensor to be compensated for error in the Hall sensor array and a second Hall sensor that causes error in the first Hall sensor are identified. Then, the displacement value corresponding to the second Hall sensor is obtained. Based on the displacement value of the second Hall sensor, a target compensation value corresponding to the first Hall sensor is determined. Finally, based on the target compensation value, the output value of the first Hall sensor is compensated to obtain the compensated output value of the first Hall sensor. Therefore, the target compensation value corresponding to the first Hall sensor can be determined based on the displacement value of the second Hall sensor that causes error in the first Hall sensor. Then, the output value of the first Hall sensor is compensated based on the target compensation value, thereby reducing the interference of leakage magnetic flux from adjacent Hall sensors on the first Hall sensor and improving the detection accuracy of the first Hall sensor.

[0080] Figure 5 This is a schematic flowchart of an error compensation method for a Hall sensor provided in an embodiment of the present disclosure, as shown below. Figure 5 As shown, the error compensation method for this Hall sensor may include the following steps:

[0081] Step 501: If the output value of any Hall sensor is not the initial value, determine any Hall sensor as the first Hall sensor, where the initial value is the output value when the displacement of the push rod in any Hall sensor is zero.

[0082] In this embodiment of the disclosure, the first Hall sensor in the Hall sensor array that requires error compensation can be determined in real time. That is, based on the output value of each Hall sensor and the displacement value of its associated Hall sensor, the first Hall sensor that requires error compensation at the current moment, and the second Hall sensor that interferes with the first Hall sensor at the current moment, can be determined in real time.

[0083] If the output value of any Hall sensor is not the initial value, it indicates that the first Hall sensor has been displaced. Therefore, any Hall sensor is identified as the first Hall sensor.

[0084] Step 502: Determine the second Hall sensor that causes the first Hall sensor to produce an error.

[0085] In this embodiment of the disclosure, the second Hall sensor can also be determined based on the distance between the permanent magnet of the Hall sensor surrounding the first Hall sensor and the Hall element in the first Hall sensor at the current moment.

[0086] Step 503: Obtain the displacement value corresponding to the second Hall sensor.

[0087] Step 504: Determine the target compensation value corresponding to the first Hall sensor based on the displacement value corresponding to the second Hall sensor.

[0088] Step 505: Based on the target compensation value, compensate the output value of the first Hall sensor to obtain the compensated output value of the first Hall sensor.

[0089] The specific implementation of steps 503 to 505 can be found in the detailed descriptions of the other embodiments in this disclosure, and will not be repeated here.

[0090] In this embodiment, firstly, if the output value of any Hall sensor is not the initial value, the first Hall sensor is identified, and a second Hall sensor causing the error in the first Hall sensor at the current moment is determined. Then, the displacement value corresponding to the second Hall sensor is obtained, and a target compensation value for the first Hall sensor is determined based on this displacement value. Finally, the output value of the first Hall sensor is compensated based on the target compensation value to obtain the compensated output value. This allows for accurate identification of Hall sensors requiring error compensation at the current moment, while eliminating those that do not. This not only reduces the interference of leakage magnetic flux from adjacent Hall sensors on the first Hall sensor, improving its detection accuracy, but also increases the computational efficiency of error compensation.

[0091] Figure 6 This is a schematic diagram illustrating an error compensation method for a Hall sensor according to an embodiment of this disclosure. Figure 6 As shown, the Hall sensor array can be connected to a controller, which obtains the output value corresponding to each Hall sensor and performs error compensation calculation for each Hall sensor.

[0092] like Figure 6As shown, if Hall sensor 2 is the first Hall sensor to be compensated for error, and Hall sensor 3 is the second Hall sensor, then after receiving the output value corresponding to Hall sensor 3, the controller first determines the displacement value corresponding to Hall sensor 3, and then queries the compensation value mapping table corresponding to Hall sensor 2 based on the displacement value corresponding to Hall sensor 3 to obtain the target compensation value corresponding to Hall sensor 2; based on the target compensation value, the output value of Hall sensor 2 is compensated to obtain the compensated output value corresponding to Hall sensor 2.

[0093] Figure 7 This is a schematic diagram illustrating an error compensation method for a Hall sensor according to an embodiment of this disclosure. Figure 7 As shown, each Hall sensor in the Hall sensor array can be connected to a controller, and each controller can communicate with other controllers to obtain the displacement value of the corresponding Hall sensor determined by other controllers, thereby compensating for errors in the output value of the connected Hall sensors.

[0094] like Figure 7 As shown, if Hall sensor 2 is the first Hall sensor to be compensated for error, and Hall sensor 3 is the second Hall sensor, then after receiving the output value corresponding to Hall sensor 2, controller 2 first communicates with controller 3 to obtain the displacement value corresponding to Hall sensor 3. Then, controller 2 queries the compensation value mapping table corresponding to Hall sensor 2 based on the displacement value corresponding to Hall sensor 3 to obtain the target compensation value corresponding to Hall sensor 2. Based on the target compensation value, the output value of Hall sensor 2 is compensated to obtain the compensated output value corresponding to Hall sensor 2.

[0095] To achieve the above embodiments, this disclosure also proposes an error compensation device for a Hall sensor.

[0096] Figure 8 This is a schematic diagram of the error compensation device for the Hall sensor provided in an embodiment of this disclosure.

[0097] like Figure 8 As shown, the error compensation device 800 of the Hall sensor may include:

[0098] The first determining module 810 is used to determine the first Hall sensor to be compensated for error in the Hall sensor array, and the second Hall sensor that causes the first Hall sensor to generate an error.

[0099] The first acquisition module 820 is used to acquire the displacement value corresponding to the second Hall sensor;

[0100] The second determining module 830 is used to determine the target compensation value corresponding to the first Hall sensor based on the displacement value corresponding to the second Hall sensor.

[0101] The second acquisition module 840 is used to compensate the output value of the first Hall sensor based on the target compensation value, so as to obtain the compensated output value of the first Hall sensor.

[0102] Optionally, the second determining module 830 is also used for:

[0103] Based on the displacement value corresponding to the second Hall sensor, the compensation value mapping table corresponding to the first Hall sensor is queried to obtain the target compensation value corresponding to the first Hall sensor; or...

[0104] The target compensation value corresponding to the displacement value is determined based on the function between the displacement of the second Hall sensor and the compensation value of the first Hall sensor.

[0105] Optionally, it also includes a first processing module for:

[0106] A second Hall sensor is identified as associated with the first Hall sensor, wherein the distance between the permanent magnet in the second Hall sensor and the Hall element in the first Hall sensor is less than a distance threshold;

[0107] The displacement of the push rods in the Hall sensor array, except for the second Hall sensor, is zero.

[0108] Adjust the displacement of the push rod in the second Hall sensor to obtain the corresponding output value of the first Hall sensor when the push rod in the second Hall sensor is at each displacement;

[0109] Based on the output value of the first Hall sensor at each displacement of the push rod in the second Hall sensor, determine the compensation value of the first Hall sensor at each displacement of the push rod in the second Hall sensor.

[0110] A compensation value mapping table is generated based on the mapping relationship between the displacement of the push rod in the second Hall sensor and the corresponding compensation value.

[0111] Optional, determine the module, used for:

[0112] If the output value of any Hall sensor is not the initial value, then the Hall sensor is determined to be the first Hall sensor, wherein the initial value is the output value when the displacement of the push rod in the Hall sensor is zero.

[0113] Optionally, it also includes a first processing module for:

[0114] If the magnetic fields between any two adjacent Hall sensors in the Hall sensor array interfere with each other, then determine the minimum and maximum distances between the Hall element and the permanent magnet in any two adjacent Hall sensors.

[0115] A distance threshold is determined based on the maximum and minimum distances, where the distance threshold is greater than the minimum distance and less than the maximum distance.

[0116] Optionally, the first acquisition module 820 is used for:

[0117] If the second Hall sensor does not require error compensation, the displacement value corresponding to the second Hall sensor is determined based on its output value; or...

[0118] When the second Hall sensor needs to be error compensated, the displacement value corresponding to the second Hall sensor is determined based on the compensated output value of the second Hall sensor.

[0119] Optionally, the first acquisition module 820 is used for:

[0120] If a fault is detected in the second Hall sensor, the displacement value corresponding to the second Hall sensor is determined based on the type of fault and the displacement value of the second Hall sensor before the fault occurred.

[0121] The functions and specific implementation principles of the modules described in this embodiment can be found in the above method embodiments, and will not be repeated here.

[0122] The Hall sensor error compensation device of this disclosure first identifies a first Hall sensor in the Hall sensor array to be compensated for, and a second Hall sensor that causes the error in the first Hall sensor. Then, it acquires the displacement value corresponding to the second Hall sensor. Based on the displacement value of the second Hall sensor, it determines a target compensation value for the first Hall sensor. Finally, based on the target compensation value, it compensates the output value of the first Hall sensor to obtain the compensated output value. Therefore, by determining the target compensation value for the first Hall sensor based on the displacement value of the second Hall sensor that causes the error, and then compensating the output value of the first Hall sensor based on the target compensation value, the interference of leakage magnetic flux from adjacent Hall sensors on the first Hall sensor can be reduced, thereby improving the detection accuracy of the first Hall sensor.

[0123] To implement the above embodiments, this disclosure also proposes an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the error compensation method for the Hall sensor as proposed in the foregoing embodiments of this disclosure.

[0124] To implement the above embodiments, this disclosure also proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the error compensation method for the Hall sensor as proposed in the foregoing embodiments of this disclosure.

[0125] To implement the above embodiments, this disclosure also proposes a computer program product, including a computer program that, when executed by a processor, implements the error compensation method for the Hall sensor as proposed in the foregoing embodiments of this disclosure.

[0126] Figure 9 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Figure 9 The electronic device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0127] like Figure 9 As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0128] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0129] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0130] Memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 9Not shown; usually referred to as a "hard drive"). Although Figure 9 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc read-only memory (CD-ROM), a digital video disc read-only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.

[0131] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this disclosure.

[0132] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with electronic device 12, and / or with any device that enables electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0133] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the methods mentioned in the foregoing embodiments.

[0134] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0135] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0136] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.

[0137] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0138] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0139] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0140] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0141] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.

Claims

1. An error compensation method for a Hall sensor, characterized in that, include: Identify the first Hall sensor in the Hall sensor array to be compensated for error, and the second Hall sensor that causes the first Hall sensor to generate an error. If the magnetic fields between any two adjacent Hall sensors in the Hall sensor array interfere with each other, then determine the minimum and maximum distances between the Hall element and the permanent magnet in any two adjacent Hall sensors. A distance threshold is determined based on the maximum distance and the minimum distance, wherein the distance threshold is greater than the minimum distance and less than the maximum distance; the distance between the permanent magnet in the second Hall sensor and the Hall element in the first Hall sensor is less than the distance threshold. Obtain the displacement value corresponding to the second Hall sensor; Based on the displacement value corresponding to the second Hall sensor, the compensation value mapping table corresponding to the first Hall sensor is queried to determine the target compensation value corresponding to the first Hall sensor. Based on the target compensation value, the output value of the first Hall sensor is compensated to obtain the compensated output value of the first Hall sensor. The compensation value mapping table corresponding to the first Hall sensor is generated in the following way: The displacement of the push rods in the remaining sensors of the Hall sensor array, excluding the second Hall sensor, is controlled to be zero; Adjust the displacement of the push rod in the second Hall sensor to obtain the output value of the first Hall sensor at each displacement of the push rod in the second Hall sensor; Based on the output value of the first Hall sensor corresponding to the push rod in the second Hall sensor at each displacement, determine the compensation value of the first Hall sensor corresponding to the push rod in the second Hall sensor at each displacement; The compensation value mapping table is generated based on the mapping relationship between the displacement of the push rod in the second Hall sensor and the corresponding compensation value.

2. The method according to claim 1, characterized in that, The determination of the first Hall sensor in the Hall sensor array to be subjected to error compensation includes: If the output value of any Hall sensor is not the initial value, then the Hall sensor is determined to be the first Hall sensor, wherein the initial value is the output value when the displacement of the push rod in the Hall sensor is zero.

3. The method according to claim 1, characterized in that, The step of obtaining the displacement value corresponding to the second Hall sensor includes: If the second Hall sensor does not require error compensation, the displacement value corresponding to the second Hall sensor is determined based on the output value of the second Hall sensor; or... When the second Hall sensor needs to be error compensated, the displacement value corresponding to the second Hall sensor is determined based on the compensated output value of the second Hall sensor.

4. The method according to claim 1, characterized in that, The step of obtaining the displacement value corresponding to the second Hall sensor includes: If a fault is detected in the second Hall sensor, the displacement value corresponding to the second Hall sensor is determined based on the type of fault and the displacement value of the second Hall sensor before the fault occurred.

5. An error compensation device for a Hall sensor, characterized in that, include: The first determining module is used to determine the first Hall sensor to be compensated for error in the Hall sensor array, and the second Hall sensor that causes the first Hall sensor to generate an error. The first processing module is configured to, if the magnetic fields between any two adjacent Hall sensors in the Hall sensor array interfere with each other, determine the minimum and maximum distances between the Hall elements and permanent magnets in any two adjacent Hall sensors; determine a distance threshold based on the maximum and minimum distances, wherein the distance threshold is greater than the minimum distance and less than the maximum distance; and the distance between the permanent magnet in the second Hall sensor and the Hall element in the first Hall sensor is less than the distance threshold. The first acquisition module is used to acquire the displacement value corresponding to the second Hall sensor; The second determining module is used to query the compensation value mapping table corresponding to the first Hall sensor based on the displacement value corresponding to the second Hall sensor, and determine the target compensation value corresponding to the first Hall sensor. The second acquisition module is used to compensate the output value of the first Hall sensor based on the target compensation value, so as to obtain the compensated output value of the first Hall sensor. The first processing module is further configured to: The displacement of the push rods in the remaining sensors of the Hall sensor array, excluding the second Hall sensor, is controlled to be zero; Adjust the displacement of the push rod in the second Hall sensor to obtain the output value of the first Hall sensor at each displacement of the push rod in the second Hall sensor; Based on the output value of the first Hall sensor corresponding to the push rod in the second Hall sensor at each displacement, determine the compensation value of the first Hall sensor corresponding to the push rod in the second Hall sensor at each displacement; The compensation value mapping table is generated based on the mapping relationship between the displacement of the push rod in the second Hall sensor and the corresponding compensation value.

6. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the error compensation method for the Hall sensor as described in any one of claims 1-4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the error compensation method for the Hall sensor as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Displacement detector and calibration method of displacement detector

    JP2019049489A

  • Device to correct interference errors between magnetic sensors for measuring the position of mobile elements

    US20070126418A1