Application of Rule-Based Expert Systems and Dynamic-Link Libraries to Enhance Hardware-in-The-Loop Simulation Results

Pedro Miguel Ortega-Cabezas, partment of Electric, Electronic and Control Engineering, UNED, Juan del Rosal, 12, Ciudad Universitaria, 28040 Madrid, Spain., Antonio Colmenar-Santos, David Borge-Diez, Jorge Juan Blanes-Peiró
2019 Journal of Software  
New and innovative techniques to validate software are needed to reduce cost and increase software quality. This research focuses on the validation of engine electronic control unit software by using expert systems (EXs) and dynamic link libraries (dlls) with the aim of checking if this technique performs better than traditional ones. To do this, a test-case database was built and run by using hardware-in-the-loop (HIL) simulations to validate a series of software modules (SMs) by using these
more » ... chniques: the tester-in-the-loop, automation by using a Python script, the model-based testing and EXs combined with dlls with the aim of assessing several factors such as: productivity gain, bug detection skills, functional coverage assessment, ease to automate test-cases among others. Dlls and EXs improve the HIL success rate by 4.8%, 6% and 20% at least, for simple, fairly-complex, and highly-complex SMs, respectively. Between 9 and 13 more bugs were found when using the EXs and dlls compared with other techniques. Two of the bugs would have required software not initially planned as they were linked to environmental policies. The proposed technique can be applied to any types of a SM, especially in those cases in which traditional validation techniques fail. present in the network interact properly [4], [5] . The process of software validation of an ECU implies significant costs for the companies during a project because of the means necessary to carry out this activity [6], [7] . In addition, the cost of correcting bugs, once the software is marketed, is high and it can tarnish the brand's image [8], [9] . Consequently, a balance between costs, deadlines, and quality must be reached. Powertrain 2 control is a system in charge of transforming the driver's will into an operating point of the powertrain according to the performance established for the product [10]. The key element of the control system is the engine ECU composed of complex hardware and software. The engine ECU (hardware and software) must be validated to assure that engine is properly controlled, the interaction with the rest of the ECUs is rightly performed and the passengers' safety is insured. Thus, one can deduce that the software validation process is complex and needs improvements with the aim of reducing costs, increasing productivity and reliability in the automotive sector [11], [12]. This research is focused on the engine ECU software validation and shows solutions to the main difficulties associated with traditional software validation techniques by using expert systems (EXs) and dynamic-link libraries (dlls) during the hardware-in-theloop (HIL) simulation. The technique proposed in this research performs better than traditional techniques and allows improving: ease for automating testcases, bug detection skills, functional coverage, difficulties to detect bugs linked to SMs that do many calculations and the difficulties to validate the software automatically among others. In addition, it shows that the HIL simulation can be automated in an easier way. All these topics are analyzed in-depth in this paper. Related Works The code and functional coverage is a real concern when validating a software. Research has been conducted on this topic to enhance this parameter [13], [17] . Therefore, test-case generation is a key issue. The black-box technique has been used for a long time in the automotive sector, as discussed by Conrad [18] . Despite its widespread use, it is true that it has some weak points as discussed by Chundur, Felt, and Adenmark [19]. In their dissertation, they consider that test-cases based on the engineers' experience usually imply gaps and test-redundancies. The model-based testing technique is an option to assess the code and functional coverage rate. The generation and execution of test-cases based on models have been proposed on several occasions. For instance, Skruch and Buchala (DELPHI supplier) proposed a study based on models [20] . The tool Automation Desk (dSpace®) was used. Raffaelli et al presented research focused on functional models by using the commercial software Matelo® [21], [22] . The HIL simulation should be carried out as quickly as possible and with the highest number of test cases executed to ensure the time-frame and quality of the project [23] . Test automation is essential to ensure a high code coverage and to improve reliability [24], [26] . There are many ways for automating HIL simulation in the market [27], [28] . The automation process is mainly based on black-box techniques such as exposed by Lemp, Ko hl and Plo ger: "As a rule, the tests specified by the ECU departments are first performed as black box tests on the network system (know-how on software structures is not taken)". The HIL simulation implies that a specific operating point is reached by the engine ECU. This can be extremely complicated, requiring a lot of manipulations on the HIL model due to software module (SM) interactions. There are three possible ways for executing a given test-case in an HIL simulation. Firstly, executing the test-case manually, that is, a technician performs all the necessary actions in the HIL simulation to reach the desired operating point. Secondly, the "tester-on-the-loop" concept can be used. 2 Powertrain is composed of the clutch, gearbox, conical group and propeller shaft. 3 It is essential to clarify the meaning of software performance. Usually, this concept is linked to the software behavior and the execution time among other factors. In this case-study, the execution time is not considered as the supplier in charge of coding the software must guarantee a CPU charge lower than 80%. When using this concept in this paper, the meaning is that the software is properly coded, but it does not behave well due to a design error (specification issue). In other words, for that specific case, the engine ECU does not control the vehicle correctly. 4 In this research, the term use-case is employed in the automotive meaning way. It refers to a specific operating point that the driver makes the vehicle operate. Many bugs in the engine ECU software come from situations (operating points) not considered by the design team. Gain trend versus productivity (measured in hours) According to the SM type, the relationship between the number of test-cases and the productivity gain (measured in hours) versus the manual test-case execution Fig. A.I. Shows the results obtained after the execution of 120 HIL simulations involving the speed value.
doi:10.17706/jsw.14.6.265-292 fatcat:kppew52blfbvhdcwxctqb6cmwy