Five Cool Things You Can Do With Powertrain Blockset Mike Sasena, PhD Automotive Product Manager 2017 The MathWorks, Inc. 1
FTP75 Simulation 2
Powertrain Blockset Value Proposition Perform fuel economy simulations at 50 100x real time Explore and customize pre-built reference applications Reuse models throughout the development cycle 3
Agenda Introduction to Powertrain Blockset Five cool things you can do with it: 1. Engine control design / calibration 2. Design optimization studies 3. Multidomain simulation via Simscape 4. Subsystem control design 5. Hardware-in-the-loop (HIL) testing Why are these cool? Reduce time on HIL, dyno, vehicle testing Explore wider search space Integrate multidomain subsystem models Validate controller design via simulation Validate controller virtually 4
Agenda Introduction to Powertrain Blockset Five cool things you can do with it: 1. Engine control design / calibration 2. Design optimization studies 3. Multidomain simulation via Simscape 4. Subsystem control design 5. Hardware-in-the-loop (HIL) testing 5
Powertrain Blockset Product released for R2016b Goals: Provide starting point for engineers to build good plant / controller models Provide open and documented models Provide very fast-running models that work with popular HIL systems 6
Powertrain Blockset Features Library of blocks Pre-built reference applications 7
Drivetrain Energy Storage Propulsion Transmission Vehicle Dynamics and Auxiliary Drive Vehicle Scenario Builder 8
Reference Applications Full vehicle models (conventional, EV, multi-mode HEV, input power-split HEV) Virtual engine dynamometers (compression ignition, spark ignition) 9
Four Use Cases. One Framework. Use Cases: 1. System design and optimization 2. Controller parameter optimization 3. System integration test Requirements Closed-loop Simulation Rapid Prototyping 4. Software-hardware integration test (HIL) UC1 Subsystem Design UC2 Unit Design Adapt and Reuse Production Code Generation UC3 Unit Test UC4 Subsystem Test System Test Vehicle Test System Test (HIL) 10
Agenda Introduction to Powertrain Blockset Five cool things you can do with it: 1. Engine control design / calibration 2. Design optimization studies 3. Multidomain simulation via Simscape 4. Subsystem control design 5. Hardware-in-the-loop (HIL) testing Reduce time on HIL, dyno, vehicle testing 11
Engine Control Design / Calibration Powertrain Blockset includes virtual engine dynamometer reference applications These can be used for a variety of engine controls development and calibration activities Includes several predefined experiments 12
Pre-defined Experiments for Automating Analyses Generate a steady state map from the current engine / controller Generate transient data for system identification / Model- Predictive Control (MPC) Automatically calibrate throttle / wastegate to match torque command Automatically scale engine and re-calibrate controller (150cc 15 L) 13
Automated Calibration Experiment 14
Executable Test Specification Describe the calibration procedure as a Stateflow chart (not a Word doc) Test the procedure virtually Validate / plan calibration procedure with test engineers Start testing on real hardware with refined procedure 15
Flexible Testing Framework Use Powertrain Blockset mapped engine blocks with your own data Create custom engine models using Powertrain Blockset library components Connect in your own engine model (e.g., 3 rd party CAE tool) 16
Controls Validation with Engine Model Co-Simulation 17
Controls-oriented Model Creation Detailed, design-oriented model Fast, but accurate controls-oriented model 18
How Accurate is the Mapped Engine Model? Auto-generated mapped engine model vs. co-simulation with design-oriented CAE model: 0.3% fuel economy difference 50x faster Mapped engine model Design-oriented engine model 19
Engine Control Design / Calibration Automatically calibrate throttle / wastegate Define and simulate custom calibration procedures Generate engine maps from CAE models 20
Agenda Introduction to Powertrain Blockset Five cool things you can do with it: 1. Engine control design / calibration 2. Design optimization studies 3. Multidomain simulation via Simscape 4. Subsystem control design 5. Hardware-in-the-loop (HIL) testing Explore wider search space 21
Accessible Optimization Capabilities 50-100x Faster Than Real Time Efficient Optimization Laptop-based Analysis More drive cycles and design parameters Using fewer resources Simulink Design Optimization UI 22
Multi-Mode HEV Review EV Mode 23
Multi-Mode HEV Review SHEV Mode 24
Multi-Mode HEV Review Engine Mode 25
Requested Tractive Force [N] Design Optimization Problem Statement Maximize MPGe FTP75 and HWFET Weighted MPGe = 0.55(FTP75) + 0.45(HWFET) Optimize Parameters: 5 control parameters EV, SHEV, Engine mode boundaries 1 hardware parameter Final differential ratio Use PC Simulink Design Optimization (SDO) Parallel Computing Toolbox (PCT) 8000 7000 6000 5000 4000 3000 2000 1000 EV SHEV Engine / Power Split 0 0 50 100 150 Vehicle Speed [kph] Differential Ratio Lenovo ThinkPad T450s Dual Core i7 2.60GHz 12 GB RAM 26
Simulink Design Optimization Speed Up Best practices Accelerator mode Fast Restart Use Parallel Computing Toolbox Specify Simulation timeout 27
Optimization Results Simulink Design Optimization Response Optimization + 2% MPGe ~ 12 Hours 3.42:1 2.92:1 28
Sensitivity Analysis Determine sensitivity of the fuel economy to changes in design parameters Configure Monte Carlo simulations using Simulink Design Optimization s graphical interface Create sample sets using random & pseudo-random techniques Define behaviors of interest in the model Speed up performance using parallel computing Local: Parallel Computing Toolbox Cluster: MATLAB Distributed Computing Server 29
Sensitivity Analysis Results City Cycle High variation in fuel economy for variations in wheel radius, vehicle mass, and other parameters High sensitivity to variation in wheel radius and injector slope values Highway Cycle Low variation in fuel economy for variations in wheel radius, vehicle mass, and other parameters High sensitivity to variation in barometric pressure, but little else 30
Design optimization studies Define Design Optimization studies with minimal setup effort Enable parallel computing with a simple checkbox Perform Design Optimization studies overnight on your laptop Perform Monte Carlo studies to analyze sensitivity 31
Agenda Introduction to Powertrain Blockset Five cool things you can do with it: 1. Engine control design / calibration 2. Design optimization studies 3. Multidomain simulation via Simscape 4. Subsystem control design 5. Hardware-in-the-loop (HIL) testing Integrate multidomain subsystem models 32
Powertrain Blockset and Simscape Tools have overlap in what they can do, but they have a different emphasis Analysis Powertrain Blockset Equation-based Data-driven Simscape Design 33
Custom Drivetrain or Transmission Replace portions of reference application with custom models assembled from Simscape libraries Use Variant Subsystems to shift back and forth based on current simulation task Pre-Built Drivetrain Custom Drivetrain Custom Transmission 34
Engine Cooling System Take customization one step further Start with Custom Driveline variant Add Engine Cooling subsystem adapted from sscfluids_engine_cooling_system 35
Conventional Vehicle with Simscape Engine Cooling 1. Heat rejection calculation 1 2. Heat distributed between oil and coolant 2 3. Temperature of cylinder used to validate cooling system performance 1 2 3 36
Multidomain simulation via Simscape Create detailed, multi-domain subsystem models with Simscape Incorporate them into system level vehicle models from Powertrain Blockset Validate subsystem performance with closed loop simulation 37
Agenda Introduction to Powertrain Blockset Five cool things you can do with it: 1. Engine control design / calibration 2. Design optimization studies 3. Multidomain simulation via Simscape 4. Subsystem control design 5. Hardware-in-the-loop (HIL) testing Validate controller design via simulation 38
Challenges for the Motor Control Engineer How do I know if my motor controller will produce the desired performance? What will the interactions be between my motor and the rest of the vehicle systems? How will my motor operate under more extreme load cases? 39
Different Motor Models for Different Needs System Optimization Goal: Estimate fuel economy Requirements: fast simulation speed, simple parameterization Model choice: empirical model Subsystem Control Design Goal: Study controller interactions Requirements: higher accuracy, inclusion of effects like saturation Model choice: nonlinear saturation Detailed model = inverter controller + nonlinear motor model 40
High Fidelity Detailed Motor Model in Simscape FEA simulations or dynamometer data used to obtain non-linear flux table Flux-based PMSM model created to capture this effect 0.05 d Data Map id d [V.S] 0 vd λd -0.05 500 0 I q [A] -500-600 -400-200 I d [A] 0 vq λq 0.2 0.1 q Data Map q [V.S] 0-0.1-0.2 500 0 I q [A] -500-600 -200-400 I d [A] 0 iq Mechanical Eqn. 41
Including Detailed Subsystem Variants Add your own subsystem variants to the existing vehicle models Simulink-based Simscape-based S-function 42
Detailed Model Variant Simulation Cycle Final SOC (%) MPGe Name Mapped Detailed Mapped Detailed HWFET 42 44 50.5 51.8 FTP75 41.4 42.8 59.6 66.4 Detailed variant gives comparable response Supervisory controller handles both motor variants Motor controller requires further verification 43
Torque Control Performance Actual Torque Commanded Torque FTP75 Drive Cycle Motor torque response accurately follows the commanded torque at different speeds Motor Speed 44
Torque Control Performance Actual Torque Commanded Torque Motor Speed US06 Drive Cycle Much higher power demand reveals a problem Motor controller becomes unstable under certain operating conditions 45
Controller Enhancements Controller robustness was improved via dynamic gain scheduling Trq_cmd Speed Flux-Weakening Controller id_cmd iq_cmd Current Controller vd_ref vq_ref Modulation 46
Torque Control Performance Actual Torque Commanded Torque US06 Drive Cycle Even in more extreme maneuvers, improved motor controller is able to provide the commanded torque Motor Speed 47
Subsystem control design Easily integrate detailed motor and controller model in system simulation model Test interactions between motor and controller with the rest of the vehicle Verify subsystem controller meets system level requirements 48
Agenda Introduction to Powertrain Blockset Five cool things you can do with it: 1. Engine control design / calibration 2. Design optimization studies 3. Multidomain simulation via Simscape 4. Subsystem control design 5. Hardware-in-the-loop (HIL) testing Validate controller virtually 49
HIL Testing with Powertrain Blockset HEV Model Speedgoat Rapid Control Prototyping System Speedgoat Hardware in-the-loop System CAN Cable Embedded Controller Hardware Target Computer Hardware 50
Powertrain Blockset HIL Testing Physical Setup 51
Easily Tune Parameters in Real Time and Save Calibrations Calibrate parameters at run time in Simulink Real-Time Explorer Use Simulink Real-Time API to save and compare calibrations directly from MATLAB 52
Hardware-in-the-loop (HIL) testing Validate control algorithm before physical prototypes are available Reuse the same vehicle models across the V-cycle Tune parameters in real time Setup a HIL test in a few hours 53
Summary With Powertrain Blockset, you can perform Model-Based Design on your automotive systems with a single, seamlessly integrated environment Engine control design / calibration Design optimization studies Subsystem controller design Multidomain simulation via Simscape Hardware-in-the-loop (HIL) testing 54
Powertrain Blockset Value Proposition Perform fuel economy simulations at 50 100x real time Explore and customize pre-built reference applications Reuse models throughout the development cycle 55
Additional Resources Customer Service Email: service@mathworks.com Phone: 508.647.7000, option 1 Product Manager mike.sasena@mathworks.com Technical Support Email: support@mathworks.com Phone: 508.647.7000, option 2 Product Specialist Application Engineer brad.hieb@mathworks.com 56