A real-time motion control algorithm simulation debugging method

CN120652845BActive Publication Date: 2026-09-08江苏华郢智能技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510974786.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2026-09-08
Estimated Expiration
2045-07-15

AI Technical Summary

Technical Problem

[0005]因此,本发明提供了一种实时运动控制算法仿真调试方法解决参数调整依赖经验且耗时较长和全流程实时监测与动态优化不足的问题

Benefits of technology

[0034] The beneficial effects of this invention are as follows: by constructing a multi-scale simulation environment, dynamic configuration and synchronous simulation of multi-physics field coupled control parameters are realized, providing a high-fidelity virtual test platform for motion control under complex working conditions; by extracting low-frequency contour deformation features through empirical mode decomposition and using automatic differential calculation of gradients, accurate correlation analysis between trajectory error and multi-physics field parameters is realized, so that the parameter optimization process retains dynamic characteristics and ensures adjustment accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120652845B_ABST
    Figure CN120652845B_ABST
Patent Text Reader

Abstract

The application discloses a kind of real-time motion control algorithm simulation debugging method, it is related to real-time simulation cross technical field, including acquisition real-time trajectory data and multiscale simulation parameter and pre-processing;Based on multiscale simulation parameter, construct multiscale simulation environment, and obtain multi-physics field coupling control parameter;According to real-time trajectory data in multiscale simulation environment, carry out multi-physics field simulation, and obtain trajectory error data with safety check mark;Based on trajectory error data with safety mark, using empirical mode decomposition to remove high-frequency component and separate low-frequency contour deformation component, obtain low-frequency contour deformation feature;Based on optimal tuning instruction set, real-time update multi-physics field coupling control parameter and generate simulation debugging report.The application constructs multiscale simulation environment, realized the dynamic configuration of multi-physics field coupling control parameter and synchronous simulation, provides high-fidelity virtual test platform for complex working condition motion control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of real-time simulation technology, and in particular to a method for simulating and debugging a real-time motion control algorithm. Background Technology

[0002] In fields such as industrial automation, robot control, and precision machining, the simulation and debugging of real-time motion control algorithms are crucial for ensuring system accuracy, stability, and response speed. Traditional methods typically employ frequency domain analysis (such as FFT) or time domain error statistics to evaluate control performance, combined with PID parameter tuning and feedforward compensation to optimize system response. Furthermore, existing technologies often use experimental trial-and-error methods or model-based offline simulation to adjust control parameters, balancing dynamic tracking accuracy and energy efficiency. With the increasing demands for intelligent manufacturing and high-precision motion control, technologies such as multiphysics coupling analysis, data-driven parameter optimization, and real-time performance visualization have gradually become research hotspots in this field, providing more possibilities for motion control debugging under complex operating conditions.

[0003] Existing methods still have certain limitations in terms of real-time performance and debugging efficiency. First, although frequency domain analysis can evaluate the frequency response characteristics of the system, it is difficult to intuitively reflect the transient error changes during dynamic tracking, resulting in parameter adjustments relying on experience and being time-consuming. Second, existing technologies mainly rely on offline simulation or segmented debugging, making it difficult to achieve real-time monitoring and dynamic optimization throughout the entire process. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a real-time motion control algorithm simulation and debugging method to solve the problems of parameter adjustment relying on experience and being time-consuming, and insufficient real-time monitoring and dynamic optimization throughout the entire process.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides a real-time motion control algorithm simulation and debugging method, comprising: acquiring real-time trajectory data and multi-scale simulation parameters and preprocessing them; constructing a multi-scale simulation environment based on the multi-scale simulation parameters and obtaining multi-physics field coupled control parameters; performing multi-physics field simulation in the multi-scale simulation environment based on the real-time trajectory data and obtaining trajectory error data with safety verification labels; based on the trajectory error data with safety labels, using empirical mode decomposition to filter out high-frequency components and separate low-frequency contour deformation components to obtain low-frequency contour deformation features; based on the low-frequency contour deformation features, calculating the gradient of the trajectory error with respect to the multi-physics field coupled control parameters, constructing a three-dimensional heat map, identifying the optimal parameter adjustment amount along the negative gradient direction, and outputting the optimal parameter tuning instruction set; and based on the optimal parameter tuning instruction set, updating the multi-physics field coupled control parameters in real time and generating a simulation debugging report.

[0008] As a preferred embodiment of the simulation and debugging method for the real-time motion control algorithm described in this invention, the real-time trajectory data includes command position data and actual position data, position deviation of each axis, and comprehensive trajectory error;

[0009] The multi-scale simulation parameters include mechanical stiffness, electrical temperature rise, and thermal deformation compensation parameters;

[0010] The preprocessing includes data cleaning, dynamic downsampling, standardization, and security verification.

[0011] As a preferred embodiment of the simulation and debugging method for the real-time motion control algorithm described in this invention, the steps for constructing a multi-scale simulation environment and obtaining multi-physics coupled control parameters are as follows:

[0012] The layered time-triggered mechanism triggers each layer of tasks through a timer at a fixed period, enabling cross-layer data interaction and output of a multi-scale data stream with time synchronization.

[0013] The dynamic parameter configuration engine parses multi-scale data streams in real time and performs dynamic correction and dynamic calculation to form a multi-scale simulation environment.

[0014] Based on a multi-scale simulation environment, a multi-physics coupling solver extracts mechanical-thermal-electric coupling parameters in real time and uses dynamic sensitivity analysis and time-varying weighted fusion to obtain multi-physics coupling control parameters.

[0015] As a preferred embodiment of the real-time motion control algorithm simulation and debugging method of the present invention, the steps of performing multi-physics simulation based on real-time trajectory data in a multi-scale simulation environment and obtaining trajectory error data with safety verification marks are as follows:

[0016] Real-time trajectory data is injected synchronously and multi-physics coupling simulation is performed, while actual pose data is collected simultaneously;

[0017] The motion sequence is generated in real time by a motion planning algorithm, and the real-time deviation between the actual pose and the motion sequence is compared axis by axis. After threshold judgment and logical verification, trajectory error data with binary safety label is output.

[0018] As a preferred embodiment of the simulation and debugging method for the real-time motion control algorithm described in this invention, the steps of using empirical mode decomposition to filter out high-frequency components and separate low-frequency contour deformation components to obtain low-frequency contour deformation features are as follows.

[0019] Set the balance condition between the number of extreme values ​​and the number of zero crossings and the frequency cutoff threshold. Through empirical mode decomposition, filter out the high-frequency components of the trajectory error data and perform interpolation to complete it. At the same time, through EMD, decompose the completed trajectory error data into IMF components according to the balance condition between the number of extreme values ​​and the number of zero crossings.

[0020] Modes with frequencies below the frequency cutoff threshold are filtered out, and the remaining low-frequency components and trend terms after filtering out are superimposed on the trajectory error data to obtain the low-frequency profile deformation components that characterize the macroscopic deformation features of the equipment.

[0021] The low-frequency profile deformation components are integrated in the time domain and subjected to envelope analysis to extract the mean amplitude, phase shift and deformation gradient. Weighted fusion is then used to generate standardized low-frequency profile deformation features.

[0022] As a preferred embodiment of the simulation and debugging method for the real-time motion control algorithm described in this invention, the steps for calculating the gradient of the trajectory error with respect to the multi-physics coupled control parameters are as follows:

[0023] The low-frequency profile deformation features are input into a differentiable simulator, and the partial derivative gradient of the trajectory error with respect to the multi-physics field coupled control parameters is calculated by backpropagation.

[0024] The partial derivative gradients of the multiphysics coupling control parameters are mapped to three-dimensional spatial coordinates, and the gradient intensity is represented by color depth.

[0025] As a preferred embodiment of the simulation and debugging method for the real-time motion control algorithm described in this invention, the steps of constructing a three-dimensional heat map, identifying the optimal parameter adjustment amount along the negative gradient direction, and outputting the optimal parameter tuning instruction set are as follows.

[0026] The gradient magnitude of the multiphysics coupling control parameters is mapped to three-dimensional coordinate points, and a continuous heat map is generated through a color interpolation algorithm.

[0027] Continuous heatmaps are overlaid onto a CAD mesh for real-time rendering to construct a 3D heatmap. A constrained gradient descent method is then used to iteratively optimize the multiphysics coupling parameters, outputting the optimal adjustment instruction set that minimizes trajectory error.

[0028] As a preferred embodiment of the simulation and debugging method for the real-time motion control algorithm described in this invention, the steps of real-time updating of multi-physics coupled control parameters and generating a simulation and debugging report are as follows:

[0029] Write the parameter tuning instruction set into the controller without jitter, re-execute the trajectory acquisition to collect new error data and calculate the performance improvement rate;

[0030] The performance improvement rate is compared with the convergence threshold, the optimized multiphysics coupling parameters are written to the controller memory address, and the updated multiphysics coupling parameters are output.

