Unified Time-Based Synchronous Calibration Method for Optical and Magnetic Sensors under High-Speed ​​Motion

CN122566901APending Publication Date: 2026-08-14TITANIUM TIGER ROBOT TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

二是普遍以工厂或低速标定作为长期参考,缺乏在役条件下对磁偏移、软铁矩阵、安装偏置角与减速比的动态修正,温漂与载荷变化使两通道的坐标关系逐步失配

Benefits of technology

基于同一程序点的成对采集与统一时间戳、时间基质量标志、相对时差上限及先进先出队列,使两路量测自源头在时间语义上等价,记录可追溯,跨周期可比,显著降低高速场景由异步引起的角度错配与后续补偿负担。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122566901A_ABST
    Figure CN122566901A_ABST
Patent Text Reader

Abstract

This invention discloses a unified time-based synchronous calibration method for optical and magnetic sensors under high-speed motion, relating to the field of high-speed position measurement technology. The method proposes a unified time-based synchronous calibration for optical and magnetic sensors, including: acquiring optical and magnetic triaxial data in pairs at the same program point, assigning a unified timestamp to the data, setting an upper limit for time difference and handling exceeding the limit; calculating the magnetic heading angle through magnetic triaxial calibration, converting optical readings into absolute optical angles and correcting them according to the deceleration ratio and installation offset angle, and setting a consistency gate for magnetic system alignment; establishing angle and angular velocity fusion, extrapolating alignment based on estimated delay difference and prior angular velocity, introducing a statistical gate and weights based on time-based quality and health; indicating abnormalities through a channel, calibrating the installation offset angle, deceleration ratio, magnetic offset vector, soft iron compensation matrix, and estimated delay difference in small steps, and degrading back and recording when necessary. This method achieves a unified time base and comparability within the same domain, suppresses phase lag, and improves stability and traceability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of high-speed position measurement technology, specifically a method for synchronous calibration of optical and magnetic sensors with a unified time base under high-speed motion. Background Technology

[0002] High-end CNC machine tools, industrial robots, semiconductors, and high-speed platforms in photolithography and other fields demand high resolution, high refresh rate, and high reliability from the position closed-loop control. Under high-speed and highly dynamic conditions, even minor time misalignments, measurement lags, or coordinate inconsistencies can be amplified by the control loop into angle errors, phase lags, and out-of-tolerance errors.

[0003] In engineering practice, optical encoders rely on finely engraved lines to achieve high resolution, but are sensitive to contamination, vibration, installation misalignment, and attenuation of output amplitude. Magnetic encoders are highly resistant to environmental conditions, but are limited in absolute resolution and linearity due to the effects of hard and soft iron, installation angle errors, and magnetic fields. To compensate for the shortcomings of single devices, the industry commonly uses optical-magnetic combinations or dual-channel redundancy. However, common implementations still mainly rely on independent acquisition and post-alignment, or simply on simplified time stamps and static weights, making it difficult to maintain strict synchronization and consistent semantics of cross-modal data in high-speed ranges.

[0004] Further analysis of existing solutions reveals the following: First, dual-channel systems typically read data sequentially and label the time separately. Due to interrupt scheduling and bus arbitration, relative time deviations exist between channels. At high speeds, even small deviations can correspond to significant angular errors, resulting in inconsistencies in the time domain. Second, factory or low-speed calibrations are generally used as long-term references, lacking dynamic corrections for magnetic offset, soft iron matrix, installation offset angle, and reduction ratio under in-service conditions. Temperature drift and load variations cause the coordinate relationship between the two channels to gradually mismatch. Third, fusion layers often use fixed weights or simple smoothing, lacking statistical gating based on residuals, making it difficult to distinguish between short-term interference and continuous degradation. Fourth, there is a lack of clear modeling and compensation for residual time delay and phase lag during high-speed operation, resulting in a long-term systematic difference between the observed angle and the actual angle. If these problems are not addressed, position feedback will exhibit continuous deviations and transient jitter, easily triggering gain degradation, tracking error alarms, and shutdown protection, impacting production capacity and yield.

[0005] Therefore, in high-speed motion and highly dynamic environments, how can we ensure that the cross-modal measurements of optical encoders and magnetic sensors are strictly aligned on the same time base, and maintain the long-term geometric and temporal semantic consistency of the two channels under the influence of relative time deviation of sequential acquisition, link residual delay, hard iron and soft iron effects, installation offset angle and reduction ratio mismatch and environmental changes, so as to avoid the accumulation of fusion residuals and the phase lag and out-of-tolerance amplification they cause? Summary of the Invention

[0006] (a) Technical problems to be solved To address the shortcomings of existing technologies, this invention provides a unified time-base synchronous calibration method for optical and magnetic sensors under high-speed motion. This method employs a consistency gate based on magnetic system alignment; establishes angle and angular velocity fusion; extrapolates alignment based on estimated delay difference and prior angular velocity; introduces a statistical gate and weights based on time-base quality and health; includes an anomaly trigger channel indication; and performs small-step calibration of the installation bias angle, deceleration ratio, magnetic bias vector, soft iron compensation matrix, and estimated delay difference. If necessary, it performs degradation back-cut and records the results. This method achieves a unified time base and comparability within the same domain, suppresses phase lag, and solves the technical problems described in the background art.

[0007] (II) Technical Solution To achieve the above objectives, the present invention provides the following technical solution: A method for unified time base synchronization calibration of optical and magnetic sensors under high-speed motion includes: Step 1, reading optical encoder and magnetic sensor data in pairs at the same program point, assigning a unified timestamp with the same timing unit, and adding a time base quality mark to form a record written into the first-in-first-out queue, setting a relative time difference upper limit and handling exceeding the limit to ensure time consistency; Step 2: Correct the original quantities of the three magnetic axes according to the soft iron compensation matrix and magnetic offset vector, and solve the magnetic heading angle. Convert the optical readings into optical absolute angles and correct them according to the deceleration ratio and installation offset angle. Align the coordinates according to the unified timestamp and set a consistency gate to filter out outliers. Step 3: Construct an angle and angular velocity fusion estimate under a unified timestamp, use the prior angular velocity to time-align the optical observations according to the estimated delay difference, form an observation pair with the magnetic heading angle, and then make a statistical gate decision and weight it according to the time base quality and health. Step 4: When residuals and statistics are triggered, anomaly attribution is performed based on gate and health status. Small step calibration is performed on installation bias angle, deceleration ratio, magnetic bias vector, soft iron compensation matrix and estimated delay difference. If the channel is unreliable, it will degrade and gradually switch back after access is restored and recorded.

[0008] Furthermore, a single record is composed of a unified timestamp, optical data, magnetic triaxial data, time base quality flag, and preliminary out-of-bounds flag. The record field order is fixed and append-only expansion is used. When the queue is full, records are retained according to the queuing priority of time continuity, time base quality flag, and preliminary out-of-bounds flag combination. Records exceeding the limit are discarded or resampled. The upper limit of relative time difference is set by the system specifications and fixed in the record.

[0009] Furthermore, the magnetic triaxial data is sequentially corrected using the magnetic bias vector and the soft iron compensation matrix to obtain the correction vector and calculate the magnetic heading angle. The magnetic bias vector and the soft iron compensation matrix are loaded during the power-on phase, and the magnetic heading angle is stored in a one-to-one correspondence with a unified timestamp. The correction vector serves as the sole input source for angle calculation, and the correction parameter identifier is carried along with the record to ensure version consistency.

[0010] Furthermore, the optical data is converted into absolute optical angles according to the resolution, and then converted to the measured axis according to the deceleration ratio and the installation offset angle; with the magnetic heading angle as a reference, the absolute optical angles are aligned to the magnetic coordinate system under a unified timestamp; before fusion, a consistency gate is set according to the angle difference between adjacent cycles, a gate indication is generated and written into the record for subsequent reference, and the gate threshold is set and solidified during the type test stage.

[0011] Furthermore, a fusion estimate with fusion angle and fusion angular velocity as states is established under a unified timestamp, forming an observation pair composed of extrapolated absolute optical angle and magnetic heading angle; Extrapolation is performed based on the difference between prior angular velocity and estimated delay, and pairing is completed within the same period; measurement weights are set jointly based on time base quality indicators, optical health and magnetic health and written into the diagonal elements of observation noise.

[0012] Furthermore, residuals are calculated and statistical gate thresholds are set to pass or reject observations. When a statistical gate rejects an observation, the prior state and covariance structure are frozen, and when a observation passes an observation, the state is updated. The statistical gate comparison index and threshold are stored in constant form and the current decision is recorded with a unified timestamp for reference in step four. The innovative covariance is composed of the prior covariance and the diagonal elements of the observation noise and is referenced consistently within the same period.

[0013] Furthermore, a trigger indication is generated when the statistical gate continues to reject or the residual exceeds the limit, and a channel indication is generated based on the optical side health, magnetic side health and time base quality flag. The channel indicator selects one of two values: optical side priority and magnetic side priority. It is used to determine the online update target, update order and current cycle processing priority, and is written into the event log along with a unified timestamp. Channel evidence includes residual component morphology and gate historical status.

[0014] Furthermore, the installation offset angle, reduction ratio, estimated delay difference, magnetic offset vector, and soft iron compensation matrix are updated online in small steps. The installation offset angle and reduction ratio adopt independent small step sizes. After the soft iron compensation matrix is ​​updated, it is projected onto the preset invertible set and boundary constraints are applied. Each update records the parameter values ​​before and after and the channel indication with a unified timestamp.

[0015] Furthermore, when the channel indicator shows that a certain channel is unreliable and the consistency gate continuously rejects it, the measurement access of that channel is suspended and enters degraded operation, with only the other channel and prediction maintaining the output; when the trigger count falls back and the consistency gate continuously passes through to reach the preset window count, the dual-channel fusion is gradually restored according to the preset back-cut weight, during which the record structure and naming remain unchanged, and the degradation and recovery events are written with a unified timestamp.

[0016] Furthermore, the data dependency relationship between step three and step four is as follows: the estimated delay difference is given by step three in the current period and participates in the update as a slowly varying parameter in step four; the consistency gate indication and trigger indication serve as the admission criteria for step four and are consistently referenced by step three in the next period, and the unified timestamp is used as the only time anchor point throughout the record, and its fields include the estimated delay difference, gate indication and trigger indication.

[0017] (III) Beneficial Effects This invention provides a method for unified time-based synchronous calibration of optical and magnetic sensors under high-speed motion, which has the following beneficial effects: Based on paired acquisition at the same program point and unified timestamp, time base quality flag, relative time difference upper limit and first-in-first-out queue, the two-way measurement is semantically equivalent in time from the source, the records are traceable, and they are comparable across cycles, which significantly reduces the angle mismatch and subsequent compensation burden caused by asynchronous operation in high-speed scenarios.

[0018] The magnetic triaxial alignment is corrected by using the magnetic bias vector and soft iron compensation matrix, and the magnetic heading angle is calculated. The optical readings are converted into absolute optical angles and corrected according to the deceleration ratio and installation bias angle. Outliers are then eliminated by the consistency gate to form comparable quantities in the same domain. This avoids treating assembly and environmental errors as true position and orientation differences and ensures stable integration.

[0019] Under a unified timestamp, a fusion estimate is constructed. The optical observation time is aligned by combining the estimated delay difference with the prior angular velocity. The observation access is constrained by statistical gate and adaptive weight, which suppresses phase lag and erroneous fusion in the high-speed acceleration and deceleration phase, making the angle and angular velocity trajectories continuous and insensitive to disturbances.

[0020] Anomaly attribution is triggered using residual and gate evidence, and small-step online calibration is performed on the installation offset angle, reduction ratio, magnetic offset vector, soft iron compensation matrix, and estimated delay difference. When the channel is unreliable, it degrades and gradually switches back after regaining access. Evidence is recorded throughout the process to ensure consistent reference of parameters and events. Recorded fields, gate indications, and estimates are uniquely mapped within the link, forming a closed-loop process from synchronization to calibration, reducing integration and debugging complexity, and facilitating migration and maintenance across multiple devices and operating conditions. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the process for the unified time-based synchronous calibration method of optical and magnetic sensors under high-speed motion according to the present invention. Detailed Implementation

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

[0023] Please see Figure 1 This invention provides a method for unified time-based synchronous calibration of optical and magnetic sensors under high-speed motion, including: Step 1: By collecting data in pairs using the same program points, assigning unified timestamps, and packaging each record into a first-in-first-out queue, and setting maximum relative time difference management and full-load order preservation strategies, a verifiable and traceable unified time base is established, providing deterministic input for subsequent cross-modal calibration, coordinate alignment, and fusion calibration.

[0024] Optical encoder readouts and magnetic sensor readouts typically flow along different peripherals and buses within the controller. If they are acquired and recorded separately at different program points, the time trajectory will deviate uncontrollably, leading to difficulties in angular alignment during high-speed motion. To avoid passive compensation in subsequent stages, it is necessary to establish paired acquisitions and co-source timing at the same program point at the source, making the two measurements naturally equivalent in temporal semantics.

