WO2022261927A1 - 协同仿真的方法及装置 - Google Patents

协同仿真的方法及装置 Download PDF

Info

Publication number
WO2022261927A1
WO2022261927A1 PCT/CN2021/100865 CN2021100865W WO2022261927A1 WO 2022261927 A1 WO2022261927 A1 WO 2022261927A1 CN 2021100865 W CN2021100865 W CN 2021100865W WO 2022261927 A1 WO2022261927 A1 WO 2022261927A1
Authority
WO
WIPO (PCT)
Prior art keywords
simulation
data
control device
encapsulated
client control
Prior art date
Application number
PCT/CN2021/100865
Other languages
English (en)
French (fr)
Inventor
彭磊
高振龙
王峻涵
王斌
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202180006518.4A priority Critical patent/CN115769213A/zh
Priority to PCT/CN2021/100865 priority patent/WO2022261927A1/zh
Priority to EP21945512.8A priority patent/EP4350511A1/en
Publication of WO2022261927A1 publication Critical patent/WO2022261927A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/02CAD in a network environment, e.g. collaborative CAD or distributed simulation

Definitions

  • the present application relates to the field of simulation, in particular to a method and device for co-simulation.
  • each ECU has independent functions, and the internal core algorithms are usually mastered by key suppliers, which is not in line with the current strategic planning of OEM (Original Equipment Manufacturer, OEM) software development.
  • OEM OEM
  • the functional development platform has become extremely important to the ecosystem of partners such as OEMs, suppliers, and universities. Therefore, the industry proposes a digital vehicle platform, which separates software and hardware by building an intermediate layer, and provides a functional application program interface (Application Program Interface, API) to enable OEMs to quickly develop vehicle functions.
  • API Application Program Interface
  • Vehicle function model in the loop can use various existing simulation models to provide vehicle simulation, these simulation models can include, for example, vehicle chassis simulation models, vehicle body simulation models, vehicle sensor and actuator simulation models, vehicle Running scene simulation model, vehicle API function interface simulation model and vehicle control function simulation model, etc. Therefore, the vehicle function MIL can be applied to the simulation development and verification tool of the digital vehicle platform.
  • the present application provides a co-simulation method and device, which can improve simulation accuracy.
  • the first aspect of the present application provides a co-simulation method.
  • the method includes: during each co-simulation period, sending a plurality of first simulation data to corresponding client control devices in at least one client control device, wherein each client control device is associated with a plurality of simulation models
  • the first simulation data sent to each client control device is the simulation data encapsulated with the input data required for the simulation model simulation corresponding to the client control device.
  • the method further includes: during each co-simulation period, receiving a plurality of second simulation data from the at least one client control device as the plurality of first simulation data in the next co-simulation period, wherein each The second simulation data is obtained by encapsulating a simulation result output by one of the simulation models of the plurality of simulation models with the same data structure, and the simulation result is used as the input data in the next co-simulation cycle, and the data structure can enable The respective simulation results output by the plurality of simulation models are distinguished from each other.
  • the data structure can distinguish the simulation results output by multiple simulation models from each other, and the data structure is used to package the simulation results output by multiple simulation models to obtain the same simulation results as the simulation results.
  • One-to-one correspondence with a plurality of different simulation data therefore, when these simulation data are provided to the multiple simulation models for simulation, each simulation data can be correctly provided to the corresponding simulation module without data interaction errors , so as to improve the co-simulation accuracy.
  • the synchronous simulation of multiple simulation models is realized in the way of co-simulation cycle, so that the data interaction and simulation calculation of multiple simulation models can be carried out at the same progress without disorder, thereby improving the accuracy of co-simulation .
  • the data structure includes at least the following fields: the name of the encapsulated simulation result, the client control device that sends the simulation data encapsulated with the encapsulated simulation result The name of , the data field to which the encapsulated simulation result belongs, and the data value of the encapsulated simulation result.
  • the data structure in addition to the name of the encapsulated simulation result, also includes the name of the client control device that sends the simulation data encapsulated with the encapsulated simulation result and the data field to which the encapsulated simulation result belongs , therefore, using this data structure can distinguish different simulation results in a simple and effective manner.
  • the first simulation data sent to each client control device is determined based on the data routing relationship, wherein the data routing relationship indicates that the multiple first Which client control device each simulation data is to be sent to.
  • the data routing relationship is used to indicate which client control device each of the plurality of first simulation data is to be sent to, and the data routing relationship is used to determine the first simulation data to be sent to each client control device , therefore, the first simulation data to be sent to each client control device can be determined conveniently and quickly.
  • the data routing relationship includes multiple items of data, wherein each item of data includes: one of the plurality of first simulation data The name of the input data encapsulated by the simulation data, the name of the client control device sending the one of the simulation data, the data field to which the input data encapsulated by the one of the simulation data belongs, and the client to receive the one of the simulation data The name of the control device.
  • the data routing relationship is determined by the name of the input data encapsulated by the first simulation data, the name of the client control device that sends the first simulation data, the data field and requirements of the input data encapsulated by the first simulation data.
  • the name of the client control device receiving the first simulation data is used to define which client control device each first simulation data is to be sent to. Therefore, the data routing relationship can be used to define each first simulation data in a simple and effective manner. The destination control device to which the simulation data is going.
  • the co-simulation period is greater than the first duration, and the first duration is equal to the simulation period of the simulation model whose simulation period is the largest among the plurality of simulation models.
  • the co-simulation period is greater than the maximum simulation period among multiple simulation models, so that each simulation calculation of multiple simulation models can be completed together, thus realizing time synchronization of multiple simulation models.
  • the second aspect of the present application provides a co-simulation method.
  • the method includes: during each co-simulation period, acquiring at least one first simulation data from the server-side control device, the at least one first simulation data is an input required for simulation of at least one simulation model encapsulated with a plurality of simulation models The simulation data of the data.
  • the method also includes providing input data parsed from the at least one first simulation data to the at least one simulation model.
  • the method also includes receiving at least one simulation result output by the at least one simulation model during each co-simulation cycle.
  • the method also includes: during each co-simulation period, sending at least one second simulation data to the server-side control device, wherein each second simulation data is one of the packages of the at least one simulation result in the same data structure
  • each second simulation data is one of the packages of the at least one simulation result in the same data structure
  • the data structure can distinguish the simulation results output by multiple simulation models from each other, and the data structure is used to package the simulation results output by multiple simulation models to obtain the same simulation results as the simulation results.
  • One-to-one correspondence with a plurality of different simulation data therefore, when these simulation data are provided to the multiple simulation models for simulation, each simulation data can be correctly provided to the corresponding simulation module without data interaction errors , so as to improve the co-simulation accuracy.
  • the data structure includes at least the following fields: the name of the encapsulated simulation result, and the client control for sending the simulation data encapsulated with the encapsulated simulation result The name of the device, the data field to which the packaged simulation result belongs, and the data value of the packaged simulation result.
  • the data structure in addition to the name of the encapsulated simulation result, also includes the name of the client control device that sends the simulation data encapsulated with the encapsulated simulation result and the The data field, therefore, makes it possible to differentiate between different simulation results in a simple and efficient manner using this data structure.
  • the co-simulation period is greater than the first duration, and the first duration is equal to the simulation period of the simulation model whose simulation period is the largest among the plurality of simulation models.
  • the co-simulation period is greater than the maximum simulation period among multiple simulation models, so that each simulation calculation of multiple simulation models can be completed together, thus realizing time synchronization of multiple simulation models.
  • a third aspect of the present application provides a server-side control device.
  • the server-side control device includes a sending module and a receiving module.
  • the sending module is used to send a plurality of first simulation data to corresponding client control devices in at least one client control device during each co-simulation period, wherein each client control device is connected to a plurality of simulation models.
  • the first simulation data sent to each client control device is the simulation data encapsulated with the input data required for the simulation model simulation corresponding to the client control device.
  • the receiving module is configured to receive a plurality of second simulation data from the at least one client control device during each co-simulation period as the plurality of first simulation data in the next co-simulation period, wherein each second simulation
  • the data is obtained by encapsulating a simulation result output by one of the simulation models with the same data structure, and the simulation result is used as input data in the next co-simulation cycle.
  • This data structure can make the simulation results output by the multiple simulation models mutually distinguish.
  • the data structure includes at least the following fields: the name of the encapsulated simulation result, the client sending the simulation data encapsulated with the encapsulated simulation result The name of the control device, the data field to which the packaged simulation result belongs, and the data value of the packaged simulation result.
  • the first simulation data sent to each client-side control device is determined based on the data routing relationship, wherein the data routing relationship indicates that the plurality of first A client control device to which simulation data is to be sent respectively.
  • the data routing relationship includes multiple items of data, wherein each item of data includes: among the plurality of first simulation data The name of the input data encapsulated by one of the simulation data, the name of the client control device sending the one of the simulation data, the data field to which the input data encapsulated by the one of the simulation data belongs, and the one of the simulation data to be received The name of the client control device.
  • the co-simulation period is greater than the first duration, and the first duration is equal to the simulation period of the simulation model whose simulation period is the largest among the plurality of simulation models.
  • a fourth aspect of the present application provides a client control device.
  • the client control device includes an obtaining module, a providing module, a receiving module and a sending module.
  • the obtaining module is used to obtain at least one first simulation data from the server-side control device during each co-simulation cycle, and the at least one first simulation data is an input required for simulation of at least one simulation model encapsulated in a plurality of simulation models The simulation data of the data.
  • the providing module is used for providing the at least one simulation model with input data parsed from the at least one first simulation data.
  • the receiving module is used for receiving at least one simulation result output by the at least one simulation model during each co-simulation cycle.
  • the sending module is configured to send at least one second simulation data to the server-side control device during each co-simulation cycle, wherein each second simulation data is obtained by encapsulating the at least one simulation result in the same data structure Yes, the data structure can make each simulation result output by the plurality of simulation models distinguish from each other.
  • the data structure includes at least the following fields: the name of the encapsulated simulation result, the client sending the simulation data encapsulated with the encapsulated simulation result The name of the control device, the data field to which the packaged simulation result belongs, and the data value of the packaged simulation result.
  • the co-simulation period is greater than the first duration, and the first duration is equal to the simulation period of the simulation model whose simulation period is the largest among the plurality of simulation models.
  • a fifth aspect of the present application provides a control system, which includes: the server-side control device in the third aspect or any possible implementation thereof, and the client in the fourth aspect or any possible implementation thereof control device.
  • a sixth aspect of the present application provides a computing device comprising at least one processor and at least one memory storing program instructions that when executed by the at least one processor cause the at least one processing
  • the device executes the method in the first aspect or any possible implementation thereof, or, the method in the second aspect or any possible implementation thereof.
  • a sixth aspect of the present application provides a computer-readable storage medium on which program instructions are stored, and when the program instructions are executed by a computer, the computer executes the method in the first aspect or any possible implementation thereof , or, the method in the second aspect or any possible implementation manner thereof.
  • a seventh aspect of the present application provides a computer program product, which includes program instructions, and when the program instructions are executed by a computer, the computer executes the method in the first aspect or any possible implementation manner thereof, or, The method in the second aspect or any possible implementation thereof.
  • FIG. 1 is a schematic structural diagram of a control system for controlling multiple simulation models for co-simulation according to an embodiment of the present application
  • Fig. 2 is the flow chart of the method for co-simulation according to the embodiment of the present application.
  • Fig. 3 is the flow chart of the method for co-simulation according to the embodiment of the present application.
  • FIG. 4 is a schematic diagram of a server-side control device according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a client control device according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a control system for controlling multiple simulation models for co-simulation according to a specific implementation of the present application
  • FIG. 7 is a schematic flowchart of a method for co-simulation according to a specific implementation of the present application.
  • FIG. 8 is a schematic diagram of a synchronous simulation according to a specific implementation of the present application.
  • Fig. 9 is a schematic diagram of data interaction according to a specific implementation manner of the present application.
  • FIG. 10 is a schematic diagram of a computing device according to an embodiment of the application.
  • ECU Electronic Control Unit
  • electronic control unit electronic control unit. It consists of a microprocessor (MCU), memory (ROM, RAM), input/output interface (I/O), analog-to-digital converter (A/D), and large-scale integrated circuits such as shaping and driving, and controls various components of the vehicle. part.
  • MCU microprocessor
  • ROM read-only memory
  • RAM random access memory
  • I/O input/output interface
  • A/D analog-to-digital converter
  • large-scale integrated circuits such as shaping and driving, and controls various components of the vehicle. part.
  • MIL Model in Loop
  • model in the loop test in the automobile development simulation, in addition to establishing the simulation model of the vehicle dynamics related to the controller and the simulation model of the control and components, it is also necessary to establish the simulation model of the controlled object and the simulation model of the scene visualization.
  • the controlled objects are connected to form a closed loop, and the simulation effect is displayed and confirmed through scene visualization.
  • SOA Service Oriented Architecture
  • service-oriented architecture It splits the different service units of the application and connects them through well-defined interfaces and protocols.
  • the interface is defined in a neutral way, it should be independent of the hardware platform, operating system and programming language that implements the service. This enables services built in various subsystems to interact in a unified and generic way.
  • SOA When SOA is used for the simulation and verification of MIL of the whole vehicle, establish the subsystem of the controlled object, the subsystem of vehicle dynamics and the subsystem of control and components, and define the co-simulation and verification of MIL of the whole vehicle and the model simulation of each subsystem
  • the interfaces and protocols between them interact in a unified and common way to improve the accuracy and efficiency of the co-simulation and verification of the vehicle MIL.
  • the embodiment of the present application proposes a method and device for co-simulation, which uses the designed data structure to package each simulation result output by each simulation module or simulation software, so that each packaged simulation result is not its name. The same can be distinguished from each other, so that when these simulation results are provided to various simulation modules as simulation inputs, data can be correctly provided to these simulation modules without data interaction errors, thereby improving simulation accuracy.
  • Fig. 1 shows a schematic architecture diagram of a control system for controlling co-simulation of multiple simulation models according to an embodiment of the present application.
  • the control system 10 shown in FIG. 1 adopts a server-client mode to control multiple simulation models 20 to perform co-simulation, and the entire co-simulation process is completed through multiple co-simulation cycles.
  • the simulation model 20 can be any module that can provide simulation functions, for example including but not limited to a vehicle chassis simulation model, a vehicle body simulation model, a vehicle sensor and actuator simulation model, a vehicle running scene simulation model, and a vehicle API function interface simulation model And the vehicle control function simulation model, etc.
  • the control system 10 includes a server part and a client part, wherein the server part of the control system 10 may include a server-side control device 30 , and the client part of the control system 10 may include at least one client-side control device 40 .
  • the server-side control device 30 and the client-side control device 40 can carry out data interaction by means of any suitable communication protocol, which for example may include but not limited to Transmission Control Protocol/Internet Protocol (Transmission Control Protocol/Internet Protocol, TCP/IP )Wait.
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • Each client control device 40 may correspond to and be associated with at least one simulation model in the plurality of simulation modules 20, so as to control the corresponding and associated simulation module to perform simulation calculation.
  • the server-side control device 30 and each client control device 40 cooperate with each other to provide the multiple simulation models 20 with inputs required for simulation
  • the data enables the multiple simulation models 20 to perform a simulation calculation, and receive the simulation results output by the multiple simulation models 20 as the input data required for the multiple simulation models 20 to simulate in the next co-simulation cycle.
  • the server part and the client part included in the control system 10 can be located in the same computing device, and the computing device can be any suitable device with computing capabilities, such as including but not limited to desktop servers, desktop Computers, laptops, industrial controllers, cloud servers, etc.
  • the server part and the client part included in the control system 10 may be respectively located in different computing devices.
  • each of the multiple client control apparatuses 40 may be located in the same computing device or in different computing devices.
  • Fig. 2 shows a flow chart of a co-simulation method according to an embodiment of the present application.
  • the method shown in FIG. 2 can be executed by, but not limited to, the server-side control device 30 shown in FIG. 1, for example.
  • the server-side control device 30 may be, for example but not limited to, the control device 620 described below.
  • the method shown in FIG. 2 may include steps S210 and S220.
  • step S210 during each co-simulation period, send a plurality of first simulation data to corresponding client control devices in the at least one client control device 40, wherein each client control device 40 is connected to all Corresponding to at least one of the plurality of simulation models 20, the first simulation data sent to each client control device 40 is packaged with the input data required for simulation of the simulation model 20 corresponding to the client control device 40 simulation data.
  • the plurality of first simulation data in the current co-simulation cycle is the second simulation data that will be described later in the previous co-simulation cycle data.
  • the plurality of first simulation data of the current co-simulation cycle can be any suitable data, such as but not limited to manually configured in advance data or default data etc.
  • the sending of the plurality of first simulation data to the at least one client control device 40 may be actively performed by the server-side control device 30 . In some embodiments, the sending of the plurality of first simulation data to the at least one client control device 40 may be performed by the server-side control device 30 after receiving a request from the at least one client control device 40 of.
  • the plurality of first simulation data may be stored in the server-end control device 30 before being sent.
  • the plurality of first simulation data may be stored outside the server-side control device 30 before being sent, in this case, for example, may be stored in the data device 610 described below.
  • step S220 during each co-simulation period, a plurality of second simulation data is received from the at least one client control device 40 as the plurality of first simulation data in the next co-simulation period, wherein each The second simulation data is obtained by encapsulating a simulation result output by one of the simulation models 20 with the same data structure, and the simulation result is used as the input data in the next co-simulation cycle, and the data structure enables the The respective simulation results output by the plurality of simulation models 20 are distinguished from each other.
  • the data structure can make the simulation results output by the multiple simulation models 20 distinguish from each other, so that the simulation results output by the multiple simulation models 20 are packaged with the data structure, and the A plurality of different simulation data corresponding to each simulation result will be obtained, therefore, when these simulation data are provided to the plurality of simulation models 20 for simulation in the next co-simulation cycle, each simulation data can be correctly Provided to the corresponding simulation modules without data interaction errors, thereby improving the accuracy of co-simulation.
  • the synchronous simulation of the multiple simulation models 20 is realized in the form of a co-simulation cycle, so that the data interaction and simulation calculation of the multiple simulation models 20 are performed at the same pace without disorder In this way, the co-simulation accuracy can also be improved.
  • the data structure may at least include the following fields: the name of the encapsulated simulation result, the name of the client control device sending the simulation data encapsulated with the encapsulated simulation result, the encapsulated The data field to which the simulation result belongs, and the data value of the packaged simulation result.
  • the data field is used to indicate which field the data belongs to.
  • the data fields may include, but are not limited to, suspensions, brakes, seats, windows, etc., for example.
  • the data structure in addition to the name of the encapsulated simulation result, the data structure also includes the name of the client control device sending the simulation data encapsulated with the encapsulated simulation result and the data to which the encapsulated simulation result belongs domains, thus, using the data structure enables different simulation results to be distinguished in a simple and efficient manner.
  • the first simulation data sent to each client control device 40 is determined based on a data routing relationship, wherein the data routing relationship indicates that each of the plurality of first simulation data is to be sent to Which client controls the device.
  • the first simulation data sent to each client control device 40 is determined based on the data routing relationship, and when the first simulation data is about to be sent to the client control device 40
  • the server-side control device 30 executes.
  • the server-side control device 30 may determine the data to be sent to each client control device based on the data routing relationship.
  • the first simulation data of the device 40 the server-side control device 30 can send the first simulation data to be sent to each client control device 40.
  • a simulated data is placed in the sending queue of the client control device to wait for sending.
  • a simulation data and then send each first simulation data based on the name of the client control device to be sent written in the first simulation data when sending.
  • the data routing relationship is used to indicate which client control device each of the plurality of first simulation data is to be sent to, and the data routing relationship is used to determine the first client control device to be sent to each client control device. Simulation data, therefore, the first simulation data to be sent to each client control device can be determined conveniently and quickly.
  • the data routing relationship includes multiple items of data, wherein each item of data includes: the name of the input data encapsulated by one of the multiple first simulation data, sending the wherein The name of the client control device of one simulation data, the data field to which the input data encapsulated by the one of the simulation data belongs, and the name of the client control device to receive the one of the simulation data.
  • the data field is used to indicate which field the data belongs to.
  • the data fields may include, but are not limited to, suspensions, brakes, seats, windows, etc., for example.
  • the data routing relationship is defined by the name of the input data encapsulated by the first simulation data, the name of the client control device that sends the first simulation data, the data field and the requirements of the input data encapsulated by the first simulation data.
  • the name of the client control device receiving the first simulation data is used to define which client control device each first simulation data is to be sent to. Therefore, the data routing relationship can be used to define each first simulation data in a simple and effective manner. The destination control device to which the simulation data is going.
  • the co-simulation period is greater than a first duration, and the first duration is equal to the simulation period of the simulation model whose simulation period is the largest among the plurality of simulation models 20. .
  • the co-simulation period is greater than the maximum simulation period in the plurality of simulation models 20, so that each simulation calculation of the plurality of simulation models 20 can be completed together, therefore, the realization of the plurality of simulation models 20 Time synchronization to improve simulation efficiency.
  • Fig. 3 shows a flow chart of a co-simulation method according to an embodiment of the present application.
  • the method shown in FIG. 3 can be executed by, for example but not limited to, one of the client control devices 40 shown in FIG. 1 .
  • the client control device 40 may be, for example but not limited to, the control device 630 described below.
  • the method shown in FIG. 3 may include steps S310, S320, S330 and S340.
  • step S310 during each co-simulation cycle, at least one first simulation data is obtained from the server-side control device 30, wherein the at least one first simulation data is packaged with at least one of the plurality of simulation models 20
  • the simulation model 20 is simulation data of input data required for simulation.
  • obtaining at least one first simulation data from the server-side control device 30 may be: when the server-side control device 30 actively sends the at least one first simulation data to the client control device 40, the client The control device 40 receives the at least one first simulation data sent by the server-side control device 30 .
  • obtaining at least one first simulation data from the server-side control device 30 may be: the client-side control device 40 requests the server-side control device 30 for the first simulation data, and when the server-side control device 30 responds to the When requesting to send the at least one first simulation data to the client control device 40 , the client control device 40 receives the at least one first simulation data sent by the server control device 30 .
  • step S320 the input data parsed from the at least one first simulation data is provided to the at least one simulation model 20 .
  • the at least one simulation model 20 starts simulation calculation after receiving the input data.
  • step S330 at least one simulation result output by the at least one simulation model 20 is received during each co-simulation cycle.
  • the at least one simulation result is a result obtained by performing simulation calculation by the at least one simulation model 20 using the received input data.
  • step S340 during each co-simulation period, at least one second simulation data is sent to the server-side control device 30, wherein each second simulation data is one of the at least one simulation results in the same data structure
  • the data structure is obtained by encapsulation, and the simulation results output by the plurality of simulation models 20 can be distinguished from each other.
  • the data structure can make the simulation results output by the multiple simulation models 20 distinguish from each other, so that the data structure is used to package the simulation results output by the multiple simulation models 20, and it will be obtained A plurality of different simulation data corresponding to each simulation result one-to-one, therefore, each simulation data can be correctly provided to the simulation model 20 in the next co-simulation cycle Corresponding simulation modules without data interaction errors, thus improving the co-simulation accuracy.
  • the data structure may at least include the following fields: the name of the encapsulated simulation result, the name of the client control device that sends the simulation data encapsulated with the encapsulated simulation result, the encapsulated The data field to which the simulation result belongs, and the data value of the packaged simulation result.
  • the data field is used to indicate which field the data belongs to.
  • the data fields may include, but are not limited to, suspensions, brakes, seats, windows, etc., for example.
  • the data structure in addition to the name of the encapsulated simulation result, also includes the name of the client control device that sends the simulation data encapsulated with the encapsulated simulation result and the data to which the encapsulated simulation result belongs domains, thus, using the data structure enables different simulation results to be distinguished in a simple and efficient manner.
  • the co-simulation period is greater than a first duration, and the first duration is equal to the simulation period of the simulation model whose simulation period is the largest among the plurality of simulation models 20 . .
  • the co-simulation period is greater than the maximum simulation period in the plurality of simulation models 20, so that each simulation calculation of the plurality of simulation models 20 can be completed together, therefore, the realization of the plurality of simulation models 20 Time synchronization to improve simulation efficiency.
  • Fig. 4 shows a schematic diagram of a server-side control device according to an embodiment of the present application.
  • the server-side control device 30 may include a sending module 410 and a receiving module 420 .
  • the sending module 410 may be configured to send a plurality of first simulation data to corresponding client control devices in the at least one client control device 40 during each co-simulation period, wherein each client control device The device 40 corresponds to at least one of the plurality of simulation models 20, and the first simulation data sent to each client control device 40 is encapsulated with the input required for the simulation model simulation corresponding to the client control device The simulation data of the data.
  • the receiving module 420 may be configured to receive a plurality of second simulation data from the at least one client control device 40 during each co-simulation cycle as the plurality of first simulation data in the next co-simulation cycle, wherein, Each second simulation data is obtained by encapsulating a simulation result output by one of the simulation models 20 in the same data structure, and the simulation result is used as the input data in the next co-simulation cycle, and the data structure can enable The respective simulation results output by the plurality of simulation models 20 are distinguished from each other.
  • the data structure includes at least the following fields: the name of the packaged simulation result, the name of the client control device sending the simulation data packaged with the packaged simulation result, the packaged simulation The data field to which the result belongs, and the data value of the encapsulated simulation result.
  • the first simulation data sent to each client control device is determined based on a data routing relationship, wherein the data routing relationship indicates which of the plurality of first simulation data is to be sent to Client control device.
  • the data routing relationship includes multiple items of data, wherein each item of data includes the name of the input data encapsulated by one of the multiple first simulation data, and sending the one The name of the client control device of the simulation data, the data field to which the input data encapsulated by the one of the simulation data belongs, and the name of the client control device to receive the one of the simulation data.
  • the co-simulation period is greater than a first duration, and the first duration is equal to the simulation period of the simulation model whose simulation period is the largest among the plurality of simulation models.
  • Fig. 5 shows a schematic diagram of a client control device according to an embodiment of the present application.
  • the client control device 40 may include an acquiring module 510 , a providing module 520 , a receiving module 530 and a sending module 540 .
  • the acquisition module 510 may be configured to acquire at least one first simulation data from the server-side control device 30 during each co-simulation cycle, the at least one first simulation data is packaged with at least one of the plurality of simulation models 20 The simulation data of the input data required for the simulation of the simulation model.
  • the providing module 520 may be configured to provide the input data parsed from the at least one first simulation data to the at least one simulation model.
  • the receiving module 530 may be configured to receive at least one simulation result output by the at least one simulation model during each co-simulation period.
  • the sending module 540 may be configured to send at least one second simulation data to the server-side control device 30 during each co-simulation cycle, wherein each second simulation data is an image of the at least one simulation result in the same data structure One of them is obtained by encapsulation, and the data structure is capable of distinguishing the simulation results output by the plurality of simulation models 20 from each other.
  • Fig. 6 shows a schematic diagram of a control system according to a specific implementation of the present application.
  • the control system 600 adopts the server-client mode to control multiple vehicle simulation models for collaborative simulation, which includes a server part and a client part, wherein the client part and the server part communicate through TCP/IP , to realize the data interaction in the simulation process.
  • the server portion of the control system 600 includes a data device 610 and a control device 620 .
  • the data device 610 may store data routing relationships and data received by the control device 620 from the control device 630 described below.
  • the client portion of the control system 600 includes four control devices 630 .
  • the first control device 630 corresponds to and is associated with the sensor simulation model and the actuator simulation model, and is used to control the simulation calculation of the sensor simulation model and the actuator simulation model, among which the first control device 630 and its corresponding sensor simulation model
  • the model and actuator simulation model constitute the controlled object subsystem.
  • the first control device 630 is set to have the same name as the controlled object subsystem where it is located.
  • the second control device 630 is corresponding and associated with the dynamics simulation model and the driving scene simulation model, etc., and is used to control the simulation calculation of the dynamics simulation model and the driving scene simulation model, etc., wherein the second control device 630 and its corresponding The dynamics simulation model and the driving scene simulation model constitute the vehicle dynamics subsystem.
  • the second control device 630 is set to have the same name as the vehicle dynamics subsystem in which it is located.
  • the third control device 630 corresponds to and is associated with the battery simulation model and the thermal management simulation model, and is used to control the simulation calculation of the battery simulation model and the thermal management simulation model, among which the third control device 630 and its corresponding battery simulation model Models and thermal management simulation models constitute the control and component subsystems.
  • the third control 630 is set to have the same name as the control and components subsystem in which it resides.
  • the fourth control device 630 is corresponding and associated with the vehicle window visualization simulation model and the seat visualization simulation model, and is used to control the simulation calculation of the vehicle window visualization simulation model and the seat visualization simulation model, etc., wherein the fourth control device 630 And its corresponding window visualization simulation model and seat visualization simulation model constitute the scene visualization subsystem.
  • the fourth control device 630 is set to have the same name as the scene visualization subsystem in which it is located.
  • Fig. 6 is an example of client deployment, which configures the subsystem functions implemented by each control device in the client part and the corresponding and associated simulation models according to the classification of simulation functions.
  • different numbers of control devices can be configured in the client part according to actual scenarios, the subsystem functions realized by each control device, and the corresponding simulation models that can be configured in each subsystem.
  • the data device 610, the control device 620, and the control device 630 may be located in a synchronous computer room or deployed in a distributed manner.
  • Fig. 7 shows a flowchart of a method for controlling co-simulation of multiple vehicle simulation models according to a specific embodiment of the present application. As shown in FIG. 7 , the method 700 may include steps S710 to S750.
  • step S710 the fields contained in the data structure DS for encapsulating each simulation result output by each vehicle simulation module and the configuration data routing relationship are set.
  • each simulation result output by each simulation model of each subsystem is obtained, and the data structure DS is set to include the following fields:
  • the name of the simulation result indicates the name of the simulation result encapsulated by the data structure DS.
  • the name of the control device indicates the name of the control device 630 that sends the simulation result encapsulated in the data structure DS to the control device 620 .
  • each control device 630 has the same name as its subsystem, therefore, the name of the control device here can also be considered as the control device 630 that sends the simulation result encapsulated in the data structure DS to the control device 620
  • the name of the subsystem it is on.
  • the subsystems include the controlled object subsystem, the vehicle dynamics subsystem, the control and components subsystem, and the scene visualization subsystem.
  • the data domain is used to indicate which domain data the simulation result encapsulated by the data structure DS is.
  • the data fields may include, for example, suspensions, brakes, seats, windows, and the like.
  • the period is the time label of the simulation result encapsulated in the data structure DS, indicating in which co-simulation period the simulation result is generated.
  • the data field represents the data type of the simulation result encapsulated by the data structure DS, which may include but not limited to integer type, double-precision integer type, character type, etc., for example.
  • the data value represents the data value of the simulation result encapsulated by the data structure DS.
  • the name of the simulation result, the name of the control device and the data field constitute the data label of the simulation result encapsulated by the data structure DS.
  • the data label is used as the unique identifier of the simulation result to solve the problem of simulation Complexity issues with result data names, such as different simulation results using the same name.
  • each vehicle simulation model of each subsystem obtains the input data definition of each vehicle simulation model of each subsystem, sort out the correspondence between the input data of each vehicle simulation model in each co-simulation cycle and the simulation results of each vehicle simulation model in the previous co-simulation cycle
  • the data routing relationship is determined to indicate which control device 630 the simulation data packaged with the simulation results from each control device 630 in each co-simulation cycle is to be provided in the next co-simulation cycle.
  • the data routing relationship may be a data routing relationship table, the data routing relationship table includes multiple items of data, each item of data includes a data label of one of the simulation results and uses one of the simulation results as input data
  • the name of the control device 630 corresponding to and associated with the vehicle simulation model. Wherein, as described above, the name of the control device 630 may also be represented by the name of the subsystem where the control device 630 is located.
  • step S720 a co-simulation cycle is configured.
  • the simulation period of each vehicle simulation model in each subsystem is obtained, and the co-simulation period is determined, wherein the co-simulation period is greater than the simulation period of the vehicle simulation model with the largest simulation period among the various vehicle simulation models of all subsystems cycle.
  • This defined co-simulation cycle is used by the control device 620 and the individual control devices 630 .
  • Steps S710 and S720 are completed before the start of the co-simulation process, for example but not limited to manually.
  • step S730 the control device 620 sends the simulation data encapsulated with the simulation result as the input data to the control device 630 of each subsystem.
  • the control device 620 sends each simulation data stored in the data device 610 to the corresponding control device 630 of each subsystem. Which control device 630 each simulation data is to be sent to is determined based on the data routing relationship stored in the data device 610 and the respective data tags of the simulation data.
  • the respective simulation data stored in the data device 610 are the data of the respective encapsulated simulation results received from the respective control devices 630 during the last co-simulation cycle, which is the vehicle simulation in the corresponding control device 630 with the data structure DS
  • the simulation results output by the module are encapsulated.
  • each control device 630 receives and analyzes the simulation data sent by the control device 620, invokes the corresponding vehicle simulation model for simulation, and packages the simulation result output by the vehicle simulation model as simulation data, and sends it to the control device 620.
  • each control device 630 receives the simulation data from the control device 620, analyzes the received simulation data based on the data structure DS, and obtains the simulation result encapsulated by the simulation data as input data, and uses the simulation model API interface as input data
  • the simulation results of the vehicle simulation model are provided to the corresponding vehicle simulation model to drive the vehicle simulation model to perform simulation calculations, each simulation result output by the vehicle simulation model is received, and each simulation result received is packaged into simulation data based on the data structure DS to generate One or more pieces of simulation data, and sending the generated simulation data to the control device 620 in the current co-simulation cycle.
  • step S750 the control device 620 receives simulation data from each control device 630 and stores them in the data device 610, and these simulation data will be sent to the control device 630 in the next co-simulation cycle.
  • steps S730, S740 and S750 are executed sequentially until the simulation ends.
  • Fig. 8 shows a schematic diagram of co-simulation in a co-simulation cycle according to a specific implementation manner of the present application.
  • Figure 8 shows the co-simulation of each vehicle simulation module in the controlled object subsystem, the vehicle dynamics subsystem, the control and component subsystem and the scene visualization subsystem in the nth co-simulation cycle, wherein the co-simulation The duration of the cycle is T.
  • the respective control devices 630 of the plant subsystem, the vehicle dynamics subsystem, the control and component subsystem, and the scene visualization subsystem receive the package sent by the control device 620 as input data at time nT The simulation data of the simulation results.
  • the control device 630 of each subsystem analyzes the received simulation data to obtain the simulation result encapsulated in the simulation data as input data.
  • the control device 630 of each subsystem provides the obtained simulation results as input data to the corresponding vehicle simulation model to drive the vehicle simulation model to perform simulation calculations.
  • the control device 630 of each subsystem receives each simulation result output by the corresponding vehicle simulation module.
  • the control device 630 of each subsystem encapsulates each simulation result received into a simulation data in a data structure DS.
  • the control device 630 of the controlled object subsystem After receiving the simulation data from the control device 620, the control device 630 of the controlled object subsystem completes the encapsulation of the simulation results after T1 time. Therefore, the control device 630 of the controlled object subsystem sends the encapsulation to the control device 620 at time nT+T1 The obtained simulation data.
  • the control device 630 of the vehicle dynamics subsystem After receiving the simulation data from the control device 620, the control device 630 of the vehicle dynamics subsystem completes the encapsulation of the simulation results after T2 time. Therefore, the control device 630 of the vehicle dynamics subsystem sends the encapsulation to the control device 620 at time nT+T2 The obtained simulation data.
  • the control device 630 of the control and component subsystem After receiving the simulation data from the control device 620, the control device 630 of the control and component subsystem completes the encapsulation of the simulation results after T3 time. Therefore, the control device 630 of the control and component subsystem sends the encapsulation to the control device 620 at time nT+T3 The obtained simulation data.
  • the control device 630 of the scene visualization subsystem After receiving the simulation data from the control device 620, the control device 630 of the scene visualization subsystem completes the encapsulation of the simulation results after T4 time. Therefore, the control device 630 of the scene visualization subsystem sends the packaged results to the control device 620 at time nT+T4. simulation data.
  • Fig. 9 shows a schematic diagram of data interaction according to a specific implementation manner of the present application.
  • the data interaction shown in FIG. 9 is a more detailed description of the operations in the aforementioned steps S730, S740 and S750.
  • the control device 620 sends each simulation data stored in the data device 610 to the corresponding control device 630 via the TCP/IP communication protocol.
  • each simulation data has been placed in the sending queue of the corresponding control device 630 in the data device 610, or each simulation data
  • the data are each already written with the name of the control device 630 to be sent, and the control device 620 sends these simulation data directly.
  • control device 620 determines that each simulation data is to be sent to To which data device(s) 610, and based on the determination result, the respective emulation data is sent.
  • control device 620 may be actively initiated by the control device 620 .
  • the above operations of the control device 620 may be initiated when the control device 630 of each subsystem sends a message requesting simulation data to it.
  • the control device 630 of each subsystem receives one or more simulation data sent by the control device 620, and analyzes the received simulation data to obtain a simulation result encapsulated by the simulation data as input data of the vehicle simulation model.
  • the control device 630 of each subsystem provides various simulation results obtained as input data to the corresponding vehicle simulation model by calling the API of the simulation model, so as to drive the vehicle simulation model to perform simulation calculation.
  • Each vehicle simulation model in each subsystem uses the input data received from the control device 630 to perform simulation calculation, and outputs the simulation result obtained by the simulation calculation to the corresponding and associated control device 630 .
  • the control device 630 of each subsystem encapsulates each simulation result received from the vehicle simulation model into one simulation data, thereby obtaining one or more simulation data, and sends the obtained simulation data to the control system in the current co-simulation cycle device 620 .
  • the control device 620 receives each simulation data sent by the control device 630 of each subsystem, and processes the received simulation data in one of the following three ways.
  • control device 620 directly stores the simulated data received from the control device 630 in the data device 610 without any processing.
  • the control device 620 determines which control device(s) 630 each simulation data will be sent to in the next co-simulation cycle , and according to the determination result, these simulation data are respectively stored in the sending queue of the corresponding control device 630 in the data device 610, waiting to be sent in the next co-simulation cycle.
  • the control device 620 determines which control device(s) 630 each simulation data will be sent to in the next co-simulation cycle , and according to the determination result, write the name of the control device 630 to be sent to each simulation data in the next co-simulation cycle, and then store the simulation data in the data device 610 .
  • a specific implementation of a method for controlling multiple simulation models for co-simulation is used for SOA vehicle MIL co-simulation, covering multiple subsystem fields of controlled objects, vehicle dynamics, control components and control, and scene visualization
  • the simulation model through setting the first data structure, solves the data complexity problem between the two subsystems, and co-simulates and verifies the results in the field of function and performance of the vehicle MIL, which improves the SOA vehicle MIL simulation and Verification accuracy and efficiency.
  • FIG. 10 is a structural schematic diagram of a computing device according to an embodiment of the present application.
  • the computing device 1000 may include: a processor 1010 , a memory 1020 , a communication interface 1030 , and a bus 1040 .
  • the communication interface 1030 in the computing device 1000 shown in FIG. 10 can be used to communicate with other devices.
  • the processor 1010 may be connected to the memory 1020 .
  • the memory 1020 can be used to store the program codes and data. Therefore, the memory 1020 may be an internal storage module of the processor 1010, or an external storage module independent of the processor 1010, or may include an internal storage module of the processor 1010 and an external storage module independent of the processor 1010. part.
  • the computing device 1000 may further include a bus 1040 .
  • the memory 1020 and the communication interface 1030 may be connected to the processor 1010 through the bus 1040 .
  • the bus 1040 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus or the like.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the bus 1040 can be divided into address bus, data bus, control bus and so on. For ease of representation, only one line is used in FIG. 10 , but it does not mean that there is only one bus or one type of bus.
  • the processor 1010 may use a central processing unit (central processing unit, CPU).
  • the processor can also be other general-purpose processors, digital signal processors (digital signal processors, DSPs), application specific integrated circuits (application specific integrated circuits, ASICs), off-the-shelf programmable gate arrays (field programmable gate arrays, FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the processor 1010 adopts one or more integrated circuits for executing related programs, so as to implement the technical solutions provided by the embodiments of the present application.
  • the memory 1020 may include read-only memory and random-access memory, and provides instructions and data to the processor 1010 .
  • a portion of processor 1010 may also include non-volatile random access memory.
  • processor 1010 may also store device type information.
  • the processor 1010 executes computer-implemented instructions in the memory 1020 to perform the operation steps of the above method.
  • the computing device 1000 may correspond to a corresponding body executing the method according to each embodiment of the present application, and the above-mentioned and other operations and/or functions of each module in the computing device 1000 are for realizing the present invention For the sake of brevity, the corresponding processes of the methods in the embodiments are not repeated here.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
  • the embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it is used to execute a method for controlling multiple simulation models for co-simulation, and the method includes the above-mentioned At least one of the solutions described in the examples.
  • the computer readable medium may be a computer readable signal medium or a computer readable storage medium.
  • a computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer readable signal medium may include a data signal in baseband or propagated as part of a carrier wave with computer readable program code embodied therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. .
  • Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • Computer program code for performing the operations of the present application may be written in one or more programming languages or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional Procedural Programming Language - such as "C" or a similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through the Internet using an Internet service provider). connect).
  • LAN local area network
  • WAN wide area network
  • connect such as AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种协同仿真的方法和装置,涉及仿真领域,尤其是车辆仿真领域,该方法包括:在每个协同仿真周期期间,将多个第一仿真数据分别发送给至少一个客户端控制装置中相应的客户端控制装置,给每一个客户端控制装置发送的第一仿真数据是封装有与该客户端控制装置对应的仿真模型仿真所需的输入数据的仿真数据。该方法还包括:在每个协同仿真周期期间,从至少一个客户端控制装置接收多个第二仿真数据,每一个第二仿真数据是以相同的数据结构对其中一个仿真模型输出的一个仿真结果进行封装得到的数据,仿真结果在下一个协同仿真周期用作输入数据,数据结构能够使多个仿真模型输出的各个仿真结果彼此区分。利用该方法和装置,能够提高仿真精度。

