A joint simulation method based on DDS and related devices
By adopting a joint simulation method based on DDS between different platforms, the communication failure problem caused by TCP interconnection in the prior art is solved, and effective data transmission and control between multiple nodes is realized.
Patent Information
- Application Number
- CN202311793896.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2043-12-22
AI Technical Summary
In the prior art, different platforms are interconnected by TCP, which makes it impossible to realize communication between multiple nodes, and communication failure may occur during the interconnection process.
Using a joint simulation method based on DDS, a first connection is established with the Simulink platform based on DDS, and a second connection is established with the SimulationX platform based on FMU-TCP to realize data transmission and control.
It avoids communication failure problems caused by all communication based on TCP, realizes effective data transmission and control between different platforms, and supports communication between multiple nodes.
Smart Images

Figure CN117762042B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a DDS-based joint simulation method and related devices. Background Art
[0002] With the rapid development of computer technology, system application software in various fields is becoming more and more complex. How to connect these systems based on different platforms and facilitate communication has become a top priority. Practice has proved that the real-time and on-demand distribution of information in distributed simulation systems can achieve effective interconnection between different platforms.
[0003] However, in the prior art, different platforms are interconnected using TCP, which requires a point-to-point connection. When a computer wants to communicate with another computer, the communication between the two computers needs to be smooth and reliable. It cannot achieve communication between multiple nodes. However, during the interconnection process, two computers may communicate with the target computer at the same time, and the target computer does not know how to respond, resulting in communication failure. Summary of the invention
[0004] In view of this, the present invention provides a joint simulation method and related devices based on DDS to solve the problem that different platforms in the prior art are interconnected by TCP. TCP requires point-to-point connection. When a computer wants to communicate with another computer, the communication between the two computers needs to be smooth and reliable. It cannot realize communication between multiple nodes. However, during the interconnection process, two computers may communicate with the target computer at the same time. The target computer does not know how to respond, resulting in communication failure. The specific scheme is as follows:
[0005] A DDS-based joint simulation method is applied to simulation between a GCAir platform, a Simulink platform, and a SimulationX platform, wherein a GCK control system is pre-imported into the GCAir platform, a SimX multi-body model is pre-built in the SimulationX platform, and a PID control module with a DDS function is pre-built on the Simulink platform. The method comprises:
[0006] Preliminarily establish a first connection between the GCAir platform and the Simulink platform based on the DDS mode, and simultaneously establish a second connection between the GCAir platform and the SimulationX platform based on the FMU-TCP mode;
[0007] Acquire PID control data of the Simulink platform based on the first connection, and transmit the PID control data to the GCK control system to obtain a first output;
[0008] Passing the first output to the SimulationX platform based on the second connection, and controlling the SimX multi-body model based on the first output to obtain a second output;
[0009] The second output is transmitted to the Simulink platform, so that the Simulink platform performs PID adjustment based on the second output.
[0010] The above-mentioned DDS-based joint simulation method may optionally establish a first connection between the GCAir platform and the Simulink platform based on the DDS mode in advance, including:
[0011] Pre-setting an sldd file, wherein the sldd file includes: a data type and data content;
[0012] Publishing a data transceiver executable file based on the sldd file;
[0013] A first connection is established between the GCAir platform and the Simulink platform using a DDS method based on the data transceiver executable file.
[0014] The above-mentioned DDS-based joint simulation method may optionally establish a second connection between the GCAir platform and the SimulationX platform based on FMU-TCP, including:
[0015] Setting a TCP module on the GCAir platform and calling the TCP module based on the FMU-master method;
[0016] A GCAir interface is set on the SimulationX platform, and a second connection is established with the GCAir platform in an FMU-slave manner on the GCAir interface.
[0017] The above-mentioned DDS-based joint simulation method, optionally, transmits the second output to the Simulink platform, including:
[0018] transmitting the second output to the GCAir platform based on the second connection;
[0019] After the GCAir platform receives the second output, the second output is transmitted to the Simulink platform based on the first connection.
[0020] The above-mentioned DDS-based joint simulation method may, optionally, control the SimX multi-body model based on the first output to obtain a second output, further comprising:
[0021] Controlling the SimX multi-body model based on the first output to obtain a third output;
[0022] The third output is transmitted to the GCK control system, and the first output is adjusted based on the third output.
[0023] A DDS-based joint simulation device is used for simulation between a GCAir platform, a Simulink platform and a SimulationX platform, wherein a GCK control system is pre-imported into the GCAir platform, a SimX multi-body model is pre-built in the SimulationX platform, and a PID control module with a DDS function is pre-built in the Simulink platform. The device comprises:
[0024] An establishment module is used to establish a first connection between the GCAir platform and the Simulink platform based on a DDS mode in advance, and to establish a second connection between the GCAir platform and the SimulationX platform based on an FMU-TCP mode;
[0025] An acquisition and transfer module, configured to acquire PID control data of the Simulink platform based on the first connection, and transfer the PID control data to the GCK control system to obtain a first output;
[0026] A transfer and control module, used for transferring the first output to the SimulationX platform based on the second connection, and controlling the SimX multi-body model based on the first output to obtain a second output;
[0027] A transfer module is used to transfer the second output to the Simulink platform so that the Simulink platform performs PID adjustment based on the second output.
[0028] The above-mentioned DDS-based joint simulation device, optionally, the establishment module includes:
[0029] A setting unit, used for presetting an sldd file, wherein the sldd file includes: a data type and data content;
[0030] A publishing unit, used for publishing a data transceiver executable file based on the sldd file;
[0031] A connection unit is used to establish a first connection between the GCAir platform and the Simulink platform in a DDS manner based on the data transceiver executable file.
[0032] The above-mentioned DDS-based joint simulation device, optionally, the establishment module includes:
[0033] A calling unit, used for setting a TCP module on the GCAir platform and calling the TCP module based on the FMU-master method;
[0034] The setting and connection unit includes setting a GCAir interface on the SimulationX platform, and establishing a second connection with the GCAir platform in an FMU-slave manner on the GCAir interface.
[0035] In the above-mentioned DDS-based joint simulation device, optionally, the transfer module includes:
[0036] A first transmission unit, configured to transmit the second output to the GCAir platform based on the second connection;
[0037] A second transmission unit is configured to transmit the second output to the Simulink platform based on the first connection after the GCAir platform receives the second output.
[0038] In the above-mentioned DDS-based joint simulation device, optionally, the transmission and control module further includes:
[0039] A control unit, configured to control the SimX multi-body model based on the first output to obtain a third output;
[0040] An adjustment unit is used to transmit the third output to the GCK control system and adjust the first output based on the third output.
[0041] A storage medium includes a stored program, wherein the program executes the above-mentioned DDS-based joint simulation method.
[0042] A processor is used to run a program, wherein the program executes the above-mentioned DDS-based joint simulation method when running.
[0043] Compared with the prior art, the present invention has the following advantages:
[0044] The present invention discloses a joint simulation method based on DDS and related devices, including: pre-establishing a first connection between the GCAir platform and the Simulink platform based on the DDS mode, and establishing a second connection between the GCAir platform and the SimulationX platform based on the FMU-TCP mode; acquiring PID control data of the Simulink platform based on the first connection, passing the PID control data to the GCK control system to obtain a first output, passing the first output to the SimulationX platform based on the second connection, controlling the SimX multi-body model based on the first output to obtain a second output; passing the second output to the Simulink platform. In the above process, there is no need to respond to the communication based on the DDS mode. Therefore, the connection mode of the GCAir platform based on DDS connection at one end and FMU-TCP at the other end can avoid the problem of communication failure caused by all TCP-based communications. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A flow chart of a DDS-based joint simulation method disclosed in an embodiment of the present invention;
[0047] Figure 2 A schematic diagram of a Simulink platform and a GCAir platform based on DDS communication disclosed in an embodiment of the present invention;
[0048] Figure 3 A schematic diagram of a simulation process of a landing gear turning system disclosed in an embodiment of the present invention;
[0049] Figure 4 A structural block diagram of a DDS-based joint simulation device disclosed in an embodiment of the present invention;
[0050] Figure 5 The present invention is a schematic diagram of a device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] The present invention discloses a joint simulation method and related devices based on DDS, which are applied in the process of simulating different platforms. In the prior art, with the rapid development of computer technology, the system application software in various fields is becoming more and more complex. How to connect these systems based on different platforms and conveniently communicate has become a top priority. Practice has proved that the real-time and on-demand distribution of information in the distributed simulation system can realize the effective interconnection between different platforms. However, different platforms are interconnected in TCP mode. TCP needs to establish a point-to-point connection. When a computer wants to communicate with another computer, the communication between the two computers needs to be smooth and reliable. It cannot realize communication between multiple nodes. However, in the process of interconnection, two computers may communicate with the target computer at the same time. The target computer does not know how to respond, resulting in communication failure.
[0053] Furthermore, the current joint simulation technology for multiple systems usually uses the form of importing FMU models. This simulation mode is implemented on the same platform. Each subsystem model is in the form of a black box model on the same platform. The internal information of the model is not visible, which is extremely unfriendly to the situation that requires repeated debugging. At the same time, the models of each subsystem are also built in different software. Therefore, it is a better solution to realize joint white box debugging between different software through data communication.
[0054] Based on the above problems, the present invention provides a joint simulation method based on DDS, which is applied to the simulation between the GCAir platform, the Simulink platform and the SimulationX platform, wherein the GCK control system is pre-imported in the GCAir platform, the SimulationX platform pre-builds the SimX multi-body model, and the Simulink platform pre-builds a PID control module with DDS function, wherein the GCAir platform is an industrial software independently developed based on the MBSE (Model-Based Systems Engineering) concept, which provides tool support for the forward design of complex equipment system development, provides a solution for the implementation of digital twin technology, and can realize full virtual simulation to semi-physical simulation. GCAir supports multi-source heterogeneous model integration, one-click switching from full virtual simulation to semi-physical simulation, and can complete model-in-the-loop, software-in-the-loop, hardware-in-the-loop simulation and testing on the same platform, and has the ability of continuous comprehensive integrated test verification, which can be applied to the entire life cycle of complex equipment from design and development to operation and maintenance. In addition, the GCK control system is pre-imported in the GCAir platform, wherein the GCK control system is related to the specific application scenario and the multi-body model. The SimX multi-body model is pre-built in the SimulationX platform, and the multi-body model is simulated based on the GCK control system. The Simulink platform is built based on MATLAB software and is mainly used for PID adjustment of the multi-body model. The execution process of the method is as follows: Figure 1 As shown, the steps include:
[0055] S101, pre-establishing a first connection between the GCAir platform and the Simulink platform based on a DDS mode, and simultaneously establishing a second connection between the GCAir platform and the SimulationX platform based on an FMU-TCP mode;
[0056] In the embodiment of the present invention, the data distribution service DDS has a data-centric publish-subscribe mechanism, which provides a platform-independent data model. Publishers / subscribers are associated through topics, and nodes do not need to know where each other is, nor do they need to be online at the same time. Each node in the network only needs to subscribe to the data it wants, or publish the information it provides, and the DDS system is responsible for delivering the data.
[0057] In the embodiment of the present invention, since both Matlab / Simulink software and GCAir software provided by MathWorks have DDS distributed simulation function, the application program that provides information in DDS acts as a publisher, and the application program that accesses part of the data space acts as a subscriber. Whenever the publisher publishes new data to the space, the DDS middleware propagates the information to all interested subscribers. Matlab / Simulink and GCAir realize data communication between the two through this technology. The GCAir platform establishes a first connection with the Simulink platform based on the DDS mode in advance. The specific creation method is as follows:
[0058] The PID control module with DDS function is constructed in the Simulink platform as follows: Introduce the use of DDS by importing, configuring and deploying the Shapes Demo provided by DDS in Simulink. Establish a Simulink model with DDS function. Further, define the application name and DDS product, wherein after the application name and DDS are set, generate the corresponding sldd file, wherein the sldd file is used for the data type, data content, subject and Qos of data transmission through the DDS bus. Further, select the default DDS dictionary file path, wherein the path is pre-specified, and after the setting is completed, generate the sldd file under the path, compile the sldd file, and obtain the data sending and receiving executable file.
[0059] A first connection is established between the GCAir platform and the Simulink platform using a DDS method based on the data transceiver executable file.
[0060] The implementation process is as follows Figure 2 As mentioned above, DDS is used as the middleware, GCAir is used as the subscriber, and Simulink is used as the publisher. The interaction process is as follows:
[0061] 1.Simulink registers data types to the middleware;
[0062] 2. The middleware returns to Simulink;
[0063] 3.Simulink generates topics to Simulink;
[0064] 4.Simulink returns to the middleware;
[0065] 5.GCAir sends the search topic to the middleware;
[0066] 6. Middleware returns to GCAir
[0067] 7.GCAir sends the subscription topic to the middleware;
[0068] 8. The middleware returns to GCAir;
[0069] 9.Simulink publishes data to the middleware;
[0070] 10. The middleware passes data to GCAir.
[0071] In the embodiment of the present invention, the GCAir platform establishes a second connection with the SimulationX platform based on FMU-TCP. The specific processing process is as follows:
[0072] A TCP module is set on the GCAir platform, the TCP module is run, the TCP module is called based on the FMU-master (master FMU) mode, a GCAir interface is set on the SimulationX platform, and a second connection is established with the GCAir platform in the FMU-slave (slave FMU) mode on the GCAir interface.
[0073] S102, acquiring PID control data of the Simulink platform based on the first connection, transmitting the PID control data to the GCK control system, and obtaining a first output;
[0074] In an embodiment of the present invention, a model with a DDS bus is established on the GCAir platform, which is a simulation bus defined based on the DDS communication model. GCAir can realize the demand for cross-platform simulation by configuring nodes with the same theme as third-party software / device through the DDS bus. In GCAir, the DDS bus defaults to a Qos policy file, which can be used to constrain data attributes for communication with third-party software, and can also establish communication connection rules between devices through imported Qos description files; determine the message signal carried by the DDS bus Topic through topic settings; determine the data writer / data reader of the DDS topic through node settings; topics and nodes can inherit the properties of the Qos file by configuring the corresponding Qos file. The specific operation process is as follows:
[0075] In the GCAir platform, the subsystem "BlankSubsystem_3" receives the PID control data adjusted by PID from Simulink through the DDS receiving node, passes the PID control data to the GCK control system, and obtains a first output, wherein, preferably, the first output is related to the GCK control system. In the embodiment of the present invention, the first output is not specifically limited.
[0076] In the embodiment of the present invention, it also includes: the subsystem "BlankSubsystem_2" outputs the required data after PID adjustment to the Simulink platform through the DDS sending node.
[0077] Furthermore, according to the transceiver relationship with the Simulink platform, a transceiver node is set in the subsystem, the subject setting in the node is consistent with Simulink, and the transceiver node setting is consistent with the Simulink setting.
[0078] S103, transmitting the first output to the SimulationX platform based on the second connection, and controlling the SimX multi-body model based on the first output to obtain a second output;
[0079] In the embodiment of the present invention, the first output is transmitted to the SimulationX platform based on the second connection, and the model with the GCAir interface and IP address is exported in GCAir and imported into the SimulationX platform to realize data interaction.
[0080] In the SimulationX, the SimX multi-body model is simulated and controlled based on the first output to obtain a second output, wherein the second output is related to the SimX multi-body model. In the embodiment of the present invention, the second output is not specifically limited.
[0081] S104: passing the second output to the Simulink platform, so that the Simulink platform performs PID adjustment based on the second output.
[0082] In an embodiment of the present invention, the second output is transmitted to the GCAir platform based on the second connection. After receiving the second output, the GCAir platform outputs the required second output after PID adjustment to the Simulink platform through the DDS sending node based on the subsystem "BlankSubsystem_2", so that the Simulink platform performs PID adjustment based on the second output. After the adjustment is completed, the SimX multi-body model is completely simulated in the SimulationX platform.
[0083] The present invention discloses a joint simulation method based on DDS, including: pre-establishing a first connection between the GCAir platform and the Simulink platform based on the DDS mode, and establishing a second connection between the GCAir platform and the SimulationX platform based on the FMU-TCP mode; acquiring PID control data of the Simulink platform based on the first connection, passing the PID control data to the GCK control system to obtain a first output, passing the first output to the SimulationX platform based on the second connection, controlling the SimX multi-body model based on the first output to obtain a second output; passing the second output to the Simulink platform. In the above process, there is no need to respond to the communication based on the DDS mode. Therefore, the connection mode of the GCAir platform based on DDS connection at one end and FMU-TCP at the other end can avoid the problem of communication failure caused by all TCP-based communications.
[0084] In an embodiment of the present invention, the SimX multi-body model is controlled based on the first output, and a third output can also be obtained, wherein the third output is related to the SimX multi-body model. In an embodiment of the present invention, the third output is not specifically limited, and the third output is transmitted to the GCK control system, and the first output is adjusted based on the third output.
[0085] In the embodiment of the present invention, the simulation process of the landing gear turning system is taken as an example for explanation, and the connection relationship diagram is shown in FIG. Figure 3 As shown, the SimX multi-body model is established based on the CATIA mechanism model. The CATIA mechanism model is an explicit expression that the landing gear can turn, but it cannot move by itself. Therefore, the explicit expression of the mechanism is imported into SimX in a way that SimuationX can obtain, and FMU-TCP establishes a data bridge between SimX and GCAir distributed for driving; the control model established by Simulink realizes the position control of the mechanism movement through the DDS bus. Similarly, the GCK hydraulic and control system controls the SimX multi-body model, and the GCK hydraulic control system model is imported into the GCAir distributed simulation in the form of GCK.
[0086] Furthermore, the data transmission between GCAir and SimulationX and the import relationship between GCAir and GCK are as follows: a model is built inside the subsystem, the GCK model is integrated, and the real-time position (second output) and velocity information (third output) of multiple bodies are obtained through the TCP function. Through the DDS function, the data is sent to the Simulink control model for adjustment. In GCAir, by exporting Cosim-fmu, the model with GCAir interface and IP address can be imported into SimulationX to realize data interaction.
[0087] In the embodiment of the present invention, for the front landing gear turning system, in the established model, SimulationX realizes the modeling of the multi-body system, Simulink realizes the control system model, GCK realizes the hydraulic system model, each model is scheduled by GCAir in different software, and TCP and DDS functional technologies are used to jointly realize the white box distributed simulation of different subsystems between different software.
[0088] Based on the above-mentioned DDS-based joint simulation method, an embodiment of the present invention further provides a DDS-based joint simulation device, characterized in that the device is applied to perform simulation between a GCAir platform, a Simulink platform and a SimulationX platform, wherein a GCK control system is pre-imported into the GCAir platform, a SimX multi-body model is pre-built in the SimulationX platform, and a PID control module with a DDS function is pre-built in the Simulink platform. The mechanism block diagram of the device is as follows: Figure 4 As shown, including:
[0089] Establishing module 201 , acquiring and transmitting module 202 , transmitting and controlling module 203 , and transmitting module 204 .
[0090] in,
[0091] The establishment module 201 is used to establish a first connection between the GCAir platform and the Simulink platform based on the DDS mode in advance, and to establish a second connection between the GCAir platform and the SimulationX platform based on the FMU-TCP mode;
[0092] The acquisition and transfer module 202 is used to acquire the PID control data of the Simulink platform based on the first connection, and transfer the PID control data to the GCK control system to obtain a first output;
[0093] The transmission and control module 203 is used to transmit the first output to the SimulationX platform based on the second connection, and control the SimX multi-body model based on the first output to obtain a second output;
[0094] The transmission module 204 is used to transmit the second output to the Simulink platform, so that the Simulink platform performs PID adjustment based on the second output.
[0095] The present invention discloses a joint simulation method based on DDS, including: pre-establishing a first connection between the GCAir platform and the Simulink platform based on the DDS mode, and establishing a second connection between the GCAir platform and the SimulationX platform based on the FMU-TCP mode; acquiring PID control data of the Simulink platform based on the first connection, passing the PID control data to the GCK control system to obtain a first output, passing the first output to the SimulationX platform based on the second connection, controlling the SimX multi-body model based on the first output to obtain a second output; passing the second output to the Simulink platform. In the above process, there is no need to respond to the communication based on the DDS mode. Therefore, the connection mode of the GCAir platform based on DDS connection at one end and FMU-TCP at the other end can avoid the problem of communication failure caused by all TCP-based communications.
[0096] In the embodiment of the present invention, the establishment module 201 includes:
[0097] Setup unit, publish unit and connect unit.
[0098] in,
[0099] The setting unit is used to pre-set the sldd file, wherein the sldd file includes: data type and data content;
[0100] The publishing unit is used to publish a data transceiver executable file based on the sldd file;
[0101] The connection unit is used to establish a first connection between the GCAir platform and the Simulink platform in a DDS manner based on the data transceiver executable file.
[0102] In the embodiment of the present invention, the establishment module 201 includes:
[0103] Calling units and setting up and connecting units.
[0104] in,
[0105] The calling unit is used to set a TCP module on the GCAir platform and call the TCP module based on the FMU-master method;
[0106] The setting and connecting unit includes setting a GCAir interface on the SimulationX platform, and establishing a second connection with the GCAir platform in an FMU-slave manner on the GCAir interface.
[0107] In the embodiment of the present invention, the transmission module 204 includes:
[0108] A first transfer unit and a second transfer unit.
[0109] in,
[0110] The first transmission unit is used to transmit the second output to the GCAir platform based on the second connection;
[0111] The second transmission unit is used to transmit the second output to the Simulink platform based on the first connection after the GCAir platform receives the second output.
[0112] In the embodiment of the present invention, the transmission and control module 203 further includes:
[0113] Control unit and adjustment unit.
[0114] in,
[0115] The control unit is used to control the SimX multi-body model based on the first output to obtain a third output;
[0116] The adjustment unit is used to transmit the third output to the GCK control system and adjust the first output based on the third output.
[0117] The DDS-based joint simulation device includes: a processor and a memory. The above-mentioned establishment module, acquisition and transmission module, transmission and control module and transmission module are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0118] The processor includes a kernel, which calls the corresponding program unit from the memory. The kernel can be set to one or more, and the communication failure caused by all TCP-based communications can be avoided by adjusting the kernel parameters.
[0119] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0120] An embodiment of the present invention provides a computer storage medium on which a program is stored. When the program is executed by a processor, the DDS-based joint simulation method is implemented.
[0121] An embodiment of the present invention provides a processor, which is used to run a program, wherein the DDS-based joint simulation method is executed when the program is running.
[0122] An embodiment of the present invention provides a device, the structural block diagram of which is as follows Figure 5 As shown, the device includes: a processor 301, a storage medium 302, and a program stored in the storage medium 302 and executable on the processor 302. When the processor 301 executes the program, the following steps are implemented:
[0123] Preliminarily establish a first connection between the GCAir platform and the Simulink platform based on the DDS mode, and simultaneously establish a second connection between the GCAir platform and the SimulationX platform based on the FMU-TCP mode;
[0124] Acquire PID control data of the Simulink platform based on the first connection, and transmit the PID control data to the GCK control system to obtain a first output;
[0125] Passing the first output to the SimulationX platform based on the second connection, and controlling the SimX multi-body model based on the first output to obtain a second output;
[0126] The second output is transmitted to the Simulink platform, so that the Simulink platform performs PID adjustment based on the second output.
[0127] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0128] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0129] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0131] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0132] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0133] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0134] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0135] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0136] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A joint simulation method based on DDS, characterized in that: The method is applied to perform simulation between a GCAir platform, a Simulink platform and a SimulationX platform, wherein a GCK control system is pre-imported into the GCAir platform, a SimX multi-body model is pre-built in the SimulationX platform, and a PID control module with a DDS function is pre-built in the Simulink platform. The method includes: Preliminarily establish a first connection between the GCAir platform and the Simulink platform based on the DDS mode, and simultaneously establish a second connection between the GCAir platform and the SimulationX platform based on the FMU-TCP mode; Acquire PID control data of the Simulink platform based on the first connection, and transmit the PID control data to the GCK control system to obtain a first output; Passing the first output to the SimulationX platform based on the second connection, and controlling the SimX multi-body model based on the first output to obtain a second output; The second output is transmitted to the Simulink platform, so that the Simulink platform performs PID adjustment based on the second output.
2. The DDS-based joint simulation method according to claim 1, characterized in that: Establishing a first connection between the GCAir platform and the Simulink platform based on the DDS mode in advance includes: Pre-setting an sldd file, wherein the sldd file includes: a data type and data content; Publishing a data transceiver executable file based on the sldd file; A first connection is established between the GCAir platform and the Simulink platform using a DDS method based on the data transceiver executable file.
3. The DDS-based joint simulation method according to claim 1, characterized in that: Establishing a second connection between the GCAir platform and the SimulationX platform based on FMU-TCP, including: Setting a TCP module on the GCAir platform and calling the TCP module based on the FMU-master method; A GCAir interface is set on the SimulationX platform, and a second connection is established with the GCAir platform in an FMU-slave manner on the GCAir interface.
4. The DDS-based joint simulation method according to claim 1, characterized in that: The second output is passed to the Simulink platform, including: transmitting the second output to the GCAir platform based on the second connection; After the GCAir platform receives the second output, the second output is transmitted to the Simulink platform based on the first connection.
5. The DDS-based joint simulation method according to claim 1, characterized in that: Controlling the SimX multi-body model based on the first output to obtain a second output further includes: Controlling the SimX multi-body model based on the first output to obtain a third output; The third output is transmitted to the GCK control system, and the first output is adjusted based on the third output.
6. A DDS-based joint simulation device, characterized in that: The device is applied to perform simulation between the GCAir platform, the Simulink platform and the SimulationX platform, wherein the GCK control system is pre-imported in the GCAir platform, the SimulationX platform pre-builds the SimX multi-body model, and the Simulink platform pre-builds the PID control module with the DDS function. The device includes: An establishment module is used to establish a first connection between the GCAir platform and the Simulink platform based on a DDS mode in advance, and to establish a second connection between the GCAir platform and the SimulationX platform based on an FMU-TCP mode; An acquisition and transfer module, configured to acquire PID control data of the Simulink platform based on the first connection, and transfer the PID control data to the GCK control system to obtain a first output; A transfer and control module, used for transferring the first output to the SimulationX platform based on the second connection, and controlling the SimX multi-body model based on the first output to obtain a second output; A transfer module is used to transfer the second output to the Simulink platform so that the Simulink platform performs PID adjustment based on the second output.
7. The DDS-based joint simulation device according to claim 6, characterized in that: The establishment module includes: A setting unit, used for presetting an sldd file, wherein the sldd file includes: a data type and data content; A publishing unit, used for publishing a data transceiver executable file based on the sldd file; A connection unit is used to establish a first connection between the GCAir platform and the Simulink platform in a DDS manner based on the data transceiver executable file.
8. The DDS-based joint simulation device according to claim 6, characterized in that: The establishment module includes: A calling unit, used for setting a TCP module on the GCAir platform and calling the TCP module based on the FMU-master method; The setting and connection unit includes setting a GCAir interface on the SimulationX platform, and establishing a second connection with the GCAir platform in an FMU-slave manner on the GCAir interface.
9. The DDS-based joint simulation device according to claim 6, characterized in that: The transmission module comprises: A first transmission unit, configured to transmit the second output to the GCAir platform based on the second connection; A second transmission unit is configured to transmit the second output to the Simulink platform based on the first connection after the GCAir platform receives the second output.
10. The DDS-based joint simulation device according to claim 6, characterized in that: The transmission and control module also includes: A control unit, configured to control the SimX multi-body model based on the first output to obtain a third output; An adjustment unit is used to transmit the third output to the GCK control system and adjust the first output based on the third output.
11. A storage medium, characterized in that: The storage medium includes a stored program, wherein the program executes the DDS-based joint simulation method according to any one of claims 1 to 5.
12. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes the DDS-based joint simulation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
network information system simulation platform supporting a domestic operation system
CN109800053A
Joint simulation method and device, storage medium and electronic equipment
CN113761745A