[0025] First, a stable acquisition rhythm is determined as a reference time. Optical data readings and magnetic triaxial data readings are arranged in a defined order, and timing units are read at the same acquisition position within this order to obtain a unified timestamp. Then, using the unified timestamp as the core, the two raw measurements and basic quality indicators are bundled into a single record and queued to achieve event-level time binding.

[0026] In the controller's task loop, a fixed acquisition position is reserved. After reading the optical count or optical absolute angle, the original magnetic triaxial vector is read, keeping the interval between the two readings within a controllable, small range. Immediately afterwards, the timing unit is read to obtain a time reading from the same source, which is then added as a unified timestamp to both measurements in the current cycle. To ensure the sequence is verifiable, a status word is recorded once for each entry and exit from the acquisition position, guaranteeing accurate playback of the acquisition process later.

[0027] First, a linear process is established, consisting of acquisition entry flag - optical reading - magnetic reading - time reading - acquisition exit flag; second, a unified timestamp is generated using a single timing unit to ensure that the two measurements share the same source time.

[0028] When in use, the same program point and the same source timing enable the two measurements to be naturally aligned in terms of time semantics, which can avoid semantic ambiguity caused by time stamps from different sources; linear process and status word recording make the acquisition path traceable, which is convenient for fault review; shared timing unit eliminates the potential inconsistency of multiple time bases coexisting, which can reduce the complexity of subsequent compensation.

[0029] The unified timestamp, raw optical measurements, raw magnetic triaxial vectors, time-based quality flags, and initial boundary violation flags are packaged into a single record in a fixed field order, and the data stream is carried by a first-in-first-out (FIFO) queue. The field order and naming remain fixed, and any newly added fields are appended to the end of the queue to maintain long-term compatibility. After packaging, the record is written to the FIFO queue, which only dequeues records in the order they were enqueued, without modifying the content of cross-records.

[0030] First, define a list of fields and lock their order, ensuring that all downstream processes retrieve data only by field name. Second, use a first-in, first-out (FIFO) queue to maintain the time sequence of data collection, preventing cross-entry movement due to differences in content importance. Fixed fields and a fixed order clarify the data contract, eliminating name conflicts and implicit changes; FIFO semantics ensure the physical consistency of the time sequence, providing a reliable index for subsequent differencing and alignment; append-only expansion ensures that version evolution does not break the existing implementation.

[0031] However, even within the same program point, peripheral handshakes and bus arbitration can still introduce slight time differences. Without quantification management and out-of-bounds handling, these time misalignments can amplify into angular misalignments as speed increases. On the other hand, when the queue is nearing full capacity, indiscriminately retaining low-quality records dilutes the density of high-quality samples, affecting the stability of subsequent corrections. Therefore, it is necessary to impose hard constraints and quality scoring on relative time differences, and to use the quality score as a basis for order preservation when the queue is full.

[0032] When each record is generated, the difference between the optical readout time and the magnetic readout time is calculated to obtain the relative time difference of the current cycle; based on this, a time-based quality score is constructed, and an initial out-of-bounds flag is generated. Subsequently, the quality score and the initial out-of-bounds flag are combined to form an enqueue priority, which serves as the basis for order-preserving selection when the queue is full.

[0033] Furthermore, by measuring the time difference between the two readings, the small sequential differences within the same program point can be converted into comparable values ​​and mapped to a unified quality scale using an exponential scoring method, facilitating cross-cycle horizontal comparisons.

[0034] The process involves first calculating the relative time difference for the current period, then using this to calculate the time base quality score, and using the judgment of whether the upper limit is exceeded as a preliminary out-of-bounds indicator, which is then solidified into searchable information in the field. Where: optical readout time The value range is the valid timeline within the acquisition period, recording the actual time of optical readout. Magnetic readout time. : Values ​​represent the valid time axis within the acquisition period, recording the actual time of magnetic readout; the relative time difference of the current period. The unit is time; the value range is a non-negative time quantity, which evaluates the difference between two reads within the same program point.

[0035] Where: Time-based quality score : Values ​​range Mapping relative time difference to a quality scale; time score decay coefficient : A positive number, adjusting the sensitivity of the score to relative time difference; relative time difference of the current period. See the definition above; here it is used as the independent variable for scoring.

[0036] When in use, relative time difference is used as the sole source of time consistency, so that the judgment of time quality is freed from subjective experience and transformed into verifiable numerical evidence; the exponential scoring maintains high scores for smaller time differences and rapidly reduces scores for larger time differences, forming a clear basis for maintaining order; the initial boundary crossing indicator is fixed in the record, making it convenient for downstream to make decisions directly based on the indicator.

[0037] Furthermore, given limited queue space, it is necessary to prioritize the retention of high-quality records while preserving temporal continuity. To this end, an enqueue priority is synthesized for each record, and the time-based quality score is combined with the initial out-of-bounds condition into a single decision factor to ensure consistent selection when the queue is full.

[0038] Specifically, the system prioritizes entries into the queue and implements a full-load order-preserving strategy accordingly, prioritizing the retention of high-scoring records that have not exceeded their limits. When space needs to be freed up, the lowest-priority record is discarded, and the time and reason for this operation are recorded to ensure traceability. Where: Enqueue priority : Non-negative numbers, used for comparison when recording and discarding data at full load; time-based scoring weights. : A non-negative number, adjusting the proportion of time quality in priorities; out-of-bounds penalty weight. Non-negative numbers adjust the impact of out-of-bounds errors on priority levels; time-based quality score. See the definition above; here it is used as a priority weighting factor; preliminary boundary crossing indicator. : Values ​​are a set This indicates whether the relative time difference limit has been exceeded.

[0039] When used, the enqueue priority converges time consistency and out-of-bounds states into a single quantity, making it easier to make consistency trade-offs under complex loads; the order preservation strategy ensures that the time trajectory is not disrupted, making it easier for subsequent differential and alignment to proceed along the time axis; operation log recording allows any discarding behavior to be replayed, reducing maintenance and review risks.

[0040] Step 2: Using a unified timestamp With record vector Given the established premise, the original quantities of the three magnetic axes are constructed into a calibrated magnetic field vector and the magnetic heading angle is solved. Then, the optical angle is mapped to an absolute angle and corrected in the same domain using the installation offset angle and the deceleration ratio. Finally, a consistency gate is established in the velocity domain so that the two measurements in the same period can form a directly comparable angle pair in terms of geometric and temporal semantics.

[0041] Using the same time base only guarantees the simultaneity of measurements, not the consistency of coordinate meaning. Magnetic triaxial coordinates are affected by magnetic bias and soft iron effects, while optical counting is affected by the reduction ratio and installation offset angle. Directly comparing these angles will misinterpret assembly and environmental errors as true pose differences. Before fusion, coordinate semantic differences need to be gradually eliminated in the following order: magnetic side correction, magnetic heading angle, optical absolute angle, alignment to the magnetic coordinate system, and velocity domain consistency gate, to form comparable quantities within the same domain.

