29
ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS OF CONTROL SYSTEMS DEVELOPED IN SIMULINK

ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS OF CONTROL SYSTEMS DEVELOPED IN SIMULINK

Page 2: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink Slide2

Outline

Introduction• Model-based system analysis• Dependability and error propagation• Analytical and simulative approaches

ErrorSim• Workflow • Fault types and injection methods• Reported statistical information

Case study• Reference Simulink model• Experiments • Result interpretation

Page 3: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide3

Outline

1

ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Introduction• Model-based system analysis• Dependability and error propagation• Analytical and simulative approaches

ErrorSim• Workflow • Fault types and injection methods• Reported statistical information

Case study• Reference Simulink model• Experiments • Result interpretation

Page 4: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide4

1 Introduction: Model-based system analysis

ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Concept Modeling RealsystemModels Autocode

Simplified model-based system development workflow:

Page 5: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide5ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

1 Introduction: Model-based system analysis

Concept

MetricsRequirements

Modeling

Compare

RealsystemModels Autocode

Formalization

Impr

ovem

ents Testing

Conventional system analysis:

Page 6: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide6ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

1 Introduction: Model-based system analysis

Model-basedanalysis

Concept

MetricsRequirements

Modeling

Compare

Models

Formalization

Impr

ovem

ents

Model-based system analysis: To recognize system characteristics and inherent shortcomings in the early design stages in order to provide optimized design solutions.

Page 7: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide7

Dependability: The trustworthiness of a system such that reliance can justifiably be placed on the service it delivers.[J. C. Laprie, A. Avizienis, and H. Kopetz. Dependability: Basic Concepts and Terminology. Springer-Verlag, Secaucus, NJ,USA, 1992.]

ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

1 Introduction: Dependability and error propagation

Model-basedanalysis

Concept

DependabilitymetricsRequirements

Modeling

Compare

Models

Formalization

Impr

ovem

ents

Dependability

Attributes

Means

Threats

AvailabilityReliabilitySafetyConfidentialityIntegrityMaintainability

Fault PreventionFault ToleranceFault RemovalFault Forecasting

FaultsErrorsFailures

Model-based dependability analysis: To analyze and quantify the impact of threats on system operation as basis for design optimizations towards better dependability

Page 8: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

Error FailureFault activation propagation FaultcausationSystem A System B

Dependability

Attributes

Means

Threats

AvailabilityReliabilitySafetyConfidentialityIntegrityMaintainability

Fault PreventionFault ToleranceFault RemovalFault Forecasting

FaultsErrorsFailures

27.06.2017 Slide8ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

1 Introduction: Dependability and error propagation

adefectinthesystem;incorrectinternalstate;incorrectdeliveredservice;

continuityofcorrectservice;absenceofcatastrophicconsequences;

ourmainfocus

TerminologyLaprie[1992]

toavoidservicefailuresinthepresenceoffaults;ourmainfocus

ourmainfocus

Page 9: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide9ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Astronaut Andreas Mogensencontrols a ground rover from space 07.09.2015.[Video from ESA YouTube channel]

[Image by ESTEC]

ComplexSpace <-> Ground

Comms

Forc

e fe

edba

ck

Ground roboticsystem

Haptic human machine

Interface

[Image by ESTEC]

[Image by NASA]

@

@

ISS

Robot control system:• Distributed, space to ground• Haptic telemanipulation• Software, hardware, network• Model-based design with Simulink

1 Introduction: Dependability and error propagation

Recent project:

Page 10: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide10ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

1 Introduction: Dependability and error propagation

[Image by ESTEC]

ComplexSpace <-> Ground

Comms

Ground roboticsystem

Haptic human machine

Interface

[Image by ESTEC]

Cosmicradiation

Single eventupsets

?

?Er

ror p

ropa

gatio

n

SEUs detected in Columbus Mass Memory Units of the International Space Station.[Ivano Verzola, Anne-Emmanuelle Lagny, and Janos Biswas, A Predictive Approach to Failure Estimation and Identification for Space Systems Operations. SpaceOps2014 Conference. Pasadena, CA.]

