A Comprehensive Safety Engineering Approach for Software Intensive Systems based on STPA



Similar documents
Adaptive Cruise Control System Overview

Model Checking based Software Verification

ELEC 5260/6260/6266 Embedded Computing Systems

Using STAMP/STPA to Chinese High Speed Railway Train Control System

Managing Design Changes using Safety-Guided Design for a Safety Critical Automotive System

Adaptive cruise control (ACC)

University of Paderborn Software Engineering Group II-25. Dr. Holger Giese. University of Paderborn Software Engineering Group. External facilities

Adaptive Cruise Control

Safety Driven Design with UML and STPA M. Rejzek, S. Krauss, Ch. Hilbes. Fourth STAMP Workshop, March 23-26, 2015, MIT Boston

Automotive System and Software Architecture

The Model Checker SPIN

Effective Application of Software Safety Techniques for Automotive Embedded Control Systems SAE TECHNICAL PAPER SERIES

SFTA, SFMECA AND STPA APPLIED TO BRAZILIAN SPACE SOFTWARE

Crucial Role of ICT for the Reinvention of the Car

CAST Analysis John Thomas and Nancy Leveson. All rights reserved.

Formal verification of contracts for synchronous software components using NuSMV

Dual core CPU 3.0 GHz 4 GB system memory Dedicated graphics card with 1024 MB memory (GeForce GTS 450-class equivalent or better)

Operating Vehicle Control Devices

JEREMY SALINGER Innovation Program Manager Electrical & Control Systems Research Lab GM Global Research & Development

Safety Issues in Automotive Software

SCADE System Technical Data Sheet. System Requirements Analysis. Technical Data Sheet SCADE System

Performance Study based on Matlab Modeling for Hybrid Electric Vehicles

Security Systems. Technical Note. iscsi sessions if VRM Load Balancing in All Mode is used Version 1.0 STVC/PRM. Page 1 of 6

Last Mile Intelligent Driving in Urban Mobility

Intoduction to SysML

Testimony of Ann Wilson House Energy & Commerce Committee Subcommittee on Commerce, Manufacturing and Trade, October 21, 2015

Motorcycle Airbag System

ADVANCED BRAKE ALERT SYSTEM

of traffic accidents from the GIDAS database until 5 seconds before the first collision. This includes parameters to describe the environment data,

ASSESSMENT OF THE ISO STANDARD, ROAD VEHICLES FUNCTIONAL SAFETY

Multiagent Control of Traffic Signals Vision Document 2.0. Vision Document. For Multiagent Control of Traffic Signals. Version 2.0

INTERACTIVE DISTANCE LEARNING ANTI-LOCK BRAKE SPECIALIST: KELSEY HAYES REAR WHEEL ANTI-LOCK BRAKING SYSTEMS (RWAL/RABS)

How To Test Automatically

Agile Model-Based Systems Engineering (ambse)

Adaptive Cruise Control of a Passenger Car Using Hybrid of Sliding Mode Control and Fuzzy Logic Control

T Reactive Systems: Introduction and Finite State Automata

WIRELESS BLACK BOX USING MEMS ACCELEROMETER AND GPS TRACKING FOR ACCIDENTAL MONITORING OF VEHICLES

System Safety Process Applied to Automotive High Voltage Propulsion Systems

Hardware in the Loop (HIL) Testing VU 2.0, , WS 2008/09

Integrating Legacy Code / Models with Model Based Development Using Rhapsody

BENEFIT OF DYNAMIC USE CASES TO EARLY DESIGN A DRIVING ASSISTANCE SYSTEM FOR PEDESTRIAN/TRUCK COLLISION AVOIDANCE

Extending AADL for Security Design Assurance of the Internet of Things

Functional Safety with ISO Principles and Practice Dr. Christof Ebert, Dr. Arnulf Braatz Vector Consulting Services

Verifying Real-Time Embedded Software by Means of Automated State-based Online Testing and the SPIN Model Checker Application to RTEdge Models

Created by: Austin Davis Neel Iyer Darcie Jones Sascha Schwarz