[0042] The original magnetic triaxial quantities are observations of the field where the equipment is located, superimposed with the constant bias and soft iron distortion introduced by the assembly. If they are not corrected beforehand, the magnetic heading angle after the plane projection will drift systematically.

[0043] Therefore, it is necessary to debias and linearly transform the original triaxial quantities of the same period, and write the correction results back to the magnetic field vector of that period in place to ensure that subsequent angle calculations only depend on the corrected quantities.

[0044] Among them, from the record vector Reading the raw components of the three axes , , The magnetic bias vector and soft iron compensation matrix loaded during the power-on phase are invoked to perform a linear correction, forming a corrected magnetic field vector; this vector is then compared with a unified timestamp. The data is bound and retained for use as dedicated input for subsequent heading angle calculations and velocity domain gates. Correction relation writing: Where: the corrected magnetic field vector : No. A periodically corrected triaxial magnetic vector, a real three-dimensional vector, provides a geometrically consistent magnetic vector; the original triaxial magnetic vector... :Depend on , , The original three-dimensional vector formed is a real three-dimensional vector, input from field observation; soft iron compensation matrix. : A third-order real matrix, a non-singular matrix, used for linear correction of scaling and coupling along each axis; magnetic bias vector : Three-dimensional real vectors, finite real numbers, removing the constant bias introduced by the field and assembly; unified timestamps : A time marker assigned at the same program point, a non-negative real number, to maintain consistency in time semantics.

[0045] When in use, linear correction separates the biases and distortions caused by assembly and environment from the original observations, ensuring that any subsequent angle calculation is based on a geometrically consistent magnetic vector; local write-back keeps the correction results and time information from the same source within the same cycle, avoiding confusion caused by cross-cycle calls.

[0046] Furthermore, under various installation configurations, the magnetic heading angle can be obtained by projecting the corrected magnetic vector onto a reference plane and calculating the azimuth angle within that plane. To ensure that the angle output has a definite single-valued nature for changes in the four quadrants, a two-parameter arctangent function is required, and the input order must be fixed to maintain continuous angle output at any quadrant switching point.

[0047] Take the planar components of the corrected magnetic field vector, input the two-parameter arctangent function in a predetermined order, and obtain the magnetic heading angle. Then, this angle was compared with a unified timestamp. The aligned intermediate values ​​for the current period are jointly written, providing a direct reference for in-domain correction of optical angles. Angle calculation writing: Where: magnetic heading angle : No. The periodic plane azimuth angle, taken as a real angle, provides an angular reference for the magnetic side; Corrected magnetic vector component correction ,school : Values ​​are real numbers; input for the plane projection; two-parameter arctangent function. The domain is pairs of real numbers, and the range is... Provides four-quadrant azimuth angles and avoids quadrant ambiguity caused by single-parameter arctangents; standardizes timestamps. See the previous definition; here it is used to bind to angle results.

[0048] When in use, by using a fixed input order and a two-parameter arctangent function, the magnetic heading angle remains continuous across quadrants and does not jump due to sign changes; writing from the same source as a unified timestamp ensures that the magnetic heading angle and optical angle can be referenced at the same time, achieving consistency in both time and geometry.

[0049] As an example: On a direct-drive turntable, engineers rotate the turntable at a low, uniform speed for one full revolution. In each cycle, the controller retrieves the raw three-axis values ​​from the recorded vector, subtracts the loaded magnetic bias vector, and multiplies by the soft iron compensation matrix to immediately obtain the corrected magnetic field vector. Subsequently, the controller reads the two horizontal components of this vector, feeds them sequentially into a two-parameter arctangent function to obtain the current magnetic heading angle, and writes it along with a unified timestamp for the same cycle into the intermediate value. Engineers observe on the debugging interface that as the turntable rotates, the magnetic heading angle curve becomes smooth and continuous, without any angle jumps at quadrant transitions; the same timestamp is used by both the optical and magnetic sides, and the screen displays two curves aligned with the same horizontal coordinate.

[0050] Furthermore, optical encoders typically output counts or subdivision angles, which are linked to the measured shaft via the reduction ratio. Simultaneously, the installation offset angle can cause the zero point to misalign. Without joint correction, the optical angle will be mismatched with the magnetic heading angle in both zero point and scale. It is necessary to map the count to radians and then perform a one-time correction based on the reduction ratio and installation offset angle to form an absolute angle directly comparable to the magnetic heading angle.

[0051] From the record vector Extract the optical angle or count, convert it to radians according to the resolution, then divide this angle by the reduction ratio and add it to the installation offset angle to obtain the absolute optical angle. Writing about conversion and correction relationships: Where: absolute optical angle : No. The period, corrected for mechanical relationships and installation offset angles, is a real angle, with co-domain aligned optical candidate values; optical resolution. : Weekly scale or subdivision, positive integer, scale factor to radians; optical counting : No. The count value read out periodically is a non-negative integer or a real number, and is input from on-site observation. Reduction ratio The transmission ratio between the measured shaft and the encoder shaft is a positive real number, converting the encoder shaft angle to the measured shaft angle; installation offset angle. Zero-point difference caused by assembly is a real angle; eliminate zero-point misalignment; unify timestamps. See the previous definition; here it is used to maintain the same periodicity semantics.

[0052] When in use, through a one-time joint correction, the optical angle establishes a correspondence with the measured axis in terms of scale and zero position, no longer relying on additional compensation in subsequent stages; the corrected optical absolute angle and magnetic heading angle are generated in parallel at the same timestamp, providing direct input for the subsequent consistency gate.

[0053] Furthermore, jumps in the angle domain can easily trigger misjudgments at high speeds. The artifacts caused by zero-point transitions can be masked by using the first-order difference between adjacent cycles. Before fusion, a consistency gate needs to be applied to the optical absolute angle and magnetic heading angle in the velocity domain to remove short-term spikes and significant outliers at the source, ensuring that subsequent fusion only deals with stable samples comparable within the same domain.

[0054] Specifically, the angle difference between two adjacent periods is calculated according to the chronological order of a unified timestamp and divided by the target sampling period to obtain approximate speeds for the two paths. Then, the speed difference is calculated and compared with the gate threshold to generate the current gate indication. Gate relationship writing: In the formula: gate indicator : No. The indicator value for whether the cycle passes the speed domain consistency check is [value]. or Screening comparable quantities within the same domain; optical absolute angle See the definition above, which are respectively the first With the Periodic optical side angle; magnetic heading angle ,magnetic See the definition above, which are respectively the first With the Periodic magnetic side angle; Target sampling period See the definition in step one: positive real numbers, converting the angle difference into an approximate velocity; velocity deviation threshold. : Threshold of the velocity domain consistency gate, a positive real number, limiting the allowable range of velocity differences; unified timestamp As defined above, the timing of the difference allocation pairs is guaranteed to be consistent.

