simulink real-time workshop at apple inc. - mathworks · pdf filesimulink real-time workshop...

31
1 © 2014 The MathWorks, Inc. Simulink Real-Time workshop at Apple Inc. Abhishek Bhat Application Engineer MathWorks 12 th July 2016

Upload: doanphuc

Post on 04-Feb-2018

253 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

1© 2014 The MathWorks, Inc.

Simulink Real-Time workshop at

Apple Inc.

Abhishek Bhat

Application Engineer – MathWorks

12th July 2016

Page 2: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

2

What’s Next

Important Links

What is real-time testing?

Workflow of using Simulink Real-Time

Where can I learn more?

Page 3: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

3

Additional Links

Simulink Real-Time Product page and user stories:– http://www.mathworks.com/products/simulink-real-time/

Videos for quick overview of capabilities:– http://www.mathworks.com/products/simulink-real-time/videos.html

Speedgoat website for hardware capabilities:– https://www.speedgoat.ch/

Page 4: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

4

What’s Next

Important Links

What is real-time testing?

Workflow of using Simulink Real-Time

Where can I learn more?

Page 5: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

5

Build better products using

Real-Time Testing

Page 6: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

6

Question : How do you think this

is useful to your application?

Page 7: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

7

Why do Model-Based Design (MBD)

Real-Time Simulation & Testing?

It enables you to:

Test, verify, validate, and prove your algorithmic andsystem designs earlier

Evaluate new ideas using a flexible, scalable,production independent development platform

Minimize risk, reduce costs, shorten time-to-market

Achieve determinism through system modeling,automatic code generation and real-timesoftware/hardware execution

Page 8: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

8

I/O Output I/O InputI/O Output I/O Input

Real-Time Simulation & Testing Tasks: Rapid Prototyping

Physical Plant Hardware

Wiring and

Signal Conditioning

0

0

Real-Time Target Computer

Page 9: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

9

ChallengeDesign and develop an unmanned aerial camera

motion system for close-range aerial filming

SolutionUse Model-Based Design with MATLAB and Simulink

to accelerate the design, debugging, and

implementation of the vehicle’s fly-by-wire and flight

management system software

Results Time-to-market shortened by up to an order of

magnitude

Test flight anomalies quickly resolved

Debugging time reduced from weeks to hours

Airnamics Develops Unmanned Aerial

System for Close-Range Filming with

Model-Based Design

Airnamics co-founders Marko Thaler and

Zoran Bjelić with the R5 MSN1 prototype

after its first flight.

Link to user story

“With Model-Based Design our three-

engineer team found more than 95%

of control software bugs before the

first flight. We used the test flights to

increase our Simulink models’

fidelity and isolate remaining bugs

with high precision. The result is a

safer, more reliable, and higher-

quality product.”

Marko Thaler

Airnamics

Page 10: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

10

Sonova Shortens Product Development

Time for Hearing Aids and Implants with

Model-Based Design

ChallengeShorten development time for new hearing

instruments and implants

SolutionUse Model-Based Design with MATLAB and Simulink to

develop a reusable library of digital signal processing

components, and use Simulink Real-Time for rapid real-

time prototyping and testing of design ideas

Results Real-time prototypes updated in minutes, not days

80% of software libraries reused in platform

Software quality improved

“Across Sonova, engineers from

a variety of backgrounds use

MATLAB and Simulink as a

shared language for designing

innovative signal processing

systems. Model-Based Design

and rapid real-time prototyping

enable us to maintain the

product development pace that

our business demands.”

Raoul Glatt

SonovaLink to user story

Sonova’s hearing aid and cochlear

implant solutions.

Page 11: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

11

Cochlear Ltd. Streamlines Development

of Cochlear Implant Sound Processing

Algorithms

ChallengeEvaluate innovative noise-reduction algorithms for

cochlear implants

SolutionUse Simulink to model and simulate candidate

algorithms, and use Simulink Coder with xPC Target to

conduct real-time tests of the most promising candidates

Results Algorithm development overhead reduced by 60%

Six times as many new algorithms tested

Platform integration problems eliminated

“MATLAB, Simulink, and Simulink

Real-Time provide a robust, flexible,

and efficient means of integrating the

many different technologies that

cochlear implants require. We identify

the best ideas faster, and our

recipients experience the

improvements in real-time tests, which

are essential to our research.”

Dr. John Heasman

Cochlear Limited

Link to user story

A Cochlear engineer conducting tests

with a research cochlear implant

recipient.

Page 12: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

12

OHB Develops Satellite Guidance,

Navigation, and Control Software for

Autonomous Formation Flying