Functional Safety and Automotive SW - Engineering Introduction ISO Daimler

Measurement and Analysis Introduction of ISO7816 (Smart Card)

Technical Trends of Driver Assistance/ Automated Driving

Tips and Technology For Bosch Partners

Evaluation of the Automatic Transmission Model in HVE Version 7.1

Managing Variability in Software Architectures 1 Felix Bachmann*

Software Verification/Validation Methods and Tools... or Practical Formal Methods

1. SYSTEM OVERVIEW. 1) Basic Theory of ABS Function

fakultät für informatik informatik 12 technische universität dortmund Data flow models Peter Marwedel Informatik 12 TU Dortmund Germany

The SPES Methodology Modeling- and Analysis Techniques

Programmable Logic Controller PLC

School of Computer Science

How cloud-based systems and machine-driven big data can contribute to the development of autonomous vehicles

AAA AUTOMOTIVE ENGINEERING

The Growing Role of Electronics in Automobiles A Timeline of Electronics in Cars June 2, 2011

Commentary Drive Assessment

Taming of the Shrew Documenting an APEX Application. Dietmar Aust Opal-Consulting, Köln

Software Production. Industrialized integration and validation of TargetLink models for series production

Bendix Wingman Fusion

Chapter 1 Computer System Overview

Test Coverage Criteria for Autonomous Mobile Systems based on Coloured Petri Nets

Stability. Control. Maximum Safety. Electronic brake systems for motorcycles

Bendix Wingman ACB Active Cruise with Braking Questions & Answers

Dr. Brian Murray March 4, 2011

3D Vision An enabling Technology for Advanced Driver Assistance and Autonomous Offroad Driving

Presentation Overview. Istwaan Knijff EMC & Safety themadag - 03 oktober Sensata Technologies Almelo. What about EMC?

Research Overview in. Formal Method in Software Engineering Laboratory

Multi-information Display (see MID )

Formal Verification of Software

CHAPTER 7: The CPU and Memory

The Problem: Automotive safety recalls, Control Systems Diagnostics, Stability Control, Traction Control, Anti-lock Braking, Adaptive Cruise Control

How To Become A Safety Engineer

Welcome to SCANIA Truck Driving Simulator - The Game

How to Make the Client IP Address Available to the Back-end Server

Longitudinal and lateral dynamics

Making model-based development a reality: The development of NEC Electronics' automotive system development environment in conjunction with MATLAB

BV has developed as well as initiated development of several simulation models. The models communicate with the Track Information System, BIS.

Star rating driver traffic and safety behaviour through OBD and smartphone data collection

Development of AUTOSAR Software Components within Model-Based Design

Opportunities and Challenges in Software Engineering for the Next Generation Automotive

Automotive Ethernet Security Testing. Alon Regev and Abhijit Lahiri

Safe Automotive software architecture (SAFE) WP 6, WT Deliverable D Methods for Assessment Activity Architecture Model (AAM)

UML TUTORIALS THE USE CASE MODEL

Transcription:

www.uni-stuttgart.de A Comprehensive Safety Engineering Approach for Software Intensive Systems based on STPA STPA-based Approach STPA Safety Analysis Asim Abdulkhaleq, Ph.D Candidate Institute of Software Technology University of Stuttgart, Germany Joint with: Prof. Dr. Stefan Wagner Prof. Dr. Nancy Leveson 3 rd ESW2015, 5th October, Amsterdam, Netherlands 2015 UNIVERSITÄT Stuttgart FAKULTÄT FÜR INFORMATIK, ELEKTROTECHNIK und INFORMATIONSTECHNIK INSTITUT FÜR SOFTWARETECHNOLOGIE 1/20

