Method and system for accurately matching data of SMR chip and non-magnetic coded disc of encoder

By setting a calibration mark area and performing triple calibration in the SMR encoder, the problems of angle misalignment and signal mismatch during the assembly process of the SMR encoder are solved, achieving high precision and long lifespan self-calibration capability, suitable for demanding industrial applications.

CN121954084APending Publication Date: 2026-05-01NANJING XINYUE ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING XINYUE ELECTRONIC TECH CO LTD
Filing Date
2026-02-04
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing SMR encoders have slight angular misalignment or radial eccentricity during assembly, which causes phase deviation of the A/B phase quadrature signals and signal amplitude mismatch. They lack an effective online calibration mechanism and cannot dynamically compensate for long-term drift caused by temperature changes or mechanical wear, affecting high-precision and long-life applications.

Method used

A system for precise data matching between an encoder's SMR chip and a non-magnetic code disk is provided. By setting a calibration mark area on the non-magnetic code disk, the system automatically acquires bias, gain, and phase compensation parameters using a signal processing module to achieve triple calibration. The system integrates a programmable gain amplifier and a phase compensation register, and supports online self-calibration.

Benefits of technology

It significantly improves position repeatability, supports power-on self-calibration or periodic online calibration, reduces system costs, and is suitable for demanding scenarios such as robot joints and servo motors, improving the system's anti-interference capability and positioning accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121954084A_ABST
    Figure CN121954084A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of sensors and precision measurement, and discloses an accurate matching method and system for data of an SMR chip of an encoder and a non-magnetic coded disc, and the method and system are characterized in that a special magnetic calibration pattern is integrated on a non-magnetic coded disc body, and the pattern is automatically driven to pass through the SMR sensing chip when the system is powered on, so that the non-magnetic coded disc is accurately matched with the SMR sensing chip. Bias, gain and phase error parameters are synchronously collected and calculated at a time, and the parameters are directly written into a programmable gain amplifier and a phase compensation register in the SMR sensing chip, so that front-end hardware-level real-time compensation carried out from a signal source is realized, and a closed-loop self-calibration system without external calibration is formed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sensor and precision measurement technology, specifically to a method and system for precise matching of data between an encoder's SMR chip and a non-magnetic code disk. Background Technology

[0002] In the fields of modern industrial automation and precision motion control, position detection devices serve as core feedback components, and their accuracy and reliability directly determine the overall performance of the system. Encoders, as mainstream position sensing devices, are mainly divided into two categories: optical and magnetic. Among them, magnetic encoders are widely used in demanding scenarios such as robots, CNC machine tools, and servo motors due to their advantages such as resistance to contamination and oil, compact structure, and suitability for harsh working conditions.

[0003] Among them, magnetic encoders based on the spin semiconductor magnetoresistance (SMR) effect have become an important development direction in high-resolution position detection technology in recent years due to their high sensitivity, low power consumption, and ease of miniaturization and integration. These encoders typically employ a non-magnetic code disk structure, meaning the code disk itself does not contain permanent magnets. Instead, they modulate an external bias magnetic field through a pattern of magnetically conductive and non-magnetically conductive regions. The SMR chip senses the changes in the magnetic field and outputs orthogonal signals to achieve position decoding.

[0004] Existing technologies still face multiple systemic challenges in the practical deployment of SMR encoders: First, during the assembly process, slight angular misalignment or radial eccentricity inevitably exists between the SMR chip and the non-magnetic code disk, causing the phase of the A / B phase quadrature signal to deviate from the ideal 90°, introducing a fixed decoding offset and severely impairing repeatability accuracy. Second, due to fluctuations in SMR thin film processing, multiple sensing units within the same chip exhibit sensitivity differences and background bias drift, resulting in differential signal amplitude mismatch, reducing the signal-to-noise ratio, and potentially inducing bit errors. Third, traditional solutions lack effective online calibration mechanisms, relying on external calibration equipment for offline parameter adjustments, which cannot dynamically compensate for long-term drift caused by temperature changes or mechanical wear. Finally, the non-magnetic code disk, due to its weak signal strength and blurred edge response, places higher demands on the linearity and noise suppression capabilities of the SMR chip, while existing digital post-processing methods (such as interpolation or filtering) can only improve apparent resolution and cannot fundamentally solve the physical layer signal mismatch problem. The aforementioned defects collectively restrict the widespread adoption of SMR encoders in high-precision, long-life, and maintenance-free applications. There is an urgent need for a precise matching technology solution that can achieve triple self-calibration of bias, gain, and phase, and deeply coordinate with the non-magnetic code disk structure. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and system for accurate matching of SMR chip and non-magnetic code disk data of encoder.

