841

Automated tuning of an engine management unit for an automotive engine

CHardie,H Tait,S Craig,J GChase *, B W Smith and G Harris Department of Mechanical Engineering,University of Canterbury, Christchurch, NewZealand

Abstract: Modern automotive engines aredigitally controlled using anengine management unit (EMU)that is typicallymanually programmed using anengine dynamometer to obtain desired levels of power, emissions and e  ciency.Closed-loop control of anengine dynamometer and EMU, com- bined with anoverall engine tuning algorithm, is used to automate the tuning of the engine map for afour- engine. The tuning algorithm determines the air-to-fuel ratio necessary for eachregion of engine speed and throttle position to obtain the desired performance, automaticallymoving to eachoperating region in the map. Preliminary automated tuning results produce power output curves comparable with those delivered using the originalmanufacturer tuned EMU. At lower engine speeds dataŽ ltering is required and results in power outputs slightlylower than the factory-tuned engine. At higher speeds smallimprovements in engine e  ciency,for equivalent performance, canbe found. The research presented clearlydemonstrates that engine tuning to averyhigh standard, equivalent to originalequipment manufacturer engine performance, canhe successfully automated, savingtime and adding consistency to the engine tuning process.

Keywords: control, automation, engine tuning, dynamometer, engine management, engine map

1INTRODUCTION increased emissions of hydrocarbons and CO.Too little fuel canresult in engine damagesuch asburnt exhaust Enginemanagement units (EMUs) aredigital processors valves.The amount of fuel supplied is controlled bythe that activelycontrol fuel owand to EMU, which controls the frequency and pulse width of ensure optimal engine operation and areemployed in the fuel injectors. At steady state, constant engine speed most modern fuel injected engines. Enginetuning plays the pulse width iscalculated from acombination of three avitalpart in ensuring that the EMU is programmed so inputs: ambient airtemperature, the air that the engine performs wellunder avarietyof con- pressure (MAP)and user-deŽned volumetric e  ciency ditions. The manufacturer-developed EMUparameters correction factors (VECFs). aretypically developed to meet design compromises Atypicalengine has atwo-dimensional plane of between performance, market and legislativespeciŽ ca- steady state operating points with engine speed along tions, particularlywith regardto emissions. After- the horizontal axisand throttle position or MAP along market EMUs areavailable to replace adamagedunit, the verticalaxis, as shown in Fig.1. Eachof these points € View metadata, citation and similarto papers at core.ac.uk achievespeciŽ cations brought to you by CORE di € erent to those used bythe has di ering requirements for fuel and ignition timing. provided by UC Research Repository manufacturer, to enhance the operation of anengine Most EMUs divide this plane up into Žnite rectangular intended for use both on land and in amarine environ- elements, commonly referred to as‘zones’, that make up ment or to enable the tuning and enhanced performance an‘engine map’and where eachzone has anassociated of amodiŽed engine. user-deŽned VECF.The engine map acts asa look-up The air–fuel ( A/F)ratio is important in the combus- table for operating parameters used bythe EMU to con- tion and tuning processes. If there is too much fuel, not trol engine operation. allthe fuel is burnt, causinghigh fuel consumption and Currently, engine tuning is typicallyperformed bya skilled technician who manuallyadjusts the operating TheMS wasrecei vedon 3 January2002 and was accepted after re vision parameters for eachzone of the engine map on adyna- forpublication on 6August2002. mometer or whiledriving. The engine is tuned to the *Correspondingauthor: Department of Mechanical Engineering, Universityof Canterbury, Pri vateBag 4800, Christchurch, New Zealand. desired speciŽcation for eachzone in which the engine email:[email protected] z is expected to be operated. This process is iterativeand

D15501© IMechE 2002 Proc Instn Mech EngrsVol 216Part D:JAutomobile Engineering 842 CHARDIE,H TAIT,S CRAIG,J GCHASE,B WSMITH ANDGHARRIS

