CN111897300B - OPC-UA-based software/hardware joint simulation system and self-adaptive coordination method thereof - Google Patents

OPC-UA-based software/hardware joint simulation system and self-adaptive coordination method thereof Download PDF

Info

Publication number
CN111897300B
CN111897300B CN202010756379.4A CN202010756379A CN111897300B CN 111897300 B CN111897300 B CN 111897300B CN 202010756379 A CN202010756379 A CN 202010756379A CN 111897300 B CN111897300 B CN 111897300B
Authority
CN
China
Prior art keywords
simulation
joint
unit
opc
step length
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
CN202010756379.4A
Other languages
Chinese (zh)
Other versions
CN111897300A (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 Jiaotong University
Original Assignee
Shanghai Jiaotong University
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 Jiaotong University filed Critical Shanghai Jiaotong University
Priority to CN202010756379.4A priority Critical patent/CN111897300B/en
Publication of CN111897300A publication Critical patent/CN111897300A/en
Application granted granted Critical
Publication of CN111897300B publication Critical patent/CN111897300B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • G05B19/41885Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by modeling, simulation of the manufacturing system
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
    • G05B13/04Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators
    • G05B13/042Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators in which a parameter or coefficient is automatically adjusted to optimise the performance
    • 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
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • G05B19/4184Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by fault tolerance, reliability of production system
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • G05B19/4185Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by the network communication
    • G05B19/41855Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by the network communication by local area network [LAN], network structure
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • G05B19/4185Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by the network communication
    • G05B19/4186Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by the network communication by protocol, e.g. MAP, TOP
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25232DCS, distributed control system, decentralised control unit
    • 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)
  • Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • General Physics & Mathematics (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an OPC-UA-based software/hardware joint simulation system and a self-adaptive cooperative method thereof, and relates to the technical field of system simulation. The system comprises a simulation unit, a simulation adapter, a communication module and a clock agent. The self-adaptive cooperative method of the system comprises the following steps: 1. creating a joint simulation environment and building a simulation model of each simulation unit; 2. configuring a joint simulation environment, establishing an information model, connecting each simulation adapter to a corresponding simulation unit, and setting the QoS (quality of service) requirement of each simulation unit; 3. according to the simulation step length of each simulation unit, determining a collaborative simulation step length according to a step length collaborative self-adaption method; 4. running a joint simulation; 5. and (5) ending the joint simulation and evaluating the result. The joint simulation scheme of the invention performs cooperative control of each simulation unit, optimizes the system structure, reduces the calculation complexity, and can effectively process the scenes with complex actual industrial network structure and frequent information interaction.

Description

OPC-UA-based software/hardware joint simulation system and self-adaptive coordination method thereof
Technical Field
The invention relates to the technical field of system simulation, in particular to an OPC-UA-based software/hardware joint simulation system and a self-adaptive coordination method thereof.
Background
The simulation system is a necessary means for performing verification test and optimizing upgrade in the aspects of intelligent factory operation performance, efficiency, safety and the like. Because the intelligent factory scene covers various production process scenes and heterogeneous networks and contains a topological structure of a complex network, the simulation system under the scene not only needs to relate to software such as process simulation, logistics simulation, network simulation and energy simulation, but also relates to a special real-time hardware simulator, a physical test bed and other hardware simulators. Therefore, the establishment of a fine and accurate simulation test requires joint simulation of a soft/hard hybrid multi-simulation system to more comprehensively simulate the operation mechanism of an actual system, thereby evaluating the design scheme of the system.
Each Simulation Unit (SU) participating in the joint Simulation runs a part of the complete Simulation and needs to be time-synchronized with other Simulation units, thereby realizing the global Simulation of the complete coupling system. Ideally, each module or device of the plant provides its own simulation model, which is created, communicated and maintained by the system architecture engineering method, and finally integrated into a complete system simulation model. However, the existing co-simulation standards are limited to specific industries or specific tools, and lack unified standards for integration, such as Functional Mock-up Interface (FMI) and High-level architecture (High-Level Architecture, HLA), etc.
When multiple simulation units perform joint simulation, unified collaborative management is needed for multiple simulation systems or devices, and each simulator performs simulation data interaction according to a set step length. However, the running steps of each simulator have great differences due to the complexity of solving each simulation system running mode (discrete, continuous and mixed) and the difference of the system running period. For example, the steps for communication and electrical types are typically short, on the order of microseconds to milliseconds, and the steps for processing and logistics are relatively long, on the order of minutes or even hours. The difference of the synchronous step length can cause the efficiency reduction of collaborative simulation, and the problem that the simulation system cannot converge can be caused when the setting is unreasonable, so that a correct verification result cannot be obtained. Therefore, how to design the simulation step length of the joint simulation and ensure the safe and effective operation of the simulation system is a key technology for realizing the semi-physical simulation scheme of the complex system of the intelligent factory.
The patent with the name of 'a power communication system joint simulation platform based on a variable time window synchronization mode and a synchronization method thereof' in domestic application number 201610055323.X aims at a simulation synchronization module designed for a power communication system to switch simulation synchronization time windows according to simulation data of the power system so as to control two simulation tools, but the set time windows are only switched at the set fixed wide and narrow time steps, so that proper time steps cannot be set according to a plurality of simulation units of a complex system of an intelligent factory, and the simulation precision is limited. In the patent with the name of 'a multi-simulator collaborative simulation method, a simulation main control platform and a simulation system', the domestic application number 201810498282.0, a Lagrange polynomial is adopted to interpolate simulators with simulation steps larger than a prediction collaborative step, and the data are transmitted to other simulators for collaborative simulation calculation, but the numerical prediction technology is only theoretical approximation, and the real response of the simulators cannot be accurately described. The name of the domestic application number 201810697108.9 is 'a real-time synchronous control method for multi-simulation equipment', a real-time communication network is adopted to connect a simulation computer and a plurality of simulation equipment, the simulation computer collects feedback data of the corresponding simulation equipment to complete simulation, but when the number of the equipment participating in simulation is larger than a certain threshold value, the communication and interaction mechanism cannot guarantee real-time and reliable transmission of a large amount of data, and meanwhile, the simulation computer cannot guarantee real-time feedback of control instructions and control data. The method comprises the steps that the network communication codes are packaged into a class, objects of each class comprise a sending queue and a receiving queue, and each simulation subsystem can realize reliable communication through the objects of the class by transmitting effective data packets (ensuring that the data packets are received once and only once in sequence), but when one or some subsystems fail in the simulation operation process to restart, the communication relation in the last operation needs to be recovered, and the transmission reliability and the safety in the case of communication errors cannot be ensured.
To sum up, the drawbacks of the prior art solutions are:
(1) Most of the existing joint simulation systems aim at full software simulation or full hardware simulation, complex coupling systems with simultaneous existence of software and hardware are not considered, and the existing joint simulation systems are not suitable for a semi-physical system simulation scheme of an intelligent factory.
(2) Most of the existing joint simulation assumes that real-time reliable communication between simulation units can be achieved, and few specific communication architectures and specifications and communication and interaction mechanisms are involved to ensure effective interaction between the joint simulation units.
(3) The simulation scheme of the existing multiple simulation systems adopts a client/server architecture based on OPC-UA protocol, establishes a point-to-point session to construct a coupling network for data interaction, integrates data processing into a master controller, and a simulation unit only receives instructions of the master controller and feeds back related data, so that the calculation load under the architecture is large, and when the number of simulation unit devices is excessive, the reliability of data transmission cannot be ensured.
(4) In the prior art, when the joint simulation step length of a plurality of simulation units is designed, the switching is performed in a fixed time step length, interpolation prediction feedback data is adopted for the simulation units with the time step length longer than the joint simulation step length, however, the accuracy of the complex coupling system simulation cannot be guaranteed by the fixed time step length and the interpolation prediction.
Therefore, those skilled in the art are dedicated to develop a software/hardware joint simulation system based on OPC-UA and a self-adaptive coordination method thereof, and perform cooperative control of each simulation unit by using a joint simulation scheme based on a subscription/release architecture of OPC-UA protocol, so as to further optimize the system structure, reduce the computational complexity, and effectively process the scene of complex actual industrial network structure and frequent information interaction.
Disclosure of Invention
In view of the above-mentioned drawbacks of the prior art, the technical problems to be solved by the present invention include:
(1) How to construct a simulation scheme of software/hardware mixing in a complex coupling system of an intelligent factory;
(2) How to design specific communication and interaction mechanisms to ensure the reliability of data interaction of each simulation unit of the joint simulation;
(3) How to design an adaptive step length adjustment scheme aiming at a complex coupling system of an intelligent factory under the problem that the time steps of simulation units participating in the joint simulation are inconsistent, so that the joint simulation can be accurately and effectively carried out.
In order to achieve the above purpose, the invention provides a software/hardware joint simulation system based on OPC-UA, comprising a simulation unit, a simulation adapter, a communication module and a clock agent;
The simulation unit comprises software such as process simulation, logistics simulation, network simulation and the like, and hardware simulators such as a special real-time hardware simulator, a physical test bed and the like;
the simulation adapter comprises an OPC-UA client and a simulation unit interface, and adopts an OPC-UA protocol and is set as an interface for data interaction between a simulation unit and a middleware agent so as to complete the data interaction of joint simulation;
The communication module sets a transmission protocol according to the transmission requirement of the simulation unit, and for the simulation unit with low time delay requirement, the communication module adopts a unified architecture datagram protocol (OPC UA Datagram Protocol, UADP); for the simulation unit only needing non-real-time transmission flow, the communication module adopts any one of UADP or UDP protocol;
the clock agent controls the collaborative simulation step length setting of the joint simulation, and each simulation unit sends a report message to the clock agent through the simulation adapter after executing one simulation step length during the joint simulation to report that the simulation step is completed, and when all the simulation units report that the current simulation step is completed, the clock agent sends a simulation step length confirmation message or configuration adjustment information message to each simulation unit to start the simulation step of the next simulation step length; and if the follow-up simulation step length needs to be adjusted, sending the configuration adjustment information, and if the follow-up simulation step length is kept unchanged, sending the simulation step length confirmation information.
Further, the clock agent is arranged for enabling distributed interaction of the respective simulation units; and the working state and feedback data of each simulation unit are sent to the corresponding simulation adapter and simulation unit through the corresponding simulation adapter by the communication module according to the subscription rule of the inter-simulator data.
The invention also provides a self-adaptive cooperative method of the software/hardware joint simulation system based on OPC-UA, which comprises the following steps:
Step 1: a user creates a joint simulation environment and builds a simulation model of each simulation unit;
Step 2: configuring the joint simulation environment, establishing an information model, connecting each simulation adapter to a corresponding simulation unit, setting the QoS (quality of service) requirement required by each simulation unit in the joint simulation environment, and establishing a basic joint simulation environment;
Step 3: according to the simulation step length of each simulation unit, determining the collaborative simulation step length of the joint simulation according to a step length collaborative self-adaption method; the collaborative simulation step length can ensure the stable operation of the whole collaborative simulation system when an emergency (such as a fault and the like) occurs in one or more simulation units;
Step 4: running a joint simulation;
Step 5: and (5) ending the joint simulation and evaluating a simulation result.
Further, in the step 2, when the joint simulation environment is constructed, the simulation adapter of the simulation unit performs data interaction with the simulation unit by adopting OPC-UA protocol.
Further, in the step 2, when the joint simulation environment is constructed, a publish/subscribe (Pub/Sub) mechanism based on OPC-UA protocol is adopted to complete the distributed interaction of each simulation unit.
Further, in the step 3, the determination of the co-simulation step size is one of the following three cases:
Case one: when each simulation unit operates normally, the joint simulation is based on time sequence division, and all the simulation units need to complete simulation calculation before the next time sequence step; the co-simulation step length of the joint simulation selects the least common multiple of the smallest possible simulation time step length Ti (i=1, …, N, N is the number of simulation units participating in the joint simulation) of all the simulation units close to the communication interaction period T;
And a second case: when one or more simulation units are added, after the simulation of the current time step is completed, namely after the clock agent receives the message of reporting that the current simulation step of all the simulation units is completed, the clock agent recalculates the collaborative simulation step of the joint simulation; the co-simulation step length of the joint simulation selects the least common multiple of the joint simulation step length and the least possible simulation time step length of the newly added simulation unit in the original normal operation;
And a third case: when the emergency detection mechanism detects that a certain or some simulation units generate an emergency, the joint simulation is adaptively switched to an operation mode based on event triggering, all the emergency needs to be ensured to be sequentially executed according to a correct sequence, and the joint simulation is non-periodic. If the emergency event is preset in the Clock Agent (Clock Agent), the event triggering mode can be entered in advance of the previous time synchronization point, otherwise, each simulation unit rolls back to the previous simulation synchronization point. And determining the co-simulation step length of the joint simulation according to the triggering time points of all current emergencies and the least common multiple of the simulation time steps of the rest simulation units which normally run.
Further, in the step 3, each simulation unit performs simulation and data interaction according to its own simulation step, and the co-simulation step is only used as a minimum interval base step.
Further, the step 4 includes the steps of:
Step 4.1: each simulation unit updates own simulation output according to the simulation model established in the step 1 in each simulation time step;
step 4.2: each simulation unit sends updated simulation configuration output to the simulation adapter;
Step 4.3: each simulation adapter is used as a publisher to form the output of the corresponding simulation unit into a data set for preparing data publication; the data set is connected with nodes of the OPC-UA information model and comprises a release data set and a data set domain;
Step 4.4: the data set issued by each simulation unit is transmitted into a write-in group; the writing group is a producer of the information in the data interaction, and a user can add a data set writing function by himself;
Step 4.5: the communication module performs data transmission on the selected transmission layer according to the time delay requirement of the simulation unit by using a corresponding transmission protocol;
step 4.6: the corresponding simulation adapter is used as a subscriber to receive message data of a subscribed subject, acquires a subscription data set through a read-in group, and sends the data to the corresponding simulation unit; the read-in group is a receiver of the message in the data interaction, and a user can add a data set reading function;
Step 4.7: the simulation unit completes the current simulation step, and sends a report message to the clock agent through the simulation adapter to report that the current simulation step is completed;
step 4.8: after the clock agent confirms that all the simulation units have finished the message report of the current time step, sending a piece of simulation step length confirmation information or configuration adjustment information to all the current simulation units, and informing the simulation units of the next simulation step length; if the subsequent simulation step length needs to be adjusted, the configuration adjustment information is sent, and if the subsequent simulation step length is kept unchanged, the simulation step length confirmation information is sent;
Step 4.9: and returning to the step 4.1.
Further, in the step 4.3, the release data set is a container of release information, and is composed of release variables and meta information, and includes a set of variables, event filtering, application specific information and meta data; the data set domain is the description of the release variable and contains the selected information model node and additional information such as release, sampling, error processing and the like.
Further, in the step 4.5, the data transmission includes the following two cases: for the data stream with low time delay requirement, UADP is used to directly map to the layer 2 of the reference model, and the message is packed in the Ethernet frame; for non-real-time data flow, UADP datagram is directly mapped to UDP, and the message is packed in UDP packet; the message is transmitted after being subjected to security sealing through a security key server;
The security key server is constructed based on an OPC-UA protocol, manages security keys of the publisher and the subscriber, and establishes connection with the publisher and the subscriber through an OPC-UA client-server form.
Compared with the prior art, the invention has the beneficial technical effects that:
(1) By adopting the joint simulation system, each simulation unit participating in the joint simulation only runs a part of the complete simulation, and realizes the global simulation of the complete coupling system through data interaction with other simulation units, thereby solving the problem caused by mixing a plurality of software/hardware simulation systems of the intelligent factory and more comprehensively simulating the operation mechanism of the actual system.
(2) The invention further optimizes the system structure compared with the simulation schemes of a centralized master controller and a plurality of slave controllers, so that the calculation complexity is greatly reduced, distributed interaction among the simulation units is realized, the reliability of the simulation system is obviously improved, and the scene with complex actual industrial network structure and frequent information interaction can be effectively processed.
The conception, specific structure, and technical effects of the present invention will be further described with reference to the accompanying drawings to fully understand the objects, features, and effects of the present invention.
Drawings
FIG. 1 is a schematic diagram of a hybrid soft/hard co-simulation system in accordance with a preferred embodiment of the present invention;
FIG. 2 is a flow chart of a cooperative adaptive control method according to a preferred embodiment of the present invention;
FIG. 3 is a schematic diagram of quality of service QoS requirements of a configuration co-simulation environment in accordance with a preferred embodiment of the present invention;
FIG. 4 is a schematic diagram of a publisher and subscriber data interaction process in accordance with a preferred embodiment of the present invention;
FIG. 5 is a schematic diagram of a communication module according to a preferred embodiment of the present invention for transmitting data issued by a simulation adapter.
The system comprises a 1-communication module, a 2-simulation adapter, a 3-simulation unit, a 4-clock agent, a 21-OPC-UA client and a 22-simulation unit interface.
Detailed Description
The following description of the preferred embodiments of the present invention refers to the accompanying drawings, which make the technical contents thereof more clear and easy to understand. The present invention may be embodied in many different forms of embodiments and the scope of the present invention is not limited to only the embodiments described herein.
The invention aims to overcome the defects of the existing joint simulation scheme, and provides a soft/hard hybrid joint simulation system and a collaborative self-adaptive method thereof aiming at an intelligent factory scene, which can realize semi-physical complex system simulation of an intelligent factory.
As shown in fig. 1, a software/hardware joint Simulation system based on OPC-UA includes a communication module 1, a plurality of Simulation adapters 2 (Simulation Adaptor, SA), a Simulation Unit 3 (SU), and a Clock Agent 4 (CA). The emulation adapter 2 comprises an OPC-UA client 21 and an emulation unit interface 22.
When the joint simulation is operated, the distributed interaction of each simulation unit 3 is realized by controlling the simulation step length of the joint simulation through the clock agent 4, the working state and feedback data of each simulation unit 3 are transmitted to the corresponding simulation adapter 2 and the simulation unit 3 through the corresponding simulation adapter 2 according to the subscription rule of the data among simulators, and the effective joint simulation is completed.
The communication module 1 sets a transmission protocol according to the transmission requirement of the simulation unit 3, and for the simulation unit 3 with low time delay requirement, a unified architecture datagram protocol (OPC UA Datagram Protocol, UADP) can be adopted to map datagrams directly to layer 2 of an OSI (Open System Interconnection, OSI) reference model, so that the low cycle time requirement of messages is ensured; for the simulation unit only needing non-real-time transmission flow, the former method can be adopted, and UADP datagrams can be mapped into UDP data packets of user datagram protocol (User Datagram Protocol, UDP) for transmission.
The simulation adapter 2 adopts a simulation adapter based on OPC-UA, which comprises: OPC-UA client 21 and emulation unit interface 22. The OPC-UA client 21 is based on an OPC unified architecture (OPC Unified Architecture, OPC-UA) that provides a consistent, complete address space and service model, enables cross-platform communication, and has higher security and reliability. The OPC-UA protocol is adopted to perform software/hardware hybrid joint simulation under the intelligent factory scene, so that seamless access of metadata can be realized, the expansibility of a simulation system can be improved, and the accurate simulation requirement of the production environment of flexible industrial manufacturing can be met. The simulation unit interfaces 22 are in one-to-one correspondence with the simulation units 3, and are connected with data according to the physical characteristics of the simulation units 3.
The simulation unit 3 comprises software/hardware simulators under the intelligent factory scene, including software such as process simulation, logistics simulation, network simulation, energy simulation and the like, and hardware simulators such as special real-time hardware simulators, physical test beds and the like.
The clock agent 4 controls the setting of the co-simulation step size of the joint simulation. After each simulation unit 3 performs a simulation step during the joint simulation, a report message is sent to the clock agent 4 through the simulation adapter 2 to report that the simulation step is completed, and when all simulation units 3 report that the current simulation step is completed, the clock agent 4 sends a simulation step confirmation message or a configuration adjustment message to each simulation unit 3 to start the simulation step of the next simulation step. And if the follow-up simulation step length needs to be adjusted, sending configuration adjustment information, and if the follow-up simulation step length is kept unchanged, sending simulation step length confirmation information.
Fig. 2 is a flowchart of a collaborative adaptive method of an OPC-UA-based software/hardware joint simulation system, which includes the following steps:
step 1: the user creates a joint simulation environment and builds a simulation model of each simulation unit (software and hardware mixture).
Step 2: and configuring a joint simulation environment and establishing an information model.
Step 2.1: the emulation adapters are connected to the respective emulation units.
Step 2.2: if the simulation adapter does not receive the connection request of the simulation unit within a reasonable time, the network connection is closed, and the simulation unit exits the joint simulation. The reasonable time depends on the type of application service, the communication infrastructure, etc.
Step 2.3: the requirements of quality of service (Quality of Service, qoS) of each simulation unit of the joint simulation environment are set, including requirements of bandwidth guarantee (Bandwidth Guarantee), maximum Latency (Maximum Latency) and the like. The bottom layer needs to read the corresponding QoS requirement and configure the corresponding parameters.
Step 3: and determining the collaborative simulation step length of the joint simulation according to the simulation step length of each simulation unit and the step length collaborative self-adaption method.
The step length collaborative self-adaptive method can adaptively adjust the collaborative simulation step length of the joint simulation system when one or more simulation units are added and sudden events (such as faults and the like) occur in one or more simulation units to cause the need of finer simulation step length, and comprises the following three conditions:
① When each simulation unit operates normally, the joint simulation is based on time sequence division, and all the simulation units need to complete simulation calculation before the next time sequence step. The co-simulation step length of the joint simulation selects the least common multiple of the smallest possible simulation time step length Ti (i=1, …, N, N is the number of simulation units participating in the joint simulation) of all simulation units close to the communication interaction period T;
② When one or more simulation units are added, after the simulation of the current time step is completed, the clock agent recalculates the collaborative simulation step of the joint simulation after receiving the message of reporting that the current simulation step is completed by all the simulation units. At this time, the co-simulation step length of the co-simulation selects the least common multiple of the co-simulation step length in the original normal operation and the least possible simulation time step length of the newly added simulation unit;
③ When the emergency detection mechanism detects that a certain or some simulation units generate an emergency, the joint simulation is adaptively switched to an operation mode based on event triggering, all the emergency needs to be ensured to be sequentially executed according to a correct sequence, and the joint simulation is non-periodic. If the emergency event is preset in a Clock Agent (Clock Agent), the event triggering mode can be entered in advance of the previous time synchronization point, otherwise, each simulation unit rolls back to the previous simulation synchronization point. And determining the co-simulation step length of the joint simulation according to the triggering time points of all the current emergencies and the least common multiple of the simulation time steps of the rest simulation units which normally run.
Step 4: and running the joint simulation.
Step 4.1: and each simulation unit updates own simulation output according to the simulation model established in the first step in each simulation time step.
Step 4.2: each simulation unit sends the updated simulation configuration output to the simulation adapter.
Step 4.3: each emulation adapter (publisher) composes a dataset (Datasets) with its corresponding emulation unit output for preparation of data publication. The dataset is coupled to nodes (e.g., variables) of the information model of OPC-UA, including a release dataset (Published Datasets) and a dataset field (DATASET FIELDS).
The release Data set is a container of release information, and consists of release variables and Meta information, including a set of variables, event filtering, application specific information and Meta Data (Meta Data).
The data set domain is the description of the release variable and contains the selected information model node and additional information such as release, sampling, error processing and the like.
Step 4.4: the data set issued by each simulation unit is transferred into a write group (WriterGroup). The write group is the producer of the message in the data interaction, and the user can add DATASETWRITE (data set write) functions.
Step 4.5: and the communication module performs data transmission on the selected transmission layer according to the time delay requirement of the simulation unit by using a corresponding transmission protocol. The transmission process includes the following two cases: for the data stream with low time delay requirement, UADP is used to directly map to the layer 2 of the reference model, and the message is packed in the Ethernet frame; for non-real time data streams, UADP datagrams are mapped directly to UDP, and the messages are packed in UDP packets. The message is transmitted after Security seal (Secure encyclope) by a Security key server (Security KEY SERVER).
The security key Server is a Server based on OPC-UA protocol, manages security keys of the publisher and the subscriber, and establishes connection with the publisher and the subscriber through a Client-Server (Client-Server) form.
Step 4.6: after receiving the message data of the subscribed subject, the corresponding simulation adapter acquires the subscription data set through the read-in group (ReaderGroup) and sends the data to the corresponding simulation unit (subscriber). The read-in group may be the recipient of the message in the data interaction, and the user may add DATASETREAD (data set read) functions.
Step 4.7: the simulation unit completes the current simulation step and sends a message to the clock agent through the simulation adapter to report that the current simulation step is completed.
Step 4.8: after the clock agent confirms that all simulation units have finished the message report of the current time step, a message is sent to all the current simulation units to inform the simulation units of the next step. The message is confirmation information or configuration adjustment information of the simulation step length, if the follow-up simulation step length needs to be adjusted, the configuration adjustment information is sent, and if the follow-up simulation step length is kept unchanged, the confirmation information of the simulation step length is sent.
Step 4.9: turning to step 4.1.
Step 5: and (5) ending the joint simulation and evaluating a simulation result.
In the step 2, the joint simulation environment is initialized and configured, and a schematic diagram of the information model is set up as shown in fig. 3.
In the above steps 4.3,4.4 and 4.6, a schematic diagram of the data interaction process between the publisher and subscriber is shown in fig. 4.
In the step 4.5, a schematic diagram of the process of transmitting the simulation adapter release data by the communication module is shown in fig. 5.
The invention has the advantages that:
1. By adopting the joint simulation system, each simulation unit participating in the joint simulation only runs a part of the complete simulation, and realizes the global simulation of the complete coupling system through data interaction with other simulation units, thereby solving the problem caused by mixing a plurality of software/hardware simulation systems of the intelligent factory and more comprehensively simulating the operation mechanism of the actual system.
2. The invention further optimizes the system structure compared with the simulation schemes of a centralized master controller and a plurality of slave controllers, so that the calculation complexity is greatly reduced, distributed interaction among the simulation units is realized, the reliability of the simulation system is obviously improved, and the scene with complex actual industrial network structure and frequent information interaction can be effectively processed.
The foregoing describes in detail preferred embodiments of the present invention. It should be understood that numerous modifications and variations can be made in accordance with the concepts of the invention without requiring creative effort by one of ordinary skill in the art. Therefore, all technical solutions which can be obtained by logic analysis, reasoning or limited experiments based on the prior art by the person skilled in the art according to the inventive concept shall be within the scope of protection defined by the claims.

Claims (7)

1. The OPC-UA-based software/hardware joint simulation system is characterized by comprising a simulation unit, a simulation adapter, a communication module and a clock agent;
the simulation unit comprises process simulation, logistics simulation, network simulation, energy simulation software, a special real-time hardware simulator and a physical test bed hardware simulator;
the simulation adapter comprises an OPC-UA client and a simulation unit interface, and adopts an OPC-UA protocol and is set as an interface for data interaction between a simulation unit and a middleware agent so as to complete the data interaction of joint simulation;
The communication module sets a transmission protocol according to the transmission requirement of the simulation unit, and for the simulation unit with low time delay requirement, the communication module adopts a unified architecture datagram protocol (OPC UA Datagram Protocol, UADP); for the simulation unit only needing non-real-time transmission flow, the communication module adopts any one of UADP or UDP protocol;
the clock agent controls the collaborative simulation step length setting of the joint simulation, and each simulation unit sends a report message to the clock agent through the simulation adapter after executing one simulation step length during the joint simulation to report that the simulation step is completed, and when all the simulation units report that the current simulation step is completed, the clock agent sends a simulation step length confirmation message or configuration adjustment information message to each simulation unit to start the simulation step of the next simulation step length; and if the follow-up simulation step length needs to be adjusted, sending the configuration adjustment information, and if the follow-up simulation step length is kept unchanged, sending the simulation step length confirmation information.
2. The OPC-UA-based software/hardware co-simulation system of claim 1 wherein the clock agent is configured to implement distributed interactions of the respective simulation units; and the working state and feedback data of each simulation unit are sent to the corresponding simulation adapter and simulation unit through the corresponding simulation adapter by the communication module according to the subscription rule of the inter-simulator data.
3. An adaptive collaborative method of a software/hardware joint simulation system based on OPC-UA is characterized by comprising the following steps:
step 1: a user creates a joint simulation environment and builds a simulation model of each simulation unit;
step 2: configuring the joint simulation environment, establishing an information model, connecting each simulation adapter to a corresponding simulation unit, setting the QoS (quality of service) requirement required by each simulation unit in the joint simulation environment, and establishing a basic joint simulation environment;
Step 3: according to the simulation step length of each simulation unit, determining the collaborative simulation step length of the joint simulation according to a step length collaborative self-adaption method; the collaborative simulation step length ensures the stable operation of the whole collaborative simulation system when an emergency (such as a fault and the like) occurs in one or more simulation units;
Step 4: running a joint simulation;
step 5: ending the joint simulation and evaluating a simulation result;
in the step 2, when the joint simulation environment is constructed, the simulation adapter of the simulation unit performs data interaction with the simulation unit by adopting an OPC-UA protocol;
In the step 2, when the joint simulation environment is constructed, a Pub/Sub (Pub/Sub) mechanism based on an OPC-UA protocol is adopted to complete the distributed interaction of each simulation unit;
In the step 3, the determination of the co-simulation step size is one of the following three cases:
Case one: when each simulation unit operates normally, the joint simulation is based on time sequence division, and all the simulation units need to complete simulation calculation before the next time sequence step; the co-simulation step length of the joint simulation selects the least common multiple of the smallest possible simulation time step length Ti (i=1, …, N, N is the number of simulation units participating in the joint simulation) of all the simulation units close to the communication interaction period T;
and a second case: when one or more simulation units are newly added, after the simulation of the current time step is completed, the clock agent recalculates the collaborative simulation step of the joint simulation when the clock agent receives the message of all the simulation units reporting that the current simulation step is completed; the co-simulation step length of the joint simulation selects the least common multiple of the joint simulation step length and the least possible simulation time step length of the newly added simulation unit in the original normal operation;
And a third case: when the emergency detection mechanism detects that a certain or some simulation units generate an emergency, the joint simulation is adaptively switched to an operation mode based on event triggering, all the emergency needs to be ensured to be sequentially executed according to a correct sequence, and the joint simulation is non-periodic; if the emergency event is preset in the Clock Agent (Clock Agent), the event triggering mode can be entered in advance of the previous time synchronization point, otherwise, each simulation unit is retracted to the previous simulation synchronization point; and determining the co-simulation step length of the joint simulation according to the triggering time points of all current emergencies and the least common multiple of the simulation time steps of the rest simulation units which normally run.
4. The adaptive collaborative method of an OPC-UA-based software/hardware joint simulation system according to claim 3, wherein in said step 3, each simulation unit performs simulation and data interaction according to its own simulation step, and said collaborative simulation step is only used as a minimum interval base step.
5. The adaptive collaborative method for an OPC-UA-based software/hardware joint simulation system according to claim 3, wherein said step 4 comprises the steps of:
Step 4.1: each simulation unit updates own simulation output according to the simulation model established in the step 1 in each simulation time step;
step 4.2: each simulation unit sends updated simulation configuration output to the simulation adapter;
Step 4.3: each simulation adapter is used as a publisher to form the output of the corresponding simulation unit into a data set for preparing data publication; the data set is connected with nodes of the OPC-UA information model and comprises a release data set and a data set domain;
Step 4.4: the data set issued by each simulation unit is transmitted into a write-in group; the writing group is a producer of the information in the data interaction, and a user can add a data set writing function by himself;
Step 4.5: the communication module performs data transmission on the selected transmission layer according to the time delay requirement of the simulation unit by using a corresponding transmission protocol;
step 4.6: the corresponding simulation adapter is used as a subscriber to receive message data of a subscribed subject, acquires a subscription data set through a read-in group, and sends the data to the corresponding simulation unit; the read-in group is a receiver of the message in the data interaction, and a user can add a data set reading function;
Step 4.7: the simulation unit completes the current simulation step, and sends a report message to the clock agent through the simulation adapter to report that the current simulation step is completed;
step 4.8: after the clock agent confirms that all the simulation units have finished the message report of the current time step, sending a piece of simulation step length confirmation information or configuration adjustment information to all the current simulation units, and informing the simulation units of the next simulation step length; if the subsequent simulation step length needs to be adjusted, the configuration adjustment information is sent, and if the subsequent simulation step length is kept unchanged, the simulation step length confirmation information is sent;
Step 4.9: and returning to the step 4.1.
6. The adaptive collaborative method for an OPC-UA-based software/hardware co-simulation system according to claim 5, wherein in said step 4.3, said release dataset is a container of release information, consisting of release variables and meta information, including a set of variables, event filtering, application specific information and meta data; the data set domain is the description of the release variable and comprises the selected information model nodes and release, sampling and error processing additional information.
7. The adaptive collaborative method for an OPC-UA-based software/hardware co-simulation system according to claim 5, wherein in said step 4.5, said data transmission includes the following two cases: for the data stream with low time delay requirement, UADP is used to directly map to the layer 2 of the reference model, and the message is packed in the Ethernet frame; for non-real-time data flow, UADP datagram is directly mapped to UDP, and the message is packed in UDP packet; the message is transmitted after being subjected to security sealing through a security key server;
The security key server is constructed based on an OPC-UA protocol, manages security keys of the publisher and the subscriber, and establishes connection with the publisher and the subscriber through an OPC-UA client-server form.
CN202010756379.4A 2020-07-31 2020-07-31 OPC-UA-based software/hardware joint simulation system and self-adaptive coordination method thereof Active CN111897300B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010756379.4A CN111897300B (en) 2020-07-31 2020-07-31 OPC-UA-based software/hardware joint simulation system and self-adaptive coordination method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010756379.4A CN111897300B (en) 2020-07-31 2020-07-31 OPC-UA-based software/hardware joint simulation system and self-adaptive coordination method thereof

Publications (2)

Publication Number Publication Date
CN111897300A CN111897300A (en) 2020-11-06
CN111897300B true CN111897300B (en) 2024-05-24

Family

ID=73182822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010756379.4A Active CN111897300B (en) 2020-07-31 2020-07-31 OPC-UA-based software/hardware joint simulation system and self-adaptive coordination method thereof

Country Status (1)

Country Link
CN (1) CN111897300B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112434420B (en) * 2020-11-20 2023-09-05 国网山东省电力公司电力科学研究院 Time synchronization and data interaction method for hybrid simulation of comprehensive energy system
CN112818545B (en) * 2021-02-03 2023-03-21 东北电力大学 Power information physical joint simulation system based on OPC
CN113268888B (en) * 2021-06-23 2022-09-27 上海交通大学 Control and information model fusion method in industrial automation system
CN114745285A (en) * 2022-04-11 2022-07-12 电子科技大学 Large-scale distributed virtual network simulation method based on virtual container
CN115562892B (en) * 2022-12-02 2023-03-24 北京卓翼智能科技有限公司 Redis-based simulation system time management method, system, device and equipment
CN117033252B (en) * 2023-10-09 2024-04-12 中核武汉核电运行技术股份有限公司 Combined simulation communication system based on opcua
CN117103281B (en) * 2023-10-20 2024-01-26 深圳墨影科技有限公司 Robot full fusion simulation system and method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867081A (en) * 2012-08-23 2013-01-09 西南交通大学 Coupling control method for multi-field collaborative simulation computation
CN105740528A (en) * 2016-01-27 2016-07-06 东南大学 Self-adaptive synchronization manner-based electric power and communication united simulation platform and synchronization method thereof
CN106529056A (en) * 2016-11-17 2017-03-22 东南大学 Master-slave power communication integrated simulation platform and simulation method
CN108664751A (en) * 2018-05-23 2018-10-16 全球能源互联网研究院有限公司 A kind of emulation mode, emulation main control platform and the analogue system of more emulator collaborations
CN109800054A (en) * 2018-12-24 2019-05-24 四川知周科技有限责任公司 A kind of distributed parallel real-time simulation scheduling implementation method
CN110580373A (en) * 2018-06-07 2019-12-17 能力中心-虚拟车辆研究公司 Preprocessing collaborative simulation method and device
CN111177899A (en) * 2019-12-16 2020-05-19 北京航天智造科技发展有限公司 Multidisciplinary collaborative simulation method and system based on cloud platform

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10382285B2 (en) * 2011-08-25 2019-08-13 Siemens Industry, Inc. Smart grid communication assessment and co-simulation tool

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867081A (en) * 2012-08-23 2013-01-09 西南交通大学 Coupling control method for multi-field collaborative simulation computation
CN105740528A (en) * 2016-01-27 2016-07-06 东南大学 Self-adaptive synchronization manner-based electric power and communication united simulation platform and synchronization method thereof
CN106529056A (en) * 2016-11-17 2017-03-22 东南大学 Master-slave power communication integrated simulation platform and simulation method
CN108664751A (en) * 2018-05-23 2018-10-16 全球能源互联网研究院有限公司 A kind of emulation mode, emulation main control platform and the analogue system of more emulator collaborations
CN110580373A (en) * 2018-06-07 2019-12-17 能力中心-虚拟车辆研究公司 Preprocessing collaborative simulation method and device
CN109800054A (en) * 2018-12-24 2019-05-24 四川知周科技有限责任公司 A kind of distributed parallel real-time simulation scheduling implementation method
CN111177899A (en) * 2019-12-16 2020-05-19 北京航天智造科技发展有限公司 Multidisciplinary collaborative simulation method and system based on cloud platform

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
多机多编队飞行仿真***研究和设计;邹庆元;宋晗;陈宗基;;***工程与电子技术(04);全文 *
王宏伟 ; 张和明 ; .面向广域网环境的协同仿真平台的设计与实现.计算机集成制造***.2009,(01),全文. *
邹庆元 ; 宋晗 ; 陈宗基 ; .多机多编队飞行仿真***研究和设计.***工程与电子技术.2008,(04),全文. *
面向广域网环境的协同仿真平台的设计与实现;王宏伟;张和明;;计算机集成制造***(01);全文 *

Also Published As

Publication number Publication date
CN111897300A (en) 2020-11-06

Similar Documents

Publication Publication Date Title
CN111897300B (en) OPC-UA-based software/hardware joint simulation system and self-adaptive coordination method thereof
Bian et al. Real-time co-simulation platform using OPAL-RT and OPNET for analyzing smart grid performance
CN111835565A (en) Communication network optimization method, device and system based on digital twin
US11057269B2 (en) System and method for configuring IED process bus network switches from substation topology specification
CN108322348B (en) Transformer substation monitoring information automatic acceptance signal triggering operation subsystem and method
CN103023708B (en) The method of testing of communication protocol interface and system
CN110046383B (en) Power system information physical hybrid simulation method based on event synchronization and screening
CN106712295B (en) Logic distribution terminal and communication means based on Automation System for Distributing Substation
CN103177642A (en) Method for improving reality of power grid dispatcher training simulation system
Flores et al. Case study: Design and implementation of IEC 61850 from multiple vendors at CFE La Venta II
Suzuki et al. Cps-sim: Co-simulation for cyber-physical systems with accurate time synchronization
CN113796047B (en) Computer-implemented method for reconstructing a predetermined distributed real-time simulation network
Das et al. Analysis of end-to-end delay characteristics for various packets in IEC 61850 substation communications system
Wang et al. A low-latency and interoperable industrial Internet of Things architecture for manufacturing systems
CN103428052A (en) Power system simulation system, communication system simulation system and joint simulation engine and system
CN114925607A (en) Industrial network management system for information physical synchronization and preplanning method thereof
Adhane et al. Distributed control system for ship engines using dual fieldbus
CN110611599A (en) Network control system and control method thereof
Lin et al. Gigabit Modbus user datagram protocol fieldbus network integrated with industrial vision communication
CN114064371A (en) Electronic interlocking simulation test method, system, equipment and storage medium
CN107241234B (en) AS5643 network simulation method and system
Yoon et al. RAPIEnet based redundancy control system
CN108614447B (en) Joint simulation method, device, equipment and storage medium for wind turbine generator
Daoud et al. Performance and reliability of fault-tolerant ethernet networked control systems
CN111077803A (en) Panoramic information physical fusion system simulation framework and working method thereof

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