Motivation: Software of Today s Complex Systems Today s safety critical systems are increasingly reliant on software. Software is the most complex part of modern safety critical embedded systems. E.g. A modern BMW 7 car has something close to 100 million lines of software code in it, running on 70 to 100 microprocessors (Prof. Manfred Broy, TU München) Electronic Stability Control Traction Control Back Camera Stop & Go Adaptive Cruise Control Anti-Lock Braking Systems (ABS) Adaptive Cruise Control (ACC) Modern Vehicle Reverse Backup Sensors Tire Pressure Monitoring Electronic Brakeforce Distribution Systems Automatic Braking Systems Automatic Braking Systems How to develop a safe software (or achieve an acceptable level of safety of software)? 2/20

Agenda Motivation Introduction Problem Statement Research Objectives Contribution A Comprehensive Safety Engineering Approach based on STPA Illustrative Example: Adaptive Cruise Control System Conclusion & Future Work 3/20

Problem Statement Problem Statement Safety is a system property and needs to be analysed in a system context. As software is a part of system, software safety must be considered in the context of the system level to ensure the whole system's safety. System Safety Software Safety Verify the software against its safety requirements Software Verification approaches: Model checking (SMV, SPIN,.etc.) Testing approaches Functional correctness of software, however, even perfectly correct software can contribute in an accident. Not directly concern safety Some limited in practices Achieving 100% testing is impossible. Identify appropriate software safety requirements Safety Analysis Techniques: FTA, FMEA, STPA FTA and FMEA have limitations to cope with complex systems. STPA is developed to cope with complex systems, but its subject is system not software STPA is performed separately STPA is not Placed into software development process 4/20

Research Objectives & Contribution Research Objectives Integrate STPA safety activities in a software engineering process to allow safety and software engineers a seamless safety analysis and verification. This will help them to derive software safety requirements, verify them, generate safety-based test case and execute them to recognize the associated software risks. Contribution We contribute a safety engineering approach to derive software safety requirements at the system level and verify them at the design and implementation levels. 5/20

A comprehensive Software Engineering based on STPA Overview of the proposed approach: Four main activities & roles 1 Deriving software safety Requirements at the system level 2 3 Verifying the safe behaviour model against the STPA results Constructing the safe behaviour model of the software controller Safety Analyst Safety Analyst & System Designer Test Engineer 4 Generating & executing the safety-based test cases based on STPA results Safety Analyst & Test Engineer 6/20

Detailed View of the Proposed Approach The proposed approach can be applied during developing a new safe software or on existing software of safety-critical system 1 STPA Safety Analysis Apply to software at the system level STPA results Safety Control Structure Diagram Unsafe Software Scenarios Software Safety Requirements System Requirement Specifications 3 build 2 Formalize System Design Models State machine model Build Safe Software Behaviour Model Formal Specifications Software Implementation (code) *Extract the verification model directly from the software code Software Safety Verification Formal Verification (model checker) Testing approach generate Safety-based Test Case Generation 4 generate test suites Execute 5 Generate and Execute Test-scripts Traceability generate Safety Verification Report 7/20

Example: Adaptive Cruise Control System Adaptive Cruise Control System: is a well-known automotive system which has strong safety requirements. ACC adapts the vehicle s speed to traffic environment based on a long range forward-radar sensor which is attached to the front of vehicle. How to derive the safety requirements of ACC software controller at the system level and generate the safety-based test cases? Fundamentals of Analysis System-Level Accidents: ACC-1 : ACC vehicle crashes with front vehicle while ACC status is active. System-Level Hazards H-1: ACC software does not maintain safe distance from front vehicle. 8/20

Step1.a : Deriving the software Safety Requirements Control Structure diagram ACC SSR1.1 SSR.1.2 SSR1.3 Software Safety Requirements The ACC software controller should provide an acceleration signal when the target vehicle is no longer in the lane The ACC software controller decelerates the speed when the distance to the target vehicle is too close. The ACC software controller should not provide the acceleration signal speed when a safe distance is reached 9/20

Step 1.b: Identify Unsafe Scenarios of Software Control Structure Diagram & process model : shows the main interconnecting components of the ACC system at a high level. ACC Three types of process model variables: (1) Internal variables (2) Interaction variables (3) Environmental variables The total number of all variables combination: 3 x 2 x 2 x 2 x 4 x 4 = 384. 10/20

