A servo motor thermal drift real-time compensation control method for high-temperature robots

CN122908674APending Publication Date: 2026-10-13HANGZHOU SPECTRUM SEMICON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611400453.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0007]发明目的:本发明的目的在于提供一种用于高温机器人的伺服电机热漂移实时补偿控制方法;能够解决现有技术中特征提取层次单一、模型表达能力有限、缺乏动态演化趋势建模以及多传感器信息融合不充分的问题

Benefits of technology

1. 多层次深度特征提取,显著提升热漂移建模精度

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122908674A_ABST
    Figure CN122908674A_ABST
Patent Text Reader

Abstract

The application discloses a kind of servo motor thermal drift real-time compensation control method for high temperature robot, belong to industrial automation and motor control technical field, including the following steps: S1, temperature sensor deployment: deployment first temperature sensor T1, second temperature sensor T2, third temperature sensor T3;S2, offline calibration and historical data acquisition: the motor is placed in temperature control box, with preset temperature step from normal temperature gradually heated to highest working temperature, after being stationary at each temperature point for a predetermined time, the encoder original angle output value, high-precision reference angle value and T1, T2, T3 temperature value are recorded simultaneously, to constitute historical calibration dataset.Heat drift evolution trend and dynamic compensation correction feature: introduce multi-head self-attention mechanism, automatically focus on the most information time segment in historical sequence;Adopt BiGRU bidirectional sequence modeling, simultaneously utilize forward and backward context information, capture long-term dependence trend of heat drift evolution with time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of industrial automation and motor control technology, and in particular to a real-time compensation control method for thermal drift of servo motors used in high-temperature robots. Background Technology

[0002] In heavy industrial settings such as metallurgy, chemical engineering, and power generation, robots need to perform precision inspection or operational tasks in environments with sustained temperatures above 80°C. However, high temperatures significantly impact the core feedback components of servo systems—encoders (such as incremental photoelectric encoders and magnetic encoders) or Hall effect sensors. Thermal expansion effect: The encoder disk and the read head have different coefficients of thermal expansion, which causes zero-point offset. Electron drift: The sensitivity of the Hall element and the amplifier bias voltage change with temperature, causing gain and zero bias drift; Magnet demagnetization: The magnetic flux density of permanent magnets decreases at high temperatures, affecting the output amplitude of the magnetic encoder.

[0003] These effects together cause a nonlinear deviation between the position feedback signal and the actual mechanical angle. Traditional PID controllers cannot distinguish whether this deviation is "real displacement" or "thermally induced spurious displacement", which often manifests as: (1) positioning overshoot or oscillation; (2) increased steady-state error; (3) in extreme cases, loss of control due to integral saturation.

[0004] In existing technologies, the solutions mainly include: Hardware temperature resistance upgrade: ceramic encoder and high temperature Hall chip are used, but the cost is high and drift cannot be completely eliminated; Periodic shutdown for calibration: Calibration procedures are inserted between tasks, sacrificing operational continuity; Software post-processing compensation: A fixed offset is subtracted in the motion controller, but it cannot adapt to dynamic temperature changes.

[0005] The main shortcomings of existing technologies are: Single-level feature extraction: Existing methods usually only look up the table directly based on the temperature value or perform simple linear fitting, lacking the ability to mine deep features in temperature-location error data; Limited model expressive power: Existing compensation models mostly use simple lookup table methods or shallow neural networks, which are insufficient in modeling accuracy for complex thermal drift behavior; Lack of dynamic evolution characteristics: Existing methods only focus on the static drift amount under the current temperature state, ignoring the dynamic evolution trend of thermal drift; Insufficient fusion of multi-sensor information: Existing methods usually only use a single temperature sensor or simply take the average of multiple sensors, failing to fully explore the collaborative correlation information between multi-sensor data.

[0006] Therefore, there is an urgent need for a low-cost, real-time, peripheral-free thermal drift feedforward compensation method with deep feature mining capabilities. Summary of the Invention

[0007] Purpose of the invention: The purpose of this invention is to provide a real-time compensation control method for thermal drift of servo motors in high-temperature robots; it can solve the problems of single feature extraction level, limited model expression ability, lack of dynamic evolution trend modeling, and insufficient fusion of multi-sensor information in the prior art.

[0008] Technical Solution: To solve the above-mentioned technical problems, according to one aspect of the present invention, more specifically, a real-time compensation control method for thermal drift of servo motors in high-temperature robots, comprising the following steps: S1. Temperature sensor deployment: Deploy the first temperature sensor T1, the second temperature sensor T2, and the third temperature sensor T3; S2. Offline calibration and historical data acquisition: Place the motor in a temperature control chamber and gradually increase the temperature from room temperature to the maximum operating temperature in a preset temperature step. After standing still for a preset time at each temperature point, synchronously record the encoder's original angle output value, high-precision reference angle value, and temperature values ​​of T1, T2, and T3 to form a historical calibration dataset. S3. Historical data preprocessing: Preprocess the historical calibration dataset to obtain the preprocessed standardized dataset; S4. Deep Feature Extraction: Extract time-domain and frequency-domain fusion features, temperature gradient correlation and multi-sensor collaborative features, thermal drift evolution trend and dynamic compensation correction features from the preprocessed standardized dataset in sequence. S5. Model Training: Based on the thermal drift evolution trend and dynamic compensation correction characteristics, train the thermal drift compensation prediction model. After training, store the model parameters in the non-volatile memory of the local signal conditioning module LSCM. S6. Real-time Acquisition and Preprocessing: During the online operation of the motor, the LSCM synchronously acquires the original angle from the encoder. The temperature values ​​of T1, T2, and T3 are recorded and preprocessed in real time. S7. Model Inference: Extract the real-time thermal drift evolution trend and dynamic compensation correction characteristics of the preprocessed data, input them into the thermal drift compensation prediction model, and output the encoder zero-bias drift amount in real time. and gain drift factor ; S8, Feedforward Correction Calculation: Through... and Feedforward correction calculation , thereby obtaining the corrected position signal; S9. Filtering and Output: The low-pass filtered position signal is sent to the motion controller through the high-speed communication interface; S10, Closed-loop control: The motion controller performs position closed-loop control and no longer senses the original thermal drift.

