State code driven anchoring system semi-physical simulation control flow segmentation synchronization method

Through the state code-driven semi-physical simulation system of the mooring system, synchronous control and rapid fault location of the real controller and virtual prototype are achieved, which solves the problem of the existing technology that the real controller logic and algorithm cannot be efficiently tested, and improves the efficiency and accuracy of simulation testing.

CN120652836APending Publication Date: 2025-09-16BEIJING RES INST OF PRECISE MECHATRONICS CONTROLS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510658729.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing hardware-in-the-loop simulation platforms cannot efficiently test the control logic and algorithm effectiveness of real controllers, and cannot achieve fault diagnosis or rapid location of erroneous logic.

Method used

A state-code driven semi-physical simulation system for the mooring system is constructed, including a simulation model host computer, a real-time target machine, a real controller, a tester, actuators, and a power supply. The state code drives the simulation model to perform real-time interaction and data synchronization, thus achieving synchronous control of the controller and virtual prototype and rapid fault location.

Benefits of technology

It achieves state synchronization and data interaction between the real controller and the virtual prototype, supports rapid fault location, improves the efficiency of controller function evaluation and algorithm logic verification, optimizes the test process and shortens the test time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120652836A_ABST
    Figure CN120652836A_ABST
Patent Text Reader

Abstract

The invention relates to a state code driven semi-physical simulation control flow segmentation synchronization method, and belongs to the technical field of semi-physical simulation. According to the invention, a semi-physical simulation system comprising a simulation model upper computer, a real-time target machine, a real controller, a tester, an execution element, a power supply and other units is constructed, and a semi-physical simulation state synchronization method supporting rapid fault positioning is provided. Synchronous regulation and control and data interaction functions of a real controller and a virtual prototype in different states such as separation and locking are realized, and fault positions in different control stages can be quickly positioned and diagnosed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of semi-physical simulation, and relates to a state code driven semi-physical simulation control flow segmented synchronization method for an anchoring system. Background Art

[0002] Hardware-in-the-loop (HIL) simulation, also known as semi-physical or hardware-in-the-loop (HIL) simulation, combines actual hardware systems with computer simulation platforms to simulate the system's response in different environments in real time and interact with the hardware. This allows for more accurate simulation of the dynamic behavior of the actual system, particularly in complex and changing environments, improving simulation accuracy. Through HIL simulation, complex systems that are difficult to test in real-world scenarios can be extensively tested in the laboratory, avoiding the high cost and high risk of field testing required by traditional methods and significantly reducing development costs.

[0003] Hardware-in-the-loop simulation technology has been widely used in fields such as automatic control, aircraft testing, and robotics, and has demonstrated significant advantages. The Hardware-in-the-loop Simulation System and Method for Hypersonic Aircraft Navigation and Control Systems, ZL202110769116.1, uses desktop simulation technology based on an integrated navigation, guidance, and control device as the simulation object. However, it is a hardware-in-the-loop simulation for a single component and does not involve adding a real controller to the hardware-in-the-loop simulation. The Rocket Hardware-in-the-loop Simulation Test System, ZL202110416385.X, uses a hardware-in-the-loop simulation test system that can efficiently test and improve the reliability of rocket control systems. However, this invention also does not involve adding a real controller to the hardware-in-the-loop simulation, and cannot verify the controller algorithm and logic.

[0004] The aforementioned hardware-in-the-loop simulation platform has the problem of being unable to efficiently test the effectiveness of the control logic and algorithms of a real controller, i.e., it is unable to perform controller fault diagnosis or quickly locate faulty logic. Summary of the Invention

[0005] The technical problem solved by the present invention is to overcome the deficiencies of the prior art and propose a state code driven semi-physical simulation control flow segmented synchronization method.

[0006] The solution of the present invention is:

[0007] A state code driven semi-physical simulation system for an anchoring system includes a simulation model host computer, a real-time target computer, a real controller, a tester, an actuator, and a power supply; wherein:

[0008] The simulation model host computer is provided with an anchoring system model and a communication module model, wherein the anchoring system model includes a hydrodynamic environment model, a platform subsystem model, a gravity anchor subsystem model, and a cable management subsystem model; the communication module model sends the results of the anchoring system model calculation to the real controller, and the communication protocol format of the communication module model is consistent with that of the real sensor;

[0009] The real-time target machine runs the model on the simulation model host computer according to the control status code and control instructions sent by the real controller, and is connected to the real controller through the IO interface to send the result of the operation to the real controller;

[0010] The real controller sends control status codes and control instructions to the real-time target machine to drive the simulation model to perform simulation calculations. At the same time, control timing judgment and decision-making are performed based on the calculation results of the real-time target machine.

[0011] The tester is used to complete the download and verification of the real controller program, parameter binding and readback, and save the real controller data; the tester can also display and store the parameters sent by the real controller in real time, and compare and verify them with the parameters in the simulation model;

[0012] The actuator is directly connected to the real controller and performs actual actions according to the control instructions of the real controller. The power supply provides necessary power to the controller and the actuator to ensure the normal operation of the system.

[0013] Preferably, the real-time target machine collects the state of the actuator and uses it as input to the mooring system model.

[0014] Preferably, the simulation model host computer is connected to the real-time target machine via a network cable, the real-time target machine, the tester, the real controller and the power supply are connected via a CAN network, and the actuator and the real controller are connected via an AD module and serial port communication.

[0015] Preferably, the communication module model includes a data interaction module and a virtual-reality interaction module;

[0016] The data interaction module receives the status code and control instructions sent by the real controller and sends them to the virtual-real interaction module. It receives the results of the mooring system model calculation and sends them to the real controller. It receives the status information of the actuator and sends it to the mooring system model through the virtual-real interaction module.

[0017] The virtual-reality interaction module parses the corresponding action status according to the status code and sends it to the mooring system model.

[0018] A state code driven mooring system hardware-in-the-loop simulation control flow segmented synchronization method is implemented based on the hardware-in-the-loop simulation system, comprising the following steps:

[0019] (1) Before starting the semi-physical simulation, the real controller completes the control program download and verification, and parameter configuration;

[0020] (2) Compile and download the simulation model in the simulation model host computer to the real-time target machine;

[0021] (3) When running the simulation, the tester sends an activation command to the battery and an automatic depth setting start command to the real controller;

[0022] (4) The real controller sends the control status code and control instructions to the real-time target machine according to the control sequence, and observes whether the simulation model host computer can receive the control status code and control instructions of the real controller, wherein the control status code is the identification code of the different stages of the mooring system, including the separation status code, the fixed depth status code, and the locking status code. If it can be received, go to step (5); if not, go to step (6);

[0023] (5) The real-time target machine inputs the control status code and control instructions of the real controller into the platform subsystem model, the gravity anchor subsystem model, and the cable storage drum subsystem model, updates the output results through model calculation, and enters step (7);

[0024] (6) Locate the fault location of the real controller program through the current control status code, modify the real controller program, perform communication debugging, and return to step (3);

[0025] (7) Determine whether the control sequence of the real controller is completed. If it is completed, save the real controller data and save the real-time target machine data through the simulation model host computer. If it is not completed, return to step (4) until it is completed;

[0026] (8) After completion, turn off the power of the real controller and the real-time target machine.

[0027] Preferably, in step (1), the downloading and verification of the real controller program is completed by a tester.

[0028] Preferably, in step (1), after the real controller program is downloaded and verified, the real controller is restarted to perform parameter configuration. The parameter configuration includes downloading specific parameters to the real controller through a tester, completing parameter binding and reading back, and confirming whether the read-back parameters are consistent with the bound parameters. If they are consistent, the parameter configuration is considered complete.

[0029] Preferably, in step (2), before the simulation model is downloaded and compiled, the simulation model host computer is connected to the network of the real-time target machine.

[0030] Preferably, after the control sequence of the real controller ends, the control status code is analyzed based on the data saved by the real controller to see whether it is consistent with the action of the execution element, and the data saved by the real controller is compared with the real-time target machine data saved by the simulation model host computer to form a test report.

[0031] Preferably, the output results in step (5) include a cable tension signal, a cable length signal, a platform depth signal, and a gravity anchor depth signal.