[0006] To achieve the above objectives, this invention provides a system for precise matching of SMR chip and non-magnetic code disk data of an encoder. This system comprises the following components: a non-magnetic code disk with a main code track area and a calibration mark area on its surface, the calibration mark area containing a magnetically conductive calibration pattern with a known phase; an SMR sensing chip integrating at least two differential SMR sensing units and a multi-channel signal conditioning circuit; and a signal processing module for executing an initialization calibration process and a normal operation decoding process. During the initialization phase, the signal processing module automatically acquires bias, gain, and phase compensation parameters through the calibration mark area, and performs triple calibration on the main code track signal during normal operation.

[0007] On the other hand, a method for accurately matching SMR chip data of an encoder with data from a non-magnetic code disk includes the following steps:

[0008] Step S110: Control the movement of the non-magnetic code disk so that the calibration mark area passes through the sensing area of ​​the SMR sensor chip.

[0009] Step S120: Collect the background bias value of each SMR sensing channel in the blank segment of the calibration mark area;

[0010] Step S130: Acquire the response amplitude of each channel at the feature points of the calibration pattern;

[0011] Step S140: Based on the background bias value and response amplitude, calculate the bias compensation amount, gain equalization coefficient and phase offset.

[0012] Step S150: Write the compensation parameters into the programmable gain amplifier and phase compensation register of the SMR sensor chip.

[0013] Step S160: Switch to main code channel decoding mode and apply compensation parameters to output position data in real time;

[0014] Preferably, the substrate of the non-magnetic code disk is made of non-magnetic material, and the magnetic pattern is made of permalloy, iron-cobalt alloy, nanocrystalline soft magnetic material or stainless steel. The calibration mark area is located on the inner or outer ring of the main code track area, and its magnetic calibration pattern is a single-cycle sine, square wave or triangular waveform. The theoretical phase is pre-stored in the signal processing module and used as a reference for phase calibration.

[0015] Furthermore, the SMR sensor chip integrates two orthogonally arranged SMR bridge arms using CMOS-compatible technology, with a predetermined spacing of 0.25-0.35 mm and a distance of 0.1-0.3 mm from the code disk surface. The chip integrates a multi-bit analog-to-digital converter, a programmable gain amplifier, and an SPI communication interface. The programmable gain amplifier has a gain adjustment range of 1 to 16 times, in 0.0625-fold steps, and supports independent dynamic configuration of the gain for different channels.

[0016] In addition, the signal processing module is an embedded ARM Cortex-M4 microcontroller running calibration firmware. During the calibration process, it controls the motor to rotate at a low speed. When the signal amplitude detected from the calibration mark area exceeds the preset threshold calculated by the noise standard deviation, it locks the current position as the calibration start point and continuously collects multiple samples in the blank segment 5±1mm in front of the calibration mark area. It calculates the average background bias value of each channel, sets the reference voltage V_ref, and generates the bias compensation amount ΔV for each channel.

[0017] Preferably, in step S130, the feature points of the calibration pattern include peaks, valleys, or zero-crossing points, and the signal processing module synchronously acquires the response amplitudes A of channels A and B at the peaks. a With Aᵦ, the channel with the larger amplitude is used as the reference channel. The gain equalization coefficient K = A_ref / A_target is calculated, where A_ref and A_target are the AC component amplitudes measured at the peak of the calibration pattern for the reference channel and the target channel, respectively, which are the absolute values ​​of the peak voltages after deducting the background bias. When the amplitude difference between the two channels is less than 2%, the A-phase signal channel is used as the default reference channel, and the gain of the programmable gain amplifier of the target channel is adjusted accordingly to make the output amplitudes of the two channels consistent.

[0018] Furthermore, in step S140, the phase offset is determined by detecting the zero-crossing time difference of the A / B phase signals. The signal processing module records the time when the two channels cross the zero point from negative to positive and calculates the deviation Δφ between the measured phase difference and the theoretical orthogonal phase. This deviation value is used for the phase compensation term in the subsequent arctangent decoding algorithm to eliminate the fixed decoding offset caused by assembly misalignment.