[0055] In use, the velocity domain consistency gate suppresses the angle difference caused by cross-zero positions or instantaneous disturbances before entering the fusion process, and the retained samples are comparable in the same domain at the same timestamp; the gate indication is written with the record, providing clear prior evidence for the selection of weights and the triggering of anomalies in subsequent fusion.

[0056] Step 3: Use a unified timestamp Magnetic heading angle Optical alignment angle Difference between reduction angles Given the output, a fusion estimation link with angle and angular velocity as the core states is established, observations with delay compensation are constructed, statistical gates and adaptive measurement weights are matched, and the time delay difference is updated with a gradual law, thereby suppressing the remaining time misalignment and phase lag in high-speed motion, and outputting the fusion angle and fusion velocity and their evidence quantity that can be directly referenced in step four.

[0057] A unified timestamp ensures that both measurements are labeled simultaneously, but the timing of sensor link triggering, data transfer, and computation may still introduce residual time misalignment. During high-speed acceleration and deceleration, this misalignment manifests as angular phase lag; if directly incorporated into fusion, it will cause a long-term structural deviation between the predicted and measured quantities. Therefore, it is necessary to extrapolate the optical observations forward and backward using the predicted angular velocity on the same time base as the state prediction to align them. The reference section is then used to form a measurement pair in the same domain with the magnetic heading angle.

[0058] Using the angle-angular velocity binary state as the backbone, according to the sampling period Perform a forward prediction to obtain the state prior at the same reference time; use the angular velocity of this prior as the extrapolation slope to perform a linear time compensation on the optical alignment angle to obtain the time-aligned optical observation; then combine it with the magnetic heading angle, which does not require time compensation, to form the observation vector, which is then entered into the subsequent residual and weighted link.

[0059] Furthermore, the state vector is defined as fusion angle - fusion velocity, and the output of step two is... As the step size, a forward derivation is performed on the posterior state of the previous step to obtain the prior state and its covariance. To maintain terminology consistency, all quantities are expressed in terms of... Expressing time anchors: Where: prior state vector From a priori perspective With prior angular velocity The resulting two-dimensional vector, in the real number field, serves as a reference for observation alignment and residual calculation; the posterior state vector... The fusion result of the previous cycle, with values ​​in the real number domain, serves as the starting point for the prediction in this cycle. State transition matrix : By sampling period The constructed second-order matrix, whose values ​​are within the set of nonsingular matrices, is used to advance the state to a unified timestamp in a uniform velocity model. Sampling period The target sampling period defined in step one is a positive real number used for time interval sampling.

[0060] Furthermore, the posterior angle and posterior angular velocity from the previous cycle are read, and the prior angle and prior angular velocity are obtained by matrix multiplication; this prior is then compared with the unified timestamp. Correspondence. Binding prediction and alignment to the same time section ensures that extrapolation of subsequent observations only handles relative time misalignment without introducing ambiguity in the reference time; based on the sampling period... Explicit linear progression avoids ambiguous time interpolation and facilitates cross-device reproduction.

[0061] To address the possibility that the optical alignment angle may lag behind the reference section during generation, a priori angular velocity is used to perform a time extrapolation. The extrapolated optical angle and the magnetic heading angle are then placed side-by-side to form an observation vector, which is then compared under the same reference section. Where: observation vector : A two-dimensional vector consisting of the extrapolated optical angle and the magnetic heading angle, in the real number field, used as input for residual calculation and weighted fusion; optical alignment angle Step two outputs an angular value, used as a reference for extrapolation; this is used to estimate the delay difference. : The time misalignment estimate for the current period, a non-negative real number, used for extrapolation scale; prior angular velocity. Prior velocity, a real number, used for extrapolating slope; magnetic heading angle. The output of step two is in the angular domain and is used for comparison with the extrapolated optical angle in the same domain.

[0062] In forming observation vectors Previously, the estimated latency difference for this period was read. Multiplying this by the prior angular velocity and adding it to the optical alignment angle yields the extrapolation angle; subsequently, it is timed together with the magnetic heading angle using a unified timestamp. Binding proceeds to the next stage. Extrapolation with the prior velocity as the slope explicitly cancels out the phase lag caused by link delay in the high-speed segment, aligning the two observations to the same reference section; the two angles are placed side by side into the same vector, facilitating consistency decision-making and weighting under a single criterion.

[0063] Even after time extrapolation is completed, short-term spikes and measurement drift will still enter the fusion channel; in the high-speed segment, even a small number of anomalies can affect the state estimation trajectory. Therefore, it is necessary to use statistical gate decisions to determine whether to include observations in the update, then adjust the measurement weights based on the time-based quality flag and the gate's historical state, and utilize the reduction angle difference output from step two. The estimated delay difference is updated gradually, so that the time misalignment is gradually reduced during operation.

[0064] Using prior and observation data from the same reference section to construct residual vectors and their metrics, a quadratic gate is used for receiving and releasing decisions; based on the decisions and time-based quality indicators... Synthesized measurement weights are used to construct the observation noise matrix; simultaneously, reduced angular differences are used... For the driving quantity to estimate the delay difference Make small-step updates to form a closed loop of residual-weight-delay.

[0065] Furthermore, the observed vector is compared with the prior state under a unified dimension to form a residual vector, and a quadratic form criterion is used for decision-making: Where: Quadratic statistic : Non-negative real numbers, used as scalar criteria for observation decisions; residual vector : A two-dimensional vector representing observations minus predictions, in the real number field, used to describe the deviation between observations and priors; residual metric matrix. Positive definite matrix, used to measure the scale of residuals in various directions; Observation matrix The matrix that maps the state to the observation space; here we take... The comparison is performed in the angular domain, with values ​​ranging from the set of second-order matrices; prior states. Observation vector See the definition above.

[0066] Calculate the quadratic form statistic and with a fixed threshold In comparison, if If so, then accept the observations of this cycle and proceed to the update; if If so, the observation for this period is rejected and the event and timestamp are recorded. .

[0067] When used, the quadratic criterion examines the joint deviation of the two observations under a unified dimension, avoiding the influence of a single channel mutation on the other channel; the fixed threshold adjudication method makes the release-receive behavior deterministic and traceable, which facilitates the re-attribution of the source of the anomaly in step four.

