A method and apparatus for dynamic deviation compensation of physical systems based on twin data calibration

CN122569273APending Publication Date: 2026-08-14BEIJING GUOXIN NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610910302.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0005]本发明的目的是提供一种基于孪生数据校准的物理系统动态偏差补偿方法、装置、计算机设备、计算机可读存储介质及计算机程序产品,用以解决现有基于数字孪生技术对物理系统进行偏差补偿的方案所存在补偿指令在生成与下发过程中缺乏基于校准后数字孪生模型的可微分预验证与迭代优化机制、对构成总偏差的不同物理机制缺乏精细化识别与差异化补偿利用和/或在补偿执行后的反馈数据缺乏分离式双通道应用架构的问题

Benefits of technology

(1)本发明创造性提供了一种能够在校准后数字孪生模型内部对补偿指令进行可微分预验证与迭代优化,并能够对偏差来源进行多尺度精细化识别以驱动差异化补偿,同时将补偿执行后的跨层级反馈信号分离式地用于孪生模型物理参数修正与补偿策略优化的新方案,即实时获取目标物理系统的实际运行状态数据及其数字孪生模型输出的仿真运行状态数据,构建偏差时序数据并采用多尺度分解算法将其自适应分离为具有不同时间常数和/或不同空间分布特征的多个偏差源分量特征向量;将各偏差源分量特征向量分别送入具有预设映射关系的对应补偿计算模型,输出候选补偿指令参数并合并为候选补偿指令参数集;将候选补偿指令参数集输入至构建于校准后数字孪生模型上的可微分校验模块,通过执行前馈仿真生成预期补偿状态,并计算各参数相对于预期补偿状态的灵敏度矩阵;基于预期补偿状态和灵敏度矩阵对候选补偿指令参数集进行优化以得到最终补偿指令,并控制目标物理系统执行;基于执行后的实际运行状态数据计算实际残余偏差,对比实际残余偏差与预期补偿状态下的预期残余偏差得到差值矢量作为跨层级反馈信号;将跨层级反馈信号分流至数字孪生模型的在线校准模块以修正其物理参数,以及具有补偿策略的元学习模块以优化下一次补偿任务中补偿计算模型的初始参数或搜索空间,由此通过在校准后数字孪生模型内部构建可微分校验与迭代优化闭环,并采用偏差源多尺度精细化识别及分离式双通道反馈架构,实现了补偿指令的预验证与自适应优化,以及孪生模型与补偿策略的协同演进,显著提升了物理系统动态偏差补偿的精度和鲁棒性;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122569273A_ABST
    Figure CN122569273A_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for dynamic deviation compensation of physical systems based on twin data calibration, relating to the fields of digital twin technology and industrial automation control technology. The method first constructs time-series data of the actual and simulated operational deviations of the target physical system and adaptively separates them into multiple deviation source component feature vectors using a multi-scale decomposition algorithm. Each feature vector is then fed into a corresponding mapped compensation calculation model, and the outputs are merged to obtain a candidate compensation command parameter set. The parameter set is input into a differentiable verification module to perform feedforward simulation to generate the expected compensation state and calculate the sensitivity matrix. Based on this, the final compensation command is optimized and executed. Based on the execution results, the actual residual deviation and difference vector are calculated and distributed to an online calibration module to correct the physical parameters of the twin model and a meta-learning module to optimize the compensation calculation model. This enables pre-verification and adaptive optimization of the compensation command, as well as the synergistic evolution of the twin model and the compensation strategy, improving compensation accuracy and robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of digital twin technology and industrial automation control technology, specifically relating to a method and device for dynamic deviation compensation of physical systems based on twin data calibration. Background Technology

[0002] Digital twin technology provides a novel technical means for monitoring, predicting, and optimizing the operation of complex industrial processes by constructing high-fidelity virtual models of physical entities. During the long-term operation of a physical system, various factors such as equipment aging, environmental temperature variations, load fluctuations, and dynamic response lags inevitably lead to dynamic deviations between the actual operating state of the physical system and the simulation output of its digital twin model. If these dynamic deviations are not compensated for in a timely and accurate manner, the fidelity of the digital twin model will continuously decline, thereby affecting the reliability of decision-making and control based on the model.

[0003] Currently, existing solutions for offset compensation in physical systems based on digital twin technology have the following limitations: (1) Existing solutions generally regard twin data calibration and physical system deviation compensation as two functionally independent links that are only connected in process. Specifically, the model is first calibrated by using the deviation between the actual operating data of the physical system and the simulation output data of its digital twin model. After the calibration is completed, a compensation instruction is generated based on the calibrated model or a preset strategy and sent to the physical system for execution. The problem with this calibration-compensation connected architecture is that the generation and issuance of the compensation instruction are outside the monitoring of the calibration link. Whether the compensation instruction can effectively reduce the deviation after it is applied to the physical system, and whether it will cause new accuracy problems or safety risks, cannot be fully pre-verified before the compensation instruction is issued. (2) Existing solutions lack refined identification and utilization of the sources of deviation in the generation and verification of compensation instructions. Specifically, existing solutions tend to treat the total deviation exhibited by the physical system as a whole and directly generate compensation instructions or update model parameters based on the total deviation, without distinguishing between different physical mechanisms that constitute the total deviation (such as slow-changing wear drift, medium-speed thermal drift, or fast-changing dynamic response fluctuations). This "unified processing of mixed deviations" approach limits the further improvement of the pertinence and accuracy of the compensation strategy. (3) In the existing scheme, the actual operation feedback data obtained after the compensation command is issued and executed is usually used directly to update the parameters of the compensation strategy model or control model in an end-to-end manner. However, there is a lack of a separate feedback architecture that uses the above feedback data to simultaneously achieve two independent and complementary goals: "correcting the physical parameters of the digital twin model itself" and "optimizing the generation mechanism of the compensation strategy". This integrated feedback method makes it difficult to clearly distinguish whether the fundamental reason for the compensation failure is the inaccurate prediction of the twin model or the deviation in the execution of the compensation strategy, thus limiting the system's ability to evolve online.

[0004] Therefore, there is an urgent need for a new technical solution that can perform differentiable pre-verification and iterative optimization of compensation instructions within the calibrated digital twin model, and can perform multi-scale fine-grained identification of deviation sources to drive differentiated compensation. At the same time, it can use the cross-level feedback signals after compensation execution separately for the correction of physical parameters of the twin model and the optimization of compensation strategies, so as to solve the above-mentioned problems in the existing technology. Summary of the Invention

[0005] The purpose of this invention is to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for dynamic deviation compensation of physical systems based on twin data calibration. This invention addresses the problems of existing schemes for deviation compensation of physical systems based on digital twin technology, such as the lack of a differentiable pre-verification and iterative optimization mechanism based on the calibrated digital twin model during the generation and issuance of compensation instructions, the lack of refined identification and differentiated compensation utilization of different physical mechanisms constituting the total deviation, and / or the lack of a separate dual-channel application architecture for feedback data after compensation execution.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, a method for compensating dynamic deviations in physical systems based on twin data calibration is provided, including: Real-time acquisition of actual operating status data of the target physical system and simulation operating status data output by the digital twin model of the target physical system; Construct time-series data of the deviation between the actual operating state data and the simulated operating state data, and use a multi-scale decomposition algorithm to adaptively separate the time-series data of the deviation into multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics; Each of the deviation source component feature vectors is fed into a compensation calculation model that has a preset mapping relationship with the corresponding vector to output the corresponding candidate compensation instruction parameters, and all the candidate compensation instruction parameters are merged into a candidate compensation instruction parameter set. The candidate compensation instruction parameter set is input into the differentiable verification module built on the calibrated digital twin model. Then, the differentiable verification module generates the expected compensation state by performing feedforward simulation and calculates the sensitivity matrix of each parameter in the candidate compensation instruction parameter set relative to the expected compensation state. The candidate compensation instruction parameter set is optimized based on the expected compensation state and the sensitivity matrix to obtain the final compensation instruction, and the target physical system is controlled to execute the final compensation instruction. Based on the actual operating status data of the target physical system after executing the final compensation command, the actual residual deviation is calculated. The actual residual deviation is compared with the expected residual deviation under the expected compensation state to obtain the difference vector between the two and serve as a cross-level feedback signal. The cross-level feedback signal is diverted to the online calibration module of the digital twin model to correct the physical parameters of the digital twin model and to the meta-learning module with a compensation strategy to optimize the initial parameters or search space of the compensation calculation model in the next compensation task.

[0007] Based on the above-mentioned invention, a novel scheme is provided that enables differentiable pre-verification and iterative optimization of compensation commands within a calibrated digital twin model, and allows for multi-scale refined identification of deviation sources to drive differentiated compensation. Simultaneously, the scheme uses the cross-level feedback signals after compensation execution in a separate manner for correcting the physical parameters of the twin model and optimizing the compensation strategy. Specifically, it acquires real-time actual operating state data of the target physical system and simulation operating state data output by its digital twin model; constructs deviation time-series data and adaptively separates it into multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics using a multi-scale decomposition algorithm; each deviation source component feature vector is fed into a corresponding compensation calculation model with a preset mapping relationship, outputting candidate compensation command parameters and merging them into a candidate compensation command parameter set; the candidate compensation command parameter set is input to a differentiable verification module built on the calibrated digital twin model, generating the expected compensation state through feedforward simulation and calculating each... The system employs a sensitivity matrix of parameters relative to the expected compensation state. Based on the expected compensation state and the sensitivity matrix, it optimizes the candidate compensation command parameter set to obtain the final compensation command and controls the execution of the target physical system. It calculates the actual residual deviation based on the actual operating state data after execution, compares the actual residual deviation with the expected residual deviation under the expected compensation state to obtain the difference vector as a cross-level feedback signal. This cross-level feedback signal is then routed to the online calibration module of the digital twin model to correct its physical parameters, and to a meta-learning module with a compensation strategy to optimize the initial parameters or search space of the compensation calculation model in the next compensation task. Thus, by constructing a differentiable verification and iterative optimization closed loop within the calibrated digital twin model, and adopting a multi-scale refined identification of deviation sources and a separate dual-channel feedback architecture, it achieves pre-verification and adaptive optimization of compensation commands, as well as the synergistic evolution of the twin model and the compensation strategy. This significantly improves the accuracy and robustness of dynamic deviation compensation in the physical system, facilitating practical application and promotion.

