A method of error compensation for electrical measurement signals and a sensor device

CN122410116BActive Publication Date: 2026-09-25NINGBO CRRC TIMES TRANSDUCER TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610884046.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-09-25
Estimated Expiration
2046-06-18

AI Technical Summary

Technical Problem

[0003]技术人员认为,铁磁材料制成的磁芯固有地存在磁滞回线和磁化曲线的非线性问题,特别是在宽量程测量或大电流冲击下,聚磁铁芯的磁导率会发生非线性变化,导致气隙中的磁场与被测电流之间的关系偏离理想线性,而引入测量误差,从而导致传感装置输出精度低

Benefits of technology

根据第一电测量信号值、所述理论分段阈值和各区间的所述理论多项式系数,得出补偿量并对所述第一电测量信号进行补偿,以输出经过补偿后的第二电测量信号,在全量程范围内将非线性误差从传统的<3%降低至<0.5%,提高传感装置输出精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122410116B_ABST
    Figure CN122410116B_ABST
Patent Text Reader

Abstract

The application discloses an error compensation method of an electric measurement signal and a sensing device, and comprises the following steps: acquiring a first electric measurement signal output by a target chip; calculating a theoretical segmented threshold value and a theoretical polynomial coefficient under a corresponding current temperature value according to a current temperature value of the target chip and pre-stored actual segmented threshold values and actual polynomial coefficients under at least two temperature nodes; obtaining a compensation amount and compensating the first electric measurement signal according to an amplified first electric measurement signal value, the theoretical segmented threshold value and the theoretical polynomial coefficient of each interval, so as to output a second electric measurement signal after compensation. The application can understand the real intention of a user and improve the output precision of a sensing device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic measurement technology, and in particular to an error compensation method and sensing device for electrical measurement signals. Background Technology

[0002] In related technologies, Hall current sensing devices are based on Ampere's law and the Hall effect principle, and are widely used in current detection in fields such as power electronics, new energy, and industrial automation. Hall current sensing devices are usually composed of a magnetic core and a Hall chip placed in an air gap. When the current being measured flows through the conductor, the magnetic field generated is focused by the magnetic core, and the Hall chip detects the magnetic induction intensity in the air gap, thereby indirectly measuring the current.

[0003] Technicians believe that magnetic cores made of ferromagnetic materials inherently have nonlinear problems in hysteresis loops and magnetization curves. Especially under wide-range measurement or high-current impact, the permeability of the magnetic core will change nonlinearly, causing the relationship between the magnetic field in the air gap and the measured current to deviate from the ideal linearity, thus introducing measurement errors and resulting in low output accuracy of the sensing device.

[0004] The above problems urgently need to be addressed. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide an error compensation method and a sensing device for electrical measurement signals, which can improve the output accuracy of the sensing device.

[0006] This invention provides an error compensation method for electrical measurement signals, comprising the following steps: Acquire the first electrical measurement signal output by the target chip; Based on the current temperature value of the target chip, and the actual segmentation thresholds and actual polynomial coefficients at at least two pre-stored temperature nodes, the theoretical segmentation thresholds and theoretical polynomial coefficients at the corresponding current temperature value are calculated. Based on the amplified first electrical measurement signal value, the theoretical segmentation threshold, and the theoretical polynomial coefficients of each interval, the compensation amount is obtained and the first electrical measurement signal is compensated to output the compensated second electrical measurement signal.

[0007] Optionally, the method further includes: Based on different temperature nodes, extract the actual segment threshold and actual polynomial coefficients for the corresponding temperature node.

[0008] Optionally, based on different temperature nodes, extract the actual piecewise threshold and actual polynomial coefficients for the corresponding temperature node, including: A standard current sequence covering the full range and overload range is applied to the assembled magnetic core and Hall chip as a whole, and the actual output digital value of the Hall chip is recorded at each temperature node; Based on the permeability variation trend of the magnetic core, the measurement range is divided into linear region, transition region and saturation region, and the segment thresholds of linear region, transition region and saturation region at each temperature node are determined; By using the piecewise fitting method, the polynomial coefficients of each interval corresponding to each temperature node are obtained. The piecewise threshold and polynomial coefficients at each temperature node are used as the actual piecewise threshold and actual polynomial coefficients.

[0009] Optionally, the method further includes: The actual segmented thresholds and actual polynomial coefficients at each temperature node are stored in the storage unit of the Hall chip in the form of a coefficient table, and the coefficient table is indexed by temperature node and interval. Based on the current temperature value of the target chip, the coefficient table is consulted to determine the actual segmentation threshold and the corresponding actual polynomial coefficients of the temperature nodes adjacent to the current temperature value.

[0010] Optionally, the step of calculating the theoretical segmentation threshold and theoretical polynomial coefficients at the corresponding current temperature value based on the current temperature value of the target chip, the actual segmentation threshold corresponding to the current temperature value, and the corresponding actual polynomial coefficients includes: Based on the current temperature value, linear interpolation is performed between the actual segmentation thresholds corresponding to two adjacent temperature nodes to obtain the theoretical segmentation threshold at the current temperature value. Based on the current temperature value, linear interpolation is performed between the actual polynomial coefficients corresponding to two adjacent temperature nodes to obtain the theoretical polynomial coefficients for each interval at the current temperature.

[0011] Optionally, based on the amplified signal value, the theoretical segmentation threshold, and the theoretical polynomial coefficients of each interval, a compensation amount is derived and the first electrical measurement signal is compensated to output a compensated second electrical measurement signal, including: The amplified first electrical measurement signal value is compared with the theoretical segmentation threshold to determine the segmentation interval to which the amplified first electrical measurement signal value belongs; The theoretical polynomial coefficients corresponding to the segmented intervals are called to perform inverse compensation operations to obtain the compensated second electrical measurement signal.

