13
dSPACE User Conference 2012 India | Sept 14 th 2012 Development of Virtual Dynamometer using dSPACE Control desk Dipashri Vispute, Tejashree Saraf, Naveen Kumar, Nilesh Deshmukh Tata Consultancy Services ABSTRACT Model-based development is a standard industry practice for the development and testing of Engine Controller. Various plant models are commercially available to simulate different configurations of engines. The controller model can be developed and tested using these engine plant models in MIL (Model in loop) / HIL (Hardware in loop) platforms. TCS has been carrying out EMS development using engine simulation model and dSPACE mid size simulator hardware. A need was felt to quickly test the engine performance under simulated conditions. A virtual dynamometer is developed and added to setup to measure the engine performance. The dynamometer has modes like constant throttle/speed or constant torque/speed. It has the facility to automatically measure full throttle and part throttle performance. The system measures and displays all standard parameters like power, various temperatures, fuel consumption and emissions. The GUI is very similar to a standard engine dynamometer. This tool can be used to quickly measure the performance of engine or comparing different ECU calibrations or different ECU configurations. It will be very useful for engineers working on engine test bench to migrate to simulation platform. KEYWORDS: Virtual Dynamometer, MIL, HIL, PTP, FTP, Drive Cycle INTRODUCTION A dynamometer is a device for measuring engine/vehicle performance levels while running the engine/vehicle in a controlled environment. There are two types of dynamometers: Engine Dynamometer: For testing of only engine, Chassis Dynamometer: For testing of complete vehicle. Engine dynamometer is primarily used for measuring the power, fuel consumption and emissions of an engine. An Engine dynamometer simulates load /power experienced by the engine under various operating conditions on road like accelerations, decelerations, constant speed etc. Dynamometer along with throttle controller allows an engine to be run under programmable speed; load/throttle points while a variety of sensors monitor other engine information such as various temperatures, power, torque, air/fuel ratios, fuel consumption, etc. The engine dynamometer is also used for calibration of various ECU parameters. The Chassis Dynamometer or vehicle dynamometer is used for testing of vehicle for emissions and performance. The wheels of the vehicle are mounted on the rollers of Chassis dynamometer and vehicle is driven by a driver as driven on the road. The dynamometer controls the rollers so that the vehicle and engine experience similar operating conditions as on the road. Normally this testing is carried out under standardized speed time graphs called driving cycles. Typically both engine and chassis dynamometer testing is expensive and time consuming. Effort is made to simulate this testing under virtual scenario by simulating the dynamometer.

Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

  • Upload
    doannhi

  • View
    217

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

dSPACE User Conference 2012 – India | Sept 14th’ 2012

Development of Virtual Dynamometer using dSPACE Control desk Dipashri Vispute, Tejashree Saraf, Naveen Kumar, Nilesh Deshmukh

Tata Consultancy Services

ABSTRACT

Model-based development is a standard industry practice for the development and testing of Engine Controller.

Various plant models are commercially available to simulate different configurations of engines. The controller

model can be developed and tested using these engine plant models in MIL (Model in loop) / HIL (Hardware in

loop) platforms.

TCS has been carrying out EMS development using engine simulation model and dSPACE mid size simulator

hardware. A need was felt to quickly test the engine performance under simulated conditions.

A virtual dynamometer is developed and added to setup to measure the engine performance. The

dynamometer has modes like constant throttle/speed or constant torque/speed. It has the facility to

automatically measure full throttle and part throttle performance. The system measures and displays all

standard parameters like power, various temperatures, fuel consumption and emissions. The GUI is very

similar to a standard engine dynamometer. This tool can be used to quickly measure the performance of

engine or comparing different ECU calibrations or different ECU configurations. It will be very useful for

engineers working on engine test bench to migrate to simulation platform.

KEYWORDS: Virtual Dynamometer, MIL, HIL, PTP, FTP, Drive Cycle

INTRODUCTION

