Truss robot rehearsal control method based on digital twinning

By constructing a digital twin system and model predictive control parameterized by Laguerre functions, the problems of real-time mapping and error compensation in the pre-simulation control of gantry robots were solved, achieving high-precision and reproducible pre-simulation control, and reducing on-site debugging costs and equipment damage risks.

CN121979111APending Publication Date: 2026-05-05SOUTHWEAT UNIV OF SCI & TECH
View PDF 0 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTHWEAT UNIV OF SCI & TECH
Filing Date
2025-12-12
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing pre-simulation control methods for gantry robots lack real-time bidirectional mapping and operational status feedback with the actual system, making it difficult to directly reproduce the simulated trajectory and control parameters. This results in problems such as inaccurate models, uncertain parameters, and communication delays, making it difficult to meet the requirements of high precision, reproducibility, and implementability.

Method used

A digital twin system is constructed to achieve low-latency virtual-real bidirectional mapping. Model predictive control with Laguerre function parameterization is used for online error compensation and look-ahead control. The reference trajectory is adaptively updated through real-time feedback, and automatic verification is performed in conjunction with a safety rule base.

Benefits of technology

It achieves high-precision, reproducible, and highly reliable pre-simulation control of gantry robots, significantly reducing on-site commissioning and maintenance costs, improving data security and traceability, and reducing the probability of equipment damage and maintenance complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121979111A_ABST
    Figure CN121979111A_ABST
Patent Text Reader

Abstract

The invention discloses a truss robot rehearsal control method based on digital twinning, and the method comprises the following steps: S1, constructing a truss robot digital twinning system, including constructing a truss robot virtual scene and constraint, performing data synchronization and bidirectional communication, and configuring a safety rule base and a data recording / playback interface at a twinning end; s2, rehearsing a task to be executed, generating a reference trajectory and a constraint set, and automatically checking the rehearsing process according to the safety rule base to obtain the reference trajectory and the constraint set which pass the rehearsing; and S3, performing parameterized predictive control and real-time tracking on the rehearsed reference trajectory and the constraint set, and controlling a trajectory tracking error to be within a tolerance range. According to the method, a digital twin system corresponding to the physical world is constructed, Laguerre function parameterized model predictive control is introduced to realize low-dimensional rapid solution, high-precision, reproducible and high-reliability rehearsal control of the truss robot is realized, and the field debugging and operation and maintenance cost is remarkably reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of gantry robot control technology, specifically relating to a gantry robot pre-simulation control method based on digital twins. Background Technology

[0002] Gantry robots, with their advantages of large workspace, high load capacity, and high motion precision, are widely used in workshop assembly, handling, warehousing, and inspection. Current research on gantry robot applications largely relies on offline simulations using platforms such as MATLAB / Simulink, ADAMS, Gazebo, and Coppelia Sim. While these methods accelerate algorithm iteration, they lack real-time bidirectional mapping and operational status feedback with the real system. The simulated trajectories and control parameters are often difficult to directly reproduce, requiring significant on-site debugging and manual intervention. In recent years, digital twin systems for gantry robots have begun to be used for virtual-real mapping, visual monitoring, and task planning. Some studies have introduced high-fidelity modeling and coordinated tracking control, and attempted to use control algorithms to reduce control cycle delays and improve tracking accuracy. However, most existing solutions remain at the stages of visualization, offline verification, and partial function implementation. They suffer from problems such as simulation deviations due to inaccurate models or uncertain parameters, communication delays, and a lack of online error compensation and safety measures for high-precision operations, making it difficult to meet the requirements of high precision, reproducibility, and feasibility in workshop scenarios. Summary of the Invention

[0003] To address the aforementioned shortcomings in existing technologies, this invention provides a pre-simulation control method for gantry robots based on digital twins. This method constructs a digital twin system that corresponds to the physical world and establishes a low-latency, bidirectional mapping mechanism between the virtual and physical worlds. Task pre-simulation is performed in the twin domain, and model predictive control with Laguerre function parameterization is introduced to achieve low-dimensional, rapid solution, enabling online error compensation and look-ahead control. Real-time feedback is used to adaptively update the reference trajectory. This method achieves high-precision, reproducible, and highly reliable pre-simulation control of gantry robots in scenarios such as assembly and inspection in manufacturing workshops, significantly reducing on-site debugging and maintenance costs. It solves the problem that existing solutions lack bidirectional mapping and online synchronization mechanisms, making it difficult to meet the high-precision, reproducible, and implementable requirements of workshop scenarios.

[0004] To achieve the above-mentioned objectives, the technical solution adopted by this invention is: a pre-simulation control method for a gantry robot based on digital twins, comprising the following steps: S1. Construct a digital twin system for the gantry robot, including constructing a virtual scene and constraints for the gantry robot, data synchronization and bidirectional communication, and configuring a safety rule base and data recording / playback interface on the twin end; S2. Perform a pre-rehearsal of the task to be executed, generate a reference trajectory and constraint set, and automatically verify the pre-rehearsal process based on the safety rule base to obtain a reference trajectory and constraint set that pass the pre-rehearsal; S3. Perform parametric predictive control and real-time tracking on the reference trajectory and constraint set that have passed the pre-run, and control the trajectory tracking error within the tolerance range.