Fig. 1 Structureof the engine map time consuming, creatingthe potential for signiŽcant mation to enhance engine performance, rather than time savings,additional repeatabilityand more accurate automating EMUcontroller design. Enginetuning to results viaautomation. meet speciŽc performance criteria istypicallyperformed The primarygoal of this research is the automation largelyby hand viaa combination of experience, science of the engine tuning process viaengine tuning software and art. No references werefound speciŽcally addressing that communicates with both the dynamometer control- automation of the engine tuning process, although there ler and the EMUto create aclosed-loop engine tuning is some prior research that generallyreferences the system. The engine tuning algorithm that governs the possibility of performing this task [ 5]. process is designed to optimize automaticallythe engine The following sections address the test system and control parameters for eachoperating zone, to achieve software developed to enable the automated tuning of performance in accordance with user-deŽned speciŽca- an EMU using anengine dynamometer and the basic tions. In addition, the software ensures that potentially tuning algorithms developed. Subsequent sections test damagingsituations aredetected and responds byplac- one of these tuning methods, compare the performance ingthe engine in anon-damaging state, sounding an obtained with that provided bythe manufacturer’s EMU alarmand pausing the process until the problem canbe and summarize the results and conclusions. corrected. This second requirement ensures that the pro- cess canbe run largelyunsupervised. Finally,the auto- mation process, and the speciŽc software developed, 2AUTOMATEDENGINE TUNING TEST adds both speed and consistency to the engine tuning SYSTEMAND SOFTWARE process. The after-market EMU employed is developed byThe experimental automated engine tuning system is Link Electro-Systems of Christchurch, NewZealand. tested on a1992Toyota 3S-GE engine from aToyota This EMUalongwith the PCLink control and communi- MR2. This four-cylinder engine has two overhead cam- cation software is used to control the engine. Aservo- shafts, displaces 1998cm 3 and generates manufacturer- controlled Froude-Consine hydraulic dynamometer is listed peak outputs of 121kW at6800 r /min and employed for the tuning process. The automated tuning 191N mat4800r /min. Loadis applied to the engine via algorithm comprises software designed to interface with, aservo-controlled Froude-Consine hydraulic dyna- and control, these two units for the end purpose of mometer that is controlled bya Test Automation tuning the Link EMUparameters for everyusable zone TA2000controller interfaced with aPC-based data of engine map. acquisition system utilizing anAdvantech PCL-818ana- Enginetuning is awell-known art documented in alogue-to-digital converter (ADC )card. The test bed is varietyof texts on the topic of internal combustion set up so that either the originalToyota EMU or the engine performance [ 1].Prior research in the areaof Link EMUcancontrol the engine. The dynamometer automated engine tuning is scarce with most research in and Link EMUareindependently controlled viaa PC the areaof automated engine tuning focusing on mod- program to close the loop on the engine tuning process. ifyingspeciŽ c engine functions, such asspark ignition, SpeciŽcally, the engine dynamometer and controller to enhance performance whilethe vehicleis in operation set and delivervalues for engine speed, and [2, 3].Other works focus on systems to adaptivelyelim- throttle position. The Link EMUcandeliver values for inate undesirable operating conditions or e € ects such asengine speed, throttle position, engine temperature, air knock [4].All of these e € orts focus on applyingauto- temperature, the injector duty cycle,ignition advance,