[0012] Optionally, the theoretical segmentation threshold includes a first threshold and a second threshold, wherein the first threshold is used to divide the linear region and the transition region, and the second threshold is used to divide the transition region and the saturation region.

[0013] This invention provides a sensing device, comprising: A magnetic focusing module is used to focus the magnetic field generated by the measured current to form an air gap magnetic field. The acquisition module is used to sense the air gap magnetic field and acquire electrical signals, and output a first electrical measurement signal and an amplified signal value; The processing module is electrically connected to the acquisition module and the magnetic focusing module, respectively, and is used to execute the error compensation method for the electrical measurement signal.

[0014] The present invention provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the steps of the error compensation method for the electrical measurement signal are implemented.

[0015] Compared with the prior art, the beneficial effects of the present invention are: Based on the first electrical measurement signal value, the theoretical segmentation threshold, and the theoretical polynomial coefficients of each interval, a compensation amount is obtained and the first electrical measurement signal is compensated to output a compensated second electrical measurement signal. This reduces the nonlinear error from the traditional <3% to <0.5% across the entire measurement range, thereby improving the output accuracy of the sensing device. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A flowchart illustrating the steps of an error compensation method for an electrical measurement signal provided in an embodiment of this application.

[0018] Figure 2 This is a schematic diagram of the structure of the sensing device provided in the embodiments of this application.

[0019] Figure 3 This is a block diagram of the internal circuit module of the Hall chip provided in an embodiment of this application.

[0020] Figure 4 A schematic diagram illustrating the specific operation steps of the factory pre-calibration stage and the real-time operation stage provided in the embodiments of this application.

[0021] Figure 5 A comparison curve of product output values ​​before and after calibration provided for embodiments of this application.

[0022] Figure 6 This is a comparison curve of the absolute error of the product before and after calibration, provided for an embodiment of this application.

[0023] Figure 7This is a comparison curve of the relative error of the product after calibration points provided in the embodiments of this application.

[0024] In the picture: 1. Magnetic core; 2. Air gap; 3. Chip; 31. Hall effect sensor; 32. Temperature sensor; 33. Hall effect signal amplification unit; 34. Analog-to-digital converter; 35. Signal processing unit; 36. Output interface circuit; 37. Storage unit; 4. PCB board; 5. Conductor under test. Detailed Implementation

[0025] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. Based on the description of the present invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the present invention.

[0026] In the description of this invention, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.

[0027] The terms “upper,” “lower,” “left,” “right,” “front,” “back,” “top,” “bottom,” “inner,” and “outer,” etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of the invention is in use. They are only for the convenience of description and simplification, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the present invention.

[0028] The terms “first,” “second,” “third,” etc., are used merely to distinguish elements with similar properties, not to indicate or imply relative importance or a specific order.

[0029] The terms “include,” “comprising,” or any other variation thereof are intended to cover non-exclusive inclusion, which includes not only the elements listed but also other elements not expressly listed.

[0030] Example 1 Please refer to Figure 1 An error compensation method for electrical measurement signals provided in this embodiment of the invention includes the following steps: S101: Acquire the first electrical measurement signal output by the target chip; Specifically, the first electrical measurement signal is the original analog voltage signal output by the sensing element inside the Hall chip after sensing the magnetic field being measured. The first electrical measurement signal is amplified into an analog signal by the on-chip amplification circuit, and the amplified analog signal is then converted into a digital amplified signal value through analog-to-digital conversion.

[0031] The advantage of this setup is that amplifying the original Hall voltage signal (i.e., the first electrical measurement signal) can effectively increase the amplitude of weak signals, reduce interference during signal transmission, and improve the signal-to-noise ratio.

[0032] S102: Based on the current temperature value of the target chip and the actual segmentation threshold and actual polynomial coefficients at at least two pre-stored temperature nodes, calculate the theoretical segmentation threshold and theoretical polynomial coefficients at the corresponding current temperature value. For example, the "actual segmentation threshold" here refers to the critical value for dividing the signal interval based on the magnetization characteristics (BH curve) of the magnetic core 1 under different temperature conditions, which is used to determine the compensation interval to which the acquired signal belongs; the "actual polynomial coefficients" are the reference coefficients obtained by fitting based on the nonlinear distortion characteristics of the magnetic core 1 at different temperatures, which are used for compensation calculation. Both are the core reference data for subsequent real-time compensation, and they need to be extracted and stored before the sensor leaves the factory to ensure that they can be directly called up during real-time operation.

[0033] The advantage of this setup is that by pre-extracting and storing the actual segmented thresholds and actual polynomial coefficients under different temperature conditions, it can provide an accurate and stable benchmark data source for subsequent real-time compensation, avoiding complex feature extraction and coefficient fitting during real-time operation, and significantly improving the real-time performance of compensation calculations. At the same time, based on the pre-calibration under different temperature conditions, it can specifically cover the law of change of magnetic properties of the magnet core 1 with temperature, laying the foundation for subsequent temperature adaptive compensation, reducing the impact of temperature factors on compensation accuracy from the source, and ensuring the stability and reliability of the compensation effect.

[0034] For example, the "theoretical segmented threshold" is the interval critical value adapted to the current temperature condition after interpolating the actual segmented threshold corresponding to different pre-stored temperature nodes based on the current real-time temperature value; the "theoretical polynomial coefficients" are the coefficients that can be directly used for compensation calculation at the current temperature after calculating the actual pre-stored polynomial coefficients using the same interpolation method. Both are dynamic compensation parameters adapted to the current real-time temperature, rather than fixed reference parameters.