[0019] In addition, in step S150, all compensation parameters, including bias compensation, gain equalization coefficient and phase offset, are written into the non-volatile register inside the SMR sensor chip or the external Flash memory. The system automatically loads the parameters each time it is powered on or periodically triggered for calibration, so as to achieve closed-loop self-calibration without external calibration equipment.

[0020] Preferably, the system supports two working modes: rotary encoder and linear encoder. In rotary mode, the calibration mark area is arc-shaped with a predetermined length, and the corresponding angular resolution is better than a preset angular threshold. In linear mode, the calibration mark area is located at the start of the stroke, has a predetermined length, and can achieve a preset positioning accuracy.

[0021] Furthermore, the triple correction mechanism continues to operate during normal operation. The signal processing module first performs offset compensation on the original A / B phase signal output from the main code channel area, then performs gain equalization processing, and finally introduces phase offset compensation before arccut decoding, thereby outputting position data with high linearity and high repeatability.

[0022] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0023] Through a triple correction mechanism of bias, gain and phase, the position repeatability accuracy is significantly improved. In rotary encoders, the preset angle accuracy can be achieved, and in linear encoders, the preset displacement accuracy can be achieved. The standard deviation of position jitter is lower than the preset threshold, which is many times better than the uncalibrated system.

[0024] It supports power-on self-calibration or periodic online calibration, without the need for external calibration equipment. Closed-loop calibration can be completed using only the structure of the encoder itself, effectively adapting to long-term environmental changes such as temperature drift and mechanical aging.

[0025] The calibration marking area is integrated into the non-magnetic code disk body, eliminating the need for additional sensors or complex optical alignment devices, reducing system cost and assembly complexity, and making it suitable for high-volume industrial deployment.

[0026] The system architecture is compatible with both incremental and absolute encoding formats, and the signal processing logic can be embedded in a single-chip SoC solution, which facilitates miniaturization and low-power design, expanding the application boundaries of SMR encoders in high-requirement scenarios such as robot joints, servo motors, and precision guide rails. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of the steps of the present invention. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this invention clearer and more complete, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention in any way.

[0029] Example 1

[0030] In high-precision closed-loop control scenarios for industrial servo motors, the encoder, as a core feedback element, directly determines the dynamic response performance and positioning accuracy of the servo system through the stability and repeatability of its output signal. While traditional magnetic encoders based on the spin magnetoresistive (SMR) effect offer advantages such as resistance to contamination and oil, micrometer-level radial eccentricity or angular misalignment inevitably exists between the SMR sensing chip and the non-magnetic code disk during actual assembly. This causes the phase of the A / B phase quadrature signals to deviate from the ideal 90-degree angle. Simultaneously, due to fluctuations in CMOS process technology, the two differential SMR sensing units integrated within the same chip exhibit sensitivity differences and baseline bias drift, resulting in signal amplitude mismatch. Furthermore, the system is affected by temperature changes and mechanical wear during long-term operation, causing continuous drift in signal characteristics. Existing solutions lack effective online calibration mechanisms, severely limiting their application in demanding scenarios such as robot joints and CNC spindles. To address the aforementioned issues, this embodiment provides a rotary SMR encoder system integrated within a servo motor. By setting a dedicated calibration mark area on the non-magnetic code disk and combining it with an embedded signal processing module to perform a triple calibration process, precise matching of bias, gain, and phase is achieved.

[0031] The system comprises three main parts: a non-magnetic code disk, an SMR sensor chip, and a signal processing module. The non-magnetic code disk uses a non-magnetic aluminum alloy substrate, on which a 200-nanometer-thick permalloy magnetic thin film is deposited using magnetron sputtering, and periodic magnetic patterns are formed using photolithography and ion etching techniques. The outer ring of the code disk is the main code track area, with its magnetic stripes distributed in an orthogonal sinusoidal pattern, used to generate A / B phase position signals. Inside the main code track area, there is a 10-millimeter-long calibration mark area containing a single-cycle sinusoidal magnetic pattern, whose theoretical phase is preset to 0 degrees, serving as a reference for phase calibration. A 5-millimeter blank section is reserved at the front end of the calibration mark area; this area contains no magnetic pattern, only the exposed non-magnetic substrate, used to acquire background noise and bias signals.

