SlideShare a Scribd company logo
.lusoftware verification & validation
VVS
Automated Testing of Hybrid
Simulink/Stateflow Controllers
Industrial Case Studies
Reza Matinnejad
Shiva Nejati
Lionel Briand
SnT Centre/University of Luxembourg
Software Development in
Automotive
• Software development is largely model-based
• Automotive software models have dynamic behaviors
• Mathematical models
capturing plants/hardware
• Controllers
2
Two Types of Controllers
• Open loop controllers
• Closed loop controllers
3
Controller
Actuator Sensor
Plant
Input
Controller
Actuator
Plant
Input
Disturbances
Disturbances
Open Loop vs Closed Loop
• Closed loop controllers – PID controllers
• More expensive
• More accurate and self-adaptive
• Always present in large and critical cyber-physical systems
• Open loop controllers – State-based models
• Less expensive
• Often controls timing behaviors
• Is combined with closed-loop controllers
4
Simulink/Stateflow Models
• Heterogeneous
• Continuous behavior
• Are used for
• simulation
• algorithm design testing
• code generation
5
Time-Continuous
Simulink Model Hardware
Model
Network Model
Existing Simulink Testing Tools
• Control theory techniques
• Synthesis of linear PID controllers
• Automated test case generation
• Based on (formal) assertions or structural code coverage
• Automated verification
• Model checking or theorem proving
6
Limitations
• Automotive models are rarely linear
• Automatable test oracles may not be available or sufficient
• Test oracles are in many cases manual
• Structural coverage may not help reveal faults
• White box approaches have incompatibility issues
• Scalability issues
7
Black Box Search Based
Testing of Simulink
8
Solution Generation
Fitness computation
• Explorative
• Exploitative
Model Input
Spec
Input
Signals
Input Signals
• Simulate the model
• Compute Fitness functions
on outputs
Simulink
Model Fitness
values
Model
Simulation
ut
als
Output
Signal(s)
[SSBSE 2013, ASE 2014, ESEC/FSE 2015,
IST J 2015, ICSE 2016]
Fitness Functions – Closed Loop
• Generic requirements
• Stability, responsiveness and smoothness
• Maximizing (quantitative) fitness functions to generate
failure
9
InitialDesired
(ID)
Desired ValueI (input)
Actual Value (output)
FinalDesired
(FD)
time
T/2 T
Smoothness
Responsiveness
Stability
Fitness Functions – Closed Loop
• Specific requirements
• E.g., ``The contact between caliper and disk should occur
within 32ms’’
caliper position à disk position à
10
⌃[0,32]⇤((x  x0 + ✏) ^ (x x0 ✏))
x x0
Min{Max{Max{|x(t) (x0 + ✏)|, |x(t) (x0 ✏)|}}t0tT }
Translation [Abbas et. al. TECS 2013]
Fitness Functions – Open Loop
• Failure patterns
• Output diversity
11
0.0 1.0 2.00.0 1.0 2.0
-1.0
-0.5
0.0
0.5
1.0
Time Time
0.0
0.25
0.50
0.75
1.0
Output of Our Approach
• Failure Explanation
• A characterization of the input space showing under what
input conditions the system is likely to fail
• Visualized by diagrams or regression trees
• Failure Detection
• Individual test cases revealing failures
• A set of test input signals
12
Case studies
• A mixed of closed loop and open loop controllers, and plant
models
• Developed by BOSCH
• Publicly available
• A large plant model – a mathematical continuous model
• Developed by an automotive company
13
Failure Explanation – Heatmap
Diagram
14
L
R
Failure Explanation – Regression
Tree
15
All Points
Count
Mean
Std Dev
2384
1.016e+10
4.898e+11
c_gear>=1.0279
Count
Mean
Std Dev
1997
25167.822
135651.79
Count
Mean
Std Dev
387
6.257e+10
1.216e+12
t0>=0.0029462
Count
Mean
Std Dev
1631
4550.4502
55698.046
t0<0.0029462
Count
Mean
Std Dev
366
117044.69
276423.68
c_gear<1.0279
Failure Detection – Closed Loop
16
0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.080.0
0.042
0.044
0.046
0.048
0.050
0.052
⌃[0,32]⇤((x  x0 + ✏) ^ (x x0 ✏))Test Input violating:
time
position
Failure Detection – Open Loop
17
0 1.0 2.0 0 1.0 2.0
0
4.0
-4.0
-8.0
0
1.5
-1.5
1.0
-1.0
0.5
-0.5
2.0
-2.0
-6.0
10
5
10
6
Time Time
Test inputs exhibiting ``instability” and ``grow to infinity”
failure patterns
Summary of Lessons Learned
• Generating test cases is not enough
• It is important to help engineers with input space exploration
and failure explanation
18
All Points
Count
Mean
Std Dev
2384
1.016e+10
4.898e+11
c_gear>=1.0279
Count
Mean
Std Dev
1997
25167.822
135651.79
Count
Mean
Std Dev
387
6.257e+10
1.216e+12
t0>=0.0029462
Count
Mean
Std Dev
1631
4550.4502
55698.046
t0<0.0029462
Count
Mean
Std Dev
366
117044.69
276423.68
c_gear<1.0279
Summary of Lessons Learned
• Engineers do not always have specific and precise
requirements at hand
• We generate test cases that reveal violation of both specific
requirements and (estimated) failure patterns
19
0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.080.0
0.042
0.044
0.046
0.048
0.050
0.052
0 1.0 2.0
0
1.5
-1.5
1.0
-1.0
0.5
-0.5
10
5
Time
Summary of Lessons Learned
• Incompatibility issues or manual overhead is a major obstacle
for adoption of current Simulink testing tools
• Our approach is black box and has no overhead
• Time performance of our approach is acceptable
20
Our Tools
• SimCoTest
Simulink Controller Tester
https://sites.google.com/site/simcotesttool/
• CoCoTest
Continuous Controller Tester
https://sites.google.com/site/cocotesttool/
21

More Related Content

What's hot

Transfer defect learning
Transfer defect learningTransfer defect learning
Transfer defect learning
Sung Kim
 
Simulink
SimulinkSimulink
Simulink
Kelin Jose
 
Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Automated and Scalable Solutions for Software Testing: The Essential Role of ...Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Lionel Briand
 
Pspice Introduction
Pspice IntroductionPspice Introduction
Pspice Introduction
Akshay Dhole
 
Automatic Test Suite Generation for Key-Points Detection DNNs using Many-Obje...
Automatic Test Suite Generation for Key-Points Detection DNNs using Many-Obje...Automatic Test Suite Generation for Key-Points Detection DNNs using Many-Obje...
Automatic Test Suite Generation for Key-Points Detection DNNs using Many-Obje...
Lionel Briand
 
MathWorks and Freescale Cup - Working with MATLAB & Simulink
MathWorks and Freescale Cup - Working with MATLAB & SimulinkMathWorks and Freescale Cup - Working with MATLAB & Simulink
MathWorks and Freescale Cup - Working with MATLAB & Simulink
Joachim Schlosser
 
Practical Constraint Solving for Generating System Test Data
Practical Constraint Solving for Generating System Test DataPractical Constraint Solving for Generating System Test Data
Practical Constraint Solving for Generating System Test Data
Lionel Briand
 
Introduction to simulink (1)
Introduction to simulink (1)Introduction to simulink (1)
Introduction to simulink (1)
Memo Love
 
Introduction to PSPICE
Introduction to PSPICEIntroduction to PSPICE
Introduction to PSPICE
syella
 
Simulink
SimulinkSimulink
Simulink
jackabraham
 
Scilab for very beginners
Scilab for very beginnersScilab for very beginners
Scilab for very beginners
Scilab
 
Simulink Projects Research Help
Simulink Projects Research HelpSimulink Projects Research Help
Simulink Projects Research Help
Matlab Simulation
 
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
Sung Kim
 
Intro to p-spice
Intro to p-spiceIntro to p-spice
Intro to p-spice
sathiyavathisasikumar
 
Orcad pspice intro and basics
Orcad pspice intro and basicsOrcad pspice intro and basics
Orcad pspice intro and basics
Praveen Kumar
 
Forelasning4
Forelasning4Forelasning4
Forelasning4
Memo Love
 
STL Algorithms In Action
STL Algorithms In ActionSTL Algorithms In Action
STL Algorithms In Action
Northwest C++ Users' Group
 
Matlab simulink introduction
Matlab simulink introductionMatlab simulink introduction
Matlab simulink introduction
Ameen San
 

What's hot (19)

Transfer defect learning
Transfer defect learningTransfer defect learning
Transfer defect learning
 