[0035] The advantage of this setup is that by combining real-time temperature values ​​with pre-stored baseline parameters for interpolation, dynamic adaptive adjustment of compensation parameters can be achieved, perfectly matching the variation of magnetic properties of the magnet core 1 with temperature. This solves the problem that traditional fixed parameter compensation cannot adapt to temperature fluctuations, leading to a decrease in compensation accuracy. At the same time, the interpolation method does not require pre-stored parameters at every temperature node, but only at key temperature nodes, which greatly reduces the amount of storage unit 37 occupied and lowers the hardware cost of chip 3. Furthermore, the interpolation logic is simple, the calculation speed is fast, and it does not affect the real-time performance of the overall compensation.

[0036] S103: Based on the amplified first electrical measurement signal value, the theoretical segmentation threshold, and the theoretical polynomial coefficients of each interval, the compensation amount is obtained and the first electrical measurement signal is compensated to output the compensated second electrical measurement signal.

[0037] For example, "compensation amount" refers to the value used to correct the deviation of the electrical measurement signal. Its calculation logic is to first determine the signal interval (linear region, transition region or saturation region) to which the digital quantity belongs by comparing it with the theoretical segmented threshold, and then call the theoretical polynomial coefficients corresponding to the interval to obtain the correction value that can offset the nonlinear error of the magnetic core 1 through inverse compensation operation. "Electrical measurement signal" refers to the signal that reflects the magnitude of the measured current. Here, it specifically refers to the digital quantity after amplification and analog-to-digital conversion. The compensation process is to correct the digital quantity through the compensation amount to eliminate the distortion caused by the nonlinearity of the magnetic core 1.

[0038] The advantage of this setup is that by determining the signal's range through theoretical segmented thresholds, precise segmented compensation can be achieved. For the differences in magnetic properties across different ranges of the magnetic core 1 (stable permeability in the linear region, decreased permeability in the transition region, and a sharp drop in permeability in the saturation region), inverse compensation is performed using the theoretical polynomial coefficients of the corresponding range. This avoids the limitation of a single compensation model being unable to adapt to the entire range, significantly improving compensation accuracy across the entire range. Simultaneously, the inverse compensation operation can accurately offset measurement errors introduced by factors such as nonlinearity and hysteresis in the magnetic core 1, fundamentally solving the problem that traditional Hall sensors only compensate for defects in the Hall element itself and cannot address errors introduced by the iron core, thus achieving system-level accuracy improvement.

[0039] Specifically, the second electrical measurement signal is either a voltage or a digital quantity. The compensated second electrical measurement signal output here is a signal that has a strictly linear relationship with the measured current. Its form can be flexibly selected according to the actual application scenario (voltage signals are suitable for analog circuit scenarios, while digital quantities are suitable for digital circuits, microcontroller control, and other scenarios). The output signal needs to undergo stability verification to ensure that the compensated signal is free from fluctuations and distortions, and can be directly used for subsequent current detection, control, and other operations.

[0040] The advantage of this setup is that it allows for flexible selection of the output signal format, adapting to different application scenarios and enhancing the versatility and applicability of the compensation method of this invention. It eliminates the need for additional signal conversion modules, simplifying system design. At the same time, the output signal, which is linearly corresponding to the measured current after compensation, can directly meet the current detection accuracy requirements of fields such as power electronics, new energy, and industrial automation. This avoids the tedious operation of subsequent signal correction, reducing the overall design cost and complexity of the system. Furthermore, the compensated signal has high accuracy and good stability, effectively improving the reliability of the entire detection system.

[0041] In some implementations, the method further includes: Based on different temperature nodes, extract the actual segment threshold and actual polynomial coefficients for the corresponding temperature node.

[0042] In some implementations, based on different temperature nodes, the actual piecewise threshold and actual polynomial coefficients at the corresponding temperature node are extracted, including: A standard current sequence covering the full range and overload range is applied to the assembled magnetic core and Hall chip as a whole, and the actual output digital value of the Hall chip is recorded at each temperature node; For example, the Hall chip integrates a temperature sensing unit 32 to detect the operating temperature of the chip 3 itself in real time, thereby indirectly reflecting the actual operating temperature of the magnet core 1 (because the chip 3 is placed in the air gap 2 of the magnet core 1, the operating temperatures of the two tend to be the same).

[0043] Specifically, the analog temperature signal output by the temperature sensing unit 32 is converted into a digital temperature value that can be recognized and processed by the signal processing unit 35, providing data support for subsequent temperature adaptive interpolation calculations.

[0044] The advantage of this setup is that by acquiring the temperature of chip 3 in real time and converting it into a standard temperature value, the real-time operating temperature change of the magnetic core 1 can be accurately captured, solving the compensation deviation problem caused by the change of magnetic properties (such as permeability and saturation flux density) of the magnetic core 1 with temperature. At the same time, the real-time acquisition and conversion of temperature information ensures that the temperature parameters used in subsequent interpolation calculations are completely matched with the actual working conditions, avoiding compensation errors caused by a fixed temperature reference, and further improving the temperature adaptability and compensation accuracy of the compensation method.