[0031] The performance improvement rate, trajectory error data, and multiphysics coupling parameters are aligned along the time axis to generate a simulation debugging report.

[0032] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the real-time motion control algorithm simulation and debugging method as described in the first aspect of the present invention.

[0033] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the real-time motion control algorithm simulation and debugging method as described in the first aspect of the present invention.

[0034] The beneficial effects of this invention are as follows: by constructing a multi-scale simulation environment, dynamic configuration and synchronous simulation of multi-physics field coupled control parameters are realized, providing a high-fidelity virtual test platform for motion control under complex working conditions; by extracting low-frequency contour deformation features through empirical mode decomposition and using automatic differential calculation of gradients, accurate correlation analysis between trajectory error and multi-physics field parameters is realized, so that the parameter optimization process retains dynamic characteristics and ensures adjustment accuracy. Attached Figure Description

[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. 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.

[0036] Figure 1 A flowchart for the simulation and debugging method of real-time motion control algorithm.

[0037] Figure 2 A flowchart for constructing a multi-scale simulation environment and obtaining multi-physics coupling control parameters.

[0038] Figure 3This is a flowchart for obtaining low-frequency profile deformation features using empirical mode decomposition.

[0039] Figure 4 This is a flowchart for calculating gradients, constructing heatmaps, and optimizing parameters. Detailed Implementation

[0040] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0041] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0042] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0043] Reference Figures 1-4 As one embodiment of the present invention, this embodiment provides a real-time motion control algorithm simulation and debugging method, including the following steps:

[0044] S1. Collect real-time trajectory data and multi-scale simulation parameters and perform preprocessing;

[0045] Real-time trajectory data includes commanded position data, actual position data, position deviations of each axis, and overall trajectory error;

[0046] It should be noted that the commanded position data is the theoretical position signal of each axis generated by the motion control algorithm according to the preset trajectory planning; the actual position data is the actual motion position signal of each axis collected in real time by position sensors such as encoders or grating rulers; the position deviation of each axis is the single-axis tracking error calculated by subtracting the commanded position data from the actual position data; and the comprehensive trajectory error is the overall trajectory tracking accuracy evaluation index obtained by spatial vector synthesis of the position deviations of each axis. Among them, the motion reference trajectory is the ideal motion path of each axis pre-generated by the motion control algorithm. Its setting is based on target motion parameters (such as velocity, acceleration, and jerk limits) and geometric constraints (such as path curvature and transition smoothness). It is usually generated by spline curve or polynomial interpolation algorithm to form a three-dimensional motion profile of time-position-velocity.

[0047] Multi-scale simulation parameters include mechanical stiffness, electrical temperature rise, and thermal deformation compensation parameters;

[0048] It should be noted that the mechanical stiffness parameter is the deformation characteristic parameter of the mechanical structure under load obtained through finite element analysis or experimental modal testing; the electrical temperature rise parameter is the temperature rise characteristic parameter of the electrical system calculated based on the motor current, power loss and thermal resistance network model; and the thermal deformation compensation parameter is the thermal deformation error compensation coefficient calibrated through thermo-mechanical coupling experiments or temperature sensor data.

[0049] Preprocessing includes data cleaning, dynamic downsampling, standardization, and security verification.

[0050] It should be noted that data cleaning involves removing outliers from sensor-acquired data using outlier detection algorithms (such as the 3σ principle) and supplementing missing data segments using linear interpolation. Dynamic downsampling, based on wavelet transform or sliding window averaging, adaptively reduces the sampling rate of high-frequency raw data according to signal frequency band characteristics, preserving key dynamic features. Standardization uses Z-score normalization to scale various physical quantity parameters to a uniform dimension, eliminating the influence of differences in the measurement ranges of different sensors. Safety verification involves threshold comparison (such as position exceeding limits, temperature rise rate) and logic state machine verification, marking and isolating data frames that do not conform to the safety protocol. Among these, the dynamic safety threshold is a boundary value determined by theoretical calculation combined with experimental calibration based on equipment safety operating parameters (such as maximum allowable displacement, temperature limits) and dynamic response characteristics (such as maximum allowable acceleration, temperature rise rate).

[0051] S2. Based on multi-scale simulation parameters, construct a multi-scale simulation environment and obtain multi-physics field coupling control parameters;

[0052] Based on multi-scale simulation parameters, the hierarchical time triggering mechanism triggers each layer of tasks through a timer at a fixed period, and adopts a dual-buffered memory pool to realize cross-layer data interaction and output of time-synchronized multi-scale data streams.