[0032] The SMR sensor chip internally incorporates two orthogonally arranged SMR Wheatstone bridge structures, corresponding to the A-phase and B-phase signal channels respectively. Each bridge consists of four SMR resistors with their sensing axes perpendicular to each other and a precise spacing of 0.3 mm to match the spatial frequency of the main code channel. The SMR sensor chip also integrates a phase compensation register to store the calculated phase offset Δφ. During decoding, the signal processing module reads the Δφ value from this register and applies it to the phase compensation term calculation of the arctangent decoding algorithm. After chip packaging, the vertical distance between its sensing surface and the surface of the non-magnetic code disk is set to 0.2 mm to ensure maximum magnetic field modulation depth within the effective working air gap. The chip integrates a 12-bit successive approximation analog-to-digital converter (ADC) with a sampling rate of 1 MHz and a quantization step size of 1.22 mV. Simultaneously, each channel is followed by an 8-bit programmable gain amplifier (PGA) with a gain adjustment range of 1 to 16 times and a step accuracy of 0.0625 times, supporting independent dynamic configuration of the gain for different channels. In addition, the chip has a built-in SPI master-slave controller that supports a communication rate of up to 10 MHz, which is used to exchange data and configuration parameters with external signal processing modules.

[0033] The signal processing module incorporates a hardware floating-point unit (FPU) and a digital signal processing (DSP) instruction set for efficient execution of calibration algorithms and real-time decoding tasks. The microcontroller integrates 256 kilobytes of flash memory for storing calibration firmware and compensation parameters, and 64 kilobytes of SRAM for caching sampled data and intermediate calculation results. In calibration mode, the microcontroller outputs a PWM signal via GPIO pins to control the servo motor driver, causing the motor to rotate at a constant low speed of 10 revolutions per minute. This ensures the calibration mark area slowly passes through the SMR sensor chip's sensing area, preventing signal distortion or missed sampling due to excessively rapid movement.