[0005] Furthermore: In S1, the methods for constructing the virtual scene and constraints of the gantry robot include: Geometric Modeling and Lightweight Import: Geometric modeling of the truss body, moving platform, working object and end effector is performed, format conversion and part lightweighting are performed using 3ds Max, and the coordinate axes are converted and imported into Unity3D as .fbx files; Parent-child hierarchy establishment and consistency verification: Establish a parent-child hierarchy structure between joints in Unity 3D's Hierarchy to ensure that the virtual model and the physical robot maintain consistency in behavior; Coordinate system and joint parameter configuration: Unity 3D uses a left-handed coordinate system. While ensuring that the Z-axis is the rotation axis, the Position and Rotation of each joint on the Y-axis are set to zero to meet the kinematic coordinate conditions. Based on this, the kinematic model parameters are configured. An end joint with a length of 0.35m is added along the Z-axis to joint 5 for inverse kinematics solution and pose setting. The initial joint angle offset is set as the basis for motion constraints. Constraint model configuration: Multi-level collision bounding boxes are set based on the physical attribute dimension to realize collision detection and basic safety constraints of twins; joint limit constraints are formed by combining the range of motion of each joint in the DH parameter table.

[0006] Furthermore, in S1, data synchronization and bidirectional communication include configuring real-time data interfaces between the physical robot, sensors, and virtual twin, supporting real-time reporting of robot status and secure issuance of control commands, and integrating historical data recording and playback.

[0007] Furthermore, in S2, the method for rehearsing the task to be executed is as follows: Based on the task requirements, the path points are arranged, and a kinematic chain is established according to the parent-child hierarchy of the truss and the robot arm joints and DH parameters on the basis of the XYZ three-axis coordinates, forming reachability and travel constraints, and obtaining a constraint set; the path search and trajectory time parameterization are performed in the virtual environment, and the joint motion of the base and the robot arm is pre-animated throughout the entire process. The evaluation quantities of joint end curve, path length, execution time, minimum gap and smoothness are recorded at fixed intervals, and a reference trajectory including joint position, velocity, acceleration and end accuracy is generated. Among them, the reference trajectory and constraint set are automatically checked for collision, limit, singularity, travel and communication delay issues based on the safety rule base.

[0008] Furthermore, S3 includes the following sub-steps: S31. Unify the data types of entities and twins, and complete the initial pose and scale alignment; construct a replayable historical database by periodic sampling, control variables and actual errors, and construct a model predictive controller parameterized by Laguerre function; S32. Input the reference trajectory and constraint set into the Laguerre function-parameterized model predictive controller, perform rolling optimization solution through parametric predictive control, explicitly handle the constraints of stroke, velocity and acceleration; execute only the current optimal control value in each cycle, and record the trajectory tracking error in real time; S33. Determine whether the trajectory tracking error is within the tolerance range. If yes, solidify the current optimal control quantity as the new operating baseline and complete the entity trajectory tracking. If no, start the playback-retest-re-preview process, update the reference trajectory and constraint set, and return to S32.

[0009] Furthermore: In S31, the method for constructing a Laguerre function-parameterized model predictive controller is as follows: A1. Initialize the target and historical database creation: Unify the data caliber between the physical and the twin ends: read and parse the axis / joint status in the PLC register into standard floating-point quantities according to Modbus TCP, map them to a unified coordinate and unit system, and use JSON structured message bodies to describe the "status / control" data on the twin decision side. On this basis, a historical database is built, and original sampling, reference / control quantities and error information are continuously written according to the control cycle, and time information is added to support trajectory visualization and playback, scene restoration and comparative analysis. A2. Synchronization of virtual and real states: A21. Align the virtual model with the physical robot in the initial posture through position calibration. Measure the distance at the extreme positions of the truss's XYZ axes and at several preset alignment points, and record the pose data of the virtual end and the physical end. A22. Enter the bidirectional control synchronization test between the physical end and the twin end. Record the XYZ three-axis position coordinate values ​​from the end of the physical end to the reference point at the alignment point. Compare them with the twin end reference one by one and count the error samples. Determine whether the average error obtained from the error samples exceeds the error threshold. If not, the construction of the model predictive controller with Laguerre function parameterization is completed. If so, change the position calibration parameters and return to A21.