[0009] Furthermore, the historical data preprocessing in step S3 specifically includes: outlier removal, missing value imputation, time series alignment, and normalization. Outlier Removal: A statistical method based on interquartile range (IQR) is used to detect and remove outliers from the historical calibration dataset. For the encoder's raw angle output value sequence at each temperature point, its first quartile is calculated. and the third and fourth quartiles It will exceed Data within a certain range is marked as outliers and removed, where ; Missing value imputation: To fill the data gaps caused by outlier removal, cubic spline interpolation is used. With adjacent valid data points as constraints, a piecewise cubic polynomial function is constructed to ensure that the interpolation curve has a second continuous derivative at the nodes. Time series alignment: Temperature data and encoder angle data from different sampling channels are aligned to a unified time base using timestamps, and linear interpolation is used to resample the data from each channel to a unified sampling rate; Normalization: Perform Z-score standardization on the aligned data. The calculation formula is as follows: in, The original data values, Let be the mean of this data series. The standard deviation of the data sequence is used to obtain the preprocessed standardized dataset.

[0010] Furthermore, the time-domain and frequency-domain fusion feature extraction in step S4 specifically includes: S411. Time-domain statistical feature extraction: For the preprocessed standardized dataset, calculate the following time-domain statistical features segmented by temperature range: Mean of the temperature-angle deviation sequence Standard deviation skewness and kurtosis ; Root mean square value of the first-order difference sequence of temperature sensor readings , , , characterizing the rate of temperature change; Autocorrelation coefficient sequence of temperature-angle deviation series ,in The lag order is... The maximum lag order; The above time-domain statistical features are concatenated to form time-domain features. ; S412. Frequency Domain Transform Feature Extraction: Perform a Fast Fourier Transform (FFT) on the temperature-angle deviation sequence in the preprocessed standardized dataset to obtain the frequency domain amplitude spectrum, and extract the following frequency domain features: The front of the amplitude spectrum The amplitude of each dominant frequency component and corresponding frequency ; Frequency domain energy distribution ratio ,in Low-frequency energy, Total energy across the entire frequency band; Spectral centroid frequency ; The above frequency domain features are concatenated to form frequency domain features. ; S413, Time-domain characteristics and frequency domain features By splicing the data, the time-domain and frequency-domain fused features are obtained. .

[0011] Furthermore, the temperature gradient correlation and multi-sensor collaborative feature extraction in step S4 specifically includes: S421. Nonlinear mapping calculation: fusing time and frequency domain features. Mapping is performed through a learnable nonlinear transformation layer, and the calculation formula is as follows: in, This is the weight matrix of the first nonlinear transformation layer. For bias vectors, The GELU activation function is calculated as follows: in, The cumulative distribution function of the standard normal distribution; S422, Temperature gradient correlation feature calculation: based on nonlinear mapping output Calculate the temperature gradient coupling characteristics: Temperature gradient characteristics between T1 and T2: , ; Temperature gradient characteristics between T2 and T3: , ; Constructing a temperature gradient vector Through the weight matrix After linear transformation and nonlinear mapping output Element-wise multiplication yields the temperature gradient correlation features: in, This represents element-wise multiplication. It is the bias vector; S423. Multi-sensor collaborative feature computation: based on time-domain and frequency-domain fusion features Construct a multi-sensor collaborative feature matrix: from Extract feature vectors related to T1, T2, and T3 respectively. , , ; Calculate the cross-correlation feature matrix between sensors ,in , , This represents the Pearson correlation coefficient; cross-correlation characteristic matrix Vectorization is performed, and multi-sensor collaborative features are obtained through transformation using a fully connected layer: in, This represents the matrix vectorization operation. This is the weight matrix. It is the bias vector; S424. Associate temperature gradient with features and multi-sensor collaborative features The data is stitched together, and temperature gradient correlation and multi-sensor collaborative features are obtained by fusing fully connected layers. in, To fuse the weight matrix, This is the fusion bias vector.

[0012] Furthermore, the extraction of thermal drift evolution trend and dynamic compensation correction features in step S4 specifically includes: S431, Attention-weighted computation: For temperature gradient correlation and multi-sensor collaborative features Perform multi-head self-attention mechanism computation: Will The query vector is generated through three independent linear transformations. Key vector Sum value vector ,in , , These are the weight matrices for the query, key, and value, respectively. Will , , Divided into The first point of attention, the first The size is calculated as follows: in, For each head dimension, It is a normalized exponential function; After concatenating the outputs of all heads, a linear transformation is performed: in, To output the weight matrix, This is the output bias vector; S432, Residual Enhancement Calculation: Attention-Weighted Output Correlation with temperature gradient and multi-sensor collaborative features Perform residual join: in, For layer normalization, the calculation formula is: in, and For learnable parameters, To prevent division by zero of small constants; S433, Thermal drift evolution trend feature extraction: Features after residual enhancement Sequence modeling using a bidirectional gated recurrent unit (BiGRU) network: Forward GRU computation: ,in To update the door, This is the candidate hidden state; Backward GRU computation: ; Concatenate the forward and backward outputs: To obtain the characteristics of thermal drift evolution trend; S434, Dynamic Compensation Correction Feature Extraction: Extracting thermal drift evolution trend features Transformation is performed using a feedforward neural network (FFN): in, , This is the weight matrix of the feedforward neural network. , For bias vectors, To modify the activation function of the linear unit; S436, Final Feature Fusion: Integrating Thermal Drift Evolution Trend Features and dynamic compensation correction features Weighted fusion was performed to obtain the thermal drift evolution trend and dynamic compensation correction characteristics: in, These are learnable fusion weight coefficients, with values ​​ranging from [value range missing]. .

