Development and Testing of a Flexible Topology Micro ...

257
The Pennsylvania State University The Graduate School College of Engineering DEVELOPMENT AND TESTING OF A FLEXIBLE TOPOLOGY MICRO-HYBRID PASSENGER VEHICLE POWERTRAIN FOR HARDWARE-IN-THE LOOP SIMULATION AND EDUCATION A Thesis in Mechanical Engineering by Timothy Paul Cleary 2010 Timothy Paul Cleary Submitted in Partial Fulfillment of the Requirements for the Degree of Master of Science May 2010

Transcript of Development and Testing of a Flexible Topology Micro ...

Page 1: Development and Testing of a Flexible Topology Micro ...

The Pennsylvania State University

The Graduate School

College of Engineering

DEVELOPMENT AND TESTING OF A FLEXIBLE TOPOLOGY MICRO-HYBRID

PASSENGER VEHICLE POWERTRAIN FOR

HARDWARE-IN-THE LOOP SIMULATION AND EDUCATION

A Thesis in

Mechanical Engineering

by

Timothy Paul Cleary

2010 Timothy Paul Cleary

Submitted in Partial Fulfillment

of the Requirements

for the Degree of

Master of Science

May 2010

Page 2: Development and Testing of a Flexible Topology Micro ...

The thesis of Timothy Paul Cleary was reviewed and approved* by the following:

Daniel C. Haworth

Professor of Mechanical Engineering

Thesis Co-Advisor

Joel R. Anstrom

Research Associate, Thomas D. Larson Pennsylvania Transportation Institute

Thesis Co-Advisor

H. Joseph Sommer III

Professor of Mechanical Engineering

Professor-In-Charge of Mechanical and Nuclear Engineering Graduate Programs

Karen A. Thole

Professor of Mechanical Engineering

Head of the Department of Mechanical and Nuclear Engineering

*Signatures are on file in the Graduate School

Page 3: Development and Testing of a Flexible Topology Micro ...

iii

ABSTRACT

Hardware-in-the-loop (HIL) simulations allow for rapid testing and validation of prototype

components and their mathematical models. Development time of these complex components and their

control systems, such as high voltage batteries, advanced internal combustion engines and electric motors

seen in hybrid electric vehicles, is also decreased. Teaching these skills for more than one specific

component or system of components is difficult given the effort to pull together complicated experimental

hardware and or software. This presents a need to develop a tool that adapts quickly to a desired test

configuration and performs multiple test modes for an assortment of prototype components. This thesis

discusses the development of such a tool and explores its ability to test and operate in multiple

configurations.

This thesis details the design and testing of an HIL test bench that performs high voltage battery,

internal combustion engine, electric-motor and controller HIL simulations. The same test bench is

designed to be tested in a small vehicle as an all electric, series hybrid, parallel hybrid, and conventional

powertrain.

Page 4: Development and Testing of a Flexible Topology Micro ...

iv

TABLE OF CONTANTS

LIST OF FIGURES ................................................................................................................. viii

LIST OF TABLES ................................................................................................................... xv

LIST OF EQUATIONS ........................................................................................................... xvi

LIST OF ABBREVIATIONS .................................................................................................. xviii

ACKNOWLEDGEMENTS ..................................................................................................... xix

Chapter 1 Introduction ............................................................................................................. 1

Chapter 2 Literature Review .................................................................................................... 3

2.1 Hybrid Electric Vehicles ............................................................................................ 3 2.2 Hardware-in-the-Loop in the Automotive Industry ................................................... 4 2.3 Hardware-in-the-Loop in Education .......................................................................... 4 2.4 Powertrain System Analysis Toolkit (PSAT) ............................................................ 5 2.4 Existing HIL Test Benches ........................................................................................ 6

Chapter 3 Hardware Summary ................................................................................................. 9

3.1 Solid Modeling ........................................................................................................... 10 3.2 Batteries ..................................................................................................................... 16

3.2.1 Lithium Technology Corporation (LTC) – Lithium Iron Phosphate ............... 16 3.2.2 Motorcraft – Nickel-Metal-Hydride ................................................................ 19 3.2.3 Saft - Nickel-Metal-Hydride ........................................................................... 20

3.3 Electric Motors ........................................................................................................... 20 3.3.1 Hi Performance - AC-12 AC Induction Motor ................................................ 20 3.3.2 Hi Performance - AC-15 AC Induction Motor ................................................ 21

3.4 Engine ........................................................................................................................ 21 3.4.1 Engine Throttle and Choke Mechanical Control ............................................. 21 3.4.2 Engine Speed Component Level Control ........................................................ 22

3.5 Controllers .................................................................................................................. 23 3.5.1 Master Vehicle Controller ............................................................................... 24 3.5.2 Electric Motor Controllers............................................................................... 24 3.5.3 Engine Servo Controller .................................................................................. 24 3.5.4 Battery Management System ........................................................................... 25

3.6 Electronics .................................................................................................................. 25 3.6.1 DC-DC Block .................................................................................................. 25 3.6.2 Relay Box ........................................................................................................ 26 3.6.3 Driver Interfaces .............................................................................................. 27

Chapter 4 Operational Modes .................................................................................................. 29

4.1 Passenger Vehicle Modes .......................................................................................... 30

Page 5: Development and Testing of a Flexible Topology Micro ...

v

4.1.1 Electric Vehicle (EV) Mode ............................................................................ 30 4.1.2 Series Hybrid Electric Vehicle Mode .............................................................. 33 4.1.3 Parallel Hybrid Electric Vehicle Mode ........................................................... 35 4.1.4 Series/Parallel Hybrid Electric Vehicle Mode ................................................ 37 4.1.5 Conventional Vehicle Mode ............................................................................ 38

4.2 Hardware-In-The-Loop Modes .................................................................................. 39 4.2.1 Battery HIL Mode ........................................................................................... 39 4.2.2 Engine HIL Mode ............................................................................................ 40 4.2.3 Motor HIL Mode ............................................................................................. 41 4.2.4 Auxiliary Power Unit HIL Mode .................................................................... 42

Chapter 5 Battery HIL ............................................................................................................. 43

5.1 PSAT Battery Model .................................................................................................. 44 5.2 Characterization ......................................................................................................... 49 5.2 Model Setup ............................................................................................................... 58 5.3 Hardware Setup .......................................................................................................... 64 5.4 Test Setup ................................................................................................................... 66 5.5 Results of Battery Simulation, Co-Simulation, and HIL Tests .................................. 67 5.6 Other Electrical Components ..................................................................................... 74 5.7 Associated Laboratory for Classroom Education ....................................................... 75

Chapter 6 Engine HIL .............................................................................................................. 76

6.1 PSAT Engine Model .................................................................................................. 76 6.2 Characterization ......................................................................................................... 79

6.2.1 High Resolution Data Collection Procedure ................................................... 79 6.2.2 Low Resolution Automated Data Collection Procedure ................................. 80

6.3 Model Setup ............................................................................................................... 85 6.4 Hardware Setup .......................................................................................................... 88 6.5 Test Setup ................................................................................................................... 89 6.6 Results of Engine Simulation, Co-Simulation, and HIL Tests................................... 89 6.7 Associated Laboratory for Classroom Education ....................................................... 95

Chapter 7 Motor HIL ............................................................................................................... 96

7.1 PSAT Motor Model.................................................................................................... 96 7.1.1 Motor ............................................................................................................... 96 7.1.2 Generator ......................................................................................................... 98

7.2 Characterization ......................................................................................................... 99 7.3 Model Setup ............................................................................................................... 107 7.4 Hardware Setup .......................................................................................................... 111 7.5 Test Setup ................................................................................................................... 112 7.6 Results of Motor Simulation, Co-Simulation, and HIL Tests .................................... 112 7.7 Associated Laboratory for Classroom Education ....................................................... 118

Chapter 8 Controller HIL ......................................................................................................... 119

8.1 Model Setup ............................................................................................................... 119 8.1.1 Plant Models .................................................................................................... 120

Page 6: Development and Testing of a Flexible Topology Micro ...

vi

8.1.2 Controller Model ............................................................................................. 121 8.2 Hardware Setup .......................................................................................................... 124 8.3 Test Setup ................................................................................................................... 125 8.4 Results of Controller HIL Tests ................................................................................. 125 8.5 Associated Laboratory for Classroom Education ....................................................... 128

Chapter 9 Component Level Control and Communication...................................................... 129

9.1 Engine Control ........................................................................................................... 129 9.1.1 Engine Torque Control .................................................................................... 129 9.1.2 Engine Speed Control ...................................................................................... 130

9.2 Motor Control ............................................................................................................ 133 9.2.1 Motor Torque Control ..................................................................................... 142 9.2.2 Motor Speed Control ....................................................................................... 142 9.2.3 Dual Motor Control ......................................................................................... 143

9.3 Electronic Clutch Control .......................................................................................... 143 9.4 Battery Control ........................................................................................................... 144

9.4.1 State of Charge Calculation ............................................................................. 145 9.5 Digital Scale ............................................................................................................... 147 9.6 Vehicle Speed ............................................................................................................ 147 9.7 Drive Input ................................................................................................................. 148

Chapter 10 Full Vehicle Control .............................................................................................. 149

9.1 Electric Only Vehicle Control .................................................................................... 150 9.2 Series Hybrid Vehicle Control ................................................................................... 152

9.2.1 State of Charge Non-Depleting ....................................................................... 152 9.2.2 State of Charge Depleting – Plug in Hybrid Electric Vehicle (PHEV) ........... 154

9.3 Parallel Hybrid Vehicle Control ................................................................................. 155 9.4 Series / Parallel Hybrid Vehicle Control .................................................................... 155 9.5 Conventional Vehicle Control .................................................................................... 155

Chapter 11 Full Vehicle Testing .............................................................................................. 156

11.1 Electric Vehicle Mode Results ................................................................................. 156 11.1.1 Single Motor Electric Vehicle Mode ............................................................. 156 11.1.2 Dual Motor Electric Vehicle Mode ............................................................... 162

11.2 Series Engine Mode Results ..................................................................................... 166 11.3 Parallel Mode Results .............................................................................................. 169 11.4 Conventional Mode Results ..................................................................................... 170

Chapter 12 Conclusions and Future Work ............................................................................... 171

Appendix A Simulink Models ................................................................................................ 172

Appendix B Wire Diagrams .................................................................................................... 177

Appendix C Motor and Controller Dynamometer Results ..................................................... 182

Appendix D HIL Laboratory Instructions ............................................................................... 186

Page 7: Development and Testing of a Flexible Topology Micro ...

vii

Battery HIL Simulation .................................................................................................... 186 Hardware .................................................................................................................. 186 Procedure .................................................................................................................. 187 Analysis .................................................................................................................... 190

Engine HIL Simulation .................................................................................................... 190 Hardware .................................................................................................................. 190 Procedure .................................................................................................................. 190 Analysis .................................................................................................................... 192

Electric Motor HIL Simulation ........................................................................................ 193 Hardware .................................................................................................................. 193 Procedure .................................................................................................................. 193 Analysis .................................................................................................................... 195

Controller HIL Simulation ............................................................................................... 195 Hardware .................................................................................................................. 195 Procedure .................................................................................................................. 196 Analysis .................................................................................................................... 198

Full Vehicle Electric Mode Control Development .......................................................... 198 Full Vehicle Series HEV Control Development .............................................................. 198 Full Vehicle Parallel HEV Control Development ............................................................ 198

Appendix E PSAT Initialization Files .................................................................................... 199

NiMH (Motorcraft) Battery Pack Model ......................................................................... 199 Primary Motor Model ...................................................................................................... 203 Secondary Motor Model (as a motor) .............................................................................. 206 Secondary Motor Model (as a generator) ......................................................................... 209 Honda GS 190 Gasoline Engine Model ........................................................................... 212 Electrical Accessory Model ............................................................................................. 220 Power Converter Model ................................................................................................... 220 Final Drive Model ............................................................................................................ 221 Single Reduction Gear Ratio Model ................................................................................ 222 Berkeley Vehicle (body) Model ....................................................................................... 223 Berkeley Wheel Model .................................................................................................... 224

APPENDIX F ABC 150 Script ............................................................................................... 226

Pulse Power Testing ......................................................................................................... 226 Co-Simulation and HIL Simulation ................................................................................. 228

Appendix G Motor Controller Parameters .............................................................................. 229

Bibliography ............................................................................................................................ 236

Page 8: Development and Testing of a Flexible Topology Micro ...

viii

LIST OF FIGURES

Figure 2-1: Harbin Institute of Technology HIL Test Bench .................................................. 7

Figure 2-2: Harbin Institute of Technology HIL Test Bench Diagram ................................... 7

Figure 2-3: Argonne National Laboratory Modular Automotive Technology Testbed ........... 8

Figure 3-1: Penn State GATE Berkeley MMHEV Solid Model .............................................. 9

Figure 3-2: Penn State GATE Berkeley MMHEV .................................................................. 10

Figure 3-3: Powertrain Housing Factor of Safety .................................................................... 12

Figure 3-4: Lithium Ion Pack CFD Setup ................................................................................ 12

Figure 3-5: Lithium Ion Pack CFD Results – Air Temperature ............................................... 13

Figure 3-6: Lithium Ion Battery Pack CFD Results - Air Flow Side View ............................. 14

Figure 3-7: Lithium Ion Battery Pack CFD Results - Air Flow Top View .............................. 14

Figure 3-8: Lithium Ion Battery Pack CFD Results - Cell Temperature ................................. 15

Figure 3-9: Exposed Lithium Ion Battery Header ................................................................... 17

Figure 3-10: Exploded Lithium Ion Battery Header ................................................................ 18

Figure 3-11: System Test of the Lithium Ion Battery Pack ..................................................... 19

Figure 3-12: Engine Throttle and Choke Servos ..................................................................... 22

Figure 3-13: Controller Layout ................................................................................................ 23

Figure 3-14: Power Converter Module .................................................................................... 26

Figure 3-15: Potentiometer and Pedal Driver Interface Integration ......................................... 27

Figure 3-16: Dash Mounted Touch Screen Driver Interface ................................................... 28

Figure 4-1: Powertrain Layout CAD Model ............................................................................ 29

Figure 4-2: Integrated Powertrain ............................................................................................ 30

Figure 4-3: Primary Motor and Drive ...................................................................................... 31

Figure 4-4: Energy Flow - Electric Vehicle Mode................................................................... 32

Page 9: Development and Testing of a Flexible Topology Micro ...

ix

Figure 4-5: Secondary Motor and Engine APU ....................................................................... 34

Figure 4-6: Energy Flow - Series Hybrid Mode ...................................................................... 35

Figure 4-7: Energy Flow - Parallel Hybrid Mode .................................................................... 37

Figure 4-8: Energy Flow - Conventional Mode ....................................................................... 38

Figure 4-9: Battery Hardware-in-the-Loop Configuration ...................................................... 40

Figure 4-10: Motor Hardware-in-the-Loop Configuration ...................................................... 42

Figure 5-1: PSAT Battery Generic Map Model ....................................................................... 44

Figure 5-2: Motorcraft C/3.13 Discharge ................................................................................ 50

Figure 5-3: Hybrid Pulse Power Characterization Test (Start of Sequence)............................ 51

Figure 5-4: Hybrid Pulse Power Characterization Test (Complete HPPC Sequence) ............. 52

Figure 5-5: Motorcraft 80% SOC HTTC Test ......................................................................... 53

Figure 5-6: Motorcraft NiMH Battery Internal Resistance to Charging .................................. 54

Figure 5-7: Motorcraft NiMH Battery Internal Resistance to Discharging ............................. 55

Figure 5-8: Motorcraft Battery Maximum Charge and Discharge Power ............................... 56

Figure 5-9: Motorcraft Open-Circuit Voltage Map ................................................................. 57

Figure 5-10: Complete PSAT Model of the Berkeley MMHEV in Electric Vehicle Mode .... 59

Figure 5-11: Battery Co-Simulation and HIL Diagram ........................................................... 60

Figure 5-12: PSAT Battery Model HIL Changes .................................................................... 61

Figure 5-13: Measured Battery Voltage and Current Inputs .................................................... 62

Figure 5-14: Commanded Current Signal to the ABC 150 ...................................................... 62

Figure 5-15: Battery HIL Hardware Layout ............................................................................ 64

Figure 5-16: Voltage Divider ................................................................................................... 65

Figure 5-17: Battery Testing Voltage Results .......................................................................... 68

Figure 5-18: Battery Testing Voltage Results (snapshot) ........................................................ 69

Figure 5-19: Battery Testing Current Results .......................................................................... 70

Figure 5-20: Battery Testing Current Results (snapshot) ........................................................ 70

Page 10: Development and Testing of a Flexible Topology Micro ...

x

Figure 5-21: Battery Testing State of Charge Results ............................................................. 72

Figure 5-22: Battery Testing State of Charge Results (snapshot) ............................................ 72

Figure 5-23: Battery Testing Vehicle Speed Results ............................................................... 73

Figure 5-24: Battery Testing Vehicle Speed Results (snapshot) ............................................. 74

Figure 6-1: PSAT Engine Hot Map Model Inputs and Outputs ............................................... 77

Figure 6-2: Wide Open Throttle Engine Torque Curve ........................................................... 83

Figure 6-3: Engine Efficiency .................................................................................................. 83

Figure 6-4: Engine Fuel Rate ................................................................................................... 84

Figure 6-5: Engine Fuel Rate and Maximum Torque Curve ................................................... 84

Figure 6-6: Engine Co-Simulation and HIL Diagram.............................................................. 85

Figure 6-7: PSAT Engine Model HIL Changes ....................................................................... 86

Figure 6-8: Secondary Motor and Engine State Control for Engine HIL and Co-Simulation . 87

Figure 6-9: Engine Hardware-in-the-Loop Hardware Layout ................................................. 88

Figure 6-10: Engine Testing Speed Results ............................................................................. 90

Figure 6-11: Engine Testing Speed Results (snapshot) ........................................................... 91

Figure 6-12: Engine Testing Torque Results ........................................................................... 92

Figure 6-13: Engine Testing Torque Results (snapshot)......................................................... 93

Figure 6-14: Engine Testing Fuel Consumption Results ......................................................... 93

Figure 6-15: Engine Testing Fuel Consumption Results (snapshot) ....................................... 94

Figure 6-16: Engine Testing Power Out .................................................................................. 94

Figure 7-1: PSAT General Map Voltage in Motor Model ....................................................... 97

Figure 7-2: PSAT General Generator Map Torque in Model .................................................. 99

Figure 7-3: Motor/Controller Dynamometer Control Setup .................................................... 101

Figure 7-4: Motor/Controller Dynamometer Hardware Layout .............................................. 102

Figure 7-5: Dynamometer Load Cell ....................................................................................... 103

Figure 7-6: Primary Motor Dynamometer Torque Results ...................................................... 104

Page 11: Development and Testing of a Flexible Topology Micro ...

xi

Figure 7-7: Secondary Motor Dynamometer Torque Results .................................................. 104

Figure 7-8: Primary Motor and Controller Dynamometer Efficiency Results ......................... 105

Figure 7-9: Secondary Motor and Controller Dynamometer Efficiency Results ..................... 105

Figure 7-10: Primary Motor Efficiency Map ........................................................................... 106

Figure 7-11: Secondary Motor Efficiency Map ....................................................................... 106

Figure 7-12: Motor HIL Simulation Model ............................................................................. 108

Figure 7-13: Motor HIL Dynamometer Speed Control ........................................................... 109

Figure 7-14: Motor Co-Simulation and HIL Diagram ............................................................. 110

Figure 7-15: Motor HIL Motor Model ..................................................................................... 111

Figure 7-16: Motor Torque Calculation ................................................................................... 111

Figure 7-17: Clutch and Motors of the Berkeley MMHEV ..................................................... 112

Figure 7-18: Motor Testing Current Results ............................................................................ 113

Figure 7-19: Motor Testing Current Results (snapshot) .......................................................... 113

Figure 7-20: Motor Testing Speed Results .............................................................................. 114

Figure 7-21: Motor Testing Speed Results (snapshot) ............................................................. 115

Figure 7-22: Motor Testing Torque Results ............................................................................ 115

Figure 7-23: Motor Testing Torque Results (snapshot) ........................................................... 116

Figure 7-24: Motor Testing Vehicle Speed Results ................................................................. 117

Figure 7-25: Motor Testing Vehicle Speed Results (snapshot) ............................................... 117

Figure 8-1: Berkeley MMHEV Series Mode Plant Models Only ............................................ 120

Figure 8-2: Manual Control Model .......................................................................................... 121

Figure 8-3: Automatic Control Model ..................................................................................... 122

Figure 8-4: Automatic Control Model Subsystems ................................................................. 122

Figure 8-5: Engine Speed Control Trigger .............................................................................. 123

Figure 8-6: Engine Speed Control ........................................................................................... 123

Figure 8-7: High Level Automatic Control Model Logic ........................................................ 124

Page 12: Development and Testing of a Flexible Topology Micro ...

xii

Figure 8-8: Controller HIL Hardware Layout .......................................................................... 125

Figure 8-9: Controller HIL Engine Speed Results ................................................................... 126

Figure 8-10: Controller HIL Generator Load Demand ............................................................ 127

Figure 8-11: Controller HIL Generator Power Output ............................................................ 127

Figure 9-1: Engine Speed Control ........................................................................................... 131

Figure 9-2: Engine Speed Control Enable/Disable .................................................................. 131

Figure 9-3: Engine Speed Control Results ............................................................................... 132

Figure 9-4: Curtis Controller Indirect Rotor Flux Orientation (Curtis Instruments) ............... 133

Figure 9-5: Curtis Motor Controller Inverter Switching (Curtis Instruments) ......................... 134

Figure 9-6: Curtis Motor Controller Logic (Curtis Instruments) ............................................. 134

Figure 9-7: Highest Level Motor Control ................................................................................ 135

Figure 9-8: Motor Control Sub-Sections ................................................................................. 135

Figure 9-9: Motor Control Read CAN Messages .................................................................... 136

Figure 9-10: Motor Control CAN Message Decoding ............................................................. 136

Figure 9-11: Motor Control CAN Message Data Read Looping ............................................. 138

Figure 9-12: Motor Control CAN Message Command Write Looping ................................... 138

Figure 9-13: Motor Control CAN Message Writing Switch (Single Motor) ........................... 139

Figure 9-14: Motor Control CAN Message Writing Switch Logic (Dual Motors) ................. 140

Figure 9-15: Motor Control CAN Message Writing Switch (Dual motors) ............................ 140

Figure 9-16: Motor Controller Communication Start Up and Shut Down Logic .................... 141

Figure 9-17: Motor Control CAN Message Building .............................................................. 141

Figure 9-18: Motor Speed Control ........................................................................................... 143

Figure 9-19: Electronic Clutch Control ................................................................................... 144

Figure 9-20: Electronic Clutch Control Logic ......................................................................... 144

Figure 9-21: Battery State of Charge Calculation .................................................................... 145

Figure 9-22: Initial Battery State of Charge Logic .................................................................. 146

Page 13: Development and Testing of a Flexible Topology Micro ...

xiii

Figure 9-23: Battery State of Charge Current Integration Coulomb Counting ........................ 146

Figure 9-24: Digital Scale Communication ............................................................................. 147

Figure 9-25: Vehicle Speed Calculation .................................................................................. 148

Figure 9-26: Driver Input ......................................................................................................... 148

Figure 10-1: Component Force Relative to Road Load ........................................................... 150

Figure 10-2: Single Motor Electric Vehicle Control................................................................ 151

Figure 10-3: Dual Motor Electric Vehicle Control .................................................................. 151

Figure 10-4: Series Vehicle Control ........................................................................................ 153

Figure 10-5: Series Vehicle Control APU Logic ..................................................................... 154

Figure 11-1: Electric Vehicle Mode Run 1 Battery Voltage.................................................... 157

Figure 11-2: Electric Vehicle Mode Run 1 Battery Current .................................................... 158

Figure 11-3: Electric Vehicle Mode Run 1 Battery State of Charge ....................................... 159

Figure 11-4: Electric Vehicle Mode Run 1 Vehicle Speed ...................................................... 159

Figure 11-5: Electric Vehicle Mode Run 2 Battery Voltage.................................................... 160

Figure 11-6: Electric Vehicle Mode Run 2 Battery Current .................................................... 160

Figure 11-7: Electric Vehicle Mode Run 2 Battery State of Charge ....................................... 161

Figure 11-8: Electric Vehicle Mode Run 2 Vehicle Speed ...................................................... 161

Figure 11-9: Dual Motor Electric Vehicle Mode Battery Voltage........................................... 163

Figure 11-10: Dual Motor Electric Vehicle Mode Motor Currents ......................................... 163

Figure 11-11: Dual Motor Electric Vehicle Mode Battery State of Charge ............................ 164

Figure 11-12: Dual Motor Electric Vehicle Mode Motor Speeds ............................................ 165

Figure 11-13: Dual Motor Electric Vehicle Mode Vehicle Speed ........................................... 165

Figure 11-14: Series Engine Mode Battery Voltage ................................................................ 167

Figure 11-15: Series Engine Mode Motor Current .................................................................. 167

Figure 11-16: Series Engine Mode Battery State of Charge .................................................... 168

Figure 11-17: Series Engine Mode Engine Speed .................................................................. 168

Page 14: Development and Testing of a Flexible Topology Micro ...

xiv

Figure 11-18: Series Engine Mode Vehicle Speed .................................................................. 169

A-1: Berkeley MMHEV Conventional Mode PSAT Model .................................................... 172

A-2: Berkeley MMHEV Electric Vehicle Mode PSAT Model ............................................... 173

A-3: Berkeley MMHEV Series Mode PSAT Model ............................................................... 174

A-4: Berkeley Electric Vehicle Control Model ....................................................................... 175

A-5: Berkeley Electric Vehicle Control Model (dual motor) .................................................. 175

A-6: Berkeley Series Vehicle Control Model .......................................................................... 176

Page 15: Development and Testing of a Flexible Topology Micro ...

xv

LIST OF TABLES

Table 5-1: PSAT Generic Map Battery Model Parameters ..................................................... 45

Table 5-2: Motorcraft Open-Circuit Voltage ........................................................................... 57

Table 5-3: Battery Testing Error Data ..................................................................................... 67

Table 6-1: PSAT Engine Hot Map Parameters ........................................................................ 77

Table 6-2: High Resolution Engine Mapping Procedure ......................................................... 80

Table 6-3: Low Resolution Engine Mapping Procedure .......................................................... 81

Table 7-1: PSAT General Map Voltage in Motor Model Parameters...................................... 97

Table 7-2: Motor and Controller Testing Procedure ................................................................ 100

Table 10-1: Road Load Vehicle Parameters ............................................................................ 150

Page 16: Development and Testing of a Flexible Topology Micro ...

xvi

LIST OF EQUATIONS

Equation 3-1: Maximum Motor Power Calculation................................................................. 21

Equation 4-1: Primary Motor Gear Ratio ................................................................................ 31

Equation 5-1: PSAT Open-Circuit Voltage and Internal Resistance ....................................... 46

Equation 5-2: Battery Terminal Voltage .................................................................................. 46

Equation 5-3: Battery Power Lost to Heat ............................................................................... 47

Equation 5-4: Battery Temperature Calculation ...................................................................... 48

Equation 5-5: Battery State of Charge Calculation .................................................................. 48

Equation 5-6: Battery Capacity Calculation ............................................................................ 50

Equation 5-7: Battery Coulombic Efficiency Calculation ....................................................... 51

Equation 5-8: Battery Internal Resistance Calculation ............................................................ 53

Equation 5-9: Battery Power Calculation ................................................................................ 55

Equation 5-10: Measured Battery Voltage Scaling ................................................................. 63

Equation 5-11: Measured Battery Current Scaling .................................................................. 63

Equation 5-12: ABC 150 Current Command Scaling .............................................................. 63

Equation 5-13: Voltage Divider Gain Calculation ................................................................... 66

Equation 6-1: PSAT Engine Torque Calculation ..................................................................... 78

Equation 6-2: PSAT Instantaneous Fuel Consumption ........................................................... 78

Equation 6-3: PSAT Cumulative Fuel Rate ............................................................................. 78

Equation 6-4: Engine Torque ................................................................................................... 82

Equation 6-5: Engine Fuel Rate ............................................................................................... 82

Equation 6-6: Engine Efficiency .............................................................................................. 82

Equation 7-1: Motor Current.................................................................................................... 98

Equation 7-2: Motor Torque .................................................................................................... 98

Page 17: Development and Testing of a Flexible Topology Micro ...

xvii

Equation 7-3: Maximum Torque.............................................................................................. 98

Equation 7-4: Maximum Mechanical Torque .......................................................................... 98

Equation 7-5: Maximum Electrical Torque ............................................................................. 98

Equation 7-6: Heat Index of the Electric Motor....................................................................... 98

Equation 7-7: Generator Torque Output .................................................................................. 99

Equation 7-8: Generator Speed ................................................................................................ 99

Equation 7-9: Measured Motor Torque ................................................................................... 102

Equation 7-10: Measured Motor and Controller Efficiency .................................................... 103

Equation 9-1: Throttle Position Signal Equation ..................................................................... 130

Equation 9-2: Battery State of Charge Equation ...................................................................... 146

Equation 9-3: Vehicle Speed Calculation ................................................................................ 148

Equation 10-1: Vehicle Drag Force ......................................................................................... 149

Page 18: Development and Testing of a Flexible Topology Micro ...

xviii

LIST OF ABBREVIATIONS

HIL

EV

HEV

MMHEV

APU

SOC

PSAT

HPPC

CAD

FEA

CFD

NiMH

PID

PWM

VGA

PCI

MISO

MOSI

DC

AC

DOE

GATE

CAFE

CAN

Hardware-in-the-Loop

Electric Vehicle

Hybrid Electric Vehicle

Multiple Mode Hybrid Electric Vehicle

Auxiliary Power Unit

State of Charge

Powertrain System Analysis Toolkit

Hybrid Pulse Power Characterization

Computer Automated Design

Finite Element Analysis

Computational Fluid Dynamics

Nickel Metal Hydride

Proportional, Integral, Derivative

Pulse Width Modulated

Video Graphic Array

Peripheral Component Interconnect

Master in Slave out

Master out Slave in

Direct Current

Alternating Current

U.S. Department of Energy

Graduate Automotive Technology Education

Corporate Average Fuel Economy

Control Area Network

Page 19: Development and Testing of a Flexible Topology Micro ...

xix

ACKNOWLEDGEMENTS

I would like to thank the many people who supported me through my research endeavors.

First I would like to thank Dr. Daniel Haworth for his support through the Challenge X program

and funding from the Larson Transportation Institute. Thank you to Dr. Joel Anstrom for his personal

time and extensive guidance throughout this project. Thank you to Bryan Markovich and Theresa Maher

for their kind willingness to help when needed.

I’ve relied greatly on the Learning Factory, Thomas D. Larson Transportation Institute (LTI), and

The Penn State Advanced Vehicle Team facilities for tooling and manufacturing. But also I would like to

thank Carson Baird of the Learning Factory, Gary Neal, Matt Shirk, Brian Herrold, Eric Reischer and the

rest of the Advanced Vehicle Team veterans of the Challenge X and EcoCAR programs for their expertise

and support.

Thank you to Doug Picard for his donation of the 1958 Berkeley vehicle used in this research.

Thank you to Michael Bierly and the students at Pennsylvania College of Technology for their

remarkable paint and body work that radically transformed the vehicle. I would like to sincerely thank

Aymeric Rousseau and the PSAT team at Argonne Nation Laboratory as well as MathWorks for their

software donation. Thank you to Lithium Technology Corporation for their partial donation of prototype

Lithium Ion Iron Phosphate battery cells, also to Hi-Performance Golf Carts and Electric Motor Sports for

their partial donation of electric motors, controllers and hardware.

Finally, I would like to thank the most important people in my life. Thank you to my family and

friends, especially Allison, my mother, father, brother, and sister, for their encouragement and patience

throughout my college career.

Page 20: Development and Testing of a Flexible Topology Micro ...

Chapter 1

Introduction

Hardware-in-the-Loop (HIL) is a real-time simulation technique used for complex hardware

testing as well as the development of system or component level control. The process helps reduce

development time and cost (Crabb, 1998). While it is emerging as an engineering staple method of

development, instruction and education is required to teach current and future engineers the method and

application.

This thesis discusses the development and testing of a tool for instruction of HIL simulation. With

learning by doing in mind, the tool will allow students to take ideas learned about in lectures and apply

them quickly and safely.

HIL simulation is useful for studying many automotive systems. A benefit of HIL simulation is

the ability to experiment with single components to isolate and study their dynamics. Many experiments

are possible and will be exercised here, including high voltage, internal combustion engine, electric-motor

and controller HIL simulations. Including all individual tests in separate laboratory exercises over a

semester would involve many test bench setups and various laboratory visits. Another benefit of the tool

detailed in this thesis is the centralization of many HIL experiments into one test bench.

The design of this system allows for multiple HIL experiments by grouping many of the involved

components together in a way that allows for quick configuration changes. A system with this ability and

power is also useful as an interesting hybrid electric vehicle powertrain. This idea of grouping many

components together opens opportunities for control experiments with this unique multiple mode

powertrain while maintaining the function of a flexible test bench.

Page 21: Development and Testing of a Flexible Topology Micro ...

2

The configuration changes are achieved using a unique setup and automated control for each

component and the overall system. Using Matlab software, the control of the bench/powertrain and its

components offers more opportunities for student exercises. Students can practice developing control

algorithms for the components and the different system configurations of the test bench/powertrain.

The system design is on a small scale using inexpensive parts. While this sacrifices quality and

performance it provides an affordable system to replicate for education at other schools. Also, with a

smaller compact system, travel is easier and demonstrations are possible in smaller places such as a class

room.

The design, manufacturing and testing of the system presented in this thesis was performed

primarily by the author.

Page 22: Development and Testing of a Flexible Topology Micro ...

Chapter 2

Literature Review

Recent interests in reducing American dependency on foreign oil while increasing security and

over all energy independence have presented increased pressure to produce clean efficient automotive

transportation (Congress, Energy Independence and Security Act, 2007). The currently weak automotive

industry is in need of a strong product designed and built by American labor to get behind and help

rejuvenate the industry (Congress, American Recovery and Reinvestment Act, 2009). With a mandated

Corporate Average Fuel Economy (CAFE) of 35 mile per gallon (mpg) for 2020 passenger vehicles sold

in the United States (Congress, Energy Independence and Security Act, 2007) rapid and cheap

development of clean efficient vehicles is required. This high fuel economy standard will require

hybridization of many vehicle platforms before the 2020 model year.

2.1 Hybrid Electric Vehicles

Hybrid electric vehicles (HEV) are being rapidly developed to keep up with the growing demand

for more efficient transportation. HEVs come in various configurations and have many benefits over

traditional conventional vehicles, all of which present opportunities for more efficient transportation. For

example, using stored electrical energy for all or a fraction of required traction power offsets the use of

petroleum fuels as well as recapturing energy through regenerative braking and easily recharging at home

(Omonowo D. Momoh, 2009). All of these present opportunities to adapt our transportation needs to a

more efficient method.

Page 23: Development and Testing of a Flexible Topology Micro ...

4

