real-time interface

6
56 Real-Time Interface Implementation Software / 2013 Real-Time Interface Implementation software for running models on dSPACE hardware Highlights n Automatic implementation of MATLAB ® /Simulink ® / Stateflow ® models on dSPACE hardware n Automatic code generation n Graphical I/O configuration via comprehensive Simulink block libraries n Easy and safe to use due to automatic consistency checks n Support of model referencing hierarchies 1) Application Areas No matter whether you are performing rapid control proto- typing or hardware-in-the-loop simulation: Real-Time Inter- face (RTI) is the link between dSPACE hardware and the development software MATLAB/Simulink/Stateflow from MathWorks ® . Key Benefits RTI lets you concentrate fully on the actual design process and carry out fast design iterations. It extends the C code generator Simulink Coder (formerly Real-Time Workshop ® ) Working with RTI To connect your model to a dSPACE I/O board, just drag & drop the I/O module from the RTI block library and then con- nect it to the Simulink blocks. All settings, such as parameter- ization, are available by clicking the appropriate blocks. Simulink Coder (formerly Real-Time Workshop ® ) generates the model code while RTI provides blocks that implement the I/O capabilities of dSPACE systems in your Simulink models, thus preparing the model for the real-time application. Your real-time model is compiled, downloaded, and started auto- matically on your real-time hardware, without you having to write a single line of code. RTI guides you during the con- figuration. RTI provides consistency checks, so potential errors can be identified and corrected before or during the build process. Comprehensive Functionalities RTI handles any kind of continuous-time, discrete-time, and multirate system. Depending on the I/O hardware, different channels of the same I/O board can be used with different sample rates, and even in different subsystems. RTI supports asynchronous events and lets you set task priorities and task overrun strategies for executing the interrupt-driven sub- systems. It also supports time-triggered tasks and timetables, which allow you to implement tasks and groups of tasks with variable or predefined delay times in relation to an associated trigger event. This makes task handling in your model very flexible. In addition, RTI offers checks which help avoid double or improper use of channels. 1) Please contact dSPACE for information on features and limitations. for the seamless, automatic implementation of your Simulink and Stateflow models on the real-time hardware. The implementation time is greatly reduced. The hardware configuration for the real-time application is guided by automatic consistency checks to prevent parameterization errors. For maximum flexibility, each RTI version supports several different MATLAB releases (see www.dspace.com/ goto?Compatibility). Models from most previous MATLAB and RTI releases are migrated automatically when newer versions of RTI are used. dSPACE GmbH Rathenaustraße 26 33102 Paderborn Germany [email protected] www.dspace.com

Upload: scribd-publisher

Post on 08-Nov-2014

75 views

Category:

Documents


1 download

DESCRIPTION

Implementation software for running models on dSPACE hardware

TRANSCRIPT

Page 1: Real-Time Interface

56

Real-Time InterfaceImplementation Software /

2013

Real-Time InterfaceImplementation software for running models on dSPACE hardware

Highlights

n Automatic implementation of MATLAB ® /Simulink ® /

Statefl ow ® models on dSPACE hardware

n Automatic code generation

n Graphical I/O confi guration via comprehensive

Simulink block libraries

n Easy and safe to use due to automatic consistency

checks

n Support of model referencing hierarchies1)

Application Areas No matter whether you are performing rapid control proto-

typing or hardware-in-the-loop simulation: Real-Time Inter-

face (RTI) is the link between dSPACE hardware and the

development software MATLAB/Simulink/Statefl ow from

MathWorks®.

Key Benefi ts RTI lets you concentrate fully on the actual design process

and carry out fast design iterations. It extends the C code

generator Simulink Coder™ (formerly Real-Time Workshop®)

Working with RTI To connect your model to a dSPACE I/O board, just drag &

drop the I/O module from the RTI block library and then con-

nect it to the Simulink blocks. All settings, such as parameter-

ization, are available by clicking the appropriate blocks.

Simulink Coder™ (formerly Real-Time Workshop®) generates

the model code while RTI provides blocks that implement the

I/O capabilities of dSPACE systems in your Simulink models,

thus preparing the model for the real-time application. Your

real-time model is compiled, downloaded, and started auto-

matically on your real-time hardware, without you having to

write a single line of code. RTI guides you during the con-

fi guration. RTI provides consistency checks, so potential errors

can be identifi ed and corrected before or during the build

process.

Comprehensive Functionalities RTI handles any kind of continuous-time, discrete-time, and

multirate system. Depending on the I/O hardware, different

channels of the same I/O board can be used with different

sample rates, and even in different subsystems. RTI supports

asynchronous events and lets you set task priorities and task

overrun strategies for executing the interrupt-driven sub-

systems. It also supports time-triggered tasks and timetables,

which allow you to implement tasks and groups of tasks

with variable or predefi ned delay times in relation to an

associated trigger event. This makes task handling in your

model very fl exible. In addition, RTI offers checks which help

avoid double or improper use of channels.