Single event upset (SEU) – an ionizing particle hits a micro electronic device (CPU, RAM) causing a bit-flip, and leading to silent data corruption (data error).

Fault model:

Page 11: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

1 Introduction: Dependability and error propagation

27.06.2017 Slide11ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Reliability and (Safety) metrics

e.g. mean number of errorsin critical system outputs

during given execution time

Subsystem

Error-prone blocks

Blocks of interest

Blocks with states

Sample time = 0.002

Sample time = 0.008

Analysis: N_err = 451.4

Analysis: N_err = 35.35

Simulation:

Simulation:

AutomatedTransformation

Autom

atedC

omputation

Markov chainsPetri nets

Temporal logic

System: CogComp_NoSim

In_MotorPos_Output_1

In_MotorVel_Output_2

1

CoggingOffsetGain_Output_3

1

CoggingSaturation1_Output_4

1

Sum2_Output_5

1

CoggingCompensationTable_Output_6

1

CoggingCompensationGain_Output_7

1

CoggingSaturation2_Output_8

1

TorqueToCurrentGain_Output_9

1

In_TorqueCmd_Output_10

0.2515

Add_Output_14

0.7485

TorqueCmdSaturation_Output_11

1

CurrentSaturation_Output_15

1

BarToMotorGearRatio_Output_12

1

Out_CurrentCmd_Output_16

1

TorqueToCurrent_Output_13

1

MotorVel_Integrator_Output_17

1

1

Subtract_Output_18

1

Out_PosError_Output_19

1

Gain_Output_20

1

MotorVel_Integrator_Update_21

1

1

System: CogComp_NoSim

In_MotorPos_Output_1

In_MotorVel_Output_2

1

CoggingOffsetGain_Output_3

1

CoggingSaturation1_Output_4

1

Sum2_Output_5

1

CoggingCompensationTable_Output_6

1

CoggingCompensationGain_Output_7

1

CoggingSaturation2_Output_8

1

TorqueToCurrentGain_Output_9

1

In_TorqueCmd_Output_10

0.2515

Add_Output_14

0.7485

TorqueCmdSaturation_Output_11

1

CurrentSaturation_Output_15

1

BarToMotorGearRatio_Output_12

1

Out_CurrentCmd_Output_16

1

TorqueToCurrent_Output_13

1

MotorVel_Integrator_Output_17

1

1

Subtract_Output_18

1

Out_PosError_Output_19

1

Gain_Output_20

1

MotorVel_Integrator_Update_21

1

1

… …

… …

System: CoggingCompensation

In_MotorPos_Output_1

In_MotorVel_Output_2

1

CoggingOffsetGain_Output_3

1

CoggingSaturation1_Output_4

1

Sum2_Output_5

1

CoggingCompensationTable_Output_6

1

CoggingCompensationGain_Output_7

1

CoggingSaturation2_Output_8

1

TorqueToCurrentGain_Output_9

1

In_TorqueCmd_Output_10

0.2515

Add_Output_14

0.7485

TorqueCmdSaturation_Output_11

1

CurrentSaturation_Output_15

1

BarToMotorGearRatio_Output_12

1

Out_CurrentCmd_Output_16

1

TorqueToCurrent_Output_13

1

MotorVel_Integrator_Output_17

1

1

Subtract_Output_18

1

Out_PosError_Output_19

1

Gain_Output_20

1

MotorVel_Integrator_Update_21

1

1

System: CoggingCompensation

In_MotorPos_Output_1

y_In_MotorPos_657344863

Sum2_Output_5

Subtract_Output_18

y_Sum2_203666905

y_Subtract_2378678287

CoggingCompensationTable_Output_6

Out_PosError_Output_19

In_MotorVel_Output_2

y_In_MotorVel_2661206764

CoggingOffsetGain_Output_3Gain_Output_20

y_CoggingOffsetGain_2708895562y_Gain_1557147358

CoggingSaturation1_Output_4

MotorVel_Integrator_Output_17