2.2 Hardware-in-the-Loop in the Automotive Industry

There are three main process for developing a HEV: software simulation, Hardware-in-the-Loop

(HIL) simulation, and complete vehicle testing (Zhao Hui, 2008). Software testing of systems is only

possible when all the dynamics are understood and represented by mathematical models of a component.

In the case where all models are not available then HIL simulation or full vehicle testing is required. HIL

simulation is necessary to keep up with the increasing demand because full vehicle testing is a time

intensive and expensive process and models are not always available.

The automotive industry has been using HIL techniques for years on control systems. Plant

models of a vehicle’s powertrain are simulated on a computer while testing the production powertrain

control module in real time with the computer simulation (S. Raman, 1999). Recently, new components

such as high voltage batteries and electric traction motors are finding their way into production vehicles

as part of HEV configurations. Before a vehicle reaches the preproduction phase, extensive HIL testing

should be performed to test designs and verify function. HIL testing has proven valuable to accomplish

these tasks in a rapid and cheap manner.

2.3 Hardware-in-the-Loop in Education

Because the automotive industry has a growing interest in HIL simulation, educating engineering

students and industry professionals in HIL techniques is also growing. The Pennsylvania State University

is currently offering one of the first advanced automotive HIL classes in the country as part of their

Department of Energy (DOE) sponsored Graduate Automotive Technology Education (GATE)

curriculum under EEREVT (Energy Efficiency and Renewable Energy Vehicle Technologies). To

support this education, a small and cheap automotive powertrain HIL test bench was conceived to help

students apply lecture theory and make the connection to practice.

Page 24: Development and Testing of a Flexible Topology Micro ...

5

This thesis presents such a test bench with the ability to simulate battery HIL, engine HIL,

electric motor HIL, and engine/motor generator set HIL, as well as full vehicle testing in all electric,

series HEV, parallel HEV and conventional configurations.

2.4 Powertrain System Analysis Toolkit (PSAT)

Running an HIL simulation for an automotive application does not require a complete system of

hardware components including an engine, transmission, etc. Instead, missing hardware is replaced with a

mathematical model. Using a model offers flexibility to the test setup. One could completely change the

vehicle configuration by simply rearranging its models and control algorithm while physically testing the

same component. For example, if an engine was the tested component, HIL simulation could easily adapt

from a conventional vehicle simulation to a series HEV or parallel HEV configuration by changing the

simulated plant models and their control algorithm using the same engine hardware setup. This thesis

presents a hardware design that also changes arrangement as quickly and easily as software changes.

This thesis discusses the design and testing of an HIL test bench which uses Matlab, Matlab

Simulink, and Matlab Stateflow to model hardware not present in a test. Matlab software is also used to

control the hardware involved in the HIL test or the full vehicle.

Models of HEV and conventional vehicle components are available but many of them require a

unique understanding and expertise in a specific field. Argonne National Laboratory’s Powertrain System

Analysis Toolkit (PSAT) offers the ability to run full vehicle simulations using predefined models with a

basic understanding of conventional and HEV component configurations and function (Rousseau, 2002).

PSAT offers the ability to quickly model full HEV vehicles of all configurations using predefined or user

defined models. This thesis relies heavily on the use of PSAT models while redefining their parameters to

correlate with the hardware selected for the designed test bench. PSAT is also a forward looking model

Page 25: Development and Testing of a Flexible Topology Micro ...

6

written to work with Matlab software in a co-simulation environment making it ideal for HIL simulations

(Rousseau, 2002).

2.4 Existing HIL Test Benches

Others have designed and built HIL test benches. Few are designed to run more than one test and

none have the ability to carry out multiple HIL tests and perform as the powertrain of the test stand on

which they are built.

The Harbin Institute of Technology has developed a system seen in Figure 2-1 with the ability to

test electric-motor and engine combinations while always simulating the transmission and high voltage

battery components (Zhao Hui, 2008). Figure 2-2 shows a diagram of the hardware used in this system.

The Harbin Institute of Technology system, though flexible in test configuration, is large and not portable.

Argonne National Laboratory (ANL) has developed a modular HIL test bench designed to

operate on a chassis dynamometer (Lohse-Busch, 2009). This system, the Modular Automotive

Technology Testbed (MATT), is mobile because it was integrated with automotive suspension

components but is not suitable for passenger vehicle operation. MATT is instrumented with laboratory

hardware and was built without passenger interfaces. Though unique, flexible, and mobile, MATT is

devoted to act as a test bench loaded by a chassis dynamometer in a laboratory setting. Figure 2-3 shows

MATT in a configuration exercising an engine, transmission, and final drive while high voltage battery

and electric traction motor hardware were emulated.

Both MATT and the Harbin Institute of Technology systems are able to perform engine, electric

motor, and controller HIL simulations. Neither of the above systems can perform the same tests while

outside of the laboratory environment.

Page 26: Development and Testing of a Flexible Topology Micro ...

7

Figure 2-1: Harbin Institute of Technology HIL Test Bench

Figure 2-2: Harbin Institute of Technology HIL Test Bench Diagram

Page 27: Development and Testing of a Flexible Topology Micro ...

8

Figure 2-3: Argonne National Laboratory Modular Automotive Technology Testbed

Both the Harbin Institute of Technology and ANL HIL systems test large, full size vehicle

components. This is useful for real world testing without the added complexity of component scaling. The

following thesis details the design and testing of an HIL test bench that is smaller but also tests without

scaling. This test bench performs battery, engine, electric motor, and controller HIL simulations, many

while mobile. The same test bench is then tested as the HEV powertrain of a small vehicle in all electric,

series HEV, parallel HEV, and conventional modes.

Page 28: Development and Testing of a Flexible Topology Micro ...

Chapter 3

Hardware Summary

Several unique prototype components were integrated into the HIL test bench and as the installed

HEV powertrain into a 1958 Berkeley 328 sports car making it a Multiple Mode Hybrid Electric Vehicle

(MMHEV). These components give it the versatility of a fully functional test bench and MMHEV. The

powertrain design allows for single component level HIL experimentation as well as component and

system level control software testing. This same powertrain design will also and primarily act as the

power plant for the Berkeley MMHEV. This chapter discusses the details of component selection and the

HEV system design for this project.

Figure 3-1: Penn State GATE Berkeley MMHEV Solid Model

Primary Motor

Secondary Motor

Engine

Master Vehicle Controller

High Voltage Battery

Page 29: Development and Testing of a Flexible Topology Micro ...

10

Figure 3-2: Penn State GATE Berkeley MMHEV

3.1 Solid Modeling

Three dimensional solid models were created in SolidWorks to design and integrate components

of the system into an existing vehicle as shown in Figure 3-1 and Figure 3-2. Figure 3-1 shows the solid

model while Figure 3-2 shows an image of the finished vehicle. Solid modeling is a common tool used

extensively in the automotive industry and has proved to increase design and integration productivity

while decreasing time to production. This is accomplished by using Finite Element Analysis (FEA) and

Computational Fluid Dynamics (CFD) studies along with physical layout planning to validate designs.

Layout planning, FEA, and CFD testing took place before components or systems were manufactured to

decrease the development time of the Berkeley MMHEV. These models are also used in this thesis to

explain designs and functional modes.

Page 30: Development and Testing of a Flexible Topology Micro ...

11

A solid model of the 1959 Berkeley 328 chassis and suspension was created using the current

dimensions of the LTI owned Berkeley vehicle. These vehicles originally were produced by hand using

predominantly fiberglass, which will flex and distort over time. The current condition after recent body

reconstruction is reflected in this solid model.

This modular and flexible design could also be adapted to other sub-compact platforms. The same

design is currently being adapted to a Geo Metro by the Auto Technology Program at the Central

Pennsylvania Institute of Technology.

Solid models of the components selected for this design were created using manufacturer

specifications and measured dimensions. This includes the primary and secondary motors and controllers

along with the selected internal combustion engine and electronic clutch. These components were selected

for the powertrain design and purchased, while other components required custom design specifically for

this vehicle’s powertrain and its function. Some components unique to the Berkeley MMHEV are the

powertrain housing, Lithium Ion battery pack packaging and enclosure, as well as the engine throttle and

choke control integration system.

Using the designed powertrain, battery pack, and electronics, a full vehicle solid model was

assembled and tested for fit and function. Figure 3-1 shows the vehicle model with many of the

components integrated. Along with the ability to design and integrate physical dimensions, CAD allows

for CFD and FEA analysis to validate models. Figure 3-3 shows the results of an FEA simulation

performed to validate the powertrain housing and design. Made of ¼ inch steel and loaded from the two

electric motors and the engine due to their weight and maximum torque output, the simulated minimum

factor of safety for the powertrain housing is 1.8. Given these results, the powertrain housing is

approximately twice as strong as needed to handle maximum loading, and deform by a maximum of 0.05

inches.

Page 31: Development and Testing of a Flexible Topology Micro ...

12

Figure 3-3: Powertrain Housing Factor of Safety

Figure 3-4: Lithium Ion Pack CFD Setup

Figure 3-4 illustrates the boundary conditions and heat sources for the CFD analysis of the

Lithium Ion battery pack design. Each cell in the pack was set to source 500 Watts of heat to simulate the

Page 32: Development and Testing of a Flexible Topology Micro ...

13

battery at its maximum rated continuous load. The simulation was run assuming an inlet fan that pushes

120 cubic feet per minute of ambient air at 70 degrees Fahrenheit and 50% relative humidity into the

enclosure. The outlet was set to ambient atmospheric pressure and temperature.

Figure 3-5: Lithium Ion Pack CFD Results – Air Temperature

Page 33: Development and Testing of a Flexible Topology Micro ...

14

Figure 3-6: Lithium Ion Battery Pack CFD Results - Air Flow Side View

Figure 3-7: Lithium Ion Battery Pack CFD Results - Air Flow Top View

Page 34: Development and Testing of a Flexible Topology Micro ...

15

Figure 3-8: Lithium Ion Battery Pack CFD Results - Cell Temperature

Figure 3-5 to Figure 3-8 show some of the results from CFD analysis of the Lithium Ion battery

pack design. In Figure 3-5 the cooling air is shown to enter the pack at 70 degrees Fahrenheit and leave at

approximately 90 degrees. Figure 3-6 and Figure 3-7 show an evenly distributed air flow throughout the

pack with higher velocities near the outsides of the outer cells. Figure 3-8 illustrates the surface

temperature of the cells and indicates peak temperatures on the cylindrical surface of approximately 165

degrees Fahrenheit, which is slightly above the recommended operating temperature for these cells. Given

the test setup and results, this pack would be useful for the Berkeley MMHEV operation conditions but

should be closely monitored for dangerous temperature conditions.

Page 35: Development and Testing of a Flexible Topology Micro ...

16

3.2 Batteries

Three different battery packs were used for this study. The best suited pack was selected for each

experiment given the availability and testing parameter constraints. Below is a list and several

specifications for the batteries used in the thesis.

3.2.1 Lithium Technology Corporation (LTC) – Lithium Iron Phosphate

Lithium-Iron-Phosphate cells were used in a prototype battery pack. The packaging was designed

for easy assembly and disassembly while isolating dangerous areas. This allows students to see the

internal components for future instruction. Figure 3-9 shows the assembled pack with a header exposed.

A header is the structure that holds a group of cells at each end. This unique header encases the high

voltage bus bars and channels for individual cell voltage sensing wires.

Page 36: Development and Testing of a Flexible Topology Micro ...

17

Figure 3-9: Exposed Lithium Ion Battery Header

An additional sheet of machined polypropylene caps the exposed copper bus bars and voltage

sensing wires. This header design isolates any energized terminals or wires from accidental shorting by

inexperienced operators.

This battery pack consists of two headers, top and bottom. Each header contains the bus bars and

individual voltage sensing wires while also acting as the structure of the battery pack. Figure 3-10 shows

a rendered three dimensional model of the design. Included are four sheets of polypropylene, copper bus

bars and all of the necessary hardware.

Page 37: Development and Testing of a Flexible Topology Micro ...

18

Figure 3-10: Exploded Lithium Ion Battery Header

Fifteen Lithium Technology or GAIA, 3.2 volt, 33 Ah, prismatic, iron-phosphate cells in a

series make up the 48 Volt nominal battery pack. With manufacturer specifications of 350 Amperes

continuous discharge and 990 Amperes for 10 seconds the battery has continuous and peak power ratings

of 16.8 kW and 47.5 kW, respectively. These power ratings are safely above the peak and continuous

ratings of all other electrical devices combined.

A Battery Management System (BMS) is required given the unstable nature of Lithium-Ion cells.

Details of the battery management system will be discussed later in section 3.5.4 Battery Management

System.

Figure 3-11 shows the complete battery pack during initial system testing. A laboratory power

supply simulates the 48 Volt to 24 Volt DC-DC power supply that would energize the BMS. The driver

interface and communication system was tested to display the status of the individual cells using the high

speed Controller Area Network (CAN) between the BMS and vehicle controller.

Page 38: Development and Testing of a Flexible Topology Micro ...

19

Figure 3-11: System Test of the Lithium Ion Battery Pack

3.2.2 Motorcraft – Nickel-Metal-Hydride

The instability of the prototype advanced Lithium-Ion battery pack required a back up battery to

be used during the development and testing of the vehicle. Two Nickel Metal Hydride (NiMH) battery

packs were selected. The first backup battery pack used was the Motorcraft, NiMH, air cooled modules

that are nominally 12 volts each with 10, 1.2 Volt cells. These modules have been on the shelf for years;

consequently, given the NiMH high self discharge rate, cycling and testing had to be done to revive the

modules. The testing also generated new parameters and maps to use for modeling and control. After

testing four modules in a series arrangement the pack proved to have approximately 63 Ah of capacity

remaining. Details of the results are shown in Chapter 5. Considering that when they were manufactured

Page 39: Development and Testing of a Flexible Topology Micro ...

20

more than ten years ago they were rated at 90 Ah, a 60Ah capacity is satisfactory and still useful for this

project.

3.2.3 Saft - Nickel-Metal-Hydride

A second back up battery pack consists of Saft, NiMH, liquid cooled modules which are

nominally 12 volts each with ten, 1.2 Volt cells. These modules were used primarily for motor

dynamometer testing because of their liquid cooling ability. Repeated and rapid charging and discharging

required a battery that could be safely cooled. These modules also had been on the shelf for years, and

required cycling to revive them.

3.3 Electric Motors

Initially, two Direct Current (DC) permanent magnet brushed machines were tested and proved to

be inadequate for the Berkeley MMHEV design. Their controllers did not allow shaft freewheeling or

dynamic regenerative braking. Two similar Alternating Current (AC) induction electric machines were

ultimately selected and have proven to be the best for the Berkeley MMHEV design. They work well with

the system because of their light weight and robust control with adequate communication, true

freewheeling, and dynamic regenerative abilities.

3.3.1 Hi Performance - AC-12 AC Induction Motor

The Hi Performance AC-12 and AC-15 AC Induction motors are virtually identical electric

machines. The only noticeable difference is the controller that powers them. The AC-12 machine is

operated by a Curtis Instruments AC 1236-6301, 48 Volt to 84 Volt, 300 Ampere controller. This

Page 40: Development and Testing of a Flexible Topology Micro ...

21

machine has the potential to put out approximately 14.4 kW of traction power when operated by a 48 Volt

battery without considering the efficiencies of the motor and controller. Equation 3-1 calculates the

potential power of this system.

𝑀𝑎𝑥𝑖𝑚𝑢𝑚 𝑀𝑜𝑡𝑜𝑟 𝑃𝑜𝑤𝑒𝑟 = 𝐵𝑎𝑡𝑡𝑒𝑟𝑦 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 × 𝐶𝑜𝑛𝑡𝑟𝑜𝑙𝑙𝑒𝑟 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝐿𝑖𝑚𝑖𝑡 (𝐷𝐶)

Equation 3-1: Maximum Motor Power Calculation

3.3.2 Hi Performance - AC-15 AC Induction Motor

The AC-15 machine is operated by a Curtis Instruments AC 1238-6305, 48 Volt to 84 Volt, 550

Ampere controller. Again without considering the efficiencies of the motor and controller, Equation 3-1

gives the potential power of this system. Operated by a 48 Volt battery, this machine has the potential to

put out 26.4 kW of traction power.

3.4 Engine

A Honda GS 190, single cylinder, 6 horsepower engine was selected for the Berkeley MMHEV

design, because of its light weight, low cost, and robust operation.

3.4.1 Engine Throttle and Choke Mechanical Control

The engine was originally designed as a utility engine with a speed governor. Many

modifications were required to use the engine in the vehicle and for experimentation. The most significant

change was engine throttle control. After removing the original throttle and choke controls, two small

servos were integrated to the butterfly valves used for engine throttle and choke. The integrated servos

can be seen in Figure 3-12.

Page 41: Development and Testing of a Flexible Topology Micro ...

22

Figure 3-12: Engine Throttle and Choke Servos

The throttle and choke servos, along with an ignition coil and relay, give the vehicle controller

complete control of engine operation.

3.4.2 Engine Speed Component Level Control

The original engine was designed to mechanically operate in a single speed mode, so a

component level control was required for dynamic control of engine speed or torque. A Pulse Width

Modulated (PWM) signal is generated that drives the throttle and choke servos using a PIC

microcontroller. More detail about the controller is provided in Chapter 6.

Page 42: Development and Testing of a Flexible Topology Micro ...

23

3.5 Controllers

Several controllers are found throughout the Berkeley MMHEV. The master vehicle controller is

the master for all vehicle operations and modes. The electric motor and engine servo controllers carry out

requests from the master vehicle controller, while the electric motor controllers and battery management

systems broadcast the status and parameters of their corresponding components. Figure 3-13 shows the

layout of the key controllers in the vehicle.

Vehicle

Front

Secondary Motor

ControllerPrimary Motor

Controller

Vehicle

Controller

Battery Management

System

Servo

Controller

Mode Clutch

Relay Box

Figure 3-13: Controller Layout

Page 43: Development and Testing of a Flexible Topology Micro ...

24

3.5.1 Master Vehicle Controller

For overall control of the vehicle, an Advantech UNO 3072 fan-less Intel Pentium computer with

two PCI slots was chosen. Analog and Digital I/O were accomplished using an Advantech PCI-1716 card

while CAN communications was achieve using a Softing AC2 PCI card.

The computer runs a simple version of DOS as an operating system. This loads the embedded

Matlab xPC Target file, which is a compiled version of a Matlab Simulink code written to run the vehicle

and its components. The code will be discussed in detail in future chapters.

3.5.2 Electric Motor Controllers

Two electric motor controllers were selected to directly control the primary and

secondary motors. A Curtis Instruments 1238-6501 AC induction motor controller with a maximum DC

current rating of 550 Amperes and a Curtis Instruments 1236-6301 AC induction motor controller with a

maximum DC current rating of 300 Amperes control the primary and secondary motors, respectively. The

motor controllers are turned on using relays, and communicate using CAN messaging between

themselves and the master vehicle controller (Curtis Instruments, 2006).

3.5.3 Engine Servo Controller

The master vehicle controller sends analog voltage signals to the engine servo controller, which

generates PWM signals to drive the throttle and choke servo position on the engine. Controlling position

of the throttle and choke allow speed or torque control of the engine depending on the desired operational

mode. Other components associated with the control of the engine are the ignition relay and engine speed

Page 44: Development and Testing of a Flexible Topology Micro ...

25

sensor. Engine ignition is a simple relay that grounds the engine’s ignition to shut down the engine. The

engine’s speed sensor is a Hall Effect sensor and Red Lion frequency to voltage converter that converts

pulses from a toothed wheel and outputs an analog signal to the master vehicle controller proportional to

engine speed.

3.5.4 Battery Management System

For safety, Lithium Ion cells must be supervised to avoid over or under voltage or over

temperature. The selected I+ME BMS monitors cell voltage and temperature and has the ability to

discharge single cells to maintain a balanced pack. The CAN communicates the state of each individual

cell to the master vehicle controller. The BMS has the ability to send warnings and/or shut down the

battery if dangerous conditions are approached.

3.6 Electronics

Several electronic devices required for full automation of the many features of the Berkeley

MMHEV are described in the following subsections.

3.6.1 DC-DC Block

A custom power converter module was required to supply DC voltages to Berkeley MMHEV’s

components. This power module consists of three DC-DC power supplies, all inputting power from the

high voltage, 48 Volt battery pack. These power supplies output 24 Volt, 12 Volt, and 5 Volt DC at

varying current limits. Figure 3-14 is an image of the exposed power converter module designed for the

Berkeley MMHEV.

Page 45: Development and Testing of a Flexible Topology Micro ...

26

Figure 3-14: Power Converter Module

Wire diagrams and details of its function can be found in Appendix B, Wire Diagrams.

3.6.2 Relay Box

A National Instruments ER-16 containing 16 relays was selected to handle the switching

requirements of the Berkeley MMHEV. It interfaces TTL digital signals from the master vehicle

controller to switch relays. The operator must enable its function by manually switching on the dashboard

emergency stop. If the emergency switch is in an off state, all the relays go to a safe position in which all

components are shut down and de-energized.

Page 46: Development and Testing of a Flexible Topology Micro ...

27

3.6.3 Driver Interfaces

The driver interface consists of a 7 inch touch screen displaying the master vehicle controller

output to allow the operator to monitor desired parameters, and two potentiometers integrated into the

Berkeley MMHEV on the brake and acceleration pedals to drive the vehicle. The potentiometers

communicate with the master vehicle controller and represent the operator’s input for acceleration and

braking. The brake potentiometer is attached to the mechanical brake, allowing both mechanical and

regenerative braking to work together to slow the vehicle with only one input from the operator. These

potentiometers were attached to the original throttle and brake pedals of the Berkeley MMHEV. Figure

3-15 shows the integration of potentiometers into the original pedal system of the vehicle, while Figure

3-16 shows the integration of the touch screen into the dash board.

Figure 3-15: Potentiometer and Pedal Driver Interface Integration

Page 47: Development and Testing of a Flexible Topology Micro ...

28

Figure 3-16: Dash Mounted Touch Screen Driver Interface

Page 48: Development and Testing of a Flexible Topology Micro ...

Chapter 4

Operational Modes

The most unique feature of the Berkeley MMHEV is its ability to quickly change operation

modes while being used as either a passenger vehicle or a test bench for HIL experimentation. This

chapter illustrates the Berkeley’s many modes of operation. Solid Works, a three dimensional solid

modeling software package, was used to model the Berkeley chassis and components. Figure 4-1

illustrates a solid model of the Berkeley MMHEV powertrain, and will be used in this chapter to

demonstrate the energy flow in each mode. Figure 4-2 shows the powertrain integrated into the vehicle.

Figure 4-1: Powertrain Layout CAD Model

Primary Motor

Electronic Clutch

Secondary Motor

Engine

Transmission

Differential

Page 49: Development and Testing of a Flexible Topology Micro ...

30

Figure 4-2: Integrated Powertrain

4.1 Passenger Vehicle Modes

The following are operational modes of the Berkeley MMHEV when used as a passenger vehicle

powertrain. All the following images show mechanical, electrical, and chemical energy flow.

4.1.1 Electric Vehicle (EV) Mode

An Electric Vehicle (EV) is a vehicle in which the power is sourced solely by energy stored in an

electrochemical device (SAE, Feburary 2008). In electric only or electric vehicle mode, only electrical

energy from the battery is used to propel the vehicle through an electric traction motor. Electric mode in

the Berkeley MMHEV is achieved by using the battery to power only the primary electric motor for

Page 50: Development and Testing of a Flexible Topology Micro ...

31

traction. All other powertrain components are in an off state and at zero speed. Figure 4-3 illustrates the

primary traction motor and its belt speed reduction to the front axle and differential through an idler shaft.

The double reduction has an overall gear ratio of 1:5.64, calculated using Equation 4-1.

Figure 4-3: Primary Motor and Drive

𝑔𝑟 =𝑛𝑝𝑚

𝑛𝑡𝑖𝑛

×𝑛𝑡𝑜𝑢𝑡

𝑛𝑑𝑖𝑓𝑓

gr = gear ratio

npm=number of teeth, motor gear

ntin = number of teeth, transmission input

ntout = number of teeth, transmission output

ndiff = number of teeth, differential

Equation 4-1: Primary Motor Gear Ratio

Page 51: Development and Testing of a Flexible Topology Micro ...

32

A gear ratio of 1:5.64 translates to 5.64 rotations of the electric motor for every single rotation of

the front driving axle. Given the motor’s maximum recommended speed, the vehicle’s tire diameter and

gear ratio of 5.64:1, the maximum vehicle speed is approximately 65 mph. Figure 4-4 shows the flow of

energy while the vehicle is in an EV mode. The green arrow indicates mechanical energy flowing from

the motor to the wheels during driving and from the wheels to the primary motor during regenerative

braking. The orange arrow indicates the flow of electrical energy, flowing from the high voltage battery

through the motor controller to the motor while driving and flowing from the motor through the motor

controller and into the battery during regenerative braking. The red circles and lines indicate a component

in an off state. M

M

Figure 4-4: Energy Flow - Electric Vehicle Mode

Page 52: Development and Testing of a Flexible Topology Micro ...

33

4.1.2 Series Hybrid Electric Vehicle Mode

A series hybrid electric vehicle is driven by an electric machine while a chemical energy

converter creates electrical power with or without a battery for energy storage. Typically, the chemical

energy converter is an internal combustion engine that uses fossil fuel and is coupled to an electric

generator. The traction motor is often coupled with a high voltage battery to absorb transient loads. The

energy converter is not necessarily an internal combustion engine, but could also be a fuel cell or turbine,

amongst others. Simply, a series hybrid vehicle is one in which both sources of energy go through a

single propulsion device. In this example fuel energy converted to electrical energy and battery electrical

energy go through a single drive motor (SAE, Feburary 2008).

The Berkeley MMHEV operating as a series hybrid utilizes the primary electric motor and drive

from Figure 4-3 for traction, as in the EV mode. The secondary motor and engine produce electricity to

charge the battery and/or power the traction motor. First, gasoline energy flows to the engine in which it

is converted to mechanical energy. The secondary motor then absorbs that energy and converts it to

electrical energy. Then, the electrical energy produced by the secondary motor joins the high voltage

electrical bus which is connected to the high voltage battery. Finally, both electrical power sources supply

the primary electric drive to propel the vehicle.

In this case, the engine is decoupled from the road speed and is only used as part of the generator

system or Auxiliary Power Unit (APU). The Berkeley MMHEV is a range extending series hybrid,

because its APU cannot produce enough power to meet the average road load on the highway. Figure 4-5,

secondary motor and engine APU, shows the two components grouped together to make the vehicle’s

auxiliary power unit (APU).

Page 53: Development and Testing of a Flexible Topology Micro ...

34

Figure 4-5: Secondary Motor and Engine APU

Combining both the Primary Motor and Drive with the APU in the Berkeley chassis creates a

series hybrid mode in the Berkeley MMHEV powertrain. An electric clutch connects the two motor

shafts, and in this mode is in an off state allowing the two systems to operate with independent speeds.

Figure 4-6 below illustrates the flow of energy during series hybrid operation. Similar to the electric

vehicle mode, the first, right, green arrow indicated energy to and from the primary motor and road, while

the corresponding orange arrow represents the electrical energy to and from the primary motor and

battery. The second, left, green arrow indicates mechanical energy flow from the secondary electric

motor to the engine during an engine start, and engine to secondary motor during a generation state. The

second orange arrow indicates electrical energy flow from the battery through the motor controller to the

Page 54: Development and Testing of a Flexible Topology Micro ...

35

secondary motor during engine starting, and secondary motor through its motor controller to the battery

during a generation state. Finally, the blue arrow indicates fuel energy into the engine.

Figure 4-6: Energy Flow - Series Hybrid Mode

4.1.3 Parallel Hybrid Electric Vehicle Mode

A parallel hybrid vehicle differs from a series hybrid because the engine or chemical converting

device can mechanically propel the vehicle in combination with or parallel with, the electrical machine. A

parallel hybrid is a vehicle in which multiple propulsion systems are used for traction and all can be

operated independently or together, depending on the design and mode (SAE, Feburary 2008).

Different parallel hybrid technologies use different primary movers, either electric motors or

engines. In our case the chief traction device will be the primary electric motor, but could very easily be

M

M

Page 55: Development and Testing of a Flexible Topology Micro ...

36

the engine given a simple change in controller code. The electric motor was selected as primary mover in

this case because of its superior power and efficiency compared to the small engine. If the engine in this

system was considerably larger, it would then be the primary mover device. With this setup, one could

easily experiment with the choice of primary mover.

For the Berkeley MMHEV, the only mechanical difference between series and parallel operation

is the state of the electric clutch. With the clutch in an engaged state, both electic motors and the engine

are tied to the road. The clutch, in combination with the freewheeling capable induction drives, gives

options for using many arrangements of components to drive the vehicle and opens up opportunities for

control optimization. Figure 4-7 illustrates the energy flow of the Berkeley MMHEV’s parallel

configuration. The green arows indicate mechanical energy flow to and from the engine and secondary

motor, to and from the differential or road and primary motor, as well as between the two primary drive

and APU systems. This configuration allows the engine and secondary motor to apply mechaincal energy

to the road. Orange arrows indicate electrical energy to and from the electic motors and high voltage

battery via their respecive controllers. The blue arrow indicates the flow of gasoline fuel energy to the

internal combustion engine.

Page 56: Development and Testing of a Flexible Topology Micro ...

37

Figure 4-7: Energy Flow - Parallel Hybrid Mode

4.1.4 Series/Parallel Hybrid Electric Vehicle Mode

A series/parallel hybrid is one that can switch between series and parallel operation. This vehicle

configuration takes advantage of the benefits of all three modes depending on the current vehicle

situation. For example, an interesting experiment would be to investigate whether series operation during

city driving and parallel operation during highway driving is more efficient than series or parallel

operation alone.

The electronic clutch is simply engaged or disengaged to mechanically achieve series/parallel

mode. The control algorithm is much more complicated than simply controlling an electronic clutch, and

requires special consideration when making the switch. An unstable state could easily be entered if care is

not taken to understand the dynamics involved.

M

M

Page 57: Development and Testing of a Flexible Topology Micro ...

38

4.1.5 Conventional Vehicle Mode

In the conventional mode, both the primary and secondary motors are in an off or neutral state.

The regenerative braking feature is inactive, but at low speeds the primary motor may be required to

propel the vehicle up to speed allowing the engine and clutch to fully engage. Figure 4-8 illustrates the

flow of energy and status of the major components during conventional operation mode.

The green arrows indicate mechanical energy flowing from the engine through the motors and

clutch to the wheels. The motors are in a neutral state and are not supplying or sinking mechanical energy

to propel or brake the vehicle in the conventional mode, unless needed to start the engine or for initial

vehicle movement. The blue arrow indicates the flow of gasoline fuel to the engine.

Figure 4-8: Energy Flow - Conventional Mode

M

M

Page 58: Development and Testing of a Flexible Topology Micro ...

39

4.2 Hardware-In-The-Loop Modes

4.2.1 Battery HIL Mode

The Berkeley MMHEV hardware configuration for battery HIL testing requires only three

components: the vehicle high voltage battery, vehicle controller, and the AeroVironment ABC 150 power

processing machine. The ABC 150 is capable of charging or discharging a battery at 150 kW and has an

updating frequency of approximately 10 Hz, which is fast enough to capture all of the important dynamics

of the battery in hybrid electric or electric vehicles. The vehicle controller acts as data recorder and signal

generator to the ABC 150.

The vehicle controller is also required to run the PSAT simulations to generate the current signal

for simulation, co-simulation, and HIL experiments. The controller sends a current signal to the ABC 150,

which in turn exercises the battery with the commanded current. Software and test setup will be discussed

in more detail in the Battery HIL chapter.

Figure 4-9 shows the configuration of the hardware required for the battery HIL test. The orange

arrow indicates the electrical energy to and from the battery being tested and the ABC 150 power

processor. The black lines indicate data being recorded from the battery and the PSAT generated current

signal sent to the ABC 150 power processor.

Page 59: Development and Testing of a Flexible Topology Micro ...

40

Figure 4-9: Battery Hardware-in-the-Loop Configuration

4.2.2 Engine HIL Mode

The Berkeley MMHEV hardware configuration for engine HIL requires the APU system, shown

in Figure 4-5, the vehicle’s high voltage battery, and the vehicle’s controller. Again, the PSAT simulation

will run on the vehicle controller. In this case the engine will be run as required by the PSAT simulation

outputs and the attached secondary motor will also be controlled by the vehicle controller to sink the

appropriate amount of power from the engine. Software and test setup will be discussed in more detail in

the Engine HIL chapter.

Vehicle Controller (computer)

High Voltage Battery Pack ABC 150 - Power Processor

Page 60: Development and Testing of a Flexible Topology Micro ...

41

All of the hardware required for engine testing is in the vehicle allowing for the test to be easily

mobile. This supports the idea that the Berkeley MMHEV is a powerful, flexible, and mobile instructional

tool.

4.2.3 Motor HIL Mode

The Berkeley MMHEV hardware configuration for motor HIL requires the primary motor,

secondary motor, electronic clutch, battery, and the vehicle’s controller. Again the PSAT simulation will

run on the vehicle controller. In this case the secondary motor is run as required by the PSAT demand for

the traction motor, and the larger primary motor is run as a dynamometer to simulate road speed. This

arrangement allows for the secondary motor to be fully exercised up to its peak torque and speed. The

software and test setup will be discussed in more detail in the Motor HIL chapter.

Figure 4-10 shows the basic configuration of the motor HIL setup. The orange arrows indicate

electrical energy into and out of each motor through their controllers to the battery pack. Separate battery

packs may be used for this test to isolate the dynamics of each motor, but one pack is satisfactory for

demonstration and testing. Also, both the primary and secondary belts must be disconnected to isolate the

motors from the rest of the drive train. The green arrow indicates the mechanical energy to and from each

electrical motor through the electronic clutch.

Page 61: Development and Testing of a Flexible Topology Micro ...

42

Figure 4-10: Motor Hardware-in-the-Loop Configuration

This test can be performed with only the Berkeley MMHEV and an additional battery pack, if

desired. This also supports the idea that the Berkeley MMHEV is a powerful, flexible, and mobile

instructional tool.

4.2.4 Auxiliary Power Unit HIL Mode

The Berkeley MMHEV hardware configuration for APU HIL simulation requires the vehicle’s

APU and the ABC 150 power processor. This test uses the APU setup to generate electricity which is then

absorbed by the ABC 150 power processor.

Page 62: Development and Testing of a Flexible Topology Micro ...

Chapter 5

Battery HIL

This chapter explains high voltage battery pack HIL procedures and required pre-testing.

First, this chapter introduces the PSAT battery model. Then the battery characterization is

completed. Next, the PSAT mathematical model is created to simulate the battery. Then, a full vehicle

model is created using PSAT. The PSAT toolkit groups the battery and other hybrid electric vehicle

component models together to form a complete vehicle model. Several changes are made to allow for HIL

simulations using the complete vehicle model. Then, the required hardware is arranged in accordance

with the vehicle HIL model. Next, a test procedure is defined and performed. Finally, results are

analyzed.

Three different high voltage battery packs were used in the development of the vehicle and test

