TMR current sensor automatic attitude calibration method, device, equipment and medium

By monitoring the attitude and environmental data of the TMR current sensor in real time, calculating the Euler angles and attitude rotation matrix, automatic attitude calibration of the sensor is achieved, solving the measurement accuracy and stability problems of the TMR current sensor in high dynamic scenarios, and improving the applicability and cost-effectiveness of the sensor.

CN121934007APending Publication Date: 2026-04-28STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +2
View PDF 11 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
Filing Date
2026-03-30
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing TMR current sensors are susceptible to environmental interference and installation posture in high dynamic scenarios, resulting in inaccurate measurement accuracy. They also lack dynamic calibration capabilities and are difficult to adapt to parameter changes caused by mechanical vibration and aging.

Method used

By monitoring the triaxial acceleration, gyroscope, and magnetometer data of the TMR current sensor in real time, Euler angles and attitude rotation matrix are calculated to achieve automatic calibration of the sensor attitude, real-time correction of position deviation and environmental interference, and data processing and compensation are performed using a microcontroller and signal conditioning module.

Benefits of technology

It improves measurement accuracy, reduces angle-related errors, enhances environmental robustness, lowers deployment costs, supports plug-and-play installation, adapts to extreme working conditions, and enhances the application of sensors in the Industrial Internet of Things.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121934007A_ABST
    Figure CN121934007A_ABST
Patent Text Reader

Abstract

The invention relates to an automatic attitude calibration method and device for a TMR current sensor, equipment and a medium. The method comprises the following steps: acquiring reference attitude information detected by an attitude sensor in the TMR current sensor during initial installation; in the use process of the TMR current sensor, acquiring a magnetic signal sensed and output by a TMR sensing element in the TMR current sensor in real time; detecting whether the position of the TMR current sensor changes in the use process in real time, when the position change is detected, acquiring current attitude information detected by the attitude sensor at the current position in real time, and calculating to obtain a measurement current after the position is changed based on the magnetic signal, the current attitude information and the reference attitude information, and outputting the measurement current; when the position change is not detected, a measurement current is calculated and output based on the magnetic signal and the reference attitude information. Compared with the prior art, the method has the advantages that the measurement precision of the current sensor can be improved, and the deployment cost is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power sensor technology, and in particular to an automatic attitude calibration method, apparatus, device, and medium for a TMR current sensor. Background Technology