Proc Instn Mech EngrsVol 216Part D: JAutomobile Engineering D15501© IMechE 2002 AUTOMATEDTUNING OF ANENGINEMANAGEMENT UNIT 843 the oxygensensor and the entire engine map. Where map. Once atuning algorithm is run on the engine, per- there isoverlap,such asengine speed, the control algor- formance dataare extracted for analysisand compari- ithm uses these valuesto determine when transients haveson. The power output, fuel consumption and e  ciency stabilized, asboth units willreport the same value. curves arecompared to evaluatethe performance of the The automation of the engine tuning process is tested tuning algorithm. achievedvia speciŽ c software written to communicate with and control independently both the engine dyna- mometer and the Link EMU. An overalltuning algor- 3ENGINE TUNING ALGORITHMS ithm steps through eachzone in the engine map and tunes the EMU parameters for eachzone according to Optimum engine performance is typicallyobtained ata user speciŽcations. User speciŽcations that set the tar- constant air–fuel ratio ( l)and the most desirable settings get(s) for the tuning process in each zone areset prior for emissions areobtained when l is valuedaround 1.0 to tuning using agraphicaluser interface (GUI).A [1, 6 ].Smallreductions of l canoptimize power output di€ erent GUI is used to provide the user with real-time but maylead to sizeable increases in emissions. Similarly, information about the engine operation, displayingpar- values of l slightlygreater than 1.0tend to increase ameters such asdesired engine speed, actualengine e ciency,up to apoint, asthe engine runs leaner. speed, torque, power, fuel owrate and ignition advance. Ignition timing wasinitially tuned in the base map and The software is developed using Borland C ++ not considered in this tuning process. Since changes to Builder version 4.0.The overallclosed-loop system this variableare easily added asa second step, it was architecture and communication links created areillus- not considered until anunderstanding of the e € ect of trated in Fig.2, where the broken line encloses the automation on tuning l wasperformed. software communication links created to close the loop Severalalgorithms for engine tuning to meet speciŽed on the tuning process. Figures3 and 4show the status performance requirements canbe developed, imple- window and tuning set-up window for the user interface. mented and tested using performance speciŽcations The speciŽc software structure consists of three pri- developed byany method. Twobasic approaches tune mary C++ classes. Twoclasses handle commands for for either maximum torque or aspeciŽc targetstoichio- the EMU and dynamometer. Athird classof low-level metric l sensor reading(air– fuel ratio), enablingtuning control functions enables closed-loop engine tuning, for performance or economy, asdesired. facilitatingcontrol of the separate dynamometer and There aretwo primarysteps for eachof the automated EMU systems bya singleglobal entity on the PC.More tuning algorithms: speciŽcally, these functions enable ‘get’and ‘set’com- 1.Tune the master fuel setting. mands for quantities including fuel, master level,throttle 2.Tune the fuel setting for eachof the zones that can position, torque, power, ignition advance, l sensor, be tested. knock sensor, temperature, dynamometer engine speed, EMU sensed engine speed and the activezone. Further The master fuel setting is aglobalmultiplier for every commands and functions areused to determine whether fuel setting in the engine map. The higher the master the system is running, whether engine speed has stabil- fuel value,the higher the fuel input for everyzone. This ized in azone and communication of these valuesto and valueis tuned to move everyzone in the engine map from the globaltuning function. collectivelyto aregion close to the desired performance. In order to allowthe engine to start and run, the Link Once the master fuel valueis set, the engine map isŽne EMU is programmed prior to installation with abasic tuned byindividually tuning eachzone. The master fuel fuel and ignition conŽguration, referred to asthe base is automaticallyset bythe automated tuning software whilerunning the engine atapproximately 50 per cent of maximum engine speed and 50per cent throttle, before speciŽc automated tuning of eachzone. Hence, the tuning algorithms allhave two essential steps, an initialapproximation using the master fuel setting and speciŽc tuning of each operating zone in the engine map. The engine is commanded to operate inthe centre of the zone, for eachzone tuned. Since eachzone in the Link EMUis 500r /min wideand 30 ° of throttle position high, the engine is operated from 250r /min at 15° throttle in 500r /min and 30° steps. Note that these steps areŽ xedby the Link EMU; however,zone size in general is a trade-o€ between engine map size and complexity, and the resolution required. It is important to note that Fig. 2 Automatedengine tuning system architecture not allzones are‘ reachable’in that the engine does not

D15501© IMechE 2002 Proc Instn Mech EngrsVol 216Part D:JAutomobile Engineering 844 CHARDIE,H TAIT,S CRAIG,J GCHASE,B WSMITH ANDGHARRIS

Fig. 3 Automatedengine tuning status window

Fig. 4 Automatedengine tuning set-up window operate at250 or 10000r /min, for example.The auto- In the tuning process the engine is Žrst incremented mated system tunes the engine for eachzone that is in speed over the entire row for agiventhrottle position. reachableby automatically moving on when steadystate Eachrow is followed byincrementing and repeating the operation cannot be achievedin agivenzone. process for subsequent throttle positions. The addition