[0068] Furthermore, the reduction angle difference from step two... As a directional indicator of time misalignment, the estimated delay difference is updated incrementally using small steps; simultaneously, the measurement weights are synthesized using time-based quality indicators and gate results, and written into the observation noise matrix, thereby suppressing the impact of low-quality observations in the high-speed range. Where: estimated delay difference The current period's delay difference estimate is a non-negative real number used as the scale for optical extrapolation; the previous period's delay difference estimate... : A non-negative real number used as the starting point for updates; small step size coefficient : Positive real number, used to control the update speed; reduced angle difference Step 2 output quantity, value is Used as a reference for the direction and magnitude of delay difference updates; gate indication Step 2 output quantity, the value is a set. This is used to allow observation-driven updates only when consistency is achieved.

[0069] When the gate indication is 1, the estimated delay difference is updated according to the above formula. Simultaneously, based on time-based quality indicators Combined with gate indication measurement weights, the diagonal elements of the two observations in the observation noise matrix are constructed. In the high-speed segment, low-quality observations are given weaker weights, while in the low-speed segment, the two observations tend to be balanced.

[0070] By reduction angle difference The gradual updates driven by the system continuously bring the latency difference closer to a reasonable range during operation, avoiding oscillations caused by a large one-time correction; the coupling of weights with time base quality and gate results ensures that high-quality observations dominate in the high-speed segment, while low-quality observations are suppressed, thus guaranteeing the stability of the fusion link.

[0071] Step 4: Use a unified timestamp Principal angle residual vector Statistics Gate indicator Difference from estimated delay Given the existing output, a closed-loop chain is constructed: anomaly triggering - attribution triage - online calibration - degradation and recovery - evidence recording, targeting the installation bias angle. Reduction ratio Magnetic bias vector Soft iron compensation matrix With time delay difference The parameters are updated in small steps, and if necessary, they are conditionally degraded to single-channel prediction until the recovery admission conditions are met, at which point they are gradually switched back to dual-channel fusion.

[0072] In step three, the two measurements have been aligned on the same reference section, and the principal angle residual vector has been provided. With statistics However, the sources of residuals are not singular: they may be caused by incomplete magnetic triaxial calibration, optical null and proportional mismatch, or changes in link time delay. If parameter updates are initiated directly, short-term disturbances may be misjudged as structural mismatches, leading to parameter drift.

[0073] Therefore, it is necessary to first establish a unified triggering criterion to screen the cycles that must be processed, and then combine the optical path health and time base quality evidence to determine the channels that tend to be mismatched and generate clear channel indicators. This provides a basis for target selection and step size control in subsequent online calibration.

[0074] Specifically, a unified triggering criterion is used to adjudicate both the statistical gate result and the principal angle residual threshold; once triggered, the determination is based on the shape of the residual components and the time base quality indicators. Consistency gate indication with input filter The system superimposes the health signals of optical path amplitude, phase, and bias, compares and attributes magnetic side anomalies and optical side anomalies, and finally generates the processing priority for the current cycle.

[0075] Specifically, when a statistic exceeds its limit or a principal component burst occurs in the principal angle residual, it is determined that the calibration process needs to be initiated for this period. To eliminate semantic confusion caused by gate entry failure, the trigger criterion and gate indication are linked to form a clear binary conclusion of entry-exit, as shown in the following formula: Where: Trigger indicator : No. The trigger indicator for each record takes the value of a set. Determine whether to enter the current calibration period; indicator function The input is a logical condition; the output is true when the condition is true. Output is invalid. .

[0076] Statistic : No. The statistical measure for each record is a non-negative real number, a quadratic form calculated from the residual vector and innovation covariance in the Kalman filter, used to measure the degree to which the overall observations in the current frame deviate from the prediction; statistical threshold. : Statistical threshold, a positive real number, is the acceptance / rejection threshold, usually defined and fixed during type testing or simulation phases, used to distinguish between normal fluctuations and overall anomalies; residual vector It's the formula above. Each of its components corresponds to the deviation of an observation channel (here, the optical angle and magnetic heading angle), and the symmetric positive definite matrix is ​​solved using... Decomposition (lower triangular decomposition plus back substitution); Infinite norm The infinite norm of the principal angle residual vector, in radians, a non-negative real number, captures anomalous amplification of the principal component; residual amplitude threshold. : Principal angle residual threshold, a positive real number, used for supplementary out-of-bounds judgment; consistency gate indication. : Consistency gate indicator before filtering, dimensionless, is a set This is to avoid accidentally entering the calibration process when consistency has not been achieved.

[0077] Among them, the trigger indication is calculated according to the formula. When the indicator is 1, continue attribution and prepare for parameter updates; when the indicator is 0, skip the current calibration and only keep the evidence record. Merge statistical out-of-bounds and principal component bursts into a unified process entry point to eliminate discrepancies between different evidence sources; linkage with the gate can eliminate occasional false triggers caused by gate entry failures, making the cycle of entering the process highly correlated.

[0078] Furthermore, the attribution stage no longer relies on abstract conclusions, but instead uses on-site evidence: reading the health signals of optical path amplitude, phase, and bias; combined with time-based quality indicators. The comparison with the two components of the residual provides a channel indication. And processing priority. If the optical path health is abnormal but the time base quality is good, and the residual vector If the first component is the primary contributor, then optical-side priority calibration is generated; if the optical path health is good but the time base quality and magnetic-side fitting quality are low, and If the second component is the main contributor, then a magnetic side priority calibration is generated.

[0079] As an example: On the high-speed section of a direct-drive turntable, the interface displays statistics exceeding limits and triggers calibration; the monitoring window simultaneously displays unstable optical path amplitude and time base quality flags. In the high-priority zone, the first component of the residual is much larger than the second component. The system immediately sets the channel indication to optical side priority and prioritizes the installation offset angle-reduction ratio-time delay difference as the update target; engineers observed that this cycle was included in the high-priority queue, and subsequent parameter updates were performed under the same timestamp. The evidence entry simultaneously records the trigger source, channel indication, and residual shape.

[0080] When in use, the channel should be evaluated in parallel based on both health and time quality to reduce the uncertainty caused by blindly performing simultaneous bilateral corrections; channel indication. Prioritizing processing makes the goals and order of subsequent updates clear, facilitating stable progress under limited computing resources.

[0081] After triggering and attribution, the slowly varying parameters need to be gradually pulled back to a structurally consistent position under continuous operation. Large, one-time changes can easily cause oscillations and overcorrection; therefore, small-step projection updates are used. Simultaneously, to ensure control continuity, when calibration cannot be reliably performed or a channel remains unreliable, degenerate operation should be initiated, maintaining output with single-channel and model predictions, and establishing recovery criteria to complete the gradual backtracking. Finally, all actions are synchronized to a unified timestamp. This creates a record of evidence, providing a traceable link for subsequent operation, maintenance, and review.