Description

协同仿真的方法及装置 技术领域
本申请涉及仿真领域,特别涉及协同仿真的方法及装置。
背景技术
随着智能汽车的浪潮席卷全球汽车工业,汽车软件功能开发已经成为汽车创新、差异化、提升品牌力的关键环节。全新整车开发周期大概为28~36个月,其中能够支撑软件功能开发与验证的时间大概在12月~18月。而目前全车有1000多个功能,随着时间的推进,新增功能数量将成几何倍数增加,因此如何提升软件功能开发效率已成为制约整车开发效率关键问题。此外,传统的整车功能开发通常是独立电子控制单元(Electronic Control Unit,ECU)的方式,导致整车有100多个ECU。而且,每个ECU功能独立,并且内部核心算法通常由关键供应商掌握,这不符合当前整车厂(Original Equipment Manufacturer,OEM)软件开发的战略规划,因此打通ECU信息交互壁垒,提供公共整车功能开发平台给OEM、供应商和高校等伙伴的生态圈变得极为重要。因此,业界提出数字汽车平台,通过构建中间层使得软硬件分离,提供功能应用程序接口(Application Program Interface,API)实现OEM快速开发整车功能。
在利用数字汽车平台开发出车辆的功能模块之后,为了减少在后期实车调试过程中对所开发的功能模块的反复修改,通常在功能模块进行实车调试之前先对其进行仿真开发验证。因此为了推进数字汽车平台在行业中应用,数字汽车平台需要提供仿真开发验证工具。整车功能模型在环(Model in Loop,MIL)可以利用各个已有仿真模型来提供车辆仿真,这些仿真模型例如可以包括车辆底盘仿真模型、车身仿真模型、车辆的传感器和执行器仿真模型、车辆运行场景仿真模型、车辆的API功能接口仿真模型以及车辆控制功能仿真模型等。因此,整车功能MIL可以应用于数字汽车平台的仿真开发验证工具。
当整车功能MIL利用各个已有仿真模型来提供车辆仿真时,需要在这些仿真模型之间进行数据交互,但是,这些仿真模型通常是由不同厂家或个人开发的软件,它们仿真输出的数据复杂,容易导致数据交互错误,从而降低仿真精度。因此,在MIL联合仿真过程中保证数字汽车平台仿真过程中数据交互准确,已成为推进整车面向服务的架构(Service Oriented Architecture,SOA)的仿真重点技术方向。
发明内容
有鉴于此,本申请提供了协同仿真的方法及装置,其能够提高仿真精度。
本申请的第一方面提供一种协同仿真的方法。该方法包括:在每个协同仿真周期期间,将多个第一仿真数据分别发送给至少一个客户端控制装置中相应的客户端控制装置,其中,每一个客户端控制装置与多个仿真模型中的至少一个对应,给每一个客户端控制装置发送的第一仿真数据是封装有与该客户端控制装置对应的仿真模型仿 真所需的输入数据的仿真数据。此外,该方法还包括:在每个协同仿真周期期间,从该至少一个客户端控制装置接收多个第二仿真数据,作为在下一个协同仿真周期的该多个第一仿真数据,其中,每一个第二仿真数据是以相同的数据结构对该多个仿真模型的其中一个仿真模型输出的一个仿真结果进行封装得到的,该仿真结果在下一个协同仿真周期用作该输入数据,该数据结构能够使该多个仿真模型输出的各个仿真结果彼此区分。
由上可以看出,该数据结构能够使多个仿真模型输出的各个仿真结果彼此区分,并且,以该数据结构对多个仿真模型输出的各个仿真结果进行封装,以得到与该各个仿真结果一一对应的多个彼此区分的仿真数据,因此,在接下来将这些仿真数据提供给该多个仿真模型进行仿真时能够将每个仿真数据正确地提供给相应的仿真模块而不发生数据交互错误,从而提高协同仿真精度。此外,由上可以看出,以协同仿真周期的方式实现多个仿真模型同步仿真,使得多个仿真模型的数据交互和仿真计算以相同的进度进行而不发生紊乱的情况,从而提高协同仿真精度。
根据第一方面,在所述方法的第一种可能实施方式中,该数据结构至少包括以下字段:被封装的仿真结果的名称,发送封装有被封装的仿真结果的仿真数据的客户端控制装置的名称,被封装的仿真结果所属的数据领域,以及被封装的仿真结果的数据值。
由上可以看出,除了被封装的仿真结果的名称之外,该数据结构还包括发送封装有被封装的仿真结果的仿真数据的客户端控制装置的名称和被封装的仿真结果所属的数据领域,因此,利用该数据结构能够以简单且有效的方式来区分不同的仿真结果。
根据第一方面,在所述方法的第二种可能实施方式中,发送给每一个客户端控制装置的第一仿真数据是基于数据路由关系确定的,其中,数据路由关系指明该多个第一仿真数据各自要发送给哪个客户端控制装置。
由上可以看出,采用数据路由关系来指明多个第一仿真数据各自要发送给哪个客户端控制装置,并且,利用数据路由关系来确定要发送给每个客户端控制装置的第一仿真数据,因此,能够方便快捷地确定出要给各个客户端控制装置发送的第一仿真数据。
根据第一方面的第二种可能实施方式,在所述方法的第三种可能实施方式中,数据路由关系包括多项数据,其中,每项数据包括:该多个第一仿真数据的其中一个仿真数据所封装的输入数据的名称,发送该其中一个仿真数据的客户端控制装置的名称,该其中一个仿真数据所封装的输入数据所属的数据领域,以及要接收该其中一个仿真数据的客户端控制装置的名称。
由上可以看出,数据路由关系通过第一仿真数据所封装的输入数据的名称,发送第一仿真数据的客户端控制装置的名称,第一仿真数据所封装的输入数据所属的数据领域和要接收第一仿真数据的客户端控制装置的名称,来限定每个第一仿真数据具体要发送给哪个客户端控制装置,因此,利用数据路由关系能够以简单且有效的方式来限定每个第一仿真数据要到达的目的控制装置。
根据第一方面,在所述方法的第一种可能实施方式中,协同仿真周期大于第一时长,第一时长等于该多个仿真模型中其仿真周期最大的那个仿真模型的仿真周期。
由上可以看出,协同仿真周期大于多个仿真模型中的最大仿真周期,使得多个仿真模型每次仿真计算都能一起完成,因此,实现多个仿真模型时间同步。
本申请的第二方面提供一种协同仿真的方法。该方法包括:在每个协同仿真周期期间,从服务器端控制装置获取至少一个第一仿真数据,该至少一个第一仿真数据是封装有多个仿真模型中的至少一个仿真模型仿真所需的输入数据的仿真数据。该方法还包括:将从该至少一个第一仿真数据中解析得到的输入数据提供给该至少一个仿真模型。该方法还包括:在每个协同仿真周期期间,接收该至少一个仿真模型输出的至少一个仿真结果。该方法还包括:在每个协同仿真周期期间,向服务器端控制装置发送至少一个第二仿真数据,其中,每一个第二仿真数据是以相同的数据结构对该至少一个仿真结果的其中一个封装得到的,该数据结构能够使该多个仿真模型输出的各个仿真结果彼此区分。
由上可以看出,该数据结构能够使多个仿真模型输出的各个仿真结果彼此区分,并且,以该数据结构对多个仿真模型输出的各个仿真结果进行封装,以得到与该各个仿真结果一一对应的多个彼此区分的仿真数据,因此,在接下来将这些仿真数据提供给该多个仿真模型进行仿真时能够将每个仿真数据正确地提供给相应的仿真模块而不发生数据交互错误,从而提高协同仿真精度。
根据第二方面,在所述方法的第一种可能实施方式中,该数据结构至少包括以下字段:被封装的仿真结果的名称,发送封装有该被封装的仿真结果的仿真数据的客户端控制装置的名称,该被封装的仿真结果所属的数据领域,以及该被封装的仿真结果的数据值。
由上可以看出,除了被封装的仿真结果的名称之外,该数据结构还包括发送封装有该被封装的仿真结果的仿真数据的客户端控制装置的名称和该被封装的仿真结果所属的数据领域,因此,利用该数据结构能够以简单且有效的方式来区分不同的仿真结果。
根据第二方面,在所述方法的第二种可能实施方式中,协同仿真周期大于第一时长,第一时长等于多个仿真模型中其仿真周期最大的那个仿真模型的仿真周期。
由上可以看出,协同仿真周期大于多个仿真模型中的最大仿真周期,使得多个仿真模型每次仿真计算都能一起完成,因此,实现多个仿真模型时间同步。
本申请的第三方面提供一种服务器端控制装置。服务器端控制装置包括发送模块和接收模块。发送模块用于在每个协同仿真周期期间,将多个第一仿真数据分别发送给至少一个客户端控制装置中相应的客户端控制装置,其中,每一个客户端控制装置与多个仿真模型中的至少一个对应,给每一个客户端控制装置发送的第一仿真数据是封装有与该客户端控制装置对应的仿真模型仿真所需的输入数据的仿真数据。接收模块用于在每个协同仿真周期期间,从该至少一个客户端控制装置接收多个第二仿真数据,作为在下一个协同仿真周期的该多个第一仿真数据,其中,每一个第二仿真数据是以相同的数据结构对其中一个仿真模型输出的一个仿真结果进行封装得到的,仿真结果在下一个协同仿真周期用作输入数据,该数据结构能够使该多个仿真模型输出的各个仿真结果彼此区分。
根据第三方面,在服务器端控制装置的第一种可能实施方式中,该数据结构至少 包括以下字段:被封装的仿真结果的名称,发送封装有该被封装的仿真结果的仿真数据的客户端控制装置的名称,该被封装的仿真结果所属的数据领域,以及该被封装的仿真结果的数据值。
根据第三方面,在服务器端控制装置的第二种可能实施方式中,发送给每一个客户端控制装置的第一仿真数据是基于数据路由关系确定的,其中,数据路由关系指明该多个第一仿真数据各自要发送给哪个客户端控制装置。
根据第三方面的第二种可能实施方式,在服务器端控制装置的第三种可能实施方式中,数据路由关系包括多项数据,其中,每项数据包括:该多个第一仿真数据的其中一个仿真数据所封装的所述输入数据的名称,发送该其中一个仿真数据的客户端控制装置的名称,该其中一个仿真数据所封装的输入数据所属的数据领域,以及要接收该其中一个仿真数据的客户端控制装置的名称。
根据第三方面,在服务器端控制装置的第四种可能实施方式中,协同仿真周期大于第一时长,第一时长等于该多个仿真模型中其仿真周期最大的那个仿真模型的仿真周期。
以上第三方面的技术效果可以参考上述第一方面及其各个可能实现方式的技术效果,这里不再赘述。
本申请的第四方面提供一种客户端控制装置。客户端控制装置包括获取模块、提供模块、接收模块和发送模块。获取模块用于在每个协同仿真周期期间,从服务器端控制装置获取至少一个第一仿真数据,该至少一个第一仿真数据是封装有多个仿真模型中的至少一个仿真模型仿真所需的输入数据的仿真数据。提供模块用于将从该至少一个第一仿真数据中解析得到的输入数据提供给该至少一个仿真模型。接收模块用于在每个协同仿真周期期间,接收该至少一个仿真模型输出的至少一个仿真结果。发送模块用于在每个协同仿真周期期间,向服务器端控制装置发送至少一个第二仿真数据,其中,每一个第二仿真数据是以相同的数据结构对该至少一个仿真结果的其中一个封装得到的,该数据结构能够使该多个仿真模型输出的各个仿真结果彼此区分。
根据第四方面,在客户端控制装置的第一种可能实施方式中,该数据结构至少包括以下字段:被封装的仿真结果的名称,发送封装有该被封装的仿真结果的仿真数据的客户端控制装置的名称,该被封装的仿真结果所属的数据领域,以及该被封装的仿真结果的数据值。
根据第四方面,在客户端控制装置的第二种可能实施方式中,协同仿真周期大于第一时长,第一时长等于所述多个仿真模型中其仿真周期最大的那个仿真模型的仿真周期。
以上第四方面的技术效果可以参考上述第二方面及其各个可能实现方式的技术效果,这里不再赘述。
本申请的第五方面提供一种控制系统,其包括:第三方面或其任一种可能实施方式中的服务器端控制装置,以及,第四方面或其任一种可能实施方式中的客户端控制装置。
本申请的第六方面提供一种计算设备,包括至少一个处理器和至少一个存储器,所述存储器存储有程序指令,所述程序指令当被所述至少一个处理器执行时使得所述 至少一个处理器执行第一方面或其任一种可能实施方式中的方法,或者,第二方面或其任一种可能实施方式中的方法。
本申请的第六方面提供一种计算机可读存储介质,其上存储有程序指令,所述程序指令当被计算机执行时使得所述计算机执行第一方面或其任一种可能实施方式中的方法,或者,第二方面或其任一种可能实施方式中的方法。
本申请的第七方面提供一种计算机程序产品,其包括有程序指令,所述程序指令当被计算机执行时使得所述计算机执行第一方面或其任一种可能实施方式中的方法,或者,第二方面或其任一种可能实施方式中的方法。
本申请的这些和其它方面在以下(多个)实施例的描述中会更加简明易懂。
附图说明
以下参照附图来进一步说明本申请的各个特征和各个特征之间的联系。附图均为示例性的,一些特征并不以实际比例示出,并且一些附图中可能省略了本申请所涉及领域的惯常的且对于本申请非必要的特征,或是额外示出了对于本申请非必要的特征,附图所示的各个特征的组合并不用以限制本申请。另外,在本说明书全文中,相同的附图标记所指代的内容也是相同的。具体的附图说明如下:
图1是根据本申请的实施例的用于控制多个仿真模型协同仿真的控制系统的架构示意图;
图2是根据本申请的实施例的协同仿真的方法的流程图;
图3是根据本申请的实施例的协同仿真的方法的流程图;
图4是根据本申请的实施例的服务器端控制装置的示意图;
图5是根据本申请的实施例的客户端控制装置的示意图;
图6是根据本申请的具体实现方式的用于控制多个仿真模型协同仿真的控制系统的结构示意图;
图7是根据本申请的具体实现方式的协同仿真的方法的流程示意图;
图8是根据本申请的具体实现方式的同步仿真的示意图;
图9是根据本申请的具体实现方式的数据交互的示意图;
图10是根据本申请的实施例的计算设备的示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。
说明书和权利要求书中的词语“第一、第二、第三等”或模块A、模块B、模块 C等类似用语,仅用于区别类似的对象,不代表针对对象的特定排序,可以理解地,在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。
在以下的描述中,所涉及的表示步骤的标号,如S110、S120……等,并不表示一定会按此步骤执行,在允许的情况下可以互换前后步骤的顺序,或同时执行。
说明书和权利要求书中使用的术语“包括”不应解释为限制于其后列出的内容;它不排除其它的元件或步骤。因此,其应当诠释为指定所提到的所述特征、整体、步骤或部件的存在,但并不排除存在或添加一个或更多其它特征、整体、步骤或部件及其组群。因此,表述“包括装置A和B的设备”不应局限为仅由部件A和B组成的设备。
本说明书中提到的“一个实施例”或“实施例”意味着与该实施例结合描述的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在本说明书各处出现的用语“在一个实施例中”或“在实施例中”并不一定都指同一实施例,但可以指同一实施例。此外,在一个或多个实施例中,能够以任何适当的方式组合各特定特征、结构或特性,如从本公开对本领域的普通技术人员显而易见的那样。
对本申请具体实施方式进行进一步详细说明之前,对本申请实施例中涉及的技术用语进行说明。除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。如有不一致,以本说明书中所说明的含义或者根据本说明书中记载的内容得出的含义为准。另外,本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
为了准确地对本申请中的技术内容进行叙述,以及为了准确地理解本申请,在对具体实施方式进行说明之前先对本说明书中所使用的术语给出如下的解释说明或定义。
ECU,Electronic Control Unit,电子控制单元。其由微处理器(MCU)、存储器(ROM、RAM)、输入/输出接口(I/O)、模数转换器(A/D)以及整形、驱动等大规模集成电路组成,控制车辆的各个部件。
MIL,Model in Loop,模型在环测试。在汽车开发仿真中,除建立与控制器相关的整车动力学的仿真模型和控制与部件的仿真模型之外,还需要建立被控对象的仿真模型和场景可视化的仿真模型,将控制器和被控对象连接起来并形成闭环,并通过场景可视化显示和确认仿真效果。
SOA,Service Oriented Architecture,面向服务的架构。它将应用程序的不同服务单元进行拆分,并通过这些服务之间定义良好的接口和协议联系起来。接口是采用中立的方式进行定义的,它应该独立于实现服务的硬件平台、操作系统和编程语言。这使得构建在各种各样的子系统中的服务可以以一种统一和通用的方式进行交互。当SOA用于汽车整车MIL的仿真和验证时,建立被控对象子系统、整车动力学子系统和控制与部件子系统,定义汽车整车MIL的协同仿真及验证与各子系统的模型仿真之间的接口和协议,以一种统一和通用的方式进行交互,提高汽车整车MIL的协同仿真和验证的准确率及效率。
目前已经存在组合多个已有仿真模块或仿真软件来进行仿真的技术方案,但是,这些仿真模块或仿真软件通常是由不同的厂家或个人开发的,它们仿真所需的输入数据和仿真输出的结果数据比较复杂,往往不具有统一的命名规则,因而,不同的数据可能会采用同一名称,或者,同一数据在不同的仿真模块中可能使用不同的名称。因此,在仿真期间当在这些仿真模块之间交互数据时,很容易发生数据交互错误,给仿真模块提供了错误的数据作为仿真输入,从而导致仿真精度下降。
考虑到以上问题,本申请实施例提出了协同仿真的方法及装置,其使用设计的数据结构对各个仿真模块或仿真软件输出的各个仿真结果分别进行封装,使得封装后的各个仿真结果即使其名称相同能够被彼此区分,从而当接下来把这些仿真结果作为仿真输入提供给各个仿真模块时,能够正确地向这些仿真模块提供数据,不会发生数据交互错误,从而提高仿真精度。
下面结合附图介绍本申请的各实施例的原理和有益技术效果。
图1示出了根据本申请的实施例的用于控制多个仿真模型协同仿真的控制系统的架构示意图。图1所示的控制系统10采用服务器-客户端模式来控制多个仿真模型20进行协同仿真,整个协同仿真过程通过多个协同仿真周期来完成。仿真模型20可以是任何能够提供仿真功能的模块,例如包括但不局限于车辆底盘仿真模型、车身仿真模型、车辆的传感器和执行器仿真模型、车辆运行场景仿真模型、车辆的API功能接口仿真模型以及车辆控制功能仿真模型等。
控制系统10包括服务器部分和客户端部分,其中,控制系统10的服务器部分可以包括服务器端控制装置30,以及,控制系统10的客户端部分可以包括至少一个客户端控制装置40。服务器端控制装置30和客户端控制装置40可以借助任何合适的通信协议来进行数据交互,该通信协议例如可以包括但不局限于传输控制协议/网络协议(Transmission Control Protocol/Internet Protocol,TCP/IP)等。
每一个客户端控制装置40可以与该多个仿真模块20中的至少一个仿真模型相对应和相关联,以控制与其对应和关联的仿真模块进行仿真计算。
当该多个仿真模型20被控制进行协同仿真时,在每个协同仿真周期期间,服务器端控制装置30和各个客户端控制装置40相互协作,向该多个仿真模型20提供仿真所需的输入数据以使该多个仿真模型20进行一次仿真计算,并接收该多个仿真模型20各自输出的仿真结果作为该多个仿真模型20在下一个协同仿真周期仿真所需的输入数据。
在一些实施例中,控制系统10所包括的服务器部分和客户端部分可以位于相同的计算设备中,该计算设备可以是任何合适的具有计算能力的设备,例如包括但不局限于台式服务器、台式计算机、笔记本电脑、工业控制器、云端服务器等。在一些实施例中,控制系统10所包括的服务器部分和客户端部分分别可以位于不同的计算设备中。在一些实施例中,当客户端控制装置40的数量为多个时,该多个客户端控制装置40各自可以位于相同的计算设备中或者位于不同的计算设备中。
图2示出了根据本申请的实施例的协同仿真的方法的流程图。图2所示的方法例 如可以由但不局限于图1所示的服务器端控制装置30来执行。服务器端控制装置30例如可以是但不局限于下面描述的控制装置620。图2所示的方法可以包括步骤S210和S220。
在步骤S210,在每个协同仿真周期期间,将多个第一仿真数据分别发送给所述至少一个客户端控制装置40中相应的客户端控制装置,其中,每一个客户端控制装置40与所述多个仿真模型20中的至少一个对应,给每一个客户端控制装置40发送的所述第一仿真数据是封装有与该客户端控制装置40对应的仿真模型20仿真所需的输入数据的仿真数据。
其中,在当前协同仿真周期不是协同仿真过程的第一个协同仿真周期的情况下,当前协同仿真周期的所述多个第一仿真数据是上一个协同仿真周期中的后面将描述的第二仿真数据。在当前协同仿真周期是协同仿真过程的第一个协同仿真周期的情况下,当前协同仿真周期的所述多个第一仿真数据可以是任何合适的数据,例如是但不局限于人工事先配置的数据或默认的数据等。
其中,在一些实施例中,所述多个第一仿真数据被发送给所述至少一个客户端控制装置40可以是服务器端控制装置30主动执行的。在一些实施例中,所述多个第一仿真数据被发送给所述至少一个客户端控制装置40可以是服务器端控制装置30在接收到来自所述至少一个客户端控制装置40的请求之后执行的。
其中,在一些实施例中,所述多个第一仿真数据在被发送之前可以存储在服务器端控制装置30内。或者,在一些实施例中,所述多个第一仿真数据在被发送之前可以存储在服务器端控制装置30外部,在这种情况下,例如可以存储在下面描述的数据装置610中。
在步骤S220,在每个协同仿真周期期间,从所述至少一个客户端控制装置40接收多个第二仿真数据,作为在下一个协同仿真周期的所述多个第一仿真数据,其中,每一个第二仿真数据是以相同的数据结构对其中一个仿真模型20输出的一个仿真结果进行封装得到的,所述仿真结果在下一个协同仿真周期用作所述输入数据,所述数据结构能够使所述多个仿真模型20输出的各个仿真结果彼此区分。
从以上可以看出,所述数据结构能够使所述多个仿真模型20输出的各个仿真结果彼此区分,从而以所述数据结构对所述多个仿真模型20输出的各个仿真结果进行封装,将会得到与该各个仿真结果一一对应的多个彼此区分的仿真数据,因此,在下一个协同仿真周期将这些仿真数据提供给所述多个仿真模型20进行仿真时能够将每个仿真数据正确地提供给相应的仿真模块而不发生数据交互错误,从而提高协同仿真精度。此外,从以上还可以看出,以协同仿真周期的方式实现所述多个仿真模型20同步仿真,使得所述多个仿真模型20的数据交互和仿真计算以相同的进度进行而不发生紊乱的情况,从而也能提高协同仿真精度。
在一些实施例中,所述数据结构可以至少包括以下字段:被封装的仿真结果的名称,发送封装有所述被封装的仿真结果的仿真数据的客户端控制装置的名称,所述被封装的仿真结果所属的数据领域,以及,所述被封装的仿真结果的数据值。所述数据领域用于指示数据属于哪个领域。例如对于车辆仿真,所述数据领域例如可以包括但 不局限于悬架、制动、座椅、车窗等。
从以上可以看出,除了被封装的仿真结果的名称之外,所述数据结构还包括发送封装有被封装的仿真结果的仿真数据的客户端控制装置的名称和被封装的仿真结果所属的数据领域,因此,利用所述数据结构能够以简单且有效的方式来区分不同的仿真结果。
在一些实施例中,发送给每一个客户端控制装置40的所述第一仿真数据是基于数据路由关系确定的,其中,所述数据路由关系指明所述多个第一仿真数据各自要发送给哪个客户端控制装置。
这里,在一些实施例中,基于所述数据路由关系来确定发送给每一个客户端控制装置40的所述第一仿真数据,可以在将要向客户端控制装置40发送所述第一仿真数据时服务器端控制装置30才执行。
或者,在一些实施例中,可以在服务器端控制装置30收到所述多个第一仿真数据时,服务器端控制装置30就执行基于所述数据路由关系来确定要发送给每一个客户端控制装置40的所述第一仿真数据。在这种情况下,在确定出要发送给每一个客户端控制装置40的是哪个或哪些第一仿真数据之后,服务器端控制装置30可以把要发送给每一个客户端控制装置的所述第一仿真数据放入该客户端控制装置的发送队列中以等待发送。或者,在确定出要发送给每一个客户端控制装置40的是哪个或哪些第一仿真数据之后,在每个第一仿真数据中写入其要发送的客户端控制装置的名称并保存这些第一仿真数据,然后在发送时基于第一仿真数据中所写入的其要发送的客户端控制装置的名称来发送各个第一仿真数据。
从以上可以看出,采用数据路由关系来指明所述多个第一仿真数据各自要发送给哪个客户端控制装置,并且,利用数据路由关系来确定要发送给每个客户端控制装置的第一仿真数据,因此,能够方便快捷地确定出要给各个客户端控制装置发送的第一仿真数据。
在一些实施例中,所述数据路由关系包括多项数据,其中,每项数据包括:所述多个第一仿真数据的其中一个仿真数据所封装的所述输入数据的名称,发送所述其中一个仿真数据的客户端控制装置的名称,所述其中一个仿真数据所封装的所述输入数据所属的数据领域,以及,要接收所述其中一个仿真数据的客户端控制装置的名称。所述数据领域用于指示数据属于哪个领域。例如对于车辆仿真,所述数据领域例如可以包括但不局限于悬架、制动、座椅、车窗等。
从以上可以看出,数据路由关系通过第一仿真数据所封装的输入数据的名称,发送第一仿真数据的客户端控制装置的名称,第一仿真数据所封装的输入数据所属的数据领域和要接收第一仿真数据的客户端控制装置的名称,来限定每个第一仿真数据具体要发送给哪个客户端控制装置,因此,利用数据路由关系能够以简单且有效的方式来限定每个第一仿真数据要到达的目的控制装置。
在一些实施例中,所述协同仿真周期大于第一时长,所述第一时长等于所述多个 仿真模型20中其仿真周期最大的那个仿真模型的仿真周期。。
从以上可以看出,协同仿真周期大于所述多个仿真模型20中的最大仿真周期,使得所述多个仿真模型20每次仿真计算都能一起完成,因此,实现所述多个仿真模型20时间同步,从而提高仿真效率。
图3示出了根据本申请的实施例的协同仿真的方法的流程图。图3所示的方法例如可以但不局限于由图1所示的其中一个客户端控制装置40来执行。客户端控制装置40例如可以是但不局限于下面描述的控制装置630。图3所示的方法可以包括步骤S310、S320、S330和S340。
在步骤S310,在每个协同仿真周期期间,从服务器端控制装置30获取至少一个第一仿真数据,其中,所述至少一个第一仿真数据是封装有所述多个仿真模型20中的至少一个仿真模型20仿真所需的输入数据的仿真数据。
这里,在一些实施例中,从服务器端控制装置30获取至少一个第一仿真数据可以是:当服务器端控制装置30主动向客户端控制装置40发送所述至少一个第一仿真数据时,客户端控制装置40接收服务器端控制装置30发送的所述至少一个第一仿真数据。
或者,在一些实施例中,从服务器端控制装置30获取至少一个第一仿真数据可以是:客户端控制装置40向服务器端控制装置30请求第一仿真数据,并当服务器端控制装置30响应该请求向客户端控制装置40发送所述至少一个第一仿真数据时,客户端控制装置40接收服务器端控制装置30发送的所述至少一个第一仿真数据。
在步骤S320,将从所述至少一个第一仿真数据中解析得到的所述输入数据提供给所述至少一个仿真模型20。
其中,所述至少一个仿真模型20接收到所述输入数据后启动仿真计算。
在步骤S330,在每个协同仿真周期期间,接收所述至少一个仿真模型20输出的至少一个仿真结果。
这里,所述至少一个仿真结果是所述至少一个仿真模型20利用所接收的输入数据进行仿真计算得到的结果。
在步骤S340,在每个协同仿真周期期间,向服务器端控制装置30发送至少一个第二仿真数据,其中,每一个第二仿真数据是以相同的数据结构对所述至少一个仿真结果的其中一个封装得到的,所述数据结构能够使所述多个仿真模型20输出的各个仿真结果彼此区分。
从以上可以看出,该数据结构能够使所述多个仿真模型20输出的各个仿真结果彼此区分,从而以该数据结构对所述多个仿真模型20输出的各个仿真结果进行封装,将会得到与该各个仿真结果一一对应的多个彼此区分的仿真数据,因此,在下一个协同仿真周期将这些仿真数据提供给所述多个仿真模型20进行仿真时能够将每个仿真数据正确地提供给相应的仿真模块而不发生数据交互错误,从而提高了协同仿真精度。
在一些实施例中,所述数据结构至少可以包括以下字段:被封装的仿真结果的名称,发送封装有所述被封装的仿真结果的仿真数据的客户端控制装置的名称,所述被 封装的仿真结果所属的数据领域,以及,所述被封装的仿真结果的数据值。所述数据领域用于指示数据属于哪个领域。例如对于车辆仿真,所述数据领域例如可以包括但不局限于悬架、制动、座椅、车窗等。
由上可以看出,除了被封装的仿真结果的名称之外,所述数据结构还包括发送封装有被封装的仿真结果的仿真数据的客户端控制装置的名称和被封装的仿真结果所属的数据领域,因此,利用所述数据结构能够以简单且有效的方式来区分不同的仿真结果。
在一些实施例中,所述协同仿真周期大于第一时长,所述第一时长等于所述多个仿真模型20中其仿真周期最大的那个仿真模型的仿真周期。。
从以上可以看出,协同仿真周期大于所述多个仿真模型20中的最大仿真周期,使得所述多个仿真模型20每次仿真计算都能一起完成,因此,实现所述多个仿真模型20时间同步,从而提高仿真效率。
上文结合图2-3详细描述了本申请的用于控制多个仿真模型协同仿真的方法实施例,下面结合图4-5详细描述本申请的用于控制多个仿真模型协同仿真的装置实施例。应理解,方法实施例的描述与装置实施例的描述相互对应,因此,在装置实施例中未详细描述的部分可以参见前面方法实施例。
图4示出了根据本申请的实施例的服务器端控制装置的示意图。如图4所示,服务器端控制装置30可以包括发送模块410和接收模块420。
其中,发送模块410可以用于在每个协同仿真周期期间,将多个第一仿真数据分别发送给所述至少一个客户端控制装置40中相应的客户端控制装置,其中,每一个客户端控制装置40与所述多个仿真模型20中的至少一个对应,给每一个客户端控制装置40发送的所述第一仿真数据是封装有与该客户端控制装置对应的仿真模型仿真所需的输入数据的仿真数据。
接收模块420可以用于在每个协同仿真周期期间,从所述至少一个客户端控制装置40接收多个第二仿真数据,作为在下一个协同仿真周期的所述多个第一仿真数据,其中,每一个第二仿真数据是以相同的数据结构对其中一个仿真模型20输出的一个仿真结果进行封装得到的,所述仿真结果在下一个协同仿真周期用作所述输入数据,所述数据结构能够使所述多个仿真模型20输出的各个仿真结果彼此区分。
在一些实施例中,所述数据结构至少包括以下字段:被封装的仿真结果的名称,发送封装有所述被封装的仿真结果的仿真数据的客户端控制装置的名称,所述被封装的仿真结果所属的数据领域,以及,所述被封装的仿真结果的数据值。
在一些实施例中,发送给每一个客户端控制装置的所述第一仿真数据是基于数据路由关系确定的,其中,所述数据路由关系指明所述多个第一仿真数据各自要发送给哪个客户端控制装置。
在一些实施例中,所述数据路由关系包括多项数据,其中,每项数据包括所述多个第一仿真数据的其中一个仿真数据所封装的所述输入数据的名称,发送所述其中一 个仿真数据的客户端控制装置的名称,所述其中一个仿真数据所封装的所述输入数据所属的数据领域,以及,要接收所述其中一个仿真数据的客户端控制装置的名称。
在一些实施例中,所述协同仿真周期大于第一时长,所述第一时长等于所述多个仿真模型中其仿真周期最大的那个仿真模型的仿真周期。
图5示出了根据本申请的实施例的客户端控制装置的示意图。如图5所示,客户端控制装置40可以包括获取模块510、提供模块520、接收模块530和发送模块540。
获取模块510可以用于在每个协同仿真周期期间,从服务器端控制装置30获取至少一个第一仿真数据,所述至少一个第一仿真数据是封装有所述多个仿真模型20中的至少一个仿真模型仿真所需的输入数据的仿真数据。
提供模块520可以用于将从所述至少一个第一仿真数据中解析得到的所述输入数据提供给所述至少一个仿真模型。
接收模块530可以用于在每个协同仿真周期期间,接收所述至少一个仿真模型输出的至少一个仿真结果。
发送模块540可以用于在每个协同仿真周期期间,向服务器端控制装置30发送至少一个第二仿真数据,其中,每一个第二仿真数据是以相同的数据结构对所述至少一个仿真结果的其中一个封装得到的,所述数据结构能够使所述多个仿真模型20输出的各个仿真结果彼此区分。
下面基于图6至图9,以应用于SOA的汽车整车模型在环的协同仿真为例,介绍本申请的用于控制多个仿真模型协同仿真的方案的具体实现方式。
图6示出根据本申请的具体实现方式的控制系统的示意图。如图6所示,控制系统600采用服务器-客户端模式控制多个车辆仿真模型进行协同仿真,其包括服务器部分和客户端部分,其中,客户端部分与服务器部分之间是通过TCP/IP通信,实现仿真过程中的数据交互。
控制系统600的服务器部分包括数据装置610和控制装置620。数据装置610可以存储数据路由关系和控制装置620从下面描述的控制装置630接收的数据。
控制系统600的客户端部分包括四个控制装置630。
第一个控制装置630与传感器仿真模型和执行器仿真模型等对应和关联,用于控制传感器仿真模型和执行器仿真模型等的仿真计算,其中,第一个控制装置630及其对应的传感器仿真模型和执行器仿真模型等构成被控对象子系统。第一个控制装置630被设置为与其所在的被控对象子系统具有相同的名称。
第二个控制装置630与动力学仿真模型和行驶场景仿真模型等对应和关联,用于控制动力学仿真模型和行驶场景仿真模型等的仿真计算,其中,第二个控制装置630及其对应的动力学仿真模型和行驶场景仿真模型等构成整车动力学子系统。第二个控制装置630被设置为与其所在的整车动力学子系统具有相同的名称。
第三个控制装置630与电池仿真模型和热管理仿真模型等对应和关联,用于控制电池仿真模型和热管理仿真模型等的仿真计算,其中,第三个控制装置630及其对应的电池仿真模型和热管理仿真模型等构成控制与部件子系统。第三个控制装置630被 设置为与其所在的控制与部件子系统具有相同的名称。
第四个控制装置630与车窗可视化仿真模型和座椅可视化仿真模型等对应和关联,用于控制车窗可视化仿真模型和座椅可视化仿真模型等的仿真计算,其中,第四个控制装置630及其对应的车窗可视化仿真模型和座椅可视化仿真模型等构成场景可视化子系统。第四个控制装置630被设置为与其所在的场景可视化子系统具有相同的名称。
图6是客户端部署的一种示例,其根据仿真功能分类配置客户端部分中的每个控制装置实现的子系统功能和所对应和关联的仿真模型。实际使用时根据实际场景可在客户端部分中配置不同数量的控制装置,每个控制装置实现的子系统功能,每个子系统中可配置的相应仿真模型。数据装置610、控制装置620和控制装置630可以位于同步机房或者分布式部署。
图7示出了根据本申请的具体实施方式的用于控制多个车辆仿真模型协同仿真的方法的流程图。如图7所示,方法700可以包括步骤S710至S750。
在步骤S710,设置用于封装各个车辆仿真模块输出的各个仿真结果的数据结构DS所包含的字段和配置数据路由关系。
具体地,获取各子系统的各仿真模型输出的各个仿真结果的定义,将数据结构DS设置为包括以下字段:
仿真结果的名称;
控制装置的名称;
数据领域;
周期;以及
数据值。
其中,所述仿真结果的名称表示数据结构DS所封装的仿真结果的名称。
所述控制装置的名称表示向控制装置620发送数据结构DS所封装的仿真结果的那个控制装置630的名称。如上所描述的,每个控制装置630与其所在的子系统具有相同的名称,因此,这里的控制装置的名称也可以认为是向控制装置620发送数据结构DS所封装的仿真结果的那个控制装置630所在的子系统的名称。这里,如上所描述的,子系统包括被控对象子系统、整车动力学子系统、控制与部件子系统和场景可视化子系统。
所述数据领域用于指示数据结构DS所封装的仿真结果是哪个领域的数据。这里,数据领域例如可以包括悬架、制动、座椅、车窗等。
所述周期是数据结构DS所封装的仿真结果的时间标签,表示该仿真结果是在哪个协同仿真周期生成的。
所述数据领域表示数据结构DS所封装的仿真结果的数据类型,其例如可以包括但不局限于整数类型、双精度整数类型、字符类型等。
所述数据值表示数据结构DS所封装的仿真结果的数据值。
其中,仿真结果的名称、控制装置的名称和数据领域构成被数据结构DS封装的仿真结果的数据标签,在一个协同仿真周期内,所述数据标签作为所述仿真结果的唯一性标识,解决仿真结果数据名称的复杂性问题,例如不同的仿真结果使用同一名称 的问题。
此外,获取各子系统的各车辆仿真模型的输入数据定义,梳理各个车辆仿真模型在每一个协同仿真周期中的输入数据与各个车辆仿真模型在上一个协同仿真周期中的仿真结果之间的对应关系,确定所述数据路由关系,以指示在每一个协同仿真周期中来自各个控制装置630的各个封装有仿真结果的仿真数据在下一个协同仿真周期中要提供哪个或哪些控制装置630。
这里,所述数据路由关系可以是一张数据路由关系表,所述数据路由关系表包括多项数据,每项数据包括其中一个仿真结果的数据标签和将所述其中一个仿真结果作为输入数据使用的车辆仿真模型所对应和关联的控制装置630的名称。其中,如上面所描述的,该控制装置630的名称也可以用该控制装置630所在的子系统的名称表示。
在步骤S720,配置协同仿真周期。
具体地,获取每个子系统中各个车辆仿真模型的仿真周期,确定所述协同仿真周期,其中,所述协同仿真周期大于所有子系统的各个车辆仿真模型中仿真周期最大的那个车辆仿真模型的仿真周期。该确定的协同仿真周期被控制装置620和各个控制装置630使用。
步骤S710和S720在协同仿真过程开始之前完成,例如但不局限于通过人工来完成。
在步骤S730,控制装置620向各子系统的控制装置630发送封装有作为输入数据的仿真结果的仿真数据。
具体地,在协同仿真过程开始之后,在每个协同仿真周期期间,控制装置620将数据装置610中存储的各个仿真数据发送给各个子系统的相应控制装置630。该各个仿真数据各自要发送给哪个或哪些控制装置630是基于数据装置610中存储的所述数据路由关系和该各个仿真数据各自的数据标签来确定。数据装置610中存储的该各个仿真数据是在上一个协同仿真周期期间从各个控制装置630接收的各个封装仿真结果的数据,其是在相应的控制装置630中以所述数据结构DS对车辆仿真模块输出的仿真结果封装得到的。
在步骤S740,各个控制装置630接收和解析控制装置620发送的仿真数据,调用相应的车辆仿真模型进行仿真,并把车辆仿真模型输出的仿真结果封装为仿真数据,发送至控制装置620。
具体地,各个控制装置630接收来自控制装置620的仿真数据,基于所述数据结构DS解析所接收的仿真数据,以得到仿真数据封装的仿真结果作为输入数据,通过仿真模型API接口将作为输入数据的仿真结果提供给对应的车辆仿真模型以驱动该车辆仿真模型进行仿真计算,接收车辆仿真模型输出的各个仿真结果,基于所述数据结构DS将所接收的每一个仿真结果封装成仿真数据以生成一个或多个仿真数据,以及,在当前协同仿真周期内将所生成的仿真数据发送至控制装置620。
在步骤S750,控制装置620接收来各个控制装置630的各个仿真数据并将它们存储在数据装置610中,这些仿真数据将在下一个协同仿真周期发送给控制装置630。
其中,步骤S730、S740和S750顺序循化执行,直至仿真结束。
图8示出了根据本申请的具体实现方式的在一个协同仿真周期中的协同仿真的示意图。图8示出的是被控对象子系统、整车动力学子系统、控制与部件子系统和场景可视化子系统中的各个车辆仿真模块在第n个协同仿真周期中的协同仿真,其中,协同仿真周期的时长为T。
在第n个协同仿真周期中,被控对象子系统、整车动力学子系统、控制与部件子系统和场景可视化子系统各自的控制装置630在nT时刻接收控制装置620发送的封装有作为输入数据的仿真结果的仿真数据。
各个子系统的控制装置630对所接收的仿真数据进行解析,以获得仿真数据所封装的仿真结果作为输入数据。各个子系统的控制装置630将所获得的作为输入数据的仿真结果提供给相应的车辆仿真模型以驱动车辆仿真模型进行仿真计算。
各个子系统的控制装置630接收相应车辆仿真模块输出的各个仿真结果。各个子系统的控制装置630以数据结构DS将所接收的每一个仿真结果封装成一个仿真数据。
被控对象子系统的控制装置630在从控制装置620接收到仿真数据之后经过T1时间完成仿真结果的封装,因此,被控对象子系统的控制装置630在nT+T1时刻向控制装置620发送封装得到的各个仿真数据。
整车动力学子系统的控制装置630在从控制装置620接收到仿真数据之后经过T2时间完成仿真结果的封装,因此,整车动力学子系统的控制装置630在nT+T2时刻向控制装置620发送封装得到的各个仿真数据。
控制与部件子系统的控制装置630在从控制装置620接收到仿真数据之后经过T3时间完成仿真结果的封装,因此,控制与部件子系统的控制装置630在nT+T3时刻向控制装置620发送封装得到的各个仿真数据。
场景可视化子系统的控制装置630在从控制装置620接收仿真数据之后经过T4时间完成仿真结果的封装,因此,场景可视化子系统的控制装置630在nT+T4时刻向控制装置620发送封装得到的各个仿真数据。
图9示出了根据本申请的具体实现方式的数据交互的示意图。图9所示的数据交互是对前述步骤S730、S740和S750中的操作的更详细描述。
如图9所示,在每个协同仿真周期期间,控制装置620将数据装置610存储的各个仿真数据,经由TCP/IP通信协议发送给相应的控制装置630。这里,如果该各个仿真数据各自要发送给哪个或哪些数据装置610已经事先知道,比如,该各个仿真数据各自已经放置在数据装置610中的相应控制装置630的发送队列中,或者,该各个仿真数据各自已经写入要发送到的控制装置630的名称,则控制装置620直接发送这些仿真数据。如果该各个仿真数据各自要发送给哪个或哪些数据装置610仍未知道,则根据数据装置610存储的数据路由关系和该各个仿真数据各自的数据标签,控制装置620确定该各个仿真数据各自要发送给哪个或哪些数据装置610,并基于确定结果来发送该各个仿真数据。
其中,控制装置620的以上操作可以是控制装置620主动发起的。或者,控制装置620的以上操作可以是在各子系统的控制装置630向其发送请求仿真数据的消息才 发起的。
各子系统的控制装置630接收控制装置620发送的一个或多个仿真数据,并对所接收的仿真数据进行解析,以得到该仿真数据封装的仿真结果,作为车辆仿真模型的输入数据。
各子系统的控制装置630通过调用仿真模型的API将所得到的作为输入数据的各个仿真结果提供给相应的车辆仿真模型,以驱动车辆仿真模型进行仿真计算。
各子系统中的各个车辆仿真模型利用从控制装置630接收的输入数据进行仿真计算,并把仿真计算得到的仿真结果输出给与其对应和关联的控制装置630。
各子系统的控制装置630把从车辆仿真模型接收到的每一个仿真结果封装为一个仿真数据,从而得到一个或多个仿真数据,并在当前协同仿真周期内把所得到的仿真数据发送至控制装置620。
控制装置620接收各子系统的控制装置630发送的各个仿真数据,并采用以下三种方式之一来处理所接收的各个仿真数据。
在第一种方式中,控制装置620对从控制装置630接收的各个仿真数据不进行任何处理,直接存储在数据装置610中。
在第二种方式中,根据数据装置610中存储的数据路由关系和该各个仿真数据各自的数据标签,控制装置620确定该各个仿真数据各自在下一个协同仿真周期要发送给哪个或哪些控制装置630,并根据确定结果,将这些仿真数据分别存储在数据装置610中的相应控制装置630的发送队列中,以等待在下一个协同仿真周期中发送。
在第三种方式中,根据数据装置610中存储的数据路由关系和该各个仿真数据各自的数据标签,控制装置620确定该各个仿真数据各自在下一个协同仿真周期要发送给哪个或哪些控制装置630,并根据确定结果,在每个仿真数据中写入其在下一个协同仿真周期要发送到的控制装置630的名称,然后将这些仿真数据存储在数据装置610中。
综上,一种用于控制多个仿真模型协同仿真的方法的具体实施方式用于SOA汽车整车MIL协同仿真,涵盖被控对象、车辆动力学、控制部件与控制、场景可视化多个子系统领域的仿真模型,通过设定的第一数据结构,解决了个子系统之间的数据复杂性问题,以协同仿真和验证整车MIL的功能与性能领域的结果,提升了SOA汽车整车MIL仿真和验证的精度与效率。
图10是根据本申请的实施例的计算设备的结构性示意图。如图10所示,计算设备1000可以包括:处理器1010、存储器1020、通信接口1030、总线1040。
应理解,图10所示的计算设备1000中的通信接口1030可以用于与其他设备之间进行通信。
其中,该处理器1010可以与存储器1020连接。该存储器1020可以用于存储该程序代码和数据。因此,该存储器1020可以是处理器1010内部的存储模块,也可以是与处理器1010独立的外部存储模块,还可以是包括处理器1010内部的存储模块和与处理器1010独立的外部存储模块的部件。
其中,计算设备1000还可以包括总线1040。其中,存储器1020、通信接口1030 可以通过总线1040与处理器1010连接。总线1040可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线1040可以分为地址总线、数据总线、控制总线等。为便于表示,图10中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。
应理解,在本申请实施例中,该处理器1010可以采用中央处理模块(central processing unit,CPU)。该处理器还可以是其它通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate Array,FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。或者该处理器1010采用一个或多个集成电路,用于执行相关程序,以实现本申请实施例所提供的技术方案。
该存储器1020可以包括只读存储器和随机存取存储器,并向处理器1010提供指令和数据。处理器1010的一部分还可以包括非易失性随机存取存储器。例如,处理器1010还可以存储设备类型的信息。
在计算设备1000运行时,所述处理器1010执行所述存储器1020中的计算机执行指令执行上述方法的操作步骤。
应理解,根据本申请实施例的计算设备1000可以对应于执行根据本申请各实施例的方法中的相应主体,并且计算设备1000中的各个模块的上述和其它操作和/或功能分别为了实现本实施例各方法的相应流程,为了简洁,在此不再赘述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请的实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时用于执行用于控制多个仿真模型协同仿真的方法,该方法包括上述各个实施例所描述的方案中的至少之一。
根据本申请的实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是,但不限于,电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中连接了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括、但不限于无线、电线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
注意,上述仅为本申请的较佳实施例及所运用的技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显 的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请的构思的情况下,还可以包括更多其他等效实施例,均属于本申请的保护范畴。