[0002] Current sensing technology is a core component of power systems, industrial automation, new energy equipment, and smart grids; its accuracy and reliability directly impact equipment operating efficiency and safety. Traditional current sensors mainly include shunts, Hall effect sensors, Rogowski coils, and magnetoresistive sensors. Among these, magnetoresistive sensors (such as anisotropic magnetoresistive (AMR), giant magnetoresistive (GMR), and tunneling magnetoresistive (TMR) sensors have gradually become the mainstream solution for high-precision current sensing due to their non-contact measurement, wide bandwidth response, and high sensitivity. However, with the increasing complexity of application scenarios, the practical application of TMR current sensors still faces the following challenges: 1. Environmental interference sensitivity: External magnetic fields (such as nearby conductors, geomagnetic shift) and temperature fluctuations can easily cause the output of magnetoresistive sensors to drift. Especially in high dynamic scenarios such as electric vehicles, the non-uniformity of magnetic field distribution significantly affects the measurement accuracy.

[0003] 2. Installation Attitude Dependence: The output signal of a magnetoresistive sensor is closely related to the direction of the magnetic field and the alignment of the sensor's sensitive axis. Attitude sensitivity leads to nonlinear errors. When there is an angle between the sensor's sensitive axis and the direction of the magnetic field, its output signal has a cosine relationship with the theoretical value. For example, a 5° attitude deviation can introduce approximately 0.4% measurement error, which is not negligible in precision metrology scenarios. In actual installation, mechanical vibration, assembly tolerances, or equipment deformation may cause sensor attitude (such as tilt angle or rotation angle) to shift, resulting in nonlinear errors (typically reaching 3%~10%).

[0004] 3. Lack of dynamic calibration capability: Traditional calibration methods mostly rely on factory static calibration or fixed compensation algorithms, which are difficult to adapt to the time-varying parameter problems caused by mechanical deformation, aging and other factors during operation, resulting in insufficient long-term stability.

[0005] At the existing technology level, Chinese patent CN119596212A discloses a digital closed-loop self-calibration compensation circuit for a magnetic sensor. By designing a digital closed-loop self-calibration compensation circuit for a magnetic sensor, high-precision calibration of the sensor can be achieved during the production process. However, the attitude-output mapping relationship of the sensor needs to be pre-calibrated. But it cannot effectively correct and supplement the position deviation generated during the installation process, and the model parameters are easily affected by factors such as aging, resulting in poor dynamic adaptability.

[0006] Chinese patent CN119780484A discloses an adjustable TMR and electromagnetic measurement sensor bracket and a multi-array control method. By designing several fan-shaped base plates made of SMC composite material, adjacent fan-shaped base plates are spliced ​​together to form a complete ring structure. This allows for flexible array arrangement and independent adjustment of electromagnetic measurement sensors on the bracket, thereby more accurately detecting magnetic field signals at different positions and directions, improving the efficiency and accuracy of magnetic field detection. A high-precision mechanism adjusts the sensor mounting angle to ensure strict alignment of the sensitive axis with the magnetic field direction. The disadvantages are that it relies on a precision mechanical structure, resulting in high cost and difficulty in adapting to dynamic working conditions; long-term wear of mechanical parts can lead to calibration failure, making long-term automatic tracking and correction impossible.

[0007] Chinese patent CN112834805A discloses a tunnel magnetoresistive current sensor and calibration method with position error calibration function. It adds an angle sensor to the tunnel magnetoresistive current sensor and calibrates the position of the tunnel magnetoresistive chip by measuring the relative offset position between the sensor and the conductor under test and using magnetic field vector decomposition, thereby improving the current measurement accuracy. However, this method uses a fixed geometric model and the rotation matrix of the angle sensor, which is a one-time spatial position error correction and cannot achieve dynamic continuous calibration. Furthermore, it is a static measurement system that requires continuous sampling during use.

[0008] Therefore, there is currently a lack of a method that can automatically and dynamically perform continuous calibration during the use of TMR current sensors. Summary of the Invention

[0009] The purpose of this invention is to overcome the shortcomings of the prior art by providing an automatic attitude calibration method, device, equipment and medium for TMR current sensors, which can be widely used in the accurate detection of AC current in power transmission and transformation systems.

[0010] The objective of this invention can be achieved through the following technical solutions: According to a first aspect of the present invention, an automatic attitude calibration method for a TMR current sensor is provided, comprising the following steps: Obtain the reference attitude information detected by the attitude sensor in the TMR current sensor during initial installation; During the use of the TMR current sensor, the magnetic signal sensed and output by the TMR sensing element in the TMR current sensor is acquired in real time. The TMR current sensor is monitored in real time to detect whether a position change occurs during use. When a position change is detected, the current attitude information detected by the attitude sensor at the current position is acquired in real time. The measured current after the position change is calculated and output based on the magnetic signal, the current attitude information and the reference attitude information. When no position change is detected, the measured current is calculated and output based on the magnetic signal and the reference attitude information.

[0011] The data detected by the attitude sensor includes three-axis acceleration data, three-axis gyroscope data, and three-axis magnetometer data.

[0012] The reference attitude information is obtained in the following way: The initial Euler angles of the TMR current sensor in space are calculated based on the triaxial acceleration data and triaxial magnetometer data detected by the attitude sensor. The initial Euler angles include the initial pitch angle, the initial roll angle, and the initial yaw angle. ; ; ; in, The initial pitch angle, The initial roll angle, The initial heading angle, , , These are the initial acceleration data for the x-axis, y-axis, and z-axis, respectively. , These are the initial magnetometer data for the x-axis and y-axis, respectively. The initial attitude rotation matrix is ​​obtained based on the initial Euler angles: ; in, Let be the initial attitude rotation matrix. , , These are the attitude rotation matrices for the x-axis, y-axis, and z-axis, respectively.

[0013] The current attitude information is obtained in the following way: Using attitude sensors to acquire data from the three-axis accelerometer, three-axis gyroscope, and three-axis magnetometer at the current moment, the real-time Euler angles of the current sensor in space are calculated. These real-time Euler angles include the real-time pitch angle, real-time roll angle, and real-time yaw angle. ; ; ; in, For real-time pitch angle, For real-time roll angle, For real-time heading angle, , , These are real-time acceleration data for the x, y, and z axes, respectively. For weight parameters, The first heading angle is determined based on the data from the three-axis gyroscope. , The initial heading angle, The z-axis angular velocity is measured by a three-axis gyroscope. For the current moment, The second heading angle is determined based on data from the triaxial magnetometer. , , These are the magnetometer data for the x-axis and y-axis, respectively. The real-time attitude rotation matrix is ​​obtained based on the real-time Euler angles: ; in, This is the real-time attitude rotation matrix. , , These are the attitude rotation matrices for the x-axis, y-axis, and z-axis, respectively.

[0014] When a position change is detected, the measured current is calculated as follows: ; in, The initial attitude rotation matrix represents the reference attitude information; This is the real-time attitude rotation matrix, representing the current attitude information; The vacuum permeability; The current magnetic field vector represents the magnetic signal currently sensed and output by the TMR sensing element. The perpendicular distance between the current sensor and the wire; It is a unit vector in the circumferential direction.

[0015] When no position change is detected, the measured current is calculated as follows: ; in, The initial attitude rotation matrix represents the reference attitude information; The vacuum permeability; The initial magnetic field vector represents the magnetic signal sensed and output by the TMR sensing element; The perpendicular distance between the current sensor and the wire; It is a unit vector in the circumferential direction.

[0016] According to a second aspect of the present invention, an automatic attitude calibration device for a TMR current sensor is provided, the device comprising: TMR sensing element: Located in the TMR current sensor, it is used to sense changes in the magnetic field around the conductor and output a magnetic signal; Attitude sensor: Located in the TMR current sensor, used to detect the attitude information of the TMR current sensor in space; Signal conditioning module: including instrumentation amplifier and low-pass filter, used to amplify the magnetic signal output by TMR sensing element to the ADC input range, and introduce temperature-sensitivity compensation circuit to counteract magnetic sensitivity drift caused by ambient temperature; Microcontroller (MCU): Used to receive attitude information and combine it with magnetic signal data processed by the signal conditioning module to execute the method described to achieve automatic attitude calibration; Power module: Used to convert input electrical energy into a specific voltage to power the system, while providing electrical isolation, voltage regulation, filtering and protection functions to ensure the stable operation of downstream equipment.

[0017] The device also includes a wireless module for wireless data transmission, including a radio frequency transceiver, an antenna, and related signal processing circuitry.

[0018] According to a third aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described thereon.

[0019] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.

[0020] Compared with the prior art, the present invention has the following beneficial effects: (1) Improve measurement accuracy: This invention can suppress angle-related errors to below 0.1% by compensating for attitude deviations online in real time, thus meeting the high-precision measurement requirements of the sensor.

[0021] (2) Enhanced environmental robustness: This invention does not require modification of the sensor’s internal structure, reduces installation and environmental requirements, and expands the applicability of the sensor under extreme conditions.

[0022] (3) Reduced deployment costs: This invention uses algorithms for calibration, which can eliminate the dependence on manual intervention and external calibration equipment, supports plug-and-play installation, reduces sensor deployment costs, and accelerates the popularization of TMR sensors in the Industrial Internet of Things. Attached Figure Description

[0023] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a system structure diagram of the present invention. Detailed Implementation

[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0025] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0026] Example 1 This embodiment provides an automatic attitude calibration method for a TMR current sensor, such as... Figure 1 As shown, it includes the following steps: S1, Obtain the reference attitude information detected by the attitude sensor in the TMR current sensor during initial installation; S2, during the use of the TMR current sensor, acquires the magnetic signal sensed and output by the TMR sensing element in the TMR current sensor in real time. S3, Real-time detection of whether the TMR current sensor changes position during use; S4, when a position change is detected, the current attitude information detected by the attitude sensor at the current position is acquired in real time, and the measured current after the position change is calculated and output based on the magnetic signal, the current attitude information and the reference attitude information; S5, when no position change is detected, calculate and output the measurement current based on the magnetic signal and reference attitude information.

