Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Orchestra

Similar presentations


Presentation on theme: "Introduction to Orchestra"— Presentation transcript:

1 Introduction to Orchestra
Module 14 Introduction to Orchestra a Heterogenous Co-Simulation Environment

2 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 Models from different groups and bring them together

3 Orchestra (Multi-model Integration)
Simulink MATRIXx Dymola AMESim C Code FPGA Simulink MATRIXx Dymola AMESim C Code FPGA Orchestra Framework QNX Snapshot Parameters We are introducing a new capability for our Real-Time Simulators. This is a High Level Architecture (HLA) design that facilitates real-time simulation of multiple models, communicating with each other and passing data. The model or models may be in the same domain tool or different domains. Behavioral Mechanical Hydraulic (fluids) Legacy C Code etc. Acquisition Console Data logging I/O

4 Orchestra (Multi-model Integration)
Model Node Model Node

5 What is Orchestra Orchestra The main advantage
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 Orchestra with Simulink Models
An orchestra model consists of a Framework - using Proxy Blocks Model Component - Using External Components

7 Framework A framework is created using Simulink with Proxy blocks..C Code, Simulink model, etc.

8 Model Component External Component blocks are added to a Simulink model to connect to the framework

9 Building the Framework
Load rtdemo2 into RT-Lab and Edit it

10 Building the Framework
Go to the controller and Delete the controller Blocks

11 Building the Framework
Drag in a Simulink Model Proxy Block

12 Building the Framework
Double click on the Proxy Block to get the properties dialog. Select Configure …...

13 Building the Framework
Select Domain->Add New Domain

14 Building the Framework
Select New Domain0 and change to rtdemo2_domain (hit enter after change)

15 Building the Framework
Select FRAMEWORK-->CLIENT Select Item->Add New Data Item (add 2 of them)

16 Building the Framework
Select CLIENT-->FRAMEWORK Select Item->Add New Data Item

17 Building the Framework
Select the Data Items and change the names to the model names

18 Building the Framework
Select rtdemo2_domain ad change “Is Synchronous’ to yes

19 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 Building the Framework
Connect the model and save in the local directory You have now created an Orchestra Framework!

21 Connecting a Model Create a model from the controller

22 Connecting a Model Add a Publish, Subscribe, and Control Block from the External Components Library

23 Connecting a Model Open the Controller block and change the domain name to rtdemo2_domain Click OK

24 Connecting a Model Open the Subscribe Block
Enter the domain and Item Names Click OK

25 Connecting a Model Open the Publish Block
Enter the domain and Item Name Click OK

26 Connecting a Model Connect, Terminate, and save as Controller.mdl
No SM and SC

27 Loading the Framework Load rtdemo2.mdl (the one you created) into RT-Lab Compile the model Load Execute Disconnect

28 Loading the Simulink Model
Load Controller.mdl (the one you created) into RT-Lab Compile the model Load Execute Disconnect

29 Running the Model You now have a Model running using Orchestra
Try unloading and loading the Controller model

30 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 Orchestra with C Code Orchestra can also be used to bring in external C Code to RT-Lab

32 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 Building the Framework
Domain names, Data Items, … are all entered the same as for a simulink model…using the Configurator.

34 C Code Source Open Orchestra_ExternalListener.c (provided in class) in a code browser or editor

35 C Code Source Set the Domain Connect to the Domain

36 C Code Source Set up the Data Items Subscribe to the input Data Items

37 C Code Source Add your code….. Publish the output Data Items

38 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 Running the Simulation
Run the simulation using RT-Lab. Start the C code on the Target.


Download ppt "Introduction to Orchestra"

Similar presentations


Ads by Google