[0010] Furthermore: In S32, the objective function of the model predictive controller The specific expression is: In the formula, To control the input weight matrix, The state weight matrix is... C This is the vector of coefficients of the linear terms in the objective function. Let be the mapping matrix composed of discrete Laguerre orthogonal functions. For the prediction matrix, U To control the quantity, The upper limit of the actuator, The lower limit of the actuator, This is the lower limit of the Laguerre coefficient. This represents the upper limit of the Laguerre coefficient. T It is the transpose symbol. For Laguerre coefficient, Scalar relaxation factor For weighting coefficients, ; In the formula, Let the order of the basis functions be . To predict the time domain, To control the time domain, For state response constraints, To control variable constraints, For terminal state constraints, For the state matrix of an incremental system, For the control input matrix of the incremental system, I It is the identity matrix. Here is the state propagation matrix. for k The incremental state vector at time step (k). for k The transpose of the Laguerre function at time t. , for The Laguerre basis function row vector corresponding to the first prediction step obtained by recursion in the process is... for The Laguerre basis function row vector corresponding to the second prediction step obtained by recursion in the process, for The Laguerre basis function row vector corresponding to the third prediction step obtained by recursion in the process; Each sampling period of the model predictive controller takes the reference trajectory and constraint set that have been pre-simulated as input, and solves for the order of the basis functions. optimal The sequence is then inversely converted into the optimal control increment. As output; In the formula, for k The X-axis coefficient vector calculated at time step 1. for k The Y-axis coefficient vector calculated at time step 1. for k The Z-axis coefficient vector calculated at time step 1. for k The optimal control increment on the X-axis at any given time. for k The optimal control increment on the Y-axis at any given time. for k The optimal control increment for the Z-axis at any given time.

[0011] Furthermore: In S33, the replay-retest-re-re-performance process is as follows: Based on the current optimal control quantity, a tracking trajectory and trajectory tracking error curve are generated. The scale and zero position are verified in conjunction with the position calibration experiment. Based on the reference trajectory and constraint set, the virtual end is re-performed and verified to generate an updated reference trajectory and constraint set.

[0012] The beneficial effects of this invention are as follows: (1) Enhance data security and traceability: By adopting a localized communication link based on PLC–Modbus TCP and combining real-time database disk writing and historical playback mechanisms, a highly reliable mapping of virtual and real states and full-process data traceability are achieved.

[0013] (2) Pre-rehearsal verification and safety release mechanism: The task to be executed is quickly rehearsed in the virtual domain and multiple safety verifications, including collision, limit and singularity, are completed. Instructions are issued only to the reference trajectory that passes the pre-rehearsal, which significantly reduces the risk of trial and error on site and the probability of equipment damage.

[0014] (3) Improved tracking accuracy and control stability: The model predictive controller based on the Laguerre function is adopted. The reference trajectory generated by the pre-drilled model is combined with the online error compensation of the model predictive control. The control quantity is output in real time under low time delay conditions, realizing high-precision tracking of the joint and end trajectory. The measured error can be stably within the design index range. The system has high reproducibility and small fluctuation.

[0015] (4) Reduce maintenance costs and resource consumption: The use of a unified format historical database supports fault review and predictive maintenance analysis; the localized communication architecture reduces dependence on external networks, significantly reducing bandwidth consumption and operation and maintenance complexity. Attached Figure Description

[0016] Figure 1 This is a flowchart of a pre-simulation control method for a gantry robot based on digital twins according to the present invention.

[0017] Figure 2 This is a diagram illustrating data interaction.

[0018] Figure 3 This is a comparison chart of the computational efficiency of LMPC and MPC. Detailed Implementation

[0019] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0020] like Figure 1 As shown, in one embodiment of the present invention, a pre-simulation control method for a gantry robot based on digital twins includes the following steps: S1. Construct a digital twin system for the gantry robot, including constructing a virtual scene and constraints for the gantry robot, data synchronization and bidirectional communication, and configuring a safety rule base and data recording / playback interface on the twin end; S2. Perform a pre-rehearsal of the task to be executed, generate a reference trajectory and constraint set, and automatically verify the pre-rehearsal process based on the safety rule base to obtain a reference trajectory and constraint set that pass the pre-rehearsal; S3. Perform parametric predictive control and real-time tracking on the reference trajectory and constraint set that have passed the pre-run, and control the trajectory tracking error within the tolerance range.

[0021] In S1, the methods for constructing the virtual scene and constraints of the gantry robot include: Geometric Modeling and Lightweight Import: Geometric modeling of the truss body, moving platform, working object, and end effector is performed to achieve high-precision restoration from physical entity to virtual model. Since Unity3D does not support direct import of .stl files, 3ds Max is used for format conversion and part lightweighting. The coordinate axes are then converted and imported into Unity 3D as .fbx files. Parent-child hierarchy establishment and consistency verification: Establish a parent-child hierarchy structure between joints in Unity 3D Hierarchy to ensure that the virtual model and the physical robot are consistent in behavior; In this embodiment, the imported model consists of multiple independent parts and lacks a chain-like hierarchy of joint movements, so it is necessary to establish a parent-child hierarchy structure between joints.