1) Please contact dSPACE for information on features and limitations.

for the seamless, automatic implementation of your

Simulink and Statefl ow models on the real-time hardware.

The implementation time is greatly reduced. The hardware

confi guration for the real-time application is guided by

automatic consistency checks to prevent parameterization

errors. For maximum fl exibility, each RTI version supports

several different MATLAB releases (see www.dspace.com/

goto?Compatibility). Models from most previous MATLAB

and RTI releases are migrated automatically when newer

versions of RTI are used.

dSPACE GmbH • Rathenaustraße 26 • 33102 Paderborn • Germany • [email protected] • www.dspace.com

Page 2: Real-Time Interface

572013

Real-Time InterfaceImplementation Software /

Intr

oduc

tion

Appl

icat

ion

Fiel

dsSo

ftwar

eHa

rdw

are

Engi

neer

ing

Supp

ort a

nd M

aint

enan

ce

Functionality Overview

Functionality Description

I/O configuration nComprehensive block library for specifying the hardware setupnConfiguration of dSPACE I/O simply by connecting the relevant blocks to the Simulink blocksnI/O parameter specification, such as voltage ranges, resolutions, digital I/O, serial interface parameters,

and PWM frequenciesnAutomatic checks on parameter ranges and consistencynI/O access anywhere in your model and at different sample ratesnSeparate blocks for different functions of complex I/O boardsnData typing and data-typed I/OnAsynchronous execution of Simulink subsystems triggered by hardware or software interruptsnS-functions and user-written code

Generating real-time code nGeneration of C code by Simulink Coder™ (formerly Real-Time Workshop®)nC code optimization for real-time implementationsnSupport of Simulink Coder™ (formerly Real-Time Workshop®) code optimizationsnGeneration of initialization functions and I/O function calls

Automatic task definition nSupport of multirate systems and preemptive, priority-based multitaskingnSingle timer and multiple timer task modenAsynchronous tasksnExternal hardware interruptsnSoftware interruptsnConfigurable priority and overrun handling for each tasknTurnaround time measurement for each tasknOptional synchronization of periodic timer tasks to external eventsnTime-triggered tasks and timetablesnNon-real-time simulation modes

Invoking the compiler nAutomatic compiler call that compiles and links the model

Loading and starting the application nProgram download to the real-time hardwarenSimulation controlnInteractive control, monitoring, and data acquisition with ControlDesk® Next Generation (p. 96)nData acquisition with time stamps

Order Information

Product Order Number

Real-Time Interface nRTI

dSPACE GmbH • Rathenaustraße 26 • 33102 Paderborn • Germany • [email protected] • www.dspace.com

Page 3: Real-Time Interface

58

Real-Time InterfaceImplementation Software /

2013

Hardware Order Number

Required nPentium® 4 at 2 GHz (or equivalent)n1 GB RAM (minimum), 2 GB RAM or more (recommended)

Optional nDS1103 PPC Controller Board (p. 294) nDS1103

nDS1104 R&D Controller Board (p. 300) nDS1104

nDS1005 PPC Board (p. 312) nDS1005

nDS1006 Processor Board (p. 316) nDS1006

nMicroAutoBox II (p. 472)1) nSee p. 4721) The former MicroAutoBox can also be used.

Relevant Software and Hardware

Software Order Number

Required nMicrotec C Compiler (p. 90) for DS1103, DS1104, DS1005, and MicroAutoBox II nCCPPPC

nGNU C Compiler for DS1006 nIncluded with DS1006

nOperating system: www.dspace.com/goto?os_compatibility –

n MATLAB®/Simulink®/Simulink Coder™ (formerly Real-Time Workshop®) from The MathWorks For maximum flexibility, each RTI release supports several different MATLAB releases (see www.dspace.com/goto?Compatibility)

Optional nReal-Time Interface for Multiprocessor Systems RTI-MP (p. 62) nRTI_MP

nReal-Time Interface Bypass Blockset (p. 64) nRTIBYPASS_BS

nReal-Time Interface CAN Blockset (p. 68) nRTICAN_BS

nReal-Time Interface CAN MultiMessage Blockset (p. 70) nRTICANMM_BS

nReal-Time Interface LIN MultiMessage Blockset (p. 73) nRTILINMM_BS

ndSPACE FlexRay Configuration Package (p. 76) nFCP

nRTI RapidPro Control Unit Blockset (p. 497) nRTIRAPIDPRO_BS

nRTI AUTOSAR Package (p. 82) nRTIAUTOSAR_PKG

nRTI FPGA Programming Blockset (p. 86) nRTIFPGA_BS

nStateflow®/Stateflow Coder® from The MathWorks (p. 164) –

nEthernet Blocksets (p. 88) See p. 88

Implementing a Model with Real-Time Interface

Model DesignIn this example, the closed control loop of the positioning

system for a hard disk drive is shown in the block diagram.

Both the controller and the model of the controlled system

are designed in the MATLAB/Simulink development environ-

ment.

