Real-time motion control algorithm simulation debugging method
By building a multi-scale simulation environment and empirical mode decomposition, real-time monitoring and optimization of motion control algorithms, the problem of parameter adjustment relying on experience and taking a long time is solved, and efficient dynamic parameter adjustment and accurate virtual testing are achieved.
Patent Information
- Application Number
- CN202510974786.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-15
AI Technical Summary
Existing simulation and debugging methods for real-time motion control algorithms have limitations in terms of real-time performance and debugging efficiency. Parameter adjustment relies on experience and is time-consuming, making it difficult to achieve real-time monitoring and dynamic optimization of the entire process.
By collecting real-time trajectory data and multi-scale simulation parameters, a multi-scale simulation environment is constructed, multi-physics field coupling control parameters are obtained, and empirical mode decomposition is used to filter out high-frequency components. The low-frequency contour deformation characteristics of the trajectory error are calculated, and a three-dimensional thermal map is constructed. The optimal parameter adjustment amount is identified along the negative gradient direction, and the control parameters are updated in real time.
It realizes the dynamic configuration and synchronous simulation of multi-physics field coupling control parameters, provides a high-fidelity virtual test platform, and ensures the dynamic characteristics and adjustment accuracy of the parameter optimization process.
Smart Images

Figure CN120652845A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of real-time simulation cross technology, in particular to a real-time motion control algorithm simulation debugging method. Background Art
[0002] In the fields of industrial automation, robotic control and precision machining, simulation and debugging of real-time motion control algorithms are key links to ensure system accuracy, stability and response speed. Traditional methods usually use frequency domain analysis (such as FFT) or time domain error statistics to evaluate control performance, and combine PID parameter tuning, feedforward compensation and other means to optimize system response. In addition, existing technologies often adjust control parameters through trial and error or model-based offline simulation to balance dynamic tracking accuracy and energy efficiency. With the increasing demand for intelligent manufacturing and high-precision motion control, technologies such as multi-physics field 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 working conditions.
[0003] Existing methods still have limitations in terms of real-time performance and debugging efficiency. First, while frequency-domain analysis can evaluate the system's frequency response characteristics, it struggles to directly reflect transient error changes during dynamic tracking, resulting in time-consuming and empirically-reliant parameter adjustments. Second, existing technologies primarily rely on offline simulation or segmented debugging, making it difficult to achieve full-process real-time monitoring and dynamic optimization. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a real-time motion control algorithm simulation debugging method to solve the problems that parameter adjustment relies on experience and is time-consuming and that the whole process is insufficient in real-time monitoring and dynamic optimization.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In the first aspect, the present invention provides a real-time motion control algorithm simulation and debugging method, which includes collecting real-time trajectory data and multi-scale simulation parameters and performing preprocessing; constructing a multi-scale simulation environment based on the multi-scale simulation parameters, and obtaining multi-physics field coupling control parameters; performing multi-physics field simulation according to the real-time trajectory data in the multi-scale simulation environment, and obtaining trajectory error data with a safety verification mark; based on the trajectory error data with a safety mark, using empirical mode decomposition to filter out high-frequency components and separate low-frequency contour deformation components to obtain low-frequency contour deformation characteristics; based on the low-frequency contour deformation characteristics, calculating the gradient of the trajectory error to the multi-physics field coupling control parameters, constructing a three-dimensional thermal map, and identifying the optimal parameter adjustment amount along the negative gradient direction, and outputting the optimal parameter adjustment instruction set; based on the optimal parameter adjustment instruction set, updating the multi-physics field coupling control parameters in real time and generating a simulation debugging report.
[0008] As a preferred solution of the real-time motion control algorithm simulation debugging method of the present invention, wherein: 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 solution of the real-time motion control algorithm simulation debugging method of the present invention, the steps of constructing a multi-scale simulation environment and obtaining multi-physics field coupling control parameters are as follows:
[0012] The layered time triggering mechanism triggers the simulation tasks at each layer through a timer at a fixed period, realizing cross-layer data interaction and outputting multi-scale data streams with synchronized timing.
[0013] The dynamic parameter configuration engine analyzes multi-scale data streams in real time and performs dynamic corrections and dynamic calculations to form a multi-scale simulation environment;
[0014] Based on the multi-scale simulation environment, the multi-physics coupling solver extracts the mechanical-thermal-electrical coupling parameters in real time, and uses dynamic sensitivity analysis and time-varying weighted fusion to obtain the multi-physics coupling control parameters.
[0015] As a preferred solution of the real-time motion control algorithm simulation debugging method of the present invention, wherein: the multi-physics field simulation is performed according to the real-time trajectory data in the multi-scale simulation environment, and the trajectory error data with a safety verification mark is obtained, the steps are as follows:
[0016] Synchronously inject real-time trajectory data and perform multi-physics field coupling simulation while collecting actual pose data;
[0017] The motion sequence generated in real time by the motion planning algorithm is compared axis by axis with the real-time deviation between the actual posture and the motion sequence. After threshold judgment and logic verification, the trajectory error data with binary safety identification is output.
[0018] As a preferred solution of the real-time motion control algorithm simulation debugging method of the present invention, wherein: the 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, the steps are as follows:
[0019] The balance condition between the number of extreme values and the number of zero crossings and the frequency cutoff threshold are set. The high-frequency components of the trajectory error data are filtered out and interpolated through empirical mode decomposition. At the same time, the completed trajectory error data is decomposed into IMF components through EMD according to the balance condition between the number of extreme values and the number of zero crossings.
[0020] Filter modes with frequencies lower than the frequency cutoff threshold, superimpose the remaining low-frequency components and trend terms after filtering out the trajectory error data, and obtain the low-frequency contour deformation components that characterize the macroscopic deformation characteristics of the equipment;
[0021] The low-frequency contour deformation component is subjected to time domain integration and envelope analysis to extract the amplitude mean, phase offset and deformation gradient, and weighted fusion is used to generate standardized low-frequency contour deformation features.
[0022] As a preferred solution of the real-time motion control algorithm simulation debugging method of the present invention, wherein: the gradient of the trajectory error to the multi-physics field coupling control parameter is calculated, the steps are as follows:
[0023] The low-frequency contour deformation characteristics are input into the differentiable simulator, and the partial derivative gradient of the trajectory error with respect to the multi-physics field coupling control parameters is calculated through backpropagation.
[0024] Map the partial derivative gradient of the multi-physics field coupling control parameter to the three-dimensional space coordinates, and use color depth to represent the gradient intensity;
[0025] As a preferred solution of the real-time motion control algorithm simulation debugging method of the present invention, wherein: the steps of constructing a three-dimensional thermal map, identifying the optimal parameter adjustment amount along the negative gradient direction, and outputting the optimal parameter adjustment instruction set are as follows:
[0026] The gradient amplitude of the multi-physics field coupling control parameter is mapped to a three-dimensional coordinate point, and a continuous thermal map is generated through a color interpolation algorithm;
[0027] Continuous thermal maps are superimposed on the CAD grid for real-time rendering to construct a three-dimensional thermal map. The multi-physics field coupling parameters are iteratively optimized using the constrained gradient descent method, and the optimal adjustment instruction set that minimizes the trajectory error is output.
[0028] As a preferred solution of the real-time motion control algorithm simulation debugging method of the present invention, wherein: the real-time updating of multi-physics field coupling control parameters and the generation of simulation debugging reports are as follows:
[0029] Write the parameter tuning instruction set to the controller without jitter, re-execute the trajectory to collect new error data and calculate the performance improvement rate;
[0030] Compare the performance improvement rate with the convergence threshold, write the optimized multi-physics field coupling parameters into the controller memory address, and output the updated multi-physics field coupling parameters;
[0031] Align performance improvement rate, trajectory error data, and multi-physics field coupling parameters along the time axis to generate a simulation debugging report.
[0032] In a second aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the real-time motion control algorithm simulation and debugging method as described in the first aspect of the present invention is implemented.
[0033] In a third aspect, 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, any step of the real-time motion control algorithm simulation and debugging method as described in the first aspect of the present invention is implemented.
[0034] The beneficial effects of the present invention are as follows: by constructing a multi-scale simulation environment, dynamic configuration and synchronous simulation of multi-physics field coupling control parameters are realized, providing a high-fidelity virtual test platform for motion control under complex working conditions; by extracting low-frequency contour deformation characteristics through empirical mode decomposition and using automatic differentiation to calculate gradients, accurate correlation analysis between trajectory errors and multi-physics field parameters is achieved, so that the parameter optimization process retains dynamic characteristics and ensures adjustment accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 Flowchart of the simulation and debugging method for real-time motion control algorithm.
[0037] Figure 2 Flowchart for building a multi-scale simulation environment and obtaining multi-physics coupling control parameters.
[0038] Figure 3Flowchart for obtaining low-frequency contour deformation features using empirical mode decomposition.
[0039] Figure 4 Flowchart for calculating gradients, building heatmaps, and optimizing parameters. DETAILED DESCRIPTION
[0040] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0041] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0042] Secondly, the term "one embodiment" or "embodiment" 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 various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.
[0043] Reference Figures 1 to 4 , is an embodiment of the present invention, which provides a real-time motion control algorithm simulation debugging method, comprising the following steps:
[0044] S1, collect real-time trajectory data and multi-scale simulation parameters and perform preprocessing;
[0045] Real-time trajectory data includes command position data, actual position data, position deviation of each axis and comprehensive trajectory error;
[0046] It should be noted that command position data is the theoretical position signal for each axis generated by the motion control algorithm based on a preset trajectory plan; 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 command position data from the actual position data; and the integrated trajectory error is an overall trajectory tracking accuracy evaluation indicator obtained by performing spatial vector synthesis of the position deviations of each axis. The motion reference trajectory is the ideal motion path for each axis pre-generated by the motion control algorithm. Its setting is based on the target motion parameters (such as speed, acceleration, and acceleration limit) and geometric constraints (such as path curvature and transition zone smoothness). Spline curves or polynomial interpolation algorithms are typically used to generate the three-dimensional motion profile of time, position, and 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 parameters are the deformation characteristic parameters of the mechanical structure under load obtained through finite element analysis or experimental modal testing; the electrical temperature rise parameters are the temperature rise characteristic parameters of the electrical system calculated based on the motor current, power loss and thermal resistance network model; the thermal deformation compensation parameters are the thermally induced deformation error compensation coefficients calibrated through thermal-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 uses outlier detection algorithms (such as the 3σ principle) to remove outliers from sensor data and linear interpolation to fill in missing data segments. Dynamic downsampling uses wavelet transform or sliding window averaging to adaptively reduce the sampling rate of high-frequency raw data based on the signal frequency band characteristics, preserving key dynamic features. Standardization uses Z-score normalization to scale various physical parameters to a uniform dimension, eliminating the impact of different sensor ranges. Safety verification uses threshold comparisons (such as position exceeding limits and temperature rise rate) and logic state machine verification to mark and isolate data frames that do not comply with safety protocols. Dynamic safety thresholds are boundary values determined through theoretical calculations combined with experimental calibration, based on equipment safety operating parameters (such as maximum allowable displacement and temperature limit) and dynamic response characteristics (such as maximum allowable acceleration and temperature rise rate).
[0051] S2. Based on the multi-scale simulation parameters, a multi-scale simulation environment is constructed and multi-physics field coupling control parameters are obtained;
[0052] Based on multi-scale simulation parameters, a layered time trigger mechanism triggers simulation tasks at each layer through a timer at a fixed period. A double-buffered memory pool is used to achieve cross-layer data interaction and output a multi-scale data stream with synchronized timing.
[0053] Furthermore, a hierarchical time triggering mechanism is initialized based on multi-scale simulation parameters. This mechanism configures an independent timer for each time layer, triggering the corresponding task strictly according to the set period. After executing the calculation, the task of each layer writes the result to the currently active buffer of the double-buffered memory pool. The read and write pointers are switched at the synchronous time point to realize cross-layer data exchange, and the final output is a multi-scale data stream with strictly aligned timestamps.
[0054] It should be noted that the simulation task is to generate the calculation results of the corresponding time scale by analyzing the physical model equations according to the calculation units of each layer defined by the multi-scale simulation parameters;
[0055] The dynamic parameter configuration engine analyzes 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 coupling solver to form a multi-scale simulation environment;
[0056] Furthermore, the dynamic parameter configuration engine parses the multi-scale data stream in real time and associates the parsing results to 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 the online parameter interpolation are dynamically corrected by boundary conditions and input into the cross-scale coupling solver. The data generated after the cross-scale coupling solver performs dynamic solution 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 are input into the cross-scale coupling solver after dynamic correction through online parameter interpolation;
[0058] Based on the multi-scale simulation environment, the multi-physics coupling solver extracts the mechanical-thermal-electrical coupling parameters in real time, and uses dynamic sensitivity analysis and time-varying weighted fusion to obtain the multi-physics coupling control parameters.
[0059] Furthermore, the multi-physics coupling solver reads the mechanical-thermal-electrical coupling parameters from the multi-scale simulation environment in real time and performs dynamic sensitivity analysis. Based on the weight coefficients output by the dynamic sensitivity analysis, the mechanical-thermal-electrical coupling parameters are time-varying weighted fused, and the fusion results are used as the multi-physics coupling control parameters.
[0060] S3. Perform multi-physics field simulation based on real-time trajectory data in a multi-scale simulation environment and obtain trajectory error data with safety verification marks;
[0061] Based on a multi-scale simulation environment, real-time trajectory data is injected through time-series synchronization and multi-physics field coupling simulation is performed, while actual posture data is collected;
[0062] Furthermore, based on the multi-scale simulation environment, the real-time trajectory data is first input into the multi-scale simulation environment through a time-series synchronization injection mechanism, and then the multi-physics field coupling simulation calculation engine is started to perform high-precision simulation operations. During this process, the actual posture data is collected synchronously through a high-precision sensor network. Finally, the multi-physics field coupling simulation results and the actual posture data are combined through data fusion processing to generate a comparison data set containing complete simulation verification information;
[0063] It should be noted that real-time trajectory data is continuous posture information measured by high-precision motion capture equipment (such as a laser tracker with a sampling frequency of 1kHz), including position, velocity and acceleration parameters;
[0064] The task goal is the specific action or path planning requirement that the equipment needs to complete, which is generated by analyzing process requirements or user instructions;
[0065] Dynamic constraints are the physical performance limits (e.g., joint velocities) and stability boundaries (e.g., acceleration limits) of the actuator, obtained through equipment calibration testing;
[0066] Based on the mission objectives and dynamic constraints, motion sequences are generated in real time through motion planning algorithms;
[0067] Furthermore, based on the mission objectives and dynamic constraints, the motion planning algorithm initializes and configures the corresponding parameters. The motion planning algorithm generates a motion sequence that conforms to the dynamic constraints in real time, and ultimately outputs a time-continuous and dynamically feasible motion sequence. The mission objectives are directly used to initialize the motion planning algorithm, and the dynamic constraints serve as the boundary conditions for the initialization of the motion planning algorithm. The intermediate motion sequences generated by the motion planning algorithm are verified to form the final output motion sequence data.
[0068] Based on the actual posture data, the real-time deviation between the actual posture and the motion sequence is compared axis by axis. After threshold judgment and logic verification, the trajectory error data with binary safety identification is output.
[0069] Furthermore, based on the actual posture data and motion sequence, real-time deviation data is calculated by comparing the actual posture with the motion sequence axis by axis, and the calculated real-time deviation data is generated into trajectory error data with binary safety identification after threshold judgment and logical verification, and finally the trajectory error data with binary safety identification is output, wherein the actual posture data and motion sequence serve as dual input sources for comparing the actual posture with the motion sequence axis by axis, and the real-time deviation data generated by comparing the actual posture with the motion sequence axis by axis is passed to the threshold judgment and logical verification links in turn, and the trajectory error data with binary safety identification formed after comprehensive judgment is used as the final output result.
[0070] S4. Based on the trajectory error data with safety marks, 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 between the number of extreme values and the number of zero crossings, as well as a frequency cutoff threshold, was set. (The value range was 1.2-1.5 times the frequency band where the main energy of the original trajectory error data is concentrated. The specific value was determined by power spectral density analysis of historical signal decomposition experimental data. It must cover more than 95% of the signal energy and avoid the high-frequency noise-dominated area.)
[0072] Furthermore, based on the historical signal decomposition experimental data, the balance condition between the number of extreme values and the number of zero crossings is set, and based on the historical signal decomposition experimental data, the frequency cutoff threshold is set, and the number of extreme values, the balance condition between the number of zero crossings and the frequency cutoff threshold are integrated and output as a parameter configuration result, wherein the historical signal decomposition experimental data is simultaneously used as the input source for setting the balance condition between the number of extreme values and the number of zero crossings and setting the frequency cutoff threshold, and 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 collected vibration signal is decomposed into 5 IMF components; the number of extreme values is the total number of local maxima and minima of each IMF component.
[0074] Through empirical mode decomposition, the high-frequency components of the trajectory error data are filtered out and interpolated. At the same time, the completed trajectory error data is decomposed into IMF components through EMD according to the balance conditions of the number of extreme values and the number of zero crossings.
[0075] Furthermore, based on the trajectory error data with binary safety identification, the high-frequency components of the trajectory error data are first filtered out, and the filtered trajectory error data is interpolated and supplemented to form interpolated and supplemented trajectory error data. At the same time, combined with the preset extreme value number and zero-crossing number balance conditions, the interpolated and supplemented trajectory error data is decomposed into IMF components that meet the balance conditions through empirical mode decomposition, and finally an IMF component set is output, wherein the trajectory error data is sequentially processed by high-frequency component filtering and interpolation supplementation, and the interpolated and supplemented trajectory error data and the extreme value number and zero-crossing number balance conditions are used as inputs of the empirical mode decomposition, and the IMF components generated by the decomposition are used as the final output results. Among them, the number of modal characteristic extreme values is the extreme value number limit condition obtained by analyzing the historical signal decomposition experimental data statistics;
[0076] It should be noted that trajectory error data is real-time deviation data generated by comparing the actual posture data with the motion sequence axis by axis. After threshold judgment and logic verification, the error set is output with a binary safety flag.
[0077] Based on the IMF components, the modes whose instantaneous frequency of the IMF components is lower than the frequency cutoff threshold are screened, and the remaining low-frequency components after filtering out in the trajectory error data are superimposed with the trend term to obtain the low-frequency contour deformation components that characterize the macroscopic deformation characteristics of the equipment.
[0078] Furthermore, based on the IMF component and the frequency cutoff threshold, the modes with frequencies lower than the frequency cutoff threshold are first screened, and the remaining low-frequency components and trend items after filtering out in the trajectory error data are obtained at the same time; the modes with frequencies lower than the frequency cutoff threshold are superimposed with the remaining low-frequency components and trend items after filtering out in the trajectory error data, and finally a low-frequency contour deformation component characterizing the macroscopic deformation characteristics of the equipment is obtained, wherein the IMF component and the frequency cutoff threshold are jointly used as input conditions for screening the modes with frequencies lower than the frequency cutoff threshold, and the screening results are superimposed with the remaining low-frequency components and trend items after filtering out in the trajectory error data, and the comprehensive result output by the superimposition processing is the final low-frequency contour deformation component;
[0079] It should be noted that the trend term is the residual component extracted from the trajectory error data by empirical mode decomposition (EMD), which is manifested as a monotonic or slowly varying curve of the signal that changes slowly over a long period of time (e.g., the baseline offset caused by temperature drift);
[0080] The low-frequency contour deformation component is subjected to time domain integration and envelope analysis to extract the amplitude mean, phase offset and deformation gradient, and weighted fusion is used to generate standardized low-frequency contour deformation features.
[0081] Furthermore, the low-frequency contour deformation component is integrated in the time domain to obtain the cumulative displacement value, and the amplitude fluctuation upper limit curve is extracted through envelope analysis and the amplitude mean is calculated. Combined with the phase offset obtained by spectral analysis and the deformation gradient obtained by derivation of the integration result, the standardized low-frequency contour deformation feature is generated by weighted fusion.
[0082] S5. Based on the low-frequency contour deformation characteristics, the gradient of the trajectory error with respect to the multi-physics field coupling control parameters is calculated, a three-dimensional thermal map is constructed, and the optimal parameter adjustment amount is identified along the negative gradient direction, and the optimal parameter adjustment instruction set is output;
[0083] The low-frequency contour deformation characteristics are input into the differentiable simulator, and the partial derivative gradient of the trajectory error with respect to the multi-physics field coupling control parameters is calculated through automatic differentiation back propagation;
[0084] Furthermore, based on the low-frequency contour deformation component and the initialization configuration of the differentiable simulator, the low-frequency contour deformation component is input into the differentiable simulator for forward propagation calculation, and the gradient calculation process is executed through automatic differential back propagation, thereby calculating the partial derivative gradient of the trajectory error with respect to the multi-physics field coupling control parameter, and finally outputting the partial derivative gradient data, wherein the low-frequency contour deformation component serves as the input data of the differentiable simulator, and the forward calculation result completed by the differentiable simulator triggers the execution of automatic differential back propagation, and the gradient information generated by the automatic differential back propagation execution is used to calculate the partial derivative gradient of the trajectory error with respect to the multi-physics field coupling control parameter, and the partial derivative gradient data finally generated serves as the output result of the entire calculation process;
[0085] It should be noted that the low-frequency contour deformation feature is generated by performing time domain integration on the low-frequency contour deformation component, envelope analysis to extract the amplitude mean, phase offset and deformation gradient, and weighted fusion;
[0086] Based on the gradient intensity of the multi-physics field 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 heat map;
[0087] Furthermore, the partial derivative gradient of the multi-physics field coupling control parameter is input, the partial derivative gradient of the multi-physics field coupling control parameter is assigned to the three-dimensional space coordinate point, the gradient amplitude of the multi-physics field coupling control parameter at the three-dimensional space coordinate point is calculated, a mapping relationship between the gradient amplitude and the color depth is established, and a color interpolation algorithm is used to generate continuous color blocks between the three-dimensional space coordinate points to form a continuous heat map, and finally the continuous heat map is superimposed on the three-dimensional model surface;
[0088] Overlay continuous heat maps onto CAD grids for real-time rendering to construct three-dimensional heat maps;
[0089] Furthermore, the continuous heat map is input, matched with the CAD mesh topology, and a texture coordinate mapping is established from the continuous heat map pixels to the CAD mesh vertices. The RGB values of the continuous heat map 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 fused with the continuous heat map is output through a real-time rendering pipeline, and finally a 3D heat map with the continuous heat map superimposed is generated.
[0090] Based on the gradient distribution of the three-dimensional heat map, the constrained gradient descent method is used to identify the optimal parameter adjustment along the negative gradient direction, and the optimal adjustment instruction set that minimizes the trajectory error is output.
[0091] Furthermore, based on the gradient distribution of the three-dimensional heat map and the parameter configuration of the constrained gradient descent method, the multi-physics field coupling parameters are updated by performing iterative optimization of the constrained gradient descent method. After each iteration, the trajectory error change is evaluated and the convergence conditions are determined. When the termination conditions are 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 three-dimensional heat map is used as the input basis for the iterative optimization of the constrained gradient descent method, and the parameter configuration of the constrained gradient descent method is used to initialize the optimization process. The parameter update generated by the iterative optimization of the constrained gradient descent method is verified by evaluating the trajectory error change. The evaluation result triggers the decision-making process of determining whether the convergence conditions are met, and the optimal adjustment instruction set generated after the conditions are met is used as the final output result.
[0092] It should be noted that the constrained gradient descent method is an optimization method obtained by imposing physical feasibility constraints in the standard gradient descent iterative process, limiting the adjustment range of the multi-physics field coupling parameters to an allowable range, and ensuring that the multi-physics field coupling parameters still meet the engineering constraints after each iteration.
[0093] S6. Based on the optimal parameter adjustment instruction set, the multi-physics field coupling control parameters are updated in real time and a simulation debugging report is generated.
[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 trajectory error after adjustment, 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 synchronization point of the control cycle to achieve jitter-free switching. The controller reads the latest parameter tuning instruction set in the double-buffer effective area, drives the actuator to re-execute the trajectory according to the updated parameter tuning instruction set, collects new error data of the trajectory execution through the encoder, and finally compares the new and old trajectory error data to calculate the performance improvement rate.
[0099] Based on historical optimization data and the physical limits of the equipment, define the convergence threshold (value range: 1.05-1.2 times the best error value in the historical optimization data, while not exceeding 80% of the physical limit parameters of the equipment);
[0100] It should be noted that historical optimization data is a time series data set formed by recording the performance improvement rate after each parameter adjustment instruction set optimization. The physical limit of the device 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 device.
[0101] Compare the performance improvement rate with the convergence threshold, write the optimized multi-physics coupling parameters to the controller memory address through the parameter update logic, and output the updated multi-physics coupling parameters;
[0102] Furthermore, the performance improvement rate is input, the performance improvement rate is compared with the convergence threshold, the trigger condition is determined by the parameter update logic, the optimized multi-physics coupling parameters are read, the multi-physics coupling parameters are mapped to the controller memory address, the optimized multi-physics coupling parameters are written to the controller memory address, and finally the updated multi-physics coupling parameters are output;
[0103] Align performance improvement rate, trajectory error data, and multi-physics field coupling parameters along the time axis to generate a simulation debugging report.
[0104] Furthermore, the performance improvement rate, trajectory error data and multi-physics field coupling parameters are input, and the performance improvement rate, trajectory error data and multi-physics field coupling parameters are timestamp aligned according to the control cycle. The time-aligned performance improvement rate, trajectory error data and multi-physics field coupling parameters are encapsulated as structured records, and the structured records are filled into the simulation debugging report template according to the preset format, and finally a simulation debugging report containing time axis alignment data is output.
[0105] This embodiment also provides a computer device suitable for the case of a real-time motion control algorithm simulation debugging method, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the real-time motion control algorithm simulation debugging method proposed in the above embodiment.
[0106] The computer device may be a terminal, comprising a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse.
[0107] This embodiment also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the real-time motion control algorithm simulation debugging method proposed in the above embodiment; 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 read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0108] In summary, the present invention achieves dynamic configuration and synchronous simulation of multi-physics field coupling control parameters by constructing a multi-scale simulation environment, providing a high-fidelity virtual test platform for motion control under complex working conditions; extracts low-frequency contour deformation features through empirical mode decomposition and uses automatic differentiation to calculate gradients, thereby achieving precise correlation analysis between trajectory errors and multi-physics field parameters, so that the parameter optimization process retains dynamic characteristics and ensures adjustment accuracy.
[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 the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A real-time motion control algorithm simulation debugging method, characterized by: include, Collect real-time trajectory data and multi-scale simulation parameters and perform preprocessing; Based on multi-scale simulation parameters, build a multi-scale simulation environment and obtain multi-physics field coupling control parameters; Perform multi-physics simulation based on real-time trajectory data in a multi-scale simulation environment and obtain trajectory error data with safety verification marks; Based on the 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. Based on the low-frequency contour deformation characteristics, the gradient of the trajectory error with respect to the multi-physics field coupling control parameters is calculated, a three-dimensional heat map is constructed, and the optimal parameter adjustment amount is identified along the negative gradient direction, and the optimal parameter adjustment instruction set is output; Based on the optimal parameter adjustment instruction set, the multi-physics field coupling control parameters are updated in real time and a simulation debugging report is generated.
2. The real-time motion control algorithm simulation debugging method according to claim 1, wherein: The real-time trajectory data and multi-scale simulation parameters are collected and pre-processed; Real-time trajectory data includes command position data, actual position data, position deviation of each axis and comprehensive 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 debugging method according to claim 2, wherein: The steps of constructing a multi-scale simulation environment and obtaining multi-physics field coupling control parameters are as follows: The layered time triggering mechanism triggers the simulation tasks at each layer through a timer at a fixed period, realizing cross-layer data interaction and outputting multi-scale data streams with synchronized timing. The dynamic parameter configuration engine analyzes multi-scale data streams in real time and performs dynamic corrections and dynamic calculations to form a multi-scale simulation environment; Based on the multi-scale simulation environment, the multi-physics coupling solver extracts the mechanical-thermal-electrical coupling parameters in real time, and uses dynamic sensitivity analysis and time-varying weighted fusion to obtain the multi-physics coupling control parameters.
4. The real-time motion control algorithm simulation debugging method according to claim 3, wherein: The multi-physics field simulation is performed based on the real-time trajectory data in the multi-scale simulation environment, and the trajectory error data with the safety verification mark is obtained. The steps are as follows: Synchronously inject real-time trajectory data and perform multi-physics field coupling simulation while collecting actual pose data; The motion planning algorithm generates a motion sequence in real time, and compares the real-time deviation between the actual posture and the motion sequence axis by axis. After threshold judgment and logic verification, the trajectory error data with a binary safety mark is output.
5. The real-time motion control algorithm simulation debugging method according to claim 4, wherein: The 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. The steps are as follows: The number of extreme values, the balance condition of the number of zero crossings, and the frequency cutoff threshold are set. Through empirical mode decomposition, the high-frequency components of the trajectory error data are filtered out and interpolated and supplemented. At the same time, the supplemented trajectory error data is decomposed into IMF components through EMD 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 of the IMF components is lower than the frequency cutoff threshold are screened, and the remaining low-frequency components and trend terms after filtering out the trajectory error data are superimposed to obtain the low-frequency contour deformation components that characterize the macroscopic deformation characteristics of the equipment. The low-frequency contour deformation component is subjected to time domain integration and envelope analysis to extract the amplitude mean, phase offset and deformation gradient, and weighted fusion is used to generate standardized low-frequency contour deformation features.
6. The real-time motion control algorithm simulation debugging method according to claim 5, wherein: The steps for calculating the gradient of trajectory error to multi-physics field coupling control parameters are as follows: The low-frequency contour deformation characteristics are input into the differentiable simulator, and the partial derivative gradient of the trajectory error with respect to the multi-physics field coupling control parameters is calculated through backpropagation. Map the partial derivative gradients of the multi-physics coupling control parameters to three-dimensional space coordinate points, and use color depth to represent the gradient intensity.
7. The real-time motion control algorithm simulation debugging method according to claim 6, wherein: 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 adjustment instruction set are as follows: Based on the gradient intensity of the multi-physics field 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 heat map; Continuous heat maps are superimposed on the CAD grid for real-time rendering to construct a three-dimensional heat map. The constrained gradient descent method is used to identify the optimal parameter adjustment along the negative gradient direction, and the optimal parameter adjustment instruction set that minimizes the trajectory error is output.
8. The real-time motion control algorithm simulation debugging method according to claim 7, wherein: The steps of real-time updating of multi-physics field coupling control parameters and generating simulation debugging reports are as follows: Write the parameter adjustment instruction set to 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 multi-physics coupling parameter update logic is triggered, the optimized multi-physics coupling parameters are written to the controller memory address, and the updated multi-physics coupling parameters are output; Align the performance improvement rate, trajectory error data, and updated multi-physics coupling parameters along the time axis to generate a simulation debugging report.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the real-time motion control algorithm simulation debugging method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the real-time motion control algorithm simulation debugging method according to any one of claims 1 to 8 are implemented.
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
Intelligent fire-fighting equipment self-inspection and fault early warning system based on AI algorithm
CN120268014A
Method and system for optimally selecting carbon storage site based on multi-frequency band seismic data and equipment
US11852771B1
Systems and Methods for Simulating Dynamic Objects Based on Real World Data
US20220036579A1
Cited By
Motion control method and system for bottom loading and unloading crane pipe
CN120887366A
Self-adaptive control method for micro-nano high-precision motion platform
CN120993753A
Frequency conversion equipment reliability simulation method and system oriented to complex working conditions
CN121072266A