[0008] In one possible design, a multi-scale decomposition algorithm is used to adaptively separate the deviation time-series data into multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics, including: In the time dimension, wavelet packet transform or empirical mode decomposition is used to separate the deviation time series data into at least one slow-changing trend component and at least one fast-changing fluctuation component. For each component in the at least one slow-changing trend component and the at least one fast-changing fluctuation component, a spatial statistical method is used in the spatial dimension to separate the corresponding component into at least one local distortion component and a global drift component that reflect different physical regions or different physical mechanisms. By summing up all at least one local distortion component and all the global drift components, multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics are obtained.

[0009] In one possible design, a desired compensation state is generated by performing feedforward simulation, and the sensitivity matrix of each parameter in the candidate compensation command parameter set relative to the desired compensation state is calculated, including: In a simulation environment built on a differentiable programming framework and specifically designed for digital twin bias compensation scenarios, feedforward simulation is performed on the calibrated digital twin model to generate the expected compensation state. During the simulation calculation, the partial derivative dependencies between each parameter in the candidate compensation instruction parameter set and each state variable in the expected compensation state are recorded synchronously. Based on the recorded partial derivative dependencies, the Jacobian matrix of the expected compensation state relative to the candidate compensation instruction parameter set is calculated using the chain rule, and serves as the sensitivity matrix of each parameter in the candidate compensation instruction parameter set relative to the expected compensation state.

[0010] In one possible design, the candidate compensation command parameter set is optimized based on the expected compensation state and the sensitivity matrix to obtain the final compensation command, including: Based on the expected compensation state, determine whether the preset accuracy verification conditions, safety boundary conditions, and dynamic stability conditions are simultaneously met. If all conditions are met, the candidate compensation instruction parameter set will be directly used as the final compensation instruction. If all conditions are not met, the sensitivity matrix is ​​used as the gradient information source to guide the gradient descent algorithm to iteratively optimize the candidate compensation instruction parameter set until the expected compensation state generated by the optimized compensation instruction parameter set simultaneously meets all the conditions or reaches the preset iteration limit. Then, the final optimization result is used as the final compensation instruction.

[0011] In one possible design, the sensitivity matrix is ​​used as a gradient information source to guide a gradient descent algorithm to iteratively optimize the candidate compensation instruction parameter set, including: Construct the following comprehensive loss function, which includes the expected residual deviation term and the safety boundary penalty term:

[0012] In the formula, This represents the value of the comprehensive loss function. Indicates the number of key evaluation indicators. Indicates the index number of the key performance indicator and is less than or equal to , Indicates the first The expected residual deviation of each key evaluation indicator Indicates the first The preset weighting coefficients of each key evaluation indicator. This indicates the norm order of the expected residual deviation term, and its value is either 1 or 2. Indicates the number of safety boundary conditions. Indicates the index of the safety boundary condition and is less than or equal to , Indicates the relationship with the first The simulation prediction index values ​​corresponding to each safety boundary condition. Indicates the first The safety threshold corresponding to each safety boundary condition. Indicates the first The penalty coefficient corresponding to each safety boundary condition. This indicates the power of the safety boundary penalty term, and its value is either 1 or 2. This represents the function that takes the maximum value. The candidate compensation instruction parameter set is iteratively optimized, and in each iteration, the gradient direction of the comprehensive loss function relative to the candidate compensation instruction parameter set is calculated using the sensitivity matrix, and the candidate compensation instruction parameter set is updated along the gradient direction. The iteration stops when the value of the comprehensive loss function meets the preset convergence condition or reaches the preset iteration limit.

[0013] In one possible design, the dynamic stability condition specifically includes: the overshoot of the physical system's dynamic response process, characterized by the expected compensation state, is less than a preset overshoot threshold, the settling time is less than a preset settling time threshold, and the steady-state error fluctuation variance is less than a preset variance threshold.

[0014] In one possible design, after the cross-level feedback signal is diverted to the online calibration module and the meta-learning module with a compensation strategy of the digital twin model, the method further includes: The meta-learning module obtains a new calibrated digital twin model after the physical parameters of the digital twin model have been corrected by the online calibration module; The meta-learning module performs simulation replay for each compensation task in at least one completed historical compensation task, and obtains simulation replay results for each candidate compensation instruction parameter set corresponding to each compensation task. The meta-learning module calculates the initial parameter update amount or search space adjustment amount of the compensation calculation model based on the difference between the simulation playback results and the actual execution results of the corresponding compensation task. The meta-learning module applies the initial parameter update amount or the search space adjustment amount to optimize the initial parameters or search space of the compensation calculation model in the next compensation task.

[0015] In one possible design, the cross-level feedback signal is diverted to the online calibration module of the digital twin model to correct the physical parameters of the digital twin model, including: The cross-level feedback signal is diverted to the online calibration module of the digital twin model; Driven by the cross-level feedback signal, the online calibration module performs online identification and update processing on the material constitutive model parameters, contact stiffness and / or damping coefficient of the digital twin model to obtain the parameter update amount of the material constitutive model parameters, the contact stiffness and / or the damping coefficient. The online calibration module inputs the parameter update amount into the digital twin model to correct the physical parameters of the digital twin model.

[0016] In one possible design, after calculating the sensitivity matrix of each parameter in the candidate compensation instruction parameter set relative to the expected compensation state, the method further includes: Based on the sensitivity matrix, the contribution index of each of the deviation source component eigenvectors to the expected compensation state is calculated. For each of the aforementioned deviation source component feature vectors, based on the corresponding contribution index, the preset mapping relationship between the corresponding vector and the corresponding compensation calculation model for the next compensation task is adjusted, or the weight coefficient of the corresponding compensation calculation model for the next compensation task is adjusted.

[0017] Secondly, a dynamic deviation compensation device for a physical system based on twin data calibration is provided, including a state data acquisition unit, a deviation time sequence decomposition unit, a compensation calculation and processing unit, a differential verification processing unit, a compensation instruction optimization unit, a residual deviation calculation unit, and a feedback signal diversion unit. The state data acquisition unit is used to acquire in real time the actual operating state data of the target physical system and the simulation operating state data output by the digital twin model of the target physical system; The deviation time series decomposition unit is communicatively connected to the state data acquisition unit. It is used to construct the deviation time series data between the actual running state data and the simulated running state data, and to adaptively separate the deviation time series data into multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics using a multi-scale decomposition algorithm. The compensation calculation processing unit is communicatively connected to the deviation time series decomposition unit, and is used to send the feature vectors of each deviation source component into the compensation calculation model that has a preset mapping relationship with the corresponding vector to output the corresponding candidate compensation instruction parameters, and merge all the candidate compensation instruction parameters into a candidate compensation instruction parameter set. The differential verification processing unit is communicatively connected to the compensation calculation processing unit. It is used to input the candidate compensation instruction parameter set into the differentiable verification module built on the calibrated digital twin model. Then, the differentiable verification module generates the expected compensation state by performing feedforward simulation and calculates the sensitivity matrix of each parameter in the candidate compensation instruction parameter set relative to the expected compensation state. The compensation instruction optimization unit is communicatively connected to the differential verification processing unit, and is used to optimize the candidate compensation instruction parameter set based on the expected compensation state and the sensitivity matrix to obtain the final compensation instruction, and control the target physical system to execute the final compensation instruction; The residual deviation calculation unit is communicatively connected to the state data acquisition unit and the compensation instruction optimization unit, and is used to calculate the actual residual deviation based on the actual operating state data of the target physical system after executing the final compensation instruction. The residual deviation comparison unit is communicatively connected to the residual deviation calculation unit and is used to compare the actual residual deviation with the expected residual deviation under the expected compensation state to obtain the difference vector between the two and use it as a cross-level feedback signal. The feedback signal splitting unit is communicatively connected to the residual deviation comparison unit, and is used to split the cross-level feedback signal to the online calibration module of the digital twin model to correct the physical parameters of the digital twin model and the meta-learning module with compensation strategy to optimize the initial parameters or search space of the compensation calculation model in the next compensation task.

[0018] Thirdly, the present invention provides a computer device comprising a storage module, a processing module, and a transceiver module connected in sequence for communication, wherein the storage module is used to store a computer program, the transceiver module is used to send and receive messages, and the processing module is used to read the computer program and execute the physical system dynamic deviation compensation method as described in the first aspect or any possible design in the first aspect.

[0019] Fourthly, the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, perform the physical system dynamic deviation compensation method as described in the first aspect or any possible design in the first aspect.

[0020] Fifthly, the present invention provides a computer program product, including a computer program or instructions, wherein the computer program or instructions, when executed by a computer, implement the physical system dynamic deviation compensation method as described in the first aspect or any possible design in the first aspect.

