The present application claims the benefit under 35 U.S.C. § 119 of German Patent Application No. DE 102019209540.2 filed on Jun. 28, 2019, which is expressly incorporated herein by reference in its entirety.
The present invention relates to a method for optimal distribution of test cases among different testing platforms. The present invention furthermore relates to a corresponding apparatus, to a corresponding computer program, and to a corresponding storage medium.
In software engineering, the utilization of models in order to automate testing activities and generate test artifacts in the testing process is referred to in general as “model-based testing” (MBT). The generation of test cases from models that describe the intended behavior of the system being tested is, for example, sufficiently known.
Embedded systems, in particular, rely on coherent input signals of sensors, and in turn stimulate their environment by way of output signals to a wide variety of actuators. In the course of verification and preliminary development phases of such a system, a model (model in the loop, MiL), software (software in the loop, SiL), processor (processor in the loop, PiL), or overall hardware (hardware in the loop, HiL) of a control loop is therefore simulated in that loop together with a model of the surroundings. In automotive engineering, simulators in accordance with this principle for testing electronic control devices are in some cases referred to, depending on the test phase and test object, as component test stands, model test stands, or integration test stands.
German Patent Application No. DE 10303489 A1 describes a method for testing software of a control unit of a vehicle, in which a controlled system controllable by the control unit is at least partly simulated by a test system by the fact that output signals are generated by the control unit and those output signals of the control unit are transferred to first hardware modules via a first connection and signals of second hardware modules are transferred as input signals to the control unit via a second connection, the output signals being furnished as first control values in the software and additionally being transferred via a communication interface to the test system in real time with reference to the controlled system.
Simulations of this kind are common in various technological sectors and are utilized, for example, in order to test embedded systems in power tools, in engine control devices for drive systems, steering systems, and braking systems, or even in autonomous vehicles, for suitability in their early development phases. The results of simulation models according to the existing art are nevertheless incorporated only to a limited extent in release decisions due to a lack of confidence in their reliability.
The present invention provides, e.g., a method for optimal distribution of test cases among different testing platforms; a corresponding apparatus; a corresponding computer program; and a corresponding storage medium.
The approach according to the present invention is based on the recognition that the models are generally validated, and their trustworthiness evaluated, on the basis of specially selected validation measurements. In working groups and projects, criteria are developed for when a simulation is considered reliable and when real tests can be replaced by simulations. Simulation models in many cases are validated on the basis of expert knowledge and quantitative metrics. An established method with which, on the basis of validation measurements, the accuracy of a simulation-based test can be quantitatively determined does not yet seem to exist.
In light of the above, an example method in accordance with the present invention formalizes the requirement for a test case in such a way that it is met if a variable (KPI) that characterizes the requirement is above a predefined threshold and if uncertainties are taken into account. Those uncertainties can be caused by uncertainties in the system, statistical dispersions of parameters, or model errors. In the case of the model (10) shown in
In practice, real tests can be carried out only for a limited number of points in the parameter space (14). Search-based testing (SBT) is used to determine, in an iterative process based on predefined criteria, the closest respective point in the parameter space at which a simulation or a real experiment is to be carried out.
Based on the simulations and measurements that have been carried out for model validation, a statement is made regarding the trustworthiness of the simulation with regard to a test case. The example method according to the present invention makes it possible to evaluate the accuracy of a simulation model with regard to a test case even if the relevant test has not been carried out in reality using the same parameter set. The methods presented furthermore provide a test strategy for ascertaining the test cases in a large test space. The algorithms furthermore provide indicators as to which test cases were ascertained in reality and which were ascertained on the basis of simulation. Several problems are investigated in the present document. For each of these problems, a variety of procedures exist which differ in that the tester or simulation engineer possesses different information.
A first problem relates to estimating uncertainties based on simulation models and real measured data, and evaluating how much influence those uncertainties have on the result of test cases. On that foundation, new test cases are determined which are investigated in the simulation or the real test.
A second problem relates to deriving requirements as to the accuracy of simulation models on the basis of test cases. The accuracy that is necessary depends on the selection of test cases. Those requirements can be used to define additional validation measurements or to improve the model.
The validation of models is usually carried out on the basis of predefined stimuli. The results of the simulation and of the real measurement are compared based on expert knowledge and quantitative metrics (e.g. per ISO 18571). Once the model is validated, it is then assumed that the simulation also provides a credible result in a context of other stimuli.
The example embodiment of the present invention makes it possible to create a direct correlation between validation measurements and the simulation accuracy with regard to a test case. The method supplies indicators as to which test cases were tested in reality, and which based on simulation.
Advantageous refinements of and improvements to the example embodiment of the present invention are possible due to the features described herein.
Exemplifying embodiments of the present invention are depicted in the figures and are explained in further detail below.
Both real measurements and simulation data are used to create the metamodels (24, 25). These metamodels are updated when new data are available, and in some cases acquire uncertainties from the data. The two metamodels (24, 25) are combined into one new metamodel (27) using a method (23), as soon as the metamodels (24, 25) are updated on the basis of new data (22, 23). The metamodel (27) thus permits both a prediction of new data and a combined prediction of the uncertainties based on data from the simulation (22) and from real measurements (23). The combination (27) can be effected using various approaches, for instance (but not exclusively):
The combined metamodel (27) is used by a test generation method (28) to generate new test cases (21). One embodiment of the test generation method (28) is, for instance, SBT. The methods that are presented in more detail in the sections below can be construed as special cases of or supplements to this method (20).
For this purpose, in the first step the deviation (Δ) between the real measurements and the experiments is considered. Typical error patterns, for example phase shifts, amplitude errors, or typical additive signals such as oscillations, are derived from the signal comparison. These errors are considered at one or several points in the test space on the assumption that the simulated signal profiles exhibit similar error patterns at different points in the test space and can be rescaled, for example with regard to unmodeled physical effects or similar types of uncertainty. No consideration is given to how those errors occur. Instead, heuristic error models are used which reproduce the observed deviations. At points in the test space which have not been considered in reality, those error models are used as the basis for simulating (22) a “simulation error” and the effect of uncertainties. With the aid of the ascertained uncertainties and the SBT method (28), those regions in the parameter space at which the risk of violating the test case (32) is high are ascertained.
The method is similar to the method depicted in
This method as well is similar to the method depicted in
This method is similar to the method depicted in
This method can be implemented, for example, in software or hardware or in a mixed form of software and hardware, for example in a workstation (70) as illustrated by the schematic depiction of
Example embodiments of the present invention are further described in the following paragraphs.
Paragraph 1. A method (20) for optimal distribution of test cases among different test platforms (21) for a simulation (22) and test environment (23) of a system embedded in particular in an at least semi-autonomous robot or vehicle,
Paragraph 2. The method as recited in Paragraph 1, characterized by the following features:
Paragraph 3. The method (20) as recited in Paragraph 2, characterized by the following feature:
Paragraph 4. The method (20) as recited in Paragraph 3, characterized by the following feature:
Paragraph 5. The method (20) as recited in one of Paragraphs 2 to 4, wherein the error patterns or signal patterns (40) encompass at least one of the following:
Paragraph 6. The method (20) as recited in one of Paragraphs 1 to 5, characterized by the following feature:
Paragraph 7. The method (20) as recited in one of Paragraphs 1 to 6, characterized by the following features:
Paragraph 8. The method (20) as recited in one of Paragraphs 1 to 7, wherein an automatic improvement of errors in the system which are recognized by the simulation (22) is accomplished by the optimization (28).
Paragraph 9. A computer program that is configured to execute the method (20) as recited in one of Paragraphs 1 to 8.
Paragraph 10. A machine-readable storage medium on which the computer program as recited in Paragraph 9 is stored.
Paragraph 11. An apparatus (70) that is configured to execute the method (20) as recited in one of Paragraphs 1 to 8.
Number | Date | Country | Kind |
---|---|---|---|
102019209540.2 | Jun 2019 | DE | national |