[0032] The beneficial effects of the present invention compared with the prior art are:

[0033] (1) The present invention proposes a semi-physical simulation state synchronization method that supports rapid fault location. Through the real-time interaction method of state flow, the synchronous control and data interaction functions of the real controller and the virtual prototype in different states such as separation and locking are realized, and the fault location in different control stages can be quickly located and diagnosed.

[0034] (2) Construct a semi-physical simulation system that includes a simulation model host computer, a real-time target machine, a real controller, a tester, an actuator, a power supply, and other units, which can fully evaluate the controller function, verify the correctness of the algorithm logic, and complete the controller diagnosis, modification, and iteration.

[0035] (3) The present invention proposes a semi-physical simulation test method for the mooring system, including a communication module test and a controller-in-the-loop test method, which standardizes the test process, optimizes the test content, and shortens the test time. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 The structure of the hardware-in-the-loop simulation system of the mooring system;

[0037] Figure 2 Schematic diagram of the in-loop state code synchronization technology of the virtual-reality combined controller;

[0038] Figure 3 Flowchart of hardware-in-the-loop simulation operation of mooring system. DETAILED DESCRIPTION

[0039] The present invention will be further described below with reference to the accompanying drawings.

[0040] Aiming at the problem of rapid fault diagnosis or fault logic location in controller hardware-in-the-loop simulation testing, the present invention proposes a state code-driven semi-physical simulation control flow segmented synchronization method. By identifying the startup, separation, bottoming out, locking and other states in the controller timing system as corresponding state codes, and sending the state codes to the real-time target machine, the state and data information between the two are synchronized, and the current test phase can be quickly located according to the state code value. If a fault occurs, the error location can be quickly found. Through the real-time interaction method of the state flow, the synchronous control of the real controller and the virtual prototype is effectively achieved. A semi-physical simulation system is constructed to carry out research on test methods such as communication module testing and controller-in-the-loop testing. By analyzing the test results, the diagnosis, modification and iteration of the controller are completed, thereby improving the test efficiency and reducing the development cost.

[0041] The real controller is the core of the underwater mooring system and needs to control the start-up, separation, closed-loop control, bottoming, locking and other functions of the mooring system. In the semi-physical simulation system, the present invention proposes to realize real-time interaction between the controller and the simulation target machine through the communication system model, that is, the controller sends information such as status code to drive the corresponding model of the simulation machine to perform simulation calculations. At the same time, the real-time target machine sends the calculation results to the controller for further control algorithm judgment and decision-making.

[0042] The simulation model host computer includes three parts: data interaction module, virtual-reality interaction module, and mooring system model. The data interaction module receives the status code and control instructions sent by the real controller and sends them to the virtual-reality interaction module, receives the status information fed back by the mooring system model and sends it to the real controller, and receives the status information of the actuator and sends it to the mooring system model through the virtual-reality interaction module; the virtual-reality interaction module parses the corresponding action status according to the status code; the mooring system model is a virtual model, which runs the hydrodynamic environment model, platform subsystem model, gravity anchor subsystem model, and cable storage drum subsystem model. It is necessary to run the corresponding model based on the action status parsed by the virtual-reality interaction module.

[0043] The proposed hardware-in-the-loop simulation system for an anchoring system includes a real controller, actuators, a power supply, a simulation model host computer, a real-time target computer, and a tester. The simulation model host computer is connected to the real-time target computer via a network cable. The real-time target computer, tester, real controller, and power supply are connected via a CAN network. The actuators and controller are connected via hardware such as an AD module and serial communication.

[0044] Figure 1This is the hardware component of the mooring system hardware-in-the-loop simulation system. The simulation model host computer establishes a mooring system model and a communication module model. The mooring system model includes a hydrodynamic environment model, a platform subsystem model, a gravity anchor subsystem model, and a cable management subsystem model. The communication module model transmits the mooring system model's computational results to the real controller. The communication module model uses the same communication protocol format as the real sensor.

