Risk Structures: Concepts, Purpose, and the Causality Problem
Mario Gleirscher University of York, UK June 26, 2019
Shonan, JP
Risk Structures: Concepts, Purpose, and the Causality Problem Mario - - PowerPoint PPT Presentation
Risk Structures: Concepts, Purpose, and the Causality Problem Mario Gleirscher University of York, UK June 26, 2019 Shonan, JP Part I Risk-aware Systems: Abstraction by Example 4.0 / Gleirscher / Shonan, JP/ June 26, 2019 52 Example:
Mario Gleirscher University of York, UK June 26, 2019
Shonan, JP
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
52
Example: Air-traffjc Collision Avoidance System (TCAS) Example: Safe Autonomous Vehicle (SAV)
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
53
Risk Mitigation / Intervention / Enforcement
Approach: Active safety monitors, enforcement monitors
System/ Process Model MDP, LTS, HA Risk Structure Active Monitor Test model Active Monitor Implemen tation Monitored Process a b s t r a c t s f r
abstracts from synthesised from conforms to r e c
n i s e s / e n f
c e s p r
e r t y
RQ: How to build a mitigation monitor? / Which model to use? / Which abstraction? / What do we need to verify?
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
56
Example: Traffjc Collision Avoidance System (TCAS) Ego
Risk Model R Process Model P abstracts from p1 p4 e.g. red ”
1`severity 1`benefit ą c
p6 rl, uq mov Λ : coll 1 ´ Λ : fj n
1 Risk Factor
0coll tp1, p6u start coll tp4u
collision
t✘✘ m
{ ecoll u t ? u Σztmov{ecollu Σztmov{finu
2 Risk Factors before
0ncoll tp1, p3, p4, p6u start ncoll tp2, p5u
near-collision
t✘✘
✘
tmov{encollu t✘✘
✘
tmov{finu Σzttmov{encollu Σzttmov{finu
p1 start p2 p3 p4 rl4, u4q p5 rl5, u5q p6 mov Λ2 : encoll 1 ´ Λ2 : fin a1 a2 (TCAS move) tmov Λ5 : encoll Λ4 : ecoll a3 Λ6 : fin a5 a4
0ncoll, 0coll ncoll, 0coll 0ncoll, coll ncoll, coll e
n c
l
✚ ✚
e
c
l
ecoll encoll mncoll “ t m
{ f i n
✚ ✚
m “ mov{fin ěm
Risk Space
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
57
Example: Traffjc Collision Avoidance System (TCAS) Ego
Risk Model R Process Model P abstracts from p1 p4 e.g. red ”
1`severity 1`benefit ą c
p6 rl, uq mov Λ : coll 1 ´ Λ : fj n
1 Risk Factor
0coll tp1, p6u start coll tp4u
collision
t✘✘ m
{ ecoll u t ? u Σztmov{ecollu Σztmov{finu
2 Risk Factors before
0ncoll tp1, p3, p4, p6u start ncoll tp2, p5u
near-collision
t✘✘
✘
tmov{encollu t✘✘
✘
tmov{finu Σzttmov{encollu Σzttmov{finu
p1 start p2 p3 p4 rl4, u4q p5 rl5, u5q p6 mov Λ2 : encoll 1 ´ Λ2 : fin a1 a2 (TCAS move) tmov Λ5 : encoll Λ4 : ecoll a3 Λ6 : fin a5 a4
0ncoll, 0coll ncoll, 0coll 0ncoll, coll ncoll, coll e
n c
l
✚ ✚
e
c
l
ecoll encoll mncoll “ t m
{ f i n
✚ ✚
m “ mov{fin ěm
Risk Space
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
58
Example: Traffjc Collision Avoidance System (TCAS) Ego
Risk Model R Process Model P abstracts from p1 p4 e.g. red ”
1`severity 1`benefit ą c
p6 rl, uq mov Λ : coll 1 ´ Λ : fj n
1 Risk Factor
0coll tp1, p6u start coll tp4u
collision
t✘✘ m
{ ecoll u t ? u Σztmov{ecollu Σztmov{finu
2 Risk Factors before
0ncoll tp1, p3, p4, p6u start ncoll tp2, p5u
near-collision
t✘✘
✘
tmov{encollu t✘✘
✘
tmov{finu Σzttmov{encollu Σzttmov{finu
p1 start p2 p3 p4 rl4, u4q p5 rl5, u5q p6 mov Λ2 : encoll 1 ´ Λ2 : fin a1 a2 (TCAS move) tmov Λ5 : encoll Λ4 : ecoll a3 Λ6 : fin a5 a4
0ncoll, 0coll ncoll, 0coll 0ncoll, coll ncoll, coll e
n c
l
✚ ✚
e
c
l
ecoll encoll mncoll “ t m
{ f i n
✚ ✚
m “ mov{fin ěm
Risk Space
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
58
Risk Mitigation / Intervention / Enforcement
Approach: Active safety monitors, enforcement monitors
System/ Process Model MDP, LTS, HA Risk Structure Active Monitor Test model Active Monitor Implemen tation Monitored Process a b s t r a c t s f r
abstracts from synthesised from conforms to r e c
n i s e s / e n f
c e s p r
e r t y
RQ: How to build a mitigation monitor? / Which model to use? / Which abstraction? / What do we need to verify?
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
62
SAV: Low Level Vehicle Dynamics
r9 p “ 0, 9 v “ 0s v “ 0 ^ a “ 0
start
halt r9 p “ v, 9 v “ as 0 ă v ă l ^ a ą 0 accel r9 p “ v, 9 v “ 0s v “ l ^ a “ 0 drive at max speed r9 p “ v, 9 v “ as 0 ă v ă l ^ a ď 0 decel a ą 0 v = l a ă 0 a ą 0 a ď 0 v = 0
α “ 0s α “ 0
start
neutral r 9 α “ fs 0 ă y ă 5 turn left r 9 α “ 0s α ‰ 0 move straight r 9 α “ fs ´5 ă y ă 0 turn right y ą 0 ^ |v| ą 0 9 α “ 0 ^ α ‰ 0 y ą 0 ^ |v| ą 0 9 α “ 0 ^ α “ 0 y ă 0 ^ |v| ą 0 9 α “ 0 ^ α ‰ 0 y ă ^ | v | ą α “ 0 ^ 9 α “ 0
Longitudinal dynamics LoD
drive halt accel decel drive at max speed
Lateral dynamics LaD (relative to route segment)
neutral turn left turn right move straight
Overall low-level dynamics: drive LaD
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
63
SAV: Situational Perspective of Urban Driving
Mode model of the driving activity:
basic || supplyPower drive driveAtL4 || requestTakeOverByDr driveAtL1 || operateVehicle driveAtLowSpeed driveAtL4Generic exitTunnel driveThroughCrossing parkWithRemote autoOvertake driveAtL1Generic manuallyOvertake autoLeaveParkingLot manuallyPark leaveParkingLot steerThroughTrafficJam halt start
Integration with low level dynamics: In each mode, verify contract: inv ^ pre ñ wppdrive LaD, inv ^ postq
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
64
SAV: Risk Identifjcation and Assessment
Knowledge sources for risk/hazard identifjcation, e.g.
Analysis techniques, e.g.
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
65
SAV: Situational Perspective of Urban Driving
Mode model of the driving activity:
basic || supplyPower drive driveAtL4 || requestTakeOverByDr driveAtL1 || operateVehicle driveAtLowSpeed driveAtL4Generic exitTunnel driveThroughCrossing parkWithRemote autoOvertake driveAtL1Generic manuallyOvertake autoLeaveParkingLot manuallyPark leaveParkingLot steerThroughTrafficJam halt start
Risk factors (Yap script):
1 HazardModel for "drive" { 3 OC alias "on occupied course" ; 5 CR alias "increased collision risk" ; 7 CC alias "on collision course" ; 9 ICS alias "inevitable collision state" ; 11 Coll alias "actual collision" ; 13 ES alias "perception system fault" ; 15 } 4.0 / Gleirscher / Shonan, JP/ June 26, 2019
66
Risk Structures: Tool Support and Recent Publications
nColl Coll prvnColl
c
enColl eColl
1 OperationalSituation "generic" {} 3 ControlLoop "Robot" for "generic" { emgBr alias "Emergency Brake"; 5 } 7 HazardModel for "generic" { nColl alias "near-collision" 9 mitigatedBy (PREVENT_CRASH.emgBr) direct; 11 Coll alias "collision" requires (nColl) 13 mishap; }
From Hazard Analysis to Hazard Mitigation Planning: The Automated Driving Case Mario Gleirscher(B ) and Stefan Kugele Technische Universit¨ at M¨ unchen, Munich, Germany {mario.gleirscher,stefan.kugele}@tum.de4.0 / Gleirscher / Shonan, JP/ June 26, 2019
67
Risk Factors (Basic Phase Model)
0f f f ef …endangerment
n
nominal
mf …mitigation recovery… mf
r
mf
d …direct mitigation
endanger- ment … ef
e
…endangered
m …mitigated operation
Purposes:
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
68
SAV: Situational Risk Space
CCOCICSCR CollCR CCOCCR CR OCICSColl OCCR CCICSCR CCOCColl CCCollCR CCOCICSColl CCICSColl ICS ICSColl OCColl OCICSCR CCOC OCICSCollCR CCICS ICSCollCR CCOCICS ICSCR CC OCCollCR OCICS CCCR CCOCCollCR Coll CCColl CCOCICSCollCR CCICSCollCR OC e Vehicle ICS e Vehicle OC e Vehicle OC e Vehicle CC e Vehicle CC e Vehicle Coll e Vehicle CR e Vehicle ICS e Vehicle CC e Vehicle ICS e Vehicle CR e Vehicle OC e Vehicle Coll e Vehicle CR e Vehicle Coll e Vehicle CR e Vehicle CC e Vehicle ICS e Vehicle Coll e Vehicle Coll e Vehicle CR e Vehicle ICS e Vehicle ICS e Vehicle OC e Vehicle CR e Vehicle OC e Vehicle Coll e Vehicle ICS e Vehicle Coll e Vehicle ICS e Vehicle CR e Vehicle OC e Vehicle CR e Vehicle OC e Vehicle OC e Vehicle ICS e Vehicle CC e Vehicle CC e Vehicle ICS e Vehicle OC e Vehicle ICS e Vehicle CC e Vehicle Coll e Vehicle ICS e Vehicle OC e Vehicle Coll e Vehicle ICS e Vehicle CC e Vehicle Coll e Vehicle CR e Vehicle OC e Vehicle CR e Vehicle Coll e Vehicle CC e Vehicle CC e Vehicle OC e Vehicle ICS e Vehicle CR e Vehicle Coll e Vehicle Coll e Vehicle OC e Vehicle OC e Vehicle CR e Vehicle CC e Vehicle Coll e Vehicle CR e Vehicle CC e Vehicle OC e Vehicle CR e Vehicle CC e Vehicle Coll e Vehicle CR e Vehicle CC e Vehicle CR e Vehicle ICS e Vehicle ICS e Vehicle OC e Vehicle CC e Vehicle CC e Vehicle Coll4.0 / Gleirscher / Shonan, JP/ June 26, 2019
69
SAV: Situational Risk Space (zoomed)
CCOCICSCR CCOCCR CCOCColl ICS ICSColl CCOC CR CCOCCollCR Coll CCOCICSCollCR
CR e Vehicle ICS e Vehicle CR V e Vehicle Coll e Vehicle Coll e ehicle ICS e Vehicle OC e Vehicle Coll e Vehicle CR e Vehicle OC e Vehicle OC e Vehicle ICS e Vehicle ICS e Vehicle CC e Vehicle CR e Vehicle Coll e Vehicle CC e Vehicle OC e Vehicle CR e Vehicle OC e Vehicle OC e Vehicle CC e Vehicle Coll e Vehicle CR e Vehicle e Vehicle ICS e Vehicle CC
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
69
Causality
(Lewis 1973)
Defjnition (Counterfactual Conditional) A Ñ C is nonvacuously true iff C holds at all the closest A-worlds. What are the closest A-worlds?
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
70
SAV: Risk Identifjcation and Assessment Yap script
OperationalSituation "drive" 2 { include "envPerc"; 4 } 6 ControlLoop "Vehicle" for "drive" { 8 replan alias "Slow-down || re-plan route"; brake alias "Standard brake"; 10 swerve alias "Short-term circumvention
EB alias "Emergency brake"; 12 accel alias "Accelerate"; airbag alias "Front airbag"; 14 } 16 HazardModel for "drive" { 18 OC alias "on occupied course" mitigatedBy (PREVENT_CRASH.replan) 20 direct ; 22 CR alias "increased collision risk" requires (OC) 24 deniesMit (OC) excludes (OC) 26 mitigatedBy (PREVENT_CRASH.EB) ; 28 CC alias "on collision course" requires (CR) 30 deniesMit (CR,OC) excludes (CR,OC) 32 mitigatedBy (PREVENT_CRASH.swerve) ; 34 ICS alias "inevitable collision state" requires (CC) 36 excludes (CC,CR,OC) causes (Coll) 38 mitigatedBy (PREVENT_CRASH.EB) ; 40 Coll alias "actual collision" requires (ICS) 42 excludes (CC,CR,OC,ICS,ES) mitigatedBy (ALLEVIATE.airbag) 44 mishap ; 46 ES alias "perception system fault" excludes (CC,CR,OC,ICS) 48 deniesMit (OC,CC) ; 50 } 4.0 / Gleirscher / Shonan, JP/ June 26, 2019
71
SAV: Situational Risk Space
ES CC OC CR Coll
e Vehicle ES e Vehicle CollICS e Vehicle CR e Vehicle CC e Vehicle OC e Vehicle ES e Vehicle ES e Vehicle ES
Approach: LOPA/BA to create chain of possible interventions
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
72
SAV: Situational Risk Space
ES CC CC ES CR Coll OC Coll CR eES eES eES mCC
e
eCR prvCC
c
mColl
e
eES eCC eOC prvOC
c
prvCR
c
attColl
alv
eES rES eCollICS mCR
e
fopES
fb
eES
Approach: LOPA/BA to create chain of possible interventions Layered intervention pattern for SAV obstacle avoidance Nice side-effect: Use pattern as enhanced phase model for similar risk factors
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
72
Taxonomy of Mitigations
Overall Safety Safety Constraints Fault Containment Fail- Safe Fault Detection Fault Avoidance Preventive Safety Passive Safety Error- Correcting Codes Redundancy Fail- Operational Limp- Home Fail- Silent Fail- Secure Condition Monitoring Checking Pre-Crash Assistance Obstacle Avoidance Limiter Protection partially realizes Override fully realizes Non- Interference Sanity Check Vigilance Check Warning Masking Voting Degradation Recovery Rollback Repair Simplicity Substitution Replication Diversity Barrier Comparison Shutdown Interlocking Separation Stabilization Reconfiguration Notification Filter
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
73
Taxonomy of Mitigations
F Cont Fail- Safe Fault Detection Preventive Safety Fail- Operational Limp- Home Fail- Silent Fail- Secure Checking Pre-Crash Assistance Obstacle Avoidance Vigilance Check Warning Degradation Recovery Repair Comparison Shutdown Reconfiguration Filter
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
73
SAV: Situational Risk Space (Monitor Candidate)
ES CC CC ES CR Coll OC Coll CR eES eES eES mCC
e
eCR prvCC
c
mColl
e
eES eCC eOC prvOC
c
prvCR
c
attColl
alv
eES rES eCollICS mCR
e
fopES
fb
eES
Approach: LOPA/BA to create chain of possible interventions = Specifjcation of a valid safe system expected order violated Ñ lack of observability, incomplete monitor, context mismatch?
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
74
Risk Structures: Templates for Causal Reasoning
A risk structure R is valid iff for s, s1, s2, s3 P RpFq, s3 P Mishaps, e, m, e1 P Σ˚ @s, s3 P RpFq, t P R Ds1, s2 P RpFq, m P Σ˚ : t “ eme1^ s s’ s” s”’ e m e’
Defjnition (Mitigation from Counterfactual Perspective)
m is mitigation of cause c ‰ s2 of a mishap s3 iff e1 gets unlikely. (s2, e1 form the counterfactual.) Proof obligations for each t: Check that, from s,
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
75
Risk Mitigation / Intervention / Enforcement
Approach: Active safety monitors, enforcement monitors
System/ Process Model MDP, LTS, HA Risk Structure Active Monitor Test model Active Monitor Implemen tation Monitored Process a b s t r a c t s f r
abstracts from synthesised from conforms to r e c
n i s e s / e n f
c e s p r
e r t y
RQ: How to build a mitigation monitor? / Which model to use? / Which abstraction? / What do we need to verify?
4.0 / Gleirscher / Shonan, JP/ June 26, 2019
76