[0013] Furthermore, the training of the thermal drift compensation prediction model in step S5 specifically includes: S51. Model Structure: The thermal drift compensation prediction model includes an input layer, a hidden layer, and an output layer. The input layer receives the thermal drift evolution trend and dynamic compensation correction features. Output layer encoder zero offset drift and gain drift factor The hidden layers adopt a multilayer perceptron structure, with batch normalization layers and Dropout regularization layers between each hidden layer; S52. Loss Function Design: Using a composite loss function Model training: in, For mean square error loss, The number of samples; For physical constraint loss, This is the theoretical value of zero-bias drift calculated based on the thermal expansion physical model, used to constrain the model output to conform to physical laws; L2 regularization loss is used to prevent model overfitting; , , These are the weighting coefficients for each loss term, and ; S53. Training Strategy: The AdamW optimizer is used for parameter optimization, and the learning rate adopts a cosine annealing scheduling strategy. The initial learning rate is set to... In the The learning rate for each training round is: in, To minimize the learning rate, This represents the total number of training rounds. S54. Model Validation: Divide the dataset into training, validation, and test sets according to a preset ratio. Use K-fold cross-validation to evaluate the model's generalization performance. When the validation set loss is continuous... If the loss does not decrease in any round, an early stopping mechanism is triggered to save the model parameters at the point where the validation set loss is lowest.

[0014] Furthermore, the feedforward correction calculation formula in step S8 is as follows: in, This is the encoder's original angle output value. This represents the encoder zero-bias drift predicted by the model. The gain drift factor predicted by the model. This is the corrected position signal.

[0015] Furthermore, the method also includes a thermal early warning protection step: When the temperature value of T1 exceeds the preset safety threshold When the LSCM sends a thermal warning signal to the motion controller, the motion controller, upon receiving the thermal warning signal, executes one or a combination of the following safety policies: Reduce the position closed-loop control bandwidth, lowering the control bandwidth from the normal value to a safe value; Switch to force control mode to replace position control with torque control; Activate the active cooling mechanism, increase the cooling fan speed, or start the liquid cooling cycle.

[0016] Furthermore, the low-pass filtering process in step S9 employs a first-order IIR low-pass digital filter, whose difference equation is: in, The corrected position signal input at the current time , This is the filtered position signal output at the current moment. This is the filtered position signal output from the previous moment. These are the filter coefficients. , The sampling period is is the filter time constant.

[0017] According to another aspect of the present invention, a real-time thermal drift compensation control system for a servo motor for a high-temperature robot is provided. The system is used to implement the above-described real-time thermal drift compensation control method for a servo motor for a high-temperature robot, and includes: a temperature sensing unit, a data preprocessing and deep feature extraction module, a thermal drift compensation prediction model training module, a local signal conditioning module, and a motion controller. The temperature sensing unit includes: a first temperature sensor T1, a second temperature sensor T2, and a third temperature sensor T3; T1: Embedded inside the motor rear cover, adjacent to the encoder PCB, used to measure the encoder ambient temperature; T2: Mounted on the end of the motor stator winding to measure the winding temperature rise; T3: Placed on the heatsink of the driver MOSFET to help determine the overall thermal load; Data preprocessing and deep feature extraction module: used to preprocess the data and extract time-domain and frequency-domain fusion features, temperature gradient correlation and multi-sensor collaborative features, thermal drift evolution trend and dynamic compensation correction features from the preprocessed data in sequence; The thermal drift compensation prediction model training module is used to train a thermal drift compensation prediction model based on the thermal drift evolution trend and dynamic compensation correction characteristics. After training, the model parameters are stored in the non-volatile memory of the local signal conditioning module. Local signal conditioning module: Stores model parameters after training; synchronously acquires the encoder's raw angle during motor online operation. And the temperature values ​​of T1, T2, and T3; Motion controller: Used to receive low-pass filtered and corrected position signals, perform closed-loop position control, and no longer detect the original thermal drift.

[0018] Beneficial effects: 1. Multi-level deep feature extraction significantly improves the accuracy of thermal drift modeling. The fusion of time and frequency domain features not only extracts traditional time-domain statistics such as mean, standard deviation, skewness, and kurtosis, but also introduces the temperature change rate (root mean square difference) and autocorrelation coefficient sequence. At the same time, it obtains the main frequency component, frequency domain energy distribution ratio and spectral centroid through FFT, comprehensively characterizing the static distribution and dynamic fluctuation characteristics of thermal drift. Temperature gradient correlation and multi-sensor collaborative features: The expressive power is enhanced by a learnable nonlinear transform layer (GELU activation); the temperature difference and the rate of change of temperature difference between T1 and T2 and between T2 and T3 are explicitly calculated, and the temperature gradient vector is constructed and multiplied element by element with the features, so that the model can perceive the gradient effect on the heat conduction path; at the same time, the cross-correlation matrix of the three sensors is constructed using the Pearson correlation coefficient, and the collaborative information is extracted through the fully connected layer to achieve deep fusion of multi-sensor information, effectively utilizing the complementary information of each temperature measurement point (encoder environment, winding end, driver heat sink) and avoiding misjudgment by a single sensor. Thermal drift evolution trend and dynamic compensation correction features: A multi-head self-attention mechanism is introduced to automatically focus on the most informative time segments in the historical sequence; BiGRU bidirectional sequence modeling is adopted, and forward and backward context information is used to capture the long-term dependence trend of thermal drift evolution over time; nonlinear compensation features are then extracted through a feedforward neural network, and finally the contributions of the "trend term" and "compensation term" are dynamically balanced through learnable weighted fusion, so that the model can both track slow cumulative drift and respond to sudden temperature shocks.