Extended Approach to STPA Extended Approach to STPA : John Thomas proposed an extended approach to STPA. It aims to refine the identified unsafe control actions in the STPA Step 1 based on the combination of process model variables. Limitations for complex software controllers: The difficulty is in defining the combination for large number of values of the process model variables which have affect on the safety of the control actions. Considering all combinations involves more effort and time. I proposed to use the principle of t-way combinatorial testing algorithm How to automatically generate the combinations and minimize the number of combination of large complex system? CIT is testing technique that requires covering all t-sized tuples of values out of n parameter attributes of a system under test. 11/20

Step1 : Automatically Generating Context Tables Apply the combinatorial testing algorithm to reduce the number of combination between the process model variables (Cooperation with Rick Kuhn, ACC National Institute of Standards and Technology, Computer Security Division, US). Test Case# followdistance cruisespeed BrakePedal ACCMode 0 current distance < safe distance current speed ==desired speed Not applied Follow 1 current distance < safe distance current speed < desired speed applied Standby 2 current distance < safe distance current speed > desired speed Not applied Cruise 3 current distance < safe distance Unknown applied Follow 4 current distance > safe distance current speed ==desired speed Not applied Standby 5 current distance > safe distance current speed < desired speed applied Cruise 6 current distance > safe distance current speed > desired speed applied Follow 7 current distance > safe distance Unknown Not applied Standby 8 current distance <=safe distance current speed ==desired speed applied Cruise 9 current distance <=safe distance current speed < desired speed Not applied Follow 10 current distance <=safe distance current speed > desired speed Not applied Standby 11 current distance <=safe distance Unknown Not applied Cruise 12 Unknown current speed ==desired speed applied Follow 13 Unknown current speed < desired speed Not applied Standby 14 Unknown current speed > desired speed applied Cruise 15 Unknown Unknown Not applied Standby By combinatorial testing algorithm: We can automatically generate the context table. We can achieve different combination coverages (e.g. pairwise coverage = 16 combinations, 3-way coverage = 48 combinations) We can apply different roles and constraints to the combination to ignore some values 12/20

Examples of the Context Table ACC software controller provides a safety critical action: accelerate signal Control actions Accelerate Signal Process Model variables Hazardous Distance Speed Brake ACC Mode < safe distance == desired speed Applied Cruise No < safe distance >desired speed* Notapplied Cruise Yes (H2, SSR3-4) < safe distance > Desired speed Notapplied follow Yes (H1, SSR1) Refine the software safety Requirements SSR 1.3 : ACC should not provide accelerated signal when the distance is less or equal the safe distance while ACC in cruise mode and brake pedal is not pressed. Generate LTL formula LTL 1.3 : G(distance <= safe distance && ACCController == cruise && brakepedal!= Pressed)!(accelerationSignal) 13/20

Step 2 : Constructing the safe behaviour model of software controller To verify the design & implementation of software controller against the STPA results and generate the safety-based test cases: Each software controller must be modelled in a suitable behaviour model The model should be constrained by STPA safety requirements Software safety requirements STPA Results Context tables Control structure & process model UML state flow notation A safe behaviour model of software controller Syntax of each transition of the safe behaiovur model: Software Specification State 0 Event[STPA safety requirement]/action State 1 14/20

Step 2 : The safe behaviour model of ACC software controller STPA Results A safe behaviour model of ACC software Controller Software Controller & process model variables Context Table Transition t6: (safety requirement) [currentspeed < desiredspeed && currentdistance > safedistance &&! BrakePressed & ACCMode == Cruise] Parallel Process variables Sequential Process variables 15/20

