RANGE EXTENDER DEVELOPMENT FOR USING ENGINE

GENERATOR SET

A Thesis

Presented to

The Graduate Faculty of The University of Akron

In Partial Fulfillment

of the Requirements for the Degree

Master of Sciences

Hari Prasad Ambaripeta

May, 2015

RANGE EXTENDER DEVELOPMENT FOR ELECTRIC VEHICLE USING ENGINE

GENERATOR SET

Hari Prasad Ambaripeta

Thesis

______Advisor Department Chair Dr. Yilmaz Sozer Dr. Abbas Omar

______Committee Member Dean of the College Dr. Malik Elbuluk Dr. George K. Haritos

______Committee Member Interim Dean of the Graduate School Dr. Tom T. Hartley Dr. Rex D. Ramsier

______Date

ii

ABSTRACT

The modeling, simulation and implementation of a range extender for an existing truck are presented in this document. The objective of this thesis is to re-engineer an existing electric truck into a series through a range extender. A

LiFePO4 (Li-Ion) battery pack powered electric vehicle is used as a platform to implement a range extender using an advanced control strategy.

A range extended electric vehicle has been simulated using series hybrid electric vehicle architecture to size the range extender by studying the behavior of the system under different drive cycles. To determine the size of the range extender, a specific drive cycle in which the vehicle is considered to be cruising at 65 Mph was selected to study the operation of the range extended electric vehicle. By analyzing the results of the simulations it has been concluded that a 30 kW engine and generator set is an appropriate size of the range extender to design a range extended electric vehicle. The range extender was designed, simulated and tested at a bench before it was implemented on a vehicle. A

30 kW range extender was developed by mechanically coupling a 40 hp V-twin horizontal shaft gasoline engine with a 30 kW permanent magnet generator from one of the electrical machines in the of 2004 Toyota Prius. A range extended electric vehicle control algorithm was developed to control the operation of the engine and generator set relative to the state of charge (SOC) of the battery pack. The main objective of the developed algorithm is to maintain the SOC of the battery pack between a certain limits predefined by the programmer. It was determined that by maintaining the

iii

SOC of the battery pack in between 60% to 80% the targeted distance of 100 miles was achieved with 2 gallons of the gasoline.

A novel power converter was developed to convert three phase AC output of the generator into an appropriate DC voltage to charge the battery pack. The developed power converter consists of a three phase diode rectifier electrically coupled with a three legged interleaved buck converter. This power converter was tested on different electrical loads before implementing on the range extender.

The main objective of the developed power converter is to reduce the size of the components. By combining three buck converters in parallel the maximum amount of the current through each buck converter, is reduced to one third of the original current. A constant current battery charging algorithm was developed to control power converter.

Three PWM signals with 120 deg phase shifted with each other were generated using the control algorithm which will help to reduce the ripple content in the output battery current. With this sequence of the generated PWM the ripple content is reduced by a factor of 6.

Additional future work was suggested in this thesis work to increase the reliability of the developed range extended electric vehicle.

iv

DEDICATION

Dedicated to my family, friends and teachers

v

ACKNOWLEDGMENTS

I would like to express my deepest gratitude to Dr. Yilmaz Sozer for being my academic advisor and appreciate his encouragement, support and advice during the course of my graduate studies. It would not have been possible to write and work on my thesis without his help and support.

I would like to sincerely thank Dr. Malik Elbuluk and Dr. Tom Hartley for being supporting members of my advisory committee. I cherished my time with Dr. Elbuluk as his teaching assistant. I would like to appreciate Dr. Hartly for his support and guidance to start my thesis work with the help of his expertise.

I would like to thank Dr. Iqbal Husain and Prasanna Mantravadi for introducing this challenging project. I am thankful to Prasanna for his help with the tools and the process that are required to successfully complete my thesis work.

I would like to thank US Department of Energy and the Electrical and Computer

Engineering Department of University of Akron for their financial support throughout my graduate studies. I would like to thank Mrs. Gay Boden for supporting throughout my graduate studies. During the time I spent in University of Akron I have grown both professionally and personally in many aspects. For that I am in debt for my life.

I would like to thank Mr. Eric Rinaldo, Mr. Dale Eartly and Igor Vinogred for their help in designing of the system.

vi

Last but not least I would like to thank my parents, friends and colleagues for their love and support. I dedicate this thesis to my mom for her love and encouragement during the tough times of my life.

vii

TABLE OF CONTENTS

Page

LIST OF FIGURES……………………………………………………………………..xii

LIST OF TABLES………………………………………………………………….…xvii

CHAPTER

I. INTRODUCTION………………………………………………………………………1

1.1 Introduction………………………………………………………………………….1

1.2 History of hybrid electric vehicles and current market trends…………………...….2

1.3 Research Motivation…………………………………………………………….…..3

1.4 Thesis overview………………………………………………………………….….6

II. TECHNOLOGIES AND PROPOSED WORK…………………8

2.1 Introduction……………………………………………………………………….…8

2.2 Hybrid electric vehicle technologies………………………………………………...8

2.2.1 Series hybrid electric vehicle…………………………………………………...8

2.2.2 Parallel hybrid electric vehicle…………………………………………………9

2.2.3 Series-Parallel hybrid electric vehicle………………………………………...10

2.3 Range extenders…………………………………………………………………....12

2.3.1 Types of range extenders……………………………………………………...12

2.4 Proposed range extended electric vehicle………………………………………….13

2.4.1 Battery pack (LiFePO4 battery pack) and traction drive (Induction motors)..13

2.4.2 Engine –Generator set………………………………………………………...14

viii

2.4.3 Proposed Power Converter……………………………………………………14

2.4.3.1 Reduction of the power rating of the power electronic components...... 16

2.4.3.2 Reduced ripple content in the output current ...... 16

2.5 Conclusion…………………………………………………………………………17

III. MODELLING AND SIZING OF THE RANGE EXTENDER AND SUB COMPONENTS...... 18

3.1 Introduction………………………………………………………………………...18

3.2 Modeling of series HEV…………………………………………………………...18

3.2.1 EV drivetrain………………………………………………………………….20

3.2.2 Vehicle dynamics model……………………………………………………...22

3.2.3 Range extender………………………………………………………………..23

3.2.4 Modeling of engine and generator set………………………………………...25

3.2.4.1 Modeling of engine……………………………………………………….25

3.2.4.2 Generator Modeling………………………………………………………27

3.2.5 Modeling of LiFePO4 (Li-ion) battery pack………………………………….31

3.2.6 Modeling of three phase interleaved DC-DC converter………………………36

3.2.7 Small signal modeling of the buck converter and Li-Ion battery pack……….39

3.2.8 PI controller design……………………………………………………………44

3.3 Supervisory control algorithm……………………………………………………..47

3.4 DC-DC converter control algorithm……………………………………………….50

3.5 Conclusion…………………………………………………………………………51

IV. SIMULATION RESULTS OF RANGE EXTENDED ELECTRIC VEHICLE…….52

4.1 Introduction………………………………………………………………………...52

4.2 Simulation results of the proposed SHEV system……………………………..…..52

ix

4.3 Simulation results of developed power converter with resistive load……………..54

4.4 Simulation results of power converter with no load connected to the DC-DC converter……………………………………………………………………………….55

4.5 The simulation results with resistive load connected to DC-DC converter……….56

4.6 Simulation results of the developed converter with LiFePO4 battery pack……….59

4.7 Simulation results of the series hybrid electric vehicle with developed control algorithm…………………………………………………………………………….....62

4.7.1 Simulation results of for UDDS drive cycle…………………………………..62

4.7.2 Simulation results of the series hybrid electric vehicle for HWFET drive cycle…………………………………………………………………………………65

4.8 Simulation results of the series hybrid electric vehicle with a cruising speed of 65mph……………………………………………………………………………..…...67

4.9 Conclusion…………………………………………………………………………69

V. EXPERIMENTAL SETUP…………………………………………………………...70

5.1 Introduction………………………………………………………………………...70

5.2 LiFePO4 battery powered electric vehicle………………………………………....71

5.3 Designed engine and generator set………………………………………………...72

5.4 Developed three phase interleaved DC-DC converter……………………………..74

5.6 Supervisory control algorithm……………………………………………………..78

5.7 Engine Ignition circuitry………………………………………………………...... 80

5.8 Vehicle CAN Communications……………………………………………………81

5.9 Conclusion…………………………………………………………………………85

VI. EXPERIMENTAL RESULTS………………………………………………………86

6.1 Introduction………………………………………………………………………..86

6.2 Experimental results of the power converter……………………………….……...86

6.3 Results of the range extender with vehicle batteries as load……………………....89

x

6.4 Conclusion………………………………………………………………………..100

VII. CONCLUSIONS AND FUTURE WORK………………………………………...101

7.1 Introduction…………………………………………………………………….…101

7.2 Modeling of a range extended electric vehicle…………………………………...101

7.3 Fault tolerant three phase interleaved buck converter……………………………102

7.4 Range extender electric vehicle control algorithms……………………………....102

7.5 Experimental setup and Experimental results……………………………….……103

7.6 Suggested future work……………………………………………………………104

7.6.1 Plug-in hybrid electric vehicle……………………………………………….104

7.6.2 Battery management system…………………………………………………105

REFERENCES…………………………………………………………………………107

APPENDICES……………………………………………………………………….....109

APPENDIX A: ENGINE AND GENERATOR SIZING CALCULATIONS…….…110

APPENDIX B: MATLAB/SIMULINK MODELS………………………………….112

APPENDIX C: CURRENT CONTROL ALGORITHM DEVELOPED TO CONTROL THE DC-DC CONVERTER…………………………………………………………120

xi

LIST OF FIGURES

Figure Page

1.1: Solectria E-10 (Battery powered electric vehicle) vehicle used in this thesis work.....6

2.1: Architecture of the series hybrid electric vehicle...... 9

2.2: Architecture of the parallel hybrid electric vehicle...... 10

2.3: Architecture of the series-parallel hybrid electric vehicle...... 11

2.4: Toyota Prius engine and generator set with the power control unit...... 11

2.5: 2004 Toyota Prius planetary gear system...... 12

2.6: Block diagram of developed range extender in this thesis work...... 16

3.1: Block diagram of the proposed range extended electric vehicle...... 19

3.2: Vehicle speed profile of urban dynamometer driving cycle...... 21

3.3: Vehicle speed profile of highway fuel economy test...... 21

3.4: Vehicle Speed when the vehicle is cruising at a speed of 65 mph...... 22

3.5: Back EMF generated by the generator used in this thesis work...... 29

3.6: Speed vs Maximum torque plot of 40 hp Kohler engine...... 30

3.7: Lumped parameter model of a single – battery...... 31

3.8: Open circuit voltage approximation of a single LiFePO4 battery cell...... 32

3.9: Calculation of the ohmic resistance of a single LiFePO4 battery cell...... 33

3.10: Calculation of diffusivity resistance of the LiFePO4 battery pack...... 34

3.11: Diffusivity capacitance of the LiFePO4 battery cell...... 35

3.12: Equivalent model of a single LiFePO4 battery cell...... 35

xii

3.13: Equivalent model of LiFePO4 battery pack...... 35

3.14: Single buck converter used to design a DC-DC converter...... 36

3.15: Operation of buck converter when the switch is ON...... 37

3.16: Operation of buck converter when the switch is OFF...... 38

3.17: PWM signals, inductor current and capacitor current of the buck converter...... 39

3.18: Equivalent modeling of LiFePO4 battery pack used in this thesis work...... 40

3.19: Block diagram of the developed plant and controller...... 44

3.20: Inductor current output from the small signal modeling of a single buck converter45

3.21: Inductor current from the Simulink modeling of a single buck converter...... 46

3.22: Proposed power converter...... 47

3.23: Battery charging algorithm for the range extenders...... 49

3.24: PI controller to generate PWM signal for the DC-DC converter...... 50

4.1: Block diagram for a simulation of series hybrid electric vehicle...... 53

4.2: Block diagram of the developed power converter...... 54

4.3: Back EMF generated by the generator under no load condition...... 55

4.4: Output voltage of the three phase diode rectifier under no load condition...... 55

4.5: Generator terminal voltages with resistive load...... 56

4.6: Rectifier output voltage with resistive load...... 57

4.7: PWM waveforms generated for the switching of IGBTs...... 57

4.8: Inductor currents of the DC-DC converter...... 58

4.9: DC-DC converter output voltage with resistive load...... 58

4.10: Line to line terminal voltage of the generator...... 60

4.11: Output voltage of the three phase diode rectifier...... 60

xiii

4.12: 3 phase Inductor currents of the DC-DC converter...... 61

4.13: Output voltage and output current of the DC-DC converter...... 61

4.14: Vehicle speed profile for UDDS driving schedule...... 63

4.15: Simulation results of series hybrid electric vehicle for UDDS speed profile...... 64

4.16: Vehicle speed profile for HWFET driving schedule...... 65

4.17: Simulation results of series hybrid electric vehicle with HWFET speed profile. .... 66

4.18: Vehicle speed when the vehicle is cruising at a speed of 65 mph...... 67

4.19: Simulation results of series SHEV when vehicle is cruising at 65 mph...... 68

5.1: Block diagram of the experimental setup developed in this thesis work...... 70

5.2: LiFePO4 battery powered electric vehicle (Solectria E10)...... 72

5.3: 40 hp V-Twin horizontal shaft gasoline engine...... 73

5.4: 30 kW generator from 2004 Toyota Prius transmission...... 73

5.5: Designed engine and generator set in this thesis work...... 74

5.6: Schematic diagram of the three phase interleaved DC-DC converter...... 75

5.7: Layout of the developed power converter...... 76

5.8: Battery charger with three phase interleaved DC to DC converter...... 77

5.9: Block diagram of the driver circuit board ...... 77

5.10: Driver circuit board used in this thesis work...... 78

5.11: Supervisory control module developed in this thesis work...... 79

5.12: Engine ON/OFF and ignition ON/OFF signals profiles...... 80

5.13: Ignition circuitry used in this thesis work...... 81

5.14: Basic CAN communication block diagram...... 82

5.15: Mototune analysis for the CAN communication between vehicle ECU and TIDSP……………………………………………….…………………………………...83

xiv

5.16: CAN bus analysis and messages on the bus used in the SCM...... 84

5.17: Power flow diagram of the range extenders...... 84

6.1: Experimental setup to test the power converter with the battery pack...... 87

6.2: Input voltage and input current in one line of 3-Phase voltage input...... 88

6.3: Battery voltage and charging current...... 88

6.4: Outputs of the range extender while charging the batteries of the vehicle...... 90

6.5: Inductor currents of the power converter in the range extender...... 91

6.6: Change in the charging currents depending reference current...... 92

6.7: Battery power output during the vehicle testing of range extender...... 93

6.8: Results of the developed algorithm considering the vehicle is at stationary...... 94

6.9: Battery voltage during running operation of the range extended vehicle...... 95

6.10: Test results of the while the vehicle is running...... 96

6.11: Test results of the while the vehicle is running on a dyno (dyno test 1)...... 97

6.12: Battery power output and Induction motor speed (RPM) (dyno test 1)...... 98

6.13: Test results of the while the vehicle is running on a dyno (dyno test 2)...... 99

6.14: Battery power output and Induction motor speed (RPM) (dyno test 2)...... 100

7.1: Block diagram of the Plug-in hybrid electric vehicle...... 105

B1: Simulation of the series hybrid electric vehicle used in this thesis work...... 112

B2: Model for the driver commands in series hybrid electric vehicle...... 113

B3: Speed profiles and the pedal command for the series hybrid electric vehicle...... 114

B4: Supervisory control module (SCM)...... 115

B5: Simulink model for the engine and generator set...... 116

B6: Simulation model of the electric motors used in the electric truck...... 116

xv

B7: Simulation of the vehicle dynamics...... 117

B8: Simulation of the LiFePO4 battery pack...... 118

B9: Simulation of the range extender developed in this thesis work...... 118

B10: Power converter developed in this thesis work...... 119

xvi

LIST OF TABLES

Table Page

3.1: Specifications of the hybrid electric vehicle………………………………...………23

3.2: Output of the simulations with different SOC limits and engine ratings……………25

3.3: Specifications of the internal permanent magnet synchronous generator…………..28

5.1: List of components used to design power converter………………………………..76

5.2: CAN messages used in this thesis work……………………………………...... 84

xvii

CHAPTER I

INTRODUCTION

1.1 Introduction

In recent decades, the automobile industry has played a major role in the consumption of the world’s oil reserves. Statistical analysis has shown that, with the official Iraqi oil reserves as the world’s largest oil reserve, and comparing the current consumption rate of the oil, these reserves will serve the world until 2065[1]. Most automobiles use an internal combustion engine (ICE) as the source for the propulsion. The transportation industry plays a major role in day to day human life. These industries will not only contribute in the consumption of oil, they play a major role in the atmospheric pollution.

Effects of the atmospheric pollution such as global warming and the greenhouse effect are directly related to oil consumption by the automobile industries. The automobile industries are sincerely trying to reduce the consumption of oil, which will preserve the world’s oil reserves and reduce atmospheric pollution. As a part of the effort to reduce the oil consumption and atmospheric pollution, most automobile industries are inclined towards developing battery powered electric vehicles (BEV) or automobiles powered by fuel cells. EVs have zero emissions as they are powered by battery power, and the traction of these automobiles is designed using electric motors which help reduce CO2 emissions and acoustic noise generated by vehicles. The main disadvantage of the electric vehicles is their limited range [2]. With a single fully charged battery pack, the distance covered by an electric vehicle is limited. Considering this disadvantage of electric

1 vehicles, most of the automobile manufacturers are inclined towards developing hybrid electric vehicles (HEV). A HEV is an automobile which uses multiple sources of energy for the propulsion of the vehicle [3]. With the additional sources of energy, the distance covered by the electric vehicle can be increased, and the pollution caused by the automobile is reduced when compared to conventional automobiles which use an internal combustion engine as the only source of energy for the vehicle propulsion. Depending on the utilization of the additional source of energy, different kinds of hybrid electric vehicles have been developed.

1.2 History of hybrid electric vehicles and current market trends

The first hybrid car was built in the year 1899, and was called the System

Lohner-Porsche Mixte. It used a gasoline engine to charge the accumulators which powered the electric motors for the vehicle propulsion. The efficiency of the system was quite low and the price was significantly high. In 1904 when Henry Ford started making automobiles powered by gasoline engines at low cost when compared to hybrid electric vehicles, it shrunk the market for the hybrid vehicles [4].

After careful studies of pollution sources and the depletion of the gasoline products, the US congress has passed legislation in 1960 to increase the usage of electric vehicles. Over the next 25 years most of the automotive companies designed many electric vehicles, but the developed hybrid vehicles had limited driving range

In 1999, Honda developed its first mass produced of hybrid electric vehicle, the

Honda Insight. The Toyota Prius sedan, released in the year 2000, has marked its own position in the market of hybrid electric vehicle manufacturers.

2

1.3 Research Motivation

Combustion is the sequence of exothermic reactions caused by burning fuel with oxidants, which releases ample amounts of heat energy. Automobiles which use an internal combustion engine as the source of propulsion, combust fuel (gasoline and diesel) with air and releases heat energy which will be used to propel the vehicle. The byproducts of the fuel combustion are carbon monoxide (CO), nitrogen dioxide (NO2), sulfur dioxide (SO2) and other particulates which contribute a major portion of the atmospheric pollution. Fuel consumption of the transport sector accounts for nearly 32 % of the total oil consumption in the world. Conventional automobiles which use gasoline and diesel consume most of the oil reserves. In addition to the utilization of the oil reserves, these internal combustion engines add an additional problem to the environment in the form of atmospheric pollution.

In this scenario electric vehicles are the only option to reduce the fuel consumption and atmospheric pollution. Electric vehicles use high energy battery packs and electric motors to propel the transmission. As the vehicle runs on battery power with no combustion to release atmospheric pollutants, electric vehicles are otherwise called zero emission vehicles. The high energy battery pack has a limited amount of energy to supply to the vehicle. With a limited amount of energy to supply, electric vehicles have a limited driving range with a single fully charged battery pack. Hybrid electric vehicles have been developed to increase the range of the electric vehicle by compromising some of the advantages of the electric vehicle [5].

Researchers have been conducted many experiments to increase the fuel efficiency of the vehicle and reduce the atmospheric pollution when compared to the

3 conventional automobiles. In order to overcome the problems of the automobiles with conventional ICE and the battery powered electric vehicle, it is essential to develop appropriate range extenders which will increase the distance covered by the vehicle with a single fully charged battery pack.

In this thesis, a model has been developed that could help sizing a range extender for a specific vehicle and predict the vehicle performance dynamically for any driving cycles. Sizing of all the vehicle components to design a range extender for an appropriate vehicle, road conditions, battery charger and battery charging control algorithm are modeled precisely in the proposed system model. An experimental range extender setup has been developed to validate the developed algorithm of the range extended electric vehicle. The core element in the developed range extender is the power converter. Fault tolerant converters are developed to have continuous operation. In this thesis, we proposed a converter topology to overcome fault conditions. The topology should have a

3 phase interleaved converter for continuous operation and fault tolerant performance of the developed range extender.

The developed range extender, power converter, and supervisory control algorithm were simulated using the Matlab and Simulink tool set and verified using the experimental setup developed in this thesis work. The developed power converter reduces the ripple content in the output current supplied to charge the battery pack and support the power demanded by the driver.

A LiFePO4 battery powered electric vehicle is considered as a platform to design an appropriate range extender. The existing electric vehicle is powered by the battery pack designed using 50 LiFePO4 cells connected in series. The traction of this vehicle is

4 provided by two individual induction motors connected to each rear wheel to control the vehicle motion. These motors were controlled by the individual motor controllers commanded by the supervisory control module. The induction motor controllers were powered by the 160 V 100 AH battery pack which is capable of driving 25 kW induction motors. This electric vehicle is capable of reaching a distance of 56 miles with a single fully charged battery pack.

The electric vehicle used in this thesis work is a 1995 Chevrolet S-10 which was converted into an electric vehicle by Solectria Corporation [6]. This truck was initially designed with a lead acid battery pack and three phase induction motors to drive the transmission, and motor controllers were used to control the operation of the electric motors. This lead acid battery powered electric vehicle was re-engineered with LiFePO4

(Li-ion) battery pack and CAN communication to provide smooth control over the operation of the vehicle. The vehicle used in this thesis is shown in Figure 1.1.

5

Figure 1.1: Solectria E-10 (Battery powered electric vehicle) vehicle used in this thesis work. 1.4 Thesis overview

Chapter II discusses different kinds of hybrid electric vehicles and the proposed range extended electric vehicle, the proposed power converter and its control algorithm.

Chapter III discusses the procedure followed to model, size and design the range extender to re-engineer an existing electric vehicle into a range extended electric vehicle.

The developed supervisory control algorithm to control the operation of engine and generator set and the battery charging control algorithm are presented in this chapter.

Chapter IV provides the simulation results of the engine and generator set with

LiFePO4 battery pack and combination of engine and generator set, LiFePO4 battery pack and vehicle individually.

6

Chapter V presents the experimental setup to operate a series hybrid electric vehicle in real time. Different control circuitries developed to control the operation of the engine and generator set are briefly explained.

Chapter VI provides the experimental results of the developed range extended electric vehicle setup. Chapter VII provides a summary and future work.

7

CHAPTER II

HYBRID VEHICLE TECHNOLOGIES AND PROPOSED WORK

2.1 Introduction

The background of the EVs and HEVs available in the current market are briefly discussed in this chapter. Different architectures of the HEVs are discussed along with their corresponding advantages and disadvantages in this chapter. The term “Range

Extender” is explained and feasibility studies of different range extenders were performed to find out an appropriate range extender to re-engineer an existing electric vehicle into a range extended electric vehicle. Different battery charging topologies and control algorithms along with the proposed range extender and battery charger are provided in this chapter.

2.2 Hybrid electric vehicle technologies

The term “Hybrid Electric Vehicle” means any automobile which uses more than one source of energy to propel the vehicle [7]. An electric vehicle can be converted into a hybrid electric vehicle with an additional source of energy. Depending on the utilization of this additional source of energy, HEVs are classified into three categories [8].

2.2.1 Series hybrid electric vehicle

In series hybrid electric vehicle (SHEV) architectures, an engine and generator set, and drivetrain are connected in series with each other. The engine and generator set in a SHEV is used to charge the battery pack when the SOC of the battery pack is less

8 than certain limit. The main advantage of the SHEV is its simple architecture when compared to other hybrid electric vehicles. A simple block diagram of the series hybrid electric vehicle is shown in the Figure 2.1.

HV Power ICE Generator Battery Converter Vehicle Pack

Figure 2.1: Architecture of the series hybrid electric vehicle.

2.2.2 Parallel hybrid electric vehicle

In parallel hybrid electric vehicles, both the ICE and the electric motor will be connected in parallel with the driveline of the vehicle. As both the ICE and the electric motor are connected to the vehicle propulsion system, subcomponents can be sized smaller when compared to the series hybrid electric vehicle. However the architecture of parallel hybrid electric vehicles is more complex when compared to SHEVs. A special coupling system has to be designed to run the vehicle to operate as expected. The block diagram of a simple parallel hybrid electric vehicle is shown in Figure 2.2.

9

Figure 2.2: Architecture of the parallel hybrid electric vehicle.

2.2.3 Series - Parallel hybrid electric vehicle

In series - parallel hybrid electric vehicles (SPHEV), the advantages of both series and parallel HEVs are combined. Here an ICE is used to run the generator which will be able to charge the battery pack, with additional mechanical gears the ICE is coupled with the driveline of the vehicle which will be able to provide additional mechanical power to the vehicle power train. A special planetary gear system should be developed so that this gear system will be able to connect both the generator and the driveline.

Although, it possesses many advantages when compared to the series and parallel

HEVs, it is more complex and costly when compared to them. A simple block diagram of the SPHEV is shown in the Figure 2.3

10

Figure 2.3: Architecture of the series-parallel hybrid electric vehicle.

The Toyota Prius is an example of the series-parallel HEV [10]. Toyota has designed a special planetary gear system to couple an ICE with both generator and vehicle drivetrain. The engine and generator set used in 2004 Toyota Prius and the planetary gear system developed to couple an ICE with both generator and the transmission are shown in Figure 2.4 and Figure 2.5 respectively.

Figure 2.4: Toyota Prius engine and generator set with the power control unit.

11

Figure 2.5: 2004 Toyota Prius planetary gear system.

2.3 Range extenders

The term “Range extender” means an additional source of energy added to an existing electric vehicle to increase the range of distance covered by the vehicle. This concept is motivated by the limitation of the existing EVs, as they have a limited range

[11].

2.3.1 Types of range extenders

Depending on the nature of production of the electricity, range extenders can be classified into electrochemical or thermodynamic sources. Fuel cells are an example for the electrochemical source of energy which can be used as range extenders. Fuel cells use hydrogen to generate electricity which reduces the emissions significantly.

An electric generator with engine as a prime mover is an example of thermodynamic source of energy. As an engine uses gasoline or diesel as fuel for

12 combustion, the vehicles which use engines and generators as additional sources of energy are not considered to be Zero Emission Vehicles.

In this thesis a thermodynamic source of energy designed with an engine and generator set is proposed. The developed engine and generator set provides a three phase

AC output which was converted into an appropriate DC voltage to charge the battery pack. To control the operation of the range extender a supervisory control algorithm was developed using Motohawk engine control module, and a constant current battery charging control algorithm was developed using TMS320F2812 digital signal processor.

The developed range extender and power converter were used as the range extender to reengineer the existing electric vehicle.

2.4 Proposed range extended electric vehicle

In this Chapter, the architecture of the developed engine and generator set, battery charger and the charging algorithm to develop an on-vehicle battery charger to re- engineer an existing electric vehicle in to a range extended electric vehicle is presented.

The advantages of the modeling and simulation of the engine and generator set and developed power converter to charge the high voltage battery pack are discussed in this chapter. Important components in range extended electric vehicle are as follows.

1. Battery pack (LiFePO4 battery pack) and traction drive (Induction motors).

2. Engine and generator set.

3. Power converter.

2.4.1 Battery pack (LiFePO4 battery pack) and traction drive (Induction motors)

We used an existing pure electric vehicle powered by LiFePO4 (Li-ion) battery pack.

This electric vehicle “Solectria-E10” is originally converted from Chevrolet S10 in to an

13 electric vehicle powered by a lead acid battery pack [9]. Afterwards it was re-engineered with a 170 V 100 AH Li-ion battery pack. Two induction machines are used to propel two rear wheels and these motors were powered by individual motor controllers which convert DC from the battery pack in to appropriate three phase AC supply for the operation of the three phase induction motors. A supervisory controller algorithm was developed using an electronic control unit “Mototron” as a gateway between the motor controllers and the driver demands.

2.4.2 Engine –Generator set

The engine converts the heat energy generated by the fuel combustion into mechanical energy to rotate the coupled generator. This generator produces three phase electric output power. The engine and generator have to be sized accordingly to support the power demanded by the vehicle and for charging vehicle battery pack. The engine and generator set is designed to run at a constant speed and generate constant amount of power. Depending on the amount of power drawn from the vehicle, when the engine and generator set is running, the amount of power used to charge the battery pack varies.

2.4.3 Proposed Power Converter

As the engine –generator set is connected directly to the battery pack, it is important to design a power converter which converts an AC voltage to a DC voltage which is equal to the battery pack voltage [12]. The architecture for the power converter has a three phase diode rectifier and a three phase interleaved DC-DC converter in order to convert three phase AC developed by the engine and generator set in to an appropriate

DC voltage to charge the battery pack. The main advantages of using three DC-DC converters in parallel are to decrease the amount of current flowing through each DC-DC

14 converter. The main aim of the power converter is to provide a current of 150 A to charge the battery pack. With the three phase interleaved DC-DC power converter, the amount of current flowing through each line is around 50A. By reducing the current through each switch, the stress on each IGBT switch and the power loss in the converter can be reduced significantly. A specific charging algorithm is designed to control the switches of the DC-DC converter. Three PWM signals were generated using a control algorithm, each with 120 degrees of phase shift from one other. By using these three PWM signals, the amount of ripple current in the input and output capacitors are reduced by 6 times. A constant charging current algorithm is developed to maintain the current in the inductor of each DC-DC converter to 50 A which will maintain the total load current to 150 A.

As the proposed DC-DC converter has three DC-DC converters in parallel, this power converter has a fault tolerant capability. A control algorithm has been developed to include the safety features when there is any fault in the power converter. The algorithm will disable that particular converter. The other two DC-DC converters will supply the charging current for the battery pack, but with a smaller amount of current to avoid increase in the stress on the power converter components. The main advantages of the proposed power converter are discussed next.

15

Power line Battery charging Proposed range extender controller Communication line

Permanent magnetic Internal combustion Fault Tolerant synchronous engine battery charger generator

Engine trigger SCM circuit

Figure 2.6: Block diagram of developed range extender in this thesis work.

2.4.3.1 Reduction of the power rating of the power electronic components

When compared to a conventional power converter, a three phase interleaved DC-

DC converter reduces the amount of average current through each component, which will reduce the amount of power loss in each component. With the reduced power loss, the sizing of the heat sink and the coolant device used to cool the power converter can be reduced.

2.4.3.2 Reduced ripple content in the output current

Considering the different PWM signal schematics, a battery charging algorithm has been proposed to control the power converter with PWM signals phase shifted 120 degrees from each other. With this switching algorithm the ripple current in each component is reduced by a factor of 6 which in turn reduces the power loss in the power converter.

16

2.5 Conclusion

Different classifications of hybrid electric vehicles have been discussed briefly in this chapter. The advantages and disadvantages of different architectures of the HEVs were discussed in the chapter. The term range extender is explained briefly and the application of the range extenders in the EVs to improve the range of the distance covered by the EV. The proposed charging architectures and the benefits are briefly discussed in this chapter.

17

CHAPTER III

MODELLING AND SIZING OF THE RANGE EXTENDER AND SUB

COMPONENTS

3.1 Introduction

The architecture of the range extender vehicle is similar to the series HEV. The main components of the range extended EV are the engine and generator set, the power converter, the power converter controller, the electric vehicle drivetrain, the high voltage battery pack and the supervisory control algorithm to control the electric vehicle drivetrain [13]. The drivetrain in an EV is made of electric motors which are controlled by individual motor controllers. In SHEV engine and generator set is used to charge the battery pack while the batteries power the drivetrain for propulsion of the vehicle. Sizing of the engine and generator set depends on the vehicle specifications and vehicle application.

A model has been developed to simulate the series HEV with different operating conditions. The simulation studies provided a basis for the sizing and designing of the individual components for the range extender.

3.2 Modeling of series HEV

In a series HEV, the power demanded by the vehicle drivetrain is supplied by the high energy battery pack. An on-vehicle engine and generator set is used as an on-board battery charger.

18

A block diagram of the proposed range extended electric vehicle considering the architecture of the series hybrid electric vehicle is represented in Figure 3.1.

Current Proposed range extender controller

Internal permanent Internal combustion Fault Tolerant magnet synchronous engine battery charger generator

Engine trigger SCM circuit

Power line

Communication line Induction Motor LiFePO4 Battery Motors controllers pack

Battery powered Electric vehicle

Figure 3.1: Block diagram of the proposed range extended electric vehicle.

The proposed model can be used to:

 Estimate the amount of power demanded by the vehicle to maintain a speed

profile,

 Size the engine and generator set which will be capable of supply power

demanded and charge the battery pack.

19

 Implement different battery charging algorithms to design an appropriate

power converter which can reduce the power loss and improve the efficiency

of the system.

The process followed for modeling range extended electric vehicle is described briefly in the following sections of this chapter.

3.2.1 EV drivetrain

The EV drivetrain is made of electric motors and motor controllers to control the vehicle propulsion. The power demanded by the driver is processed in the supervisory control algorithm and required command signals are transmitted to motor controllers to control the operation of the electric motors. The EV drivetrain has been modeled by considering standard vehicle drive cycles like UDDS, HWFET, US06 etc. Different speed profiles used to design electric vehicle drivetrain are discussed briefly below.

Commonly used drive cycles in the simulation of the electric vehicle drivetrain are the urban dynamometer drive cycle (UDDS), the Highway Fuel Economy Test (HWFET) for developing urban and highway driving. The UDDS and the HWFET drive cycles are shown in the Figures 3.2 and 3.3 respectively. In order to design range extended EV the vehicle is considered to be cruising at a speed of 65 mph. Figure 3.4 shows the speed profile considered to design a range extended electric vehicle.

20

Figure 3.2: Vehicle speed profile of urban dynamometer driving cycle.

Figure 3.3: Vehicle speed profile of highway fuel economy test.

21

Figure 3.4: Vehicle Speed when the vehicle is cruising at a speed of 65 mph.

3.2.2 Vehicle dynamics model

The vehicle dynamics model represents the traction part of the vehicle. This model represents different forces acting on the vehicle when the vehicle is in motion. The vehicle dynamics model is modeled by considering the vehicle kinematic equations as shown below [14].

(3.1)

(3.2)

(3.3)

(3.4)

(3.5) where

is aerodynamic force acting on the vehicle,

is the vehicle speed,

22

is rolling resistance force acting on the vehicle,

is the gravitational force acting on the vehicle,

is the combination of the different forces acting on the vehicle,

is the amount of the power required to move the vehicle with a velocity of

.

The specifications of the vehicle considered in modeling electric vehicle are provided in

Table 3.1 [13].

Table 3.1: Specifications of the hybrid electric vehicle.

HEV Simulation Parameters Values

Curb Weight ( ) + Engine and generator set. 1360 kg+600 kg

Rolling Resistance Coefficient ( ) 0.0015

2 2 Rolling Resistance Coefficient ( ) 0 s /m

Aerodynamic Drag Coefficient ( ) 0.44

Frontal Area ( ) 2.88 m2

Road Grade ( ) 0 radians

Wind Velocity ( ) 0 m/s

Wheel Radius ( ) 0.38 m

Motor Drive 24 kW

Battery Pack Li-ion, 100 Ah, 180 kg, 140 VDC Nominal

23

3.2.3 Range extender

There are four main components to design an appropriate range extender.

a. Internal combustion Engine (ICE)

b. Electric generator

c. Power converter

d. Range extender operation controller

An engine and generator set is an electromechanical energy source which converts the mechanical energy supplied by the engine into electrical energy which is appropriate to charge the battery pack. To size an appropriate engine and generator, it is important to consider the vehicle specifications and a particular drive cycle. The vehicle configurations used in this thesis work are mentioned in Table 3.1, and this vehicle is considered to be running at a constant speed (cruising) of 65 mph.

Using the above mentioned equations it has been calculated that the existing electric vehicle demands 22.6 kW of power to maintain the vehicle in cruising at a speed of 65 mph. An existing simulation of the series hybrid electric vehicle is considered to size the engine and generator set. Studies were made on the simulation to calculate appropriate power rating of the engine and generator set to increase the range of existing electric vehicle. Table 3.2 presents the simulation results of different engine ratings and with different ranges of state of charges of the battery pack.

24

Table 3.2: Output of the simulations with different SOC limits and engine ratings.

Min SOC Max SOC Distance of Engine of Engine Initial SOC Min SOC Engine Rating Travelled Velocity ( %) ( %) ( %) ( %) (kW) (miles) (mph) 60 80 100 20 15 64.81 45* 60 80 100 20 15 46 65 60 80 100 20 17.5 (approx)69 45* 60 80 100 20 17.5 50 65 35 95 100 20 17.5 40 65 35 95 100 20 30 79 65 60 80 100 20 30 78.72 65*

From the above results it was observed that with 30 kW range extender and by operating the vehicle with the SOC of the battery pack between 60 % and 80 % the vehicle reaches around 79 miles. When the fuel value becomes zero, the vehicle batteries have more than 60 % of the SOC in the battery pack which will allow the vehicle to reach the nearest gas station. Hence a 30 kW range extender has been designed, modeled, simulated and implemented in this thesis work.

3.2.4 Modeling of engine and generator set

Mathematical modeling of the engine and generator set is briefly discussed in the following sections of this chapter.

3.2.4.1 Modeling of engine

The control strategy of the engine is defined by the SOC of the battery pack. The engine and generator set is used to maintain the SOC of the battery pack between certain limits such that vehicle demand is always met. Considering the characteristics of the battery pack, maximum and minimum SOC of the battery pack are set in such a way that the batteries are operated in the linear region.

25

A 30 kW engine is modeled considering the torque and speed characteristics of a 40 hp Kohler engine. In this model the engine is considered to be operating at a constant power. By maintaining the load torque demanded by the generator at a constant value, the engine is considered to be rotating at a constant speed. The generator torque is controlled by controlling the output current supplied by the power converter to charge the battery pack. Current output of the power converter is calculated considering the maximum torque that engine can handle at a particular engine rpm. Power output from the converter can be described as,

(3.6) where is the converter output power, is the battery voltage and is the converter output current.

Generator output power can be described as,

(3.7) where is the generator power output, is the electromagnetic torque developed in the generator and is the speed of the generator.

In order to simplify the model of the engine and generator set, both mechanical and electrical power losses in the designed system are considered to be negligible.

(3.8) when the power losses in the converter are neglected the power generated by the engine and the generator set is equal to the output power of the developed power converter,

26

(3.9)

At steady state, the torque that the engine has to support can be calculated as,

(3.10)

Equations 3.6 to 3.9 help to determine the maximum output current capability of the range extender considering the specifications of the range extended electric vehicle.

3.2.4.2 Generator Modeling

An interior permanent magnet (IPM) machine is used as an electric generator in the range extender system. The mathematical modeling of the IPM synchronous generator in

synchronous frame of reference can be represented by the following equations [15],

(3.11)

(3.12)

(3.13)

(3.14) where,

: -and -axes stator voltages,

: -and -axes stator currents,

: stator per phase resistance,

: stator q- and d-axes stator inductances,

27

: number of pole pairs,

: rotor speed in the angular frequency,

: electromagnetic torque,

: flux linkage due to permanent magnetic excitation,

: stator voltage caused by rotor flux.

The specifications of the Internal Permanent Magnet generator used in this thesis are presented in Table 3.3.

Table 3.3: Specifications of the internal permanent magnet synchronous generator.

Specifications of the generator

Model Interior Permanent magnet synchronous generator

Power Output 30 Kw

Number of poles 8

Direct inductance ( ) 0.000635 H

Quadrature inductance ( ) 0.000635 H

Phase resistances 0.2 Ohms

Back EMF constant 126.675 Vpeak L-L / krpm

The parameters of the IPM generator are determined through experimental tests. The line to line voltage of the IPM generator is shown in Figure 3.5. The back emf constant of the IPM can be determined from this graph.

28

Figure 3.5: Back EMF generated by the generator used in this thesis work.

The electrical frequency of this operation can be determined as,

(3.15)

The electrical angular frequency of the generator is:

(3.16)

The relationship between the mechanical frequency and electrical frequency is shown in equation

(3.17)

Where “ ” is the number of poles of the generator, mechanical frequency of the operation is,

(3.18)

29

The peak to peak line voltage is calculated as:

(3.19)

The back emf constant can be determined as:

(3.20) where is the speed of the rotor in rpm, from the available information the back EMF constant of the generator is calculated to be 126.675 Vpeak L-L / krpm. Considering the engine is rotating at a speed of 3600 rpm, the peak to peak line voltage generated by the generator is calculated to be around 456 V.

The operation of the generator is limited by the maximum torque that the engine can handle at a particular RPM. The speed and torque characteristics of the engine are shown in the Figure 3.6.

Figure 3.6: Speed vs Maximum torque plot of 40 hp Kohler engine.

When the generator is operated at a speed of 3600 rpm, the maximum torque that the engine can handle is around 78.5 Nm. The maximum load that the generator can supply is limited by the maximum torque that the engine can handle. Considering the simulation results the maximum amount of current that the developed system can supply

30 to the LiFePO4 battery pack is calculated to be 140 A. When the engine is rotated at a speed of 3600 rpm maximum amount of current that engine and generator set with the power converter is 140 A.

3.2.5 Modeling of LiFePO4 (Li-ion) battery pack

