System-Level Modeling with Symbolics
-
Upload
altair-engineering -
Category
Engineering
-
view
212 -
download
3
description
Transcript of System-Level Modeling with Symbolics
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
System Modelling with Symbolics
Chad Schmitke, Ph.D. Director, MapleSim Development
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
• System Modeling
• Numeric vs. Symbolic – Math -> Simulation
– Analysis
– Knowledge Capture
– Fast Simulation Code
• Case Study: Motion Platform
2
Overview
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
• What are they? – Models of systems that incorporate multiple
domians (electical, hydraulic, mechanical, thermal, etc.)
• Why we care about them? – System models allow us to capture the
dynamic interactions of different domains – capturing phenomena we might miss if the parts were treated independently
3
System Modeling
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 4
System Modeling
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 5
System Modeling
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
• Talking about formulation approach, not simulation approach – both simulate numerically
• Numeric: System reconstructed at each step in the simulation by multiplying/adding numeric matrices
• Symbolic: System constructed once during pre-processing phase and numerically evaluated at step in the simulation
6
Numerics vs. Symbolics
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
Coordinate Selection
Equation Generation
Symbolic Simplification
Code Optimization
Simulation Procedure Generation
Model Definition
Simulation
MapleSim Symbolic Formulation Standard Numeric Formulation
Model Definition
Simulation Procedure Generation with Limited
Optimization
Simulation
Numerics vs. Symbolics
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 8
Math -> Simulation
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 9
Analysis
• Solve for the motion of the legs given the motion of the platform (Inverse Kinematics)
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 10
Analysis
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 11
Analysis
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 12
Analysis
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 13
Analysis
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 14
Knowledge Capture
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
MapleSim Symbolic Formulation • A model’s chosen state variables directly impact the number and complexity of the resulting equations Coordinate Selection
Equation Generation
Symbolic Simplification
Code Optimization
Simulation Procedure Generation
Model Definition
Simulation
Absolute coordinates : • 78 coords (12 per leg, 6 for the platform), • 78 dynamic equations, +72 constraint equations = 150 equations Hybrid coordinates : •24 coords( 3 per leg, 6 for the platform) •24 dynamic equations + 18 constraints = 42 equations
Example: Stewart Platform
Fast Simulation Code
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
MapleSim Symbolic Formulation • Generated equations are true for all time, using the previous example: -2 multiplications, 1 addition per step (versus original 6 and 4, respectively)
Coordinate Selection
Equation Generation
Symbolic Simplification
Code Optimization
Simulation Procedure Generation
Model Definition
Simulation
Fast Simulation Code
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
MapleSim Symbolic Formulation • Multiplications by 1’s, 0’s automatically removed (previous slide)
• Simple equations directly solved, reducing the number of variables to integrate
• Trigonometric simplifications:
Coordinate Selection
Symbolic Simplification
Code Optimization
Simulation Procedure Generation
Model Definition
Simulation
Equation Generation
Fast Simulation Code
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
MapleSim Symbolic Formulation • Expressions that are repeated within the equations are identified and isolated so they are only computed once
Coordinate Selection
Symbolic Simplification
Code Optimization
Simulation Procedure Generation
Model Definition
Simulation
Equation Generation
Fast Simulation Code
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
MapleSim Symbolic Formulation • Simulation procedure generated as standalone C-code (no callbacks to MapleSim)
• Portable
• Fast
• Easy to wrap for including in other toolchains
• S-functions
• FMUs
Coordinate Selection
Symbolic Simplification
Code Optimization
Simulation Procedure Generation
Model Definition
Simulation
Equation Generation
Fast Simulation Code
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
• Highly accurate vehicle model
• 6-DoF motion platform
• Patented kinematic layout
• Maximum realism to the driver
• Solutions for all joints of this simulator based on the error in the platform (Inverse Kinematics + Inverse Dynamics)
20
Case Study: Race Car Simulator
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
• Modeling:
21
Case Study: Race Car Simulator
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
• Modeling:
22
Platform
Case Study: Race Car Simulator
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 23
Case Study: Race Car Simulator
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
• Modeling:
24
Controller
Case Study: Race Car Simulator
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 25
• Inverse Dynamics
• Inverse Kinematics 𝑃𝑜𝑠𝑖𝑡𝑖𝑜𝑛
𝐴𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛
• Forward Kinematics 𝑃𝑜𝑠𝑖𝑡𝑖𝑜𝑛𝑉𝑒𝑙𝑜𝑐𝑖𝑡𝑦
Case Study: Race Car Simulator
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 26
Case Study: Race Car Simulator
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 27
Case Study: Race Car Simulator
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company
• System Modeling is important for capturing dynamics between different domains
• Using symbolic technology offers a variety of benefits: – Math -> Simulation
– Analysis
– Knowledge Capture
– Fast Simulation Code
28
Summary
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company