A digital-twin-based virtual simulation method for practical teaching equipment
By using digital twin modeling and an improved DeepONet network, combined with a multi-head attention mechanism and a physical consistency loss term, the shortcomings of existing practical training systems in analyzing equipment state evolution and interaction are addressed. This results in a high-precision, interactive practical training system that improves teaching quality and intelligence.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGSHA WANGCHENG DISTRICT NEW GENERATION VOCATIONAL SKILLS TRAINING SCHOOL CO LTD
- Filing Date
- 2025-12-02
- Publication Date
- 2026-06-09
Smart Images

Figure CN121614063B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital twin modeling and intelligent education simulation technology, and in particular to a virtual simulation method for practical training and teaching equipment based on digital twins. Background Technology
[0002] With the deepening of intelligent manufacturing training systems and the digital transformation of vocational education, virtual simulation teaching and real-time interactive training platforms for industrial equipment have become key supporting technologies. Existing training systems mainly rely on two-dimensional graphical interfaces or static process simulation scripts to teach the working principles and operating procedures of equipment. However, in practical applications, the following problems commonly exist:
[0003] Traditional simulation systems cannot drive the evolution of equipment states based on students' real-time operational behavior, resulting in a disconnect between the simulation process and actual teaching tasks. This makes it difficult to reflect the dynamic causal relationship between control inputs and equipment responses, limiting students' understanding and mastery of the system's operating mechanism. Existing simulation systems generally lack in-depth modeling of equipment structure, control logic, and operating conditions, merely simulating equipment behavior through preset animations or process playback. They lack a realistic representation of multi-source operating condition data and the state evolution of complex components, making it difficult to support teaching and training under complex operating conditions. Interactive feedback information during the teaching process is not effectively utilized, and student operations, equipment response states, and assessment data do not form a closed loop, making it difficult to achieve adaptive model updates. Existing platforms have limited visualization capabilities, lacking high-fidelity 3D presentation of equipment structural states, operation control interfaces, and fault phenomena. They do not support key teaching functions such as simulation backtracking, structural highlighting, and interactive analysis, making it difficult to meet the needs of immersive teaching and intelligent assessment.
[0004] Therefore, how to provide a virtual simulation method for practical training and teaching equipment based on digital twins is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] One objective of this invention is to propose a virtual simulation method for practical training equipment based on digital twins. This invention fully integrates digital twin modeling technology and an improved DeepONet network, and describes in detail how to drive the evolution of equipment structure state based on the real-time operation behavior of students, and realize closed-loop optimization of the teaching process. This invention has the advantages of strong simulation interactivity, high accuracy of state prediction, strong realism of equipment modeling, and high degree of intelligence in teaching evaluation.
[0006] A virtual simulation method for practical training equipment based on digital twins according to an embodiment of the present invention includes the following steps:
[0007] Step 1: Collect structural parameters, operating condition data, and control input signals of the training equipment;
[0008] Step 2: Based on the structural parameters, operating condition data, and control input signals of the training equipment, construct a twin model of the training equipment's control drive.
[0009] Step 3: Construct an improved DeepONet network to embed and model the control input signal and predict the state response. The improved DeepONet network introduces a relative position bias matrix in the multi-head attention mechanism and introduces a physical consistency loss term during training to generate a state prediction model.
[0010] Step 4: Input the trainees' real-time operation data into the state prediction model to perform state response reasoning, generate a sequence of predicted state response values, and input it into the twin model of the training equipment control drive to perform equipment simulation process deduction and generate a set of component state mappings.
[0011] Step 5: Visualize the component state mapping set through the user interface;
[0012] Step Six: During the execution of practical training tasks, collect the actual observation state value sequence and working condition annotation information of the trainees to form structured teaching feedback data;
[0013] Step 7: Based on the predicted state response value sequence and structured teaching feedback data, perform incremental fine-tuning on the improved DeepONet network.
[0014] Optionally, the structural parameters include the three-dimensional structural dimensions of the training equipment, the component layout topology, the shell material properties, the transmission mechanism type, the connection method, the sensor placement location, the signal cable length, and the port identification coding information.
[0015] The operating condition data includes equipment surface temperature, core component temperature rise, bus voltage, load voltage, control circuit voltage, starting current, steady-state operating current, output pressure, pipeline cavity pressure, circulating medium flow rate, and coolant flow rate.
[0016] The control input signals include button operation signals on the operation panel, knob angle signals on the control console, opening and closing status signals of industrial control valves, status signals of foot switches, status signals of emergency stop buttons, and status signals of DIP switches.
[0017] Optionally, step two specifically includes:
[0018] Based on the structural parameters of the practical training equipment, a three-dimensional topological model of the practical training equipment is constructed, specifically as follows:
[0019] Mapping the dimensions of a three-dimensional structure to the spatial coordinate information of its components;
[0020] Map the component layout topology and connection methods into a directed connection graph;
[0021] The transmission mechanism type and housing material properties are used as state field values and marked in the structural component property table, which is generated synchronously with the three-dimensional topology model.
[0022] An initial state parameter set is constructed based on operating condition data. The initial state parameter set includes an initial state vector of temperature, an initial state vector of voltage, an initial state vector of current, an initial state vector of pressure, and an initial state vector of flow rate.
[0023] Based on the control input signals, the button action signals of the control panel, the knob angle signals of the control console, the opening and closing status signals of the industrial control valve, the foot switch status signals, the emergency stop button status signals, and the DIP switch status signals are respectively bound to the input ports of the corresponding structural components in the three-dimensional topology model to establish a control interface binding table.
[0024] The three-dimensional topology model, initial state parameter set, and control interface binding table are organized to generate a twin model of the control drive of the training equipment.
[0025] Optionally, step three specifically includes:
[0026] At each time step, the control input signals are arranged in the order of the component port numbers in the control interface binding table to form a control signal vector, and the control signal vectors of all time steps are organized into a control signal vector sequence.
[0027] Each control signal vector is input into a parameter-shared three-layer fully connected network to perform linear mapping and nonlinear activation, generating a control embedding vector. Specifically: the first fully connected layer performs a linear transformation and ReLU activation on the control signal vector to extract basic nonlinear features and outputs a first-layer intermediate feature vector; the second fully connected layer performs a linear transformation and ReLU activation on the first-layer intermediate feature vector to extract deeper features and outputs a second-layer intermediate feature vector; the third fully connected layer maps the dimension of the second-layer intermediate feature vector to the target embedding dimension through a linear transformation, generating a control embedding vector.
[0028] The control embedding vectors of all time steps are arranged in chronological order to form a control embedding vector sequence, which is then input into a multi-head attention mechanism for temporal dependency modeling to generate a control temporal feature vector sequence. The control temporal feature vector sequence corresponds to a control temporal feature vector at each time step.
[0029] For each time step, sine and cosine position encoding is performed to generate a position encoding vector. The position encoding vector is then input into a parameter-shared three-layer fully connected network, where linear transformation and nonlinear activation are performed sequentially to generate a time embedding vector. The time embedding vectors are then organized into a time embedding vector sequence according to the time step index order.
[0030] At each time step, the inner product of the control time-series feature vector and the time embedding vector is calculated to obtain the predicted state response value, and the predicted state response values are arranged in the order of the time steps to form a sequence of predicted state response values.
[0031] The predicted state response value is a discrete value of the predicted state function at the time step;
[0032] A joint loss function is constructed to optimize and train the improved DeepONet network, and the trained and optimized improved DeepONet network is used as the state prediction model.
[0033] Optionally, the multi-head attention mechanism introduces a relative position bias matrix to generate a control temporal feature vector sequence, specifically including:
[0034] For the i-th attention head, the control embedding vector sequence is constructed into a query matrix, a key matrix, and a value matrix through three sets of trainable linear mapping matrices, where the query matrix, key matrix, and value matrix are the query vector, key vector, and value vector at each time step, respectively.
[0035] The relative position offset matrix is calculated as follows: for any two time steps, the relative position offset is calculated using the time step difference, and the offset value is extracted from the learnable offset lookup table based on the relative position offset. The offset value is used as the corresponding matrix element of the relative position offset matrix. The offset lookup table contains 2T−1 consecutive relative position offsets from the upper limit of the negative time step to the lower limit of the positive time step, where the upper limit of the negative time step is the negative of the total number of time steps plus one, the lower limit of the positive time step is the total number of time steps minus one, and T represents the total number of time steps.
[0036] The relative position bias matrix is added to the attention operation as follows: the dot product of the query matrix and the key matrix is calculated and divided by the square root of the embedding dimension of the key vector to obtain the attention score matrix; the relative position bias matrix and the attention score matrix are summed element-wise to obtain the bias correction score matrix; the bias correction score matrix is normalized using the Entmax function to obtain the normalized attention score matrix; where the Entmax function represents the sparse normalization function based on entropy regularization.
[0037] The normalized attention score matrix and the value matrix are weighted and calculated to generate the attention vector sequence of the i-th attention head;
[0038] The attention vector sequences of all attention heads are concatenated according to the attention head index, and a control temporal feature vector sequence is generated through linear mapping.
[0039] Optionally, the joint loss function introduces physical residual constraints, and the joint loss function includes a physical consistency loss term and an observation data loss term, specifically including:
[0040] Based on the control object type of the training equipment, the dynamic response law of the training equipment under different control inputs is extracted and modeled into a first-order differential form to generate a physical control function.
[0041] The predicted state function is differentiated by first order to obtain the predicted state change rate.
[0042] The difference between the predicted rate of change of state and the physical control function is used as the physical residual constraint.
[0043] The physical consistency loss term is obtained by dividing the sum of squares of the physical residual constraints at each time step by the total number of time steps.
[0044] The mean square error between the predicted state response value and the historical measured equipment state response value is used as the observation data loss term.
[0045] By setting weighting coefficients, the physical consistency loss term and the observation data loss term are weighted and fused to obtain the joint loss function.
[0046] Optionally, step four specifically includes:
[0047] It receives real-time operation data from trainees during practical training, arranges the real-time operation data according to the component port number order in the control interface binding table, forms a real-time control signal vector, and forms a real-time control signal vector sequence according to time steps.
[0048] The real-time control signal vector sequence is input into the state prediction model to perform state response inference and generate a predicted state response value sequence.
[0049] The predicted state response value sequence is used as a driving signal input to the control drive twin model of the training equipment to drive the state of each structural component in the three-dimensional topology model, update the state field value in the structural component attribute table, execute the dynamic simulation process deduction of the training equipment, and generate a set of component state mappings for visualization rendering.
[0050] Optionally, step five specifically includes:
[0051] The component state mapping set is graphically rendered and encoded to form a graphical frame sequence, which includes a time step index, structural component number, visual state field and rendering parameters.
[0052] The sequence of graphic frames is input into a 3D interactive graphics engine to render and generate simulation images of the training equipment at each time step. The simulation images support dynamic viewpoint adjustment, structural hierarchy expansion, control interface highlighting, component status labeling, and simulation process backtracking. The simulation images are then output to a graphical user interface.
[0053] Optionally, step seven specifically includes:
[0054] The predicted state response value sequence, the actual observed state value sequence, and the working condition labeling information are paired according to time steps to construct an incremental training sample set;
[0055] Define a state deviation feedback value sequence, wherein the state deviation feedback value is the difference between the predicted state response value sequence and the actual observed state value sequence at each time step;
[0056] Construct the incremental loss function by dividing the sum of squares of the state deviation feedback values at each time step by the total number of time steps to form the incremental loss term and adding it to the joint loss function;
[0057] Incremental fine-tuning of the parameters of the improved DeepONet network is performed based on the incremental loss function.
[0058] The beneficial effects of this invention are:
[0059] First, by collecting the structural parameters, operating condition data and control input signals of the training equipment, a twin model of the control drive of the training equipment is constructed, which effectively restores the three-dimensional topology of the physical equipment and the relationship between the input and output control interfaces, providing high-precision basic support for the dynamic simulation process.
[0060] Secondly, an improved DeepONet network is used to embed and model the control input signal and predict the state response. This improved DeepONet network introduces a multi-head attention mechanism and a relative position bias matrix, enhancing the ability to model the dependency of control signals across different time steps. This allows for more effective capture of the temporal characteristics and operational logic during the device's state evolution. A physical consistency loss term is introduced during the training phase to constrain the difference between the derivative of the predicted state and the theoretical physical response function, ensuring that the prediction results maintain the consistency and continuity of physical behavior while meeting the accuracy requirements of time series modeling. The improved DeepONet network significantly improves the physical interpretability, prediction stability, and boundary condition adaptability of the state prediction model. It can effectively address the degradation of state response accuracy under complex operating conditions, multi-source disturbances, and changes in control strategies, thereby improving the reliability and versatility of the training simulation system during dynamic inference.
[0061] Furthermore, during practical training, the system can collect students' operational data in real time, input it into the state prediction model to generate a sequence of predicted state response values, and drive the control-driven twin model to perform simulation deduction, dynamically generating a set of component state mappings. This data is then output to a graphical user interface via graphics rendering encoding and a 3D interactive graphics engine, supporting dynamic perspectives, hierarchical expansion, and state annotation, significantly enhancing the interactivity and immersion of the practical training system. During teaching, the system also collects actual observed state values and operating condition annotation information in real time, constructing structured teaching feedback data. Based on the predicted state response values and actual observed state values, it constructs state deviation feedback values, further incrementally fine-tuning the improved DeepONet network. This supports continuous learning and personalized adaptation of the model, enhancing its generalization ability and adaptability under multiple operating conditions.
[0062] In summary, by integrating digital twin modeling, improved DeepONet network inference, and interactive simulation visualization, this invention can improve the prediction accuracy, physical consistency, and interactivity of the practical training system, significantly enhancing the intelligence level and teaching quality of the practical training system. Attached Figure Description
[0063] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0064] Figure 1 This is a schematic diagram of a virtual simulation method for practical training and teaching equipment based on digital twins proposed in this invention;
[0065] Figure 2 This is a flowchart of the improved DeepONet network structure in a virtual simulation method for training and teaching equipment based on digital twins proposed in this invention.
[0066] Figure 3 This is a flowchart of the improved DeepONet network modeling and state response prediction process in a virtual simulation method for training and teaching equipment based on digital twins proposed in this invention. Detailed Implementation
[0067] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0068] refer to Figures 1-3 A virtual simulation method for practical training equipment based on digital twins includes the following steps:
[0069] Step 1: Collect structural parameters, operating condition data, and control input signals of the training equipment;
[0070] Step 2: Based on the structural parameters, operating condition data, and control input signals of the training equipment, construct a twin model of the training equipment's control drive.
[0071] Step 3: Construct an improved DeepONet network to embed and model the control input signal and predict the state response. The improved DeepONet network introduces a relative position bias matrix in the multi-head attention mechanism and introduces a physical consistency loss term during training to generate a state prediction model.
[0072] Step 4: Input the trainees' real-time operation data into the state prediction model to perform state response reasoning, generate a sequence of predicted state response values, and input it into the twin model of the training equipment control drive to perform equipment simulation process deduction and generate a set of component state mappings.
[0073] Step 5: Visualize the component state mapping set through the user interface;
[0074] Step Six: During the execution of practical training tasks, collect the actual observation state value sequence and working condition annotation information of the trainees to form structured teaching feedback data;
[0075] Step 7: Based on the predicted state response value sequence and structured teaching feedback data, perform incremental fine-tuning on the improved DeepONet network.
[0076] In this embodiment, the structural parameters include the three-dimensional structural dimensions of the training equipment, the component layout topology, the shell material properties, the transmission mechanism type, the connection method, the sensor placement location, the signal cable length, and the port identification coding information.
[0077] The operating condition data includes equipment surface temperature, core component temperature rise, bus voltage, load voltage, control circuit voltage, starting current, steady-state operating current, output pressure, pipeline cavity pressure, circulating medium flow rate, and coolant flow rate.
[0078] The control input signals include button operation signals on the operation panel, knob angle signals on the control console, opening and closing status signals of industrial control valves, status signals of foot switches, status signals of emergency stop buttons, and status signals of DIP switches.
[0079] In this embodiment, step two specifically includes:
[0080] Based on the structural parameters of the practical training equipment, a three-dimensional topological model of the practical training equipment is constructed, specifically as follows:
[0081] Mapping the dimensions of a three-dimensional structure to the spatial coordinate information of its components;
[0082] Map the component layout topology and connection methods into a directed connection graph;
[0083] The transmission mechanism type and housing material properties are used as state field values and labeled in the structural component attribute table. The structural component attribute table is generated synchronously with the three-dimensional topology model and is used to describe the functional attributes and physical characteristics of each structural component. This supports the embedding of structural attributes in the subsequent state prediction model, behavioral constraints in the simulation process, and material rendering in the visualization system.
[0084] An initial state parameter set is constructed based on operating condition data. The initial state parameter set includes an initial state vector of temperature, an initial state vector of voltage, an initial state vector of current, an initial state vector of pressure, and an initial state vector of flow rate.
[0085] The initial temperature state vector is composed of the equipment surface temperature and the temperature rise of the core components; the initial voltage state vector is composed of the bus voltage, the load voltage and the control circuit voltage; the initial current state vector is composed of the starting current and the steady-state operating current; the initial pressure state vector is composed of the output pressure and the pipeline cavity pressure; and the initial flow rate state vector is composed of the circulating medium flow rate and the coolant flow rate.
[0086] Based on the control input signals, the button action signals of the control panel, the knob angle signals of the control console, the opening and closing status signals of the industrial control valve, the foot switch status signals, the emergency stop button status signals, and the DIP switch status signals are respectively bound to the input ports of the corresponding structural components in the three-dimensional topology model to establish a control interface binding table.
[0087] The three-dimensional topology model, initial state parameter set, and control interface binding table are organized to generate a twin model of the control drive of the training equipment.
[0088] In this embodiment, step three specifically includes:
[0089] At each time step, the control input signals are arranged in the order of the component port numbers in the control interface binding table to form a control signal vector, and the control signal vectors of all time steps are organized into a control signal vector sequence.
[0090] Each control signal vector is input into a parameter-shared three-layer fully connected network to perform linear mapping and nonlinear activation, generating a control embedding vector. Specifically: the first fully connected layer performs a linear transformation and ReLU activation on the control signal vector to extract basic nonlinear features and outputs a first-layer intermediate feature vector; the second fully connected layer performs a linear transformation and ReLU activation on the first-layer intermediate feature vector to extract deeper features and outputs a second-layer intermediate feature vector; the third fully connected layer maps the dimension of the second-layer intermediate feature vector to the target embedding dimension through a linear transformation, generating a control embedding vector.
[0091] The control embedding vectors of all time steps are arranged in chronological order to form a control embedding vector sequence, which is then input into a multi-head attention mechanism for temporal dependency modeling to generate a control temporal feature vector sequence. The control temporal feature vector sequence corresponds to a control temporal feature vector at each time step.
[0092] For each time step, sine and cosine position encoding is performed to generate a position encoding vector. The position encoding vector is then input into a parameter-shared three-layer fully connected network, where linear transformation and nonlinear activation are performed sequentially to generate a time embedding vector. The time embedding vectors are then organized into a time embedding vector sequence according to the time step index order.
[0093] At each time step, the inner product of the control time-series feature vector and the time embedding vector is calculated to obtain the predicted state response value, and the predicted state response values are arranged in the order of the time steps to form a sequence of predicted state response values.
[0094] The predicted state response value is a discrete value of the predicted state function at the time step;
[0095] A joint loss function is constructed to optimize and train the improved DeepONet network, and the trained and optimized improved DeepONet network is used as the state prediction model.
[0096] In this embodiment, the multi-head attention mechanism introduces a relative position bias matrix to generate a control time-series feature vector sequence, specifically including:
[0097] For the i-th attention head, the control embedding vector sequence is constructed into a query matrix, a key matrix, and a value matrix through three sets of trainable linear mapping matrices, where the query matrix, key matrix, and value matrix are the query vector, key vector, and value vector at each time step, respectively.
[0098] The relative position offset matrix is calculated as follows: for any two time steps, the relative position offset is calculated using the time step difference, and the offset value is extracted from the learnable offset lookup table based on the relative position offset. The offset value is used as the corresponding matrix element of the relative position offset matrix. The offset lookup table contains 2T−1 consecutive relative position offsets from the upper limit of the negative time step to the lower limit of the positive time step, where the upper limit of the negative time step is the negative of the total number of time steps plus one, the lower limit of the positive time step is the total number of time steps minus one, and T represents the total number of time steps.
[0099] In this invention, the introduction of a relative position bias matrix enhances the attention mechanism's ability to model the relative positional relationships between time steps, thereby improving the model's ability to perceive temporal structures. In traditional multi-head attention mechanisms, attention weights rely solely on the content similarity between the query and the key, failing to reflect the distance or sequential differences between two time steps in the sequence. By constructing a relative position bias matrix, the relative positional information between different time steps is explicitly injected into the attention calculation as learnable bias values. This enables the improved DeepONet network to distinguish between different influence patterns between "the current control input and the previous input" or "the current input and the input from the previous five steps," improving the improved DeepONet network's ability to capture temporally dependent structures in long sequences. Especially when dealing with physical control systems with time-delay response characteristics, such as hydraulic, pneumatic, and electronically controlled training equipment, it can more accurately reflect the path of the control input's influence on future state evolution, thereby improving state prediction accuracy and physical response consistency.
[0100] The relative position bias matrix is added to the attention operation as follows: the dot product of the query matrix and the key matrix is calculated and divided by the square root of the embedding dimension of the key vector to obtain the attention score matrix; the relative position bias matrix and the attention score matrix are summed element-wise to obtain the bias correction score matrix; the bias correction score matrix is normalized using the Entmax function to obtain the normalized attention score matrix; where the Entmax function represents the sparse normalization function based on entropy regularization.
[0101] In this invention, compared with the traditional Softmax function, Entmax can generate a sparse attention distribution, making the attention weights more concentrated on the time steps most relevant to the current state prediction, thereby improving the modeling accuracy of key control inputs, enhancing the model's ability to express nonlinear relationships, and helping to improve the interpretability and physical consistency of predictions.
[0102] The normalized attention score matrix and the value matrix are weighted and calculated to generate the attention vector sequence of the i-th attention head;
[0103] The attention vector sequences of all attention heads are concatenated according to the attention head index, and a control temporal feature vector sequence is generated through linear mapping.
[0104] In this embodiment, the joint loss function introduces physical residual constraints. The joint loss function includes a physical consistency loss term and an observation data loss term, specifically including:
[0105] Based on the control object type of the training equipment, the dynamic response law of the training equipment under different control inputs is extracted and modeled into a first-order differential form to generate a physical control function.
[0106] The predicted state function is differentiated by first order to obtain the predicted state change rate.
[0107] The difference between the predicted rate of change of state and the physical control function is used as the physical residual constraint.
[0108] The physical consistency loss term is obtained by dividing the sum of squares of the physical residual constraints at each time step by the total number of time steps.
[0109] The mean square error between the predicted state response value and the historical measured equipment state response value is used as the observation data loss term.
[0110] By setting weighting coefficients, the physical consistency loss term and the observation data loss term are weighted and fused to obtain the joint loss function.
[0111] In this invention, the improved DeepONet network, compared to the standard DeepONet network, undergoes structural improvements in two main aspects: First, in the modeling of control inputs, the Branch network is modified into a temporal feature extraction structure based on a multi-head attention mechanism, and a relative position bias matrix is introduced to enhance the model's ability to model the temporal dependence of control signals and improve the accuracy of modeling the relationship between control inputs and state responses. Second, compared to the original DeepONet network directly using time steps as input to the Trunk network, this invention introduces a sine / cosine position encoding mechanism to periodically encode the index value of each time step, and extracts multi-level temporal semantic features through a three-layer fully connected network to generate a temporal embedding vector sequence. This temporal embedding mechanism can more effectively capture the temporal evolution pattern and improve the model's ability to model the changes in state response over time, making it particularly suitable for high-precision prediction tasks of state responses in complex dynamic systems. Third, a physical consistency loss function is introduced during the training phase. By comparing the first derivative of the predicted state response with the physical dynamics function of the controlled object, a physical residual constraint term is constructed to guide the model learning process to conform to the physical response patterns of the device. The above improvements significantly enhance the model's state prediction accuracy, convergence speed, and physical interpretability.
[0112] In this embodiment, step four specifically includes:
[0113] It receives real-time operation data from trainees during practical training, arranges the real-time operation data according to the component port number order in the control interface binding table, forms a real-time control signal vector, and forms a real-time control signal vector sequence according to time steps.
[0114] The real-time control signal vector sequence is input into the state prediction model to perform state response inference and generate a predicted state response value sequence.
[0115] The predicted state response value sequence is used as a driving signal input to the control drive twin model of the training equipment to drive the state of each structural component in the three-dimensional topology model, update the state field value in the structural component attribute table, execute the dynamic simulation process deduction of the training equipment, and generate a set of component state mappings for visualization rendering.
[0116] In this embodiment, step five specifically includes:
[0117] The component state mapping set is graphically rendered and encoded to form a graphical frame sequence, which includes a time step index, structural component number, visual state field and rendering parameters.
[0118] The sequence of graphic frames is input into a 3D interactive graphics engine to render and generate simulation images of the training equipment at each time step. The simulation images support dynamic viewpoint adjustment, structural hierarchy expansion, control interface highlighting, component status labeling, and simulation process backtracking. The simulation images are then output to a graphical user interface.
[0119] For example, a vocational college deployed the method of this invention for hydraulic cylinder positioning control training on its industrial control training platform. In the hydraulic cylinder positioning task, students input control signals through a manual operation interface. These control signals are structured according to a preset "control interface binding table," for example, assigning proportional valves, pump stations, and sensors to control ports numbered C1, C2, and C3 respectively, and arranging them sequentially as the control signal vector for the current time step. Multiple time steps of control signals are then continuously acquired to form a control signal vector sequence.
[0120] The control signal vector sequence is passed through a pre-trained state prediction model to output a sequence of predicted state response values, including the piston displacement, system pressure, and feedback signal status at each time step. The prediction results are used as driving signals and input into the control drive digital twin model to simulate the state evolution of components such as hydraulic cylinders, connecting pipelines, and proportional valves in the three-dimensional topology in real time, and to automatically update key fields in the attribute tables of each component, such as "displacement," "internal pressure," and "on / off status."
[0121] During the graphics rendering phase, the aforementioned state mapping results are encoded. For each structural component at each time step, a graphics frame data entry containing "time step index," "component number," "state field value," and "rendering parameters" is generated. All graphics frames form a graphics frame sequence, which is then sent to the 3D interactive graphics engine for real-time rendering. For example, the piston of a hydraulic cylinder will advance forward in the 3D model according to the predicted displacement. The pipe color gradually changes with pressure, highlighting the currently controlled proportional valve, showing its valve core opening as "65%," and marking it as "Running." Students can freely rotate the viewpoint to view the operating status from different angles and can also click "Timeline Replay" to view the evolution of the action in the previous control cycle. The entire process is completed interactively through a graphical user interface, enhancing the immersiveness of the teaching process and the accuracy of operational feedback, achieving the simulation teaching goal of "what you see is what you get."
[0122] In this embodiment, step seven specifically includes:
[0123] The predicted state response value sequence, the actual observed state value sequence, and the working condition labeling information are paired according to time steps to construct an incremental training sample set;
[0124] Define a state deviation feedback value sequence, wherein the state deviation feedback value is the difference between the predicted state response value sequence and the actual observed state value sequence at each time step;
[0125] Construct the incremental loss function by dividing the sum of squares of the state deviation feedback values at each time step by the total number of time steps to form the incremental loss term and adding it to the joint loss function;
[0126] The parameters of the improved DeepONet network are incrementally fine-tuned based on the incremental loss function. The parameters of the improved DeepONet network include the multi-head attention weight matrix and bias term, the weight matrix and bias vector of the fully connected layer, the position encoding vector, the embedding mapping layer parameters and nonlinear transformation function weights, and the trainable mapping weights related to the physical consistency constraint term.
[0127] Example 1:
[0128] To verify the feasibility of this invention in practice, it was applied to a training platform for intelligent hydraulic control systems in a mechatronics major at a university. This platform primarily helps students master the structural principles, operational logic, and typical control processes of key components such as hydraulic actuators, proportional control valves, and electro-hydraulic servo systems. Traditional teaching methods mainly rely on physical equipment operation and PowerPoint presentations, which suffer from insufficient teaching resources, easily damaged equipment, lack of traceability in operational behavior, and abstract student understanding, making it difficult to support the needs of multi-round, highly simulated, and interactive teaching.
[0129] During implementation, the structural parameters, operating condition data, and control input signals of the training equipment are first collected. The structural parameters include hydraulic cylinder diameter and stroke, proportional valve flow-opening characteristics, sensor type and measurement accuracy, and pipeline layout information. The operating condition data includes real-time signals such as pump station output power, system pressure, hydraulic cylinder displacement, and valve-controlled flow. The control input signals include simulated proportional valve opening, start / stop commands, and analog control curves generated by student operations. Based on the structural parameters, operating condition data, and control input signals, a control-driven twin model of the training equipment is constructed to jointly model the equipment's control logic, response process, and the physical behavior of key components. Subsequently, the control input signals are embedded and modeled using an improved DeepONet network for state response prediction, and the state prediction model is optimized and generated. The student's real-time operation data is input into the state prediction model to obtain a sequence of predicted state response values. This sequence is then input into the control-driven twin model for equipment simulation, generating a set of component state mappings for each time step. This set includes key physical quantities such as piston stroke, pressure distribution, and valve core opening. Finally, the component state mapping set is input into the graphics rendering encoding module for graphical processing, generating a sequence of graphic frames containing time index, component number, state field and rendering parameters, and then visualized in a dynamic interactive manner on the web-based 3D visualization platform.
[0130] To further verify the effectiveness of the present invention, the method of the present invention was compared with the following two comparative methods:
[0131] Comparison Method 1: The state prediction method based on the traditional BP neural network only uses a single-layer fully connected network to model the control input, lacks effective capture of temporal dependencies, and does not introduce physical constraint mechanisms;
[0132] Comparison Method 2: Prediction methods based on the standard DeepONet structure do not introduce multi-head attention mechanisms or relative position bias, do not consider physical consistency loss, and only perform basic input-output mapping learning.
[0133] All three methods were tested on a hydraulic control training platform, including five typical tasks: cylinder positioning, throttle adjustment, unloading response, reversing control, and synchronization control. Their comprehensive performance in state response prediction and teaching simulation was evaluated. Comparison metrics included: prediction mean square error, prediction mean absolute error, simulation behavior recognition accuracy, control feedback consistency score, physical constraint residuals, and the number of model convergence iterations. Experimental results are shown in Table 1.
[0134] Table 1. Evaluation Comparison of the Invention Method and the Comparative Scheme in Practical Training
[0135]
[0136] As shown in Table 1, the method of this invention significantly outperforms the comparative methods in all comparative indicators. Regarding state prediction accuracy, the mean square error of state prediction using the method of this invention is 0.024, significantly lower than 0.093 for comparative method one and 0.058 for comparative method two. The mean absolute error of the method of this invention is only 0.037, a reduction of 60.4% and 51.3% compared to comparative method one and comparative method two, respectively. This indicates that the method of this invention possesses stronger nonlinear modeling capabilities and higher fitting accuracy when processing the relationship between control input and state response. In terms of simulation behavior recognition accuracy, the method of this invention reaches 93.4%, an improvement of 14.9 percentage points compared to comparative method one and 8.2 percentage points compared to comparative method two. This demonstrates that the method of this invention can more accurately simulate the dynamic response behavior of training equipment under different control tasks, effectively supporting teaching evaluation and operational analysis.
[0137] In terms of control feedback consistency score, the method of this invention achieves 92.1, higher than the 71.3 of comparative method one and 83.6 of comparative method two, reflecting its more stable feedback response to operation commands and its conformity to real physical logic. Regarding physical consistency, due to the introduction of a physical consistency loss term, the physical consistency residual of the method of this invention is 0.018, far lower than the comparative methods, demonstrating stronger physical interpretability and reasonable device behavior. In terms of model training efficiency, the method of this invention requires only 210 iterations for model convergence, a reduction of 69% compared to comparative method one and 50% compared to comparative method two, indicating that the proposed improved structure has faster convergence speed and higher optimization efficiency during the training phase.
[0138] The method of this invention performs well in terms of state modeling accuracy, control simulation realism, and training efficiency, and has good application prospects and engineering practical value in practical training systems.
[0139] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A virtual simulation method for practical training equipment based on digital twins, characterized in that, Includes the following steps: Step 1: Collect structural parameters, operating condition data, and control input signals of the training equipment; Step 2: Based on the structural parameters, operating condition data, and control input signals of the training equipment, construct a twin model of the training equipment's control drive. Step 3: Construct an improved DeepONet network to embed and model the control input signal and predict the state response. The improved DeepONet network introduces a relative position bias matrix in the multi-head attention mechanism and introduces a physical consistency loss term during training to generate a state prediction model. Step three specifically includes: At each time step, the control input signals are arranged in the order of the component port numbers in the control interface binding table to form a control signal vector, and the control signal vectors of all time steps are organized into a control signal vector sequence. Each control signal vector is input into a parameter-shared three-layer fully connected network to perform linear mapping and nonlinear activation, generating a control embedding vector. Specifically: the first fully connected layer performs a linear transformation and ReLU activation on the control signal vector to extract basic nonlinear features and outputs a first-layer intermediate feature vector; the second fully connected layer performs a linear transformation and ReLU activation on the first-layer intermediate feature vector to extract deeper features and outputs a second-layer intermediate feature vector; the third fully connected layer maps the dimension of the second-layer intermediate feature vector to the target embedding dimension through a linear transformation, generating a control embedding vector. The control embedding vectors of all time steps are arranged in chronological order to form a control embedding vector sequence, which is then input into a multi-head attention mechanism for temporal dependency modeling to generate a control temporal feature vector sequence. The control temporal feature vector sequence corresponds to a control temporal feature vector at each time step. For each time step, sine and cosine position encoding is performed to generate a position encoding vector. The position encoding vector is then input into a parameter-shared three-layer fully connected network, where linear transformation and nonlinear activation are performed sequentially to generate a time embedding vector. The time embedding vectors are then organized into a time embedding vector sequence according to the time step index order. At each time step, the inner product of the control time-series feature vector and the time embedding vector is calculated to obtain the predicted state response value, and the predicted state response values are arranged in the order of the time steps to form a sequence of predicted state response values. The predicted state response value is a discrete value of the predicted state function at the time step; Construct a joint loss function, optimize and train the improved DeepONet network, and use the trained and optimized improved DeepONet network as the state prediction model. Step 4: Input the trainees' real-time operation data into the state prediction model to perform state response reasoning, generate a sequence of predicted state response values, and input it into the twin model of the training equipment control drive to perform equipment simulation process deduction and generate a set of component state mappings. Step 5: Visualize the component state mapping set through the user interface; Step Six: During the execution of practical training tasks, collect the actual observation state value sequence and working condition annotation information of the trainees to form structured teaching feedback data; Step 7: Based on the predicted state response value sequence and structured teaching feedback data, perform incremental fine-tuning on the improved DeepONet network.
2. The virtual simulation method for practical training equipment based on digital twins according to claim 1, characterized in that, The structural parameters include the three-dimensional structural dimensions of the training equipment, the component layout topology, the shell material properties, the transmission mechanism type, the connection method, the sensor placement location, the signal cable length, and the port identification coding information. The operating condition data includes equipment surface temperature, core component temperature rise, bus voltage, load voltage, control circuit voltage, starting current, steady-state operating current, output pressure, pipeline cavity pressure, circulating medium flow rate, and coolant flow rate. The control input signals include button operation signals on the operation panel, knob angle signals on the control console, opening and closing status signals of industrial control valves, status signals of foot switches, status signals of emergency stop buttons, and status signals of DIP switches.
3. The virtual simulation method for practical training equipment based on digital twins according to claim 1, characterized in that, Step two specifically includes: Based on the structural parameters of the practical training equipment, a three-dimensional topological model of the practical training equipment is constructed, specifically as follows: Map the dimensions of the three-dimensional structure to the spatial coordinate information of the structural components; Map the component layout topology and connection methods into a directed connection graph; The transmission mechanism type and housing material properties are used as state field values and marked in the structural component property table, which is generated synchronously with the three-dimensional topology model. An initial state parameter set is constructed based on operating condition data. The initial state parameter set includes an initial state vector of temperature, an initial state vector of voltage, an initial state vector of current, an initial state vector of pressure, and an initial state vector of flow rate. Based on the control input signals, the button action signals of the control panel, the knob angle signals of the control console, the opening and closing status signals of the industrial control valve, the foot switch status signals, the emergency stop button status signals, and the DIP switch status signals are respectively bound to the input ports of the corresponding structural components in the three-dimensional topology model to establish a control interface binding table. The three-dimensional topology model, initial state parameter set, and control interface binding table are organized to generate a twin model of the control drive of the training equipment.
4. The virtual simulation method for practical training equipment based on digital twins according to claim 1, characterized in that, The multi-head attention mechanism introduces a relative position bias matrix to generate a sequence of control temporal feature vectors, specifically including: For the i-th attention head, the control embedding vector sequence is constructed into a query matrix, a key matrix, and a value matrix through three sets of trainable linear mapping matrices, where the query matrix, key matrix, and value matrix are the query vector, key vector, and value vector at each time step, respectively. The relative position offset matrix is calculated as follows: for any two time steps, the relative position offset is calculated using the time step difference, and the offset value is extracted from the learnable offset lookup table based on the relative position offset. The offset value is used as the corresponding matrix element of the relative position offset matrix. The offset lookup table contains 2T−1 consecutive relative position offsets from the upper limit of the negative time step to the lower limit of the positive time step, where the upper limit of the negative time step is the negative of the total number of time steps plus one, the lower limit of the positive time step is the total number of time steps minus one, and T represents the total number of time steps. The relative position bias matrix is added to the attention operation as follows: the dot product of the query matrix and the key matrix is calculated and divided by the square root of the embedding dimension of the key vector to obtain the attention score matrix; the relative position bias matrix and the attention score matrix are summed element-wise to obtain the bias correction score matrix; the bias correction score matrix is normalized using the Entmax function to obtain the normalized attention score matrix; where the Entmax function represents the sparse normalization function based on entropy regularization. The normalized attention score matrix and the value matrix are weighted and calculated to generate the attention vector sequence of the i-th attention head; The attention vector sequences of all attention heads are concatenated according to the attention head index, and a control temporal feature vector sequence is generated through linear mapping.
5. The virtual simulation method for practical training equipment based on digital twins according to claim 1, characterized in that, The joint loss function introduces physical residual constraints and includes a physical consistency loss term and an observation data loss term, specifically including: Based on the control object type of the training equipment, the dynamic response law of the training equipment under different control inputs is extracted and modeled into a first-order differential form to generate a physical control function. The predicted state function is differentiated by first order to obtain the predicted state change rate. The difference between the predicted rate of change of state and the physical control function is used as the physical residual constraint. The physical consistency loss term is obtained by dividing the sum of squares of the physical residual constraints at each time step by the total number of time steps. The mean square error between the predicted state response value and the historical measured equipment state response value is used as the observation data loss term. By setting weighting coefficients, the physical consistency loss term and the observation data loss term are weighted and fused to obtain the joint loss function.
6. The virtual simulation method for practical training equipment based on digital twins according to claim 1, characterized in that, Step four specifically includes: It receives real-time operation data from trainees during practical training, arranges the real-time operation data according to the component port number order in the control interface binding table, forms a real-time control signal vector, and forms a real-time control signal vector sequence according to time steps. The real-time control signal vector sequence is input into the state prediction model to perform state response inference and generate a predicted state response value sequence. The predicted state response value sequence is used as a driving signal input to the control drive twin model of the training equipment to drive the state of each structural component in the three-dimensional topology model, update the state field value in the structural component attribute table, execute the dynamic simulation process deduction of the training equipment, and generate a set of component state mappings for visualization rendering.
7. The virtual simulation method for practical training equipment based on digital twins according to claim 1, characterized in that, Step five specifically includes: The component state mapping set is graphically rendered and encoded to form a graphical frame sequence, which includes a time step index, structural component number, visual state field and rendering parameters. The sequence of graphic frames is input into a 3D interactive graphics engine to render and generate simulation images of the training equipment at each time step. The simulation images support dynamic viewpoint adjustment, structural hierarchy expansion, control interface highlighting, component status labeling, and simulation process backtracking. The simulation images are then output to a graphical user interface.
8. The virtual simulation method for practical training equipment based on digital twins according to claim 1, characterized in that, Step seven specifically includes: The predicted state response value sequence, the actual observed state value sequence, and the working condition labeling information are paired according to time steps to construct an incremental training sample set; Define a state deviation feedback value sequence, wherein the state deviation feedback value is the difference between the predicted state response value sequence and the actual observed state value sequence at each time step; Construct the incremental loss function by dividing the sum of squares of the state deviation feedback values at each time step by the total number of time steps to form the incremental loss term and adding it to the joint loss function; Incremental fine-tuning of the parameters of the improved DeepONet network is performed based on the incremental loss function.