[0053] A further layered time-triggered mechanism based on multi-scale simulation parameter initialization is proposed. This mechanism configures an independent timer for each time level and triggers the corresponding task strictly according to the set period. After each task performs calculations, the results are written to the currently active buffer of the double-buffered memory pool. The read and write pointers are switched at the synchronization time point to realize cross-layer data interaction, and finally output a multi-scale data stream with strictly aligned timestamps.

[0054] It should be noted that the simulation task is to generate calculation results for the corresponding time scale by analyzing the physical model equations of each layer of the computational unit defined by the multi-scale simulation parameters.

[0055] The dynamic parameter configuration engine parses multi-scale data streams in real time, uses hierarchical rule mapping, online parameter interpolation and boundary conditions for dynamic correction, and performs dynamic calculations through a cross-scale coupled solver to form a multi-scale simulation environment.

[0056] Furthermore, the dynamic parameter configuration engine parses multi-scale data streams in real time and associates the parsing results with each scale layer through hierarchical rule mapping. The output of the hierarchical rule mapping is processed by online parameter interpolation to generate a complete parameter set. The results of online parameter interpolation are dynamically corrected by boundary conditions and then input into the cross-scale coupled solver. The data generated by the cross-scale coupled solver after dynamic calculation constitutes the multi-scale simulation environment.

[0057] It should be noted that the boundary conditions are constraint variables extracted from the multi-scale data stream through hierarchical rule mapping, and then dynamically corrected by online parameter interpolation before being input into the cross-scale coupled solver.

[0058] Based on a multi-scale simulation environment, a multi-physics coupling solver extracts mechanical-thermal-electric coupling parameters in real time and uses dynamic sensitivity analysis and time-varying weighted fusion to obtain multi-physics coupling control parameters.

[0059] Furthermore, the multiphysics coupling solver reads the mechanical-thermal-electric coupling parameters from the multi-scale simulation environment in real time and performs dynamic sensitivity analysis. Based on the weighting coefficients output by the dynamic sensitivity analysis, it performs time-varying weighted fusion of the mechanical-thermal-electric coupling parameters and uses the fusion result as the multiphysics coupling control parameter.

[0060] S3. Perform multiphysics simulation based on real-time trajectory data in a multi-scale simulation environment, and obtain trajectory error data with safety verification labels;

[0061] Based on a multi-scale simulation environment, real-time trajectory data is injected synchronously in time and multi-physics field coupling simulation is performed, while actual pose data is collected.

[0062] Furthermore, based on the multi-scale simulation environment, real-time trajectory data is first input into the multi-scale simulation environment through a time-series synchronous injection mechanism. Then, the multi-physics coupling simulation calculation engine is started to perform high-precision simulation calculations. During this process, actual pose data is collected simultaneously through a high-precision sensor network. Finally, the multi-physics coupling simulation results and actual pose data are processed through data fusion to generate a comparison dataset containing complete simulation verification information.

[0063] It should be noted that the real-time trajectory data is continuous pose information obtained by high-precision motion capture equipment (such as a laser tracker with a sampling frequency of 1kHz), which includes position, velocity and acceleration parameters;

[0064] The task objective is a specific action or path planning requirement that the equipment needs to complete, which is generated through the parsing of process requirements or user instructions.

[0065] Dynamic constraints are the physical performance limits (such as joint speed) and stability boundaries (such as acceleration limits) of the actuator, obtained through equipment calibration tests;

[0066] Based on task objectives and dynamic constraints, motion sequences are generated in real time using motion planning algorithms.

[0067] Furthermore, based on the task objective and dynamic constraints, the motion planning algorithm initializes and configures the corresponding parameters, generates motion sequences that conform to the dynamic constraints in real time, and finally outputs a motion sequence that is time-continuous and dynamically feasible. The task objective is directly used for the initial configuration of the motion planning algorithm, the dynamic constraints are used as the boundary conditions for the initialization of the motion planning algorithm, and the intermediate motion sequences generated by the motion planning algorithm are verified to form the final output motion sequence data.

[0068] Based on actual pose data, the system compares the real-time deviation between the actual pose and the motion sequence axis by axis. After threshold judgment and logical verification, it outputs trajectory error data with binary safety labels.

[0069] Furthermore, based on the actual pose data and motion sequence, real-time deviation data is calculated by comparing the actual pose with the motion sequence axis by axis. The calculated real-time deviation data is then processed through threshold judgment and logic verification to generate trajectory error data with binary safety labels. Finally, the trajectory error data with binary safety labels is output. The actual pose data and motion sequence serve as the dual input sources for comparing the actual pose with the motion sequence axis by axis. The real-time deviation data generated by comparing the actual pose with the motion sequence axis by axis is sequentially passed to the threshold judgment and logic verification stages. The trajectory error data with binary safety labels formed after comprehensive judgment is the final output result.