[0034] The calibration process begins during the system power-on initialization phase. The microcontroller first configures the SMR sensor chip to enter continuous sampling mode, simultaneously acquiring the raw voltage signals of channels A and B at a sampling rate of 100 kHz. When a sudden increase in the amplitude of either channel signal exceeding three times the noise standard deviation (σ) is detected, it is determined that the calibration marking area has entered the sensing region, and the current motor position is immediately locked as the calibration starting point P0. Within a 5 mm blank segment preceding point P0, the system continuously acquires 100 sample points, processing the A channel sample sequence {V a1 V a2 , ..., V a100 The arithmetic mean is used to obtain the background bias value V. 0a =1.230 volts, for the B channel sample sequence {Vᵦ1, Vᵦ2, ..., Vᵦ 100The average value is V0ᵦ = 1.280 volts. The system preset reference voltage V_ref = 1.250 volts, then the bias compensation amount ΔV for channel A is... a = V_ref - V 0a = -0.020 volts, the bias compensation for channel B is ΔVᵦ = V_ref - V0ᵦ = +0.030 volts. This compensation will be used for DC offset elimination in the subsequent signal conditioning stage.

[0035] Subsequently, the system continues to monitor the peak feature points of the calibration pattern, including but not limited to peak points, valley points, and zero-crossing points. When the signal in channel A reaches a local maximum and its first derivative changes from positive to negative, it is determined to be a peak point, and at this moment, the instantaneous amplitudes of channels A and B are simultaneously latched, and the amplitude of channel A is measured. a =0.850V, Aᵦ=0.760V. The system compares the amplitudes of the two channels and selects channel A, which has the larger amplitude, as the reference channel, with a target amplitude A_ref=0.850V. Channel B is the target channel, with a current amplitude A_target=0.760V. The gain equalization coefficient formula is as defined in the claim: The system calculations show that the gain of the programmable gain amplifier in channel B needs to be increased by 11.84%. Since the gain of the programmable gain amplifier is configured in the form of digital codewords, the relationship between its gain G and codeword D is G = 1 + D × 0.0625. The original gain is set to 1 (D = 0), then the new codeword D_new = (K - 1) / 0.0625 ≈ 1.894. Rounding to 2, the corresponding actual gain is 1.125 times, with an error of less than 0.6%, which is within the allowable range for engineering.

[0036] After completing bias and gain calibration, the system enters the phase calibration stage. The microcontroller performs zero-crossing detection on the A / B phase signals after bias compensation and gain equalization. Specifically, the system records the time t when the A channel signal crosses zero from the negative half-cycle into the positive half-cycle. a And the corresponding crossing time tᵦ for channel B. Since the motor rotates at a constant angular velocity ω, the time difference Δt = tᵦ - t a This can be converted to a phase difference Δθ = ω × Δt. In this embodiment, the measured phase difference is 88.5 degrees, while the theoretical orthogonal phase is 90 degrees. Therefore, the phase offset Δφ = 90° - 88.5° = +1.5°. This offset value is stored as a phase compensation term. In the subsequent arctangent decoding algorithm, the formula for calculating the position angle θ is corrected to: θ = arctan2(B_corr, A_corr) + Δφ, where A_corr and B_corr are the A / B phase signals after bias compensation and gain equalization, respectively.

[0037] All calibration parameters, including the bias compensation ΔV, are included. a ΔVᵦ, the gain configuration codeword D_b, and the phase offset Δφ are all written into the microcontroller's internal non-volatile Flash memory and synchronously written into the SMR sensor chip's internal configuration register via the SPI interface. After the calibration process is completed, the system automatically switches to the main code channel decoding mode. During normal operation, the SMR sensor chip continuously outputs the original A / B phase signals. The signal processing module first applies the corresponding bias compensation to each channel signal to eliminate background drift; then, it performs amplitude equalization on the signal according to the preset gain codeword; finally, before executing the arctangent function decoding, a phase offset compensation term is introduced to output the final position angle. This triple correction mechanism is executed in real time during each position update cycle to ensure the linearity and repeatability of the output data.

[0038] Actual testing showed that after 100 hours of continuous operation at the rated speed of 3000 rpm, the standard deviation of the system's output position jitter was less than 0.05 degrees, and the repeatability was better than ±0.1 degrees, representing an improvement of more than 5 times compared to the uncalibrated system. Even during thermal shock testing with ambient temperatures rising from 25℃ to 85℃, the system maintained stable output, verifying its effective ability to suppress long-term drift.

[0039] Example 2

[0040] In precision linear motion platforms of semiconductor manufacturing equipment, linear encoders are used to provide real-time feedback on the absolute position of the slide, requiring sub-micron level positioning accuracy. Unlike rotary applications, linear encoders have linear scales, and their stroke start point typically has a mounting reference surface, serving as a natural calibration trigger position. However, linear SMR encoders also face issues such as parallelism errors between the SMR sensor head and the scale, multi-channel gain mismatch, and thermal drift. Directly using the rotary calibration logic of Example 1 would fail to fully utilize the boundary characteristics of the linear stroke, and the layout of the calibration mark area would need to be redesigned to adapt to linear motion constraints. Therefore, this embodiment proposes an SMR encoder system for linear motion platforms, with the core differences lying in the physical layout of the calibration mark area, the calibration trigger mechanism, and the reconstruction of the physical meaning of phase offset.

[0041] In this embodiment, the non-magnetic encoder disk is replaced with a linear scale, the base of which is made of Invar steel, with a coefficient of thermal expansion of less than 1.2 × 10⁻⁻. 6 / ℃ to minimize thermal deformation. A permalloy thin film is also sputtered onto the scale surface, and orthogonal sinusoidal magnetic stripes are formed in the main code track area using laser direct writing technology. The calibration mark area is no longer located on the ring, but is precisely positioned at the leading edge of the travel start point, with a length of 8 mm. Its magnetic pattern is a single-cycle triangular waveform, and its steep edges help improve the timing resolution of zero-crossing point detection. The front end of the calibration mark area is adjacent to a mechanical limit stop. When the slide returns to zero, the stop triggers a travel switch, generating a hardware interrupt signal as the precise trigger point for the calibration process. This replaces the software detection mechanism based on a sudden increase in signal amplitude in Example 1, improving the certainty of the calibration start point.

[0042] The structure of the SMR sensor chip is basically the same as in Embodiment 1, but its packaging is changed to a flat, elongated shape to accommodate the installation space of the linear scale. Two SMR bridge arms are arranged along the direction of motion with a spacing of 0.25 mm, matching the spatial period of the main code track. The signal processing module uses an ARM Cortex-M4 microcontroller, but its firmware logic has been reconfigured for linear scenarios: In calibration mode, the system first receives an interrupt signal from the limit switch to confirm that the slide has reached the start of its travel; subsequently, it controls the linear motor to perform a reverse micro-motion at an extremely low speed of 0.5 mm / s, causing the calibration mark area to slowly pass through the SMR sensor chip from right to left. The steps of blank segment acquisition, bias compensation, and gain equalization are similar to those in Embodiment 1, but there are fundamental differences in the calculation of the phase offset.

[0043] In a linear encoder, the "phase" of the A / B phase signals is not an angular concept, but rather a function of spatial position. Theoretically, the spatial phase difference corresponding to orthogonal phases is λ / 4, where λ is the spatial period of the main code track (e.g., 1 mm). Therefore, the phase offset Δφ needs to be converted into a spatial offset Δx. The system detects the zero-crossing point coordinate x of the A / B phase signals. a Calculate the measured spatial phase difference Δx_meas = xᵦ - x with respect to xᵦ. a Comparing this value with the theoretical value λ / 4, the spatial offset Δx = λ / 4 - Δx_meas is obtained. This Δx value is used to correct the original position reading after arctangent decoding, i.e., the final position P = P_raw + Δx.

[0044] Furthermore, since the linear scale has no rotational inertia, the system supports automatic full calibration during each power-on homing operation, achieving true "maintenance-free" deployment. Testing showed that within a 200mm travel range, the system's positioning accuracy reached ±0.5 micrometers, and the standard deviation of position repeatability was less than 0.2 micrometers, meeting the stringent requirements of lithography machine focusing platforms.

[0045] Example 3

[0046] In certain high-reliability applications, such as aerospace actuators or medical surgical robots, the system is extremely sensitive to single-point failures, requiring the encoder to have redundant calibration capabilities to prevent calibration failure due to contamination or damage to a single calibration mark area. Both Embodiment 1 and Embodiment 2 rely on a single calibration area, posing potential risks. Therefore, this embodiment proposes an enhanced SMR encoder system with dual calibration mark areas. The core technical difference lies in the redundant design of the calibration strategy and the parameter fusion algorithm.

[0047] The system sets two independent calibration marking areas on the non-magnetic code disk: the main calibration area is located inside the main code track area, and the secondary calibration area is located outside, separated by at least 30 degrees (rotation) or 50 millimeters (linear) to avoid magnetic field crosstalk. Both areas contain the same single-cycle sinusoidal magnetic field pattern, but the theoretical phase of the secondary calibration area is preset to 180 degrees to provide phase reversal verification capability. The signal processing module sequentially traverses the two areas during the calibration process, calculating two sets of compensation parameter sets {ΔV1, K1, Δφ1} and {ΔV2, K2, Δφ2} respectively. Subsequently, the system performs parameter consistency verification: if |ΔV1 - ΔV2| < 5 mV, |K1 - K2| < 0.05, and |Δφ1 - Δφ2| < 0.5 degrees, the calibration is deemed valid, and the two sets of parameters are weighted averaged to generate the final compensation parameters; if any indicator exceeds the tolerance, fault diagnosis is triggered, an error log is recorded, the last valid calibration parameters are activated, and a maintenance request is reported. This mechanism not only improves the robustness of calibration, but also enables predictive maintenance by predicting sensor lifespan through parameter drift trends.

[0048] During normal operation, the system continuously performs position decoding based on the compensated signal. Preferably, the signal processing module can also be configured to periodically trigger the calibration process, or automatically recalibrate when a signal quality indicator (such as signal-to-noise ratio) is detected to be below a threshold, in order to dynamically compensate for long-term parameter drift caused by temperature changes or mechanical wear.

[0049] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for precise data matching between an encoder's SMR chip and a non-magnetic code disk, characterized in that, Includes the following steps: Control the movement of the non-magnetic code disk so that the calibration mark area passes through the sensing area of ​​the SMR sensor chip; collect the background bias value of each SMR sensor channel in the blank section of the calibration mark area; The response amplitude of each channel was acquired at the feature points of the calibration pattern; Based on the background bias value and response amplitude, the bias compensation amount, gain equalization coefficient, and phase offset are calculated; the bias compensation amount and gain equalization coefficient are written into the configuration register corresponding to the programmable gain amplifier, and the phase offset is written into the phase compensation register; the main code channel decoding mode is switched, and the position data is output in real time by applying the compensation parameters; wherein, the surface of the non-magnetic code disk is provided with a main code channel area and a calibration mark area, the calibration mark area contains a magnetic calibration pattern with known phase, the SMR sensor chip integrates at least two differential SMR sensor units and a multi-channel signal conditioning circuit, the signal processing module automatically obtains the bias, gain, and phase compensation parameters through the calibration mark area during the initialization phase, and performs triple correction on the main code channel signal during the normal operation phase.

2. The method according to claim 1, characterized in that, The substrate of the non-magnetic code disk is made of non-magnetic material, and the magnetic pattern is made of permalloy, iron-cobalt alloy, nanocrystalline soft magnetic material or stainless steel. The calibration mark area is located on the inner or outer ring of the main code channel area, and its magnetic calibration pattern is a single-cycle sine, square wave or triangular waveform. The theoretical phase is pre-stored in the signal processing module and used as a reference for phase calibration.

3. The method according to claim 1, characterized in that, The SMR sensor chip integrates two orthogonally arranged SMR bridge arms using CMOS-compatible technology. The distance between the bridge arms is a predetermined distance, and the distance from the code disk surface is a predetermined height. The chip integrates a multi-bit analog-to-digital converter, a programmable gain amplifier, and an SPI communication interface. The gain adjustment range of the programmable gain amplifier is a predetermined multiple range, which supports independent dynamic configuration of the gain of different channels.

4. The method according to claim 1, characterized in that, The step of collecting the background bias value of each SMR sensing channel in the blank segment of the calibration mark area includes: controlling the motor to rotate at a low speed; when the signal amplitude detected from the calibration mark area exceeds the preset threshold calculated by the noise standard deviation, locking the current position as the calibration starting point; continuously collecting multiple samples in the blank segment at a predetermined distance in front of the calibration mark area; calculating the average background bias value of each channel; and generating the bias compensation amount of each channel after setting the reference voltage.

5. The method according to claim 1, characterized in that, In the step of acquiring the response amplitude of each channel at the feature points of the calibration pattern, the feature points of the calibration pattern include peak values, valley values, or zero crossover points. The signal processing module synchronously acquires the response amplitude of channels A and B at the peak value, uses the channel with the larger amplitude as the reference channel, calculates the gain equalization coefficient, and adjusts the gain of the programmable gain amplifier of the target channel accordingly to make the output amplitude of the two channels consistent.

6. The method according to claim 1, characterized in that, The phase offset is determined by detecting the zero-crossing time difference of the A / B phase signals. The signal processing module records the time when the two channels cross the zero point from negative to positive, and calculates the deviation between the measured phase difference and the theoretical orthogonal phase. This deviation value is used for the phase compensation term in the subsequent arctangent decoding algorithm to eliminate the fixed decoding offset caused by assembly misalignment.

7. The method according to claim 1, characterized in that, All compensation parameters, including bias compensation, gain equalization coefficient and phase offset, are written into the non-volatile register inside the SMR sensor chip or into the external Flash memory. The system automatically loads the parameters each time it is powered on or periodically triggered for calibration, thus achieving closed-loop self-calibration without the need for external calibration equipment.

8. The method according to claim 1, characterized in that, The system supports two working modes: rotary encoder and linear encoder. In rotary mode, the calibration mark area is arc-shaped with a predetermined length and the corresponding angular resolution is better than a preset angular threshold. In linear mode, the calibration mark area is located at the start of the stroke and has a predetermined length, which can achieve a preset positioning accuracy.

9. A system for precise data matching between an encoder's SMR chip and a non-magnetic code disk, characterized in that, The system includes: a non-magnetic code disk with a main code channel area and a calibration mark area on its surface, the calibration mark area containing a magnetic calibration pattern with a known phase; an SMR sensor chip integrating at least two differential SMR sensor units and a multi-channel signal conditioning circuit; and a signal processing module for executing the initialization calibration process and the normal operation decoding process. During the initialization phase, the signal processing module automatically acquires bias, gain, and phase compensation parameters through the calibration mark area, and during the normal operation phase, it performs triple correction on the main code channel signal. This triple correction mechanism continues to operate during normal operation. The signal processing module first performs bias compensation on the original A / B phase signal output from the main code channel area, then performs gain equalization processing, and finally introduces phase offset compensation before arctangent decoding, thereby outputting position data.

10. The system according to claim 9, characterized in that, The signal processing module is an embedded ARM Cortex-M4 microcontroller running calibration firmware. During the calibration process, it controls the motor to rotate at a low speed. When it detects that the signal amplitude in the calibration area suddenly increases by more than a preset multiple of the noise standard deviation, it locks the current position as the calibration starting point and continuously collects multiple samples in the blank segment at a predetermined distance in front of the calibration mark area. It calculates the average background bias value of each channel, sets the reference voltage, and generates the bias compensation amount for each channel.