[0019] 2. A composite physical constraint training strategy ensures that the model output conforms to objective thermodynamic laws. The model training uses a triple loss function: Mean squared error loss ensures a least-squares fit between predicted and measured values; The physical constraint loss introduces a zero-bias drift theoretical value based on the thermal expansion physics model, forcing the model output to not violate basic physical laws (e.g., a positive correlation between temperature increase and zero-bias increase), effectively preventing data-driven models from generating non-physical extrapolations in data-scarce regions. L2 regularization controls model complexity and prevents overfitting. Simultaneously, the AdamW optimizer, cosine annealing learning rate scheduling, and early stopping mechanism are employed to ensure efficient training and strong generalization.

[0020] 3. Real-time feedforward compensation architecture to eliminate PID lag response defects. This invention places compensation before the motion controller's closed loop, performing calibration at the hardware level via LSCM (Local Signal Conditioning Module): The model inference outputs zero bias drift and gain drift factor, which directly perform division correction on the original encoder angle. This is a pure feedforward method and there is no closed-loop delay. The motion controller receives the already compensated position signal and only needs to execute the conventional PID position closed loop. It does not need to detect the original thermal drift, thus avoiding problems such as PID integral saturation and overshoot oscillation, and does not require modification of the original controller software architecture.

[0021] 4. Highly Robust Data Preprocessing and Filtering Link In the offline calibration phase, outliers are removed using the IQR (interquartile range) method, missing values ​​are imputed using cubic splines, timestamp alignment is performed, and Z-score standardization is applied to ensure the quality of the training dataset. The online output uses a first-order IIR low-pass digital filter, which can flexibly adjust the smoothness according to the sampling period and filter time constant, effectively suppressing high-frequency noise and outputting a smooth position signal.

[0022] 5. Proactive thermal warning and multiple safety strategies When the encoder ambient temperature T1 exceeds the preset safety threshold, the LSCM actively sends a thermal warning flag to the motion controller. The controller can then execute a combination of strategies, such as reducing the control bandwidth (to reduce the risk of oscillation), switching to force control mode (to avoid position closed-loop failure), and activating active cooling (fan / liquid cooling), to form a dual-level safety guarantee of "compensation + protection" and improve the system reliability under extreme conditions.

[0023] 6. Low cost, easy deployment, and no additional hardware required. This invention relies on three conventional temperature sensors and existing encoder signals, without changing the structure of the motor itself. All calculations are completed in LSCM (based on MCU or FPGA), and the model parameters are stored in non-volatile memory. No external industrial control computer or cloud computing is required, making it suitable for harsh industrial environments.

[0024] 7. Lifecycle adaptability The offline calibration covers the entire range from room temperature to the maximum operating temperature, and the model can be used for a long time once trained. If the motor ages or the encoder of the same model is replaced, the offline calibration process only needs to be executed once, without modifying the software framework, thus providing good maintainability. Attached Figure Description Figure 1 This is a flowchart illustrating the method. Figure 2 This is a schematic diagram of the system principle. Detailed Implementation

[0025] To make the technical solution of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0026] Example 1 1. System Configuration and Temperature Sensor Deployment This embodiment uses a certain model of six-axis industrial robot, whose J3-axis servo motor (rated power 1.5kW, rated speed 3000rpm) is equipped with an incremental photoelectric encoder (17-bit resolution). Three temperature sensors are deployed according to step S1 of this invention: T1: A PT100 thin-film platinum resistance thermometer (accuracy ±0.15℃) is embedded inside the motor back cover and thermally conductive silicone grease is used to tightly adhere to the back of the encoder PCB board to measure the ambient temperature of the encoder chip.

[0027] T2: A type K thermocouple (accuracy ±0.5℃) is used, which is attached to the surface of the copper wire at the end of the motor stator winding with high-temperature tape to measure the temperature rise of the winding.

[0028] T3: An NTC thermistor (10kΩ at 25℃, B value 3435) is fixed in the central groove of the driver MOSFET heatsink to determine the overall thermal load.

[0029] Three sensor signals via 24-bit The ADC samples at a frequency of 1kHz and transmits the signal to the local signal conditioning module (LSCM, based on the STM32H743 microcontroller with a built-in floating-point unit) via the SPI bus.

[0030] 2. Offline calibration and historical data collection Place the entire unit (including motor, encoder, and driver) in a programmable temperature and humidity chamber (temperature range -40℃ to 150℃, temperature control accuracy ±0.3℃). Set the temperature increment to 5℃, gradually increasing the temperature from 25℃ (room temperature) to the maximum operating temperature of 120℃. At each temperature point, hold for 20 minutes to ensure thermal equilibrium, then perform the following operations: The reference angle value is read using an external high-precision angle reference instrument (resolution 0.001°); Synchronously record the encoder's raw angle output value Three temperature values ​​were sampled for 30 seconds, with 100 sets of data recorded per second (a total of 3000 sets / temperature point).

[0031] A total of (120-25) / 5+1=20 temperature points were recorded, resulting in a total of 20×3000=60,000 calibration records, which constitute the historical calibration dataset.

[0032] 3. Historical data preprocessing Perform preprocessing offline in LSCM: Outlier removal: For the encoder angle sequence at each temperature point, calculate Q1 and Q3, IQR=Q3-Q1, and remove data exceeding [Q1-1.5×IQR,Q3+1.5×IQR]. In this embodiment, approximately 1.2% of outliers were removed.

[0033] Missing value imputation: The gaps generated after removal are filled by cubic spline interpolation (with natural boundary conditions) and a piecewise cubic polynomial is fitted with adjacent valid points.

[0034] Time series alignment: All channel data are resampled linearly by timestamp to a uniform sampling rate of 500Hz (ensuring that the Nyquist frequency covers the main spectrum of thermal drift).

[0035] Z-score standardization: Calculates the mean and standard deviation of each feature sequence according to the formula... Standardization yields a standardized dataset.

[0036] 4. Deep Feature Extraction Time-domain and frequency-domain fusion features : The calculation is divided into segments, each segment representing a 10℃ temperature range (25-35℃, 35-45℃, ..., 115-120℃): mean Standard deviation Skewness, kurtosis; Three-way temperature difference root mean square , , ; Autocorrelation coefficient sequence (maximum lag order L=20).

[0037] Simultaneously, an FFT (Hanning window, N=1024 points) was performed on the temperature-angle deviation sequence to extract the amplitude and corresponding frequency of the first 5 main frequencies, calculate the energy proportion of the low-frequency band (0-5Hz), and the centroid frequency of the spectrum. The resulting image was then stitched together. .

[0038] Temperature gradient correlation and multi-sensor collaborative features : Will Through the first nonlinear transformation layer (weight matrix W1, size 56×128, GELU activated), the output is... Calculate the temperature difference. , Its time derivative (difference approximation) forms the gradient vector G. Through After linear transformation, and Element-by-element multiplication yields At the same time from Extract sub-vectors from the three sensors, calculate the 3×3 Pearson correlation coefficient matrix, and then pass it through a fully connected layer after vectorization to obtain... .Will and The splicing is achieved by merging fully connected layers. .

[0039] Thermal drift evolution trend and dynamic compensation correction characteristics : Will Input multi-head self-attention (number of heads h=4, dimension per head) =32), calculate attention output after generating Q, K, and V. ,and Residual connections are obtained after layer normalization. .Will The data is fed into a BiGRU (64 hidden units, 128 dimensions in total, forward + backward) according to a time window (window length = 50 sampling points, corresponding to 0.1 seconds), and the output is... Then, through two layers of FFN, we obtain... Finally, you can learn about fusion weights. Initialized to 0.5, ultimately .

[0040] 5. Model Training Model structure: Input layer receives The hidden layer consists of a three-layer MLP, with a batch normalization layer and Dropout (dropout rate of 0.2) added after each layer. The output layer has two neurons (corresponding to...). and ).

[0041] The 60,000 samples were divided into a training set (36,000), a validation set (12,000), and a test set (12,000) in a 6:2:2 ratio. The weights of the loss function were set to... =0.6, =0.3, =0.1 (sum total is 1). Physical constraints Using empirical formulas: ,in =0.002° / ℃, =1.5e-5° / ℃² (based on the thermal expansion coefficient α of the encoder disc aluminum material α=23×10) -6 (calculated at / ℃).

[0042] Training uses the AdamW optimizer with an initial learning rate of =1e-3, minimum learning rate =1e-6, total rounds =200, cosine annealing scheduling. Five-fold cross-validation is used, with early stopping patience P=15 rounds. The model is saved when the loss on the validation set is minimized (round 152), and then used on the test set. The mean absolute error of the prediction is 0.015°. The prediction error was 0.002 (relative error <0.3%). The model parameters (weights, biases, normalized statistics) were programmed into the LSCM's SPI Flash non-volatile memory.

[0043] 6. Real-time operation phase The robot was deployed for inspection work in front of a high-temperature furnace, where the ambient temperature was approximately 90°C. The LSCM simultaneously acquired data at a sampling rate of 1 kHz. For samples T1, T2, and T3, the same real-time preprocessing (sliding window Z-score, using offline-saved μ and σ) is performed online. A time window of 0.1 seconds (i.e., 100 sampling points) is formed to extract real-time... Features are input into the model for inference, and the output is the current time step. (For example At 95℃, the model output =0.48°) and ( =At 102℃, k=1.012).

[0044] Feedforward correction calculation: Assuming the current situation... =45.23° then Then, a first-order IIR low-pass filter is applied (filter coefficients...) ),in =0.001s, =0.01s, therefore ≈0.0909), difference equation It outputs a smooth position signal. This signal is sent to the motion controller via the EtherCAT high-speed communication interface (1ms period). Upon receiving the signal, the motion controller executes a standard PID position closed-loop, no longer sensing the original thermal drift. The measured steady-state position error is reduced from 0.52° before compensation to 0.04°, with no overshoot.

[0045] 7. Thermal warning protection triggered If T1 continues to rise and exceeds the preset safety threshold When the temperature reaches 110℃ (e.g., heat accumulation causes T1 to reach 112℃), the LSCM immediately sends a thermal warning flag via digital I / O. The motion controller's response strategy is to reduce the position loop bandwidth from 80Hz to 30Hz and simultaneously start the cooling fan (increasing the speed from 3000rpm to 6000rpm) until T1 drops below 105℃, at which point it returns to normal. In this embodiment, the warning was triggered twice during 8 hours of continuous operation, successfully preventing a shutdown due to a malfunction. Example 2 1. System Configuration and Sensor Deployment This embodiment uses a collaborative robot joint module with a brushless DC motor (rated torque 2Nm) and a built-in magnetic encoder (14-bit resolution, Hall effect based). T1, T2, and T3 are deployed using the same scheme, but the sensor type is changed. T1: Si7051 digital temperature sensor (I²C interface, accuracy ±0.1℃), soldered onto a small PCB near the encoder ASIC; T2: Pt1000 thin film sensor, bonded to the surface of the stator core with epoxy resin; T3: Read via analog input using the driver's built-in NTC (already used for IGBT protection).

[0046] The sampling frequency is set to 2kHz. The LSCM adopts an FPGA+ARM dual-core architecture (FPGA is responsible for high-speed acquisition, and ARM is responsible for feature calculation and inference).

[0047] 2. Detailed Implementation of Offline Calibration The temperature control chamber starts at 25℃, with a step size of 3℃ (for finer precision), up to 120℃, for a total of (120-25) / 3+1≈33 temperature points. Each temperature point is left to stand for 30 minutes (due to its large heat capacity). At each temperature point, in addition to recording the reference angle, an extra set of known currents (20%, 50%, and 80% of the rated current) are applied to simulate the temperature rise differences under different loads. Thus, each temperature point actually has 3 load conditions, and the total number of calibration samples is 33×3×(sampling lasts for 60 seconds, 2000 sets per second) = 33×3×120000≈118,800 records.