Claims (20)

  1. 一种协同仿真的方法,其特征在于,包括:
    在每个协同仿真周期期间,将多个第一仿真数据分别发送给至少一个客户端控制装置中相应的客户端控制装置,其中,每一个客户端控制装置与多个仿真模型中的至少一个对应,给每个客户端控制装置发送的所述第一仿真数据是封装有与该客户端控制装置对应的仿真模型仿真所需的输入数据的仿真数据;
    在每个协同仿真周期期间,从所述至少一个客户端控制装置接收多个第二仿真数据,作为在下一个协同仿真周期的所述多个第一仿真数据,
    其中,每一个第二仿真数据是以相同的数据结构对所述多个仿真模型的其中一个仿真模型输出的一个仿真结果进行封装得到的数据,所述仿真结果在下一个协同仿真周期用作所述输入数据,所述数据结构能够使所述多个仿真模型输出的各个仿真结果彼此区分。
  2. 根据权利要求1所述的方法,其特征在于,所述数据结构至少包括以下字段:
    被封装的仿真结果的名称,
    发送封装有所述被封装的仿真结果的仿真数据的客户端控制装置的名称,
    所述被封装的仿真结果所属的数据领域,以及
    所述被封装的仿真结果的数据值。
  3. 根据权利要求1所述的方法,其特征在于,
    发送给每一个客户端控制装置的所述第一仿真数据是基于数据路由关系确定的,
    其中,所述数据路由关系指明所述多个第一仿真数据各自要发送给哪个客户端控制装置。
  4. 根据权利要求3所述的方法,其特征在于,所述数据路由关系包括多项数据,其中,每项数据包括:
    所述多个第一仿真数据的其中一个仿真数据所封装的所述输入数据的名称,
    发送所述其中一个仿真数据的客户端控制装置的名称,
    所述其中一个仿真数据所封装的所述输入数据所属的数据领域,以及
    要接收所述其中一个仿真数据的客户端控制装置的名称。
  5. 根据权利要求1所述的方法,其特征在于,所述协同仿真周期大于第一时长,所述第一时长等于所述多个仿真模型中其仿真周期最大的那个仿真模型的仿真周期。
  6. 一种协同仿真的方法,其特征在于,包括:
    在每个协同仿真周期期间,从服务器端控制装置获取至少一个第一仿真数据,所述至少一个第一仿真数据是封装有多个仿真模型中的至少一个仿真模型仿真所需的输入数据的仿真数据;
    将从所述至少一个第一仿真数据中解析得到的所述输入数据提供给所述至少一个仿真模型;
    在每个协同仿真周期期间,接收所述至少一个仿真模型输出的至少一个仿真结果;以及
    在每个协同仿真周期期间,向所述服务器端控制装置发送至少一个第二仿真数据,其中,每一个第二仿真数据是以相同的数据结构对所述至少一个仿真结果的其中一个封装得到的,所述数据结构能够使所述多个仿真模型输出的各个仿真结果彼此区分。
  7. 根据权利要求6所述的方法,其特征在于,所述数据结构至少包括以下字段:
    被封装的仿真结果的名称,
    发送封装有所述被封装的仿真结果的仿真数据的客户端控制装置的名称,
    所述被封装的仿真结果所属的数据领域,以及
    所述被封装的仿真结果的数据值。
  8. 根据权利要求6所述的方法,其特征在于,所述协同仿真周期大于第一时长,所述第一时长等于所述多个仿真模型中其仿真周期最大的那个仿真模型的仿真周期。
  9. 一种服务器端控制装置,其特征在于,包括:
    发送模块,用于在每个协同仿真周期期间,将多个第一仿真数据分别发送给至少一个客户端控制装置中相应的客户端控制装置,其中,每一个客户端控制装置与多个仿真模型中的至少一个对应,给每一个客户端控制装置发送的所述第一仿真数据是封装有与该客户端控制装置对应的仿真模型仿真所需的输入数据的仿真数据;以及
    接收模块,用于在每个协同仿真周期期间,从所述至少一个客户端控制装置接收多个第二仿真数据,作为在下一个协同仿真周期的所述多个第一仿真数据,
    其中,每一个第二仿真数据是以相同的数据结构对所述多个仿真模型的其中一个仿真模型输出的一个仿真结果进行封装得到的数据,所述仿真结果在下一个协同仿真周期用作所述输入数据,所述数据结构能够使所述多个仿真模型输出的各个仿真结果彼此区分。
  10. 根据权利要求9所述的服务器端控制装置,其特征在于,所述数据结构至少包括以下字段:
    被封装的仿真结果的名称,
    发送封装有所述被封装的仿真结果的仿真数据的客户端控制装置的名称,
    所述被封装的仿真结果所属的数据领域,以及
    所述被封装的仿真结果的数据值。
  11. 根据权利要求9所述的服务器端控制装置,其特征在于,
    发送给每一个客户端控制装置的所述第一仿真数据是基于数据路由关系确定的,
    其中,所述数据路由关系指明所述多个第一仿真数据各自要发送给哪个客户端控 制装置。
  12. 根据权利要求11所述的服务器端控制装置,其特征在于,所述数据路由关系包括多项数据,其中,每项数据包括:
    所述多个第一仿真数据的其中一个仿真数据所封装的所述输入数据的名称,
    发送所述其中一个仿真数据的客户端控制装置的名称,
    所述其中一个仿真数据所封装的所述输入数据所属的数据领域,以及
    要接收所述其中一个仿真数据的客户端控制装置的名称。
  13. 根据权利要求9所述的服务器端控制装置,其特征在于,所述协同仿真周期大于第一时长,所述第一时长等于所述多个仿真模型中其仿真周期最大的那个仿真模型的仿真周期。
  14. 一种客户端控制装置,其特征在于,包括:
    获取模块,用于在每个协同仿真周期期间,从服务器端控制装置获取至少一个第一仿真数据,所述至少一个第一仿真数据是封装有多个仿真模型中的至少一个仿真模型仿真所需的输入数据的仿真数据;
    提供模块,用于将从所述至少一个第一仿真数据中解析得到的所述输入数据提供给所述至少一个仿真模型;
    接收模块,用于在每个协同仿真周期期间,接收所述至少一个仿真模型输出的至少一个仿真结果;以及
    发送模块,用于在每个协同仿真周期期间,向所述服务器端控制装置发送至少一个第二仿真数据,其中,每一个第二仿真数据是以相同的数据结构对所述至少一个仿真结果的其中一个封装得到的,所述数据结构能够使所述多个仿真模型输出的各个仿真结果彼此区分。
  15. 根据权利要求14所述的客户端控制装置,其特征在于,所述数据结构至少包括以下字段:
    被封装的仿真结果的名称,
    发送封装有所述被封装的仿真结果的仿真数据的客户端控制装置的名称,
    所述被封装的仿真结果所属的数据领域,以及
    所述被封装的仿真结果的数据值。
  16. 根据权利要求14所述的客户端控制装置,其特征在于,所述协同仿真周期大于第一时长,所述第一时长等于所述多个仿真模型中其仿真周期最大的那个仿真模型的仿真周期。
  17. 一种控制系统,其特征在于,包括:
    根据权利要求9至13中任一项所述的服务器端控制装置;以及
    至少一个根据权利要求14至16中任一项所述的客户端控制装置。
  18. 一种计算设备,其特征在于,包括至少一个处理器和至少一个存储器,所述存储器存储有程序指令,所述程序指令当被所述至少一个处理器执行时使得所述至少一个处理器执行权利要求1至5中任一项所述的方法或执行权利要求6至8中任一项所述的方法。
  19. 一种计算机可读存储介质,其上存储有程序指令,其特征在于,所述程序指令当被计算机执行时使得所述计算机执行权利要求1至5中任一项所述的方法或执行权利要求6至8中任一项所述的方法。
  20. 一种计算机程序产品,其特征在于,其包括有程序指令,所述程序指令当被计算机执行时使得所述计算机执行权利要求1至5中任一项所述的方法或执行权利要求6至8中任一项所述的方法。
