This specification relates generally to autonomous/semi-autonomous systems and in particular to testing autonomous/semi-autonomous vehicles such as unmanned aerial vehicles (UAVs), unmanned ground vehicles (UGVs), and autonomous/semi-autonomous cars.
With advances in technologies, it is becoming possible to develop complex engineering systems with a high level of autonomy. Such “smart” systems can be developed using advanced sensing, perception, and control algorithms. All these engineered systems should be tested against requirements and specifications before being made operational. This leaves testers with significant challenges on how to test these complex intelligent autonomous systems, which often show dynamic and non-deterministic behaviors in different situations. The common practice is to design and conduct a set of experiments and create different scenarios by pushing the system to its end limits to evaluate the system's performance under different situations. Due to the safety concerns as well as time and cost constraints, the number of actual tests for an autonomous system e.g. an autonomous car or a UAV are limited. The richer the set of experiments and exposed conditions, the more reliable is the test process. To reduce risk and cost of actual test experiments, an alternative approach is to test an autonomous system and its autonomy and perception algorithms through a simulation environment, which makes it possible to run a large number of scenarios. The remaining challenge is then to check if the system under test (SUT) passes or fails the tests conducted over wide varieties of mission scenarios (possibly hundreds of thousands). On the other hand, the test results often cannot be simply determined by the comparison of the experiment/simulation results with a certain criterion/threshold, and usually require the tester to consider different conditions. For example, consider the perception algorithm of an autonomous car which should detect the traffic signs. This will require the tester to consider different system and environmental conditions such as the quality of the camera (its resolution), speed of the car, the visibility of the road, etc. It will be a cumbersome procedure, if not impossible, for a tester to check such a number of conducted tests and take into account all these system and environmental conditions.
This specification describes methods and systems for virtually testing an autonomous vehicle. In some examples, a method includes receiving status reports from a simulated system of the autonomous vehicle for each of a number of simulated scenes. The method includes outputting test results for the system of the autonomous vehicle by, for each of the simulated scenes, performing operations comprising: fuzzifying status parameters from the status report for the simulated scene into fuzzy input parameters; mapping the fuzzy input parameters through a set of rules for the system of the autonomous vehicle into fuzzy output parameters; and mapping the fuzzy output parameters into one or more crisp test result outputs.
The computer systems described in this specification may be implemented in hardware, software, firmware, or any combination thereof. In some examples, the computer systems may be implemented using a computer readable medium having stored thereon computer executable instructions that when executed by the processor of a computer control the computer to perform steps. Examples of suitable computer readable media include non-transitory computer readable media, such as disk memory devices, chip memory devices, programmable logic devices, and application specific integrated circuits. In addition, a computer readable medium that implements the subject matter described herein may be located on a single device or computing platform or may be distributed across multiple devices or computing platforms.
This specification describes methods and systems for testing autonomous systems. This specification describes a virtual tester, which replaces the human operator (tester) in the initial phases of processing of tests results by capturing his knowledge and incorporating it into the test process without requiring the human operator to actually involve in the initial phase of the process. As a result, tester can focus only on processed/refined test results. We use a Fuzzy Logic System to model the human knowledge as well as capturing the logistic uncertainty that exist during the modelling process. The automated tester can be used both for actual test experiments and in conjunction with a simulation environment; however, typically, the developed virtual tester is integrated with a simulation environment or a hardware in the loop simulator, which allows to test a system for a huge number of simulation runs. The Fuzzy Logic System captures the expert knowledge about the system and its expectation levels of performance, which then is used to compare the actual and truth data and judge/evaluate the mismatches, if any.
System Overview
Testing in simulation environment makes it possible to test autonomous systems, such as autonomous cars and UAVs, in a large number of possible scenarios. These days, there are a number of simulation tools that can conduct these simulations and generate test data. This specification describes an autonomous testing framework to use the generated simulation data to test a system.
The SUT 104 can be, for example, the image-based target detection system of a UAV which is configured to detect a target. The simulation environment 106 is configured to generate a wide variety of mission scenarios. For example, for testing the image-based target detection of a UAV, a particular scenario may include a target at a certain location along with the flight simulation data and UAV reports about the detection of the target. The virtual tester 102 models the human tester activities and mimics the tester decision making whether a SUT passes or fails a test.
The virtual tester 102 sets the simulation environment parameters 202 such as flight parameters, environmental factors, and geographical locations. For instance, for testing the image-based target detection of a UAV, the simulation environment parameters 202 can include UAV speed, UAV altitude, visibility of the environment, light level, and size of the target with respect to the size of field of view (FOV).
The simulation environment 106 generates different scenes 204 based on the simulation environment parameters 202. For instance, for testing the image-based target detection of a UAV, a particular scene includes the target at a particular location and the environmental conditions, over which the UAV flies to search for the target.
The SUT 104 reports, e.g., its status and perception in the SUT reports 206. For instance, for testing the image-based target detection of a UAV, the UAV reports whether a target is detected or not.
In some examples, the SUT 104 and the simulation environment 106 together form a hardware-in-the-loop (HIL) simulator. Various types of HIL simulators can be appropriate for the computer system 100.
Virtual Tester
The scene parameters set up block 302 generates the environment characteristics and flight parameters in which the SUT 104 operates within. For example, the following parameters can be used to characterize a scene:
In some cases, all possible combinations of the parameters (resulted from a grid search) can be used in the test to cover all possible cases.
The rule-based knowledge database 304 contains a collection of “IF-THEN” statements using fuzzy terms. Rules model characteristics of the system can be based on experts' knowledge. The rules can be pre-programmed into the system from an outside source. For example, for testing the image-based target detection of a UAV, if we use five parameters, flight altitude, flight speed, light level, environment visibility, and imager characteristics (e.g., the size of the target with respect to the size of FOV), one of the rules may be:
Fuzzy Logic System
The fuzzifier fuzzifies input parameters to handle uncertainty. This mimics how humans perceive parameters with relative terms. For example, for a RQ-11 Raven, a flight altitude of 700 ft AGL (Above Ground Level) is mapped into “Low” altitude or a flight speed of 100 kn (nautical mile per hour) is mapped into “Fast” speed. Similar fuzzy terms will be assigned for all input parameters and vehicle types.
In the fuzzy inference engine, fuzzy logic principles are used to map fuzzy input sets that flow through an IF-THEN rule (or a set of rules), into fuzzy output sets. Each rule is interpreted as a fuzzy implication.
Output processing comprises a defuzzifier that maps a fuzzy output of the inference engine to a crisp output (e.g., ‘1’ for the case that the UAV should detect the target if it is in FOV and ‘−1’ for the case that the UAV does not have to detect a target).
Mathematical Foundation of Fuzzy Logic System (FLS)
This section explains the mathematical background of the fuzzy logic system based on [1,2]. Here we consider the SUT perception as a simple binary classification.
Let X represent a set of p inputs of SUT and scene parameters, i.e., X={x1, x2, . . . , xp} and y is an output of the fuzzy system such as whether a target should have been detected (represented as ‘1’) or does not have to be detected (represented as ‘−1’).
The fuzzifier maps a crisp input x′i in X={x1, x2, . . . , xp} into a fuzzy value; i.e., it maps a specific value x′ into μF
Rules are sets of IF-THEN statements that model the system. A rule Rl: Al→Gl with Al=Fli× . . . ×Flp, can be represented as:
R
l
: IF x
1 is Fl1 and . . . ,xp is Flp, THEN y is Gl
where Fli is the ith antecedent (input) MF and Gl is the consequent (output) MF of the lth rule.
For the consequent, crisp values +1 and −1 are used. For example, in the image-based detection of a target, +1 is used for ‘should detect the target if in FOV’ and −1 is used for ‘does not have to detect’.
y
l={1,detection and −1,non-detection}
Correspondingly, for the consequent sets, Gl, the MFs can be defined as
μG
where yl could be either +1 for ‘detection’ or −1 for ‘non-detection’.
The membership function of each fired rule can be calculated using a t-norm as:
μB
where μF
Using height defuzzification, the output using M rules can be calculated as
A decision can be done based on
If y(x)>0, ‘detection’ and else ‘non-detection’.
The confidence level of the test results then can be captured as
Comparator
The comparator 308 is configured to compare the truth data from the simulation environment, SUT, and the SUT reports taking into account the outputs of fuzzy logic system. For example, if there is a mismatch between the truth data and SUT output, then the virtual tester verifies if it is reasonable or the test has been failed. For this purpose, the virtual tester looks at the output of fuzzy logic system. If the fuzzy logic output is +1 the UAV should detect the target if it is in FOV and the mismatch is not acceptable. The complete logic of the comparator for a perception of an autonomous car/UAV on detecting a traffic sign or a target is shown in Table 1.
A test report table is automatically generated as shown in Table 2. It provides a detailed explanation of the test along with a reason why car/UAV fails to detect. This includes test id and date, scenario type (that UAV was under test), test result, and the top rules fired with their firing strength. It hints the tester why car/UAV fails the test and how to retest for next phase.
Test Results Analysis
To analyze the test results, the tester needs to first check the report table. Tester can get a summary of the test. If tester further needs to know the reason of why SUT fails, he/she can examine the top fired rules. The test also provides a visualization that shows the inputs and their fuzzified values, rules and their firing level, which the determines the contribution of each rule to overall output, rule output (should have been detected/not detected), and the test results.
Parallel Processing
The test performed on a single case scenario can be extended for automatic testing for a batch of scenarios. Compared to single scenario testing, in batch testing, our aim is to test the system for all, or many, possible operation scenarios. For this purpose, we used Latin Hyper-Cube Sampling technique to generate different simulation parameters to fairly span the operation space and environment conditions. With the batch scenario testing, data parsing, pre-processing, and FLS processing are all performed automatically and in parallel.
Multiple processors execute FLS calculations simultaneously to reduce the overall processing time. The results of all processors are then joined and saved as output data 914. This is implemented using Python multiprocessing package calling our developed FLS calculations (implemented as a class), in which each processors executes the FLS class for each data chunk as a single job.
Further, the batch scenario testing process is aided by a Graphical User Interface (GUI) that can be used for scenario selection, input parameter modification, and output display. The GUI also presents the results/reports in an organized way so that the tester can access a summary report for the whole batch test as well as the results of individual test scenarios for further analysis using GUI.
The bottom right window in
Although specific examples and features have been described above, these examples and features are not intended to limit the scope of the present disclosure, even where only a single example is described with respect to a particular feature. Examples of features provided in the disclosure are intended to be illustrative rather than restrictive unless stated otherwise. The above description is intended to cover such alternatives, modifications, and equivalents as would be apparent to a person skilled in the art having the benefit of this disclosure.
The scope of the present disclosure includes any feature or combination of features disclosed in this specification (either explicitly or implicitly), or any generalization of features disclosed, whether or not such features or generalizations mitigate any or all of the problems described in this specification. Accordingly, new claims may be formulated during prosecution of this application (or an application claiming priority to this application) to any such combination of features. In particular, with reference to the appended claims, features from dependent claims may be combined with those of the independent claims and features from respective independent claims may be combined in any appropriate manner and not merely in the specific combinations enumerated in the appended claims.
This application claims the priority benefit of U.S. Provisional Patent Application Ser. No. 62/961,023, filed Jan. 14, 2020, the disclosure of which is incorporated herein by reference in its entirety.
This invention was made with government support under contract #W900KK-17-C-0002 awarded by the Department of Defense (DoD) Test Resource Management Center (TRMC) and the National Science Foundation (NSF) under award number 1832110. The government has certain rights in the invention.
Number | Date | Country | |
---|---|---|---|
62961023 | Jan 2020 | US |