company logo high performance physical modeling and simulation the maplesim advantage © maplesoft,...

27
Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010.

Upload: rolf-norman

Post on 12-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO

High Performance Physical Modeling and Simulation

The MapleSim Advantage

© Maplesoft, a division of Waterloo Maple Inc., 2010.

Page 2: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Physical Modeling in Industry

Physical modeling helps to reduce model development time and prototype costs

“X” by wire Green power Autonomous vehicles Mechatronics Global competition

Reduce cost, reduce product development time

Increase efficiency, increase performance, increase safety

© Maplesoft, a division of Waterloo Maple Inc., 2010.

Page 3: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Pain Points

© Maplesoft, a division of Waterloo Maple Inc., 2010.

Increasingly complex systems Creation and organization of physical models is difficult Debugging and diagnostics is difficult

Simultaneous controller + model development Many systems not naturally suited to this

Real-time deployment Required for most applications Speed of generated code a concern

Current analysis tools are limiting Verification and validation a challenge Limited access to underlying models and equations

Page 4: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Engineering Challenge: Stability Control

© Maplesoft, a division of Waterloo Maple Inc., 2010.

Automotive OEM

High-fidelity model of vehicle dynamics (plant model)

Plant model needs to compute fast enough for real-time controller testing (HIL)

Page 5: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Stability Control, cont’d…

© Maplesoft, a division of Waterloo Maple Inc., 2010.

With Stability ControllerWithout Stability Controller

Page 6: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Results

© Maplesoft, a division of Waterloo Maple Inc., 2010.

Infeasible with other tools Signal flow: infeasible

due to complexity Real-time performance

unacceptable

Full automotive chassis with detailed suspension models

Double wishbone at front Semi-trailing arm at rear

Fiala tire model 15 degrees of freedom Whole model runs in real-time

Total model development time: 2 days

Page 7: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Key application areas

© Maplesoft, a division of Waterloo Maple Inc., 2010.

Automotive• Vehicle dynamics• Powertrain• Climate control• NVH

Aero/defence• Guidance,

navigation• UAV robotics• Simulators• Command and

control

Power• Wind turbines• New generation

power sources

Space• Space vehicle

control• Guidance and

navigation• Space robotics

Medical• Intelligent

prosthetics• Artificial

organs

Page 8: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Introduction to MapleSim

© Maplesoft, a division of Waterloo Maple Inc., 2010.

Rapid Physical Model

Development

ExceptionalMulti-bodyDynamics

ExtensiveAnalysis Tools

Fast, High-fidelityPlant ModelsFor RT/HIL

Page 9: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO

Identify redundant calculationsPre-compute expensive functionsStandard real-time toolchains

Optimized code generation

The MapleSim Symbolic Advantage

© Maplesoft, a division of Waterloo Maple Inc., 2010.

Easy to read and documentFlexible and reusableParameter management

1, 0, cancellations etc.Algebraic, trig identities etc.DAE index reduction

Model simplification

SensitivityParameter optimizationCompletely extensible

Advanced analysis

EQUATIONS

Page 10: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Simple Introductory Application

© Maplesoft, a division of Waterloo Maple Inc., 2010.

Single arm robot control system

Page 11: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Conventional Control Systems Design Process

Hardware in the loop (HIL)

simulation tests controller without the expense of a

physical plant

Plant modeling is deeply mathematical, time-consuming, and error-prone. Model complexity can also

be a real barrier.

Controller HW +

Controller code

Real-time platform

Plant model

Embeddedcode system

Controller design

Transfer plant model to RT system

If the plant model cannot compute quicker than

the real-time cycle, you cannot do an HIL test. If the system is complex, the model slows down.

Page 12: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO MapleSim Control Systems Design Process

Controller HW +Controller code

Real-time platform

Embeddedcode system

Optimized plant code generation

Plant model

Controller design

MapleSim automates the plant modeling process.

From monthsto days ().

MapleSim produces the

fastest plant code for HIL testing.

Infeasible becomes feasible

($$$$).

Page 13: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Sample Applications

© Maplesoft, a division of Waterloo Maple Inc., 2010.

• Mean Value Engine• Mean Value Engine: Real-Time

Execution• Lead Acid Battery

Page 14: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Mean Value Engine

© Maplesoft, a division of Waterloo Maple Inc., 2010.

• Collaboration with automotive company

• Used for engine control development

• Provides overall power, speed, torque output– Throttle– Intake manifold– Engine power– Applied load

• Custom components incorporate standard engine equations

Page 15: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Mean Value Engine: Real-Time Execution

© Maplesoft, a division of Waterloo Maple Inc., 2010.

