Causal inference compensation system and method for residual magnetism effect of magnetic encoder

By constructing a causal inference compensation system and utilizing topological dynamics models and multi-step delay processing techniques, the measurement accuracy and stability issues caused by the residual magnetism effect of magnetic encoders were resolved, enabling the application of high-precision and high-stability magnetic encoders.

CN120907587BActive Publication Date: 2026-01-27CHANGZHOU UNIV HUAIDE COLLEGE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511429590.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-09
Publication Date
2026-01-27
Estimated Expiration
2045-10-09

AI Technical Summary

Technical Problem

In practical applications, magnetic encoders are affected by residual magnetism, which leads to a decrease in measurement accuracy and stability. Existing compensation methods are unable to accurately capture their nonlinear dynamic characteristics, especially in complex environments where long-term stability is insufficient.

Method used

By employing a multidimensional G-VAR model based on topological dynamics, combined with multi-step delay processing and reverse factor inference techniques, a causal inference compensation system is constructed, including an anisotropic magnetoresistive sensor, a signal processing module, a topological dynamics model unit, a multi-step delay processing unit, a reverse factor inference unit, and a compensation output unit, to achieve accurate inference and compensation of remanent magnetization effect.

Benefits of technology

Significantly improves the measurement accuracy and stability of magnetic encoders, increasing angle measurement accuracy by 3-5 times, enhancing environmental adaptability, improving long-term stability, shortening dynamic response time, and adapting to harsh industrial environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120907587B_ABST
    Figure CN120907587B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of magnetic encoder, especially to a causal inference compensation system and method for residual magnetism effect of magnetic encoder, comprising three anisotropic magnetoresistive sensors arranged uniformly along the circumference of the gear, a signal processing module, a topological dynamics model unit, a multi-step delay processing unit, a reverse factor reasoning unit and a compensation output unit, the present application maps the magnetic sensing data to a three-dimensional Riemann manifold, constructs a tangent space dynamics representation, and establishes a G-VAR model based on the topological structure of the manifold; a conditional probability measure space is constructed by multi-step delay coordinate embedding to identify the invariant measure and attractor structure of the system; reverse trajectory tracking analysis is performed based on chaos theory to separate the residual magnetism effect component; compensation data is generated to modify the output signal of the magnetic encoder, the present application can effectively capture the nonlinear dynamic characteristics of the residual magnetism effect, accurately model and compensate, and greatly improve the angle measurement accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of magnetic encoder technology, and in particular to a causal inference compensation system and method for the residual magnetism effect of magnetic encoders. Background Technology

[0002] Magnetic encoders are widely used position and angle measurement devices in industrial automation, medical equipment, aerospace, and other fields. Their working principle involves detecting changes in the magnetic field of a magnetic encoder disk or gear using a magnetic sensor, thereby converting mechanical position or angle into an electrical signal. However, in practical applications, magnetic encoders are often affected by residual magnetism, leading to decreased measurement accuracy and reduced stability.

[0003] Remanence refers to the phenomenon that a magnetic material retains a certain degree of magnetization after the external magnetic field is removed. In magnetic encoders, this effect can cause nonlinear distortion and phase shift in the sensor output signal, which is particularly pronounced under conditions of temperature changes, external magnetic field interference, or long-term operation.

[0004] In existing technologies, the compensation for the residual magnetism effect of magnetic encoders mainly employs the following methods: first, through hardware design, such as selecting low residual magnetism materials or improving the magnetic circuit structure; second, by using simple signal processing algorithms, such as filtering and digital calibration. However, these methods are mostly based on simplified linear models or empirical parameters, making it difficult to accurately capture the nonlinear dynamic characteristics of the residual magnetism effect, especially lacking long-term stability in complex working environments.

[0005] Therefore, there is an urgent need for a system and method that can fundamentally understand the generation mechanism of remanence effect and achieve accurate modeling and compensation. Summary of the Invention

[0006] The purpose of this invention is to provide a causal inference compensation system and method for the residual magnetism effect of magnetic encoders. By constructing a multidimensional G-VAR model based on topological dynamics and combining multi-step delay processing and reverse factor inference technology, the invention achieves accurate inference and compensation for the residual magnetism effect of magnetic encoders, thereby significantly improving the measurement accuracy, stability and environmental adaptability of magnetic encoders.

[0007] This invention proposes a causal inference compensation system for the residual magnetism effect of magnetic encoders, comprising:

[0008] Three anisotropic magnetoresistive sensors are evenly arranged along the circumference of the gear to collect the magnetic sensing signals of the magnetic gear.

[0009] The signal processing module is connected to the anisotropic magnetoresistive sensor and is used to perform Gaussian smoothing and autoregressive filtering on the magnetic sensing signal to generate magnetic sensing data.

[0010] The topological dynamics model unit, connected to the signal processing module, is used to map the magnetic sensing data to a three-dimensional Riemannian manifold, construct a tangent space dynamics representation, and establish a G-VAR model based on the manifold topology.

[0011] A multi-step delay processing unit, connected to the topological dynamics model unit, is used to perform multi-step delay coordinate embedding on the magnetic sensing data, construct a conditional probability measure space, and generate multi-step prediction values.

[0012] The reverse factor reasoning unit, connected to the multi-step delay processing unit, is used to identify the singular attractor structure through reverse trajectory tracking analysis and to calculate the demagnetizing effect signal of the anisotropic magnetoresistive sensor.

[0013] The compensation output unit, connected to the reverse factor inference unit, is used to generate compensation data based on the demagnetization effect signal to correct the pulse signal of the magnetic encoder.

[0014] Preferably, the signal processing module includes:

[0015] The signal conditioning circuit is used to amplify and perform primary filtering on the magnetic sensing signal;

[0016] An A / D conversion circuit, connected to the signal conditioning circuit, is used to convert analog signals into digital signals;

[0017] The data preprocessing unit, connected to the A / D conversion circuit, is used to perform a fusion processing of Gaussian smoothing algorithm and autoregressive algorithm to generate the magnetic sensing data.

[0018] Preferably, the topological dynamics model unit includes:

[0019] The manifold mapping subunit is used to map the magnetic sensing data onto a three-dimensional Riemannian manifold to construct a local coordinate system;

[0020] The topological feature extraction subunit, connected to the manifold mapping subunit, is used to calculate the homology group features of the manifold and extract topological invariants.