Simulink
SimulinkSimulink
Simulink
 
Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Automated and Scalable Solutions for Software Testing: The Essential Role of ...Automated and Scalable Solutions for Software Testing: The Essential Role of ...
Automated and Scalable Solutions for Software Testing: The Essential Role of ...
 
Pspice Introduction
Pspice IntroductionPspice Introduction
Pspice Introduction
 
Automatic Test Suite Generation for Key-Points Detection DNNs using Many-Obje...
Automatic Test Suite Generation for Key-Points Detection DNNs using Many-Obje...Automatic Test Suite Generation for Key-Points Detection DNNs using Many-Obje...
Automatic Test Suite Generation for Key-Points Detection DNNs using Many-Obje...
 
MathWorks and Freescale Cup - Working with MATLAB & Simulink
MathWorks and Freescale Cup - Working with MATLAB & SimulinkMathWorks and Freescale Cup - Working with MATLAB & Simulink
MathWorks and Freescale Cup - Working with MATLAB & Simulink
 
Practical Constraint Solving for Generating System Test Data
Practical Constraint Solving for Generating System Test DataPractical Constraint Solving for Generating System Test Data
Practical Constraint Solving for Generating System Test Data
 
Introduction to simulink (1)
Introduction to simulink (1)Introduction to simulink (1)
Introduction to simulink (1)
 
Introduction to PSPICE
Introduction to PSPICEIntroduction to PSPICE
Introduction to PSPICE
 
Simulink
SimulinkSimulink
Simulink
 
Scilab for very beginners
Scilab for very beginnersScilab for very beginners
Scilab for very beginners
 
