This invention relates to a method, apparatus, device, and medium for self-
calibration error compensation in TMR current acquisition. The method dynamically injects a reference
signal into the TMR current acquisition circuit through a built-in standard
signal excitation source module; synchronously acquires the mixed response of the original
signal and the reference signal; separates the original signal and the reference signal in the mixed response using
digital signal processing technology to obtain the measured values of the original signal and the reference signal; analyzes the difference between the measured values of the reference signal and the reference signal in real time, establishes a multi-dimensional error vector, and obtains a dynamic error compensation matrix. The dynamic error compensation matrix includes a compensation amplitude term, a compensation phase term, and a compensation
harmonic distortion term, with adaptive weight coefficients for each term determined based on the signal-to-
noise ratio,
phase difference, and frequency, respectively; and dynamically corrects the measured value of the original signal based on the dynamic error compensation matrix to achieve adaptive error compensation. Compared with existing technologies, this invention has advantages such as the ability to achieve adaptive calibration.