MotorVel_Integrator_Update_21

y_CoggingSaturation1_241404049

y_CoggingCompensationTable_3165868228

CoggingCompensationGain_Output_7

y_CoggingCompensationGain_399738208

CoggingSaturation2_Output_8

y_CoggingSaturation2_280539442

TorqueToCurrentGain_Output_9

y_TorqueToCurrentGain_2827859947

Add_Output_14

y_Add_4072868728

CurrentSaturation_Output_15

In_TorqueCmd_Output_10

y_In_TorqueCmd_3934591891

TorqueCmdSaturation_Output_11

y_TorqueCmdSaturation_4034694613

BarToMotorGearRatio_Output_12

y_BarToMotorGearRatio_3983491378

TorqueToCurrent_Output_13

y_TorqueToCurrent_769902529

y_CurrentSaturation_1854979390

Out_CurrentCmd_Output_16

y_MotorVel_Integrator_2931541147

x_MotorVel_Integrator_1_4285019041

System: CoggingCompensation

In_MotorPos_Output_1

y_In_MotorPos_657344863

Sum2_Output_5

Subtract_Output_18

y_Sum2_203666905

y_Subtract_2378678287

CoggingCompensationTable_Output_6

Out_PosError_Output_19

In_MotorVel_Output_2

y_In_MotorVel_2661206764

CoggingOffsetGain_Output_3Gain_Output_20

y_CoggingOffsetGain_2708895562y_Gain_1557147358

CoggingSaturation1_Output_4

MotorVel_Integrator_Output_17

MotorVel_Integrator_Update_21

y_CoggingSaturation1_241404049

y_CoggingCompensationTable_3165868228

CoggingCompensationGain_Output_7

y_CoggingCompensationGain_399738208

CoggingSaturation2_Output_8

y_CoggingSaturation2_280539442

TorqueToCurrentGain_Output_9

y_TorqueToCurrentGain_2827859947

Add_Output_14

y_Add_4072868728

CurrentSaturation_Output_15

In_TorqueCmd_Output_10

y_In_TorqueCmd_3934591891

TorqueCmdSaturation_Output_11

y_TorqueCmdSaturation_4034694613

BarToMotorGearRatio_Output_12

y_BarToMotorGearRatio_3983491378

TorqueToCurrent_Output_13

y_TorqueToCurrent_769902529

y_CurrentSaturation_1854979390

Out_CurrentCmd_Output_16

y_MotorVel_Integrator_2931541147

x_MotorVel_Integrator_1_4285019041

Dual-graph error propagation model

ParsingInstrumentation

Partial simulation

Simulink/Stateflow model

Baseline system model: Analytical model:

Error propagation analysis:

• Central part: stochastic dual-graph error propagation model (DEPM).

• Automatic generation of the DEPM from different baseline system models including Simulink.

• Optimized, automatic computation of reliability metrics of the system based on the DEPM.

Page 12: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

1 Introduction: Dependability and error propagation

27.06.2017 Slide12ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Reliability and (Safety) metrics

e.g. mean number of errorsin critical system outputs

during given execution time

Subsystem

Error-prone blocks

Blocks of interest

Blocks with states

Sample time = 0.002

Sample time = 0.008

Analysis: N_err = 451.4

Analysis: N_err = 35.35

Simulation:

Simulation:

AutomatedTransformation

Autom

atedC

omputation

Markov chainsPetri nets

Temporal logic

System: CogComp_NoSim

In_MotorPos_Output_1

In_MotorVel_Output_2

1

CoggingOffsetGain_Output_3

1

CoggingSaturation1_Output_4

1

Sum2_Output_5

1

CoggingCompensationTable_Output_6

1

CoggingCompensationGain_Output_7

1

CoggingSaturation2_Output_8

1

TorqueToCurrentGain_Output_9

1

In_TorqueCmd_Output_10

0.2515

Add_Output_14

0.7485

TorqueCmdSaturation_Output_11

1

CurrentSaturation_Output_15

1

BarToMotorGearRatio_Output_12

1

Out_CurrentCmd_Output_16