[0070] S4. Based on trajectory error data with safety markings, empirical mode decomposition is used to filter out high-frequency components and separate low-frequency contour deformation components to obtain low-frequency contour deformation features.

[0071] Based on historical signal decomposition experimental data, a balance condition for the number of extreme values ​​and the number of zero crossings and a frequency cutoff threshold were set (the value range is 1.2 to 1.5 times the frequency band where the main energy of the original trajectory error data is concentrated; the specific value is determined by the power spectral density analysis of historical signal decomposition experimental data, and it needs to cover more than 95% of the signal energy and avoid the high-frequency noise-dominated area).

[0072] Furthermore, based on historical signal decomposition experimental data, a balance condition for the number of extrema and the number of zero-crossings is set, and a frequency cutoff threshold is set based on historical signal decomposition experimental data. The balance condition for the number of extrema, the number of zero-crossings, and the frequency cutoff threshold are integrated and output as the parameter configuration result. The historical signal decomposition experimental data also serves as the input source for setting the balance condition for the number of extrema and the number of zero-crossings and setting the frequency cutoff threshold. The outputs of the two setting steps together constitute the final parameter configuration result.

[0073] It should be noted that the signal decomposition experimental data is a set of intrinsic mode function (IMF) components obtained by multi-scale decomposition of the original signal through empirical mode decomposition (EMD) or wavelet transform. For example, the vibration signal is collected and decomposed into 5 IMF components; the number of extrema is the total number of local maxima and minima of each IMF component.

[0074] Empirical mode decomposition is used to filter out high-frequency components of trajectory error data and perform interpolation to complete the data. At the same time, EMD is used to decompose the completed trajectory error data into IMF components according to the balance condition of the number of extreme values ​​and the number of zero crossings.

[0075] Furthermore, based on trajectory error data with binary security identifiers, high-frequency components of the trajectory error data are first filtered out. The filtered trajectory error data is then interpolated to form interpolated trajectory error data. Simultaneously, combined with preset balance conditions for the number of extrema and the number of zero-crossings, empirical mode decomposition (EMD) is used to decompose the interpolated trajectory error data into IMF components that meet the balance conditions. The final output is a set of IMF components. In this process, the trajectory error data undergoes high-frequency component filtering and interpolation. The interpolated trajectory error data, along with the balance conditions for the number of extrema and the number of zero-crossings, serve as inputs to EMD, and the resulting IMF components are the final output. The number of modal feature extrema is a constraint condition derived statistically from the analysis of historical signal decomposition experimental data.

[0076] It should be noted that the trajectory error data is real-time deviation data generated by comparing the actual pose data with the motion sequence axis by axis. After threshold judgment and logical verification, the error set is output with an added binary safety label.

[0077] Based on the IMF components, modes with instantaneous frequencies below the frequency cutoff threshold of the IMF components are selected, and the remaining low-frequency components and trend terms after filtering out the trajectory error data are superimposed to obtain the low-frequency profile deformation components that characterize the macroscopic deformation features of the equipment.

[0078] Furthermore, based on the IMF components and the frequency cutoff threshold, modes with frequencies below the frequency cutoff threshold are first screened out, and the remaining low-frequency components and trend terms after filtering out the trajectory error data are obtained. The modes with frequencies below the frequency cutoff threshold and the remaining low-frequency components and trend terms after filtering out the trajectory error data are superimposed to obtain the low-frequency profile deformation components that characterize the macroscopic deformation features of the equipment. The IMF components and the frequency cutoff threshold are used as input conditions for screening modes with frequencies below the frequency cutoff threshold. The screening results and the remaining low-frequency components and trend terms after filtering out the trajectory error data are superimposed together. The comprehensive result output by the superposition process is the final low-frequency profile deformation component.

[0079] It should be noted that the trend term is the residual component extracted from the trajectory error data through empirical mode decomposition (EMD), which is represented by a monotonic or slowly varying curve of the signal over a long period of time (e.g., baseline offset caused by temperature drift).

[0080] The low-frequency profile deformation components are integrated in the time domain and subjected to envelope analysis to extract the mean amplitude, phase shift and deformation gradient. Weighted fusion is then used to generate standardized low-frequency profile deformation features.