[0045] Based on the permeability variation trend of the magnetic core, the measurement range is divided into linear region, transition region and saturation region, and the segment thresholds of linear region, transition region and saturation region at each temperature node are determined. Specifically, the linear region, transition region, and saturation region are divided based on the changing trend of the magnetic permeability of the magnetic core 1. The linear region described in this application refers to the region where the measured current is in the rated low-to-medium range, the magnetic flux density inside the magnetic core 1 changes strictly linearly and synchronously with the measured current, the magnetic permeability of the core remains stable and constant, the magnetic field strength of the air gap 2 has no deviation in the linear correspondence with the input current, and the output signal of the Hall chip 3 has no obvious nonlinear distortion. The transition region refers to the area where the measured current continues to increase and approaches full scale, the magnetic flux density of the magnetic core gradually approaches the saturation critical point, the magnetic permeability of the magnetic core begins to decrease slowly, the magnetic flux growth rate gradually slows down, the linear correspondence between the air gap 2 magnetic field and the measured current gradually deviates from the ideal state, and the nonlinear deviation of the signal gradually appears. The saturation region refers to the state where the measured current reaches or exceeds the full-scale threshold of the sensor, the magnetic flux density inside the magnetic core reaches the ultimate saturation state, the permeability drops sharply and tends to stabilize, and when the measured current continues to increase, the magnetic field strength inside the air gap 2 almost no longer increases synchronously, the Hall output signal tends to flatten, and the linear correspondence completely fails.

[0046] The following situations will not result in a saturation region: First, the measured current is always lower than the saturation critical current of the magnetic core, and is controlled within the upper limit of the transition region throughout the entire process. The magnetic flux density of the magnetic core never reaches the saturation critical point, and the magnetic flux changes stably with the current without entering the saturation state. Second, the sensor's rated range is designed to be less than the magnetic core's saturation current, and the product's calibrated maximum measurement current is far below the magnetic core's magnetization saturation threshold. The daily and rated operating range only covers the linear and transition regions. Third, a large-size, high-permeability magnetic core is adopted, with sufficient cross-sectional area and extremely large magnetic flux capacity, which cannot reach the magnetic flux saturation limit within the normal operating current range. Fourth, limit the amplitude of short-term inrush current, prevent large current overload and pulsed large current surge, and avoid instantaneous magnetic flux surge triggering saturation characteristics. Fifth, reducing the magnetic core's magnetic collection efficiency and reasonably increasing the air gap 2 spacing weakens the magnetic core's magnetic collection ability. Under the same current, the magnetic induction intensity of the air gap 2 is significantly reduced, making it difficult to reach the saturation magnetic flux density.

[0047] For example, the number of intervals can be flexibly adjusted according to the actual application scenario. It is not necessary to include three intervals. When there is no saturation area in the sensor's working scenario, the model can only include the linear area and the transition area, and the actual segmentation thresholds only correspond to the critical values ​​of these two intervals, ensuring that the model accurately matches the actual working conditions. At the same time, the one-to-one correspondence between the actual segmentation thresholds and the intervals can ensure the accuracy of subsequent interval determination based on digital quantities and avoid compensation errors caused by interval determination deviations.

[0048] The advantages of this setup are that it allows for flexible adjustment of the number of intervals in the segmented dynamic inverse model, adapting to different application scenarios, reducing model complexity and hardware computational pressure, while avoiding redundant design of useless intervals and improving compensation computation efficiency. The actual segmentation thresholds correspond one-to-one with the model intervals, ensuring the accuracy of interval determination and allowing each digital quantity to be accurately divided into its corresponding compensation interval. This enables the correct compensation coefficients to be called for calculation, avoiding compensation deviations caused by incorrect interval determination and further improving compensation accuracy. Furthermore, clearly defining the non-saturation region operating condition provides guidance for sensor range design and magnetic core selection, meeting the usage needs of different scenarios and expanding the applicability of this invention.

[0049] By using the piecewise fitting method, the polynomial coefficients of each interval corresponding to each temperature node are obtained. The piecewise threshold and polynomial coefficients at each temperature node are used as the actual piecewise threshold and actual polynomial coefficients.

[0050] Specifically, based on the actual output digital quantity of chip 3 at different temperature nodes, such as -40°C, 25°C, 85°C, and 125°C, nonlinear distortion features are extracted. Then, the nonlinear distortion features are used to perform piecewise fitting according to the divided intervals. Piecewise fitting parameters are used to build a piecewise dynamic inverse model, which serves as the basis for subsequent compensation of nonlinear distortion. For example, "nonlinear distortion characteristics" refers to the deviation between the actual digital output of the Hall chip and the ideal linear digital output at different temperature nodes. This deviation is mainly caused by the nonlinearity of the magnetic permeability of the magnetic core 1, the hysteresis effect, and temperature dependence, and is the core characteristic reflecting the degree of nonlinearity of the magnetic core 1. The "segmented dynamic inverse model" is a compensation model for offsetting nonlinear distortion, which is established by dividing different signal intervals according to the trend of magnetic permeability change of the magnetic core 1 based on the above-mentioned nonlinear distortion characteristics. Its "dynamic" is reflected in the fact that the model parameters can be adaptively adjusted with temperature changes, and its "inverse model" is reflected in the fact that its operation logic is opposite to the nonlinear distortion logic of the magnetic core 1, which can accurately offset the distortion deviation.

[0051] The advantage of this setup is that by extracting the nonlinear distortion characteristics at different temperature nodes, it is possible to comprehensively capture the nonlinear laws of the magnet core 1 under different temperature conditions, ensuring that the established piecewise dynamic inverse model can cover the distortion situation across the entire temperature range. Establishing a piecewise dynamic inverse model can specifically solve the problem of complex nonlinear distortion of the magnet core 1 and the inability of a single model to accurately compensate. By using piecewise modeling, the compensation logic of each interval is precisely matched with the distortion characteristics of that interval. At the same time, the dynamic characteristics of the model can adapt to temperature fluctuations, further improving the compensation accuracy and temperature adaptability.