Step 3.1 : Verification of Safe behaviour model To ensure that the safe behaviour model satisfy the STPA safety requirements, We convert the model into a input language of model checker such as SMV (Symbolic Model Verifier ) model MODULE main () VAR RadarData :{unknown, received} BrakePedal :{notpressed, pressed} ACC_Activated: {on, off} ACCMode:{standby, cruise, follow} Control_actions :{accelerate, decelerate} ACC_Controller:{radardata, ACCMode,speedData} controlaction: {tocruise, toaccelerate, todecelerate, tofollow, tosetspeed} currentspeed : {0, 25, 45, 65, 100} dersiredspeed: {25,45, 75, 200} safedistance: {65} Ignited : boolean; init(accontroller) := initial; init (event) :=default; next(accontroller) := case ACCController=Off & (Ignited=off): Off; ACCController=Off & (Ignited=on & BrakePressed=NotApplied): Initial; ACCController=Initial & (Ignited =off BrakePressed=Applied): Off; ACCController=Initial & (BrakePressed=NotApplied &(CurrentSpeed<25): Standby; 16/20

Step 3.1 : Verification of Safe behaviour against STPA SSR We ran the NuSMV 2.5.3 model checking tool on a Windows 7 PC, i7 CPU with 2.80 GHZ, 8 GB main memory. Model Formulae NuSMV Tool Satisfied Not satisfied (Counterexample) The NuSMV tool verified the SMV model against the LTL formulae The SMV model satisfied all the identified STPA software safety requirements and no counterexample generated (itself is built using STPA results) 17/20

Step 3.2 : Safety-based Test Cases Generating & Execution To generate safety-based test cases based on STPA results, We build a Java test generator based on the safe behaviour model. We use the Java test generator as input to the model-based testing tool e.g ModelJUnit. Safe behaviour model Java Test Generator ModelJunit Tool Traceability matrix Safety-based Test Cases public class ACC_TestCodeGenerator implements FsmModel { public boolean cruiseguard() { return (currentstate == State.Standby && ignited == true && currentspeed > 25 &&!isbrakepressd); } public @Action void tocruise() { printtestinputdata(); currentstate = State.Cruise; accelerating(); if (isbrakepressd) isbrakepressd = false; } Standby tostandby[cruiseguard()]/tocruise Cruise public boolean standbyguard() { return (currentstate == State.Standby && ignited == true && currentspeed < 25 &&!isbrakepressd); } public @Action void tostandby() { printtestinputdata(); currentstate = State.Standby; move(); 18/20

The Results of Test Cases Generating & Demo We generated automatically 487 test cases which cover the safe behaviour of the ACC software controller with the action coverage =15/18, state coverage =6/6, transition coverage =15/15, and the pair transition coverage 36/36. 19/20

STPA & Traceability Matrix We created a Java code to generate the traceability matrix between the generated test cases and STPA results and export them as an Excel sheet. Syntax of transition = Event[STPA safety requirement]/control Action We calculated the coverage of STPA software safety requirements #Coverage(SSRs)= #Total number of STPA safety requiremnts covered into test cases #Total number of STPA safety requriements #Coverage(SSRs)= 21 21 = 100 % We calculated the average of each STPA software safety requirement and each control action of each software controller #Average(SSR)= #Average(CA)= Total number of test cases which conatin SSR Total number of test cases Total number of test cases which conatin CA Total number of test cases For example: The average of the software safety requirement (SSR1.3) and control action providing accelerate signal are: #Average(SSR1.3)= 17 21 = ~ 10% #Average(CA1)= = ~ 11% 197 197

Conclusion & Future Work Conclusion: We presented a safety engineering approach based on STPA to develop a safe software. It can be integrated into a software development process or applied directly on existing software. It allows the software and safety engineers to work together during development process of software for safety-critical systems. Limitations The main steps of approach require manual intervention The difficulty of using formal testing and verification in practice and using formal approaches require some programming knowledge of the software. Future (recent) Work: We plan to develop a plug-in tool called STPA-verifier which will be integrated with our expansible platform XSTAMPP to enable safety analyst performing STPA and verifying the STPA results with SPIN. We conducted two case studies: the first case study conducted with our industrial partner to investigate the effectiveness of applying the proposed methodology. The second case study conducted during developing a simulator of ACC with LEGOmindstorm roboter 20/20

The End Thank You Questions and Feedback are welcome!