[0021] The G-VAR model construction subunit is connected to the topological feature extraction subunit and is used to establish a G-VAR model based on the topological invariants to achieve multi-scale magnetic field characterization.

[0022] Preferably, the multi-step delay processing unit includes:

[0023] The delay coordinate embedding sub-unit is used to determine the optimal delay time through mutual information analysis and construct the trajectory matrix;

[0024] A conditional probability field construction subunit is connected to the delayed coordinate embedding subunit and is used to calculate the local probability density in the reconstructed phase space and establish a conditional probability mapping.

[0025] The invariant measure identification subunit is connected to the conditional probability field construction subunit and is used to identify the invariant measure of the system, extract the attractor structure, and realize multi-step prediction.

[0026] Preferably, the reverse factor inference unit includes:

[0027] The state inversion subunit is used to map the observed magnetic signal to the state point in phase space and calculate the inverse dynamic equation;

[0028] The chaos characteristic analysis subunit, connected to the state inversion subunit, is used to calculate the Lyapunov exponent and fractal dimension, and to evaluate the dynamic complexity of the system.

[0029] The remanence separation subunit, connected to the chaotic characteristic analysis subunit, is used to identify the branch manifold of the system, separate the demagnetization effect component, and construct a causal network between the remanence effect and external factors.

[0030] Preferably, the compensation output unit includes:

[0031] A compensation calculation subunit is used to generate compensation data based on the demagnetization effect signal;

[0032] An output adjustment subunit, connected to the compensation calculation subunit, is used to apply the compensation data to the original magnetic encoder signal;

[0033] The feedback optimization subunit is connected to the output adjustment subunit and is used to monitor the compensation effect and dynamically adjust the compensation parameters.

[0034] As a preferred option, it also includes:

[0035] The ARM processor is used to execute the core algorithms of the topology dynamics model unit, the multi-step delay processing unit, and the reverse factor inference unit;

[0036] The FPGA unit, connected to the ARM processor via the RapidIO interface, is used to implement signal preprocessing and parallel data processing;

[0037] A data acquisition card, connected to the FPGA unit, is used to acquire signals from the anisotropic magnetoresistive sensor and transmit them to the FPGA unit.

[0038] As a preferred option, it also includes:

[0039] The parameter adaptive unit is used to dynamically adjust the model parameters according to changes in working conditions;

[0040] Anomaly detection unit is used to identify abnormal changes in sensor data and model parameters;

[0041] An anomaly response unit, connected to the anomaly detection unit, is used to trigger a degradation operation strategy when an anomaly is detected.

[0042] Preferably, the three anisotropic magnetoresistive sensors are evenly distributed at a 120° angle in the circumferential direction of the gear, forming a three-point distributed sensing network; the anisotropic magnetoresistive sensors are made of ferrite or soft iron materials, and the angle encoding information is assigned to the following anisotropic magnetoresistive sensors through the synchronous rotational motion of the magnetic pole pitch.

[0043] A causal inference compensation method for the residual magnetism effect of magnetic encoders includes the following steps:

[0044] Three anisotropic magnetoresistive sensors are evenly arranged along the circumference of the gear to collect the magnetic sensing signals of the magnetic gear.

[0045] The magnetic sensing signal is subjected to Gaussian smoothing and autoregressive filtering to generate magnetic sensing data;

[0046] The magnetic sensing data is mapped to a three-dimensional Riemannian manifold to construct a tangent space dynamics representation and establish a G-VAR model based on the manifold topology.

[0047] Multi-step delayed coordinate embedding is performed on the magnetic sensing data to construct a conditional probability measure space and generate multi-step prediction values;

[0048] The structure of the singular attractor is identified by reverse trajectory tracing analysis, and the demagnetization effect signal of the anisotropic magnetoresistive sensor is calculated.

[0049] Compensation data is generated based on the demagnetization effect signal to correct the pulse signal of the magnetic encoder.

[0050] The beneficial effects of this invention include:

[0051] 1. Significantly improved measurement accuracy: Compared with traditional compensation methods, the angle measurement accuracy is improved by 3-5 times, reaching the level of 0.01°, meeting the needs of high-precision industrial applications.

[0052] 2. Enhanced environmental adaptability: Maintains stable performance within a temperature range of -40°C to 85°C, and its ability to suppress external magnetic field interference is improved by more than 10 times, making it suitable for harsh industrial environments.

[0053] 3. Improved long-term stability: By accurately modeling the dynamic characteristics of remanent magnetization, the system calibration cycle is extended by 3 to 5 times, reducing maintenance requirements and lowering operating costs.

[0054] 4. Dynamic response optimization: Maintains high precision under high-speed changing conditions, and reduces dynamic response time by 50%, making it suitable for highly dynamic application scenarios.

[0055] 5. Versatility and scalability: Applicable to different models and specifications of magnetic encoders, easy to integrate into existing systems, and has good scalability. Attached Figure Description

[0056] Figure 1 This is a schematic diagram of the overall architecture of the causal inference compensation system for the residual magnetism effect of the magnetic encoder of the present invention;

[0057] Figure 2 This is a schematic diagram of the signal processing module structure of the present invention;

[0058] Figure 3 This is a schematic diagram of the topological dynamics model unit structure of the present invention;

[0059] Figure 4 This is a schematic diagram of the multi-step delay processing unit structure of the present invention;

[0060] Figure 5 This is a schematic diagram of the reverse factor reasoning unit structure of the present invention;

[0061] Figure 6 This is a schematic diagram of the compensation output unit structure of the present invention;

[0062] Figure 7 This is a flowchart of the causal inference compensation method for the residual magnetism effect of the magnetic encoder of the present invention. Detailed Implementation

[0063] Please refer to Figure 1 - Figure 7 The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the following embodiments are for illustrative purposes only and are not intended to limit the scope of the invention.

[0064] Reference Figure 1 The causal inference compensation system for the residual magnetism effect of the magnetic encoder provided by the present invention includes: three anisotropic magnetoresistive sensors 1, a signal processing module 2, a topological dynamics model unit 3, a multi-step delay processing unit 4, a reverse factor inference unit 5, and a compensation output unit 6.