[0052] In some implementations, the method further includes: The actual segmented thresholds and actual polynomial coefficients at each temperature node are stored in the storage unit of the Hall chip in the form of a coefficient table, and the coefficient table is indexed by temperature node and interval. Based on the current temperature value of the target chip, look up the coefficient table to determine the actual segmentation threshold and the corresponding actual polynomial coefficients for the temperature nodes adjacent to the current temperature value.

[0053] Optionally, based on the current temperature of the target chip, the actual segmentation threshold corresponding to the current temperature, and the corresponding actual polynomial coefficients, the theoretical segmentation threshold and theoretical polynomial coefficients at the corresponding current temperature are calculated, including: Based on the current temperature value, linear interpolation is performed between the actual segmentation thresholds corresponding to two adjacent temperature nodes to obtain the theoretical segmentation threshold at the current temperature value. Based on the current temperature value, linear interpolation is performed between the actual polynomial coefficients corresponding to two adjacent temperature nodes to obtain the theoretical polynomial coefficients for each interval at the current temperature.

[0054] For example, "linear interpolation" refers to a calculation method that, based on the current real-time temperature value, finds two adjacent pre-stored temperature nodes (e.g., if the current temperature is 50°C, the adjacent nodes are 25°C and 85°C), and calculates the parameter value at the current temperature according to the actual parameters (actual polynomial coefficients or actual piecewise thresholds) corresponding to these two temperature nodes, in proportion to the temperature. This calculation method is logically simple, fast, and does not require complex hardware computing resources, making it suitable for implementation within the Hall chip 3. It can also accurately fit the parameter change pattern between two temperature nodes, ensuring the adaptability of theoretical parameters to actual temperatures.

[0055] The advantage of this setup is that by using linear interpolation to calculate theoretical parameters, it is possible to accurately obtain compensation parameters at any temperature without pre-storing all temperature node parameters, significantly reducing the amount of storage unit 37 occupied and lowering the hardware cost of chip 3. At the same time, linear interpolation is fast and has simple logic, which can meet the needs of real-time compensation and avoid compensation delays caused by computational complexity. In addition, linear interpolation can accurately capture the linear change law of the magnetic properties of the magnet core 1 with temperature, ensuring that the theoretical segmented threshold and theoretical polynomial coefficients are highly matched with the current temperature conditions, further improving compensation accuracy and solving the compensation deviation problem caused by temperature fluctuations.

[0056] In some implementations, a compensation amount is derived based on the amplified signal value, the theoretical segmentation threshold, and the theoretical polynomial coefficients of each interval, and the first electrical measurement signal is compensated to output a compensated second electrical measurement signal, including: The amplified first electrical measurement signal value is compared with the theoretical segmentation threshold to determine the segmentation interval to which the amplified first electrical measurement signal value belongs; The theoretical polynomial coefficients corresponding to the segmented intervals are used to perform inverse compensation operations to obtain the compensated second electrical measurement signal. Specifically, the inverse compensation calculation formula is as follows:

[0057] Where Draw is the digital value of the original Hall voltage after analog-to-digital conversion, T is the temperature value, THlow(T) and THhigh(T) are temperature-related segmented thresholds, and Ai(T), Bj(T), and Ck(T) are the polynomial coefficients of the corresponding intervals, obtained through temperature interpolation.

[0058] For example, "inverse compensation calculation" refers to the compensation operation that is opposite to the nonlinear distortion logic of the magnetic core 1. That is, the ideal linear output value corresponding to the digital quantity (Draw) is calculated by the compensation function (polynomial), and the digital quantity is corrected by the ideal value, thereby offsetting the deviation caused by the nonlinearity of the magnetic core 1. In the formula, THlow(T) and THhigh(T) are the theoretical segmentation thresholds at the current temperature, which are used to divide the interval to which the digital quantity belongs. Ai(T), Bj(T), and Ck(T) are the theoretical polynomial coefficients of the corresponding intervals, ensuring that the compensation calculation of each interval can be adapted to the current temperature and interval characteristics.

[0059] The advantage of this setup is that by determining the interval by digital values ​​and calling the corresponding polynomial for inverse compensation, segmented and precise compensation can be achieved, specifically offsetting the nonlinear distortion of different intervals and avoiding the problem of uneven compensation accuracy across the entire range caused by a single compensation logic. The inverse compensation calculation formula is simple and has a small computational load, making it suitable for implementation in the hard logic circuit inside chip 3, ensuring the real-time performance and reliability of the compensation operation. At the same time, the formula incorporates temperature-related parameters (T, THlow(T), THhigh(T), Ai(T), etc.), enabling temperature-adaptive compensation, further improving the compensation accuracy, and completely solving the error problem caused by the temperature correlation of the magnetic core 1.

[0060] In some implementations, the theoretical segmentation thresholds include a first threshold and a second threshold, whereby the first threshold is used to divide the linear region and the transition region, and the second threshold is used to divide the transition region and the saturation region.

[0061] For example, each interval corresponds to an independent compensation function. The "compensation function" refers to a function for calculating the compensation amount obtained by fitting based on the nonlinear distortion characteristics of each interval of the segmented dynamic inverse model, and its form is preferably a polynomial function (for example, a first-order polynomial is used in the linear region, a quadratic or cubic polynomial is used in the transition region, and a higher-order polynomial is used in the saturation region). The compensation function parameters of different intervals are different, which can accurately adapt to the core characteristics of each interval; the "actual polynomial coefficients" are the coefficients of the compensation functions (polynomial functions) of each interval, which are reference parameters obtained by fitting and calculating the actual output data at different temperature nodes, and are used for subsequent interpolation to obtain theoretical polynomial coefficients.