Proc Instn Mech EngrsVol 216Part D: JAutomobile Engineering D15501© IMechE 2002 AUTOMATEDTUNING OF ANENGINEMANAGEMENT UNIT 845 of a15spause atidle before the throttle angleis Overall,this tuning algorithm employs simple control increased allowstime for engine cooling to prevent systems to tune eachoperating zone of the engine map overheating asthe cooling system employed for these automaticallyto match adesired l value.This algorithm tests wasnot adequate for high speed operating con- provides asolid base for further development and ditions. Alargercooling system would havealleviated enables automated tuning. The control algorithm isequ- this condition and eliminated the need for apause. ally e€ ectiveif tuning for di € erent target l values in Owingto adynamometer controller fault, it waseach zone. di cult to operate the system e € ectivelyat very low speeds. Hence, the tuning process wasrun for operating zones rangingfrom 500to 7000r /min. The user can 3.2Tuning for maximum torqueoutput restrict the operating rangefor engine speed to speciŽed rangesas required. Note that if the engine reaches azone Enginetuning for maximum torque provides adi € erent in which it cannot operate, indicated bybeing unable to tuning approach focused on maximum power. As with attainthe commanded speed atthe giventhrottle pos- the prior algorithm this controller variesthe amount of ition, the system times out, automaticallyskips the zone fuel supplied to the engine and logs the resulting torque and moves to the next row of throttle positions. output, whileleaving ignition advanceunchanged from the base map for this study. For example,when the fuel supply is increased, torque comes to apeak and then 3.1Tuning for target air–fuel ratio drops o€ ,and the upper limit for fuel supply canbe determined for that zone. This limit makes fuel sampling This tuning method uses the factory l sensor to monitor iterative,as the fuel valueassociated with the peak the amount of oxygenpresent in the exhaust gasesand torque valuemust be found byŽ rst passing over the hence the air–fuel ratio. The goalis to tune the EMU peak and then locatingit viaa simple peak detection for peak torque whileholding aconstant l value to a routine with atolerance of 1per cent, or approximately smallrange around 1.0.The algorithm illustrated in 1.5N matpeak torque. Fig.5 implements asimple proportional control system Simple datasmoothing isalsoperformed so that spuri- on both the master fuel setting and eachof the zone fuel ous samples do not signiŽcantly a € ect the results. The settings to perform this task. The control gain, K, end results arepassed back to the overallcontroller and controls the rate atwhich the actualair– fuel ratio put into the engine map and the tuning algorithm is approaches the speciŽed level. incremented to the next zone where the process is This simple linearproportional control system is repeated. The automated software controlling the pro- extremely e€ ectivein terms of its settling time and the cess handles movingfrom zone to zone. These basic steadystate error. In testing, the most appropriate gain process steps areessentially the same asthose for the for this system wasfound to be 0.25;however, the system target l method. canbe easilymodiŽ ed to Žnd the best valueadaptively. Any positive valueless than 1.0should leadto steady convergence. The controller implemented has aslight 3.3Data Ž ltering non-linearity owingto alimiter placed on the changein controller output, to limit the amount the fuel canbe The Test Automation TA2000unit employs asimple changed in anygiven step of the algorithm. Figure6 controller to o € er throttle position, constant speed and shows the basic steps taken in this tuning process. constant torque control modes. This controller should During testing of this algorithm atolerance of ±2 per normally control the dynamometer to within 10r /min; cent on the target l sensor measurement is employed. however,during the tests it only held engine speed to Higher tolerances produce signiŽcant deviations from within 30–60 r /min. The inabilityto hold engine speed the targetperformance and lower tolerances make con- tightlyleads to sizeable speed uctuations, particularly vergence di cult. Tolerances canbe modiŽed viathe atlowspeed; however,it alsopresents aworst-case test user interface for anysystem hardware. situation for automated engine tuning.

Fig. 5 Blockdiagram for target l automatedtuning algorithm

D15501© IMechE 2002 Proc Instn Mech EngrsVol 216Part D:JAutomobile Engineering 846 CHARDIE,H TAIT,S CRAIG,J GCHASE,B WSMITH ANDGHARRIS

Fig. 6 Basicprocess steps for target l controller

