24
1 © 2013 The MathWorks, Inc. Modellbasiertes Echtzeittesten und automatische Codegenerierung Richard Pfisterer Design with Simulation Executable Specifications Continuous Test and Verification Automatic Code Generation Models

Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

1 © 2013 The MathWorks, Inc.

Modellbasiertes Echtzeittesten und

automatische Codegenerierung

Richard Pfisterer

Design

with

Simulation

Executable

Specifications

Continuous

Test and

Verification

Automatic

Code Generation

Models

Page 2: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

2

Agenda

Introduction to Model-Based Design

Rapid Control Prototyping

Processor in the Loop – PIL

Hardware in the Loop - HIL

Page 3: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

3

Model-Based Design Development Process

System-Level

Specification

Rapid Control

Prototyping Subsystem

Integration & Test

SIL/PIL

System-Level

Integration & Test

HIL

Complete

Integration

& Test

Code

Verification and

Validation

Integration

testing

User Acceptance

Testing Requirements

Ve

rifica

tio

n a

nd

Va

lida

tio

n

Subsystem

Implementation

DSP FPGA ASIC

Embedded Software

Digital Electronics

C, C++ VHDL, Verilog

Implementation

Integration

MCU

Data

Modeling

Algorithm

Development

Data Analysis

Research

System Design

Physical Components

Environment

Algorithms

Component Design

Page 4: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

4

Model-Based Design Development Process

System-Level

Specification

Rapid Control

Prototyping Subsystem

Integration & Test

SIL/PIL

System-Level

Integration & Test

HIL

Complete

Integration

& Test

Code

Verification and

Validation

Integration

testing

User Acceptance

Testing Requirements

Ve

rifica

tio

n a

nd

Va

lida

tio

n

Subsystem

Implementation

DSP FPGA ASIC

Embedded Software

Digital Electronics

C, C++ VHDL, Verilog

Implementation

Integration

MCU

Data

Modeling

Algorithm

Development

Data Analysis

Research

System Design

Physical Components

Environment

Algorithms

Component Design

Page 5: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

5

Model-Based Design Rapid Prototyping

System-Level

Specification

Rapid Control

Prototyping Subsystem

Integration & Test

SIL/PIL

System-Level

Integration & Test

HIL

Complete

Integration

& Test

Code

Verification and

Validation

Integration

testing

User Acceptance

Testing Requirements

Ve

rifica

tio

n a

nd

Va

lida

tio

n

Subsystem

Implementation

DSP FPGA ASIC

Embedded Software

Digital Electronics

C, C++ VHDL, Verilog

Implementation

Integration

MCU

Data

Modeling

Algorithm

Development

Data Analysis

Research

System Design

Physical Components

Environment

Algorithms

Component Design

Page 6: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

6

Why do Rapid Prototyping?

Test, verify, validate, and prove your design with

hardware under test

Evaluate new ideas using a production independent

development platform

Reduce costs, shorten time-to-market, and minimize

risks

Page 7: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

7

Rapid Controller Prototyping

TARGET DEVICE HOST

Hardware

(Plant/System)

Page 8: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

8

Ethernet

1

2

3

Real-time execution of Simulink models

XPC Target workflow

Page 9: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

9

Demo – Rapid Control Prototyping

Page 10: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

10

Rapid Prototyping

Prove your design

Evaluate new ideas

Reduce costs

Shorten time-to-market

Minimize risks

Hardware

(Plant/System)

Page 11: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

11

Model-Based Design Automatic Code Generation

System-Level

Specification

Rapid Control

Prototyping Subsystem

Integration & Test

SIL/PIL

System-Level

Integration & Test

HIL

Complete

Integration

& Test

Code

Verification and

Validation

Integration

testing

User Acceptance

Testing Requirements

Ve

rifica

tio

n a

nd

Va

lida

tio

n

Subsystem

Implementation

DSP FPGA ASIC

Embedded Software

Digital Electronics

C, C++ VHDL, Verilog

Implementation

Integration

MCU

Data

Modeling

Algorithm

Development

Data Analysis

Research

System Design

Physical Components

Environment

Algorithms

Component Design

Page 12: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

12

Data

Modeling

Algorithm

Development

Data Analysis

Research

Model-Based Design Automatic Code Generation

System-Level

Specification

Subsystem

Design

Subsystem

Integration & Test

System-Level

Integration & Test

Complete

Integration

& Test

Code

Verification and

Validation

Integration

testing

User Acceptance

Testing

System Design

Physical Components

Environment

Algorithms

Requirements

Component Design