[0027] After the TMR (Tunneling Magnetoresistance) current sensor is installed, to ensure its accurate sensing of the target object's position and magnetic field changes, a baseline parameter initialization process must be performed. This process is fundamental to the accurate operation of the entire magnetic field sensing system. It utilizes attitude sensors to obtain three-axis acceleration data, three-axis gyroscope data, and three-axis magnetometer data, and calculates the initial Euler angles (including initial pitch, roll, and yaw angles) of the current TMR current sensor in space. ; ; ; in, The initial pitch angle, The initial roll angle, The initial heading angle, , , These are the initial acceleration data for the x-axis, y-axis, and z-axis, respectively. , These are the initial magnetometer data for the x-axis and y-axis, respectively.

[0028] The initial attitude rotation matrix is ​​obtained based on the initial Euler angles: ; in, Let be the initial attitude rotation matrix. , , These are the attitude rotation matrices for the x-axis, y-axis, and z-axis, respectively.

[0029] In this embodiment, whether the acceleration reaches the trigger threshold is used as the criterion for determining whether a position change has occurred. When the acceleration reaches the trigger threshold, it is considered that the position of the current sensor has changed.

[0030] When no position change is detected, the measurement current can be calculated directly based on the magnetic signal and the initial attitude rotation matrix. The specific process is as follows: TMR sensors detect the magnetic field vector around the conductor. Its magnitude and direction are determined by the current in the conductor. Including the influence of relative position, the magnetic field model can be approximated as the magnetic field of a current in an infinitely long straight conductor: ; in, The vacuum permeability; The perpendicular distance between the current sensor and the wire; It is a unit vector in the circumferential direction (azimuth direction), and its direction is determined by the right-hand rule, along the tangent direction of the concentric circle centered on the conductor.