• LabVIEW/Extended Model Interface (EMI)• LabVIEW/Simulation Interface Tookit (SIT)• NI VeriStand

• Real-time execution on NI PXI system• Also tested with Simulink®

Simulink is a registered trademark of The Mathworks, Inc.

Page 16: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Lead Acid Battery

© Maplesoft, a division of Waterloo Maple Inc., 2010.

• Collaboration with automotive company

• Terminal voltage, internal resistance is highly nonlinear

• State of charge, temperature, rate of charging and discharging

• Coupled electrical and thermal model

Page 17: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Key Takeaways

© Maplesoft, a division of Waterloo Maple Inc., 2010.

• Rapidly develop complex physical models

• Advanced multibody dynamics tools

• Direct access to equations supports deeper analysis and greater insight into your system

• Symbolic preprocessing provides highly optimized plant model code for RT/HIL applications

Page 18: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Discussion and Questions

© Maplesoft, a division of Waterloo Maple Inc., 2010.

Questions?

Page 19: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Symbolic Model Preprocessing

© Maplesoft, a division of Waterloo Maple Inc., 2010.

• Standard Numeric Formulation• MapleSim Symbolic Formulation

Page 20: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Symbolic Computation for Plant Modeling

© Maplesoft, a division of Waterloo Maple Inc., 2010.

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

Simulation Procedure Generation with Limited

Optimization

Numerical black box

Page 21: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Symbolic Computation for Plant Modeling

© Maplesoft, a division of Waterloo Maple Inc., 2010.

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

Coordinate Selection

Equation Generation

Symbolic Simplification

Code Optimization

MapleSim applies 4 levels of model

optimization

Simulation Procedure Generation with Limited

Optimization

Numerical black box

Page 22: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO Standard Numeric Formulation

© Maplesoft, a division of Waterloo Maple Inc., 2010.

Model Definition

Simulation

• Full matrix equation is populated and calculated at each iteration

6 multiplications, 4 additions per step

• Any optimization is limited and is applied prior to iteration.

Simulation Procedure Generation with Limited

Optimization

Numerical black box

Page 23: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO MapleSim Symbolic Formulation

© Maplesoft, a division of Waterloo Maple Inc., 2010.

Coordinate Selection

Equation Generation

Symbolic Simplification

Code Optimization

Simulation Procedure Generation

Model Definition

Simulation

T

T

yxyxyxmmmrrTree

sshhrrTree

],,,,,,,,[},,,{

],,[},,,{

33322211132174

111081110874

q

q

Example using Linear Graph Theory (MapleSim)

Page 24: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO MapleSim Symbolic Formulation

© Maplesoft, a division of Waterloo Maple Inc., 2010.

Coordinate Selection

Equation Generation

Symbolic Simplification

Code Optimization

Simulation Procedure Generation

Model Definition

Simulation

Absolute coordinates (e.g. ADAMS):• 78 coords (12 per leg, 6 for the

platform), • 78 dynamic equations, +72 constraint equations = 150 equations

Relative coordinates (MapleSim):• 24 coords( 3 per leg, 6 for the platform)• 24 dynamic equations+ 18 constraints = 42 equations

Example: Stewart Platform

Page 25: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO MapleSim Symbolic Formulation

© Maplesoft, a division of Waterloo Maple Inc., 2010.

• Symbolic generation automatically performs first level simplification (e.g. 1’s, 0’s, subtraction, cancellation)

• Symbolic equations are also accessible for more analysis

Coordinate Selection

Equation Generation

Symbolic Simplification

Code Optimization

Simulation Procedure Generation

Model Definition

Simulation

6 mult4 add/sub

2 mult1 add/sub

Page 26: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO MapleSim Symbolic Formulation

© Maplesoft, a division of Waterloo Maple Inc., 2010.

• Simple equations directly solved• Reduces number of integration

variables• Trigonometric simplifications

• All these examples are “loss-less” simplifications

Coordinate Selection

Symbolic Simplification

Code Optimization

Simulation Procedure Generation

Model Definition

Simulation

Equation Generation

Page 27: Company LOGO High Performance Physical Modeling and Simulation The MapleSim Advantage © Maplesoft, a division of Waterloo Maple Inc., 2010

Company

LOGO MapleSim Symbolic Formulation

© Maplesoft, a division of Waterloo Maple Inc., 2010.

• Repeated equations are isolated so they are only computed once

• Issues between symbolic simplification and code optimization

Coordinate Selection

Symbolic Simplification

Code Optimization

Simulation Procedure Generation

Model Definition

Simulation

Equation Generation