[0021] The beneficial effects of the above scheme are: (1) This invention creatively provides a novel scheme that enables differentiable pre-verification and iterative optimization of compensation instructions within a calibrated digital twin model, and enables multi-scale fine-grained identification of deviation sources to drive differentiated compensation. Simultaneously, it uses the cross-level feedback signals after compensation execution in a separate manner for correcting physical parameters and optimizing compensation strategies in the twin model. Specifically, it acquires real-time actual operating state data of the target physical system and simulation operating state data output by its digital twin model, constructs deviation time-series data, and adaptively separates it into multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics using a multi-scale decomposition algorithm. Each deviation source component feature vector is then fed into a corresponding compensation calculation model with a preset mapping relationship, outputting candidate compensation instruction parameters and merging them into a candidate compensation instruction parameter set. The candidate compensation instruction parameter set is then input to a differentiable verification module built on the calibrated digital twin model, generating the expected compensation state through feedforward simulation. The system calculates the sensitivity matrix of each parameter relative to the expected compensation state; optimizes the candidate compensation command parameter set based on the expected compensation state and the sensitivity matrix to obtain the final compensation command, and controls the target physical system to execute it; calculates the actual residual deviation based on the actual running state data after execution, and compares the actual residual deviation with the expected residual deviation under the expected compensation state to obtain the difference vector as a cross-level feedback signal; the cross-level feedback signal is diverted to the online calibration module of the digital twin model to correct its physical parameters, and to the meta-learning module with the compensation strategy to optimize the initial parameters or search space of the compensation calculation model in the next compensation task. Thus, by constructing a differentiable verification and iterative optimization closed loop inside the calibrated digital twin model, and adopting a multi-scale refined identification of deviation sources and a separate dual-channel feedback architecture, the system realizes the pre-verification and adaptive optimization of compensation commands, as well as the synergistic evolution of the twin model and the compensation strategy, which significantly improves the accuracy and robustness of dynamic deviation compensation of the physical system. (2) By constructing a differentiable verification module inside the calibrated digital twin model, feedforward simulation and sensitivity matrix calculation are performed on the candidate compensation command parameter set. The candidate compensation command parameter set is then optimized based on the expected compensation state and sensitivity matrix before being issued for execution. Differentiable pre-verification and closed-loop iterative optimization before the compensation command is issued are realized. This avoids the problem of insufficient accuracy or security risks that may be caused by issuing compensation commands directly without sufficient verification in the prior art. At the same time, when the verification fails, the system can use the gradient information provided by the sensitivity matrix to perform directional iterative optimization, rather than simply retreating to the previous stable parameter or triggering manual intervention. (3) By adopting a multi-scale decomposition algorithm, the deviation time series data is adaptively separated into multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics. Based on the preset mapping relationship, each deviation source component feature vector is sent into the corresponding compensation calculation model to output differentiated candidate compensation instruction parameters. This realizes the fine identification and targeted compensation of different physical mechanisms constituting the total deviation, solves the problem that the compensation strategy lacks specificity due to the treatment of mixed deviations as a whole in the existing technology, and significantly improves the compensation accuracy. (4) By comparing the actual residual deviation with the expected residual deviation, the difference vector is obtained as a cross-level feedback signal. This cross-level feedback signal is then diverted to the online calibration module of the digital twin model to correct its physical parameters, and to the meta-learning module with a compensation strategy to optimize the initial parameters or search space of the compensation calculation model in the next compensation task. A separate dual-channel feedback architecture is constructed, which enables the feedback signal to simultaneously serve the two mutually exclusive goals of improving model fidelity and optimizing strategy generation quality. This solves the problem that integrated feedback in the prior art is difficult to distinguish the root cause of compensation failure, and realizes the positive synergistic evolution of the digital twin model and the compensation strategy. (5) By first using wavelet packet transform or empirical mode decomposition to separate the slow-changing trend component and the fast-changing fluctuation component in the time dimension, and then using spatial statistics to separate each component in the spatial dimension, the local distortion component and the global drift component are obtained. This achieves the fine separation of the deviation source with time-space dual decoupling, so that the feature vector of the deviation source component carries both time constant label and spatial distribution label, providing a more refined input basis for subsequent differential compensation, and further improving the pertinence and effectiveness of the compensation. (6) By performing feedforward simulation in a simulation environment built on a differentiable programming framework and dedicated to digital twin deviation compensation scenarios, the partial derivative dependency relationship is recorded synchronously and the Jacobian matrix is ​​calculated as the sensitivity matrix using the chain rule. This makes the calculation process of the sensitivity matrix transparent and traceable. The obtained sensitivity matrix not only provides an accurate gradient information source for subsequent optimization, but can also be used to quantitatively evaluate the contribution of each deviation source component to the expected compensation state, providing data support for the dynamic adjustment of the compensation strategy. (7) By constructing a comprehensive loss function containing the expected residual deviation term and the safety boundary penalty term when the verification fails, and using the sensitivity matrix to calculate the gradient direction to guide the gradient descent algorithm to iteratively optimize the candidate compensation instruction parameter set, and setting a preset iteration upper limit as the termination condition, the adaptive re-optimization of the compensation instruction under the dual drive of safety constraints and accuracy goals is realized, ensuring that the system finds the compensation instruction that meets the requirements of accuracy, safety and stability within a limited time, and taking into account both the compensation effect and real-time performance; (8) By quantifying the dynamic stability conditions into overshoot less than the preset overshoot threshold, settling time less than the preset settling time threshold, and steady-state error fluctuation variance less than the preset variance threshold, the stability judgment in the compensation instruction verification process has an objective quantitative standard, avoiding subjective qualitative judgment on the dynamic response stability and improving the reliability and consistency of the verification results. (9) The new calibrated digital twin model after correction by the online calibration module is obtained through the meta-learning module. Based on the new model, the historical compensation task is simulated and replayed. The initial parameter update amount or search space adjustment amount is calculated according to the difference between the replay result and the actual execution result. This allows the optimization process of the meta-learning module to make full use of the latest results of model calibration, forming a positive collaborative evolution closed loop of "model accuracy improvement → strategy generation quality improvement", and continuously improving the system's adaptive capability in long-term operation. (10) The online calibration module is driven by cross-level feedback signals to perform online identification and update processing on the material constitutive model parameters, contact stiffness and / or damping coefficient of the digital twin model, and the parameter update amount is input into the digital twin model to correct its physical parameters. This allows the feedback signal to directly drive the online optimization of the underlying physical parameters. This is different from the existing technology where the feedback data is only used to update the upper-level strategy or control model parameters. It improves the fidelity of the digital twin model from the physical mechanism level. (11) By calculating the contribution index of the characteristic vector of each deviation source component to the expected compensation state based on the sensitivity matrix, and adjusting the weight coefficient of the preset mapping relationship or compensation calculation model according to the contribution index, the system realizes the automatic evaluation of the importance of the deviation source component and the dynamic adjustment of the compensation strategy. This enables the system to automatically identify key deviation sources and optimize the compensation resource allocation in a targeted manner during continuous operation, further improving the overall efficiency of compensation and facilitating practical application and promotion. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating the dynamic deviation compensation method for physical systems based on twin data calibration provided in this application embodiment.

[0024] Figure 2 This is a schematic diagram of the structure of a physical system dynamic deviation compensation device based on twin data calibration provided in an embodiment of this application.

[0025] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these embodiments without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.

[0027] It should be understood that although the terms "first" and "second", etc., may be used herein to describe various objects, these objects should not be limited by these terms. These terms are only used to distinguish one object from another. For example, the first object may be referred to as the second object, and similarly, the second object may be referred to as the first object, without departing from the scope of the exemplary embodiments of the invention.

[0028] It should be understood that the term "and / or" that may appear in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, or A and B exist simultaneously. Another example is A, B and / or C, which can mean that any one of A, B, and C or any combination thereof exists. The term " / and" that may appear in this document describes another relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone or A and B exist simultaneously. In addition, the character " / " that may appear in this document generally indicates that the related objects before and after it are in an "or" relationship.

[0029] Example like Figure 1 As shown, the physical system dynamic deviation compensation method based on twin data calibration provided in the first aspect of this embodiment can be executed, but is not limited to, by a computer device with certain computing resources, such as a host computer, industrial control computer, edge computing gateway, or cloud server deployed in an industrial site. The computer device is communicatively connected to the sensor network and data acquisition module of the target physical system to acquire the actual operating status data of the target physical system in real time. The computer device also carries a digital twin model of the target physical system, a differentiable verification module, an online calibration module, and a meta-learning module to execute all or part of the steps of the method described in this embodiment. In one possible implementation, the simulation calculation of the digital twin model and the feedforward simulation of the differentiable verification module can be executed on the same computer device, or they can be deployed on different computing nodes and coordinated through a high-speed data communication link. Figure 1 As shown, the physical system dynamic deviation compensation method includes, but is not limited to, the following steps S1 to S8.

[0030] S1. Real-time acquisition of actual operating status data of the target physical system and simulation operating status data output by the digital twin model of the target physical system.

[0031] In step S1, the target physical system can be any type of industrial equipment or process system that generates measurable state data during operation, such as, but not limited to, CNC machine tools, industrial robots, injection molding machines, pipe bending machines, or automated production lines. The actual operating state data is acquired in real time through a sensor network and data acquisition module deployed on the target physical system, reflecting the true operating state of the target physical system at the current moment. The sensor network can include, but is not limited to, one or more of displacement sensors, velocity sensors, acceleration sensors, force sensors, torque sensors, temperature sensors, pressure sensors, and vision sensors, with the specific type determined according to the characteristics of the target physical system. The data acquisition module performs preprocessing on the raw sensor signals output by the sensor network, including analog-to-digital conversion, signal conditioning, and timestamp marking, to generate actual operating state data with a unified timestamp.

[0032] In step S1, the simulated operating status data is output by the digital twin model of the target physical system through simulation calculation at the same time or within the same time period. It reflects the simulation estimate of the operating status of the target physical system by the digital twin model at the corresponding time or time period. The digital twin model is a high-fidelity simulation model built based on the geometric parameters, material properties, kinematic constraints, and / or dynamic equations of the target physical system. It runs continuously in a computer device and is synchronously driven or periodically updated based on the actual operating status data or control commands issued by the computer device. The actual operating status data and the simulated operating status data have a corresponding relationship in the time dimension, that is, they correspond to the same or substantially the same time or time period, so that subsequent steps can construct deviation time-series data based on both. Furthermore, in one possible implementation, the actual operating status data and the simulated operating status data can have the same or mutually convertible data formats and physical dimensions, such as both being represented in the form of position coordinates, velocity vectors, temperature values, or pressure values, to facilitate subsequent deviation calculations and multi-scale decomposition processing.