[0031] Due to the rotation or tilt of the sensor, the measured magnetic field vector becomes: ; Therefore, the measured current at the initial position can be obtained as follows: ; in, The initial attitude rotation matrix represents the reference attitude information; The initial magnetic field vector represents the magnetic signal sensed and output by the TMR sensing element at the initial position.

[0032] If the sensor position remains unchanged, the measured current will be output directly according to the formula above.

[0033] During non-critical periods, the attitude sensor is in a low-power sleep state, retaining only minimal monitoring functions, while the low-frequency accelerometer remains operational to continuously monitor potential triggering events. When a position change trigger condition is detected, the attitude sensor is immediately awakened and enters attitude correction mode to analyze sensor data in real time, identify and correct potential deviations or drifts, and ensure data accuracy.

[0034] Specifically, when a position change is detected, the attitude sensor acquires data from the three-axis accelerometer, three-axis gyroscope, and three-axis magnetometer at the current moment, and calculates the real-time Euler angles of the current sensor in space. The real-time Euler angles include the real-time pitch angle, real-time roll angle, and real-time yaw angle. ; ; ; in, For real-time pitch angle, For real-time roll angle, For real-time heading angle, , , These are real-time acceleration data for the x-axis, y-axis, and z-axis, respectively.

[0035] To obtain a stable, drift-free, and interference-resistant heading angle during position changes, a filter is used to fuse three-axis gyroscope data and three-axis magnetometer data to obtain the heading angle. The weighting parameter is set to 0.91-0.98. The first heading angle is determined based on the data from the three-axis gyroscope. , The initial heading angle, The z-axis angular velocity is measured by a three-axis gyroscope. For the current moment, The second heading angle is determined based on data from the triaxial magnetometer. , , These are the magnetometer data for the x-axis and y-axis, respectively.