[0062] The advantage of this arrangement is that configuring an independent compensation function for each interval can adapt to the difference in magnetic characteristics of the magnetic gathering core 1 in each interval in a targeted manner, avoid the problem that a single compensation function cannot兼顾 the compensation accuracy of the whole interval, and enable the compensation of the linear region, the transition region (and the saturation region) to achieve the optimal effect; obtaining the actual polynomial coefficients through the compensation function can convert the complex nonlinear distortion compensation into a simple polynomial operation, reduce the operation pressure of the signal processing unit 35, and improve the real-time performance and accuracy of the compensation operation. Meanwhile, the fitting and storage of polynomial coefficients are low in difficulty, which is convenient for realizing integrated storage and operation inside the chip 3.

[0063] Refer to Figure 2 , the present invention provides a sensing device, comprising: a magnetic gathering module, wherein the magnetic gathering module is configured to converge the magnetic field generated by the measured current to form an air gap magnetic field.

[0064] For example, the magnetic gathering module comprises a magnetic gathering core 1, the magnetic gathering core 1 is annular, an air gap 2 is opened on one side of the magnetic gathering core 1, and the chip 3 is arranged in the air gap 2.

[0065] the annular magnetic gathering core 1 allows the measured conductor 5 to pass through its internal space, so as to uniformly converge the magnetic field generated by the current passed through the measured conductor 5 in the magnetic gathering core 1 to detect the magnitude of the current.

[0066] an acquisition module, wherein the acquisition module is configured to sense the air gap magnetic field and acquire an electrical signal, and output a first electrical measurement signal and an amplified signal value; a processing module, wherein the processing module is electrically connected with the acquisition module and the magnetic gathering module respectively, and the processing module is configured to execute the error compensation method for electrical measurement signals.

[0067] Refer to Figure 3 , the chip 3 is a Hall chip, and the interior thereof is integrated with: a Hall sensing unit 31, configured to sense the actual magnetic induction intensity in the air gap 2 and output an original Hall voltage signal (that is, the first electrical measurement signal); For example, the Hall sensing unit 31 employs a Hall disk array to sense the magnitude of an external magnetic field and output the original Hall voltage.

[0068] Hall signal amplification unit 33 is used to amplify the original Hall voltage signal output by Hall (i.e., the first electrical measurement signal). Temperature sensing unit 32, integrated inside Hall chip 3, is used to detect the current operating temperature; For example, the temperature sensing unit 32 uses a PN junction for temperature measurement.

[0069] The analog-to-digital conversion unit 34 converts the amplified analog Hall voltage and temperature signals into a 24-bit digital quantity Draw and a temperature value T. The signal processing unit 35, as the core signal processing unit 35, contains a piecewise polynomial calculation engine and a linear interpolator. The linear interpolator is used to perform linear interpolation between the actual polynomial coefficients of two adjacent temperature nodes based on the current temperature, and calculate the compensation coefficient applicable to the current working condition in real time. For example, the signal processing unit 35 is connected to the Hall sensing unit 31, the temperature sensing unit 32, the storage unit 37 and the output unit respectively, for receiving the original Hall voltage signal (i.e., the first electrical measurement signal), and calling the segmented dynamic inverse model of the magnet core 1 according to the current temperature to perform inverse compensation operation on the first electrical measurement signal to eliminate the nonlinear error introduced by the magnet core 1, and finally outputting the linearized measurement signal (i.e., the second electrical measurement signal).

[0070] Output interfaces, such as SPI, I²C, or analog outputs.

[0071] Storage unit 37 uses electrically erasable programmable read-only memory (EEPROM); For example, the storage unit 37 pre-stores a segmented dynamic inverse model, which is established based on the calibration of the assembled specific magnetic core 1. The processing module includes a chip 3, which is a Hall chip. The chip 3 integrates an analog-to-digital converter 34 to ensure the conversion accuracy of temperature values ​​and digital quantities (Draw).

[0072] Specifically, the "analog-to-digital converter unit 34" (ADC) converts the first electrical measurement signal (the analog temperature signal output by the temperature sensing unit 32 and the analog amplified signal output by the Hall signal amplification unit 33) into a digital quantity (i.e., Draw). The conversion accuracy of this unit directly affects the accuracy of subsequent compensation calculations. In this embodiment, a 24-bit analog-to-digital converter unit 34 is preferably used to ensure that the converted digital quantity has sufficient accuracy and can accurately reflect the changes in temperature and magnetic field strength. This digital quantity directly reflects the magnitude of the magnetic induction intensity in the air gap 2, and thus indirectly corresponds to the magnitude of the measured current. It is the core input data for subsequent compensation calculations.

[0073] The advantage of this arrangement is that the analog-to-digital conversion unit 34 is integrated inside the chip 3, eliminating the need for additional external conversion modules, which simplifies the overall structure of the sensor, reduces the design cost and volume of the system, and improves the integration degree of the sensor; the use of a high-precision analog-to-digital conversion unit 34 can ensure the conversion accuracy of the temperature value and the digital quantity (Draw), avoid compensation deviation caused by conversion errors, and provide high-quality data support for subsequent accurate compensation; meanwhile, two conversion modes can be flexibly selected to adapt to different design schemes of the chip 3, which improves the universality and applicability of the present invention.

[0074] The present invention provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the steps of the error compensation method for electrical measurement signals.

[0075] Reference Figure 4 , comprising specific operation steps of a factory pre-calibration stage and a real-time operation stage, wherein: In the pre-calibration stage, the operation steps are as follows: Applying a standard current sequence covering the full range and overload range; Recording the actual output of the Hall chip 3 at different temperature nodes; Extracting the nonlinear distortion characteristics of the polymerized magnetic core 1; Performing segmented fitting to obtain a segmented dynamic inverse model; Storing the segment thresholds and polynomial coefficients in a memory.

