system-level modeling with symbolics

29
© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company System Modelling with Symbolics Chad Schmitke, Ph.D. Director, MapleSim Development

Upload: altair-engineering

Post on 06-May-2015

215 views

Category:

Engineering


3 download

DESCRIPTION

System-level models are essential for capturing the dynamic interactions of different domains. Their benefits, however, can be greatly extended when coupled with a symbolically capable environment. In these cases, the actual equations that govern the interactions can be extracted, viewed, manipulated, and modified – yielding insights and efficiencies that are simply not available with purely numeric tools. These environments can also provide significant speed improvements, leveraging their internal data structures to generate compact, highly-efficient c-code. MapleSim, a modeling and simulation platform that is based on the Maple symbolic computation engine, and available through Altair’s HyperWorks Platform, provides such an environment. This presentation will discuss some of the above advantages in the context of MapleSim case studies.

TRANSCRIPT

Page 1: 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

Page 2: System-Level Modeling with Symbolics

© 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

Page 3: System-Level Modeling with Symbolics

© 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

Page 4: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 4

System Modeling

Page 5: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 5

System Modeling

Page 6: System-Level Modeling with Symbolics

© 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

Page 7: System-Level Modeling with 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

Page 8: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 8

Math -> Simulation

Page 9: System-Level Modeling with Symbolics

© 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)

Page 10: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 10

Analysis

Page 11: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 11

Analysis

Page 12: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 12

Analysis

Page 13: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 13

Analysis

Page 14: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 14

Knowledge Capture

Page 15: System-Level Modeling with Symbolics

© 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

Page 16: System-Level Modeling with Symbolics

© 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

Page 17: System-Level Modeling with Symbolics

© 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

Page 18: System-Level Modeling with Symbolics

© 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

Page 19: System-Level Modeling with Symbolics

© 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

Page 20: System-Level Modeling with Symbolics

© 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

Page 21: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company

• Modeling:

21

Case Study: Race Car Simulator

Page 22: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company

• Modeling:

22

Platform

Case Study: Race Car Simulator

Page 23: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 23

Case Study: Race Car Simulator

Page 24: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company

• Modeling:

24

Controller

Case Study: Race Car Simulator

Page 25: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 25

• Inverse Dynamics

• Inverse Kinematics 𝑃𝑜𝑠𝑖𝑡𝑖𝑜𝑛

𝐴𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛

• Forward Kinematics 𝑃𝑜𝑠𝑖𝑡𝑖𝑜𝑛𝑉𝑒𝑙𝑜𝑐𝑖𝑡𝑦

Case Study: Race Car Simulator

Page 26: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 26

Case Study: Race Car Simulator

Page 27: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company 27

Case Study: Race Car Simulator

Page 28: System-Level Modeling with Symbolics

© 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

Page 29: System-Level Modeling with Symbolics

© 2014 Maplesoft, a division of Waterloo Maple Inc. A CYBERNET group company