bench procedures: a Saft NiMH pack, a Lithium Technology Li-Ion pack, and a Motorcraft NiMH pack.

For each of the packs the cells and modules were on the shelf for a long period of time before HIL testing.

Self-discharging and aging affect battery packs, requiring proper re-habilitation before the pack

should be modeled or used in a HIL simulation. Similarly, the Lithium Technology cells required proper

characterization, because they lack full definition in the form of parameters and maps from the

manufacturer. The Motorcraft NiMH battery pack was selected for the following tests, because of its

stable performance and availability.

The only non-virtual component used in battery HIL testing is the high voltage battery pack. All

other components are simulated using PSAT models and existing data. Simulating other components in

real-time allows the battery to be exercised as if it was within the vehicle without the time and cost of

building a full prototype. This demonstrates how HIL testing can provide more realistic results than

simulation alone in less time than full prototype tests, shortening development time and reducing cost.

Page 63: Development and Testing of a Flexible Topology Micro ...

44

5.1 PSAT Battery Model

Several battery models exist for use in programs such as PSAT and Matlab, including generic

map and equation fit models. For this thesis the generic map model was selected because of its ability to

adapt to many battery chemistries as opposed to an equation fit model that is designed specifically for a

given chemistry. Figure 5-1 shows the generic map battery model input and output. The model outputs

battery voltage, temperature, and state of charge requiring only battery current as an input. Since the

PSAT vehicle model is forward looking, the battery current input to the battery model originates from the

road load and driver demand. This value then goes through all the component models and their

efficiencies such as the wheel, final drive and motor models. In the last stage the electric motor model

outputs the required battery current which is then fed to the input of the battery model. All other

component models use the current or previous samples of the battery model output to complete the loop.

Greater detail of the full system model can be found in Appendix A, Simulink Models, and in the

associated digital files.

The PSAT generic map battery model requires several battery parameters. Table 5-1 lists the key

parameters and the method for obtaining them.

Battery Current

Required for

Motor Operation

Voltage

State of Charge

Figure 5-1: PSAT Battery Generic Map Model

Temperature

Page 64: Development and Testing of a Flexible Topology Micro ...

45

Parameter SI Unit Procedure to Gather Data

Initial State of Charge Dimensionless User or test defined

Number of Cells Number Predefined

Cell Mass Kilogram Manufacturer Defined

Nominal Voltage Volt Manufacturer Defined

Minimum Voltage Volt Manufacturer Defined

Maximum Voltage Volt Manufacturer Defined

Minimum State of Charge Dimensionless User or test defined

Maximum State of Charge Dimensionless User or test defined

State of Charge Index Dimensionless User or test defined

Temperature Index ºCelsius User or test defined

Maximum Capacity Ampere-hour Cycle Testing

Columbic Efficiency Dimensionless Cycle Testing

Map of a Cells Resistance to Discharge Ohm HTTC Testing

Map of a Cells Resistance to Charge Ohm HTTC Testing

Map of a Cells Open Circuit Voltage Volt Cycle / HTTC Testing

Maximum Charging Current Ampere Manufacture Defined

Maximum Discharging Current Ampere Manufacture Defined

Table 5-1: PSAT Generic Map Battery Model Parameters

Using the above parameters, the following equations represent how the PSAT generic

map battery model determines battery voltage, temperature, and state of charge. Battery voltage and

internal resistance are functions of battery temperature and state of charge. Look up tables of test data are

used to define these functions. Assuming all batteries are in series,

Equation 5-1 represents the battery open circuit voltage and internal resistance. Because all cells

are connected in series, it is assumed that all cell temperatures and states of charge are the same

throughout the pack. PSAT assumes a positive current to be energy into the battery pack. In the following

set of equations, Rint is taken from the charging map when current is greater than zero, and from the

discharging map when current is less than zero.

Page 65: Development and Testing of a Flexible Topology Micro ...

46

𝑉𝑜𝑐 = 𝑉𝑜𝑐 𝑝𝑒𝑟 𝑐𝑒𝑙𝑙 × 𝐾𝑛𝑢𝑚 𝑐𝑒𝑙𝑙

𝑉𝑜𝑐 𝑝𝑒𝑟 𝑐𝑒𝑙𝑙 = 𝑓 𝑇𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒, 𝑆𝑂𝐶

𝑅𝑖𝑛𝑡 = 𝑅𝑖𝑛𝑡 𝑝𝑒𝑟 𝑐𝑒𝑙𝑙 × 𝐾𝑛𝑢𝑚 𝑐𝑒𝑙𝑙

𝑅𝑖𝑛𝑡 𝑝𝑒𝑟 𝑐𝑒𝑙𝑙 = 𝑓 𝑇𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒, 𝑆𝑂𝐶

𝑉𝑜𝑐 𝑎𝑛𝑑 𝑉𝑜𝑐 𝑝𝑒𝑟 𝑐𝑒𝑙𝑙 = 𝑜𝑝𝑒𝑛 𝑐𝑖𝑟𝑐𝑢𝑖𝑡 𝑣𝑜𝑙𝑡𝑎𝑔𝑒 𝑜𝑓 𝑡𝑕𝑒 𝑏𝑎𝑡𝑡𝑒𝑟𝑦 𝑎𝑛𝑑 𝑎 𝑠𝑖𝑛𝑔𝑙𝑒 𝑐𝑒𝑙𝑙, 𝑟𝑒𝑠𝑝𝑒𝑐𝑡𝑖𝑣𝑙𝑦

𝑅𝑖𝑛𝑡 𝑎𝑛𝑑 𝑅𝑖𝑛𝑡 𝑝𝑒𝑟 𝑐𝑒𝑙𝑙 = 𝐼𝑛𝑡𝑒𝑟𝑛𝑎𝑙 𝑟𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑜𝑓 𝑡𝑕𝑒 𝑝𝑎𝑐𝑘 𝑎𝑛𝑑 𝑎 𝑠𝑖𝑛𝑔𝑙𝑒 𝑐𝑒𝑙𝑙, 𝑟𝑒𝑠𝑝𝑒𝑐𝑡𝑖𝑣𝑖𝑙𝑦

𝐾𝑛𝑢𝑚 𝑐𝑒𝑙𝑙 = 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑒𝑙𝑙𝑠 𝑖𝑛 𝑡𝑕𝑒 𝑏𝑎𝑡𝑡𝑒𝑟𝑦 𝑝𝑎𝑐𝑘 𝑎𝑙𝑙 𝑐𝑜𝑛𝑛𝑒𝑐𝑡𝑒𝑑 𝑖𝑛 𝑠𝑒𝑟𝑖𝑒𝑠

𝑇𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒 = 𝑇𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒 𝑜𝑓 𝑡𝑕𝑒 𝑏𝑎𝑡𝑡𝑒𝑟𝑦 𝑝𝑎𝑐𝑘

𝑆𝑂𝐶 = 𝐵𝑎𝑡𝑡𝑒𝑟𝑦 𝑝𝑎𝑐𝑘 𝑠𝑡𝑎𝑡𝑒 𝑜𝑓 𝑐𝑕𝑎𝑟𝑔𝑒 (0 𝑡𝑜 1)

Equation 5-1: PSAT Open-Circuit Voltage and Internal Resistance

When a battery is discharging or current input is negative, the model assumes that the current

input into the model is achieved. When the input current is positive, the charging current is multiplied by

the mapped Coulombic efficiency. Equation 5-2 represents the terminal voltage of the battery pack,

which is the open-circuit voltage minus the drop due to the internal resistance of the battery and current

due to Ohms law.

𝑉𝑜𝑢𝑡 = 𝑉𝑜𝑐 − 𝑅𝑖𝑛𝑡 × 𝐼𝑒𝑠𝑠

𝐼𝑒𝑠𝑠=𝑖𝑛𝑡𝑒𝑟𝑛𝑎𝑙 𝑏𝑎𝑡𝑡𝑒𝑟𝑦 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 (𝑎𝑐𝑐𝑜𝑢𝑡𝑠 𝑓𝑜𝑟 𝑐𝑜𝑢𝑙𝑜𝑚𝑏𝑖𝑐 𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦 𝑑𝑢𝑟𝑖𝑛𝑔 𝑐𝑕𝑎𝑟𝑔𝑖𝑛𝑔 )

Equation 5-2: Battery Terminal Voltage

Page 66: Development and Testing of a Flexible Topology Micro ...

47

The temperature calculation utilizes a simple single-node lumped-parameter thermal

model to predict internal battery and exiting air temperature. All cells are assumed to receive the same air

flow and maintain the same temperature. This is not a reliable model, and is not sufficiently accurate for

individual cell temperature management. For the case of the Lithium Ion pack, individual temperature

sensors are distributed across the pack. The recorded sensor data are not expected to match well with the

PSAT thermal model. Equation 5-3 calculates Qgen, the power lost by the battery in heat with the above

assumptions.

𝑄𝑔𝑒𝑛 = (𝑅𝑖𝑛𝑡 × 𝐼𝑖𝑛2) − (𝑉𝑖𝑛 × 𝐼𝑖𝑛 × 1 − 𝜂𝑐𝑜𝑢𝑙𝑜𝑚𝑏𝑖𝑐 )

𝜂𝑐𝑜𝑢𝑙𝑜𝑚𝑏𝑖𝑐 = 𝐶𝑜𝑢𝑙𝑜𝑚𝑏𝑖𝑐 𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦 𝑜𝑓 𝑡𝑕𝑒 𝑏𝑎𝑡𝑡𝑒𝑟𝑦

𝑅𝑖𝑛𝑡 = 𝐼𝑛𝑡𝑒𝑟𝑛𝑎𝑙 𝑟𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑜𝑓 𝑡𝑕𝑒 𝑏𝑎𝑡𝑡𝑒𝑟𝑦 𝑝𝑎𝑐𝑘

𝑉𝑖𝑛 = 𝐵𝑎𝑡𝑡𝑒𝑟𝑦 𝑝𝑎𝑐𝑘 𝑣𝑜𝑙𝑡𝑎𝑔𝑒

𝐼𝑖𝑛 = 𝐵𝑎𝑡𝑡𝑒𝑟𝑦 𝑝𝑎𝑐𝑘 𝑐𝑢𝑟𝑟𝑒𝑛𝑡

Equation 5-3: Battery Power Lost to Heat

Equation 5-4 completes the calculation used to predict battery temperature, Tess, using the above

equation for wasted heat.

𝑇𝑒𝑠𝑠 =𝑄𝑔𝑒𝑛 + 𝑄𝑐𝑎𝑠𝑒

𝑀𝑎𝑠𝑠𝑒𝑠𝑠 × 𝐶𝑝 𝑒𝑠𝑠

𝑄𝑐𝑎𝑠𝑒 =(𝑇𝑒𝑠𝑠 + 𝑇𝑎𝑖𝑟 )

𝑅𝑡𝑕𝑒𝑟𝑚𝑎𝑙

𝑇𝑎𝑖𝑟 = 𝑇𝑎𝑚𝑏𝑖𝑒𝑛𝑡 −0.5 + 𝑄𝑐𝑎𝑠𝑒

𝑑𝑚𝑎𝑖𝑟𝑑𝑡

× 𝐶𝑝 𝑎𝑖𝑟

𝑀𝑎𝑠𝑠𝑒𝑠𝑠 = 𝑀𝑎𝑠𝑠 𝑜𝑓 𝑡𝑕𝑒 𝑏𝑎𝑡𝑡𝑒𝑟𝑦

Page 67: Development and Testing of a Flexible Topology Micro ...

48

𝐶𝑝 𝑒𝑠𝑠 = 𝑇𝑕𝑒𝑟𝑚𝑎𝑙 𝑕𝑒𝑎𝑡 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝑜𝑓 𝑡𝑕𝑒 𝑏𝑎𝑡𝑡𝑒𝑟𝑦

𝑇𝑎𝑚𝑏𝑖𝑒𝑛𝑡 = 𝐴𝑚𝑏𝑖𝑒𝑛𝑡 𝑡𝑒𝑚𝑝𝑒𝑎𝑡𝑢𝑟𝑡𝑒 𝑜𝑓 𝑡𝑕𝑒 𝑒𝑛𝑣𝑖𝑟𝑜𝑛𝑚𝑒𝑛𝑡

𝑑𝑚𝑎𝑖𝑟

𝑑𝑡= 𝑀𝑎𝑠𝑠 𝑓𝑙𝑜𝑤 𝑟𝑎𝑡𝑒 𝑜𝑓 𝑡𝑕𝑒 𝑐𝑜𝑜𝑙𝑖𝑛𝑔 𝑎𝑖𝑟

𝐶𝑝 𝑎𝑖𝑟 = 𝐻𝑒𝑎𝑡 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝑜𝑓 𝑡𝑕𝑒 𝑐𝑜𝑜𝑙𝑖𝑛𝑔 𝑎𝑖𝑟

Equation 5-4: Battery Temperature Calculation

Equation 5-5 calculates the batteries’ state of charge (SOC) by counting Coulombs. Capacity

used, Capacityused , is calculated based on the maximum capacity (Capacitymaximum ) and initial state of

charge (SOCinitial ). Then absolute and usable state of charge are determined.

𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦𝑢𝑠𝑒𝑑 = 𝐼𝑖𝑛 𝑑𝑡 + 1 − 𝑆𝑂𝐶𝑖𝑛𝑖𝑡𝑖𝑎𝑙 × 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦𝑚𝑎𝑥𝑖𝑚𝑢𝑚

𝑆𝑂𝐶𝑎𝑏𝑠 =𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦𝑚𝑎𝑥 − 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦𝑢𝑠𝑒𝑑

𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦𝑚𝑎𝑥

𝑆𝑂𝐶𝑢𝑠𝑎𝑏𝑙𝑒 =𝑆𝑂𝐶𝑎𝑏𝑠 − 𝑆𝑂𝐶𝑚𝑖𝑛

𝑆𝑂𝐶𝑚𝑎𝑥 − 𝑆𝑂𝐶𝑚𝑖𝑛

Equation 5-5: Battery State of Charge Calculation

Given the above equations, the model is complete, but requires calibration to a particular battery.

Characterization is needed to define battery SOC vs. Open-Circuit Voltage, as well as maps of internal

battery charge and discharge resistances.

Page 68: Development and Testing of a Flexible Topology Micro ...

49

5.2 Characterization

The following section explains the process of battery characterization for a PSAT generic map

model using the Motorcraft NiMH battery pack. The characterization data required are open-circuit

voltage and internal battery resistances to charging and discharging, all relative to battery state of charge.

The FreedomCAR Hybrid Pulse Power Characterization (HPPC) test was used to calculate pulse

power and energy capability under FreedomCAR operating conditions (FreedomCAR, 2003).

The HTTC test seen in Figure 5-3 and Figure 5-4 starts by fully charging and discharging the

battery pack using the ABC 150 power processor. To revive the Motorcraft NiMH cells, this first step of

cycling was repeated several times. Each cycle brought the cells into a tighter average voltage. After a

few cycles, the battery’s capacity increased to approximately 63 Ahr.

Figure 5-2 shows an example of a C/4.5 or 20 ampere discharge. Note that the manufacturer rated

capacity when new was 90 Ahr. After multiple cycles, the pack proved to have a capacity of only 63 Ahr,

making the actual discharge rate C/3.15 or C/(63Ahr/20Ahr).

Page 69: Development and Testing of a Flexible Topology Micro ...

50

Figure 5-2: Motorcraft C/3.13 Discharge

This test is useful for estimating parameters for capacity and efficiency. For this battery, precise

capacity and turn around efficiencies can be calculated because the energies in and out were carefully

recorded. Equation 5-6 shows the method for calculating the battery’s measureable capacity during the

above test.

𝐵𝑎𝑡𝑡𝑒𝑟𝑦 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝐴𝑕𝑟 = 𝐶𝑢𝑟𝑟𝑒𝑛𝑡[𝐴𝑚𝑝𝑕𝑒𝑟𝑒] × 𝑇𝑖𝑚𝑒 [𝐻𝑜𝑢𝑟𝑠]

Equation 5-6: Battery Capacity Calculation

The total energy used to charge, and the total energy drained to discharge, are used to calculate

Coulombic turnaround efficiency according to Equation 5-7.

Page 70: Development and Testing of a Flexible Topology Micro ...

51

𝜂𝐶𝑜𝑢𝑙𝑜𝑚𝑏𝑖𝑐 = 𝐼𝑜𝑢𝑡 𝑑𝑡

𝐼𝑖𝑛 𝑑𝑡

Equation 5-7: Battery Coulombic Efficiency Calculation

With cycling complete, the batteries’ resistance to charging and discharging at a given state of

charge is required. Figure 5-3 and Figure 5-4 below illustrate the HPPC cycle test procedure. The first

step in the HTTC test is a full charge and discharge cycle, followed by rest for an hour. After an hour rest,

the battery is to be discharged 10% at a C/1 rate followed by rest for another hour. For the Motorcraft

pack, a C/1 rate and 10% SOC correspond a to a 60 Ampere discharge for 6 minutes. After another hour

of rest, the battery is subjected to a high rate pulse discharge, a short rest, then a high rate pulse charge, at

the given SOC. This generates the data required to obtain the batteries’ peak power and internal resistance

while charging and discharging at the given SOC.

Figure 5-3: Hybrid Pulse Power Characterization Test (Start of Sequence)

Page 71: Development and Testing of a Flexible Topology Micro ...

52

Figure 5-4: Hybrid Pulse Power Characterization Test (Complete HPPC Sequence)

Figure 5-5 shows the results of the HTTC pulse charge and discharge test at 80% SOC. The

discharge pulse is shown by the decrease in voltage and is achieved by a 100 Ampere discharge for 10

seconds. The charge pulse is shown by an increase in pack voltage and is achieved by a 75 ampere charge

for 10 seconds.

Page 72: Development and Testing of a Flexible Topology Micro ...

53

Figure 5-5: Motorcraft 80% SOC HTTC Test

To calculate the battery’s internal resistance, Rint, Equation 5-8 below from the FreedomCAR

Electric Vehicle Battery Test Procedures Manual was used. The changes in voltage and current were

taken between points 1 and 2 in Figure 5-5 for discharging resistance, and points 3 and 4 for charging

resistance.

𝑅𝑖𝑛𝑡 −𝑑𝑖𝑠𝑐 𝑕𝑎𝑟𝑔𝑒 = Δ 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 (1 𝑡𝑜 2)

Δ Current (1 𝑡𝑜 2)

𝑅𝑖𝑛𝑡 −𝑐𝑕𝑎𝑟𝑔𝑒 = Δ 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 (3 𝑡𝑜 4)

Δ Current (3 𝑡𝑜 4)

Equation 5-8: Battery Internal Resistance Calculation

Using Equation 5-8, Figure 5-6 represents the results of the HTTC test, a map of the battery’s

internal resistance to charging, while Figure 5-7 represents the battery’s internal resistance to discharging.

49

50

51

52

53

54

55

56

0 20 40 60 80 100

Bat

tery

Vo

ltag

e [

Vo

lts]

Time [seconds]

80 % SOC HTTP Test

1

2

3

4

Page 73: Development and Testing of a Flexible Topology Micro ...

54

The data are presented to represent an individual cell. The pack is made of 40 cells in series; measured

resistance was then divided by 40 to attain the plots below.

Figure 5-6: Motorcraft NiMH Battery Internal Resistance to Charging

Page 74: Development and Testing of a Flexible Topology Micro ...

55

Figure 5-7: Motorcraft NiMH Battery Internal Resistance to Discharging

Using the battery’s internal resistance to charging and discharging as well as the maximum

manufacturer rated current during charging and discharging, Equation 5-9 calculates the battery’s

maximum power. Figure 5-8 shows the maximum power during charging and discharging indexed by

battery state of charge.

𝑃𝑚𝑎𝑥 −𝑑𝑖𝑠𝑐𝑕𝑎𝑟𝑔𝑒 =𝑉2𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛(𝑆𝑂𝐶)

𝑅𝑖𝑛𝑡 −𝑑𝑖𝑠𝑐 𝑕𝑎𝑟𝑔𝑒

𝑃𝑚𝑎𝑥 −𝑐𝑕𝑎𝑟𝑔𝑒 =𝑉2𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛(𝑆𝑂𝐶)

𝑅𝑖𝑛𝑡 −𝑐𝑕𝑎𝑟𝑔𝑒

Equation 5-9: Battery Power Calculation

Page 75: Development and Testing of a Flexible Topology Micro ...

56

Figure 5-8: Motorcraft Battery Maximum Charge and Discharge Power

Battery voltage was recorded during the last minutes of the HTTC testing one hour rests. This

value and the corresponding SOC were then used to generate the open-circuit voltage vs. SOC map. Table

5-2 and Figure 5-9 below show the results of the voltage recording during the HTTC test as the SOC vs.

Open-Circuit Voltage Map.

Page 76: Development and Testing of a Flexible Topology Micro ...

57

% SOC Voltage

100 56

90 52.53

80 51.4

70 50.9

60 50.5

50 49.92

40 49.42

30 49.08

20 48.7

10 47.98

0 40.94

Table 5-2: Motorcraft Open-Circuit Voltage

Figure 5-9: Motorcraft Open-Circuit Voltage Map

Page 77: Development and Testing of a Flexible Topology Micro ...

58

This completes characterization of all battery pack data required to populate the generic map

model in PSAT.

5.2 Model Setup

This section details the steps to set up a full vehicle PSAT model for HIL testing of the Berkeley

MMHEV. Step one is to complete a PSAT model of the Berkeley MMHEV and run the model on a drive

cycle. Figure 5-10 shows a full PSAT model of the Berkeley MMHEV in an EV mode. Results are saved

for comparison with co-simulation and HIL results. The model is exercised and data recorded at a rate of

100 Hz.

Page 78: Development and Testing of a Flexible Topology Micro ...

59

Figure 5-10: Complete PSAT Model of the Berkeley MMHEV in Electric Vehicle Mode

Page 79: Development and Testing of a Flexible Topology Micro ...

60

Figure 5-11 shows the flow of data in a battery co-simulation or HIL simulation test. The battery

model was removed and replaced by a real battery and the ABC150 power processing machine. This

setup allows for the real battery to be exercised by the input model data, and output data are sent back into

the model in real time.

Figure 5-11: Battery Co-Simulation and HIL Diagram

Page 80: Development and Testing of a Flexible Topology Micro ...

61

Figure 5-12: PSAT Battery Model HIL Changes

Figure 5-12 shows the changes made to the PSAT generic map battery model to allow for HIL

testing. The two circles highlight the areas of change. The left circle shows the manual switch for battery

current input. This switch allows the user to switch the model input from simulated battery to actual

battery current measured from the battery being exercised. The current signal fed to the power processor

will always be the current required to meet the vehicle’s demand, which is calculated by the PSAT

vehicle model. The ability to use actual current as an input to the battery model ensures there will be no

error between commanded current to the power processing machine and what current is actually achieved.

Having a manual switch instead of fixed wiring also allows for easy test setup changes for future runs.

The second change to the model is highlighted by the circle on the right. This switch changes

voltage output. The voltage signal output to the rest of the vehicle model is either that predicted by the

PSAT generic map model, or the actual battery voltage of the battery being exercised. This switch allows

for two modes. The first mode is simulation and co-simulation in which the actual and model battery

voltages are recorded, but only the model’s predicted voltage is outputted to the rest of the model. The

Page 81: Development and Testing of a Flexible Topology Micro ...

62

second mode is an HIL simulation mode. This mode records model forecasted voltage, but forwards the

actual measured battery voltage to the rest of the vehicle model.

To achieve the I/O required, drivers for the Advantech PCI-1716 analog and digital I/O card were

included in the new vehicle model as xPC blocks. These drivers and the sub-systems that are used for

battery voltage and current measurement as well, as the current command, can be seen in Figure 5-13 and

Figure 5-14 below. Analog inputs of the Advantech PCI-1716 were used for this measurement of voltage

and current.

Figure 5-13: Measured Battery Voltage and Current Inputs

Figure 5-14: Commanded Current Signal to the ABC 150

Page 82: Development and Testing of a Flexible Topology Micro ...

63

Hardware gains were used along with Equation 5-10 to scale the measured voltage signals to

actual battery voltage and current. Likewise, Equation 5-11 scales the current command signal. The

ABC150 required Equation 5-11to offset, scale, and command the desired current. Equation 5-10 shows

the formula that converts the measured voltage from the output of the isolated voltage divider measuring

the exercised battery voltage.

Battery Voltage = Hardware Gain × Measured Voltage

Equation 5-10: Measured Battery Voltage Scaling

Battery Current = Hardware Gain × Measured Voltage

Equation 5-11: Measured Battery Current Scaling

For safety reasons, the ABC150 power processor has a 0.5 Volt offset from 0 Volts for current

commands; the resulting operation range is -0.5 to 4.5 and -0.5 to -4.5. Also, the PSAT model and ABC

150 power processing machine have opposite sign conventions. This sub-system also limits the range of

the command signal; so that the battery is only operated within the manufacturer defined safe operational

range. Equation 5-12 represents the conversion from desired current to ABC 150 current command. All

hardware gains are detailed in the next section, 5.3 Hardware Setup.

𝐴𝐵𝐶 150 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑆𝑖𝑔𝑛𝑎𝑙 = −(𝑃𝑆𝐴𝑇 𝐶𝑜𝑚𝑚𝑎𝑛𝑑𝑒𝑑 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 × 𝐻𝑎𝑟𝑑𝑤𝑎𝑟𝑒 𝐺𝑎𝑖𝑛) + 0.5

Equation 5-12: ABC 150 Current Command Scaling

Page 83: Development and Testing of a Flexible Topology Micro ...

64

5.3 Hardware Setup

The section details the hardware and its setup required for high voltage battery HIL

experimentation. Primary components are the ABC 150 power processing machine, vehicle controller

computer, and a high voltage battery pack to be tested. Several electronics components are also required

to complete the setup. First, a relay box is required to turn on and off signals and hardware automatically

and rapidly in case of an emergency shutdown. Second, an isolation board is required to isolate high

voltage signals from the computer. Finally, current and voltage sensors are used to read real time battery

parameters. Figure 5-15 shows the arrangement of these hardware components for battery HIL

experimentation with the battery test laboratory at The Larson Transportation Institute.

Figure 5-15: Battery HIL Hardware Layout

Page 84: Development and Testing of a Flexible Topology Micro ...

65

To the left of the ABC 150 power processing machine are four, 12 volt, Motorcraft, NiMH

battery modules, an Advantech computer with the relay box, PCI 1716 breakout board, current and

voltage sensors and isolation boards. On top of the ABC 150 is a power supply powering the isolation

board and relay box. The desk in front of the ABC 150 holds a monitor displaying the current trace of the

battery as recorded by the ABC 150 and a laptop computer. The laptop computer is running a Matlab

Simulink Gauges program which displays real time the important vehicle related values such as speed,

battery voltage, current, and state of charge as well as the brake and throttle signals. For simulation these

signals are determined by the PSAT vehicle simulation running real time on the Advantech computer, but

during HIL simulation the battery signals are from the tested pack. The Matlab Gauges dash board like

display helps students connect with the experiment because it shows the results of the current that is being

pushed and pulled from the battery in terms of familiar variables.

Two important sensors were required to safely measure voltage and current data by the

Advantech computer running PSAT vehicle simulations. An isolated voltage divider is required because

the computer’s channels are limited to +/- 10 Volts, and to isolate high voltage signals from the computer.

A voltage divider is required to drop the 48 Volt pack voltage to within a measureable range. Figure 5-16

below details a voltage divider.

Figure 5-16: Voltage Divider

Page 85: Development and Testing of a Flexible Topology Micro ...

66

R1 and R2 have been selected to be 12 and 1 kilo-ohms, respectively. R1 and R2 give a hardware

gain of 13 using Equation 5-13 below for voltage dividers.

𝑉𝑖𝑛 = 𝑉𝑜𝑢𝑡 𝑅2 + 𝑅1

𝑅2

Equation 5-13: Voltage Divider Gain Calculation

The voltage signal is then fed through a unity gain isolation amplifier before being measured by

the Advantech computer and input to the PSAT vehicle model. The current sensor has an output of +/- 4

volts and an input of +/- 300 Amperes, with a linear relationship between the input and output, giving the

hardware gain a value of -75 or (-300/4). A negative value is used because the sensor and PSAT have

opposite sign conventions for current flow.

5.4 Test Setup

The battery simulation, co-simulation, and HIL simulations all have the same test setup. Each test

was run with the same Simulink model generated by PSAT, and switches used as mentioned previously to

allow for co-simulation and HIL simulation.

The Berkeley MMHEV model in EV mode was used. The model runs the Urban Dynamometer

Drive Schedule (UDDS) with an 80% initial state of charge, and using the Motorcraft battery pack and

model.

For the simulation the vehicle model used battery model inputs and outputs. The co-simulation is

similar to the simulation run with the battery model outputs used by the rest of the vehicle model, except

the current input to the battery model. The current signal is taken from the actual battery being exercised.

This ensures there will be no error between the input to the battery model and actual battery current. This

Page 86: Development and Testing of a Flexible Topology Micro ...

67

method makes the corresponding voltage, temperature, and state of charge values comparable because

both systems have the exact same input. The last step is the HIL test, which completely removes the

battery models from the vehicle simulation model. The battery voltage measured is fed directly to the

output of the battery model using the switch discussed above. Again, the actual battery current is fed into

the battery model to allow for the use of its state of charge calculation and temperature predictions. Initial

capacities are always set to 80% in the model and the real battery. Current is the only variable in the state

of charge calculation, allowing the battery model calculation of SOC and temperature be used without

introducing error.

5.5 Results of Battery Simulation, Co-Simulation, and HIL Tests

This section compares the results of the three battery tests, simulation, co-simulation, and HIL.

These results highlight the battery parameters predicted from the model and recorded from the actual

exercised battery. Figure 5-17 plots a comparison of battery voltage for all three tests and over the full test

time, while Figure 5-18 isolates the voltage data to the snapshot high vehicle speed section of the test

cycle. Table 5-3 below shows the average and maximum error for the outputs of the model relative to the

simulation output data. Note that the error is relatively low. This confirms the function of the PSAT

generic map battery model and HIL testing to be accurate, while demonstrating the ability of the test

bench to perform HIL testing.

Voltage SOC Speed

Co-Simulation Average 0.71% 5.36% 0%

Co-Simulation Maximum 7.32% 12.20% 0%

HIL Average 1.12% 5.05% 0%

HIL Maximum 9.37% 11.54% 0%

Table 5-3: Battery Testing Error Data

Page 87: Development and Testing of a Flexible Topology Micro ...

68

Figure 5-17: Battery Testing Voltage Results

Page 88: Development and Testing of a Flexible Topology Micro ...

69

Figure 5-18: Battery Testing Voltage Results (snapshot)

The test results above show that the battery voltage is slightly higher at some points than the

simulated voltage during the co-simulation test while the battery voltage is slightly lower than the

simulated voltage at some points during the HIL test. Also, the HIL test data for voltage have slightly

more noise than the co-simulation voltage data. This may be a result of voltage divider calibration,

temperature change or a movement in wire location that is closer to the high current noise source.

Regardless, average percentage errors of 0.71% and 1.12% for co-simulation and HIL tests represent

results from a very repeatable and validated model.

Figure 5-19 compares battery current for all three tests over the full test time, while Figure 5-20

isolates current data to a snap shot during a high speed section of the test cycle.

Page 89: Development and Testing of a Flexible Topology Micro ...

70

Figure 5-19: Battery Testing Current Results

Figure 5-20: Battery Testing Current Results (snapshot)

Page 90: Development and Testing of a Flexible Topology Micro ...

71

A slight offset is seen in the current plots above for both the co-simulation and HIL current

signals. This may be caused again by an improperly calibrated component used in the testing, most likely

the ABC 150 power processor. As a result, the PSAT generic map battery model was modified to use the

actual battery current for model input of both co-simulation and HIL tests instead of PSAT model

predicted current, which may be slightly different. This eliminates any 5% current offset error that would

have been seen in the predicted and measured state of charge, voltage and temperature outputs. Note in

Table 5-3 that there is no difference in the speed trace. Changing the input current allows the vehicle

enough power to reach and maintain the trace speed.

Also seen in the current plots above is a limit on current in the co-simulation and HIL tests. This

is because of the ABC150’s single channel current limit of approximately 264 Amperes. This limitation is

also accounted for by using actual battery current as the model’s input.

In summary, using the actual battery current for model input may result in the battery pulling high

current for slightly longer than the full simulation predicts, but it eliminates a large source of simulation

setup error. Figure 5-21 shows a comparison of battery state of charge for all three tests and over the full

test time, while Figure 5-22 isolates the state of charge data to the snapshot high vehicle speed section of

the test cycle.

Page 91: Development and Testing of a Flexible Topology Micro ...

72

Figure 5-21: Battery Testing State of Charge Results

Figure 5-22: Battery Testing State of Charge Results (snapshot)

Page 92: Development and Testing of a Flexible Topology Micro ...

73

In the above state of charge data, the co-simulation and HIL tests show slightly higher state of

charge readings compared to the simulation tests. Both co-simulation and HIL test data for state of charge

and current are almost identical. Most likely the cause of this discrepancy is because of the slightly

decreased current draw compared to the simulation current.

Figure 5-23 shows a comparison of vehicle speed for all three tests and over the full test time,

while Figure 5-24 isolates vehicle speed data to the snapshot high vehicle speed section of the test cycle.

Figure 5-23: Battery Testing Vehicle Speed Results

Page 93: Development and Testing of a Flexible Topology Micro ...

74

Figure 5-24: Battery Testing Vehicle Speed Results (snapshot)

The above plots of vehicle speed for the three tests show that all tests were able to follow the

test cycle. The error between the three tests as seen in the figures above and Table 5-3, is zero. All three

tests follow the exact trace speed. This confirms that the slight difference in battery current had no effect

on the full vehicle model.

5.6 Other Electrical Components

Several other electrical energy storage devices can be tested with similar procedures and

equipment. For example, a high energy capacitor could use the HPPC test for characterization and

PSAT’s generic map for capacitors to run HIL simulations. Again, using a full vehicle model the

simulation, co-simulation, and HIL tests could be performed. The same would apply to flywheels, fuel

Page 94: Development and Testing of a Flexible Topology Micro ...

75

cells, or other energy storage devices. Using the proper characterization procedures and models allow for

the comparison of outputs for the discussed test setups.

5.7 Associated Laboratory for Classroom Education

A laboratory experiment procedure is recommended based on the work of this chapter. That is

provided in Appendix D, HIL Laboratory Instructions.

Page 95: Development and Testing of a Flexible Topology Micro ...

Chapter 6

Engine HIL

This chapter explores internal combustion gasoline engine (ICE) HIL experimentations and the

pre-testing required before performing these tests. The engine used in this study was a six horsepower,

four stroke, Honda GS190 utility engine which was adapted from its speed governed control to a

computer controlled throttle and ignition.

6.1 PSAT Engine Model

PSAT contains four engine models: hot map, hot and cold map, hot map interpolation, and neural

net. The hot map model uses only steady state maps of engine data taken after the engine reaches its

running temperature. The hot and cold map model uses both a map for cold operation and a map for hot

operation, and interpolates between the two maps by a term defining the warm up state of the engine. The

hot map interpolation model uses only the hot map data but interpolates between lean and rich operation

