1 / 38

The Acumen Modeling Language

The Acumen Modeling Language. Edwin Westbrook, Angela Zhu, Jun Inoue, Marisa Peralta, Travis Martin, Cherif Salama, Walid Taha, Corky Cartwright, Marcie O’Malley Rice University Aaron Ames, Raktim Bhattacharya Texas A&M. Funding. NSF SOD award (device drivers)

chandler
Download Presentation

The Acumen Modeling Language

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Acumen Modeling Language Edwin Westbrook, Angela Zhu, Jun Inoue, Marisa Peralta, Travis Martin, Cherif Salama, Walid Taha, Corky Cartwright, Marcie O’Malley Rice University Aaron Ames, Raktim Bhattacharya Texas A&M

  2. Funding • NSF • SOD award (device drivers) • CPS award (physically safe computing) • CAREER award (program generation) • Nationational Instruments • Building device drivers (EFRP) • Schlumberger • Modeling vertical drilling tractor robots

  3. CPS Design Takes Time 1948

  4. CPS Design Takes Time

  5. What is CPS Design? • Traditional design methods: • Control design • Physical system model is known • Physical system design • Cyber technology is known • CPS design • BOTH are unknown • Prime example: novel robotic systems

  6. What is CPS Design? • A highly iterative process: • Model discrete components (CS) • Model continuous system (Physics) • Test models • Build a prototype • Validate in physical setting • Repeat until stars align (n-body problem :))

  7. Testing Requires Simulation • Testing is a key tool for ensuring quality • Often also reduces cost and time • Discrete systems: Test suite is fixed • Reactive systems: Suite of streams • CPS: Reactions change test environment • Simulating physical context is part of test • Testing cannot separate continuous and discrete

  8. Building Simulation Codes • If well-understood physical system • then use existing package • else build model, and write code • Second branch is surprisingly frequent • Virtually all robotics research • Molecular mechanics • Nano structures • and many others

  9. Symbolic Algebra Tools Today • Time to get accustomed to tool • Need to export result to other tools • Control over tool is difficult (termination) • Surprising problems with performance

  10. Our Starting Point • Biped robot (Aaron Ames) • Novel mechanics • Must be modeled analytically • Control theory being developed • 8x8 Lagrangian • Mathematica produces 13MB derivative • Immediate problem: Poor code • More seriously: Can’t refine model

  11. Running Code Analytical Models

  12. The Rest of this Talk • How simulations are built today • The language of mechanical models • Automating the mapping to code • Implemented in Acumen • Integrated with E-FRP (discrete modeling) • Symbolic differentiation • Conclusions

  13. How Simulations are Built Today, engineers • Study system to write equations • Eliminate complex mathematical operations • “Generate equations” • Eliminate partial derivatives • Use an ODE solver (or simply code)

  14. Mechanical Modeling • Newtonian • Write equations using Newton’s laws • Lagrangian • Focus on energy in system. More systematic • Hamiltonian • Another systematic method, better suited for different types of analyses

  15. Language of Models • Real-valued variables • Derivatives w.r.t time

  16. A Basic Model

  17. Language of Models • Real-valued variables • Derivatives w.r.t time • Partial derivatives

  18. A Systematic Model

  19. Another Systematic Model

  20. Language of Models • Real-valued variables • Derivatives w.r.t time • Partial derivatives • Tuples • Families of equations (finite quantifiers)

  21. Families of Equations

  22. Language of Models • Real-valued variables • Derivatives w.r.t time • Partial derivatives • Tuples • Families of equations (finite quantifiers) • Vectors, Matrices

  23. Bipedal Robot

  24. Language of Models • Real-valued variables • Derivatives w.r.t time • Partial derivatives • Tuples • Families of equations (finite quantifiers) • Vectors, Matrices • Recursive functions

  25. Implementation • Add to existing discrete modeling language • Any language would work

  26. Discrete Acumen • E-FRP [Wan, Taha, & Hudak] • Models controllers as event-driven difference equations • Generates efficient code for event handlers • Provably space and time bounded • Real-bounds active research [Cheng]

  27. Simple Example

  28. Continuous Acumen • Syntax: • You have already seen it. All those examples are pretty-printed from Acumen source • In ASCII, you can type in:

  29. Continuous Acumen • Semantics: A series of analysis and transformation steps • Defined variable analysis • Binding time analysis and specialization • “Partial evaluation” • Symbolic differentiation • Algebraic solving • Discretization (implementation detail)

  30. Differentiation in Mathematica

  31. The Code Explosion Problem • First, names enable compact expressions: • a = x-y • b = a+a • c = b*b • d = c^c • Inlining all intermediates produces d = ((x-y)+(x-y)*(x-y)+(x-y))^((x-y)+(x-y)*(x-y)+(x-y)) • Symbolic algorithms 1) inline definitions in source 2) do not avoid duplication

  32. The Chain Rule • Central to symbolic differentiation • Tell us how to differentiate composite expressions (f o g)’ = (f’ o g) + (f o g’) • A terrific source of duplication!

  33. Experimental Evidence

  34. Acumen’s Differentiation

  35. The Acumen Advantage

  36. Conclusions • Building simulation codes can be made much easier than it is today • Existing tools have surprising limitations • Predictability and speed of tools are key

  37. Future Work • From prototype to tool • Re-factoring, testing, release infrastructure • Interoperation with clients and numerical solvers • Parallelizing and alternative solver technologies • Applications • Robotics, automotive, circuits, EMF, biology • Semantics • Formalization using Exact Real Arithmetic • Alternative computational models • Increasing expressivity from ODEs to PDEs

More Related