[0022] Coordinate system and joint parameter configuration: Unity 3D uses a left-handed coordinate system. While ensuring that the Z-axis is the rotation axis, the Position and Rotation of each joint on the Y-axis are set to zero to meet the kinematic coordinate conditions. Based on this, the kinematic model parameters are configured. An end joint with a length of 0.35m is added along the Z-axis to joint 5 for inverse kinematics solution and pose setting. The initial joint angle offset is set as the basis for motion constraints. Constraint model configuration: Multi-level collision bounding boxes are set based on physical attribute dimensions to achieve collision detection and basic safety constraints for the twin; joint limit constraints are formed by combining the motion range of each joint in the DH parameter table. In this embodiment, based on the configured constraint model, an early warning effect is generated if a collision is detected during the pre-simulation process.

[0023] In S1, data synchronization and bidirectional communication include configuring real-time data interfaces between physical robots, sensors, and virtual twins, supporting real-time reporting of robot status and secure issuance of control commands, and integrating historical data recording and playback.

[0024] In this embodiment, a real-time data interface is configured for communication between the twin data and the physical entity. The twin data types mainly include a variety of data such as robot state, optimal control, and trajectory planning, i.e., virtual and real state synchronization data and control signals generated by decision-making. Interoperability is achieved through a connection. A data interaction diagram is shown below. Figure 2 As shown. The specific method for configuring the real-time data interface is as follows: A wired Ethernet connection is used between the PC and the PLC, with ModBus TCP (the open-source EasyModbus library for Unity 3D) serving as the underlying communication medium for reading and writing register data. The PLC's IP address is 192.168.1.88, port 502, and communication latency is <1ms. TCP / IP is used as the communication medium between Unity 3D and MATLAB, using JSON data format to support flexible access between multiple data types. Local area network IP address 127.0.0.1 is used for communication, with Unity 3D acting as the client and MATLAB as the server, and communication latency <1ms. The TCP server's IP address is set to 127.0.0.1, and port 8005. To improve communication efficiency and reduce resource consumption, the system uses the IEnumerator asynchronous coroutine interface and the .NET Framework's Thread multithreading mode to build the communication interfaces for each part, and the communication frequency is set to 60Hz.

[0025] In S2, to complete tasks such as workshop assembly, handling, warehousing, and inspection, the virtual terminal rapidly rehearses path planning and trajectory planning tasks within the digital twin scenario. The specific method for rehearsing the tasks to be executed is as follows: Based on task requirements, path points are arranged, and a kinematic chain is established according to the parent-child hierarchy of the truss joints and the DH parameters on the XYZ three-axis coordinate system, forming reachability and travel constraints, resulting in a constraint set. Path search and trajectory time parameterization are performed in a virtual environment, and the joint motion of the base and the robotic arm is pre-animated throughout the entire process. The evaluation quantities of joint end curves, path lengths, execution times, minimum clearances, and smoothness are recorded at fixed intervals to generate a reference trajectory including joint position, velocity, acceleration, and end-effector accuracy. Among these, the reference trajectory and constraint set are automatically checked for collision, limit, singularity, travel, and communication delay issues according to a safety rule base.

[0026] S3 includes the following steps: S31. Unify the data types of entities and twins, including coordinates, units, and time, and complete the initial pose and scale alignment; construct a replayable historical database by periodic sampling, control variables, and actual errors as a baseline for system performance evaluation and parameter fine-tuning, and construct a Laguerre function-parameterized model predictive controller (LMPC). S32. Input the reference trajectory and constraint set into the Laguerre function-parameterized model predictive controller, perform rolling optimization solution through parametric predictive control, explicitly handle the constraints of stroke, velocity and acceleration; execute only the current optimal control value in each cycle, and record the trajectory tracking error in real time; S33. Determine whether the trajectory tracking error is within the tolerance range. If yes, solidify the current optimal control quantity as the new operating baseline and complete the entity trajectory tracking. If no, start the playback-retest-re-preview process, update the reference trajectory and constraint set, and return to S32.

[0027] In this embodiment, through the above steps, an integrated link of "virtual preliminary simulation - safe access - predictive closed-loop execution - online feedback correction" is formed, which realizes high-precision, low-latency, and directly deployable preliminary control of the gantry robot without introducing additional planning algorithms.

[0028] In S31, the specific method for constructing a Laguerre function-parameterized model predictive controller is as follows: A1. Initialize the target and historical database creation: Unifying the data caliber between the physical and digital twin ends: The axis / joint status in the PLC registers is read and parsed into standard floating-point quantities using Modbus TCP, mapped to a unified coordinate and unit system. On the digital twin decision-making side, JSON structured message bodies are used to describe the "status / control" data for model and control result exchange and rendering between Unity and MATLAB. Based on this, a historical database is established, continuously writing original sampling, reference / control quantities, and error information according to the control cycle, and adding time information to support trajectory visualization and playback, scene restoration, and comparative analysis. In the experimental process, the running data is archived as a .txt file and imported into MATLAB for statistical evaluation.