Simulink Projects Research Help
Simulink Projects Research HelpSimulink Projects Research Help
Simulink Projects Research Help
 
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
REMI: Defect Prediction for Efficient API Testing (

ESEC/FSE 2015, Industria...
 
Intro to p-spice
Intro to p-spiceIntro to p-spice
Intro to p-spice
 
Orcad pspice intro and basics
Orcad pspice intro and basicsOrcad pspice intro and basics
Orcad pspice intro and basics
 
Forelasning4
Forelasning4Forelasning4
Forelasning4
 
Py conie 2014
Py conie 2014Py conie 2014
Py conie 2014
 
STL Algorithms In Action
STL Algorithms In ActionSTL Algorithms In Action
STL Algorithms In Action
 
Matlab simulink introduction
Matlab simulink introductionMatlab simulink introduction
Matlab simulink introduction
 

Similar to Automated Testing of Hybrid Simulink/Stateflow Controllers

Intro to LV in 3 Hours for Control and Sim 8_5.pptx
Intro to LV in 3 Hours for Control and Sim 8_5.pptxIntro to LV in 3 Hours for Control and Sim 8_5.pptx
Intro to LV in 3 Hours for Control and Sim 8_5.pptx
DeepakJangid87
 
Modelon Modelica executable requirements Ansys Conference 2016
Modelon Modelica executable requirements Ansys Conference 2016Modelon Modelica executable requirements Ansys Conference 2016
Modelon Modelica executable requirements Ansys Conference 2016
Modelon
 
DCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdf
DCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdfDCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdf
DCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdf
Okeke Livinus
 
When Should I Use Simulation?
When Should I Use Simulation?When Should I Use Simulation?
When Should I Use Simulation?
SIMUL8 Corporation
 
Making Model-Driven Verification Practical and Scalable: Experiences and Less...
Making Model-Driven Verification Practical and Scalable: Experiences and Less...Making Model-Driven Verification Practical and Scalable: Experiences and Less...
Making Model-Driven Verification Practical and Scalable: Experiences and Less...
Lionel Briand
 
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Lionel Briand
 
Automated Test Suite Generation for Time-Continuous Simulink Models
Automated Test Suite Generation for Time-Continuous Simulink ModelsAutomated Test Suite Generation for Time-Continuous Simulink Models
Automated Test Suite Generation for Time-Continuous Simulink Models
Lionel Briand
 
Functional verification techniques EW16 session
Functional verification techniques  EW16 sessionFunctional verification techniques  EW16 session
Functional verification techniques EW16 session
Sameh El-Ashry
 
Optimica Compiler Toolkit - Overview
Optimica Compiler Toolkit - OverviewOptimica Compiler Toolkit - Overview
Optimica Compiler Toolkit - Overview
Modelon
 
The Benefits of using Dynamic Simulation and Training Systems
The Benefits of using Dynamic Simulation and Training SystemsThe Benefits of using Dynamic Simulation and Training Systems
The Benefits of using Dynamic Simulation and Training Systems
Risman Hatibi
 
ScilabTEC 2015 - Noesis Solutions
ScilabTEC 2015 - Noesis SolutionsScilabTEC 2015 - Noesis Solutions
ScilabTEC 2015 - Noesis Solutions
Scilab
 
Small is Beautiful- Fully Automate your Test Case Design
Small is Beautiful- Fully Automate your Test Case DesignSmall is Beautiful- Fully Automate your Test Case Design
Small is Beautiful- Fully Automate your Test Case Design
Georgina Tilby
 
ASIC design verification
ASIC design verificationASIC design verification
ASIC design verification
Gireesh Kallihal
 
Testing of Cyber-Physical Systems: Diversity-driven Strategies
Testing of Cyber-Physical Systems: Diversity-driven StrategiesTesting of Cyber-Physical Systems: Diversity-driven Strategies
Testing of Cyber-Physical Systems: Diversity-driven Strategies
Lionel Briand
 
What is HIL (HardWare In The Loop)
What is HIL (HardWare In The Loop)What is HIL (HardWare In The Loop)
What is HIL (HardWare In The Loop)
Tbrad
 
Model based design-Hardware in loop-software in loop
Model based design-Hardware in loop-software in loopModel based design-Hardware in loop-software in loop
Model based design-Hardware in loop-software in loop
Mahmoud Hussein
 
MIL_SIL.pdf
MIL_SIL.pdfMIL_SIL.pdf
MIL_SIL.pdf
JaspreetKaur957115
 
Incremental Queries and Transformations for Engineering Critical Systems
Incremental Queries and Transformations for Engineering Critical SystemsIncremental Queries and Transformations for Engineering Critical Systems
Incremental Queries and Transformations for Engineering Critical Systems
Ákos Horváth
 
TMCS & Its Solutions- EOL Testing, DAQ System, ATE Testing.pptx
TMCS & Its Solutions- EOL Testing, DAQ System, ATE Testing.pptxTMCS & Its Solutions- EOL Testing, DAQ System, ATE Testing.pptx
TMCS & Its Solutions- EOL Testing, DAQ System, ATE Testing.pptx
TMCS India
 

Similar to Automated Testing of Hybrid Simulink/Stateflow Controllers (20)

Intro to LV in 3 Hours for Control and Sim 8_5.pptx
Intro to LV in 3 Hours for Control and Sim 8_5.pptxIntro to LV in 3 Hours for Control and Sim 8_5.pptx
Intro to LV in 3 Hours for Control and Sim 8_5.pptx
 
Modelon Modelica executable requirements Ansys Conference 2016
Modelon Modelica executable requirements Ansys Conference 2016Modelon Modelica executable requirements Ansys Conference 2016
Modelon Modelica executable requirements Ansys Conference 2016
 
DCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdf
DCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdfDCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdf
DCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdf
 
When Should I Use Simulation?
When Should I Use Simulation?When Should I Use Simulation?
When Should I Use Simulation?
 
Making Model-Driven Verification Practical and Scalable: Experiences and Less...
Making Model-Driven Verification Practical and Scalable: Experiences and Less...Making Model-Driven Verification Practical and Scalable: Experiences and Less...
Making Model-Driven Verification Practical and Scalable: Experiences and Less...
 
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
Testing Dynamic Behavior in Executable Software Models - Making Cyber-physica...
 
Automated Test Suite Generation for Time-Continuous Simulink Models
Automated Test Suite Generation for Time-Continuous Simulink ModelsAutomated Test Suite Generation for Time-Continuous Simulink Models
Automated Test Suite Generation for Time-Continuous Simulink Models
 
Functional verification techniques EW16 session
Functional verification techniques  EW16 sessionFunctional verification techniques  EW16 session
Functional verification techniques EW16 session
 
Optimica Compiler Toolkit - Overview
Optimica Compiler Toolkit - OverviewOptimica Compiler Toolkit - Overview
Optimica Compiler Toolkit - Overview
 
The Benefits of using Dynamic Simulation and Training Systems
The Benefits of using Dynamic Simulation and Training SystemsThe Benefits of using Dynamic Simulation and Training Systems
The Benefits of using Dynamic Simulation and Training Systems
 
ScilabTEC 2015 - Noesis Solutions
ScilabTEC 2015 - Noesis SolutionsScilabTEC 2015 - Noesis Solutions
ScilabTEC 2015 - Noesis Solutions
 
Lec13
Lec13Lec13
Lec13
 
Small is Beautiful- Fully Automate your Test Case Design
Small is Beautiful- Fully Automate your Test Case DesignSmall is Beautiful- Fully Automate your Test Case Design
Small is Beautiful- Fully Automate your Test Case Design
 
ASIC design verification
ASIC design verificationASIC design verification
ASIC design verification
 
Testing of Cyber-Physical Systems: Diversity-driven Strategies
Testing of Cyber-Physical Systems: Diversity-driven StrategiesTesting of Cyber-Physical Systems: Diversity-driven Strategies
Testing of Cyber-Physical Systems: Diversity-driven Strategies
 
What is HIL (HardWare In The Loop)
What is HIL (HardWare In The Loop)What is HIL (HardWare In The Loop)
What is HIL (HardWare In The Loop)
 
Model based design-Hardware in loop-software in loop
Model based design-Hardware in loop-software in loopModel based design-Hardware in loop-software in loop
Model based design-Hardware in loop-software in loop
 
MIL_SIL.pdf
MIL_SIL.pdfMIL_SIL.pdf
MIL_SIL.pdf
 
Incremental Queries and Transformations for Engineering Critical Systems
Incremental Queries and Transformations for Engineering Critical SystemsIncremental Queries and Transformations for Engineering Critical Systems
Incremental Queries and Transformations for Engineering Critical Systems
 
TMCS & Its Solutions- EOL Testing, DAQ System, ATE Testing.pptx
TMCS & Its Solutions- EOL Testing, DAQ System, ATE Testing.pptxTMCS & Its Solutions- EOL Testing, DAQ System, ATE Testing.pptx
TMCS & Its Solutions- EOL Testing, DAQ System, ATE Testing.pptx
 

More from Lionel Briand

Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
Lionel Briand
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
Lionel Briand
 
Metamorphic Testing for Web System Security
Metamorphic Testing for Web System SecurityMetamorphic Testing for Web System Security
Metamorphic Testing for Web System Security
Lionel Briand
 
Simulator-based Explanation and Debugging of Hazard-triggering Events in DNN-...
Simulator-based Explanation and Debugging of Hazard-triggering Events in DNN-...Simulator-based Explanation and Debugging of Hazard-triggering Events in DNN-...
Simulator-based Explanation and Debugging of Hazard-triggering Events in DNN-...
Lionel Briand
 
Fuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation TestingFuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation Testing
Lionel Briand
 
Data-driven Mutation Analysis for Cyber-Physical Systems
Data-driven Mutation Analysis for Cyber-Physical SystemsData-driven Mutation Analysis for Cyber-Physical Systems
Data-driven Mutation Analysis for Cyber-Physical Systems
Lionel Briand
 
Many-Objective Reinforcement Learning for Online Testing of DNN-Enabled Systems
Many-Objective Reinforcement Learning for Online Testing of DNN-Enabled SystemsMany-Objective Reinforcement Learning for Online Testing of DNN-Enabled Systems
Many-Objective Reinforcement Learning for Online Testing of DNN-Enabled Systems
Lionel Briand
 
ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolu...
ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolu...ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolu...
ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolu...
Lionel Briand
 
Black-box Safety Analysis and Retraining of DNNs based on Feature Extraction ...
Black-box Safety Analysis and Retraining of DNNs based on Feature Extraction ...Black-box Safety Analysis and Retraining of DNNs based on Feature Extraction ...
Black-box Safety Analysis and Retraining of DNNs based on Feature Extraction ...
Lionel Briand
 
PRINS: Scalable Model Inference for Component-based System Logs
PRINS: Scalable Model Inference for Component-based System LogsPRINS: Scalable Model Inference for Component-based System Logs
PRINS: Scalable Model Inference for Component-based System Logs
Lionel Briand
 
Revisiting the Notion of Diversity in Software Testing
Revisiting the Notion of Diversity in Software TestingRevisiting the Notion of Diversity in Software Testing
Revisiting the Notion of Diversity in Software Testing
Lionel Briand
 
Applications of Search-based Software Testing to Trustworthy Artificial Intel...
Applications of Search-based Software Testing to Trustworthy Artificial Intel...Applications of Search-based Software Testing to Trustworthy Artificial Intel...
Applications of Search-based Software Testing to Trustworthy Artificial Intel...
Lionel Briand
 
Autonomous Systems: How to Address the Dilemma between Autonomy and Safety
Autonomous Systems: How to Address the Dilemma between Autonomy and SafetyAutonomous Systems: How to Address the Dilemma between Autonomy and Safety
Autonomous Systems: How to Address the Dilemma between Autonomy and Safety
Lionel Briand
 
Mathematicians, Social Scientists, or Engineers? The Split Minds of Software ...
Mathematicians, Social Scientists, or Engineers? The Split Minds of Software ...Mathematicians, Social Scientists, or Engineers? The Split Minds of Software ...
Mathematicians, Social Scientists, or Engineers? The Split Minds of Software ...
Lionel Briand
 
Reinforcement Learning for Test Case Prioritization
Reinforcement Learning for Test Case PrioritizationReinforcement Learning for Test Case Prioritization
Reinforcement Learning for Test Case Prioritization
Lionel Briand
 
Mutation Analysis for Cyber-Physical Systems: Scalable Solutions and Results ...
Mutation Analysis for Cyber-Physical Systems: Scalable Solutions and Results ...Mutation Analysis for Cyber-Physical Systems: Scalable Solutions and Results ...
Mutation Analysis for Cyber-Physical Systems: Scalable Solutions and Results ...
Lionel Briand
 
On Systematically Building a Controlled Natural Language for Functional Requi...
On Systematically Building a Controlled Natural Language for Functional Requi...On Systematically Building a Controlled Natural Language for Functional Requi...
On Systematically Building a Controlled Natural Language for Functional Requi...
Lionel Briand
 
Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...
Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...
Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...
Lionel Briand
 
Guidelines for Assessing the Accuracy of Log Message Template Identification ...
Guidelines for Assessing the Accuracy of Log Message Template Identification ...Guidelines for Assessing the Accuracy of Log Message Template Identification ...
Guidelines for Assessing the Accuracy of Log Message Template Identification ...
Lionel Briand
 
A Theoretical Framework for Understanding the Relationship between Log Parsin...
A Theoretical Framework for Understanding the Relationship between Log Parsin...A Theoretical Framework for Understanding the Relationship between Log Parsin...
A Theoretical Framework for Understanding the Relationship between Log Parsin...
Lionel Briand
 

More from Lionel Briand (20)

Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Metamorphic Testing for Web System Security
Metamorphic Testing for Web System SecurityMetamorphic Testing for Web System Security
Metamorphic Testing for Web System Security
 
Simulator-based Explanation and Debugging of Hazard-triggering Events in DNN-...
Simulator-based Explanation and Debugging of Hazard-triggering Events in DNN-...Simulator-based Explanation and Debugging of Hazard-triggering Events in DNN-...
Simulator-based Explanation and Debugging of Hazard-triggering Events in DNN-...
 
Fuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation TestingFuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation Testing
 
Data-driven Mutation Analysis for Cyber-Physical Systems
Data-driven Mutation Analysis for Cyber-Physical SystemsData-driven Mutation Analysis for Cyber-Physical Systems
Data-driven Mutation Analysis for Cyber-Physical Systems
 
Many-Objective Reinforcement Learning for Online Testing of DNN-Enabled Systems
Many-Objective Reinforcement Learning for Online Testing of DNN-Enabled SystemsMany-Objective Reinforcement Learning for Online Testing of DNN-Enabled Systems
Many-Objective Reinforcement Learning for Online Testing of DNN-Enabled Systems
 
ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolu...
ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolu...ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolu...
ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolu...
 
Black-box Safety Analysis and Retraining of DNNs based on Feature Extraction ...
Black-box Safety Analysis and Retraining of DNNs based on Feature Extraction ...Black-box Safety Analysis and Retraining of DNNs based on Feature Extraction ...
Black-box Safety Analysis and Retraining of DNNs based on Feature Extraction ...
 
PRINS: Scalable Model Inference for Component-based System Logs
PRINS: Scalable Model Inference for Component-based System LogsPRINS: Scalable Model Inference for Component-based System Logs
PRINS: Scalable Model Inference for Component-based System Logs
 
Revisiting the Notion of Diversity in Software Testing
Revisiting the Notion of Diversity in Software TestingRevisiting the Notion of Diversity in Software Testing
Revisiting the Notion of Diversity in Software Testing
 
Applications of Search-based Software Testing to Trustworthy Artificial Intel...
Applications of Search-based Software Testing to Trustworthy Artificial Intel...Applications of Search-based Software Testing to Trustworthy Artificial Intel...
Applications of Search-based Software Testing to Trustworthy Artificial Intel...
 
Autonomous Systems: How to Address the Dilemma between Autonomy and Safety
Autonomous Systems: How to Address the Dilemma between Autonomy and SafetyAutonomous Systems: How to Address the Dilemma between Autonomy and Safety
Autonomous Systems: How to Address the Dilemma between Autonomy and Safety
 
Mathematicians, Social Scientists, or Engineers? The Split Minds of Software ...
Mathematicians, Social Scientists, or Engineers? The Split Minds of Software ...Mathematicians, Social Scientists, or Engineers? The Split Minds of Software ...
Mathematicians, Social Scientists, or Engineers? The Split Minds of Software ...
 
Reinforcement Learning for Test Case Prioritization
Reinforcement Learning for Test Case PrioritizationReinforcement Learning for Test Case Prioritization
Reinforcement Learning for Test Case Prioritization
 
Mutation Analysis for Cyber-Physical Systems: Scalable Solutions and Results ...
Mutation Analysis for Cyber-Physical Systems: Scalable Solutions and Results ...Mutation Analysis for Cyber-Physical Systems: Scalable Solutions and Results ...
Mutation Analysis for Cyber-Physical Systems: Scalable Solutions and Results ...
 
On Systematically Building a Controlled Natural Language for Functional Requi...
On Systematically Building a Controlled Natural Language for Functional Requi...On Systematically Building a Controlled Natural Language for Functional Requi...
On Systematically Building a Controlled Natural Language for Functional Requi...
 
Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...
Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...
Efficient Online Testing for DNN-Enabled Systems using Surrogate-Assisted and...
 
Guidelines for Assessing the Accuracy of Log Message Template Identification ...
Guidelines for Assessing the Accuracy of Log Message Template Identification ...Guidelines for Assessing the Accuracy of Log Message Template Identification ...
Guidelines for Assessing the Accuracy of Log Message Template Identification ...
 
A Theoretical Framework for Understanding the Relationship between Log Parsin...
A Theoretical Framework for Understanding the Relationship between Log Parsin...A Theoretical Framework for Understanding the Relationship between Log Parsin...
A Theoretical Framework for Understanding the Relationship between Log Parsin...
 

Recently uploaded

Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
abdulrafaychaudhry
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
vrstrong314
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 

Recently uploaded (20)

Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 

Automated Testing of Hybrid Simulink/Stateflow Controllers

  • 1. .lusoftware verification & validation VVS Automated Testing of Hybrid Simulink/Stateflow Controllers Industrial Case Studies Reza Matinnejad Shiva Nejati Lionel Briand SnT Centre/University of Luxembourg
  • 2. Software Development in Automotive • Software development is largely model-based • Automotive software models have dynamic behaviors • Mathematical models capturing plants/hardware • Controllers 2
  • 3. Two Types of Controllers • Open loop controllers • Closed loop controllers 3 Controller Actuator Sensor Plant Input Controller Actuator Plant Input Disturbances Disturbances
  • 4. Open Loop vs Closed Loop • Closed loop controllers – PID controllers • More expensive • More accurate and self-adaptive • Always present in large and critical cyber-physical systems • Open loop controllers – State-based models • Less expensive • Often controls timing behaviors • Is combined with closed-loop controllers 4
  • 5. Simulink/Stateflow Models • Heterogeneous • Continuous behavior • Are used for • simulation • algorithm design testing • code generation 5 Time-Continuous Simulink Model Hardware Model Network Model
  • 6. Existing Simulink Testing Tools • Control theory techniques • Synthesis of linear PID controllers • Automated test case generation • Based on (formal) assertions or structural code coverage • Automated verification • Model checking or theorem proving 6
  • 7. Limitations • Automotive models are rarely linear • Automatable test oracles may not be available or sufficient • Test oracles are in many cases manual • Structural coverage may not help reveal faults • White box approaches have incompatibility issues • Scalability issues 7
  • 8. Black Box Search Based Testing of Simulink 8 Solution Generation Fitness computation • Explorative • Exploitative Model Input Spec Input Signals Input Signals • Simulate the model • Compute Fitness functions on outputs Simulink Model Fitness values Model Simulation ut als Output Signal(s) [SSBSE 2013, ASE 2014, ESEC/FSE 2015, IST J 2015, ICSE 2016]
  • 9. Fitness Functions – Closed Loop • Generic requirements • Stability, responsiveness and smoothness • Maximizing (quantitative) fitness functions to generate failure 9 InitialDesired (ID) Desired ValueI (input) Actual Value (output) FinalDesired (FD) time T/2 T Smoothness Responsiveness Stability
  • 10. Fitness Functions – Closed Loop • Specific requirements • E.g., ``The contact between caliper and disk should occur within 32ms’’ caliper position à disk position à 10 ⌃[0,32]⇤((x  x0 + ✏) ^ (x x0 ✏)) x x0 Min{Max{Max{|x(t) (x0 + ✏)|, |x(t) (x0 ✏)|}}t0tT } Translation [Abbas et. al. TECS 2013]
  • 11. Fitness Functions – Open Loop • Failure patterns • Output diversity 11 0.0 1.0 2.00.0 1.0 2.0 -1.0 -0.5 0.0 0.5 1.0 Time Time 0.0 0.25 0.50 0.75 1.0
  • 12. Output of Our Approach • Failure Explanation • A characterization of the input space showing under what input conditions the system is likely to fail • Visualized by diagrams or regression trees • Failure Detection • Individual test cases revealing failures • A set of test input signals 12
  • 13. Case studies • A mixed of closed loop and open loop controllers, and plant models • Developed by BOSCH • Publicly available • A large plant model – a mathematical continuous model • Developed by an automotive company 13
  • 14. Failure Explanation – Heatmap Diagram 14 L R
  • 15. Failure Explanation – Regression Tree 15 All Points Count Mean Std Dev 2384 1.016e+10 4.898e+11 c_gear>=1.0279 Count Mean Std Dev 1997 25167.822 135651.79 Count Mean Std Dev 387 6.257e+10 1.216e+12 t0>=0.0029462 Count Mean Std Dev 1631 4550.4502 55698.046 t0<0.0029462 Count Mean Std Dev 366 117044.69 276423.68 c_gear<1.0279
  • 16. Failure Detection – Closed Loop 16 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.080.0 0.042 0.044 0.046 0.048 0.050 0.052 ⌃[0,32]⇤((x  x0 + ✏) ^ (x x0 ✏))Test Input violating: time position
  • 17. Failure Detection – Open Loop 17 0 1.0 2.0 0 1.0 2.0 0 4.0 -4.0 -8.0 0 1.5 -1.5 1.0 -1.0 0.5 -0.5 2.0 -2.0 -6.0 10 5 10 6 Time Time Test inputs exhibiting ``instability” and ``grow to infinity” failure patterns
  • 18. Summary of Lessons Learned • Generating test cases is not enough • It is important to help engineers with input space exploration and failure explanation 18 All Points Count Mean Std Dev 2384 1.016e+10 4.898e+11 c_gear>=1.0279 Count Mean Std Dev 1997 25167.822 135651.79 Count Mean Std Dev 387 6.257e+10 1.216e+12 t0>=0.0029462 Count Mean Std Dev 1631 4550.4502 55698.046 t0<0.0029462 Count Mean Std Dev 366 117044.69 276423.68 c_gear<1.0279
  • 19. Summary of Lessons Learned • Engineers do not always have specific and precise requirements at hand • We generate test cases that reveal violation of both specific requirements and (estimated) failure patterns 19 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.080.0 0.042 0.044 0.046 0.048 0.050 0.052 0 1.0 2.0 0 1.5 -1.5 1.0 -1.0 0.5 -0.5 10 5 Time
  • 20. Summary of Lessons Learned • Incompatibility issues or manual overhead is a major obstacle for adoption of current Simulink testing tools • Our approach is black box and has no overhead • Time performance of our approach is acceptable 20
  • 21. Our Tools • SimCoTest Simulink Controller Tester https://sites.google.com/site/simcotesttool/ • CoCoTest Continuous Controller Tester https://sites.google.com/site/cocotesttool/ 21