Paul Goossens, VP of Application Engineering Dr. Orang Vahid, Senior Modeling Engineer © 2012 Maplesoft, a division of Waterloo Maple Inc. • Introduction • Case Studies: • Quadrotor – Quanser • Planetary Rover – University of Waterloo and Canadian Space Agency • Challenges in Model-based design and development • Maplesoft Engineering Solutions © 2012 Maplesoft, a division of Waterloo Maple Inc. “Virtual” Prototyping through Model-based Design and Development plays an increasingly key role in system design, commissioning and testing. •Increasing adoption of MBD and simulation • Reduce prototyping cycles and costs • Increase end-user functionality, quality, safety and reliability • Deterministic, repeatable testing platform Connection to real components with virtual subsystems through Hardware-in-the-Loop (HIL) Testing is critical to this strategy • Validation of subcomponents and/or controllers before integrating into the vehicle reduces errors and costs • Validation of model against the real thing improves the whole process, dramatically reducing development cycles and time-to-market in the future Greater demand for greater model fidelity… © 2012 Maplesoft, a division of Waterloo Maple Inc. Tasks Scalability Capacity Number of functions (Complexity) © 2012 Maplesoft, a division of Waterloo Maple Inc. Capacity Tasks Scalability Number of functions (Complexity) Inputs Multi-domain Modeling Engine/ Powertrain Torque/Speed Apply Load??? Driveline Torque/Speed Chassis/Tire © 2012 Maplesoft, a division of Waterloo Maple Inc. Outputs Capacity Tasks Scalability Number of functions (Complexity) Inputs Multi-domain Modeling Engine/ Powertrain Torque/Speed Apply Load??? Driveline Torque/Speed Chassis/Tire Real-time Performance © 2012 Maplesoft, a division of Waterloo Maple Inc. Outputs © 2012 Maplesoft, a division of Waterloo Maple Inc. Paper Concept for Product Rough Feasibility Study Paper Calculations, Low fidelity Simulations Plant Model in MapleSim © 2012 Maplesoft, a division of Waterloo Maple Inc. Paper Concept for Product Rough Feasibility Study Paper Calculations, Low fidelity Simulations Plant Model in MapleSim Export Plant to Simulink Dev RT Controller in QUARC Include Visualization Modify Model Structure, and Fidelity Evaluate Performance Trade various Concepts © 2012 Maplesoft, a division of Waterloo Maple Inc. *Simulink is a registered trademark of The Mathworks, Inc. Quarc is a registered trademark of Quanser Consulting, Inc. Paper Concept for Product Rough Feasibility Study Paper Calculations, Low fidelity Simulations Plant Model in MapleSim Export Plant to Simulink Dev RT Controller in QUARC Include Visualization Modify Model Structure, and Fidelity Build Subsystem Prototypes for Technically Risky Subsystems Evaluate Performance Trade various Concepts Parameter Identification © 2012 Maplesoft, a division of Waterloo Maple Inc. *Simulink is a registered trademark of The Mathworks, Inc. Quarc is a registered trademark of Quanser Consulting, Inc. Paper Concept for Product Rough Feasibility Study Paper Calculations, Low fidelity Simulations Plant Model in MapleSim Export Plant to Simulink Dev RT Controller in QUARC Include Visualization Modify Model Structure, and Fidelity Build Subsystem Prototypes for Technically Risky Subsystems Evaluate Performance Trade various Concepts Prototype Full System Deploy with Sim Controller Parameter Identification Parameter Identification Deploy Final Product, Controllers Curriculum © 2012 Maplesoft, a division of Waterloo Maple Inc. Multibody Modeling © 2012 Maplesoft, a division of Waterloo Maple Inc. Multibody Modeling © 2012 Maplesoft, a division of Waterloo Maple Inc. Multibody Modeling © 2012 Maplesoft, a division of Waterloo Maple Inc. Multibody Modeling © 2012 Maplesoft, a division of Waterloo Maple Inc. Multibody Modeling © 2012 Maplesoft, a division of Waterloo Maple Inc. Multibody Modeling © 2012 Maplesoft, a division of Waterloo Maple Inc. Multibody Modeling © 2012 Maplesoft, a division of Waterloo Maple Inc. Multibody Modeling © 2012 Maplesoft, a division of Waterloo Maple Inc. MapleSim Model: Multibody Quadrotor Model + Controller © 2012 Maplesoft, a division of Waterloo Maple Inc. MapleSim Model: Multibody Quadrotor Model + Controller © 2012 Maplesoft, a division of Waterloo Maple Inc. MapleSim Model: Multibody Quadrotor Model © 2012 Maplesoft, a division of Waterloo Maple Inc. MOVIE #1 © 2012 Maplesoft, a division of Waterloo Maple Inc. QUARC®/Simulink® Model Generated s-function from the MapleSim plant model © 2012 Maplesoft, a division of Waterloo Maple Inc. *Simulink is a registered trademark of The Mathworks, Inc. Quarc is a registered trademark of Quanser Consulting, Inc. Flight Test MOVIE #2 © 2012 Maplesoft, a division of Waterloo Maple Inc. © 2012 Maplesoft, a division of Waterloo Maple Inc. Rover Modeling: A Multi-disciplinary Approach System Components Rover dynamics Wheels Solar cells Wheel motors Battery Power electronics Heaters Robotic arms, other peripherals Terrain Environment © 2012 Maplesoft, a division of Waterloo Maple Inc. Six-wheeled Rocker-Bogie Rover Modeling Environment Steering angle input Visualization Environment Angular velocity input © 2012 Maplesoft, a division of Waterloo Maple Inc. Rigid Wheel Model © 2012 Maplesoft, a division of Waterloo Maple Inc. Visualization in MapleSim MOVIE #3 © 2012 Maplesoft, a division of Waterloo Maple Inc. Rover Kinematics © 2012 Maplesoft, a division of Waterloo Maple Inc. Rover Kinematics Automatic Generation of the Constraint Equations in Maple © 2012 Maplesoft, a division of Waterloo Maple Inc. Rover Kinematics Automatic Generation of the Constraint Equations in Maple -2.*l1x-1.*ySL*cos(xi)*sin(eta)*sin(zeta)+ySR*cos(xi)*sin(eta)*sin(zeta)+zSL*cos(xi)*sin(eta)*cos(zeta)1.*zSR*cos(xi)*sin(eta)*cos(zeta)-1.*cos(xi)*cos(eta)*xSL+cos(xi)*cos(eta)*xSR1.*ySL*sin(xi)*cos(zeta)+ySR*sin(xi)*cos(zeta)-1.*zSL*sin(xi)*sin(zeta)+zSR*sin(xi)*sin(zeta) -1.*l1y+sin(xi)*cos(eta)*xSL-1.*sin(xi)*cos(eta)*xSR-1.*ySL*cos(xi)*cos(zeta)+ySR*cos(xi)*cos(zeta)1.*zSL*cos(xi)*sin(zeta)+zSR*cos(xi)*sin(zeta)+ySL*sin(xi)*sin(eta)*sin(zeta)-1.*ySR*sin(xi)*sin(eta)*sin(zeta)1.*zSL*sin(xi)*sin(eta)*cos(zeta)+zSR*sin(xi)*sin(eta)*cos(zeta)+l1y*cos(phi)-1.*l1z*sin(phi) -1.*l1z+cos(eta)*sin(zeta)*ySL-1.*cos(eta)*sin(zeta)*ySR1.*cos(eta)*cos(zeta)*zSL+cos(eta)*cos(zeta)*zSR+l1y*sin(phi)-1.*sin(eta)*xSL+sin(eta)*xSR+l1z*cos(phi) -1.*cos(xi)*cos(eta)*xSL+cos(xi)*cos(eta)*xBL-1.*ySL*cos(xi)*sin(eta)*sin(zeta)1.*ySL*sin(xi)*cos(zeta)+yBL*cos(xi)*sin(eta)*sin(zeta)+yBL*sin(xi)*cos(zeta)+zSL*cos(xi)*sin(eta)*cos(zeta)1.*zSL*sin(xi)*sin(zeta)-1.*zBL*cos(xi)*sin(eta)*cos(zeta)+zBL*sin(xi)*sin(zeta)-1.*l3x sin(xi)*cos(eta)*xSL-1.*sin(xi)*cos(eta)*xBL+ySL*sin(xi)*sin(eta)*sin(zeta)-1.*ySL*cos(xi)*cos(zeta)1.*yBL*sin(xi)*sin(eta)*sin(zeta)+yBL*cos(xi)*cos(zeta)-1.*zSL*sin(xi)*sin(eta)*cos(zeta)1.*zSL*cos(xi)*sin(zeta)+zBL*sin(xi)*sin(eta)*cos(zeta)+zBL*cos(xi)*sin(zeta)+l3y -1.*sin(eta)*xSL+sin(eta)*xBL+cos(eta)*sin(zeta)*ySL-1.*cos(eta)*sin(zeta)*yBL1.*cos(eta)*cos(zeta)*zSL+cos(eta)*cos(zeta)*zBL+l3z -1.*cos(xi)*cos(eta)*xSR+cos(xi)*cos(eta)*xBR-1.*ySR*cos(xi)*sin(eta)*sin(zeta)1.*ySR*sin(xi)*cos(zeta)+yBR*cos(xi)*sin(eta)*sin(zeta)+yBR*sin(xi)*cos(zeta)+zSR*cos(xi)*sin(eta)*cos(zeta)1.*zSR*sin(xi)*sin(zeta)-1.*zBR*cos(xi)*sin(eta)*cos(zeta)+zBR*sin(xi)*sin(zeta)+l3x xSR*sin(xi)*cos(eta)*cos(phi)-1.*xSR*sin(eta)*sin(phi)1.*xBR*sin(xi)*cos(eta)*cos(phi)+xBR*sin(eta)*sin(phi)+ySR*cos(phi)*sin(xi)*sin(eta)*sin(zeta)1.*ySR*cos(phi)*cos(xi)*cos(zeta)+ySR*cos(eta)*sin(zeta)*sin(phi)1.*yBR*cos(phi)*sin(xi)*sin(eta)*sin(zeta)+yBR*cos(phi)*cos(xi)*cos(zeta)-1.*yBR*cos(eta)*sin(zeta)*sin(phi)1.*zSR*cos(phi)*sin(xi)*sin(eta)*cos(zeta)-1.*zSR*cos(phi)*cos(xi)*sin(zeta)1.*zSR*cos(eta)*cos(zeta)*sin(phi)+zBR*cos(phi)*sin(xi)*sin(eta)*cos(zeta)+zBR*cos(phi)*cos(xi)*sin(zeta)+zBR*co s(eta)*cos(zeta)*sin(phi)+l3y -1.*xSR*sin(xi)*cos(eta)*sin(phi)-1.*xSR*sin(eta)*cos(phi)+xBR*sin(xi)*cos(eta)*sin(phi)+xBR*sin(eta)*cos(phi)1.*ySR*sin(phi)*sin(xi)*sin(eta)*sin(zeta)+ySR*sin(phi)*cos(xi)*cos(zeta)+ySR*cos(eta)*sin(zeta)*cos(phi)+yBR*si n(phi)*sin(xi)*sin(eta)*sin(zeta)-1.*yBR*sin(phi)*cos(xi)*cos(zeta)... 27 Constraint Equations of 36 variables © 2012 Maplesoft, a division of Waterloo Maple Inc. Rover Kinematics Additional Constraints and Forces Differential Joint Steering Wheel/soil forces © 2012 Maplesoft, a division of Waterloo Maple Inc. Rover Kinematics Quasi-static Simulation using MATLAB® MOVIE #4 © 2012 Maplesoft, a division of Waterloo Maple Inc. *Matlab is a registered trademark of The Mathworks, Inc. Rover Path Planning Energy Optimization © 2012 Maplesoft, a division of Waterloo Maple Inc. Rover Component Library Software Component Library Modeling Workspace © 2012 Maplesoft, a division of Waterloo Maple Inc. Hardware Components Lighting System Solar Arrays © 2012 Maplesoft, a division of Waterloo Maple Inc. Hardware Components Battery Motor Flywheel Load simulator PXI Sensors © 2012 Maplesoft, a division of Waterloo Maple Inc. HiL Implementation Hardware (Test Bench) Software Lighting System Component Modeling Solar Panels Irradiation Model Charge Controller Solar Panels Battery Battery Motor NI® PXI Inverter Load Simulator Motor LabVIEW™ 2009 Rover Model HiL Graphical User Interface Flywheel © 2012 Maplesoft, a division of Waterloo Maple Inc. HiL Implementation © 2012 Maplesoft, a division of Waterloo Maple Inc. HiL Implementation © 2012 Maplesoft, a division of Waterloo Maple Inc. HiL Implementation – Sample Results Summer Full Load - Pure Hardware vs. Solar Panel in the Loop Summer Full Load - Pure Hardware vs. Solar Panel, Motor, Load Simulator in the loop © 2012 Maplesoft, a division of Waterloo Maple Inc. MapleSim is a truly unique physical modeling tool: • Built on a foundation of symbolic computation technology • Handles all of the complex mathematics involved in the development of engineering models • Multi-domain systems, plant modeling, control design • Leverages the power of Maple to take advantage of extensive analytical tools • Reduces model development time from months to days while producing highfidelity, high-performance models © 2012 Maplesoft, a division of Waterloo Maple Inc. Multi-domain physical modeling -dSPACE® -LabVIEW™ -NI® VeriStand™ -MATLAB® & Simulink® -B&R Automation Studio Driveline Component Library More Libraries © 2012 Maplesoft, a division of Waterloo Maple Inc. *Simulink and MATLAB are registered trademark of The Mathworks, Inc. All other trademarks are property of their respective owners. Advanced analysis Parameter optimization Automatic Equation Generation Sensitivity etc Multibody kinematics and dynamics Greater insight into system behavior Best performance Symbolic model simplification Optimized code generation ~10x faster than similar tools Equation-based Model Creation Enter system equations Test/Validate model Easy component block generation © 2012 Maplesoft, a division of Waterloo Maple Inc. Equation and code generation Controller implementation (and design) Realtime management Embedded controller Data acquisition Plant model Analysis Controller design -dSPACE® -LabVIEW™ -NI® VeriStand™ -MATLAB® & Simulink® -B&R Automation System HIL Simulation Studio © 2012 Maplesoft, a division of Waterloo Maple Inc. *Simulink and MATLAB are registered trademark of The Mathworks, Inc. All other trademarks are property of their respective owners. • Physical modeling: increasingly important – and increasingly complex – in systems design, testing and integration. • Symbolic technology: proven engineering technology that significantly improves model fidelity without sacrificing real-time performance. • MapleSim: ideal tool for rapid development of high-fidelity physical models of mechatronics systems to help engineers achieve their design goals. © 2012 Maplesoft, a division of Waterloo Maple Inc. Thank You! Questions? To stay connected: www.maplesoft.com/subscribe © 2012 Maplesoft, a division of Waterloo Maple Inc.