Presentation is loading. Please wait.

Presentation is loading. Please wait.

© Maplesoft, a division of Waterloo Maple Inc. 2009. MapleSim and the Advantages of Physical ModelingMapleSim and the Advantages of Physical Modeling.

Similar presentations


Presentation on theme: "© Maplesoft, a division of Waterloo Maple Inc. 2009. MapleSim and the Advantages of Physical ModelingMapleSim and the Advantages of Physical Modeling."— Presentation transcript:

1

2 © Maplesoft, a division of Waterloo Maple Inc. 2009. MapleSim and the Advantages of Physical ModelingMapleSim and the Advantages of Physical Modeling July 22 nd 2010

3 © Maplesoft, a division of Waterloo Maple Inc. 2009. Why is physical modeling so difficult?Why is physical modeling so difficult? Multidomain/multiphysics Legacy of causal (signal-flow) modeling tools Differential-algebraic equations (DAEs) Fundamental principles in physics and mathematics

4 © Maplesoft, a division of Waterloo Maple Inc. 2009. The Story of the Analog ComputerThe Story of the Analog Computer An analog computer “program” An analog computer “program” Simulink is essentially an analog computer running on a PC … A “virtual” analog computer Simulink is essentially an analog computer running on a PC … A “virtual” analog computer

5 © Maplesoft, a division of Waterloo Maple Inc. 2009. Causal modeling: Challenges... 1.Complexity of equations does not scale linearly with the size of the system As complexity/size increases, so does the chance of errors Prevents high fidelity modeling of larger systems, particularly when applied to plant models # of Links# of Additions# of Multiplications# of Acausal Blocks 1275 221829 313566013 46693,97417 52,72619,22421 * Cost of dynamic equations, joint coordinate formulation, basic symbolic simplify() Example: 3D pendulum with increasing number of links:

6 © Maplesoft, a division of Waterloo Maple Inc. 2009. Causal modeling: Challenges... 2.Generated model looks nothing like the formulated equations or model diagram Assumptions made during equation formulation lost Hard to track errors Hard to visually understand the purpose of the system ~ RL V ? ?

7 © Maplesoft, a division of Waterloo Maple Inc. 2009. Causal modeling: Challenges... 3.Since these models have predefined inputs/outputs, it is difficult to (properly) connect two causal models This becomes more important as the scope of models increases (i.e. connect powertrain model to chassis/tire model) In some cases this can require an equation re-formulation (to be done properly) ? Engine/ Powertrain AngleInputs Chassis/Tire Torque Outputs

8 © Maplesoft, a division of Waterloo Maple Inc. 2009. Physical Modeling – Faster and Intuitive Model maps directly to physical components of system Automatically generates equations of motion M1 d1 k1 x1(t) F(t) M2 d2 k2 x2(t) F(t) Double mass spring-damper system

9 © Maplesoft, a division of Waterloo Maple Inc. 2009. Maplesoft engineering solutionMaplesoft engineering solution Control Design Toolbox Maple 14 Maple Toolboxes Connectivity Toolboxes Simulink RTW Toolchain LabVIEW RT Toolchain CAD Toolchain MapleSim 4

10 © Maplesoft, a division of Waterloo Maple Inc. 2009. Symbolic computation for plant modelingSymbolic computation for plant modeling Coordinate Selection Equation Generation Symbolic Simplification Code Optimization Simulation Procedure Generation 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

11 © Maplesoft, a division of Waterloo Maple Inc. 2009. Standard Numeric Formulation Model Definition Simulation Generated procedure is a set of routines that multiply/add numerical matrices to reformulate the equations at each time step -6 multiplications, 4 additions per step Certain optimizations can be built into these routines but these are limited, and must be defined ahead of time Simulation Procedure Generation with Limited Optimization Numerical black box

12 © Maplesoft, a division of Waterloo Maple Inc. 2009. Coordinate Selection Equation Generation Symbolic Simplification Code Optimization Simulation Procedure Generation 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 Symbolic computation for plant modelingSymbolic computation for plant modeling

13 © Maplesoft, a division of Waterloo Maple Inc. 2009. 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 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 Hybrid coordinates (MapleSim): 24 coords( 3 per leg, 6 for the platform) 24 dynamic equations + 18 constraints = 42 equations Example: Stewart Platform

14 © Maplesoft, a division of Waterloo Maple Inc. 2009. 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) Equations can be viewed, analyzed and manipulated in the Maple environment Coordinate Selection Equation Generation Symbolic Simplification Code Optimization Simulation Procedure Generation Simulation Procedure Generation Model Definition Simulation

15 © Maplesoft, a division of Waterloo Maple Inc. 2009. 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 Simulation Procedure Generation Model Definition Simulation Equation Generation

16 © Maplesoft, a division of Waterloo Maple Inc. 2009. 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 Simulation Procedure Generation Model Definition Simulation Equation Generation

17 © Maplesoft, a division of Waterloo Maple Inc. 2009. MapleSim Symbolic Formulation Using MapleSim’s Addons, optimized procedures can be exported to a variety of targets: LabVIEW RT Toolchain Simulink RTW Toolchain Alternatively, these procedures can be generated in Standalone C-code (no Connectivity Toolboxes required) Coordinate Selection Symbolic Simplification Code Optimization Simulation Procedure Generation Simulation Procedure Generation Model Definition Simulation Equation Generation

18 © Maplesoft, a division of Waterloo Maple Inc. 2009. Simulation cycle time = 10ms SimMechanics  s) MapleSim  S-function  Simulink  s) Speed advantage Double Pendulum137149.9x Four Bar Linkage288704.1x Stewart Platform710749.6x Faster real time simulationFaster real time simulation Symbolic multibody model formulation Model simplification and optimized code generation More systems become feasible for RT sim

19 © Maplesoft, a division of Waterloo Maple Inc. 2009. Case studies and demonstrationsCase studies and demonstrations


Download ppt "© Maplesoft, a division of Waterloo Maple Inc. 2009. MapleSim and the Advantages of Physical ModelingMapleSim and the Advantages of Physical Modeling."

Similar presentations


Ads by Google