.lu
software verification & validationV V S
Automated Testing
- f Autonomous Driving Assistance
Systems
Lionel Briand
VVIoT, Sweden, 2018
S V V .lu software verification & validation Automated - - PowerPoint PPT Presentation
S V V .lu software verification & validation Automated Testing of Autonomous Driving Assistance Systems Lionel Briand VVIoT, Sweden, 2018 Collaborative Research @ SnT Research in context Addresses actual needs Well-defined
.lu
software verification & validationVVIoT, Sweden, 2018
2
3
4
5
6
7
rather than specify and code
8
9
10
11 Functional modeling:
Continuous and discrete Simulink models Model simulation and testing
Architecture modelling
System engineering modeling (SysML) Analysis:
testing
change impact analysis
(partial) Code generation
Deployed executables on target platform Hardware (Sensors ...) Analog simulators Testing (expensive)
Hardware-in-the-Loop Stage Software-in-the-Loop Stage Model-in-the-Loop Stage
12
Sensor Controller Actuator Decision Plant
13
pedestrians …
pedestrians and cars
14
15
16
17
17
“Brake-request” when braking is needed to avoid collisions
Decision making
Vision (Camera) Sensor Brake Controller Objects’ position/speed
18
19
20
SUT
Simulator
Ego Vehicule (physical plant) Pedestrians Other Vehicules
Outputs Time-stamped vectors for:
plant and the mobile environment objects
sensors cameras actuators
Environment mobile objects static aspects Dynamic models Inputs
physical plant and the mobile environment
aspects
Feedback loop
21
22
decision tree classification models
safety violations
tests faster towards the most critical regions, and characterize failures
to better characterize critical regions of the ADAS input space
23
VisibilityRange
FogColor
Weather
Real
Road
1
Vehicle
Pedestrian
Real
Test Scenario
1 1
«enumeration» RainType
«enumeration» SnowType
«enumeration» FogColor
1
WeatherC
{{OCL} self.fog=false implies self.visibility = “300” and self.fogColor=None}
Straight
RampHeight
Ramped
CurvedRadius
Curved
SnowType
Snow
RainType
Rain Normal
«enumeration» CurvedRadius (CR)
«enumeration» RampHeight (RH)
«enumeration» VisibilityRange
Real
AEB Output
Output functions Mobile
Position vector
Position
1 1 1 1 1
Static input
1
Output
1 1
Dynamic input xp yp vp θp vc v3 v2 v1 F1 F2
as a search problem
certain properties, i.e., constraints
loops, …): complex, discontinuous, non-linear search spaces (Baresel)
(metaheuristics), from local search to global search, e.g., Hill Climbing, Simulated Annealing and Genetic Algorithms
Fitness Input domain
Genetic Algorithms are global searches, sampling man
“Search-Based Software Testing: Past, Present and Future” Phil McMinn Genetic Algorithm
25 Input domain
portion of input domain denoting required test data randomly-generated inputs
Random search may fail to fulfil low-probability
26
Individual A Pareto dominates individual B if A is at least as good as B in every objective and better than B in at least one objective.
Dominated by x
F1 F2 Pareto front x
27
All points
Count 1200 “non-critical” 79% “critical” 21% “non-critical” 59% “critical” 41% Count 564 Count 636 “non-critical” 98% “critical” 2% Count 412 “non-critical” 49% “critical” 51% Count 152 “non-critical” 84% “critical” 16% Count 230 Count 182
vp
0 >= 7.2km/h
vp
0 < 7.2km/h
θp
0 < 218.6
θp
0 >= 218.6
RoadTopology(CR = 5, Straight, RH = [4 − 12](m)) RoadTopology (CR = [10 − 40](m))
“non-critical” 31% “critical” 69% “non-critical” 72% “critical” 28%
the field of view, the car speed at the time of collision, and the probability that the object detected in front of the car is a pedestrian
precipitation, fogginess, road shape, visibility range, car-speed, person- speed, person-position (x,y), person-orientation
28
label each scenario as critical or non-critical
critical region non-critical region non-critical region conditions yes no critical scenario non-critical scenario conditions yes no
the elements inside each critical leaf
NSGAII Mutation and crossover NDS Select best scenarios
The new scenarios are added to the initial population
decision tree (step 2)
most critical region conditions yes no conditions yes no
Region in the input space that is likely to contain more critical scenarios
All points
Count 1200 “non-critical” 79% “critical” 21% “non-critical” 59% “critical” 41% Count 564 Count 636 “non-critical” 98% “critical” 2% Count 412 “non-critical” 49% “critical” 51% Count 152 “non-critical” 84% “critical” 16% Count 230 Count 182
vp
0 >= 7.2km/h
vp
0 < 7.2km/h
θp
0 < 218.6
θp
0 >= 218.6
RoadTopology(CR = 5, Straight, RH = [4 − 12](m)) RoadTopology (CR = [10 − 40](m))
“non-critical” 31% “critical” 69% “non-critical” 72% “critical” 28%
We focus on generating more scenarios in the critical region, respecting the conditions that lead to that region
30
All points
Count 3367 “non-critical” 58% “critical” 42% “non-critical” 43% “critical” 57% Count 2198 Count 1169 “non-critical” 88% “critical” 12% Count 338 “non-critical” 17% “critical” 83% Count 1860 “non-critical” 47% “critical” 53% “non-critical” 42% “critical” 58% Count 1438 Count 422 “non-critical” 64% “critical” 36% Count 553 “non-critical” 29% “critical” 71% Count 885 “non-critical” 51% “critical” 49% “non-critical” 37% “critical” 63% Count 548 Count 337 “non-critical” 73% “critical” 27%
xp
0 >= 37.4 ∧ RoadTopology
(Straight, RH = [4 − 12]) xp
0 < 37.4
∧ RoadTopology (Straight, θp
0 < 232.5
θp
0 >= 232.5
xp
0 < 33
xp
0 >= 33
θp
0 >= 185.6
θp
0 < 185.6
yp
0 < 57.7
yp
0 >= 57.7
∧ ∧ ∧ ∧ ∧ ∧ RoadTopology RoadTopology RoadTopology RoadTopology RoadTopology RoadTopology (Straight, (CR = [5 − 40]) (CR = [5 − 40]) (CR = [5 − 40]) (CR = [5 − 40]) (Straight, CR = [5 − 40], CR = [5 − 40]) CR = [5 − 40]) CR = [5 − 40])
31
32
33
HV 0.0 0.4 0.8 GD 0.05 0.15 0.25 SP 2 0.6 1.0 1.4 6 10 14 18 22 24 Time (h)
NSGAII-DT NSGAII
34
35
GoodnessOfFit RegionSize
1 5 6 4 2 3 0.40 0.50 0.60 0.70
tree generations (b)
0.80 7 1 5 6 4 2 3 0.00 0.05 0.10 0.15
tree generations (a)
0.20 7
GoodnessOfFit-crt
1 5 6 4 2 3 0.30 0.50 0.70
tree generations (c)
0.90 7
50m 76m 36m 32m
θ
[15m-40m] vehicle speed > 36km/h pedestrian speed < 6km/h
36
road sidewalk
37
38
39
actuators sensors feature n feature 2 feature 1
Integration component
System Under Test (SUT)
. . .
cameras
40
41
SUT
Simulator
Ego Vehicule (physical plant) Pedestrians Other Vehicules
Outputs Time-stamped vectors for:
plant and the mobile environment objects
sensors cameras actuators
Environment mobile objects static aspects Dynamic models Inputs
physical plant and the mobile environment
aspects
Feedback loop
42
43
and camera data
features are correct
is far away, while a pedestrian starts crossing the road. PP starts sending braking commands to avoid hitting the pedestrian.
complex environment
environment
44
45
46
test objectives (fitness functions)
likely to reveal integration failures leading to safety violations
integration component
47
48
49
component
the individual feature outputs, in such a way as to possibly lead to safety violations.
integration component issues no braking command or a braking command with a lower force than that of f .
50
51
52
Indicates that tc has not covered the branch j Branch covered but did not caused unsafe override of f Branch covered, unsafe override, but did not violate requirement I
branches and all safety requirements
hitting the leading car in one test case
53
54
Randomly generated TCs Compute fitness Tests are evolved Crossover, mutation Fittest tests selected Correct constraint violations Archive covering tests
55
2 4 6 8 10 12 1 2 3 4 5 6 7
FITest Baseline
Time (h) Number of Integration errors
56
diversity in the physical environment, including many possible scenarios.
unacceptable situations (safety)
some key (decision) components based on ML
early stages
57
(e.g., safety requirements)
58
59
60
61
62
.lu
software verification & validationVVIoT, Sweden, 2018