[0076] First, an example of factory calibration for compensation of a 500A Hall sensing device with a Mn-Zn ferrite core is described: Under the environment of 25°C, apply standard current I_in: 0A, 50A, 100A, 200A, 300A, 400A, 450A, 480A, 500A, 520A. Record the corresponding Hall ADC raw code Draw, that is, the digital quantity (assuming the full scale corresponds to the digital quantity 10000), and it is observed that: When I_in is 0~300A, Draw increases substantially linearly, which is the linear region of the polymerized magnetic core 1; When I_in is 300~480A, the growth of Draw begins to slow down, the polymerized magnetic core 1 shows a saturation trend, which is the transition region.

[0077] When I_{in}>480A, Draw hardly increases any more, and the polymerized magnetic core 1 is deeply saturated.

[0078] Secondly, according to the observation, set the thresholds THlow=6000 (corresponding to 300A) and THhigh=9500 (corresponding to 480A). The coefficients at 25°C are obtained by least square fitting and stored in EEPROM: Linear region (0-300A): Linear polynomial Icomp = 0.05 D_{raw} Transition region (300-480A): cubic polynomial Icomp=a D 3 raw +b D 2 raw +c Draw+d Saturation region (above 480A): High-order polynomials or saturation region-specific functions can be selected.

[0079] Finally, the above calibration is repeated at different temperature nodes (-40°C, 85°C, 125°C) to obtain the piecewise threshold and polynomial coefficients at each temperature node, and then stored in storage unit 37.

[0080] The workflow during the real-time execution phase includes: After the system is powered on, the signal processing unit 35 initializes and reads the compensation model parameters from the storage unit 37.

[0081] The Hall sensor generates a raw Hall voltage by sensing a magnetic field, which is amplified and output by the Hall signal amplification unit 33. The temperature sensing unit 32 detects the current temperature, and both are digitized by the ADC and sent to the signal processing unit 35.

[0082] The signal processing unit 35 calculates the segmented thresholds TH_{low}(T) and TH_{high}(T) and the polynomial coefficients for each interval at the current temperature T using a linear interpolator. Then, it compares D_{raw} with the thresholds to determine the segmented interval and calls the polynomial for the corresponding interval to perform inverse compensation calculation.

[0083] The compensated digital quantity is converted into an analog voltage or a direct digital output (i.e., a second electrical measurement signal) via the output interface. This output value has a precise linear relationship with the measured current flowing through the conductor.

[0084] Assuming the measured current is 450A and the current temperature is 25°C in actual operation, here is an example of a real-time compensation process: The Hall effect chip acquired a digital value of Draw=9200; The logic circuit comparison revealed that 9200 > 6000 and 9200 < 9500, indicating that it is in the "transition region". The current temperature is read as 25°C. Since 25°C is the calibration node, the transition zone coefficients a, b, c, and d are directly called. Hardware multiplier calculation: I_{comp} = a 92003+b 92002+c 9200+d; Output result: I_{comp}=450.5A.

[0085] Non-compensated comparative example: Calculate directly according to the linear region formula: I=0.05 9200=460A, resulting in an error of 10A. After inverse model compensation of the present invention, the error is reduced to 0.5A.

[0086] Through the above method, the present invention incorporates the material characteristics of the complex polymerized magnetic core 1 into the compensation scope of the chip 3, breaking the limitation of traditional Hall sensors that only compensate for the defects of the Hall element itself, and achieving system-level accuracy improvement.

[0087] In addition, taking a Hall current sensor with a measuring range of 500A as an example, full-range calibration is performed on the assembled iron core and Hall chip 3. Under the environment of 25°C, a standard current is applied and the measurement output without compensation is recorded.

[0088] As shown in Table 1, the error is -4.5A (-1.29%) at 350A, and the error expands to -30A (-6.0%) at 500A, presenting a typical nonlinear characteristic of core saturation.

[0089]

[0090] Table 1 Standard Current (A) Output Before Calibration (A) Absolute Error Before Calibration (A) Relative Error Before Calibration (%) Output After Calibration (A) Absolute Error After Calibration (A) Relative Error After Calibration (%) The piecewise dynamic inverse of the present invention is adopted for compensation: according to the characteristics of the core B-H curve, the threshold values TH_{low}=300A and TH_{high}=450A are set. A first-order polynomial is adopted for the linear region (0-300A), a second-order polynomial is adopted for the transition region (300-450A), and a third-order polynomial is adopted for the saturation region (450-500A). Meanwhile, the coefficients of each interval are stored at different temperature nodes (-40°C, 25°C, 85°C, 125°C), and current compensation parameters are obtained through temperature interpolation during real-time operation.

[0091] Refer to Figure 5 , Figure 6 and Figure 7 , after compensation, the maximum full-range absolute error is reduced from -30A to +0.18A, the relative error is reduced from -6.0% to +0.04%, the nonlinearity is improved from ±6% to ±0.05%, and the accuracy is improved by more than two orders of magnitude.

[0092] Experiments have shown that this invention can effectively eliminate measurement errors caused by core nonlinearity and temperature drift.

[0093] Furthermore, technicians believe that in practical applications, the errors introduced by the magnetic core 1 are often more complex than those of the Hall element itself, for example: Nonlinearity of magnetic permeability: The BH curve of the magnetic core 1 is not a straight line. Especially when the current is close to the full scale, the magnetic permeability decreases (approaches saturation), which causes the magnetic field B of the air gap 2 to exhibit a compression effect with the actual current I.

