Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ......

23
© 2013 Carnegie Mellon University Design and Analysis of Cyber- Physical Systems: AADL and Avionics Systems Software Engineering Institute Carnegie Mellon University Pittsburgh, PA 15213 Peter H. Feiler May 1, 2013

Transcript of Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ......

Page 1: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

© 2013 Carnegie Mellon University

Design and Analysis of Cyber-Physical Systems: AADL and Avionics Systems

Software Engineering InstituteCarnegie Mellon UniversityPittsburgh, PA 15213

Peter H. FeilerMay 1, 2013

Page 2: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

2Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Copyright 2013Carnegie Mellon University and IEEE

This material is based upon work funded and supported by the Department of Defense under Contract No. FA8721-05-C-0003 with Carnegie Mellon University for the operation of the Software Engineering Institute, a federally funded research and development center.NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN “AS-IS” BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT.This material has been approved for public release and unlimited distribution.This material may be reproduced in its entirety, without modification, and freely distributed in written or electronic form without requesting formal permission. Permission is required for any other use. Requests for permission should be directed to the Software Engineering Institute at [email protected].

DM-0000251

Page 3: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

3Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Outline

Software-induced Challenges in Cyber-Physical SystemsSAE AADL: an Architecture Modeling and Analysis FrameworkVirtual Integration of an Avionics SystemArchitectural Fault Modeling of Safety-critical SystemsConclusions

Page 4: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

4Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

We Rely on Software for Safe Aircraft Operation

Embedded software systems introduce a new class of

problems not addressed by traditional system modeling &

analysis

Page 5: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

5Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

High Fault Leakage Drives Major Increase in Rework Cost

5x

SoftwareArchitectural

Design

SystemDesign

ComponentSoftwareDesign

CodeDevelopment

UnitTest

SystemTest

Integration Test

Acceptance Test

RequirementsEngineering

300-1000x

Where faults are introducedWhere faults are found

The estimated nominal cost for fault removal

20.5%

1x

20%, 16%

10%, 50.5%

0%, 9% 80x

70%, 3.5% 20x

Sources:

NIST Planning report 02-3, The Economic Impacts of Inadequate Infrastructure for Software Testing, May 2002.

D. Galin, Software Quality Assurance: From Theory to Implementation, Pearson/Addison-Wesley (2004)

B.W. Boehm, Software Engineering Economics, Prentice Hall (1981)

70% Requirements & system interaction errors 80% late error

discovery at high repair cost

80% late error discovery at high

repair cost

80% late error discovery at high

rework cost

Aircraft industry has reached limits of affordability due to exponential growth in SW size and complexity.

Major cost savings through rework avoidance by early discovery and correction

A $10k architecture phase correction saves $3M

Rework and certification is 70% of SW cost, and SW is 70% of system cost.

Resilience to SW Induced FaultsWe cannot assume zero defect software

Page 6: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

6Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Mismatched Assumptions in Embedded SWSystem Engineer Control Engineer

SystemUnder Control

ControlSystem

Physical Plant CharacteristicsLag, proximity

Operator ErrorAutomation & human actions

Syst

em U

ser/E

nviro

nmen

t

HazardsImpact of

system failures Application D

eveloper

ComputePlatform

RuntimeArchitecture

ApplicationSoftware

Embedded SW System Engineer

Data Stream Characteristics

ETE Latency (F16)State delta (NASA)

Measurement UnitsAriane 4/5Air Canada

Concurrency Communication

ITunes crashes on dual-cores

Distribution & RedundancyVirtualization of HW

(ARPA-Net split)

HardwareEngineer

SysML does not address Embedded Software System Architecture Issues

Why do system level failures still occur despite fault tolerance techniques being deployed in systems?

Page 7: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

7Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Outline

Software-induced Challenges in Cyber-Physical SystemsSAE AADL: an Architecture Modeling and Analysis FrameworkVirtual Integration of an Avionics SystemArchitectural Fault Modeling of Safety-critical SystemsConclusions

Page 8: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

8Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

SAE Architecture Analysis & Design Language (AADL) Standard for Software-reliant Systems

The Computer System

The System

Computer SystemHardware & OS

Physical platformAircraft

ControlGuidance

Deployed onUtilizes

Physical interfacePlatform component

AADL focuses on interaction between the three elements of a software-intensive system based on architectural abstractions of each.

Embedded Application Software

Flight control & Mission The Software

Focus on software runtime architecture

Page 9: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

9Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

