A method and device for maintaining working condition data of a semi-physical simulation system
By acquiring and saving control system operating condition data in a hardware-in-the-loop simulation system, generating report files, and copying them to the restoration configuration file, the problem of not being able to save and restore operating data and status in existing technologies is solved. This enables rapid state initialization, improves training and testing efficiency, and enhances the reliability and safety of the control system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUPCON TECH CO LTD
- Filing Date
- 2024-12-06
- Publication Date
- 2026-06-09
Smart Images

Figure CN122172612A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hardware-in-the-loop (HIL) simulation technology, and more particularly to a method and apparatus for maintaining operating condition data of a HIL simulation system. Background Technology
[0002] Hardware-in-the-loop (HIL) simulation systems play an important role in operation training and scientific experiments because they incorporate physical control hardware and simulation instrument hardware, making operation closer to actual production. While control systems can save instantaneous and historical data of tag numbers, they cannot save PID parameters of control loops, cannot simultaneously save different output values of the same internal parameters of the same control program function block, and cannot restore the current real controller operating state and data initialization to the state at a certain historical moment.
[0003] Therefore, most hardware-in-the-loop (HIL) simulation systems currently can only use virtual software controllers as control systems; or they can use real control systems, but if a previous operating state needs to be restored, the experiment can only be restarted from the current state, and it is impossible to restore the current state to any desired historical state (such as shutdown or accident) to continue operation. This results in several problems: in training, trainees cannot grasp the hardware layout and working principles of real control systems, and cannot quickly and repeatedly experience various complex production situations in real production, leading to unsatisfactory training results; in scientific experiments, researchers cannot quickly locate a previously set stable scenario and conduct repeatable experiments, increasing experimental time and reducing experimental efficiency. Summary of the Invention
[0004] The purpose of this invention is to propose a method and apparatus for maintaining operational data of a hardware-in-the-loop (HIL) system, utilizing the existing functions and characteristics of the control system without increasing hardware investment. This allows for the configurable saving and restoration of operational data and states at any given time within the control system, enabling rapid initialization to a desired state in HIL systems and scientific experiments. The technical solution is as follows:
[0005] A method for maintaining operating condition data of a hardware-in-the-loop simulation system includes:
[0006] Based on the set event triggering conditions, acquire and save the current control system operating condition data and generate report files;
[0007] Copy and paste the data generated in the report file into the corresponding set value in the restoration configuration file;
[0008] The recovery tool generates a set of operating condition data for each of the recovery configuration files;
[0009] When it is necessary to restore the working condition data, the restoration tool writes the data values in the restoration configuration file into the control system in a preset order according to the received instructions, and prompts the restoration result.
[0010] Optionally, the operating condition data includes at least the analog output point number value, the write-out point number switch status, the control loop PID parameters, the interlock status, the custom analog quantity number, the complex control loop status, the control loop setpoint, and the output value.
[0011] Optionally, the restoration configuration file is in CSV table format, and the restoration configuration file data includes at least tag number items and set values, with time intervals set between the tag number items.
[0012] Optionally, when restoring complex control loops, the restoration configuration file also includes ensuring that the order and time interval of the tag items follow the switching specifications of the control loop.
[0013] Optionally, the report file is consistent with the content of the restoration configuration file. The report file data includes at least a DCS description item and a DCS read value. When the DCS description items are the same, the DCS read values can be set with different tag information.
[0014] Optionally, the recovery tool includes at least a data recovery program and a working condition display page.
[0015] The data recovery program includes at least a communication protocol client, a runtime logic controller, and a command parsing system, used to write the data in the recovery configuration file to the control system via the communication protocol, thereby resetting the operating data of the control system.
[0016] The operating condition display page is used to display the operating condition name generated corresponding to each of the restoration configuration files, and is also used to receive instructions to write the data in the restoration configuration file corresponding to the operating condition name into the control system in sequence, and to prompt the restoration result.
[0017] Optionally, the communication protocol adopts the OPC communication protocol.
[0018] A device for maintaining operating condition data of a hardware-in-the-loop simulation system, comprising:
[0019] The acquisition module is used to acquire and save the current control system operating condition data and generate report files based on the set event triggering conditions;
[0020] The generation module is used to copy and paste the data generated in the report file to the corresponding set value in the restoration configuration file, and generate a working condition data information for each restoration configuration file;
[0021] The recovery module is used to write the data values in the recovery configuration file into the control system in a preset order according to the received instructions when the working condition data needs to be recovered, and to display the recovery result.
[0022] An electronic device includes a memory and a processor, the memory storing computer-readable instructions, which, when executed by the processor, cause the processor to perform a method for maintaining hardware-in-the-loop system operating data as described above.
[0023] A storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform a method for maintaining hardware-in-the-loop system operating condition data as described above.
[0024] Compared with the prior art, this application has the following beneficial effects:
[0025] 1. Overcome the problem that control systems cannot save and restore operating data and status, enabling trainees to master the hardware layout, working principle and faults of real control systems when conducting hardware-in-the-loop simulation training, and quickly restore and experience various complex production situations in real production, enriching training content and improving training efficiency.
[0026] 2. Overcomes the problem that the control system cannot save and restore operating data and status, enabling researchers to quickly locate a previously set stable scenario and conduct repeatable experiments in semi-physical simulation scientific experiments, reducing experimental time and improving experimental efficiency;
[0027] 3. This invention is based on the innovative concept of functional integration and the improvement of functional programs on existing software. It does not require additional hardware development investment, and the developed program is easy to install and operate.
[0028] 4. This invention can be applied not only to semi-physical simulation systems and scientific experiments of control systems, but also to data debugging and control logic verification of control systems before production, thereby improving the reliability and safety of control system operation. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0030] Figure 1 A flowchart illustrating a method for maintaining operating condition data of a hardware-in-the-loop simulation system, provided in an embodiment of the present invention;
[0031] Figure 2 This is a schematic diagram of the controller operating condition data transmission provided in an embodiment of the present invention;
[0032] Figure 3 This invention provides a schematic diagram illustrating the principle of restoring operating condition data of a complex control loop in a hardware-in-the-loop simulation system.
[0033] Figure 4 This is a flowchart illustrating the operation of saving and restoring operational data in a hardware-in-the-loop simulation system, as provided in this embodiment of the invention.
[0034] Figure 5 A schematic diagram of a hardware-in-the-loop simulation system operating condition data maintenance device provided in this application embodiment;
[0035] Figure 6 This is a schematic diagram of a computer device provided in an embodiment of this application. Detailed Implementation
[0036] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0037] Before proceeding, some concepts will be introduced below to facilitate understanding of the technical solutions provided by this invention.
[0038] DCS: Distributed Control System, also known as a distributed control system or a centralized control system.
[0039] Operating conditions: The operating state, real-time data, PID parameters of control loops, interlocking status, etc. of a simulation system (a technique that uses models to reproduce the essential processes that occur in a real system) at a certain moment.
[0040] Operating status saving: Saves the system's real-time data and operating status at a certain moment.
[0041] Operating condition restoration: Restore the previously saved operating conditions, restoring the system to its operating state and data at that point in time.
[0042] Hardware-in-the-loop simulation: A simulation system that uses virtual simulation and actual hardware devices.
[0043] Control system: A control system that includes actual controllers and control hardware.
[0044] See Figure 2In a hardware-in-the-loop (HIL) simulation system, the input data of the real DCS controller includes the physical simulation instruments and the process mathematical model. This data is given by external input and does not need to be saved. What needs to be saved and restored are the data output from the real DCS controller to the physical simulation sensors and the process mathematical model, the instructions executed in the monitoring system, and the control logic states and parameters. The problem this invention aims to solve is how to save the specific parameters of the current DCS running program and, after issuing a DCS data restoration command, how the DCS data restoration tool writes the previously saved data back to the DCS controller via a communication protocol, thus restoring the DCS data.
[0045] Example 1
[0046] like Figure 1 As shown in the embodiment of the present invention, a method for maintaining the operating condition data of a hardware-in-the-loop simulation system includes the following steps:
[0047] Step S101: Based on the set event triggering conditions, acquire and save the current control system operating condition data and generate a report file.
[0048] The operating data includes analog point number values, write point number switch status, control loop PID parameters, interlock status, custom analog quantity number, complex control loop status, control loop setpoints and output values, etc.
[0049] Step S102: Copy and paste the data generated in the report file to the corresponding setting value in the restoration configuration file.
[0050] The recovery configuration file is in CSV (comma-separated) table format, used to record all DCS data that needs to be saved during the operating conditions. The table content includes at least tag number items and set values, and the time interval between the tag number items can be set. See Table 1 for details.
[0051] 0PC item Setting value Main control circuit.AUTO Secondary control circuit.MV Main control circuit.AUTO @wait Auxiliary control loop.CAS Position number 3, VALUE Position number 4.OUT
[0052] Table 1
[0053] The table shows the following columns: The first column is the OPC item name (OPC: a communication protocol developed specifically for industrial automation software based on Microsoft Object Linking and Embedding technology), which is the tag number item to be written to the DCS via the OPC communication protocol. The second column is the setpoint (the setpoint value that needs to be restored for the DCS tag number item, derived from data collected from DCS reports). To modify the time interval between two write commands, enter `@wait` in the OPC item name column and the desired interval time in the setpoint column. In the table: `.AUTO` indicates the DCS function block automatic mode; `.CAS` indicates the DCS function block cascade mode; `.MV` indicates the DCS function block operation output; `.OUT` indicates the real-time value of the output quantity; `.VALUE` indicates the real-time value of the user-defined variable. `.AUTO=1` is automatic, `.AUTO=0` is manual, `.CAS=1` is cascade enabled, and `.CAS=0` is cascade disabled.
[0054] The report file is identical to the restoration configuration file, and its content includes at least a DCS description item and a DCS read value, as shown in Table 2.
[0055] DCS item DCS Read Values Main control circuit.AUTO {Bit number 1.VALUE} Secondary control circuit.MV {Secondary Control Circuit.MV} Main control circuit.AUTO {Main Control Circuit.SWAM} @wait {bit number 2.VALUE} Auxiliary control loop.CAS {Sub-control loop.SWSV} Position number 3, VALUE {Placeholder 3.VALUE} Position number 4.OUT {Place number 4.OUT}
[0056] Table 2
[0057] In this embodiment, the Excel report of the control system is used to realize the instantaneous data acquisition and storage of the control system. The first column of the report is the DCS description item, the content and order of which are consistent with the OPC items in the restoration configuration file, and is a text description; the second column is the DCS read value, that is, the DCS configuration tag number information value. In the table, .SWAM represents the manual / automatic selection switch of the DCS function block; .SWSV represents the internal / external given selection of the DCS function block. Using the report to realize the configuration-based data saving, it is possible to set different tag number information in the corresponding second column of DCS read value for the same DCS description item in different locations, and different information values will be obtained during data acquisition. For example, different DCS information can be set for the "main control loop.AUTO" description item in different locations in the table to obtain different read values.
[0058] Step S103: The recovery tool generates a set of operating condition data for each of the recovery configuration files.
[0059] The recovery tool includes at least a data recovery program and a status display page. The data recovery program is used to write data from the recovery configuration file to the control system via a communication protocol, thereby resetting the control system's status data. The data recovery program includes at least a communication protocol client, a runtime logic controller, and a command parsing system. The communication protocol client is mainly used to collect data that needs to be written to the actual controller; the runtime logic controller is mainly used to initiate each recovery action sequentially according to a preset control logic order after receiving a recovery trigger command; the command parsing system is mainly used to parse the recovery commands and convert them into commands that the kernel system can understand. In this embodiment, the communication protocol used is the OPC communication protocol.
[0060] The operating condition display page is used to display the operating condition name generated corresponding to each of the restoration configuration files, and is also used to receive instructions to write the data in the restoration configuration file corresponding to the operating condition name into the control system in sequence, as shown below.
[0061]
[0062] Step S104: When it is necessary to restore the working condition data, the restoration tool writes the data values in the restoration configuration file into the control system in a preset order according to the received instructions, and prompts the restoration result.
[0063] In an optional embodiment, for the restoration of complex control loops, the arrangement order and time interval of the tag number items in the restoration configuration file must follow the control loop switching specifications. For example, based on the inherent logical characteristics of DCS function blocks: control loops can only write values to valve outputs in manual mode; control loops can only be cascaded in automatic mode, and the main control can only be set to automatic mode after the secondary control is cascaded; split-range loops can only have their outputs set after the valve is set to automatic mode, see details... Figure 3 Therefore, to achieve accurate and disturbance-free restoration of complex control loop data states, the writing order of each state of the complex loop needs to be standardized during the restoration process. Considering that the control system requires a certain time interval during the switching of control loops and parameter input, the order and interval of complex control tag items need to be specially designed when creating the restoration configuration file: for example, to restore a cascade control loop, the required output value of the secondary control loop needs to be written when the main and secondary control loops are in manual mode, then the secondary control loop is switched to cascade mode when it is in automatic mode, and finally the main control loop is switched to automatic mode.
[0064] In one optional embodiment, the operational flow design for maintaining the operating condition data of a hardware-in-the-loop simulation system is as follows, see details below. Figure 4 .
[0065] Step 1: Save operating conditions
[0066] When the hardware-in-the-loop simulation system is running:
[0067] S1-1: Click the "Save Operating Status" button in the monitoring screen;
[0068] S1-2: The DCS reporting software automatically saves the current DCS data and generates an Excel report based on the set event trigger conditions.
[0069] S1-3: Copy and paste the data generated in the Excel report into the corresponding settings in the restoration configuration file;
[0070] S1-4: The recovery tool automatically generates a working condition information.
[0071] Step 2: Restoring Operating Conditions
[0072] Open the data restoration tool, select the existing operating condition, double-click to issue the restoration command, and the restoration tool will automatically write the data in the operating condition into the DCS control system. At this time, the data in the current DCS controller and monitoring screen will be overwritten and restored, realizing the restoration of the operating condition.
[0073] Example 2
[0074] This application provides a device capable of maintaining the operating condition data of a hardware-in-the-loop simulation system as described in Embodiment 1, such as... Figure 5 As shown, it includes:
[0075] The acquisition module 501 is used to acquire and save the current control system operating condition data and generate report files according to the set event triggering conditions;
[0076] The generation module 502 is used to copy and paste the data generated in the report file to the corresponding set value in the restoration configuration file, and generate a working condition data information for each restoration configuration file;
[0077] The recovery module 503 is used to write the data values in the recovery configuration file into the control system in a preset order according to the received instructions when the working condition data needs to be recovered, and to prompt the recovery result.
[0078] Example 3
[0079] This application also provides a computer device, including a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor performs a method for maintaining the operating condition data of a hardware-in-the-loop simulation system as described above.
[0080] Example 4
[0081] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform a method for maintaining the operating condition data of a hardware-in-the-loop simulation system as described above.
[0082] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments. Even if various changes are made to the present invention, if these changes fall within the scope of the claims of the present invention and their equivalents, they shall still fall within the protection scope of the present invention.
Claims
1. A method for maintaining operating condition data of a hardware-in-the-loop simulation system, characterized in that, include: Based on the set event triggering conditions, acquire and save the current control system operating condition data and generate report files; Copy and paste the data generated in the report file into the corresponding set value in the restoration configuration file; The recovery tool generates a set of operating condition data for each of the recovery configuration files; When it is necessary to restore the working condition data, the restoration tool writes the data values in the restoration configuration file into the control system in a preset order according to the received instructions, and prompts the restoration result.
2. The method for maintaining operating condition data of a hardware-in-the-loop simulation system according to claim 1, characterized in that, The operating data includes at least the analog point tag number value, the write point tag number switch status, the control loop PID parameters, the interlock status, the custom analog quantity tag number, the complex control loop status, the control loop set value, and the output value.
3. The method for maintaining operating condition data of a hardware-in-the-loop simulation system according to claim 1, characterized in that, The restoration configuration file is in CSV table format. The restoration configuration file data includes at least tag number items and set values, and time intervals can be set between the tag number items.
4. The method for maintaining operating condition data of a hardware-in-the-loop simulation system according to claim 3, characterized in that, When restoring complex control loops, the restoration configuration file also includes ensuring that the order and time interval of the tag items follow the switching specifications of the control loop.
5. The method for maintaining operating condition data of a hardware-in-the-loop simulation system according to claim 1, characterized in that, The report file is consistent with the content of the restoration configuration file. The report file data includes at least a DCS description item and a DCS read value. When the DCS description items are the same, the DCS read value can be set with different tag information.
6. The method for maintaining operating condition data of a hardware-in-the-loop simulation system according to claim 1, characterized in that, The recovery tool includes at least a data recovery program and a working status display page; The data recovery program includes at least a communication protocol client, a running logic controller, and a command parsing system, which is used to write the data in the recovery configuration file to the control system through the communication protocol to realize the reset of the control system's operating condition data. The operating condition display page is used to display the operating condition name generated corresponding to each of the restoration configuration files, and is also used to receive instructions to write the data in the restoration configuration file corresponding to the operating condition name into the control system in sequence, and to prompt the restoration result.
7. The method for maintaining operating condition data of a hardware-in-the-loop simulation system according to claim 6, characterized in that, The communication protocol used is the OPC communication protocol.
8. A device for maintaining operating condition data of a hardware-in-the-loop simulation system, characterized in that, include: The acquisition module is used to acquire and save the current control system operating condition data and generate report files based on the set event triggering conditions; The generation module is used to copy and paste the data generated in the report file to the corresponding set value in the restoration configuration file, and generate a working condition data information for each restoration configuration file; The recovery module is used to write the data values in the recovery configuration file into the control system in a preset order according to the received instructions when the working condition data needs to be recovered, and to display the recovery result.
9. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores computer-readable instructions that, when executed by the processor, cause the processor to perform a method for maintaining the operating data of a hardware-in-the-loop simulation system as described in any one of claims 1 to 7.
10. A storage medium storing computer-readable instructions, characterized in that, When the computer-readable instructions are executed by one or more processors, the one or more processors perform the method for maintaining the operating data of a hardware-in-the-loop simulation system as described in any one of claims 1 to 7.