Sysml Parametrics: Current Tools and Best Practices
Model-Based Systems Engineering Center
System Analysis using SysML Parametrics: Current Tools and Best Practices
Chris Paredis www.pslm.gatech.edu/courses www.omg.org/ocsmp Model-Based Systems Engineering Center Georgia Tech [email protected]
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 1 Acknowledgments
Software Support Grad Students / – No Magic, Inc Postdocs – InterCAX – Aditya Shah – Phoenix Integration – Alek Kerzhner – Axel Reichwein Collaborators – Ben Lee – Russell Peak (1) – Kevin Davies – Manas Bajaj (1) – Roxanne Moore – Roger Burkhart – Sebastian Herzig – Sandy Friedenthal – Wladimir Schamai – Leon McGinnis (1) provided much of the materials on ParaMagic
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 2 Abstract
The Systems Modeling Language (OMG SysML) is a general purpose modeling language that allows users to express a broad range of information and knowledge about systems and systems engineering projects: from requirements to functional architectures, and from behavior to structural specifications. An important set of modeling constructs in SysML are parametric constraints as used in parametric diagrams. SysML parametrics allow systems engineers not only to define parametric system specifications but also to express analysis models relating measures of effectiveness to system specifications. In this tutorial, the use of paramtrics for analysis purposes will be reviewed in detail. To provide the appropriate context, we will start with a short overview of SysML, followed by a more detailed review of the syntax and semantics of parametric diagrams. We will then discuss different uses of parametrics, and provide best-practice examples, specifically focusing on analysis modeling. Parametric diagrams will also be compared with a new OMG specification for combining SysML and Modelica: The OMG SysML-Modelica Transformation Specification. A live demonstration will be included with the following two tools: The MagicDraw SysML Tool with the ParaMagic plug-in, and an open-source plug-in for solving parametric constraint models in ModelCenter.
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 3 Outline
Short overview of SysML SysML Parametrics: Syntax and Semantics Best practices in Paramatrics Modeling – Margin analysis – SimpleSat Satellite Example – Analysis context – Parameter aggregation Coffee Break Tools for solving Parametrics – ParaMagic – ModelCenter Parametrics versus SysML4Modelica Summary
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 4 Systems Engineering as Decision Making
Our perspective: – Design involves deciding on the most preferred solution alternative – The most preferred alternative is the one that leads to the most preferred outcomes
Generate Evaluate Select Alternatives Alternatives Alternative
Formulation Analysis Interpretation
System SpecificationPredict Outcomes Express Preferences
We need a language to express this information and knowledge
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 5 What is SysML?
The Systems Modeling Language (OMG SysML TM ) is a visual, general purpose modeling language
Is a modeling language that provides – Semantics = meaning – Notation = representation of meaning
Is not a methodology or a tool – SysML is methodology and tool independent
Developed by the Object Management Group to support Model-Based Systems Engineering
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 6 What Can be Expressed in SysML?
SysML is a language to express the information and knowledge generated and processed during the application of a systems development methodology
Specification Hardware Analysis Software Design Data Verification Personnel Validation Procedures Facilities
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 7 SysML Diagram Taxonomy
SysML Diagram
Behavior Requirement Structure Diagram Diagram Diagram
Activity Sequence State Machine Use Case Block Definition Internal Block Package Diagram Diagram Diagram Diagram Diagram Diagram Diagram
Same as UML 2 Parametric Diagram Modified from UML 2
New diagram type
Think of SysML as an integrated collection of languages…
Reprinted with permission. Copyright © 2006-2008 by Object Management Group. 2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 8 Some History…
Specification: http://www.omg.org/spec/SysML/ – v1.0: 2007-09 – v1.1: 2008-11 – v1.2: 2010-06 – v2.x: RFI preparation workshop - 2008-12 Strong vendor support – MagicDraw (No Magic), Artisan Studio (Atego), Enterprise Architect (Sparx Systems), Rhapsody (IBM),… Good learning infrastructure – Books, short courses, academic courses, INCOSE/OMG tutorial, public examples, etc. OMG Certified Systems Modeling Professional – http://www.omg.org/ocsmp/
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 9 Model-Based Systems Engineering in Industry
Actively used in most large companies in Aerospace, Defense, Automotive: Space Systems: 23% Aircraft: 20% – In a recent SysML survey, Defense: 20% 45 companies participated: Automotive: 7% Other: 30%
No longer small pilot studies! Project Duration Project Size 1 mo – 1 year: 20% < 10 people: 28% 1 year – 3 years: 35% 10 – 100: 40% > 3 years: 45% 100 – 1000: 22% > 1000 people: 10%
MBSE is becoming part of day-to-day engineering practice
(Data Source: Robert Cloutier — http://www.omg.org/cgi-bin/doc?syseng/2009-12-04) 2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 10 What is SysML? (www.omgsysml.org)
1. Structure sd ABS_ActivationSequence [Sequence Diagram] 2. Behavior
stm TireTraction [State Diagram] interaction d1:Traction m1:Brake Modulator Detector LossOfTraction state machine detTrkLos() Gripping Slipping activity/ RegainTraction sendSignal() function
modBrkFrc(traction_signal:boolean)
modBrkFrc() definition use
sendAck()
3. Requirements 4. Parametrics 2008-2011101.02SysML Copyright Tutorial © (JuneGeorgia 2008). Tech. Reprinted All Rights with Rese perved.rmission. Copyright © 2006 -2008 by ObjectMBSE Management Group. 11 What is SysML? (www.omgsysml.org) 1. Structure 2. Behavior
satisfy req [package] VehicleSpecifications [Requirements Diagram - Braking Requirements]
Vehicle System Braking Subsystem Specification Specification
«requirement» «requirement» StoppingDistance Anti-LockPerformance
id=“102” id=”337" text=”The vehicle shall stop text=”Braking subsystem from 60 mph within 150 ft shall prevent wheel lockup on a clean dry surface.” under all braking conditions.”
SatisfiedBy «block»Anti-LockController
«deriveReqt» 3. Requirements 4. Parametrics 2008-2011101.02SysML Copyright Tutorial © (JuneGeorgia 2008). Tech. Reprinted All Rights with Rese perved.rmission. Copyright © 2006 -2008 by ObjectMBSE Management Group. 12 Systems Engineering as Decision Making
Our perspective: – Design involves deciding on the most preferred solution alternative – The most preferred alternative is the one that leads to the most preferred outcomes
Generate Evaluate Select Alternatives Alternatives Alternative
Formulation Analysis Interpretation
BDD, IBD, PARAMETRIC , ACT, STM, SD, (PAR) executable (ACT, STM, SD) Specify the alternatives (analyses external to SysML) Predict outcomes
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 13 Escaping “Spreadsheet Sabotage”
“The use of spreadsheets to perform complex “A detailed study by Panko business functions (2000) revealed that many exposes a business companies are using highly to a number risks ...” error-prone spreadsheets to perform numerous functions. According to research over a long period of time, Panko has proven that spreadsheet errors are common and result in meaningful, harmful business impacts. ”
“According to Panko (2005), real life audits found errors in 94 percent of the spreadsheets examined. In summary, it is fair to say that the use of spreadsheets to make business decisions is potentially dangerous.”
Steve Epner (2007) Are Spreadsheets Sabotaging Your Profits? Research Note, Brown Smith Wallace Consulting Group St. Louis, www.bswllc.com. available here: http://www.whitakerit.com/documents/Are-Spreadsheets-Sabotaging-Your-Profits.pdf 2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 10 14 Discussion
What are the advantages of representing Systems Engineering in a (formal) model?
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 15 Outline
Short overview of SysML SysML Parametrics: Syntax and Semantics Best practices in Paramatrics Modeling – Margin analysis – SimpleSat Satellite Example – Analysis context – Parameter aggregation Coffee Break Tools for solving Parametrics – ParaMagic – ModelCenter Parametrics versus SysML4Modelica Summary
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 16 Parametric Diagrams in SysML
SysML Diagram
Behavior Requirement Structure Diagram Diagram Diagram
Activity Sequence State Machine Use Case Block Definition Internal Block Package Diagram Diagram Diagram Diagram Diagram Diagram Diagram
Same as UML 2 Parametric Diagram Modified from UML 2
New diagram type
Revision by GIT; Original Source: OMG SysML Tutorial (June 2008). Reprinted with permission. Copyright © 2006-2008 by Object Management Group. 2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 17 Expressing Constraints in SysML
Need to represent mathematical relationships or constraints in SysML
Equation = mathematical constraint (or relationship) between parameters (or variables)
Equation versus assignment: – What is the difference between: F = m*a In SysML constraints are m*a = F modeled declaratively : F - m*a = 0 • state what must be true F / m = a • not how to compute it
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 18 Defining a Constraint in SysML
Constraint Block – Constraint (optional: specify language in which constraint is expressed) – Constraint parameters
Compare to Block: – Block ~ Constraint Block – ValueProperty ~ Constraint Parameter
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 19 Using a Constraint Block: Constraint Property
Constraint Property is owned by a Block Constraint Property is typed to a Constraint Block
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 20 Using a Constraint Block: Parametric Diagram
Constraint Property constrains the value properties of the block that owns it The value properties are bound to constraint parameters using binding connectors – Meaning of binding connector: bound values are equal – Be careful: only values that are type compatible can be bound
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 21 How is a PAR different from an IBD?
PAR IBD – Connect constraint parameters – Connect ports / flow ports / / value properties parts – Binding connectors – Connectors – Constraint properties – Part properties
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 22 Nested Constraint Blocks
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 23 Nested Constraint Blocks
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 24 Review of PAR Graphical Notation
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 25 Outline
Short overview of SysML SysML Parametrics: Syntax and Semantics Best practices in Paramatrics Modeling – Margin analysis – SimpleSat Satellite Example – Analysis context – Parameter aggregation Coffee Break Tools for solving Parametrics – ParaMagic – ModelCenter Parametrics versus SysML4Modelica Summary
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 26 SimpleSat Parametrics Example bdd depicting model structure
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 27 SimpleSat Parametrics Example req diagram showing requirements verification pattern
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 28 SimpleSat Parametrics Example par structure of building blocks and subsystems concept (generic): (a) expanded/flattened view
(b) encapsulated view
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 29 SimpleSat Parametrics Example SysML parametrics diagram defining margin analysis
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 30 SimpleSat Parametrics Example SysML par view and ParaMagic tool for execution
“Object-Oriented Spreadsheet++”
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 31 SimpleSat Parametrics Example Analysis Results: a Satellite Instance
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 32 SimpleSat Parametrics Example Analysis Results: a Satellite Instance
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 33 Outline
Short overview of SysML SysML Parametrics: Syntax and Semantics Best practices in Paramatrics Modeling – Margin analysis – SimpleSat Satellite Example – Analysis context – Parameter aggregation Coffee Break Tools for solving Parametrics – ParaMagic – ModelCenter Parametrics versus SysML4Modelica Summary
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 34 Two Different Uses of Parametrics: 1. Parametric Specification
A constraint is used to define a parametric relationship between value properties of a system alternative Constraint Property is owned by the Specified Block
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 35 Two Different Uses of Parametrics: 2. Parametric Analysis
A constraint is used to analyze an alternative Constraint Property is owned by an Analysis Context
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 36 Two Different Uses of Parametrics: 2. Parametric Analysis
A constraint is used to analyze an alternative Different analyses are possible for the same system Constraint Property is owned by Analysis Context
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 37 Why Use an Analysis Context?
Many different analyses for a single system – Different views One Context for – Different levels of abstraction each view / abstraction Analysis models often reused from libraries
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 38 Outline
Short overview of SysML SysML Parametrics: Syntax and Semantics Best practices in Paramatrics Modeling – Margin analysis – SimpleSat Satellite Example – Analysis context – Parameter aggregation Coffee Break Tools for solving Parametrics – ParaMagic – ModelCenter Parametrics versus SysML4Modelica Summary
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 39 Complex Aggregates
n = 5
n n = = mass ∑mass i cost ∑cost i i=1 i=1
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 40 Complex Aggregates
n =10
n n = = mass ∑mass i cost ∑cost i i=1 i=1
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 41 Outline
Short overview of SysML SysML Parametrics: Syntax and Semantics Best practices in Paramatrics Modeling – Margin analysis – SimpleSat Satellite Example – Analysis context – Parameter aggregation Coffee Break Tools for solving Parametrics – ParaMagic – ModelCenter Parametrics versus SysML4Modelica Summary
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 42 Enabling Executable SysML Parametrics Commercialization by InterCAX LLC in Georgia Tech VentureLab incubator program Advanced technology for graph management and solver access via web services. SysML Authoring Tools COB Solving & Browsing
Plugins Prototyped by GIT (to SysML vendor tools) Next- 1) Artisan Studio [2/06] Generation 2) EmbeddedPlus [3/07] Spreadsheet 3) NoMagic [12/07]
Parametrics plugin COB API Execution via API messages or exchange files
COB Services (constraint graph manager, including COTS solver access via web services)
Composable Objects (COBs) Toolkit™ Toolkit™ SysMLSysML XaiToolsXaiTools
...
Native Tools Models COTS = commercial-off-the-shelf ... (typically readily available) XaiTools FrameWork™ XaiTools
FL Ansys ∆L...= + α∆TL OpenModelica Traditional COTS or (FEA Solver) EA (Math Solver) in-house solvers 2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 43 Spring System Example
L ∆ Lo L
F F x x 1 k 2 deformed state
= − r1 : L x2 x1 ∆ = − r2 : L L L0 = ∆ k1 k2 r3 : F k L P
u1 u2
Reference: 2008-2011http://eislab.gatech.edu/pubs/conferences/2007http://eislab.gatech.edu/pubs/conferences/2007--inc Copyright © Georgia Tech. All Rights Reserved.incose--isis--11--peakpeak--primer/ose primer/ MBSE 44 44 Example Instance: Two_Spring_System
example 2, state 1.0 (unsolved) (b) Parametrics execution in XaiTools / ParaMagic example 2, state 1.1 (solved)
(a) Input script (b) Output script (results) (auto-generated from ParaMagic) (auto-imported back into ParaMagic) example 2, state 1.0 (unsolved) example 2, state 1.1 (solved) ... List(List( solutions = Solve[ { ... q16==k10, Rule(g6,9.818181818181818), q16==o14*5.5, Rule(h7,9.818181818181818), o14==n13, Rule(i8,9.666666666666666), i8==j9 -h7, Rule(j9,19.48484848484848), 10==k10, Rule(k10,10.), p15==g6-0, Rule(m12,1.6666666666666665), l11==m12+n13, Rule(l11,3.484848484848485), g6==h7, Rule(n13,1.8181818181818183), k10==m12*6, Rule(o14,1.8181818181818183), m12==i8-8, Rule(p15,9.818181818181818), o14==p15-8 Rule(q16,10.))) ... } ]; ))
WriteString[ output, ToString[ CForm [N [ solutions ] ] ] ]; Note: ParaMagic supports either of these as a core solver (in production Close[output]; releases): Mathematica and OpenModelica. Exit[]; Support for Matlab Symbolic Math Toolbox (SMT) as a core solver is WIP.
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 46 ParaMagic Core Solver: OpenModelica OpenModelica Job — SpringSystems
(a) Input script (b) Output script (results) (auto-generated from ParaMagic) (auto-imported back into ParaMagic) example 2, state 1.0 (unsolved) example 2, state 1.1 (solved) class SpringSystems991034 ... Real e4; Real i8; DataSet: a0 Real l11; Real a0; 0, 1.81818181818182 Real k10; Real m12; DataSet: k10 Real b1; Real d3; 0, 19.48484848484849 Real p15; Real f5; DataSet: m12 Real o14; 0, 9.66666666666667 equation DataSet: b1 10.0=l11; 0, 3.48484848484849 p15=m12-8.0; DataSet: p15 l11=p15*6.0; 0, 1.66666666666667 i8=f5-8.0; DataSet: o14 b1=p15+a0; 0, 9.81818181818182 m12=k10-o14; DataSet: e4 f5=d3-0.0; 0, 10 i8=a0; ... e4=l11; e4=i8*5.5; Note: ParaMagic supports either of these as a core solver (in production d3=o14; releases): Mathematica and OpenModelica. end SpringSystems991034; Support for Matlab Symbolic Math Toolbox (SMT) as a core solver is WIP.
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 47 ParaMagic Capabilities
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 48 Outline
Short overview of SysML SysML Parametrics: Syntax and Semantics Best practices in Paramatrics Modeling – Margin analysis – SimpleSat Satellite Example – Analysis context – Parameter aggregation Coffee Break Tools for solving Parametrics – ParaMagic – ModelCenter Parametrics versus SysML4Modelica Summary
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 49 What is ModelCenter?
Process optimizer Integration Latin Hypercube + and Design Response Surface Optimization Modelica (PIDO) Simulation framework Integration with most Objectives: Engineering • Maximize Efficiency Analysis • Minimize Cost tools Supports grid computing
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 50 ModelCenter Model as Constraint Block
bdd [Model] Data[ EngineAnalysis BDD ]
«ModelCenter» EngineExcel «ModelCenter» modelCenterURI = "C:\Users\...\Documents\EngineExcel.pxc"
parameters a0 a1 a2 id maxTorque
Constraint block stereotyped to «ModelCenter» ModelCenter variables = SysML constraint parameters MagicDraw plug-in supports import-export Additional access to optimization, DOE, UQ, etc.
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 51 Nested Constraints in ModelCenter
«ModelCenter» par [ModelCenter] EngineAnalysis[ EngineAnalysis ] analysis : EngineAnalysis torque : Real
«ModelCenter» feasbilityScript : FeasibilityModel {feasibility =1 feasibility : Real feasibility id omega torque feasibility if torque > maxTorque then feasibility = 0 end if } id : Real
maxTorque torque
maxTorque id
«ModelCenter» engineDB : EngineDB
a1 a0 a2
a0 a2 torque
«ModelCenter» torqueScript : TorqueModel a1 {torque = a0+a1*omega+a2*omega^2}
omega : Real omega
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 52 ModelCenter Advantage / Disadvantages
Pro – One simple and convenient interface from MagicDraw to/from ModelCenter – Access to all the tools supported by ModelCenter Math: Matlab, Excel, Analysis: many CAE and CFD tools, Simulation tools, Optimization: Dakotah, Design Explorer, … CAD tools: CATIA, Pro/ENGINEER, NX Specialized tools: STK, SEER, easy custom wrappers – Scalable: model management, grid computing, etc. Con – More expensive – Only causal models
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 53 Outline
Short overview of SysML SysML Parametrics: Syntax and Semantics Best practices in Paramatrics Modeling – Margin analysis – SimpleSat Satellite Example – Analysis context – Parameter aggregation Coffee Break Tools for solving Parametrics – ParaMagic – ModelCenter Parametrics versus SysML4Modelica Summary
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 54 Modeling System-Level Trade-offs
Must consider ALL objectives and requirements … not just functional requirements
55 2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 55 Modeling System-Level Trade-offs
Must consider ALL objectives and requirements … not just functional requirements
Model Tradeoffs Among Objectives
56 2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 56 Modeling the Physics of Systems — Differential Algebraic Equations in Modelica motor torque
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 57 OMG SysML-Modelica Transformation Specification
58 2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 58 OMG SysML-Modelica Transformation Specification
59 2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 59 OMG SysML-Modelica Transformation Specification
Automatic Transformation
XMI XMI (SysML4 (Modelica) Modelica) QVT (normative) Java SysML Modelica abstract Tool syntax OMC
Tool- Modelica Specific .mo file Repository 60 2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 60 SysML Parametrics Discussion ...
Advantages — disadvantages?
Compared with Excel?
Compared with Modelica?
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 61 Summary
Short overview of SysML SysML Parametrics: Syntax and Semantics Best practices in Paramatrics Modeling – Margin analysis – SimpleSat Satellite Example – Analysis context – Model reuseParameter aggregation Tools for solving Parametrics – ParaMagic – ModelCenter Parametrics versus SysML4Modelica Summary
2008-2011 Copyright © Georgia Tech. All Rights Reserved. MBSE 62