rhapsody and mechatronics, multi-domain simulation
TRANSCRIPT
Accelerating Product and Service Innovation
© 2013 IBM Corporation1
Graham Bleakley Ph.D.Solution Architect A&D and AutomotiveIBM Software, Rational
Mechatronics and its application with Rhapsody Design Manager
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Agenda What is mechatronics and How does it fit with Continuous
Engineering ?
The practicalities of Mechatronic Modelling with Rhapsody Mathematical modelling tools for SE and Mechatronics
Use of Simulink and Parametrics Constraint EvaluatorSpecification models
Design Models
Use cases
Modelica Introduction
Functional Mockup Interface and Unit:-How it works
Use cases
Vision of RDM as FMI simulation backbone
References
© 2013 IBM Corporation
Accelerating Product and Service InnovationAccelerating Product and Service Innovation
The ‘make up’ of products and systems has changed
Mo
re
Time
Consumer expectations
Complexity
Softwareand electronics
© 2013 IBM Corporation
Accelerating Product and Service Innovation
What is Mechatronics ? Interdisciplinary approach to engineering that involves the
integration of Mechanical
Electrical
Software
Requires a system engineering approach to develop properly integrated systems
Also know as:- Cyber-Physical Systems (CPS)
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Mechatronics and Modelling Emphasis on understanding the physical behaviour of the
systems as well as the logical behaviour Requires mathematical modelling tools
Mathematical modelling tools need to be integrated into the logical behaviour models Physical representations of the systems can and do affect the
performance of the system under design
Why do you model the physical systems ? Verify that you can meet functional and non-functional requirements
Trade studies (parametric analysis)
Ensure that the system does what it says It can do
Continuous Engineering Simulation
Connected Information
© 2013 IBM Corporation
Accelerating Product and Service Innovation
6
Quality managementAnalysis, design and prototyping Requirements management
Workflow, Planning, Task & Change Management
Mechatronics Modelling and Continuous Engineering (Simulation)
Engineering context
MarketAnalytics
System Verificationand Validation
SystemTest
SystemRequirements
SystemDesign
Deployment/Release to Mfg.
CustomerRequirements
Operations and Maintenance
Implementation
Decom
position
and Definition
Inte
grat
ion
and
Valid
atio
n
Agile SoftwareEngineering
Electrical/Electronics
Design
MechanicalDesign
Iterative
MechatronicsModelling
© 2013 IBM Corporation
Accelerating Product and Service Innovation
8
IBM helps you turn product development into a competitive advantage
Improve systems engineering to tackle growing product complexity
Improve software development to deliver innovation faster
With an open, integrated systems approach that enables access to all engineering and related information
Engineering context
Open standards
MarketAnalytics
System Verificationand Validation
SystemTest
SystemRequirements
SystemDesign
Deployment/Release to Mfg.
CustomerRequirements
Operations and Maintenance
Implementation
Decom
position
and Definition
Inte
grat
ion
and
Valid
atio
n
Agile SoftwareEngineering
Business Engineering Operational
Enterprise information
Electrical/Electronics
Design
MechanicalDesign
Iterative
© 2013 IBM Corporation
Accelerating Product and Service Innovation
The practicalities of Mechatronic Modelling with Rhapsody
© 2013 IBM Corporation
Accelerating Product and Service Innovation
10 HVC 2012Nov. 2012
Developing Mechatronic/CPS (usually) means doing Systems Engineering
Commonly used in complex multi-disciplinary systems: Requires disciplined requirements analysis (functional and non-
functional analysis, trade-offs, etc.)
Requires coordination between domain specific engineering teams (managing engineering artifacts)
High risk of failure, esp. during integration, Leads to non-trivial emergent behavior -> simulations!
Source: Sheard, Sara, A.,Systems Engineering Roles Revisited, Proceedings of the 10th Annual International Council of Systems Engineering, 2000
© 2013 IBM Corporation
Accelerating Product and Service Innovation
11 HVC 2012Nov. 2012
Typical Mechatronic or CPS modelling
Source: Edward A. Lee and Sanjit A. Seshia, Introduction to Embedded Systems, A Cyber-Physical Systems Approach, http://LeeSeshia.org, ISBN 978-0-557-70857-4, 2011
© 2013 IBM Corporation
Accelerating Product and Service Innovation
12
There is no single tool that fits all needs• Rhapsody is excellent for embedded systems design (statecharts,
activity diagrams, sequence diagrams)
• Modelica tools are intended for physical modeling
• Simulink strength is control design
Systems Engineers generally choose a single tool that best meets their needs, making compromises in multi-domain modeling• Often organizations dictate the tool
Change in tool choice means loss of legacy models
Tool choice often prohibits inter-organizational cooperation
Rhapsody provides a way to work with a variety of mathematical modelling tools
Challenges
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Mechatronic Modelling tools and Rhapsody
Text based tools (work with PCE, one shot analysis) MatLab
Maxima
Block diagram based tools (DM and continuous time based analysis) Simulink
Lab View
Time based analysis on another tool Modelica (OO textual mathematical modelling) Implemented
graphicaly in tools likeDymola
SimulationX
Integration is via the Functional Mockup Interface (FMI)
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Use different tools for different types of analysis (PCE) Useful for calculating properties of
systems using Parametric diagramsTotal system mass
Total systems weight
Examine Non-functional requirements i.e. totalMass<17 Kg
Maxima is easier to use than MatlabEverything driven by function calls that
have to be defined in Matlab
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Use different tools for different types of analysis (Integrated) Simulink and National Instruments
The mathematical model is embedded in the plant model
Connected via flow ports
Different levels of analysis
Specification level
Understanding systems level non-functional requirements i.e. max motor torque
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Satisfying Systems Level Requirements
By Linking requirements to model Simulink models at the block or even the model level we can show traceability
This can be brought out in DM and RELM see https://w3-connections.ibm.com/files/app#/file/975b9225-9a41-4834-
af69-99450113100d
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Simulink and PCE for Design
Possible to feed analysis from PCE model into a Design Model Simulink model is more detailed and shows components with real
component values
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Leads to detailed analysis
Specification model leads to ball park design figures
Design model leads to identification of potential components Compare specification analysis to design analysis models
Evaluate non-functional requirements at different levels of abstraction
Max torque (spec) Max torque (design) Max motor torque due No gearbox actual masses/gb to gearbox
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Possible workflow for PCE and Simulink
Specification Level (use case/ functional and non-functional analysis) Take initial requirements and derive simulink or analytical model
using parametric diagrams (and Maxima) to understand things likeExpected torques for drive systems based on non-functional requirements
• Expected mass of components
• Timing requirements to complete an overarching operation of the system
Basic control strategies
• Differentiate between acceleration, velocity controls
Gives you the ability to do some initial understanding and refinement of the systems design
Derive further requirements
Start to think about different implementation strategies
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Possible workflow for PCE and Simulink Design Synthesis level (Physical Architecture)
Use Parametric diagrams to understand how non-functional requirements are met
Total Mass of the System
Total Cost of the System
Start to do optimisation of the system using real component values
Value over Excel is that:-
Component values and the design decisions are captured directly in the model
Through RDM and RELM there is potential to link into design catalogues of specific components
Capture the physical architecture as a Rhapsody model with the physical behaviour captured in a detailed plant model created in Simulink
Plant model uses real component data to verify that higher level functional and non-functional requirements are met
In the same ball park as the specification model (verification of the initial assumptions)
Provides a test case for the implementation
© 2013 IBM Corporation
Accelerating Product and Service Innovation
HVC 2012
Usage on the “V-Model”
Requirements Analysis
Functional Decomposition
Design Synthesis
Analysis
Design
Implementation
System
s Eng.
Softw
are Eng.
Simulation in RhapsodyGenerate code
(algorithmic integration)
Component/Subsystem Spec.Simulation in Simulink
* Doing trade studies with PCE is not shown in this tutorial
PCE, Maxima/MatlabSimulation in Simulink
Analysis Non-Functional System Requirements
Trade Study
Parametric Constraint Evaluation (PCE)*
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Usage model for DM and Simulink Be careful
Simulink has basic configuration control built into it
Has a library mechanism to manage models
Sophisticated users develop model libraries and reuse components
In DM you can manage Simulink models as part of a configuration and the owning Rhapsody model This would work best under actively managed mode
If doing Hybrid simulation it is currently best to work in actively managed mode
You can do simulation on DM but you need to reference the original Simulink model or files, not the version published to DM
You might get Simulink users generating code and embedding in Rhapsody This is more sw orientated and would suggest using externally
managed mode
© 2013 IBM Corporation
Accelerating Product and Service Innovation
HVC 2012
Modelica
A standardized textual language for modeling physical systems
Annotations are also standardized now and can be used to render diagrams
Developed since 1996 by the Modelica Association https://www.modelica.org
Current version 3.3 (May 2012)
Modelica is Object-Oriented (see right side)
Has a large (~30) set of free and commercial libraries for different domains (source: https://www.modelica.org/ModelicaLibrariesOverview)
Implemented by various free and commercial tools: (Dymola, Open Modelica, Math Modelica)
The OMG SysML4Modelica profile extends SysML to model Modelica constructs in SysML (IBD) and roundtrip Modelica models back to SysML
Source: https://modelica.org/publications/papers/Eurosim98Modelica.pdfSource: https://modelica.org/publications/papers/Eurosim98Modelica.pdf
© 2013 IBM Corporation
Accelerating Product and Service InnovationFMI – Functional Mockup Interface - Background
• FMI development initiated, organized and headed by Daimler AG
• Improved Software/Model/Hardware-in-the-Loop Simulation, of physical models from different vendors.
• Open Standard
• 14 Automotive Use-Cases to evaluate FMI.
Enginewith ECU
Gearboxwith ECU
Thermalsystems
Automatedcargo door
Chassis components,roadway, ECU (e.g. ESP)
etc.
functional mockup interface for model exchange and tool coupling
Blocwitz, Otter, et al, retrieved from: https://trac.fmi-standard.org/export/700/branches/public/docs/Modelica2011/The_Functional_Mockup_Interface.ppt
The FMI development is part of the ITEA2 MODELISAR project
© 2013 IBM Corporation
Accelerating Product and Service InnovationFunctional Mock-up Interface (FMI) Approach
Problems / NeedsComponent development by supplier
Integration by OEM
Many different simulation tools ?
supplier1 supplier2 supplier3 supplier4 supplier5
OEM
supplier1
tool 1
supplier2 supplier3 supplier4 supplier5
tool 2 tool 3 tool 4 tool 5
FMI OEM
SolutionReuse of supplier models by OEM:
DLL (model import) and/or
Tool coupling (co-simulation)
Protection of model IP of supplier
!supplier1
supplier2
supplier3
OEM
Added ValueEarly validation of design
Increased processefficiency and quality
Blocwitz, Otter, et al, retrieved from: https://trac.fmi-standard.org/export/700/branches/public/docs/Modelica2011/The_Functional_Mockup_Interface.ppt
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Multi-domain engineering use case
1. Systems Eng. creates SysML model of overall system
2. Software Eng. creates UML models of software components of vehicle and control station
3. Mechanical Eng. creates Modelica models for mechanical components and control
4. FMUs created for behavioral models
5. Simulation Engineer cofigures Simulation using FMUs
6. Simulation Engineer performs Simulation verifying System behavior
7. Simulation Engineer delivers results
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Fully integrated use cases
1. Systems Engineer specifies a system architecture in Rhapsody
2. Systems Engineer exports some of the components to physical modeling tool (e.g. SimulationX) and control modeling tools (e.g. Simulink)
3. Mechnical Engineers models mechnical components within the physical modeling tool
4. Software Engineer models software components in Rhapsody
5. Control Engineer models the control elements
6. Any one of the engineers can deploy the integrated model into the simulation tool and run the simulation
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Hybrid Simulation Platform Vision
Hybrid Simulation Platform
Modelica Plant Model
Simulink model computation algorithm
UML based behavioral model
System design
Comp11 comp21
com p31
System composition
Simulation center
Contracts/ Simulation Monitors
System Requirements
Models, designs and results repositoryVersion control and dependency analysis
FMU1 FMU1
FMU1
Textual requirements
Models
28
SW Domain
Physical Domain
HiL components
© 2013 IBM Corporation
Accelerating Product and Service Innovation
References
CEE-1093, Case Study: Simulation of Complex Hybrid Systems by Using FMI for Israel Aerospace Industries Eldad Palachi, Daniel Wadler (Innovate 2014)
Simulating Cyber-Physical Systems using SysML and Numerical Simulation Tools, Eldad Palachi 8th Haifa Verification Conference, Nov. 2012
http://www.research.ibm.com/haifa/conferences/hvc2012/papers/HVC2012Eldad_Palachi.pdf
Introduction to Parametric Modelling
https://www.youtube.com/watch?v=jpxXjkIsnmE
For those internal to IBM (although I may make this externally available)
Andy Lappings demo of Rhapsody, Simulink and DM based on ACC model
https://w3-connections.ibm.com/files/app#/file/975b9225-9a41-4834-af69-99450113100d
Mechatronics Group on Lotus Connections
https://w3-connections.ibm.com/wikis/home?lang=en#!/wiki/Mechatronics%20modelling%20Rhapsody%2C%20Simulink%20and%20PCE/page/Welcome%20to%20the%20Systems%20Engineering%20Mechatronics%20modelling%20with%20Rhapsody%2C%20Simulink%20and%20PCE%20page
Or to make it easier
http://ibm.co/1A8awWZ
© 2013 IBM Corporation
Accelerating Product and Service Innovation
Integration points with MATLAB tools (July 2014) - summaryName Tools Main Audience Description Canonical Workflow
“hosted simulation” Rhapsody, Simulink, Embedded Coder
Software Engineers Import Simulink models and generated code from embedded coder to Rhapsody and generate C/C++ code for execution (with or without animation)
- Build Simulink Model- Generate code for the Simulink model- Import to Rhapsody- Specify usage and composition- Generate and execute in Rhapsody
“design control systems”/”plant modeling”
Rhapsody, Simulink
Systems Engineers Export structured blocks parts typed by “Simulink blocks” to Simulink and run the simulation in Simulink
Note: Relies on S-Function generation from Rhapsody
- Export a “stub” block from Rhapsody to Simulink: creating a skeleton model
- Specify the behavior of the block as a Simulink model
- Import the Simulink model back to Rhapsody (if the interface changed)
- Specify an IBD of a structured Simulink block with parts typed by SysML blocks connected to parts typed by Simulink blocks
- (Optionally) specify simulation properties (start/end times, plots…) in Rhapsody
- Export the composition to Simulink and run the simulation
“parametric constraint evaluator” (PCE)
Rhapsody, MATLAB + Math Symbolic Toolbox OR MAXIMA
Systems Engineers Solve and perform analytical simulation of a set of SysML parametric diagrams
- Specify a set of equations and bind the variables to block attributes using parametric diagrams
- Define constraint views to group sets of parametric diagrams and associate with instance specifications
- Solve the constraint sets or plot time dependent behavior
- Iterate over the values and update the model with the results
“Simulink DM integration”
Design Manager (DM) and Simulink
Systems and Software Engineering
Externally or actively manage Simulink models in Rhapsody design manager
- Publish a Simulink model on DM OR- Actively manage Simulink models in DM
(save , load ,.lock, etc.)
© 2013 IBM Corporation
Accelerating Product and Service Innovation
© 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, 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.
www.ibm.com/software/rational