conditions. The neural net model requires proprietary software that is not available. The simple hot map

model was chosen and used during the modeling and HIL simulations to reduce time and complexity

required for students to populate the engine model.

The PSAT hot map engine model outputs engine torque, fuel consumption, and engine-out

emissions given engine speed and throttle position. Figure 6-1 illustrates the engine model inputs and

outputs.

Page 96: Development and Testing of a Flexible Topology Micro ...

77

The parameters included in the PSAT Engine Hot Map Model as well as the units used and

procedures to gather the data are listed in Table 6-1.

Parameter SI Unit Procedure to Gather Data

Time Constant Rising Second Dynamometer Testing

Time Constant Falling Second Dynamometer Testing

Idle Speed Radian/Second Manufacture Defined

Exhaust Gas Heat Capacity J/kg/K N/A

Fuel Heating Value J/kg EIA

Inertia Kilogram-Meter2 Calculation

Start Speed Radian/Second Dynamometer Testing

Speed Index Radian/Second Dynamometer Testing

Torque Index Newton-Meter Dynamometer Testing

Max Torque Map (wide open throttle) Newton-Meter Dynamometer Testing

Minimum Torque Map (closed throttle) Newton-Meter Dynamometer Testing

Fuel Mass Flow Rate Map Kilogram/Second Dynamometer Testing

Table 6-1: PSAT Engine Hot Map Parameters

The PSAT Engine Hot Map Model also predicts engine-out emissions, similar to the torque and

fuel maps, using predefined maps of Hydrocarbon, Nitrogen Oxide, Particulate Matter, and Oxygen

Fuel Consumption

Engine On/Off

Engine Throttle

Engine Speed

Engine Torque

Figure 6-1: PSAT Engine Hot Map Model Inputs and Outputs

Engine-Out Emissions

Page 97: Development and Testing of a Flexible Topology Micro ...

78

exhaust mass flow rates. Considering the scope and available time for the project, here we disregard the

emissions and thermal aspect of the model. Also, the steady state nature of engine emissions maps ignores

the complexity and dynamics of real engine operating points, leading to substantially reduced accuracy.

Using the parameters listed in Table 6-1, the following equations represent the model’s method

for determining engine torque and fuel consumption. If the engine is in an off state (engine on/off =0) or

at zero throttle, torque output is zero. Similarly, for the fuel rate calculation, if the engine is in an off state,

fuel consumption is zero.

Equation 6-1 uses a combination of the wide open throttle torque map, closed throttle torque map,

and throttle position to calculate engine torque output.

𝑇𝑜𝑟𝑞𝑢𝑒𝑜𝑢𝑡 = 1 − 𝑇𝑕𝑟𝑜𝑡𝑡𝑙𝑒 ∗ 𝑇𝑜𝑟𝑞𝑢𝑒𝑐𝑙𝑜𝑠𝑒𝑑 𝑡𝑕𝑟𝑜𝑡𝑡𝑙𝑒 + (𝑇𝑕𝑟𝑜𝑡𝑡𝑙𝑒 × 𝑇𝑜𝑟𝑞𝑢𝑒𝑤𝑖𝑑𝑒 𝑜𝑝𝑒𝑛 𝑡𝑕𝑟𝑜𝑡𝑡 𝑙𝑒 )

Equation 6-1: PSAT Engine Torque Calculation

Equation 6-2 uses a map of engine instantaneous fuel rate that is indexed by engine speed and

engine torque if the engine is running and above the closed throttle torque curve. If the torque map is not

defined at the operation point, the model will interpolate between the defined map point and the closed

and wide open throttle curves. Otherwise, the engine torque is below the closed throttle curve and

considered to be in an off state where instantaneous fuel rate equals zero.

𝐼𝑛𝑠𝑡𝑎𝑛𝑡𝑎𝑛𝑒𝑜𝑢𝑠 𝐹𝑢𝑒𝑙 𝑅𝑎𝑡𝑒 = 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛(𝐸𝑛𝑔𝑖𝑛𝑒 𝑆𝑝𝑒𝑒𝑑, 𝑇𝑜𝑟𝑞𝑢𝑒𝑜𝑢𝑡 )

Equation 6-2: PSAT Instantaneous Fuel Consumption

Cumulative Fuel Rate= 𝐼𝑛𝑠𝑡𝑎𝑛𝑡𝑎𝑛𝑒𝑜𝑢𝑠 𝐹𝑢𝑒𝑙 𝑅𝑎𝑡𝑒 𝑑𝑡

Equation 6-3: PSAT Cumulative Fuel Rate

Page 98: Development and Testing of a Flexible Topology Micro ...

79

Given the above equations, engine characterization is needed to define engine torque and

instantaneous fuel rate maps.

6.2 Characterization

For purposes of modeling, HIL testing and/or control design, it is vital to know certain engine

parameters such as engine mass, peak power, and efficiency at a variety of operating points. Detailed

efficiency maps and torque curves are not available from the manufacturer because the engine selected for

the Berkeley MMHEV, a Honda GS190, was designed for use as a utility engine. Testing was required to

gather some of this information.

SAE publication J1312 (SAE, 1995) procedures were referenced for test procedures and setup.

Two procedures were developed to fit available hardware, time and requirements. The first was for rapid

and high resolution data collection of fuel consumption rates and engine torque. The second procedure

was developed with student instruction in mind, emphasizing increased safety but resulting in reduced

resolution of collected data.

6.2.1 High Resolution Data Collection Procedure

Hardware used in the high resolution engine mapping procedure includes many of the

components integrated into the Berkeley MMHEV: the tested engine, secondary motor and controller,

high voltage battery, master vehicle controller, relay box, and engine speed sensor along with associated

electronics. Additional non-vehicle components required include a digital scale, graduated cylinder and

large cooling fan.

Page 99: Development and Testing of a Flexible Topology Micro ...

80

The Berkeley MHEV was parked in a well ventilated area while a large cooling fan forced

ambient air over the Berkeley MMHEV engine bay to cool the air cooled engine and secondary motor.

To start and run the test, Simulink code was developed to automatically start, warm up the

engine, run, and stop the test. The same code monitored for any unsafe conditions, such as engine over

speed. The following procedure represents the steps or states of the Stateflow diagram used in the

Simulink model.

High Resolution Engine Mapping Procedure:

1) Run engine at idle speed and zero load for five minutes or until running temperature is

reached

2) Measure fuel level in the graduated cylinder and record as the starting point (manually)

3) Go to the engine test speed by speed controlling the dynamometer (secondary) motor

4) Set throttle to test position

5) Run the engine at test speed and throttle position for 10 minutes or until 10 g of fuel has been

used

6) Measure fuel level in the graduated cylinder and record as the end point (manually)

7) Rest for a minimum of 15 minutes; then the test can be repeated for another engine operating

point

Table 6-2: High Resolution Engine Mapping Procedure

6.2.2 Low Resolution Automated Data Collection Procedure

For demonstration and student involvement, a safer and completely automated procedure was

developed using available hardware. The automated test reduces the possibility of an untrained student

damaging the hardware while handling fuel.

Hardware used in the completely automated engine mapping procedure was the same as in the

previous set up, except fuel flow was measured with a digital scale that communicates serially with the

master controller with a resolution of one gram (Acculab).

Page 100: Development and Testing of a Flexible Topology Micro ...

81

Simulink code was reused to run the automatic test with minimal changes, since it was written

with provisions for both procedures.

Low Resolution Engine Mapping Procedure:

1) Run engine at idle speed and zero load for five minutes or until running temperature is

reached.

2) Initialize the scale weight reading to the beginning of the tests measurement

3) Go to the engine test speed by speed controlling the dynamometer motor.

4) Set throttle to test position

5) Run the engine at test speed and throttle position for ten minutes or until 10g of fuel are used

6) Record the scale reading and compare the starting point to calculate total fuel used

7) Rest for a minimum of 15 minutes; then the test can be repeated for another engine operating

point

Table 6-3: Low Resolution Engine Mapping Procedure

Maps of engine torque, fuel rate, and efficiency were produced for use in the PSAT Engine Hot

Map Model using the high resolution method. Generated electrical power was used to estimate

mechanical power produced by the engine using the secondary motor as a dynamometer. The following

formulas were used to calculate engine torque, fuel consumption rates and efficiency given the motor’s

voltage, current, and speed as well as the output of the digital scale. Equation 6-4 uses the motor power

and its measured efficiency to calculate engine torque given the relationship between engine power,

torque and speed. Interpolated points are calculated for values in-between test points. Equation 6-5 uses

the digital scale’s output to measure fuel used during the test and calculate the test point’s fuel

consumption rate. Equation 6-6 calculates engine efficiency.

Page 101: Development and Testing of a Flexible Topology Micro ...

82

𝑀𝑜𝑡𝑜𝑟 𝑃𝑜𝑤𝑒𝑟𝑀𝑒𝑐𝑕 𝑖𝑛 =𝐶𝑢𝑟𝑟𝑒𝑛𝑡 × 𝑉𝑜𝑙𝑡𝑎𝑔𝑒

𝑀𝑜𝑡𝑜𝑟 𝑎𝑛𝑑 𝐶𝑜𝑛𝑡𝑟𝑜𝑙𝑙𝑒𝑟𝐸𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦@𝑜𝑝𝑒𝑟𝑎𝑡𝑖𝑛𝑔 𝑝𝑜𝑖𝑛𝑡

𝐸𝑛𝑔𝑖𝑛𝑒 𝑃𝑜𝑤𝑒𝑟𝑜𝑢𝑡 = 𝑀𝑜𝑡𝑜𝑟 𝑃𝑜𝑤𝑒𝑟𝑀𝑒𝑐𝑕 𝑖𝑛 = 𝐸𝑛𝑔𝑖𝑛𝑒 𝑇𝑜𝑟𝑞𝑢𝑒 × 𝐸𝑛𝑔𝑖𝑛𝑒 𝑆𝑝𝑒𝑒𝑑

𝐸𝑛𝑔𝑖𝑛𝑒 𝑇𝑜𝑟𝑞𝑢𝑒 =𝑀𝑜𝑡𝑜𝑟 𝑃𝑜𝑤𝑒𝑟𝑀𝑒𝑐𝑕 𝑖𝑛

𝐸𝑛𝑔𝑖𝑛𝑒 𝑆𝑝𝑒𝑒𝑑

*assumes the belt drive between the engine and motor is 100% efficient

Equation 6-4: Engine Torque

𝐸𝑛𝑔𝑖𝑛𝑒 𝐹𝑢𝑒𝑙 𝑈𝑠𝑒𝑑 = 𝐹𝑢𝑒𝑙 𝑊𝑒𝑖𝑔𝑕𝑡𝐹𝑖𝑛𝑎𝑙 − 𝐹𝑢𝑒𝑙 𝑊𝑒𝑖𝑔𝑕𝑡𝐼𝑛𝑖𝑡𝑖𝑎𝑙

Equation 6-5: Engine Fuel Rate

𝐸𝑛𝑔𝑖𝑛𝑒 𝐸𝑛𝑒𝑟𝑔𝑦𝑜𝑢𝑡 = 𝐸𝑛𝑔𝑖𝑛𝑒 𝑃𝑜𝑤𝑒𝑟𝑜𝑢𝑡 𝑑𝑡

𝐹𝑢𝑒𝑙 𝐸𝑛𝑒𝑟𝑔𝑦𝑖𝑛 = 𝐸𝑛𝑔𝑖𝑛𝑒 𝐹𝑢𝑒𝑙 𝑈𝑠𝑒𝑑 × 𝐹𝑢𝑒𝑙𝐸𝑛𝑒𝑟𝑔𝑦 𝐷𝑒𝑛𝑠𝑖𝑡𝑦

𝐸𝑛𝑔𝑖𝑛𝑒 𝐸𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦 =𝐸𝑛𝑔𝑖𝑛𝑒 𝐸𝑛𝑒𝑟𝑔𝑦 𝑜𝑢𝑡

𝐹𝑢𝑒𝑙 𝐸𝑛𝑒𝑟𝑔𝑦 𝑖𝑛 × 100

Equation 6-6: Engine Efficiency

Using the above equations and recoded data, the following plots represent the engine

characterization. Using a combination of both high and low resolution data sets, 0, 25, 50, 75, and 100%

throttle runs were recorded at 1400, 2000, 2500, 3000, and 3300 RPM. Figure 6-2 shows the peak torque

and closed throttle torque curves, while Figure 6-3 shows a contour plot of its efficiency. The most

efficient point of operation based on the measured efficiency is approximately 75% throttle at 2300 RPM.

Page 102: Development and Testing of a Flexible Topology Micro ...

83

Figure 6-2: Wide Open Throttle Engine Torque Curve

Figure 6-3: Engine Efficiency

Page 103: Development and Testing of a Flexible Topology Micro ...

84

Figure 6-4: Engine Fuel Rate

Figure 6-5: Engine Fuel Rate and Maximum Torque Curve

Page 104: Development and Testing of a Flexible Topology Micro ...

85

Figure 6-4 shows the measured fuel consumption rate for the Honda GS190 engine with the

modifications made to integrate it into the Berkeley MMHEV. Figure 6-5 shows the same fuel rate data

as Figure 6-4, but in a contour plot format with the wide open throttle and closed throttle torque curves

from Figure 6-2 overlaid.

6.3 Model Setup

For Engine HIL testing, the series HEV configuration mode of the Berkeley MMHEV was

modeled in PSAT, simulated, and the results recorded. The model is exercised and data recorded at a rate

of 100 Hz. During the modeling process, changes were made to the Simulink model of the Berkeley

MMHEV to allow for co-simulation and HIL Simulation. This section details the changes made and the

method of running the same model in different modes. Figure 6-6 shows the data flow for a co-simulation

and HIL simulation.

Figure 6-6: Engine Co-Simulation and HIL Diagram

Page 105: Development and Testing of a Flexible Topology Micro ...

86

Figure 6-7 shows the PSAT Engine Hot Map model; the circles highlight the changes made to

allow for simulation, co-simulation, and HIL simulation using the same Simulink model. All changes

integrate a manual switch which controls the flow of data. Either model predicted values and commands

or actual measured engine parameters and commands are allowed to pass the switch, depending on the

desired test configuration.

Figure 6-7: PSAT Engine Model HIL Changes

During simulation of the Berkeley MMHEV in a series configuration, the PSAT control

algorithm typically operates the engine at only one operating point, usually the most efficient operating

point. The most efficient point is calculated based on the maps and data defining the engine and motor or

generator models. For the safety of students involved in testing, a Stateflow control model was also

integrated into the model to protect the engine against running in a dangerous or destructive manner. This

Stateflow model controls the engine and generator operations, including starting the engine and getting to

Page 106: Development and Testing of a Flexible Topology Micro ...

87

a state where the engine and generator produce electricity in a safe and stable manner. This model

replaces the PSAT engine control algorithm, which was not completely designed for actual engine

operation. Figure 6-8 shows the new Stateflow model controlling engine and generator operation. The

series PSAT model still controls the on and off state of the engine, but Figure 6-8 controls how the engine

is started and operated along with the generator. Also, Figure 6-8 keeps the APU on and generating for a

minimum of sixty seconds, while the engine is held in an off state and not generating for a minimum of

thirty seconds. These minimum settings keep the engine from rapidly starting and stopping. This is

intended to fix the tendency of PSAT to rapidly change the on and off state of the engine during series

HEV simulations. This code protects the HIL hardware against unnecessarily rapid changes in state.

Figure 6-8: Secondary Motor and Engine State Control for Engine HIL and Co-Simulation

Component level control of both the engine and secondary motor are built into the series

Berkeley MMHEV model to allow the model to run and measure data from the real components. This

gives the model the ability to run a co-simulation or hardware-in-the-loop simulation. Because the

vehicle’s engine and secondary motor systems were used to run these tests, the model component level

configuration and setup are identical to the control algorithm to operate the vehicle during series

Page 107: Development and Testing of a Flexible Topology Micro ...

88

operation. Details of the component level control for both simulation and vehicle operation are the same,

and are discussed in Chapter 9, Component Level Control and Communication.

6.4 Hardware Setup

This section details the setup of hardware for the engine HIL simulations. The primary

components are the Honda GS190 gasoline engine, Hi-Performance secondary motor and Curtis

controller, Advantech computer vehicle controller, and a digital scale measuring the mass of the engine’s

gasoline supply. Exhaust was safely vented and a large fan was used to cool the Berkeley engine bay.

Figure 6-9 shows the arrangement of these hardware components for engine HIL testing.

Figure 6-9: Engine Hardware-in-the-Loop Hardware Layout

Page 108: Development and Testing of a Flexible Topology Micro ...

89

The engine and secondary motor are arranged as shown in Figure 4-5 using the set up discussed

above and in 4.2.2 Engine HIL. The digital scale and gasoline supply tank, as well as the laptop

communicating with the master vehicle controller, are seen to the right of the Berkeley MMHEV.

6.5 Test Setup

The engine HIL, co-simulation and simulation runs all use similar test setups. Each test is also run

with the same Simulink model as previously described; only changing positions of manual switches in the

model. The drive cycle chosen was again the Urban Dynamometer Drive Schedule with initial battery

state of charge of 80%.

PSAT simulation runs are performed first. The new engine model uses engine on/off, throttle

command, and speed inputs from the original PSAT model. The outputs of the engine model are fed back

into the full PSAT vehicle model while all data are recoded. Then a co-simulation test is performed.

During co-simulation testing, the inputs to the engine model are fed to the engine model as well as the

actual engine setup and the engine is exercised. Only the engine model results are fed back to the full

PSAT vehicle model. Finally, HIL test are performed. During the HIL test, the PSAT engine model was

completely bypassed. Engine model inputs are sent to the actual engine while the measured engine

parameters are fed back to the full PSAT vehicle model.

6.6 Results of Engine Simulation, Co-Simulation, and HIL Tests

This section compares the results from the three tests above. These results show both model

predicted and actual behavior of the Honda GS190 gasoline engine. Both full cycle data and smaller snap

shots of data are shown. The snapshots of data are the first few minutes of the UDDS cycle, while the full

Page 109: Development and Testing of a Flexible Topology Micro ...

90

data shows the entire UDDS cycle. Note that the results may not match well because of the difference in

PSAT command and actual engine command due to the Stateflow model put in place for student safety.

Figure 6-10 shows results of engine RPM. Clearly, during HIL testing, the engine was

commanded to run longer and stop less frequently than the simulation run. Also, the cumulative engine

run time of the HIL tests was considerably higher. This is the result of Stateflow code integrated for

student and hardware safety. The energy loss of the PSAT model unnecessarily reduces battery SOC by

continually starting the engine and not completely recouping start energy. Despite its faults, these results

do show the system’s ability to exercise a simulation, co-simulation, and HIL simulation. A more

desirable control strategy may be tested with further work to improve PSAT control algorithms.

Figure 6-10: Engine Testing Speed Results

Looking closer at the snapshot of data in Figure 6-11, engine speed for simulation and HIL tests

matches closely, but the co-simulation data shows a slightly lower engine RPM seen in Figure 6-12 and

Page 110: Development and Testing of a Flexible Topology Micro ...

91

Figure 6-13. The reason for this reduced speed is possibly due to different battery state of charge, which

through the motor loaded the speed controlled engine differently in the HIL and co-simulation tests. As

shown in Figure 6-12 and Figure 6-13, battery SOC during co-simulation increased the battery current,

and in turn torque increased of the secondary motor controller. The opposite occurred during HIL testing:

a high SOC limited battery current and in turn motor torque, resulting in a reduced brake load on the

engine and reduced engine power output.

Figure 6-11: Engine Testing Speed Results (snapshot)

As expected, the co-simulation run uses more fuel because of its increased power output. While

the HIL test uses considerably less, the simulation and co-simulation runs correlate relatively closely.

When comparing energy output, the co-simulation and simulation runs follow similar, but not exact,

Page 111: Development and Testing of a Flexible Topology Micro ...

92

patterns. Figure 6-14 and Figure 6-15 show the relationship between measured and predicted engine fuel

use.

Figure 6-12: Engine Testing Torque Results

Page 112: Development and Testing of a Flexible Topology Micro ...

93

Figure 6-13: Engine Testing Torque Results (snapshot)

Figure 6-14: Engine Testing Fuel Consumption Results

Page 113: Development and Testing of a Flexible Topology Micro ...

94

Figure 6-15: Engine Testing Fuel Consumption Results (snapshot)

Figure 6-16: Engine Testing Power Out

Page 114: Development and Testing of a Flexible Topology Micro ...

95

Figure 6-16 shows the output power of the engine during simulation, co-simulation, and HIL

simulation. To follow the simulation path in engine power and speed, corrections to the PSAT model

would be required. These fixes are beyond the scope of this thesis.

6.7 Associated Laboratory for Classroom Education

A laboratory experiment procedure is recommended based on the work of this chapter. That is

provided in Appendix D, HIL Laboratory Instructions.

Page 115: Development and Testing of a Flexible Topology Micro ...

Chapter 7

Motor HIL

This chapter explores electric motor HIL experimentations and the pre-testing required before

performing these tests. The motors used during this testing are Hi-Performance AC induction machines

with Curtis 1238 and 1236 controllers for the primary and secondary motor systems, respectively. The

primary motor acts as a dynamometer while the secondary motor system is tested as the simulated

vehicle’s traction motor.

7.1 PSAT Motor Model

The following section discusses two motor models, a traction machine and dedicated generator.

In the Berkeley MHEV, either the primary or secondary motor systems could operate as a traction motor

or a generator, depending on the configuration selected by the user. In previous chapters the secondary

motor has been modeled as the generator while the primary motor was modeled as the only traction

motor.

7.1.1 Motor

Figure 7-1 shows the input and output signals, while Table 7-1 lists parameters of the PSAT

voltage in generic map model. Equation 7-1 uses an efficiency look up table indexed by motor torque and

speed to calculate motor power output. This look up table integrates efficiency data gathered from motor

dynamometer testing. A torque request input to the motor model is assumed to be equal to output torque

Page 116: Development and Testing of a Flexible Topology Micro ...

97

of the model. The current used to supply this torque is calculated using the modeled battery’s voltage and

above power calculation.

Equation 7-2 represents the motor torque request and output, given the maximum available torque

calculated by Equation 7-3, Equation 7-4, and Equation 7-5. This torque calculation assumes the available

torque to be the smallest value calculated using either the mechanical or electrical methods of calculating

motor torque. The heat index of the motor is calculated using Equation 7-6.

Figure 7-1: PSAT General Map Voltage in Motor Model

Parameter SI Unit Procedure to Gather Data

Motor Inertia Kilogram-meter2 Static Weight Drop Test

Motor Command Rate Limit Dimensionless User Defined

Heat Index Time Constant ºCelsius Manufacturer Defined

Speed Index radian/second Manufacturer Defined

Continuous Torque Map Newton Dynamometer Testing

Maximum Torque Map Newton Dynamometer Testing

Continuous Regenerative Torque Map Newton Dynamometer Testing

Maximum Regenerative Torque Map Newton Dynamometer Testing

Table 7-1: PSAT General Map Voltage in Motor Model Parameters

Motor Speed

DC Current

Motor Torque

DC Voltage

Motor Torque Command

Page 117: Development and Testing of a Flexible Topology Micro ...

98

𝐶𝑢𝑟𝑟𝑒𝑛𝑡 =𝑃𝑜𝑤𝑒𝑟𝐸𝑙𝑒𝑐𝑡𝑟𝑖𝑐𝑎𝑙

𝑉𝑜𝑙𝑡𝑎𝑔𝑒

𝑃𝑜𝑤𝑒𝑟𝐸𝑙𝑒𝑐𝑡𝑟𝑖𝑐𝑎𝑙 = 𝐹𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑀𝑜𝑡𝑜𝑟 𝑇𝑜𝑟𝑞𝑢𝑒, 𝑀𝑜𝑡𝑜𝑟 𝑆𝑝𝑒𝑒𝑑 𝜂(𝑚𝑜𝑡𝑜𝑟)

Equation 7-1: Motor Current

𝑀𝑜𝑡𝑜𝑟 𝑇𝑜𝑟𝑞𝑢𝑒 = 𝑇𝑜𝑟𝑞𝑢𝑒𝑀𝑎𝑥 × 𝑀𝑜𝑡𝑜𝑟 𝐶𝑜𝑚𝑚𝑎𝑛𝑑

Equation 7-2: Motor Torque

𝑇𝑜𝑟𝑞𝑢𝑒𝑚𝑎𝑥 = 𝑀𝑖𝑛(𝑇𝑜𝑟𝑞𝑢𝑒𝑀𝑎𝑥 𝑀𝑒𝑐𝑕𝑎𝑛𝑖𝑐𝑎𝑙 , 𝑇𝑜𝑟𝑞𝑢𝑒𝑀𝑎𝑥 𝐸𝑙𝑒𝑐𝑡𝑟𝑖𝑐𝑎𝑙 )

Equation 7-3: Maximum Torque

𝑇𝑜𝑟𝑞𝑢𝑒𝑀𝑎𝑥 𝑀𝑒𝑐𝑕𝑎𝑛𝑖𝑐𝑎𝑙 = 𝑇𝑜𝑟𝑞𝑢𝑒𝐶𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠 × 𝐻𝑒𝑎𝑡 𝐼𝑛𝑑𝑒𝑥 + (𝑇𝑜𝑟𝑞𝑢𝑒𝑃𝑒𝑎𝑘 × 1 − 𝐻𝑒𝑎𝑡 𝐼𝑛𝑑𝑒𝑥 )

Equation 7-4: Maximum Mechanical Torque

𝑇𝑜𝑟𝑞𝑢𝑒𝑀𝑎𝑥 𝐸𝑙𝑒𝑐𝑡𝑟𝑖𝑐𝑎𝑙 = 𝐹𝑢𝑛𝑐𝑡𝑖𝑜𝑛(𝑆𝑝𝑒𝑒𝑑𝑚𝑜𝑡𝑜𝑟 , 𝑃𝑜𝑤𝑒𝑟𝐸𝑙𝑒𝑐𝑡𝑟𝑖𝑐𝑎𝑙 )

Equation 7-5: Maximum Electrical Torque

𝐻𝑒𝑎𝑡 𝐼𝑛𝑑𝑒𝑥 = −0.3 + 0.3

𝑡×

𝑀𝑜𝑡𝑜𝑟 𝑇𝑜𝑟𝑞𝑢𝑒

𝑇𝑜𝑟𝑞𝑢𝑒𝐶𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠− 1 𝑑𝑡

Equation 7-6: Heat Index of the Electric Motor

7.1.2 Generator

Page 118: Development and Testing of a Flexible Topology Micro ...

99

Figure 7-2: PSAT General Generator Map Torque in Model

Figure 7-2 shows inputs and outputs, while Table 7-1 list of model parameters for the PSAT

generator model. Generator current is also calculated using Equation 7-1, while generator torque and

speed are calculated using Equation 7-7 and Equation 7-8. The generator torque calculation is simply a

proportion of available mapped continuous torque. Generator speed is calculated by integrating the

angular acceleration of the machine, which is its torque divided by its mass moment of inertia.

𝑇𝑜𝑟𝑞𝑢𝑒𝑂𝑢𝑡 = 𝐺𝑒𝑛𝑒𝑟𝑎𝑡𝑜𝑟 𝐶𝑜𝑚𝑚𝑎𝑛𝑑 × (𝑇𝑜𝑟𝑞𝑢𝑒𝐶𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠 𝑃𝑟𝑜𝑝𝑒𝑙 𝑜𝑟 𝑇𝑜𝑟𝑞𝑢𝑒𝐶𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠 𝑅𝑒𝑔𝑒𝑛𝑒𝑟𝑎𝑡𝑖𝑣𝑒 )

Equation 7-7: Generator Torque Output

𝐺𝑒𝑛𝑒𝑟𝑎𝑡𝑜𝑟 𝑆𝑝𝑒𝑒𝑑 = 𝑇𝑜𝑟𝑞𝑢𝑒𝑖𝑛 + 𝑇𝑜𝑟𝑞𝑢𝑒𝑜𝑢𝑡

𝐼𝑛𝑒𝑟𝑡𝑖𝑎𝑖𝑛 + 𝐼𝑛𝑒𝑟𝑡𝑖𝑎𝐺𝑒𝑛𝑒𝑟𝑎𝑡𝑜𝑟

Equation 7-8: Generator Speed

7.2 Characterization

A similar test procedure was developed for electric motor characterization following the methods

from SAE J1312 for small ICE engines. Both the primary motor, secondary motor and their controllers

were dynamometer tested using the following procedure to populate their respective efficiency maps, as

well as their peak torque curves. Runs were made with different nominal battery pack voltages. For each

Generator Command

DC Current

Motor Speed

Torque / Inertia

DC Voltage

Page 119: Development and Testing of a Flexible Topology Micro ...

100

test voltage, the battery pack consisted of different numbers of the liquid cooled Saft batteries in series.

Packs used included 48 Volt, 72 Volt, and 84 Volt arrangements. As expected each pack gave different

motor and controller system characterization parameters. Only 48 Volt data were used in modeling for

this project, but additional 72 Volt and 84 Volt data can be seen in Appendix C, Motor and Controller

Dynamometer Results. Table 7-2 represents the procedure for motor and controller dynamometer testing.

Motor and Controller Testing Procedure:

1) Ensure the high voltage battery pack is approximately at or above 80% state of charge

2) Enable the motor controller and link the computer to log motor and battery data

3) Using throttle and brake inputs run the motor to the desired speed

4) Apply dynamometer load until maximum throttle or brake is reached at stable speed

5) Record load cell reading and motor data after ten seconds of running at stable speed

6) Charge the battery and rest for at least fifteen minutes

Table 7-2: Motor and Controller Testing Procedure

The following figures illustrate the hardware used to test the motor and controller systems. The

key hardware used in the motor and controller characterization include an Eddy current dynamometer

with a load cell to measure torque and apply a load, the motors and controllers, a high voltage battery

pack, and computers to record measured data from the motor controllers and dynamometer.

Figure 7-3 shows the dynamometer power supply, throttle and brake potentiometers and their

power supply, as well as the computer used to log motor parameters directly from the motor controller

being tested. Parameters recorded include motor speed and temperature, controller temperature, DC

current and voltage, and dynamometer load cell force. Motor torque, power, and efficiency were then

calculated using the following equations.

Page 120: Development and Testing of a Flexible Topology Micro ...

101

Figure 7-3: Motor/Controller Dynamometer Control Setup

Figure 7-4 shows the layout of hardware during motor and controller characterization. The motor

is bolted to a bracket that is welded to the base of the dynamometer stand, giving the system a solid

mount. This bracket also has integrated slots allowing for adjustments in belt tension. The motor

controller is mounted to an aluminum heat sink with cooling fan and sits on a cool concrete floor. A gear

reduction between the motor and dynamometer consists of a 34 tooth pulley, a belt, and a 90 tooth

dynamometer pulley giving the system a gear ratio of 34/90, or 1:0.3777.

Dynamometer Power Supply

Motor Throttle and Brake Potentiometers

Motor Controller Data Logging

Potentiometer Power Supply

Page 121: Development and Testing of a Flexible Topology Micro ...

102

Figure 7-4: Motor/Controller Dynamometer Hardware Layout

Figure 7-5 shows the Eddy current dynamometer (an 8000 Series Enclosed Absorption

Dynamometer) and load cell; a Daytronic 3200 digital indicator and load cell (Daytronic, November

1996) are used to measure the torque applied by the motor. The load cell is mounted between the

dynamometer torque reaction arm and ground to measure the force of the Eddy current dynamometer

coils (Dyne System, Inc., 2009). The load cell is mounted 17 inches from the center of the dynamometer

pulley. Equation 7-9 calculates measured motor torque.

𝑀𝑜𝑡𝑜𝑟 𝑇𝑜𝑟𝑞𝑢𝑒 = 𝐹𝑜𝑟𝑐𝑒𝐿𝑜𝑎𝑑 𝐶𝑒𝑙𝑙 × 𝐺𝑒𝑎𝑟 𝑅𝑎𝑡𝑖𝑜 × 𝑅𝑒𝑎𝑐𝑡𝑖𝑜𝑛 𝐴𝑟𝑚 𝐿𝑒𝑛𝑔𝑡𝑕

Equation 7-9: Measured Motor Torque

High Voltage Battery (NiMH)

Motor Controller and Cooling Fan

Tested Motor

Gear Reduction

Eddy Current Dynamometer

Page 122: Development and Testing of a Flexible Topology Micro ...

103

Figure 7-5: Dynamometer Load Cell

Using data logged by the motor controller and measured by the load cell, Equation 7-10

calculates motor and controller system efficiency.

𝑀𝑜𝑡𝑜𝑟 𝑎𝑛𝑑 𝐶𝑜𝑛𝑡𝑜𝑙𝑙𝑒𝑟 𝐸𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦 =𝑃𝑜𝑤𝑒𝑟 𝑂𝑢𝑡

𝑃𝑜𝑤𝑒𝑟 𝐼𝑛=

𝑀𝑜𝑡𝑜𝑟 𝑇𝑜𝑟𝑞𝑢𝑒 × 𝑀𝑜𝑡𝑜𝑟 𝑆𝑝𝑒𝑒𝑑

𝐵𝑎𝑡𝑡𝑒𝑟𝑦 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 × 𝐵𝑎𝑡𝑡𝑒𝑟𝑦 𝑉𝑜𝑙𝑡𝑎𝑔𝑒

Equation 7-10: Measured Motor and Controller Efficiency

Figure 7-6 plots torque results from the above procedure using the primary motor and associated

controller. Each trace represents a fixed throttle command. The tests were performed using four different

throttle settings (100, 75, 50, and 25%) resulting in four different torque curves. Figure 7-7 plots similar

results from testing the secondary motor and its associated controller.

Eddy Current Dynamometer

Load Cell

Page 123: Development and Testing of a Flexible Topology Micro ...

104

Figure 7-6: Primary Motor Dynamometer Torque Results

Figure 7-7: Secondary Motor Dynamometer Torque Results

Page 124: Development and Testing of a Flexible Topology Micro ...

105

Figure 7-8: Primary Motor and Controller Dynamometer Efficiency Results

Figure 7-9: Secondary Motor and Controller Dynamometer Efficiency Results

Page 125: Development and Testing of a Flexible Topology Micro ...

106

Figure 7-10: Primary Motor Efficiency Map

Figure 7-11: Secondary Motor Efficiency Map

Page 126: Development and Testing of a Flexible Topology Micro ...

107

Figure 7-8 and Figure 7-9 show traces of efficiency relative to speed and throttle position for both

the primary and secondary motor systems, while Figure 7-10 and Figure 7-11 show mapped results of

dynamometer testing in the form of efficiency. These efficiency maps, indexed by speed and torque,

represent the lookup tables used in Equation 7-1 above to account for motor efficiency when calculating

motor power.

7.3 Model Setup

This section details the steps taken to use a PSAT model of the Berkeley MMHEV in an EV

mode for a motor HIL simulation experiment.

Communications and dynamometer controls are added to a full vehicle PSAT model, along with

switches on motor model inputs and outputs. The switches allow for model and test setups to change from

simulation to co-simulation and/or HIL simulation easily. This model runs at an increased rate of 1 kHz to

ensure control of the dynamometer machines.