[0082] Online calibration follows two main lines: one is to perform vector-based gradual updates on scalar or low-dimensional parameters such as installation bias angle, reduction ratio, and time delay difference; the other is to perform projection updates on the geometric parameters of the magnetic bias vector and soft iron compensation matrix to maintain reversibility and controllable condition number. If the gate repeatedly rejects the trigger for several consecutive cycles, or if the health of a certain channel remains in the low range for a long time, degradation occurs; when the trigger count falls back and the consistency gate passes through continuously, a gradual back-cut is performed.

[0083] The installation offset angle, reduction ratio, and time delay difference are combined into a parameter vector, and a linear-exponential hybrid safety mapping is used to ensure that the reduction ratio is always positive. The reduced angle difference is then used as the parameter vector. (Step 2 output) and fused angular velocity (Step 3 posterior) construct the update driving force; the main driving force when the channel indication is optical side priority. and When the channel indication is magnetic side priority, the main drive is... The update is completed under a unified timestamp and written to the scrolling parameters, as shown in the following formula: Where: parameter vector : No. The parameter vector of each record, in units of angle, dimensionless, and time combination, takes values ​​in a three-dimensional real vector, and manages slowly varying parameters uniformly; the parameter vector of the previous period. : The value range is a three-dimensional real vector, and it is the starting point for the current update; update the gain matrix. : No. The update gain matrix for each record, in units of the scaling factor matrix adapted to each component, with values ​​ranging from 1 to 2. Real matrix, assign each driving force to the corresponding parameter channel; update driving force vector. : No. The update driving force vector of each record, in units of a combination of angle and angular velocity, takes values ​​in the range of a three-dimensional real vector. and Injected into parameter updates; Installation offset angle : No. The installation offset angle of each record is a real number, aligned with the optical null position; the deceleration ratio logarithm The logarithmic expression of the reduction ratio is a real number, guaranteeing... Positive and linearized fine-tuning; estimation of delay difference : No. The time delay difference estimate for each record, a non-negative real number, is used for extrapolation in step three; the reduced angle difference... : No. The reduced angle difference of each record, taking the principal value range, provides the direction of zero point and proportional mismatch; posterior angular velocity. : No. The posterior angular velocity estimate for each record is a real number, emphasizing the correction strength for time delay difference in the high-speed segment; Signed error magnitude : Symbolic function, whose range of values ​​is a set This indicates the direction of the error.

[0084] Calculate and update the driving force vector Then multiply by the updated gain matrix Obtain the parameter increments and synthesize the parameter vector. If the channel indicates For optical side priority, increase the mapping to the mounting offset angle. Natural logarithm of the deceleration ratio The gain term; if magnetic side preference is selected, the mapping to... Gain term; parameter update immediately at a unified timestamp Write the evidence entry below.

[0085] In use, the unified vector update avoids conflicts between parameters; logarithmic field fine-tuning keeps the deceleration ratio positive and differentiable; and the reduced angle difference is... With posterior angular velocity Simultaneously, this allows the three types of mismatches—zero-position, proportional, and delay—to be coordinated and corrected within the same framework.

[0086] Furthermore, the magnetic side geometric parameters need to be updated under the constraint of maintaining the effectiveness of linear correction: the magnetic bias vector can be updated directly with small steps in the direction of the sensitivity of the residual to the magnetic vector; the soft iron compensation matrix needs to be projected onto an invertible set with controlled condition number after the update to prevent numerical degradation, as shown in the following formula: Where: magnetic bias vector : No. The magnetic bias vector of each record, a three-dimensional real vector, cancels the constant bias caused by the field and assembly; the magnetic bias vector of the previous cycle. : is a three-dimensional real vector, representing the starting point of the current update; magnetic bias update step size. Positive real number; controls the bias correction speed; magnetic bias sensitivity Jacobian. : No. The sensitivity Jacobian matrix of each record to magnetic bias is a real matrix in the fitted dimension, and its values ​​range from [value range missing]. or The real matrix maps the angular residual in the magnetic bias direction; residual signal : Scalar or low-dimensional residual signals used for geometric parameter updates, which are real numbers; the component pointing towards the magnetic side in the principal angle residual is extracted as the update driver; soft iron compensation matrix. : No. The soft iron compensation matrix of each record, a third-order real invertible matrix, corrects for scaling and coupling along each axis; the soft iron compensation matrix of the previous period. : A real invertible matrix of order three, the starting point for the current update; soft iron update step : is a positive real number, controlling the speed of matrix correction; Jacobian sensitivity of soft iron. : No. The equivalent representation of the sensitivity Jacobian tensor of a record to a soft iron matrix after matrix transformation is: or The real matrix maps the angular residuals onto the matrix space; Projection operator To map any third-order real matrix to a set The mapping projects the updated matrix onto a condition-number-restricted and invertible set; the projection operator Pull the temporary soft iron compensation matrix back to a safe set The specific formula for (invertible, condition number controlled) can be written as: first, the projection matrix to be treated... Perform singular value decomposition: in It is an orthogonal matrix. The diagonal elements are three singular values. Prune each singular value: here These are predefined lower and upper bounds used to limit the minimum and maximum scaling of the soft iron matrix. The matrix is ​​then reconstructed using the clipped singular values. In other words, the projection operator The form is to perform a singular value decomposition on the input matrix, restricting the singular values ​​to... Within the interval, restore it using the same left and right singular vectors, and the resulting matrix will automatically fall into the set. In this matrix, the invertible and condition-controlled matrix is ​​used as the updated soft iron compensation matrix.

[0087] Matrix set : The set of matrices that satisfy the minimum singular value lower bound and the maximum singular value upper bound is the set of third-order real invertible matrices, guaranteeing numerical stability and invertibility.

[0088] When the channel indication is magnetic side priority and triggering is continuous, update the magnetic bias vector according to the above formula. With soft iron compensation matrix The updated magnetic triaxial correction link will be immediately applied to step two and updated at a unified timestamp. The following evidence entries are generated.

[0089] When used, projection updates improve the fit while ensuring the invertibility of the correction matrix and the control of the condition number; residuals are injected in a Jacobi-pointing manner to avoid large jumps; parameters and evidence chains remain traceable within the same naming system.

[0090] When the indicator is triggered If the count accumulates to the preset upper limit and the gate repeatedly rejects the input, or if the health of a certain channel remains in a low range, the system enters degradation mode: the measurement of the rejected channel is blocked, and only the output is driven by another channel and prior knowledge. The conditions for restoring access are: the trigger count drops below the threshold and the gate passes through continuously for several cycles, and the time-based quality flag... Maintain high altitude.