PCT/CN2021/100865 2021-06-18 2021-06-18 协同仿真的方法及装置 WO2022261927A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202180006518.4A CN115769213A (zh) 2021-06-18 2021-06-18 协同仿真的方法及装置
PCT/CN2021/100865 WO2022261927A1 (zh) 2021-06-18 2021-06-18 协同仿真的方法及装置
EP21945512.8A EP4350511A1 (en) 2021-06-18 2021-06-18 Method and apparatus for co-simulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/100865 WO2022261927A1 (zh) 2021-06-18 2021-06-18 协同仿真的方法及装置

Publications (1)

Publication Number Publication Date
WO2022261927A1 true WO2022261927A1 (zh) 2022-12-22

Family

ID=84526084

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/100865 WO2022261927A1 (zh) 2021-06-18 2021-06-18 协同仿真的方法及装置

Country Status (3)

Country Link
EP (1) EP4350511A1 (zh)
CN (1) CN115769213A (zh)
WO (1) WO2022261927A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101504688A (zh) * 2009-03-24 2009-08-12 北京理工大学 一种基于hla的仿真软件交互方法
US20150134313A1 (en) * 2013-11-08 2015-05-14 Rockwell Automation Technologies, Inc. Time synchronization of signal transmission intervals for simulating a machine in industrial automation
CN104915242A (zh) * 2015-06-11 2015-09-16 北京航天发射技术研究所 多学科协同仿真架构方法
CN108427776A (zh) * 2017-02-13 2018-08-21 中国科学院沈阳计算技术研究所有限公司 分布式全数字联合仿真系统与方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101504688A (zh) * 2009-03-24 2009-08-12 北京理工大学 一种基于hla的仿真软件交互方法
US20150134313A1 (en) * 2013-11-08 2015-05-14 Rockwell Automation Technologies, Inc. Time synchronization of signal transmission intervals for simulating a machine in industrial automation
CN104915242A (zh) * 2015-06-11 2015-09-16 北京航天发射技术研究所 多学科协同仿真架构方法
CN108427776A (zh) * 2017-02-13 2018-08-21 中国科学院沈阳计算技术研究所有限公司 分布式全数字联合仿真系统与方法