[0065] Three anisotropic magnetoresistive sensors 1 are evenly arranged around the circumference of gear 7, forming a three-point distributed sensing network at a 120° angle. The anisotropic magnetoresistive sensors 1 are made of ferrite or soft iron material and, by rotating synchronously with gear 7, acquire the magnetic sensing signals of the magnetic gear 8 in real time. Preferably, the number of anisotropic magnetoresistive sensors 1 can be 3 or 6. When the number is 6, they can be staggered by half a tooth to improve spatial resolution.

[0066] In one embodiment of the present invention, the sampling frequency of the anisotropic magnetoresistive sensor 1 is set to 10 kHz and the resolution to 16 bits to ensure the capture of subtle features of magnetic field changes. Furthermore, the synchronization error between the sensors is controlled within 1 μs to ensure the time consistency of the three data points.

[0067] Reference Figure 2 The signal processing module 2 is connected to the anisotropic magnetoresistive sensor 1 and is used to perform Gaussian smoothing and autoregressive filtering on the magnetic sensing signal to generate magnetic sensing data. Specifically, the signal processing module 2 includes a signal conditioning circuit 21, an A / D conversion circuit 22, and a data preprocessing unit 23.

[0068] The signal conditioning circuit 21 amplifies and performs primary filtering on the magnetic sensing signal. In this embodiment, a low-noise operational amplifier is used for signal amplification with a gain of 20dB, and a Butterworth low-pass filter with a cutoff frequency of 1kHz is used for primary filtering to effectively suppress high-frequency noise.

[0069] The A / D conversion circuit 22 is connected to the signal conditioning circuit 21 to convert the analog signal into a digital signal. Preferably, the A / D conversion uses a 16-bit successive approximation converter with a conversion rate of 100kSPS (samples per second) to meet the requirements of high-precision data acquisition.

[0070] The data preprocessing unit 23 is connected to the A / D conversion circuit 22 and performs a fusion processing of Gaussian smoothing and autoregressive algorithms to generate magnetic sensing data. The processing procedure of the Gaussian smoothing and autoregressive fusion algorithm is as follows:

[0071] First, setting the window length to n and the filter weighting value to h, the magnetic sensing signal is smoothed. The algorithm for the smoothing formula is as follows:

[0072] ,

[0073] in, Let be the smoothed signal value at time t. The original signal value at time t+i, Here, is the weighting coefficient for the i-th window position, and n is the window length. In this embodiment, the preferred window length is n=11, and the weighting value h is generated using a standard Gaussian function, specifically:

[0074] ,

[0075] Where σ is the standard deviation of the Gaussian function, π is the constant of pi, e is the base of the natural logarithm, and i is the window position index. σ = 1.5 is preferably chosen; this parameter was determined based on experimental testing and achieves a good balance between smoothing noise and preserving effective signal characteristics.

[0076] Next, the processed magnetic sensing signal is subjected to first-order difference processing to obtain the magnetic sensing sequence. The algorithmic expression of the difference formula is as follows:

[0077] ,

[0078] Where ΔY(t) is the difference value at time t. Let be the smoothed signal value at time t. Let t be the smoothed signal value at time t-τ, and τ be the lag time. In this embodiment, the lag time τ is preferably set to 5 times the sampling period, i.e., 0.5 ms. This parameter can effectively capture the dynamic changes of the magnetic signal.

[0079] Finally, the magnetic sensing sequence is filtered to obtain the magnetic sensing data Y(t). In this embodiment, autoregressive filtering is used, and its expression is:

[0080] ,

[0081] in, Here is the magnetic sensing data at time t. Let be the difference value at time ti, and p be the order of the autoregressive model. Let i be the i-th autoregressive coefficient. This represents the residual term at time t. The preferred setting is p=3, and the autoregressive coefficient is... It is estimated using the least squares method. Autoregressive filtering can effectively capture the time correlation of signals and improve the signal-to-noise ratio.

[0082] Reference Figure 3 The topological dynamics model unit 3 is connected to the signal processing module 2 and is used to map magnetic sensing data to a three-dimensional Riemannian manifold, construct a tangent space dynamic representation, and establish a G-VAR model based on the manifold topology. The topological dynamics model unit 3 includes a manifold mapping subunit 31, a topological feature extraction subunit 32, and a G-VAR model construction subunit 33.

[0083] Manifold mapping subunit 31 maps the magnetic sensing data to a three-dimensional Riemannian manifold, constructing a local coordinate system. The signal values ​​from the three magnetoresistive sensors... It can be viewed as a point in three-dimensional Euclidean space, through a nonlinear mapping function. Map it to a Riemannian manifold superior:

[0084] ,

[0085] in, It is a nonlinear mapping function. Representing three-dimensional Euclidean space, Represents Riemannian manifolds. , and Three magnetoresistive sensors are respectively located at The signal value at time 10:00 Let be the point on the manifold after mapping.

[0086] In this embodiment, the mapping function It is implemented using a radial basis function (RBF) network, specifically in the following form:

[0087] ,

[0088] in, This is a three-dimensional magnetic sensing data vector. For the first RBF center point vectors, Representing vectors With the center point Euclidean distance between them For radial basis functions, For the first The weight coefficients of each RBF node, Let be the number of center points of the RBF network. A Gaussian kernel is chosen as the radial basis function, expressed as follows: ,in For distance values, This is the width parameter of the Gaussian kernel. Preferably, it represents the number of RBF center points. The data is selected from historical data using K-means clustering. This mapping method preserves the topological relationships of the original data while capturing nonlinear features.

[0089] Local coordinate systems on a manifold are calculated by computed tangent space at each point. Implementation. For points on the manifold. Its tangent space basis is calculated as follows:

[0090] ,

[0091] in, and Let be the three basis vectors of the tangent space. Represents mapping function For the The gradient of each variable, Gram-Schmidt represents the Gram-Schmidt orthogonalization process used to transform a non-orthogonal set of vectors into an orthogonal basis. This local coordinate system can more accurately describe the local geometric properties of magnetic field changes.

[0092] The topological feature extraction subunit 32 is connected to the manifold mapping subunit 31 and is used to calculate the homology group features of the manifold and extract topological invariants. Topological invariants are important tools for describing the essential properties of a manifold. In this embodiment, the following topological features are mainly calculated:

[0093] Continuous cohomology: Compute the sequence of Betti numbers of the manifold by constructing a Vietoris-Rips complex.

[0094] ,

[0095] in, Indicates the first Betty number, express Homophonic groups, Represents a manifold, For distance parameters, This represents the rank of the homology group. In this embodiment, preferably... The value range is 5% to 30% of the sensor signal fluctuation range, calculated in 10 levels, so as to obtain the complete continuous coherence characteristics.

[0096] Topological entropy: Used to quantify the complexity of a manifold; the formula is:

[0097] ,

[0098] in, Represents topological entropy. Represents a manifold, Represents a length of n - The maximum number of distinguishable orbitals, Represents the natural logarithm. In practical calculations, take... It is 5% of the signal standard deviation, and n is 10% of the number of sampling points.

[0099] These topological features constitute invariants describing the dynamic behavior of the magnetic field, providing robust constraints for the G-VAR model.

[0100] The G-VAR model construction subunit 33 is connected to the topological feature extraction subunit 32 to build a G-VAR model based on topological invariants, thereby achieving multi-scale magnetic field characterization. The G-VAR (Granger Vector Auto-Regression) model is a multivariate time series model that considers causal relationships; its basic form is as follows:

[0101] ,

[0102] in, Let be the magnetic sensing data vector of the three sensors at time t. Let p be the autoregressive coefficient matrix at the i-th lag time step, and p be the model order. Let be the residual vector at time t, which follows a multivariate normal distribution.

[0103] In this invention, the G-VAR model is extended by introducing topological constraints:

[0104] ,

[0105] in, Let be the magnetic sensing data vector at time t. Let be the autoregressive coefficient matrix for the i-th time lag step. Let tj be the latent variable vector extracted from the topological features. Here is the corresponding coefficient matrix, and q is the lag order of the latent variables. Let be the residual vector at time t. Preferably, p=3, q=2, m=5. These parameters are determined through cross-validation, which achieves a good balance between model complexity and prediction accuracy.

[0106] The parameter estimation of the G-VAR model uses maximum likelihood estimation with topological regularization:

[0107] ,

[0108] in, Represents the set of estimated parameters. Represents the set of model parameters. Let be the log-likelihood function. For regularization terms based on topological features, This is the regularization coefficient, which controls the strength of regularization. The preferred value is... The value is 0.1. This estimation method can effectively utilize topological information and improve the robustness and generalization ability of the model.

[0109] Reference Figure 4 The multi-step delay processing unit 4 is connected to the topological dynamics model unit 3 and is used to perform multi-step delay coordinate embedding on the magnetic sensing data, construct the conditional probability measure space, and generate multi-step prediction values. The multi-step delay processing unit 4 includes a delay coordinate embedding subunit 41, a conditional probability field construction subunit 42, and an invariant measure identification subunit 43.

[0110] The delayed coordinate embedding subunit 41 determines the optimal delay time through mutual information analysis and constructs the trajectory matrix. Delayed coordinate embedding is a method for mapping a one-dimensional time series to a high-dimensional phase space, and its basic form is as follows:

[0111] ,

[0112] in, Let be the embedding vector at time t. The data is scalar magnetic sensing data at time t. For tk Scalar magnetic sensing data at time, d is the delay time, d is the embedding dimension, and k is the delay multiple index.

[0113] Optimal delay time Determined by the first local minimum of the mutual information function:

[0114] ,

[0115] in, Indicates the optimal delay time. The independent variable represents the value at which the function reaches its minimum. Let Y(t) be the mutual information function between the time series Y(t) and its delayed version Y(tk), where k represents the number of delayed sampling points.

[0116] The formula for calculating the mutual information function is:

[0117] ,

[0118] in, This represents the mutual information between random variables X and Y. This represents the joint probability distribution of X and Y. and Let X and Y represent the marginal probability distributions, respectively. Let X represent the natural logarithm, and let Y be summed to iterate over all possible values ​​of X and Y.

[0119] In this embodiment, the optimal delay time is determined within the range of 1 to 20 sampling points through grid search. Experiments show that for magnetic encoder signals, the optimal delay time is usually between 7 and 12 sampling points, approximately 0.7-1.2 ms.

[0120] The embedding dimension d is determined using the False Nearest Neighbors method:

[0121] ,

[0122] in, This represents the proportion of false nearest neighbors when the embedding dimension is d, and N represents the total number of data points. It is a step function (1 when the parameter is greater than 0, otherwise 0). This represents the d-dimensional representation of the i-th point. This represents the d+1-dimensional representation of the i-th point. This represents the index of the nearest neighbor of the i-th point in d-dimensional space. Let R represent the Euclidean distance, and R be the threshold. A preferred value for R is 10. When... When the value drops below 0.01, the value of d is considered sufficiently large. In this system, the embedding dimension d is typically between 5 and 8, and experiments show that d=6 can reconstruct the phase space well.

[0123] Based on the optimal delay and embedding dimension, construct the trajectory matrix:

[0124] ,

[0125] in, Represents the trajectory matrix. Indicates the length of the time series. Indicates the first Magnetic sensing data at each time point Indicates the delay time. This indicates the embedding dimension. Each row of the trajectory matrix represents a point in phase space, containing complete information about the system dynamics and providing a foundation for subsequent analysis.

[0126] The conditional probability field construction subunit 42 is connected to the delayed coordinate embedding subunit 41 to calculate the local probability density in the reconstructed phase space and establish the conditional probability mapping. The conditional probability field describes the probability distribution of the system transitioning from the current state to the future state and is key to achieving multi-step prediction.

[0127] First, the local probability density is calculated in the reconstructed phase space. The kernel density estimation (KDE) method is used:

[0128] ,

[0129] in, Point The probability density at that location, Indicates the total number of data points. For kernel function, Indicates the first One observation point. A Gaussian kernel is preferred:

[0130] ,

[0131] in, Represents the kernel function value. Pi is a constant. For the embedding dimension, Represents the bandwidth matrix determinant, Represents an exponential function. Representing vectors transpose, Represents the bandwidth matrix The inverse matrix.

[0132] Bandwidth matrix Determined by Silverman's criterion:

[0133] ,

[0134] in, For bandwidth matrix, For the embedding dimension, For the number of data points, Let be the data covariance matrix. This adaptive bandwidth selection method can automatically adjust the smoothing level according to the data distribution characteristics.

[0135] Next, conditional probability mappings are established. For the current state... The conditional probability distribution after h steps is:

[0136] ,

