Download presentation
Presentation is loading. Please wait.
Published byMartin Poole Modified over 9 years ago
1
www.opal-rt.com Introduction to Orchestra Module 14 Introduction to Orchestra a Heterogenous Co-Simulation Environment
2
www.opal-rt.com Introduction to Orchestra This module introduces Orchestra and its use in RT-LAB MainControl –What is Orchestra –Orchestra with Simulink Models –Orchestra with C Code
3
www.opal-rt.com Orchestra (Multi-model Integration) I/O Parameters Acquisition Console Data logging Simulink MATRIXx Dymola AMESim C Code FPGA Orchestra Framework QNX Snapshot
4
www.opal-rt.com Orchestra (Multi-model Integration) Model Node
5
www.opal-rt.com What is Orchestra 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.
6
www.opal-rt.com Orchestra with Simulink Models An orchestra model consists of a Framework - using Proxy Blocks Model Component - Using External Components
7
www.opal-rt.com Framework A framework is created using Simulink with Proxy blocks..C Code, Simulink model, etc.
8
www.opal-rt.com Model Component External Component blocks are added to a Simulink model to connect to the framework
9
www.opal-rt.com Building the Framework Load rtdemo2 into RT-Lab and Edit it
10
www.opal-rt.com Building the Framework Go to the controller and Delete the controller Blocks
11
www.opal-rt.com Building the Framework Drag in a Simulink Model Proxy Block
12
www.opal-rt.com Building the Framework Double click on the Proxy Block to get the properties dialog. Select Configure …...
13
www.opal-rt.com Building the Framework Select Domain->Add New Domain
14
www.opal-rt.com Building the Framework Select New Domain0 and change to rtdemo2_domain (hit enter after change)
15
www.opal-rt.com Building the Framework Select FRAMEWORK-->CLIENT Select Item->Add New Data Item (add 2 of them)
16
www.opal-rt.com Building the Framework Select CLIENT-->FRAMEWORK Select Item->Add New Data Item
17
www.opal-rt.com Building the Framework Select the Data Items and change the names to the model names
18
www.opal-rt.com Building the Framework Select rtdemo2_domain ad change “Is Synchronous’ to yes
19
www.opal-rt.com Building the Framework Select File->Save As and save in the local directory as rtdemo2_orch.xml Close the DDF Configurator and click OK
20
www.opal-rt.com Building the Framework Connect the model and save in the local directory You have now created an Orchestra Framework!
21
www.opal-rt.com Connecting a Model Create a model from the controller
22
www.opal-rt.com Connecting a Model Add a Publish, Subscribe, and Control Block from the External Components Library
23
www.opal-rt.com Connecting a Model Open the Controller block and change the domain name to rtdemo2_domain Click OK
24
www.opal-rt.com Connecting a Model Open the Subscribe Block Enter the domain and Item Names Click OK
25
www.opal-rt.com Connecting a Model Open the Publish Block Enter the domain and Item Name Click OK
26
www.opal-rt.com Connecting a Model Connect, Terminate, and save as Controller.mdl
27
www.opal-rt.com Loading the Framework Load rtdemo2.mdl (the one you created) into RT- Lab –Compile the model –Load –Execute –Disconnect
28
www.opal-rt.com Loading the Simulink Model Load Controller.mdl (the one you created) into RT- Lab –Compile the model –Load –Execute –Disconnect
29
www.opal-rt.com Running the Model You now have a Model running using Orchestra Try unloading and loading the Controller model
30
www.opal-rt.com Information on Orchestra Where information on Orchestra can be found: Go to RT-Lab MainControl Click on the Help button Press the Help Button on the Orchestra blocks Access the PDF file in c:/OPAL-RT/RT- LAB8.1XX/Common/docs/pdf
31
www.opal-rt.com Orchestra with C Code Orchestra can also be used to bring in external C Code to RT-Lab
32
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!
33
www.opal-rt.com Building the Framework Domain names, Data Items, … are all entered the same as for a simulink model…using the Configurator.
34
www.opal-rt.com C Code Source Open Orchestra_ExternalListener.c (provided in class) in a code browser or editor
35
www.opal-rt.com C Code Source Set the Domain Connect to the Domain
36
www.opal-rt.com C Code Source Set up the Data Items Subscribe to the input Data Items
37
www.opal-rt.com C Code Source Add your code….. Publish the output Data Items
38
www.opal-rt.com Compiling the C Code By including the information on the C Code in an OpExternalExecutable Block, all of the file transfers and compilation is taken care of
39
www.opal-rt.com Running the Simulation Run the simulation using RT-Lab. Start the C code on the Target.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.