[0048] The high-precision reference angle is provided by a laser interferometer (resolution 0.0005°), and is aligned with the timestamp of the encoder data by a synchronous trigger.

[0049] 3. Preprocessing details Due to the large volume of data, preprocessing was performed offline on a PC (using a Python script) to generate a standardized dataset, which was then imported into LSCM. Specific implementation details: Outlier removal: A moving window (100 points) plus IQR is used to remove outliers independently, with 50% window overlap to ensure that local mutations can also be detected.

[0050] Missing value interpolation: Due to occasional jumps (electromagnetic interference) in the magnetic encoder, there are many missing values ​​after elimination. Cubic spline interpolation is used, while constraining the continuity of the first derivative, so that the data is smooth after interpolation.

[0051] Time series alignment: Due to the different response times of the three temperature sensors (T1 has the fastest response time of about 5ms, T2 about 20ms, and T3 about 50ms), a second-order low-pass filter is used for phase compensation, and then linear interpolation is used to align them to a uniform sampling rate of 2kHz.

[0052] Normalization: Calculate the mean and standard deviation for each operating condition (rather than the global mean, to eliminate the influence of load) to obtain standardized data.

[0053] 4. Numerical Implementation of Deep Feature Extraction Time-domain and frequency-domain fusion: The temperature range is divided into 5℃ intervals. The mean, standard deviation, skewness, and kurtosis of the deviation sequence are calculated; the root mean square value of the temperature difference is calculated; and the autocorrelation coefficient (L=30) is calculated. With 2048 FFT points and a frequency resolution of approximately 0.98Hz, the first 8 dominant frequency components are extracted, and the energy proportion and spectral centroid of the low-frequency band (<10Hz) are calculated.

[0054] Temperature gradient correlation and multi-sensor collaboration: nonlinear transformation layer GELU activation, H1 is 192-dimensional. Gradient vector. The differential is achieved using the central difference method. After linear transformation and Element-by-element multiplication yields Cross-correlation matrix Calculate the Pearson coefficients of the three sensor subvectors, and then pass them through a fully connected layer after vectorization. The splicing is achieved by integrating fully connected layers. .

[0055] Thermal drift evolution trend and dynamic compensation correction: multi-head self-attention (h=8, =24), Residual connections are performed and layer normalization is applied. The BiGRU window size is set to 100 points (corresponding to 50ms), and the number of hidden units is 96. The FFN structure is 192→384→192, with ReLU activation. The fusion weight α is initialized to 0.8 (biased towards the trend term) and is self-adjusted during training.