[0091] During recovery, a weighted, gradual rollback is employed to prevent sudden jumps. Evidence-based records are used in this process. The primary key contains the trigger source and channel indicator. Increment of parameter vector The differences before and after matrix updates, degradation / recovery markers, and current remarks ensure that the entire chain from triggering to closed-loop calibration is traceable.

[0092] When in use, triggering and gates ensure the necessity of current processing, attribution clarifies the goals and priorities, gradual updates ensure reversibility and positivity while gradually converging parameters, degradation-recovery ensures continuous output, and evidence-based records ensure that every change has a source, time, and object, meeting the requirements of engineering verification and maintainability.

[0093] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0094] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0095] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0096] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

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

Claims

1. A method for unified time-based synchronous calibration of optical and magnetic sensors under high-speed motion, characterized in that: include, Step 1: Read the data from the optical encoder and magnetic sensor in pairs at the same program point, assign a unified timestamp with the same timing unit, and attach a time base quality mark to form a record written into the first-in-first-out queue. Set a relative time difference upper limit and handle exceeding the limit to ensure time consistency. Step 2: Correct the original quantities of the three magnetic axes according to the soft iron compensation matrix and magnetic offset vector, and solve the magnetic heading angle. Convert the optical readings into optical absolute angles and correct them according to the deceleration ratio and installation offset angle. Align the coordinates according to the unified timestamp and set a consistency gate to filter out outliers. Step 3: Construct an angle and angular velocity fusion estimate under a unified timestamp, use the prior angular velocity to time-align the optical observations according to the estimated delay difference, form an observation pair with the magnetic heading angle, and then make a statistical gate decision and weight it according to the time base quality and health. Step 4: When residuals and statistics are triggered, anomaly attribution is performed based on gate and health status. Small step calibration is performed on installation bias angle, deceleration ratio, magnetic bias vector, soft iron compensation matrix and estimated delay difference. If the channel is unreliable, it will degrade and gradually switch back after access is restored and recorded.

2. The method for unified time-base synchronous calibration of optical and magnetic sensors according to claim 1, characterized in that: A single record is composed of a unified timestamp, optical data, magnetic triaxial data, time base quality flag, and preliminary out-of-bounds flag. The record field order is fixed and append-only expansion is used. When the queue is full, records are retained according to the queuing priority of time continuity, time base quality flag, and preliminary out-of-bounds flag combination. Records that exceed the limit are discarded or resampled. The upper limit of relative time difference is set by the system specifications and fixed in the record.

3. The method for unified time-base synchronous calibration of optical and magnetic sensors according to claim 2, characterized in that: The magnetic triaxial data is sequentially corrected using the magnetic bias vector and the soft iron compensation matrix to obtain the correction vector and calculate the magnetic heading angle. The magnetic bias vector and the soft iron compensation matrix are loaded during the power-on phase. The magnetic heading angle is stored in a one-to-one correspondence with a unified timestamp. The correction vector serves as the sole input source for angle calculation, and the correction parameter identifier is carried along with the record to ensure version consistency.

4. The method for unified time-base synchronous calibration of optical and magnetic sensors according to claim 3, characterized in that: The optical data is converted into absolute optical angles according to the resolution, and then converted to the measured axis according to the deceleration ratio and the installation offset angle. The absolute optical angles are aligned to the magnetic coordinate system under a unified timestamp, with the magnetic heading angle as a reference. Before fusion, a consistency gate is set according to the angle difference between adjacent cycles, a gate indication is generated and written into the record for subsequent reference, and the gate threshold is set and solidified during the type test stage.

5. The method for unified time-base synchronous calibration of optical and magnetic sensors according to claim 4, characterized in that: A fusion estimate is established under a unified timestamp, with the fusion angle and fusion angular velocity as the states, forming an observation pair consisting of the extrapolated absolute optical angle and the magnetic heading angle; Extrapolation is performed based on the difference between prior angular velocity and estimated delay, and pairing is completed within the same period; measurement weights are set jointly based on time base quality indicators, optical health and magnetic health and written into the diagonal elements of observation noise.

6. The method for unified time-base synchronous calibration of optical and magnetic sensors according to claim 5, characterized in that: Calculate the residuals and set the statistical gate threshold to pass or reject observations; when rejecting, the statistical gate freezes the prior state and covariance structure, and when passing, it performs a state update; the statistical gate comparison index and threshold are stored in constant form and the current decision is recorded with a unified timestamp for reference in step four; the innovative covariance is composed of the prior covariance and the diagonal elements of the observation noise and is referenced consistently in the same period.

7. The method for unified time-base synchronous calibration of optical and magnetic sensors according to claim 6, characterized in that: When the statistical gate continues to refuse or the residual exceeds the limit, a trigger indication is generated, and a channel indication is generated based on the optical side health, magnetic side health and time base quality flag. The channel indicator selects one of two values: optical side priority and magnetic side priority. It is used to determine the online update target, update order and current cycle processing priority, and is written into the event log along with a unified timestamp. Channel evidence includes residual component morphology and gate historical status.

8. The method for unified time-base synchronous calibration of optical and magnetic sensors according to claim 7, characterized in that: The installation offset angle, reduction ratio, estimated delay difference, magnetic offset vector, and soft iron compensation matrix are updated online with small step sizes. The installation offset angle and reduction ratio adopt independent small step sizes. After the soft iron compensation matrix is ​​updated, it is projected onto the preset invertible set and boundary constraints are applied. Each update records the parameter values ​​before and after and the channel indication with a unified timestamp.

9. The method for unified time-base synchronous calibration of optical and magnetic sensors according to claim 8, characterized in that: When the channel indicator shows that a certain channel is unreliable and the consistency gate continuously rejects it, the measurement access of that channel is suspended and enters degraded operation, with only the other channel and prediction maintaining the output; when the trigger count falls back and the consistency gate continuously passes through to reach the preset window count, the dual-channel fusion is gradually restored according to the preset back-cut weight, during which the record structure and naming remain unchanged, and the degradation and recovery events are written with a unified timestamp.

10. The method for unified time-base synchronous calibration of optical and magnetic sensors according to claim 9, characterized in that: The data dependency between Step 3 and Step 4 is as follows: the estimated delay difference is given by Step 3 in the current period and participates in the update as a slowly varying parameter in Step 4. The consistency gate indicator and trigger indicator serve as the admission criteria for Step 4 and are consistently referenced by Step 3 in the next period. The unified timestamp is used as the only time anchor point throughout the record, and its fields include the estimated delay difference, gate indicator, and trigger indicator.