[0029] A2. Synchronization of virtual and real states: A21. Initially align the virtual model and the physical robot's postures using position calibration. Measure distances at the extreme positions of the gantry's XYZ axes and several preset alignment points, and record the pose data of the virtual and physical ends. The statistical results of the discrepancy are shown in Table 1. If the object's position changes, calibration can be performed again using the same method.

[0030] Table 1 Comparison of Virtual and Real-World Synchronization Information on Mobile Platforms A22. Enter the bidirectional control synchronization test between the physical end and the twin end. Record the XYZ three-axis position coordinate values ​​from the end of the physical end to the reference point at the alignment point. Compare them with the twin end reference one by one and count the error samples as shown in Table 2. Determine whether the average error obtained from the error samples exceeds the error threshold. If not, the construction of the model predictive controller with Laguerre function parameterization is completed. If so, change the position calibration parameters and return to A21.

[0031] Table 2 Comparison of data measurements between the twin model and the physical end effector of the gantry robot Among them, |X model -X| represents the X-axis coordinate value of the entity's end point relative to the reference point, |Y model -Y| represents the Y-axis coordinate value of the entity's end point relative to the reference point, |Z model -Z| represents the Z-axis position coordinate value of the entity's end point from the reference point. As shown in Table 2, the test results show that the average error of the three measurements is about 1 cm. The main sources of error are the placement deviation of the twin scene and the cumulative error of the sensor. If the error exceeds the system design threshold, the position calibration parameters are repeatedly changed until the standard is met.

[0032] In S32, the derivation process of the objective function for establishing the model predictive controller is as follows: S32-1, Input / output and rolling optimization mechanism of model predictive controller.

[0033] Model predictive control (MPC) relies on a known system model to describe the system's dynamic behavior. Definition Indicates the prediction time domain, Indicates control time domain, in k Predicting the future The state at each time step With control The sequence is: In the formula, for k Predicted at time (i.e., the current time) k The system state at any given moment. for k Time prediction k The system state at time +1 for k Time prediction k The system state at time +2, for k Time prediction The system state at any given moment. for k Time prediction k Control inputs applied at all times for k Time prediction k The control input applied at time +1 for k Time prediction Control inputs applied at all times The model predictive controller evaluates the current optimal control signal using an objective function and then transmits it to the robot to achieve trajectory tracking. The optimization objective is to minimize the weighted sum of state error and control variables. Definition G Indicates state-response constraints. R This indicates a control variable constraint. F Represents the terminal state constraints. Objective function. J The definition is as follows: In the formula, for k The system state at any given moment. for k Control variables at time, This is the terminal state.

[0034] Considering the efficiency and feasibility of optimizing the solution, the problem is usually represented as a quadratic programming problem: In the formula, It is the coefficient matrix of the quadratic terms. A linear coefficient vector, To optimize the variable vector; The future can be obtained from the discretized state equation formula. state of time : Based on the objective function formula, we can obtain information about the future. objective function at time 1 : In the formula, Constrained by control variables R The matrix formed; Will and By combining the equations and ignoring the constant term, we obtain information about the future. The quadratic objective function at time t: In the formula, The matrix symbols are represented as follows: In the formula, A Let B be the system state matrix and B be the control input matrix.

[0035] The reference trajectory and constraint set obtained through pre-simulation are used as inputs to the model predictive controller, where the reference trajectory is in the prediction time domain. Given the above, the constraint set controls the time domain. Boundaries are applied to the control increment and state variables within the sampling period; the model predictive controller outputs the control variable at the current moment in each sampling period, executes only the first control step and discards the remaining candidate inputs; as time progresses, the state and reference sequence are updated according to the model predictive controller, and the solution is resolved in the next sampling period according to the rolling optimization mechanism, so as to achieve online correction and steady-state tracking while ensuring time-domain constraints.

[0036] S32-2, Laguerre function parameterization.

[0037] Model predictive control (MDI) solves for a set of future control variables, offering high accuracy but also complex computations, leading to increased latency for digital twin systems. To reduce the dimensionality of online optimization, the control sequence is expanded using a Laguerreotype, with a small number of Laguerre coefficients representing the long-term input. This is achieved by using weighting factors from the Laguerreotype sequence. With basis function order The generated family of basis functions approximates the control input, making the original control sequence linearly generated by the Laguerre coefficients, thus achieving an approximation of the original control sequence with a smaller parameter set. This process significantly reduces the number of optimization variables without changing the original symbolic system, where the Laguerre orthogonal function sequence... Represented as: In the formula, For the first k -1 Laguerreotype generating function form, z For complex variables in the Z-transform, N The total number or order of the Laguerre function sequence; set up Then the discrete-time Laguerre function set vector form The expression is as follows: In the formula, For the first i A discrete-time Laguerre function in k The value at time, ; Laguerre sequences in state-space form Represented as: In the formula, for The matrix, whose initial conditions are: ; In the formula, , This represents the weighting factor of the Laguerre sequence, and To ensure the stability of the sequence; Laguerre polynomials have a certain orthogonality in the time domain, ensuring that when optimizing the parameters of each control variable, the control variables are independent and do not interfere with each other. Their orthogonality in the time domain is expressed as: In the formula, For the first j A discrete-time Laguerre function in k The value at time; Laguerre functions are used to capture the response of any system. : In the formula, , and They are respectively , and coefficient; Each control variable can be approximated at any future time as: In the formula, For the current moment k When performing optimization, the first i The control variable in the future... m The value at each sampling time. For the future At any time, be satisfied , Represents the coefficient. For use in capturing the first i The number of parameters for each control variable. , For the first i A vector of Laguerre coefficients for each control variable. For the first i A vector of Laguerre functions for each control variable. A single Laguerre function value represents the value used for the first... i The first function in the set of control variables j The value of a Laguerre function at a future time m.

