31
VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1 www.vissim.com

VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Embed Size (px)

Citation preview

Page 1: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

VisSim for Model Based Embedded System

Development

Visual Solutions, Inc.487 Groton Road, Westford MA 01886 USA

(800) VISSIM-1www.vissim.com

Page 2: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Agenda• Visual Solutions Introduction• VisSim Product Review• VisSim Demo• Target-in-loop simulation + code gen demo

Page 3: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

2

Visual Solutions• Founded in 1989

• Headquarters in Westford, Mass

• Over 350,000 licenses worldwide

• EDN Magazine Hot 100

• MathSoft OEM since 2000

• TI Partner since 2000

Page 4: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Visual SolutionsMarkets & Major AccountsAerospace Motion Control Power & GasAllied-Signal Allen Bradley British GasGeneral Dynamics Danaher Motion Arizona P&G GEC Alsthom Maxon Motor AG Florida Light & PowerBF Goodrich Aerospace General Electric Drives Hitachi PowerBoeing EPH Elektronik GmbH Manitoba PowerBritish Aerospace Indramat Ontario HydroCessna Instron Corporation Pacific Gas & ElectricEglin AFB Copley Controls Three Mile IslandKollsman Kollmorgen Stanwell Coal GenLitton Parker Hannifin Tenneco GasLockheed-Martin Universal Instruments TVANASA Spectra Physics Union ElectricNorthrop-Grumman Vickers Virginia PowerPratt & Whitney Pacific Scientific Kestrel PowerTextron Heinzinger electronic GmbH Dong Energy

Page 5: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Visual Solutions Markets & Major AccountsIndustry Process Control TransportationABB-Instrumentation Alcan Rolled Products ABBAllen Bradley Amoco BombardierCarrier Corporation Bethlehem Steel British RailCorning Bayer ChryslerFuji Electronics BP Chemical EatonGeneral Electric Champion International Ford3M Dow Chemical GMHoneywell DuPont Honda R & DHughes Foxboro MazdaIBM General Mills VolvoJohnson Controls Georgia PacificMotorola International PaperRaytheon Kaiser AluminumTRW Mead PaperToshiba Mobil ChemicalUnited Technologies PotlatchWestinghouse Weyerhaeuser

Page 6: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

VisSim at ResMedResMed uses VisSim in all phases of product

development for CPAP human respiratory aid- Models of controller- High fidelity models of human variation and pathology- Run pure simulations to tune controllers- Use VisSim/C-code to develop embedded system to run

various virtual patients to test against final product- Use VisSim/Viewer to distribute VisSim simulation of

CPAP and human for pre and post sales training

Page 7: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

VSI Relationships

• Mathsoft bundled VisSim/PE and LE low end VisSim products.

• TI Third-Party partner. VisSim/ECD link is included in C2000 kits.

• IBM (Telelogic) resells VisSim as “Continuous Modeler”. Tight co-simulation coupling with Statemate.

Page 8: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

VisSim• Visual block diagram software for dynamic simulation

and model-based embedded development.– Automatic production of high quality fixed point code– Exceptional dynamic and Hardware-in-loop simulation

capabilities– Automatic programming of on-chip MCU peripherals– Intuitive, easy-to-use graphical user interface– Fast sample rates (> 500 kHz)– Low memory foot print (1.5k flash 200 bytes RAM)– Affordable

Page 9: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

More Advantages…• Royalty Free Redistributable Viewer

– Allows you to send VisSim models to anyone. Models can be run but not altered.

• Ease of use gives faster training, faster reuse of old projects.• Fast interpretive execution gives quick feedback on designs• Built-in C interpreter gives industry standard text based language

– Allows specification of same .c init file in simulation as codegen target– Allows efficient code generation for state transition block: transition events

appear in generated code exactly as they are entered.• Efficient code generation

– Tight fixed point code– Usage of same variable names as in VisSim