[0137] in, Indicates the current state After step h, the system status is conditional probability density, Representing state and The joint probability density, Representing state The marginal probability density.

[0138] In practical calculations, the k-nearest neighbor method is used to simplify the calculation:

[0139] ,

[0140] in, This represents the conditional probability density. express In phase space The set of indices of the nearest neighbors This is the Dirac function (1 at zero and 0 elsewhere). Indicates the relationship with the first The nearest neighbor points correspond to Post-step state. Preferably, The value is set to the number of samples. In this system, the usual approach is to take... .

[0141] The invariant measure identification subunit 43 is connected to the conditional probability field construction subunit 42, and is used to identify the invariant measure of the system, extract the attractor structure, and achieve multi-step prediction. An invariant measure is a probabilistic measure describing the long-term behavior of a dynamical system, satisfying:

[0142] ,

[0143] in, Represents a set The measurement value on, For invariant measure, For a measurable set in phase space, Represents the entire phase space. Indicates the current state The next state falls into the set. The conditional probability, Indicates about measure The points.

[0144] In this system, the following iterative method is used to solve for the invariant measure:

[0145] 1. Initialize a uniform distribution ;

[0146] 2. Iterative calculation: ;

[0147] 3. When Stop iteration

[0148] Among them, when Stop iterating during the process. Indicates the first The measure of the next iteration. This represents the distance between two iterative measures. The convergence threshold is preferably set to 0.001. The number of iterations is typically between 50 and 100 to ensure that the measure converges sufficiently.

[0149] Based on invariant measures, the attractor structure of the system is extracted. Attractors are an invariant set in phase space that characterizes the long-term behavior of the system. Attractors are identified using density clustering.

[0150] ,

[0151] in, Denotes an attractor subset. Represents the entire phase space. Represents a point in phase space. For point The probability density at that location, The threshold is preferably set to three times the average density. In this system, typically one to three main attractors can be identified, corresponding to different operating states.

[0152] Multi-step prediction is achieved by projecting an invariant measure onto the prediction space. The expected value of h-step prediction is:

[0153] ,

[0154] in, This represents the predicted value at time t+h. Indicates possible future states, Indicates the current state At that time, the future state is The conditional probability density is obtained by integrating all possible future states.

[0155] In practical calculations, the Monte Carlo method is used:

[0156] ,

[0157] in, This represents the predicted value at time t+h. To obtain from conditional distribution The j-th sample is drawn from the sample, and M is the total number of samples. Preferably, M=1000 to ensure the statistical stability of the prediction.

[0158] Reference Figure 5 The reverse factor inference unit 5 is connected to the multi-step delay processing unit 4 and is used to identify the singular attractor structure through reverse trajectory tracking analysis and calculate the demagnetizing effect signal of the anisotropic magnetoresistive sensor. The reverse factor inference unit 5 includes a state inversion subunit 51, a chaotic characteristic analysis subunit 52, and a remanence separation subunit 53.

[0159] State inversion subunit 51 maps the observed magnetic signals to state points in phase space and calculates the inverse dynamic equations. State inversion is the process of deducing the system's evolution history from observational data. For this system, the observed magnetic signals are first mapped to phase space:

[0160] ,

[0161] in, Let represent the observed state at time t in phase space. This represents the observed magnetic signal at time t. It is a phase space mapping function, implemented based on delayed coordinate embedding.

[0162] The inverse dynamic equation describes the reverse evolution process of the system:

[0163] ,

[0164] in, This represents the system state at time t-1. This represents the system state at time t. This represents the inverse mapping of the system dynamics mapping F.

[0165] Since the dynamic mapping of most nonlinear systems is irreversible, the following approximation method is used:

[0166] ,

[0167] in, This represents the estimated system state at time t-1. The independent variable represents the expression that minimizes the following expression. This represents a candidate state to be optimized. Represents the forward dynamical mapping of the system. This represents the known state at time t. This represents the square of the Euclidean distance. The regularization coefficient is . This is a regularization term. Preferred selection... The value is 0.01. This method can find the most reasonable previous state in the case of multiple solutions.

[0168] By recursively applying the inverse dynamics equations, the historical trajectory of the system can be reconstructed.

[0169] ,

[0170] in, The system state at time tk is represented by , and n represents the inversion time step. In this system, the inversion length n is typically set to 100-500, corresponding to 10-50ms of historical data, which is sufficient to capture the short-term dynamic characteristics of the remanence effect.

[0171] Chaotic characteristic analysis subunit 52 is connected to state inversion subunit 51 and is used to calculate the Lyapunov exponent and fractal dimension to evaluate the dynamic complexity of the system. The Lyapunov exponent quantifies the divergence rate of adjacent orbits and is an important indicator for determining whether a system exhibits chaotic characteristics.

[0172] ,

[0173] in, This represents the Lyapunov exponent in the i-th direction. To indicate the limit, Represents the natural logarithm. Let represent the magnitude of the small perturbation in the i-th orthogonal direction after time t. This indicates the initial disturbance magnitude.

[0174] In actual calculations, the Wolf algorithm is used:

[0175] 1. Select the initial point and nearby disturbance points ;

[0176] 2. Simultaneously evolve the trajectories of two points to time. Calculate the new distance ;

[0177] 3. When the distance exceeds the threshold At that time, while maintaining the direction, a new distance is selected. New disturbance points;

[0178] 4. Repeat steps 2-3 until the entire time series has been traversed.

[0179] in, Indicates the initial reference point. This represents the initial perturbation vector. Indicates time The amplitude of the subsequent disturbance Indicates the maximum permissible disturbance amplitude. This indicates the magnitude of the perturbation after rescaling.

[0180] Maximum Lyapunov index Characterizing the degree of chaos in a system, typically, This indicates that the system exhibits chaotic characteristics. In this system, the magnetic encoder typically displays weak chaotic characteristics when residual magnetism is present. Between 0.01 and 0.1.

[0181] Fractal dimension characterizes the geometric complexity of attractors in phase space, and is calculated using the relevant dimension:

[0182] ,

[0183] in, Indicates the relevant dimension. To indicate a limit, Represents the natural logarithm. Indicates the distance threshold. The relevant integral is calculated using the following formula:

[0184] .

[0185] in, Indicates the relevant integral, Indicates the total number of data points. For step function, Point and points The Euclidean distance between them.

