object-oriented language with programming syntax andusage very similar to Basic. It has been said that pythoncan speed up development by a factor <strong>of</strong> 10 over o<strong>the</strong>rprogramming languages, such as C [4]. Pythonprovides all <strong>of</strong> <strong>the</strong> control constructs and modularprogramming functionality needed for <strong>the</strong> developmentand maintenance <strong>of</strong> complex test sequences. TheControlDesk s<strong>of</strong>tware has an integrated pythoninterpreter and a function selector tool, to make pythondevelopment as easy as possible for <strong>the</strong> user. Testscripts can be run directly, or <strong>the</strong>y can also beconnected to events, including GUI events such asCommand buttons. Visteon has been able to programvery complex test sequences and make <strong>the</strong>m functionalin very short periods <strong>of</strong> time.Test stimulus generationControlDesk also provides mechanisms to assist in <strong>the</strong>generation <strong>of</strong> test stimuli (data streams) for specific testruns. The test stimulus is generated through python,using a library designed to generate <strong>the</strong> stimuli. <strong>In</strong> orderto generate this data in real-time, s<strong>of</strong>tware and hardwaremechanisms have been built into ControlDesk and <strong>the</strong><strong>dSPACE</strong> hardware, which allows for full fidelity <strong>of</strong>stimulus generation, with time based events guaranteedto occur during testing. A sequence generator tool isincluded with ControlDesk, which allows for interactivegraphical user design <strong>of</strong> test stimuli. The sequencegenerator is based on time tags and specific functiontypes, which can be combined in different manners.There are also control constructs, which allow for easylooping and conditional execution <strong>of</strong> <strong>the</strong> data streams.The tool also assists <strong>the</strong> user by providing a pregeneration<strong>of</strong> <strong>the</strong> data, for verification prior to <strong>the</strong> test,and <strong>the</strong>n it provides <strong>the</strong> functions to allow <strong>the</strong> user tomap <strong>the</strong> data to model variables and execute <strong>the</strong>stimulus both interactively and within test sequences.<strong>An</strong>o<strong>the</strong>r feature <strong>of</strong> <strong>the</strong> Sequence generator is <strong>the</strong>capability to playback recorded data streams, capturedduring ei<strong>the</strong>r simulations or actual test runs. Thiscapability has been used very effectively by Visteon tosimulate drive cycles and control specific testsequences. <strong>An</strong>y data waveform stored in a predesignedMAT file format can be used for this purpose.The <strong>dSPACE</strong> hardware and s<strong>of</strong>tware systems provide<strong>the</strong> automatic buffering and interpolation processes thatallow for real-time data playback during simulation runs.Using test stimulus to control test execution is anexample <strong>of</strong> a data-driven system. This has manyadvantages over a model driven system, in that changesin <strong>the</strong> data streams do not require model changes andprovide greater flexibility in <strong>the</strong> modeling process. Themodels are simpler to design with less real-timeoverhead, and this also allows for using <strong>the</strong> samemodels for both <strong>of</strong>fline simulation and real-time testing.Advanced test scripting capabilitiesControlDesk Test Automation provides libraries <strong>of</strong>functions for controlling <strong>the</strong> user interface andControlDesk environment. It also has a MacroRecorder, which gives <strong>the</strong> user an easy method forcapturing testing sequences performed through <strong>the</strong> GUI.The Macro Recorder saves <strong>the</strong>se captured sequencesas python scripts, which can <strong>the</strong>n be easily replayed andalso modified to extend and augment <strong>the</strong>ir functionality.There are interface libraries for communicationprotocols, such as RS-232 and GPIB, which allow forinterfacing to external devices and systems. Librariesare also provided to allow for report generation and datacapture into several windows COM OLE programs, suchas Word and Excel. Finally, sets <strong>of</strong> functions areincluded which allow <strong>the</strong> user to access and controldiagnostic devices and calibration tools, using ei<strong>the</strong>rstandard protocols or <strong>the</strong> ASAP/MCD standards [3].Future pathPython is an extremely powerful tool and can be used todo every one <strong>of</strong> <strong>the</strong> tasks required for test automation.Visteon has had a successful experience with <strong>the</strong> use <strong>of</strong>test automation because <strong>of</strong> this. The next step in <strong>the</strong>future involves using a new 4GL testing system from<strong>dSPACE</strong>, called AutomationDesk, which is based ongraphically designing test sequences. The system is stillbased on python, but it eases <strong>the</strong> development andmaintenance process by providing a more intuitivegraphical design environment, as opposed to writingcode scripts. It is not a code generator, but insteadgenerates testing process objects from clearly definedtest system classes. AutomationDesk also provides avery powerful test management functionality, whichallows for more robust management <strong>of</strong> all <strong>of</strong> <strong>the</strong> facets<strong>of</strong> a test. These include <strong>the</strong> scripts, models, test data,test results, stimulus and parameter data, etc. [5].FAILURE INSERTION AND CLOSING THE LOOPGeneral overview<strong>In</strong> order to fully test a PCM, <strong>the</strong> PCM must be connectedto hardware interfaces that simulate <strong>the</strong> real plantenvironment as closely as possible. The PCM isgenerally designed to test <strong>the</strong>se interfaces for anyfailures, such as short circuits, missing sensors, etc, atwhich time <strong>the</strong> PCM will store a diagnostic code in itsmemory. A large percentage <strong>of</strong> <strong>the</strong> actual code in aproduction PCM is for diagnostics. If one <strong>of</strong> <strong>the</strong>sefailures occurs, <strong>the</strong> PCM s<strong>of</strong>tware is designed to recoverfrom this failure and ensure <strong>the</strong> safety <strong>of</strong> <strong>the</strong> passengersand <strong>the</strong> environment. The <strong>dSPACE</strong> HIL systemprovides a configurable set <strong>of</strong> relays in a Failure<strong>In</strong>sertion Unit (FIU), which can be commanded tosimulate <strong>the</strong>se failures. A failure for a PCM input cangenerally be simulated in s<strong>of</strong>tware and standardhardware. By sending a 0, 5 or vehicle battery voltage
input from simulated sensor different types <strong>of</strong> sensorfailure can be simulated. To simulate failures for PCMoutputs, however, this involves using electronic relays toprovide open circuits, short circuits to battery voltage orground, or even pin-to-pin short circuits. <strong>In</strong> addition,PCM outputs generally expect to have a specific loadattached, and failures are triggered if this is not <strong>the</strong> case.process [6]. This allows for <strong>the</strong> following standard testsequence:1. Place PCM in desired performance state2. <strong>In</strong>ject a failure3. Evaluate <strong>the</strong> PCM performance during <strong>the</strong> faultcondition4. Debrief <strong>the</strong> diagnostics tool to determine if <strong>the</strong> faultwas properly detected5. Reset <strong>the</strong> fault codes to allow for fur<strong>the</strong>r testingThe above test sequence is fully repeatable and byusing it, full lights-out testing sequences are possible.All <strong>of</strong> <strong>the</strong> diagnostic codes for a PCM may be evaluatedin a single test run (with a combination <strong>of</strong> sequences)and a complete test report will be automaticallygenerated to record <strong>the</strong> results. Once this process isimplemented, <strong>the</strong> daunting task <strong>of</strong> test regression foriterative s<strong>of</strong>tware releases is easily contained.BENEFITS – HIL IN EVERY DEVELOPMENTALPHASEFigure 4 Failure <strong>In</strong>sertion Unit Block DiagramTest scripting interfaceThe control <strong>of</strong> <strong>the</strong> FIU system is done using a pythonlibrary in <strong>the</strong> test automation environment. A PCMoutput channel is wired to a HIL load interface, but first itis routed through a FIU channel (See Figure 4). Thisallows for exposing <strong>the</strong> channel to <strong>the</strong> failures neededfor testing. The <strong>dSPACE</strong> FIU interface is based on aserial communications protocol, which can becommanded directly from <strong>the</strong> Host PC. Simple functioncalls are used in order to control a particular FIUchannel, which eliminates <strong>the</strong> need for <strong>the</strong> user to learn<strong>the</strong> details <strong>of</strong> <strong>the</strong> FIU serial communication protocol.With our experience during <strong>the</strong> developmental andimplementation stages <strong>of</strong> <strong>the</strong> HIL systems we foundseveral advantages <strong>of</strong> using HIL systems in testing andvalidating our s<strong>of</strong>tware product. Although, <strong>the</strong> initialscope for using <strong>the</strong> HIL system was limited, we now use<strong>the</strong> system in every phase <strong>of</strong> <strong>the</strong> PCM s<strong>of</strong>twaredevelopment process. Figure 5 illustrates <strong>the</strong> SystemEngineering V with <strong>the</strong> phases <strong>of</strong> s<strong>of</strong>tware developmentand highlights how HIL is being used in every stage <strong>of</strong><strong>the</strong> s<strong>of</strong>tware development.<strong>In</strong>tegration <strong>of</strong> diagnostic tools for closed loop testingIt is sometimes enough to simulate failures duringtesting only for <strong>the</strong> analysis <strong>of</strong> <strong>the</strong> effects on systemperformance. However, in order to fully read systemdiagnostics and also reset <strong>the</strong> error conditions, it isnecessary to connect a diagnostic tester/device. Thisdevice is used to debrief <strong>the</strong> error codes registered in<strong>the</strong> PCM following any diagnostic error and report <strong>the</strong>secodes back to <strong>the</strong> tester. The python test automationlibraries also include functions to interface to and control<strong>the</strong>se diagnostic devices. These testers generally use astandard serial or CAN-based protocol for interfacing to<strong>the</strong> PCM. O<strong>the</strong>rs utilize <strong>the</strong> ASAM/MCD standard forexternal operation <strong>of</strong> <strong>the</strong> device. By providing <strong>the</strong>capabilities for controlling <strong>the</strong>se diagnostic tools,ControlDesk can fully close <strong>the</strong> loop on <strong>the</strong> testingFigure 5 HIL used in every step <strong>of</strong> developmentcycle.Broadly, <strong>the</strong> HIL applications for PCM testing in <strong>the</strong>design phase can be classified as Open <strong>Loop</strong> Testing(OLT) and Closed-<strong>Loop</strong> Testing (CLT). <strong>In</strong> <strong>the</strong> OLT a