Subsystem

Implementation

DSP FPGA ASIC

Embedded Software

Digital Electronics

C, C++ VHDL, Verilog

Implementation

Integration

MCU

• C/C++, VHDL/Verilog and PLC Code

• Support for Fixed Point Data Format

• Automatic scaling

• Supported in Simulation and Code

• Easy integration of legacy C/C++ Code

• System development independent

of the target

FPGA ASIC

VHDL, Verilog

DSP

C, C++

MCU

Embedded Coder

(C, C++)

DSP & µC FPGA & ASIC

HDL Coder

(VHDL, Verilog)

PLC PLC Coder

(Structured Text)

PLC

Structured Text

Page 13: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

13

Demo – Code Generation

Page 14: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

14

Model-Based Design Continuous Verification and Validation

System-Level

Specification

Rapid Control

Prototyping Subsystem

Integration & Test

SIL/PIL

System-Level

Integration & Test

HIL

Complete

Integration

& Test

Code

Verification and

Validation

Integration

testing

User Acceptance

Testing Requirements

Ve

rifica

tio

n a

nd

Va

lida

tio

n

Subsystem

Implementation

DSP FPGA ASIC

Embedded Software

Digital Electronics

C, C++ VHDL, Verilog

Implementation

Integration

MCU

Data

Modeling

Algorithm

Development

Data Analysis

Research

System Design

Physical Components

Environment

Algorithms

Component Design

Page 15: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

15

Why do Processor in the Loop (PIL)?

Verify numerical output of code

Profiling

– Execution

– Coverage

– Stack

Verify behaviour of target specific code

Investigate compiler settings and optimizations

Page 16: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

16

Use PIL Simulation to Verify

Simulink

Embedded

Processor

Seria

l / TC

PIP

Serial / T

CP

IP

PIL Implementation

Code

Generation

Test

Signals Verifications

Controller

Model

Controller

C Code

Page 17: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

18

Demo - PIL

Page 18: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

19

Why do Processor in the Loop (PIL)?

Verify numerical output of generated (or legacy) code

Coverage, Execution and Stack profiling

Verify behavior of target specific code

Investigate effects of compiler settings and

optimizations

Page 19: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

20

Processor in the Loop (PIL)

Verify numerical output of code

Profiling

Verify target specific code

Investigate compiler settings and optimizations

Page 20: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

21

Model-Based Design Continuous Verification and Validation

System-Level

Specification

Rapid Control

Prototyping Subsystem

Integration & Test

SIL/PIL

System-Level

Integration & Test

HIL

Complete

Integration

& Test

Code

Verification and

Validation

Integration

testing

User Acceptance

Testing Requirements

Ve

rifica

tio

n a

nd

Va

lida

tio

n

Subsystem

Implementation

DSP FPGA ASIC

Embedded Software

Digital Electronics

C, C++ VHDL, Verilog

Implementation

Integration

MCU

Data

Modeling

Algorithm

Development

Data Analysis

Research

System Design

Physical Components

Environment

Algorithms

Component Design

Page 21: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

22

Hardware Under Test

Hardware in the Loop

Page 22: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

23

Why do Hardware in the Loop (HIL)?

Substitute for unavailable parts of the system

Test the system for safety and performance

Minimize expensive downtime for the rest of the system

Test operation and failure conditions that are difficult to

replicate

Page 23: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

24

Conclusion

Model-Based Design

– Core of the Development Process

Rapid Control Prototyping

– Fast Evaluation of Design

Processor in the Loop – PIL

– Early Test and Verification

Hardware in the Loop – HIL

– System level integration test

Design

with

Simulation

Executable

Specifications

Continuous

Test and

Verification

Automatic

Code Generation

Models

Page 24: Modellbasiertes Echtzeittesten und automatische ... · Rapid Control Prototyping Subsystem Integration & Test SIL/PIL System-Level Integration & Test HIL Complete Integration & Test

25

Model-Based Design

System-Level

Specification

Rapid Control

Prototyping Subsystem

Integration & Test

SIL/PIL

System-Level

Integration & Test

HIL

Complete

Integration

& Test

Code

Verification and

Validation

Integration

testing

User Acceptance

Testing Requirements

Ve

rifica

tio

n a

nd

Va

lida

tio

n

Subsystem

Implementation

DSP FPGA ASIC

Embedded Software

Digital Electronics

C, C++ VHDL, Verilog

Implementation

Integration

MCU

Data

Modeling

Algorithm

Development

Data Analysis

Research

System Design

Physical Components

Environment

Algorithms

Component Design