[0186] In actual calculations, fitting is done on a log-log graph. and The linear relationship yields the fractal dimension. For magnetic encoder systems, the fractal dimension is typically between 1.5 and 2.5, indicating that the system has a moderately complex attractor structure.

[0187] The remanence separation subunit 53 is connected to the chaotic characteristic analysis subunit 52, and is used to identify the branch manifold of the system, separate the demagnetization effect component, and construct a causal network between the remanence effect and external factors. Remanence separation is one of the core innovations of this system, based on the following assumption: the observed magnetic signal Y(t) can be decomposed into an ideal signal component and a remanence effect component:

[0188] ,

[0189] in, This indicates the observed magnetic signal. The ideal signal when there is no residual magnetism. The deviation is caused by the residual magnetism effect.

[0190] Branch manifold identification involves identifying manifold structures in phase space that separate different dynamic behaviors. Manifold learning methods, such as Isomap or Locally Linear Embedding (LLE), are used to project the high-dimensional phase space into a low-dimensional representation.

[0191] ,

[0192] in, This represents a point in a low-dimensional representation space. Represents a point in a higher-dimensional phase space. This is the learning mapping function for the manifold.

[0193] In the low-dimensional representation, different branches are identified using density clustering methods:

[0194] ,

[0195] in, Denotes the set of the i-th branch. This represents a point in a low-dimensional representation space. Represents d-dimensional Euclidean space. For point The probability density at that location, Density threshold For point Clustering labels, This represents a logical AND operation. In this system, 2 to 4 main branches can typically be identified, corresponding to different remanence states.

[0196] The extraction of the remanence effect component is based on the difference in branched manifolds. For each state point... First, determine the branch it belongs to. Then calculate its deviation from the ideal trajectory:

[0197] ,

[0198] in, This represents the remanence component at time t. This represents the observed magnetic signal at time t. Represents a given state Belongs to reference branch Conditional expectation of the time-magnetic signal, This represents the reference branch, which is usually selected from the operating state with the minimum residual magnetism.

[0199] The causal network between remanence and external factors was constructed using Granger causality analysis:

[0200] ,

[0201] in, This represents the remanence component at time t. Represents the autoregressive coefficient matrix. The remanent magnetization component at time ti is represented by p, which represents the autoregressive order. Represents the external factor coefficient matrix. Let represent the external factor vector at time tj, and q represent the lag order of the external factors. This represents the residual term at time t.

[0202] The significance of each factor was assessed using the F-test:

[0203] ,

[0204] Where F represents the F-statistic, This represents the sum of squared residuals of the constrained model. Let represent the sum of squared residuals of the unrestricted model, q represent the number of restricted parameters, N represent the sample size, and p represent the autoregression order. Preferably, the significance level is set to 0.01 to ensure that the identified causal relationship is statistically significant.

[0205] In this embodiment, temperature change was identified as the main external factor affecting the remanence effect, with its F-statistic typically between 10 and 20, far exceeding the critical value of 4.61 (p=0.01). This provides a theoretical basis for targeted compensation.

[0206] Reference Figure 6The compensation output unit 6 is connected to the reverse factor inference unit 5 and is used to generate compensation data based on the demagnetization effect signal to correct the pulse signal of the magnetic encoder. The compensation output unit 6 includes a compensation calculation subunit 61, an output adjustment subunit 62, and a feedback optimization subunit 63.

[0207] The compensation calculation subunit 61 is used to generate compensation data based on the demagnetizing effect signal. The calculation of the compensation data is based on the reverse cancellation of the demagnetizing effect signal:

[0208] ,

[0209] in, This represents the compensation data at time t. For compensation coefficient, This represents the remanence component at time t. The modulation function considers temperature T and angular velocity. The influence of the external magnetic field H. Preferably, The value is 0.8-1.2, determined experimentally.

[0210] The formula for calculating the modulation function is:

[0211] ,

[0212] in, Indicates the modulation function value. Indicates the current temperature. Indicates reference temperature. Indicates the current angular velocity. Indicates the reference angular velocity. Indicates the current external magnetic field strength. Indicates the reference magnetic field strength. , and These represent the sensitivity coefficients for temperature, angular velocity, and magnetic field strength, respectively. In this system, a typical value is taken as... , , This adaptive compensation method can adapt to changes in remanent magnetization under different operating conditions.

[0213] The output adjustment subunit 62 is connected to the compensation calculation subunit 61 and is used to apply the compensation data to the original magnetic encoder signal. The output signal of the magnetic encoder is typically a pulse sequence representing the angle increment. The compensated output is calculated as follows:

[0214] ,

[0215] in, This represents the number of compensated output pulses at time t. This represents the original pulse output at time t. This represents the compensation increment at time t.

[0216] The compensation increment is transformed through the following relationship:

[0217] ,

[0218] in, express The incremental compensation at any given time Represents the floor function. This is a proportionality coefficient, representing the relationship between the angle and the number of pulses. express arrive The integral of the compensation data within the time period, For the integration period, For integration variables. Preferred settings. By using integration, the impact of instantaneous noise is reduced, and the stability of the compensation is improved.

[0219] Feedback optimization subunit 63 is connected to output adjustment subunit 62 to monitor the compensation effect and dynamically adjust the compensation parameters. Feedback optimization is based on the following performance metrics:

[0220] Angular error: ,in Indicates angular error, This indicates the number of output pulses after compensation. Indicates the number of pulses for the reference angle. Table norm.

[0221] Stability metrics: ,in Indicators of stability Represents the standard deviation function. This indicates the number of output pulses after compensation. This indicates the original pulse output.

[0222] Response time: ,in Indicates response time. This indicates that the compensation response has been achieved. At that moment, This indicates that the compensation response has been achieved. At that moment.

[0223] Based on these indicators, the compensation parameters are adjusted dynamically:

[0224] ,

[0225] in, This represents the updated compensation coefficient. Indicates the current compensation coefficient. For learning rate, Represents performance function about The gradient. Preferably selected. Value .

[0226] The formula for calculating the comprehensive performance function is:

[0227] ,

[0228] in, Represents the overall performance function. Indicates angular error. Indicates stability index, Indicates response time. , and This is the weighting coefficient. In scenarios prioritizing accuracy, the preferred value is [value to be filled in]. , , In a stability-first scenario, the preferred value is .

