Contenu connexe
Similaire à IBM Rhapsody and MATLAB/Simulink (20)
IBM Rhapsody and MATLAB/Simulink
- 1. © 2013 IBM Corporation
Giulio Santoli, Client Technical Professional
IBM Software, Rational
26/11/2013
Rhapsody and MATLAB/Simulink
- 2. Integration Short description The Mathworks Products
point
© 2013 IBM Corporation
Software and Systems Engineering | Rational
Rhapsody and MATLAB/Simulink Integration Points
Generate and simulate a Simulink model from a - MATLAB/Simulink
structured SysML block/UML class that consists of
SysML/UML parts connected to parts implemented in
Simulink
Plant Model
Integration
Integrate Simulink models in Rhapsody Design Manager - MATLAB/Simulink
for either model change configuration and traceability
Design
Manager
- MATLAB,
- MATLAB Symbolic Math
Toolbox
1. Solve SysML parametric diagrams using MATLAB
Symbolic Math Toolbox
2. Include MATLAB expressions for computations
Parametric
Constraint
Evaluation
Generate an S-Function block to be used in Simulink - MATLAB/Simulink
models from a UML class / SysML block
S-Function
Generation
- MATLAB/Simulink,
- Real-time workshop with
Embedded Coder
1. Generate executable code from a Rhapsody model
with parts implemented in Simulink
1. The Simulink code may represent either:
Algorithms implemented in the system
The behavior of the environment (plant)
2. Models can be animated if code is instrumented
3. Rhapsody references code generated from Simulink by
Embedded Coder
Hosted
Simulation
- 3. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Parametric Constraint Evaluator (PCE)
Evaluation of parametric diagrams using a Computer Algebra System
PCE carry out analytics of system parameters as expressed in SysML parametric diagrams
– A tool for engineers to perform trade studies
PCE Analytics includes
– Calculating values of system properties given a set of constraints
– Simulating (plotting) dependencies between a set of properties in time
– Optimizing values for system properties
PCE workflow also supports
– Producing html reports
– Exporting to a solver specific script
– Importing and exporting from .csv files
PCE integrates with mathematical solvers
– Currently supports MAXIMA and MATLAB Symbolic Math Toolbox
Free PCE Tutorial on developerWorks:
https://www-304.ibm.com/support/docview.wss?uid=swg2701872
- 4. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Parametric Constraint Evaluator (PCE)
Parametric Evaluation for Trade-Studies and System Optimization
- 5. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Parametric Constraint Evaluator (PCE)
Plotting Non-Linear Differential Equations
- 6. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Hosted Simulation
Import the Simulink model and its corresponding code in Rhapsody
The integration of Simulink blocks into Rational Rhapsody uses a black box approach
In Rhaposdy, a SimulinkBlock represents a Simulink model and its generated code
When code is generated for a Rational Rhapsody model containing Simulink blocks, the code
generated by Simulink is wrapped into the Rational Rhapsody-generated code
Input/Output ports of the Simulink blocks are exposed as flowports
Simulink Real-Time Workshop Embedded Coder is required, and only Fixed Step Solver
is supported
- 7. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Hosted Simulation
Importing and Executing a Simulink Model in Rhapsody
- 8. S-Function Generation
Using Rhapsody to create S-functions that can then be plugged into Simulink models.
© 2013 IBM Corporation
Software and Systems Engineering | Rational
MATLAB/Simulink S-Function is a user defined block implemented in C/C++ or other
programming language
Rhapsody can generate C/C++ code corresponding to blocks stereotyped «S-FunctionBlock»
along with a MEX option file to generate an S-Function simulink block
The generated code conforms to the S-Function standard and transforms the ports
accordingly
The S-Function generation capability is used by the Plant Model integration too
- 9. © 2013 IBM Corporation
Software and Systems Engineering | Rational
S-Function Generation
Include Simple or Complex Rhapsody-generated Code in Simulink Models
- 10. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Plant Model Integration
Generate and Simulate a System with both Rhapsody and Simulink contribution
Bring the best of both Rhapsody and Simulink to run and simulate a Plant System
Build a Rhapsody model with «StructuredSimulinkBlock», containing parts typed by
«SimulinkBlock» in their hierarchy and other SysML/UML parts
«StructuredSimulinkBlock» blocks are transformed to a Simulink model that consists of an S-Function
block for the SysML/UML parts and usages of the Simulink models represented by
the «SimulinkBlock» parts or other «StructuredSimulinkBlock» parts
The simulation runs on Simulink: no Step Solvers limiatations, nor Real-Time Workshop
Embedded Coder is needed
- 11. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Plant Model Integration
Generating Simulink Models from Rhapsody
- 12. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Plant Model Integration
Enables the Simulation of Control Blocks within the overall UML/SysML Model
1. Behaviors in Simulink 2. Architecture in Rhapsody
(control and plant blocks)
4. Simulation 3. Simulink model for co-simulation (both tools)
- 13. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Plant Model Integration
Co-Simulation Example with Rhapsody and Simulink
- 14. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Integration Points Comparison Table
Comparison among different Integration point from the Execution point of view
Host Simulation
S-Functions
Generation
Plant Model
Integration
Can Use Variable
Step Solvers
No Yes Yes
Animation 1 Rhapsody Only Both Both
Execution
Performed In 2 Rhapsody Simulink Simulink
Real-Time
Workshop
Embedded Coder
License
Required Not Required Not Required
1 The capability to receive feedback from the model as it executes, i.e. diagram animation in Rhapsody, Scopes in Simulink
2 The tool performing the execution also controls the timing
- 15. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Rhapsody Design Manager Integration
Integrating MATLAB/Simulink models in the Collaboration Lifecycle
Publish and Collaborate on Simulink models using the Jazz platform
Breakthrough combination of domain-specific design solutions enabling:
– Look at the system as a whole and not individual parts across the architecture, algorithms and
environment
– View Simulink design information with a web browser or Rational Rhapsody desk top client providing
easy access for project stakeholders
– Search and navigate across projects and lifecycle artifacts to help find key information from multiple
sources quickly
Trace, via Open Services for Lifecycle Collaboration (OSLC), from designs to other
lifecycle artifacts such as requirements, test cases, work items or other aspects of the
engineering process
Create design reviews involving different model stakeholders
Manage changes in a Simulink model and perform lock and unlock operations directly in
Simulink
- 16. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Rhapsody Design Manager Integration
Navigating a Simulink Model in Design Manager
- 17. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Rhapsody Design Manager Integration
Versioning a Simuilnk model in Design Manager from Simulink context-menu
- 18. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Summary
Rhaposdy and MATLAB/Simulink, a perfect match
Several integration points are available
between Rhapsody and MATLAB/Simulink
The integration allows design and simulation
of cyber-physical systems
Bringing Simulink into Design Manager
enables Traceability and Collaboration
Helping customers improve the value and performance of their investments in software as
strategic business assets
- 19. © 2013 IBM Corporation
Software and Systems Engineering | Rational
Additional Rerefences
Articles and Views about Rhaposdy and Simulink Integrations
IBM Rational Rhapsody 8 Infocenter
– http://pic.dhe.ibm.com/infocenter/rhaphlp/v8/index.jsp?topic=%2Fcom.ibm.rhp.integ.designtools.d
oc%2Ftopics%2Ft_integratingrationmathworkssimulink.html
“Model Based Control System Design Using SysML, Simulink, and Computer
Algebra System” by Takashi Sakairi, Eldad Palachi, et al.
– http://www.hindawi.com/journals/jcse/2013/485380/
Rhapsody Community @ developerWorks
– https://www.ibm.com/developerworks/community/groups/service/html/communityview?community
Uuid=969f1342-9137-406d-81f5-7f082a7c646d
Tutorial for Parametric Constraints Evaluator
– http://www-01.ibm.com/support/docview.wss?uid=swg27018723
- 20. © 2013 IBM Corporation
Software and Systems Engineering | Rational
www.ibm.com/software/rational
© Copyright IBM Corporation 2013. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind,
express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have
the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM
software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities
referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature
availability in any way. IBM, the IBM logo, Rational, the Rational logo, Telelogic, the Telelogic logo, and other IBM products and services are trademarks of the International Business Machines
Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others.