Page 10: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Product Line• VisSim Core Visual Simulation Tool

– Interactively build, simulate and debug nonlinear models

– Simulink Translator– State Transition block– Over 200 built-in blocks– Built-in C interpreter– Matlab interface– Royalty free redistributable Viewer

Page 11: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

VisSim Add-ons

• Real-Time - Allows up to 30 kHz closed loop sampling from VisSim on PC

• C-Code - Generates ANSI C from diagram• Analyze - Frequency domain analysis of

linearized non-linear subsystem• Fixed-point - Block set of bit true scaled integer

operations for simulation and code generation

Page 12: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

VisSim Add-ons• Comm - Physical layer data communication• Optimize Pro - Generalized Reduced Gradient

method of parameter optimization• Neural nets - Neural network construction and

training package• Texas Instruments MSP430 (F1x, F2x, F4x,

F5x) and C2000 (LF240x, F281x, F280x, F2802x/3x(Piccolo), F2833x (Delfino), C6713

Page 13: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

VisSim Add-ons

• Motion Block Set - Preconstructed block set for motion control– Includes AC Induction– Brush and brushless DC– Stepper motors– Controllers– Rotational and translational loads.

Page 14: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Some VisSim Examples

• Simple damped harmonic – basic linear differential equation

• Lorenz attractor – basic nonlinear diff. eq.• Interactive power spectral density• System ID• PID tuning• Embedded Mathcad worksheet

Page 15: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

VisSim/Real-Time• Supports National Instruments and

Measurement Computing boards• Analog, digital, thermocouple, counter, PWM,

encoder• 30 kHz close loop sampling straight from

Windows/NT,2000, XP• Just place block and select “Run in Real-Time”

from Simulations Properties dialog.

Page 16: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

VisSim Plays Well with Others• OLE interface- allows inclusion of any OLE

compliant software– VisSim - Mathcad OLE interface allows graphics

plus data exchange• VisSim - Matlab Integration allows matrix data

exchange and Matlab expression evaluation• Simulink Translator brings Simulink diagrams

into VisSim workspace.

Page 17: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

VisSim Custom Block API• MSVC Wizard creates project for custom

block. Just drop in code.• API allows:

– Menu positioning– Block & connector naming and data typing– Code generation– Simulation info on integration method,

integration step, time step, current time etc.

Page 18: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

VisSim Viewer• Free redistributable run-time version of VisSim• Allows licensed users to freely distribute models

to those who do not have VisSim development licenses

• Easy way to share ideas, models and simulations

• Supply proof-of-concept simulations to potential customers

Page 19: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

VisSim/Embedded Controls Developer• Bundle of VisSim, C-Code, C2000 target, TI

DMC block-set , fixed-point block set, TI Code Composer Studio plug-in

• Supports F280x,F282x, F283x on-chip peripherals: ADC, ePWM, eCAN, QEP(encoder), event capture, UART, SPI, GPIO, I2C, interrupts, watch dog

• VisSim/Motion motor simulator add-on

Page 20: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

The VisSim RTOS• VisSim provides a simple RTOS environment

– Main low jitter (submicrosecond) control thread runs at time step as set in diagram “Simulation Properties…”

– Unlimited number of preemptable (high jitter) background threads – (option in Compound block)

• Jitter = variation in actual time step from specification

– Schedule synchronous tasks from main thread– Efficient device drivers for on-chip peripherals – Handle interrupts directly in VisSim (option in Compound block)– Interrupt based soft queued I/O for serial, SPI and I2C

Page 21: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

The Code gen Dialog

• From Tools > Code gen…• Result file• Select Target

– Device below on right• Include Compound names as comments• On-Chip RAM (no external RAM)• Target Flash (put code in flash memory)• Minimize RAM Usage (uses no numerical integration)• Make Callable from User App (generate 2 functions, init and rate,

to be called from custom application or RTOS)• Include VisSim Communication Inteface (add PC communcation task to

target. Boot waits for PC handshake before starting controller)

Page 22: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Simulate Control Subsystems• Minimize time spent in debug and test

• Use high-level, pre-

debugged blocks

• Support simulation of controller at block level on PC

• Allow mouse probe of every input and output to display values at any instant

• Debug block-level simulation on PC

Page 23: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Digital control of DC-DC Buck Converter• Uses PID controlled PWM power modulation

to maintain ADC sensed output voltage• Control setpoint through VisSim GUI• Interactive plot of controller contributions, set-

point, and output• 8 parallel converters run at 300 kHz sample

rate

Page 24: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Hardware-in-the-Loop• Control runs on MCU, background monitor talks to PC over JTAG in background task

VisSim Interface block downloads and monitorscode running on target

PlantUnder

Control

• JTAG in Real-Time Monitor mode allows interactive controller gain changes and plot of results

• Rapid, diagram level, edit-compile-download-debug cycle (under 10 secs)

• Test, debug, and validate the on-MCU control from VisSim using a targetInterface block

• Calibrate controller gains on embedded target easily with VisSim interface

VisSim blocks for:• Virtual plant• Interactive gains• Plots of target response

VisSim on PC

C2000 MCU

ControlApplication

Code*C2000Peripherals

JTAG

* Code automatically generated, compiled, linked, and downloaded

JTAGMCU I/O(PWM,GPIO,Analog, CAN,encoder)

Page 25: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Codegen for 8 DC-DC Buck Converters• Uses 2.3K words flash• Uses 171 words RAM• Uses 80% of processor at 300KHz operation• Has 100 Hz background task to read

temperature sensor on ADC line, and send status to LED bank via SPI

• Code uses inline read/write of I/O registers• Retains VisSim variables as C variables

Page 26: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

7

VisSim/ECD Benefits• Automatic code generation plus peripheral

support results in quicker design time, fewer design iterations and faster time to market

• Easy debug with JTAG HotLink + CPU Utilization feature means confidence that the resulting product meets design specifications

• Self-documenting block diagrams make intellectual property easier to reuse

Page 27: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Embedded Target Support

• Texas Instruments – MSP430 (F10xx, F2xx, F4xx, F5xx)– C2000 (LF2407, F2812, F280x, F2802x/3x/6x(Piccolo),

F2833x (Defino), Concerto in development– C6713

• QNX x86• Emulators and development boards from:

TI, Spectrum Digital, Softbaugh, Olimex– XDS510, XDS100 (low cost), Blackhawk, Signum JTAGjet

Page 28: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

TI Digital Motor Control Library

– Core was written, tested and optimized by TI– Available in VisSim/ECD as easy-to-use block set– Block set coded in C++ to VisSim User Block API– Supports simulation mode (pure PC based

simulation with 16-bit truncation effects)– Supports code generation mode

Page 29: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Conclusion

• VisSim/Embedded Controls Developer is a valuable tool to accelerate embedded development

• VisSim/ECD speeds embedded design of:– Fixed-point operations– On-chip peripheral usage– Motion control– Industrial closed-loop control– Digital power systems

Page 30: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Next Step

• Visit www.vissim.com/piccoloAnd download a trial copy of VisSim/Embedded Controls Developer for TI C2000

Page 31: VisSim for Model Based Embedded System Development Visual Solutions, Inc. 487 Groton Road, Westford MA 01886 USA (800) VISSIM-1

Advantages vs Simulink

• Cost for Embedded MCU Development– $10,000 for VisSim– $4,800(matlab&simulink)+7,500 RTW+Embedded

Coder 5,000 + JTAG target link $2,000 + FixedPoint $2,000 + DSP blocks $1,000 + stateFlow $2,800 + stateFlow Coder = $25,000

• Network floating license– VisSim = 2x = $20,000 (worldwide $20,000)– Simulink = 4x = $100,000 (worldwide $300,000)