A dynamometer is a device for measuring engine/vehicle performance levels while running the engine/vehicle in a controlled environment. There are two types of dynamometers:

Engine Dynamometer: For testing of only engine,

Chassis Dynamometer: For testing of complete vehicle. Engine dynamometer is primarily used for measuring the power, fuel consumption and emissions of an engine. An Engine dynamometer simulates load /power experienced by the engine under various operating conditions on road like accelerations, decelerations, constant speed etc. Dynamometer along with throttle controller allows an engine to be run under programmable speed; load/throttle points while a variety of sensors monitor other engine information such as various temperatures, power, torque, air/fuel ratios, fuel consumption, etc. The engine dynamometer is also used for calibration of various ECU parameters. The Chassis Dynamometer or vehicle dynamometer is used for testing of vehicle for emissions and performance. The wheels of the vehicle are mounted on the rollers of Chassis dynamometer and vehicle is driven by a driver as driven on the road. The dynamometer controls the rollers so that the vehicle and engine experience similar operating conditions as on the road. Normally this testing is carried out under standardized speed time graphs called driving cycles. Typically both engine and chassis dynamometer testing is expensive and time consuming. Effort is made to simulate this testing under virtual scenario by simulating the dynamometer.

Page 2: Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

dSPACE User Conference 2012 – India | Sept 14th’ 2012

MAIN SECTION

1. SYSTEM OVERVIEW

The block diagram of Virtual Dynamometer is shown below:

Figure 1: Block Diagram of Virtual Dynamometer

In this system, a MATLAB Simulink Model is used to act as a Virtual Dynamometer which includes a throttle controller. The GUI is developed using dSPACE Control desk tool. This GUI facilitates to establish and control connectivity between an Engine Plant model (by a third party Vendor) and Virtual Dynamometer.

2. FEATURES

1. The Control Desk interface allows design parameters to be modified, with new results instantly displayed in an easy to understand graphical layout.

2. This model has the capability of predicting both cycle-resolved and integrated performance parameters such as torque, power, emissions, various temperatures and pressure values, velocity, etc.

3. Uses closed loop system for Auto Mode features. 4. The graphical presentation of torque and power as a function of engine speed. 5. Settable operating conditions like ambient temperature and ambient pressure. 6. Reads and displays Parameter Values for:

Engine Power

Engine/vehicle Speed

Throttle Angle

Engine

Plant Model

with ECU GUI Virtual

Dynamometer

VIRTUAL DYNAMOMETER APPLICATION

MIL

Systems Created by TCS Engineers

System purchased from a third party Vendor

Page 3: Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

dSPACE User Conference 2012 – India | Sept 14th’ 2012

Engine/vehicle Torque

Various Temperature Values: o Ambient Temp o Coolant Temp o Oil Temp o Exhaust Temp

Various Pressure Values: o Ambient Pressure o Manifold Pressure o Fuel Pressure o Exhaust Pressure

Fuel Consumption

Oil Consumption

Specific Fuel Consumption.

Vehicle Lambda

Exhaust Gases: CO, CO2, HC, NOx

ECU Parameters like o Ignition Timing o Injection Timing o Injection PW o Air Mass Flow

3. FUNCTIONAL DESCRIPTION The Virtual Dynamometer supports two functionalities: Engine Dynamometer and Chassis Dynamometer.

3.1 Engine_Dynamometer

It constitutes Manual Mode and Auto Mode of operations. 3.1.1 Manual_Mode_of_Operation

In Manual Mode, the system has two sub-modes of operation.

Throttle Controlled

Torque Controlled

3.1.1.1. Throttle Controlled: In this mode engine speed and throttle are kept constant as per value

specified by the user. The dynamometer adjusts the torque accordingly. 3.1.1.2. Torque Controlled: In this mode engine speed and torque are kept constant as per value

specified by the user. The dynamometer adjusts the throttle accordingly.