[0036] The real-time attitude rotation matrix is ​​obtained based on the real-time Euler angles: ; in, This is the real-time attitude rotation matrix. , , These are the attitude rotation matrices for the x-axis, y-axis, and z-axis, respectively.

[0037] After obtaining the real-time attitude rotation matrix, the attitude information is used to correct the acquired current value. At this time, the magnetic field around the conductor becomes: ; Therefore, the measured current after the position change can be obtained as follows: .

[0038] After updating the measurement parameters, the attitude sensor enters sleep mode again, waiting for the next trigger, and repeats the correction steps.

[0039] Example 2 The above is an introduction to the method embodiments. The following describes the solution of the present invention further through device embodiments.

[0040] like Figure 2 As shown, an automatic attitude calibration device for a TMR current sensor includes: TMR sensing element: Located in the TMR current sensor, it is used to sense changes in the magnetic field around the conductor and output a magnetic signal; Attitude sensor: Located in the TMR current sensor, it is used to detect the attitude information (pitch angle, roll angle, yaw angle) of the TMR current sensor in space. Signal conditioning module: Includes instrumentation amplifier and low-pass filter, used to amplify the magnetic signal output by TMR sensing element to the ADC input range. It also integrates digital temperature sensor and compensation algorithm, which eliminates the effect of temperature drift on TMR sensitivity in the range of -40°C to +85°C through software calibration. At the same time, a temperature-sensitivity compensation circuit is introduced to counteract magnetic sensitivity drift caused by ambient temperature. Microcontroller (MCU): Used to receive attitude information and combine it with magnetic signal data processed by the signal conditioning module to execute the method described in Example 1 to achieve automatic attitude calibration; Power module: Used to convert input electrical energy into a specific voltage to power the system, while providing electrical isolation, voltage regulation, filtering and protection functions to ensure the stable operation of downstream equipment; Wireless module: Optional, used to enable wireless data transmission, including radio frequency transceiver, antenna and related signal processing circuitry.

[0041] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0042] Example 3 The electronic device of this invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0043] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0044] The processing unit executes the various methods and processes described above, such as methods S1 to S5. For example, in some embodiments, methods S1 to S5 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of methods S1 to S5 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1 to S5 by any other suitable means (e.g., by means of firmware).

[0045] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0046] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0047] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0048] 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 person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. An automatic attitude calibration method for a TMR current sensor, characterized in that, Includes the following steps: Obtain the reference attitude information detected by the attitude sensor in the TMR current sensor during initial installation; During the use of the TMR current sensor, the magnetic signal sensed and output by the TMR sensing element in the TMR current sensor is acquired in real time. The TMR current sensor is used to detect whether the position changes during use. When the position change is detected, the current attitude information detected by the attitude sensor at the current position is acquired in real time. The measured current after the position change is calculated and output based on the magnetic signal, the current attitude information and the reference attitude information. When no position change is detected, the measured current is calculated and output based on the magnetic signal and reference attitude information.

2. The automatic attitude calibration method for a TMR current sensor according to claim 1, characterized in that, The data detected by the attitude sensor includes three-axis acceleration data, three-axis gyroscope data, and three-axis magnetometer data.

3. The automatic attitude calibration method for a TMR current sensor according to claim 2, characterized in that, The reference attitude information is obtained in the following way: The initial Euler angles of the TMR current sensor in space are calculated based on the triaxial acceleration data and triaxial magnetometer data detected by the attitude sensor. The initial Euler angles include the initial pitch angle, the initial roll angle, and the initial yaw angle. ; ; ; in, The initial pitch angle, The initial roll angle, The initial heading angle, , , These are the initial acceleration data for the x-axis, y-axis, and z-axis, respectively. , These are the initial magnetometer data for the x-axis and y-axis, respectively. The initial attitude rotation matrix is ​​obtained based on the initial Euler angles: ; in, Let be the initial attitude rotation matrix. , , These are the attitude rotation matrices for the x-axis, y-axis, and z-axis, respectively.