[0094] Hysteresis effect: Due to the remanence of the ferromagnetic material, even if the current returns to zero, there may still be a residual magnetic field in the air gap 2, causing the zero point to shift.

[0095] Temperature dependence: The magnetic properties (such as saturation flux density) of the magnetic core 1 change with temperature, which means that the compensation model must be temperature-adaptive.

[0096] Therefore, simply compensating for the Hall element cannot solve the above problems.

[0097] In summary, this application has at least the following advantages: First, it is highly targeted and accurate: it is specifically designed to compensate for the nonlinear error caused by the iron core material in the magnetic core Hall sensor. By performing piecewise inverse modeling on the magnetization curve of the magnetic core 1, the nonlinear error is reduced from <3% to <0.5% across the entire range. Second, integration and intelligence: The compensation model is directly stored inside the Hall chip 3, and the chip 3 itself completes signal acquisition, temperature monitoring and real-time compensation calculation without the need for an external processor, which simplifies system design and improves response speed; Thirdly, dynamic temperature correction: By combining the temperature sensing unit 32 and the linear interpolator, it can effectively compensate for the additional errors caused by the change of core characteristics with temperature, and realize multi-dimensional error correction.

[0098] Fourth, real-time hardware computing: all compensation calculations are completed by the internal hard logic circuits (piecewise polynomial calculation engine, linear interpolator) of chip 3, without the need for software intervention, thus ensuring real-time performance and reliability.

[0099] Based on the same inventive concept as the foregoing embodiments, this application also provides a computer-readable storage medium storing instructions that cause a machine to execute the aforementioned power control device.

[0100] 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.

[0101] 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.

[0102] 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.

[0103] 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.

[0104] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0105] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0106] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0107] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0108] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0109] In this document, the terms “including,” “comprising,” or any other variations thereof are intended to cover non-exclusive inclusion, which includes not only the elements listed but also other elements not expressly listed.

[0110] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

Claims

1. An error compensation method for electrical measurement signals, characterized in that, Includes the following steps: Acquire the first electrical measurement signal output by the target chip; Based on the current temperature value of the target chip and the actual segmentation thresholds and actual polynomial coefficients at at least two pre-stored temperature nodes, the theoretical segmentation thresholds and theoretical polynomial coefficients at the corresponding current temperature value are calculated, including: performing linear interpolation between the actual segmentation thresholds corresponding to two adjacent temperature nodes based on the current temperature value to obtain the theoretical segmentation threshold at the current temperature value; and performing linear interpolation between the actual polynomial coefficients corresponding to two adjacent temperature nodes based on the current temperature value to obtain the theoretical polynomial coefficients for each interval at the current temperature. Based on the amplified first electrical measurement signal value, the theoretical segmentation threshold, and the theoretical polynomial coefficients of each interval, the compensation amount is obtained and the first electrical measurement signal is compensated to output the compensated second electrical measurement signal. Based on different temperature nodes, extract the actual piecewise threshold and actual polynomial coefficients for the corresponding temperature node, including: A standard current sequence covering the full range and overload range is applied to the assembled magnetic core and Hall chip as a whole, and the actual output digital value of the Hall chip is recorded at each temperature node; Based on the permeability variation trend of the magnetic core, the measurement range is divided into linear region, transition region and saturation region, and the segment thresholds of linear region, transition region and saturation region at each temperature node are determined; By using the piecewise fitting method, the polynomial coefficients for each interval corresponding to each temperature node are obtained; The piecewise threshold and polynomial coefficients at each temperature node are used as the actual piecewise threshold and actual polynomial coefficients.

2. The error compensation method for electrical measurement signals as described in claim 1, characterized in that, The method further includes: The actual segmented thresholds and actual polynomial coefficients at each temperature node are stored in the storage unit of the Hall chip in the form of a coefficient table, and the coefficient table is indexed by temperature node and interval. Based on the current temperature value of the target chip, the coefficient table is consulted to determine the actual segmentation threshold and the corresponding actual polynomial coefficients of the temperature nodes adjacent to the current temperature value.

3. The error compensation method for electrical measurement signals as described in claim 1, characterized in that, Based on the amplified signal value, the theoretical segmentation threshold, and the theoretical polynomial coefficients of each interval, a compensation amount is derived and the first electrical measurement signal is compensated to output a compensated second electrical measurement signal, including: The amplified first electrical measurement signal value is compared with the theoretical segmentation threshold to determine the segmentation interval to which the amplified first electrical measurement signal value belongs; The theoretical polynomial coefficients corresponding to the segmented intervals are called to perform inverse compensation operations to obtain the compensated second electrical measurement signal.

4. The error compensation method for electrical measurement signals as described in claim 3, characterized in that, The theoretical segmentation thresholds include a first threshold and a second threshold. The first threshold is used to divide the linear region and the transition region, and the second threshold is used to divide the transition region and the saturation region.

5. A sensing device, characterized in that, include: A magnetic focusing module is used to focus the magnetic field generated by the measured current to form an air gap magnetic field. The acquisition module is used to sense the air gap magnetic field and acquire electrical signals, and output a first electrical measurement signal and an amplified signal value; The processing module is electrically connected to the acquisition module and the magnetic focusing module respectively, and the processing module is used to execute the error compensation method for the electrical measurement signal according to any one of claims 1-4.

6. A computer-readable storage medium, characterized in that, include: The device contains a computer program that, when executed by a processor, implements the steps of the error compensation method for electrical measurement signals according to any one of claims 1-4.

Citation Information

Patent Citations

  • Temperature drift compensation method, device and equipment for Hall current sensor

    CN121679449A