Figure 2, shows operation of throttle and torque controlled operation. The control switch enables one of the two systems. For example, as shown in the figure, if the Throttle controlled system is enabled, then Throttle and RPM inputs are accepted as they are set by the user, and accordingly Torque value is calculated/controlled using a PID controller. Else, if the Torque controlled system is enabled, then Torque and RPM inputs are accepted as they are set by the user, and accordingly gas pedal position, in turn Throttle value is calculated using a PI controller.

Page 4: Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

dSPACE User Conference 2012 – India | Sept 14th’ 2012

Figure 2. Throttle and Torque Controlled operation

3.1.2 Auto_Mode_of_Operation

3.1.2.1. Full Throttle Performance (FTP): In this test, the engine runs at full throttle condition, and the

dynamometer is operated in Throttle Controlled mode. The engine runs initially at idle speed value. Then, throttle is taken to 100% position. Engine speed, dynamometer torque and other required parameters are measured, and the speed set point is then increased by 1000 rpm. The engine is allowed to stabilize at every point and then measurements are carried out. This is repeated up to the maximum desired speed. The graphs of measured torque, power and SFC as a function of engine speed are provided to the user. It is possible to set required operating conditions like ambient temperature and ambient pressure. (Figure 15)

3.1.2.2. Part Throttle Performance (PTP): In this test, the engine runs at Partial throttle position, and

the dynamometer is operated in Throttle Controlled mode - ranging from idle speed value to maximum desired speed. First the throttle is adjusted to 20%, and torque, power outputs and other measurements are carried out for the required speed range. The same operation is repeated for different throttle positions, Viz, 40%, 60%, 80% and 100%. The graphs of measured torque, power and SFC as a function of engine speed under various throttle positions are provided to the user. (Figure 16)

Page 5: Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

dSPACE User Conference 2012 – India | Sept 14th’ 2012 3.2 Chassis_Dynamometer

Chassis dynamometer is used to test a vehicle in a simulated drive cycle. The dynamometer is programmed so that vehicle experiences similar conditions as on the road. The simulated driver operates the vehicle controls like acceleration pedal, clutch, brake pedal etc as per selected driving cycle. Various parameters like fuel consumption and power can also be plotted as required by the user. The status indicators turn yellow while drive cycle is running, and become green after successful completion of the drive cycle. The Status turns red if there is any error encountered while drive cycle is running. The total emissions during the drive cycle run are measured and displayed. The drive cycle simulation can be run at a faster pace utilizing the simulation-time-control feature. The standard cycles provided are mentioned below. 3.2.1. ECE

The ECE cycle is a European City Cycle, also known as UDC (urban driving cycle). It was devised to represent city driving conditions, example: Paris or Rome. (Figure 17)

3.2.2. EUDC

The Extra Urban Driving Cycle describes a suburban route. At the end of the cycle the vehicle accelerates to highway-speed. (Figure 18)

3.2.3. JAPAN 10-15

This is a combination of five cycles. First the 15-Mode, then three times 10-Mode and finally the 15 Mode. It is used in Japan for light duty vehicles. Emissions are measured over the last four segments. (Figure 19)

3.2.4. MVEG

It is an abbreviation of Motor Vehicle Emissions Group. In this the ECE+EUDC test cycle is performed on a chassis dynamometer. It is used for emission certification of light duty vehicles in Europe. The entire cycle includes four ECE segments, repeated without interruption, followed by one EUDC segment. (Figure 20)

3.2.5. FTP-75

The Federal Test Procedure 75 cycle has been used for emission certification of light duty vehicles in the U.S. (Figure 21)

3.2.6. Modified Indian Driving Cycle

From the year 2000, India has adopted modified Indian Driving Cycle for cars. It is same as ‘MVEG’, i.e. ECE-15 +EUDC, except maximum speed reduced to 90 km/hr. (Figure 22)

3.2.7. User Defined Cycle