The electric vehicle used in this thesis work is powered by a high voltage battery pack designed with 50 Li-ion batteries of 100 AH and a nominal voltage of 3.2 V each in series [9]. An equivalent circuit model of the Li-ion battery pack is modeled in order to integrate in the simulation of the battery powered vehicle is presented in Figure 3.7. An equivalent mathematical model of the batteries used in this electric truck was obtained using the constant current charging and discharging characteristics of a single cell of the battery pack. The equivalent circuit model for a single Li-Ion battery consists of storage capacitance ( ), ohmic resistance ( ), diffusivity resistance ( , diffusivity capacitance ( ) and open circuit voltage ( ). The approximate values of these parameters are calculated from the constant current charging and discharging characteristics.

Rd

R0

Cd Cs Vt

Vbatt

Figure 3.7: Lumped parameter model of a single – battery.

31

The parameter values are calculated by charging and discharging single Li-ion battery cell with 12.5 A of current. Commonly, the battery current is referred to as a fraction of the battery capacity. As the Li-ion battery pack used in this electric truck is 100 AH capacity, 1C is considered to be 100A. Considering this, 12.5 A is used for battery characterization is calculated to be C/8.

In order to calculate the open circuit voltage, charging and discharging tests were plotted as a function of the SOC of the battery. Open circuit voltage of the battery is approximated as the average of the voltages from charging and discharging curves at 20

% of SOC. The open circuit voltage is calculated to be around 3.26 volts. Charging and discharging test curves is shown in the Figure3.8.

Figure 3.8: Open circuit voltage approximation of a single LiFePO4 battery cell.

Storage capacitance ( ) of the cell was approximated by calculating the slope of the charging and discharging voltage curves from 20 % to 100 % SOC. The storage capacitance was calculated to be 1,760,000 F.

Ohmic resistance of the cell is calculated by considering the immediate voltage raise when the test circuit is connected or the immediate voltage drop when the test circuit is

32 opened. The immediate voltage drop is divided by the charging and discharging current to obtain the ohmic resistance of the battery. From the above tests the ohmic resistance of the individual cell is calculated to be 0.00241 ohms. The plot considered to calculate the ohmic resistance is shown in Figure 3.9.

Figure 3.9: Calculation of the ohmic resistance of a single LiFePO4 battery cell.

Diffusivity resistance ( ) of the battery pack is calculated by considering the voltage rise from the instance when the circuit is connected and the instant the voltage reaches a steady state level. This voltage raise is divided by the charging current to calculate diffusivity resistance. The diffusivity resistance of the individual cell is calculated to be around 0.00271 ohms. The plot considered to calculate diffusivity resistance is shown in

Figure 3.10.

33

Figure 3.10: Calculation of diffusivity resistance of the LiFePO4 battery pack.

To calculate diffusivity capacitance, the time constant of the battery cell is calculated from the instant the test circuit is connected to reach a steady state voltage level.

Diffusivity capacitance of the LiFePO4 is calculated from the Figure 3.11. By dividing the time constant of the battery by its diffusivity resistance, diffusivity capacitance is calculated. For this particular cell diffusivity capacitance is calculated to be 96000 F.

Equivalent model of a single LiFePO4 battery is shown in Figure 3.12 and approximated model for a combination of 50 lithium-ion cells is shown in Figure 3.13.

34

Figure 3.11: Diffusivity capacitance of the LiFePO4 battery cell.

0.00271Ohm

0.00241 Ohm

96000F 1760000F Vt

3.26 V

Figure 3.12: Equivalent model of a single LiFePO4 battery cell.

(0.00271*50)Ohm

(0.00241*50) Ohm

(96000/50)F (1760000/50)F Vt

(3.26)*50 V

Figure 3.13: Equivalent model of LiFePO4 battery pack.

35

3.2.6 Modeling of three phase interleaved DC-DC converter

The main objective of the power converter is to convert the mechanical power of the engine into an appropriate electric power to charge the battery pack. Considering the specifications of the engine and generator set and LiFePO4 battery pack, the amount of charging current supplied to the battery pack which can be handled by the engine. The current supplied to the battery pack is calculated by the maximum torque that engine can handle. In order to design an appropriate power converter the following specifications can be developed as,

Peak line to line voltage of the generator at 3600 rpm

Average DC output of rectifier

Battery voltage when the charging current is 150 A

Battery charging current/output of DC-DC converter

Sizing of the inductor and the capacitor of the power converter is the first step in designing a power converter [16]. The output of the rectifier is stepped down using a buck converter. A simple buck converter is represented in Figure 3.14.

Switch L +

Vdc Diode Cout Vbatt Cin

-

Figure 3.14: Single buck converter used to design a DC-DC converter.

36

Considering the duty cycle of the PWM signal is to be D, when the switch is ON above buck converter connected to the battery pack is represented in the Figure 3.15.

RB

L +

IL Ro Iin Iout

CB

Vdc ICin ICout Cout Vbatt Cin EOC

-

Figure 3.15: Operation of buck converter when the switch is ON.

By analyzing the above circuit,

(3.21)

(3.22)

(3.23)

When the switch is OFF, inductor continues to conduct current through diode.

The circuit when the switch is OFF is shown in Figure 3.16.

37

RB

L + Iout Iin IL Ro

ICin

CB Vdc ICout Cout Vbatt Cin EOC

-

Figure 3.16: Operation of buck converter when the switch is OFF.

By analyzing the above circuit,

(3.24)

(3.25)

. (3.26)

where fs is the switching frequency

The plots of the inductor current and the output capacitor currents when the switch is operating at a duty cycle D are shown in Figure 3.17.

38

Figure 3.17: PWM signals, inductor current and capacitor current of the buck converter.

By analyzing the above plots the size of the inductor, input capacitor and output capacitor are calculated to be as follows,

3.2.7 Small signal modeling of the buck converter and Li-Ion battery pack

In order to design an appropriate controller, a mathematical model of the buck converter has been developed [27]. The buck converter shown in the Figure 3.21 is used to charge the LiFePO4 battery pack used in this thesis work. The equivalent model of the battery pack used in this thesis work is shown in Figure 3.18. The parameters are estimated as Ro = 0.1355 Ohms, RB = 0.1205 Ohms, CB = 1920 F, Eoc = 160 V.

39

CB

Ro

RB

EOC

Figure 3.18: Equivalent modeling of LiFePO4 battery pack used in this thesis work.

To develop a state space model of the power converter, states, inputs and outputs are listed in the following equations.

(3.27)

(3.28)

(3.29)

The state space model of the developed system can be represented as follows

(3.30)

(3.31)

The matrices A, B are the properties of the system, which can be calculated by the system structure, and elements. Matrices C and D can be determined by the choice of output variable that the designer will select. For the system considered the matrices A, B can be calculated by the system equations.

The state equations of the system when the switch is ON are as follows,

(3.32)

40

(3.33)

(3.34)

(3.35)

The state equations of the system when the switch is OFF are as follows

(3.36)

(3.37)

(3.38)

(3.39)

The state space equations of the system when the switch is ON are as follows.

(3.40)

(3.41) where,

41

The state space equations of the system when the switch is OFF are as follows,

(3.42)

(3.43) where,

By combining the state space models of the system when the switch is ON and

OFF, state space model of the buck converter can be obtained. Considering the duty cycle of the PWM to be D, the state space model of the buck converter can be obtained as following.

(3.44)

(3.45)

(3.46)

(3.47)

42

By introducing a small change in the inputs, outputs, duty cycle and state variables we can achieve the perturbation,

(3.48)

(3.49)

(3.50)

(3.51)

where X, U, Y and D are the vectors of the nominal quantities of the system and

are representing the variations around the nominal values. Therefore steady state model can be separated from the dynamic model. The state space model of the system including both steady state and dynamic models can be represented as follows.

(3.52)

(3.53)

In order to get the transfer function of the plant the dynamic equations of the state space model are considered. The state space equation of the dynamic model can be presented as,

(3.54)

(3.55) where,

(3.56)

(3.57)

43

(3.58)

From the above equations the transfer function of the system can be found as follows. y (3.59) C sI A 1B d d d d

The transfer function between the inductor current and the duty cycle is represented as follows.

I s as2 bs c (3.60) L d s es3 fs2 gs h where the parameters of the transfer function can be founded as: a = 1.02e6 b = 6.97e9 c = 10.35e10 e = 1 f = 6383 g = 375872 h = 186.7e6

3.2.8 PI controller design

A PI controller can be designed to control the inductor current. A closed loop control system has been developed as shown in the Figure 3.19.

d IL + PI ∑ PLANT Controller IL Ref - G(S) D(S)

Figure 3.19: Block diagram of the developed plant and controller.

44

(3.61)

(3.62)

where and are the transfer functions of the plant and the PI controller respectively, combining both the controller and plant, the closed loop system can be obtained.

(3.63)

By analyzing the above transfer function, and values are obtained as

0.152 and 147 respectively. The plot of inductor currents from both small signal modeling and Matlab/Simulink model of the designed buck converter are shown in

Figure 3.20 and Figure 3.21 respectively.

Figure 3.20: Inductor current output from the small signal modeling of a single buck converter.

45

Figure 3.21: Inductor current from the Simulink modeling of a single buck converter. Considering the ripple current of the inductor current in a single buck converter, to reduce the size of the inductor, a topology of a three phase interleaved power converter is designed. Considering the battery charging current to be 150 A, the amount of the current supplied by the individual buck converter is one third of the battery charging current. The topology of the developed power converter is shown in the Figure 3.22.

The main benefits of using a three phase interleaved DC-DC converter is to reduce the ripple current to the battery pack, reduces the size of the IGBTs, diodes and inductor. With three DC-DC converters the inductor current in each buck converter reduces to one third of the battery current [18]. To reduce the ripple content in the output current of the power converter a specific PWM pattern was chosen, the three PWM signals used for the switching of the IGBTs in three buck converters were phase shifted by 120˚ (π/3 rad). With the above mentioned PWM sequence, when the IGBTs of three buck converters are phase shifted by 120˚, the ripple content in the output current of the power converter is reduced by 6 times when compared to the single power converter with

46 the same average output current. Along with the reduced ripple current, the fundamental frequency of the first harmonic current is three times of the switching frequency.

Figure 3.22: Proposed power converter.

3.3 Supervisory control algorithm

A supervisory control algorithm (SCM) is developed using the Matlab/Simulink platform and this algorithm is programmed into the Motohawk ECM (i.e. SCM) to provide the commands to the motor controllers. The inputs to this supervisory control algorithm are from the sensor inputs like, current, voltage, pedal position, etc. These inputs are processed in the SCM and the output commands will be commanded to the motor controllers to drive the induction machines. In order to calculate the SOC of the battery pack, the current supplied to the vehicle is measured through the current sensors connected. The measured currents are processed to estimate the SOC of the batteries.

From the driver module necessary input signals like direction of the operation (F =

Forward, R = Reverse, P = Park), pedal value (0 % to 100 %) etc. Two display units were designed to display the status of the vehicle, such as battery voltage, direction of the operation, SOC of the battery pack etc.

47

The existing electric vehicle supervisory control algorithm mainly provides necessary torque commands for the propulsion of the electric vehicle. The SCM reads the pedal value and interprets the amount of power demanded by the driver and transmits the necessary commands to the motor controllers that are equipped in the vehicle. A module has been designed to collect the driver commands like pedal value and ignition, process in supervisory control module to provide the necessary commands like demanded torque and speed for the electric motors. The SCM was designed in such a way that even driver key on the vehicle the vehicle will start only when the battery SOC satisfies certain conditions. The conditions for tuning the engine ON and OFF can be summarized as,

If SOCbatt < SOCmin then Ignition is OFF

Else if SOCbatt > SOCmin then Ignition is ON.

From the above conditions, the ignition will be turned ON when the SOC of the battery pack is greater than SOC minimum. When the ignition is ON the pedal value demanded from the driver is converted into the acceleration command and commanded to motor controller. Depending on the acceleration demanded by the driver the motor controllers will provide enough power to propel the vehicle. In the electric vehicle control algorithm, an option was introduced to reduce the amount of power supplied to the vehicle powertrain, power save option will limit the amount of acceleration command to the motor controller to a fraction of pedal value demanded by the driver.

In order to convert the EV control algorithm into a range extended EV, an additional module in the existing EV control algorithm to trigger the engine and generator set depending on the SOC of the battery pack. A simple hysteresis control algorithm has been developed and integrated into the SCM of the electric vehicle to

48 implement the ignition cycle of the engine and generator set. The ignition circuit of the engine and generator set is governed by the SOC of the vehicle battery pack. Governing conditions of the ignition circuit can be described in a flow chart as shown in the Figure

3.23.

Figure 3.23: Battery charging algorithm for the range extenders.

The above mentioned algorithm is developed and implemented to convert existing control algorithm for the EV into a series HEV control algorithm. When the engine and generator is turned ON, the three phase voltage generated by the IPM generator into an appropriate voltage to charge the battery pack. A constant current control algorithm is developed to control the amount of current supplied by the DC-DC converter to charge the battery pack.

49

3.4 DC-DC converter control algorithm

The main purpose of the converter control algorithm is to maintain the charging current supplied to the battery pack from the generator. The amount of the current supplied by the DC-DC converter to charge the battery pack is calculated with reference to the maximum amount of torque that the engine can handle. As we discussed in the previous sections of this chapter, a power converter was developed with three parallel

DC-DC converters, the amount of current supplied to the battery pack is divided equally among three DC-DC converters. The amount of current passed through inductor of each

DC-DC converter as a reference current to generate a three phase PWM signal with

120degrees phase shifted with each other.

Inductor current ∑ + Comparator - PWM Waveform Reference current

Saw tooth Waveform

Figure 3.24: PI controller to generate PWM signal for the DC-DC converter.

In order to generate three PWM signals with 120 degree phase shift we used three carrier waveforms with 120 degrees phase shifted with each other. When the error from the PI controller is passed through a comparator individually it generates three individual

PWM waveforms with 120 degrees phase shifted.

The control algorithm is implemented in the simulation of range extenders for series HEV. By carefully studying the results of the simulation which are mentioned in

50

Table 3.2, the power rating of the engine and generator set required is calculated and implemented in the experimental setup, and minimum and maximum ranges of the SOC of the battery pack to operate the E-truck with a range extender are fixed. There are two controllers used in this thesis work, one controller is an existing controller in the electric vehicle which was programmed by the SCM of range extended electric vehicle, and another controller is the TMS320F2812 DSP developed by Texas instruments to control the DC-DC converter designed to charge the battery pack. The communication between these two controllers was implemented using CAN communication protocols.

3.5 Conclusion

In this chapter we discussed about the modeling approach followed to design the engine and generator set, and the power converter. From the analysis performed on the existing simulation of series hybrid electric vehicle, the size of the engine and generator set required to charge the battery pack while the vehicle is running at a speed of 65 mph is calculated to be more than 22.6 kW. Hence the power rating of the engine and generator set is calculated to be 30 kW. An engine and generator set has been developed using a 40 hp Kohler gasoline engine and a 30 kW generator from the two available electrical machines in the transmission of the Toyota Prius 2004 model vehicle. A power converter has been developed combining a three phase diode rectifier and three parallel

DC-DC converters, algorithms developed to ignite engine and generators and to control the current supplied to the battery pack.

51

CHAPTER IV

SIMULATION RESULTS OF RANGE EXTENDED ELECTRIC VEHICLE

4.1 Introduction

In this chapter results of the developed simulations for the SHEV are discussed with different drive cycles such as, the Urban Dynamometer Driving Schedule (UDDS), the Highway Fuel Economy Test (HWFET), the US06 and a drive cycle considering the vehicle is cruising at a speed of 65 mph. To develop the specifications of the engine and generator set, the vehicle operation is considered to be cruising at a speed of 65 mph.

Different vehicle conditions are considered to calculate the robustness of the simulations. Simulation results are presented in different levels like considering the vehicle is operating in EV, SHEV modes, The power converter is tested with resistive load then with LiFePO4 battery pack. Finally simulations of entire system including simulated engine and generator set, with electric vehicle are conducted. To evaluate practical stability of the developed engine and generator set with power converter, vehicle is approximated as a resistive load with constant power dissipation.

4.2 Simulation results of the proposed SHEV system

Various simulations have been conducted to study the performance of the SHEV under different driving conditions. Figure 4.1 shows the block diagram of SHEV.

Different driving conditions were simulated in the driver model. Commands issued by the driver module were processed in SCM model. Depending on the inputs from the driver

52 module, SCM controls the operation of the ignition circuitry for engine and generator set and controls the drivetrain of the vehicle.

Figure 4.1: Block diagram for a simulation of series hybrid electric vehicle.

The driver model consists of various inputs from the driver, such as pedal command, brake command and direction of the vehicle like forward, reverse and parking.

Depending on the commands issued by the driver module, SCM operates engine and generator set, and motor controllers. The driver model has been developed considering the driving profiles, such as UDDS, HWFET, US06 and cruising at a speed of 65 mph.

Depending on the commands from the driver module, the SCM processes the data and commands the motor controller to perform necessary actions.

53

4.3 Simulation results of developed power converter with resistive load

A Power converter to charge the battery pack is simulated and tested with different loads. The block diagram of the developed power converter is shown in Figure 4.2.

Figure 4.2: Block diagram of the developed power converter.

The specifications of the engine and generator set are shown in Table 4.1.

Simulations were carried out considering when the DC-DC converter is open circuited, connected with a resistive load, and connected LiFePO4 battery pack.

54

4.4 Simulation results of power converter with no load connected to the DC-DC converter

The no load condition is simulated when the generator operated at 3600 rpm. Figure

4.3 presents the three phase back emf voltage. The rectified dc output voltage is presented in Figure 4.4.

Figure 4.3: Back EMF generated by the generator under no load condition.

Figure 4.4: Output voltage of the three phase diode rectifier under no load condition.

55

4.5 The simulation results with resistive load connected to DC-DC converter.

A resistive load of 1.214 ohms is connected to the output of the DC-DC converter and key variables are observed through the simulation. Figure 4.5 shows the output voltage of the three phase generator. The output voltage of the rectifier is shown in the

Figure 4.6. Figure 4.7 shows the three phase PEM signals applied to the DC-DC converter. Three phase currents are phase shifted by 120 electrical degrees as shown in the Figure 4.8. The battery voltage is around 181.5 V by regulating the battery charging current at a rate of 150A shown in Figure 4.9.

Figure 4.5: Generator terminal voltages with resistive load.

56

Figure 4.6: Rectifier output voltage with resistive load.

Figure 4.7: PWM waveforms generated for the switching of IGBTs.

57

Figure 4.8: Inductor currents of the DC-DC converter.

Figure 4.9: DC-DC converter output voltage with resistive load.

58

4.6 Simulation results of the developed converter with LiFePO4 battery pack

The next set of simulation results were carried out by replacing the resistive load with the LiFePO4 battery pack. When the DC-DC converter is connected to the battery pack, the output voltage of the DC-DC converter will be equal to the battery pack voltage. The developed controller is implemented to limit the charging current to a certain value to avoid rapid charging of the battery pack. In order to find the properties of the battery pack when it is charging the initial SOC of the battery pack is considered to be

50 %. When the engine and generator set is running with only the battery pack as the load, the entire 140 A of current will be used to charge the battery pack. The maximum charging current of the LiFePO4 battery cell is represented by 3C. The LiFePO4 battery cells in the E-Truck are 100 AH batteries, where the maximum charging current for the battery pack can be 300 A. But the current output of the DC-DC converter is limited to

150 A, hence the charging current of the battery pack will not be greater than the maximum charging current of the battery pack. The line to line voltage of the three phase

IPM generator, rectifier output voltage and three phase inductor currents are presented in

Figures 4.10, 4.11 and 4.12. The battery voltage and the currents are shown in Figure

4.13.

59

Figure 4.10: Line to line terminal voltage of the generator.

338

336

334 Vrec (V) 332

330 0.02 0.025 0.03 0.035 0.04 Time (Sec)

Figure 4.11: Output voltage of the three phase diode rectifier.

60

Figure 4.12: 3 phase Inductor currents of the DC-DC converter.

Figure 4.13: Output voltage and output current of the DC-DC converter.

61

4.7 Simulation results of the series hybrid electric vehicle with developed control algorithm

The simulation results shown below were performed on the simulation developed for the series hybrid electric vehicle, using an engine and generator set as a range extender. The power rating of the engine and generator set developed is considered to be around 30 kW. Different drive cycles have been considered to get the simulation results of the developed model.

4.7.1 Simulation results of for UDDS drive cycle

The Urban Dynamometer Driving Schedule (UDDS) represents the vehicle driving conditions in urban/city driving, considering frequent starts and stops as shown in Figure

4.14. In order to check the validity of developed algorithm to maintain the SOC of the battery pack between 60 % and 80 %, the initial SOC of the battery pack is considered to be 61 %. When the SOC of the battery pack is reduced below 60 %, engine will be ON and starts charging the battery pack. The power generated by the generator utilized to support both the vehicle demand and the additional power generated will be utilized to charge the battery pack. The simulation results of the developed range extended electric vehicle with UDDS speed profile are shown in Figure 4.14. This algorithm keeps the battery SOC within the limits successfully through the cycles as shown in Figure 4.15.

62

Figure 4.14: Vehicle speed profile for UDDS driving schedule.

63

Figure 4.15: Simulation results of series hybrid electric vehicle for UDDS speed profile.

64

4.7.2 Simulation results of the series hybrid electric vehicle for HWFET drive cycle

As mentioned in the chapter 4.2.2 the Highway Fuel Economy Test Drive cycle runs for a time frame of 765 seconds covering 10.26 miles, with an average velocity of 48.3 mph as shown in Figure 4.16. The vehicle speed, motor power, motor torque, engine

ON/OFF, engine power, generator power, battery power, battery voltage, battery current, and SOC of the battery pack are monitored and presented in Figure 4.17 for the HWFET speed profile.

Figure 4.16: Vehicle speed profile for HWFET driving schedule.

In order to check the validity of the developed algorithm, the initial SOC of the battery pack is considered to be around 65 %. When the SOC of the battery pack falls below 60 %, the engine and generator will turn ON and develop power sufficient for both power demanded by the vehicle and additional power to charge the battery pack.

During this cycle the SOC of the battery pack falls below 60 %, and when the engine and generator is turned ON, the SOC of the battery pack raisees to 71 %.

65

Figure 4.17: Simulation results of series hybrid electric vehicle with HWFET speed profile.

66

4.8 Simulation results of the series hybrid electric vehicle with a cruising speed of 65mph

In this particular drive cycle the vehicle is considered to be cruising at a speed of 65 mph as shown in Figure 4.18, Power required to maintain the vehicle at a cruising speed of 65 mph is around 22.6 kW. In order to check the validity of the developed algorithm the initial SOC of the battery pack is considered to be around 80%. Simulation results show that the engine and generator set is operated to maintain the SOC of the battery pack between 60% and 80%. The simulation results of the developed range extended electric vehicle are presented in Figure 4.19

80

60

40

20 Vehicle (mph) Speed

0 0 20 40 60 80 100 120 Time (Sec)

Figure 4.18: Vehicle speed when the vehicle is cruising at a speed of 65 mph.

67

Figure 4.19: Simulation results of series SHEV when vehicle is cruising at 65 mph.

68

4.9 Conclusion

The simulation results of the series hybrid electric vehicle are carried under different standard driving profiles. The simulation results show the operation of the range extender acting as an on-vehicle charger for the electric truck. Developed power converter has been analyzed under different loading conditions.

A particular charging algorithm has been developed to maintain the SOC of the vehicle battery pack. Simulation results of the developed range extender shows that the

SOC of the vehicle batteries between 60% and 80%.

69

CHAPTER V

EXPERIMENTAL SETUP

5.1 Introduction

This chapter deals with the experimental implementation of the E-Truck, Engine and generator set, power converter, and the control system. In this thesis work two control units were used, one to operate the electric truck, and another to control the power converter developed. An electronic control unit developed by Mototron Control solutions named the ECM-0565-128-0701-C was used to control the operation of the vehicle. For the power converter, the digital signal processor TMS320F2812 by the Texas instruments is used to control the DC-DC converter. The block diagram of the developed experimental setup is shown in the Figure 5.1.

Solectria E10 Electric vehicle

IGBT switching Signals PWM signals High power line

TMS320f2812 Driver circuit Power Circuit Signal lines LiFePO4 battery pack eZdsp board Board Low power lines Inductor current Inductor current ADC inputs sensor outputs Three phase generator Communication lines voltage

Electric vehicle drive Engine and generator set

Trigger Supervisory Circuitry control module

CAN communication lines

Figure 5.1: Block diagram of the experimental setup developed in this thesis work.

70

The main components of the developed experimental setup are mentioned as follows:

a. LiFePO4 battery powered electric vehicle

b. Designed engine and generator

c. Designed power converter

d. Driver circuit board

e. Supervisory control algorithm

f. Engine and generator trigger circuit

g. CAN communication network

5.2 LiFePO4 battery powered electric vehicle

An existing electric vehicle is re-engineered using the developed range extender and power converter into a range extended electric vehicle. The electric vehicle used in this thesis work is a 1994 Chervolet S-10 a pickup truck converted into an electric vehicle by

Solectria Corporation. The initial electric vehicle is designed using lead acid batteries, electric motor controllers and an aftermarket engine control unit to command the necessary commands to the motor controllers to operate the induction motors used as the power train controls. The electric vehicle used in this thesis work is shown in Figure 5.2.

71

Figure 5.2: LiFePO4 battery powered electric vehicle (Solectria E10).

5.3 Designed engine and generator set

In order to re-engineer an existing electric vehicle, an appropriate engine and generator set is designed using a separate engine and IPM synchronous generator. A 30 kW engine and generator set is designed using a 40 hp Kohler engine and a 30 kW IPM generator from a Toyota Prius plug-in hybrid electric vehicle. An appropriate model of the engine and generator set is developed assuming the engine is running at a constant speed, the maximum amount of the current supplied by the engine and generator set is calculated by using the maximum amount of torque handled by the engine. The maximum amount of the current that need to be supplied is predicted to be 140A. The engine and generator set used to design the engine and generator set are shown in the following Figures 5.3 to 5.5.

72

Figure 5.3: 40 hp V-Twin horizontal shaft gasoline engine.

Figure 5.4: 30 kW generator from 2004 Toyota Prius transmission.

73

Figure 5.5: Designed engine and generator set in this thesis work.

5.4 Developed three phase interleaved DC-DC converter

A power converter with a three phase diode rectifier coupled with a developed three phase interleaved DC-DC converter is used to charge the battery pack. A schematic of the developed power converter is shown in the Figure 5.6. The power converter consists of a three phase diode rectifier, input capacitor bank and three phase interleaved buck converter. The three phase generator output is converted into DC current to charge the batteries through this process. The charging current level is controlled through adjusting the PWM duty ratios of the IGBT switches.

74

Figure 5.6: Schematic diagram of the three phase interleaved DC-DC converter.

The part numbers of the components used to develop the power converter and the specifications of the components are provided in Table 5.1.

Table 5.1: List of components used to design power converter

Part Number Functionality Current Voltage

ratings (A) ratings (V)

VUO52-16NO1 Three phase diode 54 1600

rectifier

B43564A5108M Input capacitors 15 450

IXGN60N60C2D1 IGBTs 75 600

DSI2X55-12A Diodes 56 1200V

EKMQ351VSN391MQ45S Output capacitors 1.3 350

LAH 50-P Current transducer 50 -

MKP1848530704K2 Snubber capacitors - 700

75

The inductors used in the power converter are designed by using an appropriate inductor core T520-35D (From micro metals) and an inductor coil of amperage of 50A (8

AWG). The current transducers (LAH 50-P) are used to measure the amount of current flowing through the inductors. The designed power circuit board to implement the schematic of the developed power converter is shown in Figure 5.7. Figure 5.8 shows the developed power converter used to charge the vehicle battery pack.

Figure 5.7: Layout of the developed power converter.

76

Figure 5.8: Battery charger with three phase interleaved DC to DC converter.

The driver circuit board is developed to convert low level PWM signals into relatively higher power driver signals for IGBTs. The current measurement signals are also conditioned on the same board to have compatible analog signals for the DSP. The block diagram of the driver circuit is shown in Figure 5.9.

Analog output signals from current sensors ADC output to DSP Signal Conditioning Digital signal processor IGBT switching signals IGBT switching signals PWM signals from DSP

Driver circuit board Figure 5.9: Block diagram of the driver circuit board

77

The PCB layout of the driver circuit is shown in Figure 5.10. The board is initially designed fopr induction motor drives but later modified to be used in this project.

Figure 5.10: Driver circuit board used in this thesis work.

5.6 Supervisory control algorithm

To control the operation of the engine and generator set and the electric vehicle, a supervisory control algorithm was developed. The main operation of the supervisory control algorithm is to control the operation of the engine and generator in addition to command the motor controllers of the electric vehicle. To implement the developed supervisory control algorithm, an engine control module ECM-0565-128-0701-C from

Woodwards new motor controller solution product line. A Matlab/Simulink based

Motohawk tool site is used to develop a model of range extended electric vehicle control algorithm which can be programmed into the ECM. This supervisory control algorithm uses the driver commands like ignition, pedal, forward, reverse, neutral, battery voltage,

78 battery current, power converter current output and engine ON/OFF signal. By analyzing these inputs the SCM provides necessary commands to the motor controllers and engine and generator ignition circuitry to control the operation of the range extended electric vehicle. A block diagram of the modified supervisory control algorithm is shown in

Figure 5.11.

Ignition ON Forward High voltage relay Reverse Motor control relay Neutral Direction commands Accelerator pedal Brake pedal Acceleration commands Battery voltage Supervisory control algorithm Display Gauge 1 (SCM) Battery current output Display Gauge 2 Battery SOC Engine Ignition signal Input output signals Power converter output current CAN communication signals Engine ON/OFF signal

Engine ON/OFF

Figure 5.11: Supervisory control module developed in this thesis work.

An algorithm was developed to control the operation of the engine and generator set considering the battery SOC. Following conditions have implemented in the developed algorithm.

If battery SOC is less than minimum SOC to operate engine and generator set,

Engine ON/OFF = 1.

Else if battery SOC is greater than maximum SOC to operate engine and generator set,

Engine ON/OFF = 0.

79

Else if minimum SOC to operate engine and generator set is less than battery SOC and battery SOC is less than maximum SOC to operate engine and generator set,

Engine ON/OFF = previous Engine ON/OFF state.

5.7 Engine Ignition circuitry

An ignition circuitry has been developed to trigger the engine when the engine

ON/OFF signal is activated by supervisory control algorithm. Ignition ON/OFF signal is achieved by using a counter, when the engine ON/OFF signal is activated, ignition

ON/OFF signal is activated for a limited amount of time which will start the engine. The profiles of engine ON/OFF and ignition ON/OFF are shown in Figure 5.12.

ON

OFF /

OFF Engine ONEngine

Time (sec) OFF

/ ON Ignition ONIgnition OFF Time (sec)

Figure 5.12: Engine ON/OFF and ignition ON/OFF signals profiles.

An ignition circuitry has been developed to trigger the engine and generator set depending on the engine trigger signals, when the engine ON/OFF signal is true relay 1 will be activated and power up the engine will be powered on until the engine ON/OFF is disabled. When the ignition ON/OFF signal is true relay 2 will be turned on and will

80 connect the power supply to the ignition circuit. This circuit is designed by using 12V relays and NPN transistors (Q1 and Q2) which will switch the relays as low side drivers.

Relay 2 Relay 1

12 V DC

Engine ON/OFF Q1 Q2 Engine ON signal Ignition ON signal

Vehicle Ground Ignition ON/OFF

Figure 5.13: Ignition circuitry used in this thesis work.

5.8 Vehicle CAN Communications

Present day automobiles have thousands of small microprocessors controlling each and every objective of the automobile. It is really important that each and every microprocessor can to communicate with each other. The Controller Area Network

(CAN) communication is one of the best communication protocols developed Robert

Bosch in 1983. The CAN communication protocol is a multimaster serial bus communication protocol for communicating one Electronic control unit (ECU) to another. As CAN is a multimaster communication protocol, each message has unique message ID. Depending on the size of the identifier, CAN messages have been classified into two kinds, Standard (11 bit) and Extender (29 bit) identifiers. All ECUs are connected to the same bus as shown in the Figure 5.14.

81

Figure 5.14: Basic CAN communication block diagram.

A communication module has been developed using Motohawk tools in the vehicle ECU [32] to communicate with the DSP [29] used to control the switching of developed power converter. The main purpose of this communication module is to command the charging battery current, and provide the safety for the power converter when there is any fault condition in the power converter. The safety feature developed considers when the charging current is greater than a certain limit, then the controller will shutdown the switching of the IGBT’s. It is necessary to establish the communication between these controllers for the operation of the engine and generator set, and commands the battery charging current. The messages in this module use a standard message ID, 0x0001 and 0x000A. The message IDs for the CAN communication network is provided in Table 5.2 [32].

82

Table 5.2: CAN messages used in this thesis work.

CAN message Direction of the Purpose of the Messages Message ID Message Timing

0x0001 Vehicle ECU to eZDsp Reference charging current 10ms

0x000A eZDsp to Vehicle ECU Actual Charging current & 100ms fault safety flag

The vehicle ECU commands the charging current. The simulation model for the

CAN communication has been developed using the Motohawk tool box developed for the vehicle ECU. Figures 5.15 and 5.16 show the CAN bus analysis between vehicle ECU and TIDSP (eZdspTMS320F2812).

Figure 5.15: Mototune analysis for the CAN communication between vehicle ECU and TIDSP.

83

Figure 5.16: CAN bus analysis and messages on the bus used in the SCM.

A power flow diagram for the developed range extender electric vehicle is shown in the

Figure 5.17.

Figure 5.17: Power flow diagram of the range extenders.

84

5.9 Conclusion

A step by step procedure to design the experimental setup for the developed range

extender for the electric vehicle is discussed in this chapter. The procedure followed

to convert the existing electric truck into a range extended electric truck is briefly

explained in this chapter. In the next chapter experimental results of this range

extender both charging high current battery pack and acting as a range extender in an

actual electric vehicle are presented.

85

CHAPTER VI

EXPERIMENTAL RESULTS

6.1 Introduction

In this chapter, the results of a series of experiments conducted on a developed range extender are presented. The initially developed power converter was tested in the laboratory with a three phase power supply under different load conditions. After programming the controller with the control algorithm for the power converter, we tuned the performance of the power converter under different load conditions. After the initial round of testing, we performed experiments with the engine and generator set and the power converter together to charge the battery pack in the vehicle. The developed CAN communication was tested to command the charging current from the DC-DC converter.

Finally analysis of the electric truck with the developed range extender was discussed in this chapter.

6.2 Experimental results of the power converter

The main purpose of the power converter developed in this thesis work is to charge a high voltage battery pack available in the electric truck. We performed a series of experiments to study the performance of the power converter under different load conditions. In this thesis a TMS320F2812 digital signal processor developed by Texas instruments has been used. A current control algorithm has been implemented to perform the switching of the DC-DC converter. A simple hysteresis based algorithm was

86 developed to maintain a constant current through the inductors. As the developed DC-DC converter contains three parallel converters to reduce the stress on each converter, in order to reduce the ripple current through the output capacitors, the controller provides three 20 kHz PWM signals phase shifted by 120 degrees with each other. With 20 kHz

IGBT switching, the frequency of the ripple current in the capacitors and the load will be around 60 kHz, and the amplitude of the ripple current will be reduced by a factor of three. Figure 6.1 shows the experimental setup developed to test the battery charging algorithm to charge the battery pack.

Figure 6.1: Experimental setup to test the power converter with the battery pack.

87

Figure 6.2: Input voltage and input current in one line of 3-Phase voltage input.

Figure 6.3: Battery voltage and charging current.

During this test, a 3 phase AC supply is used as a source to the rectifier. Figure 6.2 shows the line to line voltage of the three phase input and input line current. It has been observed input RMS voltage is around 271 V and input line RMS current is around 39.4

A. Figure 6.3 shows the output voltage and the output current of the DC-DC converter used to charge the battery pack. From the above results the output voltage of the DC-DC converter is 220 V and the average output current is 75.6 A. The average output power of

88 the converter is 16.6 kW. The input power of the converter is 18.5 kW and the efficiency of the power converter is around 89.7%.

6.3 Results of the range extender with vehicle batteries as load

We developed an engine and generator set, and a power converter to charge the high voltage battery pack in the electric truck. The results below show the operation of the developed range extender while charging the batteries in the vehicle.

In order to analyze the behavior of the range extender, the engine and generator set is coupled with the power converter. The controller developed to control the current output of the DC-DC converter is connected with the vehicle ECU using CAN communication.

The reference current is commanded by the vehicle ECU, the controller of the power converter receives the command and switches the IGBTs of the DC-DC converter to regulate the charging current level.

Figure 6.4 shows the output of the range extender while charging the vehicle batteries. From the results it was observed that the peak line to line voltage of the generator is around 200 V. The average current output of the DC-DC converter is around

60 A, and the battery voltage is 170 V.

Figure 6.5 shows the inductor currents of the DC-DC converter, the average inductor current is around 20A. When three legs of the DC-DC converter are operating consecutively the total output current of the power converter is kept at 60A.

89

Figure 6.4: Outputs of the range extender while charging the batteries of the vehicle.

90

Figure 6.5: Inductor currents of the power converter in the range extender.

91

Figure 6.6 shows the change in the battery charging current when there is a change in the charging current commands. The reference current is commanded by the vehicle

ECU, the driver circuit of the power converter will adjust the duty cycle of the PWMs to maintain the battery charging current at the commanded level.

Figure 6.6: Change in the charging currents depending reference current.

The next set of figures show the results of the developed algorithm when the developed engine and generator is operated by the vehicle ECU. The engine and generator set is triggered by the vehicle ECU. When the engine and generator set starts running, the power converter will supply the electrical power to charge the battery pack.

Figures 6.7 and 6.8 shows the results of the algorithm developed in the supervisory control module to control the operation of the engine and generator set. As shown in the

Figure 6.8 when the ignition module triggers the engine, generator and power converter

92 will convert the mechanical power supplied by the engine in to appropriate electrical power to charge the battery pack. The engine ON/OFF signal provided by the SCM, battery output current (positive when discharging and negative while charging), battery voltage, and the calculated SOC of the battery pack are presented in Figure 6.8

From the results we observe that when the engine and generator set is powered on, the power converter supplies the battery charging current and the SOC of the battery pack will increase continuously until the engine is shutdown.

Figure 6.7: Battery power output during the vehicle testing of range extender.

93

Figure 6.8: Results of the developed algorithm considering the vehicle is at stationary.

94

The next set of experimental results shows the developed algorithm while it is maintaining the SOC of the battery pack between certain limits provided by the driver.

This particular test was conducted by driving the electric truck with the developed range extender in a university of Akron parking lot. In order to test the validity of the developed algorithm, the minimum and maximum SOC of the battery pack are considered to be

99.92% and 99.99% respectively. When the SOC of the battery pack is less than 99.92 % engine and generator set will be triggered and charges the battery pack. Depending on the vehicle demand and the power output of the DC/DC converter, the SOC of the battery pack is increased. When the SOC of the battery pack reaches 99.99 % the engine will be shutdown.

The SOC of the battery pack output of the ignition module (Engine ON/OFF), Battery output current, SOC of the battery pack and battery power output (kW) and battery voltage are shown in Figure 6.9 and 6.10. From the results shown below we observe that the engine and generator set is operated to maintain the SOC of the battery pack between

99.92 % and 99.99 % according to the developed algorithm.

Figure 6.9: Battery voltage during running operation of the range extended vehicle.

95

Figure 6.10: Test results of the while the vehicle is running.

96

The next set of results show the operation of the developed system on a dynamometer. For safety concerns only one leg of the three phase interleaved DC-DC converter is operated. This reduces the power output of the converter around 6 kW.

Figure 6.11: Test results of the while the vehicle is running on a dyno (dyno test 1).

97

Figure 6.12: Battery power output and Induction motor speed (RPM) (dyno test 1).

98

Figure 6.13: Test results of the while the vehicle is running on a dyno (dyno test 2).

99

Figure 6.14: Battery power output and Induction motor speed (RPM) (dyno test 2).

6.4 Conclusion

The range extender for the existing electric truck was successfully designed and implemented. The operation of the range extender to charge the vehicle batteries is verified using the CAN communication between the vehicle ECU and the controller of the power converter. From the experimental results it was observed that the developed range extender can be used to increase the range of the existing electric vehicle.

100

CHAPTER VII

CONCLUSIONS AND FUTURE WORK

7.1 Introduction

In the previous chapters, the processes followed to model, simulate and implement an appropriate range extender for an existing electric vehicle have been presented. The models have been used to size the subcomponents of the range extender. The subcomponents have been developed and integrated to demonstrate the overall system. In this chapter results are summarized and future work is discussed

7.2 Modeling of a range extended electric vehicle

An existing Matlab-Simulink model of a series hybrid electric vehicle is considered to perform feasibility studies to design an appropriate range extender. After studying the existing simulation with different speed profiles, a specific speed profile is selected to size the engine and generator set to implement the range extender. To size an appropriate engine and generator set, the vehicle is considered to be cruising at a speed of 65 mph.

From the existing simulations the amount of power required to maintain the speed of the vehicle at 65 mph is calculated to be around 22.6 kW. By analyzing the series hybrid electric vehicle simulation of the power rating of the range extender is calculated to be 30 kW.

Using Matlab-Simulink, a constant speed constant power range extender has been simulated in this thesis work. A 40 hp engine is considered to be rotating at 3600 rpm is

101 coupled with a 30 kW IPM generator to simulate a constant speed engine generator set. A fault tolerant and efficient power converter has been developed for charging the batteries.

A three phase diode rectifier is used to convert the ac voltage generated by the IPM generator to DC bus. Since the output voltage of the rectifier is higher when compared to the battery voltage, a three phase interleaved buck converter is developed to control the charging current into the battery.

7.3 Fault tolerant three phase interleaved buck converter

To design an appropriate power converter, a fault tolerant three phase interleaved buck converter has been developed. A battery charging algorithm has been developed to maintain the output current of the power converter at a constant rate. Depending on the amount of power that the generator can develop and the maximum amount of torque that the engine can handle, the DC-DC converter rating is determined to be 150A at the battery side.

7.4 Range extender electric vehicle control algorithms

In this thesis two algorithms were developed to control the operation of a range extended electric vehicle. The first controller maintains the operation of the vehicle and sends command for the charging level to the engine and generator set to maintain the

SOC of the battery pack between predefined values. Considering the amount of distance covered by the vehicle, it has been determined to keep the SOC of the battery pack between 60 % and 80 %. As the battery characteristics can be approximated linearly in this region, the life time of the battery pack can be increased as the battery pack is not discharged completely. When the fuel level in the vehicle is near to empty, the driver will be able to reach the nearest gas station as the SOC of the battery pack is more than 60 %.

102

From the simulation results with a 30 kW engine and generator set, the vehicle will run for 90mins at 65mph and will go 79.8 miles leaving the SOC of more than 60 % in the battery pack, which is more than sufficient amount of energy to reach nearest gas station assuming a gas station situated in every 10 miles.

Along with the range extended electric vehicle algorithm, an algorithm has been developed to maintain the current output of the power converter at a constant value. The developed battery charging algorithm provides three PWM signals phase shifted 120˚ with each other. With this PWM sequence, the ripple content in the output current has been reduced by 6 times when compared to conventional buck converter with a single

PWM signal. These developed algorithms are verified through simulation and experimental tests.

7.5 Experimental setup and Experimental results

After studying the simulation results of the developed series hybrid electric vehicle, an appropriate range extender was designed using a 40 hp Kohler engine and a 30 kW generator from a Toyota Prius transmission and a power converter with a three phase diode rectifier and a fault tolerant three phase interleaved buck converter in series. The designed range extender is installed in an existing electric vehicle to re-engineer this electric vehicle into a range extended electric vehicle. The developed algorithm has been verified using the reengineered range extended electric vehicle.

In conclusion, a simulation of a range extended electric vehicle has been developed considering the specifications of an existing electric vehicle. The developed simulation models will help in modeling appropriate range extender for any vehicle specifications and appropriate drive cycles.

103

7.6 Suggested future work

It is really important for automobile industries to model robust systems to develop hybrid electric vehicles. In order to design a more robust range extender to convert this existing electric truck the following future work can be suggested.

7.6.1 Plug-in hybrid electric vehicle

To improve the reliability of the developed range extended electric vehicle, an on- board plug-in battery charger can be developed. A plug-in battery charger can be developed using a single phase AC to DC converter which will convert the single phase output from the household outlet and charge the battery pack of the electric vehicle. A simple single phase diode rectifier is electronically coupled with a buck converter to control the output voltage and output current. The block diagram of the developed power converter is presented in Figure 7.1.

104

Power line

Communication line Current Proposed range extender controller

Internal permanent Internal combustion magnet Fault Tolerant engine synchronous battery charger generator

Engine trigger SCM circuit

Induction Motor LiFePO4 Battery Buck Single phase Motors controllers pack Converter diode rectifier

Battery powered Electric vehicle

Figure 7.1: Block diagram of the Plug-in hybrid electric vehicle.

7.6.2 Battery management system

This vehicle battery pack is made of 50 individual cells connected in series, studies shows that no two battery cells have identical characteristics which will affect the charging and discharging characteristics of the battery pack. The battery management system will control the charging of a single battery cell. Each battery management system was connected with two cells in series when the battery voltage is above certain limit these batteries will be disconnected from the charging system. This management system will have the over voltage and under voltage protection while charging the battery pack.

105

REFERENCES

[1] BP Statistical Review of World Energy June 2013 (http://www.bp.com/content/dam/bp/pdf/statistical-eview/statistical_review_of_world_ energy_2013.pdf) [2] Browning, Louis, and Stefan Unnasch, "Hybrid electric vehicle commercialization issues," Applications and Advances, 2001. The Sixteenth Annual Battery Conference on. IEEE, 2001. [3] Anderson, Curtis Darrel, and Judy Anderson, Electric and hybrid cars: A history. McFarland, 2010. [4] German, JOHN M, "Hybrid Electric Vehicles," Encyclopedia of Energy 3 (2004): 202-203. [5] He, Xiaoling, and Jeffrey W. Hodgson, "Modeling and simulation for hybrid electric vehicles. I. Modeling," Intelligent Transportation Systems, IEEE Transactions on 3.4 (2002): 235-243. [6] Markusic, C. A. Final Report of a 1995 Solectria E-10 Pickup Into Flat Frontal Barrier. No. VRTC 941219. 1995. [7] Chan, Ching-Chuen, Alain Bouscayrol, and Keyu Chen, "Electric, hybrid, and fuel-cell vehicles: Architectures and modeling," Vehicular Technology, IEEE Transactions on 59.2 (2010): 589-598. [8] Powell, B. K., and T. E. Pilutti, "A range extender hybrid electric vehicle dynamic model," Decision and Control, 1994., Proceedings of the 33rd IEEE Conference on. Vol. 3. IEEE, 1994. [9] Mantravadi, Siva Rama Prasanna. Modeling, simulation & implementation of li- ion battery powered electric and plug-in hybrid vehicles. Diss. The University of Akron, 2011. [10] Hsu, J. S., C. W. Ayers, and C. L. Coomer, “Report on Toyota/Prius motor design and manufacturing assessment,” United States. Department of Energy, 2004.

[11] Al-Adsani, A. S., A. M. Jarushi, and N. Schofield, "An ICE/HPM generator range extender in a series hybrid electric vehicle," Power Electronics, Machines and Drives (PEMD 2010), 5th IET International Conference on. IET, 2010. [12] Lee, Young-Joo, Alireza Khaligh, and Ali Emadi, "Advanced integrated bidirectional AC/DC and DC/DC converter for plug-in hybrid electric vehicles,"Vehicular Technology, IEEE Transactions on 58.8 (2009): 3970-3980.

106

[13] Chanda, Soumendu, “Powertrain Sizing and Energy Usage Adaptation Strategy for Plug-in Hybrid Electric Vehicles,” Diss. University of Akron, 2008. [14] Husain Iqbal, “Electric and hybrid vehicles: design fundamentals,” CRC press, 2011. [15] Ma, Lin, et al, "Analysis of flux control for the IPMSM used in the power generation," Electrical Machines and Systems, 2008. ICEMS 2008, International Conference on IEEE, 2008. [16] Hart, Daniel W. Power electronics. Tata McGraw-Hill Education, 2011. [17] Rowell Derek, "State-space representation of lti systems," URL: http://web. mit. edu/2.14/www/Handouts/StateSpace. pdf (2002). [18] Wang, Liangrong, et al, "A novel battery charger for plug-in hybrid electric vehicles," Information and Automation (ICIA), 2012 International Conference on, IEEE, 2012. [19] Musavi, Fariborz, et al, "Energy efficiency in plug-in hybrid electric vehicle chargers: evaluation and comparison of front end ac-dc topologies," Energy Conversion Congress and Exposition (ECCE), 2011 IEEE. IEEE, 2011. [20] Kamnarn, U., and V. Chunkag, "A power balance control technique for operating a three-phase ac to dc converter using single-phase CUK rectifier modules," Industrial Electronics and Applications, 2006 1ST IEEE Conference on. IEEE, 2006. [21] Morcos, M. M., N. G. Dillman, and C. R. Mersman, "Battery chargers for electric vehicles," Power Engineering Review, IEEE 20.11 (2000): 8-11. [22] Yang, Fong -Cheng, et al, "Hysteresis-current-controlled buck converter suitable for Li-ion battery charger," Communications, Circuits and Systems Proceedings, 2006 International Conference on. Vol. 4. IEEE, 2006. [23] Nguyen, Cong-Long, and Hong-Hee Lee, "AC Voltage Sensorless Control of Battery Charger System in Electric Vehicle Applications," IPEC. 2012. [24] Capaldi, P., A. Dannier, and I. Spina, "A simple on-board electric generator for road electric vehicles based on single-cylinder engine and PM-brushless generator," Power Electronics, Electrical Drives, Automation and Motion (SPEEDAM), 2012 International Symposium on. IEEE, 2012. [25] Pazul, Keith, "Controller area network (can) basics," Microchip Technology Inc. Preliminary DS00713A-page 1 (1999). [26] Wirasingha, Sanjaka G., Nigel Schofield, and Ali Emadi, "Plug-in hybrid electric vehicle developments in the US: Trends, barriers, and economic feasibility,"Vehicle Power and Propulsion Conference, 2008. VPPC'08. IEEE. IEEE, 2008.

107

[27] Rashid, Muhammad Harunur,” Power electronics: circuits, devices, and applications. Pearson Education India,” 2003. [28] Muhammad, H. Rashid, "Power electronics-circuits, devices and applications,"Prentice-Hall International, ISBN-10 131011405 (1993): 190-222. [29] Instruments, Texas, "TMS320F2812 Digital signal processor data manual,"SPRS174M, URL: http://www.ti.com (2005). [30] Kung, Ying-Shieh, and Pin-Ging Huang, "High performance position controller for PMSM drives based on TMS320F2812 DSP," Control Applications, 2004. Proceedings of the 2004 IEEE International Conference on. Vol. 1. IEEE, 2004. [31] Ehsani, Mehrdad, Yimin Gao, and Ali Emadi, “Modern electric, hybrid electric, and vehicles: fundamentals, theory, and design,” CRC press, 2009. [32] KVASER Inc, CANKing User Manual, 2005.

108

APPENDICES

109

APPENDIX A

ENGINE AND GENERATOR SIZING CALCULATIONS

Below Matlab program has been used to calculate the amount of power required to maintain the vehicle in cruising at a speed of 65 mph.

clc

clear all

%Approximate weight of the vechile batteries and gen-eng set. Vehicle_Mass = 1220; Battery_Mass = 180+150; Eng_Gen_Mass = 564; g = 9.81; %m/s^2 W = (Vehicle_Mass+Battery_Mass+Eng_Gen_Mass)*9.81; AD = 1.4224; %density of air at -25deg C V = 20.1168; %Avg speed of the vehicle = 60miles/hr Af = 2.8; Cd = 0.44; Fad = 0.5*AD*Cd*Af*V^2;

C0 =0.015; C1 = 0; %Rolling force required on a flat road. Froll = C0*W;

110

%Traction force required for the vehicle to move Ftr = Froll+Fad; %Traction Power Ptr = (Ftr*V)/1000; Ploss = 0.8; P = Ptr+Ploss; %Nominal Battery Voltage BV = 150; % Aimed Distance to be travelled in Miles. ZEV = 60; AH = (P*100/60)/BV; From the above program it has been calculated that the power required maintaining the vehicle in cruising at a speed of 65 mph is around 22.6 kW.

111

APPENDIX B

MATLAB/SIMULINK MODELS

The Matlab-Simulink models of the Series hybrid electric vehicle considered to design range extender is explained in this section.

Series Hybrid Electric Vehicle:

Figure B1: Simulation of the series hybrid electric vehicle used in this thesis work.

112

Above model of the series hybrid electric vehicle contains the following sections.

Driver Model:

This block deals with the driver behavior. Main commands from the driver model are ignition and the vehicle speed profile. Depending on the ignition command and the speed profile, the outputs of this model commands the supervisory control algorithm

(SCM) to provide the control signals for the operation of the motor controllers.

Figure B2: Model for the driver commands in series hybrid electric vehicle.

113

Figure B3: Speed profiles and the pedal command for the series hybrid electric vehicle.

Supervisory control algorithm:

Supervisory control module is a control algorithm that collects the data from the driver module, processes and provides control signals like the motor torque command, brake commands, Engine ON/OFF commands, SOC calculation and fuel calculation.

114

Figure B4: Supervisory control module (SCM).

Engine and generator model:

Below model shows the simulation of a constant speed, constant power engine and generator set. The commands for the engine and generator set like, generator speed and torque commands will be provided by the SCM.

115

Figure B5: Simulink model for the engine and generator set. Motor Model:

This model provides the model for the induction motors used in this electric truck.

SCM provides the commands to the motors depending on the speed profile of the vehicle.

Figure B6: Simulation model of the electric motors used in the electric truck.

116

Vehicle Dynamics:

The electric truck used in this thesis work is simulated using the vehicle kinematics discussed in this document.

Figure B7: Simulation of the vehicle dynamics. Lithium Ion Battery Model (LiFePO4 Battery pack):

This model provides the simulation of the Lithium Ion battery pack used in this electric truck. The experimental results performed on the battery pack used to model the lithium ion battery pack.

117

Figure B8: Simulation of the LiFePO4 battery pack.

Range extender simulation:

A simulation model for the engine and generator set designed in this work to analyze the performance of the range extender while charging the vehicle batteries.

Figure B9: Simulation of the range extender developed in this thesis work.

118

This model contains the model of the engine and generator set, power converter to convert the three phase AC to the appropriate DC to charge the battery pack. Engine and generator set is simulated using the speed Vs torque characteristics of CH-1000-2002 engine, and the specifications of the generator.

Power converter simulation:

Below model shows the simulation of the power converter to charge the battery pack. Power converter contains a three phase diode rectifier and three phase interleaved

DC-DC converter.

Figure B10: Power converter developed in this thesis work.

119

APPENDIX C

CURRENT CONTROL ALGORITHM DEVELOPED TO CONTROL THE DC-DC

CONVERTER

An algorithm is developed to control the current output of the DC-DC converter. A DSP based microcontroller is used to provide necessary switching signals to the DC-DC converter. Code Composer Studio V 3.0 is used to write the necessary code to implement the algorithm. The actual current flowing in the inductor is calculated using current sensor (LAH-100P) and passed to the ADC converter of the DSP, compared with the reference current and the error passed through a PI controller. The output of the PI controller is compared with counter increments from 1 to 3960. A PWM signal is generated by comparing the output PI controller and the counter.

#include "DSP281x_Device.h" #include "init.c" extern Uint16 RamfuncsLoadStart; extern Uint16 RamfuncsLoadEnd;

extern Uint16 RamfuncsRunStart; extern Uint16 PieVectTableInit; char stop = 0; int count = 0; int count1 = 1; int count2 = 1321; int count3 = 2641;

120 int speedcount = 1; int Icharging = 0; int current_1 = 0; int current1 = 0; int current1_old = 0; int current_1_a = 0; int current_2 = 0; int current2 = 0; int current2_old = 0; int current_2_a = 0; int current_3 = 0; int current3 = 0; int current3_old = 0; int current_3_a = 0; int Vdc; long Vdc_1 = 0; long Vdc_old = 0; int Kp = 0; int Ki = 20000; int IRef = 0; int error1 = 0; int error1_P = 0; int error1_I = 0; int error1_old = 0; int error1_sum = 0; int error2 = 0;

121

long int error2_P; int error2_old = 0; long int error2_I; long int error2_sum = 0; int error3 = 0; long error3_P; long int error3_I; int error3_old = 0; long int error3_sum = 0; void main(void) { InitSystem(); // Initialize the DSP's core Registers //SpeedUpRevA(); /********initialise the PIE RAM***************/ memcpy(&PieVectTable, &PieVectTableInit,256); memcpy(&RamfuncsRunStart,

&RamfuncsLoadStart, &RamfuncsLoadEnd - &RamfuncsLoadStart); InitFlash(); // Initialize the Flash; Call original function from "DSP281x_SysCtrl.c"

//InitPieCtrl(); // Function Call to init PIE-unit ( code : DSP281x_PieCtrl.c) //InitPieVectTable(); // Function call to init PIE vector table ( code : DSP281x_PieVect.c ) Gpio_select(); // Setup the GPIO Multiplex Registers ADC_init(); // Initialize the Analog and digital converter delay(32000); interrupt_init_33us(); //main control inner loop interrupt

122

/* Write to the MSGID field */ // delay to initialize all the registers properly GpioDataRegs.GPADAT.bit.GPIOA0 = 0; GpioDataRegs.GPADAT.bit.GPIOA2 = 0; GpioDataRegs.GPADAT.bit.GPIOA4 = 0; GpioDataRegs.GPBDAT.bit.GPIOB2 = 0; GpioDataRegs.GPBDAT.bit.GPIOB0 = 0; GpioDataRegs.GPBDAT.bit.GPIOB1 = 0; InitCan(); AdcRegs.ADCTRL2.bit.SOC_SEQ1 |= 1; // software Start-Of- Conversion // Message ID for the transmission for the control system ECanaMboxes.MBOX5.MSGID.all = 0; ECanaMboxes.MBOX5.MSGID.bit.STDMSGID=0x1; /* Configure Mailbox 5 as Transmit mailbox */ ECanaShadow.CANMD.all = ECanaRegs.CANMD.all; ECanaShadow.CANMD.bit.MD5 = 0; ECanaRegs.CANMD.all = ECanaShadow.CANMD.all; /* Enable Mailbox under test */ ECanaShadow.CANME.all = ECanaRegs.CANME.all;

ECanaShadow.CANME.bit.ME5 = 1; ECanaRegs.CANME.all = ECanaShadow.CANME.all; /* Write to DLC field in Message Control reg */ ECanaMboxes.MBOX5.MSGCTRL.bit.DLC = 4; /* Message ID for the message recieved */ ECanaMboxes.MBOX1.MSGCTRL.bit.DLC=4; ECanaMboxes.MBOX1.MSGID.all=0; ECanaMboxes.MBOX1.MSGID.bit.STDMSGID = 0xA;

123

/* Configure Mailbox 1 as Receiver mailbox */ ECanaShadow.CANMD.all = ECanaRegs.CANMD.all; ECanaShadow.CANMD.bit.MD1 = 1; ECanaRegs.CANMD.all = ECanaShadow.CANMD.all; /* Enable Mailbox 1 */ ECanaShadow.CANME.all = ECanaRegs.CANME.all; ECanaShadow.CANME.bit.ME1 = 1; ECanaRegs.CANME.all = ECanaShadow.CANME.all; do { ECanaShadow.CANRMP.all = ECanaRegs.CANRMP.all; EALLOW; SysCtrlRegs.WDKEY = 0x55; // serve watchdog #1 SysCtrlRegs.WDKEY = 0xAA; // serve watchdog #2

EDIS; EALLOW; GpioMuxRegs.GPADIR.bit.GPIOA0 = 1; GpioMuxRegs.GPADIR.bit.GPIOA2 = 1; GpioMuxRegs.GPADIR.bit.GPIOA4 = 1;

GpioMuxRegs.GPBDIR.bit.GPIOB1 = 1; EDIS; GpioDataRegs.GPADAT.bit.GPIOA0 = 0; GpioDataRegs.GPADAT.bit.GPIOA2 = 0; GpioDataRegs.GPADAT.bit.GPIOA4 = 0; GpioDataRegs.GPBDAT.bit.GPIOB1 = 1; }

124

while(ECanaShadow.CANRMP.bit.RMP1 != 1 ); // Wait for RMP1 to be set.. EnableInterrupts(); IER |=(M_INT5+M_INT4); EINT; // Enable Global interrupt INTM ERTM; // Enable Global realtime interrupt DBGM ///////////////////////////////////////////////////////////////// while(1) { do { ECanaShadow.CANRMP.all = ECanaRegs.CANRMP.all; EALLOW; SysCtrlRegs.WDKEY = 0x55; // serve watchdog #1 SysCtrlRegs.WDKEY = 0xAA; // serve watchdog #2

EDIS; } while(ECanaShadow.CANRMP.bit.RMP1 != 1 ); // Wait for RMP1 to be set.. EALLOW; GpioMuxRegs.GPBDIR.bit.GPIOB0 = 1; GpioMuxRegs.GPBDIR.bit.GPIOB1 = 1; EDIS; GpioDataRegs.GPBDAT.bit.GPIOB0=1; GpioDataRegs.GPBDAT.bit.GPIOB1=1; //clrwdg(1000); }

125

} interrupt void T3PINT_ISR(void) { if(ECanaRegs.CANES.bit.ACKE == 1) { EALLOW; GpioMuxRegs.GPADIR.bit.GPIOA0 = 1; GpioMuxRegs.GPADIR.bit.GPIOA2 = 1; GpioMuxRegs.GPADIR.bit.GPIOA4 = 1; EDIS; GpioDataRegs.GPADAT.bit.GPIOA0=0; GpioDataRegs.GPADAT.bit.GPIOA2=0; GpioDataRegs.GPADAT.bit.GPIOA4=0; IRef = 0; error1_I = 0; error2_I = 0; error3_I = 0; EALLOW; GpioMuxRegs.GPBDIR.bit.GPIOB0 = 1; GpioMuxRegs.GPBDIR.bit.GPIOB1 = 1; GpioMuxRegs.GPBDIR.bit.GPIOB2 = 1; EDIS; GpioDataRegs.GPBDAT.bit.GPIOB2=1; GpioDataRegs.GPBDAT.bit.GPIOB0=0; GpioDataRegs.GPBDAT.bit.GPIOB1=0;

126

} else { Kp = (int)((3960/IRef)+1); ECanaShadow.CANRMP.all = ECanaRegs.CANRMP.all; if(stop == 1) { EALLOW; GpioMuxRegs.GPADIR.bit.GPIOA0 = 1; GpioMuxRegs.GPADIR.bit.GPIOA2 = 1; GpioMuxRegs.GPADIR.bit.GPIOA4 = 1; EDIS; GpioDataRegs.GPADAT.bit.GPIOA0=0; GpioDataRegs.GPADAT.bit.GPIOA2=0; GpioDataRegs.GPADAT.bit.GPIOA4=0; IRef = 0; error1_I = 0; error2_I = 0; error3_I = 0; EALLOW; GpioMuxRegs.GPBDIR.bit.GPIOB0 = 1; GpioMuxRegs.GPBDIR.bit.GPIOB1 = 1; GpioMuxRegs.GPBDIR.bit.GPIOB2 = 1; EDIS; GpioDataRegs.GPBDAT.bit.GPIOB2=1; GpioDataRegs.GPBDAT.bit.GPIOB0=0; GpioDataRegs.GPBDAT.bit.GPIOB1=0;

127

} else { if(speedcount == 15) { adc_interrupt(); speedcount = 1; } else { current_1 = ((AdcRegs.ADCRESULT9>>4) & 0x0FFF); current_1_a = current_1-2123; current1 = (int)((current1_old)+current_1_a)>>1; current1_old = current1; error1 = IRef-current_1_a; error1_P = (error1)*Kp;

error1_old = error1+error1_old; error1_I = (Ki*error1_old); if (error1_I < 0) { error1_I = 0; } error1_I = error1_I>>10; error1_sum = error1_I+error1_P; if(error1_sum > 3960) error1_sum = 3960; if (error1_sum <0)

128 error1_sum = 0; current_2 = ((AdcRegs.ADCRESULT7>>4) & 0x0FFF); current_2_a = current_2-2100; current2 = (int)((current2_old)+current_2_a)>>1; current2_old = current2; error2 = IRef-current_2_a; error2_P = (error2)*Kp; error2_old = error2+error2_old; error2_I = (Ki*error2_old); if (error2_I < 0) { error2_I = 0; } error2_I = error2_I>>10; error2_sum = error2_I+error2_P; if(error2_sum > 3960) error2_sum = 3960; if (error2_sum <0) error2_sum = 0; current_3 = ((AdcRegs.ADCRESULT5>>4) & 0x0FFF); current_3_a = current_3-2100; current3 = (int)((current3_old)+current_3_a)>>1; current3_old = current3; error3 = IRef-current_3_a; error3_P = (error3)*Kp; error3_old = error3+error3_old; error3_I = (Ki*error3_old);

129

if (error3_I < 0) { error3_I = 0; } error3_I = error3_I>>10; error3_sum = error3_I+error3_P; if(error3_sum > 3960) error3_sum = 3960; if (error3_sum <0) error3_sum = 0; PWM_generator(); speedcount++; } } } count1 +=180; if(count1 > 3960) { count1 = 1; } count2 +=180; if(count2 > 3960) { count2 = 1; } count3 +=180;

130

if(count3 > 3960) { count3 = 1; } EALLOW; GpioMuxRegs.GPBDIR.bit.GPIOB2 = 1; EDIS; GpioDataRegs.GPBDAT.bit.GPIOB2=0; Icharging = current_1_a+current_2_a+current_3_a; EvbRegs.EVBIFRA.bit.T3PINT = 0x0001; // clear interrupt flag PieCtrlRegs.PIEACK.all = PIEACK_GROUP4; // acknowledge this interrup } void adc_interrupt() { AdcRegs.ADCTRL2.bit.RST_SEQ1 = 1; //Reset of the sequencer start at CONV00 AdcRegs.ADCTRL2.bit.SOC_SEQ1 |= 1; // software Start-Of- Conversion while(AdcRegs.ADCST.bit.SEQ1_BSY == 1); // wait 'til the end of conversion } void PWM_generator() { if(Kp == 0) { error1_sum = 0; error2_sum = 0; error3_sum = 0;

131

} if((current1_old > 2000)) { EALLOW; GpioMuxRegs.GPADIR.bit.GPIOA0 = 1; EDIS; GpioDataRegs.GPADAT.bit.GPIOA0 = 0; } else { if(error1_sum > count1) { EALLOW; GpioMuxRegs.GPADIR.bit.GPIOA0 = 1; EDIS; GpioDataRegs.GPADAT.bit.GPIOA0= 1;

} else { EALLOW; GpioMuxRegs.GPADIR.bit.GPIOA0 = 1; EDIS; GpioDataRegs.GPADAT.bit.GPIOA0= 0; } } if((current2_old > 2000)) {

132

EALLOW; GpioMuxRegs.GPADIR.bit.GPIOA2 = 1; EDIS; GpioDataRegs.GPADAT.bit.GPIOA2 = 0; } else { if(error2_sum > (count2)) { EALLOW; GpioMuxRegs.GPADIR.bit.GPIOA2 = 1; EDIS; GpioDataRegs.GPADAT.bit.GPIOA2= 1; }

else

{ EALLOW; GpioMuxRegs.GPADIR.bit.GPIOA2 = 1; EDIS; GpioDataRegs.GPADAT.bit.GPIOA2= 0; }

}

