Simulink to Embedded Hardware Paul Peeling MathWorks

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

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

Programming Low-Cost Hardware Using Simulink Brian McKay MathWorks Technical Marketing

Déploiement embarqué et connectivité hardware avec MATLAB et Simulink

What s New in MATLAB and Simulink Prashant Rao Technical Manager MathWorks India

Υπολογιστικά πειράματα με το MATLAB Σύνδεση με Arduino & Raspberry Pi Ζαχαρίας Γκέτσης Μηχανικός Εφαρμογών

Model to Code, Made Simple and Easy Sebastien Dupertuis Application Engineer Applications Engineering Group MathWorks Switzerland June 11, 2015

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

What s New In Simulink: Fraser Macmillen

Verification, Validation, and Test with Model-Based Design

Team-Based Collaboration in Simulink

Rapid Control Prototyping with MATLAB/Simulink Case Study: Ball-on-Wheel

Modelling, Simulation, and Real-Time Testing for Model-Based Design GianCarlo Pacitti Application Engineer MathWorks

Design and Verify Embedded Signal Processing Systems Using MATLAB and Simulink

Design and Verify Embedded Signal Processing Systems Using MATLAB and Simulink

What s New in MATLAB and Simulink

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

What s New in MATLAB and Simulink

How Real-Time Testing Improves the Design of a PMSM Controller

Simplifying Functional Safety Certification with the ARM Keil µvision 5 IDE and the LDRA tool suite

From Design to Production

Standardkonforme Absicherung mit Model-Based Design

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

Automating Best Practices to Improve Design Quality

What s New in MATLAB & Simulink. Prashant Rao Technical Manager MathWorks India

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

What s New MATLAB and Simulink

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

Hardware and Software Co-Design for Motor Control Applications

Master Class: Target Optimized Code Generation Shobhit Shanker Senior Application Engineer-Code Generation & Verification

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

What s New in MATLAB and Simulink Young Joon Lee Principal Application Engineer

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

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

Verification and Validation of High-Integrity Systems

Codegenerierung für Embedded Systeme leicht gemacht So geht s!

SCADE. SCADE Suite Tailored for Critical Applications EMBEDDED SOFTWARE

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

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

Utilisation des Méthodes Formelles Sur le code et sur les modèles

Real-Time Testing in a Modern, Agile Development Workflow

Using Model-Based Design in conformance with safety standards

2015 The MathWorks, Inc. 1

Managing HIL, SIL, and MIL Simulation with SIMulation Worbench TM

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

Mind Q Systems Private Limited

Managing HIL, SIL and MIL Simulation with SIMulation Workbench

Accelerating Innovative Design Using Low-Cost Hardware Andrew Bennett

Automating Best Practices to Improve Design Quality

Robotics System Toolbox

WHITE PAPER. 10 Reasons to Use Static Analysis for Embedded Software Development

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

Ein Modell - viele Zielsysteme

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

Verification and Validation Introducing Simulink Design Verifier

Enterprise Architect Training Courses

Introduction to ARDUINO/SIMULINK

Testing and Validation of Simulink Models with Reactis

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

Designing and Prototyping Digital Systems on SoC FPGA The MathWorks, Inc. 1

Hardware Implementation and Verification by Model-Based Design Workflow - Communication Models to FPGA-based Radio

Integrating Mechanical Design and Multidomain Simulation with Simscape

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

Object-Oriented Software Engineering Conquering Complex and Changing Systems. Chapter 6, System Design Lecture 1

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

Increasing Design Confidence Model and Code Verification

Delivering Software Quality and Security through Test, Analysis and Requirements Traceability

Jay Abraham 1 MathWorks, Natick, MA, 01760

Software Testing MANUAL TESTING. Introduction to Testing. Software Quality Software Testing Definition. Different Life Cycle Models Waterfall Model

Standard Glossary of Terms used in Software Testing. Version 3.2. Advanced Test Automation - Engineer Terms

Complex Signal Processing Verification under DO-254 Constraints by François Cerisier, AEDVICES Consulting

Modeling HDL components for FPGAs in control applications

What s New in Simulink Release R2016a and R2016b

Hardware and Software Co-Design for Motor Control Applications

Workflow for Control System Design and Implementation

A framework for automatic generation of audio processing applications on a dual-core system

Hardware and Software Co-Design for Motor Control Applications

Production Code Generation Introduction and New Technologies

V&V: Model-based testing

Testing Framework with Simulink Test

Testing Simulink Models

Verification, Validation and Test in Model Based Design Manohar Reddy

Experiment 6 SIMULINK

Virtuelle Inbetriebnahme und Optimierung von Robotersystemen mit Simscape The MathWorks, Inc. 1

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

Master Class: Diseño de Sistemas Mecatrónicos

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

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

Modeling a 4G LTE System in MATLAB

Integrating Mechanical Design and Multidomain Simulation with Simscape

Automatic Code Generation at Northrop Grumman