[0081] Furthermore, the low-frequency profile deformation components are integrated in the time domain to obtain the cumulative displacement value. The upper limit curve of amplitude fluctuation is extracted through envelope analysis and the mean amplitude is calculated. Combined with the phase offset obtained from the spectrum analysis and the deformation gradient obtained by differentiating the integral results, the standardized low-frequency profile deformation features are generated by weighted fusion.

[0082] S5. Based on the low-frequency contour deformation characteristics, calculate the gradient of trajectory error on the multi-physics field coupled control parameters, construct a three-dimensional heat map, identify the optimal parameter adjustment amount along the negative gradient direction, and output the optimal parameter adjustment instruction set.

[0083] The low-frequency profile deformation features are input into a differentiable simulator, and the partial derivative gradient of the trajectory error with respect to the multi-physics field coupled control parameters is calculated through automatic differentiation and backpropagation.

[0084] Furthermore, based on the low-frequency profile deformation component and the initial configuration of the differentiable simulator, the low-frequency profile deformation component is input into the differentiable simulator for forward propagation calculation. The gradient calculation process is executed through automatic differentiation backpropagation, thereby calculating the partial derivative gradient of the trajectory error with respect to the multi-physics coupling control parameters. Finally, the partial derivative gradient data is output. The low-frequency profile deformation component serves as the input data of the differentiable simulator. The forward calculation result completed by the differentiable simulator triggers the execution of automatic differentiation backpropagation. The gradient information generated by the automatic differentiation backpropagation is used to calculate the partial derivative gradient of the trajectory error with respect to the multi-physics coupling control parameters. The final generated partial derivative gradient data serves as the output result of the entire calculation process.

[0085] It should be noted that the low-frequency profile deformation features are generated by performing time-domain integration and envelope analysis on the low-frequency profile deformation components to extract the mean amplitude, phase offset, and deformation gradient, and then weighted and fused them.

[0086] Based on the gradient intensity of multiphysics coupling parameters, dense grid data is generated in the parameter space through cubic spline interpolation and mapped to the HSL color space to generate a continuous heatmap.

[0087] Furthermore, the partial derivative gradient of the multiphysics coupling control parameters is input, and the partial derivative gradient of the multiphysics coupling control parameters is distributed to the three-dimensional spatial coordinate points. The gradient magnitude of the multiphysics coupling control parameters at the three-dimensional spatial coordinate points is calculated, and the mapping relationship between the gradient magnitude and the color depth is established. A color interpolation algorithm is used to generate continuous color blocks between the three-dimensional spatial coordinate points to form a continuous heat map. Finally, the continuous heat map is superimposed on the surface of the three-dimensional model.

[0088] Continuous heatmaps are overlaid onto a CAD mesh for real-time rendering to construct a 3D heatmap;

[0089] Furthermore, the continuous heatmap is input, and the continuous heatmap is matched with the CAD mesh topology to establish a texture coordinate mapping from the pixels of the continuous heatmap to the vertices of the CAD mesh. The RGB values ​​of the continuous heatmap are bound to the fragment shader parameters of the CAD mesh. The light intensity is calculated based on the Phong lighting model. The CAD mesh frame that is fused with the continuous heatmap is output through the real-time rendering pipeline, and finally a three-dimensional heatmap with the continuous heatmap superimposed is generated.

[0090] Based on the gradient distribution of the 3D heatmap, the optimal parameter adjustment amount is identified along the negative gradient direction using a constrained gradient descent method, and the optimal adjustment instruction set that minimizes the trajectory error is output.

[0091] Furthermore, based on the gradient distribution of the 3D heatmap and the parameter configuration of the constrained gradient descent method, the multiphysics coupling parameters are updated by performing iterative optimization using the constrained gradient descent method. After each iteration, the trajectory error change is evaluated and the convergence condition is satisfied. When the termination condition is met, the optimal adjustment instruction set is generated, and the optimal adjustment instruction set that minimizes the trajectory error is finally output. The gradient distribution of the 3D heatmap serves as the input basis for the iterative optimization using the constrained gradient descent method, the parameter configuration of the constrained gradient descent method is used to initialize the optimization process, the parameter update generated by the iterative optimization using the constrained gradient descent method is verified by evaluating the trajectory error change, the evaluation result triggers the decision process to determine whether the convergence condition is met, and the optimal adjustment instruction set generated after the condition is met is the final output result.

[0092] It should be noted that the constrained gradient descent method is an optimization method obtained by applying physical feasibility constraints during the standard gradient descent iteration process, limiting the adjustment range of the multiphysics coupling parameters to an allowable range, and ensuring that the multiphysics coupling parameters still meet the engineering constraints after each iteration.