To address these issues, simple digitallow pass Žlters results. The automated engine tune experiences aslight areapplied to smooth largevariations in the datastream. tapering o € in power soon after the peak output, while The dynamometer is sampled bythe ADC at3 kHz and the factory EMUretained peak power for amore is set up to averagethe datain lots of 50–100 samples. extended period. The maximum power wasbetween 110 Toincrease the smoothness further, arolling averageis and 115kW for each map, approximately7 per cent performed using ŽveŽ ltered samples ata time. This Žl- lower than the manufacturer-listed valueof 121kW, tering is applied to the engine torque, engine speed and perhaps owingto ageand wear. oxygensensor outputs. This approach lowpass Žlters At lower engine speeds, variationsof ±5 kW occur the dataranging from 0to 12–60 Hz, depending on the owingto speed control issues with the dynamometer. exactŽ ltering employed. Hence, interactions with dyna- When the dynamometer cannot hold the speed tightly, mometer dynamics in the 30Hz rangeare possible smallchanges in fuel input result in largervariations in although no indications werenoted asthe implemented l,presenting amore di  cult control problem. At higher Žltering keeps databandwidth under 30Hz. speeds, the l tuning procedure resulted inequivalent or slightlygreater power output values.Overall, the auto- mated engine tune using constant l results in verysimilar 4TESTING, RESULTSAND DISCUSSION torque and power performance to that of the OEM EMU. The OEMEMUis probably tuned for l=1.0, The user interface code wasmodiŽ ed so that, eachtime except athigh speeds where fuelling maybe increased to the status screen is updated, the information displayed something approaching l=0.9to improve top end per- is alsologged to aŽle.It wasnot possible to obtain the formance. In contrast, the automated l tune method same levelof information from the OEMEMUasfrom tunes this valueto be within ±2 per cent of l=1.0 for the Link EMU, makingsome comparisons di  cult. To allzones. However,the torque and power results are illustrate and prove the concept of automated engine verysimilar to the OEM graphs and it is possible, with tuning, the engine is tuned for aconstant l value using some added complexity, to tune each zone for adi € erent the Link EMU, and the resulting performance compared target l valueto mimic, more exactly,the basic OEM with the OEMEMU for torque and power. tuning process. Figures7 and 8show the resulting performance for The torque surfaces in Fig.9 show the relatively at the ToyotaEMU and the automated engine tune respect- torque curve associated with this engine for both the ively.These Žgures show the engine map in the hori- automated engine tune and manufacturer’s EMUtest zontal plane with power on the verticalaxis. The results. Maximum torque output wasapproximately maximum power for this l-tuned engine map is consist- 180N mat5500 r /min for the OEMmap using the exact ently achievedaround 6750r /min, matching the manu- data,with the automaticallytuned results within 2per facturer’s listed speciŽcations and OEMEMUtest cent of this value.The region of the torque curve where

Proc Instn Mech EngrsVol 216Part D: JAutomobile Engineering D15501© IMechE 2002 AUTOMATEDTUNING OF ANENGINEMANAGEMENT UNIT 847

Fig. 7 OEM EMU poweroutput ( kW)

Fig. 8 Automatedengine tuned for constant l LinkEMU poweroutput ( kW) automated engine tuning achievedthe smoothest result of this 1992engine. The overallresult is that the auto- wasin the top half of the engine speed rangearound the mated engine tuning concept is veryclose, ataŽrst trial, maximum torque values,where the dynamometer holds to the OEMtune in terms of peak torque, meeting the the engine speed more tightly.This result is due to the aimsof this project and proving the basic concept. dynamometer controller deliveringsteady motion with As expected, the manufacturer’s EMUis programmed tight speed control more rapidlyat higher speeds. At to achievea high levelof performance from the engine. lower engine speeds the impact of variationin speed The automated engine tune results in essentiallyequival- control, asapercentage of the total, and the size of the ent performance to the manufacturer-listed speciŽca- engine map zones areevident in the less smooth result tions. Greater engine speed resolution of the engine map for the automated engine tune. The peak torque values atlower engine speeds and throttle settings would limit for both cases areapproximately 11 Nmlower than the some of the roughness of the automaticallytuned torque listed speciŽcation, probably asaresult of ageand wear response. The current engine map isdeŽned in 500r /min

D15501© IMechE 2002 Proc Instn Mech EngrsVol 216Part D:JAutomobile Engineering 848 CHARDIE,H TAIT,S CRAIG,J GCHASE,B WSMITH ANDGHARRIS