In addition to the standard cycles, we have also added User_Defined_Cycle, which can be configured for acceleration, deceleration points and velocity with the help of dSPACE Control Desk, and we can test the engine performance for any new cycle.

Page 6: Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

dSPACE User Conference 2012 – India | Sept 14th’ 2012

4. IMPLEMENTATION

Dynamometer need was aroused to check the Engine performance/behavior while testing different ECU models. Initially a simple Manual mode Dynamometer was implemented. As per the need, enhancement underwent to watch additional Engine parameters during system MIL testing, by adding required parameters in the Watch window. Calculated signals, e.g. SFC (Specific Fuel Consumption) have been added through logic implemented using the MATLAB Simulink. Once the Manual Control was designed completely, it was thought that a Virtual Dynamometer complete application should be developed for all our future needs in checking Engine performance in a simulation mode. Likewise, a complete Virtual Dynamometer application has been developed which can be clearly divided into following two parts.

Dynamometer Controller

Graphic User Interface.

4.1. Dynamometer Controller: The Controller Part is implemented using MATLAB Simulink. The Dynamometer Controller sits in the I/O block of the Engine Model. It is divided in two subsystems; “Engine Dynamometer” and “Chassis Dynamometer”, as shown in the figure 3. Figure 4, explains next level of functional hierarchy of the main subsystems in the Simulink model. The “Arbitration” subsystem takes care of arbitration of Throttle, Torque and RPM values in respective subsystems, viz. “Throttle controller”, “Torque controller”, and “RPM controller”.

Figure 3: Virtual Dynamometer Simulink Model: First Level Subsystem screenshot

Page 7: Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

dSPACE User Conference 2012 – India | Sept 14th’ 2012

Figure 4: Virtual Dynamometer Simulink Model: Subsystem Hierarchies

4.2. Dynamometer GUI: dSPACE Control Desk Tool was the best option to develop a Graphic User Interface for Virtual dynamometer. It helps while working in MIL or HIL mode of testing as the midsize Simulator from dSPACE was used in HIL setup. Also, it facilitates Simulink variables’ control through Python Scripts. Different switches/displays are designed as per the need of the application. Initialization required for Manual Mode and Auto Mode, parameter setting for different Auto modes (FTP, PTP and Drive Cycle) is implemented in Python script events. Python script is also used for switching between different layouts for different functionalities. In GUI, graphs for Power Vs RPM, Torque Vs RPM, and Fuel Consumption Vs RPM can be observed. The GUI also provides facility to configure and see any parameter’s performance against time or any other parameter.

Figure 5: Screenshot of Main Page of Virtual dynamometer GUI

Page 8: Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

dSPACE User Conference 2012 – India | Sept 14th’ 2012

Figure 6: Screenshot of Manual Mode dynamometer GUI

Figure 7: Screenshot of Auto Mode dynamometer GUI

Page 9: Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

dSPACE User Conference 2012 – India | Sept 14th’ 2012

Figure 8: Screenshot of Chassis dynamometer GUI

Figure 9: Sample screenshot of Python script

Page 10: Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

dSPACE User Conference 2012 – India | Sept 14th’ 2012

5. CHALLENGES FACED 1. Time Synchronization Issue:

A control desk error, “Failed to completely update data for connected variable”, encountered while writing

the Simulink variables through a Python script repetitively (figure 10). The reason for the same was

probably due to the time synchronization issue between the engine plant model and the python script. To

resolve this problem most of the ‘Virtual Dynamometer’ logic is shifted to Simulink model and integrated

with the plant model. This issue is still under discussion with dSPACE.

Figure 10: Screenshot of Control Desk Error

2. Sampling Time Issue:

The plant model used supports 0.001s to 0.05s sampling time. If sample time is small (e.g. 0.001s) the

model provides the best possible accuracy but it requires a lot of time to simulate the driving cycles. If

sampling time is increased (e.g. 0.05s), then it takes very less time to complete the simulation but its

