[go: up one dir, main page]

CN111381980B - Interconnection system and method for hybrid simulation - Google Patents

Interconnection system and method for hybrid simulation Download PDF

Info

Publication number
CN111381980B
CN111381980B CN202010088845.6A CN202010088845A CN111381980B CN 111381980 B CN111381980 B CN 111381980B CN 202010088845 A CN202010088845 A CN 202010088845A CN 111381980 B CN111381980 B CN 111381980B
Authority
CN
China
Prior art keywords
simulation
data
software
thread
adapter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010088845.6A
Other languages
Chinese (zh)
Other versions
CN111381980A (en
Inventor
张明恩
陈伟
彭健
余海鸣
陆营波
钱晓超
陆志沣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Institute of Electromechanical Engineering
Original Assignee
Shanghai Institute of Electromechanical Engineering
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Institute of Electromechanical Engineering filed Critical Shanghai Institute of Electromechanical Engineering
Priority to CN202010088845.6A priority Critical patent/CN111381980B/en
Publication of CN111381980A publication Critical patent/CN111381980A/en
Application granted granted Critical
Publication of CN111381980B publication Critical patent/CN111381980B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B17/00Systems involving the use of models or simulators of said systems
    • G05B17/02Systems involving the use of models or simulators of said systems electric
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides an interconnection system and method for hybrid simulation, which comprises the following steps: deploying agent software in a first process, and deploying adapter software in a second process; the adapter software is embedded in a control program of the guidance semi-physical simulation system in a thread form, the original control program of the guidance semi-physical simulation system is used as a main thread, and the adapter software thread is used as a sub-thread to cooperatively control the semi-physical simulation system; the simulation agent software and the adapter software realize communication and data interaction through a shared memory; the adapter software thread and the main thread are in the same process, a simulation command is transmitted to the main thread through a message and a global variable interaction, and the state of a simulation system is obtained from the main thread through the global variable; the adapter software thread completes the read-write of the simulation data through the reflective memory I/O operation. The invention can realize the joint simulation of the semi-physical simulation system and other systems, and keep the original state of the semi-physical simulation system as much as possible.

Description

Interconnection system and method for hybrid simulation
Technical Field
The invention relates to the field of simulation interconnection, in particular to an interconnection system and method for hybrid simulation.
Background
With the continuous development of the technology, the distributed simulation interconnection technology is gradually and widely applied. Distributed joint simulation often employs middleware technology. Common interconnect technologies include DIS, HLA, TENA, and like structures. The semi-physical simulation system is a system of a 'strong real-time layer', and is generally realized by adopting an RTX (real time X) or Vxworks system. Patent document CN108008644A discloses a semi-physical simulation system, which includes a target system simulation model built based on software, an external excitation unit, and an external physical device, and through a custom network bus, the simulation model is connected with the external physical device to perform real input to the external physical device, and the correctness of physical functions and interfaces is verified by virtual excitation of a simulation computer, the simulation model performs data simulation input through use case injection software, or is excited through simulation pieces of each external system, and for the verification environment of the semi-physical simulation system, the external excitation unit includes a use case injection unit and a fault injection unit, and control and fault simulation of the external physical device are realized through the external excitation unit.
When the method is used for joint simulation with a semi-physical simulation system, joint simulation interconnection software suitable for hybrid simulation needs to be developed.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide an interconnection system and method for hybrid simulation.
According to the invention, the interconnection system for hybrid simulation comprises: deploying agent software in a first process and deploying adapter software in a second process;
the adapter software is embedded in a control program of the guidance semi-physical simulation system in a thread form, the original control program of the guidance semi-physical simulation system is used as a main thread, and the adapter software thread is used as a sub-thread to cooperatively control the semi-physical simulation system;
the simulation agent software and the adapter software realize communication and data interaction through a shared memory;
the adapter software thread and the main thread are in the same process, a simulation command is transmitted to the main thread through a message and a global variable interaction, and the state of a simulation system is obtained from the main thread through the global variable; and the adapter software thread finishes reading and writing of the simulation data through the reflective memory I/O operation.
Preferably, the agent software monitors the DDS data stream through the listener, and when receiving the DDS data, triggers related messages, converts the DDS data into a simulation command and simulation data, and writes the simulation command and the simulation data into the shared memory.
Preferably, a timer is arranged in the agent software, and periodically monitors the activity of the adapter software operating the shared memory; when the agent software monitors the simulation command and the simulation data written into the shared memory by the adapter software, the simulation command and the simulation data are converted into DDS data and sent to other systems.
Preferably, a timer is arranged in the adapter software, periodically monitors the activity of the simulation agent software operating the shared memory, and simultaneously monitors the state and data of the semi-physical simulation system; and when the set conditions are met, triggering the related modules to complete corresponding operations, and realizing bridging of the simulation agent software and the semi-physical simulation system.
Preferably, the timer periodically monitors the operation activity of the simulation agent software on the shared memory, simultaneously monitors the state and data of the semi-physical simulation system, and simultaneously judges whether the condition of uploading real-time data is met; and when the relevant signals are monitored, sending corresponding messages, and mapping the relevant functions to finish uploading and downloading of the simulation data.
Preferably, when downloading the simulation data, the adapter software reads the data from the shared memory, performs message conversion, and then writes the data into the reflective memory; and when the simulation command is downloaded, the adapter sends the simulation command to the semi-physical simulation main control program in a message form.
Preferably, when the simulation data and the simulation command are uploaded, the adapter collects the state and the data information of the semi-physical simulation in real time and transmits the state and the data information to the agent software through the shared memory.
Preferably, each simulation engine in the interconnected system for hybrid simulation drives each system simulation engine by using a homologous timing signal output by an external GPS time system server.
The invention provides an interconnection method for hybrid simulation, which comprises the following steps: deploying agent software in a first process and deploying adapter software in a second process;
the adapter software is embedded in a control program of the guidance semi-physical simulation system in a thread form, the original control program of the guidance semi-physical simulation system is used as a main thread, and the adapter software thread is used as a sub-thread to cooperatively control the semi-physical simulation system;
the simulation agent software and the adapter software realize communication and data interaction through a shared memory;
the adapter software thread and the main thread are in the same process, a simulation command is transmitted to the main thread through a message and a global variable interaction, and the state of a simulation system is obtained from the main thread through the global variable; the adapter software thread completes the read-write of the simulation data through the reflective memory I/O operation.
Compared with the prior art, the invention has the following beneficial effects:
1. the interconnection method for hybrid simulation provided by the invention can keep the original state of the semi-physical simulation system as far as possible only by carrying out adaptive reconstruction on the semi-physical simulation system;
2. the invention adopts a time synchronization mode based on the reflective memory, thereby ensuring the correctness of time service;
3. the invention solves the problem of interconnection between a heterogeneous system and a semi-physical simulation system, and provides a new thought and method for interconnection of other systems.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
FIG. 1 is a schematic overview of a semi-physical simulation interconnect software framework;
FIG. 2 is a process flow of the agent software DDS listening message function;
FIG. 3 is a proxy software timer message function process flow;
FIG. 4 is a flow diagram of a proxy software upload response function;
FIG. 5 is an adapter timer message function process;
FIG. 6 is a flow chart of an adapter download response function;
FIG. 7 is a flow diagram of an adapter upload response function;
fig. 8 is a schematic diagram of time synchronization.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will aid those skilled in the art in further understanding the present invention, but are not intended to limit the invention in any manner. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the invention.
This example takes a certain semi-physical simulation interconnected system as an example.
As in FIG. 1, the agent software and adapter are deployed in two processes. The process of the agent software completes the ordering/distribution of the data through the DDS. The adapter software is embedded into a control program of the guidance semi-physical simulation system in a thread form, the original control program of the guidance semi-physical simulation system is used as a main thread, the adapter thread is used as a sub-thread, and the two threads cooperate to complete control over the semi-physical simulation system. The simulation agent software and the adapter software realize communication and data interaction functions through a shared memory. The adapter thread and the main thread are in the same process and interact with the global variable through messages, wherein the simulation command is transmitted to the main thread through the messages, and the state of the simulation system is obtained from the main thread through the global variable; the adapter completes the read-write of the simulation data by reflecting the memory I/O operation.
As shown in fig. 2, the agent software monitors the DDS data stream through the Listener, and when receiving the DDS data, triggers related messages, converts the DDS data into simulation commands and data, and writes the simulation commands and data into the shared memory. As shown in fig. 3, a timer is set in the proxy software to periodically listen for the activity of the adapter operating the shared memory. As shown in fig. 4, when the agent software monitors the data written into the shared memory by the adapter software, the agent software converts the data into DDS data and sends the DDS data to other systems.
As shown in fig. 5, a timer built in the adapter periodically monitors the operation activity of the simulation agent on the shared memory, and simultaneously monitors the state and data of the semi-physical simulation system, and simultaneously determines whether the conditions for uploading real-time data are satisfied. When the timer monitors relevant signals (flag bits of data ready, data changed, command ready, state ready, and the like), corresponding messages are sent, and corresponding functions are mapped to complete uploading and downloading of data. As shown in fig. 6, when downloading emulation data, the adapter reads data from the shared memory, performs message conversion, and then writes the data into the reflective memory; and when the command is downloaded, the adapter sends the simulation command to the semi-physical simulation main control program in a message form. As shown in fig. 7, when uploading simulation data and commands, the adapter collects the status and data information of the semi-physical simulation in real time and transfers the status and data information to the agent software through the shared memory.
As shown in fig. 8, each system drives each system simulation engine by using the homologous and high-precision timing signals output by the external GPS time system server, so that the time synchronization of each system can be directly ensured.
On the basis of the interconnection system for hybrid simulation, the invention also provides an interconnection method for hybrid simulation, which comprises the following steps: deploying agent software in a first process, and deploying adapter software in a second process;
the adapter software is embedded in a control program of the guidance semi-physical simulation system in a thread form, the original control program of the guidance semi-physical simulation system is used as a main thread, and the adapter software thread is used as a sub-thread to cooperatively control the semi-physical simulation system;
the simulation agent software and the adapter software realize communication and data interaction through a shared memory;
the adapter software thread and the main thread are in the same process, a simulation command is transmitted to the main thread through a message and a global variable interaction, and the state of a simulation system is obtained from the main thread through the global variable; the adapter software thread completes the read-write of the simulation data through the reflective memory I/O operation.
Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, units provided by the present invention as pure computer readable program code, the system and its various devices, modules, units provided by the present invention can be fully implemented by logically programming method steps in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system and various devices, modules and units thereof provided by the invention can be regarded as a hardware component, and the devices, modules and units included in the system for realizing various functions can also be regarded as structures in the hardware component; means, modules, units for realizing various functions can also be regarded as structures in both software modules and hardware components for realizing the methods.
The foregoing description has described specific embodiments of the present invention. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.

Claims (9)

1. An interconnect system for hybrid simulation, comprising: deploying agent software in a first process and deploying adapter software in a second process;
the adapter software is embedded into a control program of the guidance semi-physical simulation system in a thread form, the original control program of the guidance semi-physical simulation system is used as a main thread, and the adapter software thread is used as a sub-thread to cooperatively control the semi-physical simulation system;
the simulation agent software and the adapter software realize communication and data interaction through a shared memory;
the adapter software thread and the main thread are in the same process, a simulation command is transmitted to the main thread through a message and a global variable interaction, and the state of a simulation system is obtained from the main thread through the global variable; and the adapter software thread finishes reading and writing of the simulation data through the reflective memory I/O operation.
2. The interconnected system for hybrid simulation of claim 1, wherein the agent software monitors DDS data stream through a listener, and when receiving DDS data, triggers related messages to convert DDS data into simulation commands and simulation data, and writes the simulation commands and simulation data into the shared memory.
3. The interconnect system for hybrid simulation of claim 2, wherein a timer is provided in the agent software to periodically listen for activities of the adapter software to operate the shared memory; when the agent software monitors the simulation command and the simulation data written into the shared memory by the adapter software, the simulation command and the simulation data are converted into DDS data and sent to other systems.
4. The interconnected system for hybrid simulation of claim 3, wherein a timer is provided in the adapter software to periodically monitor the activities of the simulation agent software operating the shared memory while monitoring the state and data of the semi-physical simulation system; and when the set conditions are met, triggering the related modules to complete corresponding operations, and realizing bridging of the simulation agent software and the semi-physical simulation system.
5. The interconnected system for hybrid simulation of claim 4, wherein the timer periodically monitors the operation activities of the simulation agent software on the shared memory, and simultaneously monitors the state and data of the semi-physical simulation system, and simultaneously judges whether the conditions for uploading real-time data are met; and when the relevant signals are monitored, sending corresponding messages, and mapping the relevant functions to finish the uploading and the downloading of the simulation data.
6. The interconnect system for hybrid simulation of claim 5, wherein when downloading simulation data, the adapter software reads data from the shared memory, performs message conversion, and then writes to the reflective memory; and when the simulation command is downloaded, the adapter sends the simulation command to the semi-physical simulation main control program in a message form.
7. The interconnected system for hybrid simulation of claim 5, wherein the adapter collects semi-physical simulation status and data information in real time and passes it to the agent software via the shared memory as simulation data and simulation commands are uploaded.
8. The interconnected system for hybrid simulation of claim 1, wherein each simulation engine in the interconnected system for hybrid simulation drives each system simulation engine with a homologous timing signal output by an external GPS time system server.
9. An interconnect method for hybrid simulation, comprising: deploying agent software in a first process, and deploying adapter software in a second process;
the adapter software is embedded into a control program of the guidance semi-physical simulation system in a thread form, the original control program of the guidance semi-physical simulation system is used as a main thread, and the adapter software thread is used as a sub-thread to cooperatively control the semi-physical simulation system;
the simulation agent software and the adapter software realize communication and data interaction through a shared memory;
the adapter software thread and the main thread are in the same process, a simulation command is transmitted to the main thread through a message and a global variable interaction, and the state of a simulation system is obtained from the main thread through the global variable; the adapter software thread completes the read-write of the simulation data through the reflective memory I/O operation.
CN202010088845.6A 2020-02-12 2020-02-12 Interconnection system and method for hybrid simulation Active CN111381980B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010088845.6A CN111381980B (en) 2020-02-12 2020-02-12 Interconnection system and method for hybrid simulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010088845.6A CN111381980B (en) 2020-02-12 2020-02-12 Interconnection system and method for hybrid simulation

Publications (2)

Publication Number Publication Date
CN111381980A CN111381980A (en) 2020-07-07
CN111381980B true CN111381980B (en) 2023-04-07

Family

ID=71216973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010088845.6A Active CN111381980B (en) 2020-02-12 2020-02-12 Interconnection system and method for hybrid simulation

Country Status (1)

Country Link
CN (1) CN111381980B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112130467B (en) * 2020-08-27 2021-12-07 中国人民解放军军事科学院国防科技创新研究院 Semi-physical simulation system and method based on tactical frontier network
CN112147914A (en) * 2020-09-01 2020-12-29 上海机电工程研究所 Distributed simulation data online monitoring method and system based on reflective memory network
CN113110108A (en) * 2021-04-28 2021-07-13 北京星途探索科技有限公司 Implementation method for guaranteeing real-time performance of semi-physical simulation by three-layer structure
CN113360280B (en) * 2021-06-02 2023-11-28 西安中锐创联科技有限公司 Simulation curve display method based on multithread operation and dynamic global variable processing
US20250124182A1 (en) 2023-10-13 2025-04-17 Shanghai Tosun Technology Ltd. Vehicle model simulation performance optimization system and computer device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6477580B1 (en) * 1999-08-31 2002-11-05 Accenture Llp Self-described stream in a communication services patterns environment
US6842906B1 (en) * 1999-08-31 2005-01-11 Accenture Llp System and method for a refreshable proxy pool in a communication services patterns environment
US7289964B1 (en) * 1999-08-31 2007-10-30 Accenture Llp System and method for transaction services patterns in a netcentric environment
CN102460393A (en) * 2009-05-01 2012-05-16 思杰系统有限公司 Systems and methods for establishing a cloud bridge between virtual storage resources
CN105074671A (en) * 2013-03-27 2015-11-18 英特尔公司 Method and system for detecting concurrent programming errors in kernel modules and device drivers
CN106775867A (en) * 2016-12-14 2017-05-31 西北工业大学 Flight simulation system under Windows operating system environment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7822592B2 (en) * 2004-10-18 2010-10-26 Manthatron-Ip Limited Acting on a subject system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6477580B1 (en) * 1999-08-31 2002-11-05 Accenture Llp Self-described stream in a communication services patterns environment
US6842906B1 (en) * 1999-08-31 2005-01-11 Accenture Llp System and method for a refreshable proxy pool in a communication services patterns environment
US7289964B1 (en) * 1999-08-31 2007-10-30 Accenture Llp System and method for transaction services patterns in a netcentric environment
CN102460393A (en) * 2009-05-01 2012-05-16 思杰系统有限公司 Systems and methods for establishing a cloud bridge between virtual storage resources
CN105074671A (en) * 2013-03-27 2015-11-18 英特尔公司 Method and system for detecting concurrent programming errors in kernel modules and device drivers
CN106775867A (en) * 2016-12-14 2017-05-31 西北工业大学 Flight simulation system under Windows operating system environment

Also Published As

Publication number Publication date
CN111381980A (en) 2020-07-07

Similar Documents

Publication Publication Date Title
CN111381980B (en) Interconnection system and method for hybrid simulation
CN111897300B (en) OPC-UA-based software/hardware joint simulation system and self-adaptive coordination method thereof
US9323823B2 (en) Method for operating a redundant automation system
KR101856263B1 (en) A system for real time simulation of the environment of an aircraft engine
CN110838961B (en) General aviation bus message scheduling system
CN111103810B (en) Simulation test method of spacecraft GNC system based on prototype digital twin architecture
JP2017062297A (en) Simulation device, module thereof, simulation method, and program
CN115333988A (en) Test method, system and equipment for rocket interstage communication signals
CN112069122B (en) A universal two-by-two-take-two computer device and its implementation method
US20130311695A1 (en) Flexray Gateway and Method for Operating a Flexray Gateway
CN105740039A (en) RTX and VMIC based GNC real-time simulation system construction method
US12405842B2 (en) Apparatus and method for synchronizing participants of a simulation
Robati et al. A modeling and verification approach to the design of distributed IMA architectures using TTEthernet
EP3637262B1 (en) Verification device for vehicle control device and vehicle control device
CN104678918A (en) CANOPEN main control equipment based on PC104 bus and control method of CANOPEN main control equipment
US9310796B2 (en) Multi-driver control method and apparatus thereof
CN118337820A (en) Rail transit door system control architecture and control method
CN111581006B (en) Panel framework system facing display control system controller
CN115617536A (en) A data synchronization method, device, network equipment and cluster
Kastner et al. Remote control of EIB systems based on virtual shared group objects
Galli et al. The PLATO instrument control unit software: a model based SW architecture
CN116723227B (en) Remote update method of multiple FPGA configuration files based on 5G communication
CN115442179B (en) TTCAN intelligent node and gas turbine distributed control system
JPH06245280A (en) Information transmitter
JPH08237762A (en) Building management system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant