Testing Framework with Simulink Test

Similar documents
Testing Simulink Models

Simulation-based Test Management and Automation Sang-Ho Yoon Senior Application Engineer

Verification and Validation of Models for Embedded Software Development Prashant Hegde MathWorks India Pvt. Ltd.

Testing, Validating, and Verifying with Model-Based Design Phil Rottier

Verification, Validation, and Test with Model-Based Design

Developing AUTOSAR Compliant Embedded Software Senior Application Engineer Sang-Ho Yoon

Automated Requirements-Based Testing

DRYING CONTROL LOGIC DEVELOPMENT USING MODEL BASED DESIGN

Integrated Workflow to Implement Embedded Software and FPGA Designs on the Xilinx Zynq Platform Puneet Kumar Senior Team Lead - SPC

Automating Best Practices to Improve Design Quality

Simulink 를이용한 효율적인레거시코드 검증방안

What s New In Simulink: Fraser Macmillen

Verification, Validation and Test in Model Based Design Manohar Reddy

What s New in Simulink in R2015b and R2016a

What's new in MATLAB and Simulink for Model-Based Design

Making the Most of your MATLAB Models to Improve Verification

Automating Best Practices to Improve Design Quality

Verification and Validation of High-Integrity Systems

Advanced AC Motor Control S/W Development Sang-Ho Yoon Senior Application Engineer The MathWorks

SIMON. Creating and Assessing Assessment Tasks. Creating an Assessment Task. Step 1

Model-Based Design for High Integrity Software Development Mike Anthony Senior Application Engineer The MathWorks, Inc.

Using Model-Based Design in conformance with safety standards

Model-Based Design for Safety-Critical and Mission-Critical Applications Bill Potter Technical Marketing April 17, 2008

Guido Sandmann MathWorks GmbH. Michael Seibt Mentor Graphics GmbH ABSTRACT INTRODUCTION - WORKFLOW OVERVIEW

Four Best Practices for Prototyping MATLAB and Simulink Algorithms on FPGAs by Stephan van Beek, Sudhir Sharma, and Sudeepa Prakash, MathWorks

Standardkonforme Absicherung mit Model-Based Design

Automatización de Métodos y Procesos para Mejorar la Calidad del Diseño

Simulink 모델과 C/C++ 코드에대한매스웍스의정형검증툴소개 The MathWorks, Inc. 1

2015 The MathWorks, Inc. 1

Implementing MATLAB Algorithms in FPGAs and ASICs By Alexander Schreiber Senior Application Engineer MathWorks

Model-Based Design for effective HW/SW Co-Design Alexander Schreiber Senior Application Engineer MathWorks, Germany

Automatic Code Generation Technology Adoption Lessons Learned from Commercial Vehicle Case Studies

Guidelines for deployment of MathWorks R2010a toolset within a DO-178B-compliant process

From Design to Production

2015 The MathWorks, Inc. 1

Verification and Validation Introducing Simulink Design Verifier

Simulink to Embedded Hardware Paul Peeling MathWorks

Accelerating FPGA/ASIC Design and Verification

Final Presentation AUTOCOGEQ GMV, 2017 Property of GMV All rights reserved UNCLASSIFIED INFORMATION

MATLAB/Simulink 기반의프로그래머블 SoC 설계및검증

Introduction to MATLAB for Finance

Model-Based Design for Safety Critical Automotive Applications

ECE 587 Hardware/Software Co-Design Lecture 11 Verification I

Verification and Test with Model-Based Design

Guidelines for MATLAB s SISO Design Tool GUI

What s New in MATLAB and Simulink

What s New in MATLAB and Simulink

A Model-Based Reference Workflow for the Development of Safety-Related Software

Beyond Soft IP Quality to Predictable Soft IP Reuse TSMC 2013 Open Innovation Platform Presented at Ecosystem Forum, 2013

Introduction to ALM, UFT, VuGen, and LoadRunner

Introducing Simulink R2012b for Signal Processing & Communications Graham Reith Senior Team Leader, UK Application Engineering

Optimization and Implementation of Embedded Signal Processing Algorithms Jonas Rutström Senior Application Engineer

Reducing the cost of FPGA/ASIC Verification with MATLAB and Simulink

Introducing Simulink Release 2012b for Control System Development Mark Walker MathWorks

Verification Planning with Questa Verification Management

Hardware-Software Co-Design and Prototyping on SoC FPGAs Puneet Kumar Prateek Sikka Application Engineering Team

MATLAB 에서작업한응용프로그램의공유 : App 에서부터웹서비스까지

Effective Verification Strategies for Distributed Body Control Applications based on Plant Modeling and Test Case Reuse

Simulink for AUTOSAR: Best Practices

Functional Testing with Mercury QuickTest Professional

Techno Expert Solutions An institute for specialized studies! Introduction to Advance QTP course Content

The Avionics System Test Bench, Functional Engineering Simulator: New Developments in Support of Mission and System Verification

Systems Development Life Cycle SDLC Planning Analysis Detailed systems design Implementation Maintenance 7 8 SDLC - Planning SDLC - Analysis Planning

Chart User Interface (v 2.0) Feature Specification

What s New with the MATLAB and Simulink Product Families. Marta Wilczkowiak & Coorous Mohtadi Application Engineering Group

List of Examples List of Figures List of Tables. Acknowledgments 1. VERIFICATION GUIDELINES 1

Reuse MATLAB Functions and Simulink Models in UVM Environments with Automatic SystemVerilog DPI Component Generation

SDLC Maturity Models

Design and Verification of FPGA Applications

Performance Testing: Respect the Difference

Continuous Delivery and Team Foundation Server Ognjen Bajić Ana Roje Ivančić Ekobit

FULL VIRTUALIZATION OF RENAULT'S ENGINE MANAGEMENT SOFTWARE APPLICATION TO SYSTEM DEVELOPMENT

Developing Optimization Algorithms for Real-World Applications

Ein Modell - viele Zielsysteme

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Collaboration in Teams: Simulink Projects Demonstration

Model-Based Design for Video/Image Processing Applications

Architecture-driven development of Climate Control Software LMS Imagine.Lab Embedded Software Designer Siemens DF PL

SCADE. SCADE Suite Tailored for Critical Applications EMBEDDED SOFTWARE

USING THE MATLAB TOOLSET TO IMPROVE EFFICIENCY IN THE EOBD CALIBRATION PROCESS

Sample Exam. Certified Tester Foundation Level

Object-Interaction Diagrams: Sequence Diagrams UML

Increasing Design Confidence Model and Code Verification

Model-Based Design: Generating Embedded Code for Prototyping or Production

Background Project Purpose & Goals. SW Reliability Statistical Testing Model Based Specification and Testing

VERIFICATION OF RISC-V PROCESSOR USING UVM TESTBENCH

What's New in MATLAB for Engineering Data Analytics?

MIL/SIL/PIL Approach A new paradigm in Model Based Development

Designing and Analysing Power Electronics Systems Using Simscape and SimPowerSystems

Extending Model-Based Design for HW/SW Design and Verification in MPSoCs Jim Tung MathWorks Fellow

Create, search, view, status, move, and edit all items created/owned at any level by any user Content Administrator

What s New in MATLAB and Simulink The MathWorks, Inc. 1

Testing and Validation of Simulink Models with Reactis

Sequence Diagrams. Massimo Felici. Massimo Felici Sequence Diagrams c

Sharing and Deploying MATLAB Programs Sundar Umamaheshwaran Amit Doshi Application Engineer-Technical Computing

Reducing Design Errors in Complex State Machines using Model-Based Design

GAIO. Solution. Corporate Profile / Product Catalog. Contact Information

2015 The MathWorks, Inc. 1

Applications of Program analysis in Model-Based Design

Physical Modeling of Multi-Domain System

Transcription:

Testing Framework with Simulink Test 김종헌부장 2015 The MathWorks, Inc. 1

2

Test Harness (Test Scenario) Target algorithm for verification Test Harness (Plant model) 3

How to Test Your Model? Production model Do you need to modify it for testing? 4

Building Test Harness Model using Model Reference Separated model not for code generation but only for testing Test harness model Production model Signal Builder Model Reference (Model block) Scope 5

Simulink Test 6

Why Simulink Test? Saves you time: Creating / managing test infrastructure Generating & (re)-running multiple tests Reporting results Easy integration with other tools (Requirements, Coverage, Test Generation, MATLAB Unit Test, Continuous Integration) A common test environment everyone doing things in a consistent manner 7