Two motors are required for the motor HIL simulation. One motor is exercised as the simulated

traction machine, and the other is used as a dynamometer to apply a positive or negative torque

representing road load. The primary motor is more powerful and is selected as the dynamometer motor so

that the secondary motor can be fully exercised without scaling. Figure 7-12 shows the PSAT model with

subsystems for running both the primary and secondary motors along with the electric clutch.

Page 127: Development and Testing of a Flexible Topology Micro ...

108

Figure 7-12: Motor HIL Simulation Model

The secondary motor is controlled using the input torque command of the PSAT motor model. A

gain and signal conditioning are applied to convert the PSAT torque signal range of -1 to 1 to the

hardware required motor signal of 0 to 100 for both throttle and brake. A negative value in a PSAT motor

command represents a braking command while a positive value represents a throttle command. Figure

7-13 shows the speed controller used by the primary motor to maintain the secondary motor at test speed.

Motor test speed is taken from PSAT model vehicle speed. This speed controller first calculates the error

between measured motor speed and motor model input speed. It then normalizes error by the maximum

motor speed as input to a PID controller. Finally, the signal is sorted and separated into throttle and brake

commands.

Page 128: Development and Testing of a Flexible Topology Micro ...

109

Figure 7-13: Motor HIL Dynamometer Speed Control

Figure 7-15 shows the motor model and the changes required to run simulation, co-simulation

and HIL simulation. The black circles highlight the switches put in place to change the flow of data for a

given test. These switches pass model simulated data through during a simulation run, while model inputs

are allowed through to hardware drivers during a co-simulation or HIL simulation. For co-simulation

runs, only model predicted values are used. During an HIL simulation, both the inputs and outputs are

switched to supply PSAT model commands to the motors and the measured motor parameters back into

the PSAT model, completing the experimental loop.

The PSAT vehicle model generates motor speed, battery voltage, and motor command inputs to

the motor model. The motor model generates battery current and motor torque outputs. For simulation

runs, all PSAT motor model inputs and outputs are to and from the rest of the full model. During co-

simulation runs, the motor speed is fed to the dynamometer speed controller and motor commands to the

tested traction motor. Only in HIL simulation runs are the measured current and motor torque fed back

into the PSAT model, replacing the motor model’s output. Figure 7-14 show a diagram of data flow

during motor HIL testing.

Page 129: Development and Testing of a Flexible Topology Micro ...

110

Figure 7-14: Motor Co-Simulation and HIL Diagram

During co-simulation and HIL simulation testing, motor torque is estimated by using a

combination of measured battery voltage and current along with measured motor speed and throttle

position. Estimated motor torque is then calculated using a look up table of tested efficiency, as shown in

Figure 7-16.

Page 130: Development and Testing of a Flexible Topology Micro ...

111

Figure 7-15: Motor HIL Motor Model

Figure 7-16: Motor Torque Calculation

7.4 Hardware Setup

The hardware setup for this test is straight forward and requires only the components already

installed in the Berkeley MMHEV. Physical test set up was completed by removing both the generator

and drive belts, allowing the motors to spin freely. The only other change required is engagement of the

electronic clutch seen in Figure 7-17. This figure shows the setup for motor to motor testing, with the

dynamometer or primary motor on the right and the tested or secondary motor on the left. The clutch is

engaged at the beginning of the test and locks both motors together with a one to one ratio.

Page 131: Development and Testing of a Flexible Topology Micro ...

112

Figure 7-17: Clutch and Motors of the Berkeley MMHEV

7.5 Test Setup

The motor HIL simulation, co-simulation and simulation are all performed using the same model

discussed above. The first 130 seconds of the UDDS cycle is run as the vehicle speed trace. This

considerably short cycle is used because of some instability observed in motor to motor testing. Before

full cycle testing should be performed, further work is required to tune controllers and optimize this

system including a more accurate measure of motor torque. The current test is meant to demonstrate the

capability of the test bench and its current hardware.

7.6 Results of Motor Simulation, Co-Simulation, and HIL Tests

This section presents the comparison of simulation, co-simulation, and HIL simulation runs using

the above models and test setup. Figure 7-18 show the battery current during these three tests, while

Figure 7-19 shows a small snapshot of current data.

Page 132: Development and Testing of a Flexible Topology Micro ...

113

Figure 7-18: Motor Testing Current Results

Figure 7-19: Motor Testing Current Results (snapshot)

Page 133: Development and Testing of a Flexible Topology Micro ...

114

Figure 7-20 shows the results of motor speed during these three tests, while Figure 7-21 shows a

snapshot of the same data. The HIL simulation data indicates that the motor speed is not stable as

expected. The challenge here is accurately controlling motor speed with another motor of similar size and

dynamics. The dynamometer motor should respond faster than, and easily absorb any torque from, the

tested motor. Noisy data measured from the drive and dynamometer motors that feeds through the control

system and results in unstable control signals is another challenge. Further refinement and optimization

are required in the PSAT models to correct this issue. An even faster responding speed controller may

help, but the best solution would include a considerably larger dynamometer motor.

Figure 7-20: Motor Testing Speed Results

Page 134: Development and Testing of a Flexible Topology Micro ...

115

Figure 7-21: Motor Testing Speed Results (snapshot)

Figure 7-22: Motor Testing Torque Results

Page 135: Development and Testing of a Flexible Topology Micro ...

116

Figure 7-23: Motor Testing Torque Results (snapshot)

Figure 7-22 shows the torque results for these three tests, while Figure 7-23 shows a snapshot of

the same data. Similar unstable results are seen in the HIL data, suggesting that further optimization is

required. Even though the motor speed, current and torque are rather noisy and unstable, PSAT predicts a

vehicle speed that closely matches the trace. Vehicle speed results can be seen in Figure 7-24, with a

snapshot of the same data in Figure 7-25.

Page 136: Development and Testing of a Flexible Topology Micro ...

117

Figure 7-24: Motor Testing Vehicle Speed Results

Figure 7-25: Motor Testing Vehicle Speed Results (snapshot)

Page 137: Development and Testing of a Flexible Topology Micro ...

118

7.7 Associated Laboratory for Classroom Education

A laboratory experiment procedure is recommended based on the work of this chapter. That is

provided in Appendix D, HIL Laboratory Instructions.

Page 138: Development and Testing of a Flexible Topology Micro ...

Chapter 8

Controller HIL

This chapter explores the hardware and software required, as well as results and benefits of

controller HIL simulation.

The following tests utilize PSAT component plant models of the Berkeley MMHEV in a series

engine hybrid configuration. PSAT plant models of components such as the engine and generator of the

vehicle APU are simulated without a control system. This simulation of plant models is run on a

dedicated computer. Another computer runs experimental control algorithms, sending control parameters

to and reading simulation data from the computer simulating the plant models. This offers a safe method

for development of trial control algorithms and the controllers on which they run.

8.1 Model Setup

For controller HIL testing, all mechanical components of an HEV were simulated using PSAT

models previously discussed. These plant models of the vehicle were useful for predicting and testing

component dynamics and system behavior during full and HIL simulations. Here models previously used

in past chapters are being exercised differently. Their controllers and control logic have been completely

removed. The purpose for removing PSAT control models from the component plant models is to allow

student written control algorithms to be tested in a safe way before applying them to actual hardware.

Two sets of models were required for this experimentation; first, an assembly of plant models

including each of the components for the vehicle being simulated: and second, a control algorithm model

to operate these virtual components.

Page 139: Development and Testing of a Flexible Topology Micro ...

120

8.1.1 Plant Models

Figure 8-1 shows the PSAT plant models for the Berkeley MMHEV arranged as a series hybrid,

with the addition of subsystems that allow for communication between two computers.

Figure 8-1: Berkeley MMHEV Series Mode Plant Models Only

The controller input subsystem of the model gathers instructions from the external control model

and forwards them to the component plant models being exercised. Signals in the plant model are tagged

using the xPCTag functions for feedback of data to the controller model. This method sends signals to the

controller model running on a separate PC using the xPC Target toolbox drivers over an Ethernet

connection.

Page 140: Development and Testing of a Flexible Topology Micro ...

121

8.1.2 Controller Model

For testing of student written core control, two controller models were written to communicate

with the plant model discussed above. First, a simple model was built with manual inputs to experiment

with the function of the plant models. Then a more sophisticated model was written to automatically run

these plant model components as if they were in a real vehicle, starting and running the engine based on

simulated data input. Figure 8-2 shows the manual control model with information coming from the

simulation plant models on the left and commands being sent to the plant model on the right. This simple

manual control uses the Simulink Library digital displays and constants for operation. Note in this setup,

constants are changed manually during model execution, while displays are updated every time a data

packet is received from the computer running the plant models.

Figure 8-3 shows the automatic control algorithm tested. This model takes the previous manual

model and adds an automatic control subsystem with an engine speed controller and system management

model.

Figure 8-2: Manual Control Model

Page 141: Development and Testing of a Flexible Topology Micro ...

122

Figure 8-3: Automatic Control Model

Figure 8-4: Automatic Control Model Subsystems

Figure 8-4 shows the subsystem layout of the automatic control model. Rate translations were

required to allow the plant and control models to run at different speeds on opposite machines. Figure 8-6

shows the engine speed control subsystem, which is triggered by Figure 8-5 to operate when the engine

speed measured is above 50 radians per second. The engine speed control is a discrete PID controller with

an error signal calculated from the difference of engine speed measured and commanded. The signal is

Page 142: Development and Testing of a Flexible Topology Micro ...

123

then normalized by the maximum engine speed and fed into a PID controller. Its output is saturated to

match the plant model input restrictions.

Figure 8-5: Engine Speed Control Trigger

Figure 8-6: Engine Speed Control

Figure 8-7 shows the high level, or system management, control that starts the engine, idles, and

then applies the generator load. This logic is designed to be simple, because testing is concentrated on the

engine speed controller and its ability to control speed.

Page 143: Development and Testing of a Flexible Topology Micro ...

124

Figure 8-7: High Level Automatic Control Model Logic

With the above models, users can quickly and easily test different PID gains in the engine speed

controller under different loading situations. This presents an opportunity for quick and productive testing

with limited risk to hardware and personal safety.

8.2 Hardware Setup

Two computers were required to run the above two models independently. For the plant model an

Advantech fan-less computer was selected, while the control algorithm ran on an independent laptop. This

setup allows for quick changes of the control model setup and parameters, while the plant model can

continue to run safely. Figure 8-8 illustrates the hardware layout of the controller HIL tests. The two

machines communicate with a single Ethernet connection transmitting data to and from each machine.

The Advantech computer was setup using Matlab Simulink xPC Target software, and loaded with the

plant models. The laptop is running the control algorithms with blocks for communicating to the plant

model, as discussed above.

Page 144: Development and Testing of a Flexible Topology Micro ...

125

Figure 8-8: Controller HIL Hardware Layout

8.3 Test Setup

Tests using similar hardware and model setup prove to be useful for control development. One

could easily test many different control algorithms in different running conditions. As discussed above,

manual and automatic control models were developed to test the engine speed controller used in this

project for engine component level control. Also, motor torque or speed control could be examined using

the same plant models and a similar speed or torque control model.

To validate the engine speed controller, the engine was started then step inputs of generator load

were increased continually after the engine speed settled. During this test, the response of the engine’s

speed, generator’s command and power, along with other data was recorded.

8.4 Results of Controller HIL Tests

Figure 8-9 plots the engine’s command and simulation speeds, while the generator’s commands

are shown in Figure 8-10 and the generator power output in Figure 8-11. These results show a relatively

Page 145: Development and Testing of a Flexible Topology Micro ...

126

stable speed controller when load is increased in a step manner. Engine speed recovers rather quickly, and

generator power steps smoothly relative to its simulated command.

Figure 8-9: Controller HIL Engine Speed Results

Page 146: Development and Testing of a Flexible Topology Micro ...

127

Figure 8-10: Controller HIL Generator Load Demand

Figure 8-11: Controller HIL Generator Power Output

Page 147: Development and Testing of a Flexible Topology Micro ...

128

8.5 Associated Laboratory for Classroom Education

A laboratory experiment procedure is recommended based on the work of this chapter. That is

provided in Appendix D, HIL Laboratory Instructions.

Page 148: Development and Testing of a Flexible Topology Micro ...

Chapter 9

Component Level Control and Communication

This chapter describes the main control algorithm designed for communication and control of the

Berkeley MMHEV components. These sections of code were designed to directly control their component

with minimal input from higher level control such as throttle, brake and on/off state. Typically, each

component level control code handles boot up, run state, shut down, and data recording.

These algorithms are shown in their Simulink and Stateflow application format.

9.1 Engine Control

The engine used for the Berkeley MMHEV was originally designed to run at a constant speed

using a mechanical governor. The Berkeley MMHEV project required a method of changing engine

operation between a speed control and torque control without mechanical input. The master vehicle

controller operates relays for ignition and a throttle valve under servo control to allow rapid test setup

changes for the class room environment. Both modes were not typically used during the same test or

operation mode, but given a proper transition in the control code, this is also a possibility.

9.1.1 Engine Torque Control

Engine torque control was required for engine mapping as well as conventional and parallel

vehicle operation, while engine speed control was used for series vehicle operation.

Page 149: Development and Testing of a Flexible Topology Micro ...

130

To achieve electronic control of an engine that was designed for mechanical speed control,

electronic servos were adapted to the throttle and choke valves. Details about this modification are

discussed in section 3.4.1 Engine Throttle and Choke Mechanical Control, while the control hardware

associated with the electronic servos is detailed in section 3.5.3 Engine Servo Controller.

Closed throttle represents a 2.75 volts signal while wide open throttle corresponds to 5 volts. Any

value in-between is a linear relationship with user input of 0 to 100% throttle position. Equation 9-1

represents throttle position signal.

𝑇𝑕𝑟𝑜𝑡𝑡𝑙𝑒 𝑆𝑖𝑔𝑛𝑎𝑙 = −0.0225 × 𝑈𝑠𝑒𝑟 𝑇𝑕𝑟𝑜𝑡𝑡𝑙𝑒 𝐼𝑛𝑝𝑢𝑡 + 5

Equation 9-1: Throttle Position Signal Equation

9.1.2 Engine Speed Control

Engine speed control was used for series vehicle operation of the Berkeley MMHEV. This mode

of engine control is again achieved by using the electronic servos and controllers in combination with a

Simulink control algorithm running on the master vehicle controller. At the heart of this algorithm is a

classical PID controller. Wrapped around the PID controller are safety checks that ensure stable operation

and prevent over speed. These safety checks will also shut down the engine if an event such as a broken

belt or severe unstable operation is experienced.

Page 150: Development and Testing of a Flexible Topology Micro ...

131

Figure 9-1: Engine Speed Control

Figure 9-1 shows the closed loop control of engine throttle using measured and actual engine

speed to calculate the error signal. The error signal was normalized by multiplying the error signal by the

maximum engine RPM, giving the error signal a range of 0 to 1. A lower level of the PID controller block

is a triggered subsystem that activates operation of the PID block when engine control is desirable. This

eliminates the dangerous accumulation of integral error, because the subsystem is reinitialized to zero

every time it is entered or exits. Figure 9-2 shows the triggered subsystem containing the PID controller

block (with the derivative gain set to zero) and the logic used to enable or disable the system. If measured

engine speed is below 500 RPM, the engine speed controller will not be active.

Figure 9-2: Engine Speed Control Enable/Disable

Page 151: Development and Testing of a Flexible Topology Micro ...

132

The engine speed controller was shown to respond positively to a proportional gain of 1 and an

integral gain of 0.5 after empirical testing under loaded and unloaded conditions. The selected gains and

speed signal are adequate for procedural testing, but more work tuning gains and filtering engine speed

would improve performance and result in smoother operation. Figure 9-3 shows a series of step inputs of

commanded engine speed vs. actual engine speed while a fixed load was applied to the generator. Note

that in the same test, the engine was started by the same generator and stopped by the engine ignition

relay. Algorithms for generator and motor control are detailed in future sections of this chapter.

Figure 9-3: Engine Speed Control Results

Closed loop speed control is made more difficult by the torque and speed variations of a four

cycle, one cylinder engine. One cylinder engines have significant speed fluctuations between the

Page 152: Development and Testing of a Flexible Topology Micro ...

133

combustion and compression strokes. Also, electromagnetic interference from the engine ignition adds

noise to the servo’s PWM signal.

9.2 Motor Control

A level of control is already built into the hardware of the Hi-Performance motors and Curtis

controllers. They accept throttle and brake signals to run the motors in a torque mode, while speed control

required additional algorithms. Controlling these motors consisted of CAN communication algorithms

between the master vehicle controller and each motor system. CAN was the method used to send throttle

and brake signals while reading motor and battery parameters.

The Curtis motor controller provides field oriented control, or the three phase AC motor from a

DC power source. Figure 9-4 illustrates the indirect rotor flux orientation algorithm used by Curtis

controllers, while Figure 9-5 shows the high frequency inverter switching schematic (Curtis Instruments,

Inc., 2008).

Figure 9-4: Curtis Controller Indirect Rotor Flux Orientation (Curtis Instruments)

Page 153: Development and Testing of a Flexible Topology Micro ...

134

Figure 9-5: Curtis Motor Controller Inverter Switching (Curtis Instruments)

Figure 9-6 shows how the Curtis motor controller uses throttle input and closed loop PI control

on motor current to operate the motor. This controller has been tuned by the manufacturer. While

parameters can be changed by the user, they were not for any of the tests performed in this thesis.

Figure 9-6: Curtis Motor Controller Logic (Curtis Instruments)

Page 154: Development and Testing of a Flexible Topology Micro ...

135

A Simulink algorithm was developed to communicate the throttle and brake signals while reading

and sorting motor and battery parameters received over CAN. The following figures show in detail the

steps taken to communicate with one and/or two of the motor controllers. Figure 9-7 illustrates this high

level flow of information, while Figure 9-8 shows all the sub-systems required to accomplish this task of

component level CAN communication and sorting of data when using the Curtis AC motor controllers.

Figure 9-7: Highest Level Motor Control

Figure 9-8: Motor Control Sub-Sections

Page 155: Development and Testing of a Flexible Topology Micro ...

136

Figure 9-9 shows two CAN messages that the primary motor controller will write to the CAN

bus. First are the “Master In Slave Out” (MISO) messages, then the heartbeat message. The MISO using

Curtis Instruments CAN Open logic is the format in which the motor controller will respond to a request

for data. A request for data is a CAN message that is written to the bus by the master vehicle controller

and referred to as a “Master out Slave in” (MOSI) message.

Figure 9-9: Motor Control Read CAN Messages

Figure 9-10: Motor Control CAN Message Decoding

Page 156: Development and Testing of a Flexible Topology Micro ...

137

Figure 9-10 shows the decoding of a CAN Message sent from a motor controller. This format is

specific to Curtis Instruments products. First the message is received by the master vehicle controller.

Then the message is sorted by the length in bytes of each parameter. The control signal, which indicates

the origin of the message, is the first byte (byte 0, bits 0 through 7). The CAN object index, identifying

the data included in the message, is the second and third byte (bytes 1 and 2, bits 8 through 23). The CAN

object sub-index, further defining the data include in the message, is the forth byte or byte 3, bits 24 to 31.

Finally the data requested are represented in the fifth and sixth bytes (byte 4 and byte 5, bits 32 to 47).

These data are first sorted as an unsigned data set, then again as a signed data set. Depending on the

parameter being received, a signed or unsigned data set is required. For example a battery current signal is

signed while a battery voltage signal is unsigned.

In order to read various parameters using one message, the control algorithm must loop through a

request, sorting, and then acknowledgment of each parameter before moving on to the next. Figure 9-11

shows the Stateflow logic that will request the next parameter after acknowledging that the current one

has been received and sorted. Figure 9-12 performs a similar task, except but for writing the throttle and

brake command signals.

Page 157: Development and Testing of a Flexible Topology Micro ...

138

Figure 9-11: Motor Control CAN Message Data Read Looping

Figure 9-12: Motor Control CAN Message Command Write Looping

Page 158: Development and Testing of a Flexible Topology Micro ...

139

Figure 9-13: Motor Control CAN Message Writing Switch (Single Motor)

Figure 9-13 shows the switch that allows either a read request for data to be written or a write

request to write throttle and brake signals to the bus. This switch is necessary because the CAN message

ID for throttle and brake writing is a high priority; if that is written during the time a data message is

being sent, the data message will be missed by the master vehicle controller. This switch ensures all data

are written and read before the next parameter will be requested or written. During a mode in which both

the primary and secondary motors are communicating, it is necessary to adapt this same switch to handle

both motors’ data and commands to ensure no messages are missed. Figure 9-14 shows the logic for

controlling the switch used in a dual motor mode. Figure 9-15 shows the switch used for the dual motor

mode.

Page 159: Development and Testing of a Flexible Topology Micro ...

140

Figure 9-14: Motor Control CAN Message Writing Switch Logic (Dual Motors)

Figure 9-15: Motor Control CAN Message Writing Switch (Dual motors)

Figure 9-16 shows the logic used to start up and shut down communication between the motor

controller and master vehicle controller. Also, this Stateflow code will handle an error that disables the

communication temporarily and restart the communication when the controllers recover.

Page 160: Development and Testing of a Flexible Topology Micro ...

141

Figure 9-16: Motor Controller Communication Start Up and Shut Down Logic

Figure 9-17: Motor Control CAN Message Building

Figure 9-17 shows the building of a CAN message for writing the throttle and brake signals to the

bus. The throttle signal is a signed signal with reverse rotation when negative, and forward rotation when

Page 161: Development and Testing of a Flexible Topology Micro ...

142

the value is positive. The lower right section of code handles this switching between signed throttle and

unsigned brake using the above Stateflow loop’s MOSI state.

9.2.1 Motor Torque Control

Motor torque control is used for electric, series, and parallel vehicle operation as well as the

engine and motor HIL. Torque control of the primary and secondary motors was easily achieved by

simply sending the throttle and brake signals using the above Simulink and Stateflow code.

9.2.2 Motor Speed Control

Motor speed control is used for engine dynamometer testing and motor HIL. Motor speed control

is achieved by defining the requested motor speed and using the PID control in Figure 9-18 to generate

the throttle and brake signals, and to write using the above communication.

Page 162: Development and Testing of a Flexible Topology Micro ...

143

Figure 9-18: Motor Speed Control

9.2.3 Dual Motor Control

Special consideration to communication was required to obtain control of both the primary and

secondary motors. A loop was put in place to ensure all data were written and read because of the high

priority of both the primary and secondary motors’ throttle and brake commands. Without this loop,

primary and secondary data are missed when a throttle or brake command is written to the network.

9.3 Electronic Clutch Control

Clutch control is relatively simple and only requires a relay to activate. Figure 9-19 shows the

input of primary motor speed and the two outputs, a relay signal and state of the logic. Figure 9-20 details

the logic of the clutch control. In this code, the clutch stays closed after it is activated. This code is used

when the dual traction motor setup is desired. For parallel or conventional operation, different code is

Page 163: Development and Testing of a Flexible Topology Micro ...

144

required. The electronic clutch must be engaged at a substantial differential speed, because a zero

differential will cause an unbalanced engagement.

Figure 9-19: Electronic Clutch Control

Figure 9-20: Electronic Clutch Control Logic

9.4 Battery Control

The Lithium Technology battery pack includes a Battery Management System (BMS) with CAN

communication requiring similar coding as motor communication. The NiMH battery packs do not have

Page 164: Development and Testing of a Flexible Topology Micro ...

145

active management or any sensors in the vehicle. All battery data for these packs were measured using the

motor controllers.

9.4.1 State of Charge Calculation

The Lithium Technology battery management system sends calculated state of charge to the

master vehicle controller over CAN. The NiMH packs used do not have a BMS therefore required an

algorithm is required to initialize and calculate battery SOC.

Figure 9-21 shows the sections of code used to measure battery SOC. The SOC calculation

includes initial SOC calculation using open circuit voltage, then applies Coulomb counting to calculate

battery SOC once current starts to flow.

Figure 9-21: Battery State of Charge Calculation

Figure 9-22 shows the logic used to detect initial battery voltage. This initial battery voltage,

assumed to be a relaxed voltage, is then sent to an open circuit voltage vs. SOC map to determine the

initial SOC. When the final state in the logic string is reached, the flow of current from each motor is

summed and integrated to determine battery SOC.

Page 165: Development and Testing of a Flexible Topology Micro ...

146

Figure 9-22: Initial Battery State of Charge Logic

Figure 9-23: Battery State of Charge Current Integration Coulomb Counting

Figure 9-23 shows the integration of summed current that is initialized by the initial SOC in

capacity form. Then current capacity is divided by total capacity to calculate current SOC. Equation 9-2

represents the formula used in Figure 9-23.

𝐵𝑎𝑡𝑡𝑒𝑟𝑦 𝑆𝑡𝑎𝑡𝑒 𝑜𝑓 𝐶𝑕𝑎𝑟𝑔𝑒 = 𝐼𝑛𝑖𝑡𝑎𝑙 𝑆𝑂𝐶 + 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 × 𝑇𝑖𝑚𝑒 𝑑𝑡

𝑀𝑎𝑥𝑖𝑚𝑢𝑚 𝐵𝑎𝑡𝑡𝑒𝑟𝑦 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦

Equation 9-2: Battery State of Charge Equation

Page 166: Development and Testing of a Flexible Topology Micro ...

147

9.5 Digital Scale

A digital scale was utilized to measure fuel use and to calculate fuel rate during an engine test.

Figure 9-24 shows the Simulink code used to read RS232 scale data. A rate translation is in place because

the Baud rate of the scale is less than the 100 Hz frequency vehicle controller code.

Figure 9-24: Digital Scale Communication

9.6 Vehicle Speed

The vehicle speed calculation uses the primary motor speed, because the primary motor is always

on line and moving if the vehicle is moving. Figure 9-25 shows the Simulink code to calculate vehicle

speed from primary motor speed, and Equation 9-3 details the parameters.

Page 167: Development and Testing of a Flexible Topology Micro ...

148

Figure 9-25: Vehicle Speed Calculation

𝑉𝑒𝑕𝑖𝑐𝑙𝑒 𝑆𝑝𝑒𝑒𝑑 𝑀𝑃𝐻

= −1 × 𝐺𝑒𝑎𝑟 𝑅𝑎𝑡𝑖𝑜𝑀𝑜𝑡𝑜𝑟 𝑡𝑜 𝑇𝑟𝑎𝑛𝑠 × 𝐺𝑒𝑎𝑟 𝑅𝑎𝑡𝑖𝑜𝑇𝑟𝑎𝑛𝑠 𝑡𝑜 𝐷𝑖𝑓𝑓

× 𝐶𝑜𝑛𝑣𝑒𝑟𝑠𝑖𝑜𝑛 𝑓𝑟𝑜𝑚 𝑅𝑃𝑀 𝑡𝑜 𝑀𝑃𝐻

Equation 9-3: Vehicle Speed Calculation

9.7 Drive Input

Throttle and brake pedal position signals were needed to allow the operator to input requests to

operate the vehicle. Figure 9-26 shows the input signals from the throttle and brake potentiometers, which

are converted to 0 to 100% signals.

Figure 9-26: Driver Input

Page 168: Development and Testing of a Flexible Topology Micro ...

Chapter 10

Full Vehicle Control

This chapter details the combination of the component level control algorithms and a high level

control to allow for full vehicle operation. These integrate the throttle and brake signals from the driver

pedals, as well as handle the start up and shut down of the components automatically without any other

driver input.

A key decision in series, parallel and series/parallel control algorithms is when and how to run the engine; this

engine; this has a great effect on fuel economy. Knowing each component’s power relative to road load is important.

important. Figure 10-1 shows the available force of each component relative to road load and speed. This schedule is

useful in deciding which component should be used for traction force in a given situation. Table 10-1 lists the

parameters measured and used to calculate vehicle road load. Road load is the summation of vehicle drag resistance and

rolling resistance. Vehicle drag is calculated using

Equation 10-1 and rolling resistance is calculated using a 4th degree polynomial defined in the

PSAT initialization file of Appendix E.

𝑉𝑒𝑕𝑖𝑐𝑙𝑒 𝐷𝑟𝑎𝑔 = 0.5 × 𝐷𝑒𝑛𝑠𝑖𝑡𝑦 𝑜𝑓 𝐴𝑖𝑟 × 𝐷𝑟𝑎𝑔 𝐶𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡 × 𝐹𝑟𝑜𝑛𝑡𝑎𝑙 𝐴𝑟𝑒𝑎 × 𝑆𝑝𝑒𝑒𝑑2

Equation 10-1: Vehicle Drag Force

Page 169: Development and Testing of a Flexible Topology Micro ...

150

Figure 10-1: Component Force Relative to Road Load

Berkeley Road Load Vehicle Parameters

Glider Mass 235 kg

Frontal Area 0.5 m2

Drag Coefficient 0.33

Table 10-1: Road Load Vehicle Parameters

9.1 Electric Only Vehicle Control

Electric vehicle operation requires a simple system level control algorithm. The main task of this

algorithm is to measure user input in the form of throttle and brake pedal position, and then forward these

signals to the motor controller. The second task of this algorithm is to read, record, and display data to the

operator. To perform these tasks, the primary motor controller, driver input, SOC calculation, and vehicle

Page 170: Development and Testing of a Flexible Topology Micro ...

151

speed blocks are integrated together. There are no higher level controls with the single motor electric

vehicle mode.

Figure 10-2: Single Motor Electric Vehicle Control

Figure 10-3: Dual Motor Electric Vehicle Control

Page 171: Development and Testing of a Flexible Topology Micro ...

152

The same simple control algorithm is used for dual motor operation. The only differences are the

addition of the clutch block, additional driver block and the combined dual motor operation block

replacing the primary motor block. Figure 10-3 shows these blocks. Again there is no high level control,

only an enable and disable signal based on clutch engagement. This was performed by limiting the

secondary motor system driver block to an active state when the primary motor speed was greater than

200 RPM and the clutch engaged.

9.2 Series Hybrid Vehicle Control

Two vehicle control algorithms were developed to operate the Berkeley MMHEV in a series

hybrid mode. The first series control algorithm is for a Plug-In Hybrid Electric Vehicle (PHEV), charge

depleting SOC operation and the second is an HEV charge sustaining SOC operation. The differences are

minimal: simply different SOC values to command on and off states of the APU. Typically an PHEV is

assumed to be at high initial SOC and will drop to a region where SOC is then sustained. An HEV will

always be operated in the region where SOC is sustained.

9.2.1 State of Charge Non-Depleting

The non-depleting or HEV series operation of the Berkeley MMHEV is one in which the APU

attempts to maintain an 80% SOC. Given the relatively low peak power output of the APU, this is

accomplished by running the APU at a high duty cycle. Figure 10-4 shows the sections of code that are

assembled to make the series HEV control algorithm. The algorithm includes the combination of the dual

motor control, driver input, SOC calculation, and vehicle speed calculation Simulink blocks. Also, a new

high level APU control block is integrated to control engine starting, stopping, and generation states

automatically with no input from the operator.

Page 172: Development and Testing of a Flexible Topology Micro ...

153

Figure 10-4: Series Vehicle Control

Figure 10-5 illustrates the logic used to initialize and start the engine below 80% SOC, generate

at one of three states, and shut down the APU if 85% SOC is reached. The three levels of power

generation are guesses and need further tuning. The basic principle is to generate at low power while at

low speed to minimize noise, then run at higher power levels at higher speed where noise is more

acceptable. When vehicle speed is increased, power is required and louder operation is also more

tolerable.

Page 173: Development and Testing of a Flexible Topology Micro ...

154

Figure 10-5: Series Vehicle Control APU Logic

9.2.2 State of Charge Depleting – Plug in Hybrid Electric Vehicle (PHEV)

The all electric range of the Berkeley MMHEV using the Motorcraft NiMH pack is

approximately 20 miles. The PHEV charge depleting algorithm is similar to the HEV algorithm, except

the vehicle operates within its all electric range (AER) until the SOC depletes from 100% to a much lower

SOC of 30%, where the APU comes on to maintain SOC. The SOC value in which the APU is

commanded on in this state was 30% and off at 40%. This mode enables all electric operation and is

intended for trip distances less than the remaining AER.

Page 174: Development and Testing of a Flexible Topology Micro ...

155

9.3 Parallel Hybrid Vehicle Control

A parallel control algorithm could be developed to run the Berkeley MMHEV using electric

control of the clutch and APU systems in a unique way. The most efficient use of the engine at high

speeds would be to clutch it to the road and use its power to propel the vehicle. The events of coupling

and decoupling are challenging with the current hardware. To run the Berkeley MMHEV in this mode,

the engine must couple to the road at speeds greater than 30 MPH and decouple at speeds lower than 25

MPH. First matching engine speed and drive line speed then engaging smoothly requires extensive

testing. The current Simulink code to perform this task requires more tuning before repeated cycling can

be tested. Successful testing in this vehicle mode has not yet been achieved.

9.4 Series / Parallel Hybrid Vehicle Control

Using the above parallel and series controls, an algorithm could be developed to switch between

the two to use the most efficient mode under the current operating conditions. This vehicle mode cannot

be tested until the parallel vehicle mode control is complete.

9.5 Conventional Vehicle Control

Conventional operation is difficult in the Berkeley MMHEV because of the high road load

relative to the engine power output. But it is possible in a blended parallel mode: using the primary motor

to get the vehicle to high enough speeds so that the road load is low enough that the engine can continue

to power the vehicle alone. This vehicle mode cannot be exercised until the engine engagement algorithm

is reliable. Currently the engagement event is dangerously violent and should be calibrated on a chassis

dynamometer before full vehicle testing is performed.

Page 175: Development and Testing of a Flexible Topology Micro ...

Chapter 11

Full Vehicle Testing

This chapter presents results of full vehicle testing in different modes of operation. The

above full vehicle and component level control algorithms were loaded into the Berkeley MMHEV. The

vehicle was then driven in a safe environment on asphalt roads. During the multiple trips, data were

recorded for each mode loaded into the vehicle. With the traces of vehicle speed, a PSAT full vehicle

model of the corresponding mode was exercised to compare actual vehicle results with the full PSAT

vehicle model. Differences in results may be present because the Berkeley MMHEV does not always use

the same control algorithm as PSAT models.

11.1 Electric Vehicle Mode Results

This section presents results recorded from driving the Berkeley MMHEV in a single traction

motor mode and a dual traction motor mode. The dual motor mode was achieved by using two motors

along with an electronic clutch to increase available traction power.

11.1.1 Single Motor Electric Vehicle Mode

Using the single motor electric vehicle control algorithm in Figure 10-2, the Berkeley MMHEV

was driven and data recoded. Multiple cycles were recorded and archived, while two are presented for

results comparison.

Also, using the recorded speed during the single motor EV operation, an EV PSAT model was

exercised and model results recorded. The following figures compare results from driving the Berkeley

MHEV in an EV mode and PSAT results of the Berkeley MMHEV in a similar EV mode. The data

Page 176: Development and Testing of a Flexible Topology Micro ...

157

shown were recorded while the motors were in a limited regenerative mode. This limit was set

intentionally to protect the drive belts from breaking if overloaded due to high regenerative braking

torques. Figure 11-1 and Figure 11-5 show battery voltage data and the simulation of battery voltage from

