d91480c833c6c5e406f690148ce534e0.ppt
- Количество слайдов: 39
Introduction to Orchestra Module 14 Introduction to Orchestra a Heterogenous Co-Simulation Environment www. opal-rt. com
Introduction to Orchestra This module introduces Orchestra and its use in RTLAB Main. Control – What is Orchestra – Orchestra with Simulink Models – Orchestra with C Code www. opal-rt. com
Orchestra (Multi-model Integration) Simulink MATRIXx Dymola AMESim C Code FPGA Orchestra Framework Snapshot Acquisition Console www. opal-rt. com QNX Parameters Data logging I/O
Orchestra (Multi-model Integration) Model Node www. opal-rt. com Model Node
What is Orchestra • RT-LAB Orchestra is an add-on extending RT-LAB’s connectivity capabilities to heterogeneous co-simulations • Heterogeneous co-simulations consist of simulations written in different programming languages, or generated by various simulation tools The main advantage • Flexibility: co-simulation components can be developed and tested by different teams, using their preferred tools, then integrated to form a cohesive co-simulation system. www. opal-rt. com
Orchestra with Simulink Models An orchestra model consists of a • Framework - using Proxy Blocks • Model Component Using External Components www. opal-rt. com
Framework A framework is created using Simulink with Proxy blocks. . C Code, Simulink model, etc. www. opal-rt. com
Model Component External Component blocks are added to a Simulink model to connect to the framework www. opal-rt. com
Building the Framework • Load rtdemo 2 into RT-Lab and Edit it www. opal-rt. com
Building the Framework • Go to the controller and • Delete the controller Blocks www. opal-rt. com
Building the Framework • Drag in a Simulink Model Proxy Block www. opal-rt. com
Building the Framework • Double click on the Proxy Block to get the properties dialog. Select Configure …. . . www. opal-rt. com
Building the Framework • Select Domain->Add New Domain www. opal-rt. com
Building the Framework • Select New Domain 0 and change to rtdemo 2_domain (hit enter after change) www. opal-rt. com
Building the Framework • Select FRAMEWORK-->CLIENT • Select Item->Add New Data Item (add 2 of them) www. opal-rt. com
Building the Framework • Select CLIENT-->FRAMEWORK • Select Item->Add New Data Item www. opal-rt. com
Building the Framework • Select the Data Items and change the names to the model names www. opal-rt. com
Building the Framework • Select rtdemo 2_domain ad change “Is Synchronous’ to yes www. opal-rt. com
Building the Framework • Select File->Save As and save in the local directory as rtdemo 2_orch. xml • Close the DDF Configurator and click OK www. opal-rt. com
Building the Framework • Connect the model and save in the local directory You have now created an Orchestra Framework! www. opal-rt. com
Connecting a Model • Create a model from the controller www. opal-rt. com
Connecting a Model • Add a Publish, Subscribe, and Control Block from the External Components Library www. opal-rt. com
Connecting a Model • Open the Controller block and change the domain name to rtdemo 2_domain • Click OK www. opal-rt. com
Connecting a Model • Open the Subscribe Block • Enter the domain and Item Names • Click OK www. opal-rt. com
Connecting a Model • Open the Publish Block • Enter the domain and Item Name • Click OK www. opal-rt. com
Connecting a Model • Connect, Terminate, and save as Controller. mdl www. opal-rt. com
Loading the Framework • Load rtdemo 2. mdl (the one you created) into RTLab – – www. opal-rt. com Compile the model Load Execute Disconnect
Loading the Simulink Model • Load Controller. mdl (the one you created) into RTLab – – www. opal-rt. com Compile the model Load Execute Disconnect
Running the Model You now have a Model running using Orchestra • Try unloading and loading the Controller model www. opal-rt. com
Information on Orchestra Where information on Orchestra can be found: • Go to RT-Lab Main. Control Click on the Help button • Press the Help Button on the Orchestra blocks • Access the PDF file in c: /OPAL-RT/RTLAB 8. 1 XX/Common/docs/pdf www. opal-rt. com
Orchestra with C Code Orchestra can also be used to bring in external C Code to RT-Lab www. opal-rt. com
Building the Framework • The framework for a C Code model is similar to a framework for a Simulink model…Just use an Interface to C Code Block instead! www. opal-rt. com
Building the Framework • Domain names, Data Items, … are all entered the same as for a simulink model…using the Configurator. www. opal-rt. com
C Code Source • Open Orchestra_External. Listener. c (provided in class) in a code browser or editor www. opal-rt. com
C Code Source • Set the Domain • Connect to the Domain www. opal-rt. com
C Code Source • Set up the Data Items • Subscribe to the input Data Items www. opal-rt. com
C Code Source • Add your code…. . • Publish the output Data Items www. opal-rt. com
Compiling the C Code • By including the information on the C Code in an Op. External. Executable Block, all of the file transfers and compilation is taken care of www. opal-rt. com
Running the Simulation • Run the simulation using RT-Lab. Start the C code on the Target. www. opal-rt. com