addition <strong>of</strong> new requirement, and refinement <strong>of</strong>requirement. The late changes in requirements cause asignificant impact on <strong>the</strong> development and testing time<strong>of</strong> control system s<strong>of</strong>tware and this iterative loop <strong>of</strong>requirement change, development and testing is notvery efficient. Fur<strong>the</strong>r, obtaining a prototype vehicleduring <strong>the</strong> early s<strong>of</strong>tware developmental phase isextremely difficult and cost prohibitive, especially for anon-OEM (Original Equipment Manufacturer)companies.A Powertrain Control Module (PCM) is one <strong>of</strong> <strong>the</strong> mostcomplex electronic embedded control systems in <strong>the</strong>modern vehicle. The PCM s<strong>of</strong>tware <strong>the</strong>refore requires arigorous and through testing <strong>of</strong> its functionality. <strong>In</strong> orderto manage <strong>the</strong> increasing demand <strong>of</strong> technology in PCMdesign, Visteon Corporation started investigating <strong>the</strong>possibilities <strong>of</strong> using a state-<strong>of</strong>-<strong>the</strong>-art HIL system forPCM s<strong>of</strong>tware development and verification in 1998. HILtechnology is best suited to perform a complete andrigorous testing <strong>of</strong> <strong>the</strong> Embedded control systems<strong>of</strong>tware <strong>of</strong> PCM. Visteon anticipated that HILsimulation would improve quality and also reducedevelopment time and cost. At <strong>the</strong> same time <strong>the</strong> HILsystem based development and testing will complement<strong>the</strong> implementation <strong>of</strong> model based s<strong>of</strong>twaredevelopment (MBD) technology. The initial strategy wasto implement HIL for PCM s<strong>of</strong>tware testing only.However, over time it became apparent that <strong>the</strong> sameimplementation could be easily tailored for <strong>the</strong>S<strong>of</strong>tware/<strong>Hardware</strong> <strong>In</strong>terface validation as well.Implementation <strong>of</strong> a HIL system for testing during <strong>the</strong>development phase <strong>of</strong> PCM s<strong>of</strong>tware also addresseso<strong>the</strong>r issues associated with <strong>the</strong> traditional bench testenvironment. Some <strong>of</strong> <strong>the</strong> issues associated with <strong>the</strong>traditional bench test environment are uncontrolled andnon-repeatable tests without proper closed loopfeedback to perform a complete system verification andvalidation <strong>of</strong> <strong>the</strong> s<strong>of</strong>tware in real time, difficulty inachieving consistency, manual mode <strong>of</strong> operation for setpoints, ad hock data capture and test results and <strong>the</strong>near impossible task <strong>of</strong> testing <strong>the</strong> complex closed loopcontrol algorithms <strong>of</strong> <strong>the</strong> PCM s<strong>of</strong>tware in an open loopbench test environment.Visteon has proven that <strong>the</strong>re are significant benefits <strong>of</strong>Open <strong>Loop</strong> HIL testing during <strong>the</strong> initial phase <strong>of</strong>s<strong>of</strong>tware development by performing unit level s<strong>of</strong>twareverification. HIL testing is also used for verification <strong>of</strong><strong>the</strong> S<strong>of</strong>tware and <strong>Hardware</strong> <strong>In</strong>terface <strong>of</strong> <strong>the</strong> low-levelplatform s<strong>of</strong>tware. The integration <strong>of</strong> HIL systems withcalibration and diagnostic tools also provides significantadvantages with closed loop simulation and testing <strong>of</strong>completely integrated s<strong>of</strong>tware in real time on <strong>the</strong> bench.Several o<strong>the</strong>r features <strong>of</strong> HIL such as test automation,test stimulus generation, and fault-insertion testing areaddressed. These HIL systems use Python, anadvanced test scripting language, to control testsequences and coordinate <strong>the</strong> variety <strong>of</strong> interfacesnecessary for a particular test, or a set <strong>of</strong> tests. Thistest-scripting feature <strong>of</strong> <strong>the</strong> HIL system gives <strong>the</strong> testdeveloper <strong>the</strong> capability to implement full lights-outtesting scenarios and also allow for exact reproductionfor subsequent DUT (Device Under Test) regressiontesting. The HIL systems also have <strong>the</strong> capability toinject stimulus signals into <strong>the</strong> DUT, which can be usedfor a variety <strong>of</strong> purposes. These include drive cycles foran engine or vehicle test, and also response datahistories for component validation.Finally, <strong>the</strong> interfaces between <strong>the</strong> PCM and <strong>the</strong> plant(Vehicle, Engine, etc) need to be tested. When failuresoccur with sensors or actuators, <strong>the</strong> PCM generallyneeds to detect <strong>the</strong>se and provide for strategies toovercome <strong>the</strong>m. Using <strong>the</strong> HIL systems, it is fullypossible to simulate almost any type <strong>of</strong> failure that acontroller could experience. This failure testing can alsobe performed during critical control periods, which mightnot be possible to implement on <strong>the</strong> actual target plant.Figure 2 Visteon HIL ArchitectureVISTEON HIL SYSTEMARCHITECTUREThe Visteon HIL s<strong>of</strong>tware-testing environment is built onmodified <strong>dSPACE</strong> midsize and/or full size enginesimulators integrated with several <strong>of</strong>f <strong>the</strong> shelf tools. Thesystem architecture <strong>of</strong> <strong>the</strong> Visteon HIL system is shownin block diagram in Figure 2. The Visteon HIL simulatoris housed inside a 19” desktop rack containing a PowerPC processor board for real time computation, aspecialized automotive HIL I/O board, additional I/Ocards, required signal conditioning boards, load boardswith fault simulation capability as <strong>the</strong> main component <strong>of</strong><strong>the</strong> simulator. The system is also equipped with a
emote control power supply. The power supply can becontrolled in real time during simulation, which provides<strong>the</strong> capability <strong>of</strong> vehicle battery simulation The PCM isphysically connected to <strong>the</strong> HIL simulator by customizedharnesses for I/O routing ei<strong>the</strong>r directly or throughswitchable breakout boxes. Fur<strong>the</strong>r, it is possible toattach actual physical component assemblies to <strong>the</strong> HILsystem using an external interface. The system alsoaccommodates integration <strong>of</strong> <strong>of</strong>f-<strong>the</strong>-shelf calibrationand diagnostic tools. The integration <strong>of</strong> calibration anddiagnostic tools with <strong>the</strong> HIL system provides <strong>the</strong>capability <strong>of</strong> automated testing <strong>of</strong> very complexPowertrain control system s<strong>of</strong>tware. [3]One <strong>of</strong> <strong>the</strong> critical parts <strong>of</strong> this HIL system is <strong>the</strong> loadsubsystem. It is very critical to have an appropriate loadfor <strong>the</strong> actuator signals in order for <strong>the</strong> PCM s<strong>of</strong>tware towork properly. <strong>In</strong> order to accommodate <strong>the</strong> specialcharacteristics <strong>of</strong> certain actuators <strong>the</strong> system connectsto a specially designed company proprietary loadsubsystem. The closed loop simulation <strong>of</strong> <strong>the</strong> systemrequires appropriate feedback response from <strong>the</strong>actuator load to satisfy <strong>the</strong> smart device driver integratedcircuits (IC) and advanced On Board Diagnostics (OBD)system s<strong>of</strong>tware. Without <strong>the</strong> appropriate closed loopsystem and actuator load feedback, <strong>the</strong> PCM controllerwill enter a fault mode and will defeat <strong>the</strong> purpose <strong>of</strong>validation <strong>of</strong> <strong>the</strong> system s<strong>of</strong>tware. For <strong>the</strong> completeclosed loop system simulation ano<strong>the</strong>r significationrequirement is <strong>the</strong> representative plant model. The plantmodel should represent <strong>the</strong> physical behavior <strong>of</strong> <strong>the</strong>plant; in our implementation <strong>the</strong> plant consists <strong>of</strong> <strong>the</strong>engine, <strong>the</strong> transmission and o<strong>the</strong>r ancillarycomponents.interfaces. Refer to Figure 3 to see a depiction <strong>of</strong> some<strong>of</strong> <strong>the</strong>se interfaces. Below is a list <strong>of</strong> just some <strong>of</strong> <strong>the</strong>phases required to perform HIL testing:• Control <strong>of</strong> <strong>the</strong> test sequence to run and ability toregressively test• <strong>In</strong>jection <strong>of</strong> test stimulus in real-time• Access to <strong>the</strong> model parameters and data andcontrol <strong>of</strong> <strong>the</strong> simulation state• Access to external devices (Testers, Voltmeters,etc.)• Access to and control <strong>of</strong> PCM interfaces (diagnostictools)• Ability to generate test documentation and save testdata• Test data analysis during <strong>the</strong> testThe system chosen to perform <strong>the</strong> testing must provide<strong>the</strong> power to perform <strong>the</strong> above tasks, yet needs to berelatively easy to use in order to minimize testdevelopment costs and allow for changes in <strong>the</strong> testingprocess. The system chosen by Visteon is <strong>the</strong> s<strong>of</strong>twaretool ControlDesk ®2 , by <strong>dSPACE</strong>. ControlDesk providesall <strong>of</strong> <strong>the</strong> capabilities needed for a HIL test system,including hardware/model management, data acquisitionand graphical user-interface capabilities. The TestAutomation extension <strong>of</strong> ControlDesk is based on <strong>the</strong>python language, and it provides <strong>the</strong> interface librariesneeded to automate <strong>the</strong> tools and programs needed toperform <strong>the</strong> above listed tasks.A set <strong>of</strong> plant models suitable for real-time simulationhas been developed and validated in-house, torepresent various automotive subsystems for differentpowertrain applications. The real time executable plantmodels are developed in MATLAB ® , Simulink ®andStateflow ®1 , and are composed <strong>of</strong> flexible andconfigurable component and sub component models.Physical component and systems are represented inma<strong>the</strong>matical models. These representative plantmodels are developed with significant and adequatedetail to perform <strong>the</strong> controller s<strong>of</strong>tware algorithmverification and validation.TEST AUTOMATION SEQUENCE CONTROL ANDDESIGNPhases <strong>of</strong> testing and automationThe task <strong>of</strong> powertrain hardware and s<strong>of</strong>tware testingusing HIL simulation requires many phases andFigure 3 <strong>In</strong>terfaces in HIL SystemTest sequences and scripting with pythonPython is an open source language, available on <strong>the</strong>www.python.org website. It is an extremely powerful,1MATLAB, Simulink and Stateflow are trademarks <strong>of</strong> The MathWorks,<strong>In</strong>c.2ControlDesk is trademark <strong>of</strong> <strong>dSPACE</strong> GmbH.