[0033] S2. Construct the time-series data of the deviation between the actual operating state data and the simulated operating state data, and use a multi-scale decomposition algorithm to adaptively separate the time-series data of the deviation into multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics.

[0034] In step S2, specifically, based on the actual operating state data and the simulated operating state data obtained in step S1, the difference between the two is calculated at each sampling time or sampling period to construct the deviation time series data. Each data point in the deviation time series data represents the deviation value of a certain physical quantity between the actual operating state of the target physical system and the simulation estimate of the digital twin model at the corresponding time or period. The deviation time series data can be represented in the form of a multidimensional time series, where the dimension is equal to the number of types of physical quantities of interest. It should be noted that the total deviation exhibited by the target physical system in actual operation is usually not caused by a single physical mechanism, but rather by the coupling and superposition of multiple deviation sources with different time constants and / or different spatial distribution characteristics. For example, deviations caused by equipment wear or material aging usually exhibit a slow trend over a long period of time, thermal drift caused by changes in ambient temperature usually exhibits a medium-speed change, while deviations caused by dynamic response lag or external disturbances usually exhibit rapid instantaneous fluctuations. Some deviations may be spatially distributed globally (e.g., overall thermal expansion caused by overall temperature rise), while others may be concentrated only in specific physical areas or specific components (e.g., localized wear of a joint or localized deformation of a mold area). Therefore, if the total deviation formed by the coupling and superposition of the aforementioned multiple deviation sources is directly input into the subsequent compensation calculation model as a whole, it will be difficult to adopt differentiated compensation strategies for deviation sources with different physical mechanisms, thus limiting the pertinence and accuracy of the compensation. Therefore, in step S2, a multi-scale decomposition algorithm is used to adaptively separate the deviation time series data, so as to decouple the deviation time series data into multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics.

[0035] In one possible preferred implementation, the multi-scale decomposition algorithm preferably adopts a dual decoupling method that combines time and space dimensions. Specifically, the multi-scale decomposition algorithm adaptively separates the deviation time series data into multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics, including but not limited to the following steps S21 to S23.

[0036] S21. In the time dimension, wavelet packet transform or empirical mode decomposition is used to separate the deviation time series data into at least one slow-changing trend component and at least one fast-changing fluctuation component.

[0037] In step S21, the slow-changing trend component reflects the slow evolution of the deviation over a longer time scale, such as drift caused by equipment wear or material aging; the fast-changing fluctuation component reflects the rapid change of the deviation over a shorter time scale, such as fluctuation caused by dynamic response lag or random disturbances; the slow-changing trend component and the fast-changing fluctuation component each have different time constants. It should be noted that the wavelet packet transform or empirical mode decomposition method are both well-known signal time-frequency analysis and multi-scale decomposition algorithms in the art, and their basic principles, mathematical expressions, and implementation methods have been described in detail in the technical literature in this field, and will not be elaborated upon here.

[0038] S22. For each component in the at least one slow-changing trend component and the at least one fast-changing fluctuation component, a spatial statistical method is used in the spatial dimension to secondarily separate the corresponding component into at least one local distortion component and one global drift component that reflect different physical regions or different physical mechanisms.

[0039] In step S22, the local distortion component reflects the concentrated distribution characteristics of the deviation in a specific physical region or component, such as local wear of a joint or local deformation of a mold area; the global drift component reflects the overall distribution characteristics of the deviation across the entire physical system, such as overall thermal expansion caused by overall temperature rise. It should be noted that the spatial statistical method refers to a class of known techniques used for statistical analysis and decoupling of multidimensional data in the spatial dimension, such as, but not limited to, principal component analysis, independent component analysis, spatial cluster analysis, or factor analysis. The basic principles, mathematical expressions, and implementation methods of the aforementioned spatial statistical methods have been described in detail in the technical literature of this field and will not be elaborated upon here. Furthermore, the contribution of this embodiment to the wavelet packet transform or empirical mode decomposition method and the spatial statistical method lies not in improving the algorithm itself, but in combining the spatial statistical method with the aforementioned wavelet packet transform or empirical mode decomposition method in the time dimension to form a dual decoupling architecture of "first time dimension decomposition, then spatial dimension secondary separation". This architecture is applied for the first time in the digital twin deviation compensation scenario. That is, for the slow-changing trend component and fast-changing fluctuation component obtained by time dimension decomposition, the local distortion component and global drift component are further separated in the spatial dimension, thereby obtaining the deviation source component feature vector that carries both time constant label and spatial distribution label, providing refined input for the generation of differentiated compensation instructions for different deviation source components in subsequent steps.

[0040] S23. Summarize all at least one local distortion component and all global drift components to obtain multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics.

[0041] In step S23, the feature vectors of each deviation source component not only carry deviation value information, but also carry their corresponding time constant label and / or spatial distribution label, so that subsequent steps can send them into the corresponding compensation calculation model with a preset mapping relationship to generate differentiated compensation instruction parameters based on the feature labels of each component.

[0042] It is understood that the above-described method of first decomposing the time dimension and then the second decomposing the spatial dimension is only a preferred implementation. In practical applications, depending on the characteristics and deviation features of the target physical system, spatial dimension decomposition can be performed first, followed by time dimension decomposition; or only time dimension decomposition can be performed; or only spatial dimension decomposition can be performed. This invention does not limit this. The selection of the multi-scale decomposition algorithm, the determination of the number of decomposition layers, and the order of time and spatial dimension decomposition can be adaptively configured according to the specific type, operating conditions, and deviation features of the target physical system. In one possible implementation, the construction of deviation time-series data, the multi-scale decomposition algorithm, and the generation of the deviation source component feature vectors are all automatically completed by the computer equipment by executing a preset calculation program, without manual intervention.

[0043] S3. The feature vectors of each deviation source component are respectively fed into the compensation calculation model that has a preset mapping relationship with the corresponding vector to output the corresponding candidate compensation instruction parameters, and all the candidate compensation instruction parameters are merged into a candidate compensation instruction parameter set.

[0044] In step S3, it should be noted that the feature vectors of each deviation source component output in step S2 carry their corresponding time constant labels and / or spatial distribution labels, reflecting the differences in time scale and / or spatial distribution of different deviation sources. Since deviation source components with different time constants and / or different spatial distribution characteristics have different generation mechanisms and evolution patterns, the appropriate compensation strategies also differ accordingly. If all deviation source component feature vectors are input into the same compensation calculation model without distinction, it will be difficult to take targeted compensation measures for deviation source components with different characteristics. Therefore, in step S3, a one-to-one pre-established mapping relationship between each deviation source component feature vector and each compensation calculation model is pre-established; the pre-established mapping relationship can be determined in advance based on historical operational data statistics, physical mechanism analysis, or a combination of both. Specifically, the preset mapping relationship can map deviation source components with specific time constants and / or specific spatial distribution characteristics to compensation calculation models suitable for such deviation source characteristics based on the time constant label and / or spatial distribution label of the deviation source component feature vector. For example, deviation source component feature vectors carrying slow-varying time constant labels can be mapped to compensation calculation models suitable for slow-varying drift compensation (e.g., adaptive compensation models based on parameter identification); deviation source component feature vectors carrying fast-varying time constant labels can be mapped to compensation calculation models suitable for fast-varying fluctuation compensation (e.g., dynamic compensation models based on feedforward control); deviation source component feature vectors carrying local distortion spatial distribution labels can be mapped to compensation calculation models suitable for local region correction; and deviation source component feature vectors carrying global drift spatial distribution labels can be mapped to compensation calculation models suitable for overall offset adjustment.

[0045] In one possible implementation, the compensation calculation model can be a rule-based compensation model, a model-based compensation model, or a data-driven compensation model, such as, but not limited to, PID (Proportional-Integral-Derivative) control models, feedforward compensation models, iterative learning control models, model predictive control models, or reinforcement learning strategy models. Each compensation calculation model calculates and outputs candidate compensation command parameters corresponding to the received deviation source component feature vector. The specific form of the candidate compensation command parameters is determined according to the control interface of the target physical system, and may be, for example, position compensation, velocity compensation, force / torque compensation, pressure compensation, or temperature compensation. After feeding all the deviation source component feature vectors into their respective mapped compensation calculation models and obtaining their respective candidate compensation command parameters, all the candidate compensation command parameters are merged into a candidate compensation command parameter set. The merging may be done by combining the candidate compensation command parameters according to a preset data structure, such as concatenating them in vector form or organizing them in matrix form, so that the subsequent differentiable verification module can uniformly process and verify the candidate compensation command parameter set.

[0046] In step S3, it is understood that the preset mapping relationship is not static. During the continuous operation of this method, the preset mapping relationship can be dynamically adjusted based on feedback signals generated in subsequent steps. For example, the weight coefficients of the mapping relationship or the compensation calculation model can be optimized and adjusted according to certain indicators. Furthermore, in one possible implementation, the establishment of the preset mapping relationship, the invocation of the compensation calculation model, and the generation and merging of the candidate compensation instruction parameters are all automatically completed by the computer device by executing a preset calculation program, without manual intervention.

[0047] S4. Input the candidate compensation instruction parameter set into the differentiable verification module built on the calibrated digital twin model. Then, the differentiable verification module generates the expected compensation state by performing feedforward simulation and calculates the sensitivity matrix of each parameter in the candidate compensation instruction parameter set relative to the expected compensation state.

