Testen von Embedded Systems Hardware in the Loop (HIL) Testing VU 2.0, 182.117, WS 2008/09 Raimund dkirner
Testing Embedded Software Testing the whole system including the physical environment is not possible during the early development stage of embedded systems. Thus, testing phases at intermediate stages of system development can help: Model-in-the-Loop (MIL) Software-in-the-Loop the (SIL) Processor-in-the-Loop (HIL) Hardware-in-the-Loop (HIL) Final System Test Testen von Embedded Systems 2
Testing within the V-Model (1) The V-model for testing activities to development activities: Customer s Requirements Validation Test Requirements Document Specification System Design System Test SW Design Integration Test Module Design Unit Test Implementation Testen von Embedded Systems 3
Testing within the V-Model (2) The standard V-model already acknowledges the specific testing phases required for system verification. However, the standard V-model doesn t address the real-life requirements of early-stage product verifications. Early-stage product verification is about testing against the system requirements without having the system actually built! In reality, system components like SW and HW are developed in parallel To safe cost, early-stage testing at system level is needed to detect incompatible SW behavior before integration with final HW. Techniques are needed d to get short-circuit it verification paths within the V-model. Testen von Embedded Systems 4
Testing within the V-Model (3) Early-stage testing activities within the V-model: Customer s Requirements HIL Validation Test Requirements Document Specification MIL System Design PIL SIL System Test SW Design Integration Test Module Design Unit Test Implementation Testen von Embedded Systems 5
Model-in-the-Loop p( (MIL) Testing Model-in-the-Loop p( (MIL) MIL testing is system simulation by using a model of the system. Pro: early verification of the requirements and the algorithms of the intended solution Con: at this early stage it is difficult to reason about required processing resources. 6
Software-in-the-Loop p( (SIL) Testing Software-in-the-Loop p( (SIL) SIL testing is done by executing the software typically on a standard PC hardware. Pro: most errors in the functional domain may be already detected at this level. Con: the COTS components (compiler and processor of PC) may have different behavior than the intended target platform. 7
Processor-in-the-Loop p( (PIL) Testing Processor-in-the-Loop p( (PIL) PIL testing is done by executing the software typically on a prototypical hardware board equipped with the (planned) target processor. Pro: it is already possible to assess the concrete resource requirements of the software (timing domain, memory consumption, etc.) Con: real testing scenarios may be missed 8
Hardware-in-the-Loop p( (HIL) Testing HIL testing is done by executing the software on the embedded platform, where the environment between the actuator and the sensor is modeled by the HIL simulator. HIL testing can be done already before the complete prototype hardware of the system is build. The HIL simulator includes actuators, sensors, and the interaction chain between them. 9
HIL Testing g( (2) HIL testing vs. Final System Test Software: SW SW ECU: Environment: Prototype Execution Platform HIL Simulator Execution Platform Physical Environment 10
HIL Simulator (1) HIL Simulators are typically packed into 19 racks, being customized by HIL simulation modules: 11
HIL Simulator (2) Examples of expansion modules of a HIL simulator: HIL Simu ulator simulation modules (traction, lambda probe, etc.) programmable power supplies signal conditioning CAN gateway interface to diagnostic hardware 12
Economical aspects of HIL Testing HIL testing equipment is quite expensive compared to MIL or SIL: special hardware components are needed HIL simulator typically has to configured for each product to be tested However, HIL testing still provides cost reduction: allows to find subtle errors caused by the environment, even before the complete prototype hardware of the system is build it is significantly cheaper to find errors in the early stage of development (e.g., during HIL testing instead of testing the real prototype system) Example: with HIL testing one can test the motor control box already before the motor of the car is available (by simulating the physical characteristics of the motor). 13
Challenges of HIL Testing Testing a real system like an automotive vehicle isn t trivial: several thousands of signals may have to be connected to set-up a HIL test reconfiguration of a HIL simulator has to be fast to improve its utilization accurate models are needed to test the software under realistic operation scenarios 14
Outlook Mi, 03.12.2008 2008 Fault Injection + Example 3 15