dSPACE GmbH • Rathenaustraße 26 • 33102 Paderborn • Germany • [email protected] • www.dspace.com

Page 4: Real-Time Interface

592013

Real-Time InterfaceImplementation Software /

Intr

oduc

tion

Appl

icat

ion

Fiel

dsSo

ftwar

eHa

rdw

are

Engi

neer

ing

Supp

ort a

nd M

aint

enan

ce

Graphical I/O ConfigurationWhen you have finished testing your model in Simulink, it

has to be prepared for implementation on the real-time

hardware. The plant model is replaced by I/O blocks that

form the interfaces to the real controlled system. To add an

I/O model, simply drag a block from the RTI I/O library to

the model and connect the block with the I/O of the con-

troller.

Parameter SpecificationI/O parameters are specified by double-clicking an I/O block

and entering the data in graphical user interfaces. In this

example, the input signals are the feedback value and the

reference signal. The reference signal now comes from an

external signal generator and is read in by an ADC block.

The output signal from the controller is the control signal

u_M, which is output by the hardware via a DAC block.

dSPACE GmbH • Rathenaustraße 26 • 33102 Paderborn • Germany • [email protected] • www.dspace.com

Page 5: Real-Time Interface

60

Real-Time InterfaceImplementation Software /

2013

Implementation on dSPACE HardwareAutomatic implementation of the Simulink model on dSPACE

hardware is the key to rapid design iterations. With RTI you

will not see a single line of code during this process. A

single click on Build starts the implementation, including

code generation, compiling, and downloading. You can

select an integration algorithm and a step size in the solver

page of the Simulation Parameters dialog. Build procedures

can also be automated with the help of scripts. This is

especially useful for large models.

Interaction with Experiment SoftwareWhen your application is running on the real-time hardware,

the whole dSPACE experiment software is at your disposal.

RTI ensures that you have control over each individual vari-

able immediately after the implementation process.

ControlDesk Next Generation provides an instrument panel

that enables you to change parameters and monitor signals –

without regenerating the code. ControlDesk Next Genera-

tion also displays the time histories of any variable used by

your application.

dSPACE GmbH • Rathenaustraße 26 • 33102 Paderborn • Germany • [email protected] • www.dspace.com

Page 6: Real-Time Interface

612013

Real-Time InterfaceImplementation Software /

Intr

oduc

tion

Appl

icat

ion

Fiel

dsSo

ftwar

eHa

rdw

are

Engi

neer

ing

Supp

ort a

nd M

aint

enan

ce

Blocksets for Real-Time Interface

dSPACE FlexRay Configuration PackageFor configuring dSPACE systems in FlexRay communica-

tion networks.

n dSPACE FlexRay Configuration Package (p. 76)

Supporting dSPACE HardwareNo matter whether you are using dSPACE systems with

single-board hardware, modular hardware, or MicroAuto-

Box  II1): RTI supports all dSPACE real-time processors and

allows convenient model and I/O configuration of your

dSPACE system.

Real-Time Interface for Multiprocessor SystemsFor graphical setup of multiprocessor structures.

n RTI-MP (p. 62)

RTI Bypass BlocksetFor configuring bypass applications.

n RTI Bypass Blockset (p. 64)

CAN BlocksetsFor combining dSPACE systems with CAN communication

networks.

n RTI CAN Blockset (p. 68)

n RTI CAN MultiMessage Blockset (p. 70)

RTI LIN MultiMessage BlocksetFor combining dSPACE systems with LIN communication

networks.

n RTI LIN MultiMessage Blockset (p. 73)

RTI RapidPro Control Unit BlocksetExtensive I/O functionalities for the MicroAutoBox II1) or

DS1005 used in combination with the RapidPro Control

Unit, e.g., for engine, chassis, and drives control.

n RTI RapidPro Control Unit Blockset (p. 497)

Real-Time InterfaceBypass Blockset

Real-Time InterfaceCAN Blockset

Real-Time InterfaceLIN MultiMessage

Blockset

Real-Time InterfaceAUTOSAR Package

Real-Time InterfaceFPGA Programming

BlocksetEthernet Blocksets

dSPACE FlexRayConfiguration

Package

Real-Time Interfacefor Multiprocessor Systems

Real-Time InterfaceCAN MultiMessage

Blockset

Real-Time Interface RapidPro Control Unit

Blockset

Real-Time Interface (RTI)

RTI AUTOSAR PackageUsing AUTOSAR software components in a MATLAB®/

Simulink® environment

n RTI AUTOSAR Package (p. 82)

RTI FPGA Programming BlocksetIntegrating FPGA models in dSPACE systems.

n RTI FPGA Programming Blockset (p. 86)

1) The former MicroAutoBox can also be used.

Ethernet BlocksetsConnecting dSPACE hardware to other devices via Ethernet

n Ethernet Blocksets (p. 88)

dSPACE GmbH • Rathenaustraße 26 • 33102 Paderborn • Germany • [email protected] • www.dspace.com