1

TorqueToCurrent_Output_13

1

MotorVel_Integrator_Output_17

1

1

Subtract_Output_18

1

Out_PosError_Output_19

1

Gain_Output_20

1

MotorVel_Integrator_Update_21

1

1

System: CogComp_NoSim

In_MotorPos_Output_1

In_MotorVel_Output_2

1

CoggingOffsetGain_Output_3

1

CoggingSaturation1_Output_4

1

Sum2_Output_5

1

CoggingCompensationTable_Output_6

1

CoggingCompensationGain_Output_7

1

CoggingSaturation2_Output_8

1

TorqueToCurrentGain_Output_9

1

In_TorqueCmd_Output_10

0.2515

Add_Output_14

0.7485

TorqueCmdSaturation_Output_11

1

CurrentSaturation_Output_15

1

BarToMotorGearRatio_Output_12

1

Out_CurrentCmd_Output_16

1

TorqueToCurrent_Output_13

1

MotorVel_Integrator_Output_17

1

1

Subtract_Output_18

1

Out_PosError_Output_19

1

Gain_Output_20

1

MotorVel_Integrator_Update_21

1

1

… …

… …

System: CoggingCompensation

In_MotorPos_Output_1

In_MotorVel_Output_2

1

CoggingOffsetGain_Output_3

1

CoggingSaturation1_Output_4

1

Sum2_Output_5

1

CoggingCompensationTable_Output_6

1

CoggingCompensationGain_Output_7

1

CoggingSaturation2_Output_8

1

TorqueToCurrentGain_Output_9

1

In_TorqueCmd_Output_10

0.2515

Add_Output_14

0.7485

TorqueCmdSaturation_Output_11

1

CurrentSaturation_Output_15

1

BarToMotorGearRatio_Output_12

1

Out_CurrentCmd_Output_16

1

TorqueToCurrent_Output_13

1

MotorVel_Integrator_Output_17

1

1

Subtract_Output_18

1

Out_PosError_Output_19

1

Gain_Output_20

1

MotorVel_Integrator_Update_21

1

1

System: CoggingCompensation

In_MotorPos_Output_1

y_In_MotorPos_657344863

Sum2_Output_5

Subtract_Output_18

y_Sum2_203666905

y_Subtract_2378678287

CoggingCompensationTable_Output_6

Out_PosError_Output_19

In_MotorVel_Output_2

y_In_MotorVel_2661206764

CoggingOffsetGain_Output_3Gain_Output_20

y_CoggingOffsetGain_2708895562y_Gain_1557147358

CoggingSaturation1_Output_4

MotorVel_Integrator_Output_17

MotorVel_Integrator_Update_21

y_CoggingSaturation1_241404049

y_CoggingCompensationTable_3165868228

CoggingCompensationGain_Output_7

y_CoggingCompensationGain_399738208

CoggingSaturation2_Output_8

y_CoggingSaturation2_280539442

TorqueToCurrentGain_Output_9

y_TorqueToCurrentGain_2827859947

Add_Output_14

y_Add_4072868728

CurrentSaturation_Output_15

In_TorqueCmd_Output_10

y_In_TorqueCmd_3934591891

TorqueCmdSaturation_Output_11

y_TorqueCmdSaturation_4034694613

BarToMotorGearRatio_Output_12

y_BarToMotorGearRatio_3983491378

TorqueToCurrent_Output_13

y_TorqueToCurrent_769902529

y_CurrentSaturation_1854979390

Out_CurrentCmd_Output_16

y_MotorVel_Integrator_2931541147

x_MotorVel_Integrator_1_4285019041

System: CoggingCompensation

In_MotorPos_Output_1

y_In_MotorPos_657344863

Sum2_Output_5

Subtract_Output_18

y_Sum2_203666905

y_Subtract_2378678287

CoggingCompensationTable_Output_6

Out_PosError_Output_19

In_MotorVel_Output_2

y_In_MotorVel_2661206764

CoggingOffsetGain_Output_3Gain_Output_20