4. The automatic attitude calibration method for a TMR current sensor according to claim 2, characterized in that, The current attitude information is obtained in the following way: Using attitude sensors to acquire data from the three-axis accelerometer, three-axis gyroscope, and three-axis magnetometer at the current moment, the real-time Euler angles of the current sensor in space are calculated. These real-time Euler angles include the real-time pitch angle, real-time roll angle, and real-time yaw angle. ; ; ; in, For real-time pitch angle, For real-time roll angle, For real-time heading angle, , , These are real-time acceleration data for the x, y, and z axes, respectively. For weight parameters, The first heading angle is determined based on the data from the three-axis gyroscope. , The initial heading angle, The z-axis angular velocity is measured by a three-axis gyroscope. For the current moment, The second heading angle is determined based on data from the triaxial magnetometer. , , These are the magnetometer data for the x-axis and y-axis, respectively. The real-time attitude rotation matrix is ​​obtained based on the real-time Euler angles: ; in, This is the real-time attitude rotation matrix. , , These are the attitude rotation matrices for the x-axis, y-axis, and z-axis, respectively.

5. The automatic attitude calibration method for a TMR current sensor according to claim 1, characterized in that, When a position change is detected, the measured current is calculated as follows: ; in, The initial attitude rotation matrix represents the reference attitude information; This is the real-time attitude rotation matrix, representing the current attitude information; The vacuum permeability; The current magnetic field vector represents the magnetic signal currently sensed and output by the TMR sensing element. The perpendicular distance between the current sensor and the wire; It is a unit vector in the circumferential direction.

6. The automatic attitude calibration method for a TMR current sensor according to claim 1, characterized in that, When no position change is detected, the measured current is calculated as follows: ; in, The initial attitude rotation matrix represents the reference attitude information; The vacuum permeability; The initial magnetic field vector represents the magnetic signal sensed and output by the TMR sensing element; The perpendicular distance between the current sensor and the wire; It is a unit vector in the circumferential direction.

7. An automatic attitude calibration device for a TMR current sensor, characterized in that, The device includes: TMR sensing element: Located in the TMR current sensor, it is used to sense changes in the magnetic field around the conductor and output a magnetic signal; Attitude sensor: Located in the TMR current sensor, used to detect the attitude information of the TMR current sensor in space; Signal conditioning module: including instrumentation amplifier and low-pass filter, used to amplify the magnetic signal output by TMR sensing element to the ADC input range, and introduce temperature-sensitivity compensation circuit to counteract magnetic sensitivity drift caused by ambient temperature; Microcontroller (MCU): Used to receive attitude information and combine it with magnetic signal data processed by the signal conditioning module to execute the method as described in any one of claims 1 to 6 to achieve automatic attitude calibration; Power module: Used to convert input electrical energy into a specific voltage to power the system, while providing electrical isolation, voltage regulation, filtering and protection functions to ensure the stable operation of downstream equipment.

8. The automatic attitude calibration device for a TMR current sensor according to claim 7, characterized in that, The device also includes a wireless module for wireless data transmission, including a radio frequency transceiver, an antenna, and related signal processing circuitry.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Digital closed-loop self-calibration compensation circuit of magnetic sensor

    CN119596212A

  • Adjustable TMR and electromagnetic measurement sensor bracket, multi-array control method

    CN119780484A

  • Magnetic azimuth measuring system based on giant magneto-resistance sensor, measurement method and perpendicular compensation method

    CN102313543A

  • Air vehicle launching initial parameter acquiring method and system

    CN106441301A

  • Component resolving method for TMR three-axis integrated magnetic sensor

    CN111624531A