A multi-factor error self-compensation method and system for precision instruments
By acquiring sensor readings in real time, calculating residual moving variance, and generating virtual readings through weighted fusion, the error compensation problem caused by gradual sensor drift is solved, improving the operating accuracy and stability of precision instruments and reducing maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NINGBO UNIVERSITY OF TECHNOLOGY
- Filing Date
- 2025-11-04
- Publication Date
- 2026-04-17
AI Technical Summary
Existing multi-factor error self-compensation technology fails to effectively handle long-term, slowly varying drift faults in sensors, resulting in error compensation models being calculated based on distorted data, introducing cumulative errors, and even leading to product scrapping. At the same time, sensor fault detection can easily cause data interruption in the compensation system and impact on the actuator.
By acquiring readings from multiple sensors in real time, calculating residual moving variance, identifying slowly varying drift faults, generating virtual readings using a soft measurement model, generating reliable data through weighted fusion, dynamically adjusting trust weights, and finally offsetting errors through a multi-factor error compensation model.
This has enabled the long-term operational accuracy of precision instruments to be improved, reducing the frequency of manual calibration, lowering maintenance costs, and ensuring the stability and accuracy of continuous instrument operation.
Smart Images

Figure CN121089791B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of precision instrument technology, specifically to a multi-factor error self-compensation method and a multi-factor error self-compensation system for precision instruments. Background Technology
[0002] In fields such as semiconductor manufacturing (e.g., wafer positioning in lithography machines) and industrial measurement (e.g., dimension inspection by coordinate measuring machines), the micron-level or even nanometer-level precision requirements of precision instruments directly determine product quality and process stability. Multi-factor error self-compensation technology has become a core means to break through the precision bottleneck. By integrating environmental sensors such as temperature, pressure, and vibration, and combining them with digital algorithms, it corrects multi-source errors in real time, effectively offsetting the impact of environmental fluctuations and mechanical deformation on instrument precision.
[0003] However, existing multi-factor error self-compensation technologies have the following problems: First, they rely on the absolute reliability of sensor data by default and do not consider the slow drift faults that occur during long-term operation of sensors. These faults manifest as readings slowly deviating from the true value over time. For example, the annual drift rate of a laser displacement sensor is 0.1μm, which is difficult to detect through instantaneous data comparison. This leads to the error compensation model calculating the compensation amount based on distorted data, which in turn introduces cumulative errors and may even lead to product scrapping in severe cases. Second, after sensor fault detection, existing solutions often directly isolate the faulty sensor or use a hard switch with a backup sensor. This can easily cause data interruption and sudden output changes in the compensation system, which not only affects the continuous operation of the instrument but may also impact the actuator, such as the sudden start and stop of a servo motor, exacerbating mechanical wear.
[0004] Based on this, the present invention proposes a multi-factor error self-compensation method and system for precision instruments. Summary of the Invention
[0005] To solve the above-mentioned technical problems, the present invention provides a multi-factor error self-compensation method and system for precision instruments.
[0006] The technical solution adopted in this invention is as follows:
[0007] A multi-factor error self-compensation method for precision instruments includes the following steps:
[0008] S1: Data acquisition step, real-time acquisition of readings from multiple sensors of the precision instrument, including historical reading sequences of the target sensor and real-time data from other health sensors;
[0009] S2: Gradual drift detection step, based on the historical reading sequence of the target sensor and the real-time data of the other health sensors, calculate the residual moving variance between the reading of the target sensor and the reading of at least one of the other health sensors; determine whether the target sensor has a gradual drift fault based on the long-term trend of the residual moving variance.
[0010] S3: Soft measurement data reconstruction step: When it is determined that the target sensor has a slow drift fault, the soft measurement model is started; the real-time data of the other health sensors are used as input, and the virtual reading of the target sensor is calculated through a pre-trained regression algorithm;
[0011] S4: Data source switching step, based on the determination result of the gradual drift fault, weighted fusion of the real readings and the virtual readings of the target sensor to generate fused data; wherein, the trust weight of the real readings of the target sensor is gradually reduced, while the trust weight of the virtual readings is gradually increased;
[0012] S5: Error compensation execution step, based on the fused data, calculates the compensation value through a multi-factor error compensation model and outputs it to the actuator of the precision instrument.
[0013] Furthermore, the calculation steps for the residual moving variance include:
[0014] Calculate the sequence of differences between the readings of the target sensor and the readings of at least one of the other health sensors. The difference is the residual at the i-th sampling point, calculated using the following formula:
[0015]
[0016] In the formula, The residual of the i-th sampling point; The reading of the target sensor at the i-th sampling point; For at least one of the other health sensors in the first Readings from each sampling point;
[0017] The formula for calculating the average residual within the window is as follows:
[0018]
[0019] In the formula, The average residual within the sliding window corresponding to the kth sampling point; k is the current sampling point index; N is the sliding window length;
[0020] Based on the average residual within the window The formula for calculating the moving variance of the residuals is as follows:
[0021]
[0022] In the formula, Let be the residual moving variance of the k-th sampling point.
[0023] Furthermore, determining whether the target sensor has a gradual drift fault includes:
[0024] Monitor the rate of change of the residual moving variance over a preset time period;
[0025] If the rate of change exceeds the first threshold for M consecutive sampling periods, and the residual moving variance exceeds the second threshold for N consecutive sampling periods, then the target sensor is determined to have a slow drift fault; where M and N are preset positive integers.
[0026] Furthermore, the pre-trained regression algorithm used in the soft measurement model is a neural network model or a linear regression model; the soft measurement model uses historical health sensor data as input and historical target sensor data as output during the training phase, and is trained through supervised learning.
[0027] Furthermore, the formula for weighted fusion is:
[0028]
[0029] In the formula, This represents the fused data for the k-th sampling point; This represents the actual reading of the target sensor at the k-th sampling point; This is the virtual reading for the soft measurement at the k-th sampling point; The smoothed weight factor for the k-th sampling point. .
[0030] Furthermore, the error compensation execution steps specifically include the following sub-steps:
[0031] S51: Compensation amount calculation sub-step, input the fused data into the multi-factor error compensation model, and calculate the original compensation amount sequence used to offset the instrument error;
[0032] S52: Compensation amount preprocessing sub-step, smoothing the original compensation amount sequence and limiting its rate of change to generate smooth compensation amount;
[0033] S53: Actuator inverse compensation sub-step, inputting the smooth compensation amount into the inverse model pre-calibrated for the actuator to calculate the actual drive command;
[0034] S54: Instruction output sub-step, output the actual driving instruction to the actuator.
[0035] Furthermore, the compensation amount preprocessing sub-step specifically includes:
[0036] The original compensation quantity sequence is processed using the S-curve acceleration / deceleration algorithm to obtain the smooth compensation quantity;
[0037] Determine whether the rate of change of the smoothing compensation amount exceeds the safety threshold allowed by the system's mechanical structure; if it does, then limit the rate of change of the smoothing compensation amount.
[0038] A multi-factor error self-compensation system for precision instruments includes: a data acquisition module for real-time acquisition of readings from multiple sensors of the precision instrument, including a historical reading sequence of a target sensor and real-time data from other health sensors; a gradual drift detection module for calculating the residual moving variance between the readings of the target sensor and the readings of at least one of the other health sensors based on the historical reading sequence of the target sensor and the real-time data from the other health sensors; determining whether the target sensor has a gradual drift fault based on the long-term trend of the residual moving variance; and a soft measurement data reconstruction module for determining whether the target sensor has a gradual drift fault when the target sensor is determined to have a gradual drift fault. When a gradual drift fault occurs, a soft measurement model is activated; using real-time data from other health sensors as input, a pre-trained regression algorithm is used to calculate the virtual reading of the target sensor; a data source switching module is used to perform weighted fusion of the real reading and the virtual reading of the target sensor based on the judgment result of the gradual drift fault to generate fused data; wherein, the trust weight of the real reading of the target sensor is gradually reduced, while the trust weight of the virtual reading is gradually increased; an error compensation execution module is used to calculate the compensation value based on the fused data using a multi-factor error compensation model and output it to the actuator of the precision instrument.
[0039] The beneficial effects of this invention are:
[0040] This invention achieves dynamic self-compensation for multi-factor errors in precision instruments through a closed-loop process of data acquisition, gradual drift detection, soft measurement reconstruction, weighted fusion, and error compensation. It accurately identifies the gradual drift of target sensors based on residual moving variance, generates reliable virtual readings by combining them with a pre-trained soft measurement model, and then balances the advantages of real and virtual data through dynamic weighted fusion. Finally, it eliminates errors such as temperature, pressure, and geometry with the help of a multi-factor compensation model, significantly improving the long-term operating accuracy of the instrument, reducing the frequency of manual calibration, and lowering maintenance costs. Attached Figure Description
[0041] Figure 1 This is a flowchart of a multi-factor error self-compensation method for precision instruments according to an embodiment of the present invention;
[0042] Figure 2This is a block diagram of a multi-factor error self-compensation system for precision instruments according to an embodiment of the present invention;
[0043] Figure 3 This is a graph showing the positioning error curves for the control group and the experimental group;
[0044] Figure 4 This is a graph of the moving variance of the residuals.
[0045] Figure 5 A graph showing the target sensor's actual readings, soft measurement virtual readings, and fused data. Detailed Implementation
[0046] 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.
[0047] like Figure 1 As shown in the figure, a multi-factor error self-compensation method for precision instruments according to an embodiment of the present invention includes the following steps:
[0048] S1: Data acquisition step, real-time acquisition of readings from multiple sensors of the precision instrument, including historical reading sequences of the target sensor and real-time data from other health sensors.
[0049] This step involves real-time and complete acquisition of sensor data related to error compensation from precision instruments, providing reliable input for subsequent gradual drift detection, soft measurement data reconstruction, and error compensation calculation. The target sensor is one that directly reflects the core measurement dimensions of the precision instrument (such as displacement, temperature, pressure, vibration, etc.) and is susceptible to gradual drift faults; the accuracy of its readings directly determines the final measurement accuracy of the instrument. The historical reading sequence is a set of past readings from the target sensor, continuously stored according to a preset sampling period from the start of data acquisition.
[0050] For example, if the precision instrument is a spindle displacement measurement system for a high-precision CNC lathe, the target sensor can be a laser displacement sensor installed at the spindle end (the core of which measures the axial displacement of the spindle); its historical reading sequence is the continuous reading of the laser displacement sensor from the current moment backward. For example, if the sampling period is 100ms, the historical reading sequence within 1 minute contains displacement data (unit: μm) of 600 consecutive sampling points.
[0051] The collected data is stored in a two-dimensional time-reading sequence, mathematically expressed as:
[0052]
[0053] In the formula, For the target sensor in the first The readings at each sampling point are in units consistent with the sensor's measurement dimensions, such as displacement in μm and temperature in °C. For the first The timestamp of each sampling point; the length of the historical reading sequence, a preset positive integer, which must meet the window length requirements for calculating the residual shift variance in subsequent gradual drift detection, where, N is the length of the sliding window, such as hour, .
[0054] Other health sensors are those that are physically related to the target sensor (e.g., in the same measurement environment or with the same mechanical structure) and for which no faults have been detected (determined to be healthy through preprocessing). Real-time data is the current reading synchronized with the sampling period of the target sensor, and must be acquired without delay or packet loss. The measurement dimensions of the health sensors must have a direct or indirect physical relationship with the target sensor to ensure that their data can be used for subsequent residual calculations and soft measurement modeling. For example, if the target sensor is a temperature sensor (measuring the temperature inside the cavity), the health sensor can be a backup temperature sensor (directly associated) in the same cavity, or a heating power sensor that is strongly correlated with the cavity temperature (indirectly associated). Before data acquisition, a preliminary health assessment of the sensor is required to exclude sensors with obvious faults, such as reading jumps, no response, or exceeding the range. The corresponding judgment criterion is that the reading deviation within three consecutive sampling periods is ≤ 10% of the sensor's maximum permissible error. It should also be noted that the number of health sensors is at least one to ensure that there is still data input in the event of a single fault. In the specific embodiments of this invention, two or more are preferred to improve the prediction accuracy of the soft measurement model. For example, when the target sensor is a displacement sensor, the readings of the grating ruler (health sensor 1) and the motor encoder readings (health sensor 2) of the same axis can be acquired simultaneously.
[0055] The data collected by the health sensor is real-time single-value or multi-value data that is strictly synchronized with the sampling period of the target sensor, and is mathematically expressed as:
[0056]
[0057] In the formula, For the first The health sensor in the first The real-time reading of each sampling point (current sampling point) has the same unit as the target sensor or has a clear physical conversion relationship. For example, the unit of motor encoder reading is pulse, which can be converted to μm through pulse equivalent, and is consistent with the unit of displacement sensor. The number of health sensors is preset to a positive integer. ; The timestamp of the current sampling point needs to be compared with the timestamp of the target sensor. The timestamps of all sampling points are completely consistent, ensuring data time synchronization.
[0058] In specific embodiments of this invention, the target sensor is preferably selected as a high-precision, low-drift type, such as a laser displacement sensor with a drift rate ≤0.1μm / year; or a platinum resistance temperature sensor with a drift rate ≤0.01℃ / year. The health sensor must be a high-stability type to avoid misjudgments caused by its own drift. The target sensor and the health sensor must be installed under the same or similar environmental conditions, such as the same temperature field and the same vibration isolation platform, to avoid residual distortion caused by environmental differences, such as local temperature differences or vibration transmission differences. For example, the target temperature sensor is installed on the inner wall of the cavity, and the health temperature sensor must be installed on the same inner wall ≤5cm away from the target sensor, rather than outside the cavity. Data sampling period. It needs to be determined comprehensively based on the dynamic response speed and the rate of change of the slowly varying drift of the precision instrument. The expression is: In the formula, The maximum allowable drift error for the target sensor, such as 0.5 μm; This represents the maximum rate of change of the slowly varying drift, such as 0.01 μm / min; for example, if , ,but:
[0059] ,
[0060] That is, the sampling period needs to be ≤300ms to ensure that the drift trend can be captured in time.
[0061] S2: Gradual drift detection step, based on the historical reading sequence of the target sensor and the real-time data of the other health sensors, calculate the residual moving variance between the reading of the target sensor and the reading of at least one of the other health sensors; determine whether the target sensor has a gradual drift fault based on the long-term trend of the residual moving variance.
[0062] This step, based on the historical reading sequence of the target sensor collected in step S1 and real-time data from other health sensors, uses mathematical modeling to quantitatively analyze the consistency deviation between the two, accurately identifying whether the target sensor has a slow drift fault. Unlike sudden faults, slow drift is characterized by a slow shift in reading over time, such as zero-point drift caused by aging of a temperature sensor. This provides a basis for fault judgment for subsequent data source switching and error compensation.
[0063] It should be noted that the target sensor and the health sensor are strongly correlated due to their measurement environment (such as the same temperature field or the same mechanical structure) and physical relationship (such as displacement measurement in the same axis system). Under fault-free conditions, the difference (residual) between their readings should remain stable (low dispersion, no obvious trend change). If the target sensor experiences slow drift, its reading will gradually deviate from the true value, causing the dispersion of the residual (quantified by the residual moving variance) to increase significantly over time and show a continuous upward trend. This invention calculates the variance by placing the real-time residuals of the target sensor and the health sensor into a sliding window, amplifying the long-term trend of the residual. Single residual fluctuations may be caused by noise, and the window variance can filter out noise, highlighting the systematic deviation caused by drift. Furthermore, by monitoring the long-term rate of change and absolute value of the residual moving variance, when both meet the preset over-limit conditions, it is determined that the target sensor has a slow drift fault, avoiding misjudgments caused by single fluctuations or random deviations.
[0064] Specifically, the steps for calculating the residual moving variance include:
[0065] First, calculate the sequence of differences between the readings of the target sensor and the readings of at least one of the other health sensors. The difference is the residual at the i-th sampling point, and its calculation formula is as follows:
[0066]
[0067] In the formula, Let be the residual at the i-th sampling point, which is the difference in readings between the target sensor and the health sensor at the same sampling point. This directly reflects the consistency deviation between the two sensors. The residual at the i-th sampling point is calculated... It converts the difference in readings between the target sensor and the health sensor into quantifiable values, under fault-free conditions. It should fluctuate slightly around a fixed value, such as a fixed deviation caused by installation errors, during drift. It will gradually deviate from this fixed value over time, and its unit is consistent with the sensor reading unit, such as μm for displacement sensors and °C for temperature sensors. The sign of the residual indicates the direction of the deviation. This indicates that the target sensor reading is higher than the health sensor reading. Conversely, the absolute value represents the magnitude of the deviation. The reading of the target sensor at the i-th sampling point is specifically the historical reading sequence of the target sensor collected in step S1. It must be pre-processed valid data with no outliers or packet loss. For at least one of the other health sensors in the first The readings at each sampling point are specifically the real-time data from the health sensor collected in step S1. The sampling point number is synchronized with the sampling period of step S1. For example, when the sampling period is 100ms, i=1 corresponds to t=100ms, and i=2 corresponds to t=200ms.
[0068] For example, if the target sensor is a laser displacement sensor (measuring spindle displacement), the reading at the 5th sampling point... The health sensor is a grating ruler in the same axis system; the reading at the 5th sampling point... Then the residual This indicates that the current target sensor reading is 0.2 μm higher than the health sensor reading, which is within the normal fluctuation range (assuming an allowable fluctuation of ±0.3 μm).
[0069] Then, the average value of the residuals within the window is calculated, which is used to eliminate fixed biases in the residuals, such as fixed differences caused by the difference in the installation positions of the target sensor and the health sensor, to ensure that the variance only reflects the deviation that changes over time. The calculation formula is as follows:
[0070]
[0071] In the formula, The average residual within the sliding window corresponding to the kth sampling point, in units of . Consistency is required; if there are fixed deviations, such as those caused by installation issues... It consistently fluctuates around 0.2μm. The value will stabilize at around 0.2μm to avoid this fixed deviation affecting the variance calculation; k is the current sampling point number, where k is a positive integer, k≥N. Since the window needs to contain N sampling points, if N=50, k starts from 50, meaning the first 49 sampling points do not meet the window length requirement and the moving variance is not calculated; N is the sliding window length, which is set according to the drift speed and sampling period. The slower the drift, the larger N needs to be, such as N=100, to avoid the window being too short to capture the trend; the faster the drift, the smaller N can be, such as N=30, to ensure timely detection. In the specific embodiment of this invention, the value range of N is 50-200. Let be the residual of the i-th sampling point, and let i be from k-N+1 to k. That is, the current window contains all the residuals from the k-N+1 sampling point to the k-th sampling point.
[0072] Based on the average residual within the window Calculate the moving variance of the residuals The calculation formula is as follows:
[0073]
[0074] In the formula, The residual moving variance at the k-th sampling point is expressed as the square of the sensor reading units, such as... , ², the larger the value, the higher the dispersion of the residuals within the window, and the greater the possibility of target sensor drift. When there is no drift, the residuals are only affected by random noise. Stabilizing at low values, such as When drift occurs, the residuals gradually deviate from the average value over time. It will continue to rise, such as from Rise to .
[0075] For example, if the sliding window length is Current sampling point The residuals within the window are respectively , , , , The calculated window average The calculated moving variance It is within the normal range (assuming a normal threshold). If k=100, If so, further determination is needed to determine whether it is drift.
[0076] In one embodiment of the present invention, faults cannot be accurately determined solely by the absolute value of the residual shift variance or the single rate of change. For example, occasional noise may cause the single variance to exceed the limit, but without a continuous trend, which is a misjudgment. Therefore, both the continuous exceedance of the rate of change and the continuous exceedance of the absolute value of the variance must be satisfied simultaneously to achieve a dual-constraint determination of trend and amplitude. Specifically, determining whether the target sensor has a slow drift fault includes:
[0077] Monitor the rate of change of the residual moving variance over a preset time period; wherein, the rate of change is used to reflect the growth rate of the moving variance, that is, the proportion of the current variance to the variance of the previous sampling point, and the calculation formula is as follows:
[0078]
[0079] In the formula, This represents the percentage change in variance (unitless) at the k-th sampling point. This indicates an increase in variance (drift may be exacerbated). This indicates a decrease in variance (which may be due to noise fluctuations). The larger the value, the faster the drift growth.
[0080] The absolute value of the moving variance of the residuals is calculated using the method described above. Determine whether it exceeds the maximum variance threshold allowed by the instrument's accuracy, i.e., the second threshold. .
[0081] Among them, if the rate of change of the residual moving variance The first threshold is exceeded for M consecutive sampling periods. And the residual moving variance The second threshold is exceeded in N consecutive sampling periods. If M and N are preset positive integers, then the target sensor is determined to have a gradual drift fault. .
[0082] Specifically, the rate of change of the moving variance of the residuals The first threshold is exceeded for M consecutive sampling periods. ,Right now: ; A preset positive integer, such as M=10, indicates that the rate of change exceeds the limit for 10 consecutive sampling periods, excluding misjudgments based on single fluctuations. The residual moving variance... The second threshold is exceeded in N consecutive sampling periods. ,Right now: N is a preset positive integer, such as N=8, which works in conjunction with M to achieve dual verification of short-term trends and medium-term magnitudes.
[0083] For example, if , , , The sampling period is 100ms. If we start from k=100, , ... If the rate of change exceeds 5% for 10 consecutive cycles, then the corresponding condition is met; at the same time... , ... Variance exceeded for 8 consecutive periods If the condition is met, then when k=109, it is determined that the target sensor has a slow drift fault, triggering the soft measurement data reconstruction step S3.
[0084] If a fault with no gradual drift is determined, a "normal signal" is output, and subsequent steps (S3, S4) are not initiated. Error compensation is performed directly using the actual reading of the target sensor (S5). If a fault with gradual drift is determined, a "fault signal" is output, along with a "fault severity S". The fault severity S is calculated by the over-limit amplitude and duration of the residual shift variance.
[0085] It should also be noted that if step S1 collects data from multiple health sensors, such as m=2 health sensors... , To improve detection reliability and avoid misjudgments caused by the failure of a single health sensor, multiple residual fusion is needed. Specifically, the residual shift variance between the target sensor and each health sensor needs to be calculated separately. (correspond ), (correspond The average of the two values is taken as the final moving variance. Fault detection is performed according to the above-mentioned corresponding judgment logic. If the data from one of the health sensors is abnormal, such as... A sudden surge, If normal, only the variance of normal health sensors is used for judgment, thus improving robustness.
[0086] S3: Soft measurement data reconstruction step: When it is determined that the target sensor has a slow drift fault, the soft measurement model is started; the real-time data of the other health sensors are used as input, and the virtual reading of the target sensor is calculated through a pre-trained regression algorithm.
[0087] This step is used to calculate a virtual reading that is highly similar to the actual reading of the target sensor based on the real-time data of the health sensor collected in step S1, after the target sensor is determined to be unreliable in S2. This provides reliable alternative data for the subsequent data source weighted fusion in S4, and avoids data interruption or distortion of the entire error compensation system due to the drift of the target sensor.
[0088] It should be understood that the target sensor and the health sensor do not exist independently. They are usually in the same measurement environment, such as the temperature and pressure of the same cavity, or in the same mechanical structure, such as the displacement and vibration of the same shaft system. Their data have a strong intrinsic correlation. For example, if the target sensor is a spindle displacement sensor, and the health sensor is a motor encoder (in the same shaft system) and a cavity temperature sensor (affecting the thermal deformation of the shaft system), then there is a clear mathematical correlation between the spindle displacement and the motor encoder reading (reflecting the motor rotation) and the cavity temperature (affecting the displacement deviation caused by thermal expansion and contraction). If the target sensor is a reactor temperature sensor, and the health sensor is a heating power sensor (controlling temperature) and a stirring speed sensor (affecting temperature uniformity), then there is a significant correlation between the reactor temperature and the heating power and stirring speed.
[0089] The essence of the soft measurement model is to transform this implicit correlation into an explicit prediction formula through mathematical modeling. Using real-time data from the health sensor as input, it outputs a virtual reading of the target sensor, indirectly reconstructing data from faulty sensors and solving the data interruption problem to ensure data continuity. If the target sensor drifts, its actual reading becomes unreliable. If discarded directly, subsequent S4 (weighted fusion) and S5 (error compensation) processes will lack target-dimensional data input. The virtual reading generated by S3 can fill this gap. The virtual reading maintains consistency with the historical health readings of the target sensor in terms of numerical range and trend, avoiding fluctuations during S4 fusion due to data mutations, which could affect the stable operation of the S5 compensation actuator, such as preventing sudden motor start / stop or sudden voltage changes in piezoelectric ceramics.
[0090] In one embodiment of the present invention, the pre-trained regression algorithm used in the soft measurement model is either a neural network model or a linear regression model; wherein, the neural network model is suitable for non-linear correlation scenarios, and the linear regression model is suitable for linear correlation scenarios. The choice between the two models depends on the correlation characteristics between the health sensor and the target sensor. The pre-trained regression algorithm used in the soft measurement model includes, but is not limited to, neural network models and linear regression models, which are essentially machine learning techniques, particularly the supervised learning branch. This invention uses machine learning algorithms to construct the soft measurement model. During the training phase, the model uses historical health data (input) and historical target sensor data (output, i.e., labels) for supervised learning to automatically acquire model parameters. In the application phase (inference phase), the system can utilize the learned patterns to infer the virtual readings of the target sensor in real time based on new health sensor data.
[0091] Specifically, when the health sensor data and target sensor data show a linear relationship (e.g., for every 100 pulses increase in the motor encoder reading, the spindle displacement increases by 0.1 mm, which is approximately linear), a linear regression model is chosen, offering advantages such as low computational complexity and strong real-time performance. The number of health sensors is... ( ), then the target sensor in the ), Virtual readings at each sampling point for:
[0092]
[0093] In the formula, This represents the virtual reading of the target sensor at the k-th sampling point; The intercept term of the linear regression is used to compensate for the fundamental deviation between the health sensor and the target sensor, such as the fixed difference caused by differences in installation location. , ,..., The regression weight coefficients for the 1st to mth health sensors reflect the strength of the influence of each health sensor on the target sensor reading; the larger the weight, the more significant the influence. , ... This represents the real-time data from the 1st to the mth health sensors at the kth sampling point.
[0094] When the correlation between the health sensor and the target sensor is nonlinear, such as when the temperature exceeds 60℃, the coefficient of thermal expansion of the material changes, and the relationship between displacement and temperature changes from linear to a quadratic curve. The error of the linear regression model will increase significantly. It is necessary to select a neural network model to balance accuracy and computational load. Taking a single hidden layer neural network as an example, the neural network model fits the nonlinear relationship through the hidden layer and is calculated in two steps: the hidden layer output and the virtual reading of the output layer.
[0095] The hidden layer output transforms a linear input into a non-linear feature. Let the number of hidden layer neurons be n (n is a preset positive integer, such as n=10), then the output of the j-th hidden layer neuron... for:
[0096]
[0097] In the formula, The activation function is used to introduce nonlinearity; the Sigmoid function or ReLU function is commonly used. Let be the weights from the p-th health sensor to the j-th hidden layer neuron; This is the bias term for the j-th hidden layer neuron.
[0098] The output layer virtual reading integrates nonlinear features into the target reading:
[0099]
[0100] In the formula, For output layer bias terms; denoted as the weight from the j-th hidden layer neuron to the output layer.
[0101] It should be noted that the model type should be determined through correlation analysis and goodness-of-fit tests. First, the Pearson correlation coefficient r between the health sensor and the target sensor is calculated, which reflects a linear correlation. The closer the correlation is to 1, the stronger the linear correlation; if all health sensors and target sensors... And linear fitting Choose a linear regression model; if there is a relationship between the health sensor and the target sensor... 8, or linear fitting Choose a neural network model.
[0102] In this embodiment of the invention, the soft measurement model uses historical health sensor data as input and historical target sensor data as output during the training phase, and is trained through supervised learning.
[0103] Specifically, the soft measurement model is not trained in real time, but pre-trained under the condition of the instrument's health. The training process follows supervised learning logic to ensure that the model can accurately map the correlation between the health sensor and the target sensor. The specific process is as follows:
[0104] First, training data is collected, specifically when the precision instrument is started for the first time, during regular maintenance, or when the target sensor is confirmed to be drift-free (determined to be normal by S2). Simultaneously, the health readings of the target sensor are collected as the model's label value, i.e., the true value, and the real-time data of all health sensors are collected as the model's input value. The collected data is preprocessed, including removing outliers such as readings that exceed the sensor's range and reducing noise through moving average filtering to avoid noise affecting the model's training accuracy.
[0105] Then, the training data is split, with the collected health data divided into training and validation sets in a 7:3 or 8:2 ratio. The training set is used to learn the model parameters, such as those for linear regression. , Neural networks , The validation set is used to verify the prediction accuracy of the model and avoid overfitting.
[0106] Next, model parameter learning is performed. Optimization algorithms such as gradient descent are used to minimize the error between the model's predicted values and the true values (i.e., the loss function), thus solving for the optimal parameters. The loss function is expressed as follows:
[0107]
[0108] In the formula, The number of samples in the training set. For the target sensor's true health reading, The predicted value of the model. The smaller the value, the higher the model accuracy. Linear regression can directly solve for the optimal parameters using the least squares method, while neural networks need to iteratively update the weights and biases through backpropagation and gradient descent until the loss function L converges to the preset minimum value.
[0109] Then, model validation and optimization are performed, where the validation metric is calculated using the coefficient of determination on the validation set. The formula is
[0110]
[0111] In the formula, To determine the number of samples in the validation set, The average value of the true values of the target sensor is used to validate the set.
[0112] like (Accuracy not up to standard) Model parameters need to be adjusted, such as increasing the number of neurons in the hidden layer of the neural network, changing the activation function, supplementing with more training data, and retraining until the accuracy is achieved. ,in, Adjust according to the instrument's accuracy requirements.
[0113] Finally, the model is deployed by embedding the trained model (including optimal parameters) into the controller of the precision instrument. After the S2 outputs a "fault signal", the model is directly called, real-time data from the health sensor is input, and virtual readings are output.
[0114] S4: Data source switching step, based on the determination result of the gradual drift fault, the actual reading of the target sensor is... and the virtual reading Perform weighted fusion to generate fused data. In this process, the trust weight of the actual readings of the target sensor is gradually reduced, while the trust weight of the virtual readings is gradually increased.
[0115] True readings of the target sensor In the early stages of drift, some true trends can still be preserved. For example, during slow drift, short-term reading fluctuations are close to the true values and there is no bias in model assumptions. However, as the drift intensifies, systematic errors gradually increase, and long-term reliability decreases. Meanwhile, virtual readings... Based on health sensor data and pre-trained models, drift errors from the target sensor can be avoided, resulting in more reliable long-term trends. However, inherent model errors (such as nonlinear fitting bias) and noise propagation from health sensors exist, potentially leading to slightly lower short-term accuracy compared to healthy states. This step involves using a dynamic weighting factor when the target sensor exhibits slow drift. The actual readings (including drift error) of the target sensor in step S1 are fused with the virtual readings (model predictions) of the soft measurement in step S3 to generate reliable fused data that takes into account both the trend of real data and the accuracy of model predictions.
[0116] In one embodiment of the present invention, the formula for weighted fusion is:
[0117]
[0118] In the formula, This represents the fused data for the k-th sampling point; This represents the actual reading of the target sensor at the k-th sampling point; This is the virtual reading for the soft measurement at the k-th sampling point; The smoothed weight factor for the k-th sampling point. .
[0119] Among them, weighting factors Used for quantification The credibility of The closer to 1, the better. The higher the credibility, The closer to 0, The higher the credibility. The value of is determined by the "fault severity S" determined in step S2; the more severe the fault, the higher the severity. The smaller the dynamic adjustment. The fault severity S is a comprehensive measure of the target sensor drift, based on the residual shift variance calculated in S2. With the second threshold The deviation design (upper limit of normal variance) is given by the following formula:
[0120]
[0121] In the formula, The residual moving variance of the current sampling point in S2; The normal variance threshold set in S2, such as ; The severity of the fault (dimensionless) has a range of values. .
[0122] It needs to decrease monotonically with S to ensure that when the fault worsens... The weights are reduced. A piecewise linear function design can be used (balancing computational simplicity and smooth adjustment), as shown in the following formula:
[0123]
[0124] In the formula, This is the weight decay coefficient; The weight switching threshold is usually set to... That is, when hour, 0, entirely dependent on virtual readings.
[0125] For example, if k=1, ,but: During (medium drift), The actual readings accounted for 70%, while the virtual readings accounted for 30%. (During more severe drift) Actual readings accounted for 20%, while virtual readings accounted for 80%. During (severe drift), It uses virtual readings entirely.
[0126] In this embodiment of the invention, to avoid because Small fluctuations and dramatic changes, such as The mutation from 0.99 to 1.01 resulted in The abrupt change from 0.01 to 0 can be achieved by adding a first-order low-pass filter. The rate of change does not exceed a preset threshold, and the corresponding formula is:
[0127]
[0128] In the formula, The sampling factor is the smoothed sampling factor for the k-th sampling point; The smoothed weighting factor for the (k-1)th sampling point; The original weighting factor (unsmoothed) of the kth sampling point is calculated based on the fault severity S. For smoothing coefficients, The larger the value, the stronger the smoothing effect (the slower the change).
[0129] S5: Error compensation execution step, based on the fused data, calculates the compensation value through a multi-factor error compensation model and outputs it to the actuator of the precision instrument.
[0130] This step, based on the fused data output from step S4, calculates the original compensation amount covering multiple dimensions of errors such as temperature, pressure, and geometry through a multi-factor error compensation model. After preprocessing (smoothing and limiting) and actuator inverse model transformation, it generates actual commands that can directly drive the actuator, ultimately achieving dynamic cancellation of multi-source errors in precision instruments and ensuring the long-term operational accuracy of the instruments.
[0131] Specifically, in one embodiment of the present invention, the error compensation execution step includes the following sub-steps:
[0132] S51: Compensation amount calculation sub-step, input the fused data into the multi-factor error compensation model, and calculate the original compensation amount sequence used to offset the instrument error.
[0133] The multi-factor error compensation model needs to handle multiple typical errors such as temperature error, pressure error, and geometric error simultaneously, and can be extended to other errors such as vibration and humidity. The model is essentially a linear / nonlinear superposition of multiple error terms, ensuring that the compensation amount covers all key factors affecting the accuracy of the instrument.
[0134] Specifically, taking the linear comprehensive model as an example, the formula for the multi-factor error compensation model is as follows:
[0135]
[0136] In the formula, This is the original compensation amount (unprocessed) for the kth sampling point. This is the temperature error compensation coefficient; The temperature error at the kth sampling point (the deviation between the ambient temperature and the standard temperature) is given. , Real-time ambient temperature (collected by health sensors). Standard temperature, such as 25℃; This is the pressure error compensation coefficient; The pressure error at the k-th sampling point (the deviation between the actual pressure and the standard pressure) , For real-time pressure (collected by health sensors). Standard pressure, such as 101.3 kPa; This is the geometric error compensation coefficient, obtained through calibration. It represents the compensation amount required for every 1mm change in geometric deviation (such as guide rail parallelism or lead screw pitch error). For example, if a 1mm deviation in guide rail parallelism results in a 0.3μm positioning error, then... ; The geometric error of the k-th sampling point is calculated based on the pre-calibration curve of the instrument's mechanical structure, using the current fused data. Interpolation calculation, such as geometric deviation when the spindle displacement is 100mm. ; This is the data fusion bias compensation coefficient, which can be taken as 1 or close to 1. It is used to directly compensate for the deviation between the fused data and the theoretical target value. If the target displacement is 1000μm and the fused data is 998μm, then the deviation is 2μm. The corresponding compensation is 2μm; The theoretical target value of the instrument at the kth sampling point, such as the target displacement or target temperature, is set by the instrument control command or measurement requirements, such as the programming position of a CNC lathe or the set temperature of a constant temperature chamber. This represents the fused data for the k-th sampling point.
[0137] For example, if the theoretical target displacement of the CNC lathe spindle... S4 outputs fused data Meanwhile, temperature error , (Temperature rise causes shaft elongation, requiring reverse compensation); Pressure error , Geometric error , ; The calculated original compensation amount This indicates that the spindle needs to be driven to move in the opposite direction by 0.88 μm (the negative sign indicates that it is opposite to the positive direction of displacement) to compensate for temperature, pressure, geometric errors and fusion data deviations, so that the actual displacement is close to 1000.000 μm.
[0138] S52: Compensation amount preprocessing sub-step, smoothing the original compensation amount sequence and limiting its rate of change to generate smooth compensation amount.
[0139] Specifically, the compensation amount preprocessing sub-step includes:
[0140] First, the original compensation sequence is processed using an S-curve acceleration / deceleration algorithm to obtain the smooth compensation amount. S-curve smoothing uses a piecewise function consisting of acceleration, constant speed, and deceleration segments to ensure a smooth transition of the compensation amount from its initial value to the target value, avoiding the "sudden start / stop" problem of linear compensation. Specifically, the compensation amount transitions smoothly from its initial value to the target value using a piecewise function that divides the compensation into acceleration, constant speed, and deceleration segments. Rise to For example:
[0141]
[0142] In the formula, To speed up the process; , is the deceleration time; This refers to the acceleration during the acceleration phase. This refers to the deceleration during the deceleration phase. This is the maximum compensation speed during the uniform velocity phase; , , For each stage's time nodes, satisfy .
[0143] Then, it is determined whether the rate of change of the smoothing compensation amount exceeds the safety threshold allowed by the system's mechanical structure; if it does, the rate of change of the smoothing compensation amount is limited.
[0144] The smoothed compensation amount needs to be further checked for its rate of change per unit time. If it exceeds the safety threshold allowed by the mechanical structure... Such as the maximum adjustment rate of the lead screw Then, forced amplitude limiting is applied, as shown in the following formula:
[0145]
[0146] In the formula, The sampling period is consistent with steps S1 to S4, such as... ; This is the smoothing compensation amount for the (k-1)th sampling point; This is a mechanical safety threshold, specified by the manufacturer, such as the maximum allowable displacement change rate of the guide rail being 3μm / s.
[0147] For example, if the original compensation amount from Mutation ( ), rate of change far exceeding After smoothing by the S-curve, the compensation amount is in Accelerate to , constant speed, Decelerate to The rate of change is the largest. ( No additional limiting is required; the smoothing compensation amount is output directly. To avoid vibration caused by sudden spindle movement.
[0148] S53: Actuator inverse compensation sub-step, inputting the smooth compensation amount into the inverse model pre-calibrated for the actuator to calculate the actual drive command.
[0149] The input-output characteristics of actuators (such as servo motors, piezoelectric ceramics, and thermoelectric coolers) are often nonlinear, such as motor dead zone and piezoelectric ceramic hysteresis. It is necessary to use a pre-calibrated inverse model to convert the smooth compensation amount into a precise drive command to ensure that the actual action of the actuator is consistent with the theoretical compensation amount.
[0150] Specifically, taking a servo motor as an example, the driving command of a servo motor is the number of pulses. The inverse model needs to establish a mapping between the smooth compensation amount (displacement) and the number of pulses. The formula for the actuator inverse model is:
[0151]
[0152] In the formula, This represents the number of motor drive pulses (an instruction that the actuator can recognize) at the k-th sampling point. For motor encoder resolution, such as Pulse / Revolution; For the ball screw lead, such as That is, for every one revolution of the motor, the lead screw moves 5mm; This refers to the number of dead-time pulses for the motor, such as... The motor needs to receive ≥5 pulses to start rotating, to avoid missing responses to minor commands. For symbolic functions, When it is 1, The time is -1 to ensure that the pulse direction is consistent with the compensation direction.
[0153] For example, if the smoothing compensation amount , Pulse / Revolution , Pulse, then: The pulse indicates that 25 positive pulses are output to the servo motor, the motor rotates 25 / 1000=0.025 revolutions, and the lead screw moves 0.025×5=0.1mm (100μm), which is perfectly matched with the smoothing compensation amount and overcomes the dead zone effect.
[0154] S54: Instruction output sub-step, output the actual driving instruction to the actuator.
[0155] In this embodiment of the invention, a calibration step is also included: retraining the soft measurement model and updating the multi-factor error compensation model during the startup or periodic maintenance of the precision instrument. By retraining the soft measurement model and updating the parameters of the multi-factor error compensation model during the initial startup or periodic maintenance phase of the instrument, this invention eliminates the attenuation of compensation accuracy caused by instrument aging, environmental changes, model drift, etc., ensuring that the entire self-compensation system remains in an optimal working state over the long term.
[0156] experiment:
[0157] I. Experimental Equipment and Environment
[0158] (1) Experimental object: High-precision CNC lathe spindle displacement system, with a positioning accuracy requirement of ±1μm. The target sensor is a laser displacement sensor, model Keyence IL-600; the health sensors are a coaxial grating ruler (model Heidenhain LS187), a cavity temperature sensor (model PT1000), and an environmental pressure sensor (model Sensirion SDP810).
[0159] (2) Standard calibration equipment: laser interferometer, model Renishaw XL-80, accuracy ±0.5μm, used to calibrate the true displacement of the spindle;
[0160] (3) Environmental control equipment: constant temperature and humidity chamber, controllable temperature range 15-40℃, accuracy ±0.5℃; pressure regulating device, controllable pressure range 95-105kPa, accuracy ±0.1kPa;
[0161] (4) Data acquisition equipment: data acquisition card, model NI cDAQ-9178, sampling frequency 100Hz, 16-bit resolution.
[0162] II. Experimental Parameter Setting
[0163] (1) Basic parameters: sampling period The length of the moving window for gradual drift detection is N=50, and the fault determination threshold (first threshold) is... Continuous period M=10; second threshold (Continuous period N=8)
[0164] (2) Soft measurement model: A single hidden layer neural network was used (the input is the grating ruler reading, temperature, and pressure; the number of hidden layer neurons n=10; the activation function is ReLU; the training set is 1000 sets of health status data; and the validation set is...). );
[0165] (3) Weighted fusion parameters: weight decay coefficient k=1, switching threshold Smoothing coefficient ;
[0166] (4) Multi-factor compensation model: temperature error coefficient Pressure error coefficient Geometric error coefficient fusion data deviation coefficient .
[0167] III. Experimental Procedure
[0168] (1) Experimental preparation (0-30 min)
[0169] Place the CNC lathe in a constant temperature and humidity chamber, set the initial ambient temperature to 25℃ and the pressure to 101.3kPa, and let it stand for 30 minutes to allow the equipment to thermally stabilize.
[0170] The true value of the spindle displacement within the range of 0-500mm was calibrated using a laser interferometer and used as the benchmark for error calculation.
[0171] Start the self-compensation system of the present invention and initialize the soft measurement model parameters and multi-factor compensation model coefficients.
[0172] (2) Control group experiment (no self-compensation, 60 min)
[0173] Turn off the self-compensation system and control the spindle to run along the preset trajectory (0→100→200→300→400→500→0mm, cycle 5 times).
[0174] Record the actual displacement calibrated by the laser interferometer every 1 minute. Target sensor readings Calculate positioning error ;
[0175] The environment was gradually adjusted during the experiment: the temperature was increased to 30℃ at 10 min, the pressure was increased to 103 kPa at 30 min, and the initial environment was restored at 45 min to simulate multi-factor interference.
[0176] (3) Experimental group experiment (self-compensation enabled, 60 min)
[0177] Maintain the same spindle running trajectory and environmental interference conditions as the control group, and activate the self-compensation system;
[0178] Data acquisition (S1): Real-time acquisition of historical reading sequences of target sensors (length n=200) and real-time data from health sensors (grating ruler, temperature, pressure);
[0179] Slow drift detection (S2): At the 5th minute, a slow drift is manually injected into the target sensor (by adjusting the sensor mounting bracket, the reading deviates from the true value at a rate of 0.01 μm / min), and the system calculates the residual shift variance. and rate of change At the 15th minute ( Eight consecutive cycles of over , 10 consecutive cycles of over Determine if a drift fault is detected;
[0180] Soft Measurement Reconstruction (S3): After fault diagnosis, the soft measurement model is started, and health sensor data is input to generate virtual readings. ;
[0181] Weighted fusion (S4): Dynamically adjusts weights based on the severity S of the fault. (15min , ; 30 minutes , ;The 45th minute , Computational fusion data ;
[0182] Error compensation (S5): Input a multi-factor compensation model, and smooth it using an S-curve ( , ) and rate of change limit ( After that, the drive command is output to the servo motor;
[0183] Record the actual displacement calibrated by the laser interferometer every 1 minute. Data integration Calculate the error after compensation .
[0184] IV. Experimental Data and Results Analysis
[0185] (1) Experimental data
[0186] Table 1 shows the error comparison data between the control group and the experimental group.
[0187] Experiment time (min) Environmental conditions (temperature / pressure) Control group: No self-compensation error (μm) Experimental group: Error after compensation (μm) Instrument's permissible accuracy threshold (μm) Key event labeling 0 25℃ / 101.3kPa 0.7 0.3 ±1 Experiment started, system initialization 5 25℃ / 101.3kPa 0.8 0.3 ±1 Slow drift of artificially injected sensor (0.01 μm / min) 10 27℃ / 101.3kPa 1.1 0.4 ±1 Temperature begins to rise, drift continues 15 30℃ / 101.3kPa 1.5 0.5 ±1 The system detected a drift fault and initiated soft measurement. 20 30℃ / 102.0kPa 1.8 0.5 ±1 The pressure started to rise 25 30℃ / 102.5kPa 2.1 0.6 ±1 Multiple factors exacerbate the problem. 30 30℃ / 103.0kPa 2.3 0.6 ±1 The most severe moment due to the superposition of multiple factors 35 28℃ / 103.0kPa 2.2 0.5 ±1 Temperatures began to drop 40 26℃ / 102.0kPa 2.0 0.5 ±1 The pressure began to fall. 45 25℃ / 101.3kPa 1.9 0.4 ±1 Even after the environment returns to its initial state, drift still exists. 50 25℃ / 101.3kPa 1.7 0.4 ±1 The soft measurement model continues to run 55 25℃ / 101.3kPa 1.5 0.3 ±1 Drift fault resolved (manual sensor correction) 60 25℃ / 101.3kPa 1.2 0.3 ±1 Experiment ended
[0188] like Figure 3 As shown, the localization error curves of the control group and the experimental group are presented, in conjunction with Table 1 and... Figure 3 Analysis shows that the multi-factor error self-compensation scheme of this invention can significantly improve the anti-interference capability and long-term operating accuracy of precision instruments. Without self-compensation, the instrument is affected by the combined effects of sensor drift and temperature / pressure fluctuations, resulting in a maximum positioning error of 2.3 μm, exceeding the allowable threshold by 130%, which cannot meet the requirements of high-precision scenarios. However, after enabling self-compensation, the error remains stable at 0.3-0.6 μm throughout the process, with the maximum error being only 26% of the peak value of the control group. Moreover, it can still accurately control the error even in the most severe scenario with multiple factors superimposed (30℃+103kPa), proving that the scheme can effectively counteract multi-source interference and ensure the accuracy of the instrument.
[0189] Table 2 shows the data from the gradual drift detection.
[0190] Experiment time (min) Target sensor reading (μm) Health sensor (grating ruler) reading (μm) residual (μm) Residual moving variance (μm²) rate of change of variance (%) Does it meet the "double exceedance" (rate of change exceeds) requirement? =5% and variance exceeds =0.03μm²) 0 1000.0 1000.0 0.0 0.010 - no 5 1000.05 1000.0 0.05 0.012 20.0 No (variance not exceeded) ) 10 1000.25 1000.0 0.25 0.020 66.7 No (variance not exceeded) ) 12 1000.35 1000.0 0.35 0.025 25.0 No (variance not exceeded) ) 14 1000.45 1000.0 0.45 0.029 16.0 No (variance close) (Not continuously exceeding limits) 15 1000.50 1000.0 0.50 0.032 10.3 Yes (the rate of change exceeds 5% for 10 consecutive periods, and the variance exceeds 5% for 8 consecutive periods). ) 20 1000.75 1000.0 0.75 0.045 40.6 yes 30 1010.00 1000.0 1.00 0.068 51.1 yes 45 1011.20 1000.0 1.20 0.082 20.6 yes 55 1000.10 1000.0 0.10 0.022 -73.2 No (drift fault resolved, variance returns to normal) 60 1000.05 1000.0 0.05 0.011 -50.0 no
[0191] like Figure 4 As shown, this is a graph of the moving variance of the residuals, combined with Table 2 and... Figure 4 Analysis shows that the slow drift detection (residual moving variance and dual over-limit judgment) of this invention has both accuracy and timeliness, and can effectively identify slow drift faults in sensors. After 5 minutes of drift injection, the system dynamically tracks the drift trend through residual moving variance. At 15 minutes, it accurately meets the dual conditions of a change rate exceeding 5% for 10 consecutive cycles and a variance exceeding 0.03μm² for 8 consecutive cycles. From drift injection to fault judgment, it only takes 10 minutes, with no missed or false judgments. Moreover, when there is no drift, the variance is stable at 0.01-0.012μm², with no false alarms. This indicates that the detection mechanism can capture slow drift faults and ensure stability during normal operation, providing a reliable basis for subsequent data switching.
[0192] Table 3 shows the data fusion smoothing line data.
[0193] Experiment time (min) Severity of the fault (S) Weighting factors (Trust weight of true readings) Actual reading of the target sensor (μm) Virtual reading of soft measurement (μm) Data fusion (μm) Fluctuation amplitude of fused data (μm) 0 0 1.0 1000.0 - 1000.0 - 5 0.1 0.9 1000.05 1000.02 1000.047 0.047 10 0.2 0.8 1000.25 1000.05 1000.210 0.163 15 0.3 0.7 1000.50 1000.10 1000.380 0.170 20 0.5 0.5 1000.75 1000.15 1000.450 0.070 30 0.8 0.2 1010.00 1000.20 1000.360 0.090 45 1.2 0.0 1011.20 1000.25 1000.250 0.110 55 0.1 0.9 1000.10 1000.03 1000.093 0.157 60 0 1.0 1000.05 - 1000.050 0.043
[0194] like Figure 5 As shown, the graphs represent the actual readings of the target sensor, the virtual readings of the soft measurement system, and the fused data, in conjunction with Table 3 and... Figure 5 Analysis shows that the dynamic weighted fusion design of this invention can achieve seamless switching of data sources, ensuring data continuity and reliability. The weighting factor α decreases monotonically with the severity of the fault S, accurately matching the trust ratio of real and virtual readings; even if the real reading of the target sensor deviates by a maximum of 11.2 μm, the fluctuation amplitude of the fused data is always ≤0.17 μm, without abrupt changes; and after the fault is cleared... The smooth rise from 0.0 to 0.9, and the stable return of the fused data to the true reading, demonstrate that the present invention effectively avoids drift errors and data mutation risks, prevents impact on the actuator, and adapts to the data source management needs throughout the instrument's entire lifecycle.
[0195] According to embodiments of the present invention, a multi-factor error self-compensation method for precision instruments achieves dynamic self-compensation of multi-factor errors in precision instruments through a closed-loop process of data acquisition, gradual drift detection, soft measurement reconstruction, weighted fusion, and error compensation. It accurately identifies the gradual drift of the target sensor based on residual moving variance, generates reliable virtual readings by combining a pre-trained soft measurement model, balances the advantages of real and virtual data through dynamic weighted fusion, and finally eliminates errors such as temperature, pressure, and geometry using a multi-factor compensation model. This significantly improves the long-term operating accuracy of the instrument, reduces the frequency of manual calibration, and lowers maintenance costs.
[0196] Corresponding to the multi-factor error self-compensation method for precision instruments in the above embodiments, the present invention also proposes a multi-factor error self-compensation system for precision instruments.
[0197] like Figure 2 As shown, the multi-factor error self-compensation system for precision instruments according to an embodiment of the present invention includes a data acquisition module, a gradual drift detection module, a soft measurement data reconstruction module, a data source switching module, and an error compensation execution module.
[0198] The data acquisition module is used to acquire readings from multiple sensors of the precision instrument in real time, including historical reading sequences of the target sensor and real-time data from other health sensors. The gradual drift detection module is used to calculate the residual moving variance between the reading of the target sensor and the reading of at least one of the other health sensors based on the historical reading sequence of the target sensor and the real-time data of the other health sensors. Based on the long-term trend of the residual moving variance, it determines whether the target sensor has a gradual drift fault. The soft measurement data reconstruction module is used to activate the soft measurement model when the target sensor is determined to have a gradual drift fault. Using the real-time data of the other health sensors as input, it calculates the virtual reading of the target sensor through a pre-trained regression algorithm. The data source switching module is used to perform weighted fusion of the real reading of the target sensor and the virtual reading based on the determination result of the gradual drift fault to generate fused data. The trust weight of the real reading of the target sensor is gradually reduced, while the trust weight of the virtual reading is gradually increased. The error compensation execution module is used to calculate the compensation value based on the fused data through a multi-factor error compensation model and output it to the actuator of the precision instrument.
[0199] According to an embodiment of the present invention, a multi-factor error self-compensation system for precision instruments achieves dynamic self-compensation of multi-factor errors in precision instruments through a closed-loop process of data acquisition, gradual drift detection, soft measurement reconstruction, weighted fusion, and error compensation. It accurately identifies the gradual drift of the target sensor based on residual moving variance, generates reliable virtual readings by combining a pre-trained soft measurement model, balances the advantages of real and virtual data through dynamic weighted fusion, and finally eliminates errors such as temperature, pressure, and geometry using a multi-factor compensation model. This significantly improves the long-term operating accuracy of the instrument, reduces the frequency of manual calibration, and lowers maintenance costs.
[0200] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0201] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0202] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0203] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0204] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it includes one or a combination of the steps of the method embodiments.
[0205] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0206] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A multi-factor error self-compensation method for precision instruments, characterized in that, Includes the following steps: S1: Data acquisition step, real-time acquisition of readings from multiple sensors of the precision instrument, including historical reading sequences of the target sensor and real-time data from other health sensors; S2: Gradual drift detection step, based on the historical reading sequence of the target sensor and the real-time data of the other health sensors, calculate the residual moving variance between the reading of the target sensor and the reading of at least one of the other health sensors; determine whether the target sensor has a gradual drift fault based on the long-term trend of the residual moving variance. S3: Soft measurement data reconstruction step: When it is determined that the target sensor has a slow drift fault, the soft measurement model is started; using the real-time data of the other health sensors as input, the virtual reading of the target sensor is calculated through a pre-trained regression algorithm; S4: Data source switching step, based on the determination result of the gradual drift fault, weighted fusion of the real readings and the virtual readings of the target sensor to generate fused data; wherein, the trust weight of the real readings of the target sensor is gradually reduced, while the trust weight of the virtual readings is gradually increased; S5: Error compensation execution step, based on the fused data, calculates the compensation value through a multi-factor error compensation model and outputs it to the actuator of the precision instrument.
2. The multi-factor error self-compensation method for precision instruments according to claim 1, characterized in that, The steps for calculating the moving variance of the residuals include: Calculate the sequence of differences between the readings of the target sensor and the readings of at least one of the other health sensors. The difference is the residual at the i-th sampling point, calculated using the following formula: In the formula, The residual of the i-th sampling point; The reading of the target sensor at the i-th sampling point; For at least one of the other health sensors in the first Readings from each sampling point; The formula for calculating the average residual within the window is as follows: In the formula, The average residual within the sliding window corresponding to the kth sampling point; k is the current sampling point index; N is the sliding window length; Based on the average residual within the window The formula for calculating the moving variance of the residuals is as follows: In the formula, Let be the residual moving variance of the k-th sampling point.
3. The multi-factor error self-compensation method for precision instruments according to claim 2, characterized in that, Determining whether the target sensor has a gradual drift fault includes: Monitor the rate of change of the residual moving variance over a preset time period; If the rate of change exceeds the first threshold for M consecutive sampling periods, and the residual moving variance exceeds the second threshold for N consecutive sampling periods, then the target sensor is determined to have a slow drift fault; where M and N are preset positive integers.
4. The multi-factor error self-compensation method for precision instruments according to claim 1, characterized in that, The soft measurement model uses a pre-trained regression algorithm, which is either a neural network model or a linear regression model. The soft measurement model uses historical health sensor data as input and historical target sensor data as output during the training phase, and is trained through supervised learning.
5. The multi-factor error self-compensation method for precision instruments according to claim 1, characterized in that, The formula for weighted fusion is: In the formula, This represents the fused data for the k-th sampling point; This represents the actual reading of the target sensor at the k-th sampling point; This is the virtual reading for the soft measurement at the k-th sampling point; The smoothed weight factor for the k-th sampling point. .
6. The multi-factor error self-compensation method for precision instruments according to any one of claims 1-5, characterized in that, The error compensation execution steps specifically include the following sub-steps: S51: Compensation amount calculation sub-step, input the fused data into the multi-factor error compensation model, and calculate the original compensation amount sequence used to offset the instrument error; S52: Compensation amount preprocessing sub-step, smoothing the original compensation amount sequence and limiting its rate of change to generate smooth compensation amount; S53: Actuator inverse compensation sub-step, inputting the smooth compensation amount into the inverse model pre-calibrated for the actuator to calculate the actual drive command; S54: Instruction output sub-step, output the actual driving instruction to the actuator.
7. The multi-factor error self-compensation method for precision instruments according to claim 6, characterized in that, The compensation amount preprocessing sub-step specifically includes: The original compensation quantity sequence is processed using the S-curve acceleration / deceleration algorithm to obtain the smooth compensation quantity; Determine whether the rate of change of the smoothing compensation exceeds the safety threshold allowed by the system's mechanical structure; If the change rate of the smoothing compensation amount is exceeded, then the change rate is limited.
8. A multi-factor error self-compensation system for precision instruments, characterized in that, include: The data acquisition module is used to acquire readings from multiple sensors of the precision instrument in real time, including historical reading sequences of the target sensor and real-time data from other health sensors. The gradual drift detection module is used to calculate the residual moving variance between the reading of the target sensor and the reading of at least one of the other health sensors based on the historical reading sequence of the target sensor and the real-time data of the other health sensors; and to determine whether the target sensor has a gradual drift fault based on the long-term trend of the residual moving variance. The soft measurement data reconstruction module is used to activate the soft measurement model when it is determined that the target sensor has a slow drift fault; Using real-time data from the other health sensors as input, a pre-trained regression algorithm is used to calculate the virtual reading of the target sensor; The data source switching module is used to perform weighted fusion of the real readings and the virtual readings of the target sensor based on the determination result of the gradual drift fault, so as to generate fused data; wherein, the trust weight of the real readings of the target sensor is gradually reduced, while the trust weight of the virtual readings is gradually increased. The error compensation execution module is used to calculate the compensation value based on the fused data through a multi-factor error compensation model and output it to the execution mechanism of the precision instrument.
Citation Information
Patent Citations
Unsupervised anomaly detection method for energy storage battery sensor system
CN120011991A
Abnormality detection method of conditional variation encoder based on wavelet convolution
CN120105289A