y_CoggingOffsetGain_2708895562y_Gain_1557147358

CoggingSaturation1_Output_4

MotorVel_Integrator_Output_17

MotorVel_Integrator_Update_21

y_CoggingSaturation1_241404049

y_CoggingCompensationTable_3165868228

CoggingCompensationGain_Output_7

y_CoggingCompensationGain_399738208

CoggingSaturation2_Output_8

y_CoggingSaturation2_280539442

TorqueToCurrentGain_Output_9

y_TorqueToCurrentGain_2827859947

Add_Output_14

y_Add_4072868728

CurrentSaturation_Output_15

In_TorqueCmd_Output_10

y_In_TorqueCmd_3934591891

TorqueCmdSaturation_Output_11

y_TorqueCmdSaturation_4034694613

BarToMotorGearRatio_Output_12

y_BarToMotorGearRatio_3983491378

TorqueToCurrent_Output_13

y_TorqueToCurrent_769902529

y_CurrentSaturation_1854979390

Out_CurrentCmd_Output_16

y_MotorVel_Integrator_2931541147

x_MotorVel_Integrator_1_4285019041

Dual-graph error propagation model

ParsingInstrumentation

Partial simulation

Simulink/Stateflow model

Baseline system model: Analytical model:

System: ABC Model Number of steps: 100

A

C

0.3 B

0.7

d3

d1

1

output N_err = 3.63

1d2

Conditions of element Aif (True): then (d1=ok)&&(d2=ok) with pr 0.1 then (d1=error)&&(d2=error) with pr 0.9

Conditions of element Bif (d1==ok): then (d2=ok) with pr 1.0if (d1==error): then (d2=ok) with pr 0.9 then (d2=error) with pr 0.1

Conditions of element Cif (d2==ok)&&(d3 == ok): then (output=ok) with pr 1.0if (d2==error)||(d3 == error): then (output= error) with pr 0.8 then (output= ok) with pr 0.1

Mean number of errors in data storage output: 3.63

a) b)

c)

System: ABC Model Number of steps: 100

A

C

0.3 B

0.7

1

1

System: ABC Model Number of steps: 100

A

d3

d1

C

B

output N_err = 3.63

d2

Controlflow graph

Dataflow graph

Component-level reliability properties

Dual-graph error propagation model (DEPM)

[A. Morozov and K. Janschek. Probabilistic error propagation model for mechatronic systems. Mechatronics, 2014.]

Highlights:

• Probabilities of:• control flow transitions• faults activation• errors propagation

• Cycles in control and data flow graphs

• Parallel processes• Complex hierarchical models

Page 13: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

Reliability and (Safety) metrics

e.g. mean number of errorsin critical system outputs

during given execution time

Subsystem

Error-prone blocks

Blocks of interest

Blocks with states

Sample time = 0.002

Sample time = 0.008

Analysis: N_err = 451.4

Analysis: N_err = 35.35

Simulation:

Simulation:

AutomatedTransformation

Autom

atedC

omputation

Markov chainsPetri nets

Temporal logic

System: CogComp_NoSim

In_MotorPos_Output_1

In_MotorVel_Output_2

1

CoggingOffsetGain_Output_3

1

CoggingSaturation1_Output_4

1

Sum2_Output_5

1

CoggingCompensationTable_Output_6

1

CoggingCompensationGain_Output_7

1

CoggingSaturation2_Output_8

1

TorqueToCurrentGain_Output_9

1

In_TorqueCmd_Output_10

0.2515

Add_Output_14

0.7485

TorqueCmdSaturation_Output_11

1

CurrentSaturation_Output_15

1

BarToMotorGearRatio_Output_12

1

Out_CurrentCmd_Output_16

1

TorqueToCurrent_Output_13

1

MotorVel_Integrator_Output_17

1

1

Subtract_Output_18

1

Out_PosError_Output_19

1

Gain_Output_20

1

MotorVel_Integrator_Update_21

1

1

System: CogComp_NoSim

In_MotorPos_Output_1

In_MotorVel_Output_2

1