[0048] In step S4, it should be noted that the differentiable verification module is a simulation verification environment built upon the calibrated digital twin model and possessing gradient calculation capabilities. The calibrated digital twin model, when the first compensation task is initiated, can be an initial calibration model obtained by offline calibration or initial parameter identification of the digital twin model. In each subsequent compensation task, the calibrated digital twin model can be a new calibrated digital twin model output from the previous round of compensation tasks. In other words, in the current round of compensation tasks, the calibrated digital twin model on which step S4 is based is the output result of step S8 in the previous round of compensation tasks. After step S8 in the current round corrects the physical parameters of the digital twin model again based on the cross-level feedback signal of this round of compensation tasks, a new calibrated digital twin model for the next round of compensation tasks will be obtained. Therefore, the calibrated digital twin model will continuously evolve with the continuous operation of this method and the iterative progress of the compensation tasks, and the fidelity of its simulation estimation will gradually improve.

[0049] In step S4, the differentiable verification module uses the calibrated digital twin model as the simulation kernel. Based on conventional feedforward simulation, it adds the ability to synchronously record the partial derivative dependencies between computation nodes during the simulation calculation and to perform gradient backpropagation. In a possible preferred implementation, by performing feedforward simulation, a desired compensation state is generated, and the sensitivity matrix of each parameter in the candidate compensation instruction parameter set relative to the desired compensation state is calculated, including but not limited to the following steps S41-S42.

[0050] S41. In a simulation environment built on a differentiable programming framework and specifically designed for digital twin bias compensation scenarios, a feedforward simulation is performed on the calibrated digital twin model to generate the expected compensation state. During the simulation calculation, the partial derivative dependencies between each parameter in the candidate compensation instruction parameter set and each state variable in the expected compensation state are recorded synchronously.

[0051] In step S41, the differentiable programming framework refers to a programming paradigm or toolkit that supports automatically constructing a computational graph and recording the partial derivative dependencies between variables during program execution, such as, but not limited to, a differentiable physics simulation engine based on an automatic differentiation mechanism. Both the differentiable programming framework and the automatic differentiation mechanism are well-known computational technologies in the field, and their basic principles, mathematical expressions, and implementation methods have been described in detail in technical literature in this field, and will not be elaborated upon here. By constructing the differentiable verification module using a differentiable programming framework, the calibrated digital twin model can automatically and synchronously record the partial derivative dependencies between each parameter in the candidate compensation instruction parameter set and each state variable in the expected compensation state during the execution of feedforward simulation.

[0052] S42. Based on the recorded partial derivative dependencies, the Jacobian matrix of the expected compensation state relative to the candidate compensation instruction parameter set is calculated using the chain rule as the sensitivity matrix of each parameter in the candidate compensation instruction parameter set relative to the expected compensation state.

[0053] In step S42, the chain rule is a fundamental theorem of calculus known in the art, and its basic principle has been described in detail in the technical literature of the art, and will not be repeated here. In the differentiable verification scenario of this embodiment, the specific application of the chain rule is as follows: Since the calibrated digital twin model has synchronously recorded the partial derivative dependencies between the candidate compensation command parameters and intermediate calculation variables, and between the intermediate calculation variables and the state variables in the expected compensation state during the feedforward simulation process, these partial derivative dependencies constitute a directed acyclic computation graph; the role of the chain rule here is to multiply and sum the local partial derivatives on each path along the dependency path in the computation graph, thereby calculating the total derivative of each parameter in the candidate compensation command parameter set with respect to each state variable in the expected compensation state, and the matrix formed by all the total derivatives is the Jacobian matrix.

[0054] In step S4, it should be noted that the contribution of this embodiment to the above-mentioned technology lies not in the improvement of differentiable programming or automatic differentiation technology itself, but in the first application of the above-mentioned technology to the digital twin deviation compensation scenario, constructing a differentiable verification module specifically for pre-verification and iterative optimization of compensation instructions—that is, within the calibrated digital twin model, feedforward simulation is performed on the candidate compensation instruction parameter set, and the partial derivative dependency relationship is recorded synchronously during the simulation calculation, thereby calculating the sensitivity matrix used for subsequent optimization steps. Each element in the sensitivity matrix quantifies the degree of influence of a unit change in a parameter in the candidate compensation instruction parameter set on a certain state variable in the expected compensation state. The sensitivity matrix is ​​not only used for optimizing the candidate compensation instruction parameter set in the subsequent step S5 (i.e., as a gradient information source to guide the iterative direction of the gradient descent algorithm), but also for subsequent deviation source contribution evaluation (e.g., calculating the contribution index of each deviation source component eigenvector to the expected compensation state based on the sensitivity matrix).

[0055] In step S4, it is understood that the feedforward simulation of the differentiable verification module and the regular simulation of the digital twin model in step S1 can technically share the same simulation kernel, but their functions and invocation timing differ. The regular simulation of the digital twin model is used to continuously generate simulation running state data corresponding to the actual running state data, while the feedforward simulation of the differentiable verification module is only invoked when pre-verification and optimization of the candidate compensation instruction parameter set is required. In one possible implementation, both can be deployed on the same computer device or on different computing nodes. Furthermore, in one possible implementation, the construction of the differentiable verification module, the execution of the feedforward simulation, the recording of the partial derivative dependencies, and the calculation of the Jacobian matrix are all automatically completed by the computer device through the execution of a preset calculation program, without manual intervention.

[0056] S5. Optimize the candidate compensation instruction parameter set based on the expected compensation state and the sensitivity matrix to obtain the final compensation instruction, and control the target physical system to execute the final compensation instruction.

[0057] In step S5, it should be noted that the expected compensation state generated by the differentiable verification module represents the expected operating state that the target physical system might achieve after the candidate compensation instruction parameter set is directly issued to the target physical system for execution. However, in actual industrial scenarios, the issuance and execution of compensation instructions not only need to consider whether the deviation can be reduced (i.e., accuracy requirements), but also whether it will cause new safety risks (i.e., safety requirements) and whether it will lead to instability in the system's dynamic response (i.e., stability requirements). Therefore, before issuing and executing the candidate compensation instruction parameter set as the final compensation instruction, it is necessary to perform comprehensive verification and iterative optimization if the verification fails. Specifically, the candidate compensation instruction parameter set is optimized based on the expected compensation state and the sensitivity matrix to obtain the final compensation instruction, including but not limited to the following steps S51 to S53.

[0058] S51. Based on the expected compensation state, determine whether the preset accuracy verification conditions, safety boundary conditions, and dynamic stability conditions are simultaneously met.

[0059] In step S51, the accuracy verification condition is used to determine whether the expected residual deviation of the target physical system is within an acceptable range after the implementation of the candidate compensation instruction parameter set. For example, the expected residual deviation can be set to be less than or equal to a preset accuracy threshold as the criterion for the accuracy verification condition. The safety boundary condition is used to determine whether each key physical quantity of the target physical system does not exceed its corresponding safety threshold after the implementation of the candidate compensation instruction parameter set. The key physical quantities are determined according to the specific type of the target physical system. For example, for CNC machine tools, it may be the upper limit of spindle speed, the upper limit of feed force, and / or the upper limit of joint torque, etc.; for injection molding machines, it may be the upper limit of injection pressure, the upper limit of clamping force, and / or the upper limit of barrel temperature, etc. The dynamic stability condition is used to determine whether the dynamic response process of the target physical system is stable after the implementation of the candidate compensation instruction parameter set. Specifically, it includes, but is not limited to: the overshoot of the dynamic response process of the physical system characterized by the expected compensation state is less than a preset overshoot threshold, the adjustment time is less than a preset adjustment time threshold, and the steady-state error fluctuation variance is less than a preset variance threshold. One or more of these detailed conditions are used as the criterion for the dynamic stability condition.

[0060] S52. If all conditions are met, the candidate compensation instruction parameter set shall be directly used as the final compensation instruction.

[0061] In step S52, specifically, when the expected compensation state simultaneously satisfies the accuracy verification condition, the safety boundary condition, and the dynamic stability condition, the candidate compensation instruction parameter set is directly used as the final compensation instruction, which is then sent to the target physical system and the target physical system is controlled to execute the final compensation instruction.

[0062] S53. If all conditions are not met, the sensitivity matrix is ​​used as the gradient information source to guide the gradient descent algorithm to iteratively optimize the candidate compensation instruction parameter set until the expected compensation state generated by the optimized compensation instruction parameter set simultaneously meets all the conditions or reaches the preset iteration limit. Then, the final optimization result is used as the final compensation instruction.

[0063] In step S53, specifically, when the expected compensation state fails to simultaneously satisfy all the conditions (i.e., at least one condition is not satisfied), it indicates that the current candidate compensation command parameter set has insufficient accuracy, security risks, or dynamic instability risks, and it needs to be iteratively optimized: using the sensitivity matrix as a gradient information source, the gradient descent algorithm is guided to iteratively optimize the candidate compensation command parameter set. Specifically, using the sensitivity matrix as a gradient information source to guide the gradient descent algorithm to iteratively optimize the candidate compensation command parameter set includes, but is not limited to, the following steps S531 to S533.

[0064] S531. Construct the following comprehensive loss function, which includes the expected residual deviation term and the safety boundary penalty term:

[0065] In the formula, This represents the value of the comprehensive loss function. Indicates the number of key evaluation indicators. Indicates the index number of the key performance indicator and is less than or equal to , Indicates the first The expected residual deviation of each key evaluation indicator Indicates the first The preset weighting coefficients of each key evaluation indicator. This indicates the norm order of the expected residual deviation term, and its value is either 1 or 2. Indicates the number of safety boundary conditions. Indicates the index of the safety boundary condition and is less than or equal to , Indicates the relationship with the first The simulation prediction index values ​​corresponding to each safety boundary condition. Indicates the first The safety threshold corresponding to each safety boundary condition. Indicates the first The penalty coefficient corresponding to each safety boundary condition. This indicates the power of the safety boundary penalty term, and its value is either 1 or 2. This represents the function that takes the maximum value.

[0066] In step S531, the comprehensive loss function is used to quantitatively evaluate the overall quality of the current candidate compensation instruction parameter set—the expected residual deviation term is used to measure the magnitude of the expected residual deviation after compensation, and the safety boundary penalty term is used to penalize states that exceed the safety threshold.

[0067] S532. Iteratively optimize the candidate compensation instruction parameter set, and in each iteration, use the sensitivity matrix to calculate the gradient direction of the comprehensive loss function relative to the candidate compensation instruction parameter set, and update the candidate compensation instruction parameter set along the gradient direction.

[0068] In step S532, since the sensitivity matrix (i.e., the Jacobian matrix) already contains the partial derivative information of each parameter in the candidate compensation instruction parameter set with respect to each state variable in the expected compensation state, the gradient of the comprehensive loss function with respect to each parameter in the candidate compensation instruction parameter set can be quickly calculated using the chain rule based on the sensitivity matrix and the partial derivatives of the comprehensive loss function with respect to each state variable. The candidate compensation instruction parameter set is then updated in the opposite direction of the gradient, i.e., the updated candidate compensation instruction parameter set is equal to the original candidate compensation instruction parameter set minus the product of the learning rate and the gradient.

[0069] S533. When the value of the comprehensive loss function satisfies the preset convergence condition or reaches the preset iteration limit, the iteration stops.

[0070] In step S533, after each iteration, the updated candidate compensation instruction parameter set is re-input into the differentiable verification module for feedforward simulation to generate a new expected compensation state. It is then determined again whether the accuracy verification condition, safety boundary condition, and dynamic stability condition are simultaneously satisfied. When the expected compensation state generated by the optimized compensation instruction parameter set simultaneously satisfies all the conditions, or when the number of iterations reaches the preset iteration limit, the iteration stops, and the final optimization result is used as the final compensation instruction. This instruction is then sent to the target physical system, and the target physical system is controlled to execute the final compensation instruction. The purpose of setting the preset iteration limit is to prevent entering an infinite loop in the rare cases where all conditions are difficult to satisfy, thus ensuring the real-time performance and availability of this method.

[0071] In step S5, it is understood that the gradient descent algorithm is a well-known iterative optimization algorithm in the art, and its basic principle has been described in detail in the technical literature in this field, and will not be repeated here. The contribution of this embodiment to the gradient descent algorithm is not in improving the algorithm itself, but in using the sensitivity matrix as a gradient information source, combined with the comprehensive loss function, and applied to the iterative re-optimization stage when the compensation command verification fails in the digital twin deviation compensation scenario. That is, when the verification fails, instead of simply retreating to the previous stable parameter or triggering manual intervention, the sensitivity matrix calculated in the differentiable verification process is used to accurately determine the optimization direction, and closed-loop iterative optimization of the candidate compensation command parameter set is performed within the differentiable verification module. In addition, in one possible implementation, the judgment of the verification condition, the construction of the comprehensive loss function, the calculation of the gradient direction, the iterative update of the candidate compensation command parameter set, and the issuance of the final compensation command are all automatically completed by the computer device by executing a preset calculation program, without the need for manual intervention.

[0072] S6. Based on the actual operating status data of the target physical system after executing the final compensation command, the actual residual deviation is calculated.

[0073] In step S6, it should be noted that the operating state of the target physical system changes after executing the final compensation command issued in step S5. To evaluate the actual effect of this compensation, it is necessary to acquire the actual operating state data of the target physical system after executing the final compensation command again. The method of acquiring this actual operating state data is the same as that of acquiring the actual operating state data in step S1, that is, it is acquired in real time through the sensor network and data acquisition module deployed on the target physical system, and has the same or mutually convertible data format and physical dimensions as the actual operating state data acquired in step S1. After acquiring the actual operating state data of the target physical system after executing the final compensation command, the actual operating state data is compared with the preset design target state data, and the actual residual deviation is calculated. The design target state data refers to the operating state data that the target physical system should achieve under ideal operating conditions, which can be predetermined based on product design specifications, process requirements, or historical best operating states. The actual residual deviation reflects the degree of deviation between the actual operating state of the target physical system and the ideal target state after this round of compensation.

[0074] In one possible implementation, the actual residual deviation can be calculated as follows: the difference between the actual operating state data and the design target state data is calculated in each corresponding physical quantity dimension to obtain a multi-dimensional actual residual deviation vector; or, a weighted sum or root mean square value is calculated for the differences in all physical quantity dimensions to obtain a scalar comprehensive actual residual deviation value. The specific calculation method can be adaptively configured according to the characteristics of the target physical system and the compensation accuracy requirements. It is understood that although both the actual residual deviation and the deviation in the deviation time series data constructed in step S2 reflect the difference between the actual state and the desired state of the target physical system in a physical sense, their roles and generation timing differ—the deviation time series data in step S2 is constructed before the compensation command is issued to drive the generation of the compensation command; while the actual residual deviation in step S6 is calculated after the compensation command is executed to evaluate the actual effect of this compensation and provide a data basis for subsequent cross-level feedback. Furthermore, in one possible implementation, the acquisition of the actual operating status data and the calculation of the actual residual deviation are both automatically completed by the computer device by executing a preset calculation program, without the need for manual intervention.

[0075] S7. Compare the actual residual deviation with the expected residual deviation under the expected compensation state to obtain the difference vector between the two and use it as a cross-level feedback signal.

[0076] In step S7, it should be noted that in step S5, when determining the final compensation command, the expected compensation state was generated through feedforward simulation of the differentiable verification module. The expected compensation state includes not only the expected values ​​of each state variable of the target physical system after executing the final compensation command, but also the expected residual deviation calculated based on these expected values. The expected residual deviation characterizes the degree of deviation that should remain between the operating state of the target physical system and the design target state after applying the final compensation command, according to the simulation prediction of the calibrated digital twin model. However, due to the inevitable modeling error between the calibrated digital twin model and the target physical system, and the potential influence of unmodeled external disturbances or parameter drift on the target physical system during actual operation, there is often a difference between the actual residual deviation calculated in step S6 and the expected residual deviation generated in step S5. This difference precisely reflects the predictive accuracy of the calibrated digital twin model under the current operating conditions. Therefore, in step S7, the actual residual deviation is compared with the expected residual deviation, the difference vector between the two is calculated, and the difference vector is used as a cross-level feedback signal.

[0077] In step S7, the difference vector can be calculated by subtracting the actual residual deviation vector from the expected residual deviation vector dimension by dimension in each corresponding physical quantity dimension, resulting in a difference vector of the same dimension as the actual residual deviation. Unlike existing solutions that directly feed back the actual operating data after compensation to a single adaptive learning module or policy update module in an end-to-end manner, the cross-level feedback signal generated in this step has a clear physical meaning—it specifically quantifies the prediction error of the calibrated digital twin model under the current operating conditions, rather than a general evaluation signal of "good or bad control effect" or "good or bad policy." Because the cross-level feedback signal has this clear physical meaning, it can be split and applied to two mutually exclusive independent channels in the subsequent step S8: one is used to correct the physical parameters of the digital twin model to reduce model prediction uncertainty, and the other is used to optimize the initial parameters or search space of the compensation calculation model to improve the generation quality of the compensation strategy. Furthermore, in one possible implementation, the acquisition of the expected residual deviation, the calculation of the difference vector, and the generation of the cross-level feedback signal are all automatically completed by the computer device by executing a preset calculation program, without the need for manual intervention.

[0078] S8. The cross-level feedback signal is diverted to the online calibration module of the digital twin model to correct the physical parameters of the digital twin model and the meta-learning module with compensation strategy to optimize the initial parameters or search space of the compensation calculation model in the next compensation task.

[0079] In step S8, it should be noted that the cross-level feedback signal (i.e. the difference vector) generated in step S7 has a clear physical meaning because it specifically quantifies the prediction error of the calibrated digital twin model under the current working conditions. Therefore, it can be applied to two mutually exclusive independent objectives at the same time: correcting the physical parameters of the twin model itself to improve its prediction accuracy, and optimizing the generation mechanism of the compensation strategy to improve the quality of its initial parameters.

[0080] (A) First Channel: Correcting the physical parameters of the digital twin model. In the first channel, the cross-level feedback signal is diverted to the online calibration module of the digital twin model. Driven by the cross-level feedback signal, the online calibration module performs online identification and update processing on the physical parameters of the digital twin model to correct them. It should be noted that in existing solutions, the feedback data after compensation is typically used to update the compensation strategy model or control model parameters (e.g., updating the policy network weights of a deep reinforcement learning model), rather than to correct the physical parameters of the digital twin model itself. Unlike the above solutions, the online calibration module in this step uses the cross-level feedback signal as the driving signal for the online identification and update of the physical parameters of the digital twin model. The physical parameters refer to the underlying parameters that directly reflect the physical characteristics of the target physical system and directly affect the simulation accuracy of the digital twin model, such as, but not limited to, material constitutive model parameters, contact stiffness, and / or damping coefficients. The online identification refers to using real-time feedback data to solve for the updated physical parameters through parameter identification algorithms (such as least squares method, Kalman filtering, or variants thereof), so that the updated physical parameters can better fit the actual operating characteristics of the target physical system. The update processing refers to applying the identified parameter update to the digital twin model to replace or correct the original physical parameter values.

[0081] In a possible preferred implementation, the cross-level feedback signal is diverted to the online calibration module of the digital twin model to correct the physical parameters of the digital twin model. This includes, but is not limited to, the following steps: diverting the cross-level feedback signal to the online calibration module of the digital twin model; the online calibration module, driven by the cross-level feedback signal, performs online identification and update processing on the material constitutive model parameters, contact stiffness, and / or damping coefficient of the digital twin model to obtain the parameter update amounts of the material constitutive model parameters, the contact stiffness, and / or the damping coefficient; the online calibration module inputs the parameter update amounts into the digital twin model to correct the physical parameters of the digital twin model. The corrected digital twin model is the newly calibrated digital twin model, which will serve as the calibrated digital twin model on which step S4 in the next round of compensation task is based, thereby achieving continuous iterative improvement of the fidelity of the digital twin model.