Also Published As

Publication number Publication date
EP4350511A1 (en) 2024-04-10
CN115769213A (zh) 2023-03-07

Similar Documents

Publication Publication Date Title
US9506982B2 (en) Testbench builder, system, device and method including a generic monitor and transporter
WO2022120717A1 (zh) 仿真任务调度方法、执行方法、仿真实现方法及装置
WO2018121367A1 (zh) 一种三维模型构建方法、装置及系统
JP2007528069A5 (zh)
WO2022041720A1 (zh) 一种基于uds的通信方法、ecu及上位机
EP3089030A1 (en) Flexible physical function and virtual function mapping
US9916404B2 (en) Dynamic bridging of interface protocols
JP7331178B2 (ja) シャーシシミュレーション方法、装置、サーバ、記憶媒体及びプログラム
WO2022247110A1 (zh) 任务处理方法及装置、电子设备和存储介质
CN109726800B (zh) 运算方法、装置及相关产品
WO2022261927A1 (zh) 协同仿真的方法及装置
JP6464739B2 (ja) 情報処理システムの制御プログラム,情報処理装置,及び情報処理システム
US11030362B2 (en) Modeling and cooperative simulation of systems with interdependent discrete and continuous elements
US20230261961A1 (en) System and method for simulation and testing of multiple virtual ecus
CN117312215A (zh) 一种服务器系统、作业执行方法、装置及设备和介质
CN115776653A (zh) 一种车载数据的获取方法、装置、设备及介质
CN115328997A (zh) 数据同步方法、系统、设备及存储介质
US20050144586A1 (en) Automated generation method of hardware/software interface for SIP development
WO2019021898A1 (ja) 開発支援装置
CN116627496B (zh) 基于uvm的寄存器模型构建、验证方法、系统与电子设备
Tarafdar Building and using virtual FPGA clusters in data centers
WO2023201558A1 (zh) 一种映射关系生成方法、装置和存储介质
WO2023115397A1 (zh) 生成自动化脚本的方法和装置
US20240020160A1 (en) Virtual flatsat and distributed digital nodes
KR20130060980A (ko) 시뮬레이션 프로세스 통합 처리 시스템 및 그 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21945512

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2021945512

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2021945512

Country of ref document: EP

Effective date: 20240103

NENP Non-entry into the national phase

Ref country code: DE