[0093] S6. Based on the optimal parameter tuning instruction set, update the multiphysics coupling control parameters in real time and generate a simulation debugging report.

[0094] The optimal parameter tuning instruction set is written to the controller without jitter through a double buffering mechanism, and the trajectory is re-executed to collect new error data and calculate the performance improvement rate.

[0095] The expression is:

[0096]

[0097] Where η is the performance improvement rate, E1 is the adjusted trajectory error, and E2 is the trajectory error before adjustment;

[0098] Furthermore, the optimal parameter tuning instruction set is input and preloaded into the backup buffer of the double buffer mechanism. The read and write pointers of the double buffer are switched at the control cycle synchronization point to achieve a jitter-free switching. The controller reads the latest parameter tuning instruction set in the double buffer effective area and drives the actuator to re-execute the trajectory according to the updated parameter tuning instruction set. The encoder collects the new error data of trajectory execution. Finally, the performance improvement rate is calculated by comparing the new and old trajectory error data.

[0099] Based on historical optimization data and equipment physical limits, a convergence threshold is defined (the value range is 1.05 to 1.2 times the best error value in the historical optimization data, while not exceeding 80% of the equipment physical limit parameters).

[0100] It should be noted that historical optimization data is a time-series dataset formed by recording the performance improvement rate after each parameter tuning instruction set optimization; the physical limit of the equipment is an insurmountable boundary determined by hardware parameters such as the maximum speed and load capacity of the actuator; the convergence threshold is a termination condition set based on a comprehensive analysis of the improvement rate decay trend of historical optimization data and the physical limit of the equipment.

[0101] The performance improvement rate is compared with the convergence threshold, and the optimized multiphysics coupling parameters are written to the controller memory address through the parameter update logic, and the updated multiphysics coupling parameters are output.

[0102] Furthermore, the performance improvement rate is input, compared with the convergence threshold, the trigger condition is determined by the parameter update logic, the optimized multiphysics coupling parameters are read, the multiphysics coupling parameters are mapped to the controller memory address, the optimized multiphysics coupling parameters are written to the controller memory address, and finally the updated multiphysics coupling parameters are output.

[0103] The performance improvement rate, trajectory error data, and multiphysics coupling parameters are aligned along the time axis to generate a simulation debugging report.

[0104] Furthermore, the system inputs performance improvement rate, trajectory error data, and multiphysics coupling parameters. It performs timestamp alignment processing on the performance improvement rate, trajectory error data, and multiphysics coupling parameters according to the control cycle. The time-aligned performance improvement rate, trajectory error data, and multiphysics coupling parameters are then encapsulated into structured records. The structured records are filled into the simulation debugging report template according to the preset format. Finally, a simulation debugging report containing time axis aligned data is output.

[0105] This embodiment also provides a computer device applicable to the simulation and debugging method of real-time motion control algorithm, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the real-time motion control algorithm simulation and debugging method proposed in the above embodiment.

[0106] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0107] This embodiment also provides a storage medium storing a computer program. When executed by a processor, the program implements the simulation and debugging method for real-time motion control algorithm proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0108] In summary, this invention achieves dynamic configuration and synchronous simulation of multi-physics coupled control parameters by constructing a multi-scale simulation environment, providing a high-fidelity virtual test platform for motion control under complex working conditions; and achieves accurate correlation analysis between trajectory error and multi-physics parameters by extracting low-frequency contour deformation features through empirical mode decomposition and using automatic differential calculation of gradients, thus preserving dynamic characteristics and ensuring adjustment accuracy in the parameter optimization process.