[0082] (B) Second channel: Optimize the generation mechanism of the compensation strategy, that is, in the second channel, the cross-level feedback signal is diverted to the meta-learning module with the compensation strategy; the meta-learning module optimizes the initial parameters or search space of the compensation calculation model based on the cross-level feedback signal.

[0083] In a possible preferred implementation, after the cross-level feedback signal is diverted to the online calibration module and the meta-learning module with the compensation strategy of the digital twin model, the specific optimization process of the meta-learning module is as follows: First, the meta-learning module obtains a new calibrated digital twin model after the physical parameters of the digital twin model have been corrected by the online calibration module; then, the meta-learning module performs simulation playback for each compensation task in at least one completed historical compensation task, obtaining simulation playback results for each candidate compensation instruction parameter set corresponding to each compensation task; next, the meta-learning module calculates the initial parameter update amount or search space adjustment amount of the compensation calculation model based on the difference between the simulation playback results and the actual execution results of the corresponding compensation tasks; finally, the meta-learning module applies the initial parameter update amount or the search space adjustment amount to optimize the initial parameters or search space of the compensation calculation model in the next compensation task.

[0084] It should be noted that the two channels mentioned above are not independent parallel operations, but rather have a synergistic evolutionary relationship. Specifically, after the first channel corrects the physical parameters of the digital twin model, the simulation accuracy of the digital twin model is improved, and the resulting newly calibrated digital twin model provides a more accurate simulation estimate of the target physical system. In subsequent compensation tasks, the meta-learning module in the second channel performs simulation playback and difference calculation based on the newly calibrated digital twin model with improved simulation accuracy. The resulting initial parameter update or search space adjustment is more accurate and reliable, thereby improving the iterative optimization efficiency of the candidate compensation instruction parameter set generated by the optimized compensation calculation model in the differentiable verification module. Thus, a positive synergistic evolutionary closed loop is formed: "improved twin model calibration accuracy → improved compensation strategy generation quality". Furthermore, in one possible implementation, the cross-level feedback signal splitting, the online identification and update processing, the calculation and input of the parameter update, the simulation playback and difference calculation, and the calculation and application of the initial parameter update or search space adjustment are all automatically completed by the computer equipment by executing a preset calculation program, without manual intervention.

[0085] In another possible preferred implementation, after calculating the sensitivity matrix in step S4, the contribution index of each deviation source component feature vector to the expected compensation state can be calculated based on the sensitivity matrix. Then, for each deviation source component feature vector, the preset mapping relationship between the corresponding vector and the corresponding compensation calculation model for the next compensation task is adjusted according to the corresponding contribution index, or the weight coefficient of the corresponding compensation calculation model for the next compensation task is adjusted. The contribution index can be determined based on the absolute value of each element in the sensitivity matrix, the norm of the sensitivity matrix sub-block corresponding to each deviation source component feature vector, or the attribution score obtained by attribution analysis of each deviation source component feature vector based on the sensitivity matrix. Through the above-mentioned contribution evaluation and mapping / weight adjustment mechanism based on the sensitivity matrix, the system can automatically identify the deviation source component that contributes the most to the compensation effect during continuous operation, and selectively strengthen or adjust the corresponding compensation strategy configuration, thereby further improving the targeting and overall efficiency of the compensation.

[0086] Therefore, based on the physical system dynamic deviation compensation method described in steps S1 to S8 above, a new scheme is provided that can perform differentiable pre-verification and iterative optimization of compensation commands within the calibrated digital twin model, and can perform multi-scale fine-grained identification of deviation sources to drive differentiated compensation. Simultaneously, the cross-level feedback signals after compensation execution are used separately for twin model physical parameter correction and compensation strategy optimization. Specifically, the scheme involves real-time acquisition of the actual operating state data of the target physical system and the simulation operating state data output by its digital twin model; constructing deviation time-series data and using a multi-scale decomposition algorithm to adaptively separate it into multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics; feeding each deviation source component feature vector into a corresponding compensation calculation model with a preset mapping relationship, outputting candidate compensation command parameters and merging them into a candidate compensation command parameter set; inputting the candidate compensation command parameter set into a differentiable verification module built on the calibrated digital twin model, and generating a pre-verification by performing feedforward simulation. The system calculates the sensitivity matrix of each parameter relative to the expected compensation state. Based on the expected compensation state and the sensitivity matrix, it optimizes the candidate compensation command parameter set to obtain the final compensation command and controls the target physical system to execute it. Based on the actual operating state data after execution, it calculates the actual residual deviation and compares the actual residual deviation with the expected residual deviation in the expected compensation state to obtain the difference vector as a cross-level feedback signal. The cross-level feedback signal is diverted to the online calibration module of the digital twin model to correct its physical parameters, and to the meta-learning module with compensation strategy to optimize the initial parameters or search space of the compensation calculation model in the next compensation task. Thus, by constructing a differentiable verification and iterative optimization closed loop inside the calibrated digital twin model, and adopting multi-scale refined identification of deviation sources and a separate dual-channel feedback architecture, it realizes the pre-verification and adaptive optimization of compensation commands, as well as the synergistic evolution of the twin model and the compensation strategy, which significantly improves the accuracy and robustness of dynamic deviation compensation of the physical system, making it convenient for practical application and promotion.

[0087] like Figure 2 As shown, the second aspect of this embodiment provides a virtual device for implementing the physical system dynamic deviation compensation method described in the first aspect, including a state data acquisition unit, a deviation time sequence decomposition unit, a compensation calculation processing unit, a differential verification processing unit, a compensation instruction optimization unit, a residual deviation calculation unit, and a feedback signal diversion unit. The state data acquisition unit is used to acquire in real time the actual operating state data of the target physical system and the simulation operating state data output by the digital twin model of the target physical system; The deviation time series decomposition unit is communicatively connected to the state data acquisition unit. It is used to construct the deviation time series data between the actual running state data and the simulated running state data, and to adaptively separate the deviation time series data into multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics using a multi-scale decomposition algorithm. The compensation calculation processing unit is communicatively connected to the deviation time series decomposition unit, and is used to send the feature vectors of each deviation source component into the compensation calculation model that has a preset mapping relationship with the corresponding vector to output the corresponding candidate compensation instruction parameters, and merge all the candidate compensation instruction parameters into a candidate compensation instruction parameter set. The differential verification processing unit is communicatively connected to the compensation calculation processing unit. It is used to input the candidate compensation instruction parameter set into the differentiable verification module built on the calibrated digital twin model. Then, the differentiable verification module generates the expected compensation state by performing feedforward simulation and calculates the sensitivity matrix of each parameter in the candidate compensation instruction parameter set relative to the expected compensation state. The compensation instruction optimization unit is communicatively connected to the differential verification processing unit, and is used to optimize the candidate compensation instruction parameter set based on the expected compensation state and the sensitivity matrix to obtain the final compensation instruction, and control the target physical system to execute the final compensation instruction; The residual deviation calculation unit is communicatively connected to the state data acquisition unit and the compensation instruction optimization unit, and is used to calculate the actual residual deviation based on the actual operating state data of the target physical system after executing the final compensation instruction. The residual deviation comparison unit is communicatively connected to the residual deviation calculation unit and is used to compare the actual residual deviation with the expected residual deviation under the expected compensation state to obtain the difference vector between the two and use it as a cross-level feedback signal. The feedback signal splitting unit is communicatively connected to the residual deviation comparison unit, and is used to split the cross-level feedback signal to the online calibration module of the digital twin model to correct the physical parameters of the digital twin model and the meta-learning module with compensation strategy to optimize the initial parameters or search space of the compensation calculation model in the next compensation task.

[0088] The working process, working details and technical effects of the aforementioned device provided in the second aspect of this embodiment can be found in the physical system dynamic deviation compensation method described in the first aspect, and will not be repeated here.

[0089] like Figure 3As shown, the third aspect of this embodiment provides a computer device for executing the physical system dynamic deviation compensation method as described in the first aspect. The device includes a storage module, a processing module, and a transceiver module connected in sequence. The storage module stores a computer program, the transceiver module sends and receives messages, and the processing module reads the computer program and executes the physical system dynamic deviation compensation method as described in the first aspect. Specifically, the storage module may include, but is not limited to, random-access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out (FIFO) memory, and / or first-in-last-out (FILO) memory, etc.; the processing module may, but is not limited to, use a microprocessor of the STM32F105 series. Furthermore, the computer device may also include, but is not limited to, a power supply module, a display screen, and other necessary components.

[0090] The working process, working details and technical effects of the aforementioned device provided in the third aspect of this embodiment can be found in the physical system dynamic deviation compensation method described in the first aspect, and will not be repeated here.

[0091] This fourth aspect of the embodiment provides a computer-readable storage medium storing instructions comprising the physical system dynamic deviation compensation method as described in the first aspect. Specifically, the computer-readable storage medium stores instructions that, when executed on a computer, perform the physical system dynamic deviation compensation method as described in the first aspect. The computer-readable storage medium refers to a data storage medium, and may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or Memory Sticks. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0092] The working process, working details and technical effects of the aforementioned computer-readable storage medium provided in the fourth aspect of this embodiment can be found in the physical system dynamic deviation compensation method described in the first aspect, and will not be repeated here.

