Model Based Calibration of ECUs Using a Highly Dynamic HiL Test
Bench System
Dietmar Winkler, Clemens Gühmann, Berthold Barzantny, Michael Lindemann
Abstract
In cooperation with MTS® and IAV GmbH a highly dynamic test stand is being devel-oped. The test stand consists of the equipment for controlling the combustion engine, a dynamic electric dynamometer and measuring devices for exhaust-gas emissions, fuel consumption, etc. Furthermore, a real-time simulation system is connected to the test bench, which simulates the transmission and vehicle. The Transmission Control Unit (TCU) including all the auxiliary communications to the Engine Control Unit (ECU) can either be simulated or connected to the test stand as a real part. In combination with the closed-loop control of the whole test stand system in real-time it is possible to optimise a TCU or/and ECU for different driving scenarios. Both the vehicle and the transmission are being simulated in real-time. This gives the ad-vantage to test different types of transmissions and vehicles simply by changing the models or the simulation parameters. The closed-loop control approach also makes it possible to run fully automated calibration processes (e.g. DoE optimised processes). The paper will give an overview of the setup of the HiL test stand system, the models used for the real-time simulation based on MATLAB®/Simulink®. Moreover, the
results of a small test simulation are shown.
1. Preface
Current engine and transmission developments are shaped by demanding goals regarding low exhaust-gas emissions (legislator), small consumption (legislator and customer) and the rising requirements for comfort (customer). All of this leads to a constantly rising complexity of the used technology.
One example is the current discussion about the advancement of the Diesel and petrol engines to a common concept, which unites the complexity of both procedures in itself. These future fuel combustion processes have specified the compression ignition as a common characteristic, e.g. the HCCI procedure (Homogeneous-Charge-Compression-Ignition). In this way, extremely low exhaust-gas emissions (before the catalytic converter) are made possible. However, all conceivable variabilities for an engine are needed including the variable compression. According to today's estimations, this means that up to 20 freely selectable parameters are needed for the calibration and optimisation of the engine regarding its power ratings, exhaust-gas emissions and its fuel consumption.
The optimal consumption and emission values as well as the greater demands for comfort of a motor vehicle can be reached only if the entire drive train, consisting of engine, clutch, transmission and vehicle dynamics are calibrated together with the controllers. In the calibration of the controllers of the drive train the dynamical load and speed behaviour also has to be considered.
Take as an example the interaction of the engine ECU with the transmission ECU (torque interface) in a drive train with an automated gear box during gear change. A poorly co-ordinated interface of both controllers leads inevitably to comfort losses or increased consumption.
Future developments in the field of the alternative drives require the inclusion of electrical machines and additional energy stores as one example, which makes the definition and interpretation of the vehicle concept as well as the development, optimisation and calibration of new vehicle operating strategies necessary.
In order to reduce the complexity of the software and function development as well as the complexity of the controller calibration, it is necessary to consider the overall system starting from early development phases on. Therefore, both, simulations in the field of controller development and the calibration process ever more gain significance today [1].
Depending on the development step, the different kinds of simulations, e.g. Model-in-the-Loop (MiL), Software-in-Model-in-the-Loop (SiL), Rapid-Prototyping, Hardware-in-Model-in-the-Loop (HiL) for testing ECUs and HiL-Simulation at the test stand [2], are applied.
With the engine and transmission calibration as well as with the development of hybrid vehicle concepts on highly dynamic test stands, the dynamometer is controlled in such a manner that the behaviour of the drive train can be copied.
To achieve this, in particular the clutch, the transmission, the differential gear, the traction resistance, the electrical components and the driver have to be simulated with a very high degree of accuracy in real-time.
The behaviour of a drive train can be substituted by a computer simulation model at the test stand, which makes changes very simple. However, the necessary optimisations of the components and the controller calibrations are still missing. Due to the high number of parameters, the usage of simulation models cannot sufficiently reduce the complexity. Instead, modern, i.e. model-supported, methods are required. For example, the DoE methodology can be applied. Using this method, the number of required measurements can be reduced considerably due to optimized test plans. Moreover, DoE allows the integration in an automated process.
The used highly dynamic engine test stand is suitable to be used for the transmission and engine calibrations as well as for simulations of different hybrid vehicle concepts. The emphasis is on the conception of automation, the real-time simulation models and the control strategies.
2. Test bench set up
For this project, a highly dynamic engine test bench system of MTS® is used. The combustion engine is directly coupled with the dynamometer (see Fig. 1), which is controlled by a power converter (i.e. Drive). The test bench control system is responsible for the control of all parts of the test bench. Signals are exchanged between the Control System and the Drive (Dynamometer Control), as well as between the Dynamometer (e.g. speed and torque signals) and the engine (Pedal Value Source – PVS) via physical input/output cards (e.g. A/D and D/A cards). The whole communication and the data acquisition take place in real-time.
Due to the direct coupling of the dynamometer and the combustion engine, the clutch and the transmission have to be modelled in addition to the remainder of the vehicle’s drive train (e.g. train resistance and so forth). For this purpose, a HiL Simulator is used consisting of standard PC hardware running the real-time operating system QNX® [3]. The HiL Simulator and the Control System communicate via a
high-speed Gigabit Ethernet connection (UDP/IP). This solution represents a cost-effective alternative to a “Shared Memory” solution. However, in case of high latencies of the UPD/IP connection, the usage of shared memory is still a fallback option. Drive Data acquisition Physical I/O Virtual I/O Schedule Control lo ops & Limits Model of vehicle HiL Simulator PC Workstation
Control System
TCP/IP Dynamometer Control Speed Torque PVS Dynamometer EngineFigure 1: Diagram of the engine test bench system
The real-time models of the drive train are developed on a standard PC workstation with a tool called VeLoDyn. This tool has been developed by the IAV GmbH and is based on the MATLAB®/Simulink® environment. By using the RT-LAB software of
Opal-RT® [4] the VeLoDyn models are prepared for real-time simulation and then transferred to the HiL-Simulator via a TCP/IP network. Once the transmission has been completed, the C-code of the models will be compiled and executed. With RT-LAB it is possible to monitor the HiL-Simulator via network and even transfer new set points dynamically. RT-LAB provides a variety of scripting language interfaces, such as MATLAB® or Python, for example. Data can be displayed either directly in a
Simulink®-Scope or in a display created with LabVIEW® [5].
One major advantage of the HiL-Simulator connected via network is also the possibility of remote control and remote access of measuring data (e.g. via (S)FTP).
3. Test stand automation and DoE
The design of a Hardware-in-the-Loop simulation system at a highly dynamic engine test stand requires both, an easy-to-accomplish switching between different hardware configurations and the highest possible degree of automation. Thus, the way of proceeding at the test stand being developed could be the following in principal: The test engineer initially chooses the hardware components as well as the components, which can be simulated. Generally, all the parts together are used to represent the behaviour of the entire vehicle. In most cases, the engine will be found among the hardware components, which however is not necessary.
An important parameter during vehicle simulation is the driving cycle, which is used as set point curve for the virtual driver. In particular, this parameter is crucial to achieve a high degree of test stand automation. In this regard, one distinguishes between virtual drivers with a different intelligence. Thus, simple drivers are used in vehicle models, which are equipped with an automatic transmission. Generally, these drivers get a velocity profile as input. In contrast to that, vehicle models equipped with a manual gearbox require drivers with higher intelligence. Furthermore, the required ability of the drivers depends on the used driving cycle.
To ensure a safe operation of the engine during the entire simulation the determination of the engine limits is obligatory for all operating states. The necessary measurements are automatically carried out by the test stand system (ADAPT® by MTS®). The automated test can be driven after further measuring equipment for data
acquisition has been installed and the driving cycle has been loaded into the system. To realise the above-mentioned objective, a fully automated test bench system including several interfaces between all communication partners has to be provided. In particular, the integration of a real-time operating system that runs on a separate computer requires state-of-the-art transmission technology. The configuration described in the previous sections means an enormous improvement in the calibration process of modern engines and furthermore can effectively be used with the DoE methodology [6]. The DoE method allows a considerable reduction of the measurement expenditure in conjunction with a remaining or improved quality of the created models. Figure 2 shows the so called Z-process of the method.
Definition of factors
and
response s Experimental design
Measurements on the test bench
Modeling Filling tables and
fitting models of ECU
Optimization & evaluation of DoE-models
Figure 2: Z-process of the DoE methodology
After the variation parameters and the target values have been defined, a test plan is created for all input parameters. Then, the measurements according to this plan are carried out statically or dynamically. This is done on the above described test bench within the context of a HiL simulation. The determination of the engine operating limits mentioned above is achieved by using the IAV-own test stand automation software MPI2. The acquired data are then used to fit static or dynamic models which
are subsequently applied to analyse the influence of the input parameters. For example, the influence of certain design variations of several components might be investigated [7].
Furthermore, an optimisation according to a specified target setting can be carried out. The last step in Figure 2 comprises the export of a characteristic map created on the basis of the fitted models. This map may then be used for engine calibration. In general, the following improvements can be stated for the calibration process, when the DoE methodology is applied in conjunction with the HiL approach:
• Reduction of the necessary testing volume by DoE and an offline calibration.
• Increase of the usable test stand operation time through automation
• Transfer of the calibration in the vehicle to the engine test stand
• Simulation of the NEDC on the engine test stand
• Consideration of the real vehicle behaviour at the engine test stand including shifting points, inertias, cold phases and exhaust-gas treatment
• Reliable estimation of the emission potential in an early development state
4. Control strategies
To run a HiL simulation on a highly dynamic test bench a sophisticated control circuit design is necessary to integrate the real-time model of the vehicle into the loop. Besides the test bench computer, the HiL real-time simulator running the virtual vehicle components is also involved in the control process. In general, a virtual driver is part of the vehicle model (see section 3). In this case the tested hardware component running in the loop is the combustion engine, which is coupled directly with an electrical asynchronous machine, i.e. the dynamometer (ASM).
Regarding the design of the control circuit two control strategies are possible each defining different set point values. Both strategies (i.e. M-α and n-α control)1 are represented schematically in Figure 3 and 4 respectively.
TL
Ti
Car
Model
ASM
Engine
α
shaft +–
Tacc Tmeas nmeas (load demand)Figure 3: M-α control strategy (TL: engine load; Ti: internal torque; Tacc: acceleration torque; Tmeas: measured torque; nmeas: measured engine speed;α: position of the accelerator pedal)
n Car
Model ASM Engine
α shaft
Tmeas
(speed demand)
nmeas
Figure 4: n-α control strategy (n: engine speed; Tmeas: measured engine torque, nmeas: measured
engine speed; α: position of the accelerator pedal)
In case of the M-α control strategy, the vehicle model calculates the actual engine load, which in reality consists of the road resistance, frictional coefficients and inertias of different vehicle components. This calculated load is sent to the dynamometer, which adjusts it by means of an internal controller.
In contrast to that, the n-α control strategy applies the engine speed instead of the engine load as set point for the dynamometer. In both cases, the position of the acceleration pedal, interpreted as the command of the virtual driver, is also transferred as set point. As feedback value, both control strategies use the actual torque, which is measured at the shaft connecting the dynamometer and the engine. In the dynamic case, this torque includes an acceleration torque. The difference between the actual internal torque of the dynamometer and the measured torque at the shaft is applied to calculate this acceleration torque, which is then fed back into the vehicle model.
The depicted control circuits can be interpreted as cascaded circuits, which have the vehicle model as outer loop and the ASM controller (engine speed or load) as well as the acceleration pedal as inner loops. Since the inner circuits in both strategies consist of a mechanical system, the control speed of the outer loop, which usually has to react slower, can be in a moderate range. In order to ensure the best possible response time of all mechanical components the application of sophisticated test stand technology is recommended.
5. Real-time simulation models
For the simulation of the drive train very detailed simulation models are needed to represent the dynamic behaviour of the rotational speed and the produced torque. These models should be suitable for real-time and it should be possible to compile them for different hardware targets. The drive train consists of the engine, clutch and transmission modules. The output torque of the transmission module is supplied to the vehicle module, which generates the appropriate driving loads. Figure 5 shows the coupling of drive train modules as it is realised within the simulation environment VeLoDyn.
Engine
Clutch
T n T n T nTrans-mission
Figure 5: Speed and torque coupling for a modularised system As one can see, the rotational speed and torque coupling is used, whereby the torque balance is distributed over the individual blocks. The load torque of the
individual components gradually reduces the torque coming from the engine. Finally, this leads to a load torque TL which is composed of the acceleration torque Jv⋅dωv/dt
of the vehicle, the braking torque TB, the friction torque TF and the driving resistance
torque TD: D F B v v L T T T dt d J T = ⋅ ω + + + (1)
When integrating the simulation model in the test bench environment, the model structure shown above is only suitable for the n-α control. For the M-α control the model must supply on the one hand the PVS α and on the other hand, the load torque affecting the engine, which is supplied to the dynamometer.
Clutch open/slipping Gear neutral Inertia Friction Driving res. Air resistance Slope + + TL Vehicle Clutch closed
Figure 6: Computation of the engine load torque depending on the shift state of the drive train in principle
The load torque is hereby determined along the drive train depending on the current condition of the drive train (see. Fig. 6). The top position of the switch corresponds to a open state of the clutch. Thus, the engine is affected only by the load, which results of the open and/or slipping clutch. If the clutch is closed but no gear is engaged, (i.e. switch in the middle position) the load torque results from the acceleration torque of both, the clutch and the transmission inlet. When a gear is engaged and the clutch is closed the load torque is additionally affected by the driving resistances. In the following, the conditions and load torques are investigated in more detail.
a) Clutch open/slipping
If the clutch is in the open and/or slipping state, then only the acceleration torque of the clutch inlet and the clutch pedal position dependent friction torque affects the engine as load: ). ( , F Clutch Eng In Clutch L dt T PVS d J T = ⋅ ω + (2)
b) Clutch closed and neutral gear position
If the clutch is closed, then the acceleration torque of the whole clutch including the transmission inlet affects the engine as load:
(
, ,)
. dt d J J T Eng In Gear total Clutch L ω ⋅ + = (3)c) Clutch closed and gear engaged
If the clutch closes and a gear is engaged, then the whole drive train with all driving resistances affects the engine as load. The calculation of the load torque results from acceleration torque of the clutch and of all transmission and vehicle parts.
If one simulates the transmission as a simple ratio “i” with appropriate inertias in the inlet and outlet side in conjunction with the switching losses in the form of torque-dependent efficiencies η(T), then the output torque of the gearbox is given by:
( )
( )
(
, ,)
, , . , , , , Out Gear acc In Gear acc In Out Gear Out Out Gear In In Gear In Out Gear T i T T T T dt d J i dt d J T T T − ⋅ − ⋅ = ⇔ ⋅ − ⋅ ⎟ ⎠ ⎞ ⎜ ⎝ ⎛ ⋅ − ⋅ = η ω ω η (4)Where Tacc represents the acceleration torque. In connection with the vehicle, the
following torque balance can be stated: . 0 ,Out − Veh = Gear T T (5)
From (4) and (5) the load torque of the transmission and the vehicle affecting the engine results to:
( )
,( )
, ,( )
. , i T T i T T T TT accGearIn accGearOut Veh
L = η + η ⋅ +η ⋅ (6)
From (6) we see that the calculation of the load torque can either be done in the vehicle module, using parameters of the transmission like gear ratios or efficiencies, or in the transmission module by feeding back the driving resistances and thus calculating the entire loss torque here.
In this case, the loss torque is computed “forward”. Starting from the clutch, the loss torque is calculated depending on the current state of the drive train. If the clutch is closed, an “active flag” is set, which is passed on including the resulting loss torque in the clutch to the transmission. If a gear is engaged, the “active flag” keeps it condition and loss portions of the transmission are added. Subsequently, the driving resistances are added to the loss torque if the “active flag” is set. The resulting load torque is then fed back and can be used to control the dynamometer.
6. HiL simulation
With the real-time simulation models adjusted for the test bench, the HiL simulation can be set up. In Fig. 7 one can see the set up in principal. The dynamometer control gets a torque demand TL as set point. The directly coupled engine produces a
propulsion torque Tprop(α) in turn. The measured propulsion torque is then fed back
Clutch
Tprop Tload T (T) T (T)α
n nEngine
ASMTrans-mission
Figure 7: Set up of the HiL simulation in principal
To test the functionality of the UDP communication, a test run of the HiL simulation has been carried out. For this purpose, the HiL simulator was communicating via the real UPD link with another PC running an engine simulator. In this test, the communication speed was reduced to 10 Hz. A small excerpt from the New European Driving Cycle (NEDC) is depicted in Figure 8.
124 126 128 130 132 134 136 138 140
1000 1500
2000 Engine Speed [rpm] via UDP@10Hz
124 126 128 130 132 134 136 138 140 −100 0 100 200 300
Engine Torque [Nm] via UDP@10Hz
124 126 128 130 132 134 136 138 140
0 1
time [sec] Clutch State; 0=open, 1=closed
124 126 128 130 132 134 136 138 140 10 20 30 40 50 Vehicle Speed [km/h]
Figure 8: Excerpt from test simulation of the NEDC
In the upper diagram of Fig. 8 the rotational speed of the engine is shown, whereas the second upper diagram displays the engine speed transmitted via UDP. It follows the produced engine torque in the third diagram (also transferred via UDP) and the clutch signal in the bottom diagram. In the depicted excerpt, the vehicle is accelerated and the gear is shifted up twice. During shifting, the clutch opens and the engine decelerates, the gear is changed and the clutch closes again, causing the vehicle to accelerate again. Although the communication speed was set very low for this test, the simulation was running stable. For the final setup with the test bench system the communication speed will be raised by a factor of 10 to 100 giving a great increase in the dynamic ability of the HiL simulation.
7. Conclusions and outlook
In this paper, a real-time simulation model necessary for a Hardware-in-the-Loop-Simulation on a highly dynamic test bench system was presented. The real-time model consists of models of the clutch, the transmission, the vehicle environment as well as the driver. It was shown that the control strategy for the test stand (i.e. M-α
and n-α) has an important influence on the simulation model. The presented change-over approach with an “active flag” makes it possible to switch dynamically between the two different control strategies. As an example, the results of a short test run of the M-α control were given. The highly dynamic test bench can be operated fully automated via the appropriate interfaces, while all electronic control units can be integrated as genuine parts. This shortens the calibration process enormously. On the other hand, sophisticated methods, e.g. Design of Experiments can be applied effectively in this process.
In the future, engine and transmission ECUs can be calibrated for stationary and dynamical operations with the help of the highly dynamic test stand. One important objective is the investigation of the different control strategies, i.e. M-α and n-α. By using the highly dynamic test bench system in conjunction with the HiL simulation, hybrid vehicle concepts can be tested and optimised with a special emphasis on fuel efficiency and exhaust-gas emissions.
Bibliography
[1] Gühmann, C.: Einsatz der Simulation in der Applikation und im automatisierten Test von Getriebesteuerungen. IIR-Tagung Getriebeelektronik, 24./25. Juni 2003
[2] Hagemann, G.; Heins; H.; Kirchner, A.-R; Ladentin, T.; Noodt, M.; Schuck, N.: Universelle Prüfumgebung für die Untersuchung des Antriebsstrangs. ATZ 2, 2003
[3] Link: http://www.qnx.com
[4] Link: http://www.opal-rt.com
[5] Link: http://www.ni.com/labview
[6] Röpke, K.; Gaitzsch, R.; Haukap; C.; Knaak, M.; Knobel, C.; Neßler, A.;
Schaum, S.; Schoop, U.; Tahl, S.: DoE – Design of Experiments. Methods and Application in Engine Development, Verlag Moderne Industrie, 2005
[7] Neßler, A.; Schoop, U.;Röpke, K.: Dynamische Messdatenerfassung und Modellbildung für Abgasemissionen am Dieselmotor. HdT-Tagung
Authors:
Dipl.-Ing. Dietmar Winkler, Technische Universität Berlin,
Prof. Dr.-Ing. Clemens Gühmann, Technische Universität Berlin
Dipl.-Ing. Berthold Barzantny, IAV GmbH Berlin
Dr.-Ing. Michael Lindemann, IAV GmbH Berlin