[0229] Through this closed-loop optimization mechanism, the system can adaptively adjust the compensation strategy to maintain a stable compensation effect over the long term. In experimental tests, the optimized system can reduce the angle error from the original 0.1° to below 0.01°, while maintaining good stability and dynamic response characteristics.

[0230] In this embodiment, the ARM processor 7 is used to execute the core algorithms of the topological dynamics model unit 3, the multi-step delay processing unit 4, and the reverse factor inference unit 5. Preferably, the ARM processor adopts the Cortex-A53 architecture, with a main frequency of 1.5 GHz and 2 GB of memory, to meet the real-time processing requirements of complex algorithms.

[0231] FPGA unit 8 is connected to ARM processor 7 via a RapidIO interface for signal preprocessing and parallel data processing. Preferably, the FPGA is a Xilinx Zynq-7000 series, containing 150K logic cells and 600 DSP slices, capable of efficiently performing preprocessing operations such as signal filtering and FFT transformation. The RapidIO interface has a data transfer rate of 5Gbps, ensuring high-speed data exchange between the ARM and FPGA.

[0232] Data acquisition card 9 is connected to FPGA unit 8 and is used to acquire signals from the anisotropic magnetoresistive sensor and transmit them to FPGA unit 8. The data acquisition card uses a 16-bit high-precision ADC with a sampling rate of up to 1MSPS and a dynamic range of 80dB, meeting the requirements for high-precision signal acquisition.

[0233] The parameter adaptation unit 10 is used to dynamically adjust the model parameters according to changes in operating conditions. Parameter adaptation is based on an online learning mechanism and uses stochastic gradient descent to optimize the model parameters.

[0234] ,

[0235] in, This represents the updated set of model parameters. Represents the current set of model parameters. For learning rate, The loss function L represents the parameters. At data points The gradient at that point. Preferred selection. The value is 0.01, and the loss function uses mean squared error. This online learning method can adapt to system changes in real time without requiring a complete retraining of the model.

[0236] The anomaly detection unit 11 is used to identify abnormal changes in sensor data and model parameters. Anomaly detection is based on the following rules:

[0237] Data range detection: ,in This represents the absolute value of the deviation between the current data and the historical average. For threshold coefficient, The standard deviation of historical data. Preferred selection. The value is 3.

[0238] Rate of change detection: ,in This represents the absolute value of the change in data between adjacent time points. This represents the maximum permissible rate of change.

[0239] Model residual detection: ,in This represents the absolute value of the current residual. For threshold coefficient, This represents the standard deviation of the residuals. The preferred value is... The value is 4.

[0240] When any detection condition is met, an anomaly flag is triggered, and an anomaly response process is initiated.

[0241] The anomaly response unit 12 is connected to the anomaly detection unit 11 and is used to trigger a degradation operation strategy when an anomaly is detected. The degradation operation includes the following strategies:

[0242] Data repair: Perform median filtering or interpolation to repair abnormal data points;

[0243] Model rollback: Temporarily disable complex model components and revert to the simplified version;

[0244] Parameter freeze: Pause adaptive parameter updates and use the most recent stable parameters;

[0245] Warning output: Sends an abnormal warning signal to the upper-level system;

[0246] Through these strategies, the system can maintain basic functionality even under abnormal conditions, avoiding complete failure. In experimental testing, even with 30% of the sensor data being disturbed, the system still maintained an angular accuracy of 0.05°, demonstrating good robustness.

[0247] Reference Figure 7 The present invention also provides a causal inference compensation method for the residual magnetism effect of a magnetic encoder, comprising the following steps:

[0248] Step S1: Arrange three anisotropic magnetoresistive sensors evenly along the circumference of the gear to collect the magnetic sensing signal of the magnetic gear.

[0249] As mentioned earlier, the three sensors are evenly distributed at a 120° angle along the circumference, forming a three-point distributed sensing network to collect the magnetic sensing signals of the magnetic gear in real time.

[0250] Step S2: Perform Gaussian smoothing and autoregressive filtering on the magnetic sensing signal to generate magnetic sensing data.

[0251] This step effectively filters out random noise in the sensor signal by fusing Gaussian smoothing and autoregressive algorithms, while preserving key features of magnetic field changes. The specific processing procedure is as described in Example 1.

[0252] Step S3: Map the magnetic sensing data to a three-dimensional Riemannian manifold, construct a tangent space dynamics representation, and establish a G-VAR model based on the manifold topology.

[0253] This step is one of the core innovations of this method. By mapping magnetic sensing data to a three-dimensional Riemannian manifold with a specific geometry, the nonlinear characteristics of magnetic field changes can be captured more accurately. A tangent space dynamic representation is constructed on the manifold, topological invariants are extracted, and a G-VAR model is established, laying the foundation for subsequent analysis.

[0254] Step S4: Perform multi-step delayed coordinate embedding on the magnetic sensing data to construct a conditional probability measure space and generate multi-step prediction values.

[0255] This step involves embedding magnetic sensing data into a high-dimensional phase space to construct a conditional probability field describing the system's dynamics, enabling multi-step predictions of future states. By identifying the system's invariant measures and attractor structure, the system's long-term steady-state characteristics can be captured.

[0256] Step S5: Identify the singular attractor structure through reverse trajectory tracking analysis and calculate the demagnetizing effect signal of the anisotropic magnetoresistive sensor.

[0257] This step, based on chaos theory, separates the remanent magnetization component from the total magnetic field variation through reverse trajectory tracing and strange attractor analysis. This physical mechanism-based separation method is more accurate in identifying the remanent magnetization effect than traditional signal processing methods.

[0258] Step S6: Generate compensation data based on the demagnetization effect signal to correct the pulse signal of the magnetic encoder.

[0259] This step converts the identified demagnetization effect signal into compensation data, which is then applied to the original magnetic encoder signal to achieve precise compensation. Through a feedback optimization mechanism, the system can dynamically adjust the compensation parameters to maintain a long-term stable compensation effect.

[0260] The method steps in this embodiment correspond one-to-one with the system modules, and the specific implementation of each step can be found in the relevant description of the system.

[0261] Through the detailed description of the above embodiments, those skilled in the art can clearly understand the implementation of the present invention. The scope of protection of the present invention includes, but is not limited to, the above embodiments, and the scope of protection of the present invention is defined by the claims. Those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope thereof, and all such modifications and variations fall within the scope of protection of the present invention.