CoggingOffsetGain_Output_3

1

CoggingSaturation1_Output_4

1

Sum2_Output_5

1

CoggingCompensationTable_Output_6

1

CoggingCompensationGain_Output_7

1

CoggingSaturation2_Output_8

1

TorqueToCurrentGain_Output_9

1

In_TorqueCmd_Output_10

0.2515

Add_Output_14

0.7485

TorqueCmdSaturation_Output_11

1

CurrentSaturation_Output_15

1

BarToMotorGearRatio_Output_12

1

Out_CurrentCmd_Output_16

1

TorqueToCurrent_Output_13

1

MotorVel_Integrator_Output_17

1

1

Subtract_Output_18

1

Out_PosError_Output_19

1

Gain_Output_20

1

MotorVel_Integrator_Update_21

1

1

… …

… …

System: CoggingCompensation

In_MotorPos_Output_1

In_MotorVel_Output_2

1

CoggingOffsetGain_Output_3

1

CoggingSaturation1_Output_4

1

Sum2_Output_5

1

CoggingCompensationTable_Output_6

1

CoggingCompensationGain_Output_7

1

CoggingSaturation2_Output_8

1

TorqueToCurrentGain_Output_9

1

In_TorqueCmd_Output_10

0.2515

Add_Output_14

0.7485

TorqueCmdSaturation_Output_11

1

CurrentSaturation_Output_15

1

BarToMotorGearRatio_Output_12

1

Out_CurrentCmd_Output_16

1

TorqueToCurrent_Output_13

1

MotorVel_Integrator_Output_17

1

1

Subtract_Output_18

1

Out_PosError_Output_19

1

Gain_Output_20

1

MotorVel_Integrator_Update_21

1

1

System: CoggingCompensation

In_MotorPos_Output_1

y_In_MotorPos_657344863

Sum2_Output_5

Subtract_Output_18

y_Sum2_203666905

y_Subtract_2378678287

CoggingCompensationTable_Output_6

Out_PosError_Output_19

In_MotorVel_Output_2

y_In_MotorVel_2661206764

CoggingOffsetGain_Output_3Gain_Output_20

y_CoggingOffsetGain_2708895562y_Gain_1557147358

CoggingSaturation1_Output_4

MotorVel_Integrator_Output_17

MotorVel_Integrator_Update_21

y_CoggingSaturation1_241404049

y_CoggingCompensationTable_3165868228

CoggingCompensationGain_Output_7

y_CoggingCompensationGain_399738208

CoggingSaturation2_Output_8

y_CoggingSaturation2_280539442

TorqueToCurrentGain_Output_9

y_TorqueToCurrentGain_2827859947

Add_Output_14

y_Add_4072868728

CurrentSaturation_Output_15

In_TorqueCmd_Output_10

y_In_TorqueCmd_3934591891

TorqueCmdSaturation_Output_11

y_TorqueCmdSaturation_4034694613

BarToMotorGearRatio_Output_12

y_BarToMotorGearRatio_3983491378

TorqueToCurrent_Output_13

y_TorqueToCurrent_769902529

y_CurrentSaturation_1854979390

Out_CurrentCmd_Output_16

y_MotorVel_Integrator_2931541147

x_MotorVel_Integrator_1_4285019041

System: CoggingCompensation

In_MotorPos_Output_1

y_In_MotorPos_657344863

Sum2_Output_5

Subtract_Output_18

y_Sum2_203666905

y_Subtract_2378678287

CoggingCompensationTable_Output_6

Out_PosError_Output_19

In_MotorVel_Output_2

y_In_MotorVel_2661206764

CoggingOffsetGain_Output_3Gain_Output_20

y_CoggingOffsetGain_2708895562y_Gain_1557147358

CoggingSaturation1_Output_4

MotorVel_Integrator_Output_17

MotorVel_Integrator_Update_21

y_CoggingSaturation1_241404049

y_CoggingCompensationTable_3165868228

CoggingCompensationGain_Output_7

y_CoggingCompensationGain_399738208

CoggingSaturation2_Output_8

y_CoggingSaturation2_280539442

TorqueToCurrentGain_Output_9

y_TorqueToCurrentGain_2827859947

Add_Output_14

y_Add_4072868728

CurrentSaturation_Output_15

In_TorqueCmd_Output_10

y_In_TorqueCmd_3934591891

TorqueCmdSaturation_Output_11

y_TorqueCmdSaturation_4034694613

BarToMotorGearRatio_Output_12

y_BarToMotorGearRatio_3983491378

TorqueToCurrent_Output_13

y_TorqueToCurrent_769902529

y_CurrentSaturation_1854979390

Out_CurrentCmd_Output_16

y_MotorVel_Integrator_2931541147

x_MotorVel_Integrator_1_4285019041

Dual-graph error propagation model

ParsingInstrumentation

Partial simulation

Simulink/Stateflow model

Baseline system model: Analytical model:

1 Introduction: Dependability and error propagation

27.06.2017 Slide13ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

[A. Morozov and K. Janschek. Dual graph error propagation model for mechatronic system analysis, 2011][A. Morozov and K. Janschek. Probabilistic error propagation model for mechatronic systems. Mechatronics, 2014.]

Discrete time Markov models (DTMC)

0.63 0.070.030.27

1

0.90.1

0.8

0.2

1

1

… …

Initial state

Failure state

Error-free execution 0.63

A 0 0 0 0

B 0 0 0 0C 0 0 0 0 B 1 0 1 0C 1 0 1 0

C 1 1 1 0A 1 0 1 0 A 1 1 1 0

A 1 1 1 1

Highlights:

• Automatic generation and computation of DTMC models

• Petri net models for timing and parallel processes

• Optimizations: Fast solvers, nesting, data flow slicing

Page 14: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

Model-basedanalysis

Concept

DependabilitymetricsRequirements

Modeling

Compare

Models

Formalization

Impr

ovem

ents

27.06.2017 Slide14ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Analytical approach

[A.Morozov,R.Tuk,andK.Janschek.ErrorPro:Softwaretoolforstochasticerrorpropagationanalysis,2015.]

1 Introduction: Analytical and simulative approaches

Page 15: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

Model-basedanalysis

Concept

DependabilitymetricsRequirements

Modeling

Compare

Models

Formalization

Impr

ovem

ents

27.06.2017 Slide15ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

+ Precise low-probability analysis- Complex methods and technologies- State space explosion problem

1 Introduction: Analytical and simulative approaches

Analytical approach

Page 16: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

Model-basedanalysis

Concept

DependabilitymetricsRequirements

Modeling

Compare

Models

Formalization

Impr

ovem

ents

27.06.2017 Slide16ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

+ Precise low-probability analysis- Complex methods and technologies- State space explosion problem

+ Relatively simple solution- Requires a lot of simulations

1 Introduction: Analytical and simulative approaches

Analytical approach

Simulative approach

Page 17: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide17

Outline

2

ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Introduction• Model-based system analysis• Dependability and error propagation• Analytical and simulative approaches

ErrorSim• Workflow • Fault types and injection methods• Reported statistical information

Case study• Reference Simulink model• Experiments • Result interpretation

Page 18: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

ErrorSim: Workflow

27.06.2017 Slide18

Input:

Simulink model withhighlighted blocks

Red faulty blocks, errors are injected in the outputs of these blocks.

Yellow blocks of interest, statistical information is gathered for these blocks.

ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Set upfaulty blocks

Examineresults

Runsimulations

1

2

3

Error Sim

Output:

Reliability metrics forthe blocks of interest:

• Error plots• Number of errors• Failure rates…

MATLAB, Simulink API, GIUDE

Page 19: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

ErrorSim: Fault types and injection methods

27.06.2017 Slide19ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Fault types

Set upfaulty blocks

Examineresults

Runsimulations

1

2

3

Event (when):• Failure probability• Mean Time To Failure (MTTF)• Failure rate distribution

Effect (how long):• Once• Constant time• Infinite time• Mean Time To Repair (MTTR)

• Sensor faults• Hardware faults• Network faults

Injection methods

Page 20: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

ErrorSim: Fault types and injection methods

27.06.2017 Slide20ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Fault types

Sensor: Offset

Stuck-at fault

Noise

Hardware: Bit flips

Network: Package dropDelay

following the IEC 61508 standard

Set upfaulty blocks

Examineresults

Runsimulations

1

2

3

01001010 = 74

01101010 = 106

Page 21: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

ErrorSim: Fault types and injection methods

27.06.2017 Slide21ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Injection methods based on FIDES and Mil-HDBK-217

Set upfaulty blocks

Examineresults

Runsimulations

1

2

3

Event: Failure probability

Effect: Once

MTTR

Constant/infinite time

DistributionMTTF

Page 22: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

Set upfaulty blocks

Examineresults

Runsimulations

1

2

3

ErrorSim: Workflow

27.06.2017 Slide22ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Technical details

• Correct run• N runs with error injections• Model instrumentation using block

function callbacks of the Simulink API

Page 23: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

Set upfaulty blocks

Examineresults

Runsimulations

1

2

3

ErrorSim: Reported statistical information

27.06.2017 Slide23ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Statistical information

Signal values:• Correct • Faulty• Error (residual)

Reliability metrics:• Mean number of errors

and its time distribution• Mean error value

and its time distribution

Performance indices:• Integral squared error• Integral absolute error• Integral time absolute error

Page 24: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide24

Outline

3ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Introduction• Model-based system analysis• Dependability and error propagation• Analytical and simulative approaches

ErrorSim• Workflow • Fault types and injection methods• Reported statistical information

Case study• Reference Simulink model• Experiments • Result interpretation

Page 25: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide25ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Case study: Reference Simulink model

Simulink model of a fault-tolerant control of a passenger jet:

• test and tune, state feedback parameters in order to achieve better fault tolerance;

• error injection into three sensor signals that represent µ, α, and, β angles of an aircraft;

• evaluation of errors in critical outputs.

[Mathworks: Fault-tolerant control of a passenger jet - Matlab Simulink example, 2016]

[M. Saraoglu, A. Morozov, M. Turan Soylemez and K. Janschek. ErrorSim: a Tool for Error Propagation Analysis of Simulink Models, SafeComp 2017]

Faulty blocks

Blocks of interest

Page 26: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide26ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Case study: Experiments

Three experiments with various fault types and injection methods from light to more severe:

Page 27: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide27ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Case study: Experiments

Correct run: Experiment 1:Eventual deteriorations

Experiment 2:Minor continuous deteriorations

Experiment 3:Unstable behavior

Page 28: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide28

Achieved results:• New lightweight tool for error analysis of Simulink models

• Various fault types based on IEC 61508

• Various fault injection methods based on FIDES and Mil-HDBK-217

• Reported reliability metrics suitable for RAMS analysis of a complete system

Future challenges:• Performance evaluation and optimization

• Automatic report generation for FTA/FMEA

• Integration into industrial development processes.

ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Conclusion

Page 29: ERRORSIM: A SIMULATOR FOR ERROR PROPAGATION ANALYSIS …€¦ · 1 Introduction: Dependability and error propagation 27.06.2017 ErrorSim: A Simulator for Error Propagation Analysis

27.06.2017 Slide29

Thank you!

ErrorSim:ASimulatorforErrorPropagationAnalysisofControlSystemsDevelopedinSimulink

Diplomastudents andinterns:2017:Boqi Ren,Fangmeng Zhu2016:YueLong,TaoChen,2015:YuZhou,Fusheng Zhao,2014:ReginaTuk, WeiZhang, ArseniiRashidov,JinLi,YaoLi…

ThomasMutzkeSiemensHealthineers

KaiDing

AndreyMorozov

MustafaSaraogluErasmus

MikaelStreuerHochschuleNordhausen

KlausJanschek

Researchteam:

WearelookingforpartnersforfurtherdevelopmentandintegrationoftheErrorSim intoindustrialprocesses.

[email protected]