the similar PSAT model for EV runs 1 and 2. Note that PSAT battery voltage recovers quickly, while the

real battery takes some time to recover after a large current draw; PSAT data also show significant

regenerative braking while the recorded data do not.

Figure 11-1: Electric Vehicle Mode Run 1 Battery Voltage

Figure 11-2 and Figure 11-6 show battery current and the simulation of battery current from the

similar PSAT model for EV runs 1 and 2. The PSAT results show a lower current draw than the actual

vehicle uses. This may be because the vehicle road load is under estimated.

Figure 11-3 and Figure 11-7 show battery SOC and the simulation of battery SOC from the

similar PSAT model for EV runs 1 and 2. The PSAT SOC decreases at a slower rate because of the

decrease in current draw. Again, this is probably caused of an under estimate in vehicle road load.

Page 177: Development and Testing of a Flexible Topology Micro ...

158

Figure 11-4 and Figure 11-8 show the vehicle speed during vehicle testing. The same vehicle

speed is fed into the PSAT model for simulations.

Figure 11-2: Electric Vehicle Mode Run 1 Battery Current

Page 178: Development and Testing of a Flexible Topology Micro ...

159

Figure 11-3: Electric Vehicle Mode Run 1 Battery State of Charge

Figure 11-4: Electric Vehicle Mode Run 1 Vehicle Speed

Page 179: Development and Testing of a Flexible Topology Micro ...

160

Figure 11-5: Electric Vehicle Mode Run 2 Battery Voltage

Figure 11-6: Electric Vehicle Mode Run 2 Battery Current

Page 180: Development and Testing of a Flexible Topology Micro ...

161

Figure 11-7: Electric Vehicle Mode Run 2 Battery State of Charge

Figure 11-8: Electric Vehicle Mode Run 2 Vehicle Speed

Page 181: Development and Testing of a Flexible Topology Micro ...

162

11.1.2 Dual Motor Electric Vehicle Mode

The Berkeley MMHEV was then loaded with the dual motor electric vehicle control algorithm

from Figure 10-3. Multiple trips were recorded and archived. One test is presented here, but was not

modeled in PSAT. Only real vehicle results are presented. Because of hardware failure, a full exercise of

the dual motor mode at high power was not possible. In this mode the vehicle has a maximum power of

40.8 kW, compared to the 26.4 kW in a single electric motor mode. The power is contributed by the

primary and secondary motor controllers with 550 and 300 Amperes, respectively. Because the battery

can handle currents of 900 amps for periods of 10 seconds, the system is motor controller limited. High

drive torque caused a drive shaft key failure and limited testing. Figure 11-9 shows the battery voltage

during the dual motor test, while Figure 11-10 shows total battery current for each machine. Future testing

an analysis will be required to determine what peak drive torque the hardware can safely sustain and what

power level is safe and practical for the dual motor mode.

Page 182: Development and Testing of a Flexible Topology Micro ...

163

Figure 11-9: Dual Motor Electric Vehicle Mode Battery Voltage

Figure 11-10: Dual Motor Electric Vehicle Mode Motor Currents

Page 183: Development and Testing of a Flexible Topology Micro ...

164

Figure 11-11 shows the battery SOC during the test while Figure 11-12 shows each motor’s speed

output. The SOC plot shows a zero SOC until initial SOC is calculated. In Figure 11-12 the early

difference in motor speed represents an open clutch. The point highlighted with a circle indicates the time

in which the electric clutch was activated and the motors were locked together.

Figure 11-11: Dual Motor Electric Vehicle Mode Battery State of Charge

Page 184: Development and Testing of a Flexible Topology Micro ...

165

Figure 11-12: Dual Motor Electric Vehicle Mode Motor Speeds

Figure 11-13: Dual Motor Electric Vehicle Mode Vehicle Speed

Page 185: Development and Testing of a Flexible Topology Micro ...

166

Figure 11-13 shows a trace of vehicle speed with a section showing 0 to 50 MPH acceleration in

approximately 12 seconds with less than a 30 % throttle input for each motor. Acceleration time with

maximum throttle is estimated to be approximately 8 seconds 0 to 60. This must be tested with a stronger

differential allowing for the high power transmission.

11.2 Series Engine Mode Results

This section presents results from driving the vehicle using the series HEV (non-depleting)

control algorithm from Figure 10-4. A PSAT model of the Berkeley MMHEV hardware was exercised

using the trace speed recoded during series HEV operation. The real vehicle and PSAT model use the

same hardware but slightly different control algorithms. For the following test, 90% SOC was used for

the on state of the APU to show engine operation. Figure 11-14 plots the results of battery voltage, with

PSAT predicting a slightly lower voltage. Figure 11-15 plots the results of motor currents while Figure

11-16 shows battery SOC. The PSAT model did not ever get to a point where the engine would run and

the generator produce power. The model continued to try to start the engine unsuccessfully. This

unnecessarily reduced battery SOC. As mentioned before, the PSAT series control algorithm does not

operate in a reliable manner, and attempts to improve it have been unsuccessful.

Page 186: Development and Testing of a Flexible Topology Micro ...

167

Figure 11-14: Series Engine Mode Battery Voltage

Figure 11-15: Series Engine Mode Motor Current

Page 187: Development and Testing of a Flexible Topology Micro ...

168

Figure 11-16: Series Engine Mode Battery State of Charge

Figure 11-17: Series Engine Mode Engine Speed

Page 188: Development and Testing of a Flexible Topology Micro ...

169

Figure 11-17 plots engine speed , and shows the failure for the PSAT engine to start while the

real engine starts and runs smoothly and the APU produces electrical power.

Figure 11-18: Series Engine Mode Vehicle Speed

Figure 11-18 shows the speed fed into the PSAT simulation, and indicates a good match with

little deviation. This is possible because the series operation is separate from the traction drive and is not

effected by low SOC.

11.3 Parallel Mode Results

Successful parallel test were not performed due to time constraints. This will be discussed in

future work.

Page 189: Development and Testing of a Flexible Topology Micro ...

170

11.4 Conventional Mode Results

Successful conventional test were not performed due to a time constraints, as discussed in future

work.

Page 190: Development and Testing of a Flexible Topology Micro ...

Chapter 12

Conclusions and Future Work

This thesis has shown the design, characterization, component level testing and modeling, as well

as full system testing of an HIL test bench and HEV powertrain. Many model and data results compare

positively. A useful tool was developed for instruction of HIL techniques. This system has also been

shown to be useful as a teaching tool for control development and testing on a new unique multiple mode

HEV.

For future work, optimization would greatly benefit the performance and robustness of the

system. Many possibilities are present for future work in control development and testing on this unique

test bench and vehicle.

The system has tested to show substantial fuel efficiency but more improvements are

recommended that will increase the value. Electric clutch engagement strategies would allow for parallel

and conventional modes. An optimal APU gear ratio or increased engine power output would make the

vehicle more charge sustaining.

Additional sensor integration would help refine characterization data and allow for less noise

feedback during HIL simulations. Integration of a torque sensor in place of the electronic clutch would

allow for more accurate engine and motor HIL testing.

Page 191: Development and Testing of a Flexible Topology Micro ...

Appendix A

Simulink Models

High level models are shown here. For greater detail see the associated digital file.

A-1: Berkeley MMHEV Conventional Mode PSAT Model

Page 192: Development and Testing of a Flexible Topology Micro ...

173

A-2: Berkeley MMHEV Electric Vehicle Mode PSAT Model

Page 193: Development and Testing of a Flexible Topology Micro ...

174

A-3: Berkeley MMHEV Series Mode PSAT Model

Page 194: Development and Testing of a Flexible Topology Micro ...

175

A-4: Berkeley Electric Vehicle Control Model

A-5: Berkeley Electric Vehicle Control Model (dual motor)

Page 195: Development and Testing of a Flexible Topology Micro ...

176

A-6: Berkeley Series Vehicle Control Model

Page 196: Development and Testing of a Flexible Topology Micro ...

Appendix B

Wire Diagrams

Page 197: Development and Testing of a Flexible Topology Micro ...

178

Po

we

r C

on

ve

rte

r

Mo

du

le

Ad

va

nte

ch

Co

mp

ute

r

Ve

hic

le C

on

tro

ller

Red

Lio

n -

Fre

quen

cy to

Vol

tage

Con

vert

er

Ve

hic

le C

on

tro

ller

Ad

va

nte

ch

Co

mp

ute

r

Bre

ak-O

ut B

oa

rd

Re

lay B

ox

Fo

r D

eta

ils

Se

e R

ela

y B

ox W

ire

Dia

gra

m

5 V

olt –

DC

-DC

ou

tpu

t

Un-f

use

d

so

lid g

ree

n (

+)

gre

en

/wh

ite

(-)

Gro

un

d S

trip

Primary Motor Fan

Fuse # 1 (5 amps)

Secondary Motor Fan

Fuse # 2 (5 amps)Fuse # 3

Monitor

Fuse # 4 (2 amps)Fuse # 5

Primary Motor

Can Isolator

Fuse # 6 (2 amps)

Secondary Motor

Can Isolation

Fuse # 7 (2 amps)

12

Vo

lt F

use

Blo

ck

24

Vo

lt F

use

Blo

ck

12 Volt – DC-DC output

Un-fused

solid red (+)

red/white (-)

24 Volt – DC-DC output

Un-fused

solid yellow (+)

yellow/white (-)

Gro

un

d S

trip

Vehicle Controller

Fuse # 1 (10 amps)Fuse # 2 Fuse # 3 Fuse # 4 Fuse # 5

Fuse # 6 Fuse # 7

24 volt input

ground

Hig

h V

olta

ge

In

pu

t

(-)

gro

un

d

Hig

h V

olta

ge

In

pu

t

(+)

48

vo

lts

ca

se

gro

un

d

iso

late

d fro

m h

igh

vo

lta

ge

all

DC

-DC

in

pu

ts a

nd

ou

tpu

ts

Manual Switch

Enable Relay Box

USB – Touch

Screen

12 Volt Power

Monitor Power

PCI 1716 AI AD DI DO

CA

N #

1

CA

N #

2

VG

A

VGA

CA

N Is

olat

ion

/ Rep

eate

r

Prim

ary

Mot

or

Inte

rnal

ly T

erm

inat

ed

On

Bot

h E

nds

Gro

un

d

10

– 3

0 V

olts D

CCA

N Is

olat

ion

/ Rep

eate

r

Sec

onda

ry M

otor

Inte

rnal

ly T

erm

inat

ed

On

Bot

h E

nds

CA

N G

rou

nd

Gro

un

d

10

– 3

0 V

olts D

C

CA

N H

igh

CA

N L

ow

CA

N G

rou

nd

CA

N H

igh

CA

N L

ow

Manual Switch

CA

N G

rou

nd

CA

N H

igh

CA

N L

ow

48

Vo

lts

48

Vo

lts

Prim

ary

Mo

tor

Ga

ug

eS

eco

nd

ary

Mo

tor

Ga

ug

e

Se

co

nd

ary

Mo

tor

Ha

rne

ss

Prim

ary

Mo

tor

Ha

rne

ss

12

Vo

lt P

ow

er

Mo

tor

Fa

ns

Re

lay S

witch

es

48

Vo

lt P

ow

er

Su

pp

ly

Co

nta

cto

rs

Secondary Motor Harness

Primary Motor Harness

High Voltage Battery

CA

N G

rou

nd

CA

N H

igh

CA

N L

ow

En

gin

e Ig

nitio

n

Engine Ignition

Ju

nctio

n B

ox

Fo

r D

eta

iled

Dia

gra

m S

ee

Ju

nctio

n B

ox W

ire

Dia

gra

m

Motor Cooling Fans

12 Volt Power to Junction Box

12

Vo

lt P

ow

er

to C

AN

Iso

lato

rs

Vehicle Controller Power

Dig

ita

l O

ut

Re

lay C

on

tro

l

Gro

un

d

9 –

32

Vo

lts D

C

Gro

un

d

Ou

tpu

t S

ign

al

Inp

ut

Inp

ut

En

gin

e S

pe

ed

Se

nso

r

Engine Speed Signal

12 Volt Power From Vehicle Controller

Co

ntr

ol S

yste

m W

ire

Dia

gra

m

To

En

gin

e B

ay W

irin

g

To

Hig

h V

olta

ge

Ba

tte

ry

Pa

ck W

irin

g

Page 198: Development and Testing of a Flexible Topology Micro ...

179

12 Volt DC Fan

0.3 Amp

Lineage PowerModel # QBW018A0B1Z

36 - 75 Volt, 7 Amp (Max.) DC input12 Volt, 18 Amp (Max.) DC output

LambdaModel # PAH200S 48-24/V

36 - 76 Volt, 7 Amp (Max.) DC input24 Volt, 8.4 Amp (Max.) DC output

Cin

con

EC3SA

-48S053

6-7

5v 7

7m

A in

pu

t

5v 6

00

mA

ou

tpu

t

(-) 48 Volts

High Voltage

Ground

(Black)

V+ input

V- input

Ceramic Capacitor

2KVAC 4700pF

2 Amp Fuse

250 V, 15 Amp

Fuse

10 Amp Fuse

2 Amp Fuse

Fan Power

Supply

CTRL

V- output

V+ output

NC

NC

Cin

con

EC3SA

-48S053

6-7

5v 7

7m

A in

pu

t

5v 6

00

mA

ou

tpu

t

V+ input

V- input

CTRL

V- output

V+ output

NC

NC

V+ input

V- input

CNT

V- output

V+ output

CASE

TRM

V- output

V+ output

on/off

V+ input

V- input

-S

+S

Electrolytic Capacitor

100V 33uF

470uFFilm Capacitor

50V 1uF

Air F

low

Case Ground

1 Amp Fuse

(+) 48 Volts

High Voltage

Positive

(White)

+ 2

4 V

olts

- 2

4 V

olts

+ 1

2 V

olts

- 1

2 V

olts

+ 5

Vo

lts (

1)

- 5

Vo

lts (

1)Power Converter Module

Orange Wires -> 48 Volts DC, Orange (+), Black (-), (high voltage battery)

Yellow Wires -> 24 Volts DC, Yellow (+), Yellow and White (-)

Red Wires -> 12 Volts DC, Red (+), Red and White (-)

Green Wires -> 5 Volts DC, Green (+), Green and White (-)

All Output Grounds Are

Tied Together

Page 199: Development and Testing of a Flexible Topology Micro ...

180

Be

rke

ley –

Ju

nctio

n B

ox

Fu

se

d 4

8 V

olt P

ow

er

(Fu

se

# 2

)

Fu

se

d 4

8 V

olt P

ow

er

(Fu

se

# 1

)

Se

co

nd

ary

Mo

tor

Ke

y

Se

co

nd

ary

Mo

tor

Co

nta

cto

r 1

Se

co

nd

ary

Mo

tor

Co

nta

cto

r 2

Se

co

nd

ary

Mo

tor

Ga

ug

e

Bu

tto

n In

pu

t

Prim

ary

Mo

tor

Ke

y

Prim

ary

Mo

tor

Co

nta

cto

r 1

Prim

ary

Mo

tor

Co

nta

cto

r 2

Prim

ary

Mo

tor

Ga

ug

e

Bu

tto

n In

pu

t

En

gin

e Ig

nitio

n

Re

lay 1

En

gin

e Ig

nitio

n

Re

lay 2

Se

co

nd

ary

Mo

tor

Ke

y

Re

lay 1

of 2

Prim

ary

Mo

tor

Ke

y

Re

lay 1

of 2

Se

co

nd

ary

Mo

tor

Ke

y

Re

lay 2

of 2

Ba

tte

ry C

on

tacto

r

(Se

co

nd

ary

) 1

Ba

tte

ry C

on

tacto

r

(Se

co

nd

ary

) 2

Prim

ary

Mo

tor

Ke

y

Re

lay 2

of 2

Ba

tte

ry C

on

tacto

r

(Prim

ary

) 1

Ba

tte

ry C

on

tacto

r

(Prim

ary

) 2

En

gin

e Ig

nitio

n 1

En

gin

e Ig

nitio

n 2

1 2 3 4 5 6 7 8 9 10

11

12

Se

co

nd

ary

Mo

tor

Fa

n

Re

lay 2

12

Vo

lt G

rou

nd

Prim

ary

Mo

tor

Fa

n

Re

lay 2

12

Vo

lt G

rou

nd

12

Vo

lt G

rou

nd

Prim

ary

Mo

tor

Fa

n

Re

lay 1

Se

co

nd

ary

Mo

tor

Fa

n

Re

lay 1

En

gin

e T

hro

ttle

Mo

du

le

Po

we

r In

pu

t 1

(V

eh

.co

nt)

En

gin

e T

hro

ttle

Mo

du

le

Po

we

r In

pu

t 2

(V

eh

.co

nt)

Fu

se

d 4

8 V

olt P

ow

er

(Fu

se

# 4

)

Fu

se

d 4

8 V

olt P

ow

er

(Fu

se

# 3

)

Se

co

nd

ary

Mo

tor

Fa

n (

+)

Se

co

nd

ary

Mo

tor

Fa

n (

-)

Prim

ary

Mo

tor

Fa

n (

+)

Prim

ary

Mo

tor

Fa

n (

-)

Gro

un

d (

Co

mm

on

with

48

.12

. a

nd

5 v

olt g

rou

nd

)

Fu

se

d 1

2 V

olt P

ow

er

(Fu

se

# 1

)

Fu

se

d 1

2 V

olt P

ow

er

(Fu

se

# 2

)

Fu

se

d 1

2 V

olt P

ow

er

(Fu

se

# 3

)

En

gin

e T

hro

ttle

Mo

du

le

Re

lay 1

En

gin

e T

hro

ttle

Mo

du

le

Re

lay 2

1 2 3 4 5 6 7 8 9 10

11

12

Te

rmin

al #

1

Te

rmin

al #

2

Se

co

nd

ary

Mo

tor

Ha

rne

ss

Prim

ary

Mo

tor

Ha

rne

ss

En

gin

e Ig

nitio

n &

12

Vo

lt P

ow

er

Po

we

r to

Fa

ns &

En

gin

e T

hro

ttle

Mo

du

le

Sw

itch

Re

lay B

ox H

arn

ess

48

Vo

lt P

ow

er

& C

on

tacto

rs

Page 200: Development and Testing of a Flexible Topology Micro ...

181

Page 201: Development and Testing of a Flexible Topology Micro ...

Appendix C

Motor and Controller Dynamometer Results

Page 202: Development and Testing of a Flexible Topology Micro ...

183

Page 203: Development and Testing of a Flexible Topology Micro ...

184

Page 204: Development and Testing of a Flexible Topology Micro ...

185

Page 205: Development and Testing of a Flexible Topology Micro ...

Appendix D

HIL Laboratory Instructions

This appendix includes all of the suggested laboratory experiments to be exercised using the

Berkeley MMHEV powertrain / HIL test bench system.

Battery HIL Simulation

This laboratory experimentation is designed to exercise a high voltage battery used in electric or

hybrid electric vehicles with known characteristics using hardware-in-the-loop techniques

Hardware

Berkeley MMHEV battery pack – 4, 12 Volt NiMH modules in series

ABC150

Advantech Computer

Advantech PCI 1716 Analog and Digital I/O Board (with break out board and Tera Soft Dirvers)

National Instruments ER-16 Relay Box

Current Sensor (with power supply)

Voltage Divider

Analog Signal Isolation

Laboratory Power Supply

Laptop or PC with Matlab Simulink xPC Target, Real Time Workshop, and PSAT Software

Page 206: Development and Testing of a Flexible Topology Micro ...

187

Procedure

1) Using the laptop or PC load PSAT software and import the Berkeley MMHEV Initialization

files given. (if all Berkeley MMHEV models are loaded simply open PSAT, “Light Duty”

and continue)

a. Copy all Berkeley MMHEV initialization files to their correlating directory under the

PSAT installed directory (default C:PSATv62_SP1\component\initialization\...)

Example- copy the battery initialization file, ess_nimh_60_40_Mastercraft, to the

energy storage folder. (default

C:PSATv62_SP1\component\initialization\energy_storage)

b. Open PSAT, selecting “Light Duty”

c. Select Setup then components from the top menu

d. Use this GUI to select each component, its Model/Technology, and then the Related

Files tab and use the Add… button to add the corresponding initialization file

e. Save and continue until all Berkeley MMHEV components are loaded. (It may be

necessary to restart PSAT to use the new models)

2) Using given initialization files for the Berkeley MMHEV build a PSAT model of the desired

test mode: EV, Series HEV , Parallel HEV, or Series/Parallel HEV

a. Select desired vehicle configuration under Vehicle then Drivetrain Configuration

Page 207: Development and Testing of a Flexible Topology Micro ...

188

b. Select each Berkeley MMHEV component for the selected configuration under the

Vehicle then Drivetrain Components, select initial conditions for each such as initial

SOC

c. Select desired control strategy under Vehicle then Controller/Strategy

d. At this point the PSAT model can be saved for future use

3) Select a desired drive cycle (UDDS, HWFET, etc…) under Simulation Setup

4) Select the Run Simulation Tab then load rerun00.m and select Run the Simulation… button

to build and run the model (DO NOT CLOSE WHEN MODEL IS FINISHED RUNNING)

5) When results are seen and the model is finished running select Matlab then Launch Desktop

on the top menu

6) With Matlab open navigate to the current model (default – saved simulations\(model with

configuration cycle and time stamp))

7) With PSAT still open select the model that had just run and make changes to allow for

simulation, co-simulation, and HIL simulation

a. Input required drivers for hardware used to communicate and measure data

i. Using Advantech 1716 Tera Soft drivers are required

ii. Insert analog inputs for real battery current and voltage

iii. Insert an analog output to command the ABC 150. Insert commands for a

relay to turn on and off the analog signal to the ABC150 ( upon boot up the

Advantech outputs -5 volts, this could cause an undesired command to get to

the ABC 150 without a relay controlling when it does)

b. Select the battery model in the powertrain_model subsystem and input switches on

inputs and outputs to allow for switching from simulation to co-simulation and HIL

modes

Page 208: Development and Testing of a Flexible Topology Micro ...

189

c. Mux all relavant data together and send to a single ouput on the highest level of the

simulink model

d. Save a mode in each set up (simulation, co-simulation, and HIL) as a new model but

do not close PSAT or Matlab and do not delete the workspace

8) In the models just saved select Simulation then Configuration Parameters

a. Under Data Import/Export uncheck Limit data points to last:

b. Under Real-Time Workshop change System target file: to xpctarget.tlc

c. Select Apply and close window

9) With a properly setup compiler and xPC Target defined (see xPC Target setup in Matlab

Help) select Tools, Real-Time Workshop, then Build Model in each of the Simulink Models

10) Setup hardware and sensors to measure data

a. Connect the 48 Volt battery pack to the leads of the ABC 150

b. Connect sensors to the required ports of the break out board and isolation boards ( be

sure to isolate all signals into the Advantech Computer)

c. Connect the analog output through a relay to the ABC 150 analog input

11) Run the Compiled model in simulation mode, record data and ensure the battery current and

voltage are within a range that can be safely tested on the ABC 150

12) Cycle the tested battery to the SOC set in the model, let rest for one hour

13) Load ABC150 script that allows for Advantech control (see Appendix F ABC 150 Script)

14) Run the compiled model in co-simulation mode and record data

15) Cycle the tested battery to the SOC set in the model, let rest for one hour

16) Load ABC150 script that allows for Advantech (see Appendix F ABC 150 Script)

17) Run the compiled model in HIL mode and record data

Page 209: Development and Testing of a Flexible Topology Micro ...

190

Analysis

Using recorded data from simulation, co-simulation, and HIL runs compare, pack voltage,

current, and SOC. Does the PSAT model for the tested battery accurately represent the pack?

Engine HIL Simulation

This laboratory experimentation is designed to exercise an internal combustions engine similar to

one used in hybrid electric vehicles with known characteristics using hardware-in-the-loop techniques

Hardware

Berkeley MMHEV

Digital Scale with serial output

Tank of Gasoline

Laptop or PC with Matlab Simulink xPC Target, Real Time Workshop, and PSAT Software

Procedure

1) Using the laptop or PC load PSAT software and import the Berkeley MMHEV Initialization

files given. (if all Berkeley MMHEV models are loaded simply open PSAT, “Light Duty”

and continue)

a. Copy all Berkeley MMHEV initialization files to their correlating directory under the

PSAT installed directory (default C:PSATv62_SP1\component\initialization\...)

Example- copy the engine initialization file, eng_si_190_5_berkeley, to the engine

folder. (default C:PSATv62_SP1\component\initialization\engine)

Page 210: Development and Testing of a Flexible Topology Micro ...

191

b. Open PSAT, selecting “Light Duty”

c. Select Setup then components from the top menu

d. Use this GUI to select each component, its Model/Technology, and then the Related

Files tab and use the Add… button to add the corresponding initialization file

e. Save and continue until all Berkeley MMHEV components are loaded. (may be

necessary to restart PSAT to use the new models)

2) Using given initialization files for the Berkeley MMHEV build a PSAT model of the desired

test mode. (Series, Parallel, or Series Parallel) (series is recommended for engine HIL)

a. Select desired vehicle configuration under Vehicle then Drivetrain Configuration

b. Select each Berkeley MMHEV component for the selected configuration under the

Vehicle then Drivetrain Components, select initial conditions for each (initial SOC)

c. Select desired control strategy under Vehicle then Controller/Strategy

d. At this point the PSAT model can be saved for future use

3) Select a desired drive cycle (UDDS, HWFET, etc…) under Simulation Setup

4) Select the Run Simulation Tab then load rerun00.m and select Run the Simulation… button

to build and run the model (DO NOT CLOSE WHEN MODEL IS FINISHED RUNNING)

5) When results are seen and the model is finished running select Matlab then Launch Desktop

on the top menu

6) With Matlab open navigate to the current model (default – saved simulations\(model with

configuration cycle and time stamp))

7) With PSAT still open select the model that had just run and make changes to allow for

simulation, co-simulation, and HIL simulation

a. Input required drivers for hardware used to communicate and measure data, see

Engine HIL chapter for details

Page 211: Development and Testing of a Flexible Topology Micro ...

192

b. Select the engine model in the powertrain_model subsystem and input switches on

inputs and outputs to allow for switching from simulation to co-simulation and HIL

modes

c. Mux all relevant data together and send to a single output on the highest level of the

simulink model

d. Save a mode in each set up (simulation, co-simulation, and HIL) as a new model but

do not close PSAT or Matlab and do not delete the workspace

8) In the models just saved select Simulation then Configuration Parameters

a. Under Data Import/Export uncheck Limit data points to last:

b. Under Real-Time Workshop change System target file: to xpctarget.tlc

c. Select Apply and close window

9) With a properly setup compiler and xPC Target defined (see xPC Target setup in Matlab

Help) select Tools, Real-Time Workshop, then Build Model in each of the Simulink Models

10) Run the Compiled model in simulation mode, record data and ensure the engine will operate

in a desired manor (check eng_on_simu parameter, often starts more that necessary)

11) Setup the scale and tank to record fuel used during the test (see Engine HIL chapter for driver

details)

12) Run the compiled model in co-simulation mode and record data

13) Run the compiled model in HIL mode and record data

Analysis

Using recorded data from simulation, co-simulation, and HIL runs compare, engine speed, torque,

and fuel rate. Does the PSAT engine model accurately represent the tested engine?

Page 212: Development and Testing of a Flexible Topology Micro ...

193

Electric Motor HIL Simulation

This laboratory experimentation is designed to exercise an induction electric motor similar to one

used in electric and hybrid electric vehicles with known characteristics using hardware-in-the-loop

techniques.

Hardware

Berkeley MMHEV

Laptop or PC with Matlab Simulink xPC Target, Real Time Workshop, and PSAT Software

Procedure

1) Using the laptop or PC load PSAT software and import the Berkeley MMHEV Initialization

files given. (if all Berkeley MMHEV models are loaded simply open PSAT, “Light Duty”

and continue)

a. Copy all Berkeley MMHEV initialization files to their correlating directory under the

PSAT installed directory (default C:PSATv62_SP1\component\initialization\...)

Example- copy the motor initialization file, mc_id_4_12_hi_performance_AC_9 to

the motor folder. (default C:PSATv62_SP1\component\initialization\motor)

b. Open PSAT, selecting “Light Duty”

c. Select Setup then components from the top menu

d. Use this GUI to select each component, its Model/Technology, and then the Related

Files tab and use the Add… button to add the corresponding initialization file

e. Save and continue until all Berkeley MMHEV components are loaded. (may be

necessary to restart PSAT to use the new models)

Page 213: Development and Testing of a Flexible Topology Micro ...

194

2) Using given initialization files for the Berkeley MMHEV build a PSAT model of the desired

test mode: Series HEV, Parallel HEV, or Series/Parallel HEV, EV is recommended for motor

HIL

a. Select desired vehicle configuration under Vehicle then Drivetrain Configuration

b. Select each Berkeley MMHEV component for the selected configuration under the

Vehicle then Drivetrain Components, select initial conditions for each (initial SOC)

c. Select desired control strategy under Vehicle then Controller/Strategy

d. At this point the PSAT model can be saved for future use

3) Select desired test cycle (UDDS, HWFET, etc…) under Simulation Setup

4) Select the Run Simulation Tab then load rerun00.m and select Run the Simulation… button

to build and run the model (DO NOT CLOSE WHEN MODEL IS FINISHED RUNNING)

5) When results are seen and the model is finished running select Matlab then Launch Desktop

on the top menu

6) With Matlab open navigate to the current model (default – saved simulations\(model with

configuration cycle and time stamp))

7) With PSAT still open select the model that had just run and make changes to allow for

simulation, co-simulation, and HIL simulation

a. Input required drivers for hardware used to communicate and measure data, see

Motor HIL chapter for details

b. Select the motor model in the powertrain_model subsystem and input switches on

inputs and outputs to allow for switching from simulation to co-simulation and HIL

modes

c. Mux all relevant data together and send to a single output on the highest level of the

simulink model

Page 214: Development and Testing of a Flexible Topology Micro ...

195

d. Save a mode in each set up (simulation, co-simulation, and HIL) as a new model but

do not close PSAT or Matlab and do not delete the workspace

8) In the models just saved select Simulation then Configuration Parameters

a. Under Data Import/Export uncheck Limit data points to last:

b. Under Real-Time Workshop change System target file: to xpctarget.tlc

c. Select Apply and close window

9) With a properly setup compiler and xPC Target defined (see xPC Target setup in Matlab

Help) select Tools, Real-Time Workshop, then Build Model in each of the Simulink Models

10) Run the compiled model in simulation mode, record data and ensure the motor will operate in

a desired manor

11) Run the compiled model in co-simulation mode and record data

12) Run the compiled model in HIL mode and record data

Analysis

Using recorded data from simulation, co-simulation, and HIL runs compare, motor speed and

torque. Does the PSAT motor model accurately represent the tested motor?

Controller HIL Simulation

Hardware

Advantech Computer

Laptop or PC with Matlab Simulink xPC Target, Real Time Workshop, and PSAT Software

Page 215: Development and Testing of a Flexible Topology Micro ...

196

Procedure

1) Using the laptop or PC load PSAT software and import the Berkeley MMHEV Initialization

files given. (if all Berkeley MMHEV models are loaded simply open PSAT, “Light Duty”

and continue)

a. Copy all Berkeley MMHEV initialization files to their correlating directory under the

PSAT installed directory (default C:PSATv62_SP1\component\initialization\...)

Example- copy the motor initialization file, mc_id_4_12_hi_performance_AC_9 to

the motor folder. (default C:PSATv62_SP1\component\initialization\motor)

b. Open PSAT, selecting “Light Duty”

c. Select Setup then components from the top menu

d. Use this GUI to select each component, its Model/Technology, and then the Related

Files tab and use the Add… button to add the corresponding initialization file

e. Save and continue until all Berkeley MMHEV components are loaded. (may be

necessary to restart PSAT to use the new models)

2) Using given initialization files for the Berkeley MMHEV build a PSAT model of the desired

test mode: Series HEV, Parallel HEV, or Series/Parallel HEV, Series is recommended for

controller HIL

a. Select desired vehicle configuration under Vehicle then Drivetrain Configuration

b. Select each Berkeley MMHEV component for the selected configuration under the

Vehicle then Drivetrain Components, select initial conditions for each (initial SOC)

c. Select desired control strategy under Vehicle then Controller/Strategy

d. At this point the PSAT model can be saved for future use

3) Select a desired drive cycle (UDDS, HWFET, etc…) under Simulation Setup

Page 216: Development and Testing of a Flexible Topology Micro ...

197

4) Select the Run Simulation Tab then load rerun00.m and select Run the Simulation… button

to build and run the model (DO NOT CLOSE WHEN MODEL IS FINISHED RUNNING)

5) When results are seen and the model is finished running select Matlab then Launch Desktop

on the top menu

6) With Matlab open navigate to the current model (default – saved simulations\(model with

configuration cycle and time stamp))

7) With PSAT still open select the model that had just run and make changes to allow for

controller HIL

a. Delete all controller blocks, input constants for parameters that will come from the

separate control algorithm, and tag signals desired for experimental control (see

Matlab Help, xPC Target, User Guide, Graphical User Interfaces for help)

b. Save the model

8) In the model just saved select Simulation then Configuration Parameters

a. Under Data Import/Export uncheck Limit data points to last:

b. Under Real-Time Workshop change System target file: to xpctarget.tlc

c. Select Apply and close window

9) With a properly setup compiler and xPC Target defined (see xPC Target setup in Matlab

Help) select Tools, Real-Time Workshop, then Build Model in each of the Simulink Models

10) Develop a separate control algorithm for controlling the desired component in using the

PSAT plant models. (see Controller HIL chapter for details)

11) Run the compiled model

12) Run test controller

Page 217: Development and Testing of a Flexible Topology Micro ...

198

Analysis

Analysis results, is the designed control stable? Is it robust enough for real hardware testing?

Full Vehicle Electric Mode Control Development

Use PSAT software, the Berkeley MMHEV, and given control models to develop a controller that

will operate the vehicle in an EV mode.

Full Vehicle Series HEV Control Development

Use PSAT software, the Berkeley MMHEV, and given control models to develop a controller that

will operate the vehicle in a series HEV mode.

Full Vehicle Parallel HEV Control Development

Use PSAT software, the Berkeley MMHEV, and given control models to develop a controller that

will operate the vehicle in a parallel HEV mode.

Page 218: Development and Testing of a Flexible Topology Micro ...

Appendix E

PSAT Initialization Files

NiMH (Motorcraft) Battery Pack Model

%% File description

% Name : ess_li_60_40_Mastercraft

% Author : Timothy Cleary - Pennsylvania State University

% Description :

% Initialize the parameters used in the Mastercraft NiMH air cooled

pack

% Capacity = 60Ah, Cell number = 40

% Proprietary: Public

% Model : lib_ess_generic_map

% Technology : nimh

% Vehicle Type : Light, Heavy

%% File content

ess.list.init = {'soc_min','soc_max','soc_init','num_cell_series',...

'num_module_parallel','packaging_factor'};

ess.init.num_module_parallel = 1;

ess.init.soc_init = 0.7;

ess.init.element_per_module = 10;

ess.init.num_module = 4; % value for number of modules

ess.init.num_cell_series =...

ess.init.num_module * ess.init.element_per_module;

ess.init.volt_nom = 1.2;

ess.init.volt_min = 0.970;

ess.init.volt_max = 1.42;

ess.init.mass_module = 20.4; % (kg), mass of a single ~12 V

module

ess.init.mass_cell = 2.04;

ess.init.soc_min = 0.1;

ess.init.soc_max = 1.0;

ess.init.packaging_factor = 1.05;

ess.init.soc_min = ...

overwrite_parameters('simulation.drivetrain.ess','soc_min',...

ess.init.soc_min);

%Removed Overwrite ess.init.num_cell_series

ess.init.charge_max = 300; % amps

ess.init.discharge_max = 500; % amps

% LOSS AND EFFICIENCY parameters

Page 219: Development and Testing of a Flexible Topology Micro ...

200

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

ess.init.soc_index = [0 10 20 30 40 50 60 70 80 90 100]/100; ...

% SOC RANGE over which data is defined

ess.init.temp_index = [0 25 50];...

% Temperature range over which data is defined (C)

ess.init.cap_max_map = [59 60 61];...

% (A*h), max. capacity at C/5 rate, indexed by ess.init.temp_index

ess.init.eff_coulomb = [0.968 0.99 0.992];...

% average coulombic (a.k.a. amp-hour) efficiency below,...

% indexed by ess.init.temp_index

% cell's resistance to being discharged,...

% indexed by ess.init.soc_index and ess.init.temp_index

ess.init.rint_dis_map=[...

0.0370 0.0370 0.0344 0.0328 0.0324 0.0314 0.0322...

0.0314 0.0324 0.0328 0.0344;

0.0370 0.0370 0.0344 0.0328 0.0324 0.0314 0.0322...

0.0314 0.0324 0.0328 0.0344;

0.0370 0.0370 0.0344 0.0328 0.0324 0.0314 0.0322...

0.0314 0.0324 0.0328 0.0344]/ess.init.num_cell_series; % (ohm)

% cell's resistance to being charged,...

% indexed by ess.init.soc_index and ess.init.temp_index

ess.init.rint_chg_map=[...

0.03600 0.03600 0.03360 0.03280 0.03227 0.03147 0.03120 0.03227...

0.03147 0.03307 0.03387;

0.03600 0.03600 0.03360 0.03280 0.03227 0.03147 0.03120 0.03227...

0.03147 0.03307 0.03387;

0.03600 0.03600 0.03360 0.03280 0.03227 0.03147 0.03120 0.03227...

0.03147 0.03307 0.03387]/ess.init.num_cell_series;% (ohm)

% cell's open-circuit (a.k.a. no-load) voltage,...

% indexed by ess.init.soc_index and ess.init.temp_index

ess.init.voc_map=[...

32.60 50.48 51.08, 51.56 52.10 52.06 52.24 52.50 52.88 53.68

56.00;

32.60 50.68 51.28, 51.76 52.12 52.26 52.44 52.70 53.08 53.88

56.00;

32.60 50.88 51.48, 51.96 52.32 52.46 52.64 52.90 53.28 54.08

56.00;]...

/ess.init.num_cell_series; % (V) per cell

%% Max current and power when charging/discharging

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%

ess.init.curr_chg_max =...

-max(max((ess.init.volt_max-

ess.init.voc_map)./ess.init.rint_chg_map));

ess.init.curr_dis_max =...

Page 220: Development and Testing of a Flexible Topology Micro ...

201

max(max((ess.init.voc_map-

ess.init.volt_min)./ess.init.rint_dis_map));

%check the ess.calc.pwr_chg & ess.calc.pwr_dis because...

% they're a vector and in the database for the plot we

%need maps

ess.calc.pwr_chg = -max((ess.init.volt_max-ess.init.voc_map)...

.*ess.init.volt_max./ess.init.rint_chg_map);%per cell

ess.calc.pwr_dis = max((ess.init.voc_map-ess.init.volt_min)...

.*ess.init.volt_min./ess.init.rint_dis_map);%per cel

% gain factor to modify ess.calc.pwr_chg and ess.calc.pwr_dis

% discharge is brought to 0 at low SOC and charge is brought to 0 at

high

% SOC

% modification by vfreyermuth on 9/8/06

ess.calc.pwr_chg = ess.calc.pwr_chg.*double(ess.init.soc_index...

<= ess.init.soc_max);

ess.calc.pwr_dis = ess.calc.pwr_dis.*double(ess.init.soc_index...

>= ess.init.soc_min);

ess.init.pwr_chg = -max(max((ess.init.volt_max-ess.init.voc_map)...

.*ess.init.volt_max./ess.init.rint_chg_map));%per cell

ess.init.pwr_dis = max(max((ess.init.voc_map-ess.init.volt_min)....

*ess.init.volt_min./ess.init.rint_dis_map));%per cell

%% battery thermal model

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

ess.init.therm_on = 1; ...

% 0=no ess thermal calculations, 1=do calc's

ess.init.therm_cp_module = 795; ...

% J/kgK ave heat capacity of module (estimated for NiMH)

ess.init.temp_reg = 35; ...

% C thermostat temp of module when cooling fan comes on

ess.tmp.area_module = .032; ...

% m^2 total module surface area exposed to cooling air...

% (typ rectang module)

ess.init.flow_air_mod = .07/12; ...

% kg/s cooling air mass flow rate across module...

% (20 cfm=0.01 kg/s at 20 C)

ess.tmp.mod_flow_area = .0011; ...

% m^2 cross-sec flow area for cooling air per module...

(assumes 10-mm gap btwn mods)

ess.tmp.case_thk = .001; ...

% m thickness of module case (typ from Optima)

ess.tmp.therm_case_cond = 15; ...

% W/mK thermal conductivity of module case material...

% (typ polyprop plastic - Optima)

ess.tmp.speed_air = ess.init.flow_air_mod/...

Page 221: Development and Testing of a Flexible Topology Micro ...

202

(1.16*ess.tmp.mod_flow_area); % m/s ave velocity of cooling air

ess.tmp.therm_air_htcoef = 30*(ess.tmp.speed_air/5)^0.8;...

% W/m^2K cooling air heat transfer coef.

ess.init.therm_res_on = ((1/ess.tmp.therm_air_htcoef)...

+(ess.tmp.case_thk/ess.tmp.therm_case_cond))/...

ess.tmp.area_module; % K/W tot thermal res key on

ess.init.therm_res_off = ((1/4)+(ess.tmp.case_thk/...

ess.tmp.therm_case_cond))/ess.tmp.area_module;...

% K/W tot thermal res key off (cold soak)

ess.init.flow_air_mod = max(ess.init.flow_air_mod,0.001);

ess.init.therm_res_on = ...

min(ess.init.therm_res_on,ess.init.therm_res_off);

ess = rmfield(ess,'tmp');

% Battery density

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

ess.init.pwr_dis_nom = max(max(...

(ess.init.volt_nom-ess.init.volt_min).*ess.init.volt_min./...

ess.init.rint_dis_map));%per cell

ess.init.pwr_density = ess.init.pwr_dis_nom/ess.init.mass_cell;

ess.init.energy_density = ...

mean((ess.init.volt_nom*ess.init.cap_max_map))/ess.init.mass_cell;

%Values should only be used to calculate the number of cells

ess.init.num_cell_series = ...

overwrite_parameters('simulation.drivetrain.ess','num_cell_series',...

ess.init.num_cell_series);...

% need to update to make sure we have 0 power at SOC_min

ess.init.num_module_parallel = ...

overwrite_parameters('simulation.drivetrain.ess','num_module_parallel'

,...

ess.init.num_module_parallel);...

% need to update to make sure we have 0 power at SOC_min

ess.init.num_cell =

ess.init.num_module_parallel.*ess.init.num_cell_series;

Page 222: Development and Testing of a Flexible Topology Micro ...

203

Primary Motor Model

%% File description

% Name : mc_id_5_15_hi_performance_motor_AC_15

% Author : Timothy Cleary - Pennsylvania Stae University

% Description : Initialize an AC motor

% Continuous Power = 5kW, Peak Power = 15kW

% Data provided by Timothy Cleary Pennsylvania Stae University

% Proprietary : Public

% Model : lib_mc_map_Pelec_funTW_volt_in,lib_mc_map_Pelec_funTW_pwr_in

% Technology : id

% Vehicle Type : Light, Heavy

%% File content

mc.list.init =

{'motor_mass','controller_mass','inertia','time_response',...

'coeff_regen','volt_min','curr_max','cont_to_peak_ratio'};

mc.init.coeff_regen = 1;

mc.init.volt_min = 37; % volts

mc.init.time_response = 0.05;

mc.init.t_max_trq = 180; % Time motor can remain at max

torque

mc.init.inertia = 0.01; % kg-m^2

mc.init.cont_to_peak_ratio = 3;

mc.init.motor_mass = 21; % kg

mc.init.controller_mass = 4.12; % kg

mc.init.cont_to_peak_ratio = overwrite_parameters(...

'simulation.drivetrain.mc','cont_to_peak_ratio',...

mc.init.cont_to_peak_ratio);

mc.init.spd_base = conversion_calc...

('rotational_speed','rpm','rad/s',2700);% rad/s

mc.init.curr_max = 300;...

% (A), maximum current allowed by the controller and motor

mc.init.spd_max_index = [0,700,1400,2100,2800,3500,4200,...

4900,5600,6300,7000,7700,8400;]*(2*pi)/60; % rad/s

mc.init.trq_max_map =

[89.7125,88.8965,84.3262,69.5030,51.9721,...

37.9729,28.6598,22.4460,17.8495,14.2850,11.1268,0,0]; % N-m

mc.init.trq_max = max (mc.init.trq_max_map);

mc.init.spd_cont_index = mc.init.spd_max_index;

mc.init.trq_cont_map = mc.init.trq_max_map./...

mc.init.cont_to_peak_ratio;

mc.init.spd_min_index = mc.init.spd_max_index; % rad/s

mc.init.trq_min_map = -mc.init.trq_max_map;

Page 223: Development and Testing of a Flexible Topology Micro ...

204

mc.init.spd_eff_index = mc.init.spd_cont_index(1:end-2);% rad/s

mc.init.trq_eff_index = [.00,.03,.06,.09,.12,.15,.18,.27,.36,...

.45,.55,.64,.73,.82,.91,1.00]*mc.init.trq_max;

mc.init.eff_trq_map=...

[00.0000 00.0000 00.0000 00.0000 00.0000 00.0000...

00.0000 00.0000 00.0000 00.0000 00.0000 00.0000...

00.0000 00.0000 00.0000 00.0000;

00.0000 14.8398 25.3926 35.5711 43.3223 46.7505...

47.1773 46.2372 44.7523 44.1951 44.1334 42.1679...

39.7602 38.2171 37.0050 37.0050;

00.0000 18.2077 30.5984 39.0709 51.1220 62.0840...

71.2814 78.6293 76.6557 74.5511 72.3020 70.7005...

69.1002 66.7967 64.5632 64.5632;

00.0000 18.2077 35.7728 45.9420 53.5495 64.3718...

76.6967 88.0093 86.0393 84.0591 82.4167 81.0597...

78.0174 71.9112 64.5632 64.5632;

00.0000 18.2077 36.4155 53.8090 61.2178 68.6021...

78.0464 89.8881 87.8293 85.8418 83.0578 77.9324...

72.3398 71.9112 64.5632 64.5632;

00.0000 18.2077 36.4155 54.6232 68.9490 76.5422...

83.7482 89.5026 86.3483 83.1457 78.3522 77.9324...

72.3398 71.9112 64.5632 64.5632;

00.0000 18.2077 36.4155 54.6232 72.8310 84.5611...

91.6174 89.3483 82.6642 79.6984 78.3522 77.9324...

72.3398 71.9112 64.5632 64.5632;

00.0000 18.2077 36.4155 54.6232 72.8310 90.2138...

93.4372 84.4024 80.4972 79.6984 78.3522 77.9324...

72.3398 71.9112 64.5632 64.5632;

00.0000 18.2077 36.4155 54.6232 78.2855 91.6920...

88.4751 81.0885 80.4972 79.6984 78.3522 77.9324...

72.3398 71.9112 64.5632 64.5632;

00.0000 18.2077 37.7662 70.6604 89.4479 85.7844...

81.6660 81.0885 80.4972 79.6984 78.3522 77.9324...

72.3398 71.9112 64.5632 64.5632;

00.0000 25.4339 57.3440 72.7856 82.0577 78.7266...

81.6660 81.0885 80.4972 79.6984 78.3522 77.9324...

72.3398 71.9112 64.5632 64.5632;];

mc.init.spd_prop_cont_index = [-

fliplr(mc.init.spd_cont_index(2:end))...

-eps 0 eps mc.init.spd_cont_index(2:end)];

mc.init.trq_prop_cont_map = [-fliplr(mc.init.trq_cont_map(2:end))...

-mc.init.trq_cont_map(2) mc.init.trq_cont_map(2)...

mc.init.trq_cont_map(2) mc.init.trq_cont_map(2:end)];

mc.init.pwr_prop_cont_map = mc.init.spd_prop_cont_index...

.*mc.init.trq_prop_cont_map;

Page 224: Development and Testing of a Flexible Topology Micro ...

205

mc.init.spd_prop_max_index = [-

fliplr(mc.init.spd_max_index(2:end))...

-eps 0 eps mc.init.spd_max_index(2:end)];

mc.init.trq_prop_max_map = [-fliplr(mc.init.trq_max_map(2:end))...

-mc.init.trq_max_map(2) mc.init.trq_max_map(2)...

mc.init.trq_max_map(2) mc.init.trq_max_map(2:end)];

mc.init.pwr_prop_max_map = mc.init.spd_prop_max_index...

.*mc.init.trq_prop_max_map;

mc.init.spd_reg_cont_index = [-

fliplr(mc.init.spd_cont_index(2:end))...

-eps 0 eps mc.init.spd_cont_index(2:end)];

mc.init.trq_reg_cont_map = [fliplr(mc.init.trq_cont_map(2:end))...

mc.init.trq_cont_map(2) -mc.init.trq_cont_map(2)...

-mc.init.trq_cont_map(2) -mc.init.trq_cont_map(2:end)];

mc.init.pwr_reg_cont_map = mc.init.spd_reg_cont_index...

.*mc.init.trq_reg_cont_map;

mc.init.spd_reg_max_index = [-

fliplr(mc.init.spd_max_index(2:end))...

-eps 0 eps mc.init.spd_max_index(2:end)];

mc.init.trq_reg_max_map = [fliplr(mc.init.trq_max_map(2:end))...

mc.init.trq_max_map(2) -mc.init.trq_max_map(2)...

-mc.init.trq_max_map(2) -mc.init.trq_max_map(2:end)];

mc.init.pwr_reg_max_map = mc.init.spd_reg_max_index...

.*mc.init.trq_reg_max_map;

mc.init.spd_eff_index = [-

fliplr(mc.init.spd_eff_index(2:end))...

mc.init.spd_eff_index];

mc.init.trq_eff_index = [-

fliplr(mc.init.trq_eff_index(2:end))...

mc.init.trq_eff_index];

mc.init.eff_trq_map = ...

[flipud(fliplr(mc.init.eff_trq_map(2:end,2:end)))...

flipud(mc.init.eff_trq_map(2:end,:));...

fliplr(mc.init.eff_trq_map(:,2:end)) mc.init.eff_trq_map];

Page 225: Development and Testing of a Flexible Topology Micro ...

206

Secondary Motor Model (as a motor)

%% File description

% Name : mc_id_4_12_hi_performance_motor_AC_9

% Author : Timothy Cleary - Pennsylvania Stat University

% Description : Initialize an AC motor

% Continuous Power = 4kW, Peak Power = 12kW

% Data provided by Timothy Cleary Pennsylvania Stat University

% Proprietary : Public

% Model : lib_mc_map_Pelec_funTW_volt_in,lib_mc_map_Pelec_funTW_pwr_in

% Technology : id

% Vehicle Type : Light, Heavy

%% File content

mc.list.init =

{'motor_mass','controller_mass','inertia','time_response'...

,'coeff_regen','volt_min','curr_max','cont_to_peak_ratio'};

mc.init.coeff_regen = 1;

mc.init.volt_min = 37; % volts

mc.init.time_response = 0.05;

mc.init.t_max_trq = 180; % Time motor can remain at max

torque

mc.init.inertia = 0.01; % kg-m^2

mc.init.cont_to_peak_ratio = 3;

mc.init.motor_mass = 21; % kg

mc.init.controller_mass = 4.12; % kg

mc.init.cont_to_peak_ratio = overwrite_parameters(...

'simulation.drivetrain.mc','cont_to_peak_ratio',...

mc.init.cont_to_peak_ratio);

mc.init.spd_base = conversion_calc('rotational_speed',...

'rpm','rad/s',2700);% rad/s

mc.init.curr_max = 300; ...

% (A), maximum current allowed by the controller and motor

mc.init.spd_max_index = [0,700,1400,2100,2800,3500,4200,4900,..

5600,6300,7000;]*(2*pi)/60; % rad/s

mc.init.trq_max_map = [45.6831 45.3501 45.6363 45.4493 ...

41.4355 33.0929 25.1557 19.6587 15.9633 0 0]; % N-m

mc.init.trq_max = max (mc.init.trq_max_map);

mc.init.spd_cont_index = mc.init.spd_max_index;

mc.init.trq_cont_map = mc.init.trq_max_map./...

mc.init.cont_to_peak_ratio;

mc.init.spd_min_index = mc.init.spd_max_index; % rad/s

mc.init.trq_min_map = -mc.init.trq_max_map;

mc.init.spd_eff_index = mc.init.spd_cont_index(1:end-2);% rad/s

Page 226: Development and Testing of a Flexible Topology Micro ...

207

mc.init.trq_eff_index =

[.00,.03,.06,.09,.12,.15,.18,.27,.36,.45,...

.55,.64,.73,.82,.91,1.00]*mc.init.trq_max;

mc.init.eff_trq_map=...

[00.0000 00.0000 00.0000 00.0000 00.0000 00.0000...

00.0000 00.0000 00.0000 00.0000 00.0000 00.0000...

00.0000 00.0000 00.0000 00.0000;

00.0000 13.8095 26.7821 35.6096 42.6190 48.7910...

52.5569 53.7973 54.8229 55.4440 53.7280 51.4256...

49.1512 47.5373 45.9584 45.9584;

00.0000 13.8095 27.6189 41.4284 54.0160 63.5265...

71.3808 77.3222 76.5666 74.8497 73.1049 71.7418...

70.4441 69.3241 68.2055 68.2055;

00.0000 13.8095 27.6189 41.4284 55.2379 68.9864...

81.3011 88.7760 87.5156 86.2137 84.7568 83.3785...

82.0147 80.6548 79.2949 79.2949;

00.0000 13.8095 27.6189 41.4284 55.2379 69.0474...

82.8568 94.1712 93.0417 91.8567 90.4912 89.1751...

87.7139 85.2762 79.2949 79.2949;

00.0000 13.8095 27.6189 41.4284 55.2379 69.0407...

82.4880 94.7922 93.6492 92.5062 91.2078 88.1534...

85.6104 85.2762 79.2949 79.2949;

00.0000 13.8095 27.6189 41.4284 55.1431 68.1254...

81.4553 94.1375 92.4620 90.8016 87.8708 88.1534...

85.6104 85.2762 79.2949 79.2949;

00.0000 13.8095 27.6189 40.9485 54.6459 71.1033...

89.6995 92.2676 90.4301 86.2388 87.8708 88.1534...

85.6104 85.2762 79.2949 79.2949;

00.0000 13.6659 29.1802 48.5065 68.6308 88.1875...

92.6692 90.5864 89.2125 86.2388 87.8708 88.1534...

85.6104 85.2762 79.2949 79.2949;];

mc.init.spd_prop_cont_index = [-

fliplr(mc.init.spd_cont_index(2:end))...

-eps 0 eps mc.init.spd_cont_index(2:end)];

mc.init.trq_prop_cont_map = [-fliplr(mc.init.trq_cont_map(2:end))...

-mc.init.trq_cont_map(2) mc.init.trq_cont_map(2)...

mc.init.trq_cont_map(2) mc.init.trq_cont_map(2:end)];

mc.init.pwr_prop_cont_map = mc.init.spd_prop_cont_index.*...

mc.init.trq_prop_cont_map;

mc.init.spd_prop_max_index = [-

fliplr(mc.init.spd_max_index(2:end))...

-eps 0 eps mc.init.spd_max_index(2:end)];

mc.init.trq_prop_max_map = [-fliplr(mc.init.trq_max_map(2:end))...

-mc.init.trq_max_map(2) mc.init.trq_max_map(2) ...

mc.init.trq_max_map(2) mc.init.trq_max_map(2:end)];

mc.init.pwr_prop_max_map = mc.init.spd_prop_max_index.*...

Page 227: Development and Testing of a Flexible Topology Micro ...

208

mc.init.trq_prop_max_map;

mc.init.spd_reg_cont_index = [-

fliplr(mc.init.spd_cont_index(2:end))...

-eps 0 eps mc.init.spd_cont_index(2:end)];

mc.init.trq_reg_cont_map = [fliplr(mc.init.trq_cont_map(2:end))...

mc.init.trq_cont_map(2) -mc.init.trq_cont_map(2)...

-mc.init.trq_cont_map(2) -mc.init.trq_cont_map(2:end)];

mc.init.pwr_reg_cont_map = mc.init.spd_reg_cont_index.*...

mc.init.trq_reg_cont_map;

mc.init.spd_reg_max_index = [-

fliplr(mc.init.spd_max_index(2:end))...

-eps 0 eps mc.init.spd_max_index(2:end)];

mc.init.trq_reg_max_map = [fliplr(mc.init.trq_max_map(2:end))...

mc.init.trq_max_map(2) -mc.init.trq_max_map(2)...

-mc.init.trq_max_map(2) -mc.init.trq_max_map(2:end)];

mc.init.pwr_reg_max_map = mc.init.spd_reg_max_index.*...

mc.init.trq_reg_max_map;

mc.init.spd_eff_index = [-

fliplr(mc.init.spd_eff_index(2:end))...

mc.init.spd_eff_index];

mc.init.trq_eff_index = [-

fliplr(mc.init.trq_eff_index(2:end))...

mc.init.trq_eff_index];

mc.init.eff_trq_map = [flipud(fliplr(...

mc.init.eff_trq_map(2:end,2:end))) flipud...

(mc.init.eff_trq_map(2:end,:));fliplr(mc.init.eff_trq_map(:,2:end))...

mc.init.eff_trq_map];

Page 228: Development and Testing of a Flexible Topology Micro ...

209

Secondary Motor Model (as a generator)

%% File description

% Name : gc_id_4_12_AC9_berkeley

% Author : Timothy Cleary - PSU

% Description : Initialize an induction electric generator

% Continuous Power = 4kW, Peak Power = 12kW

% Proprietary : Public

% Model : lib_gc_generator_map_trq_in

% Technology : id

% Vehicle Type : Light, Heavy

%% File content

gc.list.init = {'inertia','time_response','str_trq','spd_opt',...

'ratio','cont_to_peak_ratio'};

gc.init.inertia = 0.01; % N m s^2/rad

gc.init.time_response = 0.05;

gc.init.t_max_trq = 180; ...

% Time the generator can remain at max torque

gc.init.str_trq = 5; ...

%Torque provided by the generator required to start the engine ...

% (when the generator is used as a engine starter device)

gc.init.spd_opt =

conversion_calc('rotational_speed','rpm',...

'rad/s',2800);

gc.init.ratio = 1;

gc.init.motor_mass = 21;

gc.init.controller_mass = 4.12;

gc.init.curr_max = 300; ...

% (A), maximum current allowed by the controller and motor

gc.init.cont_to_peak_ratio = 3;

gc.init.cont_to_peak_ratio = overwrite_parameters(...

'simulation.drivetrain.gc','cont_to_peak_ratio',...

gc.init.cont_to_peak_ratio);

gc.init.spd_max_index = [0,700,1400,2100,2800,3500,4200,4900,...

5600,6300,7000;]*(2*pi)/60;

gc.init.trq_max_map = [45.6831 45.3501 45.6363 45.4493 41.4355...

33.0929 25.1557 19.6587 15.9633 0 0]; % N-m

gc.init.trq_max = max (gc.init.trq_max_map);

gc.init.spd_cont_index = gc.init.spd_max_index;

gc.init.trq_cont_map = (1/gc.init.cont_to_peak_ratio) ...

* gc.init.trq_max_map;

gc.init.spd_min_index = gc.init.spd_cont_index; % rad/s

gc.init.trq_min_map = -gc.init.trq_cont_map;

Page 229: Development and Testing of a Flexible Topology Micro ...

210

gc.init.spd_loss_index =

[0,700,1400,2100,2800,3500,4200,4900,5600,...

6300,7000;]*(2*pi)/60;

gc.init.trq_loss_index = [0,21,43,65,87,109,130,152,174,196,218,...

239,261,283,305,327,349,370,392]/392*gc.init.trq_max;...

% ensures that the maximum torque is included in the efficiency

map

gc.init.spd_eff_index = gc.init.spd_cont_index(1:end-2);% rad/s

gc.init.trq_eff_index =

[.00,.03,.06,.09,.12,.15,.18,.27,.36,.45,...

.55,.64,.73,.82,.91,1.00]*gc.init.trq_max;

gc.init.eff_trq_map=...

[00.0000 00.0000 00.0000 00.0000 00.0000 00.0000...

00.0000 00.0000 00.0000 00.0000 00.0000 00.0000 ...

00.0000 00.0000 00.0000 00.0000;

00.0000 13.8095 26.7821 35.6096 42.6190 48.7910...

52.5569 53.7973 54.8229 55.4440 53.7280 51.4256 ...

49.1512 47.5373 45.9584 45.9584;

00.0000 13.8095 27.6189 41.4284 54.0160 63.5265 ...

71.3808 77.3222 76.5666 74.8497 73.1049 71.7418 ...

70.4441 69.3241 68.2055 68.2055;

00.0000 13.8095 27.6189 41.4284 55.2379 68.9864...

81.3011 88.7760 87.5156 86.2137 84.7568 83.3785...

82.0147 80.6548 79.2949 79.2949;

00.0000 13.8095 27.6189 41.4284 55.2379 69.0474...

82.8568 94.1712 93.0417 91.8567 90.4912 89.1751...

87.7139 85.2762 79.2949 79.2949;

00.0000 13.8095 27.6189 41.4284 55.2379 69.0407...

82.4880 94.7922 93.6492 92.5062 91.2078 88.1534...

85.6104 85.2762 79.2949 79.2949;

00.0000 13.8095 27.6189 41.4284 55.1431 68.1254...

81.4553 94.1375 92.4620 90.8016 87.8708 88.1534...

85.6104 85.2762 79.2949 79.2949;

00.0000 13.8095 27.6189 40.9485 54.6459 71.1033...

89.6995 92.2676 90.4301 86.2388 87.8708 88.1534...

85.6104 85.2762 79.2949 79.2949;

00.0000 13.6659 29.1802 48.5065 68.6308 88.1875...

92.6692 90.5864 89.2125 86.2388 87.8708 88.1534...

85.6104 85.2762 79.2949 79.2949;]/100;

gc.init.spd_prop_cont_index = [-

fliplr(gc.init.spd_cont_index(2:end))...

-eps 0 eps gc.init.spd_cont_index(2:end)];

gc.init.trq_prop_cont_map = [-fliplr(gc.init.trq_cont_map(2:end))...

-gc.init.trq_cont_map(2) gc.init.trq_cont_map(2)...

gc.init.trq_cont_map(2) gc.init.trq_cont_map(2:end)];

gc.init.pwr_prop_cont_map = gc.init.spd_prop_cont_index.*...

gc.init.trq_prop_cont_map;

Page 230: Development and Testing of a Flexible Topology Micro ...

211

gc.init.spd_prop_max_index = [-

fliplr(gc.init.spd_max_index(2:end))...

-eps 0 eps gc.init.spd_max_index(2:end)];

gc.init.trq_prop_max_map = [-fliplr(gc.init.trq_max_map(2:end))...

-gc.init.trq_max_map(2) gc.init.trq_max_map(2)...

gc.init.trq_max_map(2) gc.init.trq_max_map(2:end)];

gc.init.pwr_prop_max_map = gc.init.spd_prop_max_index.*...

gc.init.trq_prop_max_map;

gc.init.spd_reg_cont_index = [-

fliplr(gc.init.spd_cont_index(2:end))...

-eps 0 eps gc.init.spd_cont_index(2:end)];

gc.init.trq_reg_cont_map = [fliplr(gc.init.trq_cont_map(2:end))...

gc.init.trq_cont_map(2) gc.init.trq_cont_map(2)...

-gc.init.trq_cont_map(2) -gc.init.trq_cont_map(2:end)];

gc.init.pwr_reg_cont_map = gc.init.spd_reg_cont_index.*...

gc.init.trq_reg_cont_map;

gc.init.spd_reg_max_index = [-

fliplr(gc.init.spd_max_index(2:end))...

-eps 0 eps gc.init.spd_max_index(2:end)];

gc.init.trq_reg_max_map = [fliplr(gc.init.trq_max_map(2:end))...

gc.init.trq_max_map(2) gc.init.trq_max_map(2) ...

-gc.init.trq_max_map(2) -gc.init.trq_max_map(2:end)];

gc.init.pwr_reg_max_map = gc.init.spd_reg_max_index.*...

gc.init.trq_reg_max_map;

gc.init.spd_eff_index = [-

fliplr(gc.init.spd_eff_index(2:end))...

gc.init.spd_eff_index];

gc.init.trq_eff_index = [-

fliplr(gc.init.trq_eff_index(2:end))...

gc.init.trq_eff_index];

gc.init.eff_trq_map = [flipud(fliplr...

(gc.init.eff_trq_map(2:end,2:end))) flipud(...

gc.init.eff_trq_map(2:end,:));fliplr(...

gc.init.eff_trq_map(:,2:end)) gc.init.eff_trq_map];

Page 231: Development and Testing of a Flexible Topology Micro ...

212

Honda GS 190 Gasoline Engine Model

%% File description

% Name : eng_si_190_5

% Author : Timothy Cleary - Pennsylvania State University

% Description : Initialize the 190cc 5kW pump gasoline engine

% Data provided by Timothy Cleary - Pennsylvania State University

% Proprietary : Public

% Model : lib_eng_map_hot

% Technology : si

% Vehicle Type : Light

%% File content

eng.list.init =

{'time_response','eng_mass','tank_mass','fuel_mass'};

eng.init.technology = 'si';

eng.init.num_cyl_init = 1;

eng.init.material = 'Aluminum';

% source - ORNL/TM-2008/117

eng.init.fuel_density_val = 0.745; % (kg/L)

eng.init.fuel_heating_val = 42906796; % (J/kg)Specific

LHV

eng.init.fuel_carbon_ratio = 0.861; % (kg/kg)

eng.init.eng_mass = 14;...

%eng.init.mass_block + eng.init.mass_radiator +

eng.init.mass_vol...

+ eng.init.tank_mass;

eng.init.tank_mass = 2;

eng.init.fuel_mass = conversion_calc(...

'volume','gallon','liter',10)*eng.init.fuel_density_val;

% eng.init.fuel_mass = 7.45;

eng.init.time_response = 0.01;

eng.init.spd_idle =

conversion_calc('rotational_speed'...

,'rpm','rad/s',1000);

% eng.init.spd_idle = 1400*(2*pi())*(1/60);

eng.init.warmup_init = 0; % This should normally be

0

eng.init.pwr_max = 5000; % Watts

eng.init.ex_gas_heat_cap = 1089; ...

% J/kgK ave sens heat cap of exh gas (SAE #890798)

eng.init.displ_init = 190; % cc

eng.init.inertia = 0.07; ..

% kg-m^2 - approximate value

Page 232: Development and Testing of a Flexible Topology Micro ...

213

eng.init.spd_str =

conversion_calc('rotational_speed',...

'rpm','rad/s',1000);

% eng.init.spd_str = 1000*(2*pi())*(1/60);

eng.init.specific_pwr =

eng.init.pwr_max./eng.init.eng_mass;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%

% maximum curves at each speed (closed and wide open throttle)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%

% hot max wide open throttle curves

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

eng.init.spd_max_hot_index =

conversion_calc('rotational_speed','rpm',...

'rad/s',[0 1000:350:4150]);

% eng.init.spd_max_hot_index = ([0 1000:350:4150]*(2*pi())*(1/60));

eng.init.trq_max_hot_map = [0 5 19.17 20.46 17.53 14.93 13.09 8.38 2

0 0];

% Mid speed is used in logic to limit closed and wide open torque

curves

eng.init.spd_avg = 0.5 * (eng.init.spd_max_hot_index(1) +

...

eng.init.spd_max_hot_index(length(eng.init.spd_max_hot_index)));

% hot max closed throttle curves

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

eng.init.spd_min_hot_index = eng.init.spd_max_hot_index;

eng.init.trq_min_hot_map = [0 -5*ones(1,size...

(eng.init.spd_max_hot_index,2)-1)];

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%

% consumption table

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%

eng.init.spd_fuel_hot_index = [146.6077 168.7152 190.8227

212.9302...

235.0377 257.1452 279.2527 301.3602 323.4677 345.5752];

eng.init.trq_fuel_hot_index = [0.1032 1.9041 3.7050 5.5059...

7.3068 9.1077 10.9087 12.7096 14.5105 16.3114

18.1123...

19.9132]; % (Eqn B)

% Rows represent speed (rad/s)

% Columns represent torque (N-m) Table is fuel rate (kg/s)

Page 233: Development and Testing of a Flexible Topology Micro ...

214

eng.init.fuel_hot_map = 1e-4*[...

0.558750000000000,1.01370662741118,1.29373086719970,1.44877456652358,.

..

1.52878957254084,1.58372773240951,1.66354089328762,1.78036266207578,..

.

1.82211058001517,1.80602220844150,1.76558839816602,1.73430000000000;..

.

1.500000000000000,1.30805753042053,1.41844300798210,1.42813495705093,.

..

1.39006112170558,1.33979514936847,1.72552098389961,1.93730737443319,..

.

2.01416318223787,2.00927384329399,1.98921443420548,1.500000000000000;.

..

1.500000000000000,3.27467029606142,1.28333826932813,1.08206409142853,.

..

0.933579475257697,1.39328526548741,1.86007456000625,2.03466300467808,.

..

2.23702522818617,2.24203171995344,1.500000000000000,1.500000000000000;

...

1.500000000000000,4.97478444707829,1.87230527748809,1.12351838408039,.

..

1.26364773198841,1.66981981494138,2.01830677203253,2.18660203730605,..

.

2.36266442419350,2.44121536322743,1.500000000000000,1.500000000000000;

...

1.500000000000000,4.05748804686011,1.50346179867969,1.46890629467775,.

..

1.55818397018010,1.91983832878112,2.24126418878559,2.39124587349737,..

.

2.60350785530969,1.500000000000000,1.500000000000000,1.500000000000000

;...

1.500000000000000,0.631664131091731,1.34005529798764,1.49786888704158,

...

Page 234: Development and Testing of a Flexible Topology Micro ...

215

1.86678511241439,2.23127694696984,2.47997713543944,2.63464155196909,..

.

2.84925080339583,1.500000000000000,1.500000000000000,1.500000000000000

;...

1.500000000000000,0.685914376493082,1.02697066845726,1.27204946657949,

...

1.72945722712099,2.27313821485474,2.70270411187335,2.92954925176639,..

.

1.500000000000000,1.500000000000000,1.500000000000000,1.50000000000000

0;...

1.500000000000000,0.684817818116623,0.560816363604910,1.10918924868283

,...

1.78691342197422,2.23323129561172,3.09436872272422,1.500000000000000,.

..

1.500000000000000,1.500000000000000,1.500000000000000,1.50000000000000

0;...

1.500000000000000,1.38069408084618,1.20942106922148,1.69231498299360,.

..

1.95133790469533,1.500000000000000,1.500000000000000,1.500000000000000

,...

1.500000000000000,1.500000000000000,1.500000000000000,1.50000000000000

0;...

1.500000000000000,1.500000000000000,1.500000000000000,1.50000000000000

0,...

1.500000000000000,1.500000000000000,1.500000000000000,1.50000000000000

0,...

1.500000000000000,1.500000000000000,1.500000000000000,1.50000000000000

0;];

% Expanding the map at low torque (0 0.03 0.05)

for i=1:length(eng.init.spd_fuel_hot_index)

tmp_map(i,:)=interp1(eng.init.trq_fuel_hot_index,...

eng.init.fuel_hot_map(i,:),[0 0.03 0.05...

eng.init.trq_fuel_hot_index],'linear','extrap');

end

eng.init.trq_fuel_hot_index=[0 0.03 0.05 eng.init.trq_fuel_hot_index];

Page 235: Development and Testing of a Flexible Topology Micro ...

216

% Maps negative values are replaced by the average of non negative

% closest values

for i =1:length(eng.init.spd_fuel_hot_index)

for j=1:length(eng.init.trq_fuel_hot_index)

if tmp_map(i,j)<0 && i>1

tmp_map(i,j)=abs(0.5*(tmp_map(i-1,j)+tmp_map(i+1,j)));

end

if tmp_map(i,j)<0 && i==1

tmp_map(i,j)=abs(0.5*(tmp_map(i,j+1)+tmp_map(i+1,j)));

end

end

end

eng.init.fuel_hot_map=tmp_map;

clear tmp_map

eng.init.fmep_hot_map = zeros(length(eng.init.spd_fuel_hot_index),...

length(eng.init.trq_fuel_hot_index));

% engine torque for fuel rate kg/s

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%GASOLINE ENGINE

% Friction Torque for a 1.7 L Engine Based on Heywood.

% "Internal Combustion Fundamentals,"

% Section 13.6.1 Figure 13-14 (a) P726

%Code for fmep calculation Gasoline

eng.init.spd_zero_fuel_hot_index

=(0:20:max(eng.init.spd_min_hot_index));

eng.init.fmep_hot_map = polyval([4.2337e-4 -3.41045e-3 62.831],...

\(0:20:max(eng.init.spd_min_hot_index)));

eng.init.fmep_hot_map(1) =0;

eng.init.trq_zero_fuel_hot_index = -eng.init.fmep_hot_map *...

eng.init.displ_init/1000 / 4/ pi;

%Emissions in percentage of fuel rate (kg/s)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%

eng.init.spd_co_hot_index = eng.init.spd_fuel_hot_index;

eng.init.trq_co_hot_index = eng.init.trq_fuel_hot_index;

eng.init.co_hot_map =

zeros(length(eng.init.spd_co_hot_index),...

length(eng.init.trq_co_hot_index));

eng.init.spd_hc_hot_index = eng.init.spd_fuel_hot_index;

eng.init.trq_hc_hot_index = eng.init.trq_fuel_hot_index;

eng.init.hc_hot_map =

zeros(length(eng.init.spd_hc_hot_index),...

length(eng.init.trq_hc_hot_index));

Page 236: Development and Testing of a Flexible Topology Micro ...

217

eng.init.spd_nox_hot_index = eng.init.spd_fuel_hot_index;

eng.init.trq_nox_hot_index = eng.init.trq_fuel_hot_index;

eng.init.nox_hot_map =

zeros(length(eng.init.spd_nox_hot_index),...

length(eng.init.trq_nox_hot_index));

eng.init.spd_pm_hot_index = eng.init.spd_fuel_hot_index;

eng.init.trq_pm_hot_index = eng.init.trq_fuel_hot_index;

eng.init.pm_hot_map =

zeros(length(eng.init.spd_hc_hot_index),...

length(eng.init.trq_nox_hot_index));

% O2

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%

eng.init.spd_o2_hot_index = eng.init.spd_fuel_hot_index;

eng.init.trq_o2_hot_index = eng.init.trq_fuel_hot_index;

eng.init.o2_hot_map =

zeros(length(eng.init.spd_fuel_hot_index),...

length(eng.init.trq_fuel_hot_index));

% exhaust table

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%

eng.init.spd_equiv_hot_index = eng.init.spd_fuel_hot_index;

eng.init.trq_equiv_hot_index = eng.init.trq_fuel_hot_index;

eng.init.equiv_hot_map = ones(length...

(eng.init.spd_equiv_hot_index),length(eng.init.trq_equiv_hot_index));

% Heat rejection variable Presid data table

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%

eng.init.spd_htrej_hot_index = eng.init.spd_fuel_hot_index;

eng.init.trq_htrej_hot_index = eng.init.trq_fuel_hot_index;

eng.init.htrej_hot_map =

zeros(length(eng.init.spd_fuel_hot_index)...

,length(eng.init.trq_fuel_hot_index));

eng.init.htrej_hot_map =

zeros(length(eng.init.spd_htrej_hot_index)...

,length(eng.init.trq_htrej_hot_index));

% Heat Transfer

% the following is a new thermal model of the engine

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%

eng.init.spd_ex_gas_flow_hot_index = eng.init.spd_fuel_hot_index;

eng.init.trq_ex_gas_flow_hot_index = eng.init.trq_fuel_hot_index;

eng.init.ex_gas_flow_hot_map = eng.init.fuel_hot_map *(1+20);

% g/s ex gas flow map: for CI engines,

Page 237: Development and Testing of a Flexible Topology Micro ...

218

% exflow=(fuel use)*[1 + (ave A/F ratio)]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%

%eng.init.v0x\fuel use, thermal and emissions\thermal\fc heat net

% calculation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%

eng.init.ex_pwr_map = eng.init.spd_fuel_hot_index'*...

eng.init.trq_fuel_hot_index;

eng.init.ex_temp_map = eng.init.ex_pwr_map./...

(eng.init.ex_gas_flow_hot_map *1089) + 20;

% W EO ex gas temp = Q/(MF*cp) + Tamb (assumes engine tested ~20 C)

eng.init.spd_ex_temp_index = eng.init.spd_fuel_hot_index;

eng.init.trq_ex_temp_index = eng.init.trq_fuel_hot_index;

eng.init.temp_operating = 90;

eng.init.ex_temp_operating = mean(mean(eng.init.ex_temp_map));

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%

%Calculations

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%

% maximum and minimum calculations

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%

eng.init.trq_hot_max = max(eng.init.trq_max_hot_map); % N-m

[eng.init.pwr_hot_max,Idx] = max(eng.init.spd_max_hot_index.* ...

eng.init.trq_max_hot_map); % W

eng.init.pwr_max_hot_map = eng.init.spd_max_hot_index.*...

eng.init.trq_max_hot_map; % W

%Code to compute maximum speed of the engine. Speed at 80% of peak

power.

eng.init.spd_max = eng.init.spd_max_hot_index(Idx);

if Idx < length(eng.init.pwr_max_hot_map)

eng.init.spd_max =

min(interp1(eng.init.pwr_max_hot_map(Idx:end)...

+1e-6*(1:length(eng.init.pwr_max_hot_map(Idx:end))),...

eng.init.spd_max_hot_index(Idx:end),eng.init.pwr_hot_max *...

0.80,'linear','extrap'),max(eng.init.spd_max_hot_index));

end

% Calculate the max engine efficiency in within the max torque curve

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%

eng.init.eff_hot_map = (eng.init.spd_fuel_hot_index'*...

eng.init.trq_fuel_hot_index)/eng.init.fuel_heating_val./...

Page 238: Development and Testing of a Flexible Topology Micro ...

219

(eng.init.fuel_hot_map);

eng.tmp.max_trq = interp1(eng.init.spd_max_hot_index,...

eng.init.trq_max_hot_map,eng.init.spd_fuel_hot_index);

eng.tmp.max_trq = eng.tmp.max_trq(:)*ones(1,length...

(eng.init.trq_fuel_hot_index));

eng.tmp.max_trq = (eng.init.trq_fuel_hot_index(:) *...

ones(1,length(eng.init.spd_fuel_hot_index)))' > eng.tmp.max_trq;

eng.init.eff_hot_map(eng.tmp.max_trq) = 0;

eng.init.eff_max = max(max(eng.init.eff_hot_map));

eng = rmfield(eng,'tmp');

Page 239: Development and Testing of a Flexible Topology Micro ...

220

Electrical Accessory Model

%% File description

% Name : accelec_200_berkeley

% Author : Timothy Cleary - PSU

% Description : Initialize the electrical accessory power losses to

200W

% Proprietary: Public

% Model :

lib_accelec_constant_pwrloss_volt_in,lib_accelec_constant_pwrloss_pwr_

in

% Vehicle Type : Light

%% File content

accelec.list.init = {'pwr','ess_12v_mass','acc_mass'};

accelec.init.pwr = 200.0;

accelec.init.ess_12v_mass = 18;

accelec.init.acc_mass = 0;

%accelec.init.mass = 20;

Power Converter Model

%% File description

% Name : pc_99_24

% Author : Timothy Cleary PSU

% Description : Initialize the power converter model

% Efficiency = 0.99, Output voltage = 24V

% Proprietary : Public

% Model : lib_pc_P2P_constant_eff,lib_pc_V2V_constant_eff,

% lib_pc_perc_constant_eff,lib_pc_P2V_constant_eff

% Vehicle Type : Light

%% File content

pc.list.init = {'mass','eff','volt_out'};

pc.init.eff = 0.99; % efficiency

pc.init.volt_out = 24; %constant voltage output for the accessory pc

(V)

pc.init.mass = 0.5;

Page 240: Development and Testing of a Flexible Topology Micro ...

221

Final Drive Model

%% File description

% Name : fd_252_berkeley

% Author : Timothy Cleary - Pennsylvania State University

% Description : Initialize the final drive for the Berkeley

% Ratio = 2.52

% Proprietary : Public

% Model : lib_fd_map_trqloss_funTW

% Vehicle Type : Light

%% File content

fd.list.init = {'mass','ratio','inertia','spd_thresh'};

fd.init.ratio = 2.52; % will be optimized in scaling

algorithm

fd.init.inertia = 0;

fd.init.mass = 5;

fd.init.spd_thresh = 20;

fd.init.trq_eff_index =

[51.40,52.40,104.7,157.1,209.4,261.8,...

314.2,366.5,418.9,471.2,523.6];

fd.init.spd_eff_index =

[0.500,6.000,33.90,67.80,101.7,135.6,...

169.5,203.4,237.3,271.2,305.1,339];

fd.init.eff_trq_map = ones(size(fd.init.trq_eff_index,2),...

size(fd.init.spd_eff_index,2)).* 0.99;

fd.init.trq_loss_index = fd.init.trq_eff_index;

fd.init.spd_loss_index = fd.init.spd_eff_index;

fd.init.trq_loss_map =

zeros(length(fd.init.trq_loss_index),...

length(fd.init.spd_loss_index));

% create final drive loss tables

for count=1:size(fd.init.trq_loss_index,2)

for count2=1:size(fd.init.spd_loss_index,2)

fd.init.trq_loss_map(count,count2) = ...

(1-fd.init.eff_trq_map(count,count2))*...

fd.init.trq_loss_index(count);

end

clear count2

end

clear count

% calculate the maximum efficiency

fd.init.eff_max=max(max(fd.init.eff_trq_map));

Page 241: Development and Testing of a Flexible Topology Micro ...

222

Single Reduction Gear Ratio Model

%% File description

% Name : tc_224_berkeley

% Author : Timothy Cleary PSU

% Description : Initialize a single gear - Ratio = 2.24

% Proprietary : Public

% Model : lib_tc_map_trqloss_funTW

% Vehicle Type : Light, Heavy

%% File content

tc.list.init = {'mass','ratio','inertia','spd_thresh'};

tc.init.ratio = 2.24;

tc.init.inertia = 0;

tc.init.mass = 5;

tc.init.spd_thresh = 10;

tc.init.trq_eff_index =

[51.40,52.40,104.7,157.1,209.4,261.8,314.2,...

366.5,418.9,471.2,523.6];

tc.init.spd_eff_index =

[0.500,6.000,33.90,67.80,101.7,135.6,169.5,...

203.4,237.3,271.2,305.1,339];

tc.init.eff_trq_map = ones(size(tc.init.trq_eff_index,2),...

size(tc.init.spd_eff_index,2)).*0.97;

tc.init.trq_loss_index = tc.init.trq_eff_index;

tc.init.spd_loss_index = tc.init.spd_eff_index;

tc.init.trq_loss_map = zeros(length(tc.init.trq_loss_index),...

length(tc.init.spd_loss_index));

% create axle1 drive loss tables

for count=1:size(tc.init.trq_loss_index,2)

for count2=1:size(tc.init.spd_loss_index,2)

tc.init.trq_loss_map(count,count2) = (1-tc.init.eff_trq_map...

(count,count2))*tc.init.trq_loss_index(count);

end

clear count2

end

clear count

% calculate the maximum efficiency

tc.init.eff_max=max(max(tc.init.eff_trq_map));

Page 242: Development and Testing of a Flexible Topology Micro ...

223

Berkeley Vehicle (body) Model

%% File description

% Name : veh_235_05_033_berkeley

% Author : Timothy Cleary - Pennsylvania State University

% Description : Initialize a 1959 Berkeley

% Body mass = 235 kg, Frotal area = 0.5, Drag coeff = 0.33

% Proprietary : Public

% Model : lib_veh_equation_losses

% Vehicle Type : Light

% Technology:

%% File content

veh.list.init = {'frontal_area','coeff_drag','cg_height',...

'ratio_weight_front'};

veh.init.body_mass = 235; %vehicle mass without

powertrain

veh.init.frontal_area = 0.5;

veh.init.coeff_drag = 0.33;

veh.init.axle_base = 1.25;% Vehicle wheel base, (m)

veh.init.cg_height = 0.25;% Vehicle CG height, (m)

veh.init.ratio_weight_front = 0.70;

%ratio of the weight to the front wheels

veh.init.ratio_weight_front = overwrite_parameters(...

'simulation.drivetrain.veh','ratio_weight_front',...

veh.init.ratio_weight_front);

veh.init.ratio_weight_rear = (1-veh.init.ratio_weight_front);

veh.init.cargo_mass = 80;

Page 243: Development and Testing of a Flexible Topology Micro ...

Berkeley Wheel Model

%% File description % Name : wh_0203_berkeley % Author : Timothy Cleary - Pennsylvania State University % Description : Initialize a wheel with a radius of 0.2032 m % Rolling resistance coefficients are estimated % Proprietary : Public % Model : lib_wh_2wd,lib_2wd_f0f1f2 % Vehicle Type : Light

%% File content wh.list.init =

{'number_wheels','mass_per_wheel','trq_brake_max','inertia_per_wheel',

'theoretical_radius','radius_correction_factor','radius','coeff_roll1'

,'coeff_roll2','coeff_roll3','coeff_roll4'};

if strcmp(simulation.building.axle,'2 wheel drive'), wh.init.number_wheels = 4; else wh.init.number_wheels = 2; end

wh.init.trq_brake_max = 2000; % N-m wh.init.inertia_per_wheel = 0.25; % kg-m^2 wh.init.theoretical_radius =

overwrite_parameters('simulation.drivetrain.wh','theoretical_radius',0

.2032); % m wh.init.radius_correction_factor = 0.95; % correction factor

used to take into account the impact of vehicle weight on actual

radius wh.init.radius =

wh.init.theoretical_radius*wh.init.radius_correction_factor;

% m wh.init.mass_per_wheel = 2; % kg wh.init.spd_thresh = 1;% Parameter for the blending block

used in rolling resistance calculation.

% Rolling Resistance Coefficient as a polynomial function of speed. % wh.init.coeff_roll1 + wh.init.coeff_roll2*w +

wh.init.coeff_roll3*w^2 + wh.init.coeff_roll4*w^3 wh.init.coeff_roll1 = 0.006; wh.init.coeff_roll2 = 0.00012; wh.init.coeff_roll3 = 0; wh.init.coeff_roll4 = 0;

wh.init.friction_coefficient = [0.97 0.97 0.95 0.9 0.85 0.65 0.5 0.5

0.5 0.5];% values for Dry Alsphalt

Page 244: Development and Testing of a Flexible Topology Micro ...

225

wh.init.vehicle_speed =

conversion_calc('linear_speed','mile/h','m/s',[0 10 20 30 40 50 60 70

80 90]);

Page 245: Development and Testing of a Flexible Topology Micro ...

APPENDIX F

ABC 150 Script

Pulse Power Testing

/* Script for running 48 Volt 60 Ah Air Cooled NimH pack Pulse Power

Test */

void main()

{

/* Define constants and variables */

/* This list sends the limit values to the machine at the start of the

test */

/* When the values hit the limit the test stops; The ABC will just

hold that value no matter what is requested until it decreases within

range. */

ABCVmin = 20;

ABCVmax = 65;

ABCImin = -100;

ABCImax = 75;

ABCPmin = -10;

ABCPmax = 5;

ChangeLimits();

OutputFileInterval(1.0);

/* Battery testing starts here */

/* Step 1 -- Rest at OCV */

Standby(0, CommandTime>=5.0);

OutputFileInterval(0.1);

/* Step 2 -- Pulse Discharge */

Current(-100, CommandTime>=10 || ABCVoltage <= 25);

OutputFileInterval(1.0);

/* Step 3 -- Rest at OCV */

Standby(0, CommandTime>=60.0);

Page 246: Development and Testing of a Flexible Topology Micro ...

227

OutputFileInterval(0.1);

/* Step 4 -- Pulse charge */

Current(75, CommandTime>=10 || ABCVoltage >= 65);

OutputFileInterval(1.0);

/* Step 5 -- Rest at OCV */

Standby(0, CommandTime>=10.0);

/* Step 6 -- Discharge 10% SOC at 1C */

Current(-60, CommandTime>= 360);

OutputFileInterval(60.0);

/* Step 5 -- Rest at OCV for 1 hour*/

Standby(0, CommandTime>=3600);

/* End Test */

}

Page 247: Development and Testing of a Flexible Topology Micro ...

Co-Simulation and HIL Simulation

/* Script for running 48 Volt 60 ah Motorcraft NimH pack in a co-sim or HIL test */

void main()

{

/* Define constants and variables */

/* This list sends the limit values to the machine at the start of the test */

/* When the values hit the limit the test stops; The ABC will just hold that value no matter what is

requested until it decreases within range. */

ABCVmin = 32;

ABCVmax = 56.8;

ABCImin = -265;

ABCImax = 265;

ABCPmin = -17;

ABCPmax = 17;

ChangeLimits();

OutputFileInterval(0.01);

/* Battery testing starts here */

/* Step 1 -- Rest at OCV */

Standby(0, CommandTime>=5.0);

/* Step 2 -- allow -5 to 5 Volt signal to command current */

Current(0, CommandTime>=1400 || ABCVoltage >= 58 || ABCVoltage <= 31);

/* End Test */

}

Page 248: Development and Testing of a Flexible Topology Micro ...

Appendix G

Motor Controller Parameters

Example of primary motor parameters for normal operation

Battery Information

Setting Min Max

One Hour Rate

6000 500 0 500

Five Hour Rate

6001 500 0 500

Reset Voltage

6002 60 0 120

Speed

Motor Speed

6003 7500 200 8000

Regen Threshold

6004 50 20 400

Control Mode Select

600A 2 0 2 0 - Speed Mode Express

Max Speed

600B 7500 100 8000 rpm

Kp

600C 30 0 100 %

Ki

600D 10 5 100 %

Accel Rate

600E 3.5 0.1 30 Seconds

Decel Rate

600F 7 0.1 30 Seconds

Brake Rate

6010 1 0.1 30 Seconds

Pump Enable

6011 1 0 1

1 - Speed Mode

Speed Controller

Max Speed 6012 7500 100 8000 rpm

Kp

6013 30 0 100 %

Ki

6014 10 5 100 %

Vel Feedforward

Kvff 6015 0 0 500 Ampere

Build Rate 6016 1 0.1 5 Seconds

Release Rate 6017 0.4 0.1 2 Seconds

Acc Feedforward

Kaff 6018 0 0 500 Ampere

Kbff 6019 0 0 500 Ampere

Build Rate 601B 1 0.1 5 Seconds

Release Rate 601C 0.4 0.1 2 Seconds

Response

Full Accel Rate HS 601D 7 0.1 30 Seconds

Full Accel Rate LS 601E 3.5 0.1 30 Seconds

Low Accel Rate 601F 15 0.1 30 Seconds

Page 249: Development and Testing of a Flexible Topology Micro ...

230

Neutral Decel Rate HS 6020 7 0.1 30 Seconds

Neutral Decel Rate LS 6021 12 0.1 30 Seconds

Full Brake Rate HS 6022 1 0.1 30 Seconds

Full Brake Rate LS 6023 2 0.1 30 Seconds

Low Brake Rate 6024 5 0.1 30 Seconds

Fine Tuning

Partial Decel Rate 6025 30 0.1 30 Seconds

HS (High Speed) 6026 70 0 100 %

LS (Low Speed) 6027 30 0 100 %

Reversal Soften 6028 20 0 100 %

Max Speed Accel 6029 1 0.1 30 Seconds

Max Speed Decel 602A 10 0.1 30 Seconds

Pump Enable

6031 1 0 1

2 - Torque Mode

Speed Limiter

Max Speed 6032 7500 500 8000 rpm

Kp

6033 25 0 100 %

Ki

6034 20 5 100 %

Kd

6035 5 0 100 %

Response

Accel Rate 6036 0.1 0.1 30 Seconds

Accel Release Rate 6037 0.1 0.1 2 Seconds

Brake Rate 6038 0.1 0.1 5 Seconds

Brake Release Rate 6039 0.1 0.1 2 Seconds

Neutral Braking 603A 0 0 100 %

Neutral Taper Speed 603B 2000 200 6000 rpm

Fine Tuning

Creep Torque 603C 0 0 100 %

Brake Full Creep Cancel 603D 50 25 100 %

Creep Build Rate 603E 0.1 0.1 5 Seconds

Creep Release Rate 603F 3 0.1 5 Seconds

Creep Release Rate Rollback 6040 10 0.1 30 Seconds

Gear Soften 6041 20 0 100 %

Brake Taper Speed 6042 1000 200 6000 rpm

Reversal Soften 6043 20 0 100 %

Max Speed Decel 6044 10 0.1 30 Seconds

Restraint

Restraint Forward

6045 0 0 100 %

Restraint Back

6046 0 0 100 %

Soft Stop Speed

6047 0 0 500 rpm

Position Hold

Position Hold Enable 6048 0 0 1

Page 250: Development and Testing of a Flexible Topology Micro ...

231

Kp

6049 10 2 100 %

Kp Deadband (motor degrees) 604A 0 0 720

Kd

604B 15 0 100 %

Set Speed Threshold 604E 30 5 100 rpm

Entry Rate 604F 50 5 100 %

Exit Rollback Reduction 6050 20 0 100 %

Current Limits

Drive Current Limit

6055 100 5 100 %

Regen Current Limit

6056 100 5 100 %

Brake Current Limit

6057 100 5 100 %

EMR Current Limit

6058 100 5 100 %

Interlock Brake Current Limit 6059 100 5 100 %

Power Limiting Map

Base Speed 605A 1500 100 4000 rpm

Delta Speed 605B 500 50 1000 rpm

Drive Limiting Map

Nominal 605C 100 0 100 %

Base Plus Delta 605D 100 0 100 %

Base Plus 2xDelta 605E 100 0 100 %

Base Plus 4xDelta 605F 100 0 100 %

Base Plus 8xDelta 6060 100 0 100 %

Regen Limiting Map

Nominal 6061 100 0 100 %

Base Plus Delta 6062 100 0 100 %

Base Plus 2xDelta 6063 100 0 100 %

Base Plus 4xDelta 6064 100 0 100 %

Base Plus 8xDelta 6065 100 0 100 %

Throttle

Throttle Type

6066 5 1 5

Forward Deadband

6067 0.3 0 5 Volt

Forward Map

6068 35 0 100 %

Forward Max

6069 3.6 0 5 Volt

Forward Offset

606A 0 0 100 %

Reverse Deadband

606B 0.3 0 5 Volt

Reverse Map

606C 35 0 100 %

Reverse Max

606D 3.6 0 5 Volt

Reverse Offset

606E 0 0 100 %

Throttle Filter

606F 10 2 125 Hz

HPD/SRO Enable

6070 0 0 1

Sequencing Delay

6071 0.1 0 5 Seconds

Page 251: Development and Testing of a Flexible Topology Micro ...

232

VCL Throttle Enable

6072 1 0 1

Brake

Brake Pedal Enable

6073 1 0 1

Brake Type

6074 5 1 5

Brake Deadband

6075 0.5 0 5 Volt

Brake Map

6076 50 0 100 %

Brake Max

6077 4.5 0 5 Volt

Brake Offset

6078 0 0 100 %

Brake Filter

6079 10 2 125 Hz

VCL Brake Enable

607A 1 0 1

EM Brake Control

EM Brake Set Upon Fault 607B 1 0 1

Brake Type

607C 0 0 2

Pull In Voltage

607D 100 0 100 %

Holding Voltage

607E 50 0 100 %

Battery Voltage Compensated 607F 1 0 1

Set Speed Threshold 6080 30 5 100 rpm

Release Delay

6081 48 40 2000 ms

Set Speed Settling Time 6082 3012 0 5000 ms

Torque Preload Delay 6083 200 0 800 ms

Torque Preload Enable 6084 1 0 1

Torque Preload Cancel Delay 6085 0 0 120 Seconds

Drivers

Main Contactor

Main Enable 6086 1 0 1

Pull In Voltage 6087 90 0 100 %

Holding Voltage 6088 50 0 100 %

Battery Voltage Compensated 6089 1 0 1

Interlock Type 608A 2 0 2

Open Delay 608B 0.1 0 40 Seconds

Checks Enable 608C 1 0 1

Main DNC Threshold 608D 5 0 84 Volt

Precharge Enable 608E 1 0 1

Proportional Driver

PD Enable 608F 0 0 1

Hyd Lower Enable 6090 0 0 1

PD Max Current 6091 2 0 2 Ampere

PD Min Current 6092 0.05 0 2 Ampere

PD Dither % 6093 0 0 100 %

PD Dither Period 6094 16 16 112 ms

PD Kp

6095 10 0 100 %

Page 252: Development and Testing of a Flexible Topology Micro ...

233

PD Ki

6096 10 0 100 %

Hydraulic Contactor

Contactor Enable 6097 0 0 1

Pull In Voltage 6098 100 0 100 %

Holding Voltage 6099 80 0 100 %

Fault Checking

Driver 1 Checks Enable 609A 0 0 1

Driver 2 Checks Enable 609B 0 0 1

Driver 3 Checks Enable 609C 0 0 1

Driver 4 Checks Enable 609D 0 0 1

PD Checks Enable 609E 0 0 1

External Supply Max 609F 200 5 200 mAmpere

External Supply Min 60A0 5 5 200 mAmpere

Motor

Typical Max Speed

60A1 8000 500 8000 rpm

Swap Encoder Direction 60A2 1 0 1

Swap Two Phases

60A3 0 0 1

Encoder Steps

60A4 64 32 256

Encoder Fault Setup

Fault Detection Enable 60A9 1 0 1

Fault Stall Time 60AA 5 1 10 Seconds

LOS Upon Encoder Fault 60AB 1 0 1

LOS Max Speed 60AC 800 100 2000 rpm

LOS Max Current 60AD 400 100 650 Ampere

LOS Max Mod Depth 60AE 50 15 100 %

LOS Accel Rate 60AF 7 2 15 Seconds

LOS Decel Rate 60B0 3 2 15 Seconds

Temperature Control

Sensor Enable 60B5 1 0 1

Sensor Type 60B6 3 1 5

Sensor Offset 60B7 0 -20 20 deg C

Temperature Hot 60B8 145 0 250 deg C

Temperature Max 60B9 160 0 250 deg C

MotorTemp LOS Max Speed 60BA 800 100 3000 rpm

Battery

Nominal Voltage

60BB 48 24 84 Volt

Undervoltage Cutback Range 60BC 7 2 14 Volt

User Overvoltage

60BD 123 115 200 %

User Undervoltage

60BE 77 50 80 %

Reset Volts Per Cell

60C0 2 0.9 3 Volt

Page 253: Development and Testing of a Flexible Topology Micro ...

234

Full Volts Per Cell

60C1 3 0.9 3 Volt

Empty Volts Per Cell 60C2 2 0.9 3 Volt

Discharge Time

60C3 60 0 600 Minutes

BDI Reset Percent

60C4 80 0 100 %

Vehicle

Metric Units

60C5 0 0 1

Speed to RPM

60C6 10 10 3000

Capture Speed

60C7 4500 0 8000 rpm

Capture Distance 1

60C8 22 1 1320

Capture Distance 2

60C9 100 1 1320

Capture Distance 3

60CA 150 1 1320

Emergency Reverse

EMR Enable

60CB 0 0 1

EMR Type

60CC 1 0 1

EMR Dir Interlock

60CD 0 0 1

EMR Time Limit

60CE 3 0 30 Seconds

EMR Speed

60CF 1000 50 6000 rpm

EMR Accel Rate

60D0 0.1 0.1 3 Seconds

EMR Decel Rate

60D1 0.1 0.1 3 Seconds

Interlock Braking

Enable

60D2 0 0 1

Decel Rate HS

60D3 2 0.1 30 Seconds

Decel Rate LS

60D4 3 0.1 30 Seconds

Interlock Brake Timeout 60D5 5 0 8 Seconds

CAN Interface

CANopen Interlock

60D6 0 0 1

Master ID

60D7 1 0 3

Slave ID

60D8 6 0 31

Baud Rate

60D9 2 0 2

Heartbeat Rate

60DA 100 16 200 ms

PDO Timeout Period 60DB 0 0 200 ms

Emergency Message Rate 60DC 16 16 200 ms

Suppress CANopen Init 60DD 0 0 1

Motor Control Tuning

Motor Characterization Tests

Test Enable 60E7 0 0 1

Test Throttle 60E8 0 -1 1

Motor Poles 60E9 4 2 8

Max Test Speed 60E1 1000 500 3000 rpm

Max Test Current 60EA 70 40 100 %

SlipGain

60EB 3.3 0 200

Page 254: Development and Testing of a Flexible Topology Micro ...

235

Field Weakening Control

Base Speed 60EC 3000 200 6000 rpm

Field Weakening 60ED 50 0 100 %

Weakening Rate 60EE 25 0 100 %

Motor Type

60F9 2 0 200

Reset Controller

613B 0 0 1

Note, for motor to motor testing response rates are adjusted. Drive motor response is reduced

while dynamometer motor response rate is increased.

Page 255: Development and Testing of a Flexible Topology Micro ...

Bibliography

Acculab. (n.d.). SVI Series Instructional Manual SVI -20B. Edgewood, New York: Acculab

USA.

Congress, U. S. (2009). American Recovery and Reinvestment Act. H.R. 1-24.

Congress, U. S. (2007). Energy Independence and Security Act. Sec 102 H.R. 6-8.

Crabb, H. C. (1998). The Virtual Engineer – 21st Century Product Development. ASME Press .

Curtis Instruments. (2006, Feburary 3). Generic CANopen Implementation. Livermore, CA:

Release 1.13.

Curtis Instruments, Inc. (2008, August 4). AC Induction Motor Controllers - 1234/36/38 Manual.

OS 11.0 37022 . Mt. Kisco, New York.

Daytronic. (November 1996). Model 3200 / 3300 Digital Indicator Instructional Manual. v.SB.5 .

Dayton, Ohio: Pub.No.3200/300M.5 Part Number 91130.

Dyne System, Inc. (2009, December). Water Cooled Eddy Current Dynamometers User Manual.

Jackson, Wisconsin.

Energy Efficiency and Renewable Energy Vehicle Technologies. (n.d.). Retrieved March 31,

2010, from U.S. Department of Energy:

http://www1.eere.energy.gov/vehiclesandfuels/deployment/education/fcvt_gate.html

FreedomCAR. (2003). FreedomCAR Battery Test Manual For Power-Assist Hybrid Electric

Vehicles. FreedomCAR. Washinton DC: Department of Energy.

Page 256: Development and Testing of a Flexible Topology Micro ...

237

Guozheng Li, N. T. (2009). The Design of Hardware-in-the-loop Simulation Based on Electric-

drive’s Mathematical Model. Second International Conference on Information and Computing

Science.

Honda. (2007). GC 190 Horizontal Shaft Gasoline Engine.

Hu Zhong, G. A. (2006). The Development ofA Real-Time Hardware-in-the-Loop Test Bench for

Hybrid Electric Vehicles Based on Multi-Thread Technology. Shanghai: IEEE.

I+ME. (2008). User Manual Battery Control System.

Lohse-Busch, H. (2009, September 11). Development and Applications of the Modular

Automotive Technology Testbed (MATT) to Evaluate Hybrid Electric Powertrain Components

and Energy Management Strategies. Phd. Dissertation submitted to Varginia Polytechnic Institute

and State University . Blacksburg, VA.

MathWorks. (2009). Matlab R2009B 7.9.0.529. www.mathworks.com .

National Instruments Corporation. (1995). ER - 8/16 User Manual. An 8-Channel or 16-Channel

SPDT Relay Accessory . www.ni.com

Omonowo D. Momoh, M. O. (2009). An Overview of Hybrid Electric Vehicle Technology. 5th

IEEE Vehicle Power and Propulsion Conference.

Rousseau, P. S. (2002). Powertrain System Analysis Toolkit. Argonne National Labrotory,

University of Chicago.

S. Raman, N. S. (1999). Design and Implementation of HIL Simulators for Powertrain Control

System Software. American Control Conference. San Diego.

SAE. (Feburary 2008). Hybrid Electric Vehicle and Electric Vehicle Terminology. SAE

International, Surface Vehicle Information Report. SAE J1715.

Page 257: Development and Testing of a Flexible Topology Micro ...

238

SAE. (1995). Prodecure for Mapping Performance-Spark Ignition and Compression Ignition

Engines. Society of Automotive Engineers , SAE J1312 26.23.

Softing. (2004, January). CAN-AC2-PCI User Manual Version 4.10. Version 4.10 . Haar,

Germany.

Zhao Hui, L. C. (2008). Design of a Versatile Test Bench for Hybrid Electric Vehicles. IEEE

Vehicle Power and Propulsion Conference. Harbin.