if((current3_old > 2000)) {

133

EALLOW; GpioMuxRegs.GPADIR.bit.GPIOA4 = 1; EDIS; GpioDataRegs.GPADAT.bit.GPIOA4 = 0; }

else { if(error3_sum > (count3)) {

EALLOW; GpioMuxRegs.GPADIR.bit.GPIOA4 = 1; EDIS; GpioDataRegs.GPADAT.bit.GPIOA4= 1; }

else { EALLOW; GpioMuxRegs.GPADIR.bit.GPIOA4 = 1; EDIS; GpioDataRegs.GPADAT.bit.GPIOA4= 0; } EALLOW; GpioMuxRegs.GPBDIR.bit.GPIOB2 = 1; EDIS; GpioDataRegs.GPBDAT.bit.GPIOB1=0;

134

} } // INT 5.1 */ interrupt void T4PINT_ISR(void) // EV-B { /* Recieve Message */ IRef = ECanaMboxes.MBOX1.MDL.byte.BYTE0<<8; IRef = IRef+ECanaMboxes.MBOX1.MDL.byte.BYTE1; stop = (ECanaMboxes.MBOX1.MDL.byte.BYTE2 & 0x0001); if (IRef <0) IRef = 0; else if(IRef > 1200) IRef = 1200; ECanaMboxes.MBOX2.MDL.byte.BYTE0; ECanaShadow.CANRMP.bit.RMP1 = 1; ECanaRegs.CANRMP.all = ECanaShadow.CANRMP.all; // Clear RMP1 bit and start again ////////////////////////////////////////////////////////////////////////////////// /* Transmission Message */ ECanaMboxes.MBOX5.MDL.byte.BYTE0 = (Icharging & 0x00FF); ECanaMboxes.MBOX5.MDL.byte.BYTE1 = ((Icharging & 0xFF00)>>8); ECanaShadow.CANTRS.all = 0; ECanaShadow.CANTRS.bit.TRS5 = 1; // Set TRS for mailbox under test

