Model Based Calibration of ECUs Using a Highly Dynamic HiL est Bench System Dietmar Winkler, Clemens Gühmann, Berthold Barzantny, Michael Lindemann Abstract cooperation with MS and IAV GmbH a highly dynamic test stand is being developed. he 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. he ransmission Control Unit (CU) 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. combination with the closed-loop control of the whole test stand system in real-time it is possible to optimise a CU or/and ECU for different driving scenarios. Both the vehicle and the transmission are being simulated in real-time. his gives the advantage to test different types of transmissions and vehicles simply by changing the models or the simulation parameters. he closed-loop control approach also makes it possible to run fully automated calibration processes (e.g. DoE optimised processes). he paper will give an overview of the setup of the HiL test stand system, the models used for the real-time simulation based on MALAB /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. hese future fuel combustion processes have specified the compression ignition as a common characteristic, e.g. the HCCI procedure (Homogeneous- Charge-Compression-Ignition). 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. he 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. the calibration of the controllers of the drive train the dynamical load and speed behaviour also has to be considered.
ake 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. 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. herefore, 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-inthe-Loop (MiL), Software-in-the-Loop (SiL), Rapid-Prototyping, Hardware-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. o 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. he 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. stead, 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. he 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. he emphasis is on the conception of automation, the real-time simulation models and the control strategies. 2. est bench set up For this project, a highly dynamic engine test bench system of MS is used. he combustion engine is directly coupled with the dynamometer (see Fig. 1), which is controlled by a power converter (i.e. Drive). he 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). he 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]. he HiL Simulator and the Control System communicate via a
high-speed Gigabit Ethernet connection (UDP/IP). his solution represents a costeffective 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. Data acquisition Control loops & Limits Physical I/O Virtual I/O Dynamometer Control Speed orque PVS Engine Dynamometer Drive Schedule Model of vehicle CP/IP Control System HiL Simulator PC Workstation Figure 1: Diagram of the engine test bench system he real-time models of the drive train are developed on a standard PC workstation with a tool called VeLoDyn. his tool has been developed by the IAV GmbH and is based on the MALAB /Simulink environment. By using the R-LAB software of Opal-R [4] the VeLoDyn models are prepared for real-time simulation and then transferred to the HiL-Simulator via a CP/IP network. Once the transmission has been completed, the C-code of the models will be compiled and executed. With R- LAB it is possible to monitor the HiL-Simulator via network and even transfer new set points dynamically. R-LAB provides a variety of scripting language interfaces, such as MALAB 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)FP). 3. est stand automation and DoE he 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. hus, the way of proceeding at the test stand being developed could be the following in principal: he 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. 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. particular, this parameter is crucial to achieve a high degree of test stand automation. this regard, one distinguishes between virtual drivers with a different intelligence. hus, simple drivers are used in vehicle models, which are equipped with an automatic transmission. Generally, these drivers get a velocity profile as input. 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. o ensure a safe operation of the engine during the entire simulation the determination of the engine limits is obligatory for all operating states. he necessary measurements are automatically carried out by the test stand system (ADAP by MS ). he 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. o realise the above-mentioned objective, a fully automated test bench system including several interfaces between all communication partners has to be provided. particular, the integration of a real-time operating system that runs on a separate computer requires state-of-the-art transmission technology. he 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]. he 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 Optimization & evaluation of DoEmodels Filling tables and fitting models of ECU 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. hen, the measurements according to this plan are carried out statically or dynamically. his is done on the above described test bench within the context of a HiL simulation. he determination of the engine operating limits mentioned above is achieved by using the IAV-own test stand automation software MPI 2. he 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. he last step in Figure 2 comprises the export of a characteristic map created on the basis of the fitted models. his map may then be used for engine calibration. 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. crease of the usable test stand operation time through automation ransfer 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 o 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. general, a virtual driver is part of the vehicle model (see section 3). 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. Car Model L (load demand) ASM n meas shaft Engine α acc i meas Figure 3: M-α control strategy ( L : engine load; i : internal torque; acc : acceleration torque; meas : measured torque; n meas : measured engine speed;α: position of the accelerator pedal) Car Model n (speed demand) ASM n meas shaft Engine α meas Figure 4: n-α control strategy (n: engine speed; meas: measured engine torque, n meas : measured engine speed; α: position of the accelerator pedal) 1 M: torque, n: rotational speed, α: pedal value source (PVS)
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. his calculated load is sent to the dynamometer, which adjusts it by means of an internal controller. contrast to that, the n-α control strategy applies the engine speed instead of the engine load as set point for the dynamometer. 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. the dynamic case, this torque includes an acceleration torque. he 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. he 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. 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. hese models should be suitable for real-time and it should be possible to compile them for different hardware targets. he drive train consists of the engine, clutch and transmission modules. he 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. n ransmission n Clutch n Engine 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. he load torque of the individual components gradually reduces the torque coming from the engine. Finally, this leads to a load torque L which is composed of the acceleration torque J v dω v /dt of the vehicle, the braking torque B, the friction torque F and the driving resistance torque D : dω v L = J v B F dt D (1) he resulting vehicle speed can then be calculated using the dynamic tire diameter.
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 neutral L ertia Clutch closed Gear Friction Driving res. Air resistance Slope Vehicle Figure 6: Computation of the engine load torque depending on the shift state of the drive train in principle he load torque is hereby determined along the drive train depending on the current condition of the drive train (see. Fig. 6). he top position of the switch corresponds to a open state of the clutch. hus, 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. 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: dω L = J dt Eng Clutch, F ( PVSClutch ). (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: dωeng L = ( JClutch, total J ). (3) dt
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. he 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 torquedependent efficiencies η(), then the output torque of the gearbox is given by: = = ( ) ( η( ) ) i. η J acc, dω dt i J acc, dω dt (4) Where acc represents the acceleration torque. connection with the vehicle, the following torque balance can be stated: Gear, Veh = 0. (5) From (4) and (5) the load torque of the transmission and the vehicle affecting the engine results to: L = η acc, acc, Veh ( ) η( ) i η( ). i (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. 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. he 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. Fig. 7 one can see the set up in principal. he dynamometer control gets a torque demand L as set point. he directly coupled engine produces a propulsion torque prop (α) in turn. he measured propulsion torque is then fed back into the drive train model.
prop n n Clutch Engine ( ) ransmission ( ) load ASM α Figure 7: Set up of the HiL simulation in principal o 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. 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. 50 Vehicle Speed [km/h] 40 30 20 10 2000 124 126 128 130 132 134 136 138 140 Engine Speed [rpm] via UDP@10Hz 1500 1000 300 124 126 128 130 132 134 136 138 140 Engine orque [Nm] via UDP@10Hz 200 100 0 100 1 124 126 128 130 132 134 136 138 140 Clutch State; 0=open, 1=closed 0 124 126 128 130 132 134 136 138 140 time [sec] Figure 8: Excerpt from test simulation of the NEDC 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. 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 this paper, a real-time simulation model necessary for a Hardware-in-the-Loop- Simulation on a highly dynamic test bench system was presented. he 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. he presented changeover 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. he highly dynamic test bench can be operated fully automated via the appropriate interfaces, while all electronic control units can be integrated as genuine parts. his shortens the calibration process enormously. On the other hand, sophisticated methods, e.g. Design of Experiments can be applied effectively in this process. 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 est von Getriebesteuerungen. IIR-agung Getriebeelektronik, 24./25. Juni 2003 [2] Hagemann, G.; Heins; H.; Kirchner, A.-R; Ladentin,.; Noodt, M.; Schuck, N.: Universelle Prüfumgebung für die Untersuchung des Antriebsstrangs. AZ 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.; ahl, S.: DoE Design of Experiments. Methods and Application in Engine Development, Verlag Moderne dustrie, 2005 [7] Neßler, A.; Schoop, U.;Röpke, K.: Dynamische Messdatenerfassung und Modellbildung für Abgasemissionen am Dieselmotor. Hd-agung Motorenentwicklung auf dynamischen Prüfständen, 25./26. November 2004
Authors: Dipl.-g. Dietmar Winkler, echnische Universität Berlin, Dietmar.Winkler@U-Berlin.de Prof. Dr.-g. Clemens Gühmann, echnische Universität Berlin Clemens.Guehmann@U-Berlin.de Dipl.-g. Berthold Barzantny, IAV GmbH Berlin Berthold.Barzantny@iav.de Dr.-g. Michael Lindemann, IAV GmbH Berlin Michael.Lindemann@iav.de