Simulink for AUTOSAR: Best Practices

Modular Rapid Monitoring System

Moving MATLAB Algorithms into Complete Designs with Fixed-Point Simulation and Code Generation

EE289 Lab Spring 2012

II. RTW BUILD METHODS In order to understand how RTW generates C code and produces an executable image, the build process can be divided into three st

Embedded Linux kernel and driver development training 5-day session

Pro/ENGINEER Wildfire 2.0 Curriculum

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

Transcription:

Simulink to Embedded Hardware Paul Peeling MathWorks 2014 The MathWorks, Inc. 1

Model-Based Design for Hardware Stakeholder Needs Requirements Manage Requirements Traceability Complete Integration and Test System Specification Develop Acceptance Tests Environment Models Physical Components System-Level Design High-Level Designs System Integration and Test Develop Test System (e.g., HIL) Algorithms Subsystem Design Low-Level Design Define Golden Subsystem Reference Integration and Test Code IMPLEMENTATION Subsystem Production Implementation Code Generation 2

Creating a legacy model Model begins life as proof of concept Elaborated to address project-specific requirements Code generation to run on target hardware Model and/or code optimised to meet constraints Model can no longer be simulated 3

Hardware Requirements My design must run at XXX Hz Available memory is limited The algorithm must be implemented in single precision I need to read from/write to peripherals I need to call libraries written for the target The hardware is not yet available Run on multiple hardware platforms 4

Topics for this session Model architecture for hardware designs Simulation, debugging and logging on hardware Analysis tools and reports Importance of hardware abstraction 5

Exercise: Parametric Audio Equalizer Run a signal processing algorithm on a STM32F4 Discovery Board A working desktop simulation exists: dspparameq Interactive: Switch between recorded (intended) and white noise (good for testing) Prototype user interface to manipulate filter response 6

Partitioning a model and generating code 1. Generating C code from an atomic subsystem. 2. Tracing between model and code through the code generation report. 3. Analyse generated code through static code metrics. 4. Using model reference to define a component boundary. 7

Model References Test Harness 1 0.8 0.6 0.4 0.2 0 2 2.5 3 Amplitude Step Response 0.035 0.03 0.025 0.02 0.015 0.01 0.005 0 0 1 2 3 4 5 6 Time (seconds) Central file repository Benefits Virtual subsystem Atomic subsystem Model reference Readability Y Y Y Traceability N Y Y Implementation Reusability N N Y Concurrent development N N Y Unit testing N N Y 8

Connecting to Low Cost Hardware Data I/O Low Cost Hardware Engineer s computer MATLAB algorithm or Simulink model Ethernet / USB / Bluetooth MATLAB Hardware Support Packages Target Low Cost Hardware Simulink Hardware Support Packages 9

Target Support Packages Analog Devices Texas Instruments Freescale ARM Gumstix Overo Green Hills MULTI Raspberry Pi VxWorks STMicro LEGO MINDSTORMS Arduino PandaBoard Beagleboard 10

STM32F4-Discovery support package 11

Running a Processor-in-the-Loop Simulation 1. Download and install a target support package 2. Configure model for hardware and profiling 3. Run model block in PIL mode 4. Verify outputs and logged signals 5. Analyse profiling data 12

Processor-in-the-Loop (PIL) Verify compiled object code matches simulation Communication Gateway Non-real-time execution: synchronized with simulation Verify numerical equivalence Assess execution time Collect code coverage Create certification artifacts Software-In-the-Loop (SIL) for hostbased execution 13

Function Execution Times for Code Running on Embedded Hardware Comprehensive measurement of function call execution times Call-site instrumentation to measure execution time of functions in the generated code Includes initialization, shared utility and math library functions Configurable units for reporting of measured execution times 14

Optimising models and verifying behaviour 1. Creating an alias for data types used throughout a model 2. Verifying behaviour through simulation 3. Running models through multiple test harnesses using model reference 4. Using configuration references to manage model parameter sets 15

Design Data and Variants 1. Parameterising sample times and data lengths 2. Creating tunable parameters 3. Moving design data from base workspace to data dictionary 4. Linking model hierarchies to dictionaries 16

Data Dictionary Model workspace B 3 C 3 Data dictionary.sldd OR Configurations Global Design Data Signals Parameters Data objects 17

Key Tools Data Dictionary Configuration Reference Processor-in-the-Loop Model Reference Variants Alias Types Tunable Parameters 18

Key Takeaways 1. Generated code can be executed and verified from within Simulink 2. Start designing with hardware in mind from the onset 3. Maintain abstraction from hardware 19

Thank You! Questions? 20

On-Target LDRA Testbed Code Coverage Collect code coverage metrics for production code executing in PIL simulation Execute tests on simulator or target hardware to support high integrity workflows such as DO- 178B and ISO 26262 Works with any existing PIL target Support new targets via the PIL Target Connectivity API Arduino and TI C2000 reference implementations available 21