[0093] This fifth aspect of the embodiment provides a computer program product, including a computer program or instructions, which, when executed by a computer, implement the physical system dynamic deviation compensation method as described in the first aspect. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0094] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for compensating dynamic deviations in a physical system based on twin data calibration, characterized in that, include: Real-time acquisition of actual operating status data of the target physical system and simulation operating status data output by the digital twin model of the target physical system; Construct time-series data of the deviation between the actual operating state data and the simulated operating state data, and use a multi-scale decomposition algorithm to adaptively separate the time-series data of the deviation into multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics; Each of the deviation source component feature vectors is fed into a compensation calculation model that has a preset mapping relationship with the corresponding vector to output the corresponding candidate compensation instruction parameters, and all the candidate compensation instruction parameters are merged into a candidate compensation instruction parameter set. The candidate compensation instruction parameter set is input into the differentiable verification module built on the calibrated digital twin model. Then, the differentiable verification module generates the expected compensation state by performing feedforward simulation and calculates the sensitivity matrix of each parameter in the candidate compensation instruction parameter set relative to the expected compensation state. The candidate compensation instruction parameter set is optimized based on the expected compensation state and the sensitivity matrix to obtain the final compensation instruction, and the target physical system is controlled to execute the final compensation instruction. Based on the actual operating status data of the target physical system after executing the final compensation command, the actual residual deviation is calculated. The actual residual deviation is compared with the expected residual deviation under the expected compensation state to obtain the difference vector between the two and serve as a cross-level feedback signal. The cross-level feedback signal is diverted to the online calibration module of the digital twin model to correct the physical parameters of the digital twin model and to the meta-learning module with a compensation strategy to optimize the initial parameters or search space of the compensation calculation model in the next compensation task.

2. The method for compensating dynamic deviations in a physical system according to claim 1, characterized in that, A multi-scale decomposition algorithm is used to adaptively separate the biased time-series data into multiple bias source component feature vectors with different time constants and / or different spatial distribution characteristics, including: In the time dimension, wavelet packet transform or empirical mode decomposition is used to separate the deviation time series data into at least one slow-changing trend component and at least one fast-changing fluctuation component. For each component in the at least one slow-changing trend component and the at least one fast-changing fluctuation component, a spatial statistical method is used in the spatial dimension to separate the corresponding component into at least one local distortion component and a global drift component that reflect different physical regions or different physical mechanisms. By summing up all at least one local distortion component and all the global drift components, multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics are obtained.

3. The method for compensating dynamic deviations in a physical system according to claim 1, characterized in that, By performing feedforward simulation, a desired compensation state is generated, and the sensitivity matrix of each parameter in the candidate compensation instruction parameter set relative to the desired compensation state is calculated, including: In a simulation environment built on a differentiable programming framework and specifically designed for digital twin bias compensation scenarios, feedforward simulation is performed on the calibrated digital twin model to generate the expected compensation state. During the simulation calculation, the partial derivative dependencies between each parameter in the candidate compensation instruction parameter set and each state variable in the expected compensation state are recorded synchronously. Based on the recorded partial derivative dependencies, the Jacobian matrix of the expected compensation state relative to the candidate compensation instruction parameter set is calculated using the chain rule, and serves as the sensitivity matrix of each parameter in the candidate compensation instruction parameter set relative to the expected compensation state.

4. The method for compensating dynamic deviations in a physical system according to claim 1, characterized in that, The candidate compensation command parameter set is optimized based on the expected compensation state and the sensitivity matrix to obtain the final compensation command, including: Based on the expected compensation state, determine whether the preset accuracy verification conditions, safety boundary conditions, and dynamic stability conditions are simultaneously met. If all conditions are met, the candidate compensation instruction parameter set will be directly used as the final compensation instruction. If all conditions are not met, the sensitivity matrix is ​​used as the gradient information source to guide the gradient descent algorithm to iteratively optimize the candidate compensation instruction parameter set until the expected compensation state generated by the optimized compensation instruction parameter set simultaneously meets all the conditions or reaches the preset iteration limit. Then, the final optimization result is used as the final compensation instruction.

5. The method for compensating dynamic deviations in a physical system according to claim 4, characterized in that, Using the sensitivity matrix as a gradient information source, the gradient descent algorithm is used to iteratively optimize the candidate compensation instruction parameter set, including: Construct the following comprehensive loss function, which includes the expected residual deviation term and the safety boundary penalty term: In the formula, This represents the value of the comprehensive loss function. Indicates the number of key evaluation indicators. Indicates the index number of the key performance indicator and is less than or equal to , Indicates the first The expected residual deviation of each key evaluation indicator Indicates the first The preset weighting coefficients of each key evaluation indicator. This indicates the norm order of the expected residual deviation term, and its value is either 1 or 2. Indicates the number of safety boundary conditions. Indicates the index of the safety boundary condition and is less than or equal to , Indicates the relationship with the first The simulation prediction index values ​​corresponding to each safety boundary condition. Indicates the first The safety threshold corresponding to each safety boundary condition. Indicates the first The penalty coefficient corresponding to each safety boundary condition. This indicates the power of the safety boundary penalty term, and its value is either 1 or 2. This represents the function that takes the maximum value. The candidate compensation instruction parameter set is iteratively optimized, and in each iteration, the gradient direction of the comprehensive loss function relative to the candidate compensation instruction parameter set is calculated using the sensitivity matrix, and the candidate compensation instruction parameter set is updated along the gradient direction. The iteration stops when the value of the comprehensive loss function meets the preset convergence condition or reaches the preset iteration limit.

6. The method for compensating dynamic deviations in a physical system according to claim 4, characterized in that, The dynamic stability conditions specifically include: the overshoot of the physical system's dynamic response process, characterized by the expected compensation state, is less than a preset overshoot threshold, the adjustment time is less than a preset adjustment time threshold, and the steady-state error fluctuation variance is less than a preset variance threshold.

7. The method for compensating dynamic deviations in a physical system according to claim 1, characterized in that, After diverting the cross-level feedback signal to the online calibration module and the meta-learning module with a compensation strategy of the digital twin model, the method further includes: The meta-learning module obtains a new calibrated digital twin model after the physical parameters of the digital twin model have been corrected by the online calibration module; The meta-learning module performs simulation replay for each compensation task in at least one completed historical compensation task, and obtains simulation replay results for each candidate compensation instruction parameter set corresponding to each compensation task. The meta-learning module calculates the initial parameter update amount or search space adjustment amount of the compensation calculation model based on the difference between the simulation playback results and the actual execution results of the corresponding compensation task. The meta-learning module applies the initial parameter update amount or the search space adjustment amount to optimize the initial parameters or search space of the compensation calculation model in the next compensation task.

8. The method for compensating dynamic deviations in a physical system according to claim 1, characterized in that, The cross-level feedback signal is diverted to the online calibration module of the digital twin model to correct the physical parameters of the digital twin model, including: The cross-level feedback signal is diverted to the online calibration module of the digital twin model; Driven by the cross-level feedback signal, the online calibration module performs online identification and update processing on the material constitutive model parameters, contact stiffness and / or damping coefficient of the digital twin model to obtain the parameter update amount of the material constitutive model parameters, the contact stiffness and / or the damping coefficient. The online calibration module inputs the parameter update amount into the digital twin model to correct the physical parameters of the digital twin model.

9. The method for compensating dynamic deviations in a physical system according to claim 1, characterized in that, After calculating the sensitivity matrix of each parameter in the candidate compensation instruction parameter set relative to the expected compensation state, the method further includes: Based on the sensitivity matrix, the contribution index of each of the deviation source component eigenvectors to the expected compensation state is calculated. For each of the aforementioned deviation source component feature vectors, based on the corresponding contribution index, the preset mapping relationship between the corresponding vector and the corresponding compensation calculation model for the next compensation task is adjusted, or the weight coefficient of the corresponding compensation calculation model for the next compensation task is adjusted.

10. A physical system dynamic deviation compensation device based on twin data calibration, characterized in that, It includes a state data acquisition unit, a deviation time series decomposition unit, a compensation calculation and processing unit, a differential verification processing unit, a compensation instruction optimization unit, a residual deviation calculation unit, and a feedback signal diversion unit; The state data acquisition unit is used to acquire in real time the actual operating state data of the target physical system and the simulation operating state data output by the digital twin model of the target physical system; The deviation time series decomposition unit is communicatively connected to the state data acquisition unit. It is used to construct the deviation time series data between the actual running state data and the simulated running state data, and to adaptively separate the deviation time series data into multiple deviation source component feature vectors with different time constants and / or different spatial distribution characteristics using a multi-scale decomposition algorithm. The compensation calculation processing unit is communicatively connected to the deviation time series decomposition unit, and is used to send the feature vectors of each deviation source component into the compensation calculation model that has a preset mapping relationship with the corresponding vector to output the corresponding candidate compensation instruction parameters, and merge all the candidate compensation instruction parameters into a candidate compensation instruction parameter set. The differential verification processing unit is communicatively connected to the compensation calculation processing unit. It is used to input the candidate compensation instruction parameter set into the differentiable verification module built on the calibrated digital twin model. Then, the differentiable verification module generates the expected compensation state by performing feedforward simulation and calculates the sensitivity matrix of each parameter in the candidate compensation instruction parameter set relative to the expected compensation state. The compensation instruction optimization unit is communicatively connected to the differential verification processing unit, and is used to optimize the candidate compensation instruction parameter set based on the expected compensation state and the sensitivity matrix to obtain the final compensation instruction, and control the target physical system to execute the final compensation instruction; The residual deviation calculation unit is communicatively connected to the state data acquisition unit and the compensation instruction optimization unit, and is used to calculate the actual residual deviation based on the actual operating state data of the target physical system after executing the final compensation instruction. The residual deviation comparison unit is communicatively connected to the residual deviation calculation unit and is used to compare the actual residual deviation with the expected residual deviation under the expected compensation state to obtain the difference vector between the two and use it as a cross-level feedback signal. The feedback signal splitting unit is communicatively connected to the residual deviation comparison unit, and is used to split the cross-level feedback signal to the online calibration module of the digital twin model to correct the physical parameters of the digital twin model and the meta-learning module with compensation strategy to optimize the initial parameters or search space of the compensation calculation model in the next compensation task.