behavior gets affected, (e.g. in manual, when intended value of the torque is 100 units in a torque

controlled mode, output torque doesn’t converge at the intended torque) (figure 11). Simulation time was

optimized to get good dynamic torque response. It has been found that 0.02s sampling time gives the

optimum performance (figure 12).

Figure 11: Sampling time is 0.05s Figure 12: Sampling time is 0.02s

Page 11: Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

dSPACE User Conference 2012 – India | Sept 14th’ 2012 3. Simulated Driver’s Behavior:

Simulated driver consists of a velocity controller which controls actuation of the accelerator, the brake and

the clutch pedals. When velocity controller was adjusted to follow the driving cycle within very close

tolerance, it was found that the changes in the accelerator pedal were at much higher speed than a human

driver (figure 13). To make this driver close to human driver, P and I parameters of velocity controller are

adjusted to make the acceleration pedal position as close to real as possible and vehicle velocity is still

maintained as per the requirement (figure 14).

Figure 13: Before adjusting P & I Figure 14: After adjusting P & I

6. RESULTS 1. Following snapshots are for FTP and PTP, wherein Engine Speed Vs Engine Power performance is captured.

Figure 15: Screenshot of FTP graph Figure 16: Screenshot of PTP graph

2. Following snapshots are for different drive cycles, wherein vehicle speed variation is captured against time.

Page 12: Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

dSPACE User Conference 2012 – India | Sept 14th’ 2012

Figure 17: ECE graph Figure 18: EUDC graph Figure 19: JAPAN 10-15 graph

Figure 20: MVEG graph Figure 21: FTP-75 graph Figure 22: MIDC graph

CONCLUSION

Virtual Dynamometer is an application designed to simulate engine and chassis dynamometer. It can be used to quickly measure the engine and vehicle performance under standard/user programmable operating conditions. Virtual Dynamometer allows checking of engine behavior and performance in minutes using a user friendly GUI which otherwise will take hours on expensive engine /vehicle test cells. The displays and graphs show the standard measured parameters. As the engine and ECU are Simulink models, any parameter which is not easily available in Test cell like engine combustion torque and combustion temperature can also be displayed.

This tool can be used to evaluate an Engine controller or compare the performance of different controllers. It can also be used to check the calibration of ECU.

The GUI can be very similar to standard Engine /Chassis Dyno test cell ,which allows the engineers working on test cell and not familiar with the MIL/HIL set up can still use the system and evaluate the performance..

Page 13: Development of Virtual Dynamometer using dSPACE Control … of Virtual Dynamometer u… · Development of Virtual Dynamometer using dSPACE ... The Chassis Dynamometer or vehicle

dSPACE User Conference 2012 – India | Sept 14th’ 2012

ACKNOWLEDGMENTS

The authors would like to acknowledge and thank Mrs. Madhuri Marathe who is a domain consultant in the Powertrain area. The authors would also like to extend thanks to Automotive Embedded Group Head, Mr. Sanjeev Madhav and Program Manager Mr. Ramanathan Annamalai for their support and quality inputs.

REFERENCES

1. http://www.mathworks.com 2. http://www.dSPACE.com 3. http://www.tesis.com 4. http://www.dieselnet.com 5. https://www.araiindia.com 6. http://cpcb.nic.in/Industry-Specific-Standards/Emission/MotorVehicles.pdf

DEFINITIONS, ACRONYMS, ABBREVIATIONS

TCS: Tata Consultancy services HIL: Hardware-In-the-Loop is a technique for combining a mathematical simulation model of a system with actual physical hardware, such that the hardware performs as though it were integrated into the real system. i.e. the software runs on the final ECU, and the environment around the ECU is still a simulated one. MIL: Model-in-the-Loop is a testing technique in which the model and its environment are simulated in the

modeling framework without any physical hardware components. This allows testing at early stages of the

development cycle.

EMS: Engine Management System

SFC: Specific Fuel Consumption