ChallengeDevelop low-cost satellite GNC systems to enable

autonomous formation flying, rendezvous, and close-

proximity operations with a small team

SolutionUse MathWorks tools for Model-Based Design to model

GNC algorithms, perform real-time simulations, and

generate production flight code

Results Development time cut by 50%

Early verification and test reuse enabled

Interagency collaboration simplified

“Traditionally, control engineers

specify requirements using text and

diagrams and someone else codes

the software. With Model-Based

Design, we have eliminated that step.

We work with models from concept

to implementation, and we have the

automatically generated code flying

in space."

Ron Noteborn

OHB

Link to user story

Prisma’s Mango and Tango satellites in

the sunbeam of the space simulator.

Page 13: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

13

Wiring and

Signal Conditioning

Embedded Hardware Real-Time Target Computer

Real-Time Simulation & Testing Tasks: Hardware-in-the-loop (HIL) Simulation

Page 14: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

14

Application

ECU test bench for all-electric,

zero emission transit bus

The bus rapidly recharges at

on-route charging stations

2-3 hour range

Use Case – Proterra, USA

User Story

Page 15: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

15

Hardware-in-the-loop Simulation/Testing

Hardware Under Test– Aircraft Engine Controller

Simulation– A/C Engines

Real-Time Testing ApplicationsAerospace systems example

Host-Target Network Switch

6 LVDT Simulation channels (IO422)

Shared/Reflective Memory (IO902 )

FPGA 16 Encoder Emulation channels (IO312)

32 24V digital input channels (IO206)

32 24V/0.5A digital output channels (IO205)

16 DIFF 16-bit analog output channels (IO107)

32 SE/16 DIFF 16-bit analog input, 4 SE analog

output, 8 TTL digital input, 8 TTL digital

output channels (IO102)

RTD simulation (IO926)

Page 16: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

16

Real-Time Testing Scenarios: Parametric Evaluation and Performance Assessment

System robustness

– Monte Carlo analysis

– Operational envelope testing

Human factors

– Human-in-the-loop simulation

– Virtual reality simulators

Calibration

– Tune algorithmic coefficients

– Optimize performance

Page 17: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

17

What’s Next

Important Links

What is real-time testing?

Workflow of using Simulink Real-Time

Where can I learn more?

Page 18: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

18

What is Simulink Real-Time?From desktop simulation to real-time

Ethernet link

1

2

3

Creation of real-time applications from Simulink models and loading them

onto dedicated target computer hardware in 3 automated steps:

Compiler

Automatic Code

Generation

.dlm

Development Computer with MATLAB & Simulink

Target Computer Hardware

1 Code Generation 2 Compile & Link 3 Download & Ready to Run

Page 19: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

19

What is Simulink Real-Time?Connect to your physical system

• Support for a broad range of I/O types and communication protocols

• Easy drag & drop and configuration within a Simulink model

Target Computer Hardware

.dlm

Page 20: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

20

2

4

2

What is Simulink Real-Time?Extendable, integrated, and interactive

Live parameter tuning,

signal monitoring, and

execution control

1 Data logging for offline

analysis in MATLAB

2

UI/HMI connectivity3

Extensibility with

other software tools

(e.g. virtual reality)

4

Ethernet link

Target Computer Hardware

.dlm

3

Development Computer with MATLAB & Simulink

1

Page 21: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

21

Ethernet link

Target Computer Hardware

.dlm

Development Computer with MATLAB & Simulink

Development Computer with MATLAB & Simulink

& Simulink Real-Time

Target Computer Hardware

from Speedgoat

What Hardware is used with Simulink Real-Time?Real-time software environment + real-time target computer

Page 22: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

22

SolutionsSpeedgoat Provides Real-Time Target ComputersMade for use with Simulink Real-Time

Simulink drivers Simulink test modelsTerminal boardI/O Cable

Real-time target machine I/O modules installed in target machine

Speedgoat develops and sells Real-Time Machines consisting of

An industrial PC (Real-time target machine)

I/O modules

Software drivers, cables and tools to connect with a prototype

Simulink Real-Time and Speedgoat target computer hardware are expressly

designed to work together

Page 23: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

23

Performance real-time target machine

State-of-the-art Intel Core i7 3.5 GHz quad core

Intel CPU and optional Xilinx FPGA technology

Concurrent multicore, multi target, and FPGA

real-time application execution

Flexible expansion concept:

install 50+ I/O modules

Flexible mounting

and I/O access

Turnkey Real-Time Target Machines for

office, lab, field, and in-vehicle use

Page 24: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

24

Turnkey Real-Time Target Machines for