Fig. 9 OEM torqueoutput ( Nm,left )andautomated constant l tunedEMU torqueoutput ( Nmright) increments and steps of this size atengine speeds around resulting performance of ahigh standard is illustrated. 1500 r/min represent signiŽcant changes in engine Automation eliminates the requirement for full-time operating condition. However,greater engine speed reso- oversight byskilled technicians and engineers. While the lution of the engine map would enable asmoother auto- tuning routines developed aresimple, results from auto- maticallytuned result. Greater engine speed resolution mated tuning of the Link EMUhavereached astandard would also enable apotentially smoother, more optimal approaching that of the factory EMUfor amuch lower map to be obtained for this region and apotentially investment of time. Power and torque output dataillus- better overallresult. trate how the engine map canbe tuned from avery The automated target l algorithm required approxi- rough base map to apolished result that enables smooth mately30 min to complete. During this time, the centre operation over the entire engine operating range.Power of each Link EMUengine map zone wastuned for all and torque results for the automated engine tune are zones in the 500–7000 r /min rangeand in the 0 °–90° reasonablysimilar to those obtained from the original throttle range,where the Žrst zone would be tuned at manufacturer EMU with some roughness atlower 750 r/min and 15°.Of all48 operating zones available engine speeds. The entire tune took approximately in this region of the engine map, only 36wereattainable 30min to deliverresults and faster times could be bythe test engine and the rest represented operating achievedwith better dynamometer controller settings. conditions that the engine could not reach (e.g. These times aresigniŽ cantly faster than comparable 6750 r/min and 15° throttle). Here again,higher reso- hand-controlled tests atthe same facilityillustrating lution inthe engine map mayprovide better results and the potentially largetime savingavailable through greater exibility,particularly at lower engine speeds. automating these tests. At Canterbury, anequivalent manualtest, tuning These automated results areachieved through the 50–100zones for greaterresolution, would take approxi- development of independent software interfaces between mately4 h. Averyexperienced technician could tune the aPCanengine dynamometer and anafter-market EMU. equivalent 36zones inasshort atime as1 hwith awell- Further software encapsulates aglobaltuning algorithm known engine. Given better dynamometer controller using closed-loop feedback to command the system to tuning to hold engine speed to afar tighter tolerance, desired states and to tune the engine map. Agraphical the engine tuning tests presented here would take user interface enables user input of tuning speciŽcations approximately8– 10 min, and anequivalent 50–100zone for the entire map, each individual zone or largerregions test would take approximately25– 35 min. The increased of the engine map. There arealso avarietyof safety speed of the automated tune would result directly from shut-o€ sand automatic restarts included to minimize the abilityto Žnd and hold the steady state engine speed the need for human intervention. required, far more quickly than with the controller In summary, automated torque and target l engine tuned. In either case,automation of this process o € ers tuning procedures aredeveloped and the l tune is tested. signiŽcant time savings. The system has the exibilityto allowfor further advancement in automated engine tuning. Areas where further work willhave signiŽ cant impact include the 5CONCLUSIONS development of more sophisticated tuning algorithms that include emissions control, thermal e  ciency, The development of aclosed-loop, automated engine ignition timing and exhaust systems. Other areasof tuning system is demonstrated and the potential to pro- future research include tuning for dynamicconditions duce consistent results, signiŽcant time savingsand such asacceleration, expansion to include fuel usage

Proc Instn Mech EngrsVol 216Part D: JAutomobile Engineering D15501© IMechE 2002 AUTOMATEDTUNING OF ANENGINEMANAGEMENT UNIT 849 analysis,combinations of torque and l tuning in di€ er- ofspark ignition automotive engines. IEEE Mag., 1990, ent regions and repeating the system and results on a 10(3),94–101. chassis dynamometer. 3 Holmes, M. and Cockerham,K. Adaptiveignition con- trol.In Proceedings of Sixth International Conference on AutomotiveElectronics ,London,12– 15 October 1987. 4Holmes,M., Wilcocks,D. A.R. and Bridgens,B. J. Adaptive ignitionand knock control. In Fisata 1988, Dearborn, REFERENCES Michigan,25 –30September 1988, SAE paper885065. 5 Beck, T. Currenttrends in the design of automotive elec- 1Taylor,C. F. TheInternal Combustion Engine in Theory and tronicsystems. In Proceedingsof theConference on Design, Practice,1985( MIT Press,Cambridge, Massachusetts). Automationand Test in Europe , 2001. 2Scotson,P. G. and Wellstead,P. E. Self-tuningoptimization 6 Automotive Handbook,1993( BoschGmbH, Germany).

D15501© IMechE 2002 Proc Instn Mech EngrsVol 216Part D:JAutomobile Engineering