Claims

1. A causal inference compensation system for the residual magnetism effect of a magnetic encoder, characterized in that, include: Three anisotropic magnetoresistive sensors are evenly arranged along the circumference of the gear to collect the magnetic sensing signals of the magnetic gear. The signal processing module is connected to the anisotropic magnetoresistive sensor and is used to perform Gaussian smoothing and autoregressive filtering on the magnetic sensing signal to generate magnetic sensing data. The topological dynamics model unit, connected to the signal processing module, is used to map the magnetic sensing data to a three-dimensional Riemannian manifold, construct a tangent space dynamics representation, and establish a G-VAR model based on the manifold topology. A multi-step delay processing unit, connected to the topological dynamics model unit, is used to perform multi-step delay coordinate embedding on the magnetic sensing data, construct a conditional probability measure space, and generate multi-step prediction values. The reverse factor reasoning unit, connected to the multi-step delay processing unit, is used to identify the singular attractor structure through reverse trajectory tracking analysis and to calculate the demagnetizing effect signal of the anisotropic magnetoresistive sensor. The compensation output unit, connected to the reverse factor inference unit, is used to generate compensation data based on the demagnetization effect signal to correct the pulse signal of the magnetic encoder. The topological dynamics model unit includes: The manifold mapping subunit is used to map the magnetic sensing data onto a three-dimensional Riemannian manifold to construct a local coordinate system; The topological feature extraction subunit, connected to the manifold mapping subunit, is used to calculate the homology group features of the manifold and extract topological invariants. The G-VAR model construction subunit is connected to the topological feature extraction subunit and is used to build a G-VAR model based on the topological invariants to achieve multi-scale magnetic field characterization. The multi-step delay processing unit includes: The delay coordinate embedding sub-unit is used to determine the optimal delay time through mutual information analysis and construct the trajectory matrix; A conditional probability field construction subunit is connected to the delayed coordinate embedding subunit and is used to calculate the local probability density in the reconstructed phase space and establish a conditional probability mapping. An invariant measure identification subunit, connected to the conditional probability field construction subunit, is used to identify the invariant measure of the system, extract the attractor structure, and achieve multi-step prediction. The reverse factor inference unit includes: The state inversion subunit is used to map the observed magnetic signal to the state point in phase space and calculate the inverse dynamic equation; The chaos characteristic analysis subunit, connected to the state inversion subunit, is used to calculate the Lyapunov exponent and fractal dimension, and to evaluate the dynamic complexity of the system. The remanence separation subunit, connected to the chaotic characteristic analysis subunit, is used to identify the branch manifold of the system, separate the demagnetization effect component, and construct a causal network between the remanence effect and external factors.

2. The causal inference compensation system for the residual magnetism effect of a magnetic encoder according to claim 1, characterized in that, The signal processing module includes: The signal conditioning circuit is used to amplify and perform primary filtering on the magnetic sensing signal; An A / D conversion circuit, connected to the signal conditioning circuit, is used to convert analog signals into digital signals; The data preprocessing unit, connected to the A / D conversion circuit, is used to perform a fusion processing of Gaussian smoothing algorithm and autoregressive algorithm to generate the magnetic sensing data.

3. The causal inference compensation system for the residual magnetism effect of a magnetic encoder according to claim 1, characterized in that, The compensation output unit includes: A compensation calculation subunit is used to generate compensation data based on the demagnetization effect signal; An output adjustment subunit, connected to the compensation calculation subunit, is used to apply the compensation data to the original magnetic encoder signal; The feedback optimization subunit is connected to the output adjustment subunit and is used to monitor the compensation effect and dynamically adjust the compensation parameters.

4. The causal inference compensation system for the residual magnetism effect of a magnetic encoder according to claim 1, characterized in that, Also includes: The ARM processor is used to execute the core algorithms of the topology dynamics model unit, the multi-step delay processing unit, and the reverse factor inference unit; The FPGA unit, connected to the ARM processor via the RapidIO interface, is used to implement signal preprocessing and parallel data processing; A data acquisition card, connected to the FPGA unit, is used to acquire signals from the anisotropic magnetoresistive sensor and transmit them to the FPGA unit.

5. The causal inference compensation system for the residual magnetism effect of a magnetic encoder according to claim 1, characterized in that, Also includes: The parameter adaptive unit is used to dynamically adjust the model parameters according to changes in working conditions; Anomaly detection unit is used to identify abnormal changes in sensor data and model parameters; An anomaly response unit, connected to the anomaly detection unit, is used to trigger a degradation operation strategy when an anomaly is detected.

6. The causal inference compensation system for the residual magnetism effect of a magnetic encoder according to claim 1, characterized in that, The three anisotropic magnetoresistive sensors are evenly distributed at a 120° angle in the circumferential direction of the gear, forming a three-point distributed sensing network. The anisotropic magnetoresistive sensors are made of ferrite or soft iron materials, and the angle encoding information is assigned to the following anisotropic magnetoresistive sensors through the synchronous rotational motion of the magnetic pole pitch.

7. A causal inference compensation method for the residual magnetism effect of a magnetic encoder, employing the causal inference compensation system for the residual magnetism effect of a magnetic encoder as described in any one of claims 1-6, characterized in that, Includes the following steps: Three anisotropic magnetoresistive sensors are evenly arranged along the circumference of the gear to collect the magnetic sensing signals of the magnetic gear. The magnetic sensing signal is subjected to Gaussian smoothing and autoregressive filtering to generate magnetic sensing data; The magnetic sensing data is mapped to a three-dimensional Riemannian manifold to construct a tangent space dynamics representation and establish a G-VAR model based on the manifold topology. Multi-step delayed coordinate embedding is performed on the magnetic sensing data to construct a conditional probability measure space and generate multi-step prediction values; The structure of the singular attractor is identified by reverse trajectory tracing analysis, and the demagnetization effect signal of the anisotropic magnetoresistive sensor is calculated. Compensation data is generated based on the demagnetization effect signal to correct the pulse signal of the magnetic encoder.

Citation Information

Patent Citations

  • Performance detection method and device for coded disc of magnetic encoder, equipment and medium

    CN115388925A

  • Gyroscope-based brushless motor attitude detection and balance control method and system

    CN120110250A