[0056] 5. Model Training and Validation The prediction model MLP structure has a 192-dimensional input, four hidden layers (256→384→256→128), and a two-neuron output layer. Dropout rate is 0.3, with batch normalization after each layer. Loss function: =0.5, =0.4, =0.1. Physical constraints Here, a lookup interpolation function pre-calculated by finite element simulation (based on the magnet's remanence temperature coefficient -0.12% / ℃ and magnetic reluctance variation) is used to provide more accurate physical guidance.

[0057] Training set:validation set:test set = 7:1.5:1.5. Using AdamW, initial learning rate 5e-4, total cosine annealing epochs 300, minimum learning rate 1e-7. K-folds = 5, early stopping patience P = 25. Post-training test set. The root mean square error of the prediction is 0.008°. The prediction error was 0.0015 (relative error 0.18%). The model parameters (including γ and β in layer normalization, and self-attention weights) were stored in the QSPI Flash of the LSCM.

[0058] 6. Online real-time operation The motor ran continuously on a 120℃ aging test bench. The LSCM acquired data at 2kHz, performing feature extraction and inference every 50 sampling points (25ms) (meeting real-time requirements). The inference output is as follows: =115℃, At 108℃, =0.76°, =1.025. Original encoder angle. =128.34°, after correction =(128.34-0.76) / 1.025=124.47°. Filter coefficient. ,in =0.0005s, 0.005s, ≈0.0909 (same), differential equation filtering. Data is sent to the motion controller via CANopen communication (1ms cycle, but position updates can be reduced to 2ms).

[0059] The controller originally used PI+feedforward control, but now it directly uses the corrected position signal. The measured steady-state accuracy at 120℃ has improved from ±0.8° before compensation to ±0.06°, and the dynamic response is oscillating.

[0060] 7. Multi-strategy execution for heat warning This embodiment is set =115℃ (magnetic encoder upper limit). When T1 reaches 116℃, the LSCM sends a warning. The motion controller simultaneously executes: Reduce the position loop bandwidth from 100Hz to 40Hz; Switch to torque control mode (to make the robot end effector compliant and avoid rigid impacts); Start the liquid cooling cycle (by controlling the solenoid valve via a relay, the coolant flow rate increases from 2L / min to 5L / min).

[0061] After the warning lasted for 3 minutes, T1 returned to 112℃. The controller restored force control, bandwidth, and liquid cooling in sequence. Throughout the process, the robot continued to execute its task (reduced speed but did not stop). In this embodiment, during a 72-hour aging test, the warning was triggered a total of 12 times, and the system passed all tests safely without any loss of control or damage.

[0062] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A real-time compensation control method for thermal drift of servo motors in high-temperature robots, characterized in that, Includes the following steps: S1. Temperature sensor deployment: Deploy the first temperature sensor T1, the second temperature sensor T2, and the third temperature sensor T3; S2. Offline calibration and historical data acquisition: Place the motor in a temperature control chamber and gradually increase the temperature from room temperature to the maximum operating temperature in a preset temperature step. After standing still for a preset time at each temperature point, synchronously record the encoder's original angle output value, high-precision reference angle value, and temperature values ​​of T1, T2, and T3 to form a historical calibration dataset. S3. Historical data preprocessing: Preprocess the historical calibration dataset to obtain the preprocessed standardized dataset; S4. Deep Feature Extraction: Extract time-domain and frequency-domain fusion features, temperature gradient correlation and multi-sensor collaborative features, thermal drift evolution trend and dynamic compensation correction features from the preprocessed standardized dataset in sequence. S5. Model Training: Based on the thermal drift evolution trend and dynamic compensation correction characteristics, train the thermal drift compensation prediction model. After training, store the model parameters in the non-volatile memory of the local signal conditioning module LSCM. S6. Real-time Acquisition and Preprocessing: During the online operation of the motor, the LSCM synchronously acquires the original angle from the encoder. The temperature values ​​of T1, T2, and T3 are recorded and preprocessed in real time. S7. Model Inference: Extract the real-time thermal drift evolution trend and dynamic compensation correction characteristics of the preprocessed data, input them into the thermal drift compensation prediction model, and output the encoder zero-bias drift amount in real time. and gain drift factor ; S8, Feedforward Correction Calculation: Through... and Feedforward correction calculation , thereby obtaining the corrected position signal; S9. Filtering and Output: The low-pass filtered position signal is sent to the motion controller through the high-speed communication interface; S10, Closed-loop control: The motion controller performs position closed-loop control and no longer senses the original thermal drift.

2. The real-time compensation control method for thermal drift of servo motors in high-temperature robots according to claim 1, characterized in that: The historical data preprocessing in step S3 specifically includes: outlier removal, missing value imputation, time series alignment, and normalization. Outlier Removal: A statistical method based on interquartile range (IQR) is used to detect and remove outliers from the historical calibration dataset. For the encoder's raw angle output value sequence at each temperature point, its first quartile is calculated. and the third and fourth quartiles It will exceed Data within a certain range is marked as outliers and removed, where ; Missing value imputation: To fill the data gaps caused by outlier removal, cubic spline interpolation is used. With adjacent valid data points as constraints, a piecewise cubic polynomial function is constructed to ensure that the interpolation curve has a second continuous derivative at the nodes. Time series alignment: Temperature data and encoder angle data from different sampling channels are aligned to a unified time base using timestamps, and linear interpolation is used to resample the data from each channel to a unified sampling rate; Normalization: Perform Z-score standardization on the aligned data. The calculation formula is as follows: in, The original data values, Let be the mean of this data series. The standard deviation of the data sequence is used to obtain the preprocessed standardized dataset.

3. The real-time compensation control method for thermal drift of servo motors in high-temperature robots according to claim 1, characterized in that: The time-domain and frequency-domain fusion feature extraction in step S4 specifically includes: S411. Time-domain statistical feature extraction: For the preprocessed standardized dataset, calculate the following time-domain statistical features segmented by temperature range: Mean of the temperature-angle deviation sequence Standard deviation skewness and kurtosis ; Root mean square value of the first-order difference sequence of temperature sensor readings , , , characterizing the rate of temperature change; Autocorrelation coefficient sequence of temperature-angle deviation series ,in The lag order is... The maximum lag order; The above time-domain statistical features are concatenated to form time-domain features. ; S412. Frequency Domain Transform Feature Extraction: Perform a Fast Fourier Transform (FFT) on the temperature-angle deviation sequence in the preprocessed standardized dataset to obtain the frequency domain amplitude spectrum, and extract the following frequency domain features: The front of the amplitude spectrum The amplitude of each dominant frequency component and corresponding frequency ; Frequency domain energy distribution ratio ,in Low-frequency energy, Total energy across the entire frequency band; Spectral centroid frequency ; The above frequency domain features are concatenated to form frequency domain features. ; S413, Time-domain characteristics and frequency domain features By splicing the data, the time-domain and frequency-domain fused features are obtained. .

4. The real-time compensation control method for thermal drift of servo motors in high-temperature robots according to claim 1, characterized in that: The temperature gradient correlation and multi-sensor collaborative feature extraction in step S4 specifically includes: S421. Nonlinear mapping calculation: fusing time and frequency domain features. Mapping is performed through a learnable nonlinear transformation layer, and the calculation formula is as follows: in, This is the weight matrix of the first nonlinear transformation layer. For bias vectors, The GELU activation function is calculated as follows: in, The cumulative distribution function of the standard normal distribution; S422, Temperature gradient correlation feature calculation: based on nonlinear mapping output Calculate the temperature gradient coupling characteristics: Temperature gradient characteristics between T1 and T2: , ; Temperature gradient characteristics between T2 and T3: , ; Constructing a temperature gradient vector Through the weight matrix After linear transformation and nonlinear mapping output Element-wise multiplication yields the temperature gradient correlation features: in, This represents element-wise multiplication. It is the bias vector; S423. Multi-sensor collaborative feature computation: based on time-domain and frequency-domain fusion features Construct a multi-sensor collaborative feature matrix: from Extract feature vectors related to T1, T2, and T3 respectively. , , ; Calculate the cross-correlation feature matrix between sensors ,in , , This represents the Pearson correlation coefficient; cross-correlation characteristic matrix Vectorization is performed, and multi-sensor collaborative features are obtained through transformation using a fully connected layer: in, This represents the matrix vectorization operation. This is the weight matrix. It is the bias vector; S424. Associate temperature gradient with features and multi-sensor collaborative features The data is stitched together, and temperature gradient correlation and multi-sensor collaborative features are obtained by fusing fully connected layers. in, To fuse the weight matrix, This is the fusion bias vector.

5. The real-time compensation control method for thermal drift of servo motors in high-temperature robots according to claim 1, characterized in that: The extraction of thermal drift evolution trend and dynamic compensation correction features in step S4 specifically includes: S431, Attention-weighted computation: For temperature gradient correlation and multi-sensor collaborative features Perform multi-head self-attention mechanism computation: Will The query vector is generated through three independent linear transformations. Key vector Sum value vector ,in , , These are the weight matrices for the query, key, and value, respectively. Will , , Divided into The first point of attention, the first The size is calculated as follows: in, For each head dimension, It is a normalized exponential function; After concatenating the outputs of all heads, a linear transformation is performed: in, To output the weight matrix, This is the output bias vector; S432, Residual Enhancement Calculation: Attention-Weighted Output Correlation with temperature gradient and multi-sensor collaborative features Perform residual join: in, For layer normalization, the calculation formula is: in, and For learnable parameters, To prevent division by zero of small constants; S433, Thermal drift evolution trend feature extraction: Features after residual enhancement Sequence modeling using a bidirectional gated recurrent unit (BiGRU) network: Forward GRU computation: ,in To update the door, This is the candidate hidden state; Backward GRU computation: ; Concatenate the forward and backward outputs: To obtain the characteristics of thermal drift evolution trend; S434, Dynamic Compensation Correction Feature Extraction: Extracting thermal drift evolution trend features Transformation is performed using a feedforward neural network (FFN): in, , This is the weight matrix of the feedforward neural network. , For bias vectors, To modify the activation function of the linear unit; S436, Final Feature Fusion: Integrating Thermal Drift Evolution Trend Features and dynamic compensation correction features Weighted fusion was performed to obtain the thermal drift evolution trend and dynamic compensation correction characteristics: in, These are learnable fusion weight coefficients, with values ​​ranging from [value range missing]. .

6. The real-time compensation control method for thermal drift of servo motors in high-temperature robots according to claim 1, characterized in that: The training of the thermal drift compensation prediction model in step S5 specifically includes: S51. Model Structure: The thermal drift compensation prediction model includes an input layer, a hidden layer, and an output layer. The input layer receives the thermal drift evolution trend and dynamic compensation correction features. Output layer encoder zero offset drift and gain drift factor The hidden layers adopt a multilayer perceptron structure, with batch normalization layers and Dropout regularization layers between each hidden layer; S52. Loss Function Design: Using a composite loss function Model training: in, For mean square error loss, The number of samples; For physical constraint loss, This is the theoretical value of zero-bias drift calculated based on the thermal expansion physical model, used to constrain the model output to conform to physical laws; L2 regularization loss is used to prevent model overfitting; , , These are the weighting coefficients for each loss term, and ; S53. Training Strategy: The AdamW optimizer is used for parameter optimization, and the learning rate adopts a cosine annealing scheduling strategy. The initial learning rate is set to... In the The learning rate for each training round is: in, To minimize the learning rate, This represents the total number of training rounds. S54. Model Validation: Divide the dataset into training, validation, and test sets according to a preset ratio. Use K-fold cross-validation to evaluate the model's generalization performance. When the validation set loss is continuous... If the loss does not decrease in any round, an early stopping mechanism is triggered to save the model parameters at the point where the validation set loss is lowest.

7. The real-time compensation control method for thermal drift of servo motors in high-temperature robots according to claim 1, characterized in that: The feedforward correction calculation formula in step S8 is as follows: in, This is the encoder's original angle output value. This represents the encoder zero-bias drift predicted by the model. The gain drift factor predicted by the model. This is the corrected position signal.

8. The real-time compensation control method for thermal drift of servo motors in high-temperature robots according to claim 1, characterized in that: The method also includes a thermal early warning protection step: When the temperature value of T1 exceeds the preset safety threshold When the LSCM sends a thermal warning signal to the motion controller, the motion controller, upon receiving the thermal warning signal, executes one or a combination of the following safety policies: Reduce the position closed-loop control bandwidth, lowering the control bandwidth from the normal value to a safe value; Switch to force control mode to replace position control with torque control; Activate the active cooling mechanism, increase the cooling fan speed, or start the liquid cooling cycle.

9. A real-time compensation control method for thermal drift of a servo motor in a high-temperature robot according to claim 1, characterized in that: The low-pass filtering process in step S9 uses a first-order IIR low-pass digital filter, whose difference equation is: in, The corrected position signal input at the current time , This is the filtered position signal output at the current moment. This is the filtered position signal output from the previous moment. These are the filter coefficients. , The sampling period is is the filter time constant.

10. A real-time compensation control system for thermal drift of servo motors in high-temperature robots, characterized in that: The system is used to implement the real-time thermal drift compensation control method for servo motors in high-temperature robots as described in any one of claims 1-9, comprising: a temperature sensing unit, a data preprocessing and deep feature extraction module, a thermal drift compensation prediction model training module, a local signal conditioning module, and a motion controller; The temperature sensing unit includes: a first temperature sensor T1, a second temperature sensor T2, and a third temperature sensor T3; T1: Embedded inside the motor rear cover, adjacent to the encoder PCB, used to measure the encoder ambient temperature; T2: Mounted on the end of the motor stator winding to measure the winding temperature rise; T3: Placed on the heatsink of the driver MOSFET to help determine the overall thermal load; Data preprocessing and deep feature extraction module: used to preprocess the data and extract time-domain and frequency-domain fusion features, temperature gradient correlation and multi-sensor collaborative features, thermal drift evolution trend and dynamic compensation correction features from the preprocessed data in sequence; The thermal drift compensation prediction model training module is used to train a thermal drift compensation prediction model based on the thermal drift evolution trend and dynamic compensation correction characteristics. After training, the model parameters are stored in the non-volatile memory of the local signal conditioning module. Local signal conditioning module: Stores model parameters after training; synchronously acquires the encoder's raw angle during motor online operation. And the temperature values ​​of T1, T2, and T3; Motion controller: Used to receive low-pass filtered and corrected position signals, perform closed-loop position control, and no longer detect the original thermal drift.