[0038] S32-3, Rewriting the parameterized prediction model and objective function.

[0039] After parameterization, the online optimization dimensions are changed from Down to While maintaining explicit tractability of constraints, the solution speed is improved. Considering control smoothness, the discretized state equation formula is optimized, and the incremental model equation is constructed as follows: In the formula, for k The incremental state vector at time +1 for k The incremental state vector at time step (k). The control increment at time k, for k The amount of control at any given moment for k The control quantity at time -1 (i.e., the previous time); Based on the derivation method of the basic model above, the optimized incremental model for the future can be obtained similarly. state sequence at time step With objective function Then, by substituting the formula into the parameterized approximation, the objective function is obtained. : In the formula, , and , The expression is consistent. As can be seen from the above formula, From the parameterized coefficient matrix Instead; at this point, the objective function optimization problem changes from Convert to Laguerre coefficient The problem to be solved involves reducing the control time domain to the Laguerre parameterized time domain. And satisfy : In the formula, To make the Laguerre coefficient become The transformation matrix, , and These are the first Laguerre function, the second Laguerre function, and the third Laguerre function, respectively. One Laguerre function; S32-4. Constraint Handling and Solver Implementation: In the case of constraints, it is necessary to transform the control constraint problem into a Laguerre coefficient constraint problem; at the same time, define... The relaxation factor increases the tolerance of the solution, avoiding overly strict requirements on constraints or objective conditions that could lead to unnecessary convergence failures or result oscillations. Scalar relaxation factor These are the weighting coefficients. The final objective function of the model predictive controller is obtained. The specific expression is: In the formula, To control the input weight matrix, The state weight matrix is... C This is the vector of coefficients of the linear terms in the objective function. Let be the mapping matrix composed of discrete Laguerre orthogonal functions. For the prediction matrix, U To control the quantity, This is the upper limit of the actuator (a hard constraint on controllable quantities such as speed or torque). This is the lower limit of the actuator (a hard constraint on controllable quantities such as speed or torque). This is the lower limit of the Laguerre coefficient. This represents the upper limit of the Laguerre coefficient. T It is the transpose symbol. For Laguerre coefficient, Scalar relaxation factor For weighting coefficients, ; In the formula, Let the order of the basis functions be . To predict the time domain, To control the time domain, For state response constraints, To control variable constraints, For terminal state constraints, For the state matrix of an incremental system, For the control input matrix of the incremental system, I It is the identity matrix. Here is the state propagation matrix. for k The incremental state vector at time step (k). for k The transpose of the Laguerre function at time t. , for The Laguerre basis function row vector corresponding to the first prediction step obtained by recursion in the process is... for The Laguerre basis function row vector corresponding to the second prediction step obtained by recursion in the process, for The Laguerre basis function row vector corresponding to the third prediction step obtained by recursion in the process; Each sampling period of the model predictive controller takes the reference trajectory and constraint set that have been pre-simulated as input, and solves for the order of the basis functions. optimal The sequence is then inversely converted into the optimal control increment. As output; In the formula, for k The X-axis coefficient vector calculated at time step 1. for k The Y-axis coefficient vector calculated at time step 1. for k The Z-axis coefficient vector calculated at time step 1. for k The optimal control increment on the X-axis at any given time. for k The optimal control increment on the Y-axis at any given time. for k The optimal control increment for the Z-axis at any given time.

[0040] In this embodiment, the model predictive controller takes the pre-simulated reference trajectory and constraint set as input and verifies its feasibility in the virtual domain. Its computational efficiency is as follows: Figure 3 As shown. The pre-simulation results are then converted into control commands executed by the entity; subsequently, entity feedback is collected based on this, and the parameters of the twin model and the prediction model are updated online to maintain consistency and tracking performance between the virtual and real models and the controller.

[0041] In S33, the specific process of playback-retesting-re-re-rehearsal is as follows: Based on the current optimal control quantity, a tracking trajectory and trajectory tracking error curve are generated. The scale and zero position are verified in conjunction with the position calibration experiment. Based on the reference trajectory and constraint set, the virtual end is re-performed and verified to generate an updated reference trajectory and constraint set.

[0042] In this embodiment, after completing entity trajectory tracking, the system design indicators are used as convergence criteria, such as the target range of platform XYZ virtual-real synchronization, joint angle synchronization and end-point trajectory tracking error. Specific indicators are shown in Tables 3 and 4.

[0043] Table 3. Cartesian spatial position error of gantry robot trajectory tracking based on digital twin. Table 4. Joint spatial angle error in trajectory tracking of gantry robot based on digital twin. The beneficial effects of this invention are as follows: Enhanced data security and traceability: By adopting a localized communication link based on PLC–Modbus TCP, combined with real-time database disk storage and historical playback mechanisms, highly reliable mapping of virtual and real states and full-process data traceability are achieved.

[0044] The pre-execution verification and safety release mechanism allows for rapid pre-execution of the task to be performed in the virtual domain, and completes multiple safety verifications, including collision, limit, and singularity checks. Commands are only issued to reference trajectories that pass the pre-execution, significantly reducing the risk of trial and error on-site and the probability of equipment damage.

[0045] Improved tracking accuracy and control stability: A model predictive controller based on Laguerre function is adopted. By combining the reference trajectory generated by pre-simulation with online error compensation of model predictive control, the control quantity is output in real time under low time delay conditions, realizing high-precision tracking of joint and end-effector trajectories. The measured error can be stably within the design index range, and the system has high reproducibility and small fluctuations.

[0046] Reduce maintenance costs and resource consumption: The use of a unified format historical database supports fault review and predictive maintenance analysis; the localized communication architecture reduces dependence on external networks, significantly reducing bandwidth consumption and operational complexity.

[0047] In the description of this invention, it should be understood that the terms "center," "thickness," "upper," "lower," "horizontal," "top," "bottom," "inner," "outer," and "radial," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying the relative importance or the number of technical features implicitly specified. Therefore, a feature defined by "first," "second," and "third" may explicitly or implicitly include one or more of that feature.

Claims

1. A pre-simulation control method for a gantry robot based on digital twins, characterized in that, Includes the following steps: S1. Construct a digital twin system for the gantry robot, including constructing a virtual scene and constraints for the gantry robot, data synchronization and bidirectional communication, and configuring a safety rule base and data recording / playback interface on the twin end; S2. Perform a pre-rehearsal of the task to be executed, generate a reference trajectory and constraint set, and automatically verify the pre-rehearsal process based on the safety rule base to obtain a reference trajectory and constraint set that pass the pre-rehearsal; S3. Perform parametric predictive control and real-time tracking on the reference trajectory and constraint set that have passed the pre-run, and control the trajectory tracking error within the tolerance range.

2. The pre-simulation control method for gantry robots based on digital twins according to claim 1, characterized in that, In S1, the methods for constructing the virtual scene and constraints of the gantry robot include: Geometric Modeling and Lightweight Import: Geometric modeling of the truss body, moving platform, working object and end effector is performed, format conversion and part lightweighting are performed using 3ds Max, and the coordinate axes are converted and imported into Unity3D as .fbx files; Parent-child hierarchy establishment and consistency verification: Establish a parent-child hierarchy structure between joints in Unity 3D's Hierarchy to ensure that the virtual model and the physical robot maintain consistency in behavior; Coordinate system and joint parameter configuration: Unity 3D uses a left-handed coordinate system. While ensuring that the Z-axis is the rotation axis, the Position and Rotation of each joint on the Y-axis are set to zero to meet the kinematic coordinate conditions. Based on this, the kinematic model parameters are configured. An end joint with a length of 0.35m is added along the Z-axis to joint 5 for inverse kinematics solution and pose setting. The initial joint angle offset is set as the basis for motion constraints. Constraint model configuration: Multi-level collision bounding boxes are set based on the physical attribute dimension to realize collision detection and basic safety constraints of twins; joint limit constraints are formed by combining the range of motion of each joint in the DH parameter table.

3. The pre-simulation control method for gantry robots based on digital twins according to claim 2, characterized in that, In S1, data synchronization and bidirectional communication include configuring real-time data interfaces between physical robots, sensors, and virtual twins, supporting real-time reporting of robot status and secure issuance of control commands, and integrating historical data recording and playback.

4. The pre-simulation control method for gantry robots based on digital twins according to claim 1, characterized in that, In S2, the specific method for rehearsing the task to be executed is as follows: Based on the task requirements, the path points are arranged, and a kinematic chain is established according to the parent-child hierarchy of the truss and the robot arm joints and DH parameters on the basis of the XYZ three-axis coordinates, forming reachability and travel constraints, and obtaining a constraint set; the path search and trajectory time parameterization are performed in the virtual environment, and the joint motion of the base and the robot arm is pre-animated throughout the entire process. The evaluation quantities of joint end curve, path length, execution time, minimum gap and smoothness are recorded at fixed intervals, and a reference trajectory including joint position, velocity, acceleration and end accuracy is generated. Among them, the reference trajectory and constraint set are automatically checked for collision, limit, singularity, travel and communication delay issues based on the safety rule base.

5. The pre-simulation control method for gantry robots based on digital twins according to claim 1, characterized in that, S3 includes the following steps: S31. Unify the data types of entities and twins, and complete the initial pose and scale alignment; construct a replayable historical database by periodic sampling, control variables and actual errors, and construct a model predictive controller parameterized by Laguerre function; S32. Input the reference trajectory and constraint set into the Laguerre function-parameterized model predictive controller, perform rolling optimization solution through parametric predictive control, explicitly handle the constraints of stroke, velocity and acceleration; execute only the current optimal control value in each cycle, and record the trajectory tracking error in real time; S33. Determine whether the trajectory tracking error is within the tolerance range. If yes, solidify the current optimal control quantity as the new operating baseline and complete the entity trajectory tracking. If no, start the playback-retest-re-preview process, update the reference trajectory and constraint set, and return to S32.

6. The pre-simulation control method for gantry robots based on digital twins according to claim 5, characterized in that, In S31, the specific method for constructing a Laguerre function-parameterized model predictive controller is as follows: A1. Initialize the target and historical database creation: Unify the data caliber between the physical and the twin ends: read and parse the axis / joint status in the PLC register into standard floating-point quantities according to Modbus TCP, map them to a unified coordinate and unit system, and use JSON structured message bodies to describe the "status / control" data on the twin decision side. On this basis, a historical database is built, and original sampling, reference / control quantities and error information are continuously written according to the control cycle, and time information is added to support trajectory visualization and playback, scene restoration and comparative analysis. A2. Synchronization of virtual and real states: A21. Align the virtual model with the physical robot in the initial posture through position calibration. Measure the distance at the extreme positions of the truss's XYZ axes and at several preset alignment points, and record the pose data of the virtual end and the physical end. A22. Enter the bidirectional control synchronization test between the physical end and the twin end. Record the XYZ three-axis position coordinate values ​​from the end of the physical end to the reference point at the alignment point. Compare them with the twin end reference one by one and count the error samples. Determine whether the average error obtained from the error samples exceeds the error threshold. If not, the construction of the model predictive controller with Laguerre function parameterization is completed. If so, change the position calibration parameters and return to A21.

7. The pre-simulation control method for gantry robots based on digital twins according to claim 6, characterized in that, In S32, the objective function of the model predictive controller The specific expression is: In the formula, To control the input weight matrix, The state weight matrix is... C This is the vector of coefficients of the linear terms in the objective function. Let be the mapping matrix composed of discrete Laguerre orthogonal functions. For the prediction matrix, U To control the quantity, The upper limit of the actuator, The lower limit of the actuator, This is the lower limit of the Laguerre coefficient. This represents the upper limit of the Laguerre coefficient. T It is the transpose symbol. For Laguerre coefficient, Scalar relaxation factor For weighting coefficients, ; In the formula, Let the order of the basis functions be . To predict the time domain, To control the time domain, For state response constraints, To control variable constraints, For terminal state constraints, For the state matrix of an incremental system, For the control input matrix of the incremental system, I It is the identity matrix. Here is the state propagation matrix. for k The incremental state vector at time step (k). for k The transpose of the Laguerre function at time t. , for The Laguerre basis function row vector corresponding to the first prediction step obtained by recursion in the process is... for The Laguerre basis function row vector corresponding to the second prediction step obtained by recursion in the process, for The Laguerre basis function row vector corresponding to the third prediction step obtained by recursion in the process; Each sampling period of the model predictive controller takes the reference trajectory and constraint set that have been pre-simulated as input, and solves for the order of the basis functions. optimal The sequence is then inversely converted into the optimal control increment. As output; In the formula, for k The X-axis coefficient vector calculated at time step 1. for k The Y-axis coefficient vector calculated at time step 1. for k The Z-axis coefficient vector calculated at time step 1. for k The optimal control increment on the X-axis at any given time. for k The optimal control increment on the Y-axis at any given time. for k The optimal control increment for the Z-axis at any given time.

8. The pre-simulation control method for gantry robots based on digital twins according to claim 5, characterized in that, In S33, the specific process of playback-retesting-re-re-rehearsal is as follows: Based on the current optimal control quantity, a tracking trajectory and trajectory tracking error curve are generated. The scale and zero position are verified in conjunction with the position calibration experiment. Based on the reference trajectory and constraint set, the virtual end is re-performed and verified to generate an updated reference trajectory and constraint set.

Citation Information

Cited By

  • A method for state inversion and digital twin of low-digital tracked equipment

    CN122310833A

  • A state inversion and digital twin method for low-digitized tracked equipment

    CN122310833B