[0109] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for simulating and debugging a real-time motion control algorithm, characterized in that: include, Collect real-time trajectory data and multi-scale simulation parameters and perform preprocessing; Based on multi-scale simulation parameters, a multi-scale simulation environment is constructed, and multi-physics field coupling control parameters are obtained; Multiphysics simulation is performed based on real-time trajectory data in a multi-scale simulation environment, and trajectory error data with safety verification marks is obtained. Based on trajectory error data with safety verification markers, empirical mode decomposition is used to filter out high-frequency components and separate low-frequency contour deformation components to obtain low-frequency contour deformation features, including: The system sets the number of extreme values, the balance condition for the number of zero crossings, and the frequency cutoff threshold. Through empirical mode decomposition, high-frequency components of the trajectory error data are filtered out and interpolated to complete the data. At the same time, the system uses EMD to decompose the completed trajectory error data into IMF components according to the balance condition of the number of extreme values ​​and the number of zero crossings. The intrinsic mode function components whose instantaneous frequency is lower than the frequency cutoff threshold of the IMF component are selected, and the remaining low-frequency components and trend terms after filtering out the trajectory error data are superimposed to obtain the low-frequency profile deformation components that characterize the macroscopic deformation features of the equipment. The low-frequency profile deformation components are integrated in the time domain and subjected to envelope analysis to extract the mean amplitude, phase shift and deformation gradient. Weighted fusion is then used to generate standardized low-frequency profile deformation features. Based on low-frequency profile deformation characteristics, the gradient of trajectory error with respect to multi-physics coupled control parameters is calculated, a three-dimensional heat map is constructed, and the optimal parameter adjustment amount is identified along the negative gradient direction. The optimal parameter tuning instruction set is output, including: The low-frequency profile deformation features are input into a differentiable simulator, and the partial derivative gradient of the trajectory error with respect to the multi-physics field coupled control parameters is calculated by backpropagation. The partial derivative gradients of the multiphysics coupling control parameters are mapped to three-dimensional spatial coordinates, and the gradient intensity is represented by color depth. Based on the gradient intensity of the multiphysics coupling control parameters, dense grid data is generated in the parameter space through cubic spline interpolation and mapped to the HSL color space to generate a continuous heatmap. The continuous heatmap is overlaid on the CAD mesh for real-time rendering to construct a three-dimensional heatmap. The constrained gradient descent method is used to identify the optimal parameter adjustment amount along the negative gradient direction and output the optimal parameter adjustment instruction set that minimizes the trajectory error. Based on the optimal parameter tuning instruction set, the multiphysics coupling control parameters are updated in real time and a simulation debugging report is generated.

2. The real-time motion control algorithm simulation and debugging method as described in claim 1, characterized in that: The Collect real-time trajectory data and multi-scale simulation parameters and perform preprocessing; Real-time trajectory data includes commanded position data, actual position data, position deviations of each axis, and overall trajectory error; The multi-scale simulation parameters include mechanical stiffness, electrical temperature rise, and thermal deformation compensation parameters; The preprocessing includes data cleaning, dynamic downsampling, standardization, and security verification.

3. The real-time motion control algorithm simulation and debugging method as described in claim 2, characterized in that: The steps for constructing a multi-scale simulation environment and obtaining multi-physics coupling control parameters are as follows. The layered time-triggered mechanism triggers each layer of tasks through a timer at a fixed period, enabling cross-layer data interaction and output of a multi-scale data stream with time synchronization. The dynamic parameter configuration engine parses multi-scale data streams in real time and performs dynamic correction and dynamic calculation to form a multi-scale simulation environment. Based on a multi-scale simulation environment, a multi-physics coupling solver extracts mechanical-thermal-electric coupling parameters in real time and uses dynamic sensitivity analysis and time-varying weighted fusion to obtain multi-physics coupling control parameters.

4. The real-time motion control algorithm simulation and debugging method as described in claim 3, characterized in that: The steps for performing multiphysics simulation based on real-time trajectory data in a multi-scale simulation environment and obtaining trajectory error data with safety verification markers are as follows: Real-time trajectory data is injected synchronously and multi-physics coupling simulation is performed, while actual pose data is collected simultaneously; The motion sequence is generated in real time through motion planning algorithm, and the real-time deviation between the actual pose and the motion sequence is compared axis by axis. After threshold judgment and logical verification, trajectory error data with safety verification mark is output.

5. The real-time motion control algorithm simulation and debugging method as described in claim 1, characterized in that: The steps for real-time updating of multiphysics coupling control parameters and generating simulation debugging reports are as follows. Write the parameter tuning instruction set into the controller without jitter, re-execute the original target motion trajectory stored in the controller, collect the real-time position error data between the current execution trajectory and the target trajectory, and calculate the performance improvement rate. The performance improvement rate is compared with the convergence threshold. When the performance improvement rate exceeds the convergence threshold, the multiphysics coupling control parameter update logic is triggered. The optimized multiphysics coupling control parameters are written to the controller memory address and the updated multiphysics coupling control parameters are output. Align the performance improvement rate, trajectory error data, and updated multiphysics coupling control parameters along the time axis to generate a simulation debugging report.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the real-time motion control algorithm simulation and debugging method according to any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the real-time motion control algorithm simulation and debugging method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Separation method for errors of all frequency sections of surface outline of polishing workpiece

    CN102853780A

  • Elevator car bottom welding path field debugging method based on off-line programming

    CN119794524A