System Level Fault Root Causes

Violation of data stream assumptions• Stream miss rates, Mismatched data representation, Latency jitter & age

Partitions as Isolation Regions• Space, time, and bandwidth partitioning• Isolation not guaranteed due to undocumented resource sharing• fault containment, security levels, safety levels, distribution

Virtualization of time & resources• Logical vs. physical redundancy• Time stamping of data & asynchronous systems

Inconsistent System States & Interactions• Modal systems with modal components• Concurrency & redundancy management• Application level interaction protocols

Performance impedance mismatches• Processor, memory & network resources• Compositional & replacement performance mismatches• Unmanaged computer system resources

Operational and failure modesInteraction behavior specification

Dynamic reconfigurationFault detection, isolation, recovery

End-to-end latency analysisPort connection consistency

Process and virtual processor to model partitioned architectures

Resource allocation & deployment configurationsResource budget analysis

& scheduling analysis

Virtual processors & busesMultiple time domains

Codified in Virtual Upgrade Validation method

Page 10: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

10Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Architecture-Centric Modeling Approach

Security•Intrusion•Integrity•Confidentiality

Safety & Reliability

•MTBF•FMEA

•Hazard analysis

Real-timePerformance•Execution time/Deadline

•Deadlock/starvation

•Latency

ResourceConsumption•Bandwidth•CPU time•Power consumption

•Data precision/accuracy

•Temporal correctness

•Confidence

Data Quality

Architecture Model

Single-source Annotated Architecture Model Addresses Change Impact Across Analytical

Models and Non-Functional Properties

Auto-generated analytical models

Page 11: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

11Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Outline

Software-induced Challenges in Cyber-Physical SystemsSAE AADL: an Architecture Modeling and Analysis FrameworkVirtual Integration of an Avionics SystemArchitectural Fault Modeling of Safety-critical SystemsConclusions

Page 12: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

12Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Multi-tier system & software architecture (in AADL) Incremental end-to-end validation of system properties

Aircraft system: (Tier 1)Engine, Landing Gear, Cockpit, …Weight, Electrical, Fuel, Hydraulics,…

LRU/IMA System: (Tier 2)Hardware platform, software partitionsPower, MIPS, RAM capacity & budgetsEnd-to-end flow latency

Subcontracted software subsystem: (Tier 3)Tasks, periods, execution timeSoftware allocation, schedulabilityGenerated executables

OEM & Subcontractor:Subsystem proposal validationFunctional integration consistencyData bus protocol mappings

Early Discovery and Incremental V&V through Virtual Integration (SAVI)

Proof of Concept Demonstration and Transition by Aerospace industry initiative• Propagate requirements and constraints• Higher level model down to suppliers' lower level models• Verification of lower level models satisfies higher level requirements and constraints

Aircraft: (Tier 0)

Repeated Virtual Integration Analyses:Power/weightMIPS/RAM, SchedulingEnd-to-end latencyNetwork bandwidth

System & SW Engineering:Mechatronics: Actuator & WingsSafety Analysis (FHA, FMEA)Reliability Analysis (MTTF)

Page 13: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

13Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

End-to-end Latency in Control Systems

System Engineer Control Engineer

System

Under

Control

Control

System

Operational

Environment

• Processing latency• Sampling latency• Physical signal latency

Impact of Scheduler Choice on Controller Stability

A. Cervin, Lund U., CCACSD 2006

Impact of Software Implemented TasksJitter affects stability of control behavior (subtle value error)

AADL immediate & delayed connections specify deterministic sampling

Page 14: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

14Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Software-Based Latency ContributorsExecution time variation: algorithm, use of cacheProcessor speedResource contentionPreemptionLegacy & shared variable communicationRate group optimizationProtocol specific communication delayPartitioned architectureMigration of functionalityFault tolerance strategy

Page 15: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

15Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Outline

Software-induced Challenges in Cyber-Physical SystemsSAE AADL: an Architecture Modeling and Analysis FrameworkVirtual Integration of an Avionics SystemArchitectural Fault Modeling of Safety-critical SystemsConclusions

Page 16: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

16Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Error Propagation PathsError Model and the Architecture

Error/recover/repair eventError propagation

Component A Component B

Processor 1 Processor 2Bus

Error_Free Failed Error_Free Failed

Error_Free Failed Error_Free FailedError_Free Failed

Error propagation pathError flow