Simulink Test Overview 1. Test Harnesses 2. Test Stimulus Integration 3. Test Manager Synchronized, simulatable test environment Inputs and assessments based on logical, temporal conditions Author, execute, manage test cases Review, export, report Main Model Component under test Test Harness 8

Agenda Creating Test Harnesses Creating Test Cases & Test Stimuli Testing against Requirements Reporting Coverage analysis 9

Creating Test Harness 10

What if you already have a harness model... 11

Agenda Creating Test Harnesses Creating Test Cases & Test Stimuli Testing against Requirements Reporting Coverage analysis 12

Example 1: Create a test case using the original signal builder 13

Create test cases with Signal Builder 14

What have we done so far... Created and imported test harnesses Created a test case for running multiple simulations (iterations) with different scenarios 15

Common questions... When should I use iterations vs multiple test cases? 16

Comparison Use iterations if: Only changing parameters, inputs, or configuration settings Same model/harness & test type Same set-up (callbacks) Usually run together Relate to same requirements(s) Can use fast-restart Use separate test cases if: Need independent configuration control Different model/harness/test type or callbacks Relate to distinct requirements Distinct control of coverage 17

Example 2: Create a test case using real-world recorded data 18

My data 19

Importing time-stamped data from Excel or text files % pre-process.xlsx file % get import options importoptions = detectimportoptions('sitewinddatarecorded.xlsx'); % set sheet importoptions.sheet = '2011_05_23'; % tell it that Time is in a date-time format importoptions = setvartype(importoptions,'time','datetime'); importoptions = setvaropts(importoptions,'time', 'DatetimeFormat', 'HH:mm:ss.SSS'); % read data in T = readtable('sitewinddatarecorded.xlsx',importoptions); % convert to timetable TT = table2timetable(t); % re-sample to 1sec intervals TTT = retime(tt,'secondly','nearest'); Time WindSpeed WindDirection 0 14.59 214.9 1 15.25 218.2 2 16.46 212.2 3 16.08 207.3 20

21

What have we done so far... Created and imported test harnesses Created a test case for multiple simulations (iterations) Created a test case importing real-world data from Excel using root import mapping 22

Agenda Creating Test Harnesses Creating Test Cases & Test Stimuli Testing against Requirements Reporting Coverage analysis 23

Requirement based testing Requirements Input Scenarios Implementation Dynamic Testing Baseline MATLAB Unit Test Assertions Test Sequence and more! 24

Requirements Editor in Simulink Requirements Manage and Organize Requirements Organize with Requirement Sets Import from External Sources View and Author 25

Requirements Perspective in Simulink Requirements 26

Track Implementation and Verification 27

Example 1: Baseline test 28

Test types in Test Manager Baseline Test Ex) Regression test Equivalence Test Ex) Back-to-Back test like SIL, PIL Simulation Test Ex) Verifying algorithm with logical criteria 29

Challenges Not easy to predict expected result Hard to make time-series input data Solution Use data captured from simulation as baseline 1. Try to run a simulation for each case. 2. Capture output data from simulation result. 3. Review captured data to confirm whether it is valid as baseline. 4. Apply reviewed data to Test Manager as baseline 30

Baseline test using captured simulation result 31

Example 2: Using verify() to test against a requirement 32

Test Sequence Block Simulink Test A test sequence block can Drive inputs (considering feedback) Assess outputs with verify keyword x Define Inputs 33

34

C Caller Block Support Verify model and hand code together C Caller block allows you to call a C function directly from a model Handwritten C Code Test the C function by creating a test harness for the C Caller block Author, manage and execute tests of the C function with Simulink Test Test Harness» 14:30~150:00 Simulink 를통한효율적인레거시코드검증방안소개 35

Agenda Creating Test Harnesses Creating Test Cases & Test Stimuli Testing against Requirements Reporting Coverage analysis 36

Test Manager Simulink Coverage Simulink Design Verifier 37

Summary Benefits of Simulink Test Ease of creation, organisation & control of test harnesses Ease of driving your models with data from various sources Ease of in-harness/model verification of requirements Ease of reporting Ease of integration: requirements, coverage 38

39