office, lab, field, and in-vehicle use

Mobile real-time target machine

Up to Intel Core i7 2.53 GHz

dual core CPU

Very robust and fanless design,

extended temperature support

Stack up: 1-4 layers with 3

PMC/XMC modules each

Two additional I/O slots for I/O modules in the mPCIe form factor

Over 200 I/O modules offering a very broad range of connectivity

Gigabit link for data exchange between FPGA-based I/O modules

Built-in support for EtherCAT Master, real-time UDP, and serial I/O

Page 25: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

25

Speedgoat Real-Time Target MachinesAssembled based on your technical requirements

Form factors available for office,

lab, field, and classroom use

Optimized for highest real-time

performance (Multicore CPUs

and FPGAs)

Fully tested and works

out-of-the-box

Flexible, expandable

architecture supporting a wide

range I/O connectivity

* Custom engineering and I/O module development available

Page 26: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

26

IO Type Functionality

Analog High-resolution, high-speed, simultaneous sampling, BNC and XLR panels, …

Digital TTL/LVCMOS, RS422/RS485/LVDS, 06-48V, low/high side, opto-coupled, …

Serial RS232, RS422, RS485, SDLC, HDLC

Ethernet-based EtherCAT, EtherNet/IP, Modbus TCP, POWERLINK, real-time UDP, …

Protocols CAN, SAE J1939, LIN, Profibus, Modbus, SPI, I2C, SSI, ARINC-429, MIL-STD-

1553, FlexRay, ...

Video CameraLink, USB WebCam

Audio/Speech Audio/Speech optimized analog IO modules

Shared Memory Reflective Memory for high speed data transfer in multi-processor systems

Various LVDT/RVDT, Synchro/Resolver, reed relays, programmable resistors, external

signal conditioning modules (current to voltage, voltage to current,

temperature, …)

Fixed-Function I/O ModulesPowerful “as is” functionality

Delivery includes I/O cables, terminal boards, test models, and Simulink driver blocks

3 years of warranty, and long-term availability (7+ years for most I/O modules)

Page 27: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

27

Multi-Function I/O ModulesReconfigurable to support your application

Execute high-speed algorithms on an FPGA connected to a model running in real time with Simulink Real-Time.

Automatically program the FPGA without needing to know HDL code

Quick reconfiguration of FPGA I/O promotes a flexible real-time testing environment.

Three different use cases supported

– Pre-configured FPGA Code Module functionality

– Execute Simulink Applications on FPGA using automatic HDL Code Generation

– Write and implement your own HDL Code using Speedgoat FPGA Engineering Kits

Page 28: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

28

Run Simulink in Real-time

You want to run, test, and prove your Simulink design

with your hardware under test at its normal operating

frequency, speed, or timing.

Simulink Real-Time

Official fully assembled, real-time testing MathWorks

solution for Simulink

Combines xPC Target (software) with a real-time

target machine and IO modules (Speedgoat)

Simulink Real-Time

“We received

Speedgoat’s real-time

target machine in the

morning, and in the

evening our system under

test was already up and

running.

That’s how rapid

prototyping should be,

shouldn’t it?”

M. Feriencik, RUAG

Space AG, Switzerland

Page 29: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

29

What’s Next

Introduction and overview

What is real-time testing?

Workflow of using Simulink Real-Time

Where can I learn more?

Page 30: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

30

Recorded Webinars & Examples

Watch a recorded webinar:

A Simulink Real-Time Testing Solution for Power Electronics & Motor Control

http://www.mathworks.com/company/events/webinars/wbnr68656.html

Prove Your Simulink Designs with Real-Time Hardware Testing

https://www.mathworks.com/company/events/webinars/wbnr73147.html

Explore example models:

Field-Oriented Control of a Permanent Magnet Synchronous MachineThis example shows the basic workflow and key APIs for generating C code from a motor control algorithm, and for verifying its compiled behavior and execution time.

http://mathworks.com/products/demos/shipping/rtw/rtwdemo_pmsmfoc_script.html

xPC Target Examples demonstrating features of xPC Target.

(real-time parameter tuning, signal monitoring, data logging, and more)

http://www.mathworks.com/products/xpctarget/examples.html

Page 31: Simulink Real-Time workshop at Apple Inc. - MathWorks · PDF fileSimulink Real-Time workshop at Apple Inc. ... Sonova Shortens Product Development ... Very robust and fanless design,

31

Need help getting started?

Product-focused training classes

Public or customized on-site training

Jump start services get you up and running quickly

Custom, project-based, application support

Work with your Account Manager to identify topics of

interest and customize services to meet your needs.