Physical Modelling with Simscape Rick Hyde Control Electrical Embedded Software Mechanical 2015 The MathWorks, Inc. 1
Presentation overview Modelling physical systems Why model a physical system? Network approach & Simscape Example: Aileron actuation system Using modelling to support system-level design Modelling brushless motors Matching model fidelity to the design task What s new in and 2
http://www.shadowrobot.com/products/dexterous-hand/ Why model a physical system? Example: humanoid robot arm What are the actuation requirements? Space and weight constraints Torque/force, speed & power Compliance Precision Dynamic tracking bandwidth Failure behaviour Which actuation technology? What is the impact on the rest of the system? Power supply requirements Heat Electromagnetic interference System-level model of complete system Behavioural model of actuation system System model with selectable detailed & behavioural sub-models 3
Extending Simulink using Simscape Equation set x f e Simulink Explicit equation Relevance ( x, u, ) Single body motion Multiple-body motion when there is compliance Most algorithms (control) Equation set Simscape extension E( x, ) x f ( x, u, ) Implicit equation Relevance 1-D multi-body systems e.g. drivelines Electrical networks Hydraulic/pneumatic networks s1 s2 s3 4
What does this model represent? 5
What does this model represent? 6
Modelling an electrical circuit in Simulink Step 1: figure out the equations Step 2: build the model Step 3: fix algebraic loops 7
Modelling an electrical circuit in Simscape Single step: Build the model Network approach: 1. Node defines potential for connected components 2. Flows sum to zero at nodes 3. Each component has an equation 4. Additional equations from network topology 8
SimMechanics SimDriveline SimElectronics SimPowerSystems SimHydraulics Physical systems in Simulink Simscape Mechanical Hydraulic Electrical Thermal Simscape MATLAB, Simulink Thermal Liquid Pneumatic Magnetic N S Mechanical Electrical power systems Custom Domains (Simscape Language) Multidomain physical systems Fluid power and control Multibody mechanics (3-D) Powertrain systems (1-D) Electromechanical and electronic systems 9
Simscape Language Write your own components Define your own domains or use foundation ones Use foundation library components as templates Share your component libraries with others 10
Presentation overview Modelling physical systems Why model a physical system? Network approach & Simscape Example: Aileron actuation system Using modelling to support system-level design Modelling brushless motors Matching model fidelity to the design task What s new in 15a and 15b 11
Example: Aileron Actuation System System Desired Angle Control Actuator Force Extension Simulation goals 1. Determine requirements for actuation system 2. Compare actuation technologies 3. Run simulation on real-time hardware for HIL tests 12
Model-Based Design Process Simulation Model Requirements and Specifications Save time by developing in a single simulation environment Control Embedded Software Electrical Mechanical Produce better designs by continuously comparing design and specification Lower costs by using HIL tests and fewer hardware prototypes 21
Key Points Testing different actuator designs in one environment saves time and encourages innovation Optimising systems with respect to design requirements leads to optimal design choices Aileron Angle Actuator Force Simulating at different levels of fidelity is required to see effects of design implementation 22
Presentation overview Modelling physical systems Why model a physical system? Network approach & Simscape Example: Aileron actuation system Using modelling to support system-level design Modelling brushless motors Matching model fidelity to the design task What s new in 15a and 15b 23
Modelling detail Modelling use cases and modelling level (1 to 3) classification 1. System-level simulation Torque-speed behaviour Model motor losses as part of overall efficiency & thermal calculations 2. Component validation Ensure motor stays within manufacturer operating limits Detailed analysis of impact on other components e.g. power harmonics 3. Component design Motor and/or drive circuitry Determine overall actuation losses Mechanical/control engineer Motor designer and electronics engineer 24
Level 1: System-level simulation Designer s objectives Validate power requirements Make predictions about system efficiency Thermal modelling/design Real-time simulator Modelling solution Energy-based approach (no switching, fast, HIL-compatible) Resources SimElectronics block: Servomotor (8a), tabulated losses (15b) SimElectronics examples: elec_hybrid_electrical_network.slx & elec_servomotor_efficiency.slx (15b) 25
Level 2: Component validation User s objectives Check motor and drive electronics stay within permitted temperature limits. Quantify impact on DC supply (harmonics). Modelling solution Model power switching with ideal switch assumption Parks transform plus constant inductances sufficient for motor Resources SimPowerSystems blocks: PMSM and BLDC motor models Semiconductor switching devices SimPowerSystems examples: pe_pmsm_drive.slx 26
Level 3: Component design User s objectives Motor design or specification Build a dynamic simulation model to support controller design and efficiency predictions. Modelling solution Model motor using finite-element magnetic data Model drive electronics using device-level IGBT models Resources SimElectronics blocks: N-Channel IGBT FEM-Parameterized PMSM (15b) SimElectronics examples: elec_pmsm.slx (15b) 27
Presentation overview Modelling physical systems Why model a physical system? Network approach & Simscape Example: Aileron actuation system Using modelling to support system-level design Modelling brushless motors Matching model fidelity to the design task What s new in and 28
MathWorks Investment in Physical Modelling More than 15 years of acausal modelling Pace increased rapidly with introduction of Simscape Magnetics In Simscape Pneumatics In Simscape Simscape Language SimElectronics Thermal effects optional ports Thermal Liquid In Simscape Two-Phase Fluids In Simscape Simscape SimHydraulics Local Solver Simscape Logging Zero Crossing Statistics Model Statistics Viewer Variable Viewer SimDriveline Simscape-Based Library (2G) SimMechanics SolidWorks Translator ProEngineer Translator 3-D Vis. Improvements AutodeskTranslator Simscape-Based Library (2G) SimPowerSystems Electric Drives Library Introduced Ideal Switching Algorithm Introduced Intf. Elements Editing Mode Simscape-Based Libraries 1998 2000 2002 2004 2006 2008 2010 2012 2014 2016 29
Updates to Simscape Products in Simscape Variable Viewer link to block diagram Improved efficiency for initialization Sparkline plots for logged data SimDriveline Thermal variants for Gears library Transmission templates Shift linkage position vrnt. Dog Clutch SimHydraulics Variable-Displacement Hydraulic Machine (External Efficiencies) block Valve opening dynamics Accumulator with improved hard stops SimMechanics Show/Hide in Mechanics Explorer Lead Screw Joint block Constant Velocity Joint block SimElectronics elec_getpowerlosssummary fcn Nonlinear magnetization inductance Schmitt Trigger, Current Limiter block Droop param. for DC-DC Converter Thermal port for H-Bridge block SimPowerSystems SC, ST Asynch. machines with SI param Synch: Machine Model 2.1 blocks Zigzag-Delta1-Wye, Zigzag-Delta11- Wye, Average-Value Inverter New powergui dialog box and tools Interpolate option for Tustin solver Annotation, export for Load Flow Tool >> power_customize function Three-limb core for 3-phase xformer PV Array and examples 30
SimMechanics New Joints Lead Screw Joint See also >> sm_linear_actuator Constant Velocity Joint Angular velocity about z-axes for B and F is same CV Joint Universal Joint >> sm_pto_shaft 31
SimDriveline Transmission Templates Incorporate transmissions into vehicle models Structure includes gearing, inertias, and clutch schedule Modify them to create other transmission types 32
SimDriveline Thermal Variants for Gears Library Incorporate thermal effects into geared systems Efficiency dependent on temperature Account for heat generated due to meshing Right-click on block to select thermal variant Thermal port exposed Additional parameters Variants for all blocks in Gears Library 33
Updates to Simscape Products in Simscape Two-Phase Fluid Domain & Library Domain-specific colors on block icons Periodic Operators library Variable priority None for initialization SimDriveline Variable Mass, Variable Inertia blocks Unbalanced Load block Variable-friction tire model SimHydraulics Pneu-Hydr. actuator with 2 mech ports SimMechanics Point On Curve Constraint block Spline block for curved paths Frame creation via Solid block UI Mechanics Explorer link to block diagram SimElectronics Limits, tolerances, faults in Resistor Tabulated efficiency in Servomotor Fault block for open-, short-circuit faults FEM-Parameterized PMSM block SimPowerSystems SC, ST Nonlin. Transformer, Nonlin. Inductor Single-Phase Circuit Breaker with arc Back EMF profile param. (DC Motor) Fundamental Drive Blocks library Power Converter blocks Load flow for systems with unbalanced currents, single-phase connections External temperature input for Battery Powergui interpolation option 34
SimElectronics Limits, Tolerances, Faults in Resistor Apply tolerances to resistance parameter Specify fault behavior Resistance after failure Time, behavioral fault Specify operating limits 35
SimMechanics Point On Curve Constraint, Spline Block Constrain frame to 2D or 3D curve Define curve relative to frame (Spline Block) Constrain frame to curve using Point on Curve Constraint Measure force required to keep frame on curve Try: >> sm_cam_flapping_wing 36
Simscape Colors on Block Icons, Rounded Connections R2015b Block icons have domain-specific colors Physical connections have rounded corners Domain colors on icon Rounded Corners Without Styling Improves readability as a multidomain schematic 37
Pressure, p Simscape Two-Phase Domain and Library Foundation Library for systems with working fluid part liquid, part vapor Use when phase changes are critical effect in system Vaporization Condensation Cavitation Try: >> ssc_refrigeration >> ssc_cavitation_two_phase_fluid >> ssc_fluid_vaporization_in_pipe Isothermal Liquid Thermal Liquid Liquid-Vapor Dome Gas Two-Phase Fluid Specific Enthalpy, h 38
Summary Modelling physical systems Why model a physical system? Network approach & Simscape Simscape MATLAB, Simulink Example: Aileron actuation system Using modelling to support system-level design Modelling brushless motors Matching model fidelity to the design task Level 1: energybased Level 2: ideal switching Level 3: FEM + nonlinear What s new in 15a and 15b 39