Propagation of errors of different types from error sources along propagation paths between architecture components.Error flows as abstractions of propagation through components.Component error behavior as transitions, out propagations, and detection based on event, state and incoming propagation conditions.Composite error behavior in terms of component error behavior states in support of compositional abstraction.

Within Application

Within Platform

Between Application and PlatformProcessor 0

Observable propagation path

AADL Error Model Annex Standard comes with a Fault Propagation Ontology.

Page 17: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

17Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Discovery of Unexpected PSSA Hazard through Virtual Integration

Auto Pilot

FMSProcessorOperational

Failed

Flight Mgmt System

Anticipated: No Stall Propagation

FMS Power

AirspeedData

Failed

ActuatorCmd

StallNoService

Anticipated: NoService

CorruptedData

Unexpected propagation of corrupted Airspeed data results in Stall due to miss-correction

OperationalNoData

EGI

EGI HW

EGI Logic

Oper’l

Failed

Oper’l

Failed

Corrupted

EGI maintainer adds corrupted data hazard to model. Error Model analysis detects unhandled propagation.

Transient hardware failure corrupts EGI data

Anticipated:No EGI data

Page 18: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

18Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Recent Automated FMEA ExperienceFailure Modes and Effects Analyses are rigorous and comprehensive reliability and safety design evaluations• Required by industry standards and Government policies• When performed manually are usually done once due to cost and schedule• If automated allows for

– multiple iterations from conceptual to detailed design– Tradeoff studies and evaluation of alternatives– Early identification of potential problems

Largest analysis of satellite to date consists of 26,000 failure modes• Includes detailed model of satellite bus• 20 states perform failure mode• Longest failure mode sequences have 25 transitions (i.e., 25 effects)

Myron Hecht, Aerospace Corp.Safety Analysis for JPL, member of DO-178C committee

18

Page 19: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

19Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Impact of Deployment Configuration Changes on Availability

FMS Failure on 2 or 3 processor configuration (CPU failure rate = 10-5)

FMS Failure Rate 0 5*10-6 5*10-5

MTTF – One CPU operational 112,000 67,000 14,000MTTF – Two CPU operational 48,000 31,000 7,000

Side effects of design and deployment decisions on availability predictionsWorkload balancing of partitions later in development affects reliability

3 processor configuration can be less reliable than 2 processor configurationExample: Replicated AP and FG channel (re)distributed across two processors

Page 20: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

20Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Outline

Software-induced Challenges in Cyber-Physical SystemsSAE AADL: an Architecture Modeling and Analysis FrameworkVirtual Integration of an Avionics SystemArchitectural Fault Modeling of Safety-critical SystemsConclusions

Page 21: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

21Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Virtual Upgrade Validation Method

Capture Embedded Software System ArchitectureSoftware runtime, computer hardware, mechanical system architecture in same SAE AADL modelSEI has technical lead in this standardUtilize knowledge of potential mismatched assumptionsCodified in Virtual Upgrade Validation method

Analyze multiple operational quality attributesUtilize SAE AADL single model truth approach and well defined semantics

Sample FindingsPotential inconsistency and lack of integrity of recorded aircraft health dataAmbiguous task and communication architecture has priority inversion potential under fault conditionsCorrupted airspeed data not considered as hazard

Early discovery of technical risks

Page 22: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

22Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

Arc

hite

ctur

e M

odel

ing

and

Ana

lysi

s

System & SWArchitectural

Design

ComponentSoftwareDesign

CodeDevelopment

TargetBuild

DeploymentBuild

RequirementsEngineering

Increased Confidence through End-to-end Virtual Integration and Testing Evidence

AcceptanceTest

SystemTest

IntegrationTest

UnitTest

Build the Assurance Case

Build the System

RequirementsValidation

System & SWArchitecture

Validation

Design Validation

Integration Build

Code CoverageTesting

Virtual ArchitectureIntegration & Analysis

Flight Test

System IntegrationLab Testing

Design Validation by Virtual Integration

Architecture Focused Requirements Analysis

Page 23: Design and Analysis of Cyber-Physical Systems: … Systems: AADL and Avionics Systems. Software ... Integration and Testing ... Design and Analysis of Cyber-Physical Systems: AADL

23Analytical Architecture Fault ModelsFeiler, Jan 8, 2013© 2013 Carnegie Mellon University

ResourcesWebsite www.aadl.info

Public Wiki https://wiki.sei.cmu.edu/aadl

AADL Book in SEI Series of Addison-Wesley http://www.informit.com/store/product.aspx?isbn=0321888944