[0045] The real-time target machine is a simulation hardware platform for semi-physical simulation. It is compatible with the simulation model and can run the model on the simulation model host computer according to the control status code and control instructions sent by the real controller. It is connected to the real controller through multiple IO interfaces to achieve rapid testing and verification of the real controller.

[0046] The real controller is the core of the underwater mooring control system and has the function of real-time interaction with the simulation machine. The real controller drives the simulation model to perform simulation calculations by sending control status codes and control instructions. At the same time, the real-time target machine sends the calculation results to the real controller for further control algorithm judgment and decision-making.

[0047] The tester is designed to facilitate controller development, debugging, and maintenance. During testing, it can help adjust controller parameters to better suit actual application requirements and optimize efficiency and accuracy. Furthermore, the tester is used to download and verify real-world controller programs, bind and read back parameters, and save real-world controller data. It also displays and stores key parameters uploaded by the controller in real time, allowing for comparison and verification with parameters in the simulation model.

[0048] The actuator and power supply are directly connected to the controller. The controller issues control instructions to direct the actuator to work, and the actuator completes the actual action. The status of the actuator is collected by the real-time target machine as the input of the mooring system model; the power supply provides the necessary power for the controller and actuator to ensure the normal operation of the system.

[0049] Figure 2 This diagram illustrates the in-loop state code synchronization technology for a virtual-real controller (real controller). The real controller runs the control program, including states such as mooring system startup, separation, closed-loop control, bottoming out, and locking. The real-time target machine receives control status codes and control commands from the real controller through a hardware module and then feeds the mooring system model status back to the real controller.

[0050] This paper proposes a semi-physical simulation test method for mooring systems, conducts research on test methods such as communication module testing and controller-in-the-loop testing, and completes the diagnosis, modification, and iteration of the real controller by analyzing the test results. During the simulation, after the real controller receives the automatic depth setting start command, it starts the automatic depth setting program and sends it to the real-time target machine to start the control status code. After receiving the control status code, the real-time target machine begins to perform hydrodynamic simulation calculations of the mooring system, calculates the depth and attitude information at the current moment, and sends this information to the real controller. The real controller receives all simulated sensor signals, makes judgments based on the control timing, and issues corresponding instructions to the execution unit and the real-time target machine to perform the corresponding actions, realizing a full-process closed-loop simulation.

[0051] Control timing: After the real controller sends the control program start status code 1, the virtual-reality interaction module parses the status code, identifies it as the start process, runs the various subsystems of the mooring system model, and then feeds back the system status to the real controller through the data interaction module; the real controller enters the pressure judgment stage according to the feedback information and control timing. When it is lower than the pressure limit, it sends status code 2. The virtual-reality interaction module parses the status code, identifies it as the charging process, runs the charging module unit of the mooring system model, and then feeds back the system status to the real controller through the data interaction module; the real controller enters the separation judgment stage according to the feedback information and control timing. When the separation condition is met, it sends status code 3. The virtual-reality interaction module parses the status code, identifies it as the separation process, runs the separation unit model of the mooring system model, and then feeds back the system status to the real controller through the data interaction module; the real controller enters the separation judgment stage according to the feedback information and control timing. Entering the closed-loop control judgment stage, when the closed-loop control conditions are met, status code 4 is sent, the real interaction module parses the status code, identifies it as a closed-loop control process, runs the mooring system model according to the given position, and then feeds back the system status to the real controller through the data interaction module; the real controller enters the bottoming judgment stage based on the feedback information and control timing. When the bottoming conditions are met, status code 5 is sent. The virtual-reality interaction module parses the status code, identifies it as a bottoming process, runs the mooring system model corresponding to the bottoming conditions, and then feeds back the system status to the real controller through the data interaction module; the real controller enters the locking judgment stage based on the feedback information and control timing. When the locking conditions are met, status code 6 is sent. The virtual-reality interaction module parses the status code, identifies it as a locking process, runs the mooring system model corresponding to the locking conditions, and then feeds back the system status to the real controller through the data interaction module, ending the closed-loop control of the entire process.

[0052] The tester receives and stores real-time information from the actual controller and actuators via a communication interface. After the simulation is complete, the control program is reviewed, the actuator action is verified, and the data accuracy is analyzed.

[0053] Figure 3 The operational flow chart of hardware-in-the-loop simulation of the mooring system is shown.

[0054] Before testing, power on the real controller and compile, connect, and download the real controller program to the controller via the CAN box through the controller host computer. Complete the program download and verification. Turn on the real-time target computer and complete the network connection between the host computer and the simulator.

[0055] After restarting the controller, open the parameter binding program of the tester, download the specific parameters (binding sea depth, separation depth, fixed depth, cable tension, etc.) to the controller, complete the parameter binding and read back, and confirm that the read-back parameters are consistent with the binding parameters.

[0056] Open the simulation model host computer to run the simulation model, set the parameters such as sea depth in the model, compile the model and download it to the simulation machine, start running the semi-physical simulation model, and then start the controller program through the tester.

[0057] During the simulation, the relevant states of the controller and the parameter states of the semi-physical simulation model are observed, including the cable tension signal, cable length signal, platform depth signal, gravity anchor depth signal, etc., to compare whether the tester and the simulation model host computer are consistent.

[0058] Observe whether the upper computer of the simulation model can receive the control status code and control instructions of the controller. The control status code is the identification code of the different stages of the mooring system, which is divided into separation, fixed depth, locking and other status codes. After the simulation model receives the controller instruction, it inputs it into the platform subsystem model, gravity anchor subsystem model, and cable storage drum subsystem model, and updates the output result of the next cycle through model calculation.

[0059] If the data is not received normally or is not executed according to the control strategy or control status code, the cause of the error is determined and recompiled through model modification and communication debugging, and the simulation model and controller are restarted before the model is run.

[0060] Through the control status code status such as locking and bottoming, it is judged whether the anchor control system is ended. If it is ended, the controller data is saved through the tester, and the real-time target machine data is saved through the simulation model host computer. If it is ended, the full process depth control program will continue to be executed until it ends.