ECanaRegs.CANTRS.all = ECanaShadow.CANTRS.all; while(ECanaRegs.CANTA.bit.TA5 == 0 ) {} // Wait for TA5 bit to be set.. //------// Clear the interruption of the timer 4

135

//------EvbRegs.EVBIFRB.bit.T4PINT = 0x0001; // clear interrupt flag PieCtrlRegs.PIEACK.all = PIEACK_GROUP5; // acknowledge this interrup } /* initialization code for the eZdsp */ interrupt void cpu_timer0_isr(void); void InitSystem(void); void interrupt_init_33us(); void interrupt_init_025us(); void Configure_Can(void); void clrwdg(long end); void adc_interrupt(); void delay (unsigned long int temps); void Gpio_select(void); void PWM_generator(void); interrupt void T4PINT_ISR(void); interrupt void T3PINT_ISR(void); void InitCan(); struct ECAN_REGS ECanaShadow; void clrwdg(long end) { long i; for (i = 0; i < end; i++);

EALLOW; SysCtrlRegs.WDKEY = 0x55; SysCtrlRegs.WDKEY = 0xAA;

136

EDIS;

}

void InitSystem(void) { // ************************* NO OPTIMIZATION NEEDED ***************************** EALLOW; SysCtrlRegs.WDCR= 0x00AF; // Setup the watchdog // 0x00E8 to disable the Watchdog , Prescaler = 1 // 0x00AF to NOT disable the Watchdog, Prescaler = 64 SysCtrlRegs.SCSR = 0; // Watchdog generates a RESET SysCtrlRegs.PLLCR.bit.DIV = 0xA; // Setup the Clock PLL to multiply by 5 SysCtrlRegs.HISPCP.all = 0x1; // Setup Highspeed Clock Prescaler to divide by 2

SysCtrlRegs.LOSPCP.all = 0x2; // Setup Lowspeed CLock Prescaler to divide by 4 // Peripheral clock enables set for the selected peripherals. SysCtrlRegs.PCLKCR.bit.EVAENCLK=1;

SysCtrlRegs.PCLKCR.bit.EVBENCLK=1; //// **** Change it to 1 SysCtrlRegs.PCLKCR.bit.SCIAENCLK=0; SysCtrlRegs.PCLKCR.bit.SCIBENCLK=0;

SysCtrlRegs.PCLKCR.bit.MCBSPENCLK=0; SysCtrlRegs.PCLKCR.bit.SPIENCLK=0; SysCtrlRegs.PCLKCR.bit.ECANENCLK=1; SysCtrlRegs.PCLKCR.bit.ADCENCLK=1;

137

EDIS; // ************************* NO OPTIMIZATION NEEDED **************************** } void interrupt_init_33us() { EALLOW; // Allow writing to configuration registers. */

EvbRegs.T4PR = 58593 ; /// FOR ADC FASTEST INTR main // 33us // Time = (HSP * TPS * TPR*2) / 150 Mhz */

EvbRegs.T4CON.all = 0x1046; //0x846; //0x0846;// 0000 1000 0100 0110 //Stop immediately on emulation suspend */ //Count mode selection continuous up/down count mode */ //input clock prescaler x/1 */ //use own TENABLE bit */ //Enable timer operations */ //clock source internal (ie., HSPCLK) */ //Timer compare register reload condition when counter value is 0 or = to */ // periode register value */ //Enable timer compare operation */ //Use own periode register */

EvbRegs.EVBIMRB.bit.T4PINT = 1; // enable interrupt on Timer 4 period*/ EvbRegs.T3PR = 19; //interrupt for the sawtooth waveform EvbRegs.T3CON.all = 0x1046; EvbRegs.EVBIMRA.bit.T3PINT = 1;

138

InitPieCtrl(); IER = 0x0000; IFR = 0x0000; InitPieVectTable(); PieCtrlRegs.PIEIER4.all = M_INT4; //Enable PIE group 5 interrupt 1 for T4PINT PieCtrlRegs.PIEIER5.all = M_INT1; //Enable PIE group 5 interrupt 1 for T4PINT IER |=(M_INT5+M_INT4); //Enable CPU INT5 for T4PINT EnableInterrupts(); EDIS; // Disallow writing to configuration registers. } void ADC_init() { EALLOW; // Allow writing to configuration registers. AdcRegs.ADCTRL3.bit.ADCBGRFDN = 0x3; // Power up bandgap/reference circuitry delay (32000); // Delay before powering up rest of ADC AdcRegs.ADCTRL3.bit.ADCPWDN = 1; // Power up rest of ADC delay (32000); // Delay after powering up ADC AdcRegs.ADCTRL1.bit.SEQ_CASC |= 1; // 0 not in cascaded mode AdcRegs.ADCTRL1.bit.ACQ_PS |= 0x8;

AdcRegs.ADCTRL1.bit.CPS |= 0; AdcRegs.ADCTRL1.bit.CONT_RUN |= 0; //0 // Setup continuous run :1 AdcRegs.ADCTRL1.bit.SEQ_OVRD |= 0; // Enable Sequencer override feature

139

AdcRegs.ADCTRL2.bit.EVA_SOC_SEQ1 |= 1; AdcRegs.ADCTRL3.bit.SMODE_SEL |= 1; AdcRegs.ADCTRL3.bit.ADCCLKPS |= 0xA; // ADC module clock = HSPCLK/2*ADC_CKPS = 25MHz/(1*2) = 12.5MHz AdcRegs.ADCMAXCONV.all |= 0x000F;//0x7;//0xB // convert and store in 12 results registers AdcRegs.ADCCHSELSEQ1.bit.CONV00 |= 0x0; //selects channel A0 B0;current measurement in phase A AdcRegs.ADCCHSELSEQ1.bit.CONV01 |= 0x1; //selects channel A1 B1;current measurement in phase B AdcRegs.ADCCHSELSEQ1.bit.CONV02 |= 0x2; //selects channel A2 B2;current measurement in phase C AdcRegs.ADCCHSELSEQ1.bit.CONV03 |= 0x3; //selects channel A3 B3;current measurement in phase A injection AdcRegs.ADCCHSELSEQ2.bit.CONV04 |= 0x4; //selects channel A4 B4;current measurement in phase B injection

AdcRegs.ADCCHSELSEQ2.bit.CONV05 |= 0x5; //selects channel A5 B5;current measurement in phase C injection AdcRegs.ADCCHSELSEQ2.bit.CONV06 |= 0x6; //selects channel A6 B6;measurement DC link voltage AdcRegs.ADCCHSELSEQ2.bit.CONV07 |= 0x7; //selects channel A7 B7;measurement Winding temperature EDIS; // Disallow writing to configuration registers. } void delay (unsigned long int temps) { unsigned long int i;

140

for (i = 0;i < temps;i++); } void Gpio_select(void) { EALLOW; GpioMuxRegs.GPAMUX.all = 0x0; // all GPIO port Pin's to I/O GpioMuxRegs.GPBMUX.all = 0x0; GpioMuxRegs.GPDMUX.all = 0x0; GpioMuxRegs.GPFMUX.all = 0x0; GpioMuxRegs.GPEMUX.all = 0x0; GpioMuxRegs.GPGMUX.all = 0x0; GpioMuxRegs.GPFMUX.bit.CANTXA_GPIOF6 = 1; // Enable CAN - lines GpioMuxRegs.GPFMUX.bit.CANRXA_GPIOF7 = 1; GpioMuxRegs.GPADIR.all = 0x0000; // GPIO PORT as input GpioMuxRegs.GPBDIR.all = 0x0000; // GPIO Port B15-B8 input , B7-B0 output GpioMuxRegs.GPDDIR.all = 0x0; // GPIO PORT as input GpioMuxRegs.GPEDIR.all = 0x0; // GPIO PORT as input GpioMuxRegs.GPFDIR.all = 0x0; // GPIO PORT as input GpioMuxRegs.GPGDIR.all = 0x0; // GPIO PORT as input GpioMuxRegs.GPAQUAL.all = 0x0; // Set GPIO input qualifier values to zero GpioMuxRegs.GPBQUAL.all = 0x0; GpioMuxRegs.GPDQUAL.all = 0x0; GpioMuxRegs.GPEQUAL.all = 0x0; EDIS; }

141

void InitCan(void) { EALLOW; /* Configure eCAN RX and TX pins for eCAN transmissions using eCAN regs*/ ECanaRegs.CANTIOC.bit.TXFUNC = 1; ECanaRegs.CANRIOC.bit.RXFUNC = 1;

/* Configure eCAN for HECC mode - (reqd to access mailboxes 16 thru 31) */

// HECC mode also enables time-stamping feature ECanaRegs.CANMC.bit.SCB = 1; /* Configure bit timing parameters */ ECanaRegs.CANMC.bit.CCR = 1 ; // Set CCR = 1 while(ECanaRegs.CANES.bit.CCE != 1 ) {} // Wait for CCE bit to be set.. ECanaRegs.CANBTC.bit.BRPREG = 99; ECanaRegs.CANBTC.bit.TSEG2REG = 2;

ECanaRegs.CANBTC.bit.TSEG1REG = 10; ECanaRegs.CANMC.bit.CCR = 0 ; // Set CCR = 0 while(ECanaRegs.CANES.bit.CCE == !0 ) {} // Wait for CCE bit to be cleared..

/* Disable all Mailboxes */ ECanaRegs.CANME.all = 0; // Required before writing the MSGIDs EDIS;

}

142