[0061] Analyze the saved data. After the real controller completes the control sequence, analyze the control status code based on the real controller's saved data to see if it matches the actuator's action (to verify the actuator's functionality). Compare the saved data with the real-time target machine data stored on the simulation model's host computer (to verify the real controller's storage functionality). Create a test report. Finally, power off the controller and real-time target machine.

[0062] The present invention innovatively proposes a state code driven semi-physical simulation control flow segmented synchronization method, constructs an online real-time physical interaction network between virtual simulation and real control system, realizes the state interaction and action execution between the real controller and the virtual prototype through the state code model, improves the fault diagnosis efficiency of semi-physical simulation, and realizes the semi-physical simulation of the real controller of the mooring system in the loop.

[0063] This paper constructs a hardware-in-the-loop simulation system consisting of a simulation model host computer, a real-time target machine, a real controller, a tester, actuators, and a power supply. A hardware-in-the-loop simulation test method for a mooring system is proposed. Through real-time interaction with state codes, the controller and virtual prototype are synchronized in different states, such as detached and locked. Tests such as communication module testing and controller-in-the-loop testing are conducted, and analysis of test results allows for diagnosis, modification, and iteration of the controller.

[0064] Parts of the present invention that are not described in detail belong to common knowledge among those skilled in the art.

Claims

1. A state code driven hardware-in-the-loop simulation system for an anchoring system, characterized by: It includes simulation model host computer, real-time target machine, real controller, tester, actuator, and power supply; among them: The simulation model host computer is provided with an anchoring system model and a communication module model, wherein the anchoring system model includes a hydrodynamic environment model, a platform subsystem model, a gravity anchor subsystem model, and a cable management subsystem model; the communication module model sends the results of the anchoring system model calculation to the real controller, and the communication protocol format of the communication module model is consistent with that of the real sensor; The real-time target machine runs the model on the simulation model host computer according to the control status code and control instructions sent by the real controller, and is connected to the real controller through the IO interface to send the result of the operation to the real controller; The real controller sends control status codes and control instructions to the real-time target machine to drive the simulation model to perform simulation calculations. At the same time, control timing judgment and decision-making are performed based on the calculation results of the real-time target machine. The tester is used to download and verify the real controller program, bind and read back parameters, and save real controller data. The tester can also display and store parameters sent by the real controller in real time, and compare and verify them with parameters in the simulation model. The actuator is directly connected to the real controller and performs actual actions according to the control instructions of the real controller. The power supply provides necessary power to the controller and the actuator to ensure the normal operation of the system.

2. A state code driven mooring system hardware-in-the-loop simulation system according to claim 1, characterized in that: The real-time target machine collects the status of the actuators and uses it as the input of the mooring system model.

3. The state code driven hardware-in-the-loop simulation system for an anchoring system according to claim 1, characterized in that: The simulation model host computer is connected to the real-time target machine through a network cable. The real-time target machine, tester, real controller and power supply are connected through a CAN network. The actuator and the real controller are connected through an AD module and serial port communication.

4. The state code driven hardware-in-the-loop simulation system for an anchoring system according to claim 1, characterized in that: The communication module model includes a data interaction module and a virtual-reality interaction module; The data interaction module receives the status code and control instructions sent by the real controller and sends them to the virtual-real interaction module. It receives the results of the mooring system model calculation and sends them to the real controller. It receives the status information of the actuator and sends it to the mooring system model through the virtual-real interaction module. The virtual-reality interaction module parses the corresponding action status according to the status code and sends it to the mooring system model.

5. A state code driven mooring system semi-physical simulation control flow segmented synchronization method, characterized in that: The implementation of the hardware-in-the-loop simulation system according to any one of claims 1 to 4 includes the following steps: (1) Before starting the semi-physical simulation, the real controller completes the control program download and verification, and parameter configuration; (2) Compile and download the simulation model in the simulation model host computer to the real-time target machine; (3) When running the simulation, the tester sends an activation command to the battery and an automatic depth setting start command to the real controller; (4) The real controller sends the control status code and control instructions to the real-time target machine according to the control sequence, and observes whether the simulation model host computer can receive the control status code and control instructions of the real controller, wherein the control status code is the identification code of the different stages of the mooring system, including the separation status code, the fixed depth status code, and the locking status code. If it can be received, go to step (5); if not, go to step (6); (5) The real-time target machine inputs the control status code and control instructions of the real controller into the platform subsystem model, the gravity anchor subsystem model, and the cable storage drum subsystem model, updates the output results through model calculation, and enters step (7); (6) Locate the fault location of the real controller program through the current control status code, modify the real controller program, perform communication debugging, and return to step (3); (7) Determine whether the control sequence of the real controller is completed. If it is completed, save the real controller data and save the real-time target machine data through the simulation model host computer. If it is not completed, return to step (4) until it is completed; (8) After completion, turn off the power of the real controller and the real-time target machine.

6. A state code driven mooring system hardware-in-the-loop simulation control flow segmented synchronization method according to claim 5, characterized in that: In the step (1), the download and verification of the real controller program is completed through the tester.

7. The state code driven mooring system hardware-in-the-loop simulation control flow segmented synchronization method according to claim 5, characterized in that: In the step (1), after the real controller program is downloaded and verified, the real controller is restarted to perform parameter configuration. The parameter configuration includes downloading specific parameters to the real controller through the tester, completing parameter binding and reading back, and confirming whether the read-back parameters are consistent with the binding parameters. If they are consistent, the parameter configuration is considered to be completed.

8. The state code driven mooring system hardware-in-the-loop simulation control flow segmented synchronization method according to claim 5, characterized in that: In the step (2), before downloading and compiling the simulation model, the simulation model host computer is connected to the network of the real-time target machine.

9. The state code driven mooring system hardware-in-the-loop simulation control flow segmented synchronization method according to claim 5, characterized in that: After the control sequence of the real controller is completed, the control status code is analyzed based on the data saved by the real controller to see whether it is consistent with the action of the actuator, and the data saved by the real controller is compared with the real-time target machine data saved by the simulation model host computer to see whether they are consistent, and a test report is generated.

10. The state code driven mooring system hardware-in-the-loop simulation control flow segmented synchronization method according to claim 5, characterized in that: The output